From eee3ac5bda3b6d458767c0057b77429dfc0ea8b5 Mon Sep 17 00:00:00 2001 From: jmichel80 Date: Thu, 2 Dec 2021 15:31:07 -0800 Subject: [PATCH 001/148] new openmm integrator, currently duplicate of openmmfrenergyst --- corelib/src/libs/SireMove/CMakeLists.txt | 2 + corelib/src/libs/SireMove/openmmpmefep.cpp | 4197 ++++++++++++++++++++ corelib/src/libs/SireMove/openmmpmefep.h | 343 ++ 3 files changed, 4542 insertions(+) create mode 100644 corelib/src/libs/SireMove/openmmpmefep.cpp create mode 100644 corelib/src/libs/SireMove/openmmpmefep.h diff --git a/corelib/src/libs/SireMove/CMakeLists.txt b/corelib/src/libs/SireMove/CMakeLists.txt index d88c3e95d..e862f8ed8 100644 --- a/corelib/src/libs/SireMove/CMakeLists.txt +++ b/corelib/src/libs/SireMove/CMakeLists.txt @@ -133,12 +133,14 @@ set ( SIREMOVE_OPENMM_HEADERS openmmmdintegrator.h openmmfrenergydt.h openmmfrenergyst.h + openmmpmefep.h ) set ( SIREMOVE_OPENMM_SOURCES openmmmdintegrator.cpp openmmfrenergydt.cpp openmmfrenergyst.cpp + openmmpmefep.cpp ) if ( ${SIRE_USE_OPENMM} ) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp new file mode 100644 index 000000000..f5756842c --- /dev/null +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -0,0 +1,4197 @@ +/******************************************** \ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2009 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "openmmpmefep.h" +#include "ensemble.h" + +#include "SireMol/moleculegroup.h" +#include "SireMol/partialmolecule.h" +#include "SireMol/molecule.h" +#include "SireMol/atommasses.h" +#include "SireMol/atomcoords.h" +#include "SireMol/moleditor.h" + +#include "SireMol/amberparameters.h" + +#include "SireSystem/system.h" + +#include "SireBase/variantproperty.h" + +#include "SireFF/forcetable.h" + +#include "SireMaths/rangenerator.h" + +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" + +#include "SireUnits/units.h" +#include "SireUnits/temperature.h" +#include "SireUnits/convert.h" + +// ADDED BY JM +#include "SireMol/connectivity.h" +#include "SireMol/bondid.h" +#include "SireMol/atomcharges.h" +#include "SireMM/internalff.h" +#include "SireIO/amber.h" +#include "SireMM/atomljs.h" + +#include "SireVol/periodicbox.h" +#include "SireVol/triclinicbox.h" + +#include "SireMove/flexibility.h" + +#include "SireMaths/constants.h" + +//ADDED BY GAC +#include "SireMaths/vector.h" +#include "SireMol/mgname.h" +#include "SireMol/perturbation.h" +#include "SireMM/internalperturbation.h" +#include +#include +#include +#include + + + +using namespace SireMove; +using namespace SireSystem; +using namespace SireMol; +using namespace SireFF; +using namespace SireCAS; +using namespace SireVol; +using namespace SireBase; +using namespace SireStream; +using namespace SireUnits; +using namespace SireUnits::Dimension; +using namespace SireMM; +using namespace SireIO; +using namespace std; +using boost::tuples::tuple; + +/** TYPES OF CUTOFF IMPLEMENTED**/ +enum +{ + NOCUTOFF = 0, + CUTOFFNONPERIODIC = 1, + CUTOFFPERIODIC = 2 +}; + +/** TYPES OF CONSTRAINTS IMPLEMENTED **/ +enum +{ + NONE = 0, + HBONDS = 1, + ALLBONDS = 2, + HANGLES = 3 + +}; + +/** TYPES OF COMBINING RULES IMPLEMENTED **/ +enum +{ + ARITHMETIC = 0, + GEOMETRIC = 1 +}; + +static const RegisterMetaType r_openmmint; + +/** Serialise to a binary datastream */ +QDataStream &operator<<(QDataStream &ds, const OpenMMPMEFEP &velver) +{ + writeHeader(ds, r_openmmint, 1); + + SharedDataStream sds(ds); + + sds << velver.frequent_save_velocities << velver.molgroup << velver.solute + << velver.solutehard << velver.solutetodummy << velver.solutefromdummy + << velver.combiningRules + << velver.CutoffType << velver.cutoff_distance << velver.field_dielectric + << velver.Andersen_flag << velver.Andersen_frequency + << velver.MCBarostat_flag << velver.MCBarostat_frequency + << velver.ConstraintType << velver.Pressure << velver.Temperature + << velver.platform_type << velver.Restraint_flag + << velver.CMMremoval_frequency << velver.buffer_frequency + << velver.energy_frequency + << velver.device_index << velver.precision << velver.Alchemical_value + << velver.coulomb_power << velver.shift_delta << velver.delta_alchemical + << velver.alchemical_array + << velver.Integrator_type + << velver.friction << velver.integration_tol + << velver.timeskip << velver.reinitialise_context + << static_cast (velver); + // Free OpenMM pointers?? + + return ds; +} + +/** Extract from a binary datastream */ +QDataStream &operator>>(QDataStream &ds, OpenMMPMEFEP &velver) +{ + VersionID v = readHeader(ds, r_openmmint); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> velver.frequent_save_velocities >> velver.molgroup + >> velver.solute >> velver.solutehard >> velver.solutetodummy + >> velver.solutefromdummy >> velver.combiningRules + >> velver.CutoffType >> velver.cutoff_distance + >> velver.field_dielectric >> velver.Andersen_flag + >> velver.Andersen_frequency >> velver.MCBarostat_flag + >> velver.MCBarostat_frequency >> velver.ConstraintType + >> velver.Pressure >> velver.Temperature >> velver.platform_type + >> velver.Restraint_flag >> velver.CMMremoval_frequency + >> velver.buffer_frequency >> velver.energy_frequency + >> velver.device_index >> velver.precision >> velver.Alchemical_value + >> velver.coulomb_power >> velver.shift_delta >> velver.delta_alchemical + >> velver.alchemical_array + >> velver.Integrator_type >> velver.friction >> velver.integration_tol + >> velver.timeskip >> velver.reinitialise_context + >> static_cast (velver); + + // Maybe....need to reinitialise from molgroup because openmm system was not serialised... + velver.isSystemInitialised = false; + velver.isContextInitialised = false; + + //qDebug() << " Re-initialisation of OpenMMPMEFEP from datastream"; + + velver.initialise(); + } + else + throw version_error(v, "1", r_openmmint, CODELOC); + + return ds; +} + +/** Constructor*/ +OpenMMPMEFEP::OpenMMPMEFEP(bool frequent_save) +: ConcreteProperty(), +frequent_save_velocities(frequent_save), +molgroup(MoleculeGroup()), solute(MoleculeGroup()), solutehard(MoleculeGroup()), solutetodummy(MoleculeGroup()), solutefromdummy(MoleculeGroup()), +openmm_system(0), openmm_context(0), isSystemInitialised(false), isContextInitialised(false), +combiningRules("arithmetic"), +CutoffType("nocutoff"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), +Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), +MCBarostat_frequency(25), ConstraintType("none"), +Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), +CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), +shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), + finite_diff_gradients(), pot_energies(), perturbed_energies(), reduced_perturbed_energies(), + forward_Metropolis(), backward_Metropolis(), +Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), integration_tol(0.001), timeskip(0.0 * picosecond), +reinitialise_context(false), Debug(false) +{ +} + +/** Constructor using the passed molecule groups */ +OpenMMPMEFEP::OpenMMPMEFEP(const MoleculeGroup &molecule_group, const MoleculeGroup &solute_group, const MoleculeGroup &solute_hard, const MoleculeGroup &solute_todummy, const MoleculeGroup &solute_fromdummy, bool frequent_save) +: ConcreteProperty(), +frequent_save_velocities(frequent_save), +molgroup(molecule_group), solute(solute_group), solutehard(solute_hard), solutetodummy(solute_todummy), solutefromdummy(solute_fromdummy), +openmm_system(0), openmm_context(0), isSystemInitialised(false), isContextInitialised(false), +combiningRules("arithmetic"), +CutoffType("nocutoff"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), +Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), +MCBarostat_frequency(25), ConstraintType("none"), +Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), +CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), +shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), finite_diff_gradients(), pot_energies(), perturbed_energies(), + reduced_perturbed_energies(), forward_Metropolis(), backward_Metropolis(), +Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), integration_tol(0.001), timeskip(0.0 * picosecond), +reinitialise_context(false), Debug(false) +{ +} + +/** Copy constructor */ +OpenMMPMEFEP::OpenMMPMEFEP(const OpenMMPMEFEP &other) +: ConcreteProperty(other), +frequent_save_velocities(other.frequent_save_velocities), +molgroup(other.molgroup), solute(other.solute), solutehard(other.solutehard), +solutetodummy(other.solutetodummy), solutefromdummy(other.solutefromdummy), +openmm_system(other.openmm_system), openmm_context(other.openmm_context), isSystemInitialised(other.isSystemInitialised), +isContextInitialised(other.isContextInitialised), +combiningRules(other.combiningRules), +CutoffType(other.CutoffType), cutoff_distance(other.cutoff_distance), +field_dielectric(other.field_dielectric), Andersen_flag(other.Andersen_flag), +Andersen_frequency(other.Andersen_frequency), MCBarostat_flag(other.MCBarostat_flag), +MCBarostat_frequency(other.MCBarostat_frequency), ConstraintType(other.ConstraintType), +Pressure(other.Pressure), Temperature(other.Temperature), platform_type(other.platform_type), +Restraint_flag(other.Restraint_flag), CMMremoval_frequency(other.CMMremoval_frequency), +buffer_frequency(other.buffer_frequency), energy_frequency(other.energy_frequency), device_index(other.device_index), +precision(other.precision), Alchemical_value(other.Alchemical_value), +coulomb_power(other.coulomb_power), shift_delta(other.shift_delta), +delta_alchemical(other.delta_alchemical), alchemical_array(other.alchemical_array), finite_diff_gradients(other.finite_diff_gradients), pot_energies(other.pot_energies), +perturbed_energies(other.perturbed_energies),reduced_perturbed_energies(other.reduced_perturbed_energies), + forward_Metropolis(other.forward_Metropolis), backward_Metropolis(other.backward_Metropolis), +Integrator_type(other.Integrator_type), friction(other.friction), integration_tol(other.integration_tol), timeskip(other.timeskip), +reinitialise_context(other.reinitialise_context), Debug(other.Debug) +{ +} + +/** Destructor */ +OpenMMPMEFEP::~OpenMMPMEFEP() +{ + //delete openmm_system; +} + +/** Copy assignment operator */ +OpenMMPMEFEP& OpenMMPMEFEP::operator=(const OpenMMPMEFEP &other) +{ + Integrator::operator=(other); + frequent_save_velocities = other.frequent_save_velocities; + molgroup = other.molgroup; + solute = other.solute; + solutehard = other.solutehard; + solutetodummy = other.solutetodummy; + solutefromdummy = other.solutefromdummy; + openmm_system = other.openmm_system; + openmm_context = other.openmm_context; + isSystemInitialised = other.isSystemInitialised; + isContextInitialised = other.isContextInitialised; + combiningRules = other.combiningRules; + CutoffType = other.CutoffType; + cutoff_distance = other.cutoff_distance; + field_dielectric = other.field_dielectric; + Andersen_flag = other.Andersen_flag; + Andersen_frequency = other.Andersen_frequency; + MCBarostat_flag = other.MCBarostat_flag; + MCBarostat_frequency = other.MCBarostat_frequency; + ConstraintType = other.ConstraintType; + Pressure = other.Pressure; + Temperature = other.Temperature; + platform_type = other.platform_type; + Restraint_flag = other.Restraint_flag; + CMMremoval_frequency = other.CMMremoval_frequency; + buffer_frequency = other.buffer_frequency; + energy_frequency = other.energy_frequency; + device_index = other.device_index; + precision = other.precision; + Alchemical_value = other.Alchemical_value; + coulomb_power = other.coulomb_power; + shift_delta = other.shift_delta; + delta_alchemical = other.delta_alchemical; + alchemical_array = other.alchemical_array; + finite_diff_gradients = other.finite_diff_gradients; + pot_energies = other.pot_energies; + reduced_perturbed_energies = other. reduced_perturbed_energies; + forward_Metropolis = other.forward_Metropolis; + backward_Metropolis = other.backward_Metropolis; + perturbed_energies = other.perturbed_energies; + Integrator_type = other.Integrator_type; + friction = other.friction; + integration_tol = other.integration_tol; + timeskip = other.timeskip; + reinitialise_context = other.reinitialise_context; + Debug = other.Debug; + return *this; +} + +/** + * + * @param other + * @return boolean + */ +bool OpenMMPMEFEP::operator==(const OpenMMPMEFEP &other) const +{ + return frequent_save_velocities == other.frequent_save_velocities + and isSystemInitialised == other.isSystemInitialised + and isContextInitialised == other.isContextInitialised + and combiningRules == other.combiningRules + and CutoffType == other.CutoffType + and cutoff_distance == other.cutoff_distance + and field_dielectric == other.field_dielectric + and Andersen_flag == other.Andersen_flag + and Andersen_frequency == other.Andersen_frequency + and MCBarostat_flag == other.MCBarostat_flag + and MCBarostat_frequency == other.MCBarostat_frequency + and ConstraintType == other.ConstraintType + and Pressure == other.Pressure + and Temperature == other.Temperature + and platform_type == other.platform_type + and Restraint_flag == other.Restraint_flag + and CMMremoval_frequency == other.CMMremoval_frequency + and buffer_frequency == other.buffer_frequency + and energy_frequency == other.energy_frequency + and device_index == other.device_index + and precision == other.precision + and Alchemical_value == other.Alchemical_value + and coulomb_power == other.coulomb_power + and shift_delta == other.shift_delta + and delta_alchemical == other.delta_alchemical + and alchemical_array == other.alchemical_array + and finite_diff_gradients == other.finite_diff_gradients + and pot_energies == other.pot_energies + and reduced_perturbed_energies == other.reduced_perturbed_energies + and forward_Metropolis == other.forward_Metropolis + and backward_Metropolis == other. backward_Metropolis + and perturbed_energies == other.perturbed_energies + and Integrator_type == other.Integrator_type + and friction == other.friction + and integration_tol == other.integration_tol + and timeskip == other.timeskip + and reinitialise_context == other.reinitialise_context + and Debug == other.Debug + and Integrator::operator==(other); +} + +/** Comparison operator */ +bool OpenMMPMEFEP::operator!=(const OpenMMPMEFEP &other) const +{ + return not OpenMMPMEFEP::operator==(other); +} + +/** Return a string representation of this integrator */ +QString OpenMMPMEFEP::toString() const +{ + return QObject::tr("OpenMMPMEFEP()"); +} + +/** + * initialises the openMM Free energy single topology calculation + * Initialise must be called before anything else happens. + */ +void OpenMMPMEFEP::initialise() +{ + + bool Debug = false; + if (Debug) + { + qDebug() << "Initialising OpenMMPMEFEP"; + const std::string version = OpenMM::Platform::getOpenMMVersion(); + qDebug() << "OpenMM Version: " << QString::fromUtf8(version.data(), version.size()); + } + + // Create a workspace using the stored molgroup + + const MoleculeGroup moleculegroup = this->molgroup.read(); + + if (moleculegroup.isEmpty()) + { + throw SireError::program_bug(QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup has not been defined"), CODELOC); + } + + const MoleculeGroup solute = this->solute.read(); + + //if ( solute.isEmpty() ){ + // throw SireError::program_bug(QObject::tr("Cannot initialise OpenMMPMEFEP because solute group has not been defined"), CODELOC); + //} + + + const MoleculeGroup solutehard = this->solutehard.read(); + + const MoleculeGroup solutetodummy = this->solutetodummy.read(); + + const MoleculeGroup solutefromdummy = this->solutefromdummy.read(); + + AtomicVelocityWorkspace ws = this->createWorkspace(moleculegroup).read().asA(); + + const int nmols = ws.nMolecules(); + + int nats = 0; + + for (int i = 0; i < nmols; ++i) + { + nats = nats + ws.nAtoms(i); + } + + if (Debug) + qDebug() << "There are " << nats << " atoms " << "There are " << nmols << " molecules" << "\n"; + + int flag_cutoff; + int flag_constraint; + + if (CutoffType == "nocutoff") + flag_cutoff = NOCUTOFF; + else if (CutoffType == "cutoffnonperiodic") + flag_cutoff = CUTOFFNONPERIODIC; + else if (CutoffType == "cutoffperiodic") + flag_cutoff = CUTOFFPERIODIC; + else + throw SireError::program_bug(QObject::tr("The CutOff method has not been specified. Possible choises: nocutoff, cutoffnonperiodic, cutoffperiodic"), CODELOC); + + if (Debug) + qDebug() << "\nCutoffType = " << CutoffType << "\n"; + + int flag_combRules; + + if (combiningRules == "arithmetic") + flag_combRules = ARITHMETIC; + else if (combiningRules == "geometric") + flag_combRules = GEOMETRIC; + else + throw SireError::program_bug(QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), CODELOC); + + if (Debug) + qDebug() << "\ncombiningRules = " << combiningRules << "\n"; + + bool flag_noperturbedconstraints = false; + bool flag_constraint_water = false; + if (ConstraintType == "none") + flag_constraint = NONE; + else if (ConstraintType == "hbonds") + flag_constraint = HBONDS; + else if (ConstraintType == "allbonds") + flag_constraint = ALLBONDS; + else if (ConstraintType == "hangles") + flag_constraint = HANGLES; + else if (ConstraintType == "hbonds-notperturbed") + { + flag_constraint = HBONDS; + flag_noperturbedconstraints = true; + } + else if (ConstraintType == "none-notwater") + { + flag_constraint = NONE; + flag_constraint_water = true; + } + else + throw SireError::program_bug(QObject::tr("The Constraints method has not been specified." + "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), CODELOC); + + if (Debug) + qDebug() << "\nConstraint Type = " << ConstraintType << "\n"; + + //Load Plugins from the OpenMM standard Plugin Directory + OpenMM::Platform::loadPluginsFromDirectory(OpenMM::Platform::getDefaultPluginsDirectory()); + + OpenMM::System * system_openmm = new OpenMM::System(); + + system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), + OpenMM::Vec3(0, 6, 0), + OpenMM::Vec3(0, 0, 6)); + + //The Standard Non Bonded is only defined to extract 1-2,1-3,1-4 pairs from the system + OpenMM::NonbondedForce * nonbond_openmm = new OpenMM::NonbondedForce(); + + nonbond_openmm->setUseDispersionCorrection(false); + + //CUSTOM NON BONDED FORCE FIELD + + OpenMM::CustomNonbondedForce * custom_force_field = NULL; + + //1-4 interactions + OpenMM::CustomBondForce * custom_intra_14_clj = NULL; + OpenMM::CustomBondForce * custom_intra_14_todummy = NULL; + OpenMM::CustomBondForce * custom_intra_14_fromdummy = NULL; + OpenMM::CustomBondForce * custom_intra_14_fromdummy_todummy = NULL; + + if (flag_cutoff == NOCUTOFF) + { + if (coulomb_power > 0) + { + //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 + //JM 9/10/20 multiply Logic_mix_lam by * 0 instead of max(lam,1.0-lam) + std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" + "Hcs = (lambda^n) * 138.935456 * q_prod/sqrt(diff_cl+r^2);" + "diff_cl = (1.0-lambda) * 0.01;" + "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" + "LJ=((sigma_avg * sigma_avg)/soft)^3;" + "soft=(diff_lj*delta*sigma_avg + r*r);" + "diff_lj=(1.0-lambda) * 0.1;" + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" + "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" + "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; + + if (flag_combRules == ARITHMETIC) + { + energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + else if (flag_combRules == GEOMETRIC) + { + energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + + custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; + custom_force_field->addGlobalParameter("lam", Alchemical_value); + custom_force_field->addGlobalParameter("delta", shift_delta); + custom_force_field->addGlobalParameter("n", coulomb_power); + custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::NoCutoff); + + std::string intra_14_todummy = """Hcs + Hls;" + "Hcs=(lamtd^ntd)*138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamtd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltatd*sigma_avg+r*r);" + "diff_lj=(1.0-lamtd)*0.1;" + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + } + + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + + std::string intra_14_fromdummy = """Hcs + Hls;" + "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamfd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltafd*sigma_avg+r*r);" + "diff_lj=(1.0-lamfd)*0.1;" + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + } + + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + + //JM 9/10/20 set lamFTD to 0 instead of max(lamftd,1-lamftd) + + std::string intra_14_fromdummy_todummy = """Hcs + Hls;" + "Hcs=(lamFTD^nftd)*138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamFTD)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltaftd*sigma_avg+r*r);" + "diff_lj=(1.0-lamFTD)*0.1;" + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" + "sigma_avg = lamftd*saend + (1-lamftd)*sastart;" + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" + "lamFTD = max(lamftd,1-lamftd);"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + } + + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + + } + else + { + // coulomb_power == 0. //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 + + // JM 9/10/20 multiply Logix_mix_lam by 0 instead of max(lam,1.0-lam) + std::string energybase ="""(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" + "Hcs = 138.935456 * q_prod/sqrt(diff_cl+r^2);" + "diff_cl = (1.0-lambda) * 0.01;" + "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" + "LJ=((sigma_avg * sigma_avg)/soft)^3;" + "soft=(diff_lj*delta*sigma_avg + r*r);" + "diff_lj=(1.0-lambda) * 0.1;" + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" + "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" + "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; + + if (flag_combRules == ARITHMETIC) + { + energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + else if (flag_combRules == GEOMETRIC) + { + energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + + custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; + custom_force_field->addGlobalParameter("lam", Alchemical_value); + custom_force_field->addGlobalParameter("delta", shift_delta); + custom_force_field->addGlobalParameter("n", coulomb_power); + custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::NoCutoff); + + std::string intra_14_todummy = """Hcs + Hls;" + "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamtd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltatd*sigma_avg+r*r);" + "diff_lj=(1.0-lamtd)*0.1;" + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + } + + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + + std::string intra_14_fromdummy = """Hcs + Hls;" + "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamfd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltafd*sigma_avg+r*r);" + "diff_lj=(1.0-lamfd)*0.1;" + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + } + + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + + // JM 9/10/20 set lamFTD to 0.0 + + std::string intra_14_fromdummy_todummy = """Hcs + Hls;" + "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamFTD)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltaftd*sigma_avg+r*r);" + "diff_lj=(1.0-lamFTD)*0.1;" + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" + "lamFTD = max(lamftd,1-lamftd);"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + } + + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + } + + std::string intra_14_clj = """Hl+Hc;" + "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" + "Hc=138.935456*q_prod/r;" + "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" + "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_clj.append("sigma_avg = lamhd*saend + (1-lamhd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); + } + + custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; + custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); + + if (Debug) + { + qDebug() << "\nCut off type = " << CutoffType << "\n"; + qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta << "\n"; + } + } + else + { + //CUTOFF PERIODIC OR NON PERIODIC + + const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); + + double eps2 = (field_dielectric - 1.0) / (2 * field_dielectric + 1.0); + double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); + double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); + + if (coulomb_power > 0) + { + //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 + + // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) + std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" + "Hcs = (lambda^n) * 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" + "crflam = crf * src;" + "krflam = krf * src * src * src;" + "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" + "diff_cl = (1.0-lambda) * 0.01;" + "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" + "LJ=((sigma_avg * sigma_avg)/soft)^3;" + "soft=(diff_lj*delta*sigma_avg + r*r);" + "diff_lj=(1.0-lambda) * 0.1;" + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" + "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" + "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; + + if (flag_combRules == ARITHMETIC) + { + energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + else if (flag_combRules == GEOMETRIC) + { + energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + + custom_force_field = new OpenMM::CustomNonbondedForce(energybase); + custom_force_field->setCutoffDistance(converted_cutoff_distance); + custom_force_field->addGlobalParameter("lam", Alchemical_value); + custom_force_field->addGlobalParameter("delta", shift_delta); + custom_force_field->addGlobalParameter("n", coulomb_power); + custom_force_field->addGlobalParameter("krf", kvalue); + custom_force_field->addGlobalParameter("crf", cvalue); + custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + if (flag_cutoff == CUTOFFNONPERIODIC) + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); + } + else + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + } + + // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then + // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application + // of the reaction field on the 14 pairs in Sire. + + std::string intra_14_todummy = """withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofftd-r);" + "Hcs=(lamtd^ntd)*138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamtd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltatd*sigma_avg+r*r);" + "diff_lj=(1.0-lamtd)*0.1;" + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + } + + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + + std::string intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofffd-r);" + "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamfd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltafd*sigma_avg+r*r);" + "diff_lj=(1.0-lamfd)*0.1;" + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + } + + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + + //JM 9/10/20 set lamFTD to 0 + std::string intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutoffftd-r);" + "Hcs=(lamFTD^nftd)*138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamFTD)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltaftd*sigma_avg+r*r);" + "diff_lj=(1.0-lamFTD)*0.1;" + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" + "sigma_avg = lamftd*saend + (1-lamftd)*sastart;" + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" + "lamFTD = max(lamftd,1-lamftd);"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + } + + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + } + else + { + //coulomb_power == 0. //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 + + //JM 9/10/10 setting Logix_mix_lam output to 0 for lambda + + std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" + "Hcs = 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" + "crflam = crf * src;" + "krflam = krf * src * src * src;" + "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" + "diff_cl = (1.0-lambda) * 0.01;" + "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" + "LJ=((sigma_avg * sigma_avg)/soft)^3;" + "soft=(diff_lj*delta*sigma_avg + r*r);" + "diff_lj=(1.0-lambda) * 0.1;" + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" + "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" + "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; + + if (flag_combRules == ARITHMETIC) + { + energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + else if (flag_combRules == GEOMETRIC) + { + energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + + custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; + custom_force_field->setCutoffDistance(converted_cutoff_distance); + custom_force_field->addGlobalParameter("lam", Alchemical_value); + custom_force_field->addGlobalParameter("delta", shift_delta); + custom_force_field->addGlobalParameter("n", coulomb_power); + custom_force_field->addGlobalParameter("krf", kvalue); + custom_force_field->addGlobalParameter("crf", cvalue); + custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + + if (flag_cutoff == CUTOFFNONPERIODIC) + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); + } + else + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + } + + // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) + // then the OpenMM potential energy is not equal to he Sire energy. This is caused by the + // application of the reaction field on the 14 pairs in Sire. + + + std::string intra_14_todummy = """withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofftd-r);" + "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamtd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltatd*sigma_avg+r*r);" + "diff_lj=(1.0-lamtd)*0.1;" + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + } + + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + + + std::string intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofffd-r);" + "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamfd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltafd*sigma_avg+r*r);" + "diff_lj=(1.0-lamfd)*0.1;" + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + } + + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + + //JM 9/10/20 always set lamFTD to 0.0 + + std::string intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutoffftd-r);" + "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamFTD)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltaftd*sigma_avg+r*r);" + "diff_lj=(1.0-lamFTD)*0.1;" + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" + "lamFTD = max(lamftd,1-lamftd);"""; + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + } + + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + } + + std::string intra_14_clj = """withinCutoff*(Hl+Hc);" + "withinCutoff=step(cutoffhd-r);" + "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" + "Hc=138.935456*q_prod/r;" + "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" + "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"""; + + + if (flag_combRules == ARITHMETIC) + { + intra_14_clj.append("sigma_avg = lamhd*saend + (1-lamhd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); + } + + custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; + custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); + custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); + + //REACTION FIELD 14 IMPLEMENTATION FOR FUTURE USE + + if (Debug) + { + qDebug() << "\nCut off type = " << CutoffType; + qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; + qDebug() << "Dielectric constant = " << field_dielectric; + qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; + } + } + + // Andersen thermostat + if (Andersen_flag == true) + { + const double converted_Temperature = convertTo(Temperature.value(), kelvin); + + OpenMM::AndersenThermostat * thermostat = new OpenMM::AndersenThermostat(converted_Temperature, Andersen_frequency); + + //Set The random seed + thermostat->setRandomNumberSeed(random_seed); + + system_openmm->addForce(thermostat); + + if (Debug) + { + qDebug() << "\nAndersen Thermostat set\n"; + qDebug() << "Temperature = " << converted_Temperature << " K\n"; + qDebug() << "Frequency collisions = " << Andersen_frequency << " 1/ps\n"; + } + } + + // Monte Carlo Barostat + if (MCBarostat_flag == true) + { + const double converted_Temperature = convertTo(Temperature.value(), kelvin); + const double converted_Pressure = convertTo(Pressure.value(), bar); + + OpenMM::MonteCarloBarostat * barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, converted_Temperature, MCBarostat_frequency); + + //Set The random seed + barostat->setRandomNumberSeed(random_seed); + + system_openmm->addForce(barostat); + + if (Debug) + { + qDebug() << "\nMonte Carlo Barostat set\n"; + qDebug() << "Temperature = " << converted_Temperature << " K\n"; + qDebug() << "Pressure = " << converted_Pressure << " bar\n"; + qDebug() << "Frequency every " << MCBarostat_frequency << " steps\n"; + } + } + /*******************************************************BONDED INTERACTIONS******************************************************/ + + OpenMM::HarmonicBondForce * bondStretch_openmm = new OpenMM::HarmonicBondForce(); + + OpenMM::HarmonicAngleForce * bondBend_openmm = new OpenMM::HarmonicAngleForce(); + + OpenMM::PeriodicTorsionForce * bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); + + OpenMM::CustomBondForce* solute_bond_perturbation = NULL; + + OpenMM::CustomAngleForce* solute_angle_perturbation = NULL; + + solute_bond_perturbation = new OpenMM::CustomBondForce("0.5*B*(r-req)^2;" + "B=bend*lambond+(1.0-lambond)*bstart;" + "req=rend*lambond+(1.0-lambond)*rstart"); + + solute_bond_perturbation->addGlobalParameter("lambond", Alchemical_value); + + solute_angle_perturbation = new OpenMM::CustomAngleForce("0.5*A*(theta-thetaeq)^2;" + "A=aend*lamangle+(1.0-lamangle)*astart;" + "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); + + solute_angle_perturbation->addGlobalParameter("lamangle", Alchemical_value); + + + /************************************************************RESTRAINTS********************************************************/ + + OpenMM::CustomExternalForce * positionalRestraints_openmm = NULL; + + if (Restraint_flag == true) + { + positionalRestraints_openmm = new OpenMM::CustomExternalForce("k*d2;" + "d2 = max(0.0, d1 - d^2);" + "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2"); + positionalRestraints_openmm->addPerParticleParameter("xref"); + positionalRestraints_openmm->addPerParticleParameter("yref"); + positionalRestraints_openmm->addPerParticleParameter("zref"); + positionalRestraints_openmm->addPerParticleParameter("k"); + positionalRestraints_openmm->addPerParticleParameter("d"); + + system_openmm->addForce(positionalRestraints_openmm); + + if (Debug) + qDebug() << "\n\nRestraint is ON\n\n"; + } + + /****************************************BOND LINK POTENTIAL*****************************/ + /* !! CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy is restraints involve one atom that diffuses + out of the box. */ + + OpenMM::CustomBondForce * custom_link_bond = new OpenMM::CustomBondForce("kl*max(0,d-dl*dl);" + "d=(r-reql)*(r-reql)"); + custom_link_bond->addPerBondParameter("reql"); + custom_link_bond->addPerBondParameter("kl"); + custom_link_bond->addPerBondParameter("dl"); + + //OpenMM vector coordinate + std::vector positions_openmm(nats); + + //OpenMM vector momenta + std::vector velocities_openmm(nats); + + std::vector > bondPairs; + + int system_index = 0; + + // To avoid possible mismatch between the index in which atoms are added to the openmm system arrays and + // their atomic numbers in sire, one array is populated while filling up the openmm global arrays + // AtomNumtoopenmmIndex + QHash AtomNumToOpenMMIndex; + + for (int i = 0; i < nmols; ++i) + { + const int nats_mol = ws.nAtoms(i); + + const double *m = ws.massArray(i); + + MolNum molnum = moleculegroup.molNumAt(i); + + const ViewsOfMol &molview = moleculegroup[molnum].data(); + + const Molecule &mol = molview.molecule(); + + Selector molatoms = mol.atoms(); + + for (int j = 0; j < nats_mol; ++j) + { + /*JM 10/16 make sure that perturbed atoms have mass of heaviest end-state */ + system_openmm->addParticle(m[j]); + + Atom at = molatoms(j); + AtomNum atnum = at.number(); + + if (Debug) + qDebug() << " openMM_index " << system_index << " Sire Atom Number " << atnum.toString() << " Mass particle = " << m[j]; + + AtomNumToOpenMMIndex[atnum.value()] = system_index; + + // JM Nov 12 + // The code below implements a ThreeParticleAverageSite for virtual sites for EPW atoms present in a WAT residue + // This is very AMBER specific. + + AtomName atname = at.name(); + + if (Debug) + qDebug() << " atname " << atname.value() << " mol " << i; + + if (atname == AtomName("EPW")) + { + ResName resname = at.residue().name(); + + if (resname == ResName("WAT")) + { + Atom oatom = molatoms.select(AtomName("O")); + Atom h1atom = molatoms.select(AtomName("H1")); + Atom h2atom = molatoms.select(AtomName("H2")); + + AmberParameters amber_params = mol.property("amberparameters").asA(); + QList bonds_ff = amber_params.getAllBonds(); + + double distoh = -1.0; + double disthh = -1.0; + double distoe = -1.0; + + for (int k = 0; k < bonds_ff.length(); k++) + { + BondID bond_ff = bonds_ff[k]; + QList bond_params = amber_params.getParams(bond_ff); + + double r0 = bond_params[1]; + + AtomName at0name = mol.select(bond_ff.atom0()).name(); + AtomName at1name = mol.select(bond_ff.atom1()).name(); + + // qDebug() << " at0name " << at0name.toString() << " at1name " << at1name.toString(); + + if ((at0name == AtomName("O") and at1name == AtomName("H1")) or ( at0name == AtomName("H1") and at1name == AtomName("O"))) + { + distoh = r0; + } + else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) + { + disthh = r0; + } + else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) + { + distoe = r0; + } + } + + if (distoh < 0 or disthh < 0 or distoe < 0) + { + throw SireError::program_bug(QObject::tr( "Could not find expected atoms in TIP4P water molecule."), CODELOC); + } + + //qDebug() << " distoe " << distoe << " distoh " << distoh << " disthh " << disthh; + + double weightH = distoe / sqrt((distoh * distoh) - (0.25 * disthh * disthh)); + + int o_index = AtomNumToOpenMMIndex[oatom.number().value()]; + int h1_index = AtomNumToOpenMMIndex[h1atom.number().value()]; + int h2_index = AtomNumToOpenMMIndex[h2atom.number().value()]; + + if (Debug) + qDebug() << "virtual site " << system_index << " o " << o_index << " h1 " << h1_index << " h2 " << h2_index << " 1 - weightH " << 1 - weightH << " weightH/2 " << weightH / 2; + + OpenMM::ThreeParticleAverageSite * vsite = new OpenMM::ThreeParticleAverageSite(o_index, h1_index, h2_index, 1 - weightH, weightH / 2, weightH / 2); + + system_openmm->setVirtualSite(system_index, vsite); + } + } + + system_index = system_index + 1; + + }// end of loop on atoms in molecule + + }//end of loop on molecules in workspace + + int num_atoms_till_i = 0; + + /*NON BONDED PER PARTICLE PARAMETERS*/ + + custom_force_field->addPerParticleParameter("qstart"); + custom_force_field->addPerParticleParameter("qend"); + custom_force_field->addPerParticleParameter("epstart"); + custom_force_field->addPerParticleParameter("epend"); + custom_force_field->addPerParticleParameter("sigmastart"); + custom_force_field->addPerParticleParameter("sigmaend"); + custom_force_field->addPerParticleParameter("isHD"); + custom_force_field->addPerParticleParameter("isTD"); + custom_force_field->addPerParticleParameter("isFD"); + custom_force_field->addPerParticleParameter("isSolvent"); + + custom_intra_14_clj->addPerBondParameter("qpstart"); + custom_intra_14_clj->addPerBondParameter("qpend"); + custom_intra_14_clj->addPerBondParameter("qmix"); + custom_intra_14_clj->addPerBondParameter("eastart"); + custom_intra_14_clj->addPerBondParameter("eaend"); + custom_intra_14_clj->addPerBondParameter("emix"); + custom_intra_14_clj->addPerBondParameter("sastart"); + custom_intra_14_clj->addPerBondParameter("saend"); + custom_intra_14_clj->addPerBondParameter("samix"); + + custom_intra_14_todummy->addPerBondParameter("qpstart"); + custom_intra_14_todummy->addPerBondParameter("qpend"); + custom_intra_14_todummy->addPerBondParameter("qmix"); + custom_intra_14_todummy->addPerBondParameter("eastart"); + custom_intra_14_todummy->addPerBondParameter("eaend"); + custom_intra_14_todummy->addPerBondParameter("emix"); + custom_intra_14_todummy->addPerBondParameter("sastart"); + custom_intra_14_todummy->addPerBondParameter("saend"); + custom_intra_14_todummy->addPerBondParameter("samix"); + + custom_intra_14_fromdummy->addPerBondParameter("qpstart"); + custom_intra_14_fromdummy->addPerBondParameter("qpend"); + custom_intra_14_fromdummy->addPerBondParameter("qmix"); + custom_intra_14_fromdummy->addPerBondParameter("eastart"); + custom_intra_14_fromdummy->addPerBondParameter("eaend"); + custom_intra_14_fromdummy->addPerBondParameter("emix"); + custom_intra_14_fromdummy->addPerBondParameter("sastart"); + custom_intra_14_fromdummy->addPerBondParameter("saend"); + custom_intra_14_fromdummy->addPerBondParameter("samix"); + + custom_intra_14_fromdummy_todummy->addPerBondParameter("qpstart"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("qpend"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("qmix"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("eastart"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("eaend"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("emix"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("sastart"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("saend"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("samix"); + + /*BONDED PER PARTICLE PARAMETERS*/ + + solute_bond_perturbation->addPerBondParameter("bstart"); + solute_bond_perturbation->addPerBondParameter("bend"); + solute_bond_perturbation->addPerBondParameter("rstart"); + solute_bond_perturbation->addPerBondParameter("rend"); + + solute_angle_perturbation->addPerAngleParameter("astart"); + solute_angle_perturbation->addPerAngleParameter("aend"); + solute_angle_perturbation->addPerAngleParameter("thetastart"); + solute_angle_perturbation->addPerAngleParameter("thetaend"); + + // JM July 13. This also needs to be changed because there could be more than one perturbed molecule + //Molecule solutemol = solute.moleculeAt(0).molecule(); + + int nions = 0; + + QVector perturbed_energies_tmp(8); + + for (int i = 0; i < perturbed_energies_tmp.size(); i++) + perturbed_energies_tmp[i] = false; + + + // The default 1,4 scaling factors + double const Coulomb14Scale = 1.0 / 1.2; + double const LennardJones14Scale = 1.0 / 2.0; + + // A list of 1,4 atom pairs with non default scale factors + // for each entry, first pair has pair of indices, second has pair of scale factors + //QList< QPair< QPair, QPair > > custom14pairs; + QHash< QPair, QPair > custom14pairs; + + bool special_14 = false; + + for (int i = 0; i < nmols; i++) + { + const Vector *c = ws.coordsArray(i); + + Molecule molecule = moleculegroup.moleculeAt(i).molecule(); + + int num_atoms_molecule = molecule.nAtoms(); + + std::vector custom_non_bonded_params(10); + + if (Debug) + qDebug() << "Molecule number = " << i; + + // NON BONDED TERMS + + // The atomic parameters + AtomLJs atomvdws = molecule.property("LJ").asA(); + AtomCharges atomcharges = molecule.property("charge").asA(); + QVector ljparameters = atomvdws.toVector(); + QVector charges = atomcharges.toVector(); + + QVector start_charges; + QVector final_charges; + QVector start_LJs; + QVector final_LJs; + + if (molecule.hasProperty("perturbations")) + { + if (Debug) + qDebug() << "Molecule Perturbed number = " << i; + + AtomCharges atomcharges_start = molecule.property("initial_charge").asA(); + AtomCharges atomcharges_final = molecule.property("final_charge").asA(); + + start_charges = atomcharges_start.toVector(); + final_charges = atomcharges_final.toVector(); + + AtomLJs atomvdws_start = molecule.property("initial_LJ").asA(); + AtomLJs atomvdws_final = molecule.property("final_LJ").asA(); + start_LJs = atomvdws_start.toVector(); + final_LJs = atomvdws_final.toVector(); + } + + for (int j = 0; j < ljparameters.size(); j++) + { + double sigma = ljparameters[j].sigma(); + double epsilon = ljparameters[j].epsilon(); + double charge = charges[j].value(); + + nonbond_openmm->addParticle(charge, sigma * OpenMM::NmPerAngstrom, epsilon * OpenMM::KJPerKcal); + + Atom atom = molecule.molecule().atoms()(j); + + if (molecule.hasProperty("perturbations")) + { + // Is atom a hard, from dummy or to dummy type? + bool ishard = false; + bool istodummy = false; + bool isfromdummy = false; + + for (int l = 0; l < solutehard.nViews(); l++) + { + Selector view_atoms = solutehard.viewAt(l).atoms(); + + for (int m = 0; m < view_atoms.count(); m++) + { + Atom view_atom = view_atoms(m); + + if (atom == view_atom) + { + ishard = true; + break; + } + }//end for + + if (ishard) + break; + }//end for + + // if not hard check if to_dummy + if (!ishard) + { + for (int l = 0; l < solutetodummy.nViews(); l++) + { + Selector view_atoms = solutetodummy.viewAt(l).atoms(); + + for (int m = 0; m < view_atoms.count(); m++) + { + Atom view_atom = view_atoms(m); + + if (atom == view_atom) + { + istodummy = true; + break; + } + }//end for + if (istodummy) + break; + }//end for + } + + // if not todummy, check if fromdummy + if (!istodummy && !ishard) + { + for (int l = 0; l < solutefromdummy.nViews(); l++) + { + Selector view_atoms = solutefromdummy.viewAt(l).atoms(); + + for (int m = 0; m < view_atoms.count(); m++) + { + Atom view_atom = view_atoms(m); + + if (atom == view_atom) + { + isfromdummy = true; + break; + } + }//end for + if (isfromdummy) + break; + }//end for + } + + if (ishard) + {//hard solute atom + + double charge_start = start_charges[j].value(); + double charge_final = final_charges[j].value(); + + double epsilon_start = start_LJs[j].epsilon(); + double epsilon_final = final_LJs[j].epsilon(); + double sigma_start = start_LJs[j].sigma(); + double sigma_final = final_LJs[j].sigma(); + + custom_non_bonded_params[0] = charge_start; + custom_non_bonded_params[1] = charge_final; + custom_non_bonded_params[2] = epsilon_start * OpenMM::KJPerKcal; + custom_non_bonded_params[3] = epsilon_final * OpenMM::KJPerKcal; + custom_non_bonded_params[4] = sigma_start * OpenMM::NmPerAngstrom; + custom_non_bonded_params[5] = sigma_final * OpenMM::NmPerAngstrom; + custom_non_bonded_params[6] = 1.0; //isHard + custom_non_bonded_params[7] = 0.0; //isTodummy + custom_non_bonded_params[8] = 0.0; //isFromdummy + custom_non_bonded_params[9] = 0.0; //isSolventProtein + + if (Debug) + qDebug() << "hard solute = " << atom.index(); + } + // JM July 13 THIS NEEDS FIXING TO DEAL WITH GROUPS THAT CONTAIN MORE THAN ONE MOLECULE + else if (istodummy) + {//to dummy solute atom + + double charge_start = start_charges[j].value(); + double charge_final = final_charges[j].value(); + double epsilon_start = start_LJs[j].epsilon(); + double epsilon_final = final_LJs[j].epsilon(); + double sigma_start = start_LJs[j].sigma(); + double sigma_final = final_LJs[j].sigma(); + + custom_non_bonded_params[0] = charge_start; + custom_non_bonded_params[1] = charge_final; + custom_non_bonded_params[2] = epsilon_start * OpenMM::KJPerKcal; + custom_non_bonded_params[3] = epsilon_final * OpenMM::KJPerKcal; + custom_non_bonded_params[4] = sigma_start * OpenMM::NmPerAngstrom; + custom_non_bonded_params[5] = sigma_final * OpenMM::NmPerAngstrom; + custom_non_bonded_params[6] = 0.0; //isHard + custom_non_bonded_params[7] = 1.0; //isTodummy + custom_non_bonded_params[8] = 0.0; //isFromdummy + custom_non_bonded_params[9] = 0.0; //isSolventProtein + + if (Debug) + qDebug() << "to dummy solute = " << atom.index(); + } + else if (isfromdummy) + {//from dummy solute atom + + double charge_start = start_charges[j].value(); + double charge_final = final_charges[j].value(); + double epsilon_start = start_LJs[j].epsilon(); + double epsilon_final = final_LJs[j].epsilon(); + double sigma_start = start_LJs[j].sigma(); + double sigma_final = final_LJs[j].sigma(); + + custom_non_bonded_params[0] = charge_start; + custom_non_bonded_params[1] = charge_final; + custom_non_bonded_params[2] = epsilon_start * OpenMM::KJPerKcal; + custom_non_bonded_params[3] = epsilon_final * OpenMM::KJPerKcal; + custom_non_bonded_params[4] = sigma_start * OpenMM::NmPerAngstrom; + custom_non_bonded_params[5] = sigma_final * OpenMM::NmPerAngstrom; + custom_non_bonded_params[6] = 0.0; //isHard + custom_non_bonded_params[7] = 0.0; //isTodummy + custom_non_bonded_params[8] = 1.0; //isFromdummy + custom_non_bonded_params[9] = 0.0; //isSolventProtein + + if (Debug) + qDebug() << "from dummy solute = " << atom.index(); + } + + else + {//What if some atoms were not perturbed at all in the pert file? Use default params + + custom_non_bonded_params[0] = charge; + custom_non_bonded_params[1] = charge; + custom_non_bonded_params[2] = epsilon * OpenMM::KJPerKcal; + custom_non_bonded_params[3] = epsilon * OpenMM::KJPerKcal; + custom_non_bonded_params[4] = sigma * OpenMM::NmPerAngstrom; + custom_non_bonded_params[5] = sigma * OpenMM::NmPerAngstrom; + custom_non_bonded_params[6] = 1.0; //isHard + custom_non_bonded_params[7] = 0.0; //isTodummy + custom_non_bonded_params[8] = 0.0; //isFromdummy + custom_non_bonded_params[9] = 0.0; //isSolventProtein + + if (Debug) + qDebug() << " unperturbed solute atom " << atom.index(); + } + }//end if perturbation section + else + {//solvent atom like hard + + custom_non_bonded_params[0] = charge; + custom_non_bonded_params[1] = charge; + custom_non_bonded_params[2] = epsilon * OpenMM::KJPerKcal; + custom_non_bonded_params[3] = epsilon * OpenMM::KJPerKcal; + custom_non_bonded_params[4] = sigma * OpenMM::NmPerAngstrom; + custom_non_bonded_params[5] = sigma * OpenMM::NmPerAngstrom; + custom_non_bonded_params[6] = 1.0; //isHard + custom_non_bonded_params[7] = 0.0; //isTodummy + custom_non_bonded_params[8] = 0.0; //isFromdummy + custom_non_bonded_params[9] = 1.0; //isSolventProtein + + if (Debug) + qDebug() << "Solvent = " << atom.index(); + + } + + if (Debug) + { + qDebug() << "Charge start = " << custom_non_bonded_params[0]; + qDebug() << "Charge end = " << custom_non_bonded_params[1]; + qDebug() << "Eps start = " << custom_non_bonded_params[2]; + qDebug() << "Eps end = " << custom_non_bonded_params[3]; + qDebug() << "Sig start = " << custom_non_bonded_params[4]; + qDebug() << "Sig end = " << custom_non_bonded_params[5]; + qDebug() << "is Hard = " << custom_non_bonded_params[6]; + qDebug() << "is To dummy = " << custom_non_bonded_params[7]; + qDebug() << "is From dummy = " << custom_non_bonded_params[8]; + qDebug() << "is Solvent = " << custom_non_bonded_params[9] << "\n"; + } + + custom_force_field->addParticle(custom_non_bonded_params); + } + + /****************************************************RESTRAINTS*******************************************************/ + + if (Restraint_flag == true) + { + bool hasRestrainedAtoms = molecule.hasProperty("restrainedatoms"); + + if (hasRestrainedAtoms) + { + Properties restrainedAtoms = molecule.property("restrainedatoms").asA(); + + int nrestrainedatoms = restrainedAtoms.property(QString("nrestrainedatoms")).asA().toInt(); + + if (Debug) + qDebug() << "nrestrainedatoms = " << nrestrainedatoms; + + for (int i = 0; i < nrestrainedatoms; i++) + { + int atomnum = restrainedAtoms.property(QString("AtomNum(%1)").arg(i)).asA().toInt(); + double xref = restrainedAtoms.property(QString("x(%1)").arg(i)).asA().toDouble(); + double yref = restrainedAtoms.property(QString("y(%1)").arg(i)).asA().toDouble(); + double zref = restrainedAtoms.property(QString("z(%1)").arg(i)).asA().toDouble(); + double k = restrainedAtoms.property(QString("k(%1)").arg(i)).asA().toDouble(); + double d = restrainedAtoms.property(QString("d(%1)").arg(i)).asA().toDouble(); + + int openmmindex = AtomNumToOpenMMIndex[atomnum]; + + if (Debug) + { + qDebug() << "atomnum " << atomnum << " openmmindex " << openmmindex << " x " << xref << " y " << yref << " z " << zref << " k " << k << " d " << d; + } + + int posrestrdim = 5; + std::vector params(posrestrdim); + + params[0] = xref * OpenMM::NmPerAngstrom; + params[1] = yref * OpenMM::NmPerAngstrom; + params[2] = zref * OpenMM::NmPerAngstrom; + params[3] = k * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + params[4] = d * OpenMM::NmPerAngstrom; + + positionalRestraints_openmm->addParticle(openmmindex, params); + } + } + }//end of restraint flag + + // IONS + + bool hasConnectivity = molecule.hasProperty("connectivity"); + + if (!hasConnectivity) + { + num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; + + if (Debug) + { + qDebug() << "\nAtoms = " << num_atoms_molecule << " Num atoms till i =" << num_atoms_till_i << "\n"; + qDebug() << "\n*********************MONOATOMIC MOLECULE DETECTED**************************\n"; + } + nions = nions + 1; + continue; + } + + //BONDED TERMS + + QList< BondID > bond_pert_list; + QList< BondID > bond_pert_swap_list; + QList< AngleID > angle_pert_list; + QList< AngleID > angle_pert_swap_list; + QList< DihedralID > dihedral_pert_list; + QList< DihedralID > dihedral_pert_swap_list; + QList< ImproperID > improper_pert_list; + QList< ImproperID > improper_pert_swap_list; + + /* "Light" atoms are defined to have a mass of HMASS or smaller. This + ensures that hydrogens in the HMR scheme will be constraint. The + specific value of 5.0 assumes that the HMR factor does not exceed + 4.0 and the heavy atom in CH3 or NH3 does have a minimum mass (see + OpenMMMD.py) larger than HMASS. In this way hydrogens and heavier + atoms (assuming no elements between H and C) should be cleanly + separated by mass. */ + double HMASS = 5.0; // g/mol + + double SMALL = 0.0001; + + if (solute.contains(molecule)) + { + Perturbations pert_params = molecule.property("perturbations").asA(); + + QList< PropPtr > perturbation_list = pert_params.perturbations(); + + std::vector solute_bond_perturbation_params(4); + std::vector solute_angle_perturbation_params(4); + std::vector solute_torsion_perturbation_params(1); + + QHash bond_pert_eq_list; + + for (QList< PropPtr >::const_iterator it = perturbation_list.constBegin(); it != perturbation_list.constEnd(); ++it) + { + const Perturbation &pert = *it; + + if (pert.isA()) + { + QString str = pert.what(); + + if (str == "SireMM::TwoAtomPerturbation") + { + const TwoAtomPerturbation &two = pert.asA(); + int idx0 = two.atom0().asA().value() + num_atoms_till_i; + int idx1 = two.atom1().asA().value() + num_atoms_till_i; + double rstart = two.initialForms()[Symbol("r0")].toString().toDouble(); + double bstart = two.initialForms()[Symbol("k")].toString().toDouble(); + double rend = two.finalForms()[Symbol("r0")].toString().toDouble(); + double bend = two.finalForms()[Symbol("k")].toString().toDouble(); + + solute_bond_perturbation_params[0] = bstart * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; + solute_bond_perturbation_params[1] = bend * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; + solute_bond_perturbation_params[2] = rstart * OpenMM::NmPerAngstrom; + solute_bond_perturbation_params[3] = rend * OpenMM::NmPerAngstrom; + + /* JM 10/16 Also apply this if 'no solute constraints' flag is on*/ + if (flag_constraint == NONE) + { + solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); + } + else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) + { + /* JM 10/16 ALLBONDS and HANGLES may be unwise with current free energy implementation !*/ + double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + bond_pert_eq_list.insert(BondID(two.atom0(), two.atom1()), pert_eq_distance * OpenMM::AngstromsPerNm); + if (Debug) + { + qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << " Nm"; + qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << " Nm"; + qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << " Nm"; + } + } + /* JM 10/16 */ + /* Here add code to constraint hbonds only if initial and final parameters are unperturbed*/ + /* check also what is the mass of the atoms in that case */ + else if (flag_constraint == HBONDS and flag_noperturbedconstraints) + { + const SireMol::Atom atom0 = molecule.select(two.atom0()); + //double m0 = atom0.property("mass").value(); + double m0 = system_openmm->getParticleMass(idx0); + const SireMol::Atom atom1 = molecule.select(two.atom1()); + //double m1 = atom1.property("mass").value(); + double m1 = system_openmm->getParticleMass(idx1); + double deltar = abs(rend-rstart); + double deltak = abs(bend-bstart); + // only constraint if m0 < 1.1 g.mol-1 or m1 < 1.1 g.mol-1 + // AND the initial and final parameters differ + if (Debug) + { + qDebug() << " m0 " << m0 << " m1 " << m1 << "\n"; + qDebug() << " deltar " << deltar << " " << " deltak " << deltak; + } + /* bonds that do not change parameters are constrained*/ + double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + if (deltar < SMALL and deltak < SMALL) + { + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + if (Debug) + { + qDebug() << "perturbed bond but no parameter changes so constrained " << atom0.name().toString() + << "-" << atom1.name().toString() << "\n"; + } + } + /* bonds that change parameters and have one of the atoms with a mass < HMASS are constrained*/ + else if (m0 < HMASS or m1 < HMASS) + { + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + if (Debug) + { + qDebug() << "perturbed bond parameter changes but involving " + << " light mass so constrained " << atom0.name().toString() + << "- " << atom1.name().toString() << "\n"; + } + } + /* other bonds are flexible */ + else + { + solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); + if (Debug) + { + qDebug() << "perturbed bond flexible " << atom0.name().toString() + << "- " << atom1.name().toString() << "\n"; + } + } + } + else if (flag_constraint == HBONDS) + { + const SireMol::Atom atom0 = molecule.select(two.atom0()); + QString initial_type_atom0 = atom0.property("initial_ambertype"); + QString final_type_atom0 = atom0.property("final_ambertype"); + + const SireMol::Atom atom1 = molecule.select(two.atom1()); + QString initial_type_atom1 = atom1.property("initial_ambertype"); + QString final_type_atom1 = atom1.property("final_ambertype"); + + if (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) || final_type_atom0.startsWith("h", Qt::CaseInsensitive) || + initial_type_atom1.startsWith("h", Qt::CaseInsensitive) || final_type_atom1.startsWith("h", Qt::CaseInsensitive)) + { + double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + + if (Debug) + { + qDebug() << "Two/one bond atom(s) start(s) or end(s) with h/H"; + qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << " Nm"; + qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << " Nm"; + qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << " Nm"; + } + } + else + { + solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); + } + + if (Debug) + { + qDebug() << "Atom0 initil type = " << initial_type_atom0; + qDebug() << "Atom0 final type = " << final_type_atom0; + qDebug() << "Atom1 initil type = " << initial_type_atom1; + qDebug() << "Atom1 final type = " << final_type_atom1; + } + + } + + bond_pert_list.append(BondID(two.atom0(), two.atom1())); + bond_pert_swap_list.append(BondID(two.atom1(), two.atom0())); + + bondPairs.push_back(std::make_pair(idx0, idx1)); + + if (Debug) + { + qDebug() << "Atom0 = " << two.atom0().asA().value() << + "Atom1 = " << two.atom1().asA().value(); + qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "\n"; + qDebug() << "rstart = " << rstart << " A" << + "rend = " << rend << " A"; + qDebug() << "bstart = " << bstart << " kcal/A A" << + "bend = " << bend << " kcal/A A" << "\n"; + } + } + if (str == "SireMM::ThreeAtomPerturbation") + { + const ThreeAtomPerturbation &three = pert.asA(); + int idx0 = three.atom0().asA().value() + num_atoms_till_i; + int idx1 = three.atom1().asA().value() + num_atoms_till_i; + int idx2 = three.atom2().asA().value() + num_atoms_till_i; + double astart = three.initialForms()[Symbol("k")].toString().toDouble(); + double thetastart = three.initialForms()[Symbol("theta0")].toString().toDouble(); + double aend = three.finalForms()[Symbol("k")].toString().toDouble(); + double thetaend = three.finalForms()[Symbol("theta0")].toString().toDouble(); + + solute_angle_perturbation_params[0] = astart * 2.0 * OpenMM::KJPerKcal; + solute_angle_perturbation_params[1] = aend * 2.0 * OpenMM::KJPerKcal; + solute_angle_perturbation_params[2] = thetastart; + solute_angle_perturbation_params[3] = thetaend; + + if (Debug) + { + qDebug() << "astart = " << solute_angle_perturbation_params[0] << " kJ/rad rad" << + " aend = " << solute_angle_perturbation_params[1] << " kJ/rad rad"; + qDebug() << "thetastart = " << solute_angle_perturbation_params[2] << " rad" << + "thetaend = " << solute_angle_perturbation_params[3] << " rad"; + } + + if (flag_constraint == HANGLES) + { + const SireMol::Atom atom0 = molecule.select(three.atom0()); + QString initial_type_atom0 = atom0.property("initial_ambertype"); + QString final_type_atom0 = atom0.property("final_ambertype"); + + const SireMol::Atom atom1 = molecule.select(three.atom1()); + QString initial_type_atom1 = atom1.property("initial_ambertype"); + QString final_type_atom1 = atom1.property("final_ambertype"); + + const SireMol::Atom atom2 = molecule.select(three.atom2()); + QString initial_type_atom2 = atom2.property("initial_ambertype"); + QString final_type_atom2 = atom2.property("final_ambertype"); + + bool H_X_H = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && + (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); + + bool H_O_X = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && + (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) || final_type_atom1.startsWith("o", Qt::CaseInsensitive)); + + bool X_O_H = (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) || final_type_atom1.startsWith("o", Qt::CaseInsensitive)) && + (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); + + if (Debug) + { + if (H_X_H) + qDebug() << "type = H_X_H"; + if (H_O_X) + qDebug() << "type = H_O_X"; + if (X_O_H) + qDebug() << "type = X_O_H"; + } + + if (H_X_H || H_O_X || X_O_H) + { + const BondID * first_alchemical_bond = NULL; + const BondID * second_alchemical_bond = NULL; + + double first_alchemical_distance = -1.0; + double second_alchemical_distance = -1.0; + + if (bond_pert_eq_list.contains(BondID(three.atom0(), three.atom1()))) + { + first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom0(), three.atom1()))).key()); + first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); + if (Debug) + qDebug() << "Atom0 - Atom1"; + } + else if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom0()))) + { + first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), three.atom0()))).key()); + first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); + if (Debug) + qDebug() << "Atom1 - Atom0"; + } + else + { + if (Debug) + qDebug() << "First perturbed bond was not foud in the perturned list"; + first_alchemical_bond = new BondID(three.atom0(), three.atom1()); + } + + + if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom2()))) + { + second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), three.atom2()))).key()); + second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); + if (Debug) + qDebug() << "Atom1 - Atom2"; + } + else if (bond_pert_eq_list.contains(BondID(three.atom2(), three.atom1()))) + { + second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom2(), three.atom1()))).key()); + second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); + if (Debug) + qDebug() << "Atom2 - Atom1"; + } + else + { + if (Debug) + qDebug() << "Second perturbed bond was not foud in the perturned list"; + second_alchemical_bond = new BondID(three.atom2(), three.atom1()); + } + + + if (Debug) + qDebug() << "First Alchemical distance = " << first_alchemical_distance + << "Second Alchemical distance = " << second_alchemical_distance; + + SireMaths::Vector bond1_vec; + SireMaths::Vector bond2_vec; + + if (first_alchemical_bond->atom0() == second_alchemical_bond->atom0()) + { + SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom0 = Bond2 Atom0"; + } + else if (first_alchemical_bond->atom0() == second_alchemical_bond->atom1()) + { + SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom0 = Bond2 Atom1"; + } + else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom0()) + { + SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom1 = Bond2 Atom0"; + } + else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom1()) + { + SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom1 = Bond2 Atom1"; + } + else + throw SireError::program_bug(QObject::tr("No coorner bond"), CODELOC); + + if (Debug) + { + if (first_alchemical_distance != -1.0) + { + qDebug() << "First vector X = " << (bond1_vec.normalise() * first_alchemical_distance).x(); + qDebug() << "First vector Y = " << (bond1_vec.normalise() * first_alchemical_distance).y(); + qDebug() << "First vector Z = " << (bond1_vec.normalise() * first_alchemical_distance).z(); + } + else + { + qDebug() << "First vector X = " << (bond1_vec).x(); + qDebug() << "First vector Y = " << (bond1_vec).y(); + qDebug() << "First vector Z = " << (bond1_vec).z(); + } + + if (second_alchemical_distance != -1.0) + { + qDebug() << "Second vector X = " << (bond2_vec.normalise() * second_alchemical_distance).x(); + qDebug() << "Second vector Y = " << (bond2_vec.normalise() * second_alchemical_distance).y(); + qDebug() << "Second vector Z = " << (bond2_vec.normalise() * second_alchemical_distance).z(); + } + else + { + qDebug() << "Second vector X = " << (bond2_vec).x(); + qDebug() << "Second vector Y = " << (bond2_vec).y(); + qDebug() << "Second vector Z = " << (bond2_vec).z(); + } + } + + double constraint_distance; + + double eq_angle = solute_angle_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_angle_perturbation_params[2]; + + if (first_alchemical_distance == -1.0 && second_alchemical_distance != -1.0) + { + //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) + double sq = bond1_vec.length() * bond1_vec.length() + + (bond2_vec.normalise() * second_alchemical_distance).length() * (bond2_vec.normalise() * second_alchemical_distance).length(); + + double dp = 2.0 * bond1_vec.length() * (bond2_vec.normalise() * second_alchemical_distance).length() * cos(eq_angle); + + constraint_distance = sqrt(sq - dp); + + //constraint_distance = (bond1_vec - bond2_vec.normalise() * second_alchemical_distance).length(); + } + else if (first_alchemical_distance != -1.0 && second_alchemical_distance == -1.0) + { + //Carnot theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) + double sq = bond2_vec.length() * bond2_vec.length() + + (bond1_vec.normalise() * first_alchemical_distance).length() * (bond1_vec.normalise() * first_alchemical_distance).length(); + + double dp = 2.0 * bond2_vec.length() * (bond2_vec.normalise() * first_alchemical_distance).length() * cos(eq_angle); + + constraint_distance = sqrt(sq - dp); + + //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec).length(); + } + else if (first_alchemical_distance != -1.0 && second_alchemical_distance != -1.0) + { + //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) + double sq = (bond1_vec.normalise() * first_alchemical_distance).length() * (bond1_vec.normalise() * first_alchemical_distance).length() + + (bond2_vec.normalise() * second_alchemical_distance).length() * (bond2_vec.normalise() * second_alchemical_distance).length(); + + double dp = 2.0 * (bond1_vec.normalise() * first_alchemical_distance).length() * (bond2_vec.normalise() * second_alchemical_distance).length() * cos(eq_angle); + + constraint_distance = sqrt(sq - dp); + + //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec.normalise() * second_alchemical_distance).length(); + } + else + throw SireError::program_bug(QObject::tr("The angle does not contain perturbed bond"), CODELOC); + + + system_openmm->addConstraint(idx0, idx2, constraint_distance * OpenMM::NmPerAngstrom); + + if (Debug) + qDebug() << "CONSTRAINT DISTANCE = " << constraint_distance << " A"; + } + + }//end if HANGLES + else + { + solute_angle_perturbation->addAngle(idx0, idx1, idx2, solute_angle_perturbation_params); + if (Debug) + qDebug() << "Added perturbed angle"; + } + + angle_pert_list.append(AngleID(three.atom0(), three.atom1(), three.atom2())); + angle_pert_swap_list.append(AngleID(three.atom2(), three.atom1(), three.atom0())); + + if (Debug) + { + qDebug() << "Atom0 = " << three.atom0().asA().value() << + "Atom1 = " << three.atom1().asA().value() << + "Atom2 = " << three.atom2().asA().value(); + + qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << "\n"; + + qDebug() << "astart = " << astart << " kcal/rad rad" << + "aend = " << " kcal/rad rad" << aend; + + qDebug() << "thetastart = " << thetastart << " rad" << + "thetaend = " << thetaend << " rad" << "\n"; + } + } + if (str == "SireMM::FourAtomPerturbation") + { + + const FourAtomPerturbation &four = pert.asA(); + int idx0 = four.atom0().asA().value() + num_atoms_till_i; + int idx1 = four.atom1().asA().value() + num_atoms_till_i; + int idx2 = four.atom2().asA().value() + num_atoms_till_i; + int idx3 = four.atom3().asA().value() + num_atoms_till_i; + + QString tmp = four.perturbExpression().toOpenMMString(); + tmp.replace(QString("phi"), QString("theta")); + tmp.replace(QString("lambda"), QString("lamdih")); + tmp = "( " + tmp + " ) * " + "KJPerKcal"; + + std::string openmm_str = tmp.toStdString(); + + if (Debug) + { + qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << "IDX3 = " << idx3; + qDebug() << "Dihedral String = " << openmm_str.c_str(); + qDebug() << "Dihedral Normal String = " << four.perturbExpression().toString() << "\n"; + } + + OpenMM::CustomTorsionForce* solute_torsion_perturbation = NULL; + + solute_torsion_perturbation = new OpenMM::CustomTorsionForce(openmm_str); + solute_torsion_perturbation->addPerTorsionParameter("KJPerKcal"); + solute_torsion_perturbation_params[0] = 4.184; + solute_torsion_perturbation->addGlobalParameter("lamdih", Alchemical_value); + solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, solute_torsion_perturbation_params); + + //********************************BONDED ENERGY TORSIONS ARE ADDED TO THE SYSTEM***************************** + solute_torsion_perturbation->setForceGroup(0); + system_openmm->addForce(solute_torsion_perturbation); + + perturbed_energies_tmp[7] = true; //Torsions are added to the system + + dihedral_pert_list.append(DihedralID(four.atom0(), four.atom1(), four.atom2(), four.atom3())); + dihedral_pert_swap_list.append(DihedralID(four.atom3(), four.atom1(), four.atom2(), four.atom0())); + + improper_pert_list.append(ImproperID(four.atom0(), four.atom1(), four.atom2(), four.atom3())); + improper_pert_swap_list.append(ImproperID(four.atom0(), four.atom1(), four.atom3(), four.atom2())); + + if (Debug) + { + qDebug() << "Atom0 = " << four.atom0().asA().value() << + "Atom1 = " << four.atom1().asA().value() << + "Atom2 = " << four.atom2().asA().value() << + "Atom3 = " << four.atom3().asA().value() << "\n"; + } + } + + } + }//end for perturbations + + }//end solute molecule perturbation + + // The bonded parameters are stored in "amberparameters" + AmberParameters amber_params = molecule.property("amberparameters").asA(); + QList bonds_ff = amber_params.getAllBonds(); + QVector bonds = bonds_ff.toVector(); + ResName molfirstresname = molecule.residues()(0).name(); + //BOND + + for (int j = 0; j < bonds_ff.length(); j++) + { + BondID bond_ff = bonds_ff[j]; + QList bond_params = amber_params.getParams(bond_ff); + double k = bond_params[0]; + double r0 = bond_params[1]; + + int idx0 = bonds[j].atom0().asA().value(); + int idx1 = bonds[j].atom1().asA().value(); + + if (solute.contains(molecule)) + { + if (bond_pert_list.indexOf(bond_ff) != -1 || bond_pert_swap_list.indexOf(bond_ff) != -1) + {//Solute molecule. Check if the current solute bond is in the perturbed bond list + // JM July 13 --> Note, we should still have the ability to constrain the bond to its r(lambda) equilibrium distance + if (Debug) + qDebug() << "Found Perturbed Bond\n"; + continue; + } + } + + //Select the atom type + QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); + QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); + + idx0 = idx0 + num_atoms_till_i; + idx1 = idx1 + num_atoms_till_i; + + // JM July 13. The constraint code has to be revised to handle massless particles so TIP4P can be dealt with. + // Should check if a constraint involves an atom with a null mass, and if so skip constraint. + + if (flag_constraint == NONE) + { + //JM 10/16 If constraint water flag is on and if molecule is a water molecule then apply constraint + if (flag_constraint_water and molfirstresname == ResName("WAT")) + system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); + else + bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + + //cout << "\nBOND ADDED TO "<< atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; + } + else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) + { + system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); + //cout << "\nALLBONDS or HANGLES ADDED BOND CONSTRAINT TO " << atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; + } + else if (flag_constraint == HBONDS) + { + if ((atom0[6] == 'H') || (atom1[6] == 'H')) + { + system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); + //cout << "\nHBONDS ADDED BOND CONSTRAINT TO " << atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; + } + else + { + bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + //cout << "\nHBONDS ADDED BOND TO " << atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; + } + } + + //Bond exclusion List + bondPairs.push_back(std::make_pair(idx0, idx1)); + } + + //Angles + + QList angles_ff = amber_params.getAllAngles(); + QVector angles = angles_ff.toVector(); + + for (int j = 0; j < angles_ff.length(); j++) + { + AngleID angle_ff = angles_ff[j]; + QList angle_params = amber_params.getParams(angle_ff); + + double k = angle_params[0]; + double theta0 = angle_params[1]; // It is already in radiant + + int idx0 = angles[j].atom0().asA().value(); + int idx1 = angles[j].atom1().asA().value(); + int idx2 = angles[j].atom2().asA().value(); + + if (solute.contains(molecule)) + { + if (angle_pert_list.indexOf(angle_ff) != -1 || angle_pert_swap_list.indexOf(angle_ff) != -1) + {//Solute molecule. Check if the current solute angle is in the perturbed angle list + if (Debug) + qDebug() << "Found Perturbed Angle\n"; + continue; + } + else + { + if (Debug) + qDebug() << "Solute normal Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << idx2 << "theta0 = " << theta0 << " k = " << k << "\n"; + + idx0 = idx0 + num_atoms_till_i; + idx1 = idx1 + num_atoms_till_i; + idx2 = idx2 + num_atoms_till_i; + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, k * 2.0 * OpenMM::KJPerKcal); + continue; + } + } + if (Debug) + qDebug() << "Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << idx2 << "\n"; + + QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); + QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); + QString atom2 = molecule.atom(AtomIdx(idx2)).toString(); + + Vector diff = c[idx2] - c[idx0]; + + idx0 = idx0 + num_atoms_till_i; + idx1 = idx1 + num_atoms_till_i; + idx2 = idx2 + num_atoms_till_i; + + if (flag_constraint == HANGLES) + { + if (((atom0[6] == 'H') && (atom2[6] == 'H'))) + { + system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); + } + else if (((atom0[6] == 'H') && (atom1[6] == 'O')) || ((atom1[6] == 'O') && (atom2[6] == 'H'))) + { + system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); + } + else + { + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, k * 2.0 * OpenMM::KJPerKcal); + } + } + else + { + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, k * 2.0 * OpenMM::KJPerKcal); + } + }//end of angles + + //Dihedrals + + QList dihedrals_ff = amber_params.getAllDihedrals(); + QVector dihedrals = dihedrals_ff.toVector(); + + for (int j = 0; j < dihedrals_ff.length(); j++) + { + DihedralID dihedral_ff = dihedrals_ff[j]; + QList dihedral_params = amber_params.getParams(dihedral_ff); + + int idx0 = dihedrals[j].atom0().asA().value() + num_atoms_till_i; + int idx1 = dihedrals[j].atom1().asA().value() + num_atoms_till_i; + int idx2 = dihedrals[j].atom2().asA().value() + num_atoms_till_i; + int idx3 = dihedrals[j].atom3().asA().value() + num_atoms_till_i; + + if (Debug) + { + qDebug() << "TOTAL Dihedral between atom global index " << idx0 - num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + } + + if (solute.contains(molecule)) + { + if (dihedral_pert_list.indexOf(dihedral_ff) != -1 || dihedral_pert_swap_list.indexOf(dihedral_ff) != -1) + {//Solute molecule. Check if the current solute dihedral is in the perturbed dihedral list + if (Debug) + qDebug() << "Found Perturbed Dihedral\n"; + continue; + } + } + + // Variable number of parameters + for (int k = 0; k < dihedral_params.length(); k = k + 3) + { + double v = dihedral_params[ k ]; + int periodicity = dihedral_params[ k + 1 ]; + double phase = dihedral_params[ k + 2 ]; + bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, v * OpenMM::KJPerKcal); + if (Debug) + { + qDebug() << "Dihedral between atom global index " << idx0 - num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + qDebug() << "Amplitude_dih = " << v << " periodicity " << periodicity << " phase " << phase << "\n"; + } + } + } // end of dihedrals + + + //Improper Dihedrals + + QList impropers_ff = amber_params.getAllImpropers(); + QVector impropers = impropers_ff.toVector(); + + for (int j = 0; j < impropers_ff.length(); j++) + { + ImproperID improper_ff = impropers_ff[j]; + QList improper_params = amber_params.getParams(improper_ff); + + int idx0 = impropers[j].atom0().asA().value() + num_atoms_till_i; + int idx1 = impropers[j].atom1().asA().value() + num_atoms_till_i; + int idx2 = impropers[j].atom2().asA().value() + num_atoms_till_i; + int idx3 = impropers[j].atom3().asA().value() + num_atoms_till_i; + + if (Debug) + { + qDebug() << "TOTAL Improper between atom global index " << idx0 - num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + } + + if (solute.contains(molecule)) + {//Solute molecule. Check if the current solute dihedral is in the perturbed improper list + if (improper_pert_list.indexOf(improper_ff) != -1 || improper_pert_swap_list.indexOf(improper_ff) != -1) + { + if (Debug) + qDebug() << "Found Perturbed Improper\n"; + continue; + } + } + + // Variable number of parameters + for (int k = 0; k < improper_params.length(); k = k + 3) + { + double v = improper_params[ k ]; + int periodicity = improper_params[ k + 1 ]; + double phase = improper_params[ k + 2 ]; + + bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, v * OpenMM::KJPerKcal); + if (Debug) + { + qDebug() << "Improper between atom global index " << idx0 - num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + qDebug() << "Amplitude_imp = " << v << " periodicity " << periodicity << " phase " << phase << "\n"; + } + } + }//end of impropers + + + // Variable 1,4 scaling factors + QList pairs14_ff = amber_params.getAll14Pairs(); + QVector pairs14 = pairs14_ff.toVector(); + + for (int j = 0; j < pairs14_ff.length(); j++) + { + BondID pair14_ff = pairs14_ff[j]; + + QList pair14_params = amber_params.get14PairParams(pair14_ff); + + double cscl = pair14_params[0]; + double ljscl = pair14_params[1]; + + if (Debug) + qDebug() << " cscl@ " << cscl << " ljscl " << ljscl; + + // Add to custom pairs if scale factor differs from default + if (abs(cscl - Coulomb14Scale) > 0.0001 or abs(ljscl - LennardJones14Scale) > 0.0001) + { + + int idx0 = pair14_ff.atom0().asA().value() + num_atoms_till_i; + int idx1 = pair14_ff.atom1().asA().value() + num_atoms_till_i; + + QPair indices_pair(idx0, idx1); + QPair scl_pair(cscl, ljscl); + custom14pairs.insert(indices_pair, scl_pair); + + special_14 = true; + + if (Debug) + qDebug() << "IDX0 = " << idx0 << " IDX1 =" << idx1 << "14 OpenMM Index"; + } + }// end of variable 1,4 scaling factors + + num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; + + }// end of loop over molecules + + + if (Debug) + { + if (nions != 0) + qDebug() << "\n\nNumber of ions = " << nions << "\n\n"; + } + + //Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms + + nonbond_openmm->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); + + if (CMMremoval_frequency > 0) + { + OpenMM::CMMotionRemover * cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); + + system_openmm->addForce(cmmotionremover); + + if (Debug) + qDebug() << "\n\nWill remove Center of Mass motion every " << CMMremoval_frequency << " steps\n\n"; + } + + int num_exceptions = nonbond_openmm->getNumExceptions(); + + if (Debug) + qDebug() << "NUM EXCEPTIONS = " << num_exceptions << "\n"; + + for (int i = 0; i < num_exceptions; i++) + { + int p1, p2; + + double charge_prod, sigma_avg, epsilon_avg; + + nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + + if (Debug) + qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " << p2 << " charge prod = " << charge_prod << " sigma avg = " << sigma_avg << " epsilon_avg = " << epsilon_avg << "\n"; + + if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) + {//1-4 interactions + + QVector perturbed_14_tmp(13); + + std::vector p1_params(10); + std::vector p2_params(10); + + custom_force_field->getParticleParameters(p1, p1_params); + custom_force_field->getParticleParameters(p2, p2_params); + + double Qstart_p1 = p1_params[0]; + double Qend_p1 = p1_params[1]; + double Epstart_p1 = p1_params[2]; + double Epend_p1 = p1_params[3]; + double Sigstart_p1 = p1_params[4]; + double Sigend_p1 = p1_params[5]; + double isHard_p1 = p1_params[6]; + double isTodummy_p1 = p1_params[7]; + double isFromdummy_p1 = p1_params[8]; + + double Qstart_p2 = p2_params[0]; + double Qend_p2 = p2_params[1]; + double Epstart_p2 = p2_params[2]; + double Epend_p2 = p2_params[3]; + double Sigstart_p2 = p2_params[4]; + double Sigend_p2 = p2_params[5]; + double isHard_p2 = p2_params[6]; + double isTodummy_p2 = p2_params[7]; + double isFromdummy_p2 = p2_params[8]; + + double charge_prod_start, charge_prod_end, charge_prod_mix; + double sigma_avg_start, sigma_avg_end, sigma_avg_mix; + double epsilon_avg_start, epsilon_avg_end, epsilon_avg_mix; + + double Coulomb14Scale_tmp = Coulomb14Scale; + double LennardJones14Scale_tmp = LennardJones14Scale; + + if (special_14) + { + QPair sc_factors; + + QPair indices_pair(p1, p2); + QHash< QPair, QPair >::const_iterator i_pair = custom14pairs.find(indices_pair); + + if (i_pair != custom14pairs.end()) + { + + sc_factors = i_pair.value(); + Coulomb14Scale_tmp = sc_factors.first; + LennardJones14Scale_tmp = sc_factors.second; + + if (Debug) + qDebug() << "The pair ( " << p1 << ", " << p2 << " ) is 14 special no swap pair"; + } + else + { + QPair indices_swap_pair(p2, p1); + QHash< QPair, QPair >::const_iterator i_swap_pair = custom14pairs.find(indices_swap_pair); + + if (i_swap_pair != custom14pairs.end()) + { + sc_factors = i_swap_pair.value(); + Coulomb14Scale_tmp = sc_factors.first; + LennardJones14Scale_tmp = sc_factors.second; + + if (Debug) + qDebug() << "The pair ( " << p2 << ", " << p1 << " ) is 14 special swap pair"; + } + } + } + + charge_prod_start = Qstart_p1 * Qstart_p2 * Coulomb14Scale_tmp; + charge_prod_end = Qend_p1 * Qend_p2 * Coulomb14Scale_tmp; + charge_prod_mix = (Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2) * Coulomb14Scale_tmp; + + if (flag_combRules == ARITHMETIC) + { + sigma_avg_start = (Sigstart_p1 + Sigstart_p2) / 2.0; + sigma_avg_end = (Sigend_p1 + Sigend_p2) / 2.0; + sigma_avg_mix = (Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2) / 2.0; + } + else if (flag_combRules == GEOMETRIC) + { + sigma_avg_start = Sigstart_p1 * Sigstart_p2 ; + sigma_avg_end = Sigend_p1 * Sigend_p2 ; + sigma_avg_mix = Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2 ; + } + + epsilon_avg_start = Epstart_p1 * Epstart_p2 * LennardJones14Scale_tmp * LennardJones14Scale_tmp; + epsilon_avg_end = Epend_p1 * Epend_p2 * LennardJones14Scale_tmp * LennardJones14Scale_tmp; + epsilon_avg_mix = (Epend_p1 * Epstart_p2 + Epstart_p1 * Epend_p2) * LennardJones14Scale_tmp * LennardJones14Scale_tmp; + + std::vector params(9); + + params[0] = charge_prod_start; + params[1] = charge_prod_end; + params[2] = charge_prod_mix; + params[3] = epsilon_avg_start; + params[4] = epsilon_avg_end; + params[5] = epsilon_avg_mix; + params[6] = sigma_avg_start; + params[7] = sigma_avg_end; + params[8] = sigma_avg_mix; + + if (Debug) + { + + qDebug() << "Particle p1 = " << p1 << "\nQstart = " << Qstart_p1 << "\nQend = " << Qend_p1 + << "\nEpstart = " << Epstart_p1 << "\nEpend = " << Epend_p1 + << "\nSgstart = " << Sigstart_p1 << "\nSgend = " << Sigend_p1 + << "\nisHard = " << isHard_p1 << "\nisTodummy = " << isTodummy_p1 << "\nisFromdummy = " << isFromdummy_p1 << "\n"; + qDebug() << "Particle p2 = " << p2 << "\nQstart = " << Qstart_p2 << "\nQend = " << Qend_p2 + << "\nEpstart = " << Epstart_p2 << "\nEpend = " << Epend_p2 + << "\nSgstart = " << Sigstart_p2 << "\nSgend = " << Sigend_p2 + << "\nisHard = " << isHard_p2 << "\nisTodummy = " << isTodummy_p2 << "\nisFromdummy = " << isFromdummy_p2 << "\n"; + + qDebug() << "Product Charge start = " << charge_prod_start << "\nProduct Charge end = " << charge_prod_end << "\nProduct Chrage mixed = " << charge_prod_mix + << "\nEpsilon average start = " << epsilon_avg_start << "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << charge_prod_mix + << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << sigma_avg_end; + qDebug() << "Columbic Scale Factor = " << Coulomb14Scale_tmp << " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; + } + + if ((isHard_p1 == 1.0 && isHard_p2 == 1.0)) + { + custom_intra_14_clj->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added clj Hard 1-4\n"; + } + else if ((isTodummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p2 == 1.0 && isTodummy_p1 == 1.0)) + { + custom_intra_14_todummy->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added soft TO dummy 1-4\n"; + } + + else if ((isFromdummy_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p2 == 1.0 && isFromdummy_p1 == 1.0)) + { + custom_intra_14_fromdummy->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added soft FROM dummy 1-4\n"; + } + + else if ((isFromdummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isFromdummy_p2 == 1.0 && isTodummy_p1 == 1.0)) + { + custom_intra_14_fromdummy_todummy->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added soft FROM dummy TO dummy 1-4\n"; + } + + }//end if 1-4 interactions + + custom_force_field->addExclusion(p1, p2); + } + + /*************************************NON BONDED INTERACTIONS*********************************************/ + + int npairs = (custom_force_field->getNumParticles() * (custom_force_field->getNumParticles() - 1)) / 2; + + if (Debug) + { + qDebug() << "Num pairs = " << npairs; + qDebug() << "Num bonds 1-4 Hard = " << custom_intra_14_clj->getNumBonds(); + qDebug() << "Num bonds 1-4 To Dummy = " << custom_intra_14_todummy->getNumBonds(); + qDebug() << "Num bonds 1-4 From Dummy = " << custom_intra_14_fromdummy->getNumBonds(); + qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << custom_intra_14_fromdummy_todummy->getNumBonds(); + } + + if (npairs != num_exceptions) + { + custom_force_field->setForceGroup(0); + system_openmm->addForce(custom_force_field); + perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system + if (Debug) + qDebug() << "Added 1-5"; + } + + if (custom_intra_14_clj->getNumBonds() != 0) + { + custom_intra_14_clj->setForceGroup(0); + system_openmm->addForce(custom_intra_14_clj); + perturbed_energies_tmp[1] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 CLJ"; + } + + if (custom_intra_14_todummy->getNumBonds() != 0) + { + custom_intra_14_todummy->setForceGroup(0); + system_openmm->addForce(custom_intra_14_todummy); + perturbed_energies_tmp[2] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 To Dummy"; + } + + + if (custom_intra_14_fromdummy->getNumBonds() != 0) + { + custom_intra_14_fromdummy->setForceGroup(0); + system_openmm->addForce(custom_intra_14_fromdummy); + perturbed_energies_tmp[3] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 From Dummy"; + } + if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) + { + custom_intra_14_fromdummy_todummy->setForceGroup(0); + system_openmm->addForce(custom_intra_14_fromdummy_todummy); + perturbed_energies_tmp[4] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 From Dummy To Dummy"; + } + + /*****************************************BONDED INTERACTIONS***********************************************/ + + if (bondStretch_openmm->getNumBonds() != 0) + { + bondStretch_openmm->setForceGroup(1); + system_openmm->addForce(bondStretch_openmm); + if (Debug) + qDebug() << "Added Internal Bond energy term"; + } + + if (bondBend_openmm->getNumAngles() != 0) + { + bondBend_openmm->setForceGroup(1); + system_openmm->addForce(bondBend_openmm); + if (Debug) + qDebug() << "Added Internal Angle energy term"; + } + + if (bondTorsion_openmm->getNumTorsions() != 0) + { + bondTorsion_openmm->setForceGroup(1); + system_openmm->addForce(bondTorsion_openmm); + if (Debug) + qDebug() << "Added Internal Torsion energy term"; + } + + if (solute_bond_perturbation->getNumBonds() != 0) + { + solute_bond_perturbation->setForceGroup(0); + system_openmm->addForce(solute_bond_perturbation); + perturbed_energies_tmp[5] = true; //Custom bonded is added to the system + if (Debug) + qDebug() << "Added Perturbed Internal Bond energy term"; + } + + if (solute_angle_perturbation->getNumAngles() != 0) + { + solute_angle_perturbation->setForceGroup(0); + system_openmm->addForce(solute_angle_perturbation); + perturbed_energies_tmp[6] = true; //Custom bonded is added to the system + if (Debug) + qDebug() << "Added Perturbed Internal Angle energy term"; + } + + perturbed_energies = perturbed_energies_tmp; + + //IMPORTANT: PERTURBED ENERGY TORSIONS ARE ADDED ABOVE + bool UseLink_flag = true; + + //Distance Restaint. All the information are stored in the first molecule only. + + if (UseLink_flag == true) + { + Molecule molecule = moleculegroup.moleculeAt(0).molecule(); + + bool haslinkinfo = molecule.hasProperty("linkbonds"); + + if (haslinkinfo) + { + std::vector custom_bond_link_par(3); + + Properties linkprop = molecule.property("linkbonds").asA(); + + int nlinks = linkprop.property(QString("nbondlinks")).asA().toInt(); + + if (Debug) + qDebug() << "Number of constraint links = " << nlinks; + + for (int i = 0; i < nlinks; i++) + { + int atomnum0 = linkprop.property(QString("AtomNum0(%1)").arg(i)).asA().toInt(); + int atomnum1 = linkprop.property(QString("AtomNum1(%1)").arg(i)).asA().toInt(); + double reql = linkprop.property(QString("reql(%1)").arg(i)).asA().toDouble(); + double kl = linkprop.property(QString("kl(%1)").arg(i)).asA().toDouble(); + double dl = linkprop.property(QString("dl(%1)").arg(i)).asA().toDouble(); + + int openmmindex0 = AtomNumToOpenMMIndex[atomnum0]; + int openmmindex1 = AtomNumToOpenMMIndex[atomnum1]; + + custom_bond_link_par[0] = reql * OpenMM::NmPerAngstrom; //req + custom_bond_link_par[1] = kl * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); //k + custom_bond_link_par[2] = dl * OpenMM::NmPerAngstrom; //dl + + if (Debug) + { + qDebug() << "atomnum0 = " << atomnum0 << " openmmindex0 =" << openmmindex0; + qDebug() << "atomnum1 = " << atomnum1 << " openmmindex1 =" << openmmindex1; + qDebug() << "Req = " << reql << " kl = " << kl << " dl = " << dl; + } + + custom_link_bond->addBond(openmmindex0, openmmindex1, custom_bond_link_par); + } + + system_openmm->addForce(custom_link_bond); + } + + }//end of bond link flag + + this->openmm_system = system_openmm; + this->isSystemInitialised = true; +} + +/** + * + * @param workspace + * @param timestep + */ + +void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dimension::Time timestep) +{ + bool Debug = false; + + if (Debug) + { + qDebug() << "In OpenMMPMEFEP::createContext()\n\n"; + qDebug() << isContextInitialised; + qDebug() << reinitialise_context; + } + + // Check that the openmm system has been initialised + // !! Should check that the workspace is compatible with molgroup + if (not this->isSystemInitialised) + { + qDebug() << "Not initialised ! "; + throw SireError::program_bug(QObject::tr("OpenMMPMEFEP should have been initialised before calling integrate."), CODELOC); + } + + OpenMM::System *system_openmm = openmm_system; + + int nats = system_openmm->getNumParticles(); + + if (Debug) + qDebug() << " openmm nats " << nats; + + // Integrator + + const double dt = convertTo(timestep.value(), picosecond); + const double converted_Temperature = convertTo(Temperature.value(), kelvin); + const double converted_friction = convertTo(friction.value(), picosecond); + + if (!isContextInitialised || (isContextInitialised && reinitialise_context)) + { + OpenMM::Integrator * integrator_openmm = NULL; + + if (Integrator_type == "leapfrogverlet") + integrator_openmm = new OpenMM::VerletIntegrator(dt); //dt in picosecond + else if (Integrator_type == "variableleapfrogverlet") + integrator_openmm = new OpenMM::VariableVerletIntegrator(integration_tol); //integration tolerance error unitless + else if (Integrator_type == "langevin") + integrator_openmm = new OpenMM::LangevinIntegrator(converted_Temperature, converted_friction, dt); + else if (Integrator_type == "variablelangevin") + integrator_openmm = new OpenMM::VariableLangevinIntegrator(converted_Temperature, converted_friction, integration_tol); + else if (Integrator_type == "brownian") + integrator_openmm = new OpenMM::BrownianIntegrator(converted_Temperature, converted_friction, dt); + else + throw SireError::program_bug(QObject::tr("The user defined Integrator type is not supported. Available types are leapfrogverlet, variableleapfrogverlet, langevin, variablelangevin, brownian"), CODELOC); + + if (Debug) + { + qDebug() << "Using Integrator: " << Integrator_type; + qDebug() << "Integration step = " << dt << " ps"; + + if (Integrator_type == "variablelangevin" || Integrator_type == "variableleapfrogverlet") + { + qDebug() << "Integration Tol = " << integration_tol; + } + if (Integrator_type == "langevin" || Integrator_type == "variablelangevin" || Integrator_type == "brownian") + { + qDebug() << "Converted Friction = " << converted_friction << "1/ps"; + } + } + + OpenMM::Platform& platform_openmm = OpenMM::Platform::getPlatformByName(platform_type.toStdString()); + + if (platform_type == "OpenCL") + { + const std::string prop = std::string("OpenCLDeviceIndex"); + const std::string prec = std::string("OpenCLPrecision"); + + platform_openmm.setPropertyDefaultValue(prop, device_index.toStdString()); + platform_openmm.setPropertyDefaultValue(prec, precision.toStdString()); + + if (Debug) + { + qDebug() << "Setting up OpenCL default Index to " << device_index; + qDebug() << "Setting up OpenCL precision to" << precision; + } + } + else if (platform_type == "CUDA") + { + const std::string prop = std::string("CudaDeviceIndex"); + const std::string prec = std::string("CudaPrecision"); + + platform_openmm.setPropertyDefaultValue(prop, device_index.toStdString()); + platform_openmm.setPropertyDefaultValue(prec, precision.toStdString()); + + if (Debug) + { + qDebug() << "Setting up CUDA default Index to " << device_index; + qDebug() << "Setting up CUDA precision to" << precision; + } + } + + delete openmm_context; + openmm_context = new OpenMM::Context(*system_openmm, *integrator_openmm, platform_openmm); + this->isContextInitialised = true; + } + + if (Debug) + qDebug() << "\n Using OpenMM platform = " << openmm_context->getPlatform().getName().c_str() << "\n"; + + // Now update coordinates / velocities / dimensions with sire data + AtomicVelocityWorkspace &ws = workspace.asA(); + + if (CutoffType == "cutoffperiodic") + { + const System & ptr_sys = ws.system(); + const PropertyName &space_property = PropertyName("space"); + + // PeriodicBox. + if (ptr_sys.property(space_property).isA()) + { + const PeriodicBox &space = ptr_sys.property(space_property).asA(); + + const double Box_x_Edge_Length = space.dimensions()[0] * OpenMM::NmPerAngstrom; //units in nm + const double Box_y_Edge_Length = space.dimensions()[1] * OpenMM::NmPerAngstrom; //units in nm + const double Box_z_Edge_Length = space.dimensions()[2] * OpenMM::NmPerAngstrom; //units in nm + + if (Debug) + qDebug() << "\nBOX SIZE [A] = (" << space.dimensions()[0] << " , " << space.dimensions()[1] << " , " << space.dimensions()[2] << ")\n\n"; + + //Set Periodic Box Condition + + system_openmm->setDefaultPeriodicBoxVectors( + OpenMM::Vec3(Box_x_Edge_Length, 0, 0), + OpenMM::Vec3(0, Box_y_Edge_Length, 0), + OpenMM::Vec3(0, 0, Box_z_Edge_Length)); + + openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0), + OpenMM::Vec3(0, Box_y_Edge_Length, 0), + OpenMM::Vec3(0, 0, Box_z_Edge_Length)); + } + // TriclinicBox. + else if (ptr_sys.property(space_property).isA()) + { + const TriclinicBox &space = ptr_sys.property(space_property).asA(); + + // Get the three triclinic box vectors. + const auto v0 = space.vector0(); + const auto v1 = space.vector1(); + const auto v2 = space.vector2(); + + // Get cell matrix components in nm. + const double xx = v0.x() * OpenMM::NmPerAngstrom; + const double xy = v0.y() * OpenMM::NmPerAngstrom; + const double xz = v0.z() * OpenMM::NmPerAngstrom; + const double yx = v1.x() * OpenMM::NmPerAngstrom; + const double yy = v1.y() * OpenMM::NmPerAngstrom; + const double yz = v1.z() * OpenMM::NmPerAngstrom; + const double zx = v2.x() * OpenMM::NmPerAngstrom; + const double zy = v2.y() * OpenMM::NmPerAngstrom; + const double zz = v2.z() * OpenMM::NmPerAngstrom; + + system_openmm->setDefaultPeriodicBoxVectors( + OpenMM::Vec3(xx, xy, xz), + OpenMM::Vec3(yx, yy, yz), + OpenMM::Vec3(zx, zy, zz)); + + openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), + OpenMM::Vec3(yx, yy, yz), + OpenMM::Vec3(zx, zy, zz)); + } + + openmm_context->reinitialize(); + } + + //OpenMM vector coordinate + std::vector positions_openmm(nats); + + //OpenMM vector momenta + std::vector velocities_openmm(nats); + + // Conversion factor because sire units of time are in AKMA, whereas OpenMM uses picoseconds + + double AKMAPerPs = 0.04888821; + double PsPerAKMA = 1.0 / AKMAPerPs; + + const int nmols = ws.nMolecules(); + + int system_index = 0; + + for (int i = 0; i < nmols; ++i) + { + const int nats_mol = ws.nAtoms(i); + + Vector *c = ws.coordsArray(i); + Vector *p = ws.momentaArray(i); + const double *m = ws.massArray(i); + + for (int j = 0; j < nats_mol; ++j) + { + positions_openmm[system_index] = OpenMM::Vec3(c[j].x() * (OpenMM::NmPerAngstrom), c[j].y() * (OpenMM::NmPerAngstrom), c[j].z() * (OpenMM::NmPerAngstrom)); + + if (m[j] == 0.0) + qDebug() << "\nWARNING - THE MASS OF PARTICLE " << system_index << " is ZERO\n"; + + if (m[j] > SireMaths::small) + { + velocities_openmm[system_index] = OpenMM::Vec3(p[j].x() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA, p[j].y() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA, p[j].z() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA); + } + else + { + velocities_openmm[system_index] = OpenMM::Vec3(0.0, 0.0, 0.0); + } + + if (Debug) + { + qDebug() << "Particle num = " << system_index; + qDebug() << "Particle mass = " << m[j]; + qDebug() << "X = " << positions_openmm[system_index][0] * OpenMM::AngstromsPerNm << " A" << + " Y = " << positions_openmm[system_index][1] * OpenMM::AngstromsPerNm << " A" << + " Z = " << positions_openmm[system_index][2] * OpenMM::AngstromsPerNm << " A"; + qDebug() << "Vx = " << velocities_openmm[system_index][0] << " Vy = " << velocities_openmm[system_index][1] << " Vz = " << velocities_openmm[system_index][2] << "\n"; + } + system_index++; + } + } + + if (system_index != nats) + { + if (Debug) + qDebug() << " system_index " << system_index << " nats " << nats; + throw SireError::program_bug(QObject::tr("The number of atoms in the openmm system does not match the number of atoms in the sire workspace"), CODELOC); + } + + openmm_context->setPositions(positions_openmm); + openmm_context->setVelocities(velocities_openmm); +} + +void OpenMMPMEFEP::destroyContext() +{ + if (this->isContextInitialised) + { + delete openmm_context; + openmm_context = 0; + this->isContextInitialised = false; + } +} + +MolarEnergy OpenMMPMEFEP::getPotentialEnergy(const System &system) +{ + IntegratorWorkspacePtr ws = this->createWorkspace(molgroup); + ws.edit().setSystem(system); + + createContext(ws.edit(), 2 * femtosecond); + + int infoMask = 0; + infoMask = infoMask + OpenMM::State::Energy; + OpenMM::State state_openmm = openmm_context->getState(infoMask); + + MolarEnergy nrg = state_openmm.getPotentialEnergy() * kJ_per_mol; + + this->destroyContext(); + + return nrg; +} + +/** + * + * minimizeEnergy will find the nearest local potential energy minimum, + * given the current Sire::System. It calls the + * LocalEnergyMinimizer :: minimize() function of OpenMM. + * @param system Sire System including molegroup, forcefield + * positions etc + * @param tolerance Default = 1. This specifies how precisely the + * energy minimum must be located. Minimisation will be halted once the + * root-mean-square value of all force components reaches this tolerance. + * @param max_iteration Default = 1000. this specifies the number of + * iterations are run for the minimisation. If max_iteration = 0, the + * iteration will run until convergence. + * + * @return Sire System, with the updated energy + * minimised coordinates. + */ +System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, int max_iteration = 1) +{ + bool Debug = false; + const MoleculeGroup moleculegroup = this->molgroup.read(); + IntegratorWorkspacePtr workspace = this->createWorkspace(moleculegroup); + if (system.nMolecules() != moleculegroup.nMolecules()) + { + std::cerr << "Number of molecules do not agree!"; + exit(1); + } + workspace.edit().setSystem(system); + // Use helper function to create a Context + SireUnits::Dimension::Time timestep = 0.0 * picosecond; + createContext(workspace.edit(), timestep); + // Step 2 minimise + OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); + // Step 3 update the positions in the system + int infoMask = OpenMM::State::Positions; + OpenMM::State state_openmm = openmm_context->getState(infoMask); + std::vector positions_openmm = state_openmm.getPositions(); + // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system + AtomicVelocityWorkspace &ws = workspace.edit().asA(); + const int nmols = ws.nMolecules(); + int k = 0; + + for (int i = 0; i < nmols; i++) + { + Vector *sire_coords = ws.coordsArray(i); + for (int j = 0; j < ws.nAtoms(i); j++) + { + sire_coords[j] = Vector(positions_openmm[j + k][0] * (OpenMM::AngstromsPerNm), + positions_openmm[j + k][1] * (OpenMM::AngstromsPerNm), + positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); + if (Debug) + { + std::cout << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << + " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + } + } + k = k + ws.nAtoms(i); + } + + // This causes the workspace to update the system coordinates with the + // contents of *sire_coords. Note that velocities aren't touched. + ws.commitCoordinates(); + // Step 4 delete the context + // JM 04/15 FIXME: See comment above at step 1 + this->destroyContext(); + // Step 5. Return pointer to the workspace's system + const System & ptr_sys = ws.system(); + return ptr_sys; +} + +/** + * annealSystemToLambda will anneal the system to the current alchemical lambda + * value of the system + * @param system Sire System including molegroup, forcefield + * positions etc + * @param timestep Default = 0.005. Time step used of the + * equilibration to the desired lambda + * @param annealingSteps Default = 1000. Number of steps used for the + * annealing + * @return Sire system with updated coordinates and + * velocities. + */ + +System OpenMMPMEFEP::annealSystemToLambda(System &system, + SireUnits::Dimension::Time anneal_step_size, + int annealing_steps) +{ + bool Debug = false; + const double AKMAPerPs = 0.04888821; + + const MoleculeGroup moleculegroup = this->molgroup.read(); + IntegratorWorkspacePtr workspace = this->createWorkspace(moleculegroup); + //TODO: Add some sanity checks here. + if (system.nMolecules() != moleculegroup.nMolecules()) + { + std::cerr << "Number of molecules in do not agree!"; + exit(1); + } + + workspace.edit().setSystem(system); + //SireUnits::Dimension::Time timestep = stepSize * picosecond; + createContext(workspace.edit(), anneal_step_size); + + int max = ceil(Alchemical_value / 0.1); + + double lam = 0.0; + + for (int i = 0; i < max + 1; i++) + { + updateOpenMMContextLambda(lam); + (openmm_context->getIntegrator()).step(annealing_steps); + + if (i == max - 1) + lam = Alchemical_value; + else + lam = lam + 0.1; + } + int infoMask = OpenMM::State::Positions; + infoMask = infoMask + OpenMM::State::Velocities; + OpenMM::State state_openmm = openmm_context->getState(infoMask); + std::vector positions_openmm = state_openmm.getPositions(); + std::vector velocities_openmm = state_openmm.getVelocities(); + + // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system + AtomicVelocityWorkspace &ws = workspace.edit().asA(); + + const int nmols = ws.nMolecules(); + int k = 0; + + for (int i = 0; i < nmols; i++) + { + Vector *sire_coords = ws.coordsArray(i); + Vector *sire_momenta = ws.momentaArray(i); + const double *m = ws.massArray(i); + + for (int j = 0; j < ws.nAtoms(i); j++) + { + sire_coords[j] = Vector(positions_openmm[j + k][0] * (OpenMM::AngstromsPerNm), + positions_openmm[j + k][1] * (OpenMM::AngstromsPerNm), + positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); + + sire_momenta[j] = Vector(velocities_openmm[j + k][0] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, + velocities_openmm[j + k][1] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, + velocities_openmm[j + k][2] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs); + } + k = k + ws.nAtoms(i); + } + + + ws.commitCoordinatesAndVelocities(); + //Now we also want to update the systems box in case it is very different! + if(MCBarostat_flag) + { + // dummy buffered dimensions vector, maybe there is better solution + //to this than just passing an empty vector + QVector> dimensions; + updateBoxDimensions(state_openmm, dimensions, Debug, ws); + } + this->destroyContext(); + // Step 5. Return pointer to the workspace's system + const System & ptr_sys = ws.system(); + return ptr_sys; +} + +/** + * Main integration methods for advancing dynamics + * @param workspace Sire Integrator workspace + * @param nrg_component + * @param timestep Default = 0.002. Integration timestep + * @param nmoves Number of moves + * @param record_stats boolean that tracks recording. + */ +void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, + const Symbol &nrg_component, SireUnits::Dimension::Time timestep, + int nmoves, bool record_stats) +{ + createContext(workspace, timestep); + bool Debug = false; + const int nats = openmm_system->getNumParticles(); + + AtomicVelocityWorkspace &ws = workspace.asA(); + + const int nmols = ws.nMolecules(); + + const double AKMAPerPs = 0.04888821; + + const double dt = convertTo(timestep.value(), picosecond); + + if (Debug) + qDebug() << " Doing " << nmoves << " steps of dynamics "; + + + int n_samples = nmoves / energy_frequency; + + if (nmoves < energy_frequency) + throw SireError::program_bug(QObject::tr("You are requesting to save " + "energy every %1 steps, which is above the total number of " + "%2 steps.").arg(energy_frequency, nmoves), CODELOC); + + if (Debug) + qDebug() << "Number Energy Samples = " << n_samples << "\n\n"; + + int coord_freq = buffer_frequency; + int nframes = 0; + int MAXFRAMES = 1000; + + if (coord_freq > 0) + { + nframes = (nmoves / coord_freq); + // Check that we are saving snapshots modulo frequency + int remainder = buffer_frequency % energy_frequency; + if (buffer_frequency < energy_frequency or remainder != 0) + throw SireError::program_bug(QObject::tr("You are requesting to " + "buffer snapshots every %1 steps, but this must number must" + " be a positive integer multiple of the frequency of saving " + "energies %2").arg(buffer_frequency, energy_frequency), CODELOC); + } + + if (buffer_frequency > nmoves) + throw SireError::program_bug(QObject::tr("You are requesting to buffer " + "snapshots every %1 steps, which is above the total number of " + "%2 steps.").arg(buffer_frequency, nmoves), CODELOC); + + // Limit excessive internal buffering + if (coord_freq > 0) + { + if (nframes > MAXFRAMES) + { + throw SireError::program_bug(QObject::tr("You are requesting to " + "buffer %1 frames, which is above the hardcoded limit " + "of %2.").arg(n_samples, MAXFRAMES), CODELOC); + } + } + else + { + nframes = 0; + } + + QVector< std::vector > buffered_positions; + QVector> buffered_dimensions; + + OpenMM::Vec3 a; + OpenMM::Vec3 b; + OpenMM::Vec3 c; + + const double beta = 1.0 / (0.0083144621 * convertTo(Temperature.value(), kelvin)); //mol/kJ + + int infoMask = 0; + + infoMask = OpenMM::State::Positions; + infoMask = infoMask + OpenMM::State::Velocities; + infoMask = infoMask + OpenMM::State::Energy; + //infoMask = infoMask + OpenMM::State::Parameters; + + OpenMM::State state_openmm; //OpenMM State + + + int sample_count = 1; + + if (coord_freq > 0 && Debug) + qDebug() << "Saving atom coordinates every " << coord_freq << "\n"; + + if (Debug) + { + for (int i = 0; i < perturbed_energies.size(); i++) + qDebug() << "Perturbed energy flag index" << i << " Value = " << perturbed_energies[i]; + } + + //OpenMM vector coordinate + std::vector positions_openmm(nats); + //OpenMM vector momenta + std::vector velocities_openmm(nats); + //Time skipping + const double time_skip = convertTo(timeskip.value(), picosecond); + + if (time_skip != 0.0) + { + if (Debug) + qDebug() << "Time to Skip = " << time_skip << "ps"; + + int new_nmoves = time_skip / dt; + + if (new_nmoves >= nmoves) + { + throw SireError::program_bug(QObject::tr("Time to Skip is greater than the simulation time"), CODELOC); + exit(-1); + } + + (openmm_context->getIntegrator()).step(new_nmoves); + + n_samples = (nmoves - new_nmoves) / energy_frequency; + + if (coord_freq > 0) + nframes = (nmoves - new_nmoves) / coord_freq; + } + + bool IsFiniteNumber = true; + double increment = delta_alchemical; + double incr_plus = Alchemical_value + increment; + double incr_minus = Alchemical_value - increment; + double actual_gradient = 0.0; + + emptyContainers(); + + while (sample_count <= n_samples) + { + //*********************MD STEPS**************************** + (openmm_context->getIntegrator()).step(energy_frequency); + state_openmm = openmm_context->getState(infoMask, false, 0x01); + double p_energy_lambda = state_openmm.getPotentialEnergy(); + if (Debug) + { + printf("Lambda = %f Potential energy = %.5f kcal/mol\n", Alchemical_value, p_energy_lambda * OpenMM::KcalPerKJ); + //exit(-1); + } + IsFiniteNumber = (p_energy_lambda <= DBL_MAX && p_energy_lambda >= -DBL_MAX); + + if (!IsFiniteNumber) + { + qDebug() << "NaN or Inf has been generated along the simulation"; + exit(-1); + } + pot_energies.append(p_energy_lambda * OpenMM::KcalPerKJ); + + if (perturbed_energies[0]) + { + openmm_context->setParameter("SPOnOff", 1.0); //Solvent-Solvent and Protein Protein Non Bonded OFF + } + state_openmm = openmm_context->getState(infoMask, false, 0x01); + + if (Debug) + qDebug() << "Total Time = " << state_openmm.getTime() << " ps"; + + // Because looping from 1 to n_samples + int modulo = 1; + + if (coord_freq > 0) + modulo = sample_count % ((coord_freq / energy_frequency)); + + if (Debug) + qDebug() << "modulo is " << modulo; + + if (coord_freq > 0 and modulo == 0) + { + if (Debug) + qDebug() << "buffering coordinates and dimensions"; + + positions_openmm = state_openmm.getPositions(); + buffered_positions.append(positions_openmm); + + if (MCBarostat_flag == true) + { + state_openmm.getPeriodicBoxVectors(a, b, c); + + Vector v0 = Vector(a[0] * OpenMM::AngstromsPerNm, a[1] * OpenMM::AngstromsPerNm, a[2] * OpenMM::AngstromsPerNm); + Vector v1 = Vector(b[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, b[2] * OpenMM::AngstromsPerNm); + Vector v2 = Vector(c[0] * OpenMM::AngstromsPerNm, c[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); + + QVector lattice_vectors{v0, v1, v2}; + + buffered_dimensions.append(lattice_vectors); + } + } + + //Computing the potential energies and gradients + p_energy_lambda = state_openmm.getPotentialEnergy(); + + + //Let's calculate the gradients + double m_forward, m_backward; + boost::tuples::tie(actual_gradient, m_forward, m_backward) = calculateGradient(incr_plus, + incr_minus, p_energy_lambda, beta); + + if (alchemical_array.size()>1) + { + //Let's calculate the biased energies + reduced_perturbed_energies.append(computeReducedPerturbedEnergies(beta)); + } + + //Now we append all the calculated information to the useful accumulation arrays + finite_diff_gradients.append(actual_gradient * beta); + forward_Metropolis.append(m_forward); + backward_Metropolis.append(m_backward); + + //RESET coupling parameter to its original value + if (perturbed_energies[0]) + { + openmm_context->setParameter("SPOnOff", 0.0); //Solvent-Solvent and Protein Protein Non Bonded ON + } + updateOpenMMContextLambda(Alchemical_value); + sample_count = sample_count + 1.0; + + }//end while + if (time_skip != 0) + { + timeskip = SireUnits::Dimension::Time(0.0); + } + + state_openmm = openmm_context->getState(infoMask); + positions_openmm = state_openmm.getPositions(); + velocities_openmm = state_openmm.getVelocities(); + + // Vector of Vector of molecules that are vector of atomic coordinates... + QVector< QVector< QVector< Vector > > > buffered_workspace(nframes); + for (int i = 0; i < buffered_workspace.size(); i++) + { + buffered_workspace[i].resize(nmols); + + for (int j = 0; j < nmols; j++) + { + int nats = ws.nAtoms(j); + buffered_workspace[i][j].resize(nats); + } + } + + int k = 0; + + for (int i = 0; i < nmols; i++) + { + Vector *sire_coords = ws.coordsArray(i); + Vector *sire_momenta = ws.momentaArray(i); + const double *m = ws.massArray(i); + + for (int j = 0; j < ws.nAtoms(i); j++) + { + sire_coords[j] = Vector(positions_openmm[j + k][0] * (OpenMM::AngstromsPerNm), + positions_openmm[j + k][1] * (OpenMM::AngstromsPerNm), + positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); + + if (Debug) + qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << + " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + + for (int l = 0; l < nframes; l++) + { + //qDebug() << " i " << i << " j " << j << " k " << k << " l " << l; + Vector buffered_atcoord = Vector(buffered_positions[l][j + k][0] * (OpenMM::AngstromsPerNm), + buffered_positions[l][j + k][1] * (OpenMM::AngstromsPerNm), + buffered_positions[l][j + k][2] * (OpenMM::AngstromsPerNm)); + + buffered_workspace[l][i][j] = buffered_atcoord; + } + + sire_momenta[j] = Vector(velocities_openmm[j + k][0] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, + velocities_openmm[j + k][1] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, + velocities_openmm[j + k][2] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs); + + } + k = k + ws.nAtoms(i); + } + + if (nframes <= 0) + ws.commitCoordinatesAndVelocities(); + else + ws.commitBufferedCoordinatesAndVelocities(buffered_workspace); + + //Now the box dimensions + if (MCBarostat_flag == true) + { + updateBoxDimensions(state_openmm, buffered_dimensions, Debug, ws); + } + // Clear all buffers + + buffered_workspace.clear(); + buffered_dimensions.clear(); + System & ptr_sys = ws.nonConstsystem(); + ptr_sys.mustNowRecalculateFromScratch(); + + return; +} + +double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) +{ + double curr_potential_energy = 0.0; + int infoMask = 0; + infoMask = infoMask + OpenMM::State::Energy; + updateOpenMMContextLambda(lambda); + OpenMM::State state_openmm = openmm_context->getState(infoMask); + state_openmm = openmm_context->getState(infoMask, false, 0x01); + curr_potential_energy = state_openmm.getPotentialEnergy(); + return curr_potential_energy; +} + +void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) +{ + //NON BONDED TERMS + if (perturbed_energies[0]) + openmm_context->setParameter("lam", lambda); //1-5 HD + //1-4 Interactions + if (perturbed_energies[1]) + openmm_context->setParameter("lamhd", lambda); //1-4 HD + if (perturbed_energies[2]) + openmm_context->setParameter("lamtd", 1.0 - lambda); //1-4 To Dummy + if (perturbed_energies[3]) + openmm_context->setParameter("lamfd", lambda); //1-4 From Dummy + if (perturbed_energies[4]) + openmm_context->setParameter("lamftd", lambda); //1-4 From Dummy to Dummy + + //BONDED PERTURBED TERMS + if (perturbed_energies[5]) + openmm_context->setParameter("lambond", lambda); //Bonds + if (perturbed_energies[6]) + openmm_context->setParameter("lamangle", lambda); //Angles + if (perturbed_energies[7]) + openmm_context->setParameter("lamdih", lambda); //Torsions +} + +boost::tuples::tuple OpenMMPMEFEP::calculateGradient( + double incr_plus, double incr_minus, double p_energy_lambda, double beta) +{ + double double_increment = incr_plus - incr_minus; + double gradient = 0; + double potential_energy_lambda_plus_delta; + double potential_energy_lambda_minus_delta; + double forward_m; + double backward_m; + if (incr_plus < 1.0) + { + potential_energy_lambda_plus_delta = getPotentialEnergyAtLambda(incr_plus); + } + if (incr_minus > 0.0) + { + potential_energy_lambda_minus_delta = getPotentialEnergyAtLambda(incr_minus); + } + if (incr_minus < 0.0) + { + gradient = (potential_energy_lambda_plus_delta-p_energy_lambda)*2/double_increment; + backward_m = exp(beta * (potential_energy_lambda_plus_delta - p_energy_lambda)); + forward_m = exp(-beta * (potential_energy_lambda_plus_delta - p_energy_lambda)); + } + else if(incr_plus > 1.0) + { + gradient = -(potential_energy_lambda_minus_delta-p_energy_lambda)*2/double_increment; + backward_m = exp(-beta * (potential_energy_lambda_minus_delta - p_energy_lambda)); + forward_m = exp(beta * (potential_energy_lambda_minus_delta - p_energy_lambda)); + } + else + { + gradient = (potential_energy_lambda_plus_delta-potential_energy_lambda_minus_delta)/double_increment; + + backward_m = exp(-beta * (potential_energy_lambda_minus_delta - p_energy_lambda)); + forward_m = exp(-beta * (potential_energy_lambda_plus_delta - p_energy_lambda)); + } + return boost::tuples::make_tuple(gradient, forward_m, backward_m); +} + +QVector OpenMMPMEFEP::computeReducedPerturbedEnergies(double beta) +{ + bool Debug = false; + QVector perturbed; + QVector::iterator i; + for (i=alchemical_array.begin(); i!=alchemical_array.end(); i++) + { + perturbed.append(getPotentialEnergyAtLambda(*i)*beta); + } + if (Debug) + { + for (i=perturbed.begin(); i!=perturbed.end(); i++) + { + qDebug() <<"bias is: "<<*i<> &buffered_dimensions, + bool Debug, AtomicVelocityWorkspace &ws) +{ + Debug = false; + OpenMM::Vec3 a; + OpenMM::Vec3 b; + OpenMM::Vec3 c; + + System & ptr_sys = ws.nonConstsystem(); + + // TriclinicBox. + if (ptr_sys.property("space").isA()) + { + state_openmm.getPeriodicBoxVectors(a, b, c); + Vector v0 = Vector(a[0] * OpenMM::AngstromsPerNm, a[1] * OpenMM::AngstromsPerNm, a[2] * OpenMM::AngstromsPerNm); + Vector v1 = Vector(b[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, b[2] * OpenMM::AngstromsPerNm); + Vector v2 = Vector(c[0] * OpenMM::AngstromsPerNm, c[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); + + System & ptr_sys = ws.nonConstsystem(); + TriclinicBox sp(v0, v1, v2); + + const QString string = "space"; + ptr_sys.setProperty(string, sp); + + /** Buffer dimensions if necessary */ + for (int k = 0; k < buffered_dimensions.size(); k++) + { + const QString buffered_space = "buffered_space_" + QString::number(k); + TriclinicBox buff_space = TriclinicBox(buffered_dimensions[k][0], + buffered_dimensions[k][1], + buffered_dimensions[k][2]); + ptr_sys.setProperty(buffered_space, buff_space); + } + } + // PeriodicBox. + else + { + state_openmm.getPeriodicBoxVectors(a, b, c); + Vector new_dims = Vector(a[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); + if (Debug) + qDebug() << " a " << a[0] << " b " << b[1] << " c " << c[2]; + + System & ptr_sys = ws.nonConstsystem(); + PeriodicBox sp = ptr_sys.property("space").asA(); + + sp.setDimensions(new_dims); + const QString string = "space"; + ptr_sys.setProperty(string, sp); + + /** Buffer dimensions if necessary */ + for (int k = 0; k < buffered_dimensions.size(); k++) + { + const QString buffered_space = "buffered_space_" + QString::number(k); + Vector dims(buffered_dimensions[k][0].x(), + buffered_dimensions[k][1].y(), + buffered_dimensions[k][2].z()); + PeriodicBox buff_space = PeriodicBox(dims); + ptr_sys.setProperty(buffered_space, buff_space); + } + } +} + +/** Get the combining rules type: arithmetic, geometric*/ +QString OpenMMPMEFEP::getCombiningRules(void) +{ + return combiningRules; +} + +/** Set the combining rules type: arithmetic, geometric*/ +void OpenMMPMEFEP::setCombiningRules(QString combining_rules) +{ + combiningRules = combining_rules; +} + +/** Get the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic */ +QString OpenMMPMEFEP::getCutoffType(void) +{ + return CutoffType; +} + +/** Set the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic */ +void OpenMMPMEFEP::setCutoffType(QString cutoff_type) +{ + CutoffType = cutoff_type; +} + +/** Get the cutoff distance in A */ +SireUnits::Dimension::Length OpenMMPMEFEP::getCutoffDistance(void) +{ + return cutoff_distance; +} + +/** Set the cutoff distance in A */ +void OpenMMPMEFEP::setCutoffDistance(SireUnits::Dimension::Length distance) +{ + cutoff_distance = distance; +} + +/** Get the dielectric constant */ +double OpenMMPMEFEP::getFieldDielectric(void) +{ + return field_dielectric; +} + +/** Set the dielectric constant */ +void OpenMMPMEFEP::setFieldDielectric(double dielectric) +{ + field_dielectric = dielectric; +} + +/** Set Andersen thermostat */ + +void OpenMMPMEFEP::setAndersen(bool andersen) +{ + Andersen_flag = andersen; +} + +/** Get Andersen thermostat status on/off */ +bool OpenMMPMEFEP::getAndersen(void) +{ + return Andersen_flag; +} + +/** Get the Andersen Thermostat frequency collision */ +double OpenMMPMEFEP::getAndersenFrequency(void) +{ + return Andersen_frequency; +} + +/** Set the Andersen Thermostat frequency collision */ +void OpenMMPMEFEP::setAndersenFrequency(double freq) +{ + Andersen_frequency = freq; +} + +/** Get the Integrator random seed */ +int OpenMMPMEFEP::getRandomSeed(void) +{ + return random_seed; +} + +/** Set the Integrator random seed */ +void OpenMMPMEFEP::setRandomSeed(int seed) +{ + random_seed = seed; +} + +/** Get the bath Temperature */ +SireUnits::Dimension::Temperature OpenMMPMEFEP::getTemperature(void) +{ + return Temperature; +} + +/** Set the Temperature */ +void OpenMMPMEFEP::setTemperature(SireUnits::Dimension::Temperature temperature) +{ + Temperature = temperature; +} + +/** Set Monte Carlo Barostat on/off */ + +void OpenMMPMEFEP::setMCBarostat(bool MCBarostat) +{ + MCBarostat_flag = MCBarostat; +} + +/** Get Andersen thermostat status on/off */ +bool OpenMMPMEFEP::getMCBarostat(void) +{ + return MCBarostat_flag; +} + +/** Get the Monte Carlo Barostat frequency in time speps */ +int OpenMMPMEFEP::getMCBarostatFrequency(void) +{ + return MCBarostat_frequency; +} + +/** Set the Monte Carlo Barostat frequency in time speps */ +void OpenMMPMEFEP::setMCBarostatFrequency(int freq) +{ + MCBarostat_frequency = freq; + +} + +/** Get the Presure */ +SireUnits::Dimension::Pressure OpenMMPMEFEP::getPressure(void) +{ + return Pressure; +} + +/** Set the Pressure */ +void OpenMMPMEFEP::setPressure(SireUnits::Dimension::Pressure pressure) +{ + Pressure = pressure; +} + +/** Get the Constraint type: none, hbonds, allbonds, hangles */ +QString OpenMMPMEFEP::getConstraintType(void) +{ + return ConstraintType; +} + +/** Set the Constraint type: none, hbonds, allbonds, hangles */ +void OpenMMPMEFEP::setConstraintType(QString constrain) +{ + ConstraintType = constrain; +} + +/** Get the OpenMMMD Platform: CUDA, OpenCL, CPU */ +QString OpenMMPMEFEP::getPlatform(void) +{ + return platform_type; +} + +/** Set the OpenMM Platform: CUDA, OpenCL, CPU */ +void OpenMMPMEFEP::setPlatform(QString platform) +{ + platform_type = platform; +} + +/** Get the OpenMMMD Platform: CUDA, OpenCL, CPU */ +QString OpenMMPMEFEP::getDeviceIndex(void) +{ + return device_index; +} + +/** Set the OpenMM Precision */ +void OpenMMPMEFEP::setPrecision(QString prec) +{ + precision = prec; +} + +/** Get the OpenMMMD Precision */ +QString OpenMMPMEFEP::getPrecision(void) +{ + return precision; +} + +/** Set the OpenMM Platform: CUDA, OpenCL, CPU */ +void OpenMMPMEFEP::setDeviceIndex(QString deviceidx) +{ + device_index = deviceidx; +} + +/** Get the Restaint mode*/ +bool OpenMMPMEFEP::getRestraint(void) +{ + return Restraint_flag; +} + +/** Set the Retraint mode */ +void OpenMMPMEFEP::setRestraint(bool Restraint) +{ + Restraint_flag = Restraint; +} + +/** Get the Center of Mass motion removal frequency */ +int OpenMMPMEFEP::getCMMremovalFrequency(void) +{ + return CMMremoval_frequency; +} + +/** Set the Center of Mass motion removal frequency */ +void OpenMMPMEFEP::setCMMremovalFrequency(int frequency) +{ + CMMremoval_frequency = frequency; +} + +/** Get the frequency of buffering coordinates */ +int OpenMMPMEFEP::getBufferFrequency() +{ + return buffer_frequency; +} + +/** Set the Center of Mass motion removal frequency */ +void OpenMMPMEFEP::setBufferFrequency(int frequency) +{ + buffer_frequency = frequency; +} + +/** Get the frequency of buffering coordinates */ +int OpenMMPMEFEP::getEnergyFrequency() +{ + return energy_frequency; +} + +/** Set the Center of Mass motion removal frequency */ +void OpenMMPMEFEP::setEnergyFrequency(int frequency) +{ + energy_frequency = frequency; +} + +/** Get the alchemical value used to calculate the free energy change via TI method*/ +double OpenMMPMEFEP::getAlchemicalValue(void) +{ + return Alchemical_value; +} + +/** Set the alchemical value used to calculate the free energy change via TI method*/ +void OpenMMPMEFEP::setAlchemicalValue(double lambda_value) +{ + Alchemical_value = max(0.0, min(1.0, lambda_value)); +} + +void OpenMMPMEFEP::setAlchemicalArray(QVector lambda_array) +{ + for (int i =0; i< lambda_array.size(); i++) + { + alchemical_array.append(max(0.0, min(1.0, lambda_array[i]))); + } +} + +/** Get the coulomb power used in the soft core potential*/ +//int OpenMMPMEFEP::getCoulomb_power(void) + +float OpenMMPMEFEP::getCoulombPower(void) +{ + return coulomb_power; +} + +/** Set the coulomb power used in the soft core potential*/ +//void OpenMMPMEFEP::setCoulomb_power(int coulomb) + +void OpenMMPMEFEP::setCoulombPower(float coulomb) +{ + coulomb_power = coulomb; +} + +/** Get the shift used in the soft core potential*/ +double OpenMMPMEFEP::getShiftDelta(void) +{ + return shift_delta; +} + +/** + * + * @param shiftdelta + */ +void OpenMMPMEFEP::setShiftDelta(double shiftdelta) +{ + shift_delta = shiftdelta; +} + +/** Get the delta alchemical used in the FEP method*/ +double OpenMMPMEFEP::getDeltaAlchemical(void) +{ + return delta_alchemical; +} + +/** + * Set the delta alchemical used in the FEP method + * @param deltaalchemical + */ +void OpenMMPMEFEP::setDeltatAlchemical(double deltaalchemical) +{ + delta_alchemical = deltaalchemical; +} + +/** Calculated Gradients*/ +QVector OpenMMPMEFEP::getGradients(void) +{ + return finite_diff_gradients; +} + +/** Average energies*/ +QVector OpenMMPMEFEP::getEnergies(void) +{ + return pot_energies; +} +/** Average energies*/ +QVector OpenMMPMEFEP::getForwardMetropolis(void) +{ + return forward_Metropolis; +} +/** Average energies*/ +QVector OpenMMPMEFEP::getBackwardMetropolis(void) +{ + return backward_Metropolis; +} + + +QVector > OpenMMPMEFEP::getReducedPerturbedEnergies(void) +{ + return reduced_perturbed_energies; +} + +/** Get the Integrator type*/ +QString OpenMMPMEFEP::getIntegrator(void) +{ + return Integrator_type; +} + +/** Set the Integrator type*/ +void OpenMMPMEFEP::setIntegrator(QString intgrator) +{ + Integrator_type = intgrator; +} + +/** Get the friction used in specific Integrator type*/ +SireUnits::Dimension::Time OpenMMPMEFEP::getFriction(void) +{ + return friction; +} + +/** Set the friction used in specific Integrator type*/ +void OpenMMPMEFEP::setFriction(SireUnits::Dimension::Time thefriction) +{ + friction = thefriction; +} + +/** Get the integration tolerance */ +double OpenMMPMEFEP::getIntegrationTolerance(void) +{ + return integration_tol; +} + +/** Set the integration tolerance*/ +void OpenMMPMEFEP::setIntegrationTolerance(double tolerance) +{ + integration_tol = tolerance; +} + +/** Get total time to skip*/ +SireUnits::Dimension::Time OpenMMPMEFEP::getTimetoSkip(void) +{ + return timeskip; +} + +/** Get total time to skip*/ +void OpenMMPMEFEP::setTimetoSkip(SireUnits::Dimension::Time skip) +{ + timeskip = skip; +} + +/** Set the flag to reinitialise the context*/ +void OpenMMPMEFEP::setReinitialiseContext(bool reinitialise) +{ + reinitialise_context = reinitialise; +} + +/** Create an empty workspace */ +IntegratorWorkspacePtr OpenMMPMEFEP::createWorkspace(const PropertyMap &map) const +{ + return IntegratorWorkspacePtr(new AtomicVelocityWorkspace(map)); +} + +/** Return the ensemble of this integrator */ +Ensemble OpenMMPMEFEP::ensemble() const +{ + return Ensemble::NVE(); +} + +/** Return whether or not this integrator is time-reversible */ +bool OpenMMPMEFEP::isTimeReversible() const +{ + return true; +} + +/** Create a workspace for this integrator for the molecule group 'molgroup' */ +IntegratorWorkspacePtr OpenMMPMEFEP::createWorkspace(const MoleculeGroup &molgroup, const PropertyMap &map) const +{ + return IntegratorWorkspacePtr(new AtomicVelocityWorkspace(molgroup, map)); +} + +const char* OpenMMPMEFEP::typeName() +{ + return QMetaType::typeName(qMetaTypeId()); +} diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h new file mode 100644 index 000000000..b86e9b454 --- /dev/null +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -0,0 +1,343 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2009 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREMOVE_OPENMMPMEFEP_H +#define SIREMOVE_OPENMMPMEFEP_H + +#include "integrator.h" + +#ifdef SIRE_USE_OPENMM + #include // CONDITIONAL_INCLUDE +#endif + +#include +#include "SireUnits/temperature.h" +#include "SireSystem/system.h" +#include +SIRE_BEGIN_HEADER + +#ifdef SIRE_USE_OPENMM + + namespace SireMove { + class OpenMMPMEFEP; +} + +SIREMOVE_EXPORT QDataStream& operator<<(QDataStream&, const SireMove::OpenMMPMEFEP&); +SIREMOVE_EXPORT QDataStream& operator>>(QDataStream&, SireMove::OpenMMPMEFEP&); + +namespace SireMove { + + /** This class implements single topology a free energy method using OpenMM. + + @author Julien Michel,Gaetano Calabro and Antonia Mey + */ + class SIREMOVE_EXPORT OpenMMPMEFEP + : public SireBase::ConcreteProperty { + friend QDataStream& ::operator<<(QDataStream&, const OpenMMPMEFEP&); + friend QDataStream& ::operator>>(QDataStream&, OpenMMPMEFEP&); + + public: + OpenMMPMEFEP(bool frequent_save_velocities = false); + + OpenMMPMEFEP(const MoleculeGroup &molecule_group, + const MoleculeGroup &solutes, + const MoleculeGroup &solute_hard, + const MoleculeGroup &solute_todummy, + const MoleculeGroup & solute_fromdummy, + bool frequent_save_velocities = false); + + OpenMMPMEFEP(const OpenMMPMEFEP &other); + + ~OpenMMPMEFEP(); + + OpenMMPMEFEP& operator=(const OpenMMPMEFEP &other); + + bool operator==(const OpenMMPMEFEP &other) const; + bool operator!=(const OpenMMPMEFEP &other) const; + + static const char* typeName(); + + QString toString() const; + + Ensemble ensemble() const; + + bool isTimeReversible() const; + + void initialise(); + + + SireUnits::Dimension::MolarEnergy getPotentialEnergy(const System &system); + + System minimiseEnergy(System &system, double tolerance, int max_iteration); + + System annealSystemToLambda(System &system, SireUnits::Dimension::Time anneal_step_size, + int annealing_steps); + + void integrate(IntegratorWorkspace &workspace, + const Symbol &nrg_component, + SireUnits::Dimension::Time timestep, + int nmoves, bool record_stats); + + IntegratorWorkspacePtr createWorkspace(const PropertyMap &map = PropertyMap()) const; + IntegratorWorkspacePtr createWorkspace(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; + + QString getCombiningRules(void); + void setCombiningRules(QString); + + QString getCutoffType(void); + void setCutoffType(QString); + + SireUnits::Dimension::Length getCutoffDistance(void); + void setCutoffDistance(SireUnits::Dimension::Length); + + double getFieldDielectric(void); + void setFieldDielectric(double); + + bool getAndersen(void); + void setAndersen(bool); + + double getAndersenFrequency(void); + void setAndersenFrequency(double); + + bool getMCBarostat(void); + void setMCBarostat(bool); + + void setMCBarostatFrequency(int); + int getMCBarostatFrequency(void); + + QString getConstraintType(void); + void setConstraintType(QString); + + SireUnits::Dimension::Pressure getPressure(void); + void setPressure(SireUnits::Dimension::Pressure); + + SireUnits::Dimension::Temperature getTemperature(void); + void setTemperature(SireUnits::Dimension::Temperature); + + QString getPlatform(void); + void setPlatform(QString); + + bool getRestraint(void); + void setRestraint(bool); + + int getCMMremovalFrequency(void); + void setCMMremovalFrequency(int); + + int getBufferFrequency(); + void setBufferFrequency(int); + + int getEnergyFrequency(); + void setEnergyFrequency(int); + + void setDeviceIndex(QString); + QString getDeviceIndex(void); + + void setPrecision(QString); + QString getPrecision(void); + + double getAlchemicalValue(void); + void setAlchemicalValue(double); + + void setAlchemicalArray(QVector); + + float getCoulombPower(void); + void setCoulombPower(float); + + double getShiftDelta(void); + void setShiftDelta(double); + + double getDeltaAlchemical(void); + void setDeltatAlchemical(double); + + QVector getGradients(void); + QVector getEnergies(void); + + QVector getForwardMetropolis(void); + QVector getBackwardMetropolis(void); + + QVector > getReducedPerturbedEnergies(void); + + QString getIntegrator(void); + void setIntegrator(QString); + + SireUnits::Dimension::Time getFriction(void); + + void setFriction(SireUnits::Dimension::Time); + + double getIntegrationTolerance(void); + void setIntegrationTolerance(double tollerance); + + SireUnits::Dimension::Time getTimetoSkip(void); + void setTimetoSkip(SireUnits::Dimension::Time); + + void setReinitialiseContext(bool); + + int getRandomSeed(void); + void setRandomSeed(int); + + private: + void createContext(IntegratorWorkspace &workspace, + SireUnits::Dimension::Time timestep); + void destroyContext(); + void updateBoxDimensions(OpenMM::State &state_openmm, + QVector> &buffered_dimensions, bool Debug, + AtomicVelocityWorkspace &ws); + + double getPotentialEnergyAtLambda(double lambda); + void updateOpenMMContextLambda(double lambda); + boost::tuples::tuple calculateGradient(double increment_plus, + double increment_minus, double potential_energy_lambda, double beta); + QVector computeReducedPerturbedEnergies(double); + void emptyContainers(void); + + /** Whether or not to save the velocities after every step, or to save them at the end of all of the steps */ + bool frequent_save_velocities; + /** The Molecule Group on which the integrator operates */ + MolGroupPtr molgroup; + /** The solute group on which the integrator operates */ + MolGroupPtr solute; + /** The Solute hard Group on which the integrator operates */ + MolGroupPtr solutehard; + /** The To Dummy Solute Group on which the integrator operates */ + MolGroupPtr solutetodummy; + /** The From Dummy Solute Group on which the integrator operates */ + MolGroupPtr solutefromdummy; + + /**Try instead to...keep a copy of OpenMM::System */ + OpenMM::System* openmm_system; + + OpenMM::Context* openmm_context; + + /** Whether the openmm system and the context have been initialised*/ + bool isSystemInitialised; + bool isContextInitialised; + + QString combiningRules; + QString CutoffType; + SireUnits::Dimension::Length cutoff_distance; + double field_dielectric; + + bool Andersen_flag; + double Andersen_frequency; + + bool MCBarostat_flag; + int MCBarostat_frequency; + + QString ConstraintType; + + SireUnits::Dimension::Pressure Pressure; + SireUnits::Dimension::Temperature Temperature; + + QString platform_type; + + bool Restraint_flag; + + int CMMremoval_frequency; + + int buffer_frequency; + + int energy_frequency; + + QString device_index; + + QString precision; + + double Alchemical_value; + + float coulomb_power; + + double shift_delta; + + double delta_alchemical; + + QVector alchemical_array; + + QVector finite_diff_gradients; + + QVector pot_energies; + + QVector forward_Metropolis; + + QVector backward_Metropolis; + + QVector > reduced_perturbed_energies; + + QVector perturbed_energies; + + QString Integrator_type; + + SireUnits::Dimension::Time friction; + + double integration_tol; + + SireUnits::Dimension::Time timeskip; + + + bool reinitialise_context; + + bool Debug; + + int random_seed; + + }; + + +} + +Q_DECLARE_METATYPE(SireMove::OpenMMPMEFEP) + +SIRE_EXPOSE_CLASS(SireMove::OpenMMPMEFEP) + +SIRE_END_HEADER + +#else // SIRE_USE_OPENMM + + namespace SireMove { + + class OpenMMPMEFEP { + public: + + OpenMMPMEFEP() { + } + + ~OpenMMPMEFEP() { + } + + static const char* typeName() { + return "SireMM::OpenMMPMEFEP"; + } + + }; + +} + +Q_DECLARE_METATYPE(SireMove::OpenMMPMEFEP) + +#endif // SIRE_USE_OPENMM + +#endif From b654c680f2499aaf6aec35f4e2cb49e3b874709b Mon Sep 17 00:00:00 2001 From: jmichel80 Date: Thu, 2 Dec 2021 16:11:22 -0800 Subject: [PATCH 002/148] adding new wrappers --- wrapper/Move/CMakeAutogenFile.txt | 125 ++-- wrapper/Move/CMakeOpenMMFile.txt | 1 + wrapper/Move/OpenMMPMEFEP.pypp.cpp | 952 +++++++++++++++++++++++++++ wrapper/Move/OpenMMPMEFEP.pypp.hpp | 10 + wrapper/Move/Simulation.pypp.cpp | 8 +- wrapper/Move/SireMove_properties.cpp | 162 ++--- wrapper/Move/SireMove_registrars.cpp | 169 ++--- wrapper/Move/_Move.main.cpp | 4 + wrapper/Move/active_headers.h | 1 + 9 files changed, 1202 insertions(+), 230 deletions(-) create mode 100644 wrapper/Move/OpenMMPMEFEP.pypp.cpp create mode 100644 wrapper/Move/OpenMMPMEFEP.pypp.hpp diff --git a/wrapper/Move/CMakeAutogenFile.txt b/wrapper/Move/CMakeAutogenFile.txt index d112fc0b9..cbdea8fed 100644 --- a/wrapper/Move/CMakeAutogenFile.txt +++ b/wrapper/Move/CMakeAutogenFile.txt @@ -1,83 +1,84 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - WeightedMoves.pypp.cpp - DofID.pypp.cpp - SameSupraMoves.pypp.cpp - ZMatMove.pypp.cpp - ScaleVolumeFromCenter.pypp.cpp - ZMatrixLine.pypp.cpp SameMoves.pypp.cpp - GetPoint.pypp.cpp + ZMatrixCoordsLine.pypp.cpp + MolInserter.pypp.cpp + SystemWideDeleter.pypp.cpp + InternalMoveSingle.pypp.cpp + RepExMove2.pypp.cpp SupraMove.pypp.cpp - VelocityGenerator.pypp.cpp + Simulation.pypp.cpp + VolumeMove.pypp.cpp + SupraSubMove.pypp.cpp + SimStore.pypp.cpp + OpenMMMDIntegrator.pypp.cpp + InternalMove.pypp.cpp + NullVelocityGenerator.pypp.cpp + HMCVelGen.pypp.cpp + NullInserter.pypp.cpp Sampler.pypp.cpp + RepExSubMove.pypp.cpp + SupraSubMoves.pypp.cpp + Flexibility.pypp.cpp + HybridMC.pypp.cpp + VelocityGenerator.pypp.cpp + UniformSampler.pypp.cpp + ZMatrixLine.pypp.cpp NullIntegrator.pypp.cpp - SpecifiedGroupsDeleter.pypp.cpp - SimStore.pypp.cpp - RepExMove.pypp.cpp + ScaleVolumeFromCenter.pypp.cpp + Replica.pypp.cpp + Dynamics.pypp.cpp + Moves.pypp.cpp NullGetPoint.pypp.cpp - SupraSystem.pypp.cpp - InternalMoveSingle.pypp.cpp - VolumeMove.pypp.cpp - SupraMoves.pypp.cpp - PrefSampler.pypp.cpp - MTSMC.pypp.cpp + MolDeleter.pypp.cpp + OpenMMFrEnergyDT.pypp.cpp ZMatrix.pypp.cpp - VolumeChanger.pypp.cpp - NullInserter.pypp.cpp - InternalMove.pypp.cpp - SupraSubSystem.pypp.cpp - NullDeleter.pypp.cpp - SimPacket.pypp.cpp - MaxwellBoltzmann.pypp.cpp - Replica.pypp.cpp + NullVolumeChanger.pypp.cpp + ZMatrixCoords.pypp.cpp + DofID.pypp.cpp HMCGenerator.pypp.cpp - SupraSubMove.pypp.cpp + SupraSystem.pypp.cpp + VelocityVerlet.pypp.cpp + SimPacket.pypp.cpp + NullSupraMove.pypp.cpp + Ensemble.pypp.cpp + Move.pypp.cpp GetCOGPoint.pypp.cpp + NullDeleter.pypp.cpp + UniformInserter.pypp.cpp RBWorkspaceJM.pypp.cpp - OpenMMFrEnergyST.pypp.cpp - MolInserter.pypp.cpp - RepExSubMove.pypp.cpp + NullSupraSubMove.pypp.cpp + DLMRigidBody.pypp.cpp + VelocitiesFromProperty.pypp.cpp + RepExMove.pypp.cpp + SupraSimPacket.pypp.cpp Integrator.pypp.cpp - NullMove.pypp.cpp - RigidBodyMC.pypp.cpp + SameSupraMoves.pypp.cpp + Replicas.pypp.cpp + SupraMoves.pypp.cpp + GetCentroidPoint.pypp.cpp + WeightedMoves.pypp.cpp GetCOMPoint.pypp.cpp - SystemWideDeleter.pypp.cpp + MTSMC.pypp.cpp + OpenMMFrEnergyST.pypp.cpp + Titrator.pypp.cpp + MaxwellBoltzmann.pypp.cpp MolecularDynamics.pypp.cpp - Flexibility.pypp.cpp - HMCVelGen.pypp.cpp + GetPoint.pypp.cpp + SupraSubSystem.pypp.cpp + SameSupraSubMoves.pypp.cpp TitrationMove.pypp.cpp - Titrator.pypp.cpp - ZMatrixCoords.pypp.cpp - SupraSubMoves.pypp.cpp - Moves.pypp.cpp - VelocitiesFromProperty.pypp.cpp - Dynamics.pypp.cpp - UniformInserter.pypp.cpp - UniformSampler.pypp.cpp - RepExMove2.pypp.cpp SupraSubSim.pypp.cpp - DLMRigidBody.pypp.cpp + SupraSubSimPacket.pypp.cpp + NullMove.pypp.cpp + RigidBodyMC.pypp.cpp + SpecifiedGroupsDeleter.pypp.cpp SupraSim.pypp.cpp - NullVelocityGenerator.pypp.cpp - VelocityVerlet.pypp.cpp - NullVolumeChanger.pypp.cpp + ZMatMove.pypp.cpp MonteCarlo.pypp.cpp - OpenMMMDIntegrator.pypp.cpp - Ensemble.pypp.cpp - SupraSubSimPacket.pypp.cpp - OpenMMFrEnergyDT.pypp.cpp - Simulation.pypp.cpp - SupraSimPacket.pypp.cpp - ZMatrixCoordsLine.pypp.cpp - MolDeleter.pypp.cpp - SameSupraSubMoves.pypp.cpp - GetCentroidPoint.pypp.cpp - NullSupraSubMove.pypp.cpp - HybridMC.pypp.cpp - Replicas.pypp.cpp - NullSupraMove.pypp.cpp - Move.pypp.cpp + VolumeChanger.pypp.cpp + PrefSampler.pypp.cpp + OpenMMPMEFEP.pypp.cpp SireMove_containers.cpp SireMove_properties.cpp SireMove_registrars.cpp diff --git a/wrapper/Move/CMakeOpenMMFile.txt b/wrapper/Move/CMakeOpenMMFile.txt index cb3d0ff95..00cb8fd84 100644 --- a/wrapper/Move/CMakeOpenMMFile.txt +++ b/wrapper/Move/CMakeOpenMMFile.txt @@ -3,4 +3,5 @@ set ( PYPP_OPENMM_SOURCES OpenMMMDIntegrator.pypp.cpp OpenMMFrEnergyDT.pypp.cpp OpenMMFrEnergyST.pypp.cpp + OpenMMPMEFEP.pypp.cpp ) diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp new file mode 100644 index 000000000..f15f11fb3 --- /dev/null +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -0,0 +1,952 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "OpenMMPMEFEP.pypp.hpp" + +namespace bp = boost::python; + +#include "SireBase/variantproperty.h" + +#include "SireFF/forcetable.h" + +#include "SireIO/amber.h" + +#include "SireMM/atomljs.h" + +#include "SireMM/internalff.h" + +#include "SireMM/internalperturbation.h" + +#include "SireMaths/constants.h" + +#include "SireMaths/rangenerator.h" + +#include "SireMaths/vector.h" + +#include "SireMol/amberparameters.h" + +#include "SireMol/atomcharges.h" + +#include "SireMol/atomcoords.h" + +#include "SireMol/atommasses.h" + +#include "SireMol/bondid.h" + +#include "SireMol/connectivity.h" + +#include "SireMol/mgname.h" + +#include "SireMol/molecule.h" + +#include "SireMol/moleculegroup.h" + +#include "SireMol/moleditor.h" + +#include "SireMol/partialmolecule.h" + +#include "SireMol/perturbation.h" + +#include "SireMove/flexibility.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "SireSystem/system.h" + +#include "SireUnits/convert.h" + +#include "SireUnits/temperature.h" + +#include "SireUnits/units.h" + +#include "SireVol/periodicbox.h" + +#include "SireVol/triclinicbox.h" + +#include "ensemble.h" + +#include "openmmpmefep.h" + +#include + +#include + +#include + +#include + +#include "openmmpmefep.h" + +SireMove::OpenMMPMEFEP __copy__(const SireMove::OpenMMPMEFEP &other){ return SireMove::OpenMMPMEFEP(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +void register_OpenMMPMEFEP_class(){ + + { //::SireMove::OpenMMPMEFEP + typedef bp::class_< SireMove::OpenMMPMEFEP, bp::bases< SireMove::Integrator, SireBase::Property > > OpenMMPMEFEP_exposer_t; + OpenMMPMEFEP_exposer_t OpenMMPMEFEP_exposer = OpenMMPMEFEP_exposer_t( "OpenMMPMEFEP", "This class implements single topology a free energy method using OpenMM.\n\nAuthor: Julien Michel,Gaetano Calabro and Antonia Mey\n", bp::init< bp::optional< bool > >(( bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor") ); + bp::scope OpenMMPMEFEP_scope( OpenMMPMEFEP_exposer ); + OpenMMPMEFEP_exposer.def( bp::init< SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, bp::optional< bool > >(( bp::arg("molecule_group"), bp::arg("solutes"), bp::arg("solute_hard"), bp::arg("solute_todummy"), bp::arg("solute_fromdummy"), bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor using the passed molecule groups") ); + OpenMMPMEFEP_exposer.def( bp::init< SireMove::OpenMMPMEFEP const & >(( bp::arg("other") ), "Copy constructor") ); + { //::SireMove::OpenMMPMEFEP::annealSystemToLambda + + typedef ::SireSystem::System ( ::SireMove::OpenMMPMEFEP::*annealSystemToLambda_function_type)( ::SireSystem::System &,::SireUnits::Dimension::Time,int ) ; + annealSystemToLambda_function_type annealSystemToLambda_function_value( &::SireMove::OpenMMPMEFEP::annealSystemToLambda ); + + OpenMMPMEFEP_exposer.def( + "annealSystemToLambda" + , annealSystemToLambda_function_value + , ( bp::arg("system"), bp::arg("anneal_step_size"), bp::arg("annealing_steps") ) + , "\n annealSystemToLambda will anneal the system to the current alchemical lambda\n value of the system\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am timestep Default = 0.005. Time step used of the\n equilibration to the desired lambda\n Par:am annealingSteps Default = 1000. Number of steps used for the\n annealing\n Return: Sire system with updated coordinates and\n velocities.\n" ); + + } + { //::SireMove::OpenMMPMEFEP::createWorkspace + + typedef ::SireMove::IntegratorWorkspacePtr ( ::SireMove::OpenMMPMEFEP::*createWorkspace_function_type)( ::SireBase::PropertyMap const & ) const; + createWorkspace_function_type createWorkspace_function_value( &::SireMove::OpenMMPMEFEP::createWorkspace ); + + OpenMMPMEFEP_exposer.def( + "createWorkspace" + , createWorkspace_function_value + , ( bp::arg("map")=SireBase::PropertyMap() ) + , "Create an empty workspace" ); + + } + { //::SireMove::OpenMMPMEFEP::createWorkspace + + typedef ::SireMove::IntegratorWorkspacePtr ( ::SireMove::OpenMMPMEFEP::*createWorkspace_function_type)( ::SireMol::MoleculeGroup const &,::SireBase::PropertyMap const & ) const; + createWorkspace_function_type createWorkspace_function_value( &::SireMove::OpenMMPMEFEP::createWorkspace ); + + OpenMMPMEFEP_exposer.def( + "createWorkspace" + , createWorkspace_function_value + , ( bp::arg("molgroup"), bp::arg("map")=SireBase::PropertyMap() ) + , "Create a workspace for this integrator for the molecule group molgroup" ); + + } + { //::SireMove::OpenMMPMEFEP::ensemble + + typedef ::SireMove::Ensemble ( ::SireMove::OpenMMPMEFEP::*ensemble_function_type)( ) const; + ensemble_function_type ensemble_function_value( &::SireMove::OpenMMPMEFEP::ensemble ); + + OpenMMPMEFEP_exposer.def( + "ensemble" + , ensemble_function_value + , "Return the ensemble of this integrator" ); + + } + { //::SireMove::OpenMMPMEFEP::getAlchemicalValue + + typedef double ( ::SireMove::OpenMMPMEFEP::*getAlchemicalValue_function_type)( ) ; + getAlchemicalValue_function_type getAlchemicalValue_function_value( &::SireMove::OpenMMPMEFEP::getAlchemicalValue ); + + OpenMMPMEFEP_exposer.def( + "getAlchemicalValue" + , getAlchemicalValue_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getAndersen + + typedef bool ( ::SireMove::OpenMMPMEFEP::*getAndersen_function_type)( ) ; + getAndersen_function_type getAndersen_function_value( &::SireMove::OpenMMPMEFEP::getAndersen ); + + OpenMMPMEFEP_exposer.def( + "getAndersen" + , getAndersen_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getAndersenFrequency + + typedef double ( ::SireMove::OpenMMPMEFEP::*getAndersenFrequency_function_type)( ) ; + getAndersenFrequency_function_type getAndersenFrequency_function_value( &::SireMove::OpenMMPMEFEP::getAndersenFrequency ); + + OpenMMPMEFEP_exposer.def( + "getAndersenFrequency" + , getAndersenFrequency_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getBackwardMetropolis + + typedef ::QVector< double > ( ::SireMove::OpenMMPMEFEP::*getBackwardMetropolis_function_type)( ) ; + getBackwardMetropolis_function_type getBackwardMetropolis_function_value( &::SireMove::OpenMMPMEFEP::getBackwardMetropolis ); + + OpenMMPMEFEP_exposer.def( + "getBackwardMetropolis" + , getBackwardMetropolis_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getBufferFrequency + + typedef int ( ::SireMove::OpenMMPMEFEP::*getBufferFrequency_function_type)( ) ; + getBufferFrequency_function_type getBufferFrequency_function_value( &::SireMove::OpenMMPMEFEP::getBufferFrequency ); + + OpenMMPMEFEP_exposer.def( + "getBufferFrequency" + , getBufferFrequency_function_value + , "Get the frequency of buffering coordinates" ); + + } + { //::SireMove::OpenMMPMEFEP::getCMMremovalFrequency + + typedef int ( ::SireMove::OpenMMPMEFEP::*getCMMremovalFrequency_function_type)( ) ; + getCMMremovalFrequency_function_type getCMMremovalFrequency_function_value( &::SireMove::OpenMMPMEFEP::getCMMremovalFrequency ); + + OpenMMPMEFEP_exposer.def( + "getCMMremovalFrequency" + , getCMMremovalFrequency_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getCombiningRules + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*getCombiningRules_function_type)( ) ; + getCombiningRules_function_type getCombiningRules_function_value( &::SireMove::OpenMMPMEFEP::getCombiningRules ); + + OpenMMPMEFEP_exposer.def( + "getCombiningRules" + , getCombiningRules_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getConstraintType + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*getConstraintType_function_type)( ) ; + getConstraintType_function_type getConstraintType_function_value( &::SireMove::OpenMMPMEFEP::getConstraintType ); + + OpenMMPMEFEP_exposer.def( + "getConstraintType" + , getConstraintType_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getCoulombPower + + typedef float ( ::SireMove::OpenMMPMEFEP::*getCoulombPower_function_type)( ) ; + getCoulombPower_function_type getCoulombPower_function_value( &::SireMove::OpenMMPMEFEP::getCoulombPower ); + + OpenMMPMEFEP_exposer.def( + "getCoulombPower" + , getCoulombPower_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getCutoffDistance + + typedef ::SireUnits::Dimension::Length ( ::SireMove::OpenMMPMEFEP::*getCutoffDistance_function_type)( ) ; + getCutoffDistance_function_type getCutoffDistance_function_value( &::SireMove::OpenMMPMEFEP::getCutoffDistance ); + + OpenMMPMEFEP_exposer.def( + "getCutoffDistance" + , getCutoffDistance_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getCutoffType + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*getCutoffType_function_type)( ) ; + getCutoffType_function_type getCutoffType_function_value( &::SireMove::OpenMMPMEFEP::getCutoffType ); + + OpenMMPMEFEP_exposer.def( + "getCutoffType" + , getCutoffType_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getDeltaAlchemical + + typedef double ( ::SireMove::OpenMMPMEFEP::*getDeltaAlchemical_function_type)( ) ; + getDeltaAlchemical_function_type getDeltaAlchemical_function_value( &::SireMove::OpenMMPMEFEP::getDeltaAlchemical ); + + OpenMMPMEFEP_exposer.def( + "getDeltaAlchemical" + , getDeltaAlchemical_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getDeviceIndex + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*getDeviceIndex_function_type)( ) ; + getDeviceIndex_function_type getDeviceIndex_function_value( &::SireMove::OpenMMPMEFEP::getDeviceIndex ); + + OpenMMPMEFEP_exposer.def( + "getDeviceIndex" + , getDeviceIndex_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getEnergies + + typedef ::QVector< double > ( ::SireMove::OpenMMPMEFEP::*getEnergies_function_type)( ) ; + getEnergies_function_type getEnergies_function_value( &::SireMove::OpenMMPMEFEP::getEnergies ); + + OpenMMPMEFEP_exposer.def( + "getEnergies" + , getEnergies_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getEnergyFrequency + + typedef int ( ::SireMove::OpenMMPMEFEP::*getEnergyFrequency_function_type)( ) ; + getEnergyFrequency_function_type getEnergyFrequency_function_value( &::SireMove::OpenMMPMEFEP::getEnergyFrequency ); + + OpenMMPMEFEP_exposer.def( + "getEnergyFrequency" + , getEnergyFrequency_function_value + , "Get the frequency of buffering coordinates" ); + + } + { //::SireMove::OpenMMPMEFEP::getFieldDielectric + + typedef double ( ::SireMove::OpenMMPMEFEP::*getFieldDielectric_function_type)( ) ; + getFieldDielectric_function_type getFieldDielectric_function_value( &::SireMove::OpenMMPMEFEP::getFieldDielectric ); + + OpenMMPMEFEP_exposer.def( + "getFieldDielectric" + , getFieldDielectric_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getForwardMetropolis + + typedef ::QVector< double > ( ::SireMove::OpenMMPMEFEP::*getForwardMetropolis_function_type)( ) ; + getForwardMetropolis_function_type getForwardMetropolis_function_value( &::SireMove::OpenMMPMEFEP::getForwardMetropolis ); + + OpenMMPMEFEP_exposer.def( + "getForwardMetropolis" + , getForwardMetropolis_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getFriction + + typedef ::SireUnits::Dimension::Time ( ::SireMove::OpenMMPMEFEP::*getFriction_function_type)( ) ; + getFriction_function_type getFriction_function_value( &::SireMove::OpenMMPMEFEP::getFriction ); + + OpenMMPMEFEP_exposer.def( + "getFriction" + , getFriction_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getGradients + + typedef ::QVector< double > ( ::SireMove::OpenMMPMEFEP::*getGradients_function_type)( ) ; + getGradients_function_type getGradients_function_value( &::SireMove::OpenMMPMEFEP::getGradients ); + + OpenMMPMEFEP_exposer.def( + "getGradients" + , getGradients_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getIntegrationTolerance + + typedef double ( ::SireMove::OpenMMPMEFEP::*getIntegrationTolerance_function_type)( ) ; + getIntegrationTolerance_function_type getIntegrationTolerance_function_value( &::SireMove::OpenMMPMEFEP::getIntegrationTolerance ); + + OpenMMPMEFEP_exposer.def( + "getIntegrationTolerance" + , getIntegrationTolerance_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getIntegrator + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*getIntegrator_function_type)( ) ; + getIntegrator_function_type getIntegrator_function_value( &::SireMove::OpenMMPMEFEP::getIntegrator ); + + OpenMMPMEFEP_exposer.def( + "getIntegrator" + , getIntegrator_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getMCBarostat + + typedef bool ( ::SireMove::OpenMMPMEFEP::*getMCBarostat_function_type)( ) ; + getMCBarostat_function_type getMCBarostat_function_value( &::SireMove::OpenMMPMEFEP::getMCBarostat ); + + OpenMMPMEFEP_exposer.def( + "getMCBarostat" + , getMCBarostat_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getMCBarostatFrequency + + typedef int ( ::SireMove::OpenMMPMEFEP::*getMCBarostatFrequency_function_type)( ) ; + getMCBarostatFrequency_function_type getMCBarostatFrequency_function_value( &::SireMove::OpenMMPMEFEP::getMCBarostatFrequency ); + + OpenMMPMEFEP_exposer.def( + "getMCBarostatFrequency" + , getMCBarostatFrequency_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getPlatform + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*getPlatform_function_type)( ) ; + getPlatform_function_type getPlatform_function_value( &::SireMove::OpenMMPMEFEP::getPlatform ); + + OpenMMPMEFEP_exposer.def( + "getPlatform" + , getPlatform_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getPotentialEnergy + + typedef ::SireUnits::Dimension::MolarEnergy ( ::SireMove::OpenMMPMEFEP::*getPotentialEnergy_function_type)( ::SireSystem::System const & ) ; + getPotentialEnergy_function_type getPotentialEnergy_function_value( &::SireMove::OpenMMPMEFEP::getPotentialEnergy ); + + OpenMMPMEFEP_exposer.def( + "getPotentialEnergy" + , getPotentialEnergy_function_value + , ( bp::arg("system") ) + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getPrecision + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*getPrecision_function_type)( ) ; + getPrecision_function_type getPrecision_function_value( &::SireMove::OpenMMPMEFEP::getPrecision ); + + OpenMMPMEFEP_exposer.def( + "getPrecision" + , getPrecision_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getPressure + + typedef ::SireUnits::Dimension::Pressure ( ::SireMove::OpenMMPMEFEP::*getPressure_function_type)( ) ; + getPressure_function_type getPressure_function_value( &::SireMove::OpenMMPMEFEP::getPressure ); + + OpenMMPMEFEP_exposer.def( + "getPressure" + , getPressure_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getRandomSeed + + typedef int ( ::SireMove::OpenMMPMEFEP::*getRandomSeed_function_type)( ) ; + getRandomSeed_function_type getRandomSeed_function_value( &::SireMove::OpenMMPMEFEP::getRandomSeed ); + + OpenMMPMEFEP_exposer.def( + "getRandomSeed" + , getRandomSeed_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getReducedPerturbedEnergies + + typedef ::QVector< QVector< double > > ( ::SireMove::OpenMMPMEFEP::*getReducedPerturbedEnergies_function_type)( ) ; + getReducedPerturbedEnergies_function_type getReducedPerturbedEnergies_function_value( &::SireMove::OpenMMPMEFEP::getReducedPerturbedEnergies ); + + OpenMMPMEFEP_exposer.def( + "getReducedPerturbedEnergies" + , getReducedPerturbedEnergies_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getRestraint + + typedef bool ( ::SireMove::OpenMMPMEFEP::*getRestraint_function_type)( ) ; + getRestraint_function_type getRestraint_function_value( &::SireMove::OpenMMPMEFEP::getRestraint ); + + OpenMMPMEFEP_exposer.def( + "getRestraint" + , getRestraint_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getShiftDelta + + typedef double ( ::SireMove::OpenMMPMEFEP::*getShiftDelta_function_type)( ) ; + getShiftDelta_function_type getShiftDelta_function_value( &::SireMove::OpenMMPMEFEP::getShiftDelta ); + + OpenMMPMEFEP_exposer.def( + "getShiftDelta" + , getShiftDelta_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getTemperature + + typedef ::SireUnits::Dimension::Temperature ( ::SireMove::OpenMMPMEFEP::*getTemperature_function_type)( ) ; + getTemperature_function_type getTemperature_function_value( &::SireMove::OpenMMPMEFEP::getTemperature ); + + OpenMMPMEFEP_exposer.def( + "getTemperature" + , getTemperature_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::getTimetoSkip + + typedef ::SireUnits::Dimension::Time ( ::SireMove::OpenMMPMEFEP::*getTimetoSkip_function_type)( ) ; + getTimetoSkip_function_type getTimetoSkip_function_value( &::SireMove::OpenMMPMEFEP::getTimetoSkip ); + + OpenMMPMEFEP_exposer.def( + "getTimetoSkip" + , getTimetoSkip_function_value + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::initialise + + typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_function_type)( ) ; + initialise_function_type initialise_function_value( &::SireMove::OpenMMPMEFEP::initialise ); + + OpenMMPMEFEP_exposer.def( + "initialise" + , initialise_function_value + , "\n initialises the openMM Free energy single topology calculation\n Initialise must be called before anything else happens.\n" ); + + } + { //::SireMove::OpenMMPMEFEP::integrate + + typedef void ( ::SireMove::OpenMMPMEFEP::*integrate_function_type)( ::SireMove::IntegratorWorkspace &,::SireCAS::Symbol const &,::SireUnits::Dimension::Time,int,bool ) ; + integrate_function_type integrate_function_value( &::SireMove::OpenMMPMEFEP::integrate ); + + OpenMMPMEFEP_exposer.def( + "integrate" + , integrate_function_value + , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , "\n Main integration methods for advancing dynamics\n Par:am workspace Sire Integrator workspace\n Par:am nrg_component\n Par:am timestep Default = 0.002. Integration timestep\n Par:am nmoves Number of moves\n Par:am record_stats boolean that tracks recording.\n" ); + + } + { //::SireMove::OpenMMPMEFEP::isTimeReversible + + typedef bool ( ::SireMove::OpenMMPMEFEP::*isTimeReversible_function_type)( ) const; + isTimeReversible_function_type isTimeReversible_function_value( &::SireMove::OpenMMPMEFEP::isTimeReversible ); + + OpenMMPMEFEP_exposer.def( + "isTimeReversible" + , isTimeReversible_function_value + , "Return whether or not this integrator is time-reversible" ); + + } + { //::SireMove::OpenMMPMEFEP::minimiseEnergy + + typedef ::SireSystem::System ( ::SireMove::OpenMMPMEFEP::*minimiseEnergy_function_type)( ::SireSystem::System &,double,int ) ; + minimiseEnergy_function_type minimiseEnergy_function_value( &::SireMove::OpenMMPMEFEP::minimiseEnergy ); + + OpenMMPMEFEP_exposer.def( + "minimiseEnergy" + , minimiseEnergy_function_value + , ( bp::arg("system"), bp::arg("tolerance"), bp::arg("max_iteration") ) + , "\n \n minimizeEnergy will find the nearest local potential energy minimum,\n given the current Sire::System. It calls the\n LocalEnergyMinimizer :: minimize() function of OpenMM.\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am tolerance Default = 1. This specifies how precisely the\n energy minimum must be located. Minimisation will be halted once the\n root-mean-square value of all force components reaches this tolerance.\n Par:am max_iteration Default = 1000. this specifies the number of\n iterations are run for the minimisation. If max_iteration = 0, the\n iteration will run until convergence.\n\n Return: Sire System, with the updated energy\n minimised coordinates.\n" ); + + } + OpenMMPMEFEP_exposer.def( bp::self != bp::self ); + { //::SireMove::OpenMMPMEFEP::operator= + + typedef ::SireMove::OpenMMPMEFEP & ( ::SireMove::OpenMMPMEFEP::*assign_function_type)( ::SireMove::OpenMMPMEFEP const & ) ; + assign_function_type assign_function_value( &::SireMove::OpenMMPMEFEP::operator= ); + + OpenMMPMEFEP_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + OpenMMPMEFEP_exposer.def( bp::self == bp::self ); + { //::SireMove::OpenMMPMEFEP::setAlchemicalArray + + typedef void ( ::SireMove::OpenMMPMEFEP::*setAlchemicalArray_function_type)( ::QVector< double > ) ; + setAlchemicalArray_function_type setAlchemicalArray_function_value( &::SireMove::OpenMMPMEFEP::setAlchemicalArray ); + + OpenMMPMEFEP_exposer.def( + "setAlchemicalArray" + , setAlchemicalArray_function_value + , ( bp::arg("arg0") ) + , "" ); + + } + { //::SireMove::OpenMMPMEFEP::setAlchemicalValue + + typedef void ( ::SireMove::OpenMMPMEFEP::*setAlchemicalValue_function_type)( double ) ; + setAlchemicalValue_function_type setAlchemicalValue_function_value( &::SireMove::OpenMMPMEFEP::setAlchemicalValue ); + + OpenMMPMEFEP_exposer.def( + "setAlchemicalValue" + , setAlchemicalValue_function_value + , ( bp::arg("arg0") ) + , "Set the alchemical value used to calculate the free energy change via TI method" ); + + } + { //::SireMove::OpenMMPMEFEP::setAndersen + + typedef void ( ::SireMove::OpenMMPMEFEP::*setAndersen_function_type)( bool ) ; + setAndersen_function_type setAndersen_function_value( &::SireMove::OpenMMPMEFEP::setAndersen ); + + OpenMMPMEFEP_exposer.def( + "setAndersen" + , setAndersen_function_value + , ( bp::arg("arg0") ) + , "Set Andersen thermostat" ); + + } + { //::SireMove::OpenMMPMEFEP::setAndersenFrequency + + typedef void ( ::SireMove::OpenMMPMEFEP::*setAndersenFrequency_function_type)( double ) ; + setAndersenFrequency_function_type setAndersenFrequency_function_value( &::SireMove::OpenMMPMEFEP::setAndersenFrequency ); + + OpenMMPMEFEP_exposer.def( + "setAndersenFrequency" + , setAndersenFrequency_function_value + , ( bp::arg("arg0") ) + , "Set the Andersen Thermostat frequency collision" ); + + } + { //::SireMove::OpenMMPMEFEP::setBufferFrequency + + typedef void ( ::SireMove::OpenMMPMEFEP::*setBufferFrequency_function_type)( int ) ; + setBufferFrequency_function_type setBufferFrequency_function_value( &::SireMove::OpenMMPMEFEP::setBufferFrequency ); + + OpenMMPMEFEP_exposer.def( + "setBufferFrequency" + , setBufferFrequency_function_value + , ( bp::arg("arg0") ) + , "Set the Center of Mass motion removal frequency" ); + + } + { //::SireMove::OpenMMPMEFEP::setCMMremovalFrequency + + typedef void ( ::SireMove::OpenMMPMEFEP::*setCMMremovalFrequency_function_type)( int ) ; + setCMMremovalFrequency_function_type setCMMremovalFrequency_function_value( &::SireMove::OpenMMPMEFEP::setCMMremovalFrequency ); + + OpenMMPMEFEP_exposer.def( + "setCMMremovalFrequency" + , setCMMremovalFrequency_function_value + , ( bp::arg("arg0") ) + , "Set the Center of Mass motion removal frequency" ); + + } + { //::SireMove::OpenMMPMEFEP::setCombiningRules + + typedef void ( ::SireMove::OpenMMPMEFEP::*setCombiningRules_function_type)( ::QString ) ; + setCombiningRules_function_type setCombiningRules_function_value( &::SireMove::OpenMMPMEFEP::setCombiningRules ); + + OpenMMPMEFEP_exposer.def( + "setCombiningRules" + , setCombiningRules_function_value + , ( bp::arg("arg0") ) + , "Set the combining rules type: arithmetic, geometric" ); + + } + { //::SireMove::OpenMMPMEFEP::setConstraintType + + typedef void ( ::SireMove::OpenMMPMEFEP::*setConstraintType_function_type)( ::QString ) ; + setConstraintType_function_type setConstraintType_function_value( &::SireMove::OpenMMPMEFEP::setConstraintType ); + + OpenMMPMEFEP_exposer.def( + "setConstraintType" + , setConstraintType_function_value + , ( bp::arg("arg0") ) + , "Set the Constraint type: none, hbonds, allbonds, hangles" ); + + } + { //::SireMove::OpenMMPMEFEP::setCoulombPower + + typedef void ( ::SireMove::OpenMMPMEFEP::*setCoulombPower_function_type)( float ) ; + setCoulombPower_function_type setCoulombPower_function_value( &::SireMove::OpenMMPMEFEP::setCoulombPower ); + + OpenMMPMEFEP_exposer.def( + "setCoulombPower" + , setCoulombPower_function_value + , ( bp::arg("arg0") ) + , "Set the coulomb power used in the soft core potential" ); + + } + { //::SireMove::OpenMMPMEFEP::setCutoffDistance + + typedef void ( ::SireMove::OpenMMPMEFEP::*setCutoffDistance_function_type)( ::SireUnits::Dimension::Length ) ; + setCutoffDistance_function_type setCutoffDistance_function_value( &::SireMove::OpenMMPMEFEP::setCutoffDistance ); + + OpenMMPMEFEP_exposer.def( + "setCutoffDistance" + , setCutoffDistance_function_value + , ( bp::arg("arg0") ) + , "Set the cutoff distance in A" ); + + } + { //::SireMove::OpenMMPMEFEP::setCutoffType + + typedef void ( ::SireMove::OpenMMPMEFEP::*setCutoffType_function_type)( ::QString ) ; + setCutoffType_function_type setCutoffType_function_value( &::SireMove::OpenMMPMEFEP::setCutoffType ); + + OpenMMPMEFEP_exposer.def( + "setCutoffType" + , setCutoffType_function_value + , ( bp::arg("arg0") ) + , "Set the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic" ); + + } + { //::SireMove::OpenMMPMEFEP::setDeltatAlchemical + + typedef void ( ::SireMove::OpenMMPMEFEP::*setDeltatAlchemical_function_type)( double ) ; + setDeltatAlchemical_function_type setDeltatAlchemical_function_value( &::SireMove::OpenMMPMEFEP::setDeltatAlchemical ); + + OpenMMPMEFEP_exposer.def( + "setDeltatAlchemical" + , setDeltatAlchemical_function_value + , ( bp::arg("arg0") ) + , "\n Set the delta alchemical used in the FEP method\n Par:am deltaalchemical\n" ); + + } + { //::SireMove::OpenMMPMEFEP::setDeviceIndex + + typedef void ( ::SireMove::OpenMMPMEFEP::*setDeviceIndex_function_type)( ::QString ) ; + setDeviceIndex_function_type setDeviceIndex_function_value( &::SireMove::OpenMMPMEFEP::setDeviceIndex ); + + OpenMMPMEFEP_exposer.def( + "setDeviceIndex" + , setDeviceIndex_function_value + , ( bp::arg("arg0") ) + , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); + + } + { //::SireMove::OpenMMPMEFEP::setEnergyFrequency + + typedef void ( ::SireMove::OpenMMPMEFEP::*setEnergyFrequency_function_type)( int ) ; + setEnergyFrequency_function_type setEnergyFrequency_function_value( &::SireMove::OpenMMPMEFEP::setEnergyFrequency ); + + OpenMMPMEFEP_exposer.def( + "setEnergyFrequency" + , setEnergyFrequency_function_value + , ( bp::arg("arg0") ) + , "Set the Center of Mass motion removal frequency" ); + + } + { //::SireMove::OpenMMPMEFEP::setFieldDielectric + + typedef void ( ::SireMove::OpenMMPMEFEP::*setFieldDielectric_function_type)( double ) ; + setFieldDielectric_function_type setFieldDielectric_function_value( &::SireMove::OpenMMPMEFEP::setFieldDielectric ); + + OpenMMPMEFEP_exposer.def( + "setFieldDielectric" + , setFieldDielectric_function_value + , ( bp::arg("arg0") ) + , "Set the dielectric constant" ); + + } + { //::SireMove::OpenMMPMEFEP::setFriction + + typedef void ( ::SireMove::OpenMMPMEFEP::*setFriction_function_type)( ::SireUnits::Dimension::Time ) ; + setFriction_function_type setFriction_function_value( &::SireMove::OpenMMPMEFEP::setFriction ); + + OpenMMPMEFEP_exposer.def( + "setFriction" + , setFriction_function_value + , ( bp::arg("arg0") ) + , "Set the friction used in specific Integrator type" ); + + } + { //::SireMove::OpenMMPMEFEP::setIntegrationTolerance + + typedef void ( ::SireMove::OpenMMPMEFEP::*setIntegrationTolerance_function_type)( double ) ; + setIntegrationTolerance_function_type setIntegrationTolerance_function_value( &::SireMove::OpenMMPMEFEP::setIntegrationTolerance ); + + OpenMMPMEFEP_exposer.def( + "setIntegrationTolerance" + , setIntegrationTolerance_function_value + , ( bp::arg("tollerance") ) + , "Set the integration tolerance" ); + + } + { //::SireMove::OpenMMPMEFEP::setIntegrator + + typedef void ( ::SireMove::OpenMMPMEFEP::*setIntegrator_function_type)( ::QString ) ; + setIntegrator_function_type setIntegrator_function_value( &::SireMove::OpenMMPMEFEP::setIntegrator ); + + OpenMMPMEFEP_exposer.def( + "setIntegrator" + , setIntegrator_function_value + , ( bp::arg("arg0") ) + , "Set the Integrator type" ); + + } + { //::SireMove::OpenMMPMEFEP::setMCBarostat + + typedef void ( ::SireMove::OpenMMPMEFEP::*setMCBarostat_function_type)( bool ) ; + setMCBarostat_function_type setMCBarostat_function_value( &::SireMove::OpenMMPMEFEP::setMCBarostat ); + + OpenMMPMEFEP_exposer.def( + "setMCBarostat" + , setMCBarostat_function_value + , ( bp::arg("arg0") ) + , "Set Monte Carlo Barostat onoff" ); + + } + { //::SireMove::OpenMMPMEFEP::setMCBarostatFrequency + + typedef void ( ::SireMove::OpenMMPMEFEP::*setMCBarostatFrequency_function_type)( int ) ; + setMCBarostatFrequency_function_type setMCBarostatFrequency_function_value( &::SireMove::OpenMMPMEFEP::setMCBarostatFrequency ); + + OpenMMPMEFEP_exposer.def( + "setMCBarostatFrequency" + , setMCBarostatFrequency_function_value + , ( bp::arg("arg0") ) + , "Set the Monte Carlo Barostat frequency in time speps" ); + + } + { //::SireMove::OpenMMPMEFEP::setPlatform + + typedef void ( ::SireMove::OpenMMPMEFEP::*setPlatform_function_type)( ::QString ) ; + setPlatform_function_type setPlatform_function_value( &::SireMove::OpenMMPMEFEP::setPlatform ); + + OpenMMPMEFEP_exposer.def( + "setPlatform" + , setPlatform_function_value + , ( bp::arg("arg0") ) + , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); + + } + { //::SireMove::OpenMMPMEFEP::setPrecision + + typedef void ( ::SireMove::OpenMMPMEFEP::*setPrecision_function_type)( ::QString ) ; + setPrecision_function_type setPrecision_function_value( &::SireMove::OpenMMPMEFEP::setPrecision ); + + OpenMMPMEFEP_exposer.def( + "setPrecision" + , setPrecision_function_value + , ( bp::arg("arg0") ) + , "Set the OpenMM Precision" ); + + } + { //::SireMove::OpenMMPMEFEP::setPressure + + typedef void ( ::SireMove::OpenMMPMEFEP::*setPressure_function_type)( ::SireUnits::Dimension::Pressure ) ; + setPressure_function_type setPressure_function_value( &::SireMove::OpenMMPMEFEP::setPressure ); + + OpenMMPMEFEP_exposer.def( + "setPressure" + , setPressure_function_value + , ( bp::arg("arg0") ) + , "Set the Pressure" ); + + } + { //::SireMove::OpenMMPMEFEP::setRandomSeed + + typedef void ( ::SireMove::OpenMMPMEFEP::*setRandomSeed_function_type)( int ) ; + setRandomSeed_function_type setRandomSeed_function_value( &::SireMove::OpenMMPMEFEP::setRandomSeed ); + + OpenMMPMEFEP_exposer.def( + "setRandomSeed" + , setRandomSeed_function_value + , ( bp::arg("arg0") ) + , "Set the Integrator random seed" ); + + } + { //::SireMove::OpenMMPMEFEP::setReinitialiseContext + + typedef void ( ::SireMove::OpenMMPMEFEP::*setReinitialiseContext_function_type)( bool ) ; + setReinitialiseContext_function_type setReinitialiseContext_function_value( &::SireMove::OpenMMPMEFEP::setReinitialiseContext ); + + OpenMMPMEFEP_exposer.def( + "setReinitialiseContext" + , setReinitialiseContext_function_value + , ( bp::arg("arg0") ) + , "Set the flag to reinitialise the context" ); + + } + { //::SireMove::OpenMMPMEFEP::setRestraint + + typedef void ( ::SireMove::OpenMMPMEFEP::*setRestraint_function_type)( bool ) ; + setRestraint_function_type setRestraint_function_value( &::SireMove::OpenMMPMEFEP::setRestraint ); + + OpenMMPMEFEP_exposer.def( + "setRestraint" + , setRestraint_function_value + , ( bp::arg("arg0") ) + , "Set the Retraint mode" ); + + } + { //::SireMove::OpenMMPMEFEP::setShiftDelta + + typedef void ( ::SireMove::OpenMMPMEFEP::*setShiftDelta_function_type)( double ) ; + setShiftDelta_function_type setShiftDelta_function_value( &::SireMove::OpenMMPMEFEP::setShiftDelta ); + + OpenMMPMEFEP_exposer.def( + "setShiftDelta" + , setShiftDelta_function_value + , ( bp::arg("arg0") ) + , "\n \n Par:am shiftdelta\n" ); + + } + { //::SireMove::OpenMMPMEFEP::setTemperature + + typedef void ( ::SireMove::OpenMMPMEFEP::*setTemperature_function_type)( ::SireUnits::Dimension::Temperature ) ; + setTemperature_function_type setTemperature_function_value( &::SireMove::OpenMMPMEFEP::setTemperature ); + + OpenMMPMEFEP_exposer.def( + "setTemperature" + , setTemperature_function_value + , ( bp::arg("arg0") ) + , "Set the Temperature" ); + + } + { //::SireMove::OpenMMPMEFEP::setTimetoSkip + + typedef void ( ::SireMove::OpenMMPMEFEP::*setTimetoSkip_function_type)( ::SireUnits::Dimension::Time ) ; + setTimetoSkip_function_type setTimetoSkip_function_value( &::SireMove::OpenMMPMEFEP::setTimetoSkip ); + + OpenMMPMEFEP_exposer.def( + "setTimetoSkip" + , setTimetoSkip_function_value + , ( bp::arg("arg0") ) + , "Get total time to skip" ); + + } + { //::SireMove::OpenMMPMEFEP::toString + + typedef ::QString ( ::SireMove::OpenMMPMEFEP::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMove::OpenMMPMEFEP::toString ); + + OpenMMPMEFEP_exposer.def( + "toString" + , toString_function_value + , "Return a string representation of this integrator" ); + + } + { //::SireMove::OpenMMPMEFEP::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMove::OpenMMPMEFEP::typeName ); + + OpenMMPMEFEP_exposer.def( + "typeName" + , typeName_function_value + , "" ); + + } + OpenMMPMEFEP_exposer.staticmethod( "typeName" ); + OpenMMPMEFEP_exposer.def( "__copy__", &__copy__); + OpenMMPMEFEP_exposer.def( "__deepcopy__", &__copy__); + OpenMMPMEFEP_exposer.def( "clone", &__copy__); + OpenMMPMEFEP_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMove::OpenMMPMEFEP >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + OpenMMPMEFEP_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMove::OpenMMPMEFEP >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + OpenMMPMEFEP_exposer.def( "__str__", &__str__< ::SireMove::OpenMMPMEFEP > ); + OpenMMPMEFEP_exposer.def( "__repr__", &__str__< ::SireMove::OpenMMPMEFEP > ); + } + +} diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.hpp b/wrapper/Move/OpenMMPMEFEP.pypp.hpp new file mode 100644 index 000000000..8c2d82fb5 --- /dev/null +++ b/wrapper/Move/OpenMMPMEFEP.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef OpenMMPMEFEP_hpp__pyplusplus_wrapper +#define OpenMMPMEFEP_hpp__pyplusplus_wrapper + +void register_OpenMMPMEFEP_class(); + +#endif//OpenMMPMEFEP_hpp__pyplusplus_wrapper diff --git a/wrapper/Move/Simulation.pypp.cpp b/wrapper/Move/Simulation.pypp.cpp index 7aa4a26ad..29d59548b 100644 --- a/wrapper/Move/Simulation.pypp.cpp +++ b/wrapper/Move/Simulation.pypp.cpp @@ -217,7 +217,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread" ); + , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread" ); } { //::SireMove::Simulation::run @@ -229,7 +229,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("nmoves_per_chunk"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); + , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); } { //::SireMove::Simulation::run @@ -301,7 +301,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("node"), bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); + , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); } { //::SireMove::Simulation::run @@ -313,7 +313,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("node"), bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("nmoves_per_chunk"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); + , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); } { //::SireMove::Simulation::run diff --git a/wrapper/Move/SireMove_properties.cpp b/wrapper/Move/SireMove_properties.cpp index b7c824fdf..e60f07b3f 100644 --- a/wrapper/Move/SireMove_properties.cpp +++ b/wrapper/Move/SireMove_properties.cpp @@ -4,13 +4,20 @@ #include "Base/convertproperty.hpp" #include "SireMove_properties.h" -#include "SireError/errors.h" -#include "SireID/index.h" +#include "SireCAS/symbol.h" +#include "SireMol/atomelements.h" +#include "SireMol/atommasses.h" +#include "SireMol/atomvelocities.h" +#include "SireMol/moleculedata.h" +#include "SireMol/moleculeinfodata.h" +#include "SireMol/moleculeview.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "supramoves.h" -#include "suprasystem.h" -#include "supramoves.h" +#include "SireUnits/dimensions.h" +#include "SireUnits/temperature.h" +#include "SireUnits/units.h" +#include "velocitygenerator.h" +#include "velocitygenerator.h" #include "SireError/errors.h" #include "SireID/index.h" #include "SireStream/datastream.h" @@ -21,42 +28,17 @@ #include "simstore.h" #include "suprasystem.h" #include "suprasystem.h" +#include "SireMaths/quaternion.h" #include "SireMol/molecule.h" #include "SireMol/partialmolecule.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" #include "SireSystem/system.h" -#include "sampler.h" -#include "uniformsampler.h" -#include "sampler.h" -#include "SireError/errors.h" -#include "SireMaths/rangenerator.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireSystem/system.h" -#include "SireUnits/temperature.h" +#include "SireUnits/dimensions.h" #include "SireUnits/units.h" -#include "ensemble.h" -#include "move.h" -#include -#include "move.h" -#include "SireError/errors.h" -#include "SireMaths/vector.h" -#include "SireMol/atom.h" -#include "SireMol/atomcoords.h" -#include "SireMol/evaluator.h" -#include "SireMol/moleculeview.h" -#include "SireMol/mover.hpp" -#include "SireMol/selector.hpp" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "getpoint.h" -#include -#include "getpoint.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "suprasubsystem.h" -#include "suprasubsystem.h" +#include "SireVol/space.h" +#include "molinserter.h" +#include "molinserter.h" #include "SireCAS/symbol.h" #include "SireFF/forcefields.h" #include "SireFF/forcetable.h" @@ -69,55 +51,23 @@ #include "integrator.h" #include "integratorworkspace.h" #include "integrator.h" -#include "SireMaths/quaternion.h" -#include "SireMol/molecule.h" -#include "SireMol/partialmolecule.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireSystem/system.h" -#include "SireUnits/dimensions.h" -#include "SireUnits/units.h" -#include "SireVol/space.h" -#include "molinserter.h" -#include "molinserter.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "suprasubmove.h" #include "suprasubsystem.h" -#include "suprasubmove.h" -#include "SireCAS/symbol.h" -#include "SireMol/atomelements.h" -#include "SireMol/atommasses.h" -#include "SireMol/atomvelocities.h" -#include "SireMol/moleculedata.h" -#include "SireMol/moleculeinfodata.h" -#include "SireMol/moleculeview.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireUnits/dimensions.h" -#include "SireUnits/temperature.h" -#include "SireUnits/units.h" -#include "velocitygenerator.h" -#include "velocitygenerator.h" +#include "suprasubsystem.h" #include "SireError/errors.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" #include "suprasubmoves.h" #include "suprasubsystem.h" #include "suprasubmoves.h" -#include "SireMol/molecule.h" -#include "SireMol/moleculegroup.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireSystem/system.h" -#include "moldeleter.h" -#include "uniformsampler.h" -#include "moldeleter.h" +#include "SireError/errors.h" +#include "SireID/index.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "supramove.h" +#include "supramoves.h" #include "suprasystem.h" -#include "supramove.h" +#include "supramoves.h" #include "SireError/errors.h" #include "SireMaths/rangenerator.h" #include "SireStream/datastream.h" @@ -135,20 +85,70 @@ #include #include #include "moves.h" +#include "SireMol/molecule.h" +#include "SireMol/partialmolecule.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireSystem/system.h" +#include "sampler.h" +#include "uniformsampler.h" +#include "sampler.h" +#include "SireError/errors.h" +#include "SireMaths/rangenerator.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireSystem/system.h" +#include "SireUnits/temperature.h" +#include "SireUnits/units.h" +#include "ensemble.h" +#include "move.h" +#include +#include "move.h" +#include "SireError/errors.h" +#include "SireMaths/vector.h" +#include "SireMol/atom.h" +#include "SireMol/atomcoords.h" +#include "SireMol/evaluator.h" +#include "SireMol/moleculeview.h" +#include "SireMol/mover.hpp" +#include "SireMol/selector.hpp" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "getpoint.h" +#include +#include "getpoint.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "supramove.h" +#include "suprasystem.h" +#include "supramove.h" +#include "SireMol/molecule.h" +#include "SireMol/moleculegroup.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireSystem/system.h" +#include "moldeleter.h" +#include "uniformsampler.h" +#include "moldeleter.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "suprasubmove.h" +#include "suprasubsystem.h" +#include "suprasubmove.h" void register_SireMove_properties() { - register_property_container< SireMove::SupraMovesPtr, SireMove::SupraMoves >(); + register_property_container< SireMove::VelGenPtr, SireMove::VelocityGenerator >(); register_property_container< SireMove::SupraSystemPtr, SireMove::SupraSystem >(); + register_property_container< SireMove::MolInserterPtr, SireMove::MolInserter >(); + register_property_container< SireMove::IntegratorPtr, SireMove::Integrator >(); + register_property_container< SireMove::SupraSubSystemPtr, SireMove::SupraSubSystem >(); + register_property_container< SireMove::SupraSubMovesPtr, SireMove::SupraSubMoves >(); + register_property_container< SireMove::SupraMovesPtr, SireMove::SupraMoves >(); + register_property_container< SireMove::MovesPtr, SireMove::Moves >(); register_property_container< SireMove::SamplerPtr, SireMove::Sampler >(); register_property_container< SireMove::MovePtr, SireMove::Move >(); register_property_container< SireMove::GetPointPtr, SireMove::GetPoint >(); - register_property_container< SireMove::SupraSubSystemPtr, SireMove::SupraSubSystem >(); - register_property_container< SireMove::IntegratorPtr, SireMove::Integrator >(); - register_property_container< SireMove::MolInserterPtr, SireMove::MolInserter >(); - register_property_container< SireMove::SupraSubMovePtr, SireMove::SupraSubMove >(); - register_property_container< SireMove::VelGenPtr, SireMove::VelocityGenerator >(); - register_property_container< SireMove::SupraSubMovesPtr, SireMove::SupraSubMoves >(); - register_property_container< SireMove::MolDeleterPtr, SireMove::MolDeleter >(); register_property_container< SireMove::SupraMovePtr, SireMove::SupraMove >(); - register_property_container< SireMove::MovesPtr, SireMove::Moves >(); + register_property_container< SireMove::MolDeleterPtr, SireMove::MolDeleter >(); + register_property_container< SireMove::SupraSubMovePtr, SireMove::SupraSubMove >(); } diff --git a/wrapper/Move/SireMove_registrars.cpp b/wrapper/Move/SireMove_registrars.cpp index a76e114af..41ca0965f 100644 --- a/wrapper/Move/SireMove_registrars.cpp +++ b/wrapper/Move/SireMove_registrars.cpp @@ -5,126 +5,129 @@ #include "Helpers/version_error_impl.h" -#include "supramoves.h" +#include "titrationmove.h" +#include "volumechanger.h" +#include "replicas.h" +#include "internalmove.h" +#include "suprasimpacket.h" +#include "internalmovesingle.h" +#include "velocitygenerator.h" #include "repexmove.h" #include "suprasystem.h" -#include "rbworkspacejm.h" +#include "suprasubsimpacket.h" #include "integratorworkspace.h" -#include "openmmmdintegrator.h" -#include "move.h" -#include "volumemove.h" +#include "molinserter.h" +#include "integrator.h" +#include "mtsmc.h" +#include "suprasubsystem.h" +#include "suprasubmoves.h" #include "repexmove2.h" -#include "openmmfrenergydt.h" -#include "integratorworkspacejm.h" -#include "getpoint.h" +#include "moleculardynamics.h" +#include "supramoves.h" +#include "rbworkspacejm.h" +#include "rigidbodymc.h" +#include "zmatrix.h" +#include "openmmmdintegrator.h" #include "flexibility.h" -#include "hybridmc.h" +#include "openmmfrenergyst.h" +#include "zmatmove.h" +#include "moves.h" +#include "move.h" #include "simstore.h" -#include "replicas.h" #include "uniformsampler.h" +#include "ensemble.h" +#include "simpacket.h" +#include "openmmfrenergydt.h" +#include "getpoint.h" +#include "replica.h" +#include "volumemove.h" #include "dlmrigidbody.h" +#include "supramove.h" #include "velocityverlet.h" -#include "internalmove.h" -#include "suprasubsystem.h" -#include "mtsmc.h" -#include "integrator.h" +#include "moldeleter.h" +#include "suprasubmove.h" #include "titrator.h" -#include "openmmfrenergyst.h" -#include "molinserter.h" #include "rbworkspace.h" -#include "suprasubsimpacket.h" -#include "suprasubmove.h" -#include "weightedmoves.h" -#include "velocitygenerator.h" +#include "hybridmc.h" +#include "integratorworkspacejm.h" #include "prefsampler.h" -#include "suprasimpacket.h" -#include "volumechanger.h" -#include "simpacket.h" -#include "suprasubmoves.h" -#include "moldeleter.h" -#include "ensemble.h" -#include "titrationmove.h" -#include "rigidbodymc.h" -#include "replica.h" -#include "zmatmove.h" -#include "internalmovesingle.h" -#include "zmatrix.h" -#include "supramove.h" -#include "moleculardynamics.h" -#include "moves.h" +#include "weightedmoves.h" +#include "openmmpmefep.h" #include "Helpers/objectregistry.hpp" void register_SireMove_objects() { - ObjectRegistry::registerConverterFor< SireMove::SameSupraMoves >(); + ObjectRegistry::registerConverterFor< SireMove::TitrationMove >(); + ObjectRegistry::registerConverterFor< SireMove::NullVolumeChanger >(); + ObjectRegistry::registerConverterFor< SireMove::ScaleVolumeFromCenter >(); + ObjectRegistry::registerConverterFor< SireMove::Replicas >(); + ObjectRegistry::registerConverterFor< SireMove::InternalMove >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSimPacket >(); + ObjectRegistry::registerConverterFor< SireMove::InternalMoveSingle >(); + ObjectRegistry::registerConverterFor< SireMove::NullVelocityGenerator >(); + ObjectRegistry::registerConverterFor< SireMove::VelocitiesFromProperty >(); + ObjectRegistry::registerConverterFor< SireMove::MaxwellBoltzmann >(); ObjectRegistry::registerConverterFor< SireMove::RepExMove >(); ObjectRegistry::registerConverterFor< SireMove::RepExSubMove >(); ObjectRegistry::registerConverterFor< SireMove::SupraSystem >(); - ObjectRegistry::registerConverterFor< SireMove::RBWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSubSimPacket >(); ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspace >(); ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspace >(); + ObjectRegistry::registerConverterFor< SireMove::NullInserter >(); + ObjectRegistry::registerConverterFor< SireMove::UniformInserter >(); + ObjectRegistry::registerConverterFor< SireMove::NullIntegrator >(); + ObjectRegistry::registerConverterFor< SireMove::MTSMC >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSubSystem >(); + ObjectRegistry::registerConverterFor< SireMove::SameSupraSubMoves >(); + ObjectRegistry::registerConverterFor< SireMove::RepExMove2 >(); + ObjectRegistry::registerConverterFor< SireMove::MolecularDynamics >(); + ObjectRegistry::registerConverterFor< SireMove::SameSupraMoves >(); + ObjectRegistry::registerConverterFor< SireMove::RBWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::RigidBodyMC >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrix >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrixLine >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoords >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoordsLine >(); ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); + ObjectRegistry::registerConverterFor< SireMove::DofID >(); + ObjectRegistry::registerConverterFor< SireMove::Flexibility >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatMove >(); + ObjectRegistry::registerConverterFor< SireMove::SameMoves >(); ObjectRegistry::registerConverterFor< SireMove::NullMove >(); - ObjectRegistry::registerConverterFor< SireMove::VolumeMove >(); - ObjectRegistry::registerConverterFor< SireMove::RepExMove2 >(); + ObjectRegistry::registerConverterFor< SireMove::SimStore >(); + ObjectRegistry::registerConverterFor< SireMove::UniformSampler >(); + ObjectRegistry::registerConverterFor< SireMove::Ensemble >(); + ObjectRegistry::registerConverterFor< SireMove::SimPacket >(); ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); - ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspaceJM >(); - ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspaceJM >(); ObjectRegistry::registerConverterFor< SireMove::NullGetPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCOMPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCOGPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCentroidPoint >(); - ObjectRegistry::registerConverterFor< SireMove::DofID >(); - ObjectRegistry::registerConverterFor< SireMove::Flexibility >(); - ObjectRegistry::registerConverterFor< SireMove::HybridMC >(); - ObjectRegistry::registerConverterFor< SireMove::HMCGenerator >(); - ObjectRegistry::registerConverterFor< SireMove::SimStore >(); - ObjectRegistry::registerConverterFor< SireMove::Replicas >(); - ObjectRegistry::registerConverterFor< SireMove::UniformSampler >(); + ObjectRegistry::registerConverterFor< SireMove::Replica >(); + ObjectRegistry::registerConverterFor< SireMove::VolumeMove >(); ObjectRegistry::registerConverterFor< SireMove::DLMRigidBody >(); + ObjectRegistry::registerConverterFor< SireMove::NullSupraMove >(); ObjectRegistry::registerConverterFor< SireMove::VelocityVerlet >(); - ObjectRegistry::registerConverterFor< SireMove::InternalMove >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSubSystem >(); - ObjectRegistry::registerConverterFor< SireMove::MTSMC >(); - ObjectRegistry::registerConverterFor< SireMove::NullIntegrator >(); - ObjectRegistry::registerConverterFor< SireMove::Titrator >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); - ObjectRegistry::registerConverterFor< SireMove::NullInserter >(); - ObjectRegistry::registerConverterFor< SireMove::UniformInserter >(); - ObjectRegistry::registerConverterFor< SireMove::RBWorkspace >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSubSimPacket >(); - ObjectRegistry::registerConverterFor< SireMove::NullSupraSubMove >(); - ObjectRegistry::registerConverterFor< SireMove::WeightedMoves >(); - ObjectRegistry::registerConverterFor< SireMove::NullVelocityGenerator >(); - ObjectRegistry::registerConverterFor< SireMove::VelocitiesFromProperty >(); - ObjectRegistry::registerConverterFor< SireMove::MaxwellBoltzmann >(); - ObjectRegistry::registerConverterFor< SireMove::PrefSampler >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSimPacket >(); - ObjectRegistry::registerConverterFor< SireMove::NullVolumeChanger >(); - ObjectRegistry::registerConverterFor< SireMove::ScaleVolumeFromCenter >(); - ObjectRegistry::registerConverterFor< SireMove::SimPacket >(); - ObjectRegistry::registerConverterFor< SireMove::SameSupraSubMoves >(); ObjectRegistry::registerConverterFor< SireMove::NullDeleter >(); ObjectRegistry::registerConverterFor< SireMove::SpecifiedGroupsDeleter >(); ObjectRegistry::registerConverterFor< SireMove::SystemWideDeleter >(); - ObjectRegistry::registerConverterFor< SireMove::Ensemble >(); - ObjectRegistry::registerConverterFor< SireMove::TitrationMove >(); - ObjectRegistry::registerConverterFor< SireMove::RigidBodyMC >(); - ObjectRegistry::registerConverterFor< SireMove::Replica >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatMove >(); - ObjectRegistry::registerConverterFor< SireMove::InternalMoveSingle >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrix >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrixLine >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoords >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoordsLine >(); - ObjectRegistry::registerConverterFor< SireMove::NullSupraMove >(); - ObjectRegistry::registerConverterFor< SireMove::MolecularDynamics >(); - ObjectRegistry::registerConverterFor< SireMove::SameMoves >(); + ObjectRegistry::registerConverterFor< SireMove::NullSupraSubMove >(); + ObjectRegistry::registerConverterFor< SireMove::Titrator >(); + ObjectRegistry::registerConverterFor< SireMove::RBWorkspace >(); + ObjectRegistry::registerConverterFor< SireMove::HybridMC >(); + ObjectRegistry::registerConverterFor< SireMove::HMCGenerator >(); + ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::PrefSampler >(); + ObjectRegistry::registerConverterFor< SireMove::WeightedMoves >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); } diff --git a/wrapper/Move/_Move.main.cpp b/wrapper/Move/_Move.main.cpp index 1f31b7fa4..a057cf88f 100644 --- a/wrapper/Move/_Move.main.cpp +++ b/wrapper/Move/_Move.main.cpp @@ -77,6 +77,8 @@ #include "OpenMMMDIntegrator.pypp.hpp" +#include "OpenMMPMEFEP.pypp.hpp" + #include "PrefSampler.pypp.hpp" #include "RBWorkspaceJM.pypp.hpp" @@ -254,6 +256,8 @@ BOOST_PYTHON_MODULE(_Move){ register_OpenMMMDIntegrator_class(); + register_OpenMMPMEFEP_class(); + register_Sampler_class(); register_PrefSampler_class(); diff --git a/wrapper/Move/active_headers.h b/wrapper/Move/active_headers.h index 411f57393..a7f47bf11 100644 --- a/wrapper/Move/active_headers.h +++ b/wrapper/Move/active_headers.h @@ -24,6 +24,7 @@ #include "openmmfrenergydt.h" #include "openmmfrenergyst.h" #include "openmmmdintegrator.h" +#include "openmmpmefep.h" #include "prefsampler.h" #include "rbworkspace.h" #include "rbworkspacejm.h" From d8629a07f672817a1d5a5893e7a20c34b70db0f9 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 21 Jan 2022 10:25:44 +0000 Subject: [PATCH 003/148] set -D_GLIBCXX_USE_CXX11_ABI=1 as all newer version of OpenMM seem to adhere to the new ABI --- corelib/CMakeLists.txt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/corelib/CMakeLists.txt b/corelib/CMakeLists.txt index 7e1954d74..599a3b05e 100644 --- a/corelib/CMakeLists.txt +++ b/corelib/CMakeLists.txt @@ -566,9 +566,7 @@ if ( ${SIRE_CXX_COMPILER_ID} MATCHES "GNU" ) if (MSYS) message(STATUS "MSYS2 will use builtin OpenMM if available...") else() - # OpenMM with conda uses the old C++ binary API! - # Tell GCC 5 to respect the old API - set( SIRE_PLATFORM_FLAGS "${SIRE_PLATFORM_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=0" ) + set( SIRE_PLATFORM_FLAGS "${SIRE_PLATFORM_FLAGS} -D_GLIBCXX_USE_CXX11_ABI=1" ) endif() endif() From 87a2d8e5482f837c0947a350f97ee63ebfc42239 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 21 Jan 2022 10:28:12 +0000 Subject: [PATCH 004/148] beautified (black) and made as PEP8 compliant as possible --- wrapper/Tools/OpenMMMD.py | 1546 +++++++++++++++++++++++++------------ 1 file changed, 1063 insertions(+), 483 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 32d8f84c7..b76e32d68 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1,18 +1,6 @@ -#################################################################################################### -# # -# RUN SCRIPT to perform an MD simulation in Sire with OpenMM # -# # -# author: Julien Michel # -# author: Gaetano Calabro # -# author: Antonia Mey # -# # -#################################################################################################### - -#################################################################################################### -# -# IMPORTS -# -#################################################################################################### +"""RUN SCRIPT to perform an MD simulation in Sire with OpenMM + +""" import os import re @@ -20,7 +8,8 @@ from Sire.Base import * -# Make sure that the OPENMM_PLUGIN_DIR enviroment variable is set correctly if unset. +# Make sure that the OPENMM_PLUGIN_DIR enviroment variable is set correctly if +# unset. try: # The user has already set the plugin location. os.environ["OPENMM_PLUGIN_DIR"] @@ -28,6 +17,7 @@ # Set to the default location of the bundled OpenMM package. os.environ["OPENMM_PLUGIN_DIR"] = getLibDir() + "/plugins" +# FIXME: star imports... from Sire.IO import * from Sire.Mol import * from Sire.CAS import * @@ -48,186 +38,376 @@ import time import numpy as np +__author__ = 'Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler' +__version__ = '0.1' +__license__ = 'GPL' +__maintainer__ = 'Julien Michel' +__email__ = 'julien.michel@ed.ac.uk' +__status__ = 'Development' -MIN_MASSES = {'C': 5.96, 'N': 7.96} +MIN_MASSES = {"C": 5.96, "N": 7.96} HMR_MIN = 1.0 HMR_MAX = 4.0 -#################################################################################################### +############################################################################### # # Config file parameters # -#################################################################################################### -gpu = Parameter("gpu", 0, """The device ID of the GPU on which to run the simulation.""") +############################################################################### +gpu = Parameter( + "gpu", 0, """The device ID of the GPU on which to run the simulation.""" +) -rf_dielectric = Parameter("reaction field dielectric", 78.3, - """Dielectric constant to use if the reaction field cutoff method is used.""") +rf_dielectric = Parameter( + "reaction field dielectric", + 78.3, + "Dielectric constant to use if the reaction field cutoff method is used." +) -temperature = Parameter("temperature", 25 * celsius, """Simulation temperature""") +temperature = Parameter( + "temperature", 25 * celsius, """Simulation temperature""" +) pressure = Parameter("pressure", 1 * atm, """Simulation pressure""") -topfile = Parameter("topfile", "SYSTEM.top", - """File name of the topology file containing the system to be simulated.""") - -crdfile = Parameter("crdfile", "SYSTEM.crd", - """File name of the coordinate file containing the coordinates of the - system to be simulated.""") - -s3file = Parameter("s3file", "SYSTEM.s3", - """Filename for the system state file. The system state after topology and and coordinates - were loaded are saved in this file.""") - -restart_file = Parameter("restart file", "sim_restart.s3", - """Filename of the restart file to use to save progress during the simulation.""") - -dcd_root = Parameter("dcd root", "traj", """Root of the filename of the output DCD trajectory files.""") - -nmoves = Parameter("nmoves", 1000, """Number of Molecular Dynamics moves to be performed during the simulation.""") - -debug_seed = Parameter("debug seed", 0, """Debugging seed number seed. Set this if you - want to reproduce a single cycle. Don't use this seed for production simulations - since the same seed will be used for all cycles! A value of zero means that a unique - seed will be generated for each cycle.""") - -ncycles = Parameter("ncycles", 1, - """The number of MD cycles. The total elapsed time will be nmoves*ncycles*timestep""") - -maxcycles = Parameter("maxcycles",99999, - """The maximum number of MD cycles to carry out. Useful to restart simulations from a checkpoint""") - -ncycles_per_snap = Parameter("ncycles_per_snap", 1, """Number of cycles between saving snapshots""") - -save_coords = Parameter("save coordinates", True, """Whether or not to save coordinates.""") - -buffered_coords_freq = Parameter("buffered coordinates frequency", 1, - """The number of time steps between saving of coordinates during - a cycle of MD. 0 disables buffering.""") -minimal_coordinate_saving = Parameter("minimal coordinate saving", False, "Reduce the number of coordiantes writing for states" - "with lambda in ]0,1[") - -time_to_skip = Parameter("time to skip", 0 * picosecond, """Time to skip in picoseconds""") - -minimise = Parameter("minimise", False, """Whether or not to perform minimization before the simulation.""") - -minimise_tol = Parameter("minimise tolerance", 1, """Tolerance used to know when minimization is complete.""") - -minimise_max_iter = Parameter("minimise maximum iterations", 1000, """Maximum number of iterations for minimization.""") - -equilibrate = Parameter("equilibrate", False , """Whether or not to perform equilibration before dynamics.""") - -equil_iterations = Parameter("equilibration iterations", 2000, """Number of equilibration steps to perform.""") - -equil_timestep = Parameter("equilibration timestep", 0.5 * femtosecond, """Timestep to use during equilibration.""") - -combining_rules = Parameter("combining rules", "arithmetic", - """Combining rules to use for the non-bonded interactions.""") - -timestep = Parameter("timestep", 2 * femtosecond, """Timestep for the dynamics simulation.""") - -platform = Parameter("platform", "CUDA", """Which OpenMM platform should be used to perform the dynamics.""") - -precision = Parameter("precision", "mixed", """The floating point precision model to use during dynamics.""") - -constraint = Parameter("constraint", "hbonds", """The constraint model to use during dynamics.""") - -cutoff_type = Parameter("cutoff type", "cutoffperiodic", """The cutoff method to use during the simulation.""") - -cutoff_dist = Parameter("cutoff distance", 10 * angstrom, - """The cutoff distance to use for the non-bonded interactions.""") - -integrator_type = Parameter("integrator", "leapfrogverlet", """The integrator to use for dynamics.""") - -inverse_friction = Parameter("inverse friction", 0.1 * picosecond, - """Inverse friction time for the Langevin thermostat.""") - -andersen = Parameter("thermostat", True, - """Whether or not to use the Andersen thermostat (needed for NVT or NPT simulation).""") - -barostat = Parameter("barostat", True, """Whether or not to use a barostat (needed for NPT simulation).""") - -andersen_frequency = Parameter("andersen frequency", 10.0, """Collision frequency in units of (1/ps)""") - -barostat_frequency = Parameter("barostat frequency", 25, - """Number of steps before attempting box changes if using the barostat.""") - -lj_dispersion = Parameter("lj dispersion", False, """Whether or not to calculate and include the LJ dispersion term.""") - -cmm_removal = Parameter("center of mass frequency", 10, - """Frequency of which the system center of mass motion is removed.""") - -center_solute = Parameter("center solute", False, - """Whether or not to centre the centre of geometry of the solute in the box.""") - -use_restraints = Parameter("use restraints", False, """Whether or not to use harmonic restaints on the solute atoms.""") - -k_restraint = Parameter("restraint force constant", 100.0, """Force constant to use for the harmonic restaints.""") - -heavy_mass_restraint = Parameter("heavy mass restraint", 1.10, - """Only restrain solute atoms whose mass is greater than this value.""") - -unrestrained_residues = Parameter("unrestrained residues", ["WAT", "HOH"], - """Names of residues that are never restrained.""") - -freeze_residues = Parameter("freeze residues", False, """Whether or not to freeze certain residues.""") - -frozen_residues = Parameter("frozen residues", ["LGR", "SIT", "NEG", "POS"], - """List of residues to freeze if 'freeze residues' is True.""") - - -use_distance_restraints = Parameter("use distance restraints", False, - """Whether or not to use restraints distances between pairs of atoms.""") - -distance_restraints_dict = Parameter("distance restraints dictionary", {}, - """Dictionary of pair of atoms whose distance is restrained, and restraint - parameters. Syntax is {(atom0,atom1):(reql, kl, Dl)} where atom0, atom1 are atomic - indices. reql the equilibrium distance. Kl the force constant of the restraint. - D the flat bottom radius. WARNING: PBC distance checks not implemented, avoid - restraining pair of atoms that may diffuse out of the box.""") - -hydrogen_mass_repartitioning_factor = \ - Parameter('hydrogen mass repartitioning factor', 1.0, - f'If larger than {HMR_MIN} (maximum is {HMR_MAX}), all hydrogen ' - 'atoms in the molecule will have their mass increased by this ' - 'factor. The atomic mass of the heavy atom bonded to the ' - 'hydrogen is decreased to keep the total mass constant ' - '(except when this would lead to a heavy atom to be lighter ' - 'than a minimum mass).') - -## Free energy specific keywords -morphfile = Parameter("morphfile", "MORPH.pert", - """Name of the morph file containing the perturbation to apply to the system.""") - -lambda_val = Parameter("lambda_val", 0.0, - """Value of the lambda parameter at which to evaluate free energy gradients.""") - -delta_lambda = Parameter("delta_lambda", 0.001, - """Value of the lambda interval used to evaluate free energy gradients by finite difference.""") - -lambda_array = Parameter("lambda array",[] , - """Array with all lambda values lambda_val needs to be part of the array. """) - -shift_delta = Parameter("shift delta", 2.0, - """Value of the Lennard-Jones soft-core parameter.""") - -coulomb_power = Parameter("coulomb power", 0, - """Value of the Coulombic soft-core parameter.""") - -energy_frequency = Parameter("energy frequency", 1, - """The number of time steps between evaluation of free energy gradients.""") - -simfile = Parameter("outdata_file", "simfile.dat", """Filename that records all output needed for the free energy analysis""") - -perturbed_resnum = Parameter("perturbed residue number",1,"""The residue number of the molecule to morph.""") +topfile = Parameter( + "topfile", + "SYSTEM.top", + "File name of the topology file containing the system to be simulated." +) + +crdfile = Parameter( + "crdfile", + "SYSTEM.crd", + "File name of the coordinate file containing the coordinates of the" + "system to be simulated." +) + +s3file = Parameter( + "s3file", + "SYSTEM.s3", + "Filename for the system state file. The system state after topology " + "and coordinates were loaded are saved in this file.", +) + +restart_file = Parameter( + "restart file", + "sim_restart.s3", + "Filename of the restart file to use to save progress during the " + "simulation." +) + +dcd_root = Parameter( + "dcd root", + "traj", + """Root of the filename of the output DCD trajectory files.""", +) + +nmoves = Parameter( + "nmoves", + 1000, + "Number of Molecular Dynamics moves to be performed during the " + "simulation." +) + +debug_seed = Parameter( + "debug seed", + 0, + "Debugging seed number seed. Set this if you want to reproduce a single " + "cycle. Don't use this seed for production simulations since the same " + "seed will be used for all cycles! A value of zero means that a unique " + "seed will be generated for each cycle." +) + +ncycles = Parameter( + "ncycles", + 1, + "The number of MD cycles. The total elapsed time will be " + "nmoves*ncycles*timestep" +) + +maxcycles = Parameter( + "maxcycles", + 99999, + "The maximum number of MD cycles to carry out. Useful to restart " + "simulations from a checkpoint" +) + +ncycles_per_snap = Parameter( + "ncycles_per_snap", 1, """Number of cycles between saving snapshots""" +) + +save_coords = Parameter( + "save coordinates", True, """Whether or not to save coordinates.""" +) + +buffered_coords_freq = Parameter( + "buffered coordinates frequency", + 1, + "The number of time steps between saving of coordinates during a cycle " + "of MD. 0 disables buffering." +) +minimal_coordinate_saving = Parameter( + "minimal coordinate saving", + False, + "Reduce the number of coordiantes writing for states" + "with lambda in ]0,1[", +) + +time_to_skip = Parameter( + "time to skip", 0 * picosecond, """Time to skip in picoseconds""" +) + +minimise = Parameter( + "minimise", + False, + """Whether or not to perform minimization before the simulation.""", +) + +minimise_tol = Parameter( + "minimise tolerance", + 1, + """Tolerance used to know when minimization is complete.""", +) + +minimise_max_iter = Parameter( + "minimise maximum iterations", + 1000, + """Maximum number of iterations for minimization.""", +) + +equilibrate = Parameter( + "equilibrate", + False, + """Whether or not to perform equilibration before dynamics.""", +) + +equil_iterations = Parameter( + "equilibration iterations", + 2000, + """Number of equilibration steps to perform.""", +) + +equil_timestep = Parameter( + "equilibration timestep", + 0.5 * femtosecond, + """Timestep to use during equilibration.""", +) + +combining_rules = Parameter( + "combining rules", + "arithmetic", + """Combining rules to use for the non-bonded interactions.""", +) + +timestep = Parameter( + "timestep", 2 * femtosecond, """Timestep for the dynamics simulation.""" +) + +platform = Parameter( + "platform", + "CUDA", + """Which OpenMM platform should be used to perform the dynamics.""", +) + +precision = Parameter( + "precision", + "mixed", + """The floating point precision model to use during dynamics.""", +) + +constraint = Parameter( + "constraint", "hbonds", """The constraint model to use during dynamics.""" +) + +cutoff_type = Parameter( + "cutoff type", + "cutoffperiodic", + """The cutoff method to use during the simulation.""", +) + +cutoff_dist = Parameter( + "cutoff distance", + 10 * angstrom, + """The cutoff distance to use for the non-bonded interactions.""", +) + +integrator_type = Parameter( + "integrator", "leapfrogverlet", """The integrator to use for dynamics.""" +) + +inverse_friction = Parameter( + "inverse friction", + 0.1 * picosecond, + """Inverse friction time for the Langevin thermostat.""", +) + +andersen = Parameter( + "thermostat", + True, + "Whether or not to use the Andersen thermostat (needed for NVT or NPT " + "simulation)." +) + +barostat = Parameter( + "barostat", + True, + """Whether or not to use a barostat (needed for NPT simulation).""", +) + +andersen_frequency = Parameter( + "andersen frequency", 10.0, """Collision frequency in units of (1/ps)""" +) + +barostat_frequency = Parameter( + "barostat frequency", + 25, + """Number of steps before attempting box changes if using the barostat.""", +) + +lj_dispersion = Parameter( + "lj dispersion", + False, + """Whether or not to calculate and include the LJ dispersion term.""", +) + +cmm_removal = Parameter( + "center of mass frequency", + 10, + """Frequency of which the system center of mass motion is removed.""", +) + +center_solute = Parameter( + "center solute", + False, + "Whether or not to centre the centre of geometry of the solute in the box." +) + +use_restraints = Parameter( + "use restraints", + False, + """Whether or not to use harmonic restaints on the solute atoms.""", +) + +k_restraint = Parameter( + "restraint force constant", + 100.0, + """Force constant to use for the harmonic restaints.""", +) + +heavy_mass_restraint = Parameter( + "heavy mass restraint", + 1.10, + """Only restrain solute atoms whose mass is greater than this value.""", +) + +unrestrained_residues = Parameter( + "unrestrained residues", + ["WAT", "HOH"], + """Names of residues that are never restrained.""", +) + +freeze_residues = Parameter( + "freeze residues", False, """Whether or not to freeze certain residues.""" +) + +frozen_residues = Parameter( + "frozen residues", + ["LGR", "SIT", "NEG", "POS"], + """List of residues to freeze if 'freeze residues' is True.""", +) + + +use_distance_restraints = Parameter( + "use distance restraints", + False, + """Whether or not to use restraints distances between pairs of atoms.""", +) + +distance_restraints_dict = Parameter( + "distance restraints dictionary", + {}, + "Dictionary of pair of atoms whose distance is restrained, and restraint " + "parameters. Syntax is {(atom0,atom1):(reql, kl, Dl)} where atom0, atom1 " + "are atomic indices. reql the equilibrium distance. Kl the force constant " + "of the restraint. D the flat bottom radius. WARNING: PBC distance checks " + "not implemented, avoid restraining pair of atoms that may diffuse out of " + "the box." +) + +hydrogen_mass_repartitioning_factor = Parameter( + "hydrogen mass repartitioning factor", + 1.0, + f"If larger than {HMR_MIN} (maximum is {HMR_MAX}), all hydrogen " + "atoms in the molecule will have their mass increased by this " + "factor. The atomic mass of the heavy atom bonded to the " + "hydrogen is decreased to keep the total mass constant " + "(except when this would lead to a heavy atom to be lighter " + "than a minimum mass).", +) + +# Free energy specific keywords +morphfile = Parameter( + "morphfile", + "MORPH.pert", + "Name of the morph file containing the perturbation to apply to the " + "system." +) + +lambda_val = Parameter( + "lambda_val", + 0.0, + "Value of the lambda parameter at which to evaluate free energy gradients." +) + +delta_lambda = Parameter( + "delta_lambda", + 0.001, + "Value of the lambda interval used to evaluate free energy gradients by " + "finite difference." +) + +lambda_array = Parameter( + "lambda array", + [], + "Array with all lambda values lambda_val needs to be part of the array." +) + +shift_delta = Parameter( + "shift delta", 2.0, """Value of the Lennard-Jones soft-core parameter.""" +) + +coulomb_power = Parameter( + "coulomb power", 0, """Value of the Coulombic soft-core parameter.""" +) + +energy_frequency = Parameter( + "energy frequency", + 1, + "The number of time steps between evaluation of free energy gradients." +) + +simfile = Parameter( + "outdata_file", + "simfile.dat", + "Filename that records all output needed for the free energy analysis" +) + +perturbed_resnum = Parameter( + "perturbed residue number", + 1, + """The residue number of the molecule to morph.""", +) verbose = Parameter("verbose", False, """Print debug output""") -#################################################################################################### +############################################################################### # # Helper functions # -#################################################################################################### +############################################################################### + def setupDCD(system): r""" @@ -254,11 +434,22 @@ def setupDCD(system): if lambda_val.val == 1.0 or lambda_val.val == 0.0: softcore_almbda = False if minimal_coordinate_saving.val and softcore_almbda: - interval = ncycles.val*nmoves.val - Trajectory = DCDFile(dcd_filename, system[MGName("all")], system.property("space"), timestep.val, interval) + interval = ncycles.val * nmoves.val + Trajectory = DCDFile( + dcd_filename, + system[MGName("all")], + system.property("space"), + timestep.val, + interval, + ) else: - Trajectory = DCDFile(dcd_filename, system[MGName("all")], system.property("space"), timestep.val, - interval=buffered_coords_freq.val * ncycles_per_snap.val) + Trajectory = DCDFile( + dcd_filename, + system[MGName("all")], + system.property("space"), + timestep.val, + interval=buffered_coords_freq.val * ncycles_per_snap.val, + ) return Trajectory @@ -267,7 +458,9 @@ def writeSystemData(system, moves, Trajectory, block, softcore_lambda=False): if softcore_lambda: if block == ncycles.val or block == 1: - Trajectory.writeModel(system[MGName("all")], system.property("space")) + Trajectory.writeModel( + system[MGName("all")], system.property("space") + ) else: if block % ncycles_per_snap.val == 0: if buffered_coords_freq.val > 0: @@ -276,9 +469,13 @@ def writeSystemData(system, moves, Trajectory, block, softcore_lambda=False): for prop in sysprops: if prop.startswith("buffered_space"): dimensions[str(prop)] = system.property(prop) - Trajectory.writeBufferedModels(system[MGName("all")], dimensions) + Trajectory.writeBufferedModels( + system[MGName("all")], dimensions + ) else: - Trajectory.writeModel(system[MGName("all")], system.property("space")) + Trajectory.writeModel( + system[MGName("all")], system.property("space") + ) # Write a PDB coordinate file each cycle. pdb = PDB2(system) @@ -299,7 +496,9 @@ def centerSolute(system, space): box_center = space.dimensions() / 2 # TriclincBox. except: - box_center = 0.5*(space.vector0() + space.vector1() + space.vector2()) + box_center = 0.5 * ( + space.vector0() + space.vector1() + space.vector2() + ) else: box_center = Vector(0.0, 0.0, 0.0) @@ -322,7 +521,7 @@ def centerSolute(system, space): def createSystem(molecules): - #print("Applying flexibility and zmatrix templates...") + # print("Applying flexibility and zmatrix templates...") print("Creating the system...") moleculeNumbers = molecules.molNums() @@ -366,22 +565,24 @@ def setupForcefields(system, space): # - first solvent-solvent coulomb/LJ (CLJ) energy internonbondedff = InterCLJFF("molecules:molecules") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": internonbondedff.setUseReactionField(True) internonbondedff.setReactionFieldDielectric(rf_dielectric.val) internonbondedff.add(molecules) inter_ions_nonbondedff = InterCLJFF("ions:ions") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": inter_ions_nonbondedff.setUseReactionField(True) inter_ions_nonbondedff.setReactionFieldDielectric(rf_dielectric.val) inter_ions_nonbondedff.add(ions) inter_ions_molecules_nonbondedff = InterGroupCLJFF("ions:molecules") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": inter_ions_molecules_nonbondedff.setUseReactionField(True) - inter_ions_molecules_nonbondedff.setReactionFieldDielectric(rf_dielectric.val) + inter_ions_molecules_nonbondedff.setReactionFieldDielectric( + rf_dielectric.val + ) inter_ions_molecules_nonbondedff.add(ions, MGIdx(0)) inter_ions_molecules_nonbondedff.add(molecules, MGIdx(1)) @@ -393,7 +594,7 @@ def setupForcefields(system, space): # Now solute intramolecular CLJ energy intranonbondedff = IntraCLJFF("molecules-intranonbonded") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": intranonbondedff.setUseReactionField(True) intranonbondedff.setReactionFieldDielectric(rf_dielectric.val) @@ -411,7 +612,9 @@ def setupForcefields(system, space): for molnum in molnums: mol = molecules.molecule(molnum)[0].molecule() try: - mol_restrained_atoms = propertyToAtomNumVectorList(mol.property("restrainedatoms")) + mol_restrained_atoms = propertyToAtomNumVectorList( + mol.property("restrainedatoms") + ) except UserWarning as error: error_type = re.search(r"(Sire\w*::\w*)", str(error)).group(0) if error_type == "SireBase::missing_property": @@ -423,27 +626,43 @@ def setupForcefields(system, space): atnum = restrained_line[0] restraint_atom = mol.select(atnum) restraint_coords = restrained_line[1] - restraint_k = restrained_line[2] * kcal_per_mol / (angstrom * angstrom) + restraint_k = ( + restrained_line[2] * kcal_per_mol / (angstrom * angstrom) + ) - restraint = DistanceRestraint.harmonic(restraint_atom, restraint_coords, restraint_k) + restraint = DistanceRestraint.harmonic( + restraint_atom, restraint_coords, restraint_k + ) restraintff.add(restraint) # Here is the list of all forcefields - forcefields = [internonbondedff, intrabondedff, intranonbondedff, inter_ions_nonbondedff, - inter_ions_molecules_nonbondedff, restraintff] + forcefields = [ + internonbondedff, + intrabondedff, + intranonbondedff, + inter_ions_nonbondedff, + inter_ions_molecules_nonbondedff, + restraintff, + ] for forcefield in forcefields: system.add(forcefield) system.setProperty("space", space) - system.setProperty("switchingFunction", CHARMMSwitchingFunction(cutoff_dist.val)) + system.setProperty( + "switchingFunction", CHARMMSwitchingFunction(cutoff_dist.val) + ) system.setProperty("combiningRules", VariantProperty(combining_rules.val)) - total_nrg = internonbondedff.components().total() + \ - intranonbondedff.components().total() + intrabondedff.components().total() + \ - inter_ions_nonbondedff.components().total() + inter_ions_molecules_nonbondedff.components().total() + \ - restraintff.components().total() + total_nrg = ( + internonbondedff.components().total() + + intranonbondedff.components().total() + + intrabondedff.components().total() + + inter_ions_nonbondedff.components().total() + + inter_ions_molecules_nonbondedff.components().total() + + restraintff.components().total() + ) e_total = system.totalComponent() @@ -468,7 +687,9 @@ def setupMoves(system, debug_seed, GPUS): Integrator_OpenMM.setConstraintType(constraint.val) Integrator_OpenMM.setCutoffType(cutoff_type.val) Integrator_OpenMM.setIntegrator(integrator_type.val) - Integrator_OpenMM.setFriction(inverse_friction.val) # Only meaningful for Langevin/Brownian integrators + Integrator_OpenMM.setFriction( + inverse_friction.val + ) # Only meaningful for Langevin/Brownian integrators Integrator_OpenMM.setPrecision(precision.val) Integrator_OpenMM.setTimetoSkip(time_to_skip.val) @@ -497,11 +718,15 @@ def setupMoves(system, debug_seed, GPUS): Integrator_OpenMM.setMCBarostat(barostat.val) Integrator_OpenMM.setMCBarostatFrequency(barostat_frequency.val) - #print Integrator_OpenMM.getDeviceIndex() + # print Integrator_OpenMM.getDeviceIndex() Integrator_OpenMM.initialise() - mdmove = MolecularDynamics(molecules, Integrator_OpenMM, timestep.val, - {"velocity generator": MaxwellBoltzmann(temperature.val)}) + mdmove = MolecularDynamics( + molecules, + Integrator_OpenMM, + timestep.val, + {"velocity generator": MaxwellBoltzmann(temperature.val)}, + ) print("Created a MD move that uses OpenMM for all molecules on %s " % GPUS) @@ -540,10 +765,10 @@ def atomNumVectorListToProperty(list): prop.setProperty("x(%d)" % i, VariantProperty(value[1].x())) prop.setProperty("y(%d)" % i, VariantProperty(value[1].y())) prop.setProperty("z(%d)" % i, VariantProperty(value[1].z())) - prop.setProperty("k(%d)" % i, VariantProperty(value[2].val ) ) + prop.setProperty("k(%d)" % i, VariantProperty(value[2].val)) i += 1 - prop.setProperty("nrestrainedatoms", VariantProperty(i)); + prop.setProperty("nrestrainedatoms", VariantProperty(i)) return prop @@ -562,7 +787,7 @@ def linkbondVectorListToProperty(list): prop.setProperty("dl(%d)" % i, VariantProperty(value[4])) i += 1 - prop.setProperty("nbondlinks", VariantProperty(i)); + prop.setProperty("nbondlinks", VariantProperty(i)) return prop @@ -578,6 +803,7 @@ def propertyToAtomNumList(prop): pass return list + def propertyToAtomNumVectorList(prop): list = [] i = 0 @@ -589,7 +815,7 @@ def propertyToAtomNumVectorList(prop): z = prop["z(%d)" % i].toDouble() k = prop["k(%d)" % i].toDouble() - list.append((num, Vector(x, y, z), k )) + list.append((num, Vector(x, y, z), k)) i += 1 except: @@ -619,23 +845,28 @@ def setupRestraints(system): for x in range(0, nats): at = atoms[x] atnumber = at.number() - #print at, atnumber + # print at, atnumber if at.residue().name().value() in unrestrained_residues.val: continue - #print at, at.property("mass"), heavyMass - if ( at.property("mass").value() < heavy_mass_restraint.val ): - #print "LIGHT, skip" + # print at, at.property("mass"), heavyMass + if at.property("mass").value() < heavy_mass_restraint.val: + # print "LIGHT, skip" continue atcoords = at.property("coordinates") - #print at + # print at restrainedAtoms.append((atnumber, atcoords, k_restraint)) - #restrainedAtoms.append( atnumber ) + # restrainedAtoms.append( atnumber ) if len(restrainedAtoms) > 0: - mol = mol.edit().setProperty("restrainedatoms", atomNumVectorListToProperty(restrainedAtoms)).commit() - #print restrainedAtoms - #print propertyToAtomNumVectorList( mol.property("restrainedatoms") ) + mol = ( + mol.edit() + .setProperty( + "restrainedatoms", + atomNumVectorListToProperty(restrainedAtoms), + ) + .commit() + ) system.update(mol) return system @@ -647,7 +878,7 @@ def setupDistanceRestraints(system, restraints=None): molecules = system[MGName("all")].molecules() if restraints is None: - #dic_items = list(distance_restraints_dict.val.items()) + # dic_items = list(distance_restraints_dict.val.items()) dic_items = list(dict(distance_restraints_dict.val).items()) else: dic_items = list(restraints.items()) @@ -661,25 +892,46 @@ def setupDistanceRestraints(system, restraints=None): atnumber = at.number() for k in range(len(dic_items)): if dic_items[k][0][0] == dic_items[k][0][1]: - print ("Error! It is not possible to place a distance restraint on the same atom") + print( + "Error! It is not possible to place a distance " + "restraint on the same atom" + ) sys.exit(-1) if atnumber.value() - 1 in dic_items[k][0]: - print (at) + print(at) # atom0index atom1index, reql, kl, dl - prop_list.append(( - dic_items[k][0][0] + 1, dic_items[k][0][1] + 1, dic_items[k][1][0], dic_items[k][1][1], - dic_items[k][1][2])) + prop_list.append( + ( + dic_items[k][0][0] + 1, + dic_items[k][0][1] + 1, + dic_items[k][1][0], + dic_items[k][1][1], + dic_items[k][1][2], + ) + ) unique_prop_list = [] - [unique_prop_list.append(item) for item in prop_list if item not in unique_prop_list] - print (unique_prop_list) - #Mol number 0 will store all the information related to the bond-links in the system - #mol0 = molecules.molecule(MolNum(1))[0].molecule() - #JM bugfix 11/21 store distance restraints in the first molecule (by index) contained in molecules which should be solute - #import pdb ; pdb.set_trace() + [ + unique_prop_list.append(item) + for item in prop_list + if item not in unique_prop_list + ] + print(unique_prop_list) + # Mol number 0 will store all the information related to the bond-links in + # the system + # mol0 = molecules.molecule(MolNum(1))[0].molecule() + # JM bugfix 11/21 store distance restraints in the first molecule + # (by index) # contained in molecules which should be solute + # import pdb ; pdb.set_trace() mol0 = system[MGName("all")].moleculeAt(0)[0].molecule() - mol0 = mol0.edit().setProperty("linkbonds", linkbondVectorListToProperty(unique_prop_list)).commit() + mol0 = ( + mol0.edit() + .setProperty( + "linkbonds", linkbondVectorListToProperty(unique_prop_list) + ) + .commit() + ) system.update(mol0) return system @@ -699,25 +951,34 @@ def freezeResidues(system): at = atoms[x] atnumber = at.number() if at.residue().name().value() in frozen_residues.val: - print("Freezing %s %s %s " % (at, atnumber, at.residue().name().value() )) + print( + "Freezing %s %s %s " + % (at, atnumber, at.residue().name().value()) + ) mol = at.edit().setProperty("mass", 0 * g_per_mol).molecule() system.update(mol) return system + def repartitionMasses(system, hmassfactor=4.0): """ - Increase the mass of hydrogen atoms to hmass times * amu, and subtract the mass -increase from the heavy atom the hydrogen is bonded to. + Increase the mass of hydrogen atoms to hmass times * amu, and subtract the + mass increase from the heavy atom the hydrogen is bonded to. """ - if not (HMR_MIN <= hmassfactor <= HMR_MAX): - print(f'The HMR factor must be between {HMR_MIN} and {HMR_MAX} ' - f'and not {hmassfactor}') + if not HMR_MIN <= hmassfactor <= HMR_MAX: + print( + f"The HMR factor must be between {HMR_MIN} and {HMR_MAX} " + f"and not {hmassfactor}" + ) sys.exit(-1) - print ("Applying Hydrogen Mass repartition to input using a factor of %s " % hmassfactor) + print( + "Applying Hydrogen Mass repartition to input using a factor of %s " + % hmassfactor + ) molecules = system[MGName("all")].molecules() @@ -738,7 +999,7 @@ def repartitionMasses(system, hmassfactor=4.0): # # First pass. Initialise changes in atom_masses to effect # - for x in range(0,nats): + for x in range(0, nats): at = atoms[x] atidx = at.index() atom_masses[atidx.value()] = 0 * g_per_mol @@ -748,26 +1009,28 @@ def repartitionMasses(system, hmassfactor=4.0): # # Second pass. Decide how the mass of each atom should change. # - for x in range(0,nats): + for x in range(0, nats): at = atoms[x] atidx = at.index() atmass = at.property("mass") # units are in g_per_mol - if (atmass.value() < 1.1): - # Atoms with a mass < 1.1 g_per_mol are assumed to be hydrogen atoms + if atmass.value() < 1.1: + # Atoms with a mass < 1.1 g_per_mol are assumed to be hydrogen + # atoms atmass = at.property("mass") deltamass = atmass * hmassfactor - atmass - #print("Increasing mass %s by %s " % (at, deltamass)) + # print("Increasing mass %s by %s " % (at, deltamass)) total_delta += deltamass atom_masses[atidx.value()] = deltamass # Skip monoatomic systems without connectivity property if connect is None: continue bonds = connect.getBonds(atidx) - # Get list of atoms that share one bond with this atom. Ignore all atoms that have a - # mass < 1.1 g_mol in the ORIGINAL atoms list - # For each atom this was bonded to, substract delta_mass / nbonded + # Get list of atoms that share one bond with this atom. Ignore + # all atoms that have a mass < 1.1 g_mol in the ORIGINAL atoms + # list.For each atom this was bonded to, substract + # delta_mass / nbonded bonded_atoms = [] for bond in bonds: at0 = mol.select(bond.atom0()).index() @@ -787,39 +1050,52 @@ def repartitionMasses(system, hmassfactor=4.0): bonded_atoms.append(heavyatidx) for bonded_atom in bonded_atoms: - #print("Increasing mass %s by %s " % (mol.select(bonded_atom), -deltamass)) - total_delta += - deltamass - atom_masses[bonded_atom.value()] += - deltamass + total_delta += -deltamass + atom_masses[bonded_atom.value()] += -deltamass # Sanity check (g_per_mol) if total_delta.value() > 0.001: - print ("WARNING ! The mass repartitioning algorithm is not conserving atomic masses for", - "molecule %s (total delta is %s). Report bug to a Sire developer." % (molnum,total_delta.value()) ) + print( + "WARNING! The mass repartitioning algorithm is not conserving " + "atomic masses for molecule %s (total delta is %s). " + "Report bug to a Sire developer." + % (molnum, total_delta.value()), + ) sys.exit(-1) # Now that have worked out mass changes per molecule, update molecule - for x in range(0,nats): + for x in range(0, nats): at = atoms[x] atidx = at.index() atmass = at.property("mass") newmass = atmass + atom_masses[atidx.value()] # Sanity check. Note this is likely to occur if hmassfactor > 4 - if (newmass.value() < 0.0): - print ("""WARNING ! The mass of atom %s is less than zero after hydrogen mass repartitioning. - This should not happen ! Decrease hydrogen mass repartitioning factor in your cfg file - and try again.""" % atidx) + if newmass.value() < 0.0: + print( + "WARNING! The mass of atom %s is less than zero after " + "hydrogen mass repartitioning. This should not happen! " + "Decrease hydrogen mass repartitioning factor in your " + "cfg file and try again." + % atidx + ) sys.exit(-1) - mol = mol.edit().atom(atidx).setProperty("mass", newmass )[0].molecule() + mol = ( + mol.edit() + .atom(atidx) + .setProperty("mass", newmass)[0] + .molecule() + ) system.update(mol) - #import pdb; pdb.set_trace() + # import pdb; pdb.set_trace() return system + def getDummies(molecule): - print ("Selecting dummy groups") + print("Selecting dummy groups") natoms = molecule.nAtoms() atoms = molecule.atoms() @@ -853,7 +1129,7 @@ def createSystemFreeEnergy(molecules): system : Sire.system """ - print ("Create the System...") + print("Create the System...") moleculeNumbers = molecules.molNums() moleculeList = [] @@ -869,16 +1145,23 @@ def createSystemFreeEnergy(molecules): solute = None for molecule in moleculeList: - if ( molecule.residue(ResIdx(0)).number() == ResNum(perturbed_resnum.val) ): + if molecule.residue(ResIdx(0)).number() == ResNum( + perturbed_resnum.val + ): solute = molecule moleculeList.remove(molecule) break if solute is None: - print ("FATAL ! Could not find a solute to perturb with residue number %s in the input ! Check the value of your cfg keyword 'perturbed residue number'" % perturbed_resnum.val) + print( + "FATAL! Could not find a solute to perturb with residue number %s " + "in the input! Check the value of your cfg keyword " + "'perturbed residue number'" + % perturbed_resnum.val + ) sys.exit(-1) - #solute = moleculeList[0] + # solute = moleculeList[0] lig_name = solute.residue(ResIdx(0)).name().value() @@ -894,15 +1177,25 @@ def createSystemFreeEnergy(molecules): initial = Perturbation.symbols().initial() final = Perturbation.symbols().final() - solute = solute.edit().setProperty("perturbations", - perturbations.recreate((1 - lam) * initial + lam * final)).commit() - - # We put atoms in three groups depending on what happens in the perturbation - # non dummy to non dummy --> the hard group, uses a normal intermolecular FF + solute = ( + solute.edit() + .setProperty( + "perturbations", + perturbations.recreate((1 - lam) * initial + lam * final), + ) + .commit() + ) + + # We put atoms in three groups depending on what happens in the + # perturbation + # non dummy to non dummy --> the hard group, use a normal intermolecular FF # non dummy to dummy --> the todummy group, uses SoftFF with alpha = Lambda - # dummy to non dummy --> the fromdummy group, uses SoftFF with alpha = 1 - Lambda - # We start assuming all atoms are hard atoms. Then we call getDummies to find which atoms - # start/end as dummies and update the hard, todummy and fromdummy groups accordingly + # dummy to non dummy --> the fromdummy group, uses SoftFF with + # alpha = 1 - Lambda + # We start assuming all atoms are hard atoms. Then we call getDummies to + # find which atoms + # start/end as dummies and update the hard, todummy and fromdummy groups + # accordingly solute_grp_ref = MoleculeGroup("solute_ref", solute) solute_grp_ref_hard = MoleculeGroup("solute_ref_hard") @@ -921,8 +1214,12 @@ def createSystemFreeEnergy(molecules): for x in range(0, ndummies): dummy_index = dummies[x].index() - solute_ref_hard = solute_ref_hard.subtract(solute.select(dummy_index)) - solute_ref_todummy = solute_ref_todummy.add(solute.select(dummy_index)) + solute_ref_hard = solute_ref_hard.subtract( + solute.select(dummy_index) + ) + solute_ref_todummy = solute_ref_todummy.add( + solute.select(dummy_index) + ) if from_dummies is not None: ndummies = from_dummies.count() @@ -930,8 +1227,12 @@ def createSystemFreeEnergy(molecules): for x in range(0, ndummies): dummy_index = dummies[x].index() - solute_ref_hard = solute_ref_hard.subtract(solute.select(dummy_index)) - solute_ref_fromdummy = solute_ref_fromdummy.add(solute.select(dummy_index)) + solute_ref_hard = solute_ref_hard.subtract( + solute.select(dummy_index) + ) + solute_ref_fromdummy = solute_ref_fromdummy.add( + solute.select(dummy_index) + ) solute_grp_ref_hard.add(solute_ref_hard) solute_grp_ref_todummy.add(solute_ref_todummy) @@ -945,7 +1246,7 @@ def createSystemFreeEnergy(molecules): solvent = MoleculeGroup("solvent") - #for molecule in moleculeList[1:]: + # for molecule in moleculeList[1:]: for molecule in moleculeList: molecules.add(molecule) solvent.add(molecule) @@ -990,7 +1291,7 @@ def setupForceFieldsFreeEnergy(system, space): system : Sire.system """ - print ("Creating force fields... ") + print("Creating force fields... ") solutes = system[MGName("solutes")] @@ -1013,21 +1314,21 @@ def setupForceFieldsFreeEnergy(system, space): # Solvent-solvent coulomb/LJ (CLJ) energy solventff = InterCLJFF("solvent:solvent") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solventff.setUseReactionField(True) solventff.setReactionFieldDielectric(rf_dielectric.val) solventff.add(solvent) - #Solvent intramolecular CLJ energy + # Solvent intramolecular CLJ energy solvent_intraclj = IntraCLJFF("solvent_intraclj") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solvent_intraclj.setUseReactionField(True) solvent_intraclj.setReactionFieldDielectric(rf_dielectric.val) solvent_intraclj.add(solvent) # Solute intramolecular CLJ energy solute_hard_intraclj = IntraCLJFF("solute_hard_intraclj") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_hard_intraclj.setUseReactionField(True) solute_hard_intraclj.setReactionFieldDielectric(rf_dielectric.val) solute_hard_intraclj.add(solute_hard) @@ -1035,7 +1336,7 @@ def setupForceFieldsFreeEnergy(system, space): solute_todummy_intraclj = IntraSoftCLJFF("solute_todummy_intraclj") solute_todummy_intraclj.setShiftDelta(shift_delta.val) solute_todummy_intraclj.setCoulombPower(coulomb_power.val) - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_todummy_intraclj.setUseReactionField(True) solute_todummy_intraclj.setReactionFieldDielectric(rf_dielectric.val) solute_todummy_intraclj.add(solute_todummy) @@ -1043,78 +1344,102 @@ def setupForceFieldsFreeEnergy(system, space): solute_fromdummy_intraclj = IntraSoftCLJFF("solute_fromdummy_intraclj") solute_fromdummy_intraclj.setShiftDelta(shift_delta.val) solute_fromdummy_intraclj.setCoulombPower(coulomb_power.val) - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_fromdummy_intraclj.setUseReactionField(True) solute_fromdummy_intraclj.setReactionFieldDielectric(rf_dielectric.val) solute_fromdummy_intraclj.add(solute_fromdummy) - solute_hard_todummy_intraclj = IntraGroupSoftCLJFF("solute_hard:todummy_intraclj") + solute_hard_todummy_intraclj = IntraGroupSoftCLJFF( + "solute_hard:todummy_intraclj" + ) solute_hard_todummy_intraclj.setShiftDelta(shift_delta.val) solute_hard_todummy_intraclj.setCoulombPower(coulomb_power.val) - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_hard_todummy_intraclj.setUseReactionField(True) - solute_hard_todummy_intraclj.setReactionFieldDielectric(rf_dielectric.val) + solute_hard_todummy_intraclj.setReactionFieldDielectric( + rf_dielectric.val + ) solute_hard_todummy_intraclj.add(solute_hard, MGIdx(0)) solute_hard_todummy_intraclj.add(solute_todummy, MGIdx(1)) - solute_hard_fromdummy_intraclj = IntraGroupSoftCLJFF("solute_hard:fromdummy_intraclj") + solute_hard_fromdummy_intraclj = IntraGroupSoftCLJFF( + "solute_hard:fromdummy_intraclj" + ) solute_hard_fromdummy_intraclj.setShiftDelta(shift_delta.val) solute_hard_fromdummy_intraclj.setCoulombPower(coulomb_power.val) - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_hard_fromdummy_intraclj.setUseReactionField(True) - solute_hard_fromdummy_intraclj.setReactionFieldDielectric(rf_dielectric.val) + solute_hard_fromdummy_intraclj.setReactionFieldDielectric( + rf_dielectric.val + ) solute_hard_fromdummy_intraclj.add(solute_hard, MGIdx(0)) solute_hard_fromdummy_intraclj.add(solute_fromdummy, MGIdx(1)) - solute_todummy_fromdummy_intraclj = IntraGroupSoftCLJFF("solute_todummy:fromdummy_intraclj") + solute_todummy_fromdummy_intraclj = IntraGroupSoftCLJFF( + "solute_todummy:fromdummy_intraclj" + ) solute_todummy_fromdummy_intraclj.setShiftDelta(shift_delta.val) solute_todummy_fromdummy_intraclj.setCoulombPower(coulomb_power.val) - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_todummy_fromdummy_intraclj.setUseReactionField(True) - solute_todummy_fromdummy_intraclj.setReactionFieldDielectric(rf_dielectric.val) + solute_todummy_fromdummy_intraclj.setReactionFieldDielectric( + rf_dielectric.val + ) solute_todummy_fromdummy_intraclj.add(solute_todummy, MGIdx(0)) solute_todummy_fromdummy_intraclj.add(solute_fromdummy, MGIdx(1)) - #Solute-solvent CLJ energy + # Solute-solvent CLJ energy solute_hard_solventff = InterGroupCLJFF("solute_hard:solvent") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_hard_solventff.setUseReactionField(True) solute_hard_solventff.setReactionFieldDielectric(rf_dielectric.val) solute_hard_solventff.add(solute_hard, MGIdx(0)) solute_hard_solventff.add(solvent, MGIdx(1)) solute_todummy_solventff = InterGroupSoftCLJFF("solute_todummy:solvent") - if (cutoff_type.val != "nocutoff"): + if cutoff_type.val != "nocutoff": solute_todummy_solventff.setUseReactionField(True) solute_todummy_solventff.setReactionFieldDielectric(rf_dielectric.val) solute_todummy_solventff.add(solute_todummy, MGIdx(0)) solute_todummy_solventff.add(solvent, MGIdx(1)) - solute_fromdummy_solventff = InterGroupSoftCLJFF("solute_fromdummy:solvent") - if (cutoff_type.val != "nocutoff"): + solute_fromdummy_solventff = InterGroupSoftCLJFF( + "solute_fromdummy:solvent" + ) + if cutoff_type.val != "nocutoff": solute_fromdummy_solventff.setUseReactionField(True) - solute_fromdummy_solventff.setReactionFieldDielectric(rf_dielectric.val) + solute_fromdummy_solventff.setReactionFieldDielectric( + rf_dielectric.val + ) solute_fromdummy_solventff.add(solute_fromdummy, MGIdx(0)) solute_fromdummy_solventff.add(solvent, MGIdx(1)) - # TOTAL - forcefields = [solute_intraff, - solute_hard_intraclj, solute_todummy_intraclj, solute_fromdummy_intraclj, - solute_hard_todummy_intraclj, solute_hard_fromdummy_intraclj, - solute_todummy_fromdummy_intraclj, - solvent_intraff, - solventff, solvent_intraclj, - solute_hard_solventff, solute_todummy_solventff, solute_fromdummy_solventff] - + forcefields = [ + solute_intraff, + solute_hard_intraclj, + solute_todummy_intraclj, + solute_fromdummy_intraclj, + solute_hard_todummy_intraclj, + solute_hard_fromdummy_intraclj, + solute_todummy_fromdummy_intraclj, + solvent_intraff, + solventff, + solvent_intraclj, + solute_hard_solventff, + solute_todummy_solventff, + solute_fromdummy_solventff, + ] for forcefield in forcefields: system.add(forcefield) system.setProperty("space", space) - if (cutoff_type.val != "nocutoff"): - system.setProperty("switchingFunction", CHARMMSwitchingFunction(cutoff_dist.val)) + if cutoff_type.val != "nocutoff": + system.setProperty( + "switchingFunction", CHARMMSwitchingFunction(cutoff_dist.val) + ) else: system.setProperty("switchingFunction", NoCutoff()) @@ -1123,16 +1448,21 @@ def setupForceFieldsFreeEnergy(system, space): system.setProperty("shiftDelta", VariantProperty(shift_delta.val)) # TOTAL - total_nrg = solute_intraff.components().total() + solute_hard_intraclj.components().total() + \ - solute_todummy_intraclj.components().total(0) + solute_fromdummy_intraclj.components().total(0) + \ - solute_hard_todummy_intraclj.components().total( - 0) + solute_hard_fromdummy_intraclj.components().total(0) + \ - solute_todummy_fromdummy_intraclj.components().total(0) + \ - solvent_intraff.components().total() + solventff.components().total() + \ - solvent_intraclj.components().total() + \ - solute_hard_solventff.components().total() + \ - solute_todummy_solventff.components().total(0) + \ - solute_fromdummy_solventff.components().total(0) + total_nrg = ( + solute_intraff.components().total() + + solute_hard_intraclj.components().total() + + solute_todummy_intraclj.components().total(0) + + solute_fromdummy_intraclj.components().total(0) + + solute_hard_todummy_intraclj.components().total(0) + + solute_hard_fromdummy_intraclj.components().total(0) + + solute_todummy_fromdummy_intraclj.components().total(0) + + solvent_intraff.components().total() + + solventff.components().total() + + solvent_intraclj.components().total() + + solute_hard_solventff.components().total() + + solute_todummy_solventff.components().total(0) + + solute_fromdummy_solventff.components().total(0) + ) e_total = system.totalComponent() @@ -1146,13 +1476,39 @@ def setupForceFieldsFreeEnergy(system, space): # NON BONDED Alpha constraints for the soft force fields - system.add(PropertyConstraint("alpha0", FFName("solute_todummy_intraclj"), lam)) - system.add(PropertyConstraint("alpha0", FFName("solute_fromdummy_intraclj"), 1 - lam)) - system.add(PropertyConstraint("alpha0", FFName("solute_hard:todummy_intraclj"), lam)) - system.add(PropertyConstraint("alpha0", FFName("solute_hard:fromdummy_intraclj"), 1 - lam)) - system.add(PropertyConstraint("alpha0", FFName("solute_todummy:fromdummy_intraclj"), Max(lam, 1 - lam))) - system.add(PropertyConstraint("alpha0", FFName("solute_todummy:solvent"), lam)) - system.add(PropertyConstraint("alpha0", FFName("solute_fromdummy:solvent"), 1 - lam)) + system.add( + PropertyConstraint("alpha0", FFName("solute_todummy_intraclj"), lam) + ) + system.add( + PropertyConstraint( + "alpha0", FFName("solute_fromdummy_intraclj"), 1 - lam + ) + ) + system.add( + PropertyConstraint( + "alpha0", FFName("solute_hard:todummy_intraclj"), lam + ) + ) + system.add( + PropertyConstraint( + "alpha0", FFName("solute_hard:fromdummy_intraclj"), 1 - lam + ) + ) + system.add( + PropertyConstraint( + "alpha0", + FFName("solute_todummy:fromdummy_intraclj"), + Max(lam, 1 - lam), + ) + ) + system.add( + PropertyConstraint("alpha0", FFName("solute_todummy:solvent"), lam) + ) + system.add( + PropertyConstraint( + "alpha0", FFName("solute_fromdummy:solvent"), 1 - lam + ) + ) system.setComponent(lam, lambda_val.val) @@ -1163,18 +1519,22 @@ def setupForceFieldsFreeEnergy(system, space): def setupMovesFreeEnergy(system, debug_seed, GPUS, lam_val): - print ("Setting up moves...") + print("Setting up moves...") molecules = system[MGName("molecules")] solute = system[MGName("solute_ref")] solute_hard = system[MGName("solute_ref_hard")] solute_todummy = system[MGName("solute_ref_todummy")] solute_fromdummy = system[MGName("solute_ref_fromdummy")] - #import pdb ; pdb.set_trace() - Integrator_OpenMM = OpenMMFrEnergyST(molecules, solute, solute_hard, solute_todummy, solute_fromdummy) + # import pdb ; pdb.set_trace() + Integrator_OpenMM = OpenMMFrEnergyST( + molecules, solute, solute_hard, solute_todummy, solute_fromdummy + ) Integrator_OpenMM.setRandomSeed(debug_seed) Integrator_OpenMM.setIntegrator(integrator_type.val) - Integrator_OpenMM.setFriction(inverse_friction.val) # Only meaningful for Langevin/Brownian integrators + Integrator_OpenMM.setFriction( + inverse_friction.val + ) # Only meaningful for Langevin/Brownian integrators Integrator_OpenMM.setPlatform(platform.val) Integrator_OpenMM.setConstraintType(constraint.val) Integrator_OpenMM.setCutoffType(cutoff_type.val) @@ -1216,13 +1576,17 @@ def setupMovesFreeEnergy(system, debug_seed, GPUS, lam_val): seed = debug_seed print("Using debugging seed number %d " % debug_seed) - #This calls the OpenMMFrEnergyST initialise function + # This calls the OpenMMFrEnergyST initialise function Integrator_OpenMM.initialise() velocity_generator = MaxwellBoltzmann(temperature.val) velocity_generator.setGenerator(RanGenerator(seed)) - mdmove = MolecularDynamics(molecules, Integrator_OpenMM, timestep.val, - {"velocity generator":velocity_generator}) + mdmove = MolecularDynamics( + molecules, + Integrator_OpenMM, + timestep.val, + {"velocity generator": velocity_generator}, + ) print("Created a MD move that uses OpenMM for all molecules on %s " % GPUS) @@ -1233,6 +1597,7 @@ def setupMovesFreeEnergy(system, debug_seed, GPUS, lam_val): return moves + def clearBuffers(system): r""" Parameters @@ -1245,7 +1610,7 @@ def clearBuffers(system): returns a """ - print ("Clearing buffers...") + print("Clearing buffers...") mols = system[MGName("all")].molecules() molnums = mols.molNums() @@ -1258,16 +1623,17 @@ def clearBuffers(system): editmol = mol.edit() for molprop in molprops: if molprop.startswith("buffered_"): - #print "Removing property %s " % molprop + # print "Removing property %s " % molprop editmol.removeProperty(PropertyName(molprop)) mol = editmol.commit() changedmols.add(mol) - #system.update(mol) + # system.update(mol) system.update(changedmols) return system + def getAllData(integrator, steps): gradients = integrator.getGradients() f_metropolis = integrator.getForwardMetropolis() @@ -1275,32 +1641,56 @@ def getAllData(integrator, steps): energies = integrator.getEnergies() reduced_pot_en = integrator.getReducedPerturbedEnergies() outdata = None - l = [len(gradients), len(f_metropolis), len(b_metropolis), len(energies), len(steps)] - if len(set(l))!=1: - print("Whoops somehow the data generated does not agree in their first dimensions...exiting now.") + dims = [ + len(gradients), + len(f_metropolis), + len(b_metropolis), + len(energies), + len(steps), + ] + if len(set(dims)) != 1: + print( + "Whoops somehow the data generated does not agree in their first " + "dimensions...exiting now." + ) exit(-1) else: if len(gradients) == len(reduced_pot_en): - outdata = np.column_stack((steps, energies, gradients, - f_metropolis, b_metropolis, - reduced_pot_en)) - elif len(reduced_pot_en)==0: - outdata = np.column_stack((steps, energies, gradients, - f_metropolis, b_metropolis)) - print("Warning: you didn't specify a lambda array, no reduced perturbed energies can be written to file.") + outdata = np.column_stack( + ( + steps, + energies, + gradients, + f_metropolis, + b_metropolis, + reduced_pot_en, + ) + ) + elif len(reduced_pot_en) == 0: + outdata = np.column_stack( + (steps, energies, gradients, f_metropolis, b_metropolis) + ) + print( + "Warning: you didn't specify a lambda array, no reduced " + "perturbed energies can be written to file." + ) else: - print("Whoops somehow the data generated does not agree in their first dimensions...exiting now.") + print( + "Whoops somehow the data generated does not agree in their " + "first dimensions...exiting now." + ) exit(-1) return outdata -def getAtomNearCOG( molecule ): + +def getAtomNearCOG(molecule): mol_centre = molecule.evaluate().center() mindist = 99999.0 for x in range(0, molecule.nAtoms()): atom = molecule.atoms()[x] - at_coords = atom.property('coordinates') + at_coords = atom.property("coordinates") dist = Vector().distance2(at_coords, mol_centre) if dist < mindist: mindist = dist @@ -1308,6 +1698,7 @@ def getAtomNearCOG( molecule ): return nearest_atom + def generateDistanceRestraintsDict(system): r""" Parameters @@ -1321,9 +1712,9 @@ def generateDistanceRestraintsDict(system): molecules = system.molecules() molnums = molecules.molNums() solute = molecules.at(MolNum(1))[0].molecule() - nearestcog_atom = getAtomNearCOG( solute ) + nearestcog_atom = getAtomNearCOG(solute) icoord = nearestcog_atom.property("coordinates") - # Step 2) Find nearest 'CA' heavy atom in other solutes (skip water & ions) + # Step 2) Find nearest 'CA' heavy atom in other solutes (skip water & ions) dmin = 9999999.0 closest = None for molnum in molnums: @@ -1332,17 +1723,18 @@ def generateDistanceRestraintsDict(system): continue if molecule.residues()[0].name() == ResName("WAT"): continue - #print (molecule) + # print (molecule) ca_atoms = molecule.selectAll(AtomName("CA")) for ca in ca_atoms: jcoord = ca.property("coordinates") - d = Vector().distance(icoord,jcoord) + d = Vector().distance(icoord, jcoord) if d < dmin: dmin = d closest = ca - # Step 3) Compute position of 'mirror' CA. Find nearest CA atom to that point + # Step 3) Compute position of 'mirror' CA. Find nearest CA atom to that + # point jcoord = closest.property("coordinates") - mirror_coord = icoord-(jcoord-icoord) + mirror_coord = icoord - (jcoord - icoord) dmin = 9999999.0 mirror_closest = None for molnum in molnums: @@ -1351,46 +1743,62 @@ def generateDistanceRestraintsDict(system): continue if molecule.residues()[0].name() == ResName("WAT"): continue - #print (molecule) + # print (molecule) ca_atoms = molecule.selectAll(AtomName("CA")) for ca in ca_atoms: jcoord = ca.property("coordinates") - d = Vector().distance(mirror_coord,jcoord) + d = Vector().distance(mirror_coord, jcoord) if d < dmin: dmin = d mirror_closest = ca - #print (mirror_closest) + # print (mirror_closest) # Step 4) Setup restraint parameters - kl = 10.00 # kcal/mol/Angstrom^2 - Dl = 2.00 # Angstrom + kl = 10.00 # kcal/mol/Angstrom^2 + Dl = 2.00 # Angstrom i0 = nearestcog_atom.index().value() i1 = closest.index().value() i2 = mirror_closest.index().value() - r01 = Vector().distance(nearestcog_atom.property("coordinates"),closest.property("coordinates")) - r02 = Vector().distance(nearestcog_atom.property("coordinates"),mirror_closest.property("coordinates")) - restraints = { (i0, i1): (r01, kl, Dl), (i0,i2): (r02, kl, Dl) } - #print restraints - #distance_restraints_dict.val = restraints - #distance_restraints_dict - #import pdb; pdb.set_trace() + r01 = Vector().distance( + nearestcog_atom.property("coordinates"), + closest.property("coordinates"), + ) + r02 = Vector().distance( + nearestcog_atom.property("coordinates"), + mirror_closest.property("coordinates"), + ) + restraints = {(i0, i1): (r01, kl, Dl), (i0, i2): (r02, kl, Dl)} + # print restraints + # distance_restraints_dict.val = restraints + # distance_restraints_dict + # import pdb; pdb.set_trace() return restraints -######## MAIN SCRIPTS ############# + +############## +# MAIN METHODS +############## + @resolveParameters def run(): try: - host = os.environ['HOSTNAME'] + host = os.environ["HOSTNAME"] except KeyError: host = "unknown" print("\n### Running Molecular Dynamics simulation on %s ###" % host) if verbose.val: - print("###================= Simulation Parameters=====================###") + print( + "###================= Simulation Parameters=====================" + "###" + ) Parameter.printAll() - print ("###===========================================================###\n") + print( + "###===========================================================" + "###\n" + ) timer = QTime() timer.start() @@ -1420,26 +1828,40 @@ def run(): if use_distance_restraints.val: restraints = None if len(distance_restraints_dict.val) == 0: - print ("Distance restraints have been activated, but none have been specified. Will autogenerate.") + print( + "Distance restraints have been activated, but none have " + "been specified. Will autogenerate." + ) restraints = generateDistanceRestraintsDict(system) # Save restraints - print ("Autogenerated distance restraints values: %s " % distance_restraints_dict) - stream = open("restraints.cfg",'w') - stream.write("distance restraints dictionary = %s\n" % restraints) + print( + "Autogenerated distance restraints values: %s " + % distance_restraints_dict + ) + stream = open("restraints.cfg", "w") + stream.write( + "distance restraints dictionary = %s\n" % restraints + ) stream.close() system = setupDistanceRestraints(system, restraints=restraints) if hydrogen_mass_repartitioning_factor.val > 1.0: - system = repartitionMasses(system, hmassfactor=hydrogen_mass_repartitioning_factor.val) + system = repartitionMasses( + system, hmassfactor=hydrogen_mass_repartitioning_factor.val + ) - # Note that this just set the mass to zero which freezes residues in OpenMM but Sire doesn't known that + # Note that this just set the mass to zero which freezes residues in + # OpenMM but Sire doesn't known that if freeze_residues.val: system = freezeResidues(system) system = setupForcefields(system, space) if debug_seed.val != 0: - print("Setting up the simulation with debugging seed %s" % debug_seed.val) + print( + "Setting up the simulation with debugging seed %s" + % debug_seed.val + ) moves = setupMoves(system, debug_seed.val, gpu.val) @@ -1453,70 +1875,107 @@ def run(): move0.setIntegrator(integrator) moves = WeightedMoves() moves.add(move0) - print("Index GPU = %s " % moves.moves()[0].integrator().getDeviceIndex()) - print("Loaded a restart file on which we have performed %d moves." % moves.nMoves()) - #Maybe include a runtime error here! + print( + "Index GPU = %s " % moves.moves()[0].integrator().getDeviceIndex() + ) + print( + "Loaded a restart file on which we have performed %d moves." + % moves.nMoves() + ) + # Maybe include a runtime error here! if minimise.val: - print ('WARNING: You are trying to minimise from a restart! Revise your config file!') + print( + "WARNING: You are trying to minimise from a restart! Revise " + "your config file!" + ) if equilibrate.val: - print ('WARNING: You are trying to equilibrate from a restart! Revise your config file!') + print( + "WARNING: You are trying to equilibrate from a restart! " + "Revise your config file!" + ) cycle_start = int(moves.nMoves() / nmoves.val) + 1 cycle_end = cycle_start + ncycles.val - if (save_coords.val): + if save_coords.val: trajectory = setupDCD(system) mdmoves = moves.moves()[0] integrator = mdmoves.integrator() - print ("###===========================================================###\n") + print( + "###===========================================================###\n" + ) if minimise.val: - print("###=======================Minimisation========================###") - print('Running minimisation.') + print( + "###=======================Minimisation========================###" + ) + print("Running minimisation.") if verbose.val: - print ("Energy before the minimisation: " + str(system.energy())) - print ('Tolerance for minimisation: ' + str(minimise_tol.val)) - print ('Maximum number of minimisation iterations: ' + str(minimise_max_iter.val)) + print("Energy before the minimisation: " + str(system.energy())) + print("Tolerance for minimisation: " + str(minimise_tol.val)) + print( + "Maximum number of minimisation iterations: " + + str(minimise_max_iter.val) + ) integrator.setConstraintType("none") - system = integrator.minimiseEnergy(system, minimise_tol.val, minimise_max_iter.val) + system = integrator.minimiseEnergy( + system, minimise_tol.val, minimise_max_iter.val + ) system.mustNowRecalculateFromScratch() if verbose.val: - print ("Energy after the minimization: " + str(system.energy())) - print ("Energy minimization done.") + print("Energy after the minimization: " + str(system.energy())) + print("Energy minimization done.") integrator.setConstraintType(constraint.val) - print("###===========================================================###\n", flush=True) + print( + "###===========================================================" + "###\n", + flush=True, + ) if equilibrate.val: - print("###======================Equilibration========================###") - print ('Running equilibration.') + print( + "###======================Equilibration========================###" + ) + print("Running equilibration.") # Here we anneal lambda (To be determined) if verbose.val: - print ('Equilibration timestep ' + str(equil_timestep.val)) - print ('Number of equilibration steps: ' + str(equil_iterations.val)) - system = integrator.equilibrateSystem(system, equil_timestep.val, equil_iterations.val) + print("Equilibration timestep " + str(equil_timestep.val)) + print( + "Number of equilibration steps: " + str(equil_iterations.val) + ) + system = integrator.equilibrateSystem( + system, equil_timestep.val, equil_iterations.val + ) system.mustNowRecalculateFromScratch() if verbose.val: - print ("Energy after the equilibration: " + str(system.energy())) - print ('Equilibration done.\n') - print("###===========================================================###\n", flush=True) - - simtime=nmoves.val*ncycles.val*timestep.val + print("Energy after the equilibration: " + str(system.energy())) + print("Equilibration done.\n") + print( + "###===========================================================" + "###\n", + flush=True, + ) + + simtime = nmoves.val * ncycles.val * timestep.val print("###=======================somd run============================###") - print ("Starting somd run...") - print ("%s moves %s cycles, %s simulation time" %(nmoves.val, ncycles.val, simtime)) + print("Starting somd run...") + print( + "%s moves %s cycles, %s simulation time" + % (nmoves.val, ncycles.val, simtime) + ) - s1 = timer.elapsed() / 1000. + s1 = timer.elapsed() / 1000.0 for i in range(cycle_start, cycle_end): - print("\nCycle = ", i, flush=True ) + print("\nCycle = ", i, flush=True) system = moves.move(system, nmoves.val, True) - if (save_coords.val): + if save_coords.val: writeSystemData(system, moves, trajectory, i) - s2 = timer.elapsed() / 1000. - print("Simulation took %d s " % ( s2 - s1)) + s2 = timer.elapsed() / 1000.0 + print("Simulation took %d s " % (s2 - s1)) print("Saving restart") Sire.Stream.save([system, moves], restart_file.val) @@ -1524,27 +1983,36 @@ def run(): @resolveParameters def runFreeNrg(): - #if (save_coords.val): + # if (save_coords.val): # buffer_freq = 500 - #else: + # else: # buffer_freq = 0 try: - host = os.environ['HOSTNAME'] + host = os.environ["HOSTNAME"] except KeyError: host = "unknown" - print("### Running Single Topology Molecular Dynamics Free Energy on %s ###" % host) + print( + "### Running Single Topology Molecular Dynamics Free Energy on %s ###" + % host + ) if verbose.val: - print("###================= Simulation Parameters=====================###") + print( + "###================= Simulation Parameters=====================" + "###" + ) Parameter.printAll() - print ("###===========================================================###\n") + print( + "###===========================================================" + "###\n" + ) timer = QTime() timer.start() outfile = open(simfile.val, "ab") lam_str = "%7.5f" % lambda_val.val - simtime=nmoves.val*ncycles.val*timestep.val + simtime = nmoves.val * ncycles.val * timestep.val # Setup the system from scratch if no restart file is available print("###================Setting up calculation=====================###") if not os.path.exists(restart_file.val): @@ -1563,7 +2031,7 @@ def runFreeNrg(): system = createSystemFreeEnergy(molecules) - if (center_solute.val): + if center_solute.val: system = centerSolute(system, space) if use_restraints.val: @@ -1572,49 +2040,121 @@ def runFreeNrg(): if use_distance_restraints.val: restraints = None if len(distance_restraints_dict.val) == 0: - print ("Distance restraints have been activated, but none have been specified. Will autogenerate.") + print( + "Distance restraints have been activated, but none have " + "been specified. Will autogenerate." + ) restraints = generateDistanceRestraintsDict(system) # Save restraints - print ("Autogenerated distance restraints values: %s " % distance_restraints_dict) - stream = open("restraints.cfg",'w') - stream.write("distance restraints dictionary = %s\n" % restraints) + print( + "Autogenerated distance restraints values: %s " + % distance_restraints_dict + ) + stream = open("restraints.cfg", "w") + stream.write( + "distance restraints dictionary = %s\n" % restraints + ) stream.close() system = setupDistanceRestraints(system, restraints=restraints) - #import pdb; pdb.set_trace() + # import pdb; pdb.set_trace() if hydrogen_mass_repartitioning_factor.val > 1.0: - system = repartitionMasses(system, hmassfactor=hydrogen_mass_repartitioning_factor.val) + system = repartitionMasses( + system, hmassfactor=hydrogen_mass_repartitioning_factor.val + ) - # Note that this just set the mass to zero which freezes residues in OpenMM but Sire doesn't known that + # Note that this just set the mass to zero which freezes residues in + # OpenMM but Sire doesn't known that if freeze_residues.val: system = freezeResidues(system) system = setupForceFieldsFreeEnergy(system, space) if debug_seed.val != 0: - print("Setting up the simulation with debugging seed %s" % debug_seed.val) + print( + "Setting up the simulation with debugging seed %s" + % debug_seed.val + ) - moves = setupMovesFreeEnergy(system, debug_seed.val, gpu.val, lambda_val.val) + moves = setupMovesFreeEnergy( + system, debug_seed.val, gpu.val, lambda_val.val + ) print("Saving restart") Sire.Stream.save([system, moves], restart_file.val) print("Setting up sim file. ") - outfile.write(bytes("#This file was generated on "+time.strftime("%c")+"\n", "UTF-8")) - outfile.write(bytes("#Using the somd command, of the molecular library Sire version <%s> \n" %Sire.__version__,"UTF-8")) - outfile.write(bytes("#For more information visit: https://github.com/michellab/Sire\n#\n","UTF-8")) - outfile.write(bytes("#General information on simulation parameters:\n", "UTF-8")) - outfile.write(bytes("#Simulation used %s moves, %s cycles and %s of simulation time \n" %(nmoves.val, - ncycles.val, simtime), "UTF-8")) - outfile.write(bytes("#Generating lambda is\t\t " + lam_str+"\n", "UTF-8")) - outfile.write(bytes("#Alchemical array is\t\t "+ str(lambda_array.val) +"\n", "UTF-8")) - outfile.write(bytes("#Generating temperature is \t"+str(temperature.val)+"\n", "UTF-8")) - outfile.write(bytes("#Energy was saved every "+str(energy_frequency.val)+ " steps \n#\n#\n", "UTF-8")) - outfile.write(bytes("# %8s %25s %25s %25s %25s %25s" % ("[step]", "[potential kcal/mol]", "[gradient kcal/mol]", - "[forward Metropolis]", "[backward Metropolis]", "[u_kl]\n"), - "UTF-8")) + outfile.write( + bytes( + "#This file was generated on " + time.strftime("%c") + "\n", + "UTF-8", + ) + ) + outfile.write( + bytes( + "#Using the somd command, of the molecular library Sire " + "version <%s> \n" + % Sire.__version__, + "UTF-8", + ) + ) + outfile.write( + bytes( + "#For more information visit: " + "https://github.com/michellab/Sire\n#\n", + "UTF-8", + ) + ) + outfile.write( + bytes("#General information on simulation parameters:\n", "UTF-8") + ) + outfile.write( + bytes( + "#Simulation used %s moves, %s cycles and %s of simulation " + "time\n" + % (nmoves.val, ncycles.val, simtime), + "UTF-8", + ) + ) + outfile.write( + bytes("#Generating lambda is\t\t " + lam_str + "\n", "UTF-8") + ) + outfile.write( + bytes( + "#Alchemical array is\t\t " + str(lambda_array.val) + "\n", + "UTF-8", + ) + ) + outfile.write( + bytes( + "#Generating temperature is \t" + str(temperature.val) + "\n", + "UTF-8", + ) + ) + outfile.write( + bytes( + "#Energy was saved every " + + str(energy_frequency.val) + + " steps \n#\n#\n", + "UTF-8", + ) + ) + outfile.write( + bytes( + "# %8s %25s %25s %25s %25s %25s" + % ( + "[step]", + "[potential kcal/mol]", + "[gradient kcal/mol]", + "[forward Metropolis]", + "[backward Metropolis]", + "[u_kl]\n", + ), + "UTF-8", + ) + ) else: system, moves = Sire.Stream.load(restart_file.val) @@ -1626,65 +2166,96 @@ def runFreeNrg(): moves.add(move0) cycle_start = int(moves.nMoves() / nmoves.val) cycle_end = cycle_start + ncycles.val - print("Index GPU = %s " % moves.moves()[0].integrator().getDeviceIndex()) - print("Loaded a restart file on which we have performed %d moves." % moves.nMoves()) + print( + "Index GPU = %s " % moves.moves()[0].integrator().getDeviceIndex() + ) + print( + "Loaded a restart file on which we have performed %d moves." + % moves.nMoves() + ) restart = True cycle_start = int(moves.nMoves() / nmoves.val) + 1 if cycle_start > maxcycles.val: - print("Maxinum number of cycles reached (%s). If you wish to extend the simulation increase the value of the parameter maxcycle." % maxcycles.val) + print( + "Maxinum number of cycles reached (%s). If you wish to extend the " + "simulation increase the value of the parameter maxcycle." + % maxcycles.val + ) sys.exit(-1) cycle_end = cycle_start + ncycles.val - if (cycle_end > maxcycles.val): + if cycle_end > maxcycles.val: cycle_end = maxcycles.val + 1 outgradients = open("gradients.dat", "a", 1) outgradients.write("# lambda_val.val %s\n" % lam_str) - - if (save_coords.val): + if save_coords.val: trajectory = setupDCD(system) mdmoves = moves.moves()[0] integrator = mdmoves.integrator() - print ("###===========================================================###\n") + print( + "###===========================================================###\n" + ) if minimise.val: - print("###=======================Minimisation========================###") - print('Running minimisation.') - #if verbose.val: + print( + "###=======================Minimisation========================###" + ) + print("Running minimisation.") + # if verbose.val: if True: - print ("Energy before the minimisation: " + str(system.energy())) - print ('Tolerance for minimisation: ' + str(minimise_tol.val)) - print ('Maximum number of minimisation iterations: ' + str(minimise_max_iter.val)) - system = integrator.minimiseEnergy(system, minimise_tol.val, minimise_max_iter.val) + print("Energy before the minimisation: " + str(system.energy())) + print("Tolerance for minimisation: " + str(minimise_tol.val)) + print( + "Maximum number of minimisation iterations: " + + str(minimise_max_iter.val) + ) + system = integrator.minimiseEnergy( + system, minimise_tol.val, minimise_max_iter.val + ) system.mustNowRecalculateFromScratch() - #if verbose.val: + # if verbose.val: if True: - print ("Energy after the minimization: " + str(system.energy())) - print ("Energy minimization done.") - print("###===========================================================###\n") + print("Energy after the minimization: " + str(system.energy())) + print("Energy minimization done.") + print( + "###===========================================================" + "###\n" + ) if equilibrate.val: - print("###======================Equilibration========================###") - print ('Running lambda equilibration to lambda=%s.' %lambda_val.val) + print( + "###======================Equilibration========================###" + ) + print("Running lambda equilibration to lambda=%s." % lambda_val.val) # Here we anneal lambda (To be determined) if verbose.val: - print ('Equilibration timestep ' + str(equil_timestep.val)) - print ('Number of equilibration steps: ' + str(equil_iterations.val)) - system = integrator.annealSystemToLambda(system, equil_timestep.val, equil_iterations.val) + print("Equilibration timestep " + str(equil_timestep.val)) + print( + "Number of equilibration steps: " + str(equil_iterations.val) + ) + system = integrator.annealSystemToLambda( + system, equil_timestep.val, equil_iterations.val + ) system.mustNowRecalculateFromScratch() if verbose.val: - print ("Energy after the annealing: " + str(system.energy())) - print ('Lambda annealing done.\n') - print("###===========================================================###\n") - + print("Energy after the annealing: " + str(system.energy())) + print("Lambda annealing done.\n") + print( + "###===========================================================" + "###\n" + ) print("###====================somd-freenrg run=======================###") - print ("Starting somd-freenrg run...") - print ("%s moves %s cycles, %s simulation time" %(nmoves.val, ncycles.val, simtime)) + print("Starting somd-freenrg run...") + print( + "%s moves %s cycles, %s simulation time" + % (nmoves.val, ncycles.val, simtime) + ) softcore_lambda = False if minimal_coordinate_saving.val: @@ -1695,7 +2266,7 @@ def runFreeNrg(): grads = {} grads[lambda_val.val] = AverageAndStddev() - s1 = timer.elapsed() / 1000. + s1 = timer.elapsed() / 1000.0 for i in range(cycle_start, cycle_end): print("\nCycle = ", i, "\n") system = moves.move(system, nmoves.val, True) @@ -1705,34 +2276,42 @@ def runFreeNrg(): mdmoves = moves.moves()[0] integrator = mdmoves.integrator() - #saving all data - beg = (nmoves.val*(i-1)) - end = nmoves.val*(i-1)+nmoves.val + # saving all data + beg = nmoves.val * (i - 1) + end = nmoves.val * (i - 1) + nmoves.val steps = list(range(beg, end, energy_frequency.val)) outdata = getAllData(integrator, steps) gradients = integrator.getGradients() - fmt =" ".join(["%8d"] + ["%25.8e"] + ["%25.8e"] + ["%25.8e"] + ["%25.8e"] + ["%25.15e"]*(len(lambda_array.val))) + fmt = " ".join( + ["%8d"] + + ["%25.8e"] + + ["%25.8e"] + + ["%25.8e"] + + ["%25.8e"] + + ["%25.15e"] * (len(lambda_array.val)) + ) np.savetxt(outfile, outdata, fmt=fmt) mean_gradient = np.average(gradients) outgradients.write("%5d %20.10f\n" % (i, mean_gradient)) for gradient in gradients: - #grads[lambda_val.val].accumulate(gradients[i-1]) + # grads[lambda_val.val].accumulate(gradients[i-1]) grads[lambda_val.val].accumulate(gradient) # Save restart print("Backing up previous restart") - cmd = "cp %s %s.previous" % (restart_file.val, restart_file.val) + cmd = f"cp {restart_file.val} {restart_file.val}.previous" os.system(cmd) - print ("Saving new restart") + print("Saving new restart") Sire.Stream.save([system, moves], restart_file.val) - s2 = timer.elapsed() / 1000. + s2 = timer.elapsed() / 1000.0 outgradients.flush() outfile.flush() outgradients.close() outfile.close() - print("Simulation took %d s " % ( s2 - s1)) - print("###===========================================================###\n") - + print("Simulation took %d s " % (s2 - s1)) + print( + "###===========================================================###\n" + ) if os.path.exists("gradients.s3"): siregrads = Sire.Stream.load("gradients.s3") @@ -1747,5 +2326,6 @@ def runFreeNrg(): # Necessary to write correct restart system.mustNowRecalculateFromScratch() -if __name__ == '__main__': + +if __name__ == "__main__": runFreeNrg() From 66a12839476065567985f52d0def8050f4275777 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 21 Jan 2022 13:45:40 +0000 Subject: [PATCH 005/148] removed unused constant dict --- wrapper/Tools/OpenMMMD.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index b76e32d68..f21fa1378 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -3,9 +3,12 @@ """ import os -import re import sys +import re +import time + +import numpy as np from Sire.Base import * # Make sure that the OPENMM_PLUGIN_DIR enviroment variable is set correctly if @@ -35,8 +38,7 @@ from Sire.Tools.DCDFile import * from Sire.Tools import Parameter, resolveParameters import Sire.Stream -import time -import numpy as np + __author__ = 'Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler' __version__ = '0.1' @@ -45,7 +47,6 @@ __email__ = 'julien.michel@ed.ac.uk' __status__ = 'Development' -MIN_MASSES = {"C": 5.96, "N": 7.96} HMR_MIN = 1.0 HMR_MAX = 4.0 From 6a70da5a8b98b46ec8c1d5d229ef0679b6e19f8f Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 8 Feb 2022 12:40:00 +0000 Subject: [PATCH 006/148] Added OpenMM energy computation --- wrapper/Tools/OpenMMMD.py | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 564606544..06bc0cf07 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -10,6 +10,11 @@ import numpy as np +import openmm.app as app +import openmm +import openmm.unit as units + + import Sire.Base # Make sure that the OPENMM_PLUGIN_DIR enviroment variable is set correctly if @@ -38,7 +43,7 @@ import Sire.Maths import Sire.Qt import Sire.Analysis -import Sire.Tools.DCDFile +from Sire.Tools.DCDFile import * from Sire.Tools import Parameter, resolveParameters import Sire.Stream @@ -1796,6 +1801,28 @@ def generateDistanceRestraintsDict(system): return restraints +def computeOpenMMEnergy(prmtop_filename, inpcrd_filename): + prmtop = app.AmberPrmtopFile(prmtop_filename) + inpcrd = app.AmberInpcrdFile(inpcrd_filename) + + system = prmtop.createSystem(nonbondedMethod=app.PME, + nonbondedCutoff=1.0*units.nanometer, + constraints=app.HBonds) + integrator = openmm.LangevinMiddleIntegrator(300.0*units.kelvin, + 1.0/units.picosecond, + 0.004*units.picoseconds) + simulation = app.Simulation(prmtop.topology, system, integrator) + context = simulation.context + + context.setPositions(inpcrd.positions) + + if inpcrd.boxVectors is not None: + context.setPeriodicBoxVectors(*inpcrd.boxVectors) + + state = context.getState(getEnergy=True) + + return state.getPotentialEnergy() / units.kilocalorie + ############## # MAIN METHODS @@ -2219,6 +2246,9 @@ def runFreeNrg(): mdmoves = moves.moves()[0] integrator = mdmoves.integrator() + energy = computeOpenMMEnergy(topfile.val, crdfile.val) + print(f'>>> OpenMM Energy: {energy}') + print( "###===========================================================###\n" ) From a11c2f7eb3ed256e726a1795e63f36a0dcbcb371 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 8 Feb 2022 15:03:27 +0000 Subject: [PATCH 007/148] added computeOpenMMEnergy to MD runs, allow setting of cutoff --- wrapper/Tools/OpenMMMD.py | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 06bc0cf07..365ca7805 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1801,17 +1801,31 @@ def generateDistanceRestraintsDict(system): return restraints -def computeOpenMMEnergy(prmtop_filename, inpcrd_filename): +def computeOpenMMEnergy(prmtop_filename, inpcrd_filename, cutoff): + """ + Compute the energy for a given AMBER parm7 and inpcrd file. + + :param str prmtop_filename: name of parm7 file + :param str inpcrd_filename: name of inpcrd file + :cutoff: cutoff in Angstrom + :type cutoff: Sire.GeneralUnit + """ + prmtop = app.AmberPrmtopFile(prmtop_filename) inpcrd = app.AmberInpcrdFile(inpcrd_filename) + cutoff = cutoff.value() + system = prmtop.createSystem(nonbondedMethod=app.PME, - nonbondedCutoff=1.0*units.nanometer, + nonbondedCutoff=cutoff*units.angstrom, constraints=app.HBonds) + integrator = openmm.LangevinMiddleIntegrator(300.0*units.kelvin, 1.0/units.picosecond, 0.004*units.picoseconds) + simulation = app.Simulation(prmtop.topology, system, integrator) + context = simulation.context context.setPositions(inpcrd.positions) @@ -1956,6 +1970,9 @@ def run(): "###===========================================================###\n" ) + energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) + print(f'OpenMM Energy (PME): {energy}\n') + if minimise.val: print( "###=======================Minimisation========================###" @@ -2246,12 +2263,14 @@ def runFreeNrg(): mdmoves = moves.moves()[0] integrator = mdmoves.integrator() - energy = computeOpenMMEnergy(topfile.val, crdfile.val) - print(f'>>> OpenMM Energy: {energy}') print( "###===========================================================###\n" ) + + energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) + print(f'Raw OpenMM Energy (PME, may be different from below): {energy}\n') + if minimise.val: print( "###=======================Minimisation========================###" From e2182700ae739a1473d15d960c6e2c93f9dc7e7e Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 9 Feb 2022 08:36:51 +0000 Subject: [PATCH 008/148] added initial support for OpenMMPMEFEP; fixed hostname problem --- wrapper/Tools/OpenMMMD.py | 57 +++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 365ca7805..c1b9410e4 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -6,6 +6,7 @@ import sys import re import time +import platform as pf import warnings import numpy as np @@ -49,7 +50,7 @@ __author__ = 'Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler' -__version__ = '0.1' +__version__ = '0.2' __license__ = 'GPL' __maintainer__ = 'Julien Michel' __email__ = 'julien.michel@ed.ac.uk' @@ -233,6 +234,8 @@ "constraint", "hbonds", """The constraint model to use during dynamics.""" ) +# types: nocutoff, cutoffperiodic, cutoffnonperiodic(?) +# added: PME for FEP only cutoff_type = Parameter( "cutoff type", "cutoffperiodic", @@ -568,6 +571,9 @@ def createSystem(molecules): def setupForcefields(system, space): + """ + No PME support here. + """ print("Creating force fields... ") @@ -691,6 +697,9 @@ def setupForcefields(system, space): def setupMoves(system, debug_seed, GPUS): + """ + No PME support here. + """ print("Setting up moves...") @@ -1300,7 +1309,11 @@ def createSystemFreeEnergy(molecules): def setupForceFieldsFreeEnergy(system, space): - r"""sets up the force field for the free energy calculation + r"""Sets up the force field for the free energy calculation + + FIXME: For the moment we only check if cutoff_type is not nocutoff + and so also allow the RF setup for PME. + Parameters ---------- system : Sire.system @@ -1544,7 +1557,10 @@ def setupForceFieldsFreeEnergy(system, space): return system -def setupMovesFreeEnergy(system, debug_seed, GPUS, lam_val): +def setupMovesFreeEnergy(system, debug_seed, gpu_idx, lam_val): + """ + Setup one Sire MD move using OpenMM. Supports PME. + """ print("Setting up moves...") @@ -1553,10 +1569,16 @@ def setupMovesFreeEnergy(system, debug_seed, GPUS, lam_val): solute_hard = system[MGName("solute_ref_hard")] solute_todummy = system[MGName("solute_ref_todummy")] solute_fromdummy = system[MGName("solute_ref_fromdummy")] - # import pdb ; pdb.set_trace() - Integrator_OpenMM = Sire.Move.OpenMMFrEnergyST( + + if cutoff_type == 'PME': + fep_cls = Sire.Move.OpenMMPMEFEP + else: # no cutoff and RF + fep_cls = Sire.Move.OpenMMFrEnergyST + + Integrator_OpenMM = fep_cls( molecules, solute, solute_hard, solute_todummy, solute_fromdummy ) + Integrator_OpenMM.setRandomSeed(debug_seed) Integrator_OpenMM.setIntegrator(integrator_type.val) Integrator_OpenMM.setFriction( @@ -1568,7 +1590,7 @@ def setupMovesFreeEnergy(system, debug_seed, GPUS, lam_val): Integrator_OpenMM.setFieldDielectric(rf_dielectric.val) Integrator_OpenMM.setAlchemicalValue(lambda_val.val) Integrator_OpenMM.setAlchemicalArray(lambda_array.val) - Integrator_OpenMM.setDeviceIndex(str(GPUS)) + Integrator_OpenMM.setDeviceIndex(str(gpu_idx)) Integrator_OpenMM.setCoulombPower(coulomb_power.val) Integrator_OpenMM.setShiftDelta(shift_delta.val) Integrator_OpenMM.setDeltatAlchemical(delta_lambda.val) @@ -1615,7 +1637,8 @@ def setupMovesFreeEnergy(system, debug_seed, GPUS, lam_val): {"velocity generator": velocity_generator}, ) - print("Created a MD move that uses OpenMM for all molecules on %s " % GPUS) + print(f'Created one MD move that uses OpenMM for all molecules on ' + 'GPU device {gpu_idx}') moves = Sire.Move.WeightedMoves() moves.add(mdmove, 1) @@ -1845,6 +1868,9 @@ def computeOpenMMEnergy(prmtop_filename, inpcrd_filename, cutoff): @resolveParameters def run(): + """ + Normal MD run. + """ try: host = os.environ["HOSTNAME"] @@ -2049,20 +2075,17 @@ def run(): @resolveParameters def runFreeNrg(): - # if (save_coords.val): - # buffer_freq = 500 - # else: - # buffer_freq = 0 + """ + Cut-and-paste for FEP runs. + """ - try: - host = os.environ["HOSTNAME"] - except KeyError: - host = "unknown" + host = pf.node() print( - "### Running Single Topology Molecular Dynamics Free Energy on %s ###" - % host + '### Running Single Topology Molecular Dynamics Free Energy ' + f'(v{__version__}) on {host} ###' ) + if verbose.val: print( "###================= Simulation Parameters=====================" From 0e3c9293c1f50af5f96c005f9d7bf5456b1cd12b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 9 Feb 2022 08:53:26 +0000 Subject: [PATCH 009/148] fixed f-string --- wrapper/Tools/OpenMMMD.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index c1b9410e4..0237d570c 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -234,7 +234,7 @@ "constraint", "hbonds", """The constraint model to use during dynamics.""" ) -# types: nocutoff, cutoffperiodic, cutoffnonperiodic(?) +# types: nocutoff, cutoffnonperiodic, cutoffperiodic # added: PME for FEP only cutoff_type = Parameter( "cutoff type", @@ -1637,8 +1637,8 @@ def setupMovesFreeEnergy(system, debug_seed, gpu_idx, lam_val): {"velocity generator": velocity_generator}, ) - print(f'Created one MD move that uses OpenMM for all molecules on ' - 'GPU device {gpu_idx}') + print('Created one MD move that uses OpenMM for all molecules on ' + f'GPU device {gpu_idx}') moves = Sire.Move.WeightedMoves() moves.add(mdmove, 1) From dba85c2a9730f77b72a63a7fa9a9b2e701a7811b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 10 Feb 2022 14:57:44 +0000 Subject: [PATCH 010/148] preparation for actual code changes --- corelib/src/libs/SireMove/openmmpmefep.cpp | 314 ++------------------- corelib/src/libs/SireMove/openmmpmefep.h | 20 +- 2 files changed, 28 insertions(+), 306 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index f5756842c..ecaed5db2 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -100,7 +100,8 @@ enum { NOCUTOFF = 0, CUTOFFNONPERIODIC = 1, - CUTOFFPERIODIC = 2 + CUTOFFPERIODIC = 2, + PME = 3 }; /** TYPES OF CONSTRAINTS IMPLEMENTED **/ @@ -377,10 +378,8 @@ QString OpenMMPMEFEP::toString() const * initialises the openMM Free energy single topology calculation * Initialise must be called before anything else happens. */ -void OpenMMPMEFEP::initialise() +void OpenMMPMEFEP::initialise(bool Debug = false) { - - bool Debug = false; if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; @@ -427,14 +426,12 @@ void OpenMMPMEFEP::initialise() int flag_cutoff; int flag_constraint; - if (CutoffType == "nocutoff") - flag_cutoff = NOCUTOFF; - else if (CutoffType == "cutoffnonperiodic") - flag_cutoff = CUTOFFNONPERIODIC; - else if (CutoffType == "cutoffperiodic") - flag_cutoff = CUTOFFPERIODIC; + // This class here only deals with PME for the time being. But we leave + // the check in place just in case. + if (CutoffType == "PME") + flag_cutoff = PME; else - throw SireError::program_bug(QObject::tr("The CutOff method has not been specified. Possible choises: nocutoff, cutoffnonperiodic, cutoffperiodic"), CODELOC); + throw SireError::program_bug(QObject::tr("The CutOff method has not been specified. Possible choices: nocutoff, cutoffnonperiodic, cutoffperiodic, PME"), CODELOC); if (Debug) qDebug() << "\nCutoffType = " << CutoffType << "\n"; @@ -502,291 +499,15 @@ void OpenMMPMEFEP::initialise() OpenMM::CustomBondForce * custom_intra_14_fromdummy = NULL; OpenMM::CustomBondForce * custom_intra_14_fromdummy_todummy = NULL; - if (flag_cutoff == NOCUTOFF) - { - if (coulomb_power > 0) - { - //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 - //JM 9/10/20 multiply Logic_mix_lam by * 0 instead of max(lam,1.0-lam) - std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" - "Hcs = (lambda^n) * 138.935456 * q_prod/sqrt(diff_cl+r^2);" - "diff_cl = (1.0-lambda) * 0.01;" - "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" - "LJ=((sigma_avg * sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg + r*r);" - "diff_lj=(1.0-lambda) * 0.1;" - "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" - "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" - "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" - "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" - "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" - "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" - "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" - "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" - "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" - "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" - "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" - "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" - "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" - "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" - "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" - "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" - "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" - "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; - - if (flag_combRules == ARITHMETIC) - { - energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - else if (flag_combRules == GEOMETRIC) - { - energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - - custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; - custom_force_field->addGlobalParameter("lam", Alchemical_value); - custom_force_field->addGlobalParameter("delta", shift_delta); - custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("SPOnOff", 0.0); - - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::NoCutoff); - - std::string intra_14_todummy = """Hcs + Hls;" - "Hcs=(lamtd^ntd)*138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamtd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltatd*sigma_avg+r*r);" - "diff_lj=(1.0-lamtd)*0.1;" - "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" - "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); - } - - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - - std::string intra_14_fromdummy = """Hcs + Hls;" - "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamfd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltafd*sigma_avg+r*r);" - "diff_lj=(1.0-lamfd)*0.1;" - "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" - "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); - } + // we only support PME here - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - - //JM 9/10/20 set lamFTD to 0 instead of max(lamftd,1-lamftd) + const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); - std::string intra_14_fromdummy_todummy = """Hcs + Hls;" - "Hcs=(lamFTD^nftd)*138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamFTD)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltaftd*sigma_avg+r*r);" - "diff_lj=(1.0-lamFTD)*0.1;" - "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" - "sigma_avg = lamftd*saend + (1-lamftd)*sastart;" - "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" - "lamFTD = max(lamftd,1-lamftd);"""; + double eps2 = (field_dielectric - 1.0) / (2 * field_dielectric + 1.0); + double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); + double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); - } - - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - - } - else - { - // coulomb_power == 0. //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 - - // JM 9/10/20 multiply Logix_mix_lam by 0 instead of max(lam,1.0-lam) - std::string energybase ="""(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" - "Hcs = 138.935456 * q_prod/sqrt(diff_cl+r^2);" - "diff_cl = (1.0-lambda) * 0.01;" - "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" - "LJ=((sigma_avg * sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg + r*r);" - "diff_lj=(1.0-lambda) * 0.1;" - "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" - "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" - "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" - "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" - "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" - "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" - "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" - "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" - "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" - "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" - "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" - "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" - "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" - "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" - "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" - "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" - "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" - "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; - - if (flag_combRules == ARITHMETIC) - { - energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - else if (flag_combRules == GEOMETRIC) - { - energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - - custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; - custom_force_field->addGlobalParameter("lam", Alchemical_value); - custom_force_field->addGlobalParameter("delta", shift_delta); - custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("SPOnOff", 0.0); - - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::NoCutoff); - - std::string intra_14_todummy = """Hcs + Hls;" - "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamtd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltatd*sigma_avg+r*r);" - "diff_lj=(1.0-lamtd)*0.1;" - "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" - "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); - } - - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - - std::string intra_14_fromdummy = """Hcs + Hls;" - "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamfd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltafd*sigma_avg+r*r);" - "diff_lj=(1.0-lamfd)*0.1;" - "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" - "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); - } - - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - - // JM 9/10/20 set lamFTD to 0.0 - - std::string intra_14_fromdummy_todummy = """Hcs + Hls;" - "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamFTD)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltaftd*sigma_avg+r*r);" - "diff_lj=(1.0-lamFTD)*0.1;" - "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" - "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" - "lamFTD = max(lamftd,1-lamftd);"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); - } - - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - } - - std::string intra_14_clj = """Hl+Hc;" - "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" - "Hc=138.935456*q_prod/r;" - "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" - "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_clj.append("sigma_avg = lamhd*saend + (1-lamhd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); - } - - custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; - custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); - - if (Debug) - { - qDebug() << "\nCut off type = " << CutoffType << "\n"; - qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta << "\n"; - } - } - else - { - //CUTOFF PERIODIC OR NON PERIODIC - - const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); - - double eps2 = (field_dielectric - 1.0) / (2 * field_dielectric + 1.0); - double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); - double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); - - if (coulomb_power > 0) + if (coulomb_power > 0) { //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 @@ -933,9 +654,10 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); } - else + else // coulomb_power <= 0 { - //coulomb_power == 0. //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 + //coulomb_power == 0. + //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 //JM 9/10/10 setting Logix_mix_lam output to 0 for lambda @@ -1115,7 +837,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Dielectric constant = " << field_dielectric; qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; } - } + } // if (coulomb_power > 0) // Andersen thermostat if (Andersen_flag == true) diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index b86e9b454..c042ba51a 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -52,9 +52,9 @@ SIREMOVE_EXPORT QDataStream& operator>>(QDataStream&, SireMove::OpenMMPMEFEP&); namespace SireMove { - /** This class implements single topology a free energy method using OpenMM. - - @author Julien Michel,Gaetano Calabro and Antonia Mey + /** This class implements single topology a free energy method using OpenMM. + + @author Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler */ class SIREMOVE_EXPORT OpenMMPMEFEP : public SireBase::ConcreteProperty { @@ -68,7 +68,7 @@ namespace SireMove { const MoleculeGroup &solutes, const MoleculeGroup &solute_hard, const MoleculeGroup &solute_todummy, - const MoleculeGroup & solute_fromdummy, + const MoleculeGroup &solute_fromdummy, bool frequent_save_velocities = false); OpenMMPMEFEP(const OpenMMPMEFEP &other); @@ -108,7 +108,7 @@ namespace SireMove { QString getCombiningRules(void); void setCombiningRules(QString); - + QString getCutoffType(void); void setCutoffType(QString); @@ -204,13 +204,13 @@ namespace SireMove { void createContext(IntegratorWorkspace &workspace, SireUnits::Dimension::Time timestep); void destroyContext(); - void updateBoxDimensions(OpenMM::State &state_openmm, - QVector> &buffered_dimensions, bool Debug, + void updateBoxDimensions(OpenMM::State &state_openmm, + QVector> &buffered_dimensions, bool Debug, AtomicVelocityWorkspace &ws); - + double getPotentialEnergyAtLambda(double lambda); void updateOpenMMContextLambda(double lambda); - boost::tuples::tuple calculateGradient(double increment_plus, + boost::tuples::tuple calculateGradient(double increment_plus, double increment_minus, double potential_energy_lambda, double beta); QVector computeReducedPerturbedEnergies(double); void emptyContainers(void); @@ -282,7 +282,7 @@ namespace SireMove { QVector pot_energies; QVector forward_Metropolis; - + QVector backward_Metropolis; QVector > reduced_perturbed_energies; From 30f91f1bf261e27c34c12db17d1cc38a6d6f5a78 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 10 Feb 2022 17:07:19 +0000 Subject: [PATCH 011/148] macros for the energy strings (for the time being) --- corelib/src/libs/SireMove/openmmpmefep.cpp | 606 ++++++++++----------- 1 file changed, 281 insertions(+), 325 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index ecaed5db2..af4cabd45 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -378,6 +378,77 @@ QString OpenMMPMEFEP::toString() const * initialises the openMM Free energy single topology calculation * Initialise must be called before anything else happens. */ + +// JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) +// JM 9/10/10 setting Logix_mix_lam output to 0 for lambda +#define ENERGYBASE(REPL) \ + "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" \ + "Hcs = " REPL " * 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" \ + "crflam = crf * src;" \ + "krflam = krf * src * src * src;" \ + "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" \ + "diff_cl = (1.0-lambda) * 0.01;" \ + "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" \ + "LJ=((sigma_avg * sigma_avg)/soft)^3;" \ + "soft=(diff_lj*delta*sigma_avg + r*r);" \ + "diff_lj=(1.0-lambda) * 0.1;" \ + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" \ + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" \ + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" \ + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" \ + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" \ + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" \ + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" \ + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" \ + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" \ + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" \ + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" \ + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" \ + "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" \ + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" \ + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" \ + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" \ + "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" \ + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));" + +#define TODUMMY(REPL) \ + "withinCutoff*(Hcs + Hls);" \ + "withinCutoff=step(cutofftd-r);" \ + "Hcs=" REPL "*138.935456*q_prod/sqrt(diff_cl+r^2);" \ + "diff_cl=(1.0-lamtd)*0.01;" \ + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" \ + "LJ=((sigma_avg*sigma_avg)/soft)^3;" \ + "soft=(diff_lj*deltatd*sigma_avg+r*r);" \ + "diff_lj=(1.0-lamtd)*0.1;" \ + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" \ + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;" + +#define FROMDUMMY(REPL) \ + "withinCutoff*(Hcs + Hls);" \ + "withinCutoff=step(cutofffd-r);" \ + "Hcs=" REPL "*138.935456*q_prod/sqrt(diff_cl+r^2);" \ + "diff_cl=(1.0-lamfd)*0.01;" \ + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" \ + "LJ=((sigma_avg*sigma_avg)/soft)^3;" \ + "soft=(diff_lj*deltafd*sigma_avg+r*r);" \ + "diff_lj=(1.0-lamfd)*0.1;" \ + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" \ + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;" + +#define FROMTODUMMY(REPL) \ + "withinCutoff*(Hcs + Hls);" \ + "withinCutoff=step(cutoffftd-r);" \ + "Hcs=" REPL "*138.935456*q_prod/sqrt(diff_cl+r^2);" \ + "diff_cl=(1.0-lamFTD)*0.01;" \ + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" \ + "LJ=((sigma_avg*sigma_avg)/soft)^3;" \ + "soft=(diff_lj*deltaftd*sigma_avg+r*r);" \ + "diff_lj=(1.0-lamFTD)*0.1;" \ + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" \ + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" \ + "lamFTD = max(lamftd,1-lamftd);" + + void OpenMMPMEFEP::initialise(bool Debug = false) { if (Debug) @@ -508,336 +579,221 @@ void OpenMMPMEFEP::initialise(bool Debug = false) double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); if (coulomb_power > 0) - { - //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 - - // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) - std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" - "Hcs = (lambda^n) * 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" - "crflam = crf * src;" - "krflam = krf * src * src * src;" - "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" - "diff_cl = (1.0-lambda) * 0.01;" - "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" - "LJ=((sigma_avg * sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg + r*r);" - "diff_lj=(1.0-lambda) * 0.1;" - "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" - "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" - "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" - "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" - "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" - "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" - "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" - "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" - "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" - "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" - "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" - "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" - "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" - "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" - "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" - "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" - "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" - "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; - - if (flag_combRules == ARITHMETIC) - { - energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - else if (flag_combRules == GEOMETRIC) - { - energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - - custom_force_field = new OpenMM::CustomNonbondedForce(energybase); - custom_force_field->setCutoffDistance(converted_cutoff_distance); - custom_force_field->addGlobalParameter("lam", Alchemical_value); - custom_force_field->addGlobalParameter("delta", shift_delta); - custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("krf", kvalue); - custom_force_field->addGlobalParameter("crf", cvalue); - custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_force_field->addGlobalParameter("SPOnOff", 0.0); - - if (flag_cutoff == CUTOFFNONPERIODIC) - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); - } - else - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - } - - // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then - // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application - // of the reaction field on the 14 pairs in Sire. - - std::string intra_14_todummy = """withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofftd-r);" - "Hcs=(lamtd^ntd)*138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamtd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltatd*sigma_avg+r*r);" - "diff_lj=(1.0-lamtd)*0.1;" - "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" - "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); - } - - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); - - std::string intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofffd-r);" - "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamfd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltafd*sigma_avg+r*r);" - "diff_lj=(1.0-lamfd)*0.1;" - "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" - "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); - } - - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); - - //JM 9/10/20 set lamFTD to 0 - std::string intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutoffftd-r);" - "Hcs=(lamFTD^nftd)*138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamFTD)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltaftd*sigma_avg+r*r);" - "diff_lj=(1.0-lamFTD)*0.1;" - "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" - "sigma_avg = lamftd*saend + (1-lamftd)*sastart;" - "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" - "lamFTD = max(lamftd,1-lamftd);"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); - } - - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); - } + { + //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 + std::string energybase = ENERGYBASE("(lambda^n)"); + + if (flag_combRules == ARITHMETIC) + { + energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + else if (flag_combRules == GEOMETRIC) + { + energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + + custom_force_field = new OpenMM::CustomNonbondedForce(energybase); + custom_force_field->setCutoffDistance(converted_cutoff_distance); + custom_force_field->addGlobalParameter("lam", Alchemical_value); + custom_force_field->addGlobalParameter("delta", shift_delta); + custom_force_field->addGlobalParameter("n", coulomb_power); + custom_force_field->addGlobalParameter("krf", kvalue); + custom_force_field->addGlobalParameter("crf", cvalue); + custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + if (flag_cutoff == CUTOFFNONPERIODIC) + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); + } + else + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + } + + // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then + // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application + // of the reaction field on the 14 pairs in Sire. + + std::string intra_14_todummy = TODUMMY("(lamtd^ntd)"); + + if (flag_combRules == ARITHMETIC) + { + intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + } + + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + + std::string intra_14_fromdummy = FROMDUMMY("(lamfd^nfd)"); + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + } + + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + + //JM 9/10/20 set lamFTD to 0 + std::string intra_14_fromdummy_todummy = FROMTODUMMY("(lamFTD^nftd"); + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + } + + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + } else // coulomb_power <= 0 - { - //coulomb_power == 0. - //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 - - //JM 9/10/10 setting Logix_mix_lam output to 0 for lambda - - std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" - "Hcs = 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" - "crflam = crf * src;" - "krflam = krf * src * src * src;" - "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" - "diff_cl = (1.0-lambda) * 0.01;" - "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" - "LJ=((sigma_avg * sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg + r*r);" - "diff_lj=(1.0-lambda) * 0.1;" - "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" - "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" - "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" - "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" - "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" - "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" - "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" - "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" - "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" - "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" - "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" - "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" - "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" - "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" - "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" - "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" - "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" - "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"""; - - if (flag_combRules == ARITHMETIC) - { - energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - else if (flag_combRules == GEOMETRIC) - { - energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - - custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; - custom_force_field->setCutoffDistance(converted_cutoff_distance); - custom_force_field->addGlobalParameter("lam", Alchemical_value); - custom_force_field->addGlobalParameter("delta", shift_delta); - custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("krf", kvalue); - custom_force_field->addGlobalParameter("crf", cvalue); - custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_force_field->addGlobalParameter("SPOnOff", 0.0); - - - if (flag_cutoff == CUTOFFNONPERIODIC) - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); - } - else - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - } - - // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) - // then the OpenMM potential energy is not equal to he Sire energy. This is caused by the - // application of the reaction field on the 14 pairs in Sire. - - - std::string intra_14_todummy = """withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofftd-r);" - "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamtd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltatd*sigma_avg+r*r);" - "diff_lj=(1.0-lamtd)*0.1;" - "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" - "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); - } - - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); - - - std::string intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofffd-r);" - "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamfd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltafd*sigma_avg+r*r);" - "diff_lj=(1.0-lamfd)*0.1;" - "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" - "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); - } - - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); - - //JM 9/10/20 always set lamFTD to 0.0 - - std::string intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutoffftd-r);" - "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamFTD)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltaftd*sigma_avg+r*r);" - "diff_lj=(1.0-lamFTD)*0.1;" - "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" - "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" - "lamFTD = max(lamftd,1-lamftd);"""; - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); - } - - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); - } - - std::string intra_14_clj = """withinCutoff*(Hl+Hc);" - "withinCutoff=step(cutoffhd-r);" - "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" - "Hc=138.935456*q_prod/r;" - "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" - "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"""; - + { + //coulomb_power == 0. + //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 + + std::string energybase = ENERGYBASE(""); + + if (flag_combRules == ARITHMETIC) + { + energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + else if (flag_combRules == GEOMETRIC) + { + energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + + custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; + custom_force_field->setCutoffDistance(converted_cutoff_distance); + custom_force_field->addGlobalParameter("lam", Alchemical_value); + custom_force_field->addGlobalParameter("delta", shift_delta); + custom_force_field->addGlobalParameter("n", coulomb_power); + custom_force_field->addGlobalParameter("krf", kvalue); + custom_force_field->addGlobalParameter("crf", cvalue); + custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + + if (flag_cutoff == CUTOFFNONPERIODIC) + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); + } + else + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + } + + // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) + // then the OpenMM potential energy is not equal to he Sire energy. This is caused by the + // application of the reaction field on the 14 pairs in Sire. + + + std::string intra_14_todummy = TODUMMY(""); + + if (flag_combRules == ARITHMETIC) + { + intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + } + + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + + + std::string intra_14_fromdummy = FROMDUMMY(""); + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + } + + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + + //JM 9/10/20 always set lamFTD to 0.0 + + std::string intra_14_fromdummy_todummy = FROMTODUMMY(""); + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + } + + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + } // columb_power == 0 + + std::string intra_14_clj = """withinCutoff*(Hl+Hc);" + "withinCutoff=step(cutoffhd-r);" + "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" + "Hc=138.935456*q_prod/r;" + "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" + "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"""; + + + if (flag_combRules == ARITHMETIC) + { + intra_14_clj.append("sigma_avg = lamhd*saend + (1-lamhd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); + } - if (flag_combRules == ARITHMETIC) - { - intra_14_clj.append("sigma_avg = lamhd*saend + (1-lamhd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); - } + custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; + custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); + custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); - custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; - custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); - custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); + //REACTION FIELD 14 IMPLEMENTATION FOR FUTURE USE - //REACTION FIELD 14 IMPLEMENTATION FOR FUTURE USE + if (Debug) + { + qDebug() << "\nCut off type = " << CutoffType; + qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; + qDebug() << "Dielectric constant = " << field_dielectric; + qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; + } - if (Debug) - { - qDebug() << "\nCut off type = " << CutoffType; - qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; - qDebug() << "Dielectric constant = " << field_dielectric; - qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; - } - } // if (coulomb_power > 0) // Andersen thermostat if (Andersen_flag == true) From 514abb6e19d0a752be5f4546d0509948e3f09fc3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 11 Feb 2022 13:08:30 +0000 Subject: [PATCH 012/148] use boost::format to deal with the 0^0 case and so eliminate the long else branch --- corelib/src/libs/SireMove/openmmpmefep.cpp | 433 +++++++++------------ 1 file changed, 177 insertions(+), 256 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index af4cabd45..fa07ff42f 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -77,7 +77,7 @@ #include #include #include - +#include using namespace SireMove; @@ -381,72 +381,81 @@ QString OpenMMPMEFEP::toString() const // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda -#define ENERGYBASE(REPL) \ - "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" \ - "Hcs = " REPL " * 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" \ - "crflam = crf * src;" \ - "krflam = krf * src * src * src;" \ - "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" \ - "diff_cl = (1.0-lambda) * 0.01;" \ - "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" \ - "LJ=((sigma_avg * sigma_avg)/soft)^3;" \ - "soft=(diff_lj*delta*sigma_avg + r*r);" \ - "diff_lj=(1.0-lambda) * 0.1;" \ - "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" \ - "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" \ - "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" \ - "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" \ - "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" \ - "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" \ - "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" \ - "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" \ - "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" \ - "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" \ - "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" \ - "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" \ - "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" \ - "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" \ - "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" \ - "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" \ - "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" \ - "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));" - -#define TODUMMY(REPL) \ - "withinCutoff*(Hcs + Hls);" \ - "withinCutoff=step(cutofftd-r);" \ - "Hcs=" REPL "*138.935456*q_prod/sqrt(diff_cl+r^2);" \ - "diff_cl=(1.0-lamtd)*0.01;" \ - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" \ - "LJ=((sigma_avg*sigma_avg)/soft)^3;" \ - "soft=(diff_lj*deltatd*sigma_avg+r*r);" \ - "diff_lj=(1.0-lamtd)*0.1;" \ - "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" \ - "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;" - -#define FROMDUMMY(REPL) \ - "withinCutoff*(Hcs + Hls);" \ - "withinCutoff=step(cutofffd-r);" \ - "Hcs=" REPL "*138.935456*q_prod/sqrt(diff_cl+r^2);" \ - "diff_cl=(1.0-lamfd)*0.01;" \ - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" \ - "LJ=((sigma_avg*sigma_avg)/soft)^3;" \ - "soft=(diff_lj*deltafd*sigma_avg+r*r);" \ - "diff_lj=(1.0-lamfd)*0.1;" \ - "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" \ - "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;" - -#define FROMTODUMMY(REPL) \ - "withinCutoff*(Hcs + Hls);" \ - "withinCutoff=step(cutoffftd-r);" \ - "Hcs=" REPL "*138.935456*q_prod/sqrt(diff_cl+r^2);" \ - "diff_cl=(1.0-lamFTD)*0.01;" \ - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" \ - "LJ=((sigma_avg*sigma_avg)/soft)^3;" \ - "soft=(diff_lj*deltaftd*sigma_avg+r*r);" \ - "diff_lj=(1.0-lamFTD)*0.1;" \ - "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" \ - "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" \ - "lamFTD = max(lamftd,1-lamftd);" +const std::string ENERGYBASE = + "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" + "Hcs = %1% * 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" + "crflam = crf * src;" + "krflam = krf * src * src * src;" + "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" + "diff_cl = (1.0-lambda) * 0.01;" + "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" + "LJ=((sigma_avg * sigma_avg)/soft)^3;" + "soft=(diff_lj*delta*sigma_avg + r*r);" + "diff_lj=(1.0-lambda) * 0.1;" + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" + "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" + "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"; + +const std::string TODUMMY = + "withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofftd-r);" + "Hcs=%1% * 138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamtd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltatd*sigma_avg+r*r);" + "diff_lj=(1.0-lamtd)*0.1;" + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"; + +const std::string FROMDUMMY = + "withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofffd-r);" + "Hcs=%1% * 138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamfd)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltafd*sigma_avg+r*r);" + "diff_lj=(1.0-lamfd)*0.1;" + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"; + +const std::string FROMTODUMMY = + "withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutoffftd-r);" + "Hcs=%1% * 138.935456*q_prod/sqrt(diff_cl+r^2);" + "diff_cl=(1.0-lamFTD)*0.01;" + "Hls=4.0*eps_avg*(LJ*LJ-LJ);" + "LJ=((sigma_avg*sigma_avg)/soft)^3;" + "soft=(diff_lj*deltaftd*sigma_avg+r*r);" + "diff_lj=(1.0-lamFTD)*0.1;" + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" + "lamFTD = max(lamftd,1-lamftd);"; + +// standard LJ term +const std::string intra_14_clj = + "withinCutoff*(Hc+Hl);" + "withinCutoff=step(cutoffhd-r);" + "Hc=138.935456*q_prod/r;" + "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" + "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" + "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"; void OpenMMPMEFEP::initialise(bool Debug = false) @@ -578,198 +587,110 @@ void OpenMMPMEFEP::initialise(bool Debug = false) double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); + std::string lam_pre; + boost::format fmt; + + + // The check is necessary to avoid nan errors on the GPUs platform caused + // by the calculation of 0^0 if (coulomb_power > 0) { - //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 - std::string energybase = ENERGYBASE("(lambda^n)"); - - if (flag_combRules == ARITHMETIC) - { - energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - else if (flag_combRules == GEOMETRIC) - { - energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - - custom_force_field = new OpenMM::CustomNonbondedForce(energybase); - custom_force_field->setCutoffDistance(converted_cutoff_distance); - custom_force_field->addGlobalParameter("lam", Alchemical_value); - custom_force_field->addGlobalParameter("delta", shift_delta); - custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("krf", kvalue); - custom_force_field->addGlobalParameter("crf", cvalue); - custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_force_field->addGlobalParameter("SPOnOff", 0.0); - - if (flag_cutoff == CUTOFFNONPERIODIC) - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); - } - else - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - } - - // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then - // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application - // of the reaction field on the 14 pairs in Sire. - - std::string intra_14_todummy = TODUMMY("(lamtd^ntd)"); - - if (flag_combRules == ARITHMETIC) - { - intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); - } - - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); - - std::string intra_14_fromdummy = FROMDUMMY("(lamfd^nfd)"); - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); - } - - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); - - //JM 9/10/20 set lamFTD to 0 - std::string intra_14_fromdummy_todummy = FROMTODUMMY("(lamFTD^nftd"); - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); - } - - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); - } - else // coulomb_power <= 0 - { - //coulomb_power == 0. - //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 - - std::string energybase = ENERGYBASE(""); - - if (flag_combRules == ARITHMETIC) - { - energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - else if (flag_combRules == GEOMETRIC) - { - energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - - custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; - custom_force_field->setCutoffDistance(converted_cutoff_distance); - custom_force_field->addGlobalParameter("lam", Alchemical_value); - custom_force_field->addGlobalParameter("delta", shift_delta); - custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("krf", kvalue); - custom_force_field->addGlobalParameter("crf", cvalue); - custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_force_field->addGlobalParameter("SPOnOff", 0.0); - - - if (flag_cutoff == CUTOFFNONPERIODIC) - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); - } - else - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - } - - // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) - // then the OpenMM potential energy is not equal to he Sire energy. This is caused by the - // application of the reaction field on the 14 pairs in Sire. - - - std::string intra_14_todummy = TODUMMY(""); - - if (flag_combRules == ARITHMETIC) - { - intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); - } - - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); - - - std::string intra_14_fromdummy = FROMDUMMY(""); - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); - } - - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); - - //JM 9/10/20 always set lamFTD to 0.0 - - std::string intra_14_fromdummy_todummy = FROMTODUMMY(""); - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); - } - - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); - } // columb_power == 0 - - std::string intra_14_clj = """withinCutoff*(Hl+Hc);" - "withinCutoff=step(cutoffhd-r);" - "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" - "Hc=138.935456*q_prod/r;" - "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" - "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"""; + lam_pre = "(lambda^n)"; + } + else + { + lam_pre = ""; + } + + fmt = boost::format(ENERGYBASE) % lam_pre; + std::string energybase = fmt.str(); + + if (flag_combRules == ARITHMETIC) + { + energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + else if (flag_combRules == GEOMETRIC) + { + energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); + } + + custom_force_field = new OpenMM::CustomNonbondedForce(energybase); + custom_force_field->setCutoffDistance(converted_cutoff_distance); + custom_force_field->addGlobalParameter("lam", Alchemical_value); + custom_force_field->addGlobalParameter("delta", shift_delta); + custom_force_field->addGlobalParameter("n", coulomb_power); + custom_force_field->addGlobalParameter("krf", kvalue); + custom_force_field->addGlobalParameter("crf", cvalue); + custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + if (flag_cutoff == CUTOFFNONPERIODIC) + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); + } + else + { + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + } + + // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then + // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application + // of the reaction field on the 14 pairs in Sire. + + fmt = boost::format(TODUMMY) % lam_pre; + std::string intra_14_todummy = fmt.str(); + + if (flag_combRules == ARITHMETIC) + { + intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + } + + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + + fmt = boost::format(FROMDUMMY) % lam_pre; + std::string intra_14_fromdummy = fmt.str(); + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + } + + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + + //JM 9/10/20 set lamFTD to 0 + fmt = boost::format(FROMTODUMMY) % lam_pre; + std::string intra_14_fromdummy_todummy = fmt.str(); + + if (flag_combRules == ARITHMETIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + } + else if (flag_combRules == GEOMETRIC) + { + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + } + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); if (flag_combRules == ARITHMETIC) { From 9fa54df40d7c727f0a4cde73b0ca31ef232679b8 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 11 Feb 2022 13:31:41 +0000 Subject: [PATCH 013/148] fixed multiplication bug in string replacement --- corelib/src/libs/SireMove/openmmpmefep.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index fa07ff42f..196de3610 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -379,11 +379,12 @@ QString OpenMMPMEFEP::toString() const * Initialise must be called before anything else happens. */ +// FIXME: remove RF specific code // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda const std::string ENERGYBASE = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" - "Hcs = %1% * 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" + "Hcs = %1% 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" "crflam = crf * src;" "krflam = krf * src * src * src;" "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" @@ -414,7 +415,7 @@ const std::string ENERGYBASE = const std::string TODUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofftd-r);" - "Hcs=%1% * 138.935456*q_prod/sqrt(diff_cl+r^2);" + "Hcs=%1% 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamtd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" @@ -426,7 +427,7 @@ const std::string TODUMMY = const std::string FROMDUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofffd-r);" - "Hcs=%1% * 138.935456*q_prod/sqrt(diff_cl+r^2);" + "Hcs=%1% 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamfd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" @@ -438,7 +439,7 @@ const std::string FROMDUMMY = const std::string FROMTODUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoffftd-r);" - "Hcs=%1% * 138.935456*q_prod/sqrt(diff_cl+r^2);" + "Hcs=%1% 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" @@ -579,8 +580,6 @@ void OpenMMPMEFEP::initialise(bool Debug = false) OpenMM::CustomBondForce * custom_intra_14_fromdummy = NULL; OpenMM::CustomBondForce * custom_intra_14_fromdummy_todummy = NULL; - // we only support PME here - const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); double eps2 = (field_dielectric - 1.0) / (2 * field_dielectric + 1.0); @@ -590,12 +589,11 @@ void OpenMMPMEFEP::initialise(bool Debug = false) std::string lam_pre; boost::format fmt; - // The check is necessary to avoid nan errors on the GPUs platform caused // by the calculation of 0^0 if (coulomb_power > 0) { - lam_pre = "(lambda^n)"; + lam_pre = "(lambda^n) *"; } else { @@ -624,6 +622,7 @@ void OpenMMPMEFEP::initialise(bool Debug = false) custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); custom_force_field->addGlobalParameter("SPOnOff", 0.0); + // FIXME: replace with PME and then switch off direct space handling if (flag_cutoff == CUTOFFNONPERIODIC) { custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); From 6e34bd3e4a19bf59ac7047839055ffb9eaf21b65 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 14 Feb 2022 13:09:58 +0000 Subject: [PATCH 014/148] fixed optional parameter; unconst std::string --- corelib/src/libs/SireMove/openmmpmefep.cpp | 44 ++++++++++++---------- corelib/src/libs/SireMove/openmmpmefep.h | 2 +- 2 files changed, 25 insertions(+), 21 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 196de3610..4bfcbe079 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -101,7 +101,7 @@ enum NOCUTOFF = 0, CUTOFFNONPERIODIC = 1, CUTOFFPERIODIC = 2, - PME = 3 + PME = 3 // only PME used here }; /** TYPES OF CONSTRAINTS IMPLEMENTED **/ @@ -450,7 +450,7 @@ const std::string FROMTODUMMY = "lamFTD = max(lamftd,1-lamftd);"; // standard LJ term -const std::string intra_14_clj = +std::string intra_14_clj = "withinCutoff*(Hc+Hl);" "withinCutoff=step(cutoffhd-r);" "Hc=138.935456*q_prod/r;" @@ -459,7 +459,7 @@ const std::string intra_14_clj = "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"; -void OpenMMPMEFEP::initialise(bool Debug = false) +void OpenMMPMEFEP::initialise(bool Debug) { if (Debug) { @@ -479,11 +479,6 @@ void OpenMMPMEFEP::initialise(bool Debug = false) const MoleculeGroup solute = this->solute.read(); - //if ( solute.isEmpty() ){ - // throw SireError::program_bug(QObject::tr("Cannot initialise OpenMMPMEFEP because solute group has not been defined"), CODELOC); - //} - - const MoleculeGroup solutehard = this->solutehard.read(); const MoleculeGroup solutetodummy = this->solutetodummy.read(); @@ -565,7 +560,11 @@ void OpenMMPMEFEP::initialise(bool Debug = false) OpenMM::Vec3(0, 6, 0), OpenMM::Vec3(0, 0, 6)); - //The Standard Non Bonded is only defined to extract 1-2,1-3,1-4 pairs from the system + // NOTE: The Standard Non Bonded is *only* defined to extract + // 1-2, 1-3 and 1-4 pairs from the system. + // All force field terms including soft-cores are "hand-coded" + // with CustomNonbondedForce, CustomBondForce, etc. (see next few + // hundred lines below). OpenMM::NonbondedForce * nonbond_openmm = new OpenMM::NonbondedForce(); nonbond_openmm->setUseDispersionCorrection(false); @@ -768,15 +767,17 @@ void OpenMMPMEFEP::initialise(bool Debug = false) OpenMM::CustomAngleForce* solute_angle_perturbation = NULL; - solute_bond_perturbation = new OpenMM::CustomBondForce("0.5*B*(r-req)^2;" - "B=bend*lambond+(1.0-lambond)*bstart;" - "req=rend*lambond+(1.0-lambond)*rstart"); + solute_bond_perturbation = new OpenMM::CustomBondForce( + "0.5*B*(r-req)^2;" + "B=bend*lambond+(1.0-lambond)*bstart;" + "req=rend*lambond+(1.0-lambond)*rstart"); solute_bond_perturbation->addGlobalParameter("lambond", Alchemical_value); - solute_angle_perturbation = new OpenMM::CustomAngleForce("0.5*A*(theta-thetaeq)^2;" - "A=aend*lamangle+(1.0-lamangle)*astart;" - "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); + solute_angle_perturbation = new OpenMM::CustomAngleForce( + "0.5*A*(theta-thetaeq)^2;" + "A=aend*lamangle+(1.0-lamangle)*astart;" + "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); solute_angle_perturbation->addGlobalParameter("lamangle", Alchemical_value); @@ -787,9 +788,11 @@ void OpenMMPMEFEP::initialise(bool Debug = false) if (Restraint_flag == true) { - positionalRestraints_openmm = new OpenMM::CustomExternalForce("k*d2;" - "d2 = max(0.0, d1 - d^2);" - "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2"); + positionalRestraints_openmm = + new OpenMM::CustomExternalForce( + "k*d2;" + "d2 = max(0.0, d1 - d^2);" + "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2"); positionalRestraints_openmm->addPerParticleParameter("xref"); positionalRestraints_openmm->addPerParticleParameter("yref"); positionalRestraints_openmm->addPerParticleParameter("zref"); @@ -806,8 +809,9 @@ void OpenMMPMEFEP::initialise(bool Debug = false) /* !! CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy is restraints involve one atom that diffuses out of the box. */ - OpenMM::CustomBondForce * custom_link_bond = new OpenMM::CustomBondForce("kl*max(0,d-dl*dl);" - "d=(r-reql)*(r-reql)"); + OpenMM::CustomBondForce * custom_link_bond = + new OpenMM::CustomBondForce("kl*max(0,d-dl*dl);" + "d=(r-reql)*(r-reql)"); custom_link_bond->addPerBondParameter("reql"); custom_link_bond->addPerBondParameter("kl"); custom_link_bond->addPerBondParameter("dl"); diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index c042ba51a..04b5ac361 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -88,7 +88,7 @@ namespace SireMove { bool isTimeReversible() const; - void initialise(); + void initialise(bool Debug = false); SireUnits::Dimension::MolarEnergy getPotentialEnergy(const System &system); From ea2b9160d09a28f198bdaeb857f2836262853952 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 14 Feb 2022 13:10:38 +0000 Subject: [PATCH 015/148] add cutoff_type to output --- wrapper/Tools/OpenMMMD.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 0237d570c..a377763f5 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -2292,7 +2292,8 @@ def runFreeNrg(): ) energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) - print(f'Raw OpenMM Energy (PME, may be different from below): {energy}\n') + print(f'Raw OpenMM Energy ({cutoff_type}, may be different from below): ' + f'{energy}\n') if minimise.val: print( From ef6b6b3b08bc80a7f5412f2e447d3e4207fc427a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 07:43:51 +0000 Subject: [PATCH 016/148] fixed string comparison --- wrapper/Tools/OpenMMMD.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index a377763f5..5be893e19 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1570,7 +1570,7 @@ def setupMovesFreeEnergy(system, debug_seed, gpu_idx, lam_val): solute_todummy = system[MGName("solute_ref_todummy")] solute_fromdummy = system[MGName("solute_ref_fromdummy")] - if cutoff_type == 'PME': + if cutoff_type.val == 'PME': fep_cls = Sire.Move.OpenMMPMEFEP else: # no cutoff and RF fep_cls = Sire.Move.OpenMMFrEnergyST @@ -2292,8 +2292,8 @@ def runFreeNrg(): ) energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) - print(f'Raw OpenMM Energy ({cutoff_type}, may be different from below): ' - f'{energy}\n') + print(f'Raw OpenMM (v{openmm.__version__}) energy ' + f'({cutoff_type}, may be different from below): {energy}\n') if minimise.val: print( From 70f44006752cb72e8781f601861abd598c8749e8 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 10:41:29 +0000 Subject: [PATCH 017/148] replace boost string manipulation with Qt --- corelib/src/libs/SireMove/openmmpmefep.cpp | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4bfcbe079..85a590dec 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -382,9 +382,9 @@ QString OpenMMPMEFEP::toString() const // FIXME: remove RF specific code // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda -const std::string ENERGYBASE = +const QString ENERGYBASE = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" - "Hcs = %1% 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" + "Hcs = %1 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" "crflam = crf * src;" "krflam = krf * src * src * src;" "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" @@ -412,10 +412,10 @@ const std::string ENERGYBASE = "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"; -const std::string TODUMMY = +const QString TODUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofftd-r);" - "Hcs=%1% 138.935456*q_prod/sqrt(diff_cl+r^2);" + "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamtd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" @@ -424,10 +424,10 @@ const std::string TODUMMY = "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"; -const std::string FROMDUMMY = +const QString FROMDUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofffd-r);" - "Hcs=%1% 138.935456*q_prod/sqrt(diff_cl+r^2);" + "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamfd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" @@ -436,10 +436,10 @@ const std::string FROMDUMMY = "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"; -const std::string FROMTODUMMY = +const QString FROMTODUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoffftd-r);" - "Hcs=%1% 138.935456*q_prod/sqrt(diff_cl+r^2);" + "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" @@ -450,7 +450,7 @@ const std::string FROMTODUMMY = "lamFTD = max(lamftd,1-lamftd);"; // standard LJ term -std::string intra_14_clj = +QString intra_14_clj = "withinCutoff*(Hc+Hl);" "withinCutoff=step(cutoffhd-r);" "Hc=138.935456*q_prod/r;" @@ -585,8 +585,7 @@ void OpenMMPMEFEP::initialise(bool Debug) double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); - std::string lam_pre; - boost::format fmt; + QString lam_pre; // The check is necessary to avoid nan errors on the GPUs platform caused // by the calculation of 0^0 @@ -599,8 +598,7 @@ void OpenMMPMEFEP::initialise(bool Debug) lam_pre = ""; } - fmt = boost::format(ENERGYBASE) % lam_pre; - std::string energybase = fmt.str(); + QString energybase = ENERGYBASE.arg(lam_pre); if (flag_combRules == ARITHMETIC) { @@ -611,7 +609,8 @@ void OpenMMPMEFEP::initialise(bool Debug) energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); } - custom_force_field = new OpenMM::CustomNonbondedForce(energybase); + custom_force_field = + new OpenMM::CustomNonbondedForce(energybase.toStdString()); custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); @@ -635,8 +634,7 @@ void OpenMMPMEFEP::initialise(bool Debug) // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application // of the reaction field on the 14 pairs in Sire. - fmt = boost::format(TODUMMY) % lam_pre; - std::string intra_14_todummy = fmt.str(); + QString intra_14_todummy = TODUMMY.arg(lam_pre); if (flag_combRules == ARITHMETIC) { @@ -647,14 +645,14 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); } - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy = + new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); - fmt = boost::format(FROMDUMMY) % lam_pre; - std::string intra_14_fromdummy = fmt.str(); + QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); if (flag_combRules == ARITHMETIC) { @@ -665,15 +663,15 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); } - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy = + new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); //JM 9/10/20 set lamFTD to 0 - fmt = boost::format(FROMTODUMMY) % lam_pre; - std::string intra_14_fromdummy_todummy = fmt.str(); + QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); if (flag_combRules == ARITHMETIC) { @@ -684,7 +682,8 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); } - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy = + new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); @@ -699,7 +698,8 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); } - custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; + custom_intra_14_clj = + new OpenMM::CustomBondForce(intra_14_clj.toStdString()) ; custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); From 1e04ec222ea3cfb07c6aae83d22e411adfac2143 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 10:44:12 +0000 Subject: [PATCH 018/148] replace "pme" with "PME" for consistency; removed unused variables --- corelib/src/libs/SireMove/openmmmdintegrator.cpp | 9 ++++----- corelib/src/libs/SireMove/openmmpmefep.h | 5 +++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmmdintegrator.cpp b/corelib/src/libs/SireMove/openmmmdintegrator.cpp index 8cadad6d3..11b470c83 100644 --- a/corelib/src/libs/SireMove/openmmmdintegrator.cpp +++ b/corelib/src/libs/SireMove/openmmmdintegrator.cpp @@ -425,11 +425,11 @@ void OpenMMMDIntegrator::initialise() flag_cutoff = CUTOFFPERIODIC; else if (CutoffType == "ewald") flag_cutoff = EWALD; - else if (CutoffType == "pme") + else if (CutoffType == "PME") flag_cutoff = PME; else throw SireError::program_bug(QObject::tr( - "The CutOff method has not been specified. Possible choices: nocutoff, cutoffnonperiodic, cutoffperiodic,ewal,pme"), CODELOC); + "The CutOff method has not been specified. Possible choices: nocutoff, cutoffnonperiodic, cutoffperiodic,ewal,PME"), CODELOC); if (Debug) qDebug() << "\nCutoffType = " << CutoffType << "\n"; @@ -1484,8 +1484,7 @@ System OpenMMMDIntegrator::equilibrateSystem(System &system, const int nmols = ws.nMolecules(); int k = 0; - double Ekin_sire = 0; - double Ekin_openmm = 0; + for (int i = 0; i < nmols; i++) { @@ -1712,7 +1711,7 @@ void OpenMMMDIntegrator::integrate(IntegratorWorkspace &workspace, const Symbol int k = 0; double Ekin_openmm=0; - double Ekin_sire=0; + for (int i = 0; i < nmols; i++) { Vector *sire_coords = ws.coordsArray(i); diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 04b5ac361..733c66230 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -43,7 +43,7 @@ SIRE_BEGIN_HEADER #ifdef SIRE_USE_OPENMM - namespace SireMove { +namespace SireMove { class OpenMMPMEFEP; } @@ -52,7 +52,8 @@ SIREMOVE_EXPORT QDataStream& operator>>(QDataStream&, SireMove::OpenMMPMEFEP&); namespace SireMove { - /** This class implements single topology a free energy method using OpenMM. + /** This class implements single topology a free energy method using + OpenMM. @author Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler */ From 3371660dadf6fdc7c1095d69266529c7f4e12845 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 10:45:04 +0000 Subject: [PATCH 019/148] updated wrapper to reflect optional parameter in ::initialise() --- wrapper/Move/OpenMMPMEFEP.pypp.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp index f15f11fb3..1356e5f67 100644 --- a/wrapper/Move/OpenMMPMEFEP.pypp.cpp +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -75,6 +75,8 @@ namespace bp = boost::python; #include +#include + #include #include @@ -91,7 +93,7 @@ void register_OpenMMPMEFEP_class(){ { //::SireMove::OpenMMPMEFEP typedef bp::class_< SireMove::OpenMMPMEFEP, bp::bases< SireMove::Integrator, SireBase::Property > > OpenMMPMEFEP_exposer_t; - OpenMMPMEFEP_exposer_t OpenMMPMEFEP_exposer = OpenMMPMEFEP_exposer_t( "OpenMMPMEFEP", "This class implements single topology a free energy method using OpenMM.\n\nAuthor: Julien Michel,Gaetano Calabro and Antonia Mey\n", bp::init< bp::optional< bool > >(( bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor") ); + OpenMMPMEFEP_exposer_t OpenMMPMEFEP_exposer = OpenMMPMEFEP_exposer_t( "OpenMMPMEFEP", "This class implements single topology a free energy method using\nOpenMM.\n\nAuthor: Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler\n", bp::init< bp::optional< bool > >(( bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor") ); bp::scope OpenMMPMEFEP_scope( OpenMMPMEFEP_exposer ); OpenMMPMEFEP_exposer.def( bp::init< SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, bp::optional< bool > >(( bp::arg("molecule_group"), bp::arg("solutes"), bp::arg("solute_hard"), bp::arg("solute_todummy"), bp::arg("solute_fromdummy"), bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor using the passed molecule groups") ); OpenMMPMEFEP_exposer.def( bp::init< SireMove::OpenMMPMEFEP const & >(( bp::arg("other") ), "Copy constructor") ); @@ -115,7 +117,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("map")=(SireBase::PropertyMap()) ) , "Create an empty workspace" ); } @@ -127,7 +129,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("molgroup"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("molgroup"), bp::arg("map")=(SireBase::PropertyMap()) ) , "Create a workspace for this integrator for the molecule group molgroup" ); } @@ -508,13 +510,14 @@ void register_OpenMMPMEFEP_class(){ } { //::SireMove::OpenMMPMEFEP::initialise - typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_function_type)( ) ; + typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_function_type)( bool ) ; initialise_function_type initialise_function_value( &::SireMove::OpenMMPMEFEP::initialise ); OpenMMPMEFEP_exposer.def( "initialise" , initialise_function_value - , "\n initialises the openMM Free energy single topology calculation\n Initialise must be called before anything else happens.\n" ); + , ( bp::arg("Debug")=(bool)(false) ) + , "" ); } { //::SireMove::OpenMMPMEFEP::integrate @@ -945,6 +948,7 @@ void register_OpenMMPMEFEP_class(){ bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); OpenMMPMEFEP_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMove::OpenMMPMEFEP >, bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + OpenMMPMEFEP_exposer.def_pickle(sire_pickle_suite< ::SireMove::OpenMMPMEFEP >()); OpenMMPMEFEP_exposer.def( "__str__", &__str__< ::SireMove::OpenMMPMEFEP > ); OpenMMPMEFEP_exposer.def( "__repr__", &__str__< ::SireMove::OpenMMPMEFEP > ); } From 209a2ee6b6b4d8948fa2830f16e8ae3640b26e99 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 12:54:01 +0000 Subject: [PATCH 020/148] proper units for OpenMM energy --- wrapper/Tools/OpenMMMD.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 5be893e19..33b15be4d 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1189,8 +1189,6 @@ def createSystemFreeEnergy(molecules): ) sys.exit(-1) - # solute = moleculeList[0] - lig_name = solute.residue(ResIdx(0)).name().value() solute = solute.edit().rename(lig_name).commit() @@ -1858,7 +1856,8 @@ def computeOpenMMEnergy(prmtop_filename, inpcrd_filename, cutoff): state = context.getState(getEnergy=True) - return state.getPotentialEnergy() / units.kilocalorie + return state.getPotentialEnergy().value_in_unit( + units.kilocalorie / units.mole) ############## @@ -2113,9 +2112,9 @@ def runFreeNrg(): amber = Sire.IO.Amber() if os.path.exists(s3file.val): - (molecules, space) = Sire.Stream.load(s3file.val) + molecules, space = Sire.Stream.load(s3file.val) else: - (molecules, space) = amber.readCrdTop(crdfile.val, topfile.val) + molecules, space = amber.readCrdTop(crdfile.val, topfile.val) Sire.Stream.save((molecules, space), s3file.val) system = createSystemFreeEnergy(molecules) @@ -2293,7 +2292,8 @@ def runFreeNrg(): energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) print(f'Raw OpenMM (v{openmm.__version__}) energy ' - f'({cutoff_type}, may be different from below): {energy}\n') + f'({cutoff_type}, may be different from below): {energy:.2f} ' + 'kcal mol-1\n') if minimise.val: print( From b6ab0d58d71a6223faf3eab87358d27a508d10e3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 12:54:27 +0000 Subject: [PATCH 021/148] debugging messages --- corelib/src/libs/SireMove/openmmpmefep.cpp | 38 ++++++++++++++++++---- 1 file changed, 31 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 85a590dec..9fba611c7 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -402,12 +402,12 @@ const QString ENERGYBASE = "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" - "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2 , D_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2, D_lam);" "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" - "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2) , D_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2), D_mix);" "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"; @@ -450,7 +450,7 @@ const QString FROMTODUMMY = "lamFTD = max(lamftd,1-lamftd);"; // standard LJ term -QString intra_14_clj = +const QString INTRA_14_CLJ = "withinCutoff*(Hc+Hl);" "withinCutoff=step(cutoffhd-r);" "Hc=138.935456*q_prod/r;" @@ -509,9 +509,6 @@ void OpenMMPMEFEP::initialise(bool Debug) else throw SireError::program_bug(QObject::tr("The CutOff method has not been specified. Possible choices: nocutoff, cutoffnonperiodic, cutoffperiodic, PME"), CODELOC); - if (Debug) - qDebug() << "\nCutoffType = " << CutoffType << "\n"; - int flag_combRules; if (combiningRules == "arithmetic") @@ -609,6 +606,11 @@ void OpenMMPMEFEP::initialise(bool Debug) energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); } + if (Debug) + { + qDebug() << "energybase" << energybase; + } + custom_force_field = new OpenMM::CustomNonbondedForce(energybase.toStdString()); custom_force_field->setCutoffDistance(converted_cutoff_distance); @@ -645,6 +647,11 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); } + if (Debug) + { + qDebug() << "intra_14_todummy\n" << intra_14_todummy; + } + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); @@ -663,6 +670,11 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); } + if (Debug) + { + qDebug() << "intra_14_fromdummy:\n" << intra_14_fromdummy; + } + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); @@ -682,6 +694,11 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); } + if (Debug) + { + qDebug() << "intra_14_fromtodummy:\n" << intra_14_fromdummy_todummy; + } + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); @@ -689,6 +706,8 @@ void OpenMMPMEFEP::initialise(bool Debug) custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + QString intra_14_clj(INTRA_14_CLJ); + if (flag_combRules == ARITHMETIC) { intra_14_clj.append("sigma_avg = lamhd*saend + (1-lamhd)*sastart;"); @@ -698,6 +717,11 @@ void OpenMMPMEFEP::initialise(bool Debug) intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); } + if (Debug) + { + qDebug() << "custom_intra_14_clj:\n" << intra_14_clj; + } + custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()) ; custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); @@ -707,7 +731,7 @@ void OpenMMPMEFEP::initialise(bool Debug) if (Debug) { - qDebug() << "\nCut off type = " << CutoffType; + qDebug() << "\nCutoff type = " << CutoffType; qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; qDebug() << "Dielectric constant = " << field_dielectric; qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; From 8edafb6873cbcc48386a40a58d04a65036b43e34 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 13:39:39 +0000 Subject: [PATCH 022/148] slightly better version detecting the perturbed molecules --- corelib/src/libs/SireMove/openmmpmefep.cpp | 10 +++++----- wrapper/Tools/OpenMMMD.py | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 9fba611c7..4ecd7ff3f 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -608,7 +608,7 @@ void OpenMMPMEFEP::initialise(bool Debug) if (Debug) { - qDebug() << "energybase" << energybase; + qDebug() << "energybase:" << energybase; } custom_force_field = @@ -649,7 +649,7 @@ void OpenMMPMEFEP::initialise(bool Debug) if (Debug) { - qDebug() << "intra_14_todummy\n" << intra_14_todummy; + qDebug() << "intra_14_todummy:" << intra_14_todummy; } custom_intra_14_todummy = @@ -672,7 +672,7 @@ void OpenMMPMEFEP::initialise(bool Debug) if (Debug) { - qDebug() << "intra_14_fromdummy:\n" << intra_14_fromdummy; + qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; } custom_intra_14_fromdummy = @@ -696,7 +696,7 @@ void OpenMMPMEFEP::initialise(bool Debug) if (Debug) { - qDebug() << "intra_14_fromtodummy:\n" << intra_14_fromdummy_todummy; + qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; } custom_intra_14_fromdummy_todummy = @@ -719,7 +719,7 @@ void OpenMMPMEFEP::initialise(bool Debug) if (Debug) { - qDebug() << "custom_intra_14_clj:\n" << intra_14_clj; + qDebug() << "custom_intra_14_clj:" << intra_14_clj; } custom_intra_14_clj = diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 33b15be4d..6aa0b31b8 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -517,7 +517,10 @@ def centerSolute(system, space): else: box_center = Sire.Maths.Vector(0.0, 0.0, 0.0) - solute = system.molecules().at(MolNum(1))[0].molecule() + # FIXME: we assume that the solute is the first in the returned list + solute_num = system.getMoleculeNumbers()[0] + solute = system.molecules().at(solute_num)[0].molecule() + assert(solute.hasProperty('perturbations')) solute_cog = Sire.FF.CenterOfGeometry(solute).point() @@ -1172,6 +1175,8 @@ def createSystemFreeEnergy(molecules): # templates in the flex/pert files. solute = None + + # FIXME: assumption that perturbed molecule is at a fixed location for molecule in moleculeList: if molecule.residue(ResIdx(0)).number() == ResNum( perturbed_resnum.val @@ -1189,6 +1194,7 @@ def createSystemFreeEnergy(molecules): ) sys.exit(-1) + # FIXME: assumption that perturbed molecule is the first residue lig_name = solute.residue(ResIdx(0)).name().value() solute = solute.edit().rename(lig_name).commit() @@ -2291,7 +2297,7 @@ def runFreeNrg(): ) energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) - print(f'Raw OpenMM (v{openmm.__version__}) energy ' + print(f'Raw OpenMM {openmm.__version__} energy ' f'({cutoff_type}, may be different from below): {energy:.2f} ' 'kcal mol-1\n') From 47cf8db2003d40972772f3291264e1247ccb2bef Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 14:22:05 +0000 Subject: [PATCH 023/148] set Debug globally for object --- corelib/src/libs/SireMove/openmmpmefep.cpp | 24 ++++++++++------------ corelib/src/libs/SireMove/openmmpmefep.h | 19 +++++++++-------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4ecd7ff3f..c4a07b37f 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -459,7 +459,7 @@ const QString INTRA_14_CLJ = "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"; -void OpenMMPMEFEP::initialise(bool Debug) +void OpenMMPMEFEP::initialise() { if (Debug) { @@ -2518,8 +2518,6 @@ void OpenMMPMEFEP::initialise(bool Debug) void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dimension::Time timestep) { - bool Debug = false; - if (Debug) { qDebug() << "In OpenMMPMEFEP::createContext()\n\n"; @@ -2794,7 +2792,6 @@ MolarEnergy OpenMMPMEFEP::getPotentialEnergy(const System &system) */ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, int max_iteration = 1) { - bool Debug = false; const MoleculeGroup moleculegroup = this->molgroup.read(); IntegratorWorkspacePtr workspace = this->createWorkspace(moleculegroup); if (system.nMolecules() != moleculegroup.nMolecules()) @@ -2863,7 +2860,6 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, SireUnits::Dimension::Time anneal_step_size, int annealing_steps) { - bool Debug = false; const double AKMAPerPs = 0.04888821; const MoleculeGroup moleculegroup = this->molgroup.read(); @@ -2932,7 +2928,7 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, // dummy buffered dimensions vector, maybe there is better solution //to this than just passing an empty vector QVector> dimensions; - updateBoxDimensions(state_openmm, dimensions, Debug, ws); + updateBoxDimensions(state_openmm, dimensions, ws); } this->destroyContext(); // Step 5. Return pointer to the workspace's system @@ -2953,7 +2949,6 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, int nmoves, bool record_stats) { createContext(workspace, timestep); - bool Debug = false; const int nats = openmm_system->getNumParticles(); AtomicVelocityWorkspace &ws = workspace.asA(); @@ -3236,7 +3231,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, //Now the box dimensions if (MCBarostat_flag == true) { - updateBoxDimensions(state_openmm, buffered_dimensions, Debug, ws); + updateBoxDimensions(state_openmm, buffered_dimensions, ws); } // Clear all buffers @@ -3325,7 +3320,6 @@ boost::tuples::tuple OpenMMPMEFEP::calculateGradient( QVector OpenMMPMEFEP::computeReducedPerturbedEnergies(double beta) { - bool Debug = false; QVector perturbed; QVector::iterator i; for (i=alchemical_array.begin(); i!=alchemical_array.end(); i++) @@ -3351,11 +3345,10 @@ void OpenMMPMEFEP::emptyContainers() reduced_perturbed_energies.clear(); } -void OpenMMPMEFEP::updateBoxDimensions(OpenMM::State &state_openmm, - QVector> &buffered_dimensions, - bool Debug, AtomicVelocityWorkspace &ws) +void OpenMMPMEFEP::updateBoxDimensions( + OpenMM::State &state_openmm, QVector> &buffered_dimensions, + AtomicVelocityWorkspace &ws) { - Debug = false; OpenMM::Vec3 a; OpenMM::Vec3 b; OpenMM::Vec3 c; @@ -3821,3 +3814,8 @@ const char* OpenMMPMEFEP::typeName() { return QMetaType::typeName(qMetaTypeId()); } + +void OpenMMPMEFEP::setDebug(bool debug) +{ + Debug = debug; +} diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 733c66230..4fa3073f8 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -66,11 +66,12 @@ namespace SireMove { OpenMMPMEFEP(bool frequent_save_velocities = false); OpenMMPMEFEP(const MoleculeGroup &molecule_group, - const MoleculeGroup &solutes, - const MoleculeGroup &solute_hard, - const MoleculeGroup &solute_todummy, - const MoleculeGroup &solute_fromdummy, - bool frequent_save_velocities = false); + const MoleculeGroup &solutes, + const MoleculeGroup &solute_hard, + const MoleculeGroup &solute_todummy, + const MoleculeGroup &solute_fromdummy, + bool frequent_save_velocities = false + ); OpenMMPMEFEP(const OpenMMPMEFEP &other); @@ -89,7 +90,7 @@ namespace SireMove { bool isTimeReversible() const; - void initialise(bool Debug = false); + void initialise(); SireUnits::Dimension::MolarEnergy getPotentialEnergy(const System &system); @@ -201,13 +202,15 @@ namespace SireMove { int getRandomSeed(void); void setRandomSeed(int); + void setDebug(bool); + private: void createContext(IntegratorWorkspace &workspace, SireUnits::Dimension::Time timestep); void destroyContext(); void updateBoxDimensions(OpenMM::State &state_openmm, - QVector> &buffered_dimensions, bool Debug, - AtomicVelocityWorkspace &ws); + QVector> &buffered_dimensions, + AtomicVelocityWorkspace &ws); double getPotentialEnergyAtLambda(double lambda); void updateOpenMMContextLambda(double lambda); From 80af4495099907d221f8622f3531727c0e3de7c7 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 14:36:08 +0000 Subject: [PATCH 024/148] set Debug globally for object; updated wrappers --- .../src/libs/SireMove/openmmfrenergyst.cpp | 24 +++++++++---------- corelib/src/libs/SireMove/openmmfrenergyst.h | 20 +++++++++------- wrapper/Move/OpenMMFrEnergyST.pypp.cpp | 16 +++++++++++-- wrapper/Move/OpenMMPMEFEP.pypp.cpp | 15 ++++++++++-- 4 files changed, 50 insertions(+), 25 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.cpp b/corelib/src/libs/SireMove/openmmfrenergyst.cpp index afe03a841..c58fdf62f 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergyst.cpp @@ -380,7 +380,6 @@ QString OpenMMFrEnergyST::toString() const void OpenMMFrEnergyST::initialise() { - bool Debug = false; if (Debug) { qDebug() << "Initialising OpenMMFrEnergyST"; @@ -2892,8 +2891,6 @@ void OpenMMFrEnergyST::initialise() void OpenMMFrEnergyST::createContext(IntegratorWorkspace &workspace, SireUnits::Dimension::Time timestep) { - bool Debug = false; - if (Debug) { qDebug() << "In OpenMMFrEnergyST::createContext()\n\n"; @@ -3170,7 +3167,6 @@ MolarEnergy OpenMMFrEnergyST::getPotentialEnergy(const System &system) */ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e-10, int max_iteration = 1) { - bool Debug = false; const MoleculeGroup moleculegroup = this->molgroup.read(); IntegratorWorkspacePtr workspace = this->createWorkspace(moleculegroup); if (system.nMolecules() != moleculegroup.nMolecules()) @@ -3239,7 +3235,6 @@ System OpenMMFrEnergyST::annealSystemToLambda(System &system, SireUnits::Dimension::Time anneal_step_size, int annealing_steps) { - bool Debug = false; const double AKMAPerPs = 0.04888821; const MoleculeGroup moleculegroup = this->molgroup.read(); @@ -3308,7 +3303,7 @@ System OpenMMFrEnergyST::annealSystemToLambda(System &system, // dummy buffered dimensions vector, maybe there is better solution //to this than just passing an empty vector QVector> dimensions; - updateBoxDimensions(state_openmm, dimensions, Debug, ws); + updateBoxDimensions(state_openmm, dimensions, ws); } this->destroyContext(); // Step 5. Return pointer to the workspace's system @@ -3329,7 +3324,6 @@ void OpenMMFrEnergyST::integrate(IntegratorWorkspace &workspace, int nmoves, bool record_stats) { createContext(workspace, timestep); - bool Debug = false; const int nats = openmm_system->getNumParticles(); AtomicVelocityWorkspace &ws = workspace.asA(); @@ -3612,7 +3606,7 @@ void OpenMMFrEnergyST::integrate(IntegratorWorkspace &workspace, //Now the box dimensions if (MCBarostat_flag == true) { - updateBoxDimensions(state_openmm, buffered_dimensions, Debug, ws); + updateBoxDimensions(state_openmm, buffered_dimensions, ws); } // Clear all buffers @@ -3701,7 +3695,6 @@ boost::tuples::tuple OpenMMFrEnergyST::calculateGradient QVector OpenMMFrEnergyST::computeReducedPerturbedEnergies(double beta) { - bool Debug = false; QVector perturbed; QVector::iterator i; for (i=alchemical_array.begin(); i!=alchemical_array.end(); i++) @@ -3727,9 +3720,10 @@ void OpenMMFrEnergyST::emptyContainers() reduced_perturbed_energies.clear(); } -void OpenMMFrEnergyST::updateBoxDimensions(OpenMM::State &state_openmm, - QVector> &buffered_dimensions, - bool Debug, AtomicVelocityWorkspace &ws) +void OpenMMFrEnergyST::updateBoxDimensions( + OpenMM::State &state_openmm, + QVector> &buffered_dimensions, + AtomicVelocityWorkspace &ws) { Debug = false; OpenMM::Vec3 a; @@ -4197,3 +4191,9 @@ const char* OpenMMFrEnergyST::typeName() { return QMetaType::typeName(qMetaTypeId()); } + + +void OpenMMFrEnergyST::setDebug(bool debug) +{ + Debug = debug; +} diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.h b/corelib/src/libs/SireMove/openmmfrenergyst.h index e40948691..0aecdcafb 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.h +++ b/corelib/src/libs/SireMove/openmmfrenergyst.h @@ -52,8 +52,8 @@ SIREMOVE_EXPORT QDataStream& operator>>(QDataStream&, SireMove::OpenMMFrEnergyST namespace SireMove { - /** This class implements single topology a free energy method using OpenMM. - + /** This class implements single topology a free energy method using OpenMM. + @author Julien Michel,Gaetano Calabro and Antonia Mey */ class SIREMOVE_EXPORT OpenMMFrEnergyST @@ -108,7 +108,7 @@ namespace SireMove { QString getCombiningRules(void); void setCombiningRules(QString); - + QString getCutoffType(void); void setCutoffType(QString); @@ -200,17 +200,19 @@ namespace SireMove { int getRandomSeed(void); void setRandomSeed(int); + void setDebug(bool); + private: void createContext(IntegratorWorkspace &workspace, SireUnits::Dimension::Time timestep); void destroyContext(); - void updateBoxDimensions(OpenMM::State &state_openmm, - QVector> &buffered_dimensions, bool Debug, - AtomicVelocityWorkspace &ws); - + void updateBoxDimensions(OpenMM::State &state_openmm, + QVector> &buffered_dimensions, + AtomicVelocityWorkspace &ws); + double getPotentialEnergyAtLambda(double lambda); void updateOpenMMContextLambda(double lambda); - boost::tuples::tuple calculateGradient(double increment_plus, + boost::tuples::tuple calculateGradient(double increment_plus, double increment_minus, double potential_energy_lambda, double beta); QVector computeReducedPerturbedEnergies(double); void emptyContainers(void); @@ -282,7 +284,7 @@ namespace SireMove { QVector pot_energies; QVector forward_Metropolis; - + QVector backward_Metropolis; QVector > reduced_perturbed_energies; diff --git a/wrapper/Move/OpenMMFrEnergyST.pypp.cpp b/wrapper/Move/OpenMMFrEnergyST.pypp.cpp index 03497cfdc..8f9c881c7 100644 --- a/wrapper/Move/OpenMMFrEnergyST.pypp.cpp +++ b/wrapper/Move/OpenMMFrEnergyST.pypp.cpp @@ -115,7 +115,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("map")=(SireBase::PropertyMap()) ) , "Create an empty workspace" ); } @@ -127,7 +127,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("molgroup"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("molgroup"), bp::arg("map")=(SireBase::PropertyMap()) ) , "Create a workspace for this integrator for the molecule group molgroup" ); } @@ -698,6 +698,18 @@ void register_OpenMMFrEnergyST_class(){ , ( bp::arg("arg0") ) , "Set the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic" ); + } + { //::SireMove::OpenMMFrEnergyST::setDebug + + typedef void ( ::SireMove::OpenMMFrEnergyST::*setDebug_function_type)( bool ) ; + setDebug_function_type setDebug_function_value( &::SireMove::OpenMMFrEnergyST::setDebug ); + + OpenMMFrEnergyST_exposer.def( + "setDebug" + , setDebug_function_value + , ( bp::arg("arg0") ) + , "" ); + } { //::SireMove::OpenMMFrEnergyST::setDeltatAlchemical diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp index 1356e5f67..270376206 100644 --- a/wrapper/Move/OpenMMPMEFEP.pypp.cpp +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -510,13 +510,12 @@ void register_OpenMMPMEFEP_class(){ } { //::SireMove::OpenMMPMEFEP::initialise - typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_function_type)( bool ) ; + typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_function_type)( ) ; initialise_function_type initialise_function_value( &::SireMove::OpenMMPMEFEP::initialise ); OpenMMPMEFEP_exposer.def( "initialise" , initialise_function_value - , ( bp::arg("Debug")=(bool)(false) ) , "" ); } @@ -701,6 +700,18 @@ void register_OpenMMPMEFEP_class(){ , ( bp::arg("arg0") ) , "Set the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic" ); + } + { //::SireMove::OpenMMPMEFEP::setDebug + + typedef void ( ::SireMove::OpenMMPMEFEP::*setDebug_function_type)( bool ) ; + setDebug_function_type setDebug_function_value( &::SireMove::OpenMMPMEFEP::setDebug ); + + OpenMMPMEFEP_exposer.def( + "setDebug" + , setDebug_function_value + , ( bp::arg("arg0") ) + , "" ); + } { //::SireMove::OpenMMPMEFEP::setDeltatAlchemical From e769c09bcedea2ed80733ed89d871bf945821430 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 15 Feb 2022 16:11:01 +0000 Subject: [PATCH 025/148] added LangevinMiddle integrator; some debugging information --- corelib/src/libs/SireMove/openmmpmefep.cpp | 43 +++++++++++++++++----- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index c4a07b37f..fdce33b99 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2520,9 +2520,9 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime { if (Debug) { - qDebug() << "In OpenMMPMEFEP::createContext()\n\n"; - qDebug() << isContextInitialised; - qDebug() << reinitialise_context; + qDebug() << "OpenMMPMEFEP::createContext(): isContextInitialised =" + << isContextInitialised << ", reinitialise_context =" + << reinitialise_context; } // Check that the openmm system has been initialised @@ -2538,7 +2538,7 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime int nats = system_openmm->getNumParticles(); if (Debug) - qDebug() << " openmm nats " << nats; + qDebug() << "openmm nats " << nats; // Integrator @@ -2556,6 +2556,8 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime integrator_openmm = new OpenMM::VariableVerletIntegrator(integration_tol); //integration tolerance error unitless else if (Integrator_type == "langevin") integrator_openmm = new OpenMM::LangevinIntegrator(converted_Temperature, converted_friction, dt); + else if (Integrator_type == "langevinmiddle") + integrator_openmm = new OpenMM::LangevinMiddleIntegrator(converted_Temperature, converted_friction, dt); else if (Integrator_type == "variablelangevin") integrator_openmm = new OpenMM::VariableLangevinIntegrator(converted_Temperature, converted_friction, integration_tol); else if (Integrator_type == "brownian") @@ -2565,13 +2567,14 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime if (Debug) { - qDebug() << "Using Integrator: " << Integrator_type; - qDebug() << "Integration step = " << dt << " ps"; + qDebug() << "Using Integrator:" << Integrator_type; + qDebug() << "Integration step =" << dt << " ps"; if (Integrator_type == "variablelangevin" || Integrator_type == "variableleapfrogverlet") { qDebug() << "Integration Tol = " << integration_tol; } + if (Integrator_type == "langevin" || Integrator_type == "variablelangevin" || Integrator_type == "brownian") { qDebug() << "Converted Friction = " << converted_friction << "1/ps"; @@ -2610,12 +2613,25 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime } delete openmm_context; - openmm_context = new OpenMM::Context(*system_openmm, *integrator_openmm, platform_openmm); + + if (Debug) + { + qDebug() << "Deleted openmm_context"; + } + + openmm_context = + new OpenMM::Context(*system_openmm, *integrator_openmm, + platform_openmm); this->isContextInitialised = true; + + if (Debug) + { + qDebug() << "New OpenMM Context created"; + } } if (Debug) - qDebug() << "\n Using OpenMM platform = " << openmm_context->getPlatform().getName().c_str() << "\n"; + qDebug() << "\nUsing OpenMM platform = " << openmm_context->getPlatform().getName().c_str() << "\n"; // Now update coordinates / velocities / dimensions with sire data AtomicVelocityWorkspace &ws = workspace.asA(); @@ -2794,21 +2810,27 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, { const MoleculeGroup moleculegroup = this->molgroup.read(); IntegratorWorkspacePtr workspace = this->createWorkspace(moleculegroup); + if (system.nMolecules() != moleculegroup.nMolecules()) { std::cerr << "Number of molecules do not agree!"; exit(1); } + workspace.edit().setSystem(system); + // Use helper function to create a Context SireUnits::Dimension::Time timestep = 0.0 * picosecond; createContext(workspace.edit(), timestep); + // Step 2 minimise OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); + // Step 3 update the positions in the system int infoMask = OpenMM::State::Positions; OpenMM::State state_openmm = openmm_context->getState(infoMask); std::vector positions_openmm = state_openmm.getPositions(); + // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system AtomicVelocityWorkspace &ws = workspace.edit().asA(); const int nmols = ws.nMolecules(); @@ -2945,8 +2967,9 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, * @param record_stats boolean that tracks recording. */ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, - const Symbol &nrg_component, SireUnits::Dimension::Time timestep, - int nmoves, bool record_stats) + const Symbol &nrg_component, + SireUnits::Dimension::Time timestep, + int nmoves, bool record_stats) { createContext(workspace, timestep); const int nats = openmm_system->getNumParticles(); From e59b0ae007993a76485712fe6fe77d01275ed6b9 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 16 Feb 2022 08:34:29 +0000 Subject: [PATCH 026/148] fixed parameter names; replaced writing to stdout with qDebug() --- corelib/src/libs/SireMove/openmmpmefep.cpp | 127 +++++++++++---------- 1 file changed, 69 insertions(+), 58 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index fdce33b99..7931f194c 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -397,7 +397,7 @@ const QString ENERGYBASE = "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" - "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2) , D_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2), D_om_lam);" "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" @@ -414,49 +414,50 @@ const QString ENERGYBASE = const QString TODUMMY = "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofftd-r);" + "withinCutoff=step(cutoff-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamtd)*0.01;" + "diff_cl=(1.0-lam)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltatd*sigma_avg+r*r);" - "diff_lj=(1.0-lamtd)*0.1;" - "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" - "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;"; + "soft=(diff_lj*delta*sigma_avg+r*r);" + "diff_lj=(1.0-lam)*0.1;" + "eps_avg = sqrt((1-lam)*(1-lam)*eaend + lam*lam*eastart + lam*(1-lam)*emix);" + "q_prod = (1-lam)*(1-lam)*qpend + lam*lam*qpstart + lam*(1-lam)*qmix;"; const QString FROMDUMMY = "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofffd-r);" + "withinCutoff=step(cutoff-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamfd)*0.01;" + "diff_cl=(1.0-lam)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltafd*sigma_avg+r*r);" - "diff_lj=(1.0-lamfd)*0.1;" - "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" - "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;"; + "soft=(diff_lj*delta*sigma_avg+r*r);" + "diff_lj=(1.0-lam)*0.1;" + "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" + "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;"; const QString FROMTODUMMY = "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutoffftd-r);" + "withinCutoff=step(cutoff-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltaftd*sigma_avg+r*r);" + "soft=(diff_lj*delta*sigma_avg+r*r);" "diff_lj=(1.0-lamFTD)*0.1;" - "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" - "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" - "lamFTD = max(lamftd,1-lamftd);"; + "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" + "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" + "lamFTD = max(lam,1-lam);"; // standard LJ term +// FIXME: does this need the pre-factor too? const QString INTRA_14_CLJ = "withinCutoff*(Hc+Hl);" - "withinCutoff=step(cutoffhd-r);" + "withinCutoff=step(cutoff-r);" "Hc=138.935456*q_prod/r;" "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" - "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" - "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;"; + "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" + "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;"; void OpenMMPMEFEP::initialise() @@ -636,15 +637,25 @@ void OpenMMPMEFEP::initialise() // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application // of the reaction field on the 14 pairs in Sire. + // FIXME: same variable name for lambda in pre-factor + if (coulomb_power > 0) + { + lam_pre = "(lam^n) *"; + } + else + { + lam_pre = ""; + } + QString intra_14_todummy = TODUMMY.arg(lam_pre); if (flag_combRules == ARITHMETIC) { - intra_14_todummy.append("sigma_avg = (1-lamtd)*saend + lamtd*sastart;"); + intra_14_todummy.append("sigma_avg = (1-lam)*saend + lam*sastart;"); } else if (flag_combRules == GEOMETRIC) { - intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); + intra_14_todummy.append("sigma_avg = sqrt((1-lam)*(1-lam)*saend + lam*lam*sastart + lam*(1-lam)*samix);"); } if (Debug) @@ -654,20 +665,20 @@ void OpenMMPMEFEP::initialise() custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + custom_intra_14_todummy->addGlobalParameter("lam", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("delta", shift_delta); + custom_intra_14_todummy->addGlobalParameter("n", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); if (flag_combRules == ARITHMETIC) { - intra_14_fromdummy.append("sigma_avg = lamfd*saend + (1-lamfd)*sastart;"); + intra_14_fromdummy.append("sigma_avg = lam*saend + (1-lam)*sastart;"); } else if (flag_combRules == GEOMETRIC) { - intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); + intra_14_fromdummy.append("sigma_avg = sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);"); } if (Debug) @@ -677,21 +688,21 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + custom_intra_14_fromdummy->addGlobalParameter("lam", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("delta", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("n", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutoff", converted_cutoff_distance); //JM 9/10/20 set lamFTD to 0 QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); if (flag_combRules == ARITHMETIC) { - intra_14_fromdummy_todummy.append("sigma_avg = lamftd*saend + (1-lamftd)*sastart;"); + intra_14_fromdummy_todummy.append("sigma_avg = lam*saend + (1-lam)*sastart;"); } else if (flag_combRules == GEOMETRIC) { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); + intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);"); } if (Debug) @@ -701,20 +712,20 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + custom_intra_14_fromdummy_todummy->addGlobalParameter("lam", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("delta", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("n", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); QString intra_14_clj(INTRA_14_CLJ); if (flag_combRules == ARITHMETIC) { - intra_14_clj.append("sigma_avg = lamhd*saend + (1-lamhd)*sastart;"); + intra_14_clj.append("sigma_avg = lam*saend + (1-lam)*sastart;"); } else if (flag_combRules == GEOMETRIC) { - intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); + intra_14_clj.append("sigma_avg = sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);"); } if (Debug) @@ -724,8 +735,8 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()) ; - custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); - custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); + custom_intra_14_clj->addGlobalParameter("lam", Alchemical_value); + custom_intra_14_clj->addGlobalParameter("cutoff", converted_cutoff_distance); //REACTION FIELD 14 IMPLEMENTATION FOR FUTURE USE @@ -793,17 +804,17 @@ void OpenMMPMEFEP::initialise() solute_bond_perturbation = new OpenMM::CustomBondForce( "0.5*B*(r-req)^2;" - "B=bend*lambond+(1.0-lambond)*bstart;" - "req=rend*lambond+(1.0-lambond)*rstart"); + "B=bend*lam+(1.0-lam)*bstart;" + "req=rend*lam+(1.0-lam)*rstart"); - solute_bond_perturbation->addGlobalParameter("lambond", Alchemical_value); + solute_bond_perturbation->addGlobalParameter("lam", Alchemical_value); solute_angle_perturbation = new OpenMM::CustomAngleForce( "0.5*A*(theta-thetaeq)^2;" - "A=aend*lamangle+(1.0-lamangle)*astart;" - "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); + "A=aend*lam+(1.0-lam)*astart;" + "thetaeq=thetaend*lam+(1.0-lam)*thetastart"); - solute_angle_perturbation->addGlobalParameter("lamangle", Alchemical_value); + solute_angle_perturbation->addGlobalParameter("lam", Alchemical_value); /************************************************************RESTRAINTS********************************************************/ @@ -2846,7 +2857,7 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); if (Debug) { - std::cout << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << + qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; } @@ -3106,8 +3117,8 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, double p_energy_lambda = state_openmm.getPotentialEnergy(); if (Debug) { - printf("Lambda = %f Potential energy = %.5f kcal/mol\n", Alchemical_value, p_energy_lambda * OpenMM::KcalPerKJ); - //exit(-1); + qDebug() << "Lambda =" << Alchemical_value << "Potential energy =" + << p_energy_lambda * OpenMM::KcalPerKJ << "kcal/mol"; } IsFiniteNumber = (p_energy_lambda <= DBL_MAX && p_energy_lambda >= -DBL_MAX); @@ -3285,19 +3296,19 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) openmm_context->setParameter("lam", lambda); //1-5 HD //1-4 Interactions if (perturbed_energies[1]) - openmm_context->setParameter("lamhd", lambda); //1-4 HD + openmm_context->setParameter("lam", lambda); //1-4 HD if (perturbed_energies[2]) - openmm_context->setParameter("lamtd", 1.0 - lambda); //1-4 To Dummy + openmm_context->setParameter("lam", 1.0 - lambda); //1-4 To Dummy if (perturbed_energies[3]) - openmm_context->setParameter("lamfd", lambda); //1-4 From Dummy + openmm_context->setParameter("lam", lambda); //1-4 From Dummy if (perturbed_energies[4]) - openmm_context->setParameter("lamftd", lambda); //1-4 From Dummy to Dummy + openmm_context->setParameter("lam", lambda); //1-4 From Dummy to Dummy //BONDED PERTURBED TERMS if (perturbed_energies[5]) - openmm_context->setParameter("lambond", lambda); //Bonds + openmm_context->setParameter("lam", lambda); //Bonds if (perturbed_energies[6]) - openmm_context->setParameter("lamangle", lambda); //Angles + openmm_context->setParameter("lam", lambda); //Angles if (perturbed_energies[7]) openmm_context->setParameter("lamdih", lambda); //Torsions } From 1009796db83b65a75475d4bc51e7eac4e82a4200 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 16 Feb 2022 12:00:43 +0000 Subject: [PATCH 027/148] further merging of energy expressions --- corelib/src/libs/SireMove/openmmpmefep.cpp | 106 +++++++-------------- 1 file changed, 37 insertions(+), 69 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 7931f194c..13f7e5c2f 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -379,7 +379,7 @@ QString OpenMMPMEFEP::toString() const * Initialise must be called before anything else happens. */ -// FIXME: remove RF specific code +// FIXME: remove RF specific code and replace with PME direct space expressions // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda const QString ENERGYBASE = @@ -410,7 +410,12 @@ const QString ENERGYBASE = "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2), D_mix);" "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" - "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));"; + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));" + "sigma_avg="; +const QString ENERGYBASE_SIGMA[2] = { + "0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));", + "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" +}; const QString TODUMMY = "withinCutoff*(Hcs + Hls);" @@ -422,7 +427,12 @@ const QString TODUMMY = "soft=(diff_lj*delta*sigma_avg+r*r);" "diff_lj=(1.0-lam)*0.1;" "eps_avg = sqrt((1-lam)*(1-lam)*eaend + lam*lam*eastart + lam*(1-lam)*emix);" - "q_prod = (1-lam)*(1-lam)*qpend + lam*lam*qpstart + lam*(1-lam)*qmix;"; + "q_prod = (1-lam)*(1-lam)*qpend + lam*lam*qpstart + lam*(1-lam)*qmix;" + "sigma_avg="; +const QString TODUMMY_SIGMA[2] = { + "(1-lam)*saend + lam*sastart;", + "sqrt((1-lam)*(1-lam)*saend + lam*lam*sastart + lam*(1-lam)*samix);" +}; const QString FROMDUMMY = "withinCutoff*(Hcs + Hls);" @@ -434,8 +444,14 @@ const QString FROMDUMMY = "soft=(diff_lj*delta*sigma_avg+r*r);" "diff_lj=(1.0-lam)*0.1;" "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" - "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;"; + "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" + "sigma_avg="; +const QString FROMDUMMY_SIGMA[2] = { + "lam*saend + (1-lam)*sastart;", + "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" +}; +// FIXME: is pre-factor lam or lamFTD? const QString FROMTODUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoff-r);" @@ -447,7 +463,12 @@ const QString FROMTODUMMY = "diff_lj=(1.0-lamFTD)*0.1;" "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" - "lamFTD = max(lam,1-lam);"; + "lamFTD = max(lam,1-lam);" + "sigma_avg="; +const QString FROMTODUMMY_SIGMA[2] = { + "lam*saend + (1-lam)*sastart;", + "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" +}; // standard LJ term // FIXME: does this need the pre-factor too? @@ -457,7 +478,12 @@ const QString INTRA_14_CLJ = "Hc=138.935456*q_prod/r;" "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" - "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;"; + "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" + "sigma_avg="; +const QString INTRA_14_CLJ_SIGMA[2] = { + "lam*saend + (1-lam)*sastart;", + "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" +}; void OpenMMPMEFEP::initialise() @@ -588,29 +614,15 @@ void OpenMMPMEFEP::initialise() // The check is necessary to avoid nan errors on the GPUs platform caused // by the calculation of 0^0 if (coulomb_power > 0) - { lam_pre = "(lambda^n) *"; - } else - { lam_pre = ""; - } QString energybase = ENERGYBASE.arg(lam_pre); - - if (flag_combRules == ARITHMETIC) - { - energybase.append("sigma_avg = 0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } - else if (flag_combRules == GEOMETRIC) - { - energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); - } + energybase.append(ENERGYBASE_SIGMA[flag_combRules]); if (Debug) - { qDebug() << "energybase:" << energybase; - } custom_force_field = new OpenMM::CustomNonbondedForce(energybase.toStdString()); @@ -639,29 +651,15 @@ void OpenMMPMEFEP::initialise() // FIXME: same variable name for lambda in pre-factor if (coulomb_power > 0) - { lam_pre = "(lam^n) *"; - } else - { lam_pre = ""; - } QString intra_14_todummy = TODUMMY.arg(lam_pre); - - if (flag_combRules == ARITHMETIC) - { - intra_14_todummy.append("sigma_avg = (1-lam)*saend + lam*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_todummy.append("sigma_avg = sqrt((1-lam)*(1-lam)*saend + lam*lam*sastart + lam*(1-lam)*samix);"); - } + intra_14_todummy.append(TODUMMY_SIGMA[flag_combRules]); if (Debug) - { qDebug() << "intra_14_todummy:" << intra_14_todummy; - } custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); @@ -671,20 +669,10 @@ void OpenMMPMEFEP::initialise() custom_intra_14_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy.append("sigma_avg = lam*saend + (1-lam)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy.append("sigma_avg = sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);"); - } + intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); if (Debug) - { qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; - } custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); @@ -695,20 +683,10 @@ void OpenMMPMEFEP::initialise() //JM 9/10/20 set lamFTD to 0 QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); - - if (flag_combRules == ARITHMETIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = lam*saend + (1-lam)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);"); - } + intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); if (Debug) - { qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; - } custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); @@ -718,20 +696,10 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); QString intra_14_clj(INTRA_14_CLJ); - - if (flag_combRules == ARITHMETIC) - { - intra_14_clj.append("sigma_avg = lam*saend + (1-lam)*sastart;"); - } - else if (flag_combRules == GEOMETRIC) - { - intra_14_clj.append("sigma_avg = sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);"); - } + intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); if (Debug) - { qDebug() << "custom_intra_14_clj:" << intra_14_clj; - } custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()) ; From 23e505d64aeb40b4ccd49e3264fa768d70adcd89 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 16 Feb 2022 19:08:01 +0000 Subject: [PATCH 028/148] removed unneeded boost header --- corelib/src/libs/SireMove/openmmpmefep.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 13f7e5c2f..0a9d39975 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -77,7 +77,6 @@ #include #include #include -#include using namespace SireMove; From a7cb7766e74218da80592260197b484ef0bf65ff Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 17 Feb 2022 07:11:50 +0000 Subject: [PATCH 029/148] unified lambda variable name in algebric expression --- corelib/src/libs/SireMove/openmmpmefep.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 0a9d39975..046b3faf8 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -384,6 +384,7 @@ QString OpenMMPMEFEP::toString() const const QString ENERGYBASE = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" "Hcs = %1 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" + "lam=lambda;" // NOTE: only for consistency with expressions below "crflam = crf * src;" "krflam = krf * src * src * src;" "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" @@ -613,7 +614,7 @@ void OpenMMPMEFEP::initialise() // The check is necessary to avoid nan errors on the GPUs platform caused // by the calculation of 0^0 if (coulomb_power > 0) - lam_pre = "(lambda^n) *"; + lam_pre = "(lam^n) *"; else lam_pre = ""; @@ -648,12 +649,6 @@ void OpenMMPMEFEP::initialise() // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application // of the reaction field on the 14 pairs in Sire. - // FIXME: same variable name for lambda in pre-factor - if (coulomb_power > 0) - lam_pre = "(lam^n) *"; - else - lam_pre = ""; - QString intra_14_todummy = TODUMMY.arg(lam_pre); intra_14_todummy.append(TODUMMY_SIGMA[flag_combRules]); From ab56be6bb95c05887190b69529b74e907ee002ac Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 17 Feb 2022 09:04:09 +0000 Subject: [PATCH 030/148] clean-up in code around custom non-bonded parameters --- corelib/src/libs/SireMove/openmmpmefep.cpp | 152 ++++++++------------- 1 file changed, 60 insertions(+), 92 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 046b3faf8..c320635e9 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1063,27 +1063,36 @@ void OpenMMPMEFEP::initialise() AtomLJs atomvdws_start = molecule.property("initial_LJ").asA(); AtomLJs atomvdws_final = molecule.property("final_LJ").asA(); - start_LJs = atomvdws_start.toVector(); + + start_LJs = atomvdws_start.toVector(); final_LJs = atomvdws_final.toVector(); } for (int j = 0; j < ljparameters.size(); j++) { - double sigma = ljparameters[j].sigma(); - double epsilon = ljparameters[j].epsilon(); - double charge = charges[j].value(); + double charge = charges[j].value(); + double sigma = ljparameters[j].sigma() * OpenMM::NmPerAngstrom; + double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; - nonbond_openmm->addParticle(charge, sigma * OpenMM::NmPerAngstrom, epsilon * OpenMM::KJPerKcal); + nonbond_openmm->addParticle(charge, sigma, epsilon); Atom atom = molecule.molecule().atoms()(j); if (molecule.hasProperty("perturbations")) { - // Is atom a hard, from dummy or to dummy type? + // Is atom a hard (changing charge and LJ), from dummy or to dummy type? bool ishard = false; bool istodummy = false; bool isfromdummy = false; + double charge_start = start_charges[j].value(); + double charge_final = final_charges[j].value(); + + double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; + double sigma_final = final_LJs[j].sigma() * OpenMM::NmPerAngstrom; + double epsilon_start = start_LJs[j].epsilon() * OpenMM::KJPerKcal; + double epsilon_final = final_LJs[j].epsilon() * OpenMM::KJPerKcal; + for (int l = 0; l < solutehard.nViews(); l++) { Selector view_atoms = solutehard.viewAt(l).atoms(); @@ -1147,117 +1156,76 @@ void OpenMMPMEFEP::initialise() }//end for } + if (ishard || istodummy || isfromdummy) + { + custom_non_bonded_params[0] = charge_start; + custom_non_bonded_params[1] = charge_final; + custom_non_bonded_params[2] = epsilon_start; + custom_non_bonded_params[3] = epsilon_final; + custom_non_bonded_params[4] = sigma_start; + custom_non_bonded_params[5] = sigma_final; + } + else + { // unperturbed atoms + custom_non_bonded_params[0] = charge; + custom_non_bonded_params[1] = charge; + custom_non_bonded_params[2] = epsilon; + custom_non_bonded_params[3] = epsilon; + custom_non_bonded_params[4] = sigma; + custom_non_bonded_params[5] = sigma; + } + + custom_non_bonded_params[6] = 0.0; //isHard + custom_non_bonded_params[7] = 0.0; //isTodummy + custom_non_bonded_params[8] = 0.0; //isFromdummy + custom_non_bonded_params[9] = 0.0; //isSolventProtein + if (ishard) - {//hard solute atom - - double charge_start = start_charges[j].value(); - double charge_final = final_charges[j].value(); - - double epsilon_start = start_LJs[j].epsilon(); - double epsilon_final = final_LJs[j].epsilon(); - double sigma_start = start_LJs[j].sigma(); - double sigma_final = final_LJs[j].sigma(); - - custom_non_bonded_params[0] = charge_start; - custom_non_bonded_params[1] = charge_final; - custom_non_bonded_params[2] = epsilon_start * OpenMM::KJPerKcal; - custom_non_bonded_params[3] = epsilon_final * OpenMM::KJPerKcal; - custom_non_bonded_params[4] = sigma_start * OpenMM::NmPerAngstrom; - custom_non_bonded_params[5] = sigma_final * OpenMM::NmPerAngstrom; + { custom_non_bonded_params[6] = 1.0; //isHard - custom_non_bonded_params[7] = 0.0; //isTodummy - custom_non_bonded_params[8] = 0.0; //isFromdummy - custom_non_bonded_params[9] = 0.0; //isSolventProtein if (Debug) qDebug() << "hard solute = " << atom.index(); } - // JM July 13 THIS NEEDS FIXING TO DEAL WITH GROUPS THAT CONTAIN MORE THAN ONE MOLECULE + // JM July 13 THIS NEEDS FIXING TO DEAL WITH GROUPS THAT CONTAIN MORE THAN ONE MOLECULE else if (istodummy) - {//to dummy solute atom - - double charge_start = start_charges[j].value(); - double charge_final = final_charges[j].value(); - double epsilon_start = start_LJs[j].epsilon(); - double epsilon_final = final_LJs[j].epsilon(); - double sigma_start = start_LJs[j].sigma(); - double sigma_final = final_LJs[j].sigma(); - - custom_non_bonded_params[0] = charge_start; - custom_non_bonded_params[1] = charge_final; - custom_non_bonded_params[2] = epsilon_start * OpenMM::KJPerKcal; - custom_non_bonded_params[3] = epsilon_final * OpenMM::KJPerKcal; - custom_non_bonded_params[4] = sigma_start * OpenMM::NmPerAngstrom; - custom_non_bonded_params[5] = sigma_final * OpenMM::NmPerAngstrom; - custom_non_bonded_params[6] = 0.0; //isHard + { custom_non_bonded_params[7] = 1.0; //isTodummy - custom_non_bonded_params[8] = 0.0; //isFromdummy - custom_non_bonded_params[9] = 0.0; //isSolventProtein if (Debug) qDebug() << "to dummy solute = " << atom.index(); } else if (isfromdummy) - {//from dummy solute atom - - double charge_start = start_charges[j].value(); - double charge_final = final_charges[j].value(); - double epsilon_start = start_LJs[j].epsilon(); - double epsilon_final = final_LJs[j].epsilon(); - double sigma_start = start_LJs[j].sigma(); - double sigma_final = final_LJs[j].sigma(); - - custom_non_bonded_params[0] = charge_start; - custom_non_bonded_params[1] = charge_final; - custom_non_bonded_params[2] = epsilon_start * OpenMM::KJPerKcal; - custom_non_bonded_params[3] = epsilon_final * OpenMM::KJPerKcal; - custom_non_bonded_params[4] = sigma_start * OpenMM::NmPerAngstrom; - custom_non_bonded_params[5] = sigma_final * OpenMM::NmPerAngstrom; - custom_non_bonded_params[6] = 0.0; //isHard - custom_non_bonded_params[7] = 0.0; //isTodummy + { custom_non_bonded_params[8] = 1.0; //isFromdummy - custom_non_bonded_params[9] = 0.0; //isSolventProtein if (Debug) qDebug() << "from dummy solute = " << atom.index(); } - else - {//What if some atoms were not perturbed at all in the pert file? Use default params - - custom_non_bonded_params[0] = charge; - custom_non_bonded_params[1] = charge; - custom_non_bonded_params[2] = epsilon * OpenMM::KJPerKcal; - custom_non_bonded_params[3] = epsilon * OpenMM::KJPerKcal; - custom_non_bonded_params[4] = sigma * OpenMM::NmPerAngstrom; - custom_non_bonded_params[5] = sigma * OpenMM::NmPerAngstrom; + { custom_non_bonded_params[6] = 1.0; //isHard - custom_non_bonded_params[7] = 0.0; //isTodummy - custom_non_bonded_params[8] = 0.0; //isFromdummy - custom_non_bonded_params[9] = 0.0; //isSolventProtein if (Debug) qDebug() << " unperturbed solute atom " << atom.index(); } - }//end if perturbation section - else - {//solvent atom like hard - - custom_non_bonded_params[0] = charge; - custom_non_bonded_params[1] = charge; - custom_non_bonded_params[2] = epsilon * OpenMM::KJPerKcal; - custom_non_bonded_params[3] = epsilon * OpenMM::KJPerKcal; - custom_non_bonded_params[4] = sigma * OpenMM::NmPerAngstrom; - custom_non_bonded_params[5] = sigma * OpenMM::NmPerAngstrom; - custom_non_bonded_params[6] = 1.0; //isHard - custom_non_bonded_params[7] = 0.0; //isTodummy - custom_non_bonded_params[8] = 0.0; //isFromdummy - custom_non_bonded_params[9] = 1.0; //isSolventProtein - - if (Debug) - qDebug() << "Solvent = " << atom.index(); - } + else + { // solvent atom like hard + custom_non_bonded_params[0] = charge; + custom_non_bonded_params[1] = charge; + custom_non_bonded_params[2] = epsilon; + custom_non_bonded_params[3] = epsilon; + custom_non_bonded_params[4] = sigma; + custom_non_bonded_params[5] = sigma; + custom_non_bonded_params[6] = 1.0; //isHard + custom_non_bonded_params[7] = 0.0; //isTodummy + custom_non_bonded_params[8] = 0.0; //isFromdummy + custom_non_bonded_params[9] = 1.0; //isSolventProtein + + if (Debug) + qDebug() << "Solvent = " << atom.index(); + } // end if perturbations if (Debug) { From b8c8f152903ec8c9072c2444fe4a634bf1f22d04 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 17 Feb 2022 14:49:10 +0000 Subject: [PATCH 031/148] made template strings static; some code rearrangement for better readability --- corelib/src/libs/SireMove/openmmpmefep.cpp | 202 ++++++++++----------- corelib/src/libs/SireMove/openmmpmefep.h | 28 ++- 2 files changed, 117 insertions(+), 113 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index c320635e9..b7d2947f0 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -381,10 +381,10 @@ QString OpenMMPMEFEP::toString() const // FIXME: remove RF specific code and replace with PME direct space expressions // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda -const QString ENERGYBASE = +tmpl_str OpenMMPMEFEP::ENERGYBASE = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" "Hcs = %1 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" - "lam=lambda;" // NOTE: only for consistency with expressions below + "lam=lambda;" // NOTE: for consistency with 1-4 dummy expressions "crflam = crf * src;" "krflam = krf * src * src * src;" "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" @@ -412,12 +412,12 @@ const QString ENERGYBASE = "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));" "sigma_avg="; -const QString ENERGYBASE_SIGMA[2] = { +tmpl_str OpenMMPMEFEP::ENERGYBASE_SIGMA[2] = { "0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));", "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" }; -const QString TODUMMY = +tmpl_str OpenMMPMEFEP::TODUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoff-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" @@ -429,12 +429,12 @@ const QString TODUMMY = "eps_avg = sqrt((1-lam)*(1-lam)*eaend + lam*lam*eastart + lam*(1-lam)*emix);" "q_prod = (1-lam)*(1-lam)*qpend + lam*lam*qpstart + lam*(1-lam)*qmix;" "sigma_avg="; -const QString TODUMMY_SIGMA[2] = { +tmpl_str OpenMMPMEFEP::TODUMMY_SIGMA[2] = { "(1-lam)*saend + lam*sastart;", "sqrt((1-lam)*(1-lam)*saend + lam*lam*sastart + lam*(1-lam)*samix);" }; -const QString FROMDUMMY = +tmpl_str OpenMMPMEFEP::FROMDUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoff-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" @@ -446,13 +446,13 @@ const QString FROMDUMMY = "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" "sigma_avg="; -const QString FROMDUMMY_SIGMA[2] = { +tmpl_str OpenMMPMEFEP::FROMDUMMY_SIGMA[2] = { "lam*saend + (1-lam)*sastart;", "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" }; // FIXME: is pre-factor lam or lamFTD? -const QString FROMTODUMMY = +tmpl_str OpenMMPMEFEP::FROMTODUMMY = "withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoff-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" @@ -465,14 +465,14 @@ const QString FROMTODUMMY = "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" "lamFTD = max(lam,1-lam);" "sigma_avg="; -const QString FROMTODUMMY_SIGMA[2] = { +tmpl_str OpenMMPMEFEP::FROMTODUMMY_SIGMA[2] = { "lam*saend + (1-lam)*sastart;", "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" }; // standard LJ term // FIXME: does this need the pre-factor too? -const QString INTRA_14_CLJ = +tmpl_str OpenMMPMEFEP::INTRA_14_CLJ = "withinCutoff*(Hc+Hl);" "withinCutoff=step(cutoff-r);" "Hc=138.935456*q_prod/r;" @@ -480,7 +480,7 @@ const QString INTRA_14_CLJ = "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" "sigma_avg="; -const QString INTRA_14_CLJ_SIGMA[2] = { +tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "lam*saend + (1-lam)*sastart;", "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" }; @@ -496,20 +496,14 @@ void OpenMMPMEFEP::initialise() } // Create a workspace using the stored molgroup - const MoleculeGroup moleculegroup = this->molgroup.read(); if (moleculegroup.isEmpty()) - { throw SireError::program_bug(QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup has not been defined"), CODELOC); - } const MoleculeGroup solute = this->solute.read(); - const MoleculeGroup solutehard = this->solutehard.read(); - const MoleculeGroup solutetodummy = this->solutetodummy.read(); - const MoleculeGroup solutefromdummy = this->solutefromdummy.read(); AtomicVelocityWorkspace ws = this->createWorkspace(moleculegroup).read().asA(); @@ -550,6 +544,7 @@ void OpenMMPMEFEP::initialise() bool flag_noperturbedconstraints = false; bool flag_constraint_water = false; + if (ConstraintType == "none") flag_constraint = NONE; else if (ConstraintType == "hbonds") @@ -593,11 +588,10 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->setUseDispersionCorrection(false); - //CUSTOM NON BONDED FORCE FIELD - + // CUSTOM NON BONDED FORCE FIELD OpenMM::CustomNonbondedForce * custom_force_field = NULL; - //1-4 interactions + // 1-4 interactions OpenMM::CustomBondForce * custom_intra_14_clj = NULL; OpenMM::CustomBondForce * custom_intra_14_todummy = NULL; OpenMM::CustomBondForce * custom_intra_14_fromdummy = NULL; @@ -605,13 +599,14 @@ void OpenMMPMEFEP::initialise() const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); + // FIXME: remove RF specific code double eps2 = (field_dielectric - 1.0) / (2 * field_dielectric + 1.0); double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); QString lam_pre; - // The check is necessary to avoid nan errors on the GPUs platform caused + // This check is necessary to avoid nan errors on the GPU platform caused // by the calculation of 0^0 if (coulomb_power > 0) lam_pre = "(lam^n) *"; @@ -635,6 +630,17 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); custom_force_field->addGlobalParameter("SPOnOff", 0.0); + custom_force_field->addPerParticleParameter("qstart"); + custom_force_field->addPerParticleParameter("qend"); + custom_force_field->addPerParticleParameter("epstart"); + custom_force_field->addPerParticleParameter("epend"); + custom_force_field->addPerParticleParameter("sigmastart"); + custom_force_field->addPerParticleParameter("sigmaend"); + custom_force_field->addPerParticleParameter("isHD"); + custom_force_field->addPerParticleParameter("isTD"); + custom_force_field->addPerParticleParameter("isFD"); + custom_force_field->addPerParticleParameter("isSolvent"); + // FIXME: replace with PME and then switch off direct space handling if (flag_cutoff == CUTOFFNONPERIODIC) { @@ -662,6 +668,16 @@ void OpenMMPMEFEP::initialise() custom_intra_14_todummy->addGlobalParameter("n", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_intra_14_todummy->addPerBondParameter("qpstart"); + custom_intra_14_todummy->addPerBondParameter("qpend"); + custom_intra_14_todummy->addPerBondParameter("qmix"); + custom_intra_14_todummy->addPerBondParameter("eastart"); + custom_intra_14_todummy->addPerBondParameter("eaend"); + custom_intra_14_todummy->addPerBondParameter("emix"); + custom_intra_14_todummy->addPerBondParameter("sastart"); + custom_intra_14_todummy->addPerBondParameter("saend"); + custom_intra_14_todummy->addPerBondParameter("samix"); + QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); @@ -675,6 +691,16 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy->addGlobalParameter("n", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_intra_14_fromdummy->addPerBondParameter("qpstart"); + custom_intra_14_fromdummy->addPerBondParameter("qpend"); + custom_intra_14_fromdummy->addPerBondParameter("qmix"); + custom_intra_14_fromdummy->addPerBondParameter("eastart"); + custom_intra_14_fromdummy->addPerBondParameter("eaend"); + custom_intra_14_fromdummy->addPerBondParameter("emix"); + custom_intra_14_fromdummy->addPerBondParameter("sastart"); + custom_intra_14_fromdummy->addPerBondParameter("saend"); + custom_intra_14_fromdummy->addPerBondParameter("samix"); + //JM 9/10/20 set lamFTD to 0 QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); @@ -689,6 +715,16 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy->addGlobalParameter("n", coulomb_power); custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_intra_14_fromdummy_todummy->addPerBondParameter("qpstart"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("qpend"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("qmix"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("eastart"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("eaend"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("emix"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("sastart"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("saend"); + custom_intra_14_fromdummy_todummy->addPerBondParameter("samix"); + QString intra_14_clj(INTRA_14_CLJ); intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); @@ -700,7 +736,15 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj->addGlobalParameter("lam", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoff", converted_cutoff_distance); - //REACTION FIELD 14 IMPLEMENTATION FOR FUTURE USE + custom_intra_14_clj->addPerBondParameter("qpstart"); + custom_intra_14_clj->addPerBondParameter("qpend"); + custom_intra_14_clj->addPerBondParameter("qmix"); + custom_intra_14_clj->addPerBondParameter("eastart"); + custom_intra_14_clj->addPerBondParameter("eaend"); + custom_intra_14_clj->addPerBondParameter("emix"); + custom_intra_14_clj->addPerBondParameter("sastart"); + custom_intra_14_clj->addPerBondParameter("saend"); + custom_intra_14_clj->addPerBondParameter("samix"); if (Debug) { @@ -771,6 +815,11 @@ void OpenMMPMEFEP::initialise() solute_bond_perturbation->addGlobalParameter("lam", Alchemical_value); + solute_bond_perturbation->addPerBondParameter("bstart"); + solute_bond_perturbation->addPerBondParameter("bend"); + solute_bond_perturbation->addPerBondParameter("rstart"); + solute_bond_perturbation->addPerBondParameter("rend"); + solute_angle_perturbation = new OpenMM::CustomAngleForce( "0.5*A*(theta-thetaeq)^2;" "A=aend*lam+(1.0-lam)*astart;" @@ -778,6 +827,11 @@ void OpenMMPMEFEP::initialise() solute_angle_perturbation->addGlobalParameter("lam", Alchemical_value); + solute_angle_perturbation->addPerAngleParameter("astart"); + solute_angle_perturbation->addPerAngleParameter("aend"); + solute_angle_perturbation->addPerAngleParameter("thetastart"); + solute_angle_perturbation->addPerAngleParameter("thetaend"); + /************************************************************RESTRAINTS********************************************************/ @@ -825,7 +879,7 @@ void OpenMMPMEFEP::initialise() // To avoid possible mismatch between the index in which atoms are added to the openmm system arrays and // their atomic numbers in sire, one array is populated while filling up the openmm global arrays - // AtomNumtoopenmmIndex + // AtomNumtoopenmmIndex QHash AtomNumToOpenMMIndex; for (int i = 0; i < nmols; ++i) @@ -851,12 +905,14 @@ void OpenMMPMEFEP::initialise() AtomNum atnum = at.number(); if (Debug) - qDebug() << " openMM_index " << system_index << " Sire Atom Number " << atnum.toString() << " Mass particle = " << m[j]; + qDebug() << " openMM_index " << system_index << " Sire Atom Number " + << atnum.toString() << " Mass particle = " << m[j]; AtomNumToOpenMMIndex[atnum.value()] = system_index; // JM Nov 12 - // The code below implements a ThreeParticleAverageSite for virtual sites for EPW atoms present in a WAT residue + // The code below implements a ThreeParticleAverageSite for virtual + // sites for EPW atoms present in a WAT residue // This is very AMBER specific. AtomName atname = at.name(); @@ -891,28 +947,25 @@ void OpenMMPMEFEP::initialise() AtomName at0name = mol.select(bond_ff.atom0()).name(); AtomName at1name = mol.select(bond_ff.atom1()).name(); - // qDebug() << " at0name " << at0name.toString() << " at1name " << at1name.toString(); - - if ((at0name == AtomName("O") and at1name == AtomName("H1")) or ( at0name == AtomName("H1") and at1name == AtomName("O"))) + if ((at0name == AtomName("O") and at1name == AtomName("H1")) + or ( at0name == AtomName("H1") and at1name == AtomName("O"))) { distoh = r0; } - else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) + else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) + or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) { disthh = r0; } - else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) + else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) + or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) { distoe = r0; } } - if (distoh < 0 or disthh < 0 or distoe < 0) - { - throw SireError::program_bug(QObject::tr( "Could not find expected atoms in TIP4P water molecule."), CODELOC); - } - - //qDebug() << " distoe " << distoe << " distoh " << distoh << " disthh " << disthh; + if (distoh < 0.0 or disthh < 0.0 or distoe < 0.0) + throw SireError::program_bug(QObject::tr("Could not find expected atoms in TIP4P water molecule."), CODELOC); double weightH = distoe / sqrt((distoh * distoh) - (0.25 * disthh * disthh)); @@ -921,9 +974,15 @@ void OpenMMPMEFEP::initialise() int h2_index = AtomNumToOpenMMIndex[h2atom.number().value()]; if (Debug) - qDebug() << "virtual site " << system_index << " o " << o_index << " h1 " << h1_index << " h2 " << h2_index << " 1 - weightH " << 1 - weightH << " weightH/2 " << weightH / 2; + qDebug() << "virtual site " << system_index << " o " + << o_index << " h1 " << h1_index << " h2 " + << h2_index << " 1 - weightH " << 1 - weightH + << " weightH/2 " << weightH / 2; - OpenMM::ThreeParticleAverageSite * vsite = new OpenMM::ThreeParticleAverageSite(o_index, h1_index, h2_index, 1 - weightH, weightH / 2, weightH / 2); + OpenMM::ThreeParticleAverageSite * vsite = + new OpenMM::ThreeParticleAverageSite(o_index, h1_index, + h2_index, 1 - weightH, + weightH / 2, weightH / 2); system_openmm->setVirtualSite(system_index, vsite); } @@ -937,73 +996,8 @@ void OpenMMPMEFEP::initialise() int num_atoms_till_i = 0; - /*NON BONDED PER PARTICLE PARAMETERS*/ - - custom_force_field->addPerParticleParameter("qstart"); - custom_force_field->addPerParticleParameter("qend"); - custom_force_field->addPerParticleParameter("epstart"); - custom_force_field->addPerParticleParameter("epend"); - custom_force_field->addPerParticleParameter("sigmastart"); - custom_force_field->addPerParticleParameter("sigmaend"); - custom_force_field->addPerParticleParameter("isHD"); - custom_force_field->addPerParticleParameter("isTD"); - custom_force_field->addPerParticleParameter("isFD"); - custom_force_field->addPerParticleParameter("isSolvent"); - - custom_intra_14_clj->addPerBondParameter("qpstart"); - custom_intra_14_clj->addPerBondParameter("qpend"); - custom_intra_14_clj->addPerBondParameter("qmix"); - custom_intra_14_clj->addPerBondParameter("eastart"); - custom_intra_14_clj->addPerBondParameter("eaend"); - custom_intra_14_clj->addPerBondParameter("emix"); - custom_intra_14_clj->addPerBondParameter("sastart"); - custom_intra_14_clj->addPerBondParameter("saend"); - custom_intra_14_clj->addPerBondParameter("samix"); - - custom_intra_14_todummy->addPerBondParameter("qpstart"); - custom_intra_14_todummy->addPerBondParameter("qpend"); - custom_intra_14_todummy->addPerBondParameter("qmix"); - custom_intra_14_todummy->addPerBondParameter("eastart"); - custom_intra_14_todummy->addPerBondParameter("eaend"); - custom_intra_14_todummy->addPerBondParameter("emix"); - custom_intra_14_todummy->addPerBondParameter("sastart"); - custom_intra_14_todummy->addPerBondParameter("saend"); - custom_intra_14_todummy->addPerBondParameter("samix"); - - custom_intra_14_fromdummy->addPerBondParameter("qpstart"); - custom_intra_14_fromdummy->addPerBondParameter("qpend"); - custom_intra_14_fromdummy->addPerBondParameter("qmix"); - custom_intra_14_fromdummy->addPerBondParameter("eastart"); - custom_intra_14_fromdummy->addPerBondParameter("eaend"); - custom_intra_14_fromdummy->addPerBondParameter("emix"); - custom_intra_14_fromdummy->addPerBondParameter("sastart"); - custom_intra_14_fromdummy->addPerBondParameter("saend"); - custom_intra_14_fromdummy->addPerBondParameter("samix"); - - custom_intra_14_fromdummy_todummy->addPerBondParameter("qpstart"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("qpend"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("qmix"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("eastart"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("eaend"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("emix"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("sastart"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("saend"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("samix"); - - /*BONDED PER PARTICLE PARAMETERS*/ - - solute_bond_perturbation->addPerBondParameter("bstart"); - solute_bond_perturbation->addPerBondParameter("bend"); - solute_bond_perturbation->addPerBondParameter("rstart"); - solute_bond_perturbation->addPerBondParameter("rend"); - - solute_angle_perturbation->addPerAngleParameter("astart"); - solute_angle_perturbation->addPerAngleParameter("aend"); - solute_angle_perturbation->addPerAngleParameter("thetastart"); - solute_angle_perturbation->addPerAngleParameter("thetaend"); - // JM July 13. This also needs to be changed because there could be more than one perturbed molecule - //Molecule solutemol = solute.moleculeAt(0).molecule(); + // Molecule solutemol = solute.moleculeAt(0).molecule(); int nions = 0; diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 4fa3073f8..c81341f50 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -51,6 +51,7 @@ SIREMOVE_EXPORT QDataStream& operator<<(QDataStream&, const SireMove::OpenMMPMEF SIREMOVE_EXPORT QDataStream& operator>>(QDataStream&, SireMove::OpenMMPMEFEP&); namespace SireMove { + using tmpl_str = const QString; /** This class implements single topology a free energy method using OpenMM. @@ -308,9 +309,21 @@ namespace SireMove { int random_seed; - }; + static tmpl_str ENERGYBASE; + static tmpl_str ENERGYBASE_SIGMA[2]; + + static tmpl_str TODUMMY; + static tmpl_str TODUMMY_SIGMA[2]; + + static tmpl_str FROMDUMMY; + static tmpl_str FROMDUMMY_SIGMA[2]; + static tmpl_str FROMTODUMMY; + static tmpl_str FROMTODUMMY_SIGMA[2]; + static tmpl_str INTRA_14_CLJ; + static tmpl_str INTRA_14_CLJ_SIGMA[2]; + }; } Q_DECLARE_METATYPE(SireMove::OpenMMPMEFEP) @@ -321,23 +334,20 @@ SIRE_END_HEADER #else // SIRE_USE_OPENMM - namespace SireMove { +namespace SireMove { class OpenMMPMEFEP { public: - OpenMMPMEFEP() { - } + OpenMMPMEFEP() {} - ~OpenMMPMEFEP() { - } + ~OpenMMPMEFEP() {} - static const char* typeName() { + static const char* typeName() + { return "SireMM::OpenMMPMEFEP"; } - }; - } Q_DECLARE_METATYPE(SireMove::OpenMMPMEFEP) From 60c31f58c6a55808f3ba34cfbab7c3602950807a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 17 Feb 2022 15:18:06 +0000 Subject: [PATCH 032/148] replaced writing to stdout with qDebug() --- corelib/src/libs/SireMove/openmmfrenergyst.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.cpp b/corelib/src/libs/SireMove/openmmfrenergyst.cpp index c58fdf62f..9c8e7c54d 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergyst.cpp @@ -3199,7 +3199,7 @@ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e- positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); if (Debug) { - std::cout << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << + qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; } @@ -3458,8 +3458,8 @@ void OpenMMFrEnergyST::integrate(IntegratorWorkspace &workspace, double p_energy_lambda = state_openmm.getPotentialEnergy(); if (Debug) { - printf("Lambda = %f Potential energy = %.5f kcal/mol\n", Alchemical_value, p_energy_lambda * OpenMM::KcalPerKJ); - //exit(-1); + qDebug() << "Lambda =" << Alchemical_value << "Potential energy =" + << p_energy_lambda * OpenMM::KcalPerKJ << "kcal/mol\n"; } IsFiniteNumber = (p_energy_lambda <= DBL_MAX && p_energy_lambda >= -DBL_MAX); From 4c2bc6614e36609fae05b5c01506c08decba32a3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 18 Feb 2022 12:32:34 +0000 Subject: [PATCH 033/148] debugging messages for energy expressions --- .../src/libs/SireMove/openmmfrenergyst.cpp | 94 ++++++++++++------- 1 file changed, 58 insertions(+), 36 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.cpp b/corelib/src/libs/SireMove/openmmfrenergyst.cpp index 59c904f43..d60a64082 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergyst.cpp @@ -501,13 +501,16 @@ void OpenMMFrEnergyST::initialise() OpenMM::CustomBondForce * custom_intra_14_fromdummy = NULL; OpenMM::CustomBondForce * custom_intra_14_fromdummy_todummy = NULL; + QString energybase, intra_14_todummy, intra_14_fromdummy, + intra_14_fromdummy_todummy, intra_14_clj; + if (flag_cutoff == NOCUTOFF) { if (coulomb_power > 0) { //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 //JM 9/10/20 multiply Logic_mix_lam by * 0 instead of max(lam,1.0-lam) - std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" + energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" "Hcs = (lambda^n) * 138.935456 * q_prod/sqrt(diff_cl+r^2);" "diff_cl = (1.0-lambda) * 0.01;" "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" @@ -542,7 +545,7 @@ void OpenMMFrEnergyST::initialise() energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); } - custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; + custom_force_field = new OpenMM::CustomNonbondedForce(energybase.toStdString()) ; custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); custom_force_field->addGlobalParameter("n", coulomb_power); @@ -550,7 +553,7 @@ void OpenMMFrEnergyST::initialise() custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::NoCutoff); - std::string intra_14_todummy = """Hcs + Hls;" + intra_14_todummy = """Hcs + Hls;" "Hcs=(lamtd^ntd)*138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamtd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -569,12 +572,12 @@ void OpenMMFrEnergyST::initialise() intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); } - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()) ; custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - std::string intra_14_fromdummy = """Hcs + Hls;" + intra_14_fromdummy = """Hcs + Hls;" "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamfd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -593,14 +596,14 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); } - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()) ; custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); //JM 9/10/20 set lamFTD to 0 instead of max(lamftd,1-lamftd) - std::string intra_14_fromdummy_todummy = """Hcs + Hls;" + intra_14_fromdummy_todummy = """Hcs + Hls;" "Hcs=(lamFTD^nftd)*138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -620,7 +623,7 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); } - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()) ; custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); @@ -631,7 +634,7 @@ void OpenMMFrEnergyST::initialise() // coulomb_power == 0. //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 // JM 9/10/20 multiply Logix_mix_lam by 0 instead of max(lam,1.0-lam) - std::string energybase ="""(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" + energybase ="""(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hcs + Hls);" "Hcs = 138.935456 * q_prod/sqrt(diff_cl+r^2);" "diff_cl = (1.0-lambda) * 0.01;" "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" @@ -666,7 +669,7 @@ void OpenMMFrEnergyST::initialise() energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); } - custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; + custom_force_field = new OpenMM::CustomNonbondedForce(energybase.toStdString()) ; custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); custom_force_field->addGlobalParameter("n", coulomb_power); @@ -674,7 +677,7 @@ void OpenMMFrEnergyST::initialise() custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::NoCutoff); - std::string intra_14_todummy = """Hcs + Hls;" + intra_14_todummy = """Hcs + Hls;" "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamtd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -693,12 +696,12 @@ void OpenMMFrEnergyST::initialise() intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); } - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()) ; custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - std::string intra_14_fromdummy = """Hcs + Hls;" + intra_14_fromdummy = """Hcs + Hls;" "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamfd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -717,14 +720,14 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); } - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()) ; custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); // JM 9/10/20 set lamFTD to 0.0 - std::string intra_14_fromdummy_todummy = """Hcs + Hls;" + intra_14_fromdummy_todummy = """Hcs + Hls;" "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -744,13 +747,13 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); } - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()) ; custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); } - std::string intra_14_clj = """Hl+Hc;" + intra_14_clj = """Hl+Hc;" "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" "Hc=138.935456*q_prod/r;" "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" @@ -765,7 +768,7 @@ void OpenMMFrEnergyST::initialise() intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); } - custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; + custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()) ; custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); if (Debug) @@ -789,7 +792,7 @@ void OpenMMFrEnergyST::initialise() //This is necessary to avoid nan errors on the GPUs platform caused by the calculation of 0^0 // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) - std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" + energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" "Hcs = (lambda^n) * 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" "crflam = crf * src;" "krflam = krf * src * src * src;" @@ -827,7 +830,7 @@ void OpenMMFrEnergyST::initialise() energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); } - custom_force_field = new OpenMM::CustomNonbondedForce(energybase); + custom_force_field = new OpenMM::CustomNonbondedForce(energybase.toStdString()); custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); @@ -850,7 +853,7 @@ void OpenMMFrEnergyST::initialise() // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application // of the reaction field on the 14 pairs in Sire. - std::string intra_14_todummy = """withinCutoff*(Hcs + Hls);" + intra_14_todummy = """withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofftd-r);" "Hcs=(lamtd^ntd)*138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamtd)*0.01;" @@ -870,13 +873,13 @@ void OpenMMFrEnergyST::initialise() intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); } - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()) ; custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); - std::string intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" + intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofffd-r);" "Hcs=(lamfd^nfd)*138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamfd)*0.01;" @@ -896,14 +899,14 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); } - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()) ; custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); //JM 9/10/20 set lamFTD to 0 - std::string intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" + intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoffftd-r);" "Hcs=(lamFTD^nftd)*138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" @@ -925,7 +928,7 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); } - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()) ; custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); @@ -937,7 +940,7 @@ void OpenMMFrEnergyST::initialise() //JM 9/10/10 setting Logix_mix_lam output to 0 for lambda - std::string energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" + energybase = """(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" "Hcs = 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" "crflam = crf * src;" "krflam = krf * src * src * src;" @@ -975,7 +978,7 @@ void OpenMMFrEnergyST::initialise() energybase.append("sigma_avg = sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));"); } - custom_force_field = new OpenMM::CustomNonbondedForce(energybase) ; + custom_force_field = new OpenMM::CustomNonbondedForce(energybase.toStdString()) ; custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); @@ -1000,7 +1003,7 @@ void OpenMMFrEnergyST::initialise() // application of the reaction field on the 14 pairs in Sire. - std::string intra_14_todummy = """withinCutoff*(Hcs + Hls);" + intra_14_todummy = """withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofftd-r);" "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamtd)*0.01;" @@ -1020,14 +1023,14 @@ void OpenMMFrEnergyST::initialise() intra_14_todummy.append("sigma_avg = sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);"); } - custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy) ; + custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()) ; custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); - std::string intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" + intra_14_fromdummy = """withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutofffd-r);" "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamfd)*0.01;" @@ -1047,7 +1050,7 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy.append("sigma_avg = sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);"); } - custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy) ; + custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()) ; custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); @@ -1055,7 +1058,7 @@ void OpenMMFrEnergyST::initialise() //JM 9/10/20 always set lamFTD to 0.0 - std::string intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" + intra_14_fromdummy_todummy = """withinCutoff*(Hcs + Hls);" "withinCutoff=step(cutoffftd-r);" "Hcs=138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" @@ -1076,14 +1079,14 @@ void OpenMMFrEnergyST::initialise() intra_14_fromdummy_todummy.append("sigma_avg = sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);"); } - custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy) ; + custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()) ; custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); } - std::string intra_14_clj = """withinCutoff*(Hl+Hc);" + intra_14_clj = """withinCutoff*(Hl+Hc);" "withinCutoff=step(cutoffhd-r);" "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" "Hc=138.935456*q_prod/r;" @@ -1100,7 +1103,7 @@ void OpenMMFrEnergyST::initialise() intra_14_clj.append("sigma_avg = sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);"); } - custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj) ; + custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()) ; custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); @@ -1115,6 +1118,15 @@ void OpenMMFrEnergyST::initialise() } } + if (Debug) + { + qDebug() << "energybase:" << QString(energybase); + qDebug() << "intra_14_todummy:" << QString(intra_14_todummy); + qDebug() << "intra_14_fromdummy:" << QString(intra_14_fromdummy); + qDebug() << "intra_14_fromtodummy:" << QString(intra_14_fromdummy_todummy); + qDebug() << "custom_intra_14_clj:" << QString(intra_14_clj); + } + // Andersen thermostat if (Andersen_flag == true) { @@ -3181,7 +3193,17 @@ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e- OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); // Step 3 update the positions in the system int infoMask = OpenMM::State::Positions; + + if (Debug) + infoMask += OpenMM::State::Energy; + OpenMM::State state_openmm = openmm_context->getState(infoMask); + + if (Debug) + qDebug() << "Initial energy is" + << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ + << "kcal/mol at lambda =" << Alchemical_value << "\n"; + std::vector positions_openmm = state_openmm.getPositions(); // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system AtomicVelocityWorkspace &ws = workspace.edit().asA(); From 3d8488165d831c4587e6e7430ae543f08bcc0b22 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 18 Feb 2022 12:32:49 +0000 Subject: [PATCH 034/148] minor changes --- wrapper/Tools/OpenMMMD.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 6aa0b31b8..be2349e22 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1127,6 +1127,7 @@ def repartitionMasses(system, hmassfactor=4.0): def getDummies(molecule): print("Selecting dummy groups") + natoms = molecule.nAtoms() atoms = molecule.atoms() @@ -1135,6 +1136,7 @@ def getDummies(molecule): for x in range(0, natoms): atom = atoms[x] + if atom.property("initial_ambertype") == "du": if from_dummies is None: from_dummies = molecule.selectAll(atom.index()) @@ -1150,7 +1152,7 @@ def getDummies(molecule): def createSystemFreeEnergy(molecules): - r"""creates the system for free energy calculation + """creates the system for free energy calculation Parameters ---------- molecules : Sire.molecules @@ -1194,7 +1196,6 @@ def createSystemFreeEnergy(molecules): ) sys.exit(-1) - # FIXME: assumption that perturbed molecule is the first residue lig_name = solute.residue(ResIdx(0)).name().value() solute = solute.edit().rename(lig_name).commit() @@ -1278,7 +1279,6 @@ def createSystemFreeEnergy(molecules): solvent = MoleculeGroup("solvent") - # for molecule in moleculeList[1:]: for molecule in moleculeList: molecules.add(molecule) solvent.add(molecule) @@ -1313,7 +1313,7 @@ def createSystemFreeEnergy(molecules): def setupForceFieldsFreeEnergy(system, space): - r"""Sets up the force field for the free energy calculation + """Sets up the force field for the free energy calculation FIXME: For the moment we only check if cutoff_type is not nocutoff and so also allow the RF setup for PME. From 1cde8ddadbbd89555f0368c5fe8a790795ea6afb Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 18 Feb 2022 12:33:50 +0000 Subject: [PATCH 035/148] set per particle parameters in loop and move back to original location (but doesnt seem to make a difference) --- corelib/src/libs/SireMove/openmmpmefep.cpp | 159 +++++++++------------ 1 file changed, 67 insertions(+), 92 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index b7d2947f0..35faa2408 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -373,11 +373,6 @@ QString OpenMMPMEFEP::toString() const return QObject::tr("OpenMMPMEFEP()"); } -/** - * initialises the openMM Free energy single topology calculation - * Initialise must be called before anything else happens. - */ - // FIXME: remove RF specific code and replace with PME direct space expressions // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda @@ -485,7 +480,10 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" }; - +/** + * initialises the openMM Free energy single topology calculation + * Initialise must be called before anything else happens. + */ void OpenMMPMEFEP::initialise() { if (Debug) @@ -573,7 +571,7 @@ void OpenMMPMEFEP::initialise() //Load Plugins from the OpenMM standard Plugin Directory OpenMM::Platform::loadPluginsFromDirectory(OpenMM::Platform::getDefaultPluginsDirectory()); - OpenMM::System * system_openmm = new OpenMM::System(); + OpenMM::System *system_openmm = new OpenMM::System(); system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), OpenMM::Vec3(0, 6, 0), @@ -592,10 +590,10 @@ void OpenMMPMEFEP::initialise() OpenMM::CustomNonbondedForce * custom_force_field = NULL; // 1-4 interactions - OpenMM::CustomBondForce * custom_intra_14_clj = NULL; - OpenMM::CustomBondForce * custom_intra_14_todummy = NULL; - OpenMM::CustomBondForce * custom_intra_14_fromdummy = NULL; - OpenMM::CustomBondForce * custom_intra_14_fromdummy_todummy = NULL; + OpenMM::CustomBondForce *custom_intra_14_clj = NULL; + OpenMM::CustomBondForce *custom_intra_14_todummy = NULL; + OpenMM::CustomBondForce *custom_intra_14_fromdummy = NULL; + OpenMM::CustomBondForce *custom_intra_14_fromdummy_todummy = NULL; const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); @@ -630,26 +628,8 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); custom_force_field->addGlobalParameter("SPOnOff", 0.0); - custom_force_field->addPerParticleParameter("qstart"); - custom_force_field->addPerParticleParameter("qend"); - custom_force_field->addPerParticleParameter("epstart"); - custom_force_field->addPerParticleParameter("epend"); - custom_force_field->addPerParticleParameter("sigmastart"); - custom_force_field->addPerParticleParameter("sigmaend"); - custom_force_field->addPerParticleParameter("isHD"); - custom_force_field->addPerParticleParameter("isTD"); - custom_force_field->addPerParticleParameter("isFD"); - custom_force_field->addPerParticleParameter("isSolvent"); - // FIXME: replace with PME and then switch off direct space handling - if (flag_cutoff == CUTOFFNONPERIODIC) - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffNonPeriodic); - } - else - { - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - } + custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application @@ -668,16 +648,6 @@ void OpenMMPMEFEP::initialise() custom_intra_14_todummy->addGlobalParameter("n", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_intra_14_todummy->addPerBondParameter("qpstart"); - custom_intra_14_todummy->addPerBondParameter("qpend"); - custom_intra_14_todummy->addPerBondParameter("qmix"); - custom_intra_14_todummy->addPerBondParameter("eastart"); - custom_intra_14_todummy->addPerBondParameter("eaend"); - custom_intra_14_todummy->addPerBondParameter("emix"); - custom_intra_14_todummy->addPerBondParameter("sastart"); - custom_intra_14_todummy->addPerBondParameter("saend"); - custom_intra_14_todummy->addPerBondParameter("samix"); - QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); @@ -691,15 +661,6 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy->addGlobalParameter("n", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_intra_14_fromdummy->addPerBondParameter("qpstart"); - custom_intra_14_fromdummy->addPerBondParameter("qpend"); - custom_intra_14_fromdummy->addPerBondParameter("qmix"); - custom_intra_14_fromdummy->addPerBondParameter("eastart"); - custom_intra_14_fromdummy->addPerBondParameter("eaend"); - custom_intra_14_fromdummy->addPerBondParameter("emix"); - custom_intra_14_fromdummy->addPerBondParameter("sastart"); - custom_intra_14_fromdummy->addPerBondParameter("saend"); - custom_intra_14_fromdummy->addPerBondParameter("samix"); //JM 9/10/20 set lamFTD to 0 QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); @@ -715,16 +676,6 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy->addGlobalParameter("n", coulomb_power); custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_intra_14_fromdummy_todummy->addPerBondParameter("qpstart"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("qpend"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("qmix"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("eastart"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("eaend"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("emix"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("sastart"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("saend"); - custom_intra_14_fromdummy_todummy->addPerBondParameter("samix"); - QString intra_14_clj(INTRA_14_CLJ); intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); @@ -736,16 +687,6 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj->addGlobalParameter("lam", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_intra_14_clj->addPerBondParameter("qpstart"); - custom_intra_14_clj->addPerBondParameter("qpend"); - custom_intra_14_clj->addPerBondParameter("qmix"); - custom_intra_14_clj->addPerBondParameter("eastart"); - custom_intra_14_clj->addPerBondParameter("eaend"); - custom_intra_14_clj->addPerBondParameter("emix"); - custom_intra_14_clj->addPerBondParameter("sastart"); - custom_intra_14_clj->addPerBondParameter("saend"); - custom_intra_14_clj->addPerBondParameter("samix"); - if (Debug) { qDebug() << "\nCutoff type = " << CutoffType; @@ -815,11 +756,6 @@ void OpenMMPMEFEP::initialise() solute_bond_perturbation->addGlobalParameter("lam", Alchemical_value); - solute_bond_perturbation->addPerBondParameter("bstart"); - solute_bond_perturbation->addPerBondParameter("bend"); - solute_bond_perturbation->addPerBondParameter("rstart"); - solute_bond_perturbation->addPerBondParameter("rend"); - solute_angle_perturbation = new OpenMM::CustomAngleForce( "0.5*A*(theta-thetaeq)^2;" "A=aend*lam+(1.0-lam)*astart;" @@ -827,11 +763,6 @@ void OpenMMPMEFEP::initialise() solute_angle_perturbation->addGlobalParameter("lam", Alchemical_value); - solute_angle_perturbation->addPerAngleParameter("astart"); - solute_angle_perturbation->addPerAngleParameter("aend"); - solute_angle_perturbation->addPerAngleParameter("thetastart"); - solute_angle_perturbation->addPerAngleParameter("thetaend"); - /************************************************************RESTRAINTS********************************************************/ @@ -996,6 +927,39 @@ void OpenMMPMEFEP::initialise() int num_atoms_till_i = 0; + /* NON BONDED PER PARTICLE PARAMETERS */ + custom_force_field->addPerParticleParameter("qstart"); + custom_force_field->addPerParticleParameter("qend"); + custom_force_field->addPerParticleParameter("epstart"); + custom_force_field->addPerParticleParameter("epend"); + custom_force_field->addPerParticleParameter("sigmastart"); + custom_force_field->addPerParticleParameter("sigmaend"); + custom_force_field->addPerParticleParameter("isHD"); + custom_force_field->addPerParticleParameter("isTD"); + custom_force_field->addPerParticleParameter("isFD"); + custom_force_field->addPerParticleParameter("isSolvent"); + + for (auto const& para : {"qpstart", "qpend", "qmix", "eastart", "eaend", + "emix", "sastart", "saend", "samix"}) + { + custom_intra_14_todummy->addPerBondParameter(para); + custom_intra_14_fromdummy->addPerBondParameter(para); + custom_intra_14_fromdummy_todummy->addPerBondParameter(para); + custom_intra_14_clj->addPerBondParameter(para); + } + + /* BONDED PER PARTICLE PARAMETERS */ + solute_bond_perturbation->addPerBondParameter("bstart"); + solute_bond_perturbation->addPerBondParameter("bend"); + solute_bond_perturbation->addPerBondParameter("rstart"); + solute_bond_perturbation->addPerBondParameter("rend"); + + solute_angle_perturbation->addPerAngleParameter("astart"); + solute_angle_perturbation->addPerAngleParameter("aend"); + solute_angle_perturbation->addPerAngleParameter("thetastart"); + solute_angle_perturbation->addPerAngleParameter("thetaend"); + + // JM July 13. This also needs to be changed because there could be more than one perturbed molecule // Molecule solutemol = solute.moleculeAt(0).molecule(); @@ -1169,14 +1133,14 @@ void OpenMMPMEFEP::initialise() custom_non_bonded_params[5] = sigma; } - custom_non_bonded_params[6] = 0.0; //isHard - custom_non_bonded_params[7] = 0.0; //isTodummy - custom_non_bonded_params[8] = 0.0; //isFromdummy - custom_non_bonded_params[9] = 0.0; //isSolventProtein + custom_non_bonded_params[6] = 0.0; // isHard + custom_non_bonded_params[7] = 0.0; // isTodummy + custom_non_bonded_params[8] = 0.0; // isFromdummy + custom_non_bonded_params[9] = 0.0; // isSolventProtein if (ishard) { - custom_non_bonded_params[6] = 1.0; //isHard + custom_non_bonded_params[6] = 1.0; if (Debug) qDebug() << "hard solute = " << atom.index(); @@ -1184,21 +1148,21 @@ void OpenMMPMEFEP::initialise() // JM July 13 THIS NEEDS FIXING TO DEAL WITH GROUPS THAT CONTAIN MORE THAN ONE MOLECULE else if (istodummy) { - custom_non_bonded_params[7] = 1.0; //isTodummy + custom_non_bonded_params[7] = 1.0; if (Debug) qDebug() << "to dummy solute = " << atom.index(); } else if (isfromdummy) { - custom_non_bonded_params[8] = 1.0; //isFromdummy + custom_non_bonded_params[8] = 1.0; if (Debug) qDebug() << "from dummy solute = " << atom.index(); } else { - custom_non_bonded_params[6] = 1.0; //isHard + custom_non_bonded_params[6] = 1.0; // isHard if (Debug) qDebug() << " unperturbed solute atom " << atom.index(); @@ -1212,10 +1176,10 @@ void OpenMMPMEFEP::initialise() custom_non_bonded_params[3] = epsilon; custom_non_bonded_params[4] = sigma; custom_non_bonded_params[5] = sigma; - custom_non_bonded_params[6] = 1.0; //isHard - custom_non_bonded_params[7] = 0.0; //isTodummy - custom_non_bonded_params[8] = 0.0; //isFromdummy - custom_non_bonded_params[9] = 1.0; //isSolventProtein + custom_non_bonded_params[6] = 1.0; // isHard + custom_non_bonded_params[7] = 0.0; // isTodummy + custom_non_bonded_params[8] = 0.0; // isFromdummy + custom_non_bonded_params[9] = 1.0; // isSolventProtein if (Debug) qDebug() << "Solvent = " << atom.index(); @@ -2443,7 +2407,7 @@ void OpenMMPMEFEP::initialise() this->openmm_system = system_openmm; this->isSystemInitialised = true; -} +} // initialise END /** * @@ -2763,7 +2727,18 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, // Step 3 update the positions in the system int infoMask = OpenMM::State::Positions; + + if (Debug) + infoMask += OpenMM::State::Energy; + OpenMM::State state_openmm = openmm_context->getState(infoMask); + + if (Debug) + // FIXME: check why this give different energies in different runs + qDebug() << "Initial energy is" + << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ + << "kcal/mol at lambda =" << Alchemical_value << "\n"; + std::vector positions_openmm = state_openmm.getPositions(); // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system From ad63b368f0aca972dbf66e6b23e3ba45e92d9548 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 18 Feb 2022 16:47:32 +0000 Subject: [PATCH 036/148] moved first energy evaluation before(!) minimisation --- .../src/libs/SireMove/openmmfrenergyst.cpp | 7 +- corelib/src/libs/SireMove/openmmpmefep.cpp | 66 +++++++++++++++---- corelib/src/libs/SireMove/openmmpmefep.h | 11 +++- 3 files changed, 66 insertions(+), 18 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.cpp b/corelib/src/libs/SireMove/openmmfrenergyst.cpp index d60a64082..a9b26dad3 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergyst.cpp @@ -3189,9 +3189,7 @@ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e- // Use helper function to create a Context SireUnits::Dimension::Time timestep = 0.0 * picosecond; createContext(workspace.edit(), timestep); - // Step 2 minimise - OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); - // Step 3 update the positions in the system + int infoMask = OpenMM::State::Positions; if (Debug) @@ -3204,6 +3202,9 @@ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e- << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ << "kcal/mol at lambda =" << Alchemical_value << "\n"; + // Step 2 minimise + OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); + // Step 3 update the positions in the system std::vector positions_openmm = state_openmm.getPositions(); // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system AtomicVelocityWorkspace &ws = workspace.edit().asA(); diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 35faa2408..bb306d085 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -480,6 +480,20 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" }; + +void OpenMMPMEFEP::addGlobalParameters(OpenMM::CustomNonbondedForce *force, + std::list> params) { + for (auto const ¶m : params) + force->addGlobalParameter(param.first, param.second); +} + +void OpenMMPMEFEP::addGlobalParameters(OpenMM::CustomBondForce *force, + std::list> params) { + for (auto const ¶m : params) + force->addGlobalParameter(param.first, param.second); +} + + /** * initialises the openMM Free energy single topology calculation * Initialise must be called before anything else happens. @@ -582,12 +596,12 @@ void OpenMMPMEFEP::initialise() // All force field terms including soft-cores are "hand-coded" // with CustomNonbondedForce, CustomBondForce, etc. (see next few // hundred lines below). - OpenMM::NonbondedForce * nonbond_openmm = new OpenMM::NonbondedForce(); + OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); nonbond_openmm->setUseDispersionCorrection(false); // CUSTOM NON BONDED FORCE FIELD - OpenMM::CustomNonbondedForce * custom_force_field = NULL; + OpenMM::CustomNonbondedForce *custom_force_field = NULL; // 1-4 interactions OpenMM::CustomBondForce *custom_intra_14_clj = NULL; @@ -619,6 +633,8 @@ void OpenMMPMEFEP::initialise() custom_force_field = new OpenMM::CustomNonbondedForce(energybase.toStdString()); + + custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); @@ -661,7 +677,6 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy->addGlobalParameter("n", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutoff", converted_cutoff_distance); - //JM 9/10/20 set lamFTD to 0 QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); @@ -683,7 +698,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "custom_intra_14_clj:" << intra_14_clj; custom_intra_14_clj = - new OpenMM::CustomBondForce(intra_14_clj.toStdString()) ; + new OpenMM::CustomBondForce(intra_14_clj.toStdString()); custom_intra_14_clj->addGlobalParameter("lam", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoff", converted_cutoff_distance); @@ -939,13 +954,13 @@ void OpenMMPMEFEP::initialise() custom_force_field->addPerParticleParameter("isFD"); custom_force_field->addPerParticleParameter("isSolvent"); - for (auto const& para : {"qpstart", "qpend", "qmix", "eastart", "eaend", + for (auto const ¶m : {"qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"}) { - custom_intra_14_todummy->addPerBondParameter(para); - custom_intra_14_fromdummy->addPerBondParameter(para); - custom_intra_14_fromdummy_todummy->addPerBondParameter(para); - custom_intra_14_clj->addPerBondParameter(para); + custom_intra_14_todummy->addPerBondParameter(param); + custom_intra_14_fromdummy->addPerBondParameter(param); + custom_intra_14_fromdummy_todummy->addPerBondParameter(param); + custom_intra_14_clj->addPerBondParameter(param); } /* BONDED PER PARTICLE PARAMETERS */ @@ -2407,7 +2422,30 @@ void OpenMMPMEFEP::initialise() this->openmm_system = system_openmm; this->isSystemInitialised = true; -} // initialise END + + // if (Debug) + // { + + // const double dt = convertTo(0.002, picosecond); + // OpenMM::Integrator *integrator_openmm = new OpenMM::VerletIntegrator(dt); + + // OpenMM::Platform& platform_openmm = OpenMM::Platform::getPlatformByName(platform_type.toStdString()); + + // openmm_context = + // new OpenMM::Context(*system_openmm, *integrator_openmm, + // platform_openmm); + + // openmm_context->setPositions(positions_openmm); + // openmm_context->setVelocities(velocities_openmm); + + // int infoMask = OpenMM::State::Positions + OpenMM::State::Energy; + // OpenMM::State state_openmm = openmm_context->getState(infoMask); + + // qDebug() << "Initial energy is" + // << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ + // << "kcal/mol at lambda =" << Alchemical_value << "\n"; + // } +} // OpenMMPMEFEP::initialise END /** * @@ -2722,10 +2760,6 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, SireUnits::Dimension::Time timestep = 0.0 * picosecond; createContext(workspace.edit(), timestep); - // Step 2 minimise - OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); - - // Step 3 update the positions in the system int infoMask = OpenMM::State::Positions; if (Debug) @@ -2739,6 +2773,10 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ << "kcal/mol at lambda =" << Alchemical_value << "\n"; + // Step 2 minimise + OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); + + // Step 3 update the positions in the system std::vector positions_openmm = state_openmm.getPositions(); // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index c81341f50..b06231ca9 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -29,6 +29,9 @@ #ifndef SIREMOVE_OPENMMPMEFEP_H #define SIREMOVE_OPENMMPMEFEP_H +#include +#include + #include "integrator.h" #ifdef SIRE_USE_OPENMM @@ -220,7 +223,13 @@ namespace SireMove { QVector computeReducedPerturbedEnergies(double); void emptyContainers(void); - /** Whether or not to save the velocities after every step, or to save them at the end of all of the steps */ + void addGlobalParameters(OpenMM::CustomNonbondedForce *force, + std::list> params); + void addGlobalParameters(OpenMM::CustomBondForce *force, + std::list> params); + + /** Whether or not to save the velocities after every step, or to save them + at the end of all of the steps */ bool frequent_save_velocities; /** The Molecule Group on which the integrator operates */ MolGroupPtr molgroup; From 8bcf8e075f8010350a413452b4056f3a131c151c Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 18 Feb 2022 16:54:32 +0000 Subject: [PATCH 037/148] made sure that box setup is carried out which leads to exactly the same single point energy as in the old code(!) --- corelib/src/libs/SireMove/openmmpmefep.cpp | 105 ++++++++++----------- 1 file changed, 51 insertions(+), 54 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index bb306d085..a076b7eea 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2573,67 +2573,64 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime // Now update coordinates / velocities / dimensions with sire data AtomicVelocityWorkspace &ws = workspace.asA(); - if (CutoffType == "cutoffperiodic") - { - const System & ptr_sys = ws.system(); - const PropertyName &space_property = PropertyName("space"); - - // PeriodicBox. - if (ptr_sys.property(space_property).isA()) - { - const PeriodicBox &space = ptr_sys.property(space_property).asA(); + const System & ptr_sys = ws.system(); + const PropertyName &space_property = PropertyName("space"); - const double Box_x_Edge_Length = space.dimensions()[0] * OpenMM::NmPerAngstrom; //units in nm - const double Box_y_Edge_Length = space.dimensions()[1] * OpenMM::NmPerAngstrom; //units in nm - const double Box_z_Edge_Length = space.dimensions()[2] * OpenMM::NmPerAngstrom; //units in nm + // PeriodicBox + if (ptr_sys.property(space_property).isA()) + { + const PeriodicBox &space = ptr_sys.property(space_property).asA(); - if (Debug) - qDebug() << "\nBOX SIZE [A] = (" << space.dimensions()[0] << " , " << space.dimensions()[1] << " , " << space.dimensions()[2] << ")\n\n"; + const double Box_x_Edge_Length = space.dimensions()[0] * OpenMM::NmPerAngstrom; //units in nm + const double Box_y_Edge_Length = space.dimensions()[1] * OpenMM::NmPerAngstrom; //units in nm + const double Box_z_Edge_Length = space.dimensions()[2] * OpenMM::NmPerAngstrom; //units in nm - //Set Periodic Box Condition + if (Debug) + qDebug() << "\nBOX SIZE [A] = (" << space.dimensions()[0] << " , " << space.dimensions()[1] << " , " << space.dimensions()[2] << ")\n\n"; - system_openmm->setDefaultPeriodicBoxVectors( - OpenMM::Vec3(Box_x_Edge_Length, 0, 0), - OpenMM::Vec3(0, Box_y_Edge_Length, 0), - OpenMM::Vec3(0, 0, Box_z_Edge_Length)); + //Set Periodic Box Condition - openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0), - OpenMM::Vec3(0, Box_y_Edge_Length, 0), - OpenMM::Vec3(0, 0, Box_z_Edge_Length)); - } - // TriclinicBox. - else if (ptr_sys.property(space_property).isA()) - { - const TriclinicBox &space = ptr_sys.property(space_property).asA(); - - // Get the three triclinic box vectors. - const auto v0 = space.vector0(); - const auto v1 = space.vector1(); - const auto v2 = space.vector2(); - - // Get cell matrix components in nm. - const double xx = v0.x() * OpenMM::NmPerAngstrom; - const double xy = v0.y() * OpenMM::NmPerAngstrom; - const double xz = v0.z() * OpenMM::NmPerAngstrom; - const double yx = v1.x() * OpenMM::NmPerAngstrom; - const double yy = v1.y() * OpenMM::NmPerAngstrom; - const double yz = v1.z() * OpenMM::NmPerAngstrom; - const double zx = v2.x() * OpenMM::NmPerAngstrom; - const double zy = v2.y() * OpenMM::NmPerAngstrom; - const double zz = v2.z() * OpenMM::NmPerAngstrom; - - system_openmm->setDefaultPeriodicBoxVectors( - OpenMM::Vec3(xx, xy, xz), - OpenMM::Vec3(yx, yy, yz), - OpenMM::Vec3(zx, zy, zz)); - - openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), - OpenMM::Vec3(yx, yy, yz), - OpenMM::Vec3(zx, zy, zz)); - } + system_openmm->setDefaultPeriodicBoxVectors( + OpenMM::Vec3(Box_x_Edge_Length, 0, 0), + OpenMM::Vec3(0, Box_y_Edge_Length, 0), + OpenMM::Vec3(0, 0, Box_z_Edge_Length)); - openmm_context->reinitialize(); + openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0), + OpenMM::Vec3(0, Box_y_Edge_Length, 0), + OpenMM::Vec3(0, 0, Box_z_Edge_Length)); } + // TriclinicBox + else if (ptr_sys.property(space_property).isA()) + { + const TriclinicBox &space = ptr_sys.property(space_property).asA(); + + // Get the three triclinic box vectors. + const auto v0 = space.vector0(); + const auto v1 = space.vector1(); + const auto v2 = space.vector2(); + + // Get cell matrix components in nm. + const double xx = v0.x() * OpenMM::NmPerAngstrom; + const double xy = v0.y() * OpenMM::NmPerAngstrom; + const double xz = v0.z() * OpenMM::NmPerAngstrom; + const double yx = v1.x() * OpenMM::NmPerAngstrom; + const double yy = v1.y() * OpenMM::NmPerAngstrom; + const double yz = v1.z() * OpenMM::NmPerAngstrom; + const double zx = v2.x() * OpenMM::NmPerAngstrom; + const double zy = v2.y() * OpenMM::NmPerAngstrom; + const double zz = v2.z() * OpenMM::NmPerAngstrom; + + system_openmm->setDefaultPeriodicBoxVectors( + OpenMM::Vec3(xx, xy, xz), + OpenMM::Vec3(yx, yy, yz), + OpenMM::Vec3(zx, zy, zz)); + + openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), + OpenMM::Vec3(yx, yy, yz), + OpenMM::Vec3(zx, zy, zz)); + } + + openmm_context->reinitialize(); //OpenMM vector coordinate std::vector positions_openmm(nats); From b06c587905cbe226c813a2291c6a5e7de96cd392 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 21 Feb 2022 13:42:16 +0000 Subject: [PATCH 038/148] separate variable names in expressions as in old code; remove addGlobalParameters as non-functional --- corelib/src/libs/SireMove/openmmpmefep.cpp | 124 ++++++++++----------- corelib/src/libs/SireMove/openmmpmefep.h | 5 - 2 files changed, 60 insertions(+), 69 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index a076b7eea..1a9f96acd 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -413,87 +413,70 @@ tmpl_str OpenMMPMEFEP::ENERGYBASE_SIGMA[2] = { }; tmpl_str OpenMMPMEFEP::TODUMMY = - "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutoff-r);" + "Hcs + Hls;" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lam)*0.01;" + "diff_cl=(1.0-lamtd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg+r*r);" - "diff_lj=(1.0-lam)*0.1;" - "eps_avg = sqrt((1-lam)*(1-lam)*eaend + lam*lam*eastart + lam*(1-lam)*emix);" - "q_prod = (1-lam)*(1-lam)*qpend + lam*lam*qpstart + lam*(1-lam)*qmix;" + "soft=(diff_lj*deltatd*sigma_avg+r*r);" + "diff_lj=(1.0-lamtd)*0.1;" + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;" "sigma_avg="; tmpl_str OpenMMPMEFEP::TODUMMY_SIGMA[2] = { - "(1-lam)*saend + lam*sastart;", - "sqrt((1-lam)*(1-lam)*saend + lam*lam*sastart + lam*(1-lam)*samix);" + "(1-lamtd)*saend + lamtd*sastart;", + "sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);" }; tmpl_str OpenMMPMEFEP::FROMDUMMY = - "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutoff-r);" + "Hcs + Hls;" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lam)*0.01;" + "diff_cl=(1.0-lamfd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg+r*r);" - "diff_lj=(1.0-lam)*0.1;" - "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" - "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" + "soft=(diff_lj*deltafd*sigma_avg+r*r);" + "diff_lj=(1.0-lamfd)*0.1;" + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;" "sigma_avg="; tmpl_str OpenMMPMEFEP::FROMDUMMY_SIGMA[2] = { - "lam*saend + (1-lam)*sastart;", - "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" + "lamfd*saend + (1-lamfd)*sastart;", + "sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);" }; // FIXME: is pre-factor lam or lamFTD? tmpl_str OpenMMPMEFEP::FROMTODUMMY = - "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutoff-r);" + "Hcs + Hls;" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg+r*r);" + "soft=(diff_lj*deltaftd*sigma_avg+r*r);" "diff_lj=(1.0-lamFTD)*0.1;" - "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" - "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" - "lamFTD = max(lam,1-lam);" + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" + "lamFTD = max(lamftd,1-lamftd);" "sigma_avg="; tmpl_str OpenMMPMEFEP::FROMTODUMMY_SIGMA[2] = { - "lam*saend + (1-lam)*sastart;", - "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" + "lamftd*saend + (1-lamftd)*sastart;", + "sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);" }; // standard LJ term // FIXME: does this need the pre-factor too? tmpl_str OpenMMPMEFEP::INTRA_14_CLJ = - "withinCutoff*(Hc+Hl);" - "withinCutoff=step(cutoff-r);" - "Hc=138.935456*q_prod/r;" + "Hl+Hc;" "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" - "eps_avg = sqrt(lam*lam*eaend + (1-lam)*(1-lam)*eastart + lam*(1-lam)*emix);" - "q_prod = lam*lam*qpend + (1-lam)*(1-lam)*qpstart + lam*(1-lam)*qmix;" + "Hc=138.935456*q_prod/r;" + "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" + "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;" "sigma_avg="; tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { - "lam*saend + (1-lam)*sastart;", - "sqrt(lam*lam*saend + (1-lam)*(1-lam)*sastart + lam*(1-lam)*samix);" + "lamhd*saend + (1-lamhd)*sastart;", + "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" }; -void OpenMMPMEFEP::addGlobalParameters(OpenMM::CustomNonbondedForce *force, - std::list> params) { - for (auto const ¶m : params) - force->addGlobalParameter(param.first, param.second); -} - -void OpenMMPMEFEP::addGlobalParameters(OpenMM::CustomBondForce *force, - std::list> params) { - for (auto const ¶m : params) - force->addGlobalParameter(param.first, param.second); -} - - /** * initialises the openMM Free energy single topology calculation * Initialise must be called before anything else happens. @@ -597,9 +580,15 @@ void OpenMMPMEFEP::initialise() // with CustomNonbondedForce, CustomBondForce, etc. (see next few // hundred lines below). OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); - nonbond_openmm->setUseDispersionCorrection(false); + /* + nonbonded.setIncludeDirectSpace(false); + nonbonded.addGlobalParameter("lambda", 0.0); + nonbonded.addParticleParameterOffset("lambda", particle_idx, (charge_1 – charge_0), 0.0, 0.0) + nonbonded.addExceptionParameterOffset("lambda", exception_idx, (chargeProd_new – chargeProd_old), 0.0, 0.0) + */ + // CUSTOM NON BONDED FORCE FIELD OpenMM::CustomNonbondedForce *custom_force_field = NULL; @@ -616,14 +605,12 @@ void OpenMMPMEFEP::initialise() double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); - QString lam_pre; + QString lam_pre = ""; // This check is necessary to avoid nan errors on the GPU platform caused // by the calculation of 0^0 if (coulomb_power > 0) lam_pre = "(lam^n) *"; - else - lam_pre = ""; QString energybase = ENERGYBASE.arg(lam_pre); energybase.append(ENERGYBASE_SIGMA[flag_combRules]); @@ -651,6 +638,9 @@ void OpenMMPMEFEP::initialise() // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application // of the reaction field on the 14 pairs in Sire. + if (coulomb_power > 0) + lam_pre = "(lamtd^ntd) *"; + QString intra_14_todummy = TODUMMY.arg(lam_pre); intra_14_todummy.append(TODUMMY_SIGMA[flag_combRules]); @@ -659,10 +649,13 @@ void OpenMMPMEFEP::initialise() custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); - custom_intra_14_todummy->addGlobalParameter("lam", 1.0 - Alchemical_value); - custom_intra_14_todummy->addGlobalParameter("delta", shift_delta); - custom_intra_14_todummy->addGlobalParameter("n", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + + if (coulomb_power > 0) + lam_pre = "(lamfd^nfd) *"; QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); @@ -672,12 +665,15 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); - custom_intra_14_fromdummy->addGlobalParameter("lam", Alchemical_value); - custom_intra_14_fromdummy->addGlobalParameter("delta", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("n", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); //JM 9/10/20 set lamFTD to 0 + if (coulomb_power > 0) + lam_pre = "(lamFTD^nftd) *"; + QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); @@ -686,10 +682,10 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); - custom_intra_14_fromdummy_todummy->addGlobalParameter("lam", Alchemical_value); - custom_intra_14_fromdummy_todummy->addGlobalParameter("delta", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("n", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); QString intra_14_clj(INTRA_14_CLJ); intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); @@ -699,8 +695,8 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()); - custom_intra_14_clj->addGlobalParameter("lam", Alchemical_value); - custom_intra_14_clj->addGlobalParameter("cutoff", converted_cutoff_distance); + custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); + custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); if (Debug) { diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index b06231ca9..9e657be3a 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -223,11 +223,6 @@ namespace SireMove { QVector computeReducedPerturbedEnergies(double); void emptyContainers(void); - void addGlobalParameters(OpenMM::CustomNonbondedForce *force, - std::list> params); - void addGlobalParameters(OpenMM::CustomBondForce *force, - std::list> params); - /** Whether or not to save the velocities after every step, or to save them at the end of all of the steps */ bool frequent_save_velocities; From 77ab042f3d25f47252bff30e4501373aed75e63b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 21 Feb 2022 14:02:57 +0000 Subject: [PATCH 039/148] variable name change in expression --- corelib/src/libs/SireMove/openmmpmefep.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 1a9f96acd..ab6dc0a91 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -374,12 +374,15 @@ QString OpenMMPMEFEP::toString() const } // FIXME: remove RF specific code and replace with PME direct space expressions +// NOTE: It appears that expressions have kind of a global name space. Even +// though lambda, n, delta and cutoff are globabl parameters (and +// practically also constants) it appears to be necessary to use +// different names for the same global variable in each force... // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda tmpl_str OpenMMPMEFEP::ENERGYBASE = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" "Hcs = %1 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" - "lam=lambda;" // NOTE: for consistency with 1-4 dummy expressions "crflam = crf * src;" "krflam = krf * src * src * src;" "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" @@ -610,7 +613,7 @@ void OpenMMPMEFEP::initialise() // This check is necessary to avoid nan errors on the GPU platform caused // by the calculation of 0^0 if (coulomb_power > 0) - lam_pre = "(lam^n) *"; + lam_pre = "(lambda^n) *"; QString energybase = ENERGYBASE.arg(lam_pre); energybase.append(ENERGYBASE_SIGMA[flag_combRules]); From 8fc9841f3ce18b83cccb13400e7a4dec81dd6e50 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 21 Feb 2022 15:08:39 +0000 Subject: [PATCH 040/148] wrongly used non-cutoff expressions, replace with cutoff variants --- corelib/src/libs/SireMove/openmmpmefep.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index ab6dc0a91..5d3449ef9 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -416,7 +416,8 @@ tmpl_str OpenMMPMEFEP::ENERGYBASE_SIGMA[2] = { }; tmpl_str OpenMMPMEFEP::TODUMMY = - "Hcs + Hls;" + "withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofftd-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamtd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -432,7 +433,8 @@ tmpl_str OpenMMPMEFEP::TODUMMY_SIGMA[2] = { }; tmpl_str OpenMMPMEFEP::FROMDUMMY = - "Hcs + Hls;" + "withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutofffd-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamfd)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -449,7 +451,8 @@ tmpl_str OpenMMPMEFEP::FROMDUMMY_SIGMA[2] = { // FIXME: is pre-factor lam or lamFTD? tmpl_str OpenMMPMEFEP::FROMTODUMMY = - "Hcs + Hls;" + "withinCutoff*(Hcs + Hls);" + "withinCutoff=step(cutoffftd-r);" "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" "diff_cl=(1.0-lamFTD)*0.01;" "Hls=4.0*eps_avg*(LJ*LJ-LJ);" @@ -468,7 +471,8 @@ tmpl_str OpenMMPMEFEP::FROMTODUMMY_SIGMA[2] = { // standard LJ term // FIXME: does this need the pre-factor too? tmpl_str OpenMMPMEFEP::INTRA_14_CLJ = - "Hl+Hc;" + "withinCutoff*(Hl+Hc);" + "withinCutoff=step(cutoffhd-r);" "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" "Hc=138.935456*q_prod/r;" "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" From 3a53e8dcb38ac975e73238fafc6ccbe1ba839f46 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 21 Feb 2022 15:25:48 +0000 Subject: [PATCH 041/148] fixed other lambda variable names --- corelib/src/libs/SireMove/openmmpmefep.cpp | 31 +++++++++++----------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 5d3449ef9..998e9387e 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -374,10 +374,9 @@ QString OpenMMPMEFEP::toString() const } // FIXME: remove RF specific code and replace with PME direct space expressions -// NOTE: It appears that expressions have kind of a global name space. Even -// though lambda, n, delta and cutoff are globabl parameters (and -// practically also constants) it appears to be necessary to use -// different names for the same global variable in each force... +// NOTE: Vvariable names in expressions for the same logical variable are +// different because the variable may be changed with setParameter. This +// only really applies to lambda at the moment. // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda tmpl_str OpenMMPMEFEP::ENERGYBASE = @@ -769,17 +768,17 @@ void OpenMMPMEFEP::initialise() solute_bond_perturbation = new OpenMM::CustomBondForce( "0.5*B*(r-req)^2;" - "B=bend*lam+(1.0-lam)*bstart;" - "req=rend*lam+(1.0-lam)*rstart"); + "B=bend*lambond+(1.0-lambond)*bstart;" + "req=rend*lambond+(1.0-lambond)*rstart"); - solute_bond_perturbation->addGlobalParameter("lam", Alchemical_value); + solute_bond_perturbation->addGlobalParameter("lambond", Alchemical_value); solute_angle_perturbation = new OpenMM::CustomAngleForce( "0.5*A*(theta-thetaeq)^2;" - "A=aend*lam+(1.0-lam)*astart;" - "thetaeq=thetaend*lam+(1.0-lam)*thetastart"); + "A=aend*lamangle+(1.0-lamangle)*astart;" + "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); - solute_angle_perturbation->addGlobalParameter("lam", Alchemical_value); + solute_angle_perturbation->addGlobalParameter("lamangle", Alchemical_value); /************************************************************RESTRAINTS********************************************************/ @@ -3233,19 +3232,19 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) openmm_context->setParameter("lam", lambda); //1-5 HD //1-4 Interactions if (perturbed_energies[1]) - openmm_context->setParameter("lam", lambda); //1-4 HD + openmm_context->setParameter("lamhd", lambda); //1-4 HD if (perturbed_energies[2]) - openmm_context->setParameter("lam", 1.0 - lambda); //1-4 To Dummy + openmm_context->setParameter("lamtd", 1.0 - lambda); //1-4 To Dummy if (perturbed_energies[3]) - openmm_context->setParameter("lam", lambda); //1-4 From Dummy + openmm_context->setParameter("lamfd", lambda); //1-4 From Dummy if (perturbed_energies[4]) - openmm_context->setParameter("lam", lambda); //1-4 From Dummy to Dummy + openmm_context->setParameter("lamftd", lambda); //1-4 From Dummy to Dummy //BONDED PERTURBED TERMS if (perturbed_energies[5]) - openmm_context->setParameter("lam", lambda); //Bonds + openmm_context->setParameter("lambond", lambda); //Bonds if (perturbed_energies[6]) - openmm_context->setParameter("lam", lambda); //Angles + openmm_context->setParameter("lamangle", lambda); //Angles if (perturbed_energies[7]) openmm_context->setParameter("lamdih", lambda); //Torsions } From 9a2e56ef8cbc4c357cdee47c087ac01763f19e1a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 21 Feb 2022 21:20:34 +0000 Subject: [PATCH 042/148] use Integrator_OpenMM to get energy --- wrapper/Tools/OpenMMMD.py | 29 +++++++++++++---------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index be2349e22..e730cb406 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1631,6 +1631,7 @@ def setupMovesFreeEnergy(system, debug_seed, gpu_idx, lam_val): # This calls the OpenMMFrEnergyST initialise function Integrator_OpenMM.initialise() + Integrator_OpenMM.setDebug(False) velocity_generator = Sire.Move.MaxwellBoltzmann(temperature.val) velocity_generator.setGenerator(Sire.Maths.RanGenerator(seed)) @@ -2297,31 +2298,27 @@ def runFreeNrg(): ) energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) + print(f'Sire energy: {integrator.getPotentialEnergy(system)}') print(f'Raw OpenMM {openmm.__version__} energy ' - f'({cutoff_type}, may be different from below): {energy:.2f} ' - 'kcal mol-1\n') + f'({cutoff_type}): {energy:.2f} kcal mol-1\b') if minimise.val: print( "###=======================Minimisation========================###" ) print("Running minimisation.") - # if verbose.val: - if True: - print("Energy before the minimisation: " + str(system.energy())) - print("Tolerance for minimisation: " + str(minimise_tol.val)) - print( - "Maximum number of minimisation iterations: " - + str(minimise_max_iter.val) - ) + print(f'Tolerance for minimisation: {str(minimise_tol.val)}') + print('Maximum number of minimisation iterations: ' + f'{str(minimise_max_iter.val)}') + system = integrator.minimiseEnergy( - system, minimise_tol.val, minimise_max_iter.val - ) + system, minimise_tol.val, minimise_max_iter.val) + system.mustNowRecalculateFromScratch() - # if verbose.val: - if True: - print("Energy after the minimization: " + str(system.energy())) - print("Energy minimization done.") + + print('Energy after the minimization:' + f'{integrator.getPotentialEnergy(system)}') + print("Energy minimization done.") print( "###===========================================================" "###\n" From 6870cd7f625c5079cf665c40b3bdb2b1356599ff Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 21 Feb 2022 21:26:40 +0000 Subject: [PATCH 043/148] added energies and positions in debugging output before and after minimisation --- corelib/src/libs/SireMove/openmmpmefep.cpp | 59 +++++++++------------- 1 file changed, 24 insertions(+), 35 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 998e9387e..0c437f9d6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2424,29 +2424,6 @@ void OpenMMPMEFEP::initialise() this->openmm_system = system_openmm; this->isSystemInitialised = true; - - // if (Debug) - // { - - // const double dt = convertTo(0.002, picosecond); - // OpenMM::Integrator *integrator_openmm = new OpenMM::VerletIntegrator(dt); - - // OpenMM::Platform& platform_openmm = OpenMM::Platform::getPlatformByName(platform_type.toStdString()); - - // openmm_context = - // new OpenMM::Context(*system_openmm, *integrator_openmm, - // platform_openmm); - - // openmm_context->setPositions(positions_openmm); - // openmm_context->setVelocities(velocities_openmm); - - // int infoMask = OpenMM::State::Positions + OpenMM::State::Energy; - // OpenMM::State state_openmm = openmm_context->getState(infoMask); - - // qDebug() << "Initial energy is" - // << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ - // << "kcal/mol at lambda =" << Alchemical_value << "\n"; - // } } // OpenMMPMEFEP::initialise END /** @@ -2714,10 +2691,7 @@ MolarEnergy OpenMMPMEFEP::getPotentialEnergy(const System &system) createContext(ws.edit(), 2 * femtosecond); - int infoMask = 0; - infoMask = infoMask + OpenMM::State::Energy; - OpenMM::State state_openmm = openmm_context->getState(infoMask); - + OpenMM::State state_openmm = openmm_context->getState(OpenMM::State::Energy); MolarEnergy nrg = state_openmm.getPotentialEnergy() * kJ_per_mol; this->destroyContext(); @@ -2765,12 +2739,15 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, infoMask += OpenMM::State::Energy; OpenMM::State state_openmm = openmm_context->getState(infoMask); + std::vector old_positions_openmm = state_openmm.getPositions(); if (Debug) - // FIXME: check why this give different energies in different runs - qDebug() << "Initial energy is" - << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ - << "kcal/mol at lambda =" << Alchemical_value << "\n"; + { + MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; + + qDebug() << "Energy before minimisation:" << Epot + << "kcal/mol at lambda =" << Alchemical_value; + } // Step 2 minimise OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); @@ -2793,9 +2770,12 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); if (Debug) { - qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << - " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << - " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + qDebug() << "oX =" << old_positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << + " oY =" << old_positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + " oZ =" << old_positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + qDebug() << "nX =" << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << + " nY =" << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + " nZ =" << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; } } k = k + ws.nAtoms(i); @@ -2804,6 +2784,16 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, // This causes the workspace to update the system coordinates with the // contents of *sire_coords. Note that velocities aren't touched. ws.commitCoordinates(); + + // FIXME: looks like OpenMM is not updating the energy + if (Debug) + { + MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; + + qDebug() << "Energy after minimisation:" << Epot + << "kcal/mol at lambda =" << Alchemical_value; + } + // Step 4 delete the context // JM 04/15 FIXME: See comment above at step 1 this->destroyContext(); @@ -3108,7 +3098,6 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, //Computing the potential energies and gradients p_energy_lambda = state_openmm.getPotentialEnergy(); - //Let's calculate the gradients double m_forward, m_backward; boost::tuples::tie(actual_gradient, m_forward, m_backward) = calculateGradient(incr_plus, From 5d83656d8908874abeeb0c89527bc05958da6944 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 22 Feb 2022 09:33:55 +0000 Subject: [PATCH 044/148] bug fix: create new state to get updated energies, positions, etc. --- corelib/src/libs/SireMove/openmmfrenergyst.cpp | 1 + corelib/src/libs/SireMove/openmmpmefep.cpp | 1 + wrapper/Tools/OpenMMMD.py | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.cpp b/corelib/src/libs/SireMove/openmmfrenergyst.cpp index a9b26dad3..cf4a83ff6 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergyst.cpp @@ -3205,6 +3205,7 @@ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e- // Step 2 minimise OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); // Step 3 update the positions in the system + state_openmm = openmm_context->getState(infoMask); std::vector positions_openmm = state_openmm.getPositions(); // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system AtomicVelocityWorkspace &ws = workspace.edit().asA(); diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 0c437f9d6..1202caaef 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2753,6 +2753,7 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); // Step 3 update the positions in the system + state_openmm = openmm_context->getState(infoMask); std::vector positions_openmm = state_openmm.getPositions(); // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index e730cb406..d47efa398 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -2300,7 +2300,7 @@ def runFreeNrg(): energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) print(f'Sire energy: {integrator.getPotentialEnergy(system)}') print(f'Raw OpenMM {openmm.__version__} energy ' - f'({cutoff_type}): {energy:.2f} kcal mol-1\b') + f'({cutoff_type}): {energy:.2f} kcal mol-1\n') if minimise.val: print( From d5e2d55f3e9add2eaff5fbbd677237c70c789fb3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 22 Feb 2022 09:46:06 +0000 Subject: [PATCH 045/148] consistent use of "minimization" --- wrapper/Tools/OpenMMMD.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index d47efa398..2e48f5a3c 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -2009,12 +2009,12 @@ def run(): print( "###=======================Minimisation========================###" ) - print("Running minimisation.") + print("Running minimization.") if verbose.val: - print("Energy before the minimisation: " + str(system.energy())) - print("Tolerance for minimisation: " + str(minimise_tol.val)) + print("Energy before the minimization: " + str(system.energy())) + print("Tolerance for minimization: " + str(minimise_tol.val)) print( - "Maximum number of minimisation iterations: " + "Maximum number of minimization iterations: " + str(minimise_max_iter.val) ) integrator.setConstraintType("none") @@ -2306,9 +2306,9 @@ def runFreeNrg(): print( "###=======================Minimisation========================###" ) - print("Running minimisation.") - print(f'Tolerance for minimisation: {str(minimise_tol.val)}') - print('Maximum number of minimisation iterations: ' + print("Running minimization.") + print(f'Tolerance for minimization: {str(minimise_tol.val)}') + print('Maximum number of minimization iterations: ' f'{str(minimise_max_iter.val)}') system = integrator.minimiseEnergy( From 8e2a81a73b68f862f33bd80adf518170c2f5a46e Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 22 Feb 2022 20:05:35 +0000 Subject: [PATCH 046/148] moved .setDebug() --- wrapper/Tools/OpenMMMD.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 2e48f5a3c..f63c23355 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1583,6 +1583,8 @@ def setupMovesFreeEnergy(system, debug_seed, gpu_idx, lam_val): molecules, solute, solute_hard, solute_todummy, solute_fromdummy ) + Integrator_OpenMM.setDebug(False) + Integrator_OpenMM.setRandomSeed(debug_seed) Integrator_OpenMM.setIntegrator(integrator_type.val) Integrator_OpenMM.setFriction( @@ -1631,7 +1633,6 @@ def setupMovesFreeEnergy(system, debug_seed, gpu_idx, lam_val): # This calls the OpenMMFrEnergyST initialise function Integrator_OpenMM.initialise() - Integrator_OpenMM.setDebug(False) velocity_generator = Sire.Move.MaxwellBoltzmann(temperature.val) velocity_generator.setGenerator(Sire.Maths.RanGenerator(seed)) @@ -2273,7 +2274,7 @@ def runFreeNrg(): if cycle_start > maxcycles.val: print( - "Maxinum number of cycles reached (%s). If you wish to extend the " + "Maxinum number of MD cycles reached (%s). If you wish to extend the " "simulation increase the value of the parameter maxcycle." % maxcycles.val ) @@ -2297,8 +2298,9 @@ def runFreeNrg(): "###===========================================================###\n" ) + print(f'Initial energy: {integrator.getPotentialEnergy(system)}') + energy = computeOpenMMEnergy(topfile.val, crdfile.val, cutoff_dist.val) - print(f'Sire energy: {integrator.getPotentialEnergy(system)}') print(f'Raw OpenMM {openmm.__version__} energy ' f'({cutoff_type}): {energy:.2f} kcal mol-1\n') @@ -2316,7 +2318,7 @@ def runFreeNrg(): system.mustNowRecalculateFromScratch() - print('Energy after the minimization:' + print('Energy after the minimization: ' f'{integrator.getPotentialEnergy(system)}') print("Energy minimization done.") print( @@ -2340,7 +2342,7 @@ def runFreeNrg(): ) system.mustNowRecalculateFromScratch() if verbose.val: - print("Energy after the annealing: " + str(system.energy())) + print(f'Energy after the annealing: {integrator.getPotentialEnergy(system)}') print("Lambda annealing done.\n") print( "###===========================================================" From 0aade444825b09e068ff9e6aa27e173ab305cc1d Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 25 Feb 2022 08:18:28 +0000 Subject: [PATCH 047/148] started to write expressions for PME and LJ direct space --- corelib/src/libs/SireMove/openmmpmefep.cpp | 154 +++++++++++---------- corelib/src/libs/SireMove/openmmpmefep.h | 5 +- 2 files changed, 83 insertions(+), 76 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 1202caaef..2094ca377 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -48,7 +48,6 @@ #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" - #include "SireUnits/units.h" #include "SireUnits/temperature.h" #include "SireUnits/convert.h" @@ -197,7 +196,7 @@ frequent_save_velocities(frequent_save), molgroup(MoleculeGroup()), solute(MoleculeGroup()), solutehard(MoleculeGroup()), solutetodummy(MoleculeGroup()), solutefromdummy(MoleculeGroup()), openmm_system(0), openmm_context(0), isSystemInitialised(false), isContextInitialised(false), combiningRules("arithmetic"), -CutoffType("nocutoff"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), +CutoffType("PME"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), MCBarostat_frequency(25), ConstraintType("none"), Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), @@ -217,7 +216,7 @@ frequent_save_velocities(frequent_save), molgroup(molecule_group), solute(solute_group), solutehard(solute_hard), solutetodummy(solute_todummy), solutefromdummy(solute_fromdummy), openmm_system(0), openmm_context(0), isSystemInitialised(false), isContextInitialised(false), combiningRules("arithmetic"), -CutoffType("nocutoff"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), +CutoffType("PME"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), MCBarostat_frequency(25), ConstraintType("none"), Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), @@ -373,24 +372,31 @@ QString OpenMMPMEFEP::toString() const return QObject::tr("OpenMMPMEFEP()"); } -// FIXME: remove RF specific code and replace with PME direct space expressions -// NOTE: Vvariable names in expressions for the same logical variable are -// different because the variable may be changed with setParameter. This -// only really applies to lambda at the moment. +// General force field +// +// NOTE: There is one single namespace for global parameters but each parameter +// must added to the force it is used in. This is relevant for all +// global lambdas below because they need to be changed during MD. +// Cutoff, delta and n could use a single name each as they are constant +// throughout the simulation. +// // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda -tmpl_str OpenMMPMEFEP::ENERGYBASE = - "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (Hls + Hcs);" - "Hcs = %1 138.935456 * q_prod*(1/sqrt(diff_cl+r*r) + krflam*(diff_cl+r*r)-crflam);" - "crflam = crf * src;" - "krflam = krf * src * src * src;" - "src = cutoff/sqrt(diff_cl + cutoff*cutoff);" - "diff_cl = (1.0-lambda) * 0.01;" - "Hls = 4.0 * eps_avg * (LJ*LJ-LJ);" - "LJ=((sigma_avg * sigma_avg)/soft)^3;" - "soft=(diff_lj*delta*sigma_avg + r*r);" - "diff_lj=(1.0-lambda) * 0.1;" +tmpl_str OpenMMPMEFEP::GENERAL = + "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" + + // need to subtract scaled 1-4 interactions with erf() because computed in reciprocal space + // also subtract 1-2 and 1-3 interactions as also computed in reciprocal space + "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + "rCoul = lam_diff + r;" // do we need to shift? + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = delta*sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lambda) * 0.1;" // 0.1 to convert to nm "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" @@ -406,23 +412,28 @@ tmpl_str OpenMMPMEFEP::ENERGYBASE = "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2), D_mix);" "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" - "q_prod = (qend1 * lam+(1.0-lam) * qstart1) * (qend2 * lam+(1.0-lam) * qstart2);" + + "q_prod = (qend1*lam + (1.0-lam)*qstart1) * (qend2*lam + (1.0-lam)*qstart2);" "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));" "sigma_avg="; -tmpl_str OpenMMPMEFEP::ENERGYBASE_SIGMA[2] = { +tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { "0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));", "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" }; +// 1-4 terms for to/from/fromto dummies tmpl_str OpenMMPMEFEP::TODUMMY = - "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofftd-r);" - "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamtd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltatd*sigma_avg+r*r);" - "diff_lj=(1.0-lamtd)*0.1;" + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff = step(cutofftd - r);" + + "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + "rCoul = lam_diff + r;"" + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = deltatd*sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lamtd) * 0.1;" "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;" "sigma_avg="; @@ -432,14 +443,17 @@ tmpl_str OpenMMPMEFEP::TODUMMY_SIGMA[2] = { }; tmpl_str OpenMMPMEFEP::FROMDUMMY = - "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutofffd-r);" - "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamfd)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltafd*sigma_avg+r*r);" - "diff_lj=(1.0-lamfd)*0.1;" + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff=step(cutofffd - r);" + + "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + "rCoul = lam_diff + r;"" + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = deltafd*sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lamfd) * 0.1;" "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;" "sigma_avg="; @@ -448,32 +462,36 @@ tmpl_str OpenMMPMEFEP::FROMDUMMY_SIGMA[2] = { "sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);" }; -// FIXME: is pre-factor lam or lamFTD? tmpl_str OpenMMPMEFEP::FROMTODUMMY = - "withinCutoff*(Hcs + Hls);" - "withinCutoff=step(cutoffftd-r);" - "Hcs=%1 138.935456*q_prod/sqrt(diff_cl+r^2);" - "diff_cl=(1.0-lamFTD)*0.01;" - "Hls=4.0*eps_avg*(LJ*LJ-LJ);" - "LJ=((sigma_avg*sigma_avg)/soft)^3;" - "soft=(diff_lj*deltaftd*sigma_avg+r*r);" - "diff_lj=(1.0-lamFTD)*0.1;" + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff = step(cutoffftd - r);" + + "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + "rCoul = lam_diff + r;"" + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = deltaftd*sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lamFTD) * 0.1;" + "lamFTD = max(lamftd,1-lamftd);" "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" - "lamFTD = max(lamftd,1-lamftd);" "sigma_avg="; tmpl_str OpenMMPMEFEP::FROMTODUMMY_SIGMA[2] = { "lamftd*saend + (1-lamftd)*sastart;", "sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);" }; -// standard LJ term -// FIXME: does this need the pre-factor too? +// standard 1-4 Coulomb and LJ terms, scaling is done per each exception below tmpl_str OpenMMPMEFEP::INTRA_14_CLJ = - "withinCutoff*(Hl+Hc);" - "withinCutoff=step(cutoffhd-r);" - "Hl=4*eps_avg*((sigma_avg/r)^12-(sigma_avg/r)^6);" - "Hc=138.935456*q_prod/r;" + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff = step(cutoffhd - r);" + + "U_direct = 138.935456 * q_prod * erfc(alpha_pme*r) / r;" // no lambda^n, no shift + + "U_LJ = 4.0 * eps_avg * ((sigma_avg/r)^12 - (sigma_avg/r)^6);" // no shift + "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;" "sigma_avg="; @@ -586,13 +604,15 @@ void OpenMMPMEFEP::initialise() // with CustomNonbondedForce, CustomBondForce, etc. (see next few // hundred lines below). OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); + nonbond_openmm->setNonbondedMethod(OpenMM::NonbondedForce::PME); + nonbond_openmm->setIncludeDirectSpace(false); + nonbond_openmm->setUseDispersionCorrection(false); /* - nonbonded.setIncludeDirectSpace(false); - nonbonded.addGlobalParameter("lambda", 0.0); - nonbonded.addParticleParameterOffset("lambda", particle_idx, (charge_1 – charge_0), 0.0, 0.0) - nonbonded.addExceptionParameterOffset("lambda", exception_idx, (chargeProd_new – chargeProd_old), 0.0, 0.0) + nonbond_openmm.addGlobalParameter("lambda", 0.0); + nonbond_openmm.addParticleParameterOffset("lambda", particle_idx, (charge_1 – charge_0), 0.0, 0.0) + nonbond_openmm.addExceptionParameterOffset("lambda", exception_idx, (chargeProd_new – chargeProd_old), 0.0, 0.0) */ // CUSTOM NON BONDED FORCE FIELD @@ -606,11 +626,6 @@ void OpenMMPMEFEP::initialise() const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); - // FIXME: remove RF specific code - double eps2 = (field_dielectric - 1.0) / (2 * field_dielectric + 1.0); - double kvalue = eps2 / (converted_cutoff_distance * converted_cutoff_distance * converted_cutoff_distance); - double cvalue = (1.0 / converted_cutoff_distance)*(3.0 * field_dielectric) / (2.0 * field_dielectric + 1.0); - QString lam_pre = ""; // This check is necessary to avoid nan errors on the GPU platform caused @@ -618,24 +633,23 @@ void OpenMMPMEFEP::initialise() if (coulomb_power > 0) lam_pre = "(lambda^n) *"; - QString energybase = ENERGYBASE.arg(lam_pre); - energybase.append(ENERGYBASE_SIGMA[flag_combRules]); + QString general_ff = GENERAL.arg(lam_pre); + general_ff.append(GENERAL_SIGMA[flag_combRules]); if (Debug) - qDebug() << "energybase:" << energybase; + qDebug() << "general_ff:" << general_ff; custom_force_field = - new OpenMM::CustomNonbondedForce(energybase.toStdString()); + new OpenMM::CustomNonbondedForce(general_ff.toStdString()); custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("krf", kvalue); - custom_force_field->addGlobalParameter("crf", cvalue); custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); custom_force_field->addGlobalParameter("SPOnOff", 0.0); + custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); // FIXME: replace with PME and then switch off direct space handling custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); @@ -3385,12 +3399,6 @@ QString OpenMMPMEFEP::getCutoffType(void) return CutoffType; } -/** Set the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic */ -void OpenMMPMEFEP::setCutoffType(QString cutoff_type) -{ - CutoffType = cutoff_type; -} - /** Get the cutoff distance in A */ SireUnits::Dimension::Length OpenMMPMEFEP::getCutoffDistance(void) { diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 9e657be3a..667f8dbbc 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -116,7 +116,6 @@ namespace SireMove { void setCombiningRules(QString); QString getCutoffType(void); - void setCutoffType(QString); SireUnits::Dimension::Length getCutoffDistance(void); void setCutoffDistance(SireUnits::Dimension::Length); @@ -313,8 +312,8 @@ namespace SireMove { int random_seed; - static tmpl_str ENERGYBASE; - static tmpl_str ENERGYBASE_SIGMA[2]; + static tmpl_str GENERAL; + static tmpl_str GENERAL_SIGMA[2]; static tmpl_str TODUMMY; static tmpl_str TODUMMY_SIGMA[2]; From 1a49093eb6325509720b29782678863d2b7749d0 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 1 Mar 2022 13:51:18 +0000 Subject: [PATCH 048/148] sketching out the changes to be made --- corelib/src/libs/SireMove/openmmpmefep.cpp | 101 ++++++++++++--------- 1 file changed, 60 insertions(+), 41 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 2094ca377..27c52bac6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -373,6 +373,7 @@ QString OpenMMPMEFEP::toString() const } // General force field +// FIXME: disable SPOnOff and see if it works with PME // // NOTE: There is one single namespace for global parameters but each parameter // must added to the force it is used in. This is relevant for all @@ -500,6 +501,18 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" }; +tmpl_str OpenMMPMEFEP::CORR_12 = + "-U_corr_12;" + "U_corr_12 = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! + "rCoul = lam_diff + r;"" + "lam_diff = (1.0 - lam12) * 0.1;"; + +tmpl_str OpenMMPMEFEP::CORR_13 = + "-U_corr_13;" + "U_corr_13 = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! + "rCoul = lam_diff + r;"" + "lam_diff = (1.0 - lam12) * 0.1;"; + /** * initialises the openMM Free energy single topology calculation @@ -598,22 +611,21 @@ void OpenMMPMEFEP::initialise() OpenMM::Vec3(0, 6, 0), OpenMM::Vec3(0, 0, 6)); - // NOTE: The Standard Non Bonded is *only* defined to extract - // 1-2, 1-3 and 1-4 pairs from the system. - // All force field terms including soft-cores are "hand-coded" - // with CustomNonbondedForce, CustomBondForce, etc. (see next few - // hundred lines below). + // Use NonbondedForce to compute Ewald reciprocal and self terms + // Direct space and LJ need to be implented via expressions see above OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); nonbond_openmm->setNonbondedMethod(OpenMM::NonbondedForce::PME); nonbond_openmm->setIncludeDirectSpace(false); nonbond_openmm->setUseDispersionCorrection(false); - /* + // scale the charge for the reciprocal space charges linearly nonbond_openmm.addGlobalParameter("lambda", 0.0); - nonbond_openmm.addParticleParameterOffset("lambda", particle_idx, (charge_1 – charge_0), 0.0, 0.0) - nonbond_openmm.addExceptionParameterOffset("lambda", exception_idx, (chargeProd_new – chargeProd_old), 0.0, 0.0) - */ + + // Lambda scaling complimentary to scaling in direct space + // chargeProd needs charges before scaling! + //nonbond_openmm.addParticleParameterOffset("lambda", particle_idx, (charge_1 – charge_0), 0.0, 0.0) + //nonbond_openmm.addExceptionParameterOffset("lambda", exception_idx, (chargeProd_new – chargeProd_old), 0.0, 0.0) // CUSTOM NON BONDED FORCE FIELD OpenMM::CustomNonbondedForce *custom_force_field = NULL; @@ -819,12 +831,12 @@ void OpenMMPMEFEP::initialise() } /****************************************BOND LINK POTENTIAL*****************************/ - /* !! CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy is restraints involve one atom that diffuses - out of the box. */ + /* NOTE: CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy if + restraints involve one atom that diffuses out of the box. */ OpenMM::CustomBondForce * custom_link_bond = - new OpenMM::CustomBondForce("kl*max(0,d-dl*dl);" - "d=(r-reql)*(r-reql)"); + new OpenMM::CustomBondForce("kl * max(0, d - dl*dl);" + "d = (r-reql) * (r-reql)"); custom_link_bond->addPerBondParameter("reql"); custom_link_bond->addPerBondParameter("kl"); custom_link_bond->addPerBondParameter("dl"); @@ -1276,9 +1288,9 @@ void OpenMMPMEFEP::initialise() positionalRestraints_openmm->addParticle(openmmindex, params); } } - }//end of restraint flag + } // end of restraint flag - // IONS + // single atoms like ions bool hasConnectivity = molecule.hasProperty("connectivity"); @@ -1291,11 +1303,12 @@ void OpenMMPMEFEP::initialise() qDebug() << "\nAtoms = " << num_atoms_molecule << " Num atoms till i =" << num_atoms_till_i << "\n"; qDebug() << "\n*********************MONOATOMIC MOLECULE DETECTED**************************\n"; } - nions = nions + 1; + + nions = nions + 1; continue; } - //BONDED TERMS + // bonded terms QList< BondID > bond_pert_list; QList< BondID > bond_pert_swap_list; @@ -1313,9 +1326,8 @@ void OpenMMPMEFEP::initialise() OpenMMMD.py) larger than HMASS. In this way hydrogens and heavier atoms (assuming no elements between H and C) should be cleanly separated by mass. */ - double HMASS = 5.0; // g/mol - - double SMALL = 0.0001; + const double HMASS = 5.0; // g/mol + const double SMALL = 0.0001; if (solute.contains(molecule)) { @@ -1795,16 +1807,17 @@ void OpenMMPMEFEP::initialise() } } - }//end for perturbations + } // end for perturbations - }//end solute molecule perturbation + } // end solute molecule perturbation // The bonded parameters are stored in "amberparameters" AmberParameters amber_params = molecule.property("amberparameters").asA(); QList bonds_ff = amber_params.getAllBonds(); QVector bonds = bonds_ff.toVector(); ResName molfirstresname = molecule.residues()(0).name(); - //BOND + + // Bonds for (int j = 0; j < bonds_ff.length(); j++) { @@ -1866,11 +1879,11 @@ void OpenMMPMEFEP::initialise() } } - //Bond exclusion List + // Bond exclusion List bondPairs.push_back(std::make_pair(idx0, idx1)); } - //Angles + // Angles QList angles_ff = amber_params.getAllAngles(); QVector angles = angles_ff.toVector(); @@ -1939,9 +1952,9 @@ void OpenMMPMEFEP::initialise() { bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, k * 2.0 * OpenMM::KJPerKcal); } - }//end of angles + } // end of angles - //Dihedrals + // Dihedrals QList dihedrals_ff = amber_params.getAllDihedrals(); QVector dihedrals = dihedrals_ff.toVector(); @@ -1993,7 +2006,7 @@ void OpenMMPMEFEP::initialise() } // end of dihedrals - //Improper Dihedrals + // Improper Dihedrals QList impropers_ff = amber_params.getAllImpropers(); QVector impropers = impropers_ff.toVector(); @@ -2043,7 +2056,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Amplitude_imp = " << v << " periodicity " << periodicity << " phase " << phase << "\n"; } } - }//end of impropers + } // end of impropers // Variable 1,4 scaling factors @@ -2065,7 +2078,6 @@ void OpenMMPMEFEP::initialise() // Add to custom pairs if scale factor differs from default if (abs(cscl - Coulomb14Scale) > 0.0001 or abs(ljscl - LennardJones14Scale) > 0.0001) { - int idx0 = pair14_ff.atom0().asA().value() + num_atoms_till_i; int idx1 = pair14_ff.atom1().asA().value() + num_atoms_till_i; @@ -2078,11 +2090,11 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "IDX0 = " << idx0 << " IDX1 =" << idx1 << "14 OpenMM Index"; } - }// end of variable 1,4 scaling factors + } // end of variable 1,4 scaling factors num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; - }// end of loop over molecules + } // end of loop over molecules if (Debug) @@ -2119,10 +2131,14 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); if (Debug) - qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " << p2 << " charge prod = " << charge_prod << " sigma avg = " << sigma_avg << " epsilon_avg = " << epsilon_avg << "\n"; + qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " + << p2 << " charge prod = " << charge_prod + << " sigma avg = " << sigma_avg << " epsilon_avg = " + << epsilon_avg << "\n"; + // run only over the 1-4 exceptions if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) - {//1-4 interactions + { QVector perturbed_14_tmp(13); @@ -2168,7 +2184,6 @@ void OpenMMPMEFEP::initialise() if (i_pair != custom14pairs.end()) { - sc_factors = i_pair.value(); Coulomb14Scale_tmp = sc_factors.first; LennardJones14Scale_tmp = sc_factors.second; @@ -2228,7 +2243,6 @@ void OpenMMPMEFEP::initialise() if (Debug) { - qDebug() << "Particle p1 = " << p1 << "\nQstart = " << Qstart_p1 << "\nQend = " << Qend_p1 << "\nEpstart = " << Epstart_p1 << "\nEpend = " << Epend_p1 << "\nSgstart = " << Sigstart_p1 << "\nSgend = " << Sigend_p1 @@ -2275,10 +2289,15 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added soft FROM dummy TO dummy 1-4\n"; } - }//end if 1-4 interactions + } // end if 1-4 exceptions custom_force_field->addExclusion(p1, p2); - } + } // end of loop over exceptions + + // FIXME: Compute 1-2 and 1-3 electrostatic interactions to be subtracted + // from the total energy. This is necessary because the reciprocal + // space calculations will compute the interactions of _all_ charges + // in the system. /*************************************NON BONDED INTERACTIONS*********************************************/ @@ -2384,10 +2403,10 @@ void OpenMMPMEFEP::initialise() perturbed_energies = perturbed_energies_tmp; - //IMPORTANT: PERTURBED ENERGY TORSIONS ARE ADDED ABOVE + // IMPORTANT: PERTURBED ENERGY TORSIONS ARE ADDED ABOVE bool UseLink_flag = true; - //Distance Restaint. All the information are stored in the first molecule only. + // Distance Restraint. All the information are stored in the first molecule only. if (UseLink_flag == true) { @@ -2434,7 +2453,7 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(custom_link_bond); } - }//end of bond link flag + } // end of bond link flag this->openmm_system = system_openmm; this->isSystemInitialised = true; From f03a8fd69090d1d7066189c624751f8bfd82c727 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 1 Mar 2022 17:16:38 +0000 Subject: [PATCH 049/148] quick fixes to make code compile --- corelib/src/libs/SireMove/openmmpmefep.cpp | 71 +++++++++++++++------- corelib/src/libs/SireMove/openmmpmefep.h | 3 + 2 files changed, 51 insertions(+), 23 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 27c52bac6..cee9d1322 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -428,7 +428,7 @@ tmpl_str OpenMMPMEFEP::TODUMMY = "withinCutoff = step(cutofftd - r);" "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - "rCoul = lam_diff + r;"" + "rCoul = lam_diff + r;" "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" @@ -448,7 +448,7 @@ tmpl_str OpenMMPMEFEP::FROMDUMMY = "withinCutoff=step(cutofffd - r);" "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - "rCoul = lam_diff + r;"" + "rCoul = lam_diff + r;" "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" @@ -468,7 +468,7 @@ tmpl_str OpenMMPMEFEP::FROMTODUMMY = "withinCutoff = step(cutoffftd - r);" "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - "rCoul = lam_diff + r;"" + "rCoul = lam_diff + r;" "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" @@ -501,16 +501,10 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" }; -tmpl_str OpenMMPMEFEP::CORR_12 = - "-U_corr_12;" - "U_corr_12 = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! - "rCoul = lam_diff + r;"" - "lam_diff = (1.0 - lam12) * 0.1;"; - -tmpl_str OpenMMPMEFEP::CORR_13 = - "-U_corr_13;" - "U_corr_13 = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! - "rCoul = lam_diff + r;"" +tmpl_str OpenMMPMEFEP::CORR_RECIP = + "-U_corr;" + "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! + "rCoul = lam_diff + r;" "lam_diff = (1.0 - lam12) * 0.1;"; @@ -620,12 +614,7 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->setUseDispersionCorrection(false); // scale the charge for the reciprocal space charges linearly - nonbond_openmm.addGlobalParameter("lambda", 0.0); - - // Lambda scaling complimentary to scaling in direct space - // chargeProd needs charges before scaling! - //nonbond_openmm.addParticleParameterOffset("lambda", particle_idx, (charge_1 – charge_0), 0.0, 0.0) - //nonbond_openmm.addExceptionParameterOffset("lambda", exception_idx, (chargeProd_new – chargeProd_old), 0.0, 0.0) + nonbond_openmm->addGlobalParameter("lambda", 0.0); // CUSTOM NON BONDED FORCE FIELD OpenMM::CustomNonbondedForce *custom_force_field = NULL; @@ -661,6 +650,8 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("n", coulomb_power); custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); custom_force_field->addGlobalParameter("SPOnOff", 0.0); + + double alpha_PME = 0.2; // FIXME custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); // FIXME: replace with PME and then switch off direct space handling @@ -878,7 +869,38 @@ void OpenMMPMEFEP::initialise() Atom at = molatoms(j); AtomNum atnum = at.number(); - if (Debug) + // FIXME: use system_index to set offset + // use mol.hasProperty("perturbations") + // + /* + if (mol.hasProperty("perturbations")) { + AtomLJs atomvdws = molecule.property("LJ").asA(); + QVector ljparameters = atomvdws.toVector(); + + AtomCharges atomcharges_start = mol.property("initial_charge").asA(); + AtomCharges atomcharges_final = mol.property("final_charge").asA(); + + QVector start_charges; + QVector final_charges; + + start_charges = atomcharges_start.toVector(); + final_charges = atomcharges_final.toVector(); + + for (int j = 0; j < ljparameters.size(); j++) + { + double charge_start = start_charges[j].value(); + double charge_final = final_charges[j].value(); + + // Lambda scaling complimentary to scaling in direct space + // need to provide the parameter and the chargeScale for reciprocal PME + nonbond_openmm.addParticleParameterOffset("lambda", system_index+j, (charge_final – charge_start), 0.0, 0.0) + } + + continue; + } + */ + + if (Debug) qDebug() << " openMM_index " << system_index << " Sire Atom Number " << atnum.toString() << " Mass particle = " << m[j]; @@ -1020,7 +1042,6 @@ void OpenMMPMEFEP::initialise() // A list of 1,4 atom pairs with non default scale factors // for each entry, first pair has pair of indices, second has pair of scale factors - //QList< QPair< QPair, QPair > > custom14pairs; QHash< QPair, QPair > custom14pairs; bool special_14 = false; @@ -1107,11 +1128,11 @@ void OpenMMPMEFEP::initialise() ishard = true; break; } - }//end for + }/ if (ishard) break; - }//end for + } // if not hard check if to_dummy if (!ishard) @@ -2130,6 +2151,10 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + // FIXME: is this the right place? + // need original charges here, how to get those? + //nonbond_openmm.addExceptionParameterOffset("lambda", i, (chargeProd_new – chargeProd_old), 0.0, 0.0) + if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " << p2 << " charge prod = " << charge_prod diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 667f8dbbc..18eaa4caa 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -326,6 +326,9 @@ namespace SireMove { static tmpl_str INTRA_14_CLJ; static tmpl_str INTRA_14_CLJ_SIGMA[2]; + + static tmpl_str CORR12; + static tmpl_str CORR13; }; } From 99f26c02b268b7b0ec4e37b6481af95f282fd873 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 1 Mar 2022 17:18:12 +0000 Subject: [PATCH 050/148] quick fixes for more typos --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- corelib/src/libs/SireMove/openmmpmefep.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index cee9d1322..6b0d59f7f 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1128,7 +1128,7 @@ void OpenMMPMEFEP::initialise() ishard = true; break; } - }/ + } if (ishard) break; diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 18eaa4caa..05891362d 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -327,8 +327,7 @@ namespace SireMove { static tmpl_str INTRA_14_CLJ; static tmpl_str INTRA_14_CLJ_SIGMA[2]; - static tmpl_str CORR12; - static tmpl_str CORR13; + static tmpl_str CORR_RECIP; }; } From 359c14a1b25b97ebb495ec0da4c85feed0244b9a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 09:54:31 +0000 Subject: [PATCH 051/148] added offset code for reciprocal space --- corelib/src/libs/SireMove/openmmpmefep.cpp | 100 ++++++++++----------- 1 file changed, 46 insertions(+), 54 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 6b0d59f7f..e4980e26e 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -501,6 +501,7 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" }; +// subtract 1-2 and 1-3 interactions that have been calculated in reciprocal space tmpl_str OpenMMPMEFEP::CORR_RECIP = "-U_corr;" "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! @@ -596,9 +597,10 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "\nConstraint Type = " << ConstraintType << "\n"; - //Load Plugins from the OpenMM standard Plugin Directory + // Load Plugins from the OpenMM standard Plugin Directory OpenMM::Platform::loadPluginsFromDirectory(OpenMM::Platform::getDefaultPluginsDirectory()); + // the system will hold all OpenMM::System *system_openmm = new OpenMM::System(); system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), @@ -606,7 +608,8 @@ void OpenMMPMEFEP::initialise() OpenMM::Vec3(0, 0, 6)); // Use NonbondedForce to compute Ewald reciprocal and self terms - // Direct space and LJ need to be implented via expressions see above + // Direct space and LJ need to be implemented via expressions to + // custom forces, see above OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); nonbond_openmm->setNonbondedMethod(OpenMM::NonbondedForce::PME); nonbond_openmm->setIncludeDirectSpace(false); @@ -651,10 +654,10 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); custom_force_field->addGlobalParameter("SPOnOff", 0.0); - double alpha_PME = 0.2; // FIXME + double alpha_PME = 0.2; // FIXME: compute via user-defined error tolerance custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); - // FIXME: replace with PME and then switch off direct space handling + // FIXME: do we still need this? custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then @@ -844,7 +847,6 @@ void OpenMMPMEFEP::initialise() // To avoid possible mismatch between the index in which atoms are added to the openmm system arrays and // their atomic numbers in sire, one array is populated while filling up the openmm global arrays - // AtomNumtoopenmmIndex QHash AtomNumToOpenMMIndex; for (int i = 0; i < nmols; ++i) @@ -863,43 +865,13 @@ void OpenMMPMEFEP::initialise() for (int j = 0; j < nats_mol; ++j) { - /*JM 10/16 make sure that perturbed atoms have mass of heaviest end-state */ + // This adds each atom to the system via its mass + // JM 10/16 make sure that perturbed atoms have mass of heaviest end-state system_openmm->addParticle(m[j]); Atom at = molatoms(j); AtomNum atnum = at.number(); - // FIXME: use system_index to set offset - // use mol.hasProperty("perturbations") - // - /* - if (mol.hasProperty("perturbations")) { - AtomLJs atomvdws = molecule.property("LJ").asA(); - QVector ljparameters = atomvdws.toVector(); - - AtomCharges atomcharges_start = mol.property("initial_charge").asA(); - AtomCharges atomcharges_final = mol.property("final_charge").asA(); - - QVector start_charges; - QVector final_charges; - - start_charges = atomcharges_start.toVector(); - final_charges = atomcharges_final.toVector(); - - for (int j = 0; j < ljparameters.size(); j++) - { - double charge_start = start_charges[j].value(); - double charge_final = final_charges[j].value(); - - // Lambda scaling complimentary to scaling in direct space - // need to provide the parameter and the chargeScale for reciprocal PME - nonbond_openmm.addParticleParameterOffset("lambda", system_index+j, (charge_final – charge_start), 0.0, 0.0) - } - - continue; - } - */ - if (Debug) qDebug() << " openMM_index " << system_index << " Sire Atom Number " << atnum.toString() << " Mass particle = " << m[j]; @@ -1090,13 +1062,18 @@ void OpenMMPMEFEP::initialise() final_LJs = atomvdws_final.toVector(); } + int nonbond_idx = 0; + for (int j = 0; j < ljparameters.size(); j++) { double charge = charges[j].value(); double sigma = ljparameters[j].sigma() * OpenMM::NmPerAngstrom; double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; + double charge_diff = 0.0; - nonbond_openmm->addParticle(charge, sigma, epsilon); + // This really only adds the nonbonded parameters + // The parameters need to be added in the same order as in the System + nonbond_idx = nonbond_openmm->addParticle(charge, sigma, epsilon); Atom atom = molecule.molecule().atoms()(j); @@ -1110,12 +1087,25 @@ void OpenMMPMEFEP::initialise() double charge_start = start_charges[j].value(); double charge_final = final_charges[j].value(); + // FIXME + // Lambda scaling complimentary to scaling in direct space which is deactivated above + // need to provide the parameter and the chargeScale for reciprocal PME + charge_diff = charge_final – charge_start; + + // FIXME: do we really need to ensure this? + // probably best to be defensive + if (charge_diff < 0.00001) + charge_diff = 0.0; + + nonbond_openmm.addParticleParameterOffset("lambda", nonbond_idx, charge_diff, + 0.0, 0.0); // sigma, epsilon not needed + double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; double sigma_final = final_LJs[j].sigma() * OpenMM::NmPerAngstrom; double epsilon_start = start_LJs[j].epsilon() * OpenMM::KJPerKcal; double epsilon_final = final_LJs[j].epsilon() * OpenMM::KJPerKcal; - for (int l = 0; l < solutehard.nViews(); l++) + for (int l = 0; l < solutehard.nViews(); l++) { Selector view_atoms = solutehard.viewAt(l).atoms(); @@ -1263,6 +1253,8 @@ void OpenMMPMEFEP::initialise() qDebug() << "is Solvent = " << custom_non_bonded_params[9] << "\n"; } + // Adds the custom parmaters to _all_ atoms + // Must be in same order as in the System custom_force_field->addParticle(custom_non_bonded_params); } @@ -1340,6 +1332,7 @@ void OpenMMPMEFEP::initialise() QList< ImproperID > improper_pert_list; QList< ImproperID > improper_pert_swap_list; + // FIXME: move this /* "Light" atoms are defined to have a mass of HMASS or smaller. This ensures that hydrogens in the HMR scheme will be constraint. The specific value of 5.0 assumes that the HMR factor does not exceed @@ -2124,7 +2117,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "\n\nNumber of ions = " << nions << "\n\n"; } - //Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms + // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms nonbond_openmm->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); @@ -2149,11 +2142,19 @@ void OpenMMPMEFEP::initialise() double charge_prod, sigma_avg, epsilon_avg; - nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + std::vector p1_params(10); + std::vector p2_params(10); + + nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + + custom_force_field->getParticleParameters(p1, p1_params); + custom_force_field->getParticleParameters(p2, p2_params); + + double qprod_start = p1_params[0] * p2_params[0]; + double qprod_end = p1_params[1] * p2_params[1]; // FIXME: is this the right place? - // need original charges here, how to get those? - //nonbond_openmm.addExceptionParameterOffset("lambda", i, (chargeProd_new – chargeProd_old), 0.0, 0.0) + nonbond_openmm.addExceptionParameterOffset("lambda", i, (qprod_end – qprod_start), 0.0, 0.0) if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " @@ -2164,17 +2165,8 @@ void OpenMMPMEFEP::initialise() // run only over the 1-4 exceptions if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) { - QVector perturbed_14_tmp(13); - std::vector p1_params(10); - std::vector p2_params(10); - - custom_force_field->getParticleParameters(p1, p1_params); - custom_force_field->getParticleParameters(p2, p2_params); - - double Qstart_p1 = p1_params[0]; - double Qend_p1 = p1_params[1]; double Epstart_p1 = p1_params[2]; double Epend_p1 = p1_params[3]; double Sigstart_p1 = p1_params[4]; @@ -2183,8 +2175,6 @@ void OpenMMPMEFEP::initialise() double isTodummy_p1 = p1_params[7]; double isFromdummy_p1 = p1_params[8]; - double Qstart_p2 = p2_params[0]; - double Qend_p2 = p2_params[1]; double Epstart_p2 = p2_params[2]; double Epend_p2 = p2_params[3]; double Sigstart_p2 = p2_params[4]; @@ -2337,6 +2327,8 @@ void OpenMMPMEFEP::initialise() qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << custom_intra_14_fromdummy_todummy->getNumBonds(); } + system_openmm->addForce(nonbond_openmm); + if (npairs != num_exceptions) { custom_force_field->setForceGroup(0); From 128375802212797661819e23a9dc97761c71eac7 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 10:08:04 +0000 Subject: [PATCH 052/148] fixed variable declaration, typos --- corelib/src/libs/SireMove/openmmpmefep.cpp | 26 +++++++++++++--------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e4980e26e..0767b0ead 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -607,6 +607,7 @@ void OpenMMPMEFEP::initialise() OpenMM::Vec3(0, 6, 0), OpenMM::Vec3(0, 0, 6)); + // HHL // Use NonbondedForce to compute Ewald reciprocal and self terms // Direct space and LJ need to be implemented via expressions to // custom forces, see above @@ -1087,18 +1088,18 @@ void OpenMMPMEFEP::initialise() double charge_start = start_charges[j].value(); double charge_final = final_charges[j].value(); - // FIXME + // HHL // Lambda scaling complimentary to scaling in direct space which is deactivated above // need to provide the parameter and the chargeScale for reciprocal PME - charge_diff = charge_final – charge_start; + charge_diff = charge_final - charge_start; // FIXME: do we really need to ensure this? // probably best to be defensive if (charge_diff < 0.00001) charge_diff = 0.0; - nonbond_openmm.addParticleParameterOffset("lambda", nonbond_idx, charge_diff, - 0.0, 0.0); // sigma, epsilon not needed + nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, + 0.0, 0.0); // sigma, epsilon not needed double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; double sigma_final = final_LJs[j].sigma() * OpenMM::NmPerAngstrom; @@ -2142,19 +2143,24 @@ void OpenMMPMEFEP::initialise() double charge_prod, sigma_avg, epsilon_avg; + nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + std::vector p1_params(10); std::vector p2_params(10); - nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); - custom_force_field->getParticleParameters(p1, p1_params); custom_force_field->getParticleParameters(p2, p2_params); - double qprod_start = p1_params[0] * p2_params[0]; - double qprod_end = p1_params[1] * p2_params[1]; + double Qstart_p1 = p1_params[0]; + double Qend_p1 = p1_params[1]; + double Qstart_p2 = p2_params[0]; + double Qend_p2 = p2_params[1]; + + double qprod_start = Qstart_p1 * Qstart_p2; + double qprod_end = Qend_p1 * Qend_p2; - // FIXME: is this the right place? - nonbond_openmm.addExceptionParameterOffset("lambda", i, (qprod_end – qprod_start), 0.0, 0.0) + // HHL + nonbond_openmm->addExceptionParameterOffset("lambda", i, (qprod_end - qprod_start), 0.0, 0.0) if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " From 196000e7903caf8057e00363d5cabef225697a54 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 10:09:02 +0000 Subject: [PATCH 053/148] fixed missing semicolon --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 0767b0ead..84c1c71b7 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2160,7 +2160,7 @@ void OpenMMPMEFEP::initialise() double qprod_end = Qend_p1 * Qend_p2; // HHL - nonbond_openmm->addExceptionParameterOffset("lambda", i, (qprod_end - qprod_start), 0.0, 0.0) + nonbond_openmm->addExceptionParameterOffset("lambda", i, (qprod_end - qprod_start), 0.0, 0.0); if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " From 40782b6fffcdaf88cc3f3d91315757a02258e3ff Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 12:54:48 +0000 Subject: [PATCH 054/148] added custom correction FF; get alpha from default setup --- corelib/src/libs/SireMove/openmmpmefep.cpp | 37 ++++++++++++++++++++-- 1 file changed, 34 insertions(+), 3 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 84c1c71b7..030b592b2 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -506,7 +506,7 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = "-U_corr;" "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! "rCoul = lam_diff + r;" - "lam_diff = (1.0 - lam12) * 0.1;"; + "lam_diff = (1.0 - lam_corr) * 0.1;"; /** @@ -620,6 +620,17 @@ void OpenMMPMEFEP::initialise() // scale the charge for the reciprocal space charges linearly nonbond_openmm->addGlobalParameter("lambda", 0.0); + double alpha_PME; + int nx, ny, nz; // unused + // nonbond_openmm->setEwaldErrorTolerance(tol) + nonbond_openmm->getPMEParameters(&alpha_PME, &nx, &ny, &nz); + + if (Debug) + { + qDebug() << "Default PME alpha =" << alpha_PME; + } + + // CUSTOM NON BONDED FORCE FIELD OpenMM::CustomNonbondedForce *custom_force_field = NULL; @@ -654,8 +665,6 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("n", coulomb_power); custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); custom_force_field->addGlobalParameter("SPOnOff", 0.0); - - double alpha_PME = 0.2; // FIXME: compute via user-defined error tolerance custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); // FIXME: do we still need this? @@ -680,6 +689,7 @@ void OpenMMPMEFEP::initialise() custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + custom_intra_14_todummy->addGlobalParameter("alpha_pme", alpha_PME); if (coulomb_power > 0) lam_pre = "(lamfd^nfd) *"; @@ -696,6 +706,7 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + custom_intra_14_fromdummy->addGlobalParameter("alpha_pme", alpha_PME); //JM 9/10/20 set lamFTD to 0 if (coulomb_power > 0) @@ -713,6 +724,7 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + custom_intra_14_fromdummy_todummy->addGlobalParameter("alpha_pme", alpha_PME); QString intra_14_clj(INTRA_14_CLJ); intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); @@ -724,6 +736,23 @@ void OpenMMPMEFEP::initialise() new OpenMM::CustomBondForce(intra_14_clj.toStdString()); custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); + custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); + + if (coulomb_power > 0) + lam_pre = "(lam_corr^n_corr) *"; + + // HHL + // correction term for 1-2 and 1-3 exceptions computed in reciprocal space + QString corr_recip = CORR_RECIP.arg(lam_pre); + + if (Debug) + qDebug() << "corr_recip:" << corr_recip; + + // FIXME: do we need a cutoff here as well? + custom_corr_recip = new OpenMM::CustomBondForce(corr_recip); + custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); + custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); + custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); if (Debug) { @@ -3286,6 +3315,8 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) if (perturbed_energies[4]) openmm_context->setParameter("lamftd", lambda); //1-4 From Dummy to Dummy + // FIXME: also update lam_corr + //BONDED PERTURBED TERMS if (perturbed_energies[5]) openmm_context->setParameter("lambond", lambda); //Bonds From 0a5b8c586b89f8aa78c5a54f74605568458bcd80 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 13:01:30 +0000 Subject: [PATCH 055/148] references and definition of custom_corr_recip --- corelib/src/libs/SireMove/openmmpmefep.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 030b592b2..e36eba1ed 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -623,7 +623,7 @@ void OpenMMPMEFEP::initialise() double alpha_PME; int nx, ny, nz; // unused // nonbond_openmm->setEwaldErrorTolerance(tol) - nonbond_openmm->getPMEParameters(&alpha_PME, &nx, &ny, &nz); + nonbond_openmm->getPMEParameters(alpha_PME, nx, ny, nz); if (Debug) { @@ -639,6 +639,7 @@ void OpenMMPMEFEP::initialise() OpenMM::CustomBondForce *custom_intra_14_todummy = NULL; OpenMM::CustomBondForce *custom_intra_14_fromdummy = NULL; OpenMM::CustomBondForce *custom_intra_14_fromdummy_todummy = NULL; + OpenMM::CustomBondForce *custom_corr_recip = NULL; const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); From 317eba150df18a7b54d17a4d5a8560520798b762 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 13:02:42 +0000 Subject: [PATCH 056/148] string conversion --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e36eba1ed..4796c8cc1 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -744,7 +744,7 @@ void OpenMMPMEFEP::initialise() // HHL // correction term for 1-2 and 1-3 exceptions computed in reciprocal space - QString corr_recip = CORR_RECIP.arg(lam_pre); + QString corr_recip = CORR_RECIP.arg(lam_pre.toStdString()); if (Debug) qDebug() << "corr_recip:" << corr_recip; From e47b26d489fb568c83ff15c19cf74d0771aaa6c3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 13:04:13 +0000 Subject: [PATCH 057/148] string conversion at the wrong place so fixed it --- corelib/src/libs/SireMove/openmmpmefep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4796c8cc1..4a19e87e7 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -744,13 +744,13 @@ void OpenMMPMEFEP::initialise() // HHL // correction term for 1-2 and 1-3 exceptions computed in reciprocal space - QString corr_recip = CORR_RECIP.arg(lam_pre.toStdString()); + QString corr_recip = CORR_RECIP.arg(lam_pre); if (Debug) qDebug() << "corr_recip:" << corr_recip; // FIXME: do we need a cutoff here as well? - custom_corr_recip = new OpenMM::CustomBondForce(corr_recip); + custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); From 6e586e94eda122d51a81fb293831d75c9a44a5d7 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 14:01:22 +0000 Subject: [PATCH 058/148] debug output of PME error tolerance --- corelib/src/libs/SireMove/openmmpmefep.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4a19e87e7..58e29ce73 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -623,14 +623,16 @@ void OpenMMPMEFEP::initialise() double alpha_PME; int nx, ny, nz; // unused // nonbond_openmm->setEwaldErrorTolerance(tol) + // from NonbondedForceImpl.cpp + // alpha = (1.0/force.getCutoffDistance())*std::sqrt(-log(2.0*tol)); nonbond_openmm->getPMEParameters(alpha_PME, nx, ny, nz); if (Debug) { - qDebug() << "Default PME alpha =" << alpha_PME; + qDebug() << "Default PME alpha =" << alpha_PME // this seems to be always 0 + << "; PME error tolerance =" << nonbond_openmm->getEwaldErrorTolerance(); } - // CUSTOM NON BONDED FORCE FIELD OpenMM::CustomNonbondedForce *custom_force_field = NULL; From db467022698c278b3a0f8d90d3711fc04d87c290 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 14:18:16 +0000 Subject: [PATCH 059/148] explicit calculation of PME alpha from error tolerance (but is this the same as in the reciprocal space) --- corelib/src/libs/SireMove/openmmpmefep.cpp | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 58e29ce73..fd908c342 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -26,6 +26,9 @@ * \*********************************************/ +#include +#include + #include "openmmpmefep.h" #include "ensemble.h" @@ -72,7 +75,7 @@ #include "SireMol/mgname.h" #include "SireMol/perturbation.h" #include "SireMM/internalperturbation.h" -#include + #include #include #include @@ -620,17 +623,23 @@ void OpenMMPMEFEP::initialise() // scale the charge for the reciprocal space charges linearly nonbond_openmm->addGlobalParameter("lambda", 0.0); - double alpha_PME; - int nx, ny, nz; // unused - // nonbond_openmm->setEwaldErrorTolerance(tol) + // double alpha_PME; + // int nx, ny, nz; + // this seems always zero if not set explicetly + // nonbond_openmm->getPMEParameters(alpha_PME, nx, ny, nz); + + // use default for the moment + double tolerance_PME = nonbond_openmm->getEwaldErrorTolerance(); + // from NonbondedForceImpl.cpp - // alpha = (1.0/force.getCutoffDistance())*std::sqrt(-log(2.0*tol)); - nonbond_openmm->getPMEParameters(alpha_PME, nx, ny, nz); + // (1.0/force.getCutoffDistance())*std::sqrt(-log(2.0*tol)); + // FIXME: check if this is also the value for reciprocal space + double alpha_PME = (1.0 / converted_cutoff_distance) * std::sqrt(-log(2.0 * tolerance_PME)); if (Debug) { - qDebug() << "Default PME alpha =" << alpha_PME // this seems to be always 0 - << "; PME error tolerance =" << nonbond_openmm->getEwaldErrorTolerance(); + qDebug() << "PME alpha =" << alpha_PME + << " computed from PME error tolerance =" << tolerance_PME; } // CUSTOM NON BONDED FORCE FIELD @@ -661,7 +670,6 @@ void OpenMMPMEFEP::initialise() custom_force_field = new OpenMM::CustomNonbondedForce(general_ff.toStdString()); - custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->setCutoffDistance(converted_cutoff_distance); custom_force_field->addGlobalParameter("lam", Alchemical_value); custom_force_field->addGlobalParameter("delta", shift_delta); From 45af57a779aaddef4db0dd6df659a891c96c5ac7 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 14:19:49 +0000 Subject: [PATCH 060/148] define converted_cutoff_distance before usage --- corelib/src/libs/SireMove/openmmpmefep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index fd908c342..4f87164c6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -610,6 +610,8 @@ void OpenMMPMEFEP::initialise() OpenMM::Vec3(0, 6, 0), OpenMM::Vec3(0, 0, 6)); + const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); + // HHL // Use NonbondedForce to compute Ewald reciprocal and self terms // Direct space and LJ need to be implemented via expressions to @@ -652,8 +654,6 @@ void OpenMMPMEFEP::initialise() OpenMM::CustomBondForce *custom_intra_14_fromdummy_todummy = NULL; OpenMM::CustomBondForce *custom_corr_recip = NULL; - const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); - QString lam_pre = ""; // This check is necessary to avoid nan errors on the GPU platform caused From f6e9ff2999195f29e986d299e6841ba0a273b018 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 14:36:25 +0000 Subject: [PATCH 061/148] check again for alpha at end of ::initialise --- corelib/src/libs/SireMove/openmmpmefep.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4f87164c6..32e83b9b3 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -641,7 +641,7 @@ void OpenMMPMEFEP::initialise() if (Debug) { qDebug() << "PME alpha =" << alpha_PME - << " computed from PME error tolerance =" << tolerance_PME; + << "computed from PME error tolerance =" << tolerance_PME; } // CUSTOM NON BONDED FORCE FIELD @@ -2520,6 +2520,15 @@ void OpenMMPMEFEP::initialise() this->openmm_system = system_openmm; this->isSystemInitialised = true; + + if (Debug) + { + double alpha; + int nx, ny, nz; + // this seems always zero if not set explicetly + nonbond_openmm->getPMEParameters(alpha, nx, ny, nz); + qDebug() << "PME parmaters (alpha, nx, ny, nz):" << alpha_PME << nx << ny << nz); + } } // OpenMMPMEFEP::initialise END /** From 06190b8bb22ed94eb83c6d67ac04f0d92e4330fb Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 2 Mar 2022 14:54:49 +0000 Subject: [PATCH 062/148] alpha instead of alpha_PME in debugging output --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 32e83b9b3..fbd61a8ae 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2527,7 +2527,7 @@ void OpenMMPMEFEP::initialise() int nx, ny, nz; // this seems always zero if not set explicetly nonbond_openmm->getPMEParameters(alpha, nx, ny, nz); - qDebug() << "PME parmaters (alpha, nx, ny, nz):" << alpha_PME << nx << ny << nz); + qDebug() << "PME parmaters (alpha, nx, ny, nz):" << alpha << nx << ny << nz; } } // OpenMMPMEFEP::initialise END From 5569fe9a5ec7880acd7de6cb6eadba67beb56252 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 09:57:36 +0000 Subject: [PATCH 063/148] added correction term and associated parameters --- corelib/src/libs/SireMove/openmmpmefep.cpp | 82 ++++++++++++++-------- 1 file changed, 51 insertions(+), 31 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index fbd61a8ae..b365b84c3 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -509,7 +509,8 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = "-U_corr;" "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! "rCoul = lam_diff + r;" - "lam_diff = (1.0 - lam_corr) * 0.1;"; + "lam_diff = (1.0 - lam_corr) * 0.1;" + "q_prod = lam_corr*qpend + (1-lam_corr)*qpstart"; /** @@ -678,7 +679,7 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("SPOnOff", 0.0); custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); - // FIXME: do we still need this? + // This ensures that also the custom force field is subject to PBC custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then @@ -760,6 +761,8 @@ void OpenMMPMEFEP::initialise() qDebug() << "corr_recip:" << corr_recip; // FIXME: do we need a cutoff here as well? + // add bonds to force + // add to system custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); @@ -1005,7 +1008,7 @@ void OpenMMPMEFEP::initialise() int num_atoms_till_i = 0; - /* NON BONDED PER PARTICLE PARAMETERS */ + // nonbonded per particle parameters custom_force_field->addPerParticleParameter("qstart"); custom_force_field->addPerParticleParameter("qend"); custom_force_field->addPerParticleParameter("epstart"); @@ -1026,6 +1029,9 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj->addPerBondParameter(param); } + custom_corr_recip->addPerBondParameter("qstart"); + custom_corr_recip->addPerBondParameter("qend"); + /* BONDED PER PARTICLE PARAMETERS */ solute_bond_perturbation->addPerBondParameter("bstart"); solute_bond_perturbation->addPerBondParameter("bend"); @@ -1043,7 +1049,7 @@ void OpenMMPMEFEP::initialise() int nions = 0; - QVector perturbed_energies_tmp(8); + QVector perturbed_energies_tmp(9); for (int i = 0; i < perturbed_energies_tmp.size(); i++) perturbed_energies_tmp[i] = false; @@ -1133,11 +1139,11 @@ void OpenMMPMEFEP::initialise() // need to provide the parameter and the chargeScale for reciprocal PME charge_diff = charge_final - charge_start; - // FIXME: do we really need to ensure this? - // probably best to be defensive + // probably best to be defensive if (charge_diff < 0.00001) charge_diff = 0.0; + // FIXME: what about scaled 1-4 interactions nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, 0.0, 0.0); // sigma, epsilon not needed @@ -2177,6 +2183,10 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "NUM EXCEPTIONS = " << num_exceptions << "\n"; + std::vector p1_params(10); + std::vector p2_params(10); + std::vector corr_recip_params(2) + for (int i = 0; i < num_exceptions; i++) { int p1, p2; @@ -2185,9 +2195,6 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); - std::vector p1_params(10); - std::vector p2_params(10); - custom_force_field->getParticleParameters(p1, p1_params); custom_force_field->getParticleParameters(p2, p2_params); @@ -2199,9 +2206,6 @@ void OpenMMPMEFEP::initialise() double qprod_start = Qstart_p1 * Qstart_p2; double qprod_end = Qend_p1 * Qend_p2; - // HHL - nonbond_openmm->addExceptionParameterOffset("lambda", i, (qprod_end - qprod_start), 0.0, 0.0); - if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " << p2 << " charge prod = " << charge_prod @@ -2290,6 +2294,8 @@ void OpenMMPMEFEP::initialise() epsilon_avg_end = Epend_p1 * Epend_p2 * LennardJones14Scale_tmp * LennardJones14Scale_tmp; epsilon_avg_mix = (Epend_p1 * Epstart_p2 + Epstart_p1 * Epend_p2) * LennardJones14Scale_tmp * LennardJones14Scale_tmp; + // ["qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"] + // see setPerParicleParameters and expressions above std::vector params(9); params[0] = charge_prod_start; @@ -2350,16 +2356,27 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added soft FROM dummy TO dummy 1-4\n"; } - } // end if 1-4 exceptions + // FIXME: right location? + nonbond_openmm->addExceptionParameterOffset("lambda", i, (qprod_end - qprod_start), 0.0, 0.0); + + corr_recip_params = {qprod_start, qprod_end}; + nonbond_openmm->addBond(p1, p2, corr_recip_params); + + } // 1-4 exceptions + else // 1-2 and 1-3 exceptions + { + // FIXME: right location? + // right scaling factor + nonbond_openmm->addExceptionParameterOffset("lambda", i, + Coulomb14Scale * (qprod_end - qprod_start), 0.0, 0.0); + + corr_recip_params = {Coulomb14Scale * qprod_start, Coulomb14Scale * qprod_end}; + nonbond_openmm->addBond(p1, p2, corr_recip_params); + } // end if 1-4 exceptions custom_force_field->addExclusion(p1, p2); } // end of loop over exceptions - // FIXME: Compute 1-2 and 1-3 electrostatic interactions to be subtracted - // from the total energy. This is necessary because the reciprocal - // space calculations will compute the interactions of _all_ charges - // in the system. - /*************************************NON BONDED INTERACTIONS*********************************************/ int npairs = (custom_force_field->getNumParticles() * (custom_force_field->getNumParticles() - 1)) / 2; @@ -2373,12 +2390,12 @@ void OpenMMPMEFEP::initialise() qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << custom_intra_14_fromdummy_todummy->getNumBonds(); } - system_openmm->addForce(nonbond_openmm); + system_openmm->addForce(nonbond_openmm); // reciprocal space only if (npairs != num_exceptions) { custom_force_field->setForceGroup(0); - system_openmm->addForce(custom_force_field); + system_openmm->addForce(custom_force_field); // direct space and LJ perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system if (Debug) qDebug() << "Added 1-5"; @@ -2411,6 +2428,7 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "Added 1-4 From Dummy"; } + if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) { custom_intra_14_fromdummy_todummy->setForceGroup(0); @@ -2420,6 +2438,17 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added 1-4 From Dummy To Dummy"; } + if (custom_corr_recip->getNumBonds() != 0) + { + custom_corr_recip->setForceGroup(0); + system_openmm->addForce(custom_corr_recip); + perturbed_energies_tmp[8] = true; + + if (Debug) + qDebug() << "Added reciprocal correction term"; + } + + /*****************************************BONDED INTERACTIONS***********************************************/ if (bondStretch_openmm->getNumBonds() != 0) @@ -2520,15 +2549,6 @@ void OpenMMPMEFEP::initialise() this->openmm_system = system_openmm; this->isSystemInitialised = true; - - if (Debug) - { - double alpha; - int nx, ny, nz; - // this seems always zero if not set explicetly - nonbond_openmm->getPMEParameters(alpha, nx, ny, nz); - qDebug() << "PME parmaters (alpha, nx, ny, nz):" << alpha << nx << ny << nz; - } } // OpenMMPMEFEP::initialise END /** @@ -3334,8 +3354,8 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) openmm_context->setParameter("lamfd", lambda); //1-4 From Dummy if (perturbed_energies[4]) openmm_context->setParameter("lamftd", lambda); //1-4 From Dummy to Dummy - - // FIXME: also update lam_corr + if (perturbed_energies[8]) + openmm_context->setParameter("lam_corr", lambda); //1-4 From Dummy to Dummy //BONDED PERTURBED TERMS if (perturbed_energies[5]) From 49d88e984ed8467cac096aacd0622ddce887d18a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 09:58:30 +0000 Subject: [PATCH 064/148] fix: missing semicolon --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index b365b84c3..e30db8b09 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2185,7 +2185,7 @@ void OpenMMPMEFEP::initialise() std::vector p1_params(10); std::vector p2_params(10); - std::vector corr_recip_params(2) + std::vector corr_recip_params(2); for (int i = 0; i < num_exceptions; i++) { From 802f3ac1185d1ef399359cfc825fcff22e02a22d Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 10:01:45 +0000 Subject: [PATCH 065/148] addBond to custom force not non-custom force --- corelib/src/libs/SireMove/openmmpmefep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e30db8b09..26ebbfd99 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2360,7 +2360,7 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->addExceptionParameterOffset("lambda", i, (qprod_end - qprod_start), 0.0, 0.0); corr_recip_params = {qprod_start, qprod_end}; - nonbond_openmm->addBond(p1, p2, corr_recip_params); + custom_corr_recip->addBond(p1, p2, corr_recip_params); } // 1-4 exceptions else // 1-2 and 1-3 exceptions @@ -2371,7 +2371,7 @@ void OpenMMPMEFEP::initialise() Coulomb14Scale * (qprod_end - qprod_start), 0.0, 0.0); corr_recip_params = {Coulomb14Scale * qprod_start, Coulomb14Scale * qprod_end}; - nonbond_openmm->addBond(p1, p2, corr_recip_params); + custom_corr_recip->addBond(p1, p2, corr_recip_params); } // end if 1-4 exceptions custom_force_field->addExclusion(p1, p2); From 96f9b507d696794015ffcd4effe076d14a4e8e77 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 10:04:03 +0000 Subject: [PATCH 066/148] type in expression variable name --- corelib/src/libs/SireMove/openmmpmefep.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 26ebbfd99..bcf957067 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1029,8 +1029,8 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj->addPerBondParameter(param); } - custom_corr_recip->addPerBondParameter("qstart"); - custom_corr_recip->addPerBondParameter("qend"); + custom_corr_recip->addPerBondParameter("qpstart"); + custom_corr_recip->addPerBondParameter("qpend"); /* BONDED PER PARTICLE PARAMETERS */ solute_bond_perturbation->addPerBondParameter("bstart"); From 7ae017f219aa9fdb5d5bee95bae0c0457a417fa9 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 10:48:00 +0000 Subject: [PATCH 067/148] fixed 1-4 scaling factor at right place --- corelib/src/libs/SireMove/openmmpmefep.cpp | 27 +++++++++++++++++----- 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index bcf957067..863362ef6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1143,6 +1143,9 @@ void OpenMMPMEFEP::initialise() if (charge_diff < 0.00001) charge_diff = 0.0; + if (Debug) + qDebug() << "charge_diff =" << charge_diff; + // FIXME: what about scaled 1-4 interactions nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, 0.0, 0.0); // sigma, epsilon not needed @@ -2322,7 +2325,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Product Charge start = " << charge_prod_start << "\nProduct Charge end = " << charge_prod_end << "\nProduct Chrage mixed = " << charge_prod_mix << "\nEpsilon average start = " << epsilon_avg_start << "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << charge_prod_mix << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << sigma_avg_end; - qDebug() << "Columbic Scale Factor = " << Coulomb14Scale_tmp << " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; + qDebug() << "Coulombic Scale Factor = " << Coulomb14Scale_tmp << " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; } if ((isHard_p1 == 1.0 && isHard_p2 == 1.0)) @@ -2357,21 +2360,33 @@ void OpenMMPMEFEP::initialise() } // FIXME: right location? - nonbond_openmm->addExceptionParameterOffset("lambda", i, (qprod_end - qprod_start), 0.0, 0.0); + // check if Coulomb scale factor is right + nonbond_openmm->addExceptionParameterOffset( + "lambda", i, + Coulomb14Scale_tmp * (qprod_end - qprod_start), 0.0, 0.0); - corr_recip_params = {qprod_start, qprod_end}; + corr_recip_params = {Coulomb14Scale_tmp * qprod_start, Coulomb14Scale_tmp * qprod_end}; custom_corr_recip->addBond(p1, p2, corr_recip_params); + if (Debug) + qDebug() "offset = " << Coulomb14Scale_tmp * (qprod_end - qprod_start) + << "qprod_start =" + << Coulomb14Scale_tmp * qprod_start + << "qprod_end =" + << Coulomb14Scale_tmp * qprod_end; } // 1-4 exceptions else // 1-2 and 1-3 exceptions { // FIXME: right location? - // right scaling factor nonbond_openmm->addExceptionParameterOffset("lambda", i, - Coulomb14Scale * (qprod_end - qprod_start), 0.0, 0.0); + qprod_end - qprod_start, 0.0, 0.0); - corr_recip_params = {Coulomb14Scale * qprod_start, Coulomb14Scale * qprod_end}; + corr_recip_params = {qprod_start, qprod_end}; custom_corr_recip->addBond(p1, p2, corr_recip_params); + + if (Debug) + qDebug() << "qprod_start =" << qprod_start + << "qprod_end =" << qprod_end; } // end if 1-4 exceptions custom_force_field->addExclusion(p1, p2); From a6964deba902f2c40b4bb0a9532e9ca5d5952751 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 10:49:49 +0000 Subject: [PATCH 068/148] fixed missing << --- corelib/src/libs/SireMove/openmmpmefep.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 863362ef6..aeb9da035 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2369,11 +2369,12 @@ void OpenMMPMEFEP::initialise() custom_corr_recip->addBond(p1, p2, corr_recip_params); if (Debug) - qDebug() "offset = " << Coulomb14Scale_tmp * (qprod_end - qprod_start) - << "qprod_start =" - << Coulomb14Scale_tmp * qprod_start - << "qprod_end =" - << Coulomb14Scale_tmp * qprod_end; + qDebug() << "offset = " + << Coulomb14Scale_tmp * (qprod_end - qprod_start) + << "qprod_start =" + << Coulomb14Scale_tmp * qprod_start + << "qprod_end =" + << Coulomb14Scale_tmp * qprod_end; } // 1-4 exceptions else // 1-2 and 1-3 exceptions { From e7c723714561ebe08329fac57a8a5f67471aaabc Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 14:47:07 +0000 Subject: [PATCH 069/148] removed setCutoffType from wrapper --- wrapper/Move/OpenMMPMEFEP.pypp.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp index 270376206..57e81191a 100644 --- a/wrapper/Move/OpenMMPMEFEP.pypp.cpp +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -688,18 +688,6 @@ void register_OpenMMPMEFEP_class(){ , ( bp::arg("arg0") ) , "Set the cutoff distance in A" ); - } - { //::SireMove::OpenMMPMEFEP::setCutoffType - - typedef void ( ::SireMove::OpenMMPMEFEP::*setCutoffType_function_type)( ::QString ) ; - setCutoffType_function_type setCutoffType_function_value( &::SireMove::OpenMMPMEFEP::setCutoffType ); - - OpenMMPMEFEP_exposer.def( - "setCutoffType" - , setCutoffType_function_value - , ( bp::arg("arg0") ) - , "Set the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic" ); - } { //::SireMove::OpenMMPMEFEP::setDebug From 5a7141c488d8f872a0a5ff573923c041f54391a5 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 14:50:03 +0000 Subject: [PATCH 070/148] some fiddling with qprod --- corelib/src/libs/SireMove/openmmpmefep.cpp | 124 ++++++++++++--------- 1 file changed, 70 insertions(+), 54 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index aeb9da035..58a2c0964 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -504,13 +504,15 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" }; +// FIXME: do we need the cutoff here? // subtract 1-2 and 1-3 interactions that have been calculated in reciprocal space tmpl_str OpenMMPMEFEP::CORR_RECIP = - "-U_corr;" - "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // erf not erfc! + "-U_corr * withinCutoff;" + "withinCutoff = step(cutoff - r);" + "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // not erfc! "rCoul = lam_diff + r;" "lam_diff = (1.0 - lam_corr) * 0.1;" - "q_prod = lam_corr*qpend + (1-lam_corr)*qpstart"; + "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix"; /** @@ -623,19 +625,13 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->setUseDispersionCorrection(false); - // scale the charge for the reciprocal space charges linearly + // scale the charges in the reciprocal space nonbond_openmm->addGlobalParameter("lambda", 0.0); - // double alpha_PME; - // int nx, ny, nz; - // this seems always zero if not set explicetly - // nonbond_openmm->getPMEParameters(alpha_PME, nx, ny, nz); - // use default for the moment double tolerance_PME = nonbond_openmm->getEwaldErrorTolerance(); // from NonbondedForceImpl.cpp - // (1.0/force.getCutoffDistance())*std::sqrt(-log(2.0*tol)); // FIXME: check if this is also the value for reciprocal space double alpha_PME = (1.0 / converted_cutoff_distance) * std::sqrt(-log(2.0 * tolerance_PME)); @@ -767,6 +763,7 @@ void OpenMMPMEFEP::initialise() custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); + custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); if (Debug) { @@ -1029,8 +1026,10 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj->addPerBondParameter(param); } - custom_corr_recip->addPerBondParameter("qpstart"); - custom_corr_recip->addPerBondParameter("qpend"); + for (auto const ¶m : {"qcstart", "qcend", "qcmix"}) + { + custom_corr_recip->addPerBondParameter(param); + } /* BONDED PER PARTICLE PARAMETERS */ solute_bond_perturbation->addPerBondParameter("bstart"); @@ -1110,6 +1109,7 @@ void OpenMMPMEFEP::initialise() } int nonbond_idx = 0; + double charge_start = 0.0, charge_final = 0.0; for (int j = 0; j < ljparameters.size(); j++) { @@ -1131,24 +1131,28 @@ void OpenMMPMEFEP::initialise() bool istodummy = false; bool isfromdummy = false; - double charge_start = start_charges[j].value(); - double charge_final = final_charges[j].value(); + charge_start = start_charges[j].value(); + charge_final = final_charges[j].value(); // HHL - // Lambda scaling complimentary to scaling in direct space which is deactivated above + // Lambda scaling in reciprocal space complimentary to scaling in direct space // need to provide the parameter and the chargeScale for reciprocal PME charge_diff = charge_final - charge_start; - // probably best to be defensive + // FIXME: best to be defensive? if (charge_diff < 0.00001) charge_diff = 0.0; - if (Debug) - qDebug() << "charge_diff =" << charge_diff; + if (charge_diff != 0.0) + { + nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, + 0.0, 0.0); // sigma, epsilon not needed - // FIXME: what about scaled 1-4 interactions - nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, - 0.0, 0.0); // sigma, epsilon not needed + if (Debug) + qDebug() << "charge_diff =" << charge_diff + << "charge_start =" << charge_start + << "charge_final =" << charge_final; + } double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; double sigma_final = final_LJs[j].sigma() * OpenMM::NmPerAngstrom; @@ -2188,7 +2192,10 @@ void OpenMMPMEFEP::initialise() std::vector p1_params(10); std::vector p2_params(10); - std::vector corr_recip_params(2); + std::vector corr_recip_params(3); + double Coulomb14Scale_squared = 0.0; + double qprod_start, qprod_end, qprod_mix; + double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; for (int i = 0; i < num_exceptions; i++) { @@ -2201,13 +2208,14 @@ void OpenMMPMEFEP::initialise() custom_force_field->getParticleParameters(p1, p1_params); custom_force_field->getParticleParameters(p2, p2_params); - double Qstart_p1 = p1_params[0]; - double Qend_p1 = p1_params[1]; - double Qstart_p2 = p2_params[0]; - double Qend_p2 = p2_params[1]; + Qstart_p1 = p1_params[0]; + Qend_p1 = p1_params[1]; + Qstart_p2 = p2_params[0]; + Qend_p2 = p2_params[1]; - double qprod_start = Qstart_p1 * Qstart_p2; - double qprod_end = Qend_p1 * Qend_p2; + qprod_start = Qstart_p1 * Qstart_p2; + qprod_end = Qend_p1 * Qend_p2; + qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " @@ -2236,7 +2244,6 @@ void OpenMMPMEFEP::initialise() double isTodummy_p2 = p2_params[7]; double isFromdummy_p2 = p2_params[8]; - double charge_prod_start, charge_prod_end, charge_prod_mix; double sigma_avg_start, sigma_avg_end, sigma_avg_mix; double epsilon_avg_start, epsilon_avg_end, epsilon_avg_mix; @@ -2276,9 +2283,9 @@ void OpenMMPMEFEP::initialise() } } - charge_prod_start = Qstart_p1 * Qstart_p2 * Coulomb14Scale_tmp; - charge_prod_end = Qend_p1 * Qend_p2 * Coulomb14Scale_tmp; - charge_prod_mix = (Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2) * Coulomb14Scale_tmp; + qprod_start *= Coulomb14Scale_tmp; + qprod_end *= Coulomb14Scale_tmp; + qprod_mix *= Coulomb14Scale_tmp; if (flag_combRules == ARITHMETIC) { @@ -2301,9 +2308,9 @@ void OpenMMPMEFEP::initialise() // see setPerParicleParameters and expressions above std::vector params(9); - params[0] = charge_prod_start; - params[1] = charge_prod_end; - params[2] = charge_prod_mix; + params[0] = qprod_start; + params[1] = qprod_end; + params[2] = qprod_mix; params[3] = epsilon_avg_start; params[4] = epsilon_avg_end; params[5] = epsilon_avg_mix; @@ -2322,8 +2329,8 @@ void OpenMMPMEFEP::initialise() << "\nSgstart = " << Sigstart_p2 << "\nSgend = " << Sigend_p2 << "\nisHard = " << isHard_p2 << "\nisTodummy = " << isTodummy_p2 << "\nisFromdummy = " << isFromdummy_p2 << "\n"; - qDebug() << "Product Charge start = " << charge_prod_start << "\nProduct Charge end = " << charge_prod_end << "\nProduct Chrage mixed = " << charge_prod_mix - << "\nEpsilon average start = " << epsilon_avg_start << "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << charge_prod_mix + qDebug() << "Product Charge start = " << qprod_start << "\nProduct Charge end = " << qprod_end << "\nProduct Chrage mixed = " << qprod_mix + << "\nEpsilon average start = " << epsilon_avg_start << "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << qprod_mix << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << sigma_avg_end; qDebug() << "Coulombic Scale Factor = " << Coulomb14Scale_tmp << " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; } @@ -2361,11 +2368,14 @@ void OpenMMPMEFEP::initialise() // FIXME: right location? // check if Coulomb scale factor is right + Coulomb14Scale_squared = Coulomb14Scale_tmp * Coulomb14Scale_tmp; + nonbond_openmm->addExceptionParameterOffset( "lambda", i, - Coulomb14Scale_tmp * (qprod_end - qprod_start), 0.0, 0.0); + Coulomb14Scale_squared * (qprod_end - qprod_start), 0.0, 0.0); - corr_recip_params = {Coulomb14Scale_tmp * qprod_start, Coulomb14Scale_tmp * qprod_end}; + corr_recip_params = {Coulomb14Scale_squared * qprod_start, + Coulomb14Scale_squared * qprod_end, Coulomb14Scale_squared * qprod_mix}; custom_corr_recip->addBond(p1, p2, corr_recip_params); if (Debug) @@ -2374,7 +2384,9 @@ void OpenMMPMEFEP::initialise() << "qprod_start =" << Coulomb14Scale_tmp * qprod_start << "qprod_end =" - << Coulomb14Scale_tmp * qprod_end; + << Coulomb14Scale_tmp * qprod_end + << "qprod_mix =" + << Coulomb14Scale_tmp * qprod_mix; } // 1-4 exceptions else // 1-2 and 1-3 exceptions { @@ -2382,12 +2394,13 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->addExceptionParameterOffset("lambda", i, qprod_end - qprod_start, 0.0, 0.0); - corr_recip_params = {qprod_start, qprod_end}; + corr_recip_params = {qprod_start, qprod_end, qprod_mix}; custom_corr_recip->addBond(p1, p2, corr_recip_params); if (Debug) qDebug() << "qprod_start =" << qprod_start - << "qprod_end =" << qprod_end; + << "qprod_end =" << qprod_end + << "qprod_mix =" << qprod_end; } // end if 1-4 exceptions custom_force_field->addExclusion(p1, p2); @@ -3358,28 +3371,31 @@ double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) { - //NON BONDED TERMS + // nonbonded terms if (perturbed_energies[0]) - openmm_context->setParameter("lam", lambda); //1-5 HD - //1-4 Interactions + openmm_context->setParameter("lam", lambda); // 1-5 HD + + // 1-4 Interactions if (perturbed_energies[1]) - openmm_context->setParameter("lamhd", lambda); //1-4 HD + openmm_context->setParameter("lamhd", lambda); // 1-4 HD if (perturbed_energies[2]) - openmm_context->setParameter("lamtd", 1.0 - lambda); //1-4 To Dummy + openmm_context->setParameter("lamtd", 1.0 - lambda); // 1-4 To Dummy if (perturbed_energies[3]) - openmm_context->setParameter("lamfd", lambda); //1-4 From Dummy + openmm_context->setParameter("lamfd", lambda); // 1-4 From Dummy if (perturbed_energies[4]) - openmm_context->setParameter("lamftd", lambda); //1-4 From Dummy to Dummy + openmm_context->setParameter("lamftd", lambda); // 1-4 From Dummy to Dummy + + // reciprocal space corrections for 1-2, 1-3 and scaled 1-4 if (perturbed_energies[8]) - openmm_context->setParameter("lam_corr", lambda); //1-4 From Dummy to Dummy + openmm_context->setParameter("lam_corr", lambda); - //BONDED PERTURBED TERMS + // bonded perturbed terms if (perturbed_energies[5]) - openmm_context->setParameter("lambond", lambda); //Bonds + openmm_context->setParameter("lambond", lambda); // Bonds if (perturbed_energies[6]) - openmm_context->setParameter("lamangle", lambda); //Angles + openmm_context->setParameter("lamangle", lambda); // Angles if (perturbed_energies[7]) - openmm_context->setParameter("lamdih", lambda); //Torsions + openmm_context->setParameter("lamdih", lambda); // Torsions } boost::tuples::tuple OpenMMPMEFEP::calculateGradient( From f1f36c17362ed192316fd122fbe59e1af716a723 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 4 Mar 2022 15:19:37 +0000 Subject: [PATCH 071/148] no squaring of charge product --- corelib/src/libs/SireMove/openmmpmefep.cpp | 49 +++++++--------------- 1 file changed, 14 insertions(+), 35 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 58a2c0964..1d29174b6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2193,8 +2193,7 @@ void OpenMMPMEFEP::initialise() std::vector p1_params(10); std::vector p2_params(10); std::vector corr_recip_params(3); - double Coulomb14Scale_squared = 0.0; - double qprod_start, qprod_end, qprod_mix; + double qprod_diff, qprod_start, qprod_end, qprod_mix; double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; for (int i = 0; i < num_exceptions; i++) @@ -2329,7 +2328,7 @@ void OpenMMPMEFEP::initialise() << "\nSgstart = " << Sigstart_p2 << "\nSgend = " << Sigend_p2 << "\nisHard = " << isHard_p2 << "\nisTodummy = " << isTodummy_p2 << "\nisFromdummy = " << isFromdummy_p2 << "\n"; - qDebug() << "Product Charge start = " << qprod_start << "\nProduct Charge end = " << qprod_end << "\nProduct Chrage mixed = " << qprod_mix + qDebug() << "Product Charge start = " << qprod_start << "\nProduct Charge end = " << qprod_end << "\nProduct Charge mixed = " << qprod_mix << "\nEpsilon average start = " << epsilon_avg_start << "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << qprod_mix << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << sigma_avg_end; qDebug() << "Coulombic Scale Factor = " << Coulomb14Scale_tmp << " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; @@ -2365,43 +2364,23 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "Added soft FROM dummy TO dummy 1-4\n"; } + } // 1-4 exceptions - // FIXME: right location? - // check if Coulomb scale factor is right - Coulomb14Scale_squared = Coulomb14Scale_tmp * Coulomb14Scale_tmp; - - nonbond_openmm->addExceptionParameterOffset( - "lambda", i, - Coulomb14Scale_squared * (qprod_end - qprod_start), 0.0, 0.0); - - corr_recip_params = {Coulomb14Scale_squared * qprod_start, - Coulomb14Scale_squared * qprod_end, Coulomb14Scale_squared * qprod_mix}; - custom_corr_recip->addBond(p1, p2, corr_recip_params); + // FIXME: right location? + qprod_diff = qprod_end - qprod_start; - if (Debug) - qDebug() << "offset = " - << Coulomb14Scale_tmp * (qprod_end - qprod_start) - << "qprod_start =" - << Coulomb14Scale_tmp * qprod_start - << "qprod_end =" - << Coulomb14Scale_tmp * qprod_end - << "qprod_mix =" - << Coulomb14Scale_tmp * qprod_mix; - } // 1-4 exceptions - else // 1-2 and 1-3 exceptions + if (qprod_diff != 0.0) { - // FIXME: right location? - nonbond_openmm->addExceptionParameterOffset("lambda", i, - qprod_end - qprod_start, 0.0, 0.0); + nonbond_openmm->addExceptionParameterOffset("lambda", i, qprod_diff, + 0.0, 0.0); - corr_recip_params = {qprod_start, qprod_end, qprod_mix}; - custom_corr_recip->addBond(p1, p2, corr_recip_params); + if (Debug) + qDebug() << "offset (" << i << ") ="<< qprod_end - qprod_start; - if (Debug) - qDebug() << "qprod_start =" << qprod_start - << "qprod_end =" << qprod_end - << "qprod_mix =" << qprod_end; - } // end if 1-4 exceptions + } + + corr_recip_params = {qprod_start, qprod_end, qprod_mix}; + custom_corr_recip->addBond(p1, p2, corr_recip_params); custom_force_field->addExclusion(p1, p2); } // end of loop over exceptions From 4f7a2ffcb8c9a835c300b7b7f4b48277cd0bd148 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 7 Mar 2022 09:06:08 +0000 Subject: [PATCH 072/148] replaced lambda shift with macro; no shift in correction term as not shift done in reciprocal space either --- corelib/src/libs/SireMove/openmmpmefep.cpp | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 1d29174b6..f11164b2c 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -386,13 +386,16 @@ QString OpenMMPMEFEP::toString() const // // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda + +#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? + tmpl_str OpenMMPMEFEP::GENERAL = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" // need to subtract scaled 1-4 interactions with erf() because computed in reciprocal space // also subtract 1-2 and 1-3 interactions as also computed in reciprocal space "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - "rCoul = lam_diff + r;" // do we need to shift? + COULOMB_SHIFT "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" @@ -431,7 +434,7 @@ tmpl_str OpenMMPMEFEP::TODUMMY = "withinCutoff = step(cutofftd - r);" "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - "rCoul = lam_diff + r;" + COULOMB_SHIFT "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" @@ -451,7 +454,7 @@ tmpl_str OpenMMPMEFEP::FROMDUMMY = "withinCutoff=step(cutofffd - r);" "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - "rCoul = lam_diff + r;" + COULOMB_SHIFT "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" @@ -471,7 +474,7 @@ tmpl_str OpenMMPMEFEP::FROMTODUMMY = "withinCutoff = step(cutoffftd - r);" "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - "rCoul = lam_diff + r;" + COULOMB_SHIFT "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" @@ -509,8 +512,11 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { tmpl_str OpenMMPMEFEP::CORR_RECIP = "-U_corr * withinCutoff;" "withinCutoff = step(cutoff - r);" - "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" // not erfc! - "rCoul = lam_diff + r;" + + // erf() instead of erfc()! + // no distance shift as not done in reciprocal space either + "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*r) / r;" + "lam_diff = (1.0 - lam_corr) * 0.1;" "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix"; @@ -675,7 +681,7 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("SPOnOff", 0.0); custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); - // This ensures that also the custom force field is subject to PBC + // FIXME: this ensures that also the custom force field is subject to PBC custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then @@ -2204,6 +2210,7 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + // FIXME: check this custom_force_field->getParticleParameters(p1, p1_params); custom_force_field->getParticleParameters(p2, p2_params); @@ -2282,6 +2289,7 @@ void OpenMMPMEFEP::initialise() } } + // HHL qprod_start *= Coulomb14Scale_tmp; qprod_end *= Coulomb14Scale_tmp; qprod_mix *= Coulomb14Scale_tmp; From d01280cf5583c77d7e3b86271f23da7e9bc7c41a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 7 Mar 2022 10:12:43 +0000 Subject: [PATCH 073/148] added missing cutoff to direct space --- corelib/src/libs/SireMove/openmmpmefep.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index f11164b2c..7dac9d986 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -389,6 +389,7 @@ QString OpenMMPMEFEP::toString() const #define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? +// FIXME: cutoff? tmpl_str OpenMMPMEFEP::GENERAL = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" @@ -507,17 +508,16 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" }; -// FIXME: do we need the cutoff here? -// subtract 1-2 and 1-3 interactions that have been calculated in reciprocal space +// subtract 1-2, 1-3 and 1-4 interactions that have been calculated in reciprocal space tmpl_str OpenMMPMEFEP::CORR_RECIP = "-U_corr * withinCutoff;" - "withinCutoff = step(cutoff - r);" + "withinCutoff = step(cutoff - r);" // FIXME: do we need the cutoff here? // erf() instead of erfc()! - // no distance shift as not done in reciprocal space either + // FIXME: no distance shift as not done in reciprocal space either "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*r) / r;" - "lam_diff = (1.0 - lam_corr) * 0.1;" + //"lam_diff = (1.0 - lam_corr) * 0.1;" "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix"; @@ -1141,8 +1141,10 @@ void OpenMMPMEFEP::initialise() charge_final = final_charges[j].value(); // HHL - // Lambda scaling in reciprocal space complimentary to scaling in direct space - // need to provide the parameter and the chargeScale for reciprocal PME + // Lambda scaling for 1-5+ (see exceptions below) in reciprocal + // space complimentary to scaling in direct space + // need to provide the parameter (lambda) and the chargeScale for + // reciprocal PME charge_diff = charge_final - charge_start; // FIXME: best to be defensive? From 432697898935205900eab70a03f126a911e0aea3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 7 Mar 2022 10:16:14 +0000 Subject: [PATCH 074/148] actually add missing cutoff to direct space... --- corelib/src/libs/SireMove/openmmpmefep.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 7dac9d986..8e4938540 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -391,7 +391,8 @@ QString OpenMMPMEFEP::toString() const // FIXME: cutoff? tmpl_str OpenMMPMEFEP::GENERAL = - "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" + "withinCutoff * (1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" + "withinCutoff = step(cutoff - r);" // need to subtract scaled 1-4 interactions with erf() because computed in reciprocal space // also subtract 1-2 and 1-3 interactions as also computed in reciprocal space From db7dbb08b7babf50b87445f91cfd51a2b57804f4 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 7 Mar 2022 16:53:59 +0000 Subject: [PATCH 075/148] comments --- corelib/src/libs/SireMove/openmmpmefep.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 8e4938540..1ae38a453 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -376,6 +376,7 @@ QString OpenMMPMEFEP::toString() const } // General force field +// HHL // FIXME: disable SPOnOff and see if it works with PME // // NOTE: There is one single namespace for global parameters but each parameter @@ -763,9 +764,8 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "corr_recip:" << corr_recip; + // HHL // FIXME: do we need a cutoff here as well? - // add bonds to force - // add to system custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); @@ -2213,6 +2213,7 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + // HHL // FIXME: check this custom_force_field->getParticleParameters(p1, p1_params); custom_force_field->getParticleParameters(p2, p2_params); @@ -2377,6 +2378,7 @@ void OpenMMPMEFEP::initialise() } } // 1-4 exceptions + // HHL // FIXME: right location? qprod_diff = qprod_end - qprod_start; @@ -2390,6 +2392,7 @@ void OpenMMPMEFEP::initialise() } + // FIXME: add only affected bonds? corr_recip_params = {qprod_start, qprod_end, qprod_mix}; custom_corr_recip->addBond(p1, p2, corr_recip_params); @@ -2930,7 +2933,6 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, // contents of *sire_coords. Note that velocities aren't touched. ws.commitCoordinates(); - // FIXME: looks like OpenMM is not updating the energy if (Debug) { MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; From 18e01559d0060b2210513e70bd3cf081da1cfe84 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 8 Mar 2022 20:23:45 +0000 Subject: [PATCH 076/148] missing semicolon in expression --- corelib/src/libs/SireMove/openmmpmefep.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 1ae38a453..c61995ada 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -431,7 +431,7 @@ tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" }; -// 1-4 terms for to/from/fromto dummies +// 1-4 term for shrinking atoms tmpl_str OpenMMPMEFEP::TODUMMY = "withinCutoff*(U_direct + U_LJ);" "withinCutoff = step(cutofftd - r);" @@ -452,6 +452,7 @@ tmpl_str OpenMMPMEFEP::TODUMMY_SIGMA[2] = { "sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);" }; +// 1-4 term for growing atoms tmpl_str OpenMMPMEFEP::FROMDUMMY = "withinCutoff*(U_direct + U_LJ);" "withinCutoff=step(cutofffd - r);" @@ -472,6 +473,7 @@ tmpl_str OpenMMPMEFEP::FROMDUMMY_SIGMA[2] = { "sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);" }; +// 1-4 term between shrinking and growing atoms tmpl_str OpenMMPMEFEP::FROMTODUMMY = "withinCutoff*(U_direct + U_LJ);" "withinCutoff = step(cutoffftd - r);" @@ -517,10 +519,11 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = // erf() instead of erfc()! // FIXME: no distance shift as not done in reciprocal space either + // is lambda^n needed here? "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*r) / r;" //"lam_diff = (1.0 - lam_corr) * 0.1;" - "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix"; + "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_cor)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; /** From 224b747b5c62f4c94b8958e8b295dda672518d7b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 8 Mar 2022 20:26:53 +0000 Subject: [PATCH 077/148] typo in variable in expression --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index c61995ada..e4e1488f5 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -523,7 +523,7 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*r) / r;" //"lam_diff = (1.0 - lam_corr) * 0.1;" - "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_cor)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; + "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; /** From e9ef8461fa0e3bad6baa5c442c32780f1b494e75 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 9 Mar 2022 19:12:42 +0000 Subject: [PATCH 078/148] removed separation-shifting for the moment --- corelib/src/libs/SireMove/openmmpmefep.cpp | 33 +++++++++++++--------- 1 file changed, 20 insertions(+), 13 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e4e1488f5..7fc53e5ff 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -388,15 +388,16 @@ QString OpenMMPMEFEP::toString() const // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda -#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? +//#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? +#define COULOMB_SHIFT "rCoul = r;" // FIXME: cutoff? tmpl_str OpenMMPMEFEP::GENERAL = "withinCutoff * (1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" "withinCutoff = step(cutoff - r);" - // need to subtract scaled 1-4 interactions with erf() because computed in reciprocal space - // also subtract 1-2 and 1-3 interactions as also computed in reciprocal space + // need to subtract scaled 1-4 interactions with erf() because those are + // computed in reciprocal space, the same for 1-2 and 1-3 "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" COULOMB_SHIFT @@ -432,6 +433,7 @@ tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { }; // 1-4 term for shrinking atoms +// NOTE: passed-in lamda (lamtd) is 1-lambda tmpl_str OpenMMPMEFEP::TODUMMY = "withinCutoff*(U_direct + U_LJ);" "withinCutoff = step(cutofftd - r);" @@ -514,15 +516,20 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { // subtract 1-2, 1-3 and 1-4 interactions that have been calculated in reciprocal space tmpl_str OpenMMPMEFEP::CORR_RECIP = + // cutoff shouldn't be needed because 1-4 should be shorter than cutoff "-U_corr * withinCutoff;" - "withinCutoff = step(cutoff - r);" // FIXME: do we need the cutoff here? + "withinCutoff = step(cutoff - r);" - // erf() instead of erfc()! + // erf() instead of erfc(), see PME implementation in OpenMM // FIXME: no distance shift as not done in reciprocal space either - // is lambda^n needed here? - "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*r) / r;" + // is lambda^n needed here? consistency with reciprocal space so no but open question + "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" + COULOMB_SHIFT + + "lam_diff = (1.0 - lam_corr) * 0.1;" - //"lam_diff = (1.0 - lam_corr) * 0.1;" + // FIXME: probably wrong for to and from dummy but maybe ok for fromto dummy and hard + // when qcend and qcstart swapped: ok for from dummy, todummy still off "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; @@ -686,7 +693,7 @@ void OpenMMPMEFEP::initialise() custom_force_field->addGlobalParameter("SPOnOff", 0.0); custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); - // FIXME: this ensures that also the custom force field is subject to PBC + // this ensures that also the custom force field is subject to PBC custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then @@ -768,7 +775,6 @@ void OpenMMPMEFEP::initialise() qDebug() << "corr_recip:" << corr_recip; // HHL - // FIXME: do we need a cutoff here as well? custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); @@ -1151,12 +1157,13 @@ void OpenMMPMEFEP::initialise() // reciprocal PME charge_diff = charge_final - charge_start; - // FIXME: best to be defensive? - if (charge_diff < 0.00001) + // FIXME: really needed? const for small value + if (abs(charge_diff) < 0.00001) charge_diff = 0.0; if (charge_diff != 0.0) { + // FIXME: check if all particles need this? nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, 0.0, 0.0); // sigma, epsilon not needed @@ -2228,7 +2235,7 @@ void OpenMMPMEFEP::initialise() qprod_start = Qstart_p1 * Qstart_p2; qprod_end = Qend_p1 * Qend_p2; - qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; + qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; // FIXME: really needed? if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " From 061309d7bcba0fce9342a2489eb178a62df9de94 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 10 Mar 2022 11:11:30 +0000 Subject: [PATCH 079/148] added energy debug output as in PME code --- .../src/libs/SireMove/openmmfrenergyst.cpp | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.cpp b/corelib/src/libs/SireMove/openmmfrenergyst.cpp index 88d4bab22..464e0e7a7 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergyst.cpp @@ -401,7 +401,7 @@ void OpenMMFrEnergyST::initialise() //if ( solute.isEmpty() ){ // throw SireError::program_bug(QObject::tr("Cannot initialise OpenMMFrEnergyST because solute group has not been defined"), CODELOC); //} - + const MoleculeGroup solutehard = this->solutehard.read(); const MoleculeGroup solutetodummy = this->solutetodummy.read(); @@ -3201,9 +3201,12 @@ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e- OpenMM::State state_openmm = openmm_context->getState(infoMask); if (Debug) - qDebug() << "Initial energy is" - << state_openmm.getPotentialEnergy() * OpenMM::KcalPerKJ - << "kcal/mol at lambda =" << Alchemical_value << "\n"; + { + MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; + + qDebug() << "Energy before minimisation:" << Epot + << "kcal/mol at lambda =" << Alchemical_value; + } // Step 2 minimise OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); @@ -3236,6 +3239,15 @@ System OpenMMFrEnergyST::minimiseEnergy(System &system, double tolerance = 1.0e- // This causes the workspace to update the system coordinates with the // contents of *sire_coords. Note that velocities aren't touched. ws.commitCoordinates(); + + if (Debug) + { + MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; + + qDebug() << "Energy after minimisation:" << Epot + << "kcal/mol at lambda =" << Alchemical_value; + } + // Step 4 delete the context // JM 04/15 FIXME: See comment above at step 1 this->destroyContext(); From 0cb2bb8174f98174e9e916633677b4d0474a68e0 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 10 Mar 2022 17:14:27 +0000 Subject: [PATCH 080/148] I think q_prod should use linear scaling as in the reciprocal space --- corelib/src/libs/SireMove/openmmpmefep.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 7fc53e5ff..e86bb3379 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -524,13 +524,15 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = // FIXME: no distance shift as not done in reciprocal space either // is lambda^n needed here? consistency with reciprocal space so no but open question "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" + "rCoul = r;" COULOMB_SHIFT "lam_diff = (1.0 - lam_corr) * 0.1;" // FIXME: probably wrong for to and from dummy but maybe ok for fromto dummy and hard // when qcend and qcstart swapped: ok for from dummy, todummy still off - "q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; + //"q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; + "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;" // this is symmetrical /** @@ -2224,7 +2226,6 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); // HHL - // FIXME: check this custom_force_field->getParticleParameters(p1, p1_params); custom_force_field->getParticleParameters(p2, p2_params); @@ -2389,7 +2390,6 @@ void OpenMMPMEFEP::initialise() } // 1-4 exceptions // HHL - // FIXME: right location? qprod_diff = qprod_end - qprod_start; if (qprod_diff != 0.0) @@ -2397,8 +2397,8 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->addExceptionParameterOffset("lambda", i, qprod_diff, 0.0, 0.0); - if (Debug) - qDebug() << "offset (" << i << ") ="<< qprod_end - qprod_start; + if (Debug) + qDebug() << "offset (" << i << ") ="<< qprod_end - qprod_start; } From 07288687308d2baf8a3c3b60917f5012a79aa3a0 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 11 Mar 2022 11:10:28 +0000 Subject: [PATCH 081/148] missing ; --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e86bb3379..97bb8809e 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -532,7 +532,7 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = // FIXME: probably wrong for to and from dummy but maybe ok for fromto dummy and hard // when qcend and qcstart swapped: ok for from dummy, todummy still off //"q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; - "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;" // this is symmetrical + "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;"; // this is symmetrical /** From adb13e624d0de33d87c5d66d7d39f75abd365455 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 16 Mar 2022 14:37:09 +0000 Subject: [PATCH 082/148] removed prefactor in correction term as it gives very negarive energies --- corelib/src/libs/SireMove/openmmpmefep.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 97bb8809e..577e187d5 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -523,7 +523,7 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = // erf() instead of erfc(), see PME implementation in OpenMM // FIXME: no distance shift as not done in reciprocal space either // is lambda^n needed here? consistency with reciprocal space so no but open question - "U_corr = %1 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" + "U_corr = 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" "rCoul = r;" COULOMB_SHIFT @@ -766,12 +766,13 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); - if (coulomb_power > 0) - lam_pre = "(lam_corr^n_corr) *"; + // FIXME: should probably not be used + //if (coulomb_power > 0) + // lam_pre = "(lam_corr^n_corr) *"; // HHL // correction term for 1-2 and 1-3 exceptions computed in reciprocal space - QString corr_recip = CORR_RECIP.arg(lam_pre); + QString corr_recip = QString(CORR_RECIP); //.arg(lam_pre); if (Debug) qDebug() << "corr_recip:" << corr_recip; From e2baf00ab2f880e4edf331c7af140521383e4af1 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 23 Mar 2022 06:56:16 +0000 Subject: [PATCH 083/148] activated Coulomb shift again as it seems that otherwise gradients get huge; minor changes in comments --- corelib/src/libs/SireMove/openmmpmefep.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 577e187d5..f171705a7 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -388,10 +388,9 @@ QString OpenMMPMEFEP::toString() const // JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) // JM 9/10/10 setting Logix_mix_lam output to 0 for lambda -//#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? -#define COULOMB_SHIFT "rCoul = r;" +#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? +//#define COULOMB_SHIFT "rCoul = r;" -// FIXME: cutoff? tmpl_str OpenMMPMEFEP::GENERAL = "withinCutoff * (1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" "withinCutoff = step(cutoff - r);" @@ -433,7 +432,7 @@ tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { }; // 1-4 term for shrinking atoms -// NOTE: passed-in lamda (lamtd) is 1-lambda +// NOTE: passed-in lambda (lamtd) is 1-lambda tmpl_str OpenMMPMEFEP::TODUMMY = "withinCutoff*(U_direct + U_LJ);" "withinCutoff = step(cutofftd - r);" @@ -521,8 +520,6 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = "withinCutoff = step(cutoff - r);" // erf() instead of erfc(), see PME implementation in OpenMM - // FIXME: no distance shift as not done in reciprocal space either - // is lambda^n needed here? consistency with reciprocal space so no but open question "U_corr = 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" "rCoul = r;" COULOMB_SHIFT @@ -653,7 +650,8 @@ void OpenMMPMEFEP::initialise() // from NonbondedForceImpl.cpp // FIXME: check if this is also the value for reciprocal space - double alpha_PME = (1.0 / converted_cutoff_distance) * std::sqrt(-log(2.0 * tolerance_PME)); + double alpha_PME = (1.0 / converted_cutoff_distance) + * std::sqrt(-log(2.0 * tolerance_PME)); if (Debug) { From 5afbeb4729a8e00d4c67fc3a5b1beff60beb7d1d Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 23 Mar 2022 14:27:40 +0000 Subject: [PATCH 084/148] added check for cutoff type --- wrapper/Tools/OpenMMMD.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 6682884c6..500e1e194 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1606,7 +1606,10 @@ def setupMovesFreeEnergy(system, debug_seed, gpu_idx, lam_val): ) # Only meaningful for Langevin/Brownian integrators Integrator_OpenMM.setPlatform(platform.val) Integrator_OpenMM.setConstraintType(constraint.val) - Integrator_OpenMM.setCutoffType(cutoff_type.val) + + if cutoff_type.val != 'PME': + Integrator_OpenMM.setCutoffType(cutoff_type.val) + Integrator_OpenMM.setFieldDielectric(rf_dielectric.val) Integrator_OpenMM.setAlchemicalValue(lambda_val.val) Integrator_OpenMM.setAlchemicalArray(lambda_array.val) From 460dc3f76fd84402481c055d170e836660813f2d Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 25 Mar 2022 06:59:54 +0000 Subject: [PATCH 085/148] debug output for offsets --- corelib/src/libs/SireMove/openmmpmefep.cpp | 9 +++++---- wrapper/Tools/FreeEnergyAnalysis.py | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index f171705a7..65e4de71d 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -649,7 +649,6 @@ void OpenMMPMEFEP::initialise() double tolerance_PME = nonbond_openmm->getEwaldErrorTolerance(); // from NonbondedForceImpl.cpp - // FIXME: check if this is also the value for reciprocal space double alpha_PME = (1.0 / converted_cutoff_distance) * std::sqrt(-log(2.0 * tolerance_PME)); @@ -1165,13 +1164,15 @@ void OpenMMPMEFEP::initialise() if (charge_diff != 0.0) { // FIXME: check if all particles need this? + // charge = charge_start + lambda * charge_diff nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, 0.0, 0.0); // sigma, epsilon not needed if (Debug) - qDebug() << "charge_diff =" << charge_diff - << "charge_start =" << charge_start - << "charge_final =" << charge_final; + qDebug() << "Adding offset for atom idx" << nonbond_idx + << "; charge_diff =" << charge_diff + << "; charge_start =" << charge_start + << "; charge_final =" << charge_final; } double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; diff --git a/wrapper/Tools/FreeEnergyAnalysis.py b/wrapper/Tools/FreeEnergyAnalysis.py index bb424ec57..6658dd335 100644 --- a/wrapper/Tools/FreeEnergyAnalysis.py +++ b/wrapper/Tools/FreeEnergyAnalysis.py @@ -18,7 +18,7 @@ try: scipy = Sire.try_import("scipy") except ImportError: - raise ImportError('Numpy is not installed. Please install numpy in order to use MBAR for your free energy analysis.') + raise ImportError('Scipy is not installed. Please install numpy in order to use MBAR for your free energy analysis.') try: from pymbar import MBAR From bf34e85b688577c5a9ed396bc541e908efb6af08 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 25 Mar 2022 14:45:31 +0000 Subject: [PATCH 086/148] set explicitly cutoff for nonbonded force --- corelib/src/libs/SireMove/openmmpmefep.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 65e4de71d..b7bed9123 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -639,7 +639,7 @@ void OpenMMPMEFEP::initialise() OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); nonbond_openmm->setNonbondedMethod(OpenMM::NonbondedForce::PME); nonbond_openmm->setIncludeDirectSpace(false); - + nonbond_openmm->setCutoffDistance(converted_cutoff_distance) nonbond_openmm->setUseDispersionCorrection(false); // scale the charges in the reciprocal space @@ -1170,9 +1170,7 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "Adding offset for atom idx" << nonbond_idx - << "; charge_diff =" << charge_diff - << "; charge_start =" << charge_start - << "; charge_final =" << charge_final; + << "; charge_diff =" << charge_diff; } double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; From c5f539bd3d7c6d72bbc2c70c1f083011aeb5682d Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sat, 26 Mar 2022 09:08:26 +0000 Subject: [PATCH 087/148] removed cutoff check in expression for general force field because it is set explicitely with setCutoffDistance() --- corelib/src/libs/SireMove/openmmpmefep.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index b7bed9123..4a378aa08 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -392,8 +392,7 @@ QString OpenMMPMEFEP::toString() const //#define COULOMB_SHIFT "rCoul = r;" tmpl_str OpenMMPMEFEP::GENERAL = - "withinCutoff * (1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" - "withinCutoff = step(cutoff - r);" + "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" // need to subtract scaled 1-4 interactions with erf() because those are // computed in reciprocal space, the same for 1-2 and 1-3 @@ -638,8 +637,8 @@ void OpenMMPMEFEP::initialise() // custom forces, see above OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); nonbond_openmm->setNonbondedMethod(OpenMM::NonbondedForce::PME); + nonbond_openmm->setCutoffDistance(converted_cutoff_distance); nonbond_openmm->setIncludeDirectSpace(false); - nonbond_openmm->setCutoffDistance(converted_cutoff_distance) nonbond_openmm->setUseDispersionCorrection(false); // scale the charges in the reciprocal space From ef8d77b280b80850984e3347dc38fd6bc61bef4b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 30 Mar 2022 06:50:09 +0100 Subject: [PATCH 088/148] renamed offset parameter to be sure it does not clash with other global parameters --- corelib/src/libs/SireMove/openmmpmefep.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4a378aa08..c81130a2b 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -642,7 +642,7 @@ void OpenMMPMEFEP::initialise() nonbond_openmm->setUseDispersionCorrection(false); // scale the charges in the reciprocal space - nonbond_openmm->addGlobalParameter("lambda", 0.0); + nonbond_openmm->addGlobalParameter("lambda_offset", 0.0); // use default for the moment double tolerance_PME = nonbond_openmm->getEwaldErrorTolerance(); @@ -1164,7 +1164,7 @@ void OpenMMPMEFEP::initialise() { // FIXME: check if all particles need this? // charge = charge_start + lambda * charge_diff - nonbond_openmm->addParticleParameterOffset("lambda", nonbond_idx, charge_diff, + nonbond_openmm->addParticleParameterOffset("lambda_offset", nonbond_idx, charge_diff, 0.0, 0.0); // sigma, epsilon not needed if (Debug) @@ -2391,11 +2391,12 @@ void OpenMMPMEFEP::initialise() if (qprod_diff != 0.0) { - nonbond_openmm->addExceptionParameterOffset("lambda", i, qprod_diff, + nonbond_openmm->addExceptionParameterOffset("lambda_offset", i, qprod_diff, 0.0, 0.0); if (Debug) - qDebug() << "offset (" << i << ") ="<< qprod_end - qprod_start; + qDebug() << "Adding exception offset for atom idx" << i + << "; qprod_diff =" << qprod_diff; } From 695e59da8672e928a3e554d6bb3d41df07d37896 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 30 Mar 2022 08:17:01 +0100 Subject: [PATCH 089/148] removed check for cutoff type; use auto were it makes sense --- corelib/src/libs/SireMove/openmmpmefep.cpp | 183 +++++++++------------ 1 file changed, 78 insertions(+), 105 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index c81130a2b..1ef4d0cee 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -391,6 +391,7 @@ QString OpenMMPMEFEP::toString() const #define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? //#define COULOMB_SHIFT "rCoul = r;" +// Direct space PME and LJ tmpl_str OpenMMPMEFEP::GENERAL = "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" @@ -569,16 +570,6 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "There are " << nats << " atoms " << "There are " << nmols << " molecules" << "\n"; - int flag_cutoff; - int flag_constraint; - - // This class here only deals with PME for the time being. But we leave - // the check in place just in case. - if (CutoffType == "PME") - flag_cutoff = PME; - else - throw SireError::program_bug(QObject::tr("The CutOff method has not been specified. Possible choices: nocutoff, cutoffnonperiodic, cutoffperiodic, PME"), CODELOC); - int flag_combRules; if (combiningRules == "arithmetic") @@ -592,6 +583,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "\ncombiningRules = " << combiningRules << "\n"; bool flag_noperturbedconstraints = false; + int flag_constraint; bool flag_constraint_water = false; if (ConstraintType == "none") @@ -635,17 +627,17 @@ void OpenMMPMEFEP::initialise() // Use NonbondedForce to compute Ewald reciprocal and self terms // Direct space and LJ need to be implemented via expressions to // custom forces, see above - OpenMM::NonbondedForce *nonbond_openmm = new OpenMM::NonbondedForce(); - nonbond_openmm->setNonbondedMethod(OpenMM::NonbondedForce::PME); - nonbond_openmm->setCutoffDistance(converted_cutoff_distance); - nonbond_openmm->setIncludeDirectSpace(false); - nonbond_openmm->setUseDispersionCorrection(false); + OpenMM::NonbondedForce *recip_space = new OpenMM::NonbondedForce(); + recip_space->setNonbondedMethod(OpenMM::NonbondedForce::PME); + recip_space->setCutoffDistance(converted_cutoff_distance); + recip_space->setIncludeDirectSpace(false); + recip_space->setUseDispersionCorrection(false); // scale the charges in the reciprocal space - nonbond_openmm->addGlobalParameter("lambda_offset", 0.0); + recip_space->addGlobalParameter("lambda_offset", 0.0); // use default for the moment - double tolerance_PME = nonbond_openmm->getEwaldErrorTolerance(); + double tolerance_PME = recip_space->getEwaldErrorTolerance(); // from NonbondedForceImpl.cpp double alpha_PME = (1.0 / converted_cutoff_distance) @@ -657,16 +649,6 @@ void OpenMMPMEFEP::initialise() << "computed from PME error tolerance =" << tolerance_PME; } - // CUSTOM NON BONDED FORCE FIELD - OpenMM::CustomNonbondedForce *custom_force_field = NULL; - - // 1-4 interactions - OpenMM::CustomBondForce *custom_intra_14_clj = NULL; - OpenMM::CustomBondForce *custom_intra_14_todummy = NULL; - OpenMM::CustomBondForce *custom_intra_14_fromdummy = NULL; - OpenMM::CustomBondForce *custom_intra_14_fromdummy_todummy = NULL; - OpenMM::CustomBondForce *custom_corr_recip = NULL; - QString lam_pre = ""; // This check is necessary to avoid nan errors on the GPU platform caused @@ -678,21 +660,19 @@ void OpenMMPMEFEP::initialise() general_ff.append(GENERAL_SIGMA[flag_combRules]); if (Debug) - qDebug() << "general_ff:" << general_ff; + qDebug() << "direct space (PME, LJ):" << general_ff; - custom_force_field = - new OpenMM::CustomNonbondedForce(general_ff.toStdString()); + auto direct_space = new OpenMM::CustomNonbondedForce(general_ff.toStdString()); - custom_force_field->setCutoffDistance(converted_cutoff_distance); - custom_force_field->addGlobalParameter("lam", Alchemical_value); - custom_force_field->addGlobalParameter("delta", shift_delta); - custom_force_field->addGlobalParameter("n", coulomb_power); - custom_force_field->addGlobalParameter("cutoff", converted_cutoff_distance); - custom_force_field->addGlobalParameter("SPOnOff", 0.0); - custom_force_field->addGlobalParameter("alpha_pme", alpha_PME); + direct_space->setCutoffDistance(converted_cutoff_distance); + direct_space->addGlobalParameter("lam", Alchemical_value); + direct_space->addGlobalParameter("delta", shift_delta); + direct_space->addGlobalParameter("n", coulomb_power); + direct_space->addGlobalParameter("SPOnOff", 0.0); + direct_space->addGlobalParameter("alpha_pme", alpha_PME); // this ensures that also the custom force field is subject to PBC - custom_force_field->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application @@ -707,7 +687,7 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "intra_14_todummy:" << intra_14_todummy; - custom_intra_14_todummy = + auto custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); @@ -724,7 +704,7 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; - custom_intra_14_fromdummy = + auto custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); @@ -742,7 +722,7 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; - custom_intra_14_fromdummy_todummy = + auto custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); @@ -756,7 +736,7 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "custom_intra_14_clj:" << intra_14_clj; - custom_intra_14_clj = + auto custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()); custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); @@ -774,7 +754,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "corr_recip:" << corr_recip; // HHL - custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); + auto custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); @@ -794,7 +774,8 @@ void OpenMMPMEFEP::initialise() { const double converted_Temperature = convertTo(Temperature.value(), kelvin); - OpenMM::AndersenThermostat * thermostat = new OpenMM::AndersenThermostat(converted_Temperature, Andersen_frequency); + auto thermostat = new OpenMM::AndersenThermostat(converted_Temperature, + Andersen_frequency); //Set The random seed thermostat->setRandomNumberSeed(random_seed); @@ -815,7 +796,9 @@ void OpenMMPMEFEP::initialise() const double converted_Temperature = convertTo(Temperature.value(), kelvin); const double converted_Pressure = convertTo(Pressure.value(), bar); - OpenMM::MonteCarloBarostat * barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, converted_Temperature, MCBarostat_frequency); + auto barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, + converted_Temperature, + MCBarostat_frequency); //Set The random seed barostat->setRandomNumberSeed(random_seed); @@ -832,24 +815,18 @@ void OpenMMPMEFEP::initialise() } /*******************************************************BONDED INTERACTIONS******************************************************/ - OpenMM::HarmonicBondForce * bondStretch_openmm = new OpenMM::HarmonicBondForce(); - - OpenMM::HarmonicAngleForce * bondBend_openmm = new OpenMM::HarmonicAngleForce(); + auto bondStretch_openmm = new OpenMM::HarmonicBondForce(); + auto bondBend_openmm = new OpenMM::HarmonicAngleForce(); + auto bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); - OpenMM::PeriodicTorsionForce * bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); - - OpenMM::CustomBondForce* solute_bond_perturbation = NULL; - - OpenMM::CustomAngleForce* solute_angle_perturbation = NULL; - - solute_bond_perturbation = new OpenMM::CustomBondForce( + auto solute_bond_perturbation = new OpenMM::CustomBondForce( "0.5*B*(r-req)^2;" "B=bend*lambond+(1.0-lambond)*bstart;" "req=rend*lambond+(1.0-lambond)*rstart"); solute_bond_perturbation->addGlobalParameter("lambond", Alchemical_value); - solute_angle_perturbation = new OpenMM::CustomAngleForce( + auto solute_angle_perturbation = new OpenMM::CustomAngleForce( "0.5*A*(theta-thetaeq)^2;" "A=aend*lamangle+(1.0-lamangle)*astart;" "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); @@ -859,11 +836,9 @@ void OpenMMPMEFEP::initialise() /************************************************************RESTRAINTS********************************************************/ - OpenMM::CustomExternalForce * positionalRestraints_openmm = NULL; - if (Restraint_flag == true) { - positionalRestraints_openmm = + auto positionalRestraints_openmm = new OpenMM::CustomExternalForce( "k*d2;" "d2 = max(0.0, d1 - d^2);" @@ -884,7 +859,7 @@ void OpenMMPMEFEP::initialise() /* NOTE: CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy if restraints involve one atom that diffuses out of the box. */ - OpenMM::CustomBondForce * custom_link_bond = + auto custom_link_bond = new OpenMM::CustomBondForce("kl * max(0, d - dl*dl);" "d = (r-reql) * (r-reql)"); custom_link_bond->addPerBondParameter("reql"); @@ -1003,7 +978,7 @@ void OpenMMPMEFEP::initialise() << h2_index << " 1 - weightH " << 1 - weightH << " weightH/2 " << weightH / 2; - OpenMM::ThreeParticleAverageSite * vsite = + auto vsite = new OpenMM::ThreeParticleAverageSite(o_index, h1_index, h2_index, 1 - weightH, weightH / 2, weightH / 2); @@ -1021,16 +996,16 @@ void OpenMMPMEFEP::initialise() int num_atoms_till_i = 0; // nonbonded per particle parameters - custom_force_field->addPerParticleParameter("qstart"); - custom_force_field->addPerParticleParameter("qend"); - custom_force_field->addPerParticleParameter("epstart"); - custom_force_field->addPerParticleParameter("epend"); - custom_force_field->addPerParticleParameter("sigmastart"); - custom_force_field->addPerParticleParameter("sigmaend"); - custom_force_field->addPerParticleParameter("isHD"); - custom_force_field->addPerParticleParameter("isTD"); - custom_force_field->addPerParticleParameter("isFD"); - custom_force_field->addPerParticleParameter("isSolvent"); + direct_space->addPerParticleParameter("qstart"); + direct_space->addPerParticleParameter("qend"); + direct_space->addPerParticleParameter("epstart"); + direct_space->addPerParticleParameter("epend"); + direct_space->addPerParticleParameter("sigmastart"); + direct_space->addPerParticleParameter("sigmaend"); + direct_space->addPerParticleParameter("isHD"); + direct_space->addPerParticleParameter("isTD"); + direct_space->addPerParticleParameter("isFD"); + direct_space->addPerParticleParameter("isSolvent"); for (auto const ¶m : {"qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"}) @@ -1126,6 +1101,8 @@ void OpenMMPMEFEP::initialise() int nonbond_idx = 0; double charge_start = 0.0, charge_final = 0.0; + // Iterate over all atoms in the molecules: + // ljparameters.size() is used here as the number of atoms for (int j = 0; j < ljparameters.size(); j++) { double charge = charges[j].value(); @@ -1134,8 +1111,9 @@ void OpenMMPMEFEP::initialise() double charge_diff = 0.0; // This really only adds the nonbonded parameters - // The parameters need to be added in the same order as in the System - nonbond_idx = nonbond_openmm->addParticle(charge, sigma, epsilon); + // The parameters need to be added in the same order as they + // appear in the System + nonbond_idx = recip_space->addParticle(charge, sigma, epsilon); Atom atom = molecule.molecule().atoms()(j); @@ -1162,9 +1140,10 @@ void OpenMMPMEFEP::initialise() if (charge_diff != 0.0) { - // FIXME: check if all particles need this? - // charge = charge_start + lambda * charge_diff - nonbond_openmm->addParticleParameterOffset("lambda_offset", nonbond_idx, charge_diff, + // charge = charge_start + lambda_offset * charge_diff + recip_space->addParticleParameterOffset("lambda_offset", + nonbond_idx, + charge_diff, 0.0, 0.0); // sigma, epsilon not needed if (Debug) @@ -1327,7 +1306,7 @@ void OpenMMPMEFEP::initialise() // Adds the custom parmaters to _all_ atoms // Must be in same order as in the System - custom_force_field->addParticle(custom_non_bonded_params); + direct_space->addParticle(custom_non_bonded_params); } /****************************************************RESTRAINTS*******************************************************/ @@ -1635,9 +1614,6 @@ void OpenMMPMEFEP::initialise() if (H_X_H || H_O_X || X_O_H) { - const BondID * first_alchemical_bond = NULL; - const BondID * second_alchemical_bond = NULL; - double first_alchemical_distance = -1.0; double second_alchemical_distance = -1.0; @@ -1659,7 +1635,7 @@ void OpenMMPMEFEP::initialise() { if (Debug) qDebug() << "First perturbed bond was not foud in the perturned list"; - first_alchemical_bond = new BondID(three.atom0(), three.atom1()); + auto first_alchemical_bond = new BondID(three.atom0(), three.atom1()); } @@ -1681,7 +1657,7 @@ void OpenMMPMEFEP::initialise() { if (Debug) qDebug() << "Second perturbed bond was not foud in the perturned list"; - second_alchemical_bond = new BondID(three.atom2(), three.atom1()); + auto second_alchemical_bond = new BondID(three.atom2(), three.atom1()); } @@ -1863,9 +1839,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Dihedral Normal String = " << four.perturbExpression().toString() << "\n"; } - OpenMM::CustomTorsionForce* solute_torsion_perturbation = NULL; - - solute_torsion_perturbation = new OpenMM::CustomTorsionForce(openmm_str); + auto solute_torsion_perturbation = new OpenMM::CustomTorsionForce(openmm_str); solute_torsion_perturbation->addPerTorsionParameter("KJPerKcal"); solute_torsion_perturbation_params[0] = 4.184; solute_torsion_perturbation->addGlobalParameter("lamdih", Alchemical_value); @@ -2191,11 +2165,11 @@ void OpenMMPMEFEP::initialise() // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms - nonbond_openmm->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); + recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); if (CMMremoval_frequency > 0) { - OpenMM::CMMotionRemover * cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); + auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); system_openmm->addForce(cmmotionremover); @@ -2203,7 +2177,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "\n\nWill remove Center of Mass motion every " << CMMremoval_frequency << " steps\n\n"; } - int num_exceptions = nonbond_openmm->getNumExceptions(); + int num_exceptions = recip_space->getNumExceptions(); if (Debug) qDebug() << "NUM EXCEPTIONS = " << num_exceptions << "\n"; @@ -2220,11 +2194,11 @@ void OpenMMPMEFEP::initialise() double charge_prod, sigma_avg, epsilon_avg; - nonbond_openmm->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + recip_space->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); // HHL - custom_force_field->getParticleParameters(p1, p1_params); - custom_force_field->getParticleParameters(p2, p2_params); + direct_space->getParticleParameters(p1, p1_params); + direct_space->getParticleParameters(p2, p2_params); Qstart_p1 = p1_params[0]; Qend_p1 = p1_params[1]; @@ -2391,7 +2365,7 @@ void OpenMMPMEFEP::initialise() if (qprod_diff != 0.0) { - nonbond_openmm->addExceptionParameterOffset("lambda_offset", i, qprod_diff, + recip_space->addExceptionParameterOffset("lambda_offset", i, qprod_diff, 0.0, 0.0); if (Debug) @@ -2404,12 +2378,12 @@ void OpenMMPMEFEP::initialise() corr_recip_params = {qprod_start, qprod_end, qprod_mix}; custom_corr_recip->addBond(p1, p2, corr_recip_params); - custom_force_field->addExclusion(p1, p2); + direct_space->addExclusion(p1, p2); } // end of loop over exceptions /*************************************NON BONDED INTERACTIONS*********************************************/ - int npairs = (custom_force_field->getNumParticles() * (custom_force_field->getNumParticles() - 1)) / 2; + int npairs = (direct_space->getNumParticles() * (direct_space->getNumParticles() - 1)) / 2; if (Debug) { @@ -2420,12 +2394,12 @@ void OpenMMPMEFEP::initialise() qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << custom_intra_14_fromdummy_todummy->getNumBonds(); } - system_openmm->addForce(nonbond_openmm); // reciprocal space only + system_openmm->addForce(recip_space); if (npairs != num_exceptions) { - custom_force_field->setForceGroup(0); - system_openmm->addForce(custom_force_field); // direct space and LJ + direct_space->setForceGroup(0); + system_openmm->addForce(direct_space); perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system if (Debug) qDebug() << "Added 1-5"; @@ -2619,20 +2593,18 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime if (!isContextInitialised || (isContextInitialised && reinitialise_context)) { - OpenMM::Integrator * integrator_openmm = NULL; - if (Integrator_type == "leapfrogverlet") - integrator_openmm = new OpenMM::VerletIntegrator(dt); //dt in picosecond + auto integrator_openmm = new OpenMM::VerletIntegrator(dt); //dt in picosecond else if (Integrator_type == "variableleapfrogverlet") - integrator_openmm = new OpenMM::VariableVerletIntegrator(integration_tol); //integration tolerance error unitless + auto integrator_openmm = new OpenMM::VariableVerletIntegrator(integration_tol); //integration tolerance error unitless else if (Integrator_type == "langevin") - integrator_openmm = new OpenMM::LangevinIntegrator(converted_Temperature, converted_friction, dt); + auto integrator_openmm = new OpenMM::LangevinIntegrator(converted_Temperature, converted_friction, dt); else if (Integrator_type == "langevinmiddle") - integrator_openmm = new OpenMM::LangevinMiddleIntegrator(converted_Temperature, converted_friction, dt); + auto integrator_openmm = new OpenMM::LangevinMiddleIntegrator(converted_Temperature, converted_friction, dt); else if (Integrator_type == "variablelangevin") - integrator_openmm = new OpenMM::VariableLangevinIntegrator(converted_Temperature, converted_friction, integration_tol); + auto integrator_openmm = new OpenMM::VariableLangevinIntegrator(converted_Temperature, converted_friction, integration_tol); else if (Integrator_type == "brownian") - integrator_openmm = new OpenMM::BrownianIntegrator(converted_Temperature, converted_friction, dt); + auto integrator_openmm = new OpenMM::BrownianIntegrator(converted_Temperature, converted_friction, dt); else throw SireError::program_bug(QObject::tr("The user defined Integrator type is not supported. Available types are leapfrogverlet, variableleapfrogverlet, langevin, variablelangevin, brownian"), CODELOC); @@ -2739,6 +2711,7 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime const TriclinicBox &space = ptr_sys.property(space_property).asA(); // Get the three triclinic box vectors. + // FIXME: not good practice of using auto here const auto v0 = space.vector0(); const auto v1 = space.vector1(); const auto v2 = space.vector2(); From 4585e427aa1d52dc7152d0e0d2793f814bff441b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 30 Mar 2022 08:21:57 +0100 Subject: [PATCH 090/148] fixed one problem with auto --- corelib/src/libs/SireMove/openmmpmefep.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 1ef4d0cee..01aefb121 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1614,6 +1614,9 @@ void OpenMMPMEFEP::initialise() if (H_X_H || H_O_X || X_O_H) { + const BondID * first_alchemical_bond = NULL; + const BondID * second_alchemical_bond = NULL; + double first_alchemical_distance = -1.0; double second_alchemical_distance = -1.0; @@ -1635,7 +1638,7 @@ void OpenMMPMEFEP::initialise() { if (Debug) qDebug() << "First perturbed bond was not foud in the perturned list"; - auto first_alchemical_bond = new BondID(three.atom0(), three.atom1()); + first_alchemical_bond = new BondID(three.atom0(), three.atom1()); } From 9443c7fff7329cc11c669f037680eea6d5da278b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 30 Mar 2022 08:27:26 +0100 Subject: [PATCH 091/148] fixed two more problems with auto --- corelib/src/libs/SireMove/openmmpmefep.cpp | 26 +++++++++++++--------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 01aefb121..e15e6da86 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -836,13 +836,16 @@ void OpenMMPMEFEP::initialise() /************************************************************RESTRAINTS********************************************************/ + OpenMM::CustomExternalForce * positionalRestraints_openmm = NULL; + if (Restraint_flag == true) { - auto positionalRestraints_openmm = - new OpenMM::CustomExternalForce( - "k*d2;" - "d2 = max(0.0, d1 - d^2);" - "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2"); + positionalRestraints_openmm = new OpenMM::CustomExternalForce + ( + "k*d2;" + "d2 = max(0.0, d1 - d^2);" + "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2" + ); positionalRestraints_openmm->addPerParticleParameter("xref"); positionalRestraints_openmm->addPerParticleParameter("yref"); positionalRestraints_openmm->addPerParticleParameter("zref"); @@ -2593,21 +2596,22 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime const double dt = convertTo(timestep.value(), picosecond); const double converted_Temperature = convertTo(Temperature.value(), kelvin); const double converted_friction = convertTo(friction.value(), picosecond); + OpenMM::Integrator * integrator_openmm = NULL; if (!isContextInitialised || (isContextInitialised && reinitialise_context)) { if (Integrator_type == "leapfrogverlet") - auto integrator_openmm = new OpenMM::VerletIntegrator(dt); //dt in picosecond + integrator_openmm = new OpenMM::VerletIntegrator(dt); //dt in picosecond else if (Integrator_type == "variableleapfrogverlet") - auto integrator_openmm = new OpenMM::VariableVerletIntegrator(integration_tol); //integration tolerance error unitless + integrator_openmm = new OpenMM::VariableVerletIntegrator(integration_tol); //integration tolerance error unitless else if (Integrator_type == "langevin") - auto integrator_openmm = new OpenMM::LangevinIntegrator(converted_Temperature, converted_friction, dt); + integrator_openmm = new OpenMM::LangevinIntegrator(converted_Temperature, converted_friction, dt); else if (Integrator_type == "langevinmiddle") - auto integrator_openmm = new OpenMM::LangevinMiddleIntegrator(converted_Temperature, converted_friction, dt); + integrator_openmm = new OpenMM::LangevinMiddleIntegrator(converted_Temperature, converted_friction, dt); else if (Integrator_type == "variablelangevin") - auto integrator_openmm = new OpenMM::VariableLangevinIntegrator(converted_Temperature, converted_friction, integration_tol); + integrator_openmm = new OpenMM::VariableLangevinIntegrator(converted_Temperature, converted_friction, integration_tol); else if (Integrator_type == "brownian") - auto integrator_openmm = new OpenMM::BrownianIntegrator(converted_Temperature, converted_friction, dt); + integrator_openmm = new OpenMM::BrownianIntegrator(converted_Temperature, converted_friction, dt); else throw SireError::program_bug(QObject::tr("The user defined Integrator type is not supported. Available types are leapfrogverlet, variableleapfrogverlet, langevin, variablelangevin, brownian"), CODELOC); From c61e4fce2fffcd3621a848d663b8657455096f6f Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 30 Mar 2022 08:59:06 +0100 Subject: [PATCH 092/148] another auto; set nonbonded method before setting of cutoff for direct space (but probably will not make a difference) --- corelib/src/libs/SireMove/openmmpmefep.cpp | 53 +++++++++++++--------- 1 file changed, 31 insertions(+), 22 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e15e6da86..4c0643dc6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -627,7 +627,7 @@ void OpenMMPMEFEP::initialise() // Use NonbondedForce to compute Ewald reciprocal and self terms // Direct space and LJ need to be implemented via expressions to // custom forces, see above - OpenMM::NonbondedForce *recip_space = new OpenMM::NonbondedForce(); + auto recip_space = new OpenMM::NonbondedForce(); recip_space->setNonbondedMethod(OpenMM::NonbondedForce::PME); recip_space->setCutoffDistance(converted_cutoff_distance); recip_space->setIncludeDirectSpace(false); @@ -664,16 +664,16 @@ void OpenMMPMEFEP::initialise() auto direct_space = new OpenMM::CustomNonbondedForce(general_ff.toStdString()); + // This ensures that also the direct space is subject to PBC + direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); direct_space->setCutoffDistance(converted_cutoff_distance); + direct_space->addGlobalParameter("lam", Alchemical_value); direct_space->addGlobalParameter("delta", shift_delta); direct_space->addGlobalParameter("n", coulomb_power); direct_space->addGlobalParameter("SPOnOff", 0.0); direct_space->addGlobalParameter("alpha_pme", alpha_PME); - // this ensures that also the custom force field is subject to PBC - direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application // of the reaction field on the 14 pairs in Sire. @@ -797,8 +797,8 @@ void OpenMMPMEFEP::initialise() const double converted_Pressure = convertTo(Pressure.value(), bar); auto barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, - converted_Temperature, - MCBarostat_frequency); + converted_Temperature, + MCBarostat_frequency); //Set The random seed barostat->setRandomNumberSeed(random_seed); @@ -994,7 +994,7 @@ void OpenMMPMEFEP::initialise() }// end of loop on atoms in molecule - }//end of loop on molecules in workspace + } // end of loop on molecules in workspace int num_atoms_till_i = 0; @@ -1145,9 +1145,9 @@ void OpenMMPMEFEP::initialise() { // charge = charge_start + lambda_offset * charge_diff recip_space->addParticleParameterOffset("lambda_offset", - nonbond_idx, - charge_diff, - 0.0, 0.0); // sigma, epsilon not needed + nonbond_idx, + charge_diff, + 0.0, 0.0); // sigma, epsilon not needed if (Debug) qDebug() << "Adding offset for atom idx" << nonbond_idx @@ -1308,7 +1308,7 @@ void OpenMMPMEFEP::initialise() } // Adds the custom parmaters to _all_ atoms - // Must be in same order as in the System + // Must be in the same order as in the System direct_space->addParticle(custom_non_bonded_params); } @@ -2169,8 +2169,8 @@ void OpenMMPMEFEP::initialise() qDebug() << "\n\nNumber of ions = " << nions << "\n\n"; } + // FIXME: do we also need to do this for direct_space // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms - recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); if (CMMremoval_frequency > 0) @@ -2371,8 +2371,8 @@ void OpenMMPMEFEP::initialise() if (qprod_diff != 0.0) { - recip_space->addExceptionParameterOffset("lambda_offset", i, qprod_diff, - 0.0, 0.0); + recip_space->addExceptionParameterOffset("lambda_offset", i, + qprod_diff, 0.0, 0.0); if (Debug) qDebug() << "Adding exception offset for atom idx" << i @@ -2596,24 +2596,33 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime const double dt = convertTo(timestep.value(), picosecond); const double converted_Temperature = convertTo(Temperature.value(), kelvin); const double converted_friction = convertTo(friction.value(), picosecond); - OpenMM::Integrator * integrator_openmm = NULL; + OpenMM::Integrator *integrator_openmm = NULL; if (!isContextInitialised || (isContextInitialised && reinitialise_context)) { if (Integrator_type == "leapfrogverlet") - integrator_openmm = new OpenMM::VerletIntegrator(dt); //dt in picosecond + integrator_openmm = new OpenMM::VerletIntegrator(dt); else if (Integrator_type == "variableleapfrogverlet") - integrator_openmm = new OpenMM::VariableVerletIntegrator(integration_tol); //integration tolerance error unitless + integrator_openmm = new OpenMM::VariableVerletIntegrator + (integration_tol); // integration tolerance error unitless else if (Integrator_type == "langevin") - integrator_openmm = new OpenMM::LangevinIntegrator(converted_Temperature, converted_friction, dt); + integrator_openmm = new OpenMM::LangevinIntegrator + (converted_Temperature, converted_friction, dt); else if (Integrator_type == "langevinmiddle") - integrator_openmm = new OpenMM::LangevinMiddleIntegrator(converted_Temperature, converted_friction, dt); + integrator_openmm = new OpenMM::LangevinMiddleIntegrator + (converted_Temperature, converted_friction, dt); else if (Integrator_type == "variablelangevin") - integrator_openmm = new OpenMM::VariableLangevinIntegrator(converted_Temperature, converted_friction, integration_tol); + integrator_openmm = new OpenMM::VariableLangevinIntegrator + (converted_Temperature, converted_friction, integration_tol); else if (Integrator_type == "brownian") - integrator_openmm = new OpenMM::BrownianIntegrator(converted_Temperature, converted_friction, dt); + integrator_openmm = new OpenMM::BrownianIntegrator + (converted_Temperature, converted_friction, dt); else - throw SireError::program_bug(QObject::tr("The user defined Integrator type is not supported. Available types are leapfrogverlet, variableleapfrogverlet, langevin, variablelangevin, brownian"), CODELOC); + throw SireError::program_bug + (QObject::tr("The user defined Integrator type is not " + "supported. Available types are leapfrogverlet, " + "variableleapfrogverlet, langevin, langevinmiddle" + "variablelangevin, brownian"), CODELOC); if (Debug) { From 95563c7478921e81bc35af7254e579d5f5bdf853 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 30 Mar 2022 09:17:08 +0100 Subject: [PATCH 093/148] set lambda_offset --- corelib/src/libs/SireMove/openmmpmefep.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4c0643dc6..0e4df7fb5 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -636,7 +636,7 @@ void OpenMMPMEFEP::initialise() // scale the charges in the reciprocal space recip_space->addGlobalParameter("lambda_offset", 0.0); - // use default for the moment + // use default tolerance for the moment double tolerance_PME = recip_space->getEwaldErrorTolerance(); // from NonbondedForceImpl.cpp @@ -3385,6 +3385,8 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) openmm_context->setParameter("lamangle", lambda); // Angles if (perturbed_energies[7]) openmm_context->setParameter("lamdih", lambda); // Torsions + + openmm_context->setParameter("lambda_offset", lambda); } boost::tuples::tuple OpenMMPMEFEP::calculateGradient( From 17b71ed27df6d79547f32d533910a400723920ed Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 1 Apr 2022 16:35:09 +0100 Subject: [PATCH 094/148] enum for force groups; state types --- corelib/src/libs/SireMove/openmmpmefep.cpp | 75 ++++++++++++---------- 1 file changed, 42 insertions(+), 33 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 0e4df7fb5..594a24c05 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -122,6 +122,14 @@ enum GEOMETRIC = 1 }; + +enum +{ + BOND_FCG, + NONBONDED_FCG +}; + + static const RegisterMetaType r_openmmint; /** Serialise to a binary datastream */ @@ -1852,7 +1860,7 @@ void OpenMMPMEFEP::initialise() solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, solute_torsion_perturbation_params); //********************************BONDED ENERGY TORSIONS ARE ADDED TO THE SYSTEM***************************** - solute_torsion_perturbation->setForceGroup(0); + solute_torsion_perturbation->setForceGroup(BOND_FCG); system_openmm->addForce(solute_torsion_perturbation); perturbed_energies_tmp[7] = true; //Torsions are added to the system @@ -2404,7 +2412,7 @@ void OpenMMPMEFEP::initialise() if (npairs != num_exceptions) { - direct_space->setForceGroup(0); + direct_space->setForceGroup(NONBONDED_FCG); system_openmm->addForce(direct_space); perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system if (Debug) @@ -2413,7 +2421,7 @@ void OpenMMPMEFEP::initialise() if (custom_intra_14_clj->getNumBonds() != 0) { - custom_intra_14_clj->setForceGroup(0); + custom_intra_14_clj->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_clj); perturbed_energies_tmp[1] = true; //Custom non bonded 1-4 is added to the system if (Debug) @@ -2422,7 +2430,7 @@ void OpenMMPMEFEP::initialise() if (custom_intra_14_todummy->getNumBonds() != 0) { - custom_intra_14_todummy->setForceGroup(0); + custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_todummy); perturbed_energies_tmp[2] = true; //Custom non bonded 1-4 is added to the system if (Debug) @@ -2432,7 +2440,7 @@ void OpenMMPMEFEP::initialise() if (custom_intra_14_fromdummy->getNumBonds() != 0) { - custom_intra_14_fromdummy->setForceGroup(0); + custom_intra_14_fromdummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_fromdummy); perturbed_energies_tmp[3] = true; //Custom non bonded 1-4 is added to the system if (Debug) @@ -2441,7 +2449,7 @@ void OpenMMPMEFEP::initialise() if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) { - custom_intra_14_fromdummy_todummy->setForceGroup(0); + custom_intra_14_fromdummy_todummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_fromdummy_todummy); perturbed_energies_tmp[4] = true; //Custom non bonded 1-4 is added to the system if (Debug) @@ -2450,7 +2458,7 @@ void OpenMMPMEFEP::initialise() if (custom_corr_recip->getNumBonds() != 0) { - custom_corr_recip->setForceGroup(0); + custom_corr_recip->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_corr_recip); perturbed_energies_tmp[8] = true; @@ -2463,7 +2471,7 @@ void OpenMMPMEFEP::initialise() if (bondStretch_openmm->getNumBonds() != 0) { - bondStretch_openmm->setForceGroup(1); + bondStretch_openmm->setForceGroup(BOND_FCG); system_openmm->addForce(bondStretch_openmm); if (Debug) qDebug() << "Added Internal Bond energy term"; @@ -2471,7 +2479,7 @@ void OpenMMPMEFEP::initialise() if (bondBend_openmm->getNumAngles() != 0) { - bondBend_openmm->setForceGroup(1); + bondBend_openmm->setForceGroup(BOND_FCG); system_openmm->addForce(bondBend_openmm); if (Debug) qDebug() << "Added Internal Angle energy term"; @@ -2479,7 +2487,7 @@ void OpenMMPMEFEP::initialise() if (bondTorsion_openmm->getNumTorsions() != 0) { - bondTorsion_openmm->setForceGroup(1); + bondTorsion_openmm->setForceGroup(BOND_FCG); system_openmm->addForce(bondTorsion_openmm); if (Debug) qDebug() << "Added Internal Torsion energy term"; @@ -2487,7 +2495,7 @@ void OpenMMPMEFEP::initialise() if (solute_bond_perturbation->getNumBonds() != 0) { - solute_bond_perturbation->setForceGroup(0); + solute_bond_perturbation->setForceGroup(BOND_FCG); system_openmm->addForce(solute_bond_perturbation); perturbed_energies_tmp[5] = true; //Custom bonded is added to the system if (Debug) @@ -2496,7 +2504,7 @@ void OpenMMPMEFEP::initialise() if (solute_angle_perturbation->getNumAngles() != 0) { - solute_angle_perturbation->setForceGroup(0); + solute_angle_perturbation->setForceGroup(BOND_FCG); system_openmm->addForce(solute_angle_perturbation); perturbed_energies_tmp[6] = true; //Custom bonded is added to the system if (Debug) @@ -2877,12 +2885,12 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, SireUnits::Dimension::Time timestep = 0.0 * picosecond; createContext(workspace.edit(), timestep); - int infoMask = OpenMM::State::Positions; + int stateTypes = OpenMM::State::Positions; if (Debug) - infoMask += OpenMM::State::Energy; + stateTypes |= OpenMM::State::Energy; - OpenMM::State state_openmm = openmm_context->getState(infoMask); + OpenMM::State state_openmm = openmm_context->getState(stateTypes); std::vector old_positions_openmm = state_openmm.getPositions(); if (Debug) @@ -2897,7 +2905,7 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); // Step 3 update the positions in the system - state_openmm = openmm_context->getState(infoMask); + state_openmm = openmm_context->getState(stateTypes); std::vector positions_openmm = state_openmm.getPositions(); // Recast to atomicvelocityworkspace because want to use commitCoordinates() method to update system @@ -2992,9 +3000,9 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, else lam = lam + 0.1; } - int infoMask = OpenMM::State::Positions; - infoMask = infoMask + OpenMM::State::Velocities; - OpenMM::State state_openmm = openmm_context->getState(infoMask); + int stateTypes = OpenMM::State::Positions; + stateTypes |= OpenMM::State::Velocities; + OpenMM::State state_openmm = openmm_context->getState(stateTypes); std::vector positions_openmm = state_openmm.getPositions(); std::vector velocities_openmm = state_openmm.getVelocities(); @@ -3122,15 +3130,12 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, const double beta = 1.0 / (0.0083144621 * convertTo(Temperature.value(), kelvin)); //mol/kJ - int infoMask = 0; + int stateTypes = 0; - infoMask = OpenMM::State::Positions; - infoMask = infoMask + OpenMM::State::Velocities; - infoMask = infoMask + OpenMM::State::Energy; - //infoMask = infoMask + OpenMM::State::Parameters; - - OpenMM::State state_openmm; //OpenMM State + stateTypes = OpenMM::State::Positions | OpenMM::State::Velocities + | OpenMM::State::Energy; + OpenMM::State state_openmm; int sample_count = 1; @@ -3183,7 +3188,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, { //*********************MD STEPS**************************** (openmm_context->getIntegrator()).step(energy_frequency); - state_openmm = openmm_context->getState(infoMask, false, 0x01); + state_openmm = openmm_context->getState(stateTypes, false, 0x01); double p_energy_lambda = state_openmm.getPotentialEnergy(); if (Debug) { @@ -3203,7 +3208,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, { openmm_context->setParameter("SPOnOff", 1.0); //Solvent-Solvent and Protein Protein Non Bonded OFF } - state_openmm = openmm_context->getState(infoMask, false, 0x01); + state_openmm = openmm_context->getState(stateTypes, false, 0x01); if (Debug) qDebug() << "Total Time = " << state_openmm.getTime() << " ps"; @@ -3272,7 +3277,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, timeskip = SireUnits::Dimension::Time(0.0); } - state_openmm = openmm_context->getState(infoMask); + state_openmm = openmm_context->getState(stateTypes); positions_openmm = state_openmm.getPositions(); velocities_openmm = state_openmm.getVelocities(); @@ -3349,12 +3354,14 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) { double curr_potential_energy = 0.0; - int infoMask = 0; - infoMask = infoMask + OpenMM::State::Energy; + int stateTypes = OpenMM::State::Energy; + updateOpenMMContextLambda(lambda); - OpenMM::State state_openmm = openmm_context->getState(infoMask); - state_openmm = openmm_context->getState(infoMask, false, 0x01); + + OpenMM::State state_openmm = openmm_context->getState(stateTypes, false, 0x01); + curr_potential_energy = state_openmm.getPotentialEnergy(); + return curr_potential_energy; } @@ -3386,6 +3393,8 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) if (perturbed_energies[7]) openmm_context->setParameter("lamdih", lambda); // Torsions + // lambda for the offsets (linear scaling) of the charges in + // reciprocal space openmm_context->setParameter("lambda_offset", lambda); } From 12b013cbda9e8a8e5b510a1f2339ab9aa5ecfeca Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 1 Apr 2022 16:50:41 +0100 Subject: [PATCH 095/148] fix in force groups --- corelib/src/libs/SireMove/openmmpmefep.cpp | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 594a24c05..30546170a 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -125,8 +125,8 @@ enum enum { - BOND_FCG, - NONBONDED_FCG + NONBONDED_FCG = 0, + BOND_FCG = 1 }; @@ -1860,7 +1860,7 @@ void OpenMMPMEFEP::initialise() solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, solute_torsion_perturbation_params); //********************************BONDED ENERGY TORSIONS ARE ADDED TO THE SYSTEM***************************** - solute_torsion_perturbation->setForceGroup(BOND_FCG); + solute_torsion_perturbation->setForceGroup(NONBONDED_FCG); // FIXME: why in this force group? system_openmm->addForce(solute_torsion_perturbation); perturbed_energies_tmp[7] = true; //Torsions are added to the system @@ -3000,9 +3000,9 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, else lam = lam + 0.1; } - int stateTypes = OpenMM::State::Positions; - stateTypes |= OpenMM::State::Velocities; + int stateTypes = OpenMM::State::Positions | OpenMM::State::Velocities; OpenMM::State state_openmm = openmm_context->getState(stateTypes); + std::vector positions_openmm = state_openmm.getPositions(); std::vector velocities_openmm = state_openmm.getVelocities(); @@ -3130,9 +3130,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, const double beta = 1.0 / (0.0083144621 * convertTo(Temperature.value(), kelvin)); //mol/kJ - int stateTypes = 0; - - stateTypes = OpenMM::State::Positions | OpenMM::State::Velocities + int stateTypes = OpenMM::State::Positions | OpenMM::State::Velocities | OpenMM::State::Energy; OpenMM::State state_openmm; @@ -3187,9 +3185,10 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, while (sample_count <= n_samples) { //*********************MD STEPS**************************** - (openmm_context->getIntegrator()).step(energy_frequency); + openmm_context->getIntegrator()).step(energy_frequency; state_openmm = openmm_context->getState(stateTypes, false, 0x01); double p_energy_lambda = state_openmm.getPotentialEnergy(); + if (Debug) { qDebug() << "Lambda =" << Alchemical_value << "Potential energy =" From 814f11515034c2b66e6ff3c0316a80dc35694014 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 1 Apr 2022 16:54:55 +0100 Subject: [PATCH 096/148] fixed parantheses --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 30546170a..2abf0d9b6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -3185,7 +3185,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, while (sample_count <= n_samples) { //*********************MD STEPS**************************** - openmm_context->getIntegrator()).step(energy_frequency; + (openmm_context->getIntegrator()).step(energy_frequency); state_openmm = openmm_context->getState(stateTypes, false, 0x01); double p_energy_lambda = state_openmm.getPotentialEnergy(); From c683e8559abde4b14b57adc8ea3724fd1ea7ba86 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sat, 2 Apr 2022 09:12:21 +0100 Subject: [PATCH 097/148] names for enums --- corelib/src/libs/SireMove/openmmpmefep.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 2abf0d9b6..e6162a16e 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -96,8 +96,8 @@ using namespace SireIO; using namespace std; using boost::tuples::tuple; -/** TYPES OF CUTOFF IMPLEMENTED**/ -enum + +enum CutoffTypes { NOCUTOFF = 0, CUTOFFNONPERIODIC = 1, @@ -105,8 +105,7 @@ enum PME = 3 // only PME used here }; -/** TYPES OF CONSTRAINTS IMPLEMENTED **/ -enum +enum ConstraintTypes { NONE = 0, HBONDS = 1, @@ -115,21 +114,19 @@ enum }; -/** TYPES OF COMBINING RULES IMPLEMENTED **/ -enum +enum CombinationRules { ARITHMETIC = 0, GEOMETRIC = 1 }; -enum +enum ForceGroups { NONBONDED_FCG = 0, BOND_FCG = 1 }; - static const RegisterMetaType r_openmmint; /** Serialise to a binary datastream */ @@ -2844,7 +2841,7 @@ MolarEnergy OpenMMPMEFEP::getPotentialEnergy(const System &system) createContext(ws.edit(), 2 * femtosecond); OpenMM::State state_openmm = openmm_context->getState(OpenMM::State::Energy); - MolarEnergy nrg = state_openmm.getPotentialEnergy() * kJ_per_mol; + MolarEnergy nrg = state_openmm.getPotentialEnergy() * kJ_per_mol; // convert to kcal/mol this->destroyContext(); From baeff72b7e014d37d83e71db3cbadba5c1f6091f Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 4 Apr 2022 09:14:22 +0100 Subject: [PATCH 098/148] full PME (if comment out ifs); some debugging information regarding energy calculations --- corelib/src/libs/SireMove/openmmpmefep.cpp | 26 +++++++++++++++++----- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e6162a16e..43cd9211a 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2407,6 +2407,7 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(recip_space); + //if (false) if (npairs != num_exceptions) { direct_space->setForceGroup(NONBONDED_FCG); @@ -2453,6 +2454,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added 1-4 From Dummy To Dummy"; } + //if (false) if (custom_corr_recip->getNumBonds() != 0) { custom_corr_recip->setForceGroup(NONBONDED_FCG); @@ -3139,6 +3141,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, if (Debug) { + qDebug() << "kT (beta) =" << beta; for (int i = 0; i < perturbed_energies.size(); i++) qDebug() << "Perturbed energy flag index" << i << " Value = " << perturbed_energies[i]; } @@ -3358,6 +3361,12 @@ double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) curr_potential_energy = state_openmm.getPotentialEnergy(); + if (Debug) + { + OpenMM::State state = openmm_context->getState(stateTypes); + qDebug() << "All energies =" << state.getPotentialEnergy(); + } + return curr_potential_energy; } @@ -3437,16 +3446,21 @@ QVector OpenMMPMEFEP::computeReducedPerturbedEnergies(double beta) { QVector perturbed; QVector::iterator i; - for (i=alchemical_array.begin(); i!=alchemical_array.end(); i++) + double energy = 0.0; + + for (auto const &lam: alchemical_array) { - perturbed.append(getPotentialEnergyAtLambda(*i)*beta); + energy = getPotentialEnergyAtLambda(lam); + + if (Debug) + qDebug() << "Energy =" << energy << "at lambda =" << lam; + + perturbed.append(energy * beta); } if (Debug) { - for (i=perturbed.begin(); i!=perturbed.end(); i++) - { - qDebug() <<"bias is: "<<*i< Date: Mon, 4 Apr 2022 13:27:17 +0100 Subject: [PATCH 099/148] full PME flag for debugging --- corelib/src/libs/SireMove/openmmpmefep.cpp | 229 +++++++++++---------- 1 file changed, 117 insertions(+), 112 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 43cd9211a..2677cd216 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -543,11 +543,15 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = */ void OpenMMPMEFEP::initialise() { + // NOTE: only for debugging with simple non-dummy systems like ions + const bool fullPME = true; // use false for production + if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; const std::string version = OpenMM::Platform::getOpenMMVersion(); qDebug() << "OpenMM Version: " << QString::fromUtf8(version.data(), version.size()); + qDebug() << "fullPME = " << fullPME; } // Create a workspace using the stored molgroup @@ -635,7 +639,7 @@ void OpenMMPMEFEP::initialise() auto recip_space = new OpenMM::NonbondedForce(); recip_space->setNonbondedMethod(OpenMM::NonbondedForce::PME); recip_space->setCutoffDistance(converted_cutoff_distance); - recip_space->setIncludeDirectSpace(false); + recip_space->setIncludeDirectSpace(fullPME); recip_space->setUseDispersionCorrection(false); // scale the charges in the reciprocal space @@ -773,7 +777,6 @@ void OpenMMPMEFEP::initialise() qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; } - // Andersen thermostat if (Andersen_flag == true) { @@ -1858,7 +1861,9 @@ void OpenMMPMEFEP::initialise() //********************************BONDED ENERGY TORSIONS ARE ADDED TO THE SYSTEM***************************** solute_torsion_perturbation->setForceGroup(NONBONDED_FCG); // FIXME: why in this force group? - system_openmm->addForce(solute_torsion_perturbation); + + if (!fullPME) + system_openmm->addForce(solute_torsion_perturbation); perturbed_energies_tmp[7] = true; //Torsions are added to the system @@ -2407,108 +2412,110 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(recip_space); - //if (false) - if (npairs != num_exceptions) - { - direct_space->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(direct_space); - perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system - if (Debug) - qDebug() << "Added 1-5"; - } + if (!fullPME) { + if (npairs != num_exceptions) + { + direct_space->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(direct_space); + perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system + if (Debug) + qDebug() << "Added 1-5"; + } - if (custom_intra_14_clj->getNumBonds() != 0) - { - custom_intra_14_clj->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_clj); - perturbed_energies_tmp[1] = true; //Custom non bonded 1-4 is added to the system - if (Debug) - qDebug() << "Added 1-4 CLJ"; - } + if (custom_intra_14_clj->getNumBonds() != 0) + { + custom_intra_14_clj->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_clj); + perturbed_energies_tmp[1] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 CLJ"; + } - if (custom_intra_14_todummy->getNumBonds() != 0) - { - custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_todummy); - perturbed_energies_tmp[2] = true; //Custom non bonded 1-4 is added to the system - if (Debug) - qDebug() << "Added 1-4 To Dummy"; - } + if (custom_intra_14_todummy->getNumBonds() != 0) + { + custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_todummy); + perturbed_energies_tmp[2] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 To Dummy"; + } - if (custom_intra_14_fromdummy->getNumBonds() != 0) - { - custom_intra_14_fromdummy->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_fromdummy); - perturbed_energies_tmp[3] = true; //Custom non bonded 1-4 is added to the system - if (Debug) - qDebug() << "Added 1-4 From Dummy"; - } + if (custom_intra_14_fromdummy->getNumBonds() != 0) + { + custom_intra_14_fromdummy->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_fromdummy); + perturbed_energies_tmp[3] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 From Dummy"; + } - if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) - { - custom_intra_14_fromdummy_todummy->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_fromdummy_todummy); - perturbed_energies_tmp[4] = true; //Custom non bonded 1-4 is added to the system - if (Debug) - qDebug() << "Added 1-4 From Dummy To Dummy"; - } + if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) + { + custom_intra_14_fromdummy_todummy->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_fromdummy_todummy); + perturbed_energies_tmp[4] = true; //Custom non bonded 1-4 is added to the system + if (Debug) + qDebug() << "Added 1-4 From Dummy To Dummy"; + } - //if (false) - if (custom_corr_recip->getNumBonds() != 0) - { - custom_corr_recip->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_corr_recip); - perturbed_energies_tmp[8] = true; + if (custom_corr_recip->getNumBonds() != 0) + { + custom_corr_recip->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_corr_recip); + perturbed_energies_tmp[8] = true; - if (Debug) - qDebug() << "Added reciprocal correction term"; - } + if (Debug) + qDebug() << "Added reciprocal correction term"; + } + } // if (!fullPME) /*****************************************BONDED INTERACTIONS***********************************************/ - if (bondStretch_openmm->getNumBonds() != 0) - { - bondStretch_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondStretch_openmm); - if (Debug) - qDebug() << "Added Internal Bond energy term"; - } + if (!fullPME) { + if (bondStretch_openmm->getNumBonds() != 0) + { + bondStretch_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondStretch_openmm); + if (Debug) + qDebug() << "Added Internal Bond energy term"; + } - if (bondBend_openmm->getNumAngles() != 0) - { - bondBend_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondBend_openmm); - if (Debug) - qDebug() << "Added Internal Angle energy term"; - } + if (bondBend_openmm->getNumAngles() != 0) + { + bondBend_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondBend_openmm); + if (Debug) + qDebug() << "Added Internal Angle energy term"; + } - if (bondTorsion_openmm->getNumTorsions() != 0) - { - bondTorsion_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondTorsion_openmm); - if (Debug) - qDebug() << "Added Internal Torsion energy term"; - } + if (bondTorsion_openmm->getNumTorsions() != 0) + { + bondTorsion_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondTorsion_openmm); + if (Debug) + qDebug() << "Added Internal Torsion energy term"; + } - if (solute_bond_perturbation->getNumBonds() != 0) - { - solute_bond_perturbation->setForceGroup(BOND_FCG); - system_openmm->addForce(solute_bond_perturbation); - perturbed_energies_tmp[5] = true; //Custom bonded is added to the system - if (Debug) - qDebug() << "Added Perturbed Internal Bond energy term"; - } + if (solute_bond_perturbation->getNumBonds() != 0) + { + solute_bond_perturbation->setForceGroup(BOND_FCG); + system_openmm->addForce(solute_bond_perturbation); + perturbed_energies_tmp[5] = true; //Custom bonded is added to the system + if (Debug) + qDebug() << "Added Perturbed Internal Bond energy term"; + } - if (solute_angle_perturbation->getNumAngles() != 0) - { - solute_angle_perturbation->setForceGroup(BOND_FCG); - system_openmm->addForce(solute_angle_perturbation); - perturbed_energies_tmp[6] = true; //Custom bonded is added to the system - if (Debug) - qDebug() << "Added Perturbed Internal Angle energy term"; - } + if (solute_angle_perturbation->getNumAngles() != 0) + { + solute_angle_perturbation->setForceGroup(BOND_FCG); + system_openmm->addForce(solute_angle_perturbation); + perturbed_energies_tmp[6] = true; //Custom bonded is added to the system + if (Debug) + qDebug() << "Added Perturbed Internal Angle energy term"; + } + } // if (!fullPME) perturbed_energies = perturbed_energies_tmp; @@ -3070,9 +3077,9 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, const double dt = convertTo(timestep.value(), picosecond); - if (Debug) + if (Debug) { qDebug() << " Doing " << nmoves << " steps of dynamics "; - + } int n_samples = nmoves / energy_frequency; @@ -3136,7 +3143,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, int sample_count = 1; - if (coord_freq > 0 && Debug) + if (Debug && coord_freq > 0) qDebug() << "Saving atom coordinates every " << coord_freq << "\n"; if (Debug) @@ -3186,6 +3193,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, { //*********************MD STEPS**************************** (openmm_context->getIntegrator()).step(energy_frequency); + state_openmm = openmm_context->getState(stateTypes, false, 0x01); double p_energy_lambda = state_openmm.getPotentialEnergy(); @@ -3194,6 +3202,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, qDebug() << "Lambda =" << Alchemical_value << "Potential energy =" << p_energy_lambda * OpenMM::KcalPerKJ << "kcal/mol"; } + IsFiniteNumber = (p_energy_lambda <= DBL_MAX && p_energy_lambda >= -DBL_MAX); if (!IsFiniteNumber) @@ -3201,12 +3210,18 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, qDebug() << "NaN or Inf has been generated along the simulation"; exit(-1); } + pot_energies.append(p_energy_lambda * OpenMM::KcalPerKJ); if (perturbed_energies[0]) { - openmm_context->setParameter("SPOnOff", 1.0); //Solvent-Solvent and Protein Protein Non Bonded OFF + // Solvent-Solvent and Protein Protein Non Bonded OFF + // NOTE: this can dramatically change the potential energy and so the + // biases (reduced energies) + openmm_context->setParameter("SPOnOff", 1.0); } + + // get new state as SPOnOff was set above state_openmm = openmm_context->getState(stateTypes, false, 0x01); if (Debug) @@ -3251,7 +3266,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, boost::tuples::tie(actual_gradient, m_forward, m_backward) = calculateGradient(incr_plus, incr_minus, p_energy_lambda, beta); - if (alchemical_array.size()>1) + if (alchemical_array.size() > 1) { //Let's calculate the biased energies reduced_perturbed_energies.append(computeReducedPerturbedEnergies(beta)); @@ -3265,8 +3280,10 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, //RESET coupling parameter to its original value if (perturbed_energies[0]) { - openmm_context->setParameter("SPOnOff", 0.0); //Solvent-Solvent and Protein Protein Non Bonded ON + // Solvent-Solvent and Protein Protein Non Bonded ON + openmm_context->setParameter("SPOnOff", 0.0); } + updateOpenMMContextLambda(Alchemical_value); sample_count = sample_count + 1.0; @@ -3353,20 +3370,13 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) { double curr_potential_energy = 0.0; - int stateTypes = OpenMM::State::Energy; updateOpenMMContextLambda(lambda); - OpenMM::State state_openmm = openmm_context->getState(stateTypes, false, 0x01); - + OpenMM::State state_openmm = + openmm_context->getState(OpenMM::State::Energy, false, 0x01); curr_potential_energy = state_openmm.getPotentialEnergy(); - if (Debug) - { - OpenMM::State state = openmm_context->getState(stateTypes); - qDebug() << "All energies =" << state.getPotentialEnergy(); - } - return curr_potential_energy; } @@ -3449,19 +3459,14 @@ QVector OpenMMPMEFEP::computeReducedPerturbedEnergies(double beta) double energy = 0.0; for (auto const &lam: alchemical_array) - { - energy = getPotentialEnergyAtLambda(lam); - - if (Debug) - qDebug() << "Energy =" << energy << "at lambda =" << lam; + perturbed.append(getPotentialEnergyAtLambda(lam) * beta); - perturbed.append(energy * beta); - } if (Debug) { for (auto const &red_en: perturbed) qDebug() << "bias is: " << red_en; } + return perturbed; } From f9985293e1283cf921bd39b56966350846a96d37 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 4 Apr 2022 13:44:34 +0100 Subject: [PATCH 100/148] a bit cleaner parameter setting --- corelib/src/libs/SireMove/openmmpmefep.cpp | 33 +++++++--------------- 1 file changed, 10 insertions(+), 23 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 2677cd216..6989d9179 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -825,7 +825,7 @@ void OpenMMPMEFEP::initialise() auto bondStretch_openmm = new OpenMM::HarmonicBondForce(); auto bondBend_openmm = new OpenMM::HarmonicAngleForce(); - auto bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); + auto bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); auto solute_bond_perturbation = new OpenMM::CustomBondForce( "0.5*B*(r-req)^2;" @@ -1007,16 +1007,10 @@ void OpenMMPMEFEP::initialise() int num_atoms_till_i = 0; // nonbonded per particle parameters - direct_space->addPerParticleParameter("qstart"); - direct_space->addPerParticleParameter("qend"); - direct_space->addPerParticleParameter("epstart"); - direct_space->addPerParticleParameter("epend"); - direct_space->addPerParticleParameter("sigmastart"); - direct_space->addPerParticleParameter("sigmaend"); - direct_space->addPerParticleParameter("isHD"); - direct_space->addPerParticleParameter("isTD"); - direct_space->addPerParticleParameter("isFD"); - direct_space->addPerParticleParameter("isSolvent"); + for (auto const ¶m : {"qstart", "qend", "epstart", "epend", + "sigmastart", "sigmaend", "isHD", "isTD", + "isFD", "isSolvent"}) + direct_space->addPerParticleParameter(param); for (auto const ¶m : {"qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"}) @@ -1033,20 +1027,14 @@ void OpenMMPMEFEP::initialise() } /* BONDED PER PARTICLE PARAMETERS */ - solute_bond_perturbation->addPerBondParameter("bstart"); - solute_bond_perturbation->addPerBondParameter("bend"); - solute_bond_perturbation->addPerBondParameter("rstart"); - solute_bond_perturbation->addPerBondParameter("rend"); - - solute_angle_perturbation->addPerAngleParameter("astart"); - solute_angle_perturbation->addPerAngleParameter("aend"); - solute_angle_perturbation->addPerAngleParameter("thetastart"); - solute_angle_perturbation->addPerAngleParameter("thetaend"); + for (auto const ¶m : {"bstart", "bend", "rstart", "rend"}) + solute_bond_perturbation->addPerBondParameter(param); + for (auto const ¶m : {"astart", "aend", "thetastart", "thetaend"}) + solute_angle_perturbation->addPerAngleParameter(param); // JM July 13. This also needs to be changed because there could be more than one perturbed molecule // Molecule solutemol = solute.moleculeAt(0).molecule(); - int nions = 0; QVector perturbed_energies_tmp(9); @@ -1054,8 +1042,7 @@ void OpenMMPMEFEP::initialise() for (int i = 0; i < perturbed_energies_tmp.size(); i++) perturbed_energies_tmp[i] = false; - - // The default 1,4 scaling factors + // the default AMBER 1-4 scaling factors double const Coulomb14Scale = 1.0 / 1.2; double const LennardJones14Scale = 1.0 / 2.0; From daf597d421711b353e0140e5b22ae0be9bcfa5d0 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 4 Apr 2022 14:22:02 +0100 Subject: [PATCH 101/148] an even cleaner parameter setting --- corelib/src/libs/SireMove/openmmpmefep.cpp | 68 +++++++++++++--------- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 6989d9179..1fc0835e2 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -380,6 +380,27 @@ QString OpenMMPMEFEP::toString() const return QObject::tr("OpenMMPMEFEP()"); } +static void addPerParticleParameters(OpenMM::CustomNonbondedForce &force, + std::vector params) +{ + for (auto const ¶m : params) + force.addPerParticleParameter(param); +} + +static void addPerBondParameters(OpenMM::CustomBondForce &force, + std::vector params) +{ + for (auto const ¶m : params) + force.addPerBondParameter(param); +} + +static void addPerAngleParameters(OpenMM::CustomAngleForce &force, + std::vector params) +{ + for (auto const ¶m : params) + force.addPerAngleParameter(param); +} + // General force field // HHL // FIXME: disable SPOnOff and see if it works with PME @@ -544,7 +565,7 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = void OpenMMPMEFEP::initialise() { // NOTE: only for debugging with simple non-dummy systems like ions - const bool fullPME = true; // use false for production + const bool fullPME = false; // use false for production if (Debug) { @@ -1000,38 +1021,31 @@ void OpenMMPMEFEP::initialise() system_index = system_index + 1; - }// end of loop on atoms in molecule + } // end of loop on atoms in molecule } // end of loop on molecules in workspace int num_atoms_till_i = 0; // nonbonded per particle parameters - for (auto const ¶m : {"qstart", "qend", "epstart", "epend", - "sigmastart", "sigmaend", "isHD", "isTD", - "isFD", "isSolvent"}) - direct_space->addPerParticleParameter(param); - - for (auto const ¶m : {"qpstart", "qpend", "qmix", "eastart", "eaend", - "emix", "sastart", "saend", "samix"}) - { - custom_intra_14_todummy->addPerBondParameter(param); - custom_intra_14_fromdummy->addPerBondParameter(param); - custom_intra_14_fromdummy_todummy->addPerBondParameter(param); - custom_intra_14_clj->addPerBondParameter(param); - } - - for (auto const ¶m : {"qcstart", "qcend", "qcmix"}) - { - custom_corr_recip->addPerBondParameter(param); - } - - /* BONDED PER PARTICLE PARAMETERS */ - for (auto const ¶m : {"bstart", "bend", "rstart", "rend"}) - solute_bond_perturbation->addPerBondParameter(param); - - for (auto const ¶m : {"astart", "aend", "thetastart", "thetaend"}) - solute_angle_perturbation->addPerAngleParameter(param); + addPerParticleParameters(*direct_space, {"qstart", "qend", "epstart", "epend", + "sigmastart", "sigmaend", "isHD", "isTD", + "isFD", "isSolvent"}); + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend", "qcmix"}); + + std::vector paramList = {"qpstart", "qpend", "qmix", "eastart", + "eaend", "emix", "sastart", "saend", + "samix"}; + addPerBondParameters(*custom_intra_14_todummy, paramList); + addPerBondParameters(*custom_intra_14_fromdummy, paramList); + addPerBondParameters(*custom_intra_14_fromdummy_todummy, paramList); + addPerBondParameters(*custom_intra_14_clj, paramList); + + // bonded per particle parameters + addPerBondParameters(*solute_bond_perturbation, + {"bstart", "bend", "rstart", "rend"}); + addPerAngleParameters(*solute_angle_perturbation, + {"astart", "aend", "thetastart", "thetaend"}); // JM July 13. This also needs to be changed because there could be more than one perturbed molecule // Molecule solutemol = solute.moleculeAt(0).molecule(); From e78860a78e971e6379ecad0192d30972a5168380 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 5 Apr 2022 12:24:48 +0100 Subject: [PATCH 102/148] moved thermostat and barostat setup out of the way; in full PME only exclude perturbed bonded terms --- corelib/src/libs/SireMove/openmmpmefep.cpp | 141 ++++++++++----------- corelib/src/libs/SireMove/openmmpmefep.h | 3 + 2 files changed, 69 insertions(+), 75 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 1fc0835e2..a08ea0077 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -401,6 +401,45 @@ static void addPerAngleParameters(OpenMM::CustomAngleForce &force, force.addPerAngleParameter(param); } +void OpenMMPMEFEP::addAndersenThermostat(OpenMM::System &system) +{ + const double converted_Temperature = convertTo(Temperature.value(), kelvin); + + auto thermostat = new OpenMM::AndersenThermostat(converted_Temperature, + Andersen_frequency); + + thermostat->setRandomNumberSeed(random_seed); + system.addForce(thermostat); + + if (Debug) + { + qDebug() << "Andersen Thermostat set"; + qDebug() << "Temperature =" << converted_Temperature << "K"; + qDebug() << "Frequency collisions =" << Andersen_frequency << "1/ps"; + } +} + +void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) +{ + const double converted_Temperature = convertTo(Temperature.value(), kelvin); + const double converted_Pressure = convertTo(Pressure.value(), bar); + + auto barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, + converted_Temperature, + MCBarostat_frequency); + + barostat->setRandomNumberSeed(random_seed); + system.addForce(barostat); + + if (Debug) + { + qDebug() << "Monte Carlo Barostat set"; + qDebug() << "Temperature =" << converted_Temperature << " K"; + qDebug() << "Pressure =" << converted_Pressure << " bar"; + qDebug() << "Frequency every" << MCBarostat_frequency << " steps"; + } +} + // General force field // HHL // FIXME: disable SPOnOff and see if it works with PME @@ -546,15 +585,8 @@ tmpl_str OpenMMPMEFEP::CORR_RECIP = "withinCutoff = step(cutoff - r);" // erf() instead of erfc(), see PME implementation in OpenMM - "U_corr = 138.935456 * q_prod * erf(alpha_pme*rCoul) / rCoul;" - "rCoul = r;" - COULOMB_SHIFT - - "lam_diff = (1.0 - lam_corr) * 0.1;" + "U_corr = 138.935456 * q_prod * erf(alpha_pme*r) / r;" - // FIXME: probably wrong for to and from dummy but maybe ok for fromto dummy and hard - // when qcend and qcstart swapped: ok for from dummy, todummy still off - //"q_prod = lam_corr*lam_corr*qcend + (1-lam_corr)*(1-lam_corr)*qcstart + lam_corr*(1-lam_corr)*qcmix;"; "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;"; // this is symmetrical @@ -645,7 +677,7 @@ void OpenMMPMEFEP::initialise() OpenMM::Platform::loadPluginsFromDirectory(OpenMM::Platform::getDefaultPluginsDirectory()); // the system will hold all - OpenMM::System *system_openmm = new OpenMM::System(); + auto system_openmm = new OpenMM::System(); system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), OpenMM::Vec3(0, 6, 0), @@ -800,49 +832,13 @@ void OpenMMPMEFEP::initialise() // Andersen thermostat if (Andersen_flag == true) - { - const double converted_Temperature = convertTo(Temperature.value(), kelvin); - - auto thermostat = new OpenMM::AndersenThermostat(converted_Temperature, - Andersen_frequency); - - //Set The random seed - thermostat->setRandomNumberSeed(random_seed); - - system_openmm->addForce(thermostat); - - if (Debug) - { - qDebug() << "\nAndersen Thermostat set\n"; - qDebug() << "Temperature = " << converted_Temperature << " K\n"; - qDebug() << "Frequency collisions = " << Andersen_frequency << " 1/ps\n"; - } - } + addAndersenThermostat(*system_openmm); // Monte Carlo Barostat if (MCBarostat_flag == true) - { - const double converted_Temperature = convertTo(Temperature.value(), kelvin); - const double converted_Pressure = convertTo(Pressure.value(), bar); - - auto barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, - converted_Temperature, - MCBarostat_frequency); - - //Set The random seed - barostat->setRandomNumberSeed(random_seed); - - system_openmm->addForce(barostat); + addMCBarostat(*system_openmm); - if (Debug) - { - qDebug() << "\nMonte Carlo Barostat set\n"; - qDebug() << "Temperature = " << converted_Temperature << " K\n"; - qDebug() << "Pressure = " << converted_Pressure << " bar\n"; - qDebug() << "Frequency every " << MCBarostat_frequency << " steps\n"; - } - } - /*******************************************************BONDED INTERACTIONS******************************************************/ + /***************BONDED INTERACTIONS**************************/ auto bondStretch_openmm = new OpenMM::HarmonicBondForce(); auto bondBend_openmm = new OpenMM::HarmonicAngleForce(); @@ -863,7 +859,7 @@ void OpenMMPMEFEP::initialise() solute_angle_perturbation->addGlobalParameter("lamangle", Alchemical_value); - /************************************************************RESTRAINTS********************************************************/ + /**************RESTRAINTS************************************/ OpenMM::CustomExternalForce * positionalRestraints_openmm = NULL; @@ -1934,25 +1930,20 @@ void OpenMMPMEFEP::initialise() system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); else bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); - - //cout << "\nBOND ADDED TO "<< atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; } else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); - //cout << "\nALLBONDS or HANGLES ADDED BOND CONSTRAINT TO " << atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; } else if (flag_constraint == HBONDS) { if ((atom0[6] == 'H') || (atom1[6] == 'H')) { system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); - //cout << "\nHBONDS ADDED BOND CONSTRAINT TO " << atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; } else { bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); - //cout << "\nHBONDS ADDED BOND TO " << atom0.toStdString() << " AND " << atom1.toStdString() << "\n"; } } @@ -2474,31 +2465,31 @@ void OpenMMPMEFEP::initialise() /*****************************************BONDED INTERACTIONS***********************************************/ - if (!fullPME) { - if (bondStretch_openmm->getNumBonds() != 0) - { - bondStretch_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondStretch_openmm); - if (Debug) - qDebug() << "Added Internal Bond energy term"; - } + if (bondStretch_openmm->getNumBonds() != 0) + { + bondStretch_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondStretch_openmm); + if (Debug) + qDebug() << "Added Internal Bond energy term"; + } - if (bondBend_openmm->getNumAngles() != 0) - { - bondBend_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondBend_openmm); - if (Debug) - qDebug() << "Added Internal Angle energy term"; - } + if (bondBend_openmm->getNumAngles() != 0) + { + bondBend_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondBend_openmm); + if (Debug) + qDebug() << "Added Internal Angle energy term"; + } - if (bondTorsion_openmm->getNumTorsions() != 0) - { - bondTorsion_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondTorsion_openmm); + if (bondTorsion_openmm->getNumTorsions() != 0) + { + bondTorsion_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondTorsion_openmm); if (Debug) - qDebug() << "Added Internal Torsion energy term"; - } + qDebug() << "Added Internal Torsion energy term"; + } + if (!fullPME) { if (solute_bond_perturbation->getNumBonds() != 0) { solute_bond_perturbation->setForceGroup(BOND_FCG); diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 05891362d..dc83abeec 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -222,6 +222,9 @@ namespace SireMove { QVector computeReducedPerturbedEnergies(double); void emptyContainers(void); + void addAndersenThermostat(OpenMM::System &system); + void addMCBarostat(OpenMM::System &system); + /** Whether or not to save the velocities after every step, or to save them at the end of all of the steps */ bool frequent_save_velocities; From e07b1bf6956f7056d7354325be9aaca1936718d3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 19 Apr 2022 08:48:10 +0100 Subject: [PATCH 103/148] remove qcmix parameter --- corelib/src/libs/SireMove/openmmpmefep.cpp | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index a08ea0077..a455ae8fc 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -440,6 +440,22 @@ void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) } } +void OpenMMPMEFEP:OpenMMPMEFEP:::energyBeforeSetup() +{ + const double converted_cutoff_distance = + convertTo(cutoff_distance.value(), nanometer); + auto system = new OpenMM::System(); + + auto nb_force = new OpenMM::NonbondedForce(); + nb_force->setNonbondedMethod(OpenMM::NonbondedForce::PME); + nb_force->setCutoffDistance(converted_cutoff_distance); + nb_force->setIncludeDirectSpace(true); + nb_force->setUseDispersionCorrection(false); + + system.addForce(nb_force); +} + + // General force field // HHL // FIXME: disable SPOnOff and see if it works with PME @@ -1027,7 +1043,7 @@ void OpenMMPMEFEP::initialise() addPerParticleParameters(*direct_space, {"qstart", "qend", "epstart", "epend", "sigmastart", "sigmaend", "isHD", "isTD", "isFD", "isSolvent"}); - addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend", "qcmix"}); + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); std::vector paramList = {"qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", @@ -2192,7 +2208,7 @@ void OpenMMPMEFEP::initialise() std::vector p1_params(10); std::vector p2_params(10); - std::vector corr_recip_params(3); + std::vector corr_recip_params(2); double qprod_diff, qprod_start, qprod_end, qprod_mix; double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; @@ -2383,7 +2399,7 @@ void OpenMMPMEFEP::initialise() } // FIXME: add only affected bonds? - corr_recip_params = {qprod_start, qprod_end, qprod_mix}; + corr_recip_params = {qprod_start, qprod_end}; custom_corr_recip->addBond(p1, p2, corr_recip_params); direct_space->addExclusion(p1, p2); From 53b776c71963d51ce9bec659b90536ddf437621c Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 20 Apr 2022 15:23:22 +0100 Subject: [PATCH 104/148] changed Logic_mix_lam and lamFTD as in db45952c --- corelib/src/libs/SireMove/openmmpmefep.cpp | 35 ++++------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index a455ae8fc..9508c3dbe 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -440,21 +440,6 @@ void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) } } -void OpenMMPMEFEP:OpenMMPMEFEP:::energyBeforeSetup() -{ - const double converted_cutoff_distance = - convertTo(cutoff_distance.value(), nanometer); - auto system = new OpenMM::System(); - - auto nb_force = new OpenMM::NonbondedForce(); - nb_force->setNonbondedMethod(OpenMM::NonbondedForce::PME); - nb_force->setCutoffDistance(converted_cutoff_distance); - nb_force->setIncludeDirectSpace(true); - nb_force->setUseDispersionCorrection(false); - - system.addForce(nb_force); -} - // General force field // HHL @@ -465,9 +450,6 @@ void OpenMMPMEFEP:OpenMMPMEFEP:::energyBeforeSetup() // global lambdas below because they need to be changed during MD. // Cutoff, delta and n could use a single name each as they are constant // throughout the simulation. -// -// JM 9/10/20 multiply Logix_mix_lam * 0 instead of max(lam,1.0-lam) -// JM 9/10/10 setting Logix_mix_lam output to 0 for lambda #define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? //#define COULOMB_SHIFT "rCoul = r;" @@ -486,7 +468,7 @@ tmpl_str OpenMMPMEFEP::GENERAL = "rLJ = delta*sigma_avg*lam_diff + r*r;" "lam_diff = (1.0 - lambda) * 0.1;" // 0.1 to convert to nm - "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_mix_lam * max(lam,1.0-lam) + Logic_hard;" + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_hard;" "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" @@ -499,7 +481,6 @@ tmpl_str OpenMMPMEFEP::GENERAL = "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2, D_lam);" "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" - "Logic_mix_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*isFD1*(1.0-isFD2), B_mix);" "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2), D_mix);" "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" @@ -560,15 +541,13 @@ tmpl_str OpenMMPMEFEP::FROMTODUMMY = "withinCutoff*(U_direct + U_LJ);" "withinCutoff = step(cutoffftd - r);" - "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + "U_direct = 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" COULOMB_SHIFT "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" - "rLJ = deltaftd*sigma_avg*lam_diff + r*r;" + "rLJ = deltaftd*sigma_avg*0.1 + r*r;" - "lam_diff = (1.0 - lamFTD) * 0.1;" - "lamFTD = max(lamftd,1-lamftd);" "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" "sigma_avg="; @@ -790,11 +769,7 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); custom_intra_14_fromdummy->addGlobalParameter("alpha_pme", alpha_PME); - //JM 9/10/20 set lamFTD to 0 - if (coulomb_power > 0) - lam_pre = "(lamFTD^nftd) *"; - - QString intra_14_fromdummy_todummy = FROMTODUMMY.arg(lam_pre); + auto intra_14_fromdummy_todummy = QString(FROMTODUMMY); intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); if (Debug) @@ -3228,7 +3203,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, // biases (reduced energies) openmm_context->setParameter("SPOnOff", 1.0); } - + // get new state as SPOnOff was set above state_openmm = openmm_context->getState(stateTypes, false, 0x01); From 9f10a9ecedc593123764a6eaed62a3b4352e6493 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 29 Apr 2022 08:22:26 +0100 Subject: [PATCH 105/148] code rearranged; code formatting with astyle (stroustrup for the moment) --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2147 ++++++++++---------- 1 file changed, 1072 insertions(+), 1075 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 9508c3dbe..7534dbe85 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -97,16 +97,14 @@ using namespace std; using boost::tuples::tuple; -enum CutoffTypes -{ +enum CutoffTypes { NOCUTOFF = 0, CUTOFFNONPERIODIC = 1, CUTOFFPERIODIC = 2, - PME = 3 // only PME used here + PME = 3 // only PME used here }; -enum ConstraintTypes -{ +enum ConstraintTypes { NONE = 0, HBONDS = 1, ALLBONDS = 2, @@ -114,15 +112,13 @@ enum ConstraintTypes }; -enum CombinationRules -{ +enum CombinationRules { ARITHMETIC = 0, GEOMETRIC = 1 }; -enum ForceGroups -{ +enum ForceGroups { NONBONDED_FCG = 0, BOND_FCG = 1 }; @@ -163,8 +159,7 @@ QDataStream &operator>>(QDataStream &ds, OpenMMPMEFEP &velver) { VersionID v = readHeader(ds, r_openmmint); - if (v == 1) - { + if (v == 1) { SharedDataStream sds(ds); sds >> velver.frequent_save_velocities >> velver.molgroup >> velver.solute >> velver.solutehard >> velver.solutetodummy @@ -199,66 +194,93 @@ QDataStream &operator>>(QDataStream &ds, OpenMMPMEFEP &velver) /** Constructor*/ OpenMMPMEFEP::OpenMMPMEFEP(bool frequent_save) -: ConcreteProperty(), -frequent_save_velocities(frequent_save), -molgroup(MoleculeGroup()), solute(MoleculeGroup()), solutehard(MoleculeGroup()), solutetodummy(MoleculeGroup()), solutefromdummy(MoleculeGroup()), -openmm_system(0), openmm_context(0), isSystemInitialised(false), isContextInitialised(false), -combiningRules("arithmetic"), -CutoffType("PME"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), -Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), -MCBarostat_frequency(25), ConstraintType("none"), -Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), -CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), -shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), - finite_diff_gradients(), pot_energies(), perturbed_energies(), reduced_perturbed_energies(), - forward_Metropolis(), backward_Metropolis(), -Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), integration_tol(0.001), timeskip(0.0 * picosecond), -reinitialise_context(false), Debug(false) + : ConcreteProperty(), + frequent_save_velocities(frequent_save), + molgroup(MoleculeGroup()), solute(MoleculeGroup()), solutehard(MoleculeGroup()), + solutetodummy(MoleculeGroup()), solutefromdummy(MoleculeGroup()), + openmm_system(0), openmm_context(0), isSystemInitialised(false), + isContextInitialised(false), + combiningRules("arithmetic"), + CutoffType("PME"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), + Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), + MCBarostat_frequency(25), ConstraintType("none"), + Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), + Restraint_flag(false), + CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), + device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), + shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), + finite_diff_gradients(), pot_energies(), perturbed_energies(), + reduced_perturbed_energies(), + forward_Metropolis(), backward_Metropolis(), + Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), + integration_tol(0.001), timeskip(0.0 * picosecond), + reinitialise_context(false), Debug(false) { } /** Constructor using the passed molecule groups */ -OpenMMPMEFEP::OpenMMPMEFEP(const MoleculeGroup &molecule_group, const MoleculeGroup &solute_group, const MoleculeGroup &solute_hard, const MoleculeGroup &solute_todummy, const MoleculeGroup &solute_fromdummy, bool frequent_save) -: ConcreteProperty(), -frequent_save_velocities(frequent_save), -molgroup(molecule_group), solute(solute_group), solutehard(solute_hard), solutetodummy(solute_todummy), solutefromdummy(solute_fromdummy), -openmm_system(0), openmm_context(0), isSystemInitialised(false), isContextInitialised(false), -combiningRules("arithmetic"), -CutoffType("PME"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), -Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), -MCBarostat_frequency(25), ConstraintType("none"), -Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), -CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), -shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), finite_diff_gradients(), pot_energies(), perturbed_energies(), - reduced_perturbed_energies(), forward_Metropolis(), backward_Metropolis(), -Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), integration_tol(0.001), timeskip(0.0 * picosecond), -reinitialise_context(false), Debug(false) +OpenMMPMEFEP::OpenMMPMEFEP(const MoleculeGroup &molecule_group, + const MoleculeGroup &solute_group, const MoleculeGroup &solute_hard, + const MoleculeGroup &solute_todummy, const MoleculeGroup &solute_fromdummy, + bool frequent_save) + : ConcreteProperty(), + frequent_save_velocities(frequent_save), + molgroup(molecule_group), solute(solute_group), solutehard(solute_hard), + solutetodummy(solute_todummy), solutefromdummy(solute_fromdummy), + openmm_system(0), openmm_context(0), isSystemInitialised(false), + isContextInitialised(false), + combiningRules("arithmetic"), + CutoffType("PME"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), + Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), + MCBarostat_frequency(25), ConstraintType("none"), + Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), + Restraint_flag(false), + CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), + device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), + shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), + finite_diff_gradients(), pot_energies(), perturbed_energies(), + reduced_perturbed_energies(), forward_Metropolis(), backward_Metropolis(), + Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), + integration_tol(0.001), timeskip(0.0 * picosecond), + reinitialise_context(false), Debug(false) { } /** Copy constructor */ OpenMMPMEFEP::OpenMMPMEFEP(const OpenMMPMEFEP &other) -: ConcreteProperty(other), -frequent_save_velocities(other.frequent_save_velocities), -molgroup(other.molgroup), solute(other.solute), solutehard(other.solutehard), -solutetodummy(other.solutetodummy), solutefromdummy(other.solutefromdummy), -openmm_system(other.openmm_system), openmm_context(other.openmm_context), isSystemInitialised(other.isSystemInitialised), -isContextInitialised(other.isContextInitialised), -combiningRules(other.combiningRules), -CutoffType(other.CutoffType), cutoff_distance(other.cutoff_distance), -field_dielectric(other.field_dielectric), Andersen_flag(other.Andersen_flag), -Andersen_frequency(other.Andersen_frequency), MCBarostat_flag(other.MCBarostat_flag), -MCBarostat_frequency(other.MCBarostat_frequency), ConstraintType(other.ConstraintType), -Pressure(other.Pressure), Temperature(other.Temperature), platform_type(other.platform_type), -Restraint_flag(other.Restraint_flag), CMMremoval_frequency(other.CMMremoval_frequency), -buffer_frequency(other.buffer_frequency), energy_frequency(other.energy_frequency), device_index(other.device_index), -precision(other.precision), Alchemical_value(other.Alchemical_value), -coulomb_power(other.coulomb_power), shift_delta(other.shift_delta), -delta_alchemical(other.delta_alchemical), alchemical_array(other.alchemical_array), finite_diff_gradients(other.finite_diff_gradients), pot_energies(other.pot_energies), -perturbed_energies(other.perturbed_energies),reduced_perturbed_energies(other.reduced_perturbed_energies), - forward_Metropolis(other.forward_Metropolis), backward_Metropolis(other.backward_Metropolis), -Integrator_type(other.Integrator_type), friction(other.friction), integration_tol(other.integration_tol), timeskip(other.timeskip), -reinitialise_context(other.reinitialise_context), Debug(other.Debug) + : ConcreteProperty(other), + frequent_save_velocities(other.frequent_save_velocities), + molgroup(other.molgroup), solute(other.solute), solutehard(other.solutehard), + solutetodummy(other.solutetodummy), solutefromdummy(other.solutefromdummy), + openmm_system(other.openmm_system), openmm_context(other.openmm_context), + isSystemInitialised(other.isSystemInitialised), + isContextInitialised(other.isContextInitialised), + combiningRules(other.combiningRules), + CutoffType(other.CutoffType), cutoff_distance(other.cutoff_distance), + field_dielectric(other.field_dielectric), Andersen_flag(other.Andersen_flag), + Andersen_frequency(other.Andersen_frequency), + MCBarostat_flag(other.MCBarostat_flag), + MCBarostat_frequency(other.MCBarostat_frequency), + ConstraintType(other.ConstraintType), + Pressure(other.Pressure), Temperature(other.Temperature), + platform_type(other.platform_type), + Restraint_flag(other.Restraint_flag), + CMMremoval_frequency(other.CMMremoval_frequency), + buffer_frequency(other.buffer_frequency), + energy_frequency(other.energy_frequency), device_index(other.device_index), + precision(other.precision), Alchemical_value(other.Alchemical_value), + coulomb_power(other.coulomb_power), shift_delta(other.shift_delta), + delta_alchemical(other.delta_alchemical), + alchemical_array(other.alchemical_array), + finite_diff_gradients(other.finite_diff_gradients), + pot_energies(other.pot_energies), + perturbed_energies(other.perturbed_energies), + reduced_perturbed_energies(other.reduced_perturbed_energies), + forward_Metropolis(other.forward_Metropolis), + backward_Metropolis(other.backward_Metropolis), + Integrator_type(other.Integrator_type), friction(other.friction), + integration_tol(other.integration_tol), timeskip(other.timeskip), + reinitialise_context(other.reinitialise_context), Debug(other.Debug) { } @@ -328,44 +350,44 @@ OpenMMPMEFEP& OpenMMPMEFEP::operator=(const OpenMMPMEFEP &other) bool OpenMMPMEFEP::operator==(const OpenMMPMEFEP &other) const { return frequent_save_velocities == other.frequent_save_velocities - and isSystemInitialised == other.isSystemInitialised - and isContextInitialised == other.isContextInitialised - and combiningRules == other.combiningRules - and CutoffType == other.CutoffType - and cutoff_distance == other.cutoff_distance - and field_dielectric == other.field_dielectric - and Andersen_flag == other.Andersen_flag - and Andersen_frequency == other.Andersen_frequency - and MCBarostat_flag == other.MCBarostat_flag - and MCBarostat_frequency == other.MCBarostat_frequency - and ConstraintType == other.ConstraintType - and Pressure == other.Pressure - and Temperature == other.Temperature - and platform_type == other.platform_type - and Restraint_flag == other.Restraint_flag - and CMMremoval_frequency == other.CMMremoval_frequency - and buffer_frequency == other.buffer_frequency - and energy_frequency == other.energy_frequency - and device_index == other.device_index - and precision == other.precision - and Alchemical_value == other.Alchemical_value - and coulomb_power == other.coulomb_power - and shift_delta == other.shift_delta - and delta_alchemical == other.delta_alchemical - and alchemical_array == other.alchemical_array - and finite_diff_gradients == other.finite_diff_gradients - and pot_energies == other.pot_energies - and reduced_perturbed_energies == other.reduced_perturbed_energies - and forward_Metropolis == other.forward_Metropolis - and backward_Metropolis == other. backward_Metropolis - and perturbed_energies == other.perturbed_energies - and Integrator_type == other.Integrator_type - and friction == other.friction - and integration_tol == other.integration_tol - and timeskip == other.timeskip - and reinitialise_context == other.reinitialise_context - and Debug == other.Debug - and Integrator::operator==(other); + and isSystemInitialised == other.isSystemInitialised + and isContextInitialised == other.isContextInitialised + and combiningRules == other.combiningRules + and CutoffType == other.CutoffType + and cutoff_distance == other.cutoff_distance + and field_dielectric == other.field_dielectric + and Andersen_flag == other.Andersen_flag + and Andersen_frequency == other.Andersen_frequency + and MCBarostat_flag == other.MCBarostat_flag + and MCBarostat_frequency == other.MCBarostat_frequency + and ConstraintType == other.ConstraintType + and Pressure == other.Pressure + and Temperature == other.Temperature + and platform_type == other.platform_type + and Restraint_flag == other.Restraint_flag + and CMMremoval_frequency == other.CMMremoval_frequency + and buffer_frequency == other.buffer_frequency + and energy_frequency == other.energy_frequency + and device_index == other.device_index + and precision == other.precision + and Alchemical_value == other.Alchemical_value + and coulomb_power == other.coulomb_power + and shift_delta == other.shift_delta + and delta_alchemical == other.delta_alchemical + and alchemical_array == other.alchemical_array + and finite_diff_gradients == other.finite_diff_gradients + and pot_energies == other.pot_energies + and reduced_perturbed_energies == other.reduced_perturbed_energies + and forward_Metropolis == other.forward_Metropolis + and backward_Metropolis == other. backward_Metropolis + and perturbed_energies == other.perturbed_energies + and Integrator_type == other.Integrator_type + and friction == other.friction + and integration_tol == other.integration_tol + and timeskip == other.timeskip + and reinitialise_context == other.reinitialise_context + and Debug == other.Debug + and Integrator::operator==(other); } /** Comparison operator */ @@ -395,7 +417,7 @@ static void addPerBondParameters(OpenMM::CustomBondForce &force, } static void addPerAngleParameters(OpenMM::CustomAngleForce &force, - std::vector params) + std::vector params) { for (auto const ¶m : params) force.addPerAngleParameter(param); @@ -406,13 +428,12 @@ void OpenMMPMEFEP::addAndersenThermostat(OpenMM::System &system) const double converted_Temperature = convertTo(Temperature.value(), kelvin); auto thermostat = new OpenMM::AndersenThermostat(converted_Temperature, - Andersen_frequency); + Andersen_frequency); thermostat->setRandomNumberSeed(random_seed); system.addForce(thermostat); - if (Debug) - { + if (Debug) { qDebug() << "Andersen Thermostat set"; qDebug() << "Temperature =" << converted_Temperature << "K"; qDebug() << "Frequency collisions =" << Andersen_frequency << "1/ps"; @@ -425,14 +446,13 @@ void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) const double converted_Pressure = convertTo(Pressure.value(), bar); auto barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, - converted_Temperature, - MCBarostat_frequency); + converted_Temperature, + MCBarostat_frequency); barostat->setRandomNumberSeed(random_seed); system.addForce(barostat); - if (Debug) - { + if (Debug) { qDebug() << "Monte Carlo Barostat set"; qDebug() << "Temperature =" << converted_Temperature << " K"; qDebug() << "Pressure =" << converted_Pressure << " bar"; @@ -467,7 +487,7 @@ tmpl_str OpenMMPMEFEP::GENERAL = "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" "rLJ = delta*sigma_avg*lam_diff + r*r;" - "lam_diff = (1.0 - lambda) * 0.1;" // 0.1 to convert to nm + "lam_diff = (1.0 - lambda) * 0.1;" // 0.1 to convert to nm "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_hard;" "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" @@ -594,11 +614,11 @@ void OpenMMPMEFEP::initialise() // NOTE: only for debugging with simple non-dummy systems like ions const bool fullPME = false; // use false for production - if (Debug) - { + if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; const std::string version = OpenMM::Platform::getOpenMMVersion(); - qDebug() << "OpenMM Version: " << QString::fromUtf8(version.data(), version.size()); + qDebug() << "OpenMM Version: " << QString::fromUtf8(version.data(), + version.size()); qDebug() << "fullPME = " << fullPME; } @@ -606,26 +626,29 @@ void OpenMMPMEFEP::initialise() const MoleculeGroup moleculegroup = this->molgroup.read(); if (moleculegroup.isEmpty()) - throw SireError::program_bug(QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup has not been defined"), CODELOC); + throw SireError::program_bug( + QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup has not been defined"), + CODELOC); const MoleculeGroup solute = this->solute.read(); const MoleculeGroup solutehard = this->solutehard.read(); const MoleculeGroup solutetodummy = this->solutetodummy.read(); const MoleculeGroup solutefromdummy = this->solutefromdummy.read(); - AtomicVelocityWorkspace ws = this->createWorkspace(moleculegroup).read().asA(); + AtomicVelocityWorkspace ws = this->createWorkspace( + moleculegroup).read().asA(); const int nmols = ws.nMolecules(); int nats = 0; - for (int i = 0; i < nmols; ++i) - { + for (int i = 0; i < nmols; ++i) { nats = nats + ws.nAtoms(i); } if (Debug) - qDebug() << "There are " << nats << " atoms " << "There are " << nmols << " molecules" << "\n"; + qDebug() << "There are " << nats << " atoms " << "There are " << nmols << + " molecules" << "\n"; int flag_combRules; @@ -634,7 +657,9 @@ void OpenMMPMEFEP::initialise() else if (combiningRules == "geometric") flag_combRules = GEOMETRIC; else - throw SireError::program_bug(QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), CODELOC); + throw SireError::program_bug( + QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), + CODELOC); if (Debug) qDebug() << "\ncombiningRules = " << combiningRules << "\n"; @@ -651,34 +676,36 @@ void OpenMMPMEFEP::initialise() flag_constraint = ALLBONDS; else if (ConstraintType == "hangles") flag_constraint = HANGLES; - else if (ConstraintType == "hbonds-notperturbed") - { + else if (ConstraintType == "hbonds-notperturbed") { flag_constraint = HBONDS; flag_noperturbedconstraints = true; } - else if (ConstraintType == "none-notwater") - { + else if (ConstraintType == "none-notwater") { flag_constraint = NONE; flag_constraint_water = true; } else - throw SireError::program_bug(QObject::tr("The Constraints method has not been specified." - "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), CODELOC); + throw SireError::program_bug( + QObject::tr("The Constraints method has not been specified." + "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), + CODELOC); if (Debug) qDebug() << "\nConstraint Type = " << ConstraintType << "\n"; // Load Plugins from the OpenMM standard Plugin Directory - OpenMM::Platform::loadPluginsFromDirectory(OpenMM::Platform::getDefaultPluginsDirectory()); + OpenMM::Platform::loadPluginsFromDirectory( + OpenMM::Platform::getDefaultPluginsDirectory()); // the system will hold all auto system_openmm = new OpenMM::System(); system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), - OpenMM::Vec3(0, 6, 0), - OpenMM::Vec3(0, 0, 6)); + OpenMM::Vec3(0, 6, 0), + OpenMM::Vec3(0, 0, 6)); - const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); + const double converted_cutoff_distance = convertTo(cutoff_distance.value(), + nanometer); // HHL // Use NonbondedForce to compute Ewald reciprocal and self terms @@ -698,12 +725,11 @@ void OpenMMPMEFEP::initialise() // from NonbondedForceImpl.cpp double alpha_PME = (1.0 / converted_cutoff_distance) - * std::sqrt(-log(2.0 * tolerance_PME)); + * std::sqrt(-log(2.0 * tolerance_PME)); - if (Debug) - { - qDebug() << "PME alpha =" << alpha_PME - << "computed from PME error tolerance =" << tolerance_PME; + if (Debug) { + qDebug() << "PME alpha =" << alpha_PME + << "computed from PME error tolerance =" << tolerance_PME; } QString lam_pre = ""; @@ -711,13 +737,13 @@ void OpenMMPMEFEP::initialise() // This check is necessary to avoid nan errors on the GPU platform caused // by the calculation of 0^0 if (coulomb_power > 0) - lam_pre = "(lambda^n) *"; + lam_pre = "(lambda^n) *"; QString general_ff = GENERAL.arg(lam_pre); general_ff.append(GENERAL_SIGMA[flag_combRules]); if (Debug) - qDebug() << "direct space (PME, LJ):" << general_ff; + qDebug() << "direct space (PME, LJ):" << general_ff; auto direct_space = new OpenMM::CustomNonbondedForce(general_ff.toStdString()); @@ -731,80 +757,90 @@ void OpenMMPMEFEP::initialise() direct_space->addGlobalParameter("SPOnOff", 0.0); direct_space->addGlobalParameter("alpha_pme", alpha_PME); - // NO REACTION FIELD IS APPLIED TO 1-4 INTERACTIONS. If the scaling factor is one (Glycam ff) then - // the OpenMM potential energy is not equal to he Sire energy. This is caused by the application - // of the reaction field on the 14 pairs in Sire. + addPerParticleParameters(*direct_space, {"qstart", "qend", "epstart", "epend", + "sigmastart", "sigmaend", "isHD", "isTD", + "isFD", "isSolvent" + }); if (coulomb_power > 0) - lam_pre = "(lamtd^ntd) *"; + lam_pre = "(lamtd^ntd) *"; QString intra_14_todummy = TODUMMY.arg(lam_pre); intra_14_todummy.append(TODUMMY_SIGMA[flag_combRules]); if (Debug) - qDebug() << "intra_14_todummy:" << intra_14_todummy; + qDebug() << "intra_14_todummy:" << intra_14_todummy; auto custom_intra_14_todummy = - new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); + new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutofftd", converted_cutoff_distance); + custom_intra_14_todummy->addGlobalParameter("cutofftd", + converted_cutoff_distance); custom_intra_14_todummy->addGlobalParameter("alpha_pme", alpha_PME); if (coulomb_power > 0) - lam_pre = "(lamfd^nfd) *"; + lam_pre = "(lamfd^nfd) *"; QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); if (Debug) - qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; + qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; auto custom_intra_14_fromdummy = - new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); + new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutofffd", converted_cutoff_distance); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", + converted_cutoff_distance); custom_intra_14_fromdummy->addGlobalParameter("alpha_pme", alpha_PME); auto intra_14_fromdummy_todummy = QString(FROMTODUMMY); intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); if (Debug) - qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; + qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; auto custom_intra_14_fromdummy_todummy = - new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); + new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", + Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", converted_cutoff_distance); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", + converted_cutoff_distance); custom_intra_14_fromdummy_todummy->addGlobalParameter("alpha_pme", alpha_PME); QString intra_14_clj(INTRA_14_CLJ); intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); if (Debug) - qDebug() << "custom_intra_14_clj:" << intra_14_clj; + qDebug() << "custom_intra_14_clj:" << intra_14_clj; auto custom_intra_14_clj = - new OpenMM::CustomBondForce(intra_14_clj.toStdString()); + new OpenMM::CustomBondForce(intra_14_clj.toStdString()); custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); - // FIXME: should probably not be used - //if (coulomb_power > 0) - // lam_pre = "(lam_corr^n_corr) *"; + std::vector paramList = {"qpstart", "qpend", "qmix", "eastart", + "eaend", "emix", "sastart", "saend", + "samix" + }; + addPerBondParameters(*custom_intra_14_todummy, paramList); + addPerBondParameters(*custom_intra_14_fromdummy, paramList); + addPerBondParameters(*custom_intra_14_fromdummy_todummy, paramList); + addPerBondParameters(*custom_intra_14_clj, paramList); // HHL - // correction term for 1-2 and 1-3 exceptions computed in reciprocal space - QString corr_recip = QString(CORR_RECIP); //.arg(lam_pre); + // correction term for 1-2, 1-3, 1-4 exceptions computed in reciprocal space + QString corr_recip = QString(CORR_RECIP); if (Debug) - qDebug() << "corr_recip:" << corr_recip; + qDebug() << "corr_recip:" << corr_recip; // HHL auto custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); @@ -813,12 +849,14 @@ void OpenMMPMEFEP::initialise() custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); - if (Debug) - { - qDebug() << "\nCutoff type = " << CutoffType; - qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; - qDebug() << "Dielectric constant = " << field_dielectric; - qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); + + if (Debug) { + qDebug() << "\nCutoff type = " << CutoffType; + qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; + qDebug() << "Dielectric constant = " << field_dielectric; + qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << + coulomb_power << " Delta Shift = " << shift_delta; } // Andersen thermostat @@ -836,32 +874,36 @@ void OpenMMPMEFEP::initialise() auto bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); auto solute_bond_perturbation = new OpenMM::CustomBondForce( - "0.5*B*(r-req)^2;" - "B=bend*lambond+(1.0-lambond)*bstart;" - "req=rend*lambond+(1.0-lambond)*rstart"); + "0.5*B*(r-req)^2;" + "B=bend*lambond+(1.0-lambond)*bstart;" + "req=rend*lambond+(1.0-lambond)*rstart"); solute_bond_perturbation->addGlobalParameter("lambond", Alchemical_value); + addPerBondParameters(*solute_bond_perturbation, + {"bstart", "bend", "rstart", "rend"}); + auto solute_angle_perturbation = new OpenMM::CustomAngleForce( - "0.5*A*(theta-thetaeq)^2;" - "A=aend*lamangle+(1.0-lamangle)*astart;" - "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); + "0.5*A*(theta-thetaeq)^2;" + "A=aend*lamangle+(1.0-lamangle)*astart;" + "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); solute_angle_perturbation->addGlobalParameter("lamangle", Alchemical_value); + addPerAngleParameters(*solute_angle_perturbation, + {"astart", "aend", "thetastart", "thetaend"}); /**************RESTRAINTS************************************/ OpenMM::CustomExternalForce * positionalRestraints_openmm = NULL; - if (Restraint_flag == true) - { + if (Restraint_flag) { positionalRestraints_openmm = new OpenMM::CustomExternalForce - ( - "k*d2;" - "d2 = max(0.0, d1 - d^2);" - "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2" - ); + ( + "k*d2;" + "d2 = max(0.0, d1 - d^2);" + "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2" + ); positionalRestraints_openmm->addPerParticleParameter("xref"); positionalRestraints_openmm->addPerParticleParameter("yref"); positionalRestraints_openmm->addPerParticleParameter("zref"); @@ -879,8 +921,8 @@ void OpenMMPMEFEP::initialise() restraints involve one atom that diffuses out of the box. */ auto custom_link_bond = - new OpenMM::CustomBondForce("kl * max(0, d - dl*dl);" - "d = (r-reql) * (r-reql)"); + new OpenMM::CustomBondForce("kl * max(0, d - dl*dl);" + "d = (r-reql) * (r-reql)"); custom_link_bond->addPerBondParameter("reql"); custom_link_bond->addPerBondParameter("kl"); custom_link_bond->addPerBondParameter("dl"); @@ -891,16 +933,13 @@ void OpenMMPMEFEP::initialise() //OpenMM vector momenta std::vector velocities_openmm(nats); - std::vector > bondPairs; - int system_index = 0; // To avoid possible mismatch between the index in which atoms are added to the openmm system arrays and // their atomic numbers in sire, one array is populated while filling up the openmm global arrays QHash AtomNumToOpenMMIndex; - for (int i = 0; i < nmols; ++i) - { + for (int i = 0; i < nmols; ++i) { const int nats_mol = ws.nAtoms(i); const double *m = ws.massArray(i); @@ -913,24 +952,23 @@ void OpenMMPMEFEP::initialise() Selector molatoms = mol.atoms(); - for (int j = 0; j < nats_mol; ++j) - { - // This adds each atom to the system via its mass + for (int j = 0; j < nats_mol; ++j) { + // This adds each atom to the system via its mass // JM 10/16 make sure that perturbed atoms have mass of heaviest end-state system_openmm->addParticle(m[j]); Atom at = molatoms(j); AtomNum atnum = at.number(); - if (Debug) + if (Debug) qDebug() << " openMM_index " << system_index << " Sire Atom Number " - << atnum.toString() << " Mass particle = " << m[j]; + << atnum.toString() << " Mass particle = " << m[j]; AtomNumToOpenMMIndex[atnum.value()] = system_index; // JM Nov 12 // The code below implements a ThreeParticleAverageSite for virtual - // sites for EPW atoms present in a WAT residue + // sites for EPW atoms present in a WAT residue // This is very AMBER specific. AtomName atname = at.name(); @@ -938,25 +976,23 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << " atname " << atname.value() << " mol " << i; - if (atname == AtomName("EPW")) - { + if (atname == AtomName("EPW")) { ResName resname = at.residue().name(); - if (resname == ResName("WAT")) - { + if (resname == ResName("WAT")) { Atom oatom = molatoms.select(AtomName("O")); Atom h1atom = molatoms.select(AtomName("H1")); Atom h2atom = molatoms.select(AtomName("H2")); - AmberParameters amber_params = mol.property("amberparameters").asA(); + AmberParameters amber_params = + mol.property("amberparameters").asA(); QList bonds_ff = amber_params.getAllBonds(); double distoh = -1.0; double disthh = -1.0; double distoe = -1.0; - for (int k = 0; k < bonds_ff.length(); k++) - { + for (int k = 0; k < bonds_ff.length(); k++) { BondID bond_ff = bonds_ff[k]; QList bond_params = amber_params.getParams(bond_ff); @@ -966,24 +1002,22 @@ void OpenMMPMEFEP::initialise() AtomName at1name = mol.select(bond_ff.atom1()).name(); if ((at0name == AtomName("O") and at1name == AtomName("H1")) - or ( at0name == AtomName("H1") and at1name == AtomName("O"))) - { + or ( at0name == AtomName("H1") and at1name == AtomName("O"))) { distoh = r0; } else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) - or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) - { + or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) { disthh = r0; } else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) - or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) - { + or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) { distoe = r0; } } if (distoh < 0.0 or disthh < 0.0 or distoe < 0.0) - throw SireError::program_bug(QObject::tr("Could not find expected atoms in TIP4P water molecule."), CODELOC); + throw SireError::program_bug( + QObject::tr("Could not find expected atoms in TIP4P water molecule."), CODELOC); double weightH = distoe / sqrt((distoh * distoh) - (0.25 * disthh * disthh)); @@ -993,14 +1027,14 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "virtual site " << system_index << " o " - << o_index << " h1 " << h1_index << " h2 " - << h2_index << " 1 - weightH " << 1 - weightH - << " weightH/2 " << weightH / 2; + << o_index << " h1 " << h1_index << " h2 " + << h2_index << " 1 - weightH " << 1 - weightH + << " weightH/2 " << weightH / 2; auto vsite = - new OpenMM::ThreeParticleAverageSite(o_index, h1_index, - h2_index, 1 - weightH, - weightH / 2, weightH / 2); + new OpenMM::ThreeParticleAverageSite(o_index, h1_index, + h2_index, 1 - weightH, + weightH / 2, weightH / 2); system_openmm->setVirtualSite(system_index, vsite); } @@ -1014,26 +1048,6 @@ void OpenMMPMEFEP::initialise() int num_atoms_till_i = 0; - // nonbonded per particle parameters - addPerParticleParameters(*direct_space, {"qstart", "qend", "epstart", "epend", - "sigmastart", "sigmaend", "isHD", "isTD", - "isFD", "isSolvent"}); - addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); - - std::vector paramList = {"qpstart", "qpend", "qmix", "eastart", - "eaend", "emix", "sastart", "saend", - "samix"}; - addPerBondParameters(*custom_intra_14_todummy, paramList); - addPerBondParameters(*custom_intra_14_fromdummy, paramList); - addPerBondParameters(*custom_intra_14_fromdummy_todummy, paramList); - addPerBondParameters(*custom_intra_14_clj, paramList); - - // bonded per particle parameters - addPerBondParameters(*solute_bond_perturbation, - {"bstart", "bend", "rstart", "rend"}); - addPerAngleParameters(*solute_angle_perturbation, - {"astart", "aend", "thetastart", "thetaend"}); - // JM July 13. This also needs to be changed because there could be more than one perturbed molecule // Molecule solutemol = solute.moleculeAt(0).molecule(); int nions = 0; @@ -1047,14 +1061,15 @@ void OpenMMPMEFEP::initialise() double const Coulomb14Scale = 1.0 / 1.2; double const LennardJones14Scale = 1.0 / 2.0; + std::vector > bondPairs; + // A list of 1,4 atom pairs with non default scale factors // for each entry, first pair has pair of indices, second has pair of scale factors QHash< QPair, QPair > custom14pairs; bool special_14 = false; - for (int i = 0; i < nmols; i++) - { + for (int i = 0; i < nmols; i++) { const Vector *c = ws.coordsArray(i); Molecule molecule = moleculegroup.moleculeAt(i).molecule(); @@ -1079,13 +1094,14 @@ void OpenMMPMEFEP::initialise() QVector start_LJs; QVector final_LJs; - if (molecule.hasProperty("perturbations")) - { + if (molecule.hasProperty("perturbations")) { if (Debug) qDebug() << "Molecule Perturbed number = " << i; - AtomCharges atomcharges_start = molecule.property("initial_charge").asA(); - AtomCharges atomcharges_final = molecule.property("final_charge").asA(); + AtomCharges atomcharges_start = + molecule.property("initial_charge").asA(); + AtomCharges atomcharges_final = + molecule.property("final_charge").asA(); start_charges = atomcharges_start.toVector(); final_charges = atomcharges_final.toVector(); @@ -1093,78 +1109,72 @@ void OpenMMPMEFEP::initialise() AtomLJs atomvdws_start = molecule.property("initial_LJ").asA(); AtomLJs atomvdws_final = molecule.property("final_LJ").asA(); - start_LJs = atomvdws_start.toVector(); + start_LJs = atomvdws_start.toVector(); final_LJs = atomvdws_final.toVector(); } - int nonbond_idx = 0; - double charge_start = 0.0, charge_final = 0.0; + int nonbond_idx = 0; + double charge_start = 0.0, charge_final = 0.0; - // Iterate over all atoms in the molecules: - // ljparameters.size() is used here as the number of atoms - for (int j = 0; j < ljparameters.size(); j++) - { - double charge = charges[j].value(); + // Iterate over all atoms in the molecules: + // ljparameters.size() is used here as the number of atoms + for (int j = 0; j < ljparameters.size(); j++) { + double charge = charges[j].value(); double sigma = ljparameters[j].sigma() * OpenMM::NmPerAngstrom; double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; - double charge_diff = 0.0; + double charge_diff = 0.0; - // This really only adds the nonbonded parameters - // The parameters need to be added in the same order as they - // appear in the System + // This really only adds the nonbonded parameters + // The parameters need to be added in the same order as they + // appear in the System nonbond_idx = recip_space->addParticle(charge, sigma, epsilon); Atom atom = molecule.molecule().atoms()(j); - if (molecule.hasProperty("perturbations")) - { + if (molecule.hasProperty("perturbations")) { // Is atom a hard (changing charge and LJ), from dummy or to dummy type? bool ishard = false; bool istodummy = false; bool isfromdummy = false; - charge_start = start_charges[j].value(); - charge_final = final_charges[j].value(); - - // HHL - // Lambda scaling for 1-5+ (see exceptions below) in reciprocal - // space complimentary to scaling in direct space - // need to provide the parameter (lambda) and the chargeScale for - // reciprocal PME - charge_diff = charge_final - charge_start; - - // FIXME: really needed? const for small value - if (abs(charge_diff) < 0.00001) - charge_diff = 0.0; - - if (charge_diff != 0.0) - { - // charge = charge_start + lambda_offset * charge_diff - recip_space->addParticleParameterOffset("lambda_offset", - nonbond_idx, - charge_diff, - 0.0, 0.0); // sigma, epsilon not needed - - if (Debug) - qDebug() << "Adding offset for atom idx" << nonbond_idx - << "; charge_diff =" << charge_diff; - } - - double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; - double sigma_final = final_LJs[j].sigma() * OpenMM::NmPerAngstrom; - double epsilon_start = start_LJs[j].epsilon() * OpenMM::KJPerKcal; - double epsilon_final = final_LJs[j].epsilon() * OpenMM::KJPerKcal; - - for (int l = 0; l < solutehard.nViews(); l++) - { + charge_start = start_charges[j].value(); + charge_final = final_charges[j].value(); + + // HHL + // Lambda scaling for 1-5+ (see exceptions below) in reciprocal + // space complimentary to scaling in direct space + // need to provide the parameter (lambda) and the chargeScale for + // reciprocal PME + charge_diff = charge_final - charge_start; + + // FIXME: really needed? const for small value + if (abs(charge_diff) < 0.00001) + charge_diff = 0.0; + + if (charge_diff != 0.0) { + // charge = charge_start + lambda_offset * charge_diff + recip_space->addParticleParameterOffset("lambda_offset", + nonbond_idx, + charge_diff, + 0.0, 0.0); // sigma, epsilon not needed + + if (Debug) + qDebug() << "Adding offset for atom idx" << nonbond_idx + << "; charge_diff =" << charge_diff; + } + + double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; + double sigma_final = final_LJs[j].sigma() * OpenMM::NmPerAngstrom; + double epsilon_start = start_LJs[j].epsilon() * OpenMM::KJPerKcal; + double epsilon_final = final_LJs[j].epsilon() * OpenMM::KJPerKcal; + + for (int l = 0; l < solutehard.nViews(); l++) { Selector view_atoms = solutehard.viewAt(l).atoms(); - for (int m = 0; m < view_atoms.count(); m++) - { + for (int m = 0; m < view_atoms.count(); m++) { Atom view_atom = view_atoms(m); - if (atom == view_atom) - { + if (atom == view_atom) { ishard = true; break; } @@ -1175,18 +1185,14 @@ void OpenMMPMEFEP::initialise() } // if not hard check if to_dummy - if (!ishard) - { - for (int l = 0; l < solutetodummy.nViews(); l++) - { + if (!ishard) { + for (int l = 0; l < solutetodummy.nViews(); l++) { Selector view_atoms = solutetodummy.viewAt(l).atoms(); - for (int m = 0; m < view_atoms.count(); m++) - { + for (int m = 0; m < view_atoms.count(); m++) { Atom view_atom = view_atoms(m); - if (atom == view_atom) - { + if (atom == view_atom) { istodummy = true; break; } @@ -1197,18 +1203,14 @@ void OpenMMPMEFEP::initialise() } // if not todummy, check if fromdummy - if (!istodummy && !ishard) - { - for (int l = 0; l < solutefromdummy.nViews(); l++) - { + if (!istodummy && !ishard) { + for (int l = 0; l < solutefromdummy.nViews(); l++) { Selector view_atoms = solutefromdummy.viewAt(l).atoms(); - for (int m = 0; m < view_atoms.count(); m++) - { + for (int m = 0; m < view_atoms.count(); m++) { Atom view_atom = view_atoms(m); - if (atom == view_atom) - { + if (atom == view_atom) { isfromdummy = true; break; } @@ -1218,79 +1220,73 @@ void OpenMMPMEFEP::initialise() }//end for } - if (ishard || istodummy || isfromdummy) - { - custom_non_bonded_params[0] = charge_start; - custom_non_bonded_params[1] = charge_final; - custom_non_bonded_params[2] = epsilon_start; - custom_non_bonded_params[3] = epsilon_final; - custom_non_bonded_params[4] = sigma_start; - custom_non_bonded_params[5] = sigma_final; - } - else - { // unperturbed atoms - custom_non_bonded_params[0] = charge; - custom_non_bonded_params[1] = charge; - custom_non_bonded_params[2] = epsilon; - custom_non_bonded_params[3] = epsilon; - custom_non_bonded_params[4] = sigma; - custom_non_bonded_params[5] = sigma; - } - - custom_non_bonded_params[6] = 0.0; // isHard - custom_non_bonded_params[7] = 0.0; // isTodummy - custom_non_bonded_params[8] = 0.0; // isFromdummy - custom_non_bonded_params[9] = 0.0; // isSolventProtein - - if (ishard) - { + if (ishard || istodummy || isfromdummy) { + custom_non_bonded_params[0] = charge_start; + custom_non_bonded_params[1] = charge_final; + custom_non_bonded_params[2] = epsilon_start; + custom_non_bonded_params[3] = epsilon_final; + custom_non_bonded_params[4] = sigma_start; + custom_non_bonded_params[5] = sigma_final; + } + else { + // unperturbed atoms + custom_non_bonded_params[0] = charge; + custom_non_bonded_params[1] = charge; + custom_non_bonded_params[2] = epsilon; + custom_non_bonded_params[3] = epsilon; + custom_non_bonded_params[4] = sigma; + custom_non_bonded_params[5] = sigma; + } + + custom_non_bonded_params[6] = 0.0; // isHard + custom_non_bonded_params[7] = 0.0; // isTodummy + custom_non_bonded_params[8] = 0.0; // isFromdummy + custom_non_bonded_params[9] = 0.0; // isSolventProtein + + if (ishard) { custom_non_bonded_params[6] = 1.0; if (Debug) qDebug() << "hard solute = " << atom.index(); } - // JM July 13 THIS NEEDS FIXING TO DEAL WITH GROUPS THAT CONTAIN MORE THAN ONE MOLECULE - else if (istodummy) - { + // JM July 13 THIS NEEDS FIXING TO DEAL WITH GROUPS THAT CONTAIN MORE THAN ONE MOLECULE + else if (istodummy) { custom_non_bonded_params[7] = 1.0; if (Debug) qDebug() << "to dummy solute = " << atom.index(); } - else if (isfromdummy) - { + else if (isfromdummy) { custom_non_bonded_params[8] = 1.0; if (Debug) qDebug() << "from dummy solute = " << atom.index(); } - else - { + else { custom_non_bonded_params[6] = 1.0; // isHard if (Debug) qDebug() << " unperturbed solute atom " << atom.index(); } } - else - { // solvent atom like hard - custom_non_bonded_params[0] = charge; - custom_non_bonded_params[1] = charge; - custom_non_bonded_params[2] = epsilon; - custom_non_bonded_params[3] = epsilon; - custom_non_bonded_params[4] = sigma; - custom_non_bonded_params[5] = sigma; - custom_non_bonded_params[6] = 1.0; // isHard - custom_non_bonded_params[7] = 0.0; // isTodummy - custom_non_bonded_params[8] = 0.0; // isFromdummy - custom_non_bonded_params[9] = 1.0; // isSolventProtein - - if (Debug) - qDebug() << "Solvent = " << atom.index(); - } // end if perturbations + else { + // solvent atom like hard + custom_non_bonded_params[0] = charge; + custom_non_bonded_params[1] = charge; + custom_non_bonded_params[2] = epsilon; + custom_non_bonded_params[3] = epsilon; + custom_non_bonded_params[4] = sigma; + custom_non_bonded_params[5] = sigma; + custom_non_bonded_params[6] = 1.0; // isHard + custom_non_bonded_params[7] = 0.0; // isTodummy + custom_non_bonded_params[8] = 0.0; // isFromdummy + custom_non_bonded_params[9] = 1.0; // isSolventProtein - if (Debug) - { + if (Debug) + qDebug() << "Solvent = " << atom.index(); + } // end if perturbations + + if (Debug) { qDebug() << "Charge start = " << custom_non_bonded_params[0]; qDebug() << "Charge end = " << custom_non_bonded_params[1]; qDebug() << "Eps start = " << custom_non_bonded_params[2]; @@ -1303,40 +1299,45 @@ void OpenMMPMEFEP::initialise() qDebug() << "is Solvent = " << custom_non_bonded_params[9] << "\n"; } - // Adds the custom parmaters to _all_ atoms - // Must be in the same order as in the System + // Adds the custom parmaters to _all_ atoms + // Must be in the same order as in the System direct_space->addParticle(custom_non_bonded_params); } /****************************************************RESTRAINTS*******************************************************/ - if (Restraint_flag == true) - { + if (Restraint_flag == true) { bool hasRestrainedAtoms = molecule.hasProperty("restrainedatoms"); - if (hasRestrainedAtoms) - { - Properties restrainedAtoms = molecule.property("restrainedatoms").asA(); + if (hasRestrainedAtoms) { + Properties restrainedAtoms = + molecule.property("restrainedatoms").asA(); - int nrestrainedatoms = restrainedAtoms.property(QString("nrestrainedatoms")).asA().toInt(); + int nrestrainedatoms = restrainedAtoms.property( + QString("nrestrainedatoms")).asA().toInt(); if (Debug) qDebug() << "nrestrainedatoms = " << nrestrainedatoms; - for (int i = 0; i < nrestrainedatoms; i++) - { - int atomnum = restrainedAtoms.property(QString("AtomNum(%1)").arg(i)).asA().toInt(); - double xref = restrainedAtoms.property(QString("x(%1)").arg(i)).asA().toDouble(); - double yref = restrainedAtoms.property(QString("y(%1)").arg(i)).asA().toDouble(); - double zref = restrainedAtoms.property(QString("z(%1)").arg(i)).asA().toDouble(); - double k = restrainedAtoms.property(QString("k(%1)").arg(i)).asA().toDouble(); - double d = restrainedAtoms.property(QString("d(%1)").arg(i)).asA().toDouble(); + for (int i = 0; i < nrestrainedatoms; i++) { + int atomnum = restrainedAtoms.property(QString("AtomNum(%1)").arg( + i)).asA().toInt(); + double xref = restrainedAtoms.property(QString("x(%1)").arg( + i)).asA().toDouble(); + double yref = restrainedAtoms.property(QString("y(%1)").arg( + i)).asA().toDouble(); + double zref = restrainedAtoms.property(QString("z(%1)").arg( + i)).asA().toDouble(); + double k = restrainedAtoms.property(QString("k(%1)").arg( + i)).asA().toDouble(); + double d = restrainedAtoms.property(QString("d(%1)").arg( + i)).asA().toDouble(); int openmmindex = AtomNumToOpenMMIndex[atomnum]; - if (Debug) - { - qDebug() << "atomnum " << atomnum << " openmmindex " << openmmindex << " x " << xref << " y " << yref << " z " << zref << " k " << k << " d " << d; + if (Debug) { + qDebug() << "atomnum " << atomnum << " openmmindex " << openmmindex << " x " << + xref << " y " << yref << " z " << zref << " k " << k << " d " << d; } int posrestrdim = 5; @@ -1345,7 +1346,8 @@ void OpenMMPMEFEP::initialise() params[0] = xref * OpenMM::NmPerAngstrom; params[1] = yref * OpenMM::NmPerAngstrom; params[2] = zref * OpenMM::NmPerAngstrom; - params[3] = k * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + params[3] = k * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * + OpenMM::AngstromsPerNm); params[4] = d * OpenMM::NmPerAngstrom; positionalRestraints_openmm->addParticle(openmmindex, params); @@ -1357,17 +1359,17 @@ void OpenMMPMEFEP::initialise() bool hasConnectivity = molecule.hasProperty("connectivity"); - if (!hasConnectivity) - { + if (!hasConnectivity) { num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; - if (Debug) - { - qDebug() << "\nAtoms = " << num_atoms_molecule << " Num atoms till i =" << num_atoms_till_i << "\n"; - qDebug() << "\n*********************MONOATOMIC MOLECULE DETECTED**************************\n"; + if (Debug) { + qDebug() << "\nAtoms = " << num_atoms_molecule << " Num atoms till i =" << + num_atoms_till_i << "\n"; + qDebug() << + "\n*********************MONOATOMIC MOLECULE DETECTED**************************\n"; } - nions = nions + 1; + nions = nions + 1; continue; } @@ -1382,20 +1384,20 @@ void OpenMMPMEFEP::initialise() QList< ImproperID > improper_pert_list; QList< ImproperID > improper_pert_swap_list; - // FIXME: move this - /* "Light" atoms are defined to have a mass of HMASS or smaller. This - ensures that hydrogens in the HMR scheme will be constraint. The - specific value of 5.0 assumes that the HMR factor does not exceed - 4.0 and the heavy atom in CH3 or NH3 does have a minimum mass (see - OpenMMMD.py) larger than HMASS. In this way hydrogens and heavier - atoms (assuming no elements between H and C) should be cleanly - separated by mass. */ + // FIXME: move this + /* "Light" atoms are defined to have a mass of HMASS or smaller. This + ensures that hydrogens in the HMR scheme will be constraint. The + specific value of 5.0 assumes that the HMR factor does not exceed + 4.0 and the heavy atom in CH3 or NH3 does have a minimum mass (see + OpenMMMD.py) larger than HMASS. In this way hydrogens and heavier + atoms (assuming no elements between H and C) should be cleanly + separated by mass. */ const double HMASS = 5.0; // g/mol - const double SMALL = 0.0001; + const double SMALL = 0.0001; - if (solute.contains(molecule)) - { - Perturbations pert_params = molecule.property("perturbations").asA(); + if (solute.contains(molecule)) { + Perturbations pert_params = + molecule.property("perturbations").asA(); QList< PropPtr > perturbation_list = pert_params.perturbations(); @@ -1405,16 +1407,14 @@ void OpenMMPMEFEP::initialise() QHash bond_pert_eq_list; - for (QList< PropPtr >::const_iterator it = perturbation_list.constBegin(); it != perturbation_list.constEnd(); ++it) - { + for (QList< PropPtr >::const_iterator it = + perturbation_list.constBegin(); it != perturbation_list.constEnd(); ++it) { const Perturbation &pert = *it; - if (pert.isA()) - { + if (pert.isA()) { QString str = pert.what(); - if (str == "SireMM::TwoAtomPerturbation") - { + if (str == "SireMM::TwoAtomPerturbation") { const TwoAtomPerturbation &two = pert.asA(); int idx0 = two.atom0().asA().value() + num_atoms_till_i; int idx1 = two.atom1().asA().value() + num_atoms_till_i; @@ -1423,84 +1423,81 @@ void OpenMMPMEFEP::initialise() double rend = two.finalForms()[Symbol("r0")].toString().toDouble(); double bend = two.finalForms()[Symbol("k")].toString().toDouble(); - solute_bond_perturbation_params[0] = bstart * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; - solute_bond_perturbation_params[1] = bend * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; + solute_bond_perturbation_params[0] = bstart * 2.0 * OpenMM::KJPerKcal * + OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; + solute_bond_perturbation_params[1] = bend * 2.0 * OpenMM::KJPerKcal * + OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; solute_bond_perturbation_params[2] = rstart * OpenMM::NmPerAngstrom; solute_bond_perturbation_params[3] = rend * OpenMM::NmPerAngstrom; /* JM 10/16 Also apply this if 'no solute constraints' flag is on*/ - if (flag_constraint == NONE) - { + if (flag_constraint == NONE) { solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); } - else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) - { + else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { /* JM 10/16 ALLBONDS and HANGLES may be unwise with current free energy implementation !*/ - double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - bond_pert_eq_list.insert(BondID(two.atom0(), two.atom1()), pert_eq_distance * OpenMM::AngstromsPerNm); - if (Debug) - { - qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << " Nm"; - qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << " Nm"; - qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << " Nm"; + bond_pert_eq_list.insert(BondID(two.atom0(), two.atom1()), + pert_eq_distance * OpenMM::AngstromsPerNm); + if (Debug) { + qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << + " Nm"; + qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << + " Nm"; + qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << + " Nm"; } } /* JM 10/16 */ /* Here add code to constraint hbonds only if initial and final parameters are unperturbed*/ /* check also what is the mass of the atoms in that case */ - else if (flag_constraint == HBONDS and flag_noperturbedconstraints) - { - const SireMol::Atom atom0 = molecule.select(two.atom0()); - //double m0 = atom0.property("mass").value(); - double m0 = system_openmm->getParticleMass(idx0); - const SireMol::Atom atom1 = molecule.select(two.atom1()); - //double m1 = atom1.property("mass").value(); - double m1 = system_openmm->getParticleMass(idx1); - double deltar = abs(rend-rstart); - double deltak = abs(bend-bstart); - // only constraint if m0 < 1.1 g.mol-1 or m1 < 1.1 g.mol-1 - // AND the initial and final parameters differ - if (Debug) - { - qDebug() << " m0 " << m0 << " m1 " << m1 << "\n"; - qDebug() << " deltar " << deltar << " " << " deltak " << deltak; - } - /* bonds that do not change parameters are constrained*/ - double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; - if (deltar < SMALL and deltak < SMALL) - { - system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - if (Debug) - { - qDebug() << "perturbed bond but no parameter changes so constrained " << atom0.name().toString() - << "-" << atom1.name().toString() << "\n"; - } - } - /* bonds that change parameters and have one of the atoms with a mass < HMASS are constrained*/ - else if (m0 < HMASS or m1 < HMASS) - { - system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - if (Debug) - { - qDebug() << "perturbed bond parameter changes but involving " - << " light mass so constrained " << atom0.name().toString() - << "- " << atom1.name().toString() << "\n"; - } - } - /* other bonds are flexible */ - else - { - solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); - if (Debug) - { - qDebug() << "perturbed bond flexible " << atom0.name().toString() - << "- " << atom1.name().toString() << "\n"; - } - } + else if (flag_constraint == HBONDS and flag_noperturbedconstraints) { + const SireMol::Atom atom0 = molecule.select(two.atom0()); + //double m0 = atom0.property("mass").value(); + double m0 = system_openmm->getParticleMass(idx0); + const SireMol::Atom atom1 = molecule.select(two.atom1()); + //double m1 = atom1.property("mass").value(); + double m1 = system_openmm->getParticleMass(idx1); + double deltar = abs(rend-rstart); + double deltak = abs(bend-bstart); + // only constraint if m0 < 1.1 g.mol-1 or m1 < 1.1 g.mol-1 + // AND the initial and final parameters differ + if (Debug) { + qDebug() << " m0 " << m0 << " m1 " << m1 << "\n"; + qDebug() << " deltar " << deltar << " " << " deltak " << deltak; + } + /* bonds that do not change parameters are constrained*/ + double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + if (deltar < SMALL and deltak < SMALL) { + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + if (Debug) { + qDebug() << "perturbed bond but no parameter changes so constrained " << + atom0.name().toString() + << "-" << atom1.name().toString() << "\n"; + } + } + /* bonds that change parameters and have one of the atoms with a mass < HMASS are constrained*/ + else if (m0 < HMASS or m1 < HMASS) { + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + if (Debug) { + qDebug() << "perturbed bond parameter changes but involving " + << " light mass so constrained " << atom0.name().toString() + << "- " << atom1.name().toString() << "\n"; + } + } + /* other bonds are flexible */ + else { + solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); + if (Debug) { + qDebug() << "perturbed bond flexible " << atom0.name().toString() + << "- " << atom1.name().toString() << "\n"; + } + } } - else if (flag_constraint == HBONDS) - { + else if (flag_constraint == HBONDS) { const SireMol::Atom atom0 = molecule.select(two.atom0()); QString initial_type_atom0 = atom0.property("initial_ambertype"); QString final_type_atom0 = atom0.property("final_ambertype"); @@ -1509,27 +1506,29 @@ void OpenMMPMEFEP::initialise() QString initial_type_atom1 = atom1.property("initial_ambertype"); QString final_type_atom1 = atom1.property("final_ambertype"); - if (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) || final_type_atom0.startsWith("h", Qt::CaseInsensitive) || - initial_type_atom1.startsWith("h", Qt::CaseInsensitive) || final_type_atom1.startsWith("h", Qt::CaseInsensitive)) - { - double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + if (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) + || final_type_atom0.startsWith("h", Qt::CaseInsensitive) || + initial_type_atom1.startsWith("h", Qt::CaseInsensitive) + || final_type_atom1.startsWith("h", Qt::CaseInsensitive)) { + double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value + + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - if (Debug) - { + if (Debug) { qDebug() << "Two/one bond atom(s) start(s) or end(s) with h/H"; - qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << " Nm"; - qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << " Nm"; - qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << " Nm"; + qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << + " Nm"; + qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << + " Nm"; + qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << + " Nm"; } } - else - { + else { solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); } - if (Debug) - { + if (Debug) { qDebug() << "Atom0 initil type = " << initial_type_atom0; qDebug() << "Atom0 final type = " << final_type_atom0; qDebug() << "Atom1 initil type = " << initial_type_atom1; @@ -1543,25 +1542,24 @@ void OpenMMPMEFEP::initialise() bondPairs.push_back(std::make_pair(idx0, idx1)); - if (Debug) - { + if (Debug) { qDebug() << "Atom0 = " << two.atom0().asA().value() << - "Atom1 = " << two.atom1().asA().value(); + "Atom1 = " << two.atom1().asA().value(); qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "\n"; qDebug() << "rstart = " << rstart << " A" << - "rend = " << rend << " A"; + "rend = " << rend << " A"; qDebug() << "bstart = " << bstart << " kcal/A A" << - "bend = " << bend << " kcal/A A" << "\n"; + "bend = " << bend << " kcal/A A" << "\n"; } } - if (str == "SireMM::ThreeAtomPerturbation") - { + if (str == "SireMM::ThreeAtomPerturbation") { const ThreeAtomPerturbation &three = pert.asA(); int idx0 = three.atom0().asA().value() + num_atoms_till_i; int idx1 = three.atom1().asA().value() + num_atoms_till_i; int idx2 = three.atom2().asA().value() + num_atoms_till_i; double astart = three.initialForms()[Symbol("k")].toString().toDouble(); - double thetastart = three.initialForms()[Symbol("theta0")].toString().toDouble(); + double thetastart = + three.initialForms()[Symbol("theta0")].toString().toDouble(); double aend = three.finalForms()[Symbol("k")].toString().toDouble(); double thetaend = three.finalForms()[Symbol("theta0")].toString().toDouble(); @@ -1570,16 +1568,15 @@ void OpenMMPMEFEP::initialise() solute_angle_perturbation_params[2] = thetastart; solute_angle_perturbation_params[3] = thetaend; - if (Debug) - { - qDebug() << "astart = " << solute_angle_perturbation_params[0] << " kJ/rad rad" << - " aend = " << solute_angle_perturbation_params[1] << " kJ/rad rad"; + if (Debug) { + qDebug() << "astart = " << solute_angle_perturbation_params[0] << " kJ/rad rad" + << + " aend = " << solute_angle_perturbation_params[1] << " kJ/rad rad"; qDebug() << "thetastart = " << solute_angle_perturbation_params[2] << " rad" << - "thetaend = " << solute_angle_perturbation_params[3] << " rad"; + "thetaend = " << solute_angle_perturbation_params[3] << " rad"; } - if (flag_constraint == HANGLES) - { + if (flag_constraint == HANGLES) { const SireMol::Atom atom0 = molecule.select(three.atom0()); QString initial_type_atom0 = atom0.property("initial_ambertype"); QString final_type_atom0 = atom0.property("final_ambertype"); @@ -1592,17 +1589,22 @@ void OpenMMPMEFEP::initialise() QString initial_type_atom2 = atom2.property("initial_ambertype"); QString final_type_atom2 = atom2.property("final_ambertype"); - bool H_X_H = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && - (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); + bool H_X_H = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) + || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && + (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) + || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); - bool H_O_X = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && - (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) || final_type_atom1.startsWith("o", Qt::CaseInsensitive)); + bool H_O_X = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) + || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && + (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) + || final_type_atom1.startsWith("o", Qt::CaseInsensitive)); - bool X_O_H = (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) || final_type_atom1.startsWith("o", Qt::CaseInsensitive)) && - (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); + bool X_O_H = (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) + || final_type_atom1.startsWith("o", Qt::CaseInsensitive)) && + (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) + || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); - if (Debug) - { + if (Debug) { if (H_X_H) qDebug() << "type = H_X_H"; if (H_O_X) @@ -1611,100 +1613,104 @@ void OpenMMPMEFEP::initialise() qDebug() << "type = X_O_H"; } - if (H_X_H || H_O_X || X_O_H) - { - const BondID * first_alchemical_bond = NULL; + if (H_X_H || H_O_X || X_O_H) { + const BondID * first_alchemical_bond = NULL; const BondID * second_alchemical_bond = NULL; double first_alchemical_distance = -1.0; double second_alchemical_distance = -1.0; - if (bond_pert_eq_list.contains(BondID(three.atom0(), three.atom1()))) - { - first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom0(), three.atom1()))).key()); + if (bond_pert_eq_list.contains(BondID(three.atom0(), three.atom1()))) { + first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom0(), + three.atom1()))).key()); first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); if (Debug) qDebug() << "Atom0 - Atom1"; } - else if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom0()))) - { - first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), three.atom0()))).key()); + else if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom0()))) { + first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), + three.atom0()))).key()); first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); if (Debug) qDebug() << "Atom1 - Atom0"; } - else - { + else { if (Debug) qDebug() << "First perturbed bond was not foud in the perturned list"; first_alchemical_bond = new BondID(three.atom0(), three.atom1()); } - if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom2()))) - { - second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), three.atom2()))).key()); + if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom2()))) { + second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), + three.atom2()))).key()); second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); if (Debug) qDebug() << "Atom1 - Atom2"; } - else if (bond_pert_eq_list.contains(BondID(three.atom2(), three.atom1()))) - { - second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom2(), three.atom1()))).key()); + else if (bond_pert_eq_list.contains(BondID(three.atom2(), three.atom1()))) { + second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom2(), + three.atom1()))).key()); second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); if (Debug) qDebug() << "Atom2 - Atom1"; } - else - { + else { if (Debug) qDebug() << "Second perturbed bond was not foud in the perturned list"; - auto second_alchemical_bond = new BondID(three.atom2(), three.atom1()); } if (Debug) qDebug() << "First Alchemical distance = " << first_alchemical_distance - << "Second Alchemical distance = " << second_alchemical_distance; + << "Second Alchemical distance = " << second_alchemical_distance; SireMaths::Vector bond1_vec; SireMaths::Vector bond2_vec; - if (first_alchemical_bond->atom0() == second_alchemical_bond->atom0()) - { - SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); + if (first_alchemical_bond->atom0() == second_alchemical_bond->atom0()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); bond1_vec = tmp1 - tmpc; bond2_vec = tmp2 - tmpc; if (Debug) qDebug() << "Bond1 Atom0 = Bond2 Atom0"; } - else if (first_alchemical_bond->atom0() == second_alchemical_bond->atom1()) - { - SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); + else if (first_alchemical_bond->atom0() == second_alchemical_bond->atom1()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); bond1_vec = tmp1 - tmpc; bond2_vec = tmp2 - tmpc; if (Debug) qDebug() << "Bond1 Atom0 = Bond2 Atom1"; } - else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom0()) - { - SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); + else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom0()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); bond1_vec = tmp1 - tmpc; bond2_vec = tmp2 - tmpc; if (Debug) qDebug() << "Bond1 Atom1 = Bond2 Atom0"; } - else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom1()) - { - SireMaths::Vector tmp1 = (molecule.atom(first_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom(second_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom(first_alchemical_bond->atom1())).property("coordinates"); + else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom1()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); bond1_vec = tmp1 - tmpc; bond2_vec = tmp2 - tmpc; if (Debug) @@ -1713,29 +1719,30 @@ void OpenMMPMEFEP::initialise() else throw SireError::program_bug(QObject::tr("No coorner bond"), CODELOC); - if (Debug) - { - if (first_alchemical_distance != -1.0) - { - qDebug() << "First vector X = " << (bond1_vec.normalise() * first_alchemical_distance).x(); - qDebug() << "First vector Y = " << (bond1_vec.normalise() * first_alchemical_distance).y(); - qDebug() << "First vector Z = " << (bond1_vec.normalise() * first_alchemical_distance).z(); + if (Debug) { + if (first_alchemical_distance != -1.0) { + qDebug() << "First vector X = " << (bond1_vec.normalise() * + first_alchemical_distance).x(); + qDebug() << "First vector Y = " << (bond1_vec.normalise() * + first_alchemical_distance).y(); + qDebug() << "First vector Z = " << (bond1_vec.normalise() * + first_alchemical_distance).z(); } - else - { + else { qDebug() << "First vector X = " << (bond1_vec).x(); qDebug() << "First vector Y = " << (bond1_vec).y(); qDebug() << "First vector Z = " << (bond1_vec).z(); } - if (second_alchemical_distance != -1.0) - { - qDebug() << "Second vector X = " << (bond2_vec.normalise() * second_alchemical_distance).x(); - qDebug() << "Second vector Y = " << (bond2_vec.normalise() * second_alchemical_distance).y(); - qDebug() << "Second vector Z = " << (bond2_vec.normalise() * second_alchemical_distance).z(); + if (second_alchemical_distance != -1.0) { + qDebug() << "Second vector X = " << (bond2_vec.normalise() * + second_alchemical_distance).x(); + qDebug() << "Second vector Y = " << (bond2_vec.normalise() * + second_alchemical_distance).y(); + qDebug() << "Second vector Z = " << (bond2_vec.normalise() * + second_alchemical_distance).z(); } - else - { + else { qDebug() << "Second vector X = " << (bond2_vec).x(); qDebug() << "Second vector Y = " << (bond2_vec).y(); qDebug() << "Second vector Z = " << (bond2_vec).z(); @@ -1744,82 +1751,90 @@ void OpenMMPMEFEP::initialise() double constraint_distance; - double eq_angle = solute_angle_perturbation_params[3] * Alchemical_value + (1.0 - Alchemical_value) * solute_angle_perturbation_params[2]; + double eq_angle = solute_angle_perturbation_params[3] * Alchemical_value + + (1.0 - Alchemical_value) * solute_angle_perturbation_params[2]; - if (first_alchemical_distance == -1.0 && second_alchemical_distance != -1.0) - { + if (first_alchemical_distance == -1.0 && second_alchemical_distance != -1.0) { //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) double sq = bond1_vec.length() * bond1_vec.length() + - (bond2_vec.normalise() * second_alchemical_distance).length() * (bond2_vec.normalise() * second_alchemical_distance).length(); + (bond2_vec.normalise() * second_alchemical_distance).length() * + (bond2_vec.normalise() * second_alchemical_distance).length(); - double dp = 2.0 * bond1_vec.length() * (bond2_vec.normalise() * second_alchemical_distance).length() * cos(eq_angle); + double dp = 2.0 * bond1_vec.length() * (bond2_vec.normalise() * + second_alchemical_distance).length() * cos(eq_angle); constraint_distance = sqrt(sq - dp); //constraint_distance = (bond1_vec - bond2_vec.normalise() * second_alchemical_distance).length(); } - else if (first_alchemical_distance != -1.0 && second_alchemical_distance == -1.0) - { + else if (first_alchemical_distance != -1.0 + && second_alchemical_distance == -1.0) { //Carnot theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) double sq = bond2_vec.length() * bond2_vec.length() + - (bond1_vec.normalise() * first_alchemical_distance).length() * (bond1_vec.normalise() * first_alchemical_distance).length(); + (bond1_vec.normalise() * first_alchemical_distance).length() * + (bond1_vec.normalise() * first_alchemical_distance).length(); - double dp = 2.0 * bond2_vec.length() * (bond2_vec.normalise() * first_alchemical_distance).length() * cos(eq_angle); + double dp = 2.0 * bond2_vec.length() * (bond2_vec.normalise() * + first_alchemical_distance).length() * cos(eq_angle); constraint_distance = sqrt(sq - dp); //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec).length(); } - else if (first_alchemical_distance != -1.0 && second_alchemical_distance != -1.0) - { + else if (first_alchemical_distance != -1.0 + && second_alchemical_distance != -1.0) { //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) - double sq = (bond1_vec.normalise() * first_alchemical_distance).length() * (bond1_vec.normalise() * first_alchemical_distance).length() + - (bond2_vec.normalise() * second_alchemical_distance).length() * (bond2_vec.normalise() * second_alchemical_distance).length(); + double sq = (bond1_vec.normalise() * first_alchemical_distance).length() * + (bond1_vec.normalise() * first_alchemical_distance).length() + + (bond2_vec.normalise() * second_alchemical_distance).length() * + (bond2_vec.normalise() * second_alchemical_distance).length(); - double dp = 2.0 * (bond1_vec.normalise() * first_alchemical_distance).length() * (bond2_vec.normalise() * second_alchemical_distance).length() * cos(eq_angle); + double dp = 2.0 * (bond1_vec.normalise() * first_alchemical_distance).length() + * (bond2_vec.normalise() * second_alchemical_distance).length() * cos(eq_angle); constraint_distance = sqrt(sq - dp); //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec.normalise() * second_alchemical_distance).length(); } else - throw SireError::program_bug(QObject::tr("The angle does not contain perturbed bond"), CODELOC); + throw SireError::program_bug( + QObject::tr("The angle does not contain perturbed bond"), CODELOC); - system_openmm->addConstraint(idx0, idx2, constraint_distance * OpenMM::NmPerAngstrom); + system_openmm->addConstraint(idx0, idx2, + constraint_distance * OpenMM::NmPerAngstrom); if (Debug) qDebug() << "CONSTRAINT DISTANCE = " << constraint_distance << " A"; } }//end if HANGLES - else - { - solute_angle_perturbation->addAngle(idx0, idx1, idx2, solute_angle_perturbation_params); + else { + solute_angle_perturbation->addAngle(idx0, idx1, idx2, + solute_angle_perturbation_params); if (Debug) qDebug() << "Added perturbed angle"; } angle_pert_list.append(AngleID(three.atom0(), three.atom1(), three.atom2())); - angle_pert_swap_list.append(AngleID(three.atom2(), three.atom1(), three.atom0())); + angle_pert_swap_list.append(AngleID(three.atom2(), three.atom1(), + three.atom0())); - if (Debug) - { + if (Debug) { qDebug() << "Atom0 = " << three.atom0().asA().value() << - "Atom1 = " << three.atom1().asA().value() << - "Atom2 = " << three.atom2().asA().value(); + "Atom1 = " << three.atom1().asA().value() << + "Atom2 = " << three.atom2().asA().value(); qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << "\n"; qDebug() << "astart = " << astart << " kcal/rad rad" << - "aend = " << " kcal/rad rad" << aend; + "aend = " << " kcal/rad rad" << aend; qDebug() << "thetastart = " << thetastart << " rad" << - "thetaend = " << thetaend << " rad" << "\n"; + "thetaend = " << thetaend << " rad" << "\n"; } } - if (str == "SireMM::FourAtomPerturbation") - { + if (str == "SireMM::FourAtomPerturbation") { const FourAtomPerturbation &four = pert.asA(); int idx0 = four.atom0().asA().value() + num_atoms_till_i; @@ -1834,39 +1849,45 @@ void OpenMMPMEFEP::initialise() std::string openmm_str = tmp.toStdString(); - if (Debug) - { - qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << "IDX3 = " << idx3; + if (Debug) { + qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << + "IDX3 = " << idx3; qDebug() << "Dihedral String = " << openmm_str.c_str(); - qDebug() << "Dihedral Normal String = " << four.perturbExpression().toString() << "\n"; + qDebug() << "Dihedral Normal String = " << four.perturbExpression().toString() + << "\n"; } auto solute_torsion_perturbation = new OpenMM::CustomTorsionForce(openmm_str); solute_torsion_perturbation->addPerTorsionParameter("KJPerKcal"); solute_torsion_perturbation_params[0] = 4.184; solute_torsion_perturbation->addGlobalParameter("lamdih", Alchemical_value); - solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, solute_torsion_perturbation_params); + solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, + solute_torsion_perturbation_params); //********************************BONDED ENERGY TORSIONS ARE ADDED TO THE SYSTEM***************************** - solute_torsion_perturbation->setForceGroup(NONBONDED_FCG); // FIXME: why in this force group? + solute_torsion_perturbation->setForceGroup( + NONBONDED_FCG); // FIXME: why in this force group? if (!fullPME) system_openmm->addForce(solute_torsion_perturbation); perturbed_energies_tmp[7] = true; //Torsions are added to the system - dihedral_pert_list.append(DihedralID(four.atom0(), four.atom1(), four.atom2(), four.atom3())); - dihedral_pert_swap_list.append(DihedralID(four.atom3(), four.atom1(), four.atom2(), four.atom0())); + dihedral_pert_list.append(DihedralID(four.atom0(), four.atom1(), four.atom2(), + four.atom3())); + dihedral_pert_swap_list.append(DihedralID(four.atom3(), four.atom1(), + four.atom2(), four.atom0())); - improper_pert_list.append(ImproperID(four.atom0(), four.atom1(), four.atom2(), four.atom3())); - improper_pert_swap_list.append(ImproperID(four.atom0(), four.atom1(), four.atom3(), four.atom2())); + improper_pert_list.append(ImproperID(four.atom0(), four.atom1(), four.atom2(), + four.atom3())); + improper_pert_swap_list.append(ImproperID(four.atom0(), four.atom1(), + four.atom3(), four.atom2())); - if (Debug) - { + if (Debug) { qDebug() << "Atom0 = " << four.atom0().asA().value() << - "Atom1 = " << four.atom1().asA().value() << - "Atom2 = " << four.atom2().asA().value() << - "Atom3 = " << four.atom3().asA().value() << "\n"; + "Atom1 = " << four.atom1().asA().value() << + "Atom2 = " << four.atom2().asA().value() << + "Atom3 = " << four.atom3().asA().value() << "\n"; } } @@ -1876,15 +1897,15 @@ void OpenMMPMEFEP::initialise() } // end solute molecule perturbation // The bonded parameters are stored in "amberparameters" - AmberParameters amber_params = molecule.property("amberparameters").asA(); + AmberParameters amber_params = + molecule.property("amberparameters").asA(); QList bonds_ff = amber_params.getAllBonds(); QVector bonds = bonds_ff.toVector(); ResName molfirstresname = molecule.residues()(0).name(); // Bonds - for (int j = 0; j < bonds_ff.length(); j++) - { + for (int j = 0; j < bonds_ff.length(); j++) { BondID bond_ff = bonds_ff[j]; QList bond_params = amber_params.getParams(bond_ff); double k = bond_params[0]; @@ -1893,10 +1914,10 @@ void OpenMMPMEFEP::initialise() int idx0 = bonds[j].atom0().asA().value(); int idx1 = bonds[j].atom1().asA().value(); - if (solute.contains(molecule)) - { - if (bond_pert_list.indexOf(bond_ff) != -1 || bond_pert_swap_list.indexOf(bond_ff) != -1) - {//Solute molecule. Check if the current solute bond is in the perturbed bond list + if (solute.contains(molecule)) { + if (bond_pert_list.indexOf(bond_ff) != -1 + || bond_pert_swap_list.indexOf(bond_ff) != -1) { + //Solute molecule. Check if the current solute bond is in the perturbed bond list // JM July 13 --> Note, we should still have the ability to constrain the bond to its r(lambda) equilibrium distance if (Debug) qDebug() << "Found Perturbed Bond\n"; @@ -1914,27 +1935,24 @@ void OpenMMPMEFEP::initialise() // JM July 13. The constraint code has to be revised to handle massless particles so TIP4P can be dealt with. // Should check if a constraint involves an atom with a null mass, and if so skip constraint. - if (flag_constraint == NONE) - { + if (flag_constraint == NONE) { //JM 10/16 If constraint water flag is on and if molecule is a water molecule then apply constraint if (flag_constraint_water and molfirstresname == ResName("WAT")) system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); else - bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, + k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); } - else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) - { + else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); } - else if (flag_constraint == HBONDS) - { - if ((atom0[6] == 'H') || (atom1[6] == 'H')) - { + else if (flag_constraint == HBONDS) { + if ((atom0[6] == 'H') || (atom1[6] == 'H')) { system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); } - else - { - bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + else { + bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, + k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); } } @@ -1947,8 +1965,7 @@ void OpenMMPMEFEP::initialise() QList angles_ff = amber_params.getAllAngles(); QVector angles = angles_ff.toVector(); - for (int j = 0; j < angles_ff.length(); j++) - { + for (int j = 0; j < angles_ff.length(); j++) { AngleID angle_ff = angles_ff[j]; QList angle_params = amber_params.getParams(angle_ff); @@ -1959,28 +1976,30 @@ void OpenMMPMEFEP::initialise() int idx1 = angles[j].atom1().asA().value(); int idx2 = angles[j].atom2().asA().value(); - if (solute.contains(molecule)) - { - if (angle_pert_list.indexOf(angle_ff) != -1 || angle_pert_swap_list.indexOf(angle_ff) != -1) - {//Solute molecule. Check if the current solute angle is in the perturbed angle list + if (solute.contains(molecule)) { + if (angle_pert_list.indexOf(angle_ff) != -1 + || angle_pert_swap_list.indexOf(angle_ff) != -1) { + //Solute molecule. Check if the current solute angle is in the perturbed angle list if (Debug) qDebug() << "Found Perturbed Angle\n"; continue; } - else - { + else { if (Debug) - qDebug() << "Solute normal Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << idx2 << "theta0 = " << theta0 << " k = " << k << "\n"; + qDebug() << "Solute normal Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << + "Atom2 = " << idx2 << "theta0 = " << theta0 << " k = " << k << "\n"; idx0 = idx0 + num_atoms_till_i; idx1 = idx1 + num_atoms_till_i; idx2 = idx2 + num_atoms_till_i; - bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, k * 2.0 * OpenMM::KJPerKcal); + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, + k * 2.0 * OpenMM::KJPerKcal); continue; } } if (Debug) - qDebug() << "Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << idx2 << "\n"; + qDebug() << "Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << + idx2 << "\n"; QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); @@ -1992,24 +2011,22 @@ void OpenMMPMEFEP::initialise() idx1 = idx1 + num_atoms_till_i; idx2 = idx2 + num_atoms_till_i; - if (flag_constraint == HANGLES) - { - if (((atom0[6] == 'H') && (atom2[6] == 'H'))) - { + if (flag_constraint == HANGLES) { + if (((atom0[6] == 'H') && (atom2[6] == 'H'))) { system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); } - else if (((atom0[6] == 'H') && (atom1[6] == 'O')) || ((atom1[6] == 'O') && (atom2[6] == 'H'))) - { + else if (((atom0[6] == 'H') && (atom1[6] == 'O')) || ((atom1[6] == 'O') + && (atom2[6] == 'H'))) { system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); } - else - { - bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, k * 2.0 * OpenMM::KJPerKcal); + else { + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, + k * 2.0 * OpenMM::KJPerKcal); } } - else - { - bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, k * 2.0 * OpenMM::KJPerKcal); + else { + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, + k * 2.0 * OpenMM::KJPerKcal); } } // end of angles @@ -2018,8 +2035,7 @@ void OpenMMPMEFEP::initialise() QList dihedrals_ff = amber_params.getAllDihedrals(); QVector dihedrals = dihedrals_ff.toVector(); - for (int j = 0; j < dihedrals_ff.length(); j++) - { + for (int j = 0; j < dihedrals_ff.length(); j++) { DihedralID dihedral_ff = dihedrals_ff[j]; QList dihedral_params = amber_params.getParams(dihedral_ff); @@ -2028,18 +2044,18 @@ void OpenMMPMEFEP::initialise() int idx2 = dihedrals[j].atom2().asA().value() + num_atoms_till_i; int idx3 = dihedrals[j].atom3().asA().value() + num_atoms_till_i; - if (Debug) - { - qDebug() << "TOTAL Dihedral between atom global index " << idx0 - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; + if (Debug) { + qDebug() << "TOTAL Dihedral between atom global index " << idx0 - + num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; } - if (solute.contains(molecule)) - { - if (dihedral_pert_list.indexOf(dihedral_ff) != -1 || dihedral_pert_swap_list.indexOf(dihedral_ff) != -1) - {//Solute molecule. Check if the current solute dihedral is in the perturbed dihedral list + if (solute.contains(molecule)) { + if (dihedral_pert_list.indexOf(dihedral_ff) != -1 + || dihedral_pert_swap_list.indexOf(dihedral_ff) != -1) { + //Solute molecule. Check if the current solute dihedral is in the perturbed dihedral list if (Debug) qDebug() << "Found Perturbed Dihedral\n"; continue; @@ -2047,19 +2063,19 @@ void OpenMMPMEFEP::initialise() } // Variable number of parameters - for (int k = 0; k < dihedral_params.length(); k = k + 3) - { + for (int k = 0; k < dihedral_params.length(); k = k + 3) { double v = dihedral_params[ k ]; int periodicity = dihedral_params[ k + 1 ]; double phase = dihedral_params[ k + 2 ]; - bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, v * OpenMM::KJPerKcal); - if (Debug) - { + bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, + v * OpenMM::KJPerKcal); + if (Debug) { qDebug() << "Dihedral between atom global index " << idx0 - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; - qDebug() << "Amplitude_dih = " << v << " periodicity " << periodicity << " phase " << phase << "\n"; + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + qDebug() << "Amplitude_dih = " << v << " periodicity " << periodicity << + " phase " << phase << "\n"; } } } // end of dihedrals @@ -2070,8 +2086,7 @@ void OpenMMPMEFEP::initialise() QList impropers_ff = amber_params.getAllImpropers(); QVector impropers = impropers_ff.toVector(); - for (int j = 0; j < impropers_ff.length(); j++) - { + for (int j = 0; j < impropers_ff.length(); j++) { ImproperID improper_ff = impropers_ff[j]; QList improper_params = amber_params.getParams(improper_ff); @@ -2080,18 +2095,18 @@ void OpenMMPMEFEP::initialise() int idx2 = impropers[j].atom2().asA().value() + num_atoms_till_i; int idx3 = impropers[j].atom3().asA().value() + num_atoms_till_i; - if (Debug) - { - qDebug() << "TOTAL Improper between atom global index " << idx0 - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; + if (Debug) { + qDebug() << "TOTAL Improper between atom global index " << idx0 - + num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; } - if (solute.contains(molecule)) - {//Solute molecule. Check if the current solute dihedral is in the perturbed improper list - if (improper_pert_list.indexOf(improper_ff) != -1 || improper_pert_swap_list.indexOf(improper_ff) != -1) - { + if (solute.contains(molecule)) { + //Solute molecule. Check if the current solute dihedral is in the perturbed improper list + if (improper_pert_list.indexOf(improper_ff) != -1 + || improper_pert_swap_list.indexOf(improper_ff) != -1) { if (Debug) qDebug() << "Found Perturbed Improper\n"; continue; @@ -2099,20 +2114,20 @@ void OpenMMPMEFEP::initialise() } // Variable number of parameters - for (int k = 0; k < improper_params.length(); k = k + 3) - { + for (int k = 0; k < improper_params.length(); k = k + 3) { double v = improper_params[ k ]; int periodicity = improper_params[ k + 1 ]; double phase = improper_params[ k + 2 ]; - bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, v * OpenMM::KJPerKcal); - if (Debug) - { + bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, + v * OpenMM::KJPerKcal); + if (Debug) { qDebug() << "Improper between atom global index " << idx0 - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; - qDebug() << "Amplitude_imp = " << v << " periodicity " << periodicity << " phase " << phase << "\n"; + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + qDebug() << "Amplitude_imp = " << v << " periodicity " << periodicity << + " phase " << phase << "\n"; } } } // end of impropers @@ -2122,8 +2137,7 @@ void OpenMMPMEFEP::initialise() QList pairs14_ff = amber_params.getAll14Pairs(); QVector pairs14 = pairs14_ff.toVector(); - for (int j = 0; j < pairs14_ff.length(); j++) - { + for (int j = 0; j < pairs14_ff.length(); j++) { BondID pair14_ff = pairs14_ff[j]; QList pair14_params = amber_params.get14PairParams(pair14_ff); @@ -2135,8 +2149,8 @@ void OpenMMPMEFEP::initialise() qDebug() << " cscl@ " << cscl << " ljscl " << ljscl; // Add to custom pairs if scale factor differs from default - if (abs(cscl - Coulomb14Scale) > 0.0001 or abs(ljscl - LennardJones14Scale) > 0.0001) - { + if (abs(cscl - Coulomb14Scale) > 0.0001 + or abs(ljscl - LennardJones14Scale) > 0.0001) { int idx0 = pair14_ff.atom0().asA().value() + num_atoms_till_i; int idx1 = pair14_ff.atom1().asA().value() + num_atoms_till_i; @@ -2156,24 +2170,24 @@ void OpenMMPMEFEP::initialise() } // end of loop over molecules - if (Debug) - { + if (Debug) { if (nions != 0) qDebug() << "\n\nNumber of ions = " << nions << "\n\n"; } // FIXME: do we also need to do this for direct_space // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms - recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); + recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, + LennardJones14Scale); - if (CMMremoval_frequency > 0) - { + if (CMMremoval_frequency > 0) { auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); system_openmm->addForce(cmmotionremover); if (Debug) - qDebug() << "\n\nWill remove Center of Mass motion every " << CMMremoval_frequency << " steps\n\n"; + qDebug() << "\n\nWill remove Center of Mass motion every " << + CMMremoval_frequency << " steps\n\n"; } int num_exceptions = recip_space->getNumExceptions(); @@ -2187,36 +2201,35 @@ void OpenMMPMEFEP::initialise() double qprod_diff, qprod_start, qprod_end, qprod_mix; double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; - for (int i = 0; i < num_exceptions; i++) - { + for (int i = 0; i < num_exceptions; i++) { int p1, p2; double charge_prod, sigma_avg, epsilon_avg; - recip_space->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + recip_space->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, + epsilon_avg); - // HHL - direct_space->getParticleParameters(p1, p1_params); - direct_space->getParticleParameters(p2, p2_params); + // HHL + direct_space->getParticleParameters(p1, p1_params); + direct_space->getParticleParameters(p2, p2_params); - Qstart_p1 = p1_params[0]; - Qend_p1 = p1_params[1]; - Qstart_p2 = p2_params[0]; - Qend_p2 = p2_params[1]; + Qstart_p1 = p1_params[0]; + Qend_p1 = p1_params[1]; + Qstart_p2 = p2_params[0]; + Qend_p2 = p2_params[1]; - qprod_start = Qstart_p1 * Qstart_p2; - qprod_end = Qend_p1 * Qend_p2; - qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; // FIXME: really needed? + qprod_start = Qstart_p1 * Qstart_p2; + qprod_end = Qend_p1 * Qend_p2; + qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; // FIXME: really needed? if (Debug) qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " - << p2 << " charge prod = " << charge_prod - << " sigma avg = " << sigma_avg << " epsilon_avg = " - << epsilon_avg << "\n"; + << p2 << " charge prod = " << charge_prod + << " sigma avg = " << sigma_avg << " epsilon_avg = " + << epsilon_avg << "\n"; - // run only over the 1-4 exceptions - if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) - { + // run only over the 1-4 exceptions + if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) { QVector perturbed_14_tmp(13); double Epstart_p1 = p1_params[2]; @@ -2241,29 +2254,28 @@ void OpenMMPMEFEP::initialise() double Coulomb14Scale_tmp = Coulomb14Scale; double LennardJones14Scale_tmp = LennardJones14Scale; - if (special_14) - { + if (special_14) { QPair sc_factors; QPair indices_pair(p1, p2); - QHash< QPair, QPair >::const_iterator i_pair = custom14pairs.find(indices_pair); + QHash< QPair, QPair >::const_iterator i_pair = + custom14pairs.find(indices_pair); - if (i_pair != custom14pairs.end()) - { + if (i_pair != custom14pairs.end()) { sc_factors = i_pair.value(); Coulomb14Scale_tmp = sc_factors.first; LennardJones14Scale_tmp = sc_factors.second; if (Debug) - qDebug() << "The pair ( " << p1 << ", " << p2 << " ) is 14 special no swap pair"; + qDebug() << "The pair ( " << p1 << ", " << p2 << + " ) is 14 special no swap pair"; } - else - { + else { QPair indices_swap_pair(p2, p1); - QHash< QPair, QPair >::const_iterator i_swap_pair = custom14pairs.find(indices_swap_pair); + QHash< QPair, QPair >::const_iterator i_swap_pair = + custom14pairs.find(indices_swap_pair); - if (i_swap_pair != custom14pairs.end()) - { + if (i_swap_pair != custom14pairs.end()) { sc_factors = i_swap_pair.value(); Coulomb14Scale_tmp = sc_factors.first; LennardJones14Scale_tmp = sc_factors.second; @@ -2274,30 +2286,31 @@ void OpenMMPMEFEP::initialise() } } - // HHL + // HHL qprod_start *= Coulomb14Scale_tmp; qprod_end *= Coulomb14Scale_tmp; qprod_mix *= Coulomb14Scale_tmp; - if (flag_combRules == ARITHMETIC) - { + if (flag_combRules == ARITHMETIC) { sigma_avg_start = (Sigstart_p1 + Sigstart_p2) / 2.0; sigma_avg_end = (Sigend_p1 + Sigend_p2) / 2.0; sigma_avg_mix = (Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2) / 2.0; } - else if (flag_combRules == GEOMETRIC) - { + else if (flag_combRules == GEOMETRIC) { sigma_avg_start = Sigstart_p1 * Sigstart_p2 ; sigma_avg_end = Sigend_p1 * Sigend_p2 ; sigma_avg_mix = Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2 ; } - epsilon_avg_start = Epstart_p1 * Epstart_p2 * LennardJones14Scale_tmp * LennardJones14Scale_tmp; - epsilon_avg_end = Epend_p1 * Epend_p2 * LennardJones14Scale_tmp * LennardJones14Scale_tmp; - epsilon_avg_mix = (Epend_p1 * Epstart_p2 + Epstart_p1 * Epend_p2) * LennardJones14Scale_tmp * LennardJones14Scale_tmp; + epsilon_avg_start = Epstart_p1 * Epstart_p2 * LennardJones14Scale_tmp * + LennardJones14Scale_tmp; + epsilon_avg_end = Epend_p1 * Epend_p2 * LennardJones14Scale_tmp * + LennardJones14Scale_tmp; + epsilon_avg_mix = (Epend_p1 * Epstart_p2 + Epstart_p1 * Epend_p2) * + LennardJones14Scale_tmp * LennardJones14Scale_tmp; - // ["qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"] - // see setPerParicleParameters and expressions above + // ["qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"] + // see setPerParicleParameters and expressions above std::vector params(9); params[0] = qprod_start; @@ -2310,48 +2323,56 @@ void OpenMMPMEFEP::initialise() params[7] = sigma_avg_end; params[8] = sigma_avg_mix; - if (Debug) - { - qDebug() << "Particle p1 = " << p1 << "\nQstart = " << Qstart_p1 << "\nQend = " << Qend_p1 - << "\nEpstart = " << Epstart_p1 << "\nEpend = " << Epend_p1 - << "\nSgstart = " << Sigstart_p1 << "\nSgend = " << Sigend_p1 - << "\nisHard = " << isHard_p1 << "\nisTodummy = " << isTodummy_p1 << "\nisFromdummy = " << isFromdummy_p1 << "\n"; - qDebug() << "Particle p2 = " << p2 << "\nQstart = " << Qstart_p2 << "\nQend = " << Qend_p2 - << "\nEpstart = " << Epstart_p2 << "\nEpend = " << Epend_p2 - << "\nSgstart = " << Sigstart_p2 << "\nSgend = " << Sigend_p2 - << "\nisHard = " << isHard_p2 << "\nisTodummy = " << isTodummy_p2 << "\nisFromdummy = " << isFromdummy_p2 << "\n"; - - qDebug() << "Product Charge start = " << qprod_start << "\nProduct Charge end = " << qprod_end << "\nProduct Charge mixed = " << qprod_mix - << "\nEpsilon average start = " << epsilon_avg_start << "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << qprod_mix - << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << sigma_avg_end; - qDebug() << "Coulombic Scale Factor = " << Coulomb14Scale_tmp << " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; + if (Debug) { + qDebug() << "Particle p1 = " << p1 << "\nQstart = " << Qstart_p1 << "\nQend = " + << Qend_p1 + << "\nEpstart = " << Epstart_p1 << "\nEpend = " << Epend_p1 + << "\nSgstart = " << Sigstart_p1 << "\nSgend = " << Sigend_p1 + << "\nisHard = " << isHard_p1 << "\nisTodummy = " << isTodummy_p1 << + "\nisFromdummy = " << isFromdummy_p1 << "\n"; + qDebug() << "Particle p2 = " << p2 << "\nQstart = " << Qstart_p2 << "\nQend = " + << Qend_p2 + << "\nEpstart = " << Epstart_p2 << "\nEpend = " << Epend_p2 + << "\nSgstart = " << Sigstart_p2 << "\nSgend = " << Sigend_p2 + << "\nisHard = " << isHard_p2 << "\nisTodummy = " << isTodummy_p2 << + "\nisFromdummy = " << isFromdummy_p2 << "\n"; + + qDebug() << "Product Charge start = " << qprod_start << + "\nProduct Charge end = " << qprod_end << "\nProduct Charge mixed = " << + qprod_mix + << "\nEpsilon average start = " << epsilon_avg_start << + "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << + qprod_mix + << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << + sigma_avg_end; + qDebug() << "Coulombic Scale Factor = " << Coulomb14Scale_tmp << + " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; } - if ((isHard_p1 == 1.0 && isHard_p2 == 1.0)) - { + if ((isHard_p1 == 1.0 && isHard_p2 == 1.0)) { custom_intra_14_clj->addBond(p1, p2, params); if (Debug) qDebug() << "Added clj Hard 1-4\n"; } - else if ((isTodummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p2 == 1.0 && isTodummy_p1 == 1.0)) - { + else if ((isTodummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p1 == 1.0 + && isTodummy_p2 == 1.0) || (isHard_p2 == 1.0 && isTodummy_p1 == 1.0)) { custom_intra_14_todummy->addBond(p1, p2, params); if (Debug) qDebug() << "Added soft TO dummy 1-4\n"; } - else if ((isFromdummy_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p2 == 1.0 && isFromdummy_p1 == 1.0)) - { + else if ((isFromdummy_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p1 == 1.0 + && isFromdummy_p2 == 1.0) || (isHard_p2 == 1.0 && isFromdummy_p1 == 1.0)) { custom_intra_14_fromdummy->addBond(p1, p2, params); if (Debug) qDebug() << "Added soft FROM dummy 1-4\n"; } - else if ((isFromdummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isFromdummy_p2 == 1.0 && isTodummy_p1 == 1.0)) - { + else if ((isFromdummy_p1 == 1.0 && isTodummy_p2 == 1.0) + || (isFromdummy_p2 == 1.0 && isTodummy_p1 == 1.0)) { custom_intra_14_fromdummy_todummy->addBond(p1, p2, params); if (Debug) @@ -2359,45 +2380,46 @@ void OpenMMPMEFEP::initialise() } } // 1-4 exceptions - // HHL - qprod_diff = qprod_end - qprod_start; + // HHL + qprod_diff = qprod_end - qprod_start; - if (qprod_diff != 0.0) - { - recip_space->addExceptionParameterOffset("lambda_offset", i, - qprod_diff, 0.0, 0.0); + if (qprod_diff != 0.0) { + recip_space->addExceptionParameterOffset("lambda_offset", i, + qprod_diff, 0.0, 0.0); - if (Debug) - qDebug() << "Adding exception offset for atom idx" << i - << "; qprod_diff =" << qprod_diff; + if (Debug) + qDebug() << "Adding exception offset for atom idx" << i + << "; qprod_diff =" << qprod_diff; - } + } - // FIXME: add only affected bonds? - corr_recip_params = {qprod_start, qprod_end}; - custom_corr_recip->addBond(p1, p2, corr_recip_params); + // FIXME: add only affected bonds? + corr_recip_params = {qprod_start, qprod_end}; + custom_corr_recip->addBond(p1, p2, corr_recip_params); direct_space->addExclusion(p1, p2); } // end of loop over exceptions /*************************************NON BONDED INTERACTIONS*********************************************/ - int npairs = (direct_space->getNumParticles() * (direct_space->getNumParticles() - 1)) / 2; + int npairs = (direct_space->getNumParticles() * (direct_space->getNumParticles() + - 1)) / 2; - if (Debug) - { + if (Debug) { qDebug() << "Num pairs = " << npairs; qDebug() << "Num bonds 1-4 Hard = " << custom_intra_14_clj->getNumBonds(); - qDebug() << "Num bonds 1-4 To Dummy = " << custom_intra_14_todummy->getNumBonds(); - qDebug() << "Num bonds 1-4 From Dummy = " << custom_intra_14_fromdummy->getNumBonds(); - qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << custom_intra_14_fromdummy_todummy->getNumBonds(); + qDebug() << "Num bonds 1-4 To Dummy = " << + custom_intra_14_todummy->getNumBonds(); + qDebug() << "Num bonds 1-4 From Dummy = " << + custom_intra_14_fromdummy->getNumBonds(); + qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << + custom_intra_14_fromdummy_todummy->getNumBonds(); } system_openmm->addForce(recip_space); if (!fullPME) { - if (npairs != num_exceptions) - { + if (npairs != num_exceptions) { direct_space->setForceGroup(NONBONDED_FCG); system_openmm->addForce(direct_space); perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system @@ -2405,8 +2427,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added 1-5"; } - if (custom_intra_14_clj->getNumBonds() != 0) - { + if (custom_intra_14_clj->getNumBonds() != 0) { custom_intra_14_clj->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_clj); perturbed_energies_tmp[1] = true; //Custom non bonded 1-4 is added to the system @@ -2414,8 +2435,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added 1-4 CLJ"; } - if (custom_intra_14_todummy->getNumBonds() != 0) - { + if (custom_intra_14_todummy->getNumBonds() != 0) { custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_todummy); perturbed_energies_tmp[2] = true; //Custom non bonded 1-4 is added to the system @@ -2424,8 +2444,7 @@ void OpenMMPMEFEP::initialise() } - if (custom_intra_14_fromdummy->getNumBonds() != 0) - { + if (custom_intra_14_fromdummy->getNumBonds() != 0) { custom_intra_14_fromdummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_fromdummy); perturbed_energies_tmp[3] = true; //Custom non bonded 1-4 is added to the system @@ -2433,8 +2452,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added 1-4 From Dummy"; } - if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) - { + if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) { custom_intra_14_fromdummy_todummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_fromdummy_todummy); perturbed_energies_tmp[4] = true; //Custom non bonded 1-4 is added to the system @@ -2442,13 +2460,12 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added 1-4 From Dummy To Dummy"; } - if (custom_corr_recip->getNumBonds() != 0) - { + if (custom_corr_recip->getNumBonds() != 0) { custom_corr_recip->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_corr_recip); perturbed_energies_tmp[8] = true; - if (Debug) + if (Debug) qDebug() << "Added reciprocal correction term"; } } // if (!fullPME) @@ -2456,33 +2473,29 @@ void OpenMMPMEFEP::initialise() /*****************************************BONDED INTERACTIONS***********************************************/ - if (bondStretch_openmm->getNumBonds() != 0) - { + if (bondStretch_openmm->getNumBonds() != 0) { bondStretch_openmm->setForceGroup(BOND_FCG); system_openmm->addForce(bondStretch_openmm); if (Debug) qDebug() << "Added Internal Bond energy term"; } - if (bondBend_openmm->getNumAngles() != 0) - { + if (bondBend_openmm->getNumAngles() != 0) { bondBend_openmm->setForceGroup(BOND_FCG); system_openmm->addForce(bondBend_openmm); if (Debug) qDebug() << "Added Internal Angle energy term"; } - if (bondTorsion_openmm->getNumTorsions() != 0) - { + if (bondTorsion_openmm->getNumTorsions() != 0) { bondTorsion_openmm->setForceGroup(BOND_FCG); system_openmm->addForce(bondTorsion_openmm); - if (Debug) + if (Debug) qDebug() << "Added Internal Torsion energy term"; } if (!fullPME) { - if (solute_bond_perturbation->getNumBonds() != 0) - { + if (solute_bond_perturbation->getNumBonds() != 0) { solute_bond_perturbation->setForceGroup(BOND_FCG); system_openmm->addForce(solute_bond_perturbation); perturbed_energies_tmp[5] = true; //Custom bonded is added to the system @@ -2490,8 +2503,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "Added Perturbed Internal Bond energy term"; } - if (solute_angle_perturbation->getNumAngles() != 0) - { + if (solute_angle_perturbation->getNumAngles() != 0) { solute_angle_perturbation->setForceGroup(BOND_FCG); system_openmm->addForce(solute_angle_perturbation); perturbed_energies_tmp[6] = true; //Custom bonded is added to the system @@ -2507,40 +2519,43 @@ void OpenMMPMEFEP::initialise() // Distance Restraint. All the information are stored in the first molecule only. - if (UseLink_flag == true) - { + if (UseLink_flag == true) { Molecule molecule = moleculegroup.moleculeAt(0).molecule(); bool haslinkinfo = molecule.hasProperty("linkbonds"); - if (haslinkinfo) - { + if (haslinkinfo) { std::vector custom_bond_link_par(3); Properties linkprop = molecule.property("linkbonds").asA(); - int nlinks = linkprop.property(QString("nbondlinks")).asA().toInt(); + int nlinks = linkprop.property( + QString("nbondlinks")).asA().toInt(); if (Debug) qDebug() << "Number of constraint links = " << nlinks; - for (int i = 0; i < nlinks; i++) - { - int atomnum0 = linkprop.property(QString("AtomNum0(%1)").arg(i)).asA().toInt(); - int atomnum1 = linkprop.property(QString("AtomNum1(%1)").arg(i)).asA().toInt(); - double reql = linkprop.property(QString("reql(%1)").arg(i)).asA().toDouble(); - double kl = linkprop.property(QString("kl(%1)").arg(i)).asA().toDouble(); - double dl = linkprop.property(QString("dl(%1)").arg(i)).asA().toDouble(); + for (int i = 0; i < nlinks; i++) { + int atomnum0 = linkprop.property(QString("AtomNum0(%1)").arg( + i)).asA().toInt(); + int atomnum1 = linkprop.property(QString("AtomNum1(%1)").arg( + i)).asA().toInt(); + double reql = linkprop.property(QString("reql(%1)").arg( + i)).asA().toDouble(); + double kl = linkprop.property(QString("kl(%1)").arg( + i)).asA().toDouble(); + double dl = linkprop.property(QString("dl(%1)").arg( + i)).asA().toDouble(); int openmmindex0 = AtomNumToOpenMMIndex[atomnum0]; int openmmindex1 = AtomNumToOpenMMIndex[atomnum1]; custom_bond_link_par[0] = reql * OpenMM::NmPerAngstrom; //req - custom_bond_link_par[1] = kl * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); //k + custom_bond_link_par[1] = kl * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * + OpenMM::AngstromsPerNm); //k custom_bond_link_par[2] = dl * OpenMM::NmPerAngstrom; //dl - if (Debug) - { + if (Debug) { qDebug() << "atomnum0 = " << atomnum0 << " openmmindex0 =" << openmmindex0; qDebug() << "atomnum1 = " << atomnum1 << " openmmindex1 =" << openmmindex1; qDebug() << "Req = " << reql << " kl = " << kl << " dl = " << dl; @@ -2564,21 +2579,22 @@ void OpenMMPMEFEP::initialise() * @param timestep */ -void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dimension::Time timestep) +void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, + SireUnits::Dimension::Time timestep) { - if (Debug) - { + if (Debug) { qDebug() << "OpenMMPMEFEP::createContext(): isContextInitialised =" - << isContextInitialised << ", reinitialise_context =" - << reinitialise_context; + << isContextInitialised << ", reinitialise_context =" + << reinitialise_context; } // Check that the openmm system has been initialised // !! Should check that the workspace is compatible with molgroup - if (not this->isSystemInitialised) - { + if (not this->isSystemInitialised) { qDebug() << "Not initialised ! "; - throw SireError::program_bug(QObject::tr("OpenMMPMEFEP should have been initialised before calling integrate."), CODELOC); + throw SireError::program_bug( + QObject::tr("OpenMMPMEFEP should have been initialised before calling integrate."), + CODELOC); } OpenMM::System *system_openmm = openmm_system; @@ -2595,74 +2611,69 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime const double converted_friction = convertTo(friction.value(), picosecond); OpenMM::Integrator *integrator_openmm = NULL; - if (!isContextInitialised || (isContextInitialised && reinitialise_context)) - { + if (!isContextInitialised || (isContextInitialised && reinitialise_context)) { if (Integrator_type == "leapfrogverlet") integrator_openmm = new OpenMM::VerletIntegrator(dt); else if (Integrator_type == "variableleapfrogverlet") integrator_openmm = new OpenMM::VariableVerletIntegrator - (integration_tol); // integration tolerance error unitless + (integration_tol); // integration tolerance error unitless else if (Integrator_type == "langevin") integrator_openmm = new OpenMM::LangevinIntegrator - (converted_Temperature, converted_friction, dt); - else if (Integrator_type == "langevinmiddle") + (converted_Temperature, converted_friction, dt); + else if (Integrator_type == "langevinmiddle") integrator_openmm = new OpenMM::LangevinMiddleIntegrator - (converted_Temperature, converted_friction, dt); + (converted_Temperature, converted_friction, dt); else if (Integrator_type == "variablelangevin") integrator_openmm = new OpenMM::VariableLangevinIntegrator - (converted_Temperature, converted_friction, integration_tol); + (converted_Temperature, converted_friction, integration_tol); else if (Integrator_type == "brownian") integrator_openmm = new OpenMM::BrownianIntegrator - (converted_Temperature, converted_friction, dt); + (converted_Temperature, converted_friction, dt); else throw SireError::program_bug - (QObject::tr("The user defined Integrator type is not " - "supported. Available types are leapfrogverlet, " - "variableleapfrogverlet, langevin, langevinmiddle" - "variablelangevin, brownian"), CODELOC); + (QObject::tr("The user defined Integrator type is not " + "supported. Available types are leapfrogverlet, " + "variableleapfrogverlet, langevin, langevinmiddle" + "variablelangevin, brownian"), CODELOC); - if (Debug) - { + if (Debug) { qDebug() << "Using Integrator:" << Integrator_type; qDebug() << "Integration step =" << dt << " ps"; - if (Integrator_type == "variablelangevin" || Integrator_type == "variableleapfrogverlet") - { + if (Integrator_type == "variablelangevin" + || Integrator_type == "variableleapfrogverlet") { qDebug() << "Integration Tol = " << integration_tol; } - if (Integrator_type == "langevin" || Integrator_type == "variablelangevin" || Integrator_type == "brownian") - { + if (Integrator_type == "langevin" || Integrator_type == "variablelangevin" + || Integrator_type == "brownian") { qDebug() << "Converted Friction = " << converted_friction << "1/ps"; } } - OpenMM::Platform& platform_openmm = OpenMM::Platform::getPlatformByName(platform_type.toStdString()); + OpenMM::Platform& platform_openmm = OpenMM::Platform::getPlatformByName( + platform_type.toStdString()); - if (platform_type == "OpenCL") - { + if (platform_type == "OpenCL") { const std::string prop = std::string("OpenCLDeviceIndex"); const std::string prec = std::string("OpenCLPrecision"); platform_openmm.setPropertyDefaultValue(prop, device_index.toStdString()); platform_openmm.setPropertyDefaultValue(prec, precision.toStdString()); - if (Debug) - { + if (Debug) { qDebug() << "Setting up OpenCL default Index to " << device_index; qDebug() << "Setting up OpenCL precision to" << precision; } } - else if (platform_type == "CUDA") - { + else if (platform_type == "CUDA") { const std::string prop = std::string("CudaDeviceIndex"); const std::string prec = std::string("CudaPrecision"); platform_openmm.setPropertyDefaultValue(prop, device_index.toStdString()); platform_openmm.setPropertyDefaultValue(prec, precision.toStdString()); - if (Debug) - { + if (Debug) { qDebug() << "Setting up CUDA default Index to " << device_index; qDebug() << "Setting up CUDA precision to" << precision; } @@ -2670,24 +2681,23 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime delete openmm_context; - if (Debug) - { - qDebug() << "Deleted openmm_context"; - } + if (Debug) { + qDebug() << "Deleted openmm_context"; + } openmm_context = - new OpenMM::Context(*system_openmm, *integrator_openmm, - platform_openmm); + new OpenMM::Context(*system_openmm, *integrator_openmm, + platform_openmm); this->isContextInitialised = true; - if (Debug) - { - qDebug() << "New OpenMM Context created"; + if (Debug) { + qDebug() << "New OpenMM Context created"; } } if (Debug) - qDebug() << "\nUsing OpenMM platform = " << openmm_context->getPlatform().getName().c_str() << "\n"; + qDebug() << "\nUsing OpenMM platform = " << + openmm_context->getPlatform().getName().c_str() << "\n"; // Now update coordinates / velocities / dimensions with sire data AtomicVelocityWorkspace &ws = workspace.asA(); @@ -2696,58 +2706,61 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime const PropertyName &space_property = PropertyName("space"); // PeriodicBox - if (ptr_sys.property(space_property).isA()) - { - const PeriodicBox &space = ptr_sys.property(space_property).asA(); + if (ptr_sys.property(space_property).isA()) { + const PeriodicBox &space = ptr_sys.property(space_property).asA(); - const double Box_x_Edge_Length = space.dimensions()[0] * OpenMM::NmPerAngstrom; //units in nm - const double Box_y_Edge_Length = space.dimensions()[1] * OpenMM::NmPerAngstrom; //units in nm - const double Box_z_Edge_Length = space.dimensions()[2] * OpenMM::NmPerAngstrom; //units in nm + const double Box_x_Edge_Length = space.dimensions()[0] * + OpenMM::NmPerAngstrom; //units in nm + const double Box_y_Edge_Length = space.dimensions()[1] * + OpenMM::NmPerAngstrom; //units in nm + const double Box_z_Edge_Length = space.dimensions()[2] * + OpenMM::NmPerAngstrom; //units in nm - if (Debug) - qDebug() << "\nBOX SIZE [A] = (" << space.dimensions()[0] << " , " << space.dimensions()[1] << " , " << space.dimensions()[2] << ")\n\n"; + if (Debug) + qDebug() << "\nBOX SIZE [A] = (" << space.dimensions()[0] << " , " << + space.dimensions()[1] << " , " << space.dimensions()[2] << ")\n\n"; - //Set Periodic Box Condition + //Set Periodic Box Condition - system_openmm->setDefaultPeriodicBoxVectors( - OpenMM::Vec3(Box_x_Edge_Length, 0, 0), - OpenMM::Vec3(0, Box_y_Edge_Length, 0), - OpenMM::Vec3(0, 0, Box_z_Edge_Length)); + system_openmm->setDefaultPeriodicBoxVectors( + OpenMM::Vec3(Box_x_Edge_Length, 0, 0), + OpenMM::Vec3(0, Box_y_Edge_Length, 0), + OpenMM::Vec3(0, 0, Box_z_Edge_Length)); - openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0), - OpenMM::Vec3(0, Box_y_Edge_Length, 0), - OpenMM::Vec3(0, 0, Box_z_Edge_Length)); + openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(Box_x_Edge_Length, 0, 0), + OpenMM::Vec3(0, Box_y_Edge_Length, 0), + OpenMM::Vec3(0, 0, Box_z_Edge_Length)); } // TriclinicBox - else if (ptr_sys.property(space_property).isA()) - { - const TriclinicBox &space = ptr_sys.property(space_property).asA(); - - // Get the three triclinic box vectors. - // FIXME: not good practice of using auto here - const auto v0 = space.vector0(); - const auto v1 = space.vector1(); - const auto v2 = space.vector2(); - - // Get cell matrix components in nm. - const double xx = v0.x() * OpenMM::NmPerAngstrom; - const double xy = v0.y() * OpenMM::NmPerAngstrom; - const double xz = v0.z() * OpenMM::NmPerAngstrom; - const double yx = v1.x() * OpenMM::NmPerAngstrom; - const double yy = v1.y() * OpenMM::NmPerAngstrom; - const double yz = v1.z() * OpenMM::NmPerAngstrom; - const double zx = v2.x() * OpenMM::NmPerAngstrom; - const double zy = v2.y() * OpenMM::NmPerAngstrom; - const double zz = v2.z() * OpenMM::NmPerAngstrom; - - system_openmm->setDefaultPeriodicBoxVectors( - OpenMM::Vec3(xx, xy, xz), - OpenMM::Vec3(yx, yy, yz), - OpenMM::Vec3(zx, zy, zz)); - - openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), - OpenMM::Vec3(yx, yy, yz), - OpenMM::Vec3(zx, zy, zz)); + else if (ptr_sys.property(space_property).isA()) { + const TriclinicBox &space = ptr_sys.property( + space_property).asA(); + + // Get the three triclinic box vectors. + // FIXME: not good practice of using auto here + const auto v0 = space.vector0(); + const auto v1 = space.vector1(); + const auto v2 = space.vector2(); + + // Get cell matrix components in nm. + const double xx = v0.x() * OpenMM::NmPerAngstrom; + const double xy = v0.y() * OpenMM::NmPerAngstrom; + const double xz = v0.z() * OpenMM::NmPerAngstrom; + const double yx = v1.x() * OpenMM::NmPerAngstrom; + const double yy = v1.y() * OpenMM::NmPerAngstrom; + const double yz = v1.z() * OpenMM::NmPerAngstrom; + const double zx = v2.x() * OpenMM::NmPerAngstrom; + const double zy = v2.y() * OpenMM::NmPerAngstrom; + const double zz = v2.z() * OpenMM::NmPerAngstrom; + + system_openmm->setDefaultPeriodicBoxVectors( + OpenMM::Vec3(xx, xy, xz), + OpenMM::Vec3(yx, yy, yz), + OpenMM::Vec3(zx, zy, zz)); + + openmm_context->setPeriodicBoxVectors(OpenMM::Vec3(xx, xy, xz), + OpenMM::Vec3(yx, yy, yz), + OpenMM::Vec3(zx, zy, zz)); } openmm_context->reinitialize(); @@ -2767,48 +2780,52 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime int system_index = 0; - for (int i = 0; i < nmols; ++i) - { + for (int i = 0; i < nmols; ++i) { const int nats_mol = ws.nAtoms(i); Vector *c = ws.coordsArray(i); Vector *p = ws.momentaArray(i); const double *m = ws.massArray(i); - for (int j = 0; j < nats_mol; ++j) - { - positions_openmm[system_index] = OpenMM::Vec3(c[j].x() * (OpenMM::NmPerAngstrom), c[j].y() * (OpenMM::NmPerAngstrom), c[j].z() * (OpenMM::NmPerAngstrom)); + for (int j = 0; j < nats_mol; ++j) { + positions_openmm[system_index] = OpenMM::Vec3(c[j].x() * + (OpenMM::NmPerAngstrom), c[j].y() * (OpenMM::NmPerAngstrom), + c[j].z() * (OpenMM::NmPerAngstrom)); if (m[j] == 0.0) qDebug() << "\nWARNING - THE MASS OF PARTICLE " << system_index << " is ZERO\n"; - if (m[j] > SireMaths::small) - { - velocities_openmm[system_index] = OpenMM::Vec3(p[j].x() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA, p[j].y() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA, p[j].z() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA); + if (m[j] > SireMaths::small) { + velocities_openmm[system_index] = OpenMM::Vec3(p[j].x() / m[j] * + (OpenMM::NmPerAngstrom) * PsPerAKMA, + p[j].y() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA, + p[j].z() / m[j] * (OpenMM::NmPerAngstrom) * PsPerAKMA); } - else - { + else { velocities_openmm[system_index] = OpenMM::Vec3(0.0, 0.0, 0.0); } - if (Debug) - { + if (Debug) { qDebug() << "Particle num = " << system_index; qDebug() << "Particle mass = " << m[j]; - qDebug() << "X = " << positions_openmm[system_index][0] * OpenMM::AngstromsPerNm << " A" << - " Y = " << positions_openmm[system_index][1] * OpenMM::AngstromsPerNm << " A" << - " Z = " << positions_openmm[system_index][2] * OpenMM::AngstromsPerNm << " A"; - qDebug() << "Vx = " << velocities_openmm[system_index][0] << " Vy = " << velocities_openmm[system_index][1] << " Vz = " << velocities_openmm[system_index][2] << "\n"; + qDebug() << "X = " << positions_openmm[system_index][0] * OpenMM::AngstromsPerNm + << " A" << + " Y = " << positions_openmm[system_index][1] * OpenMM::AngstromsPerNm << " A" << + " Z = " << positions_openmm[system_index][2] * OpenMM::AngstromsPerNm << " A"; + qDebug() << "Vx = " << velocities_openmm[system_index][0] << " Vy = " << + velocities_openmm[system_index][1] << " Vz = " << + velocities_openmm[system_index][2] << "\n"; } system_index++; } } - if (system_index != nats) - { + if (system_index != nats) { if (Debug) qDebug() << " system_index " << system_index << " nats " << nats; - throw SireError::program_bug(QObject::tr("The number of atoms in the openmm system does not match the number of atoms in the sire workspace"), CODELOC); + throw SireError::program_bug( + QObject::tr("The number of atoms in the openmm system does not match the number of atoms in the sire workspace"), + CODELOC); } openmm_context->setPositions(positions_openmm); @@ -2817,8 +2834,7 @@ void OpenMMPMEFEP::createContext(IntegratorWorkspace &workspace, SireUnits::Dime void OpenMMPMEFEP::destroyContext() { - if (this->isContextInitialised) - { + if (this->isContextInitialised) { delete openmm_context; openmm_context = 0; this->isContextInitialised = false; @@ -2833,7 +2849,8 @@ MolarEnergy OpenMMPMEFEP::getPotentialEnergy(const System &system) createContext(ws.edit(), 2 * femtosecond); OpenMM::State state_openmm = openmm_context->getState(OpenMM::State::Energy); - MolarEnergy nrg = state_openmm.getPotentialEnergy() * kJ_per_mol; // convert to kcal/mol + MolarEnergy nrg = state_openmm.getPotentialEnergy() * + kJ_per_mol; // convert to kcal/mol this->destroyContext(); @@ -2857,13 +2874,13 @@ MolarEnergy OpenMMPMEFEP::getPotentialEnergy(const System &system) * @return Sire System, with the updated energy * minimised coordinates. */ -System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, int max_iteration = 1) +System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, + int max_iteration = 1) { const MoleculeGroup moleculegroup = this->molgroup.read(); IntegratorWorkspacePtr workspace = this->createWorkspace(moleculegroup); - if (system.nMolecules() != moleculegroup.nMolecules()) - { + if (system.nMolecules() != moleculegroup.nMolecules()) { std::cerr << "Number of molecules do not agree!"; exit(1); } @@ -2877,21 +2894,21 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, int stateTypes = OpenMM::State::Positions; if (Debug) - stateTypes |= OpenMM::State::Energy; + stateTypes |= OpenMM::State::Energy; OpenMM::State state_openmm = openmm_context->getState(stateTypes); std::vector old_positions_openmm = state_openmm.getPositions(); - if (Debug) - { - MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; + if (Debug) { + MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; - qDebug() << "Energy before minimisation:" << Epot - << "kcal/mol at lambda =" << Alchemical_value; + qDebug() << "Energy before minimisation:" << Epot + << "kcal/mol at lambda =" << Alchemical_value; } // Step 2 minimise - OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, max_iteration); + OpenMM::LocalEnergyMinimizer::minimize(*openmm_context, tolerance, + max_iteration); // Step 3 update the positions in the system state_openmm = openmm_context->getState(stateTypes); @@ -2902,22 +2919,21 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, const int nmols = ws.nMolecules(); int k = 0; - for (int i = 0; i < nmols; i++) - { + for (int i = 0; i < nmols; i++) { Vector *sire_coords = ws.coordsArray(i); - for (int j = 0; j < ws.nAtoms(i); j++) - { + for (int j = 0; j < ws.nAtoms(i); j++) { sire_coords[j] = Vector(positions_openmm[j + k][0] * (OpenMM::AngstromsPerNm), positions_openmm[j + k][1] * (OpenMM::AngstromsPerNm), positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); - if (Debug) - { - qDebug() << "oX =" << old_positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << - " oY =" << old_positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << - " oZ =" << old_positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; - qDebug() << "nX =" << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << - " nY =" << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << - " nZ =" << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + if (Debug) { + qDebug() << "oX =" << old_positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << + " A" << + " oY =" << old_positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + " oZ =" << old_positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + qDebug() << "nX =" << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << + " A" << + " nY =" << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + " nZ =" << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; } } k = k + ws.nAtoms(i); @@ -2927,12 +2943,11 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, // contents of *sire_coords. Note that velocities aren't touched. ws.commitCoordinates(); - if (Debug) - { - MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; + if (Debug) { + MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; - qDebug() << "Energy after minimisation:" << Epot - << "kcal/mol at lambda =" << Alchemical_value; + qDebug() << "Energy after minimisation:" << Epot + << "kcal/mol at lambda =" << Alchemical_value; } // Step 4 delete the context @@ -2957,16 +2972,15 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, */ System OpenMMPMEFEP::annealSystemToLambda(System &system, - SireUnits::Dimension::Time anneal_step_size, - int annealing_steps) + SireUnits::Dimension::Time anneal_step_size, + int annealing_steps) { const double AKMAPerPs = 0.04888821; const MoleculeGroup moleculegroup = this->molgroup.read(); IntegratorWorkspacePtr workspace = this->createWorkspace(moleculegroup); //TODO: Add some sanity checks here. - if (system.nMolecules() != moleculegroup.nMolecules()) - { + if (system.nMolecules() != moleculegroup.nMolecules()) { std::cerr << "Number of molecules in do not agree!"; exit(1); } @@ -2979,8 +2993,7 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, double lam = 0.0; - for (int i = 0; i < max + 1; i++) - { + for (int i = 0; i < max + 1; i++) { updateOpenMMContextLambda(lam); (openmm_context->getIntegrator()).step(annealing_steps); @@ -3001,19 +3014,18 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, const int nmols = ws.nMolecules(); int k = 0; - for (int i = 0; i < nmols; i++) - { + for (int i = 0; i < nmols; i++) { Vector *sire_coords = ws.coordsArray(i); Vector *sire_momenta = ws.momentaArray(i); const double *m = ws.massArray(i); - for (int j = 0; j < ws.nAtoms(i); j++) - { + for (int j = 0; j < ws.nAtoms(i); j++) { sire_coords[j] = Vector(positions_openmm[j + k][0] * (OpenMM::AngstromsPerNm), positions_openmm[j + k][1] * (OpenMM::AngstromsPerNm), positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); - sire_momenta[j] = Vector(velocities_openmm[j + k][0] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, + sire_momenta[j] = Vector(velocities_openmm[j + k][0] * m[j] * + (OpenMM::AngstromsPerNm) * AKMAPerPs, velocities_openmm[j + k][1] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, velocities_openmm[j + k][2] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs); } @@ -3023,8 +3035,7 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, ws.commitCoordinatesAndVelocities(); //Now we also want to update the systems box in case it is very different! - if(MCBarostat_flag) - { + if(MCBarostat_flag) { // dummy buffered dimensions vector, maybe there is better solution //to this than just passing an empty vector QVector> dimensions; @@ -3045,9 +3056,9 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, * @param record_stats boolean that tracks recording. */ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, - const Symbol &nrg_component, - SireUnits::Dimension::Time timestep, - int nmoves, bool record_stats) + const Symbol &nrg_component, + SireUnits::Dimension::Time timestep, + int nmoves, bool record_stats) { createContext(workspace, timestep); const int nats = openmm_system->getNumParticles(); @@ -3068,8 +3079,8 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, if (nmoves < energy_frequency) throw SireError::program_bug(QObject::tr("You are requesting to save " - "energy every %1 steps, which is above the total number of " - "%2 steps.").arg(energy_frequency, nmoves), CODELOC); + "energy every %1 steps, which is above the total number of " + "%2 steps.").arg(energy_frequency, nmoves), CODELOC); if (Debug) qDebug() << "Number Energy Samples = " << n_samples << "\n\n"; @@ -3078,35 +3089,31 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, int nframes = 0; int MAXFRAMES = 1000; - if (coord_freq > 0) - { + if (coord_freq > 0) { nframes = (nmoves / coord_freq); // Check that we are saving snapshots modulo frequency int remainder = buffer_frequency % energy_frequency; if (buffer_frequency < energy_frequency or remainder != 0) throw SireError::program_bug(QObject::tr("You are requesting to " - "buffer snapshots every %1 steps, but this must number must" - " be a positive integer multiple of the frequency of saving " - "energies %2").arg(buffer_frequency, energy_frequency), CODELOC); + "buffer snapshots every %1 steps, but this must number must" + " be a positive integer multiple of the frequency of saving " + "energies %2").arg(buffer_frequency, energy_frequency), CODELOC); } if (buffer_frequency > nmoves) throw SireError::program_bug(QObject::tr("You are requesting to buffer " - "snapshots every %1 steps, which is above the total number of " - "%2 steps.").arg(buffer_frequency, nmoves), CODELOC); + "snapshots every %1 steps, which is above the total number of " + "%2 steps.").arg(buffer_frequency, nmoves), CODELOC); // Limit excessive internal buffering - if (coord_freq > 0) - { - if (nframes > MAXFRAMES) - { + if (coord_freq > 0) { + if (nframes > MAXFRAMES) { throw SireError::program_bug(QObject::tr("You are requesting to " - "buffer %1 frames, which is above the hardcoded limit " - "of %2.").arg(n_samples, MAXFRAMES), CODELOC); + "buffer %1 frames, which is above the hardcoded limit " + "of %2.").arg(n_samples, MAXFRAMES), CODELOC); } } - else - { + else { nframes = 0; } @@ -3117,10 +3124,11 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, OpenMM::Vec3 b; OpenMM::Vec3 c; - const double beta = 1.0 / (0.0083144621 * convertTo(Temperature.value(), kelvin)); //mol/kJ + const double beta = 1.0 / (0.0083144621 * convertTo(Temperature.value(), + kelvin)); //mol/kJ int stateTypes = OpenMM::State::Positions | OpenMM::State::Velocities - | OpenMM::State::Energy; + | OpenMM::State::Energy; OpenMM::State state_openmm; @@ -3129,11 +3137,11 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, if (Debug && coord_freq > 0) qDebug() << "Saving atom coordinates every " << coord_freq << "\n"; - if (Debug) - { + if (Debug) { qDebug() << "kT (beta) =" << beta; for (int i = 0; i < perturbed_energies.size(); i++) - qDebug() << "Perturbed energy flag index" << i << " Value = " << perturbed_energies[i]; + qDebug() << "Perturbed energy flag index" << i << " Value = " << + perturbed_energies[i]; } //OpenMM vector coordinate @@ -3143,16 +3151,15 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, //Time skipping const double time_skip = convertTo(timeskip.value(), picosecond); - if (time_skip != 0.0) - { + if (time_skip != 0.0) { if (Debug) qDebug() << "Time to Skip = " << time_skip << "ps"; int new_nmoves = time_skip / dt; - if (new_nmoves >= nmoves) - { - throw SireError::program_bug(QObject::tr("Time to Skip is greater than the simulation time"), CODELOC); + if (new_nmoves >= nmoves) { + throw SireError::program_bug( + QObject::tr("Time to Skip is greater than the simulation time"), CODELOC); exit(-1); } @@ -3172,32 +3179,28 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, emptyContainers(); - while (sample_count <= n_samples) - { + while (sample_count <= n_samples) { //*********************MD STEPS**************************** (openmm_context->getIntegrator()).step(energy_frequency); state_openmm = openmm_context->getState(stateTypes, false, 0x01); double p_energy_lambda = state_openmm.getPotentialEnergy(); - if (Debug) - { + if (Debug) { qDebug() << "Lambda =" << Alchemical_value << "Potential energy =" - << p_energy_lambda * OpenMM::KcalPerKJ << "kcal/mol"; + << p_energy_lambda * OpenMM::KcalPerKJ << "kcal/mol"; } IsFiniteNumber = (p_energy_lambda <= DBL_MAX && p_energy_lambda >= -DBL_MAX); - if (!IsFiniteNumber) - { + if (!IsFiniteNumber) { qDebug() << "NaN or Inf has been generated along the simulation"; exit(-1); } pot_energies.append(p_energy_lambda * OpenMM::KcalPerKJ); - if (perturbed_energies[0]) - { + if (perturbed_energies[0]) { // Solvent-Solvent and Protein Protein Non Bonded OFF // NOTE: this can dramatically change the potential energy and so the // biases (reduced energies) @@ -3219,21 +3222,22 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, if (Debug) qDebug() << "modulo is " << modulo; - if (coord_freq > 0 and modulo == 0) - { + if (coord_freq > 0 and modulo == 0) { if (Debug) qDebug() << "buffering coordinates and dimensions"; positions_openmm = state_openmm.getPositions(); buffered_positions.append(positions_openmm); - if (MCBarostat_flag == true) - { + if (MCBarostat_flag == true) { state_openmm.getPeriodicBoxVectors(a, b, c); - Vector v0 = Vector(a[0] * OpenMM::AngstromsPerNm, a[1] * OpenMM::AngstromsPerNm, a[2] * OpenMM::AngstromsPerNm); - Vector v1 = Vector(b[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, b[2] * OpenMM::AngstromsPerNm); - Vector v2 = Vector(c[0] * OpenMM::AngstromsPerNm, c[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); + Vector v0 = Vector(a[0] * OpenMM::AngstromsPerNm, a[1] * OpenMM::AngstromsPerNm, + a[2] * OpenMM::AngstromsPerNm); + Vector v1 = Vector(b[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, + b[2] * OpenMM::AngstromsPerNm); + Vector v2 = Vector(c[0] * OpenMM::AngstromsPerNm, c[1] * OpenMM::AngstromsPerNm, + c[2] * OpenMM::AngstromsPerNm); QVector lattice_vectors{v0, v1, v2}; @@ -3246,11 +3250,11 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, //Let's calculate the gradients double m_forward, m_backward; - boost::tuples::tie(actual_gradient, m_forward, m_backward) = calculateGradient(incr_plus, - incr_minus, p_energy_lambda, beta); + boost::tuples::tie(actual_gradient, m_forward, + m_backward) = calculateGradient(incr_plus, + incr_minus, p_energy_lambda, beta); - if (alchemical_array.size() > 1) - { + if (alchemical_array.size() > 1) { //Let's calculate the biased energies reduced_perturbed_energies.append(computeReducedPerturbedEnergies(beta)); } @@ -3261,8 +3265,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, backward_Metropolis.append(m_backward); //RESET coupling parameter to its original value - if (perturbed_energies[0]) - { + if (perturbed_energies[0]) { // Solvent-Solvent and Protein Protein Non Bonded ON openmm_context->setParameter("SPOnOff", 0.0); } @@ -3271,8 +3274,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, sample_count = sample_count + 1.0; }//end while - if (time_skip != 0) - { + if (time_skip != 0) { timeskip = SireUnits::Dimension::Time(0.0); } @@ -3282,12 +3284,10 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, // Vector of Vector of molecules that are vector of atomic coordinates... QVector< QVector< QVector< Vector > > > buffered_workspace(nframes); - for (int i = 0; i < buffered_workspace.size(); i++) - { + for (int i = 0; i < buffered_workspace.size(); i++) { buffered_workspace[i].resize(nmols); - for (int j = 0; j < nmols; j++) - { + for (int j = 0; j < nmols; j++) { int nats = ws.nAtoms(j); buffered_workspace[i][j].resize(nats); } @@ -3295,34 +3295,34 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, int k = 0; - for (int i = 0; i < nmols; i++) - { + for (int i = 0; i < nmols; i++) { Vector *sire_coords = ws.coordsArray(i); Vector *sire_momenta = ws.momentaArray(i); const double *m = ws.massArray(i); - for (int j = 0; j < ws.nAtoms(i); j++) - { + for (int j = 0; j < ws.nAtoms(i); j++) { sire_coords[j] = Vector(positions_openmm[j + k][0] * (OpenMM::AngstromsPerNm), positions_openmm[j + k][1] * (OpenMM::AngstromsPerNm), positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); if (Debug) - qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << " A" << - " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << - " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << + " A" << + " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; - for (int l = 0; l < nframes; l++) - { + for (int l = 0; l < nframes; l++) { //qDebug() << " i " << i << " j " << j << " k " << k << " l " << l; - Vector buffered_atcoord = Vector(buffered_positions[l][j + k][0] * (OpenMM::AngstromsPerNm), + Vector buffered_atcoord = Vector(buffered_positions[l][j + k][0] * + (OpenMM::AngstromsPerNm), buffered_positions[l][j + k][1] * (OpenMM::AngstromsPerNm), buffered_positions[l][j + k][2] * (OpenMM::AngstromsPerNm)); buffered_workspace[l][i][j] = buffered_atcoord; } - sire_momenta[j] = Vector(velocities_openmm[j + k][0] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, + sire_momenta[j] = Vector(velocities_openmm[j + k][0] * m[j] * + (OpenMM::AngstromsPerNm) * AKMAPerPs, velocities_openmm[j + k][1] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs, velocities_openmm[j + k][2] * m[j] * (OpenMM::AngstromsPerNm) * AKMAPerPs); @@ -3336,8 +3336,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, ws.commitBufferedCoordinatesAndVelocities(buffered_workspace); //Now the box dimensions - if (MCBarostat_flag == true) - { + if (MCBarostat_flag == true) { updateBoxDimensions(state_openmm, buffered_dimensions, ws); } // Clear all buffers @@ -3405,31 +3404,31 @@ boost::tuples::tuple OpenMMPMEFEP::calculateGradient( double potential_energy_lambda_minus_delta; double forward_m; double backward_m; - if (incr_plus < 1.0) - { + if (incr_plus < 1.0) { potential_energy_lambda_plus_delta = getPotentialEnergyAtLambda(incr_plus); } - if (incr_minus > 0.0) - { + if (incr_minus > 0.0) { potential_energy_lambda_minus_delta = getPotentialEnergyAtLambda(incr_minus); } - if (incr_minus < 0.0) - { - gradient = (potential_energy_lambda_plus_delta-p_energy_lambda)*2/double_increment; + if (incr_minus < 0.0) { + gradient = (potential_energy_lambda_plus_delta-p_energy_lambda) + *2/double_increment; backward_m = exp(beta * (potential_energy_lambda_plus_delta - p_energy_lambda)); forward_m = exp(-beta * (potential_energy_lambda_plus_delta - p_energy_lambda)); } - else if(incr_plus > 1.0) - { - gradient = -(potential_energy_lambda_minus_delta-p_energy_lambda)*2/double_increment; - backward_m = exp(-beta * (potential_energy_lambda_minus_delta - p_energy_lambda)); + else if(incr_plus > 1.0) { + gradient = -(potential_energy_lambda_minus_delta-p_energy_lambda) + *2/double_increment; + backward_m = exp(-beta * (potential_energy_lambda_minus_delta - + p_energy_lambda)); forward_m = exp(beta * (potential_energy_lambda_minus_delta - p_energy_lambda)); } - else - { - gradient = (potential_energy_lambda_plus_delta-potential_energy_lambda_minus_delta)/double_increment; + else { + gradient = (potential_energy_lambda_plus_delta + -potential_energy_lambda_minus_delta)/double_increment; - backward_m = exp(-beta * (potential_energy_lambda_minus_delta - p_energy_lambda)); + backward_m = exp(-beta * (potential_energy_lambda_minus_delta - + p_energy_lambda)); forward_m = exp(-beta * (potential_energy_lambda_plus_delta - p_energy_lambda)); } return boost::tuples::make_tuple(gradient, forward_m, backward_m); @@ -3438,14 +3437,11 @@ boost::tuples::tuple OpenMMPMEFEP::calculateGradient( QVector OpenMMPMEFEP::computeReducedPerturbedEnergies(double beta) { QVector perturbed; - QVector::iterator i; - double energy = 0.0; for (auto const &lam: alchemical_array) perturbed.append(getPotentialEnergyAtLambda(lam) * beta); - if (Debug) - { + if (Debug) { for (auto const &red_en: perturbed) qDebug() << "bias is: " << red_en; } @@ -3463,8 +3459,8 @@ void OpenMMPMEFEP::emptyContainers() } void OpenMMPMEFEP::updateBoxDimensions( - OpenMM::State &state_openmm, QVector> &buffered_dimensions, - AtomicVelocityWorkspace &ws) + OpenMM::State &state_openmm, QVector> &buffered_dimensions, + AtomicVelocityWorkspace &ws) { OpenMM::Vec3 a; OpenMM::Vec3 b; @@ -3473,12 +3469,14 @@ void OpenMMPMEFEP::updateBoxDimensions( System & ptr_sys = ws.nonConstsystem(); // TriclinicBox. - if (ptr_sys.property("space").isA()) - { + if (ptr_sys.property("space").isA()) { state_openmm.getPeriodicBoxVectors(a, b, c); - Vector v0 = Vector(a[0] * OpenMM::AngstromsPerNm, a[1] * OpenMM::AngstromsPerNm, a[2] * OpenMM::AngstromsPerNm); - Vector v1 = Vector(b[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, b[2] * OpenMM::AngstromsPerNm); - Vector v2 = Vector(c[0] * OpenMM::AngstromsPerNm, c[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); + Vector v0 = Vector(a[0] * OpenMM::AngstromsPerNm, a[1] * OpenMM::AngstromsPerNm, + a[2] * OpenMM::AngstromsPerNm); + Vector v1 = Vector(b[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, + b[2] * OpenMM::AngstromsPerNm); + Vector v2 = Vector(c[0] * OpenMM::AngstromsPerNm, c[1] * OpenMM::AngstromsPerNm, + c[2] * OpenMM::AngstromsPerNm); System & ptr_sys = ws.nonConstsystem(); TriclinicBox sp(v0, v1, v2); @@ -3487,8 +3485,7 @@ void OpenMMPMEFEP::updateBoxDimensions( ptr_sys.setProperty(string, sp); /** Buffer dimensions if necessary */ - for (int k = 0; k < buffered_dimensions.size(); k++) - { + for (int k = 0; k < buffered_dimensions.size(); k++) { const QString buffered_space = "buffered_space_" + QString::number(k); TriclinicBox buff_space = TriclinicBox(buffered_dimensions[k][0], buffered_dimensions[k][1], @@ -3497,10 +3494,10 @@ void OpenMMPMEFEP::updateBoxDimensions( } } // PeriodicBox. - else - { + else { state_openmm.getPeriodicBoxVectors(a, b, c); - Vector new_dims = Vector(a[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); + Vector new_dims = Vector(a[0] * OpenMM::AngstromsPerNm, + b[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); if (Debug) qDebug() << " a " << a[0] << " b " << b[1] << " c " << c[2]; @@ -3512,8 +3509,7 @@ void OpenMMPMEFEP::updateBoxDimensions( ptr_sys.setProperty(string, sp); /** Buffer dimensions if necessary */ - for (int k = 0; k < buffered_dimensions.size(); k++) - { + for (int k = 0; k < buffered_dimensions.size(); k++) { const QString buffered_space = "buffered_space_" + QString::number(k); Vector dims(buffered_dimensions[k][0].x(), buffered_dimensions[k][1].y(), @@ -3763,8 +3759,7 @@ void OpenMMPMEFEP::setAlchemicalValue(double lambda_value) void OpenMMPMEFEP::setAlchemicalArray(QVector lambda_array) { - for (int i =0; i< lambda_array.size(); i++) - { + for (int i =0; i< lambda_array.size(); i++) { alchemical_array.append(max(0.0, min(1.0, lambda_array[i]))); } } @@ -3898,7 +3893,8 @@ void OpenMMPMEFEP::setReinitialiseContext(bool reinitialise) } /** Create an empty workspace */ -IntegratorWorkspacePtr OpenMMPMEFEP::createWorkspace(const PropertyMap &map) const +IntegratorWorkspacePtr OpenMMPMEFEP::createWorkspace(const PropertyMap &map) +const { return IntegratorWorkspacePtr(new AtomicVelocityWorkspace(map)); } @@ -3916,7 +3912,8 @@ bool OpenMMPMEFEP::isTimeReversible() const } /** Create a workspace for this integrator for the molecule group 'molgroup' */ -IntegratorWorkspacePtr OpenMMPMEFEP::createWorkspace(const MoleculeGroup &molgroup, const PropertyMap &map) const +IntegratorWorkspacePtr OpenMMPMEFEP::createWorkspace(const MoleculeGroup + &molgroup, const PropertyMap &map) const { return IntegratorWorkspacePtr(new AtomicVelocityWorkspace(molgroup, map)); } @@ -3928,5 +3925,5 @@ const char* OpenMMPMEFEP::typeName() void OpenMMPMEFEP::setDebug(bool debug) { - Debug = debug; + Debug = debug; } From 2c51b3180462645711a396defe847f50d0dfa5d0 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 29 Apr 2022 09:54:56 +0100 Subject: [PATCH 106/148] more code rearranged and cleanup --- corelib/src/libs/SireMove/openmmpmefep.cpp | 265 ++++++++++----------- 1 file changed, 125 insertions(+), 140 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 7534dbe85..a19bf2302 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -513,6 +513,17 @@ tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" }; +// subtract 1-2, 1-3 and 1-4 interactions that have been calculated in reciprocal space +tmpl_str OpenMMPMEFEP::CORR_RECIP = + // cutoff shouldn't be needed because 1-4 should be shorter than cutoff + "-U_corr * withinCutoff;" + "withinCutoff = step(cutoff - r);" + + // erf() instead of erfc(), see PME implementation in OpenMM + "U_corr = 138.935456 * q_prod * erf(alpha_pme*r) / r;" + + "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;"; // this is symmetrical + // 1-4 term for shrinking atoms // NOTE: passed-in lambda (lamtd) is 1-lambda tmpl_str OpenMMPMEFEP::TODUMMY = @@ -593,17 +604,6 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" }; -// subtract 1-2, 1-3 and 1-4 interactions that have been calculated in reciprocal space -tmpl_str OpenMMPMEFEP::CORR_RECIP = - // cutoff shouldn't be needed because 1-4 should be shorter than cutoff - "-U_corr * withinCutoff;" - "withinCutoff = step(cutoff - r);" - - // erf() instead of erfc(), see PME implementation in OpenMM - "U_corr = 138.935456 * q_prod * erf(alpha_pme*r) / r;" - - "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;"; // this is symmetrical - /** * initialises the openMM Free energy single topology calculation @@ -700,6 +700,24 @@ void OpenMMPMEFEP::initialise() // the system will hold all auto system_openmm = new OpenMM::System(); + // Andersen thermostat + if (Andersen_flag) + addAndersenThermostat(*system_openmm); + + // Monte Carlo Barostat + if (MCBarostat_flag) + addMCBarostat(*system_openmm); + + if (CMMremoval_frequency > 0) { + auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); + + system_openmm->addForce(cmmotionremover); + + if (Debug) + qDebug() << "\n\nWill remove Center of Mass motion every " << + CMMremoval_frequency << " steps\n\n"; + } + system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), OpenMM::Vec3(0, 6, 0), OpenMM::Vec3(0, 0, 6)); @@ -732,8 +750,13 @@ void OpenMMPMEFEP::initialise() << "computed from PME error tolerance =" << tolerance_PME; } + + /*** NON-BONDED FORCE FIELDS ***/ + QString lam_pre = ""; + /* general force field: direct space Coulomb and LJ */ + // This check is necessary to avoid nan errors on the GPU platform caused // by the calculation of 0^0 if (coulomb_power > 0) @@ -742,9 +765,6 @@ void OpenMMPMEFEP::initialise() QString general_ff = GENERAL.arg(lam_pre); general_ff.append(GENERAL_SIGMA[flag_combRules]); - if (Debug) - qDebug() << "direct space (PME, LJ):" << general_ff; - auto direct_space = new OpenMM::CustomNonbondedForce(general_ff.toStdString()); // This ensures that also the direct space is subject to PBC @@ -757,55 +777,64 @@ void OpenMMPMEFEP::initialise() direct_space->addGlobalParameter("SPOnOff", 0.0); direct_space->addGlobalParameter("alpha_pme", alpha_PME); - addPerParticleParameters(*direct_space, {"qstart", "qend", "epstart", "epend", - "sigmastart", "sigmaend", "isHD", "isTD", - "isFD", "isSolvent" - }); + addPerParticleParameters(*direct_space, + {"qstart", "qend", "epstart", "epend", + "sigmastart", "sigmaend", "isHD", "isTD", + "isFD", "isSolvent"}); + + /* correction term for 1-2, 1-3, 1-4 exceptions in reciprocal space */ + + auto custom_corr_recip = new OpenMM::CustomBondForce(CORR_RECIP.toStdString()); + + custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); + custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); + custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); + custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); + + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); if (coulomb_power > 0) lam_pre = "(lamtd^ntd) *"; + /* to dummy force field */ + QString intra_14_todummy = TODUMMY.arg(lam_pre); intra_14_todummy.append(TODUMMY_SIGMA[flag_combRules]); - if (Debug) - qDebug() << "intra_14_todummy:" << intra_14_todummy; - auto custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0 - Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0-Alchemical_value); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutofftd", - converted_cutoff_distance); + converted_cutoff_distance); custom_intra_14_todummy->addGlobalParameter("alpha_pme", alpha_PME); if (coulomb_power > 0) lam_pre = "(lamfd^nfd) *"; + /* from dummy force field */ + QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); - if (Debug) - qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; - auto custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutofffd", - converted_cutoff_distance); + converted_cutoff_distance); custom_intra_14_fromdummy->addGlobalParameter("alpha_pme", alpha_PME); + /* from and to dummy force field */ + auto intra_14_fromdummy_todummy = QString(FROMTODUMMY); intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); - if (Debug) - qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; - auto custom_intra_14_fromdummy_todummy = new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", Alchemical_value); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); @@ -814,44 +843,35 @@ void OpenMMPMEFEP::initialise() converted_cutoff_distance); custom_intra_14_fromdummy_todummy->addGlobalParameter("alpha_pme", alpha_PME); + /* hard, perturbed atom force field */ + QString intra_14_clj(INTRA_14_CLJ); intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); - if (Debug) - qDebug() << "custom_intra_14_clj:" << intra_14_clj; - auto custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()); + custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); - std::vector paramList = {"qpstart", "qpend", "qmix", "eastart", - "eaend", "emix", "sastart", "saend", - "samix" - }; + std::vector paramList = { + "qpstart", "qpend", "qmix", "eastart", "eaend", "emix", + "sastart", "saend", "samix" + }; addPerBondParameters(*custom_intra_14_todummy, paramList); addPerBondParameters(*custom_intra_14_fromdummy, paramList); addPerBondParameters(*custom_intra_14_fromdummy_todummy, paramList); addPerBondParameters(*custom_intra_14_clj, paramList); - // HHL - // correction term for 1-2, 1-3, 1-4 exceptions computed in reciprocal space - QString corr_recip = QString(CORR_RECIP); - - if (Debug) - qDebug() << "corr_recip:" << corr_recip; - - // HHL - auto custom_corr_recip = new OpenMM::CustomBondForce(corr_recip.toStdString()); - custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); - custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); - custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); - custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); - - addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); - if (Debug) { + qDebug() << "direct space (PME, LJ):" << general_ff; + qDebug() << "corr_recip:" << CORR_RECIP; + qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; + qDebug() << "intra_14_todummy:" << intra_14_todummy; + qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; + qDebug() << "custom_intra_14_clj:" << intra_14_clj; + qDebug() << "\nCutoff type = " << CutoffType; qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; qDebug() << "Dielectric constant = " << field_dielectric; @@ -859,15 +879,8 @@ void OpenMMPMEFEP::initialise() coulomb_power << " Delta Shift = " << shift_delta; } - // Andersen thermostat - if (Andersen_flag == true) - addAndersenThermostat(*system_openmm); - - // Monte Carlo Barostat - if (MCBarostat_flag == true) - addMCBarostat(*system_openmm); - /***************BONDED INTERACTIONS**************************/ + /*** BONDED FORCE FIELDS ***/ auto bondStretch_openmm = new OpenMM::HarmonicBondForce(); auto bondBend_openmm = new OpenMM::HarmonicAngleForce(); @@ -893,17 +906,17 @@ void OpenMMPMEFEP::initialise() {"astart", "aend", "thetastart", "thetaend"}); - /**************RESTRAINTS************************************/ + /*** RESTRAINTS ***/ - OpenMM::CustomExternalForce * positionalRestraints_openmm = NULL; + OpenMM::CustomExternalForce *positionalRestraints_openmm = NULL; if (Restraint_flag) { positionalRestraints_openmm = new OpenMM::CustomExternalForce - ( - "k*d2;" - "d2 = max(0.0, d1 - d^2);" - "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2" - ); + ( + "k*d2;" + "d2 = max(0.0, d1 - d^2);" + "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2" + ); positionalRestraints_openmm->addPerParticleParameter("xref"); positionalRestraints_openmm->addPerParticleParameter("yref"); positionalRestraints_openmm->addPerParticleParameter("zref"); @@ -916,7 +929,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "\n\nRestraint is ON\n\n"; } - /****************************************BOND LINK POTENTIAL*****************************/ + /*** BOND LINK FORCE FIELD ***/ /* NOTE: CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy if restraints involve one atom that diffuses out of the box. */ @@ -927,11 +940,8 @@ void OpenMMPMEFEP::initialise() custom_link_bond->addPerBondParameter("kl"); custom_link_bond->addPerBondParameter("dl"); - //OpenMM vector coordinate - std::vector positions_openmm(nats); - //OpenMM vector momenta - std::vector velocities_openmm(nats); + /*** build OpenMM System ***/ int system_index = 0; @@ -1304,9 +1314,7 @@ void OpenMMPMEFEP::initialise() direct_space->addParticle(custom_non_bonded_params); } - /****************************************************RESTRAINTS*******************************************************/ - - if (Restraint_flag == true) { + if (Restraint_flag) { bool hasRestrainedAtoms = molecule.hasProperty("restrainedatoms"); if (hasRestrainedAtoms) { @@ -1384,17 +1392,6 @@ void OpenMMPMEFEP::initialise() QList< ImproperID > improper_pert_list; QList< ImproperID > improper_pert_swap_list; - // FIXME: move this - /* "Light" atoms are defined to have a mass of HMASS or smaller. This - ensures that hydrogens in the HMR scheme will be constraint. The - specific value of 5.0 assumes that the HMR factor does not exceed - 4.0 and the heavy atom in CH3 or NH3 does have a minimum mass (see - OpenMMMD.py) larger than HMASS. In this way hydrogens and heavier - atoms (assuming no elements between H and C) should be cleanly - separated by mass. */ - const double HMASS = 5.0; // g/mol - const double SMALL = 0.0001; - if (solute.contains(molecule)) { Perturbations pert_params = molecule.property("perturbations").asA(); @@ -2172,44 +2169,36 @@ void OpenMMPMEFEP::initialise() if (Debug) { if (nions != 0) - qDebug() << "\n\nNumber of ions = " << nions << "\n\n"; + qDebug() << "\nNumber of ions = " << nions << "\n"; } - // FIXME: do we also need to do this for direct_space + + /*** EXCEPTION HANDLING ***/ + // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); - if (CMMremoval_frequency > 0) { - auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); - - system_openmm->addForce(cmmotionremover); - - if (Debug) - qDebug() << "\n\nWill remove Center of Mass motion every " << - CMMremoval_frequency << " steps\n\n"; - } - int num_exceptions = recip_space->getNumExceptions(); if (Debug) - qDebug() << "NUM EXCEPTIONS = " << num_exceptions << "\n"; - - std::vector p1_params(10); - std::vector p2_params(10); - std::vector corr_recip_params(2); - double qprod_diff, qprod_start, qprod_end, qprod_mix; - double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; + qDebug() << "num exceptions =" << num_exceptions << "\n"; for (int i = 0; i < num_exceptions; i++) { int p1, p2; + double qprod_diff, qprod_start, qprod_end, qprod_mix; + double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; double charge_prod, sigma_avg, epsilon_avg; + std::vector p1_params(10); + std::vector p2_params(10); + recip_space->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); - // HHL + direct_space->addExclusion(p1, p2); + direct_space->getParticleParameters(p1, p1_params); direct_space->getParticleParameters(p2, p2_params); @@ -2220,15 +2209,15 @@ void OpenMMPMEFEP::initialise() qprod_start = Qstart_p1 * Qstart_p2; qprod_end = Qend_p1 * Qend_p2; - qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; // FIXME: really needed? + qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; if (Debug) - qDebug() << "Exception = " << i << " p1 = " << p1 << " p2 = " - << p2 << " charge prod = " << charge_prod - << " sigma avg = " << sigma_avg << " epsilon_avg = " - << epsilon_avg << "\n"; + qDebug() << "Exception =" << i << ", p1 =" << p1 << ", p2 =" + << p2 << ", charge prod =" << charge_prod + << ", sigma avg =" << sigma_avg << ", epsilon_avg =" + << epsilon_avg; - // run only over the 1-4 exceptions + // run over the 1-4 exceptions if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) { QVector perturbed_14_tmp(13); @@ -2267,8 +2256,8 @@ void OpenMMPMEFEP::initialise() LennardJones14Scale_tmp = sc_factors.second; if (Debug) - qDebug() << "The pair ( " << p1 << ", " << p2 << - " ) is 14 special no swap pair"; + qDebug() << "The pair (" << p1 << ", " << p2 + << ") is 1-4 special no swap pair"; } else { QPair indices_swap_pair(p2, p1); @@ -2281,12 +2270,12 @@ void OpenMMPMEFEP::initialise() LennardJones14Scale_tmp = sc_factors.second; if (Debug) - qDebug() << "The pair ( " << p2 << ", " << p1 << " ) is 14 special swap pair"; + qDebug() << "The pair (" << p2 << ", " << p1 + << ") is 1-4 special swap pair"; } } } - // HHL qprod_start *= Coulomb14Scale_tmp; qprod_end *= Coulomb14Scale_tmp; qprod_mix *= Coulomb14Scale_tmp; @@ -2353,14 +2342,14 @@ void OpenMMPMEFEP::initialise() custom_intra_14_clj->addBond(p1, p2, params); if (Debug) - qDebug() << "Added clj Hard 1-4\n"; + qDebug() << "Added clj Hard 1-4 exception"; } else if ((isTodummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p2 == 1.0 && isTodummy_p1 == 1.0)) { custom_intra_14_todummy->addBond(p1, p2, params); if (Debug) - qDebug() << "Added soft TO dummy 1-4\n"; + qDebug() << "Added soft TO dummy 1-4 exception"; } else if ((isFromdummy_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p1 == 1.0 @@ -2368,7 +2357,7 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy->addBond(p1, p2, params); if (Debug) - qDebug() << "Added soft FROM dummy 1-4\n"; + qDebug() << "Added soft FROM dummy 1-4 exception"; } else if ((isFromdummy_p1 == 1.0 && isTodummy_p2 == 1.0) @@ -2376,11 +2365,10 @@ void OpenMMPMEFEP::initialise() custom_intra_14_fromdummy_todummy->addBond(p1, p2, params); if (Debug) - qDebug() << "Added soft FROM dummy TO dummy 1-4\n"; + qDebug() << "Added soft FROM dummy TO dummy 1-4 exception"; } } // 1-4 exceptions - // HHL qprod_diff = qprod_end - qprod_start; if (qprod_diff != 0.0) { @@ -2393,14 +2381,11 @@ void OpenMMPMEFEP::initialise() } - // FIXME: add only affected bonds? - corr_recip_params = {qprod_start, qprod_end}; - custom_corr_recip->addBond(p1, p2, corr_recip_params); - - direct_space->addExclusion(p1, p2); + custom_corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); } // end of loop over exceptions - /*************************************NON BONDED INTERACTIONS*********************************************/ + + /*** add non-bonded force fields to System ***/ int npairs = (direct_space->getNumParticles() * (direct_space->getNumParticles() - 1)) / 2; @@ -2424,7 +2409,16 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(direct_space); perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system if (Debug) - qDebug() << "Added 1-5"; + qDebug() << "Added 1-5 general force field"; + } + + if (custom_corr_recip->getNumBonds() != 0) { + custom_corr_recip->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_corr_recip); + perturbed_energies_tmp[8] = true; + + if (Debug) + qDebug() << "Added reciprocal correction term"; } if (custom_intra_14_clj->getNumBonds() != 0) { @@ -2459,19 +2453,10 @@ void OpenMMPMEFEP::initialise() if (Debug) qDebug() << "Added 1-4 From Dummy To Dummy"; } - - if (custom_corr_recip->getNumBonds() != 0) { - custom_corr_recip->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_corr_recip); - perturbed_energies_tmp[8] = true; - - if (Debug) - qDebug() << "Added reciprocal correction term"; - } } // if (!fullPME) - /*****************************************BONDED INTERACTIONS***********************************************/ + /*** add bonded force fields to System ***/ if (bondStretch_openmm->getNumBonds() != 0) { bondStretch_openmm->setForceGroup(BOND_FCG); @@ -2519,7 +2504,7 @@ void OpenMMPMEFEP::initialise() // Distance Restraint. All the information are stored in the first molecule only. - if (UseLink_flag == true) { + if (UseLink_flag) { Molecule molecule = moleculegroup.moleculeAt(0).molecule(); bool haslinkinfo = molecule.hasProperty("linkbonds"); From b94c10d7e639b665dfe7e924987c8b7869eedee2 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 5 May 2022 09:05:53 +0100 Subject: [PATCH 107/148] started to implement force groups for debugging purposes --- corelib/src/libs/SireMove/openmmpmefep.cpp | 190 +- corelib/src/libs/SireMove/openmmpmefep.h | 6203 +++++++++++++++++++- 2 files changed, 6317 insertions(+), 76 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index a19bf2302..b0e752dea 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -120,9 +120,16 @@ enum CombinationRules { enum ForceGroups { NONBONDED_FCG = 0, - BOND_FCG = 1 + RECIP_FCG = 1, + DIRECT_FCG = 2, + CORR_FCG = 3, + BOND_FCG = 4 }; +// force group selection mask +const int group_mask = 1 << NONBONDED_FCG | 1 << RECIP_FCG + | 1 << DIRECT_FCG | 1 << CORR_FCG; + static const RegisterMetaType r_openmmint; /** Serialise to a binary datastream */ @@ -142,7 +149,7 @@ QDataStream &operator<<(QDataStream &ds, const OpenMMPMEFEP &velver) << velver.platform_type << velver.Restraint_flag << velver.CMMremoval_frequency << velver.buffer_frequency << velver.energy_frequency - << velver.device_index << velver.precision << velver.Alchemical_value + << velver.device_index << velver.precision << velver.current_lambda << velver.coulomb_power << velver.shift_delta << velver.delta_alchemical << velver.alchemical_array << velver.Integrator_type @@ -171,7 +178,7 @@ QDataStream &operator>>(QDataStream &ds, OpenMMPMEFEP &velver) >> velver.Pressure >> velver.Temperature >> velver.platform_type >> velver.Restraint_flag >> velver.CMMremoval_frequency >> velver.buffer_frequency >> velver.energy_frequency - >> velver.device_index >> velver.precision >> velver.Alchemical_value + >> velver.device_index >> velver.precision >> velver.current_lambda >> velver.coulomb_power >> velver.shift_delta >> velver.delta_alchemical >> velver.alchemical_array >> velver.Integrator_type >> velver.friction >> velver.integration_tol @@ -207,7 +214,7 @@ OpenMMPMEFEP::OpenMMPMEFEP(bool frequent_save) Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), - device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), + device_index("0"), precision("single"), current_lambda(0.5), coulomb_power(0), shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), finite_diff_gradients(), pot_energies(), perturbed_energies(), reduced_perturbed_energies(), @@ -236,7 +243,7 @@ OpenMMPMEFEP::OpenMMPMEFEP(const MoleculeGroup &molecule_group, Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), Restraint_flag(false), CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), - device_index("0"), precision("single"), Alchemical_value(0.5), coulomb_power(0), + device_index("0"), precision("single"), current_lambda(0.5), coulomb_power(0), shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), finite_diff_gradients(), pot_energies(), perturbed_energies(), reduced_perturbed_energies(), forward_Metropolis(), backward_Metropolis(), @@ -268,7 +275,7 @@ OpenMMPMEFEP::OpenMMPMEFEP(const OpenMMPMEFEP &other) CMMremoval_frequency(other.CMMremoval_frequency), buffer_frequency(other.buffer_frequency), energy_frequency(other.energy_frequency), device_index(other.device_index), - precision(other.precision), Alchemical_value(other.Alchemical_value), + precision(other.precision), current_lambda(other.current_lambda), coulomb_power(other.coulomb_power), shift_delta(other.shift_delta), delta_alchemical(other.delta_alchemical), alchemical_array(other.alchemical_array), @@ -322,7 +329,7 @@ OpenMMPMEFEP& OpenMMPMEFEP::operator=(const OpenMMPMEFEP &other) energy_frequency = other.energy_frequency; device_index = other.device_index; precision = other.precision; - Alchemical_value = other.Alchemical_value; + current_lambda = other.current_lambda; coulomb_power = other.coulomb_power; shift_delta = other.shift_delta; delta_alchemical = other.delta_alchemical; @@ -370,7 +377,7 @@ bool OpenMMPMEFEP::operator==(const OpenMMPMEFEP &other) const and energy_frequency == other.energy_frequency and device_index == other.device_index and precision == other.precision - and Alchemical_value == other.Alchemical_value + and current_lambda == other.current_lambda and coulomb_power == other.coulomb_power and shift_delta == other.shift_delta and delta_alchemical == other.delta_alchemical @@ -617,9 +624,9 @@ void OpenMMPMEFEP::initialise() if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; const std::string version = OpenMM::Platform::getOpenMMVersion(); - qDebug() << "OpenMM Version: " << QString::fromUtf8(version.data(), + qDebug() << "OpenMM Version:" << QString::fromUtf8(version.data(), version.size()); - qDebug() << "fullPME = " << fullPME; + qDebug() << "fullPME =" << fullPME; } // Create a workspace using the stored molgroup @@ -647,8 +654,8 @@ void OpenMMPMEFEP::initialise() } if (Debug) - qDebug() << "There are " << nats << " atoms " << "There are " << nmols << - " molecules" << "\n"; + qDebug() << "There are" << nats << "atoms. " << "There are" << nmols + << "molecules"; int flag_combRules; @@ -662,7 +669,7 @@ void OpenMMPMEFEP::initialise() CODELOC); if (Debug) - qDebug() << "\ncombiningRules = " << combiningRules << "\n"; + qDebug() << "combiningRules =" << combiningRules; bool flag_noperturbedconstraints = false; int flag_constraint; @@ -691,7 +698,7 @@ void OpenMMPMEFEP::initialise() CODELOC); if (Debug) - qDebug() << "\nConstraint Type = " << ConstraintType << "\n"; + qDebug() << "Constraint Type =" << ConstraintType; // Load Plugins from the OpenMM standard Plugin Directory OpenMM::Platform::loadPluginsFromDirectory( @@ -714,8 +721,8 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(cmmotionremover); if (Debug) - qDebug() << "\n\nWill remove Center of Mass motion every " << - CMMremoval_frequency << " steps\n\n"; + qDebug() << "\nWill remove Center of Mass motion every" << + CMMremoval_frequency << "steps\n"; } system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), @@ -734,9 +741,10 @@ void OpenMMPMEFEP::initialise() recip_space->setCutoffDistance(converted_cutoff_distance); recip_space->setIncludeDirectSpace(fullPME); recip_space->setUseDispersionCorrection(false); + recip_space->setForceGroup(RECIP_FCG); // scale the charges in the reciprocal space - recip_space->addGlobalParameter("lambda_offset", 0.0); + recip_space->addGlobalParameter("lambda_offset", current_lambda); // use default tolerance for the moment double tolerance_PME = recip_space->getEwaldErrorTolerance(); @@ -771,7 +779,7 @@ void OpenMMPMEFEP::initialise() direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); direct_space->setCutoffDistance(converted_cutoff_distance); - direct_space->addGlobalParameter("lam", Alchemical_value); + direct_space->addGlobalParameter("lam", current_lambda); direct_space->addGlobalParameter("delta", shift_delta); direct_space->addGlobalParameter("n", coulomb_power); direct_space->addGlobalParameter("SPOnOff", 0.0); @@ -786,7 +794,7 @@ void OpenMMPMEFEP::initialise() auto custom_corr_recip = new OpenMM::CustomBondForce(CORR_RECIP.toStdString()); - custom_corr_recip->addGlobalParameter("lam_corr", Alchemical_value); + custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); @@ -803,7 +811,7 @@ void OpenMMPMEFEP::initialise() auto custom_intra_14_todummy = new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0-Alchemical_value); + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0-current_lambda); custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); custom_intra_14_todummy->addGlobalParameter("cutofftd", @@ -820,7 +828,7 @@ void OpenMMPMEFEP::initialise() auto custom_intra_14_fromdummy = new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); - custom_intra_14_fromdummy->addGlobalParameter("lamfd", Alchemical_value); + custom_intra_14_fromdummy->addGlobalParameter("lamfd", current_lambda); custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); custom_intra_14_fromdummy->addGlobalParameter("cutofffd", @@ -836,7 +844,7 @@ void OpenMMPMEFEP::initialise() new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", - Alchemical_value); + current_lambda); custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", @@ -851,7 +859,7 @@ void OpenMMPMEFEP::initialise() auto custom_intra_14_clj = new OpenMM::CustomBondForce(intra_14_clj.toStdString()); - custom_intra_14_clj->addGlobalParameter("lamhd", Alchemical_value); + custom_intra_14_clj->addGlobalParameter("lamhd", current_lambda); custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); @@ -865,17 +873,10 @@ void OpenMMPMEFEP::initialise() addPerBondParameters(*custom_intra_14_clj, paramList); if (Debug) { - qDebug() << "direct space (PME, LJ):" << general_ff; - qDebug() << "corr_recip:" << CORR_RECIP; - qDebug() << "intra_14_fromdummy:" << intra_14_fromdummy; - qDebug() << "intra_14_todummy:" << intra_14_todummy; - qDebug() << "intra_14_fromtodummy:" << intra_14_fromdummy_todummy; - qDebug() << "custom_intra_14_clj:" << intra_14_clj; - qDebug() << "\nCutoff type = " << CutoffType; qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; qDebug() << "Dielectric constant = " << field_dielectric; - qDebug() << "Lambda = " << Alchemical_value << " Coulomb Power = " << + qDebug() << "Lambda = " << current_lambda << " Coulomb Power = " << coulomb_power << " Delta Shift = " << shift_delta; } @@ -891,7 +892,7 @@ void OpenMMPMEFEP::initialise() "B=bend*lambond+(1.0-lambond)*bstart;" "req=rend*lambond+(1.0-lambond)*rstart"); - solute_bond_perturbation->addGlobalParameter("lambond", Alchemical_value); + solute_bond_perturbation->addGlobalParameter("lambond", current_lambda); addPerBondParameters(*solute_bond_perturbation, {"bstart", "bend", "rstart", "rend"}); @@ -901,7 +902,7 @@ void OpenMMPMEFEP::initialise() "A=aend*lamangle+(1.0-lamangle)*astart;" "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); - solute_angle_perturbation->addGlobalParameter("lamangle", Alchemical_value); + solute_angle_perturbation->addGlobalParameter("lamangle", current_lambda); addPerAngleParameters(*solute_angle_perturbation, {"astart", "aend", "thetastart", "thetaend"}); @@ -941,7 +942,7 @@ void OpenMMPMEFEP::initialise() custom_link_bond->addPerBondParameter("dl"); - /*** build OpenMM System ***/ + /*** BUILD OpenMM SYSTEM ***/ int system_index = 0; @@ -949,6 +950,8 @@ void OpenMMPMEFEP::initialise() // their atomic numbers in sire, one array is populated while filling up the openmm global arrays QHash AtomNumToOpenMMIndex; + /* add all atoms to the system */ + for (int i = 0; i < nmols; ++i) { const int nats_mol = ws.nAtoms(i); @@ -1062,10 +1065,8 @@ void OpenMMPMEFEP::initialise() // Molecule solutemol = solute.moleculeAt(0).molecule(); int nions = 0; - QVector perturbed_energies_tmp(9); - - for (int i = 0; i < perturbed_energies_tmp.size(); i++) - perturbed_energies_tmp[i] = false; + QVector perturbed_energies_tmp{false, false, false, false, false, + false, false, false, false}; // the default AMBER 1-4 scaling factors double const Coulomb14Scale = 1.0 / 1.2; @@ -1126,6 +1127,9 @@ void OpenMMPMEFEP::initialise() int nonbond_idx = 0; double charge_start = 0.0, charge_final = 0.0; + /* add non-bonded parameters to direct and reciprocal spaces + and restraints if applicable */ + // Iterate over all atoms in the molecules: // ljparameters.size() is used here as the number of atoms for (int j = 0; j < ljparameters.size(); j++) { @@ -1372,9 +1376,9 @@ void OpenMMPMEFEP::initialise() if (Debug) { qDebug() << "\nAtoms = " << num_atoms_molecule << " Num atoms till i =" << - num_atoms_till_i << "\n"; + num_atoms_till_i; qDebug() << - "\n*********************MONOATOMIC MOLECULE DETECTED**************************\n"; + "*********************MONOATOMIC MOLECULE DETECTED**************************\n"; } nions = nions + 1; @@ -1433,8 +1437,8 @@ void OpenMMPMEFEP::initialise() } else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { /* JM 10/16 ALLBONDS and HANGLES may be unwise with current free energy implementation !*/ - double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value - + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; system_openmm->addConstraint(idx0, idx1, pert_eq_distance); bond_pert_eq_list.insert(BondID(two.atom0(), two.atom1()), pert_eq_distance * OpenMM::AngstromsPerNm); @@ -1466,8 +1470,8 @@ void OpenMMPMEFEP::initialise() qDebug() << " deltar " << deltar << " " << " deltak " << deltak; } /* bonds that do not change parameters are constrained*/ - double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value - + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; if (deltar < SMALL and deltak < SMALL) { system_openmm->addConstraint(idx0, idx1, pert_eq_distance); if (Debug) { @@ -1507,8 +1511,8 @@ void OpenMMPMEFEP::initialise() || final_type_atom0.startsWith("h", Qt::CaseInsensitive) || initial_type_atom1.startsWith("h", Qt::CaseInsensitive) || final_type_atom1.startsWith("h", Qt::CaseInsensitive)) { - double pert_eq_distance = solute_bond_perturbation_params[3] * Alchemical_value - + (1.0 - Alchemical_value) * solute_bond_perturbation_params[2]; + double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; system_openmm->addConstraint(idx0, idx1, pert_eq_distance); if (Debug) { @@ -1748,8 +1752,8 @@ void OpenMMPMEFEP::initialise() double constraint_distance; - double eq_angle = solute_angle_perturbation_params[3] * Alchemical_value + - (1.0 - Alchemical_value) * solute_angle_perturbation_params[2]; + double eq_angle = solute_angle_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_angle_perturbation_params[2]; if (first_alchemical_distance == -1.0 && second_alchemical_distance != -1.0) { //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) @@ -1857,7 +1861,7 @@ void OpenMMPMEFEP::initialise() auto solute_torsion_perturbation = new OpenMM::CustomTorsionForce(openmm_str); solute_torsion_perturbation->addPerTorsionParameter("KJPerKcal"); solute_torsion_perturbation_params[0] = 4.184; - solute_torsion_perturbation->addGlobalParameter("lamdih", Alchemical_value); + solute_torsion_perturbation->addGlobalParameter("lamdih", current_lambda); solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, solute_torsion_perturbation_params); @@ -2077,7 +2081,6 @@ void OpenMMPMEFEP::initialise() } } // end of dihedrals - // Improper Dihedrals QList impropers_ff = amber_params.getAllImpropers(); @@ -2129,7 +2132,6 @@ void OpenMMPMEFEP::initialise() } } // end of impropers - // Variable 1,4 scaling factors QList pairs14_ff = amber_params.getAll14Pairs(); QVector pairs14 = pairs14_ff.toVector(); @@ -2166,7 +2168,6 @@ void OpenMMPMEFEP::initialise() } // end of loop over molecules - if (Debug) { if (nions != 0) qDebug() << "\nNumber of ions = " << nions << "\n"; @@ -2175,7 +2176,8 @@ void OpenMMPMEFEP::initialise() /*** EXCEPTION HANDLING ***/ - // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale down 1-4 bonded atoms + // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale + // down 1-4 bonded atoms recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); @@ -2405,20 +2407,20 @@ void OpenMMPMEFEP::initialise() if (!fullPME) { if (npairs != num_exceptions) { - direct_space->setForceGroup(NONBONDED_FCG); + direct_space->setForceGroup(DIRECT_FCG); system_openmm->addForce(direct_space); perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system if (Debug) - qDebug() << "Added 1-5 general force field"; + qDebug() << "Added 1-5 direct space (PME, LJ):" << general_ff; } if (custom_corr_recip->getNumBonds() != 0) { - custom_corr_recip->setForceGroup(NONBONDED_FCG); + custom_corr_recip->setForceGroup(CORR_FCG); system_openmm->addForce(custom_corr_recip); perturbed_energies_tmp[8] = true; if (Debug) - qDebug() << "Added reciprocal correction term"; + qDebug() << "Added reciprocal correction term:" << CORR_RECIP; } if (custom_intra_14_clj->getNumBonds() != 0) { @@ -2426,15 +2428,16 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(custom_intra_14_clj); perturbed_energies_tmp[1] = true; //Custom non bonded 1-4 is added to the system if (Debug) - qDebug() << "Added 1-4 CLJ"; + qDebug() << "Added 1-4 CLJ:" << intra_14_clj; } + if (custom_intra_14_todummy->getNumBonds() != 0) { custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_todummy); perturbed_energies_tmp[2] = true; //Custom non bonded 1-4 is added to the system if (Debug) - qDebug() << "Added 1-4 To Dummy"; + qDebug() << "Added 1-4 To Dummy:" << intra_14_todummy; } @@ -2443,7 +2446,7 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(custom_intra_14_fromdummy); perturbed_energies_tmp[3] = true; //Custom non bonded 1-4 is added to the system if (Debug) - qDebug() << "Added 1-4 From Dummy"; + qDebug() << "Added 1-4 From Dummy:" << intra_14_fromdummy; } if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) { @@ -2451,7 +2454,7 @@ void OpenMMPMEFEP::initialise() system_openmm->addForce(custom_intra_14_fromdummy_todummy); perturbed_energies_tmp[4] = true; //Custom non bonded 1-4 is added to the system if (Debug) - qDebug() << "Added 1-4 From Dummy To Dummy"; + qDebug() << "Added 1-4 From Dummy To Dummy:" << intra_14_fromdummy_todummy; } } // if (!fullPME) @@ -2556,6 +2559,43 @@ void OpenMMPMEFEP::initialise() this->openmm_system = system_openmm; this->isSystemInitialised = true; + + // xXx + if (Debug) { + auto integrator = *new OpenMM::VerletIntegrator(2.0 * OpenMM::PsPerFs); + + OpenMM::Platform::loadPluginsFromDirectory + (OpenMM::Platform::getDefaultPluginsDirectory()); + + OpenMM::Platform &platform = + OpenMM::Platform::getPlatformByName("CUDA"); + + platform.setPropertyDefaultValue("CudaDeviceIndex", "0"); + platform.setPropertyDefaultValue("CudaPrecision", "mixed"); + + auto context = *new OpenMM::Context(*system_openmm, integrator, + platform); + + context.setPositions(pos); + context.setVelocities(vel); + + const OpenMM::State state = context.getState(OpenMM::State::Energy); + const OpenMM::State state1 = context.getState + (OpenMM::State::Energy, false, 1 << BOND_FCG | 1 << RECIP_FCG); + const OpenMM::State state2 = context.getState + (OpenMM::State::Energy, false, 1 << DIRECT_FCG); + const OpenMM::State state4 = context.getState + (OpenMM::State::Energy, false, 1 << CORR_FCG); + + qDebug() << "Total energy =" + << state.getPotentialEnergy() * kJ_per_mol; + qDebug() << "Reciprocal energy =" + << state1.getPotentialEnergy() * kJ_per_mol; + qDebug() << "Direct energy =" + << state2.getPotentialEnergy() * kJ_per_mol; + qDebug() << "Correction energy =" + << state4.getPotentialEnergy() * kJ_per_mol; + } } // OpenMMPMEFEP::initialise END /** @@ -2888,7 +2928,7 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; qDebug() << "Energy before minimisation:" << Epot - << "kcal/mol at lambda =" << Alchemical_value; + << "kcal/mol at lambda =" << current_lambda; } // Step 2 minimise @@ -2932,7 +2972,7 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; qDebug() << "Energy after minimisation:" << Epot - << "kcal/mol at lambda =" << Alchemical_value; + << "kcal/mol at lambda =" << current_lambda; } // Step 4 delete the context @@ -2974,7 +3014,7 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, //SireUnits::Dimension::Time timestep = stepSize * picosecond; createContext(workspace.edit(), anneal_step_size); - int max = ceil(Alchemical_value / 0.1); + int max = ceil(current_lambda / 0.1); double lam = 0.0; @@ -2983,7 +3023,7 @@ System OpenMMPMEFEP::annealSystemToLambda(System &system, (openmm_context->getIntegrator()).step(annealing_steps); if (i == max - 1) - lam = Alchemical_value; + lam = current_lambda; else lam = lam + 0.1; } @@ -3158,8 +3198,8 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, bool IsFiniteNumber = true; double increment = delta_alchemical; - double incr_plus = Alchemical_value + increment; - double incr_minus = Alchemical_value - increment; + double incr_plus = current_lambda + increment; + double incr_minus = current_lambda - increment; double actual_gradient = 0.0; emptyContainers(); @@ -3168,11 +3208,11 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, //*********************MD STEPS**************************** (openmm_context->getIntegrator()).step(energy_frequency); - state_openmm = openmm_context->getState(stateTypes, false, 0x01); + state_openmm = openmm_context->getState(stateTypes, false, group_mask); double p_energy_lambda = state_openmm.getPotentialEnergy(); if (Debug) { - qDebug() << "Lambda =" << Alchemical_value << "Potential energy =" + qDebug() << "Lambda =" << current_lambda << "Potential energy =" << p_energy_lambda * OpenMM::KcalPerKJ << "kcal/mol"; } @@ -3193,7 +3233,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, } // get new state as SPOnOff was set above - state_openmm = openmm_context->getState(stateTypes, false, 0x01); + state_openmm = openmm_context->getState(stateTypes, false, group_mask); if (Debug) qDebug() << "Total Time = " << state_openmm.getTime() << " ps"; @@ -3255,10 +3295,10 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, openmm_context->setParameter("SPOnOff", 0.0); } - updateOpenMMContextLambda(Alchemical_value); + updateOpenMMContextLambda(current_lambda); sample_count = sample_count + 1.0; + } // end while (sample_count <= n_samples) - }//end while if (time_skip != 0) { timeskip = SireUnits::Dimension::Time(0.0); } @@ -3341,7 +3381,7 @@ double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) updateOpenMMContextLambda(lambda); OpenMM::State state_openmm = - openmm_context->getState(OpenMM::State::Energy, false, 0x01); + openmm_context->getState(OpenMM::State::Energy, false, group_mask); curr_potential_energy = state_openmm.getPotentialEnergy(); return curr_potential_energy; @@ -3733,13 +3773,13 @@ void OpenMMPMEFEP::setEnergyFrequency(int frequency) /** Get the alchemical value used to calculate the free energy change via TI method*/ double OpenMMPMEFEP::getAlchemicalValue(void) { - return Alchemical_value; + return current_lambda; } /** Set the alchemical value used to calculate the free energy change via TI method*/ void OpenMMPMEFEP::setAlchemicalValue(double lambda_value) { - Alchemical_value = max(0.0, min(1.0, lambda_value)); + current_lambda = max(0.0, min(1.0, lambda_value)); } void OpenMMPMEFEP::setAlchemicalArray(QVector lambda_array) diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index dc83abeec..136bac464 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -278,7 +278,7 @@ namespace SireMove { QString precision; - double Alchemical_value; + double current_lambda; float coulomb_power; @@ -331,6 +331,16 @@ namespace SireMove { static tmpl_str INTRA_14_CLJ_SIGMA[2]; static tmpl_str CORR_RECIP; + + /* "Light" atoms are defined to have a mass of HMASS or smaller. This + ensures that hydrogens in the HMR scheme will be constraint. The + specific value of 5.0 assumes that the HMR factor does not exceed + 4.0 and the heavy atom in CH3 or NH3 does have a minimum mass (see + OpenMMMD.py) larger than HMASS. In this way hydrogens and heavier + atoms (assuming no elements between H and C) should be cleanly + separated by mass. */ + const double HMASS = 5.0; // g/mol + const double SMALL = 0.0001; }; } @@ -340,6 +350,6197 @@ SIRE_EXPOSE_CLASS(SireMove::OpenMMPMEFEP) SIRE_END_HEADER +/* NOTE: this is for debugging only + sodium ion in a box + converted from rst7 */ +const std::vector pos = { +{1.8714733, 2.0093072, 1.5697786}, +{2.3410058, 2.2534769, 2.3912187}, +{2.4123218, 2.2097239, 2.3447208}, +{2.3236573, 2.3322954, 2.3397508}, +{2.9121613, 2.3492215, 0.7791028}, +{2.9701569, 2.3562055, 0.8549319}, +{2.8585203, 2.2719922, 0.7970076}, +{1.9955003, 0.3149785, 2.2423062}, +{1.9926479, 0.4095558, 2.2567744}, +{2.0791612, 0.2999967, 2.1982753}, +{2.6928813, 2.3925345, 1.8233089}, +{2.7714777, 2.3687406, 1.7741277}, +{2.6953061, 2.4881298, 1.8275503}, +{1.8859747, 2.2279131, 0.0221965}, +{1.8729649, 2.2019708, 0.1134108}, +{1.8752797, 2.3230329, 0.0225898}, +{2.1873992, 1.4944423, 2.4686804}, +{2.2203777, 1.4077752, 2.4924192}, +{2.1322699, 1.5201602, 2.5425837}, +{2.4244375, 2.7740912, 0.4115550}, +{2.4114471, 2.8517580, 0.3571359}, +{2.3360179, 2.7473867, 0.4366779}, +{0.3192323, 0.9373813, 1.7654681}, +{0.4027351, 0.9709340, 1.7980841}, +{0.3378116, 0.8467744, 1.7408200}, +{2.0770912, 0.4757980, 1.2649555}, +{2.0189149, 0.5414219, 1.2265975}, +{2.0861096, 0.4090838, 1.1969099}, +{3.1420124, 1.3793559, 0.4262370}, +{3.1675544, 1.4544941, 0.3727191}, +{3.0823748, 1.4157288, 0.4916794}, +{0.9195626, 2.0205722, 1.8073353}, +{0.9727501, 2.0297411, 1.8863881}, +{0.8292211, 2.0262151, 1.8384625}, +{2.1914213, 2.6253052, 2.0008349}, +{2.2693207, 2.6805322, 2.0074661}, +{2.1387553, 2.6489110, 2.0771985}, +{1.1613787, 1.8075274, 0.8593214}, +{1.0769869, 1.7837379, 0.8209235}, +{1.1426912, 1.8852817, 0.9119271}, +{2.3656797, 2.2463682, 2.0618634}, +{2.2734664, 2.2209744, 2.0656245}, +{2.4063559, 2.1997600, 2.1349077}, +{1.2495650, 1.8392531, 1.8042736}, +{1.3023792, 1.8273976, 1.8832192}, +{1.1594846, 1.8442798, 1.8362514}, +{0.8948215, 1.2272468, 3.1108265}, +{0.8930716, 1.2464726, 3.2045794}, +{0.9516804, 1.1506281, 3.1031461}, +{1.1058699, 0.0954337, 0.4634076}, +{1.1560405, 0.1769220, 0.4611994}, +{1.0302193, 0.1153705, 0.5185604}, +{2.5649617, 2.8403142, 3.0171099}, +{2.4742958, 2.8230186, 2.9917543}, +{2.6057146, 2.8753543, 2.9379029}, +{1.0460893, 2.1729279, 2.5710580}, +{1.0186667, 2.2646270, 2.5698025}, +{1.1079191, 2.1674142, 2.6439209}, +{1.1829147, 2.4895406, 2.8285499}, +{1.1264546, 2.4143443, 2.8464406}, +{1.1447422, 2.5608640, 2.8797178}, +{1.2281252, 2.9957016, 1.1784958}, +{1.1675032, 3.0287065, 1.1121787}, +{1.1757400, 2.9906747, 1.2584510}, +{2.5857217, 2.2437053, 0.8117682}, +{2.4932706, 2.2281385, 0.7924598}, +{2.6306846, 2.2265863, 0.7290180}, +{2.3980131, 1.6851198, 2.4044547}, +{2.3557160, 1.7708534, 2.4092503}, +{2.3272383, 1.6225894, 2.4200501}, +{0.6590213, 2.9510722, 0.4513275}, +{0.6595361, 3.0106947, 0.3764462}, +{0.6242970, 2.8690102, 0.4163654}, +{0.5970418, 1.4204073, 0.6097964}, +{0.6892765, 1.4127195, 0.5853837}, +{0.5534034, 1.4494249, 0.5296966}, +{0.6092885, 2.5839977, 2.2295759}, +{0.6968071, 2.6227508, 2.2305791}, +{0.5664251, 2.6236041, 2.1537051}, +{1.5213833, 0.7167559, 2.7362700}, +{1.5974512, 0.6993903, 2.7917173}, +{1.4696180, 0.7802213, 2.7858157}, +{2.1873622, 1.6386300, 1.1216463}, +{2.1768334, 1.7335248, 1.1284618}, +{2.1063142, 1.6028736, 1.1579093}, +{2.2214379, 1.3773025, 0.0095251}, +{2.2207689, 1.3624631, 0.1040854}, +{2.2945559, 1.4373997, -0.0047714}, +{1.3882475, 0.9674677, 2.8324666}, +{1.4603108, 1.0266367, 2.8541055}, +{1.3723517, 0.9821788, 2.7392292}, +{2.5977867, 1.0969528, 3.1560195}, +{2.6764765, 1.0787903, 3.1046352}, +{2.5260529, 1.0620470, 3.1031218}, +{1.2085752, 1.5594130, 1.1461924}, +{1.1932180, 1.4868326, 1.2066786}, +{1.1246671, 1.6052868, 1.1420319}, +{1.9753081, 1.0345433, 2.1106830}, +{2.0689545, 1.0363116, 2.0909464}, +{1.9595129, 1.1155562, 2.1591573}, +{0.3609825, 0.1267603, 2.9894757}, +{0.4453993, 0.0903916, 2.9627655}, +{0.2995421, 0.0961978, 2.9227424}, +{0.1541942, 1.1946498, 1.7445748}, +{0.1262022, 1.1143812, 1.7005780}, +{0.2494011, 1.1954185, 1.7347075}, +{2.2937961, 1.6019148, 0.4483269}, +{2.3086050, 1.6843218, 0.4947178}, +{2.2288742, 1.6234553, 0.3813682}, +{0.9990262, 2.1062458, 1.5736318}, +{0.9791179, 2.0896840, 1.6657821}, +{0.9535244, 2.0365295, 1.5263926}, +{1.4188724, 0.2104137, 1.6748135}, +{1.4207870, 0.2584441, 1.7575887}, +{1.4114487, 0.1185326, 1.7006026}, +{0.5409242, 0.3533280, 1.2072754}, +{0.5819036, 0.3184477, 1.2864357}, +{0.4502869, 0.3228892, 1.2118223}, +{1.0826149, 2.9036253, 2.8625534}, +{1.0481732, 2.9920867, 2.8748272}, +{1.0944285, 2.8954387, 2.7679186}, +{2.5876117, 1.7993220, 1.5380435}, +{2.5330219, 1.7260041, 1.5664471}, +{2.5430062, 1.8338423, 1.4607064}, +{2.5861979, 2.4211278, 0.9988453}, +{2.5930321, 2.3488498, 0.9364632}, +{2.6507537, 2.4850216, 0.9686393}, +{3.0959153, 2.3726160, 0.9809340}, +{3.1003559, 2.3088334, 1.0521685}, +{3.1869769, 2.3978636, 0.9656800}, +{1.7283366, 2.4462767, 1.9940965}, +{1.6934389, 2.3852124, 2.0590246}, +{1.7179629, 2.4008474, 1.9104850}, +{2.3323550, 1.1669875, 0.4516330}, +{2.3621090, 1.1482339, 0.3626086}, +{2.2441990, 1.2025584, 0.4404286}, +{0.0220412, 1.5049345, 2.4448464}, +{0.0562837, 1.4157783, 2.4384482}, +{-0.0137405, 1.5231419, 2.3579528}, +{2.1041064, 2.3880076, 1.8606795}, +{2.1704447, 2.4556901, 1.8741194}, +{2.1462138, 2.3243299, 1.8029352}, +{1.6852874, 1.5090879, 0.7188575}, +{1.6166258, 1.5389485, 0.7784917}, +{1.6740550, 1.5629323, 0.6405188}, +{0.0060239, 1.3918827, 1.8736285}, +{0.0560312, 1.3119745, 1.8570069}, +{-0.0685961, 1.3862913, 1.8139384}, +{2.6419570, 0.8376300, 2.5770764}, +{2.6550355, 0.9314166, 2.5630999}, +{2.5884690, 0.8324484, 2.6562881}, +{1.6914840, 0.1915934, 1.1744342}, +{1.6792045, 0.2416639, 1.2550846}, +{1.6077733, 0.1472166, 1.1608130}, +{2.6618481, 0.2082174, 1.4834031}, +{2.6705999, 0.2574298, 1.5650356}, +{2.7497678, 0.1744933, 1.4662235}, +{2.7661414, 1.5829711, 1.3602623}, +{2.6835599, 1.5890517, 1.3122450}, +{2.7775269, 1.4893402, 1.3765699}, +{2.0119326, 0.9692406, -0.0054603}, +{2.0839298, 0.9610233, -0.0679999}, +{2.0548046, 0.9874631, 0.0781594}, +{1.4812555, 1.2569597, 0.4099494}, +{1.5267164, 1.1993010, 0.3485400}, +{1.5392387, 1.2614664, 0.4859754}, +{1.8889096, 2.6428440, 1.3883883}, +{1.9534597, 2.6980693, 1.3442775}, +{1.8585960, 2.5825450, 1.3205102}, +{2.4501414, 2.4929545, 2.1629026}, +{2.4999258, 2.4287300, 2.1123157}, +{2.3586922, 2.4749024, 2.1411431}, +{0.9516214, 2.3035397, 1.3313228}, +{0.9546950, 2.2283449, 1.3904719}, +{0.9872548, 2.2705872, 1.2488200}, +{2.2577932, 1.3315544, 1.7362471}, +{2.2906978, 1.2428913, 1.7214671}, +{2.2378077, 1.3645953, 1.6486616}, +{0.7421976, 1.9652969, 2.7830887}, +{0.7927862, 1.9580919, 2.7021491}, +{0.7579489, 1.8825864, 2.8286209}, +{2.5942872, 2.5944612, 2.4166331}, +{2.5317798, 2.6054306, 2.4882908}, +{2.5397544, 2.5808175, 2.3391583}, +{2.0283597, 1.7133380, 2.3352683}, +{2.0777192, 1.7841151, 2.2938371}, +{2.0944724, 1.6620537, 2.3817587}, +{0.2643212, 0.5706549, 0.9581341}, +{0.3569053, 0.5463682, 0.9573163}, +{0.2646451, 0.6663539, 0.9561551}, +{1.5737172, 3.0730326, 2.8318465}, +{1.4868236, 3.0765395, 2.7918529}, +{1.6232270, 3.0128007, 2.7763197}, +{2.6463740, 0.4374348, 2.0323663}, +{2.6767571, 0.4000641, 2.1150863}, +{2.5579584, 0.4688361, 2.0513125}, +{-0.0005820, 0.3898373, 0.2903230}, +{-0.0561905, 0.3169974, 0.3179702}, +{0.0401707, 0.3594197, 0.2092286}, +{2.9891846, 1.6474910, 1.5328140}, +{2.9821630, 1.7425284, 1.5418094}, +{2.8985991, 1.6173189, 1.5260137}, +{2.2843482, 1.1963381, 2.2855990}, +{2.3410571, 1.2672596, 2.2553244}, +{2.2799192, 1.2080623, 2.3804951}, +{2.2655401, 0.4148379, 0.6052363}, +{2.3611197, 0.4193121, 0.6078526}, +{2.2418106, 0.4574989, 0.5229000}, +{1.3695780, 2.4555309, 1.9906495}, +{1.4333409, 2.4491723, 1.9195427}, +{1.3099644, 2.5252106, 1.9632034}, +{0.5215120, 0.0725599, 1.8818469}, +{0.5060484, -0.0077827, 1.9315285}, +{0.4420247, 0.1243249, 1.8946722}, +{1.3398832, 1.5050503, 0.1413307}, +{1.3979007, 1.5556989, 0.0844888}, +{1.3098774, 1.5678766, 0.2070182}, +{0.4758237, 2.1216948, 3.1157629}, +{0.4834872, 2.0485101, 3.0545456}, +{0.3819239, 2.1288455, 3.1329100}, +{0.1121096, 2.4833777, 1.8929650}, +{0.0805746, 2.4144707, 1.9514430}, +{0.2018757, 2.4999924, 1.9217454}, +{-0.0230301, 2.9027212, 2.5394030}, +{-0.0000686, 2.8170190, 2.5753229}, +{0.0531463, 2.9576435, 2.5579228}, +{2.0543988, 0.3448725, 3.0178018}, +{2.0161560, 0.3051702, 3.0960548}, +{2.0827470, 0.2705017, 2.9646256}, +{0.7532561, 2.5765328, 0.0007234}, +{0.7797561, 2.4889612, 0.0288527}, +{0.8350058, 2.6192129, -0.0249229}, +{2.6915286, 1.5213466, 0.5846333}, +{2.6122558, 1.4687427, 0.5740991}, +{2.6716106, 1.6038194, 0.5403182}, +{1.9728063, 2.6637034, 1.8147571}, +{1.9580905, 2.5805175, 1.7697475}, +{2.0609922, 2.6559629, 1.8511666}, +{1.7066898, 1.8547826, 0.1471348}, +{1.7573370, 1.9352055, 0.1357625}, +{1.7496407, 1.7911437, 0.0899717}, +{0.5658315, 1.5258391, 0.2610209}, +{0.6092113, 1.5584588, 0.1821763}, +{0.5485848, 1.4335406, 0.2424235}, +{2.4318130, 1.0374688, 0.2389770}, +{2.4746926, 1.0667633, 0.1585687}, +{2.4794953, 0.9583632, 0.2640970}, +{2.3650434, 2.5692599, 1.7612191}, +{2.3511376, 2.6254137, 1.6849585}, +{2.3557591, 2.6279974, 1.8362259}, +{1.8930471, 0.6180154, 2.2579937}, +{1.8850559, 0.7129375, 2.2673881}, +{1.8557535, 0.5992481, 2.1718583}, +{0.8676053, 2.2363732, 0.4351578}, +{0.8953149, 2.1514175, 0.4008502}, +{0.7720591, 2.2311814, 0.4376682}, +{2.0940671, 2.9197986, 0.4874092}, +{2.1292098, 2.8985815, 0.5738796}, +{1.9995917, 2.9269311, 0.5010420}, +{2.1916382, 3.1198616, 2.4406855}, +{2.2147779, 3.2012827, 2.4853787}, +{2.2357416, 3.0514913, 2.4911103}, +{0.4691071, 0.5663696, 0.5270882}, +{0.4525084, 0.6603482, 0.5344919}, +{0.5250099, 0.5579332, 0.4498482}, +{0.4161572, 2.6283128, 0.1017281}, +{0.4712690, 2.5568910, 0.1337269}, +{0.3663519, 2.5897014, 0.0296801}, +{2.2261381, 3.1628003, 0.7525169}, +{2.1510873, 3.1064224, 0.7337754}, +{2.2644422, 3.1260028, 0.8321477}, +{1.7423459, 2.3331251, 0.7393015}, +{1.8010900, 2.2706535, 0.6967722}, +{1.6965648, 2.3759987, 0.6669947}, +{2.9650052, 2.9106493, 1.8666363}, +{2.9880989, 2.9578836, 1.9466232}, +{2.8949318, 2.8511584, 1.8933365}, +{2.0993907, 2.8824348, 2.1586714}, +{2.0258322, 2.8352075, 2.1196709}, +{2.0737469, 2.8955362, 2.2499571}, +{3.0903430, 1.1845149, 2.3457496}, +{3.0222211, 1.1173600, 2.3492107}, +{3.1313045, 1.1726857, 2.2600493}, +{0.5575735, 2.6423945, 1.2428064}, +{0.5241982, 2.7191076, 1.2893200}, +{0.6513630, 2.6417232, 1.2619221}, +{0.7655202, 2.7303152, 1.5237868}, +{0.7157991, 2.8115053, 1.5337009}, +{0.8552235, 2.7590845, 1.5068171}, +{1.6539570, 2.8571241, 3.1058025}, +{1.6745796, 2.8963537, 3.0209613}, +{1.5677329, 2.8922098, 3.1280894}, +{2.1644347, 0.7679061, 0.5410000}, +{2.1929455, 0.7347377, 0.4558572}, +{2.1026931, 0.7020806, 0.5728950}, +{1.5911506, 1.2584882, 2.2015827}, +{1.5928532, 1.2019148, 2.1243892}, +{1.6826020, 1.2833070, 2.2151101}, +{2.9239876, 2.4235945, 2.1005917}, +{2.9292433, 2.3765335, 2.1837780}, +{2.9328282, 2.3554709, 2.0339336}, +{1.8971509, 0.6944004, 0.2738664}, +{1.9796025, 0.6616040, 0.3097614}, +{1.9097196, 0.6920776, 0.1790036}, +{2.8964486, 0.9102153, 0.3082056}, +{2.9436123, 0.9860346, 0.2737191}, +{2.9504971, 0.8351527, 0.2835742}, +{0.7412165, 2.1810153, 2.9806244}, +{0.7570237, 2.1053522, 2.9241662}, +{0.6490657, 2.2026649, 2.9664176}, +{2.9512155, 1.4367526, 0.6172913}, +{2.8677461, 1.4722706, 0.5867359}, +{2.9279220, 1.3544866, 0.6603268}, +{2.4157205, 1.5753697, 3.0732467}, +{2.3567586, 1.5695081, 2.9980705}, +{2.4496496, 1.6648213, 3.0701570}, +{1.9269323, 2.9633610, 2.9636562}, +{1.9953382, 2.9022303, 2.9909689}, +{1.9691856, 3.0188584, 2.8981044}, +{1.0674497, 0.3315379, 2.9574826}, +{1.1624920, 0.3336736, 2.9686496}, +{1.0336113, 0.3097880, 3.0443401}, +{2.7274344, 2.2233546, 0.5808761}, +{2.7165220, 2.2875655, 0.5107322}, +{2.7745123, 2.1508176, 0.5398348}, +{0.0197255, 2.6463973, 1.6904681}, +{0.0143753, 2.6206718, 1.7825109}, +{0.0342286, 2.5642898, 1.6434542}, +{0.9279701, 1.7203976, 0.4752721}, +{0.9237586, 1.7280611, 0.5705918}, +{0.8759444, 1.7939811, 0.4430058}, +{2.4401717, 2.9929092, 0.6649299}, +{2.4900198, 2.9588854, 0.7392259}, +{2.3562014, 2.9471855, 0.6694720}, +{1.7161725, 0.5126162, 0.9947148}, +{1.6449056, 0.4496341, 1.0055137}, +{1.6721382, 0.5964975, 0.9810316}, +{0.7240379, 2.3807077, 1.0731586}, +{0.6435918, 2.4325619, 1.0717738}, +{0.7696083, 2.4093072, 1.1523277}, +{0.4328994, 2.9244270, 1.6131009}, +{0.4770735, 2.8569841, 1.6646998}, +{0.3630996, 2.9564276, 1.6702522}, +{0.2357902, 1.2145060, 0.2655490}, +{0.1854626, 1.2957638, 0.2603897}, +{0.1978721, 1.1675233, 0.3398266}, +{2.4134474, 1.6720803, 2.1030695}, +{2.3559372, 1.6001677, 2.0769260}, +{2.4348714, 1.6535847, 2.1945095}, +{1.8235912, 0.3928108, 2.8125515}, +{1.8649511, 0.4347727, 2.7371135}, +{1.8953170, 0.3784821, 2.8742964}, +{0.1954663, 3.0615437, 1.8188611}, +{0.1975980, 3.1410482, 1.7655994}, +{0.1225677, 3.0107784, 1.7832099}, +{0.2003201, 0.9331254, 2.5174694}, +{0.2729960, 0.9595453, 2.4610555}, +{0.2289434, 0.9562793, 2.6058261}, +{1.6736779, 3.0784504, 2.4393055}, +{1.6866149, 3.0111013, 2.5060818}, +{1.7519307, 3.0731218, 2.3844383}, +{2.6498284, 1.4220648, 3.0637672}, +{2.5899897, 1.4927036, 3.0880945}, +{2.6164446, 1.3902113, 2.9799032}, +{1.8238467, 1.7083244, 2.6639714}, +{1.7653881, 1.6410483, 2.6290598}, +{1.8206924, 1.7787460, 2.5992167}, +{0.6357475, 0.5198504, 0.2669439}, +{0.6590760, 0.6125314, 0.2616211}, +{0.6717437, 0.4814615, 0.1869883}, +{2.1645093, 2.6710515, 1.2976561}, +{2.2512760, 2.6309032, 1.3023452}, +{2.1498890, 2.7067878, 1.3852431}, +{1.9094465, 2.1285896, 2.7445493}, +{1.9423703, 2.1002295, 2.6592612}, +{1.8876108, 2.2209747, 2.7322807}, +{1.0030845, 0.6577297, 2.9544363}, +{1.0656595, 0.6050904, 3.0041935}, +{1.0158614, 0.6305588, 2.8635473}, +{2.9123678, 1.7329363, 0.4687765}, +{2.9046371, 1.6393651, 0.4501488}, +{2.9385073, 1.7369642, 0.5607701}, +{1.0824014, 2.0025227, 2.0471020}, +{1.1712251, 1.9997723, 2.0115335}, +{1.0928181, 1.9792726, 2.1393693}, +{1.3376243, 1.9620665, 0.2940955}, +{1.3901855, 1.8975013, 0.2468623}, +{1.2648521, 1.9116781, 0.3305306}, +{0.0930919, 0.6503953, 2.9970949}, +{0.0939617, 0.6647339, 3.0917308}, +{0.0918871, 0.7384329, 2.9595416}, +{2.8074789, 0.4225415, 0.6820116}, +{2.8124750, 0.3539194, 0.6154656}, +{2.7544007, 0.3843162, 0.7518961}, +{1.1339157, 1.7744818, 3.0830243}, +{1.2068850, 1.8184739, 3.0394065}, +{1.1452906, 1.6819571, 3.0612962}, +{1.6970062, 0.4446053, 0.1751104}, +{1.7529389, 0.5173151, 0.2024445}, +{1.6916878, 0.3881698, 0.2522405}, +{2.2371857, 2.3719399, 1.3476613}, +{2.3163056, 2.3615294, 1.2948033}, +{2.1652541, 2.3569093, 1.2863243}, +{1.9754658, 1.7986997, 0.5031732}, +{2.0018821, 1.8890376, 0.4857503}, +{1.9776397, 1.7910836, 0.5985650}, +{1.1827523, 2.4277849, 1.0796869}, +{1.1264278, 2.3505132, 1.0840435}, +{1.2580794, 2.3996203, 1.0277746}, +{2.9174871, 2.9954517, 2.6693654}, +{2.9434962, 2.9541180, 2.5870404}, +{3.0000622, 3.0130577, 2.7144620}, +{2.1268244, 1.5973812, 0.8367526}, +{2.1639965, 1.6093577, 0.9241432}, +{2.1104193, 1.6862896, 0.8053121}, +{2.8241251, 2.1166360, 0.9319483}, +{2.8400149, 2.1519609, 1.0194811}, +{2.7334909, 2.1405492, 0.9125593}, +{2.1044021, 1.8628262, 2.7146611}, +{2.1111798, 1.9124326, 2.7962429}, +{2.0665724, 1.9246318, 2.6521206}, +{0.3225958, 1.6343441, 2.9514580}, +{0.3879036, 1.5704181, 2.9799304}, +{0.2793887, 1.5928215, 2.8768165}, +{1.0221599, 1.7334803, 2.0014744}, +{0.9862989, 1.8222070, 2.0034456}, +{1.0920019, 1.7344157, 2.0669231}, +{2.0946009, 3.0818512, 2.7764700}, +{2.1512353, 3.0229399, 2.7266271}, +{2.1551130, 3.1401174, 2.8223574}, +{2.3593314, 1.8879915, 0.6143693}, +{2.3648212, 1.8882451, 0.7099314}, +{2.4500351, 1.8969924, 0.5851439}, +{2.2702684, 0.4653515, 2.6305857}, +{2.3406951, 0.4956426, 2.5732720}, +{2.3105071, 0.4601467, 2.7172809}, +{0.6625214, 1.9358430, 0.4474536}, +{0.6503104, 2.0242851, 0.4129398}, +{0.5918860, 1.8847452, 0.4079317}, +{2.4419846, 2.6034036, 1.2903799}, +{2.4524515, 2.5096142, 1.2743695}, +{2.4683018, 2.6448147, 1.2081921}, +{0.2388505, 2.8861618, 2.0316002}, +{0.1470522, 2.8600147, 2.0244093}, +{0.2489594, 2.9561069, 1.9670416}, +{2.5481868, 2.9444427, 1.5663530}, +{2.5004070, 3.0124109, 1.5188162}, +{2.6257753, 2.9278135, 1.5128196}, +{2.4184921, 0.5802947, 2.0611312}, +{2.4392235, 0.6186362, 1.9759113}, +{2.3403399, 0.6273153, 2.0901766}, +{0.3910323, 0.5905544, 2.9814229}, +{0.4570149, 0.5219214, 2.9715159}, +{0.3110933, 0.5523331, 2.9452121}, +{-0.0182588, 1.0194688, 0.7585768}, +{-0.0118893, 0.9788160, 0.8450007}, +{-0.0188073, 0.9458155, 0.6974440}, +{2.6328211, 2.1879127, 2.6426773}, +{2.5524304, 2.1943970, 2.6942291}, +{2.6933763, 2.2487893, 2.6849790}, +{1.1729031, 0.9964514, 0.3787578}, +{1.0920544, 0.9532434, 0.3512097}, +{1.1452578, 1.0578854, 0.4467571}, +{2.1395352, 2.0460222, 0.5045939}, +{2.1883287, 2.1201673, 0.4687612}, +{2.2070503, 1.9854224, 0.5351176}, +{0.4402409, 1.5850054, 2.0197873}, +{0.4712560, 1.5680047, 2.1087329}, +{0.3582837, 1.5359930, 2.0132220}, +{1.6543146, 0.3199280, 1.3946537}, +{1.7067885, 0.3994293, 1.4040531}, +{1.6927384, 0.2583514, 1.4570575}, +{1.4972435, 0.3155436, 0.9871106}, +{1.4596480, 0.2424876, 1.0362197}, +{1.4214578, 0.3625466, 0.9523317}, +{0.6701496, 2.8699224, 0.8155157}, +{0.6892066, 2.7763424, 0.8090401}, +{0.7043943, 2.8954678, 0.9011722}, +{0.2769080, 0.1755955, 1.9831259}, +{0.2970012, 0.2597972, 2.0239754}, +{0.1954684, 0.1475468, 2.0248773}, +{2.9895637, 1.6483345, 0.1066921}, +{2.9565566, 1.7248058, 0.1538617}, +{2.9358170, 1.5756881, 0.1382533}, +{1.5607988, 0.5254035, 2.0633485}, +{1.5195649, 0.5862818, 2.0020630}, +{1.6538327, 0.5282760, 2.0410159}, +{0.8412059, 0.0331898, 0.1249932}, +{0.8978999, -0.0420894, 0.1417604}, +{0.7691841, 0.0232719, 0.1872572}, +{1.6913196, 2.9723914, 1.3210536}, +{1.6528621, 2.9063368, 1.3786741}, +{1.6364878, 3.0498602, 1.3334777}, +{2.5328731, 2.1246798, 2.2569039}, +{2.6020193, 2.1626747, 2.2027051}, +{2.5629320, 2.0356505, 2.2751403}, +{2.3643424, 2.5766487, 2.5906930}, +{2.3065753, 2.5032980, 2.5695987}, +{2.3092392, 2.6369517, 2.6405878}, +{0.9836999, 2.7414150, 0.3170417}, +{0.9735875, 2.7602842, 0.4103370}, +{0.9428052, 2.6556599, 0.3053795}, +{0.3599092, 2.7081237, 2.7204304}, +{0.4149048, 2.6824727, 2.7944562}, +{0.2990420, 2.7723491, 2.7569351}, +{2.4164088, 0.6443670, 0.3540697}, +{2.4854667, 0.5890868, 0.3174989}, +{2.4545255, 0.7321482, 0.3560468}, +{2.3994186, 2.6241496, 0.9728600}, +{2.4524238, 2.5452232, 0.9617502}, +{2.4631503, 2.6954691, 0.9766145}, +{1.7376107, 1.7412398, 2.9520926}, +{1.7656901, 1.8293871, 2.9766674}, +{1.7717859, 1.7290385, 2.8635178}, +{1.6300310, 0.8114660, 0.6524494}, +{1.5638367, 0.8580234, 0.6013314}, +{1.6484904, 0.8695275, 0.7262764}, +{1.2669666, 1.9886229, 1.1955822}, +{1.3203849, 2.0087943, 1.1187582}, +{1.1852429, 1.9541877, 1.1595577}, +{1.3154730, 0.6569121, 2.5581789}, +{1.3863324, 0.6698116, 2.6212254}, +{1.3520533, 0.6861918, 2.4747109}, +{1.6831036, 0.6864319, 1.7295200}, +{1.6993969, 0.6900799, 1.6352675}, +{1.7175722, 0.7692140, 1.7630067}, +{1.8289160, 3.0614631, 0.8600294}, +{1.7482997, 3.0307453, 0.9014993}, +{1.8274205, 3.1563995, 0.8721608}, +{2.6750693, 1.1605911, 1.8848736}, +{2.7443922, 1.1827424, 1.9470508}, +{2.7081869, 1.0836994, 1.8384713}, +{1.9724337, 3.1950347, 1.8865892}, +{1.9900658, 3.2337449, 1.8008398}, +{2.0590019, 3.1742044, 1.9217223}, +{1.5872844, 2.2576742, 2.1886542}, +{1.5574524, 2.1916709, 2.1260769}, +{1.5096614, 2.2780178, 2.2408380}, +{2.9956219, 2.1640286, 2.9461095}, +{2.9492075, 2.2347262, 2.9012775}, +{3.0850956, 2.1690061, 2.9124644}, +{1.7096837, 0.1986772, 1.6432632}, +{1.7577829, 0.2314066, 1.7192736}, +{1.6195177, 0.2273192, 1.6578255}, +{2.1386294, 0.5438677, 0.3314573}, +{2.1290076, 0.4511681, 0.3096279}, +{2.2318320, 0.5618356, 0.3190979}, +{0.7650658, 2.1376100, 2.5213192}, +{0.7453382, 2.1935925, 2.4462252}, +{0.8592409, 2.1480541, 2.5348947}, +{0.9856669, 1.7171329, 0.1437816}, +{1.0476937, 1.6825552, 0.2079640}, +{1.0381499, 1.7313635, 0.0650076}, +{1.6421061, 2.3907270, 1.4804719}, +{1.6646216, 2.3975062, 1.3876849}, +{1.5484291, 2.4101036, 1.4838643}, +{2.4316094, 1.0387940, 0.9552670}, +{2.3654730, 0.9945975, 0.9020224}, +{2.5094423, 1.0412549, 0.8996045}, +{0.5132794, 1.2429434, 0.2308677}, +{0.4291947, 1.2120869, 0.2646311}, +{0.5579326, 1.1635065, 0.2015728}, +{1.6820676, 2.8520205, 0.7613563}, +{1.6945373, 2.9387486, 0.7228199}, +{1.6015561, 2.8193259, 0.7212157}, +{2.0702898, 0.2868189, 1.0423578}, +{2.0247016, 0.2033347, 1.0530548}, +{2.0126762, 0.3385284, 0.9860631}, +{1.9843912, 1.1566390, 1.4450015}, +{1.9972804, 1.1227024, 1.3564323}, +{2.0231953, 1.2441182, 1.4430146}, +{2.2182362, 2.5653105, 0.5130404}, +{2.1488578, 2.5471571, 0.5764393}, +{2.2462270, 2.4789231, 0.4827738}, +{2.3975186, 2.1903710, 2.7691264}, +{2.3945692, 2.1455278, 2.8536408}, +{2.3894451, 2.2832127, 2.7909794}, +{2.0788777, 2.2758670, 2.0997748}, +{2.0342002, 2.1918125, 2.1098297}, +{2.0531607, 2.3064048, 2.0127783}, +{0.1783671, 1.8784395, 2.5981960}, +{0.1578446, 1.9712187, 2.5866559}, +{0.0981172, 1.8328270, 2.5728629}, +{1.6632726, 2.3131890, 1.0135151}, +{1.6594592, 2.2180502, 1.0036955}, +{1.7045476, 2.3439610, 0.9328195}, +{1.4803901, 2.6592510, 1.2223798}, +{1.5306160, 2.6779396, 1.3016919}, +{1.5277244, 2.5874052, 1.1804275}, +{0.6837543, 1.7004693, 2.4274294}, +{0.7508138, 1.7466190, 2.3770754}, +{0.6404389, 1.7691039, 2.4781775}, +{1.1411927, 1.4649131, 2.2682679}, +{1.1664184, 1.5003501, 2.3535333}, +{1.1898483, 1.3827926, 2.2611153}, +{3.0779069, 0.6804932, 1.1097274}, +{3.0244229, 0.6217276, 1.0563568}, +{3.1430690, 0.6233280, 1.1503271}, +{0.1969125, 0.7999193, 0.4099044}, +{0.1111407, 0.7587862, 0.3992464}, +{0.2579998, 0.7390308, 0.3683924}, +{2.8264813, 1.4989989, 0.3259530}, +{2.8100045, 1.4170247, 0.2793585}, +{2.7631485, 1.4989008, 0.3977252}, +{0.5845742, 2.2724712, 1.5652804}, +{0.6492001, 2.3415713, 1.5798061}, +{0.6321878, 2.1911905, 1.5822725}, +{1.3550177, 2.5894437, 0.5522795}, +{1.4319309, 2.6198018, 0.5040606}, +{1.3148459, 2.6694622, 0.5861265}, +{0.3492166, 0.6444935, 0.2208706}, +{0.4288977, 0.6562431, 0.1691484}, +{0.2789139, 0.6406725, 0.1560226}, +{2.4670827, 1.8028463, 1.2799479}, +{2.5121534, 1.7487937, 1.2150692}, +{2.3769743, 1.8083243, 1.2481233}, +{1.3075612, 0.4356000, 0.8103200}, +{1.2694739, 0.5167696, 0.7768060}, +{1.2515557, 0.3664850, 0.7749812}, +{0.4910012, 2.0979931, 2.1243012}, +{0.4323250, 2.1473954, 2.1815627}, +{0.5286052, 2.1638915, 2.0659432}, +{0.0578629, 2.7593703, 0.8114767}, +{0.0531583, 2.7730706, 0.7168590}, +{0.1514677, 2.7516351, 0.8299326}, +{2.2404411, 0.0327961, 1.8300445}, +{2.2604232, 0.0136552, 1.9216778}, +{2.3100979, 0.0922798, 1.8022606}, +{0.0974365, 0.9283392, 3.0126777}, +{0.1524632, 0.9092092, 2.9367275}, +{0.0957323, 1.0239197, 3.0175543}, +{2.6784375, 2.9037516, 0.7836549}, +{2.6834912, 2.9627857, 0.7084768}, +{2.7663460, 2.9055664, 0.8214850}, +{0.0836577, 2.1209667, 2.8446317}, +{0.1585192, 2.1382492, 2.7875404}, +{0.0965081, 2.0308964, 2.8743730}, +{2.5167794, 0.3068167, 2.7316771}, +{2.4714971, 0.3364888, 2.8106162}, +{2.5992029, 0.3554861, 2.7316215}, +{0.5038749, 2.3738491, 1.3183770}, +{0.5218666, 2.4678626, 1.3180954}, +{0.5158341, 2.3474476, 1.4096035}, +{1.2454827, 0.0940776, 3.0993612}, +{1.3358598, 0.1254011, 3.1029875}, +{1.2016215, 0.1390790, 3.1715651}, +{0.1842959, 1.7456124, 1.6979568}, +{0.1849337, 1.7568830, 1.6029048}, +{0.1703129, 1.6518023, 1.7108592}, +{0.4536920, 2.5917311, 0.5849202}, +{0.5092427, 2.6263988, 0.5151020}, +{0.3643268, 2.6058743, 0.5536767}, +{2.4967804, 0.2426428, 3.1782391}, +{2.4980402, 0.1970108, 3.0941055}, +{2.4711294, 0.1755416, 3.2414987}, +{0.9008789, 1.7600172, 0.7647498}, +{0.8557037, 1.6999091, 0.8239828}, +{0.8542477, 1.8430156, 0.7747053}, +{2.1795778, 3.1438193, 2.1036255}, +{2.1984453, 3.1826649, 2.1890502}, +{2.1416118, 3.0583544, 2.1240375}, +{0.7482341, 0.7066222, 1.7839291}, +{0.7457371, 0.7127150, 1.8794223}, +{0.8371063, 0.6770926, 1.7641289}, +{2.8649092, 1.4900875, 2.8105652}, +{2.8910971, 1.5242095, 2.7250538}, +{2.9152474, 1.5418168, 2.8734336}, +{2.4295516, 0.1482109, 2.0379190}, +{2.5178802, 0.1531281, 2.0013645}, +{2.4299416, 0.0684588, 2.0908508}, +{2.4314852, 0.0500857, 1.4687470}, +{2.5098026, 0.0887686, 1.4296020}, +{2.3872767, 0.1234905, 1.5114048}, +{0.4156466, 0.3368271, 3.1477161}, +{0.4013515, 0.2740769, 3.0768614}, +{0.5108376, 0.3418472, 3.1564214}, +{3.1115756, 1.8532823, 1.1165141}, +{3.1038578, 1.8718256, 1.2101030}, +{3.1279166, 1.9386638, 1.0764481}, +{1.6271554, 1.0081229, 1.3328984}, +{1.5640870, 0.9454293, 1.2974836}, +{1.7114986, 0.9797754, 1.2976145}, +{1.8857219, 2.2685883, 1.6731218}, +{1.9564896, 2.3233678, 1.6391591}, +{1.8152303, 2.3301859, 1.6930959}, +{1.4594719, 1.1599877, 3.0658443}, +{1.3769027, 1.1850663, 3.0244234}, +{1.4352641, 1.1370650, 3.1555710}, +{0.5770164, 1.2694687, 0.8353566}, +{0.5626905, 1.3266805, 0.7599651}, +{0.6655903, 1.2353351, 0.8230325}, +{1.7655202, 0.8793496, 2.1394968}, +{1.8459513, 0.9261115, 2.1169915}, +{1.7559942, 0.8135606, 2.0706246}, +{2.4673088, 1.8584262, 0.8801485}, +{2.5091872, 1.7842855, 0.9238712}, +{2.5398793, 1.9156744, 0.8552797}, +{0.5073391, 2.3540635, 0.6927225}, +{0.4743643, 2.4407256, 0.6689599}, +{0.5985147, 2.3691397, 0.7176631}, +{1.1869973, 0.0069852, 0.2298261}, +{1.1808685, -0.0878405, 0.2413521}, +{1.1511999, 0.0433212, 0.3108234}, +{2.6046932, 1.8357429, 2.6378818}, +{2.5620329, 1.7680523, 2.6904216}, +{2.5475156, 1.9120628, 2.6461482}, +{1.8136911, 2.0696192, 2.0584218}, +{1.7304506, 2.1157048, 2.0479598}, +{1.7914154, 1.9771662, 2.0475340}, +{0.9730627, 2.7394595, 1.1390134}, +{1.0245099, 2.6876483, 1.0771174}, +{0.9680254, 2.6849234, 1.2175167}, +{1.6381097, 1.0507834, 0.3490207}, +{1.7185095, 1.0168779, 0.3883727}, +{1.6668882, 1.0922463, 0.2676884}, +{2.0200162, 2.6963561, 2.3652277}, +{2.0146904, 2.6140289, 2.4137683}, +{1.9629277, 2.6832588, 2.2895198}, +{2.9405653, 0.9576076, 1.0373093}, +{2.8530388, 0.9189986, 1.0340291}, +{2.9971676, 0.8921455, 0.9964042}, +{0.6476248, 1.1184535, 2.7290316}, +{0.5692672, 1.1727514, 2.7204208}, +{0.6327927, 1.0453197, 2.6690836}, +{2.8419216, 1.9384192, 0.7193613}, +{2.9187410, 1.9840723, 0.6850558}, +{2.8316519, 1.9723067, 0.8082910}, +{2.3169124, 2.2255061, 0.7560075}, +{2.2458146, 2.1635633, 0.7724544}, +{2.2726915, 2.3083384, 0.7374169}, +{1.0748703, 0.6871912, 2.6919115}, +{1.1633543, 0.6619518, 2.6655319}, +{1.0861098, 0.7714646, 2.7358887}, +{0.0774770, 3.0752191, 2.2247641}, +{0.0322728, 3.0844369, 2.1408956}, +{0.1659322, 3.0471282, 2.2013359}, +{2.9438622, 1.2409064, 2.8600609}, +{3.0338154, 1.2337920, 2.8281209}, +{2.9221046, 1.3335679, 2.8499239}, +{2.2378011, 1.9386177, 1.6808851}, +{2.1502020, 1.9167708, 1.7126883}, +{2.2467830, 2.0323760, 1.6979440}, +{1.4227408, 1.7841775, 2.0304794}, +{1.3511722, 1.7759745, 2.0935109}, +{1.4981122, 1.7449850, 2.0745864}, +{1.4887103, 2.0467927, 2.0331962}, +{1.4610412, 1.9555509, 2.0416610}, +{1.4193860, 2.0881712, 1.9817734}, +{0.0340780, 1.5261482, 1.4595754}, +{0.0309649, 1.4909560, 1.3706140}, +{-0.0559048, 1.5532427, 1.4777769}, +{1.5224903, 0.1661578, 3.1212919}, +{1.5834048, 0.0935368, 3.1079524}, +{1.5457999, 0.2297104, 3.0536158}, +{0.0816482, 1.1037382, 0.4777234}, +{-0.0054210, 1.1374587, 0.4566475}, +{0.0707774, 1.0606782, 0.5625172}, +{3.0662675, 0.0358238, 3.0800355}, +{3.0017874, 0.0950806, 3.0413923}, +{3.0211925, -0.0030174, 3.1550148}, +{2.1593428, 2.3391256, 2.9319861}, +{2.1032333, 2.3909841, 2.8743250}, +{2.2481506, 2.3686316, 2.9118648}, +{0.1281719, 2.4506598, 2.5111132}, +{0.1391695, 2.3602154, 2.4817667}, +{0.0356916, 2.4570215, 2.5349717}, +{3.1226239, 1.6242535, 0.7353630}, +{3.0995426, 1.5518680, 0.6771402}, +{3.1099918, 1.5890747, 0.8234834}, +{1.4125627, 0.7544834, 1.5066402}, +{1.5054874, 0.7357658, 1.4933374}, +{1.3671398, 0.6900312, 1.4523724}, +{2.2307046, 0.1334562, 2.9098568}, +{2.2352242, 0.2284277, 2.8987977}, +{2.3199360, 0.1077771, 2.9331083}, +{2.4147241, 0.9624926, 1.2014419}, +{2.4173338, 0.9862739, 1.1087599}, +{2.3298683, 0.9196822, 1.2128040}, +{0.3278056, 0.3497300, 0.2765122}, +{0.3238836, 0.3216062, 0.1851011}, +{0.3548987, 0.4414351, 0.2722157}, +{1.6943099, 1.1554253, 0.1044712}, +{1.7826068, 1.1421489, 0.0699791}, +{1.6406220, 1.1722406, 0.0270299}, +{2.6309984, 2.7838564, 1.0509003}, +{2.6917503, 2.7881265, 0.9770539}, +{2.6740856, 2.7262693, 1.1140630}, +{1.0080870, 2.7048438, 3.0472586}, +{0.9533328, 2.6638126, 2.9803202}, +{1.0383178, 2.7862079, 3.0069065}, +{0.2450570, 2.9102933, 1.0437293}, +{0.1624881, 2.9273899, 0.9984260}, +{0.2892744, 2.8452327, 0.9891927}, +{2.9494078, 1.6749190, 2.9821687}, +{2.9955168, 1.6447038, 3.0604203}, +{2.9854581, 1.7619594, 2.9652374}, +{0.1694400, 1.8712778, 2.9085426}, +{0.1554771, 1.8561226, 3.0020182}, +{0.2422809, 1.8135924, 2.8855443}, +{1.5720148, 1.0467206, 2.0218225}, +{1.4992840, 0.9845018, 2.0229926}, +{1.6468091, 0.9967527, 2.0545540}, +{0.5403146, 2.4046991, 0.2466223}, +{0.4461326, 2.4044735, 0.2637111}, +{0.5476781, 2.3871424, 0.1528147}, +{2.0995874, 0.3659303, 1.8802744}, +{2.1237929, 0.4139685, 1.9594499}, +{2.1661038, 0.2975409, 1.8724772}, +{1.0650973, 2.2499113, 2.9354756}, +{1.0726751, 2.2797766, 3.0261009}, +{1.0327522, 2.1600947, 2.9424810}, +{1.2984168, 2.7431529, 2.4380839}, +{1.3929604, 2.7498395, 2.4514677}, +{1.2879024, 2.7392263, 2.3430243}, +{1.4565203, 1.7663779, 0.1348543}, +{1.4338349, 1.7116584, 0.0596648}, +{1.5445952, 1.7984421, 0.1154374}, +{3.1399758, -0.0423625, 2.7965226}, +{3.2185967, 0.0122339, 2.7970965}, +{3.0827310, -0.0026095, 2.8621354}, +{2.5306594, 0.5720270, 2.5160491}, +{2.5384653, 0.6671901, 2.5227857}, +{2.5802088, 0.5385793, 2.5908048}, +{2.6899960, 0.3582295, 0.9507697}, +{2.7641399, 0.3175577, 0.9956119}, +{2.6363668, 0.3945415, 1.0212512}, +{0.6902657, 2.3005016, 2.2870040}, +{0.6894908, 2.3943555, 2.2682106}, +{0.6131379, 2.2663736, 2.2417393}, +{2.5247357, 0.5532851, 2.9779058}, +{2.6188681, 0.5666595, 2.9668372}, +{2.4915044, 0.6386741, 3.0055954}, +{0.1179873, 2.0958440, 1.1574721}, +{0.1355803, 2.0228438, 1.2168335}, +{0.0511194, 2.1476064, 1.2023237}, +{1.5558029, 0.2133368, 2.8050687}, +{1.6320791, 0.2615435, 2.7731256}, +{1.5888454, 0.1252776, 2.8228476}, +{2.2854686, 0.6192090, 0.9841476}, +{2.2769921, 0.5244450, 0.9736479}, +{2.2989523, 0.6520451, 0.8952528}, +{2.3667128, 0.9250924, 2.3055813}, +{2.4424987, 0.9140886, 2.2481554}, +{2.3200226, 1.0004370, 2.2694492}, +{1.9677237, 1.0523200, 1.0342212}, +{2.0233085, 1.0823415, 0.9623089}, +{1.9137887, 0.9833126, 0.9956038}, +{2.3559983, 1.4335123, 1.9380755}, +{2.3143001, 1.3761598, 1.8737774}, +{2.3997135, 1.5005588, 1.8855774}, +{0.4134667, 0.9046849, 2.3572011}, +{0.4558387, 0.9416404, 2.2797334}, +{0.4836853, 0.8977156, 2.4218779}, +{2.6924975, 2.1439743, 2.0269926}, +{2.7326546, 2.0818164, 1.9662790}, +{2.6759059, 2.2219243, 1.9739755}, +{2.6284773, 0.3836095, 2.3307583}, +{2.5941298, 0.4711865, 2.3484461}, +{2.5716243, 0.3250368, 2.3807514}, +{1.8803731, 2.3842695, 0.4355615}, +{1.8798169, 2.4318342, 0.3524976}, +{1.8605776, 2.2937701, 0.4114720}, +{2.6924810, 1.8923845, 2.3447378}, +{2.7598052, 1.9572178, 2.3653877}, +{2.6542296, 1.8697431, 2.4295111}, +{2.6249464, 1.9061662, 0.5953382}, +{2.6323190, 1.8429006, 0.5238859}, +{2.7128584, 1.9101166, 0.6329973}, +{2.6076162, 2.5701380, 3.0335496}, +{2.6677387, 2.5419466, 3.1024904}, +{2.6125462, 2.6657186, 3.0350802}, +{1.5122189, 3.1265650, 1.8181751}, +{1.4799637, 3.1000898, 1.9043202}, +{1.6075225, 3.1220202, 1.8258495}, +{1.8299207, 1.3329990, 0.2640091}, +{1.8301125, 1.4149491, 0.2145474}, +{1.7451856, 1.2931889, 0.2440728}, +{0.5316945, 1.5592256, 2.2813120}, +{0.4518418, 1.5885963, 2.3251665}, +{0.6027361, 1.5979660, 2.3324451}, +{2.9166615, 2.7822528, 0.3998055}, +{2.8848722, 2.7744152, 0.3098592}, +{2.8474503, 2.7431941, 0.4531586}, +{2.5691409, 0.4548870, 0.5015772}, +{2.6536095, 0.4764507, 0.5411038}, +{2.5312700, 0.5396491, 0.4782638}, +{2.6013222, 2.1316431, 1.6272650}, +{2.5512021, 2.1818557, 1.6915221}, +{2.6112919, 2.0451207, 1.6669741}, +{2.7762497, 2.5853784, 1.5046865}, +{2.8082089, 2.5061338, 1.5478282}, +{2.6887524, 2.5988407, 1.5410913}, +{1.7334777, 2.9228179, 2.6780596}, +{1.7071803, 2.8325360, 2.6959462}, +{1.8275672, 2.9174840, 2.6612954}, +{2.1924148, 0.8201565, 1.1411474}, +{2.1310017, 0.8714425, 1.0886067}, +{2.2162249, 0.7464081, 1.0849640}, +{1.3730979, 2.0394664, 2.5198331}, +{1.3042439, 2.0504677, 2.5854106}, +{1.4379100, 2.1064291, 2.5416892}, +{2.5736449, 2.9831073, 0.0836388}, +{2.5608346, 2.9276924, 0.0066490}, +{2.4965141, 3.0397620, 0.0854724}, +{1.4419829, 0.9275831, 0.4852401}, +{1.3516345, 0.9527029, 0.4660442}, +{1.4950252, 0.9844165, 0.4293939}, +{2.7263858, 0.0255740, 0.2659463}, +{2.6674101, -0.0366571, 0.2233850}, +{2.6833131, 0.0465600, 0.3488117}, +{2.4774864, 2.4371593, 2.8288701}, +{2.4705143, 2.4932880, 2.7516477}, +{2.5212538, 2.4916883, 2.8942406}, +{0.8026680, 1.9471198, 2.2784607}, +{0.8066015, 2.0375145, 2.3096964}, +{0.7294235, 1.9462367, 2.2168429}, +{2.5729823, 1.1345458, 2.4081481}, +{2.5286508, 1.0644181, 2.3604078}, +{2.5020039, 1.1896266, 2.4411704}, +{1.9751326, 0.5175521, 2.5637033}, +{1.9343443, 0.5366905, 2.4792502}, +{2.0661366, 0.4970486, 2.5422513}, +{0.1967940, 1.4434991, 1.6574012}, +{0.1624022, 1.3597503, 1.6884766}, +{0.1463652, 1.4622028, 1.5782216}, +{2.7913561, 2.3253985, 1.1589936}, +{2.7053022, 2.3509755, 1.1257839}, +{2.8461013, 2.4027979, 1.1457810}, +{1.6231042, 2.0624797, 2.6664689}, +{1.7179431, 2.0626185, 2.6794262}, +{1.5868346, 2.0665226, 2.7549589}, +{0.3104896, 0.1964314, 2.4028001}, +{0.4005939, 0.1641288, 2.4025290}, +{0.2613456, 0.1307365, 2.3534913}, +{0.4801207, 1.8029326, 0.3165997}, +{0.4853454, 1.8542775, 0.2359850}, +{0.4884645, 1.7120612, 0.2877019}, +{1.4978380, 2.2259724, 0.3303875}, +{1.4651126, 2.2369201, 0.4196709}, +{1.4411120, 2.2816815, 0.2770867}, +{0.8192873, 0.3351430, 1.0569626}, +{0.7311190, 0.3205921, 1.0912691}, +{0.8329266, 0.4295257, 1.0652204}, +{1.4837136, 3.1090648, 0.5654399}, +{1.4706005, 3.1891510, 0.5146800}, +{1.4706029, 3.0382953, 0.5023361}, +{0.1713183, 0.1698114, 1.0012348}, +{0.2421246, 0.1070507, 1.0157218}, +{0.1687364, 0.1815066, 0.9062670}, +{2.1886995, 0.2739622, 0.3003096}, +{2.2397885, 0.2403584, 0.3739507}, +{2.1196077, 0.2089744, 0.2874551}, +{0.0977938, 2.5101287, 0.3073728}, +{0.0273581, 2.4458516, 0.3157142}, +{0.1034575, 2.5273938, 0.2133932}, +{0.5691461, 0.6407880, 1.3655373}, +{0.6211444, 0.6348892, 1.4456853}, +{0.5336394, 0.5527176, 1.3534868}, +{2.6818466, 2.6728892, 1.8471429}, +{2.6471665, 2.7598612, 1.8670294}, +{2.7552669, 2.6619856, 1.9075823}, +{1.7084965, 0.6117907, 2.9007463}, +{1.7354469, 0.5206087, 2.8897078}, +{1.6763160, 0.6165242, 2.9907703}, +{1.5665411, 2.7092948, 0.3919005}, +{1.5883380, 2.6926634, 0.3001911}, +{1.6357704, 2.6653881, 0.4413155}, +{0.1412743, 3.0210686, 0.4142155}, +{0.1689279, 3.1115446, 0.3996656}, +{0.2154174, 2.9682965, 0.3845469}, +{1.0791244, 2.5914304, 0.8701317}, +{1.1134054, 2.5423033, 0.9447886}, +{1.0689853, 2.5259895, 0.8010160}, +{2.8018105, 0.0911528, 2.7258992}, +{2.8065507, 0.1580159, 2.6575677}, +{2.8675892, 0.0263713, 2.7006245}, +{1.9499904, 2.0575554, 1.7958398}, +{1.9517512, 2.1506608, 1.7736896}, +{1.9109522, 2.0544491, 1.8831822}, +{2.6255288, 0.8416124, 0.2570413}, +{2.6402500, 0.7578790, 0.2130604}, +{2.7131407, 0.8717937, 0.2810326}, +{0.1816655, 0.6137471, 2.6060712}, +{0.2347539, 0.6630254, 2.6686459}, +{0.1215705, 0.6785799, 2.5693612}, +{2.3025656, 2.7687774, 2.8959382}, +{2.2255301, 2.7542970, 2.8410001}, +{2.2669506, 2.7855468, 2.9831889}, +{1.0463766, 0.5807963, 1.8975348}, +{1.0510879, 0.6245729, 1.8125423}, +{1.1096504, 0.6275216, 1.9520830}, +{0.5656075, 0.5001264, 1.8929697}, +{0.5104013, 0.4459974, 1.9494022}, +{0.6279483, 0.5412912, 1.9528146}, +{2.9750881, 0.8177684, 1.3271333}, +{2.8869309, 0.8470758, 1.3040743}, +{3.0097799, 0.7802228, 1.2462066}, +{2.4705625, 2.7679639, 2.1987462}, +{2.4445944, 2.8151028, 2.1195888}, +{2.4760032, 2.6763964, 2.1713946}, +{1.3880258, 2.6865900, 3.0969064}, +{1.3163033, 2.7464504, 3.1177607}, +{1.4512186, 2.6993568, 3.1676595}, +{0.3509495, 2.8923845, 3.0801346}, +{0.3434520, 2.7996082, 3.1024659}, +{0.4399460, 2.9017243, 3.0461538}, +{0.4903889, 2.7930729, 2.0505636}, +{0.5479558, 2.8565421, 2.0932252}, +{0.4075779, 2.8397112, 2.0391827}, +{1.7699884, 2.4431291, 1.2271723}, +{1.8505506, 2.3998263, 1.1989429}, +{1.7020149, 2.4064844, 1.1706119}, +{2.9029887, 1.3710126, 3.1286442}, +{2.8246801, 1.4119716, 3.0918689}, +{2.9221394, 1.2983812, 3.0693126}, +{1.6130558, 1.4725082, 1.7352284}, +{1.5518103, 1.5419221, 1.7108767}, +{1.6065126, 1.4671561, 1.8305744}, +{3.1397207, 1.9945855, 2.3015561}, +{3.1353478, 1.9384363, 2.3789542}, +{3.0798821, 1.9537962, 2.2389631}, +{0.3949067, 2.9258466, 0.6705651}, +{0.4709734, 2.9140766, 0.7274653}, +{0.4127097, 3.0071521, 0.6232918}, +{3.0299635, 1.2020303, 1.1165897}, +{3.1127799, 1.1939232, 1.1638975}, +{3.0056479, 1.1119417, 1.0952561}, +{2.0978274, 2.7156467, 0.3127277}, +{2.1271322, 2.6584606, 0.3836735}, +{2.1040201, 2.8039861, 0.3490612}, +{2.1807039, 2.3496640, 0.0716857}, +{2.1377301, 2.3515029, -0.0138256}, +{2.2676618, 2.3137658, 0.0540234}, +{1.7215401, 1.4077606, 2.7046404}, +{1.6620761, 1.3894458, 2.7773793}, +{1.8029150, 1.3633423, 2.7284620}, +{1.7330210, 1.1147840, 1.5747122}, +{1.8217411, 1.1369550, 1.5464362}, +{1.6968881, 1.0636398, 1.5023174}, +{2.6346588, 0.3984129, 1.6939337}, +{2.6315162, 0.3995763, 1.7895950}, +{2.7146292, 0.4462310, 1.6720135}, +{1.5191864, 0.2961522, 0.6581619}, +{1.5537578, 0.3702723, 0.7078948}, +{1.4680111, 0.3362350, 0.5878997}, +{0.2004574, 3.0660729, 2.5926342}, +{0.2477710, 3.0287805, 2.6670184}, +{0.1896886, 3.1585159, 2.6150091}, +{0.1795199, -0.0038878, 0.0987707}, +{0.2450917, -0.0282750, 0.1641000}, +{0.2305372, 0.0288638, 0.0246971}, +{1.3248554, 0.8683960, 1.7367622}, +{1.3846464, 0.9389083, 1.7615688}, +{1.3728558, 0.8184092, 1.6707349}, +{1.7504369, 0.1422913, 0.6147918}, +{1.7431371, 0.1821367, 0.7015177}, +{1.6714638, 0.0888817, 0.6062480}, +{2.7387052, 0.3553921, 3.1785345}, +{2.7845435, 0.2997507, 3.1155646}, +{2.6482046, 0.3242791, 3.1765554}, +{2.6148498, 0.7964693, 1.4880434}, +{2.5736783, 0.7127299, 1.4667144}, +{2.6450012, 0.8304797, 1.4038026}, +{2.3495355, 1.1754516, 1.3497258}, +{2.3607902, 1.0921180, 1.3039966}, +{2.3553238, 1.2415850, 1.2807680}, +{0.4353878, 0.3820456, 1.5257384}, +{0.3938323, 0.3502594, 1.6058950}, +{0.4056132, 0.4726551, 1.5176320}, +{0.9295611, 0.8956001, 0.2000573}, +{0.8350658, 0.8902312, 0.2143448}, +{0.9386707, 0.9129547, 0.1063655}, +{1.4049870, 0.7978808, 2.0359037}, +{1.4295891, 0.7698684, 1.9477428}, +{1.3092798, 0.7990299, 2.0348353}, +{2.5306070, 0.5991201, 1.1398703}, +{2.4381361, 0.5974384, 1.1151997}, +{2.5466666, 0.5130143, 1.1784733}, +{0.9687269, 2.7747042, 1.8995974}, +{0.9627817, 2.8394580, 1.9698393}, +{0.9071020, 2.8056521, 1.8332127}, +{1.3227631, 1.2302064, 2.2660830}, +{1.4163550, 1.2308165, 2.2460206}, +{1.2881211, 1.1560227, 2.2164946}, +{1.7512839, 0.2250929, 2.1313398}, +{1.8272624, 0.2777204, 2.1562383}, +{1.7039401, 0.2110837, 2.2133439}, +{1.0839202, 1.1653127, 0.6037248}, +{1.0919524, 1.2424824, 0.5476655}, +{1.1531528, 1.1758065, 0.6689861}, +{2.3581777, 0.0260032, 0.1423269}, +{2.2657423, 0.0306057, 0.1178970}, +{2.3573680, -0.0010692, 0.2341351}, +{1.8426915, 1.6059464, 1.4092997}, +{1.7590424, 1.5708569, 1.4398591}, +{1.8606557, 1.5580159, 1.3284154}, +{0.8064958, 0.5554397, 1.2307745}, +{0.7289842, 0.5052969, 1.2560725}, +{0.8047711, 0.6324768, 1.2875603}, +{1.2599907, 0.5939665, 3.0980814}, +{1.2691231, 0.5925769, 3.1933546}, +{1.2851076, 0.6828355, 3.0729065}, +{0.4800295, 1.5222170, 1.6447350}, +{0.3873410, 1.5014110, 1.6564944}, +{0.5252059, 1.4389705, 1.6585704}, +{2.4475930, 2.3083363, 1.2044363}, +{2.4966061, 2.3420968, 1.1294681}, +{2.4725156, 2.2160714, 1.2097616}, +{2.6589081, 2.1279862, 0.1576333}, +{2.6110067, 2.0990782, 0.2353000}, +{2.7446806, 2.1544590, 0.1908686}, +{1.0363584, 2.8064733, 1.5268457}, +{1.0586085, 2.8891451, 1.5696547}, +{1.1099524, 2.7893653, 1.4680787}, +{0.5510727, 2.3512003, 2.8521211}, +{0.6332073, 2.3547084, 2.8030913}, +{0.4830378, 2.3497522, 2.7848048}, +{0.4952797, 1.2100240, 2.0142486}, +{0.5275091, 1.2906578, 2.0545201}, +{0.5217193, 1.1407759, 2.0748122}, +{2.5178335, 0.1176064, 2.9165335}, +{2.5412207, 0.1753540, 2.8438659}, +{2.5792062, 0.0444683, 2.9097133}, +{0.8187293, 1.9986755, 1.4016023}, +{0.7710190, 2.0610754, 1.3469005}, +{0.7589167, 1.9245538, 1.4111280}, +{1.4728122, 1.3859321, 2.8991032}, +{1.4587699, 1.3140646, 2.9607489}, +{1.3986496, 1.3806151, 2.8388209}, +{1.3014560, 0.8436833, 3.0745077}, +{1.3074479, 0.9006813, 2.9978418}, +{1.3503966, 0.8898742, 3.1425777}, +{1.9087021, 2.6298242, 2.1058505}, +{1.9201282, 2.6603231, 2.0158417}, +{1.8563963, 2.5500786, 2.0976601}, +{0.9054506, 2.4282083, 2.6327283}, +{0.8863584, 2.4634962, 2.7196338}, +{0.9664054, 2.4911458, 2.5941834}, +{1.2586957, 2.0744982, 0.5610318}, +{1.3342080, 2.0275252, 0.5256233}, +{1.2827300, 2.1669164, 0.5544323}, +{1.2518879, 0.5671206, 0.2365493}, +{1.3274175, 0.6047231, 0.2817560}, +{1.2761087, 0.4757713, 0.2213517}, +{3.0219123, 2.7466364, 2.2767417}, +{3.0711491, 2.8272052, 2.2924499}, +{2.9777675, 2.7289622, 2.3598151}, +{0.8582447, 3.1670966, 1.1694672}, +{0.8875280, 3.2143433, 1.0915407}, +{0.9240960, 3.1873560, 1.2359163}, +{0.0038469, 0.7847276, 0.6169617}, +{0.0779865, 0.7733558, 0.5574947}, +{0.0044736, 0.7059679, 0.6713568}, +{3.1170006, 0.8190389, 2.5153515}, +{3.0575826, 0.8864714, 2.5482860}, +{3.2031174, 0.8608262, 2.5155480}, +{1.9652737, 1.4425920, 2.9377396}, +{2.0151646, 1.4219960, 3.0167904}, +{1.9103730, 1.5169072, 2.9627492}, +{1.3188924, 0.4760696, 2.1924744}, +{1.3996352, 0.4896055, 2.1428790}, +{1.3237176, 0.5396119, 2.2638986}, +{1.4347501, 0.6146016, 1.8483202}, +{1.5193791, 0.6154105, 1.8036034}, +{1.3708142, 0.6304707, 1.7788747}, +{0.4456893, 3.1379304, 1.4651777}, +{0.5092069, 3.1217446, 1.3954221}, +{0.4419083, 3.0555208, 1.5137231}, +{2.1169109, 0.7536042, 2.7579327}, +{2.0910583, 0.6635768, 2.7382090}, +{2.0341971, 0.8012184, 2.7652543}, +{1.5652953, 1.6619564, 2.2565403}, +{1.5854269, 1.5880219, 2.3139048}, +{1.6419784, 1.7188772, 2.2630260}, +{0.1761453, 0.2433042, 0.7191616}, +{0.2574431, 0.2011135, 0.6913600}, +{0.1585464, 0.3084597, 0.6512841}, +{0.9435512, 1.5972958, 1.0838647}, +{0.8891071, 1.5937151, 1.0052179}, +{0.8847567, 1.6293589, 1.1522567}, +{0.3819503, 0.6129280, 2.3973424}, +{0.3762604, 0.6921765, 2.3439605}, +{0.3157636, 0.6250986, 2.4654124}, +{2.6811609, 2.4277942, 0.4119397}, +{2.7416344, 2.4658539, 0.3482472}, +{2.6527293, 2.5020096, 0.4652877}, +{0.4030445, 1.3460102, 3.0967066}, +{0.4591890, 1.3985289, 3.0396812}, +{0.4576855, 1.3266494, 3.1728764}, +{1.3702827, 2.0878034, 1.6741318}, +{1.3038356, 2.0485530, 1.7307579}, +{1.3277836, 2.0948401, 1.5886529}, +{2.3918698, 2.0607550, 3.0298843}, +{2.4516749, 1.9956182, 3.0665295}, +{2.3921282, 2.1320937, 3.0937049}, +{1.3311570, 1.1889328, 1.5413749}, +{1.3171700, 1.2666187, 1.5955188}, +{1.3851117, 1.1313642, 1.5955697}, +{1.3754525, 3.0503197, 2.4060762}, +{1.4039202, 2.9625347, 2.3806653}, +{1.4280932, 3.0711653, 2.4832561}, +{1.9567870, 1.4318113, 0.6819604}, +{1.8700578, 1.4693604, 0.6971409}, +{2.0112586, 1.4683965, 0.7516503}, +{2.9423621, 1.3357537, 2.5515339}, +{2.9779451, 1.2560376, 2.5122719}, +{2.9733512, 1.4063106, 2.4947562}, +{2.4080093, 2.0804567, 1.4177169}, +{2.3948739, 2.0749922, 1.5123738}, +{2.5001240, 2.1044598, 1.4076649}, +{2.3567281, 3.0459533, 0.3781683}, +{2.4243994, 3.0325921, 0.4445338}, +{2.2803476, 2.9993062, 0.4121153}, +{2.3118653, 2.9657631, 2.6277521}, +{2.3387802, 2.8857317, 2.6728396}, +{2.3793721, 3.0297866, 2.6502492}, +{0.0577515, 0.5731999, 0.7641753}, +{0.0976642, 0.5208078, 0.6947177}, +{0.1247690, 0.5775940, 0.8323784}, +{1.8601680, 0.4999086, 1.4532056}, +{1.9040521, 0.5073493, 1.5379472}, +{1.9315184, 0.4968365, 1.3894718}, +{1.5070741, 0.8040556, 0.1836065}, +{1.4712406, 0.8918966, 0.1963444}, +{1.5374415, 0.7777457, 0.2704853}, +{1.7712666, 0.1931646, 0.8888435}, +{1.7156495, 0.2065247, 0.9655935}, +{1.8165898, 0.2766773, 0.8772786}, +{2.0003176, 1.8135760, 1.5097251}, +{2.0644631, 1.7550149, 1.5499529}, +{1.9522568, 1.7579616, 1.4484100}, +{3.0066166, 1.9350818, 1.7294935}, +{3.0548406, 1.9888599, 1.6666868}, +{3.0745792, 1.8895013, 1.7791506}, +{1.9339449, 3.0864971, 2.2927847}, +{2.0113969, 3.1336472, 2.3234501}, +{1.8930785, 3.1459305, 2.2298567}, +{0.5246730, 1.1523991, 1.2730669}, +{0.5607160, 1.0816915, 1.2195537}, +{0.4345460, 1.1621406, 1.2423333}, +{1.4752135, 2.9869986, 0.1199273}, +{1.5301914, 3.0653548, 0.1201423}, +{1.4334352, 2.9868169, 0.2060485}, +{0.4807925, 2.8096166, 2.3832920}, +{0.5242536, 2.7251828, 2.3712761}, +{0.4791700, 2.8224371, 2.4781356}, +{2.7278583, 0.1479281, 1.9331664}, +{2.7807584, 0.1422473, 2.0127380}, +{2.7512717, 0.0697106, 1.8832049}, +{1.9597518, 2.5236468, 0.1941712}, +{2.0087907, 2.5931265, 0.2381040}, +{2.0269435, 2.4689927, 0.1534216}, +{3.0577097, 0.0104346, 2.3951399}, +{3.0696013, -0.0568313, 2.4621937}, +{3.1235120, -0.0100642, 2.3287158}, +{0.0503257, 2.6132927, 0.0179723}, +{0.1175449, 2.6292272, -0.0482846}, +{0.0542255, 2.6900740, 0.0749962}, +{2.1274817, 1.2711593, 1.1985012}, +{2.2122004, 1.2968286, 1.1620851}, +{2.0910788, 1.2105064, 1.1340158}, +{1.8364943, 1.3688014, 2.0995231}, +{1.9092083, 1.4086003, 2.0516584}, +{1.8777823, 1.3258936, 2.1744668}, +{0.0739148, 2.3967023, 2.1931899}, +{-0.0174703, 2.3725951, 2.1780264}, +{0.0795781, 2.4108989, 2.2876818}, +{2.2549210, 0.3471862, 2.1506524}, +{2.3138540, 0.4170884, 2.1223166}, +{2.3026340, 0.2664289, 2.1315727}, +{2.3484154, 3.0481751, 0.9806470}, +{2.3261731, 3.0955923, 1.0607670}, +{2.3965256, 2.9711757, 1.0109587}, +{2.2179503, 0.7006577, 0.1023799}, +{2.2622323, 0.6163726, 0.1122502}, +{2.1391966, 0.6805616, 0.0518196}, +{0.7009133, 0.5118978, 1.5750181}, +{0.6857030, 0.5407835, 1.6649991}, +{0.6412537, 0.4379861, 1.5631816}, +{1.0599874, 1.0254687, 1.8140311}, +{1.1344073, 0.9654043, 1.8099986}, +{1.0232608, 1.0240673, 1.7256483}, +{2.7995517, 1.6421175, 2.2849586}, +{2.7594092, 1.7279366, 2.2713220}, +{2.8072653, 1.6341182, 2.3800316}, +{1.1964225, 1.2442608, 3.0020304}, +{1.1488432, 1.2846853, 3.0745864}, +{1.1391861, 1.2562066, 2.9262438}, +{1.2582548, 1.3975308, 2.7385454}, +{1.2849500, 1.3442296, 2.6636546}, +{1.1628805, 1.3897024, 2.7407332}, +{1.3727419, 2.3292923, 0.6072516}, +{1.3637116, 2.4215243, 0.5832930}, +{1.4349844, 2.3294196, 0.6799715}, +{0.4720281, 1.4438807, 2.6037078}, +{0.4348327, 1.5000658, 2.5357220}, +{0.4271033, 1.3600718, 2.5927465}, +{2.7598340, 1.0835303, 2.2218809}, +{2.7208519, 1.1385658, 2.2898059}, +{2.6850328, 1.0492729, 2.1729572}, +{3.1069696, 2.1410177, 1.5432065}, +{3.1697423, 2.1978660, 1.5878179}, +{3.0695818, 2.1960058, 1.4743533}, +{0.0976564, 0.2636926, 1.4859658}, +{0.1858591, 0.2388001, 1.4583439}, +{0.0396137, 0.2100778, 1.4319397}, +{2.4487021, 0.8086901, 3.0926871}, +{2.4476974, 0.7773923, 3.1831403}, +{2.3590052, 0.8378996, 3.0764518}, +{0.5438285, 0.5230525, 0.9622471}, +{0.5553451, 0.5409409, 1.0555729}, +{0.5467362, 0.4276066, 0.9556175}, +{0.0781672, 0.6923328, 0.1082874}, +{0.0821160, 0.7836114, 0.1368345}, +{0.0292727, 0.6477082, 0.1774271}, +{0.2624735, 1.1551951, 1.1807169}, +{0.2004147, 1.0899185, 1.2131202}, +{0.2521836, 1.1528730, 1.0855799}, +{1.6744248, 1.8008915, 1.1667128}, +{1.6285946, 1.8511794, 1.2340407}, +{1.6339184, 1.7142205, 1.1698241}, +{2.6040447, 1.4496174, 0.8913774}, +{2.6449902, 1.4965341, 0.8186822}, +{2.6560528, 1.3698009, 0.9006956}, +{0.2601544, 0.4503772, 2.0475431}, +{0.2023901, 0.4335500, 1.9730953}, +{0.2137979, 0.5160950, 2.0994520}, +{2.6007965, 0.8975061, 2.8955967}, +{2.6848202, 0.9324279, 2.9253087}, +{2.5612082, 0.8601260, 2.9743230}, +{1.3620640, 2.2744751, 2.7047627}, +{1.3148892, 2.1926513, 2.7203107}, +{1.3390578, 2.3299248, 2.7793171}, +{2.6262171, 2.0707726, 1.1897259}, +{2.7108147, 2.0366647, 1.2187467}, +{2.5695157, 1.9937692, 1.1855137}, +{1.4359728, 2.6843631, 1.8278337}, +{1.5264907, 2.6716165, 1.7994372}, +{1.4008222, 2.7495949, 1.7672400}, +{2.9826963, 2.1665154, 1.9968896}, +{2.9739537, 2.0764747, 2.0281711}, +{3.0637021, 2.1663959, 1.9458959}, +{1.2973957, 2.7848566, 1.3854614}, +{1.3706677, 2.7834625, 1.4470373}, +{1.3384026, 2.7959476, 1.2996842}, +{0.7103327, 0.2266322, 2.0201559}, +{0.6624266, 0.1512562, 1.9857209}, +{0.6460723, 0.2735989, 2.0733259}, +{2.3740916, 0.2641172, 1.7183168}, +{2.4665785, 0.2874096, 1.7264402}, +{2.3553259, 0.2727974, 1.6248565}, +{0.6539319, 1.1159453, 3.0130606}, +{0.6151905, 1.1306308, 2.9267716}, +{0.7419660, 1.1529309, 3.0063992}, +{0.2868564, 2.8157725, 0.3000911}, +{0.2439032, 2.7639899, 0.3681786}, +{0.3318088, 2.7511518, 0.2456321}, +{0.4422254, 1.0178227, 0.8603603}, +{0.4619318, 1.1114790, 0.8619307}, +{0.5276843, 0.9755004, 0.8521207}, +{2.3265414, 0.3939086, 0.8564739}, +{2.2616093, 0.3673321, 0.7913599}, +{2.3417661, 0.3151219, 0.9086580}, +{0.6676589, 0.1705779, 2.3975029}, +{0.6756334, 0.2589285, 2.4334600}, +{0.7521413, 0.1295132, 2.4159074}, +{2.5975468, 1.3132386, 1.6276039}, +{2.6059191, 1.3249506, 1.7222350}, +{2.5306058, 1.2455432, 1.6176777}, +{1.1880066, 2.2661233, 0.3135817}, +{1.0981436, 2.2987962, 0.3179903}, +{1.1792206, 2.1709912, 0.3194985}, +{2.5755207, 1.8249500, 0.1387399}, +{2.5933015, 1.7689778, 0.0631538}, +{2.6594393, 1.8668801, 0.1577623}, +{2.4734707, 1.4066199, 0.5109627}, +{2.4204309, 1.4825447, 0.4867853}, +{2.4225731, 1.3313121, 0.4809547}, +{1.8371361, 0.8486981, 2.8048358}, +{1.7684393, 0.9136233, 2.8199282}, +{1.7997704, 0.7664775, 2.8365517}, +{1.1105298, 1.4330255, 1.3863200}, +{1.0649740, 1.3588778, 1.4261836}, +{1.1162125, 1.4980797, 1.4563055}, +{0.3099379, 1.6383111, 2.4074712}, +{0.2802282, 1.7226297, 2.4416771}, +{0.2618147, 1.6274409, 2.3254449}, +{0.9264202, 0.3238065, 1.6520529}, +{0.8655177, 0.3955691, 1.6346366}, +{0.9294491, 0.3176000, 1.7475234}, +{1.0116186, 0.7359772, 0.4288653}, +{0.9709528, 0.7825761, 0.5019210}, +{0.9714028, 0.7740688, 0.3508009}, +{1.3361373, 1.2554296, 2.5386562}, +{1.3058383, 1.2246275, 2.4532423}, +{1.4316098, 1.2549831, 2.5317912}, +{2.2425704, 0.7408230, 1.4632007}, +{2.3160536, 0.7044901, 1.4137796}, +{2.1860182, 0.7800411, 1.3966717}, +{3.0553842, 0.2649164, 2.8699794}, +{3.1485467, 0.2807303, 2.8852439}, +{3.0406914, 0.2935229, 2.7798235}, +{2.1372261, 1.3440614, 0.2905213}, +{2.0962160, 1.4247363, 0.3216988}, +{2.0655325, 1.2807698, 0.2864563}, +{2.3307381, 0.1866001, 2.5753818}, +{2.2855699, 0.2709188, 2.5718441}, +{2.4017496, 0.2000829, 2.6381342}, +{1.0833068, 2.8470178, 0.7615794}, +{1.0690833, 2.7606366, 0.8002871}, +{1.0864471, 2.9065862, 0.8364397}, +{0.3623251, 3.0435689, 2.2972844}, +{0.2785820, 3.0354805, 2.3429353}, +{0.4105097, 2.9644671, 2.3214397}, +{0.8857377, 2.4947703, 0.2944232}, +{0.8894923, 2.4367588, 0.3704684}, +{0.8452512, 2.4417186, 0.2258034}, +{1.9779747, 1.8063639, 3.1499050}, +{2.0411582, 1.8456892, 3.0897078}, +{1.9862815, 1.8577158, 3.2302561}, +{1.1908220, 2.9183037, 3.1372163}, +{1.2753683, 2.9535663, 3.1649795}, +{1.1789423, 2.9517586, 3.0483234}, +{0.4952239, 1.0498067, 1.5249703}, +{0.4568027, 1.1238357, 1.5719367}, +{0.5144137, 1.0841572, 1.4377114}, +{2.2359345, 1.0170424, 2.0071890}, +{2.3280659, 1.0340203, 2.0268326}, +{2.2155819, 1.0762365, 1.9347725}, +{1.3782040, 0.0759693, 0.8097746}, +{1.4345443, 0.1532422, 0.8056536}, +{1.4126267, 0.0175972, 0.7421722}, +{1.2422931, 1.5133779, 1.9214456}, +{1.1505818, 1.5370141, 1.9075642}, +{1.2565678, 1.5267962, 2.0151393}, +{1.8389672, 0.8415399, 0.9280325}, +{1.8681381, 0.8907551, 0.8512911}, +{1.7454374, 0.8607788, 0.9346927}, +{0.8927226, 1.7675180, 1.6565161}, +{0.8976919, 1.8571439, 1.6897550}, +{0.7989829, 1.7485004, 1.6528364}, +{2.2228556, 0.8379528, 1.7164080}, +{2.1699178, 0.9167445, 1.7040881}, +{2.2229228, 0.7954876, 1.6306233}, +{0.2698026, 1.2140538, 2.1767108}, +{0.2529713, 1.1207079, 2.1895788}, +{0.3419849, 1.2169420, 2.1139121}, +{2.7391052, 1.9126713, 1.7649392}, +{2.8299744, 1.9422660, 1.7595310}, +{2.7266493, 1.8591301, 1.6865778}, +{2.3747113, 2.7061195, 1.5247794}, +{2.4392781, 2.7766004, 1.5196891}, +{2.3925593, 2.6517019, 1.4480821}, +{0.3006252, 1.6412710, 0.8356324}, +{0.3723614, 1.5839050, 0.8625652}, +{0.2214249, 1.5905367, 0.8533990}, +{1.7957482, 2.5739479, 2.9876835}, +{1.8338466, 2.5923607, 3.0735426}, +{1.7145841, 2.5270491, 3.0070541}, +{1.4368535, 0.3352306, 1.9036559}, +{1.3937789, 0.4206726, 1.9010942}, +{1.5006974, 0.3427109, 1.9745807}, +{1.7035219, 0.7274143, 1.4574734}, +{1.7704358, 0.7906924, 1.4313828}, +{1.7510592, 0.6448955, 1.4671272}, +{0.5750977, 1.0059313, 0.0932132}, +{0.5710027, 0.9150814, 0.0633492}, +{0.5800413, 1.0574189, 0.0126719}, +{0.5564135, 0.2605693, 0.3781363}, +{0.4826293, 0.3137148, 0.3482405}, +{0.6268649, 0.3236294, 0.3930473}, +{0.8879394, 0.3189079, 0.5408441}, +{0.8022988, 0.3447097, 0.5749363}, +{0.8918928, 0.3583165, 0.4537025}, +{0.6368139, 1.4299282, 1.3409469}, +{0.6185046, 1.3408658, 1.3110306}, +{0.5596210, 1.4543949, 1.3919855}, +{2.6125345, 0.5573406, 0.1715766}, +{2.5268982, 0.5257256, 0.1427805}, +{2.6753173, 0.5010124, 0.1263246}, +{2.3316493, 1.3659341, 0.8266759}, +{2.4169753, 1.3907931, 0.8622266}, +{2.3076239, 1.4385241, 0.7690930}, +{0.0964187, 0.5227888, 1.3446517}, +{0.0710482, 0.4827441, 1.2614948}, +{0.0902909, 0.4516167, 1.4083643}, +{0.0829173, 0.4389164, 1.8617699}, +{0.0188174, 0.3683772, 1.8529531}, +{0.0361945, 0.5080044, 1.9087396}, +{2.0621390, 1.9826493, 0.1898954}, +{2.0276511, 2.0133421, 0.2737456}, +{2.1536107, 2.0108488, 0.1898540}, +{3.1369369, 1.9597030, 0.3665094}, +{3.2322447, 1.9516017, 0.3701272}, +{3.1104913, 1.9722722, 0.4576409}, +{1.5008806, 1.7127411, 1.6635536}, +{1.4334896, 1.6991546, 1.5969490}, +{1.4593754, 1.7696612, 1.7283590}, +{1.1440319, 1.3541757, 0.4041499}, +{1.1229982, 1.4433519, 0.3764460}, +{1.2378782, 1.3454177, 0.3874619}, +{1.7399809, 1.9273679, 0.9332316}, +{1.6646295, 1.9334503, 0.8745163}, +{1.7038747, 1.8933383, 1.0150890}, +{2.2254562, 2.2585287, 1.6134764}, +{2.2474477, 2.2960548, 1.5282092}, +{2.3049419, 2.2694616, 1.6656758}, +{1.1171644, 2.3445690, 0.0248279}, +{1.1218464, 2.4401436, 0.0224015}, +{1.1611505, 2.3204968, 0.1063637}, +{1.0162044, 2.3311110, 0.6762432}, +{0.9330834, 2.3219445, 0.7228178}, +{0.9997697, 2.2926910, 0.5901263}, +{0.4555077, 1.8146687, 2.6084244}, +{0.4706315, 1.7307880, 2.6519861}, +{0.3608442, 1.8277624, 2.6138740}, +{2.7968543, 1.3698206, 2.1103325}, +{2.8219607, 1.2975224, 2.1678214}, +{2.8092198, 1.4482900, 2.1637363}, +{2.0857346, 2.7811117, 1.5528104}, +{2.0467968, 2.6951411, 1.5687845}, +{2.0314517, 2.8417313, 1.6032183}, +{2.2890308, 1.2212012, 2.5729568}, +{2.3274086, 1.2643889, 2.6492739}, +{2.2632935, 1.1346865, 2.6048174}, +{1.0787848, 3.0672052, 1.6855893}, +{1.0602504, 3.1045113, 1.7717696}, +{1.0153041, 3.1088605, 1.6273025}, +{0.0535477, 0.4156323, 1.0987432}, +{0.0748139, 0.3227319, 1.0898223}, +{0.1044763, 0.4585694, 1.0300046}, +{2.8151472, 1.6627674, 2.5566719}, +{2.7366560, 1.6217108, 2.5929456}, +{2.7955837, 1.7564654, 2.5571885}, +{1.6388582, 1.0072900, 0.9860554}, +{1.5651438, 1.0174197, 1.0462708}, +{1.6428514, 1.0904793, 0.9388758}, +{1.7404536, 1.8222985, 1.6672299}, +{1.6546537, 1.7806705, 1.6589956}, +{1.8021894, 1.7492751, 1.6715417}, +{1.2139546, 2.0177982, 2.2813234}, +{1.1976271, 2.1117938, 2.2735426}, +{1.2865386, 2.0111518, 2.3433695}, +{3.1049421, 0.5888794, 2.3621013}, +{3.0881836, 0.6780815, 2.3925061}, +{3.1371839, 0.5428284, 2.4395745}, +{2.6799493, 2.9230719, 2.7866848}, +{2.7730765, 2.9370987, 2.7695713}, +{2.6364253, 2.9971824, 2.7445466}, +{0.3641657, 2.3802168, 1.0677546}, +{0.4211076, 2.4445310, 1.0255213}, +{0.4105327, 2.3561969, 1.1479759}, +{0.7618315, 1.5794432, 0.9042917}, +{0.6704191, 1.5690969, 0.9307314}, +{0.7707439, 1.5240682, 0.8267256}, +{0.6359447, 1.1848352, 2.4018316}, +{0.6313067, 1.2017098, 2.3077249}, +{0.6463569, 1.2714553, 2.4412124}, +{1.2351048, 2.0271101, 2.7447839}, +{1.1568714, 2.0312133, 2.7997842}, +{1.2846923, 1.9528102, 2.7791774}, +{1.2456524, 0.3256645, 0.4525646}, +{1.1809156, 0.3748535, 0.5030811}, +{1.2992094, 0.3928582, 0.4103865}, +{0.7556862, 2.4661913, 1.6265892}, +{0.7395440, 2.5605266, 1.6249799}, +{0.8466276, 2.4579396, 1.6552926}, +{0.8260964, 2.3254483, 0.0911579}, +{0.7558832, 2.2626174, 0.0742848}, +{0.9023297, 2.2887738, 0.0463718}, +{1.6331737, 1.1024398, 2.7435186}, +{1.6455392, 1.1294059, 2.6525118}, +{1.7105902, 1.1355556, 2.7890415}, +{0.9677421, 1.6113858, 2.5636478}, +{0.9663517, 1.7024894, 2.5343132}, +{1.0395074, 1.5714781, 2.5144599}, +{2.5660224, 3.0803170, 2.6024702}, +{2.5950162, 3.1606805, 2.5593033}, +{2.5933573, 3.0101724, 2.5433528}, +{0.8869738, 1.1518859, 0.8700740}, +{0.9517918, 1.0839946, 0.8513190}, +{0.9115184, 1.1852493, 0.9563685}, +{3.0257902, 2.2964959, 2.3496864}, +{3.0502350, 2.2041738, 2.3432519}, +{2.9420462, 2.2959244, 2.3960426}, +{1.2517210, 2.1214638, 1.4384080}, +{1.1679274, 2.0988321, 1.4787658}, +{1.2526510, 2.0725784, 1.3561178}, +{0.4305718, 3.1419902, 1.0083237}, +{0.3873617, 3.0568168, 1.0019433}, +{0.4812676, 3.1371171, 1.0893699}, +{1.3644257, 3.0883822, 2.1330495}, +{1.3914908, 3.1004667, 2.2240648}, +{1.3120431, 3.1659822, 2.1131339}, +{1.4146036, 2.1177473, 0.0039168}, +{1.3980973, 2.0818999, 0.0911224}, +{1.3498402, 2.1875386, -0.0059423}, +{0.7094560, 0.8785826, 1.5792762}, +{0.6292105, 0.9302812, 1.5863635}, +{0.7025702, 0.8139197, 1.6495159}, +{0.6496355, 0.9312085, 2.5145013}, +{0.6513420, 1.0163022, 2.4707010}, +{0.7254618, 0.8846105, 2.4792688}, +{3.0273600, 1.8817427, 2.8184712}, +{3.1139193, 1.9062132, 2.8511972}, +{2.9824645, 1.9651657, 2.8047850}, +{2.6148128, 1.6985336, 1.0512211}, +{2.6165502, 1.6157194, 1.0032514}, +{2.7035181, 1.7079744, 1.0859280}, +{1.7024044, 2.7548120, 1.7533125}, +{1.7879469, 2.7141705, 1.7394183}, +{1.7223430, 2.8396683, 1.7928622}, +{3.0269184, 2.4696856, 2.5985360}, +{2.9889321, 2.5568366, 2.5873976}, +{2.9718726, 2.4125433, 2.5449912}, +{0.4982267, 0.3756398, 2.1689804}, +{0.4044140, 0.3926267, 2.1775212}, +{0.5392890, 0.4366362, 2.2302637}, +{0.5869789, 0.3682275, 2.8731203}, +{0.5101604, 0.3934593, 2.8218896}, +{0.5657214, 0.2812235, 2.9068952}, +{0.2635264, 2.6120842, 3.0212820}, +{0.2189270, 2.5792561, 2.9432080}, +{0.3559363, 2.6152456, 2.9965284}, +{0.7083868, 0.7354725, 0.9857749}, +{0.7022269, 0.7913483, 0.9083006}, +{0.6678842, 0.6529561, 0.9590748}, +{2.2197351, 0.9254321, 2.9582534}, +{2.2167702, 0.8876944, 2.8703363}, +{2.2101679, 1.0196329, 2.9442179}, +{3.1491475, 0.6527516, 0.3592111}, +{3.0721505, 0.6566145, 0.4159459}, +{3.1543481, 0.5610986, 0.3321004}, +{3.0621328, 2.0667563, 0.6148865}, +{3.0438485, 2.1602972, 0.6237245}, +{3.1508319, 2.0563309, 0.6493258}, +{1.6317766, 0.6407083, -0.0126553}, +{1.6419039, 0.5632601, 0.0426759}, +{1.5978800, 0.7080299, 0.0463460}, +{1.0009934, 0.3013750, 0.0922772}, +{1.0016964, 0.2214704, 0.1449751}, +{0.9929279, 0.3721582, 0.1562069}, +{0.5605082, 2.7414403, 1.7774074}, +{0.5253539, 2.6554658, 1.8005347}, +{0.6414300, 2.7486346, 1.8280258}, +{0.6947666, 0.2842861, 1.3978655}, +{0.6694402, 0.2302165, 1.4726812}, +{0.7901115, 0.2902881, 1.4038358}, +{0.6101878, 0.9154677, 1.1724261}, +{0.6143345, 0.8522128, 1.1007048}, +{0.6894419, 0.8989867, 1.2235092}, +{2.9753797, 1.0134596, 2.6172900}, +{2.8986087, 1.0690041, 2.6308303}, +{3.0465896, 1.0598793, 2.6612978}, +{2.2822680, 3.1030238, 1.2549940}, +{2.3274419, 3.1165273, 1.3382964}, +{2.2011447, 3.0581105, 1.2787452}, +{1.7701722, 1.8111771, 1.9753196}, +{1.7733066, 1.8262787, 1.8808504}, +{1.7566202, 1.7168249, 1.9840554}, +{2.5437789, 0.3618323, 1.2548538}, +{2.4593298, 0.3213837, 1.2349905}, +{2.5805809, 0.3074680, 1.3245134}, +{0.4782381, 1.9667033, 2.8840842}, +{0.5435075, 2.0284605, 2.8510950}, +{0.4291491, 1.9399562, 2.8063850}, +{0.9045134, 0.9518442, 0.5894940}, +{0.9540883, 1.0329684, 0.6006073}, +{0.8311698, 0.9761444, 0.5329913}, +{2.3662844, 1.3024414, 1.0765351}, +{2.4259174, 1.2434769, 1.0303897}, +{2.3390732, 1.3657765, 1.0101234}, +{0.6106168, 0.7484567, 3.1370072}, +{0.6820384, 0.6880419, 3.1572881}, +{0.5833516, 0.7244438, 3.0484502}, +{1.3046842, 1.0524570, 0.1149894}, +{1.2792888, 1.0308271, 0.2047086}, +{1.2305200, 1.1021237, 0.0804176}, +{1.6493477, 1.2685547, 0.9073321}, +{1.5963700, 1.3482119, 0.9041045}, +{1.6724747, 1.2514557, 0.8160354}, +{3.1584666, 2.7831345, 0.5297047}, +{3.1878276, 2.8540163, 0.4724683}, +{3.0670056, 2.7689581, 0.5052860}, +{0.0373426, 2.1799271, 1.8313292}, +{0.1262948, 2.2127793, 1.8182691}, +{0.0462098, 2.0846880, 1.8276973}, +{0.9614489, 0.4020632, 2.7232616}, +{1.0090766, 0.3706807, 2.8001320}, +{1.0299172, 0.4280324, 2.6616173}, +{3.0225883, 1.9557900, 3.1486316}, +{3.0347302, 2.0360739, 3.0979423}, +{2.9382289, 1.9675652, 3.1923029}, +{2.8241189, 0.2119172, 2.9815228}, +{2.7983382, 0.1453756, 2.9177270}, +{2.9085684, 0.2439946, 2.9498742}, +{0.6039022, 0.0043588, 0.2745881}, +{0.5724478, 0.0816901, 0.3214156}, +{0.5286028, -0.0247847, 0.2231781}, +{1.2187631, 0.1436504, 1.4614822}, +{1.2740831, 0.1819976, 1.5295373}, +{1.1568975, 0.2131247, 1.4389366}, +{1.0051129, 1.2612547, 1.5662069}, +{1.0915146, 1.2880193, 1.5975234}, +{1.0010662, 1.1673676, 1.5844046}, +{0.2042321, 1.5368656, 0.0582412}, +{0.1303654, 1.4786365, 0.0760013}, +{0.2607277, 1.4866562, -0.0004919}, +{2.4575563, 1.4216624, 2.4120052}, +{2.5123312, 1.3890325, 2.3406098}, +{2.4763966, 1.5154368, 2.4157133}, +{1.4432062, 2.5901921, 2.8509750}, +{1.4324530, 2.6228037, 2.9403236}, +{1.3556067, 2.5614119, 2.8252780}, +{2.2973249, 0.4159571, 0.0844466}, +{2.2322936, 0.3708718, 0.1383034}, +{2.3643932, 0.3498030, 0.0674820}, +{2.7554412, 2.5295804, 0.1667269}, +{2.8079121, 2.6085231, 0.1534155}, +{2.8152144, 2.4574771, 0.1469638}, +{0.4160990, 2.8594222, 1.3304537}, +{0.4418439, 2.8681152, 1.4222359}, +{0.3297206, 2.9004057, 1.3258225}, +{1.4411770, 3.1191816, 1.4182117}, +{1.3676486, 3.1798580, 1.4268303}, +{1.4224942, 3.0497778, 1.4814286}, +{1.2647716, 2.2072051, 1.9244591}, +{1.2094479, 2.2287891, 1.8493876}, +{1.2818084, 2.2914164, 1.9666549}, +{1.1737952, 0.6458455, 0.6616418}, +{1.1026356, 0.5847244, 0.6806897}, +{1.1506348, 0.6839190, 0.5769286}, +{2.6655991, 0.0104607, 0.6621353}, +{2.5722485, -0.0103464, 0.6660158}, +{2.6746926, 0.0653163, 0.5842220}, +{3.0565600, 0.1322491, 1.0274438}, +{3.0386632, 0.1682179, 0.9405630}, +{3.1520410, 0.1323506, 1.0342053}, +{1.3714759, 2.3501286, 1.4318610}, +{1.3286681, 2.2670243, 1.4524394}, +{1.2993164, 2.4116318, 1.4187200}, +{2.7049947, 3.0241776, 1.1863878}, +{2.7435629, 3.0765183, 1.1161363}, +{2.6612117, 2.9520252, 1.1412281}, +{0.8444524, 2.9721177, 2.0767226}, +{0.7639600, 3.0236494, 2.0819929}, +{0.9123399, 3.0359168, 2.0547390}, +{2.9652443, 0.3185920, 1.8087306}, +{2.9686358, 0.3986419, 1.8611026}, +{2.8774993, 0.2835847, 1.8241456}, +{2.8914852, 0.2340791, 0.5198098}, +{2.8445039, 0.2390226, 0.4365594}, +{2.9813170, 0.2118646, 0.4953339}, +{2.7703333, 1.2493916, 1.0068625}, +{2.7507780, 1.1626571, 0.9714078}, +{2.8630848, 1.2453831, 1.0301739}, +{0.1431016, 1.8039907, 0.0255609}, +{0.1469479, 1.7093764, 0.0395487}, +{0.0495395, 1.8239355, 0.0222948}, +{2.3800447, 2.8291817, 1.8892094}, +{2.4514453, 2.8870721, 1.8625081}, +{2.3031325, 2.8634391, 1.8436762}, +{0.8811609, 1.5040027, 1.8720562}, +{0.7942673, 1.5419599, 1.8851362}, +{0.9416233, 1.5710795, 1.9037944}, +{0.5695389, 2.1242199, 1.2213295}, +{0.5434146, 2.2137878, 1.2427169}, +{0.5677768, 2.1209488, 1.1256815}, +{0.4053916, 3.0292370, 0.1664358}, +{0.3900151, 2.9690521, 0.2392620}, +{0.3914557, 2.9760663, 0.0880714}, +{1.1927717, 0.4109417, 1.6167749}, +{1.1715277, 0.5040579, 1.6104204}, +{1.1161733, 0.3717045, 1.6586731}, +{1.5763763, 2.2710221, 1.8324944}, +{1.5159253, 2.2181172, 1.8845433}, +{1.5599326, 2.2442050, 1.7420911}, +{0.4093866, 0.7332158, 2.0414753}, +{0.3199112, 0.7018553, 2.0546281}, +{0.4299661, 0.7096633, 1.9510095}, +{1.7330390, 1.4889997, 2.4308240}, +{1.7038001, 1.4806265, 2.5215836}, +{1.8252559, 1.4634261, 2.4329128}, +{1.3913872, 2.3206732, 0.9283059}, +{1.3793780, 2.4088647, 0.8930874}, +{1.4671086, 2.3281789, 0.9863771}, +{1.2089198, 2.6746218, 1.9751054}, +{1.1329070, 2.6939475, 1.9202337}, +{1.2837166, 2.7061605, 1.9243799}, +{0.5890986, 3.0790772, 2.1627178}, +{0.4988248, 3.0729468, 2.1939487}, +{0.6232688, 3.1585555, 2.2036805}, +{1.2166541, 1.4912672, 0.8850375}, +{1.2144715, 1.5208808, 0.9760353}, +{1.2190043, 1.5719792, 0.8336335}, +{0.3929374, 2.4166908, 2.6296842}, +{0.3123853, 2.4540238, 2.5939081}, +{0.4532323, 2.4908166, 2.6353600}, +{0.3114639, 0.3101141, 1.7569084}, +{0.2428187, 0.3767878, 1.7547219}, +{0.3005972, 0.2673259, 1.8418402}, +{2.9132736, 0.1175474, 2.1263003}, +{2.9270849, 0.2017349, 2.1697059}, +{2.8611581, 0.0667908, 2.1885102}, +{1.9376403, 0.0624538, 1.1536620}, +{1.8661312, 0.1148099, 1.1898228}, +{1.9608933, 0.0018421, 1.2240030}, +{0.3572373, 2.3461428, 2.1686046}, +{0.2641458, 2.3638611, 2.1551011}, +{0.3880852, 2.4194338, 2.2218883}, +{2.8058197, 2.8201935, 0.1379955}, +{2.8558288, 2.8700640, 0.0733865}, +{2.7200096, 2.8625703, 0.1397703}, +{0.0032191, 1.3178412, 0.0583843}, +{-0.0870978, 1.3429438, 0.0390181}, +{-0.0045278, 1.2345899, 0.1049840}, +{1.4019784, 2.8491273, 1.0312332}, +{1.3509171, 2.9135497, 1.0802722}, +{1.4098608, 2.7745283, 1.0906905}, +{3.1384165, 2.2356179, 0.2998803}, +{3.1539919, 2.1424508, 0.2844008}, +{3.1248205, 2.2422488, 0.3943975}, +{0.1766917, 1.2759365, 2.4302580}, +{0.0926461, 1.2367078, 2.4065988}, +{0.2310107, 1.2650838, 2.3521941}, +{2.7852686, 2.3465152, 2.7968276}, +{2.8202999, 2.4299998, 2.7657561}, +{2.7227402, 2.3707168, 2.8651416}, +{1.3052348, 0.9984819, 1.3300224}, +{1.3659059, 0.9256989, 1.3435867}, +{1.3118399, 1.0504208, 1.4101539}, +{0.5665875, 2.5657904, 0.9616940}, +{0.6406052, 2.5906358, 0.9063188}, +{0.5641475, 2.6328723, 1.0299317}, +{1.3789604, 2.6117959, 0.8826749}, +{1.4035150, 2.6849251, 0.9393452}, +{1.3072896, 2.6459482, 0.8292029}, +{1.1231798, 1.2684706, 0.1009370}, +{1.0395811, 1.3081253, 0.1254540}, +{1.1890062, 1.3221244, 0.1451012}, +{1.3146839, 1.7803098, 1.4397310}, +{1.3783042, 1.8518236, 1.4404731}, +{1.2644501, 1.7937746, 1.3593719}, +{0.6181195, 2.8710861, 2.7558751}, +{0.6334758, 2.9515848, 2.7064135}, +{0.5837644, 2.9009070, 2.8400936}, +{3.0433786, 0.6095236, 1.9042455}, +{3.0348730, 0.6262254, 1.8103784}, +{3.0194321, 0.6924630, 1.9455968}, +{0.5922686, 3.0903454, 1.2564812}, +{0.6017589, 2.9993296, 1.2284031}, +{0.6819376, 3.1235635, 1.2607625}, +{0.5298051, 2.6297219, 2.9687405}, +{0.5872862, 2.6192214, 2.8929250}, +{0.5883953, 2.6238899, 3.0442090}, +{2.1229208, 1.3933673, 1.4613689}, +{2.1419914, 1.4868130, 1.4532112}, +{2.1617556, 1.3540833, 1.3831963}, +{1.6378314, 2.1083882, 1.5303661}, +{1.5590011, 2.1169774, 1.5839787}, +{1.6549770, 2.1970444, 1.4986101}, +{0.0548068, 2.4056787, 1.5874181}, +{0.0379649, 2.4017434, 1.6815627}, +{0.1311119, 2.3493812, 1.5743634}, +{2.0513301, 2.2948194, 1.1478559}, +{2.0418756, 2.3710799, 1.0907834}, +{2.0595169, 2.2207823, 1.0877410}, +{3.1074679, 3.1528280, 1.9838440}, +{3.1186411, 3.1784902, 1.8923076}, +{3.0371504, 3.2091913, 2.0161080}, +{2.0026777, 1.5648769, 0.3575563}, +{1.9471527, 1.5215871, 0.4224044}, +{1.9863432, 1.6582900, 0.3705752}, +{1.4013414, 2.4371281, 0.1836060}, +{1.3123887, 2.4201729, 0.2146258}, +{1.4299861, 2.5135546, 0.2336139}, +{1.9036753, 1.1610706, 2.8527877}, +{1.9788580, 1.1120363, 2.8860374}, +{1.9114486, 1.2473512, 2.8935008}, +{1.7981428, 0.9360223, 1.8231894}, +{1.8202807, 0.9817236, 1.7420498}, +{1.8813568, 0.9284521, 1.8698845}, +{0.8310211, 1.4211509, 0.4774362}, +{0.8531735, 1.5132346, 0.4635730}, +{0.8909097, 1.3922095, 0.5462699}, +{1.9773309, 2.8987200, 2.5548930}, +{2.0199487, 2.9813850, 2.5322545}, +{1.9870089, 2.8445482, 2.4765727}, +{1.7714078, 2.9690788, 1.8952646}, +{1.8290691, 3.0413752, 1.9199778}, +{1.7443531, 2.9304695, 1.9785693}, +{1.1576182, 2.2739072, 2.2139947}, +{1.0659511, 2.2577624, 2.1916602}, +{1.1612816, 2.3674429, 2.2339940}, +{0.1692386, 2.3199816, 0.6361234}, +{0.2083765, 2.3162665, 0.7233973}, +{0.2368806, 2.2851541, 0.5780378}, +{1.7325711, 1.2802182, 1.1576484}, +{1.7153682, 1.2263449, 1.0804211}, +{1.6458421, 1.2991191, 1.1934694}, +{1.5517442, 0.1593315, 2.3385732}, +{1.4970188, 0.1945993, 2.4087420}, +{1.5940538, 0.0827458, 2.3773913}, +{3.1173022, 0.7253851, 1.6355147}, +{3.0367050, 0.7665376, 1.6043234}, +{3.1262453, 0.6465754, 1.5819297}, +{0.4227195, 0.8869654, 0.5421873}, +{0.3435740, 0.9263561, 0.5054901}, +{0.4129204, 0.8972611, 0.6368461}, +{0.8747801, 2.7889309, 0.5650900}, +{0.8024612, 2.8513725, 0.5593132}, +{0.9395840, 2.8323987, 0.6205276}, +{2.6194429, 1.6346452, 2.8110599}, +{2.6785974, 1.5594525, 2.8140764}, +{2.6389561, 1.6836895, 2.8909111}, +{1.2411548, 1.5650493, 2.4847836}, +{1.2860081, 1.5052148, 2.5445359}, +{1.2874902, 1.6481947, 2.4948928}, +{1.2991892, 3.0846007, 2.6954081}, +{1.3083119, 3.1420801, 2.6194134}, +{1.2610611, 3.0041823, 2.6601741}, +{0.2147928, 2.6448722, 0.4935245}, +{0.1477649, 2.6989579, 0.5352894}, +{0.1669554, 2.5933731, 0.4285495}, +{0.1807212, 1.4711146, 2.0624981}, +{0.1996624, 1.3838311, 2.0969241}, +{0.1004509, 1.4598783, 2.0115793}, +{0.8235514, 2.7261529, 2.5010455}, +{0.7985476, 2.8084054, 2.5431366}, +{0.9074425, 2.7032983, 2.5410738}, +{0.1462753, 2.1703548, 2.4059911}, +{0.0925189, 2.1098361, 2.3549023}, +{0.2221738, 2.1184173, 2.4325285}, +{1.2438588, 0.1641193, 2.0756547}, +{1.2992885, 0.2133559, 2.0151103}, +{1.2083662, 0.2303828, 2.1349144}, +{-0.0114480, 3.0997064, 0.6763304}, +{0.0750117, 3.0791123, 0.6407929}, +{-0.0465917, 3.0151856, 0.7043211}, +{2.7170119, 3.1574018, 2.2839265}, +{2.6215694, 3.1514716, 2.2796988}, +{2.7443438, 3.0751519, 2.3245499}, +{0.6330915, 1.9843358, 1.8078895}, +{0.6253412, 1.8905246, 1.8252592}, +{0.5511634, 2.0074372, 1.7641123}, +{2.0534453, 2.9919622, 1.3376404}, +{2.0972829, 2.9280908, 1.3938632}, +{1.9891379, 3.0339858, 1.3947448}, +{2.5595756, 0.1709327, 0.4758185}, +{2.4666584, 0.1480486, 0.4780633}, +{2.5609996, 0.2662174, 0.4848249}, +{0.0548360, 0.8625047, 0.9712372}, +{0.0126623, 0.8162499, 1.0436540}, +{0.1467003, 0.8691212, 0.9973043}, +{2.0341542, 2.4806106, 1.5604465}, +{1.9761295, 2.5296988, 1.5022588}, +{2.1108520, 2.4608510, 1.5066942}, +{1.0047096, 1.9007962, 1.0972116}, +{1.0000507, 1.8166556, 1.0518136}, +{1.0021937, 1.8780367, 1.1901524}, +{1.2617978, 1.1951837, 1.0913249}, +{1.3421923, 1.2399727, 1.1176497}, +{1.2454977, 1.1320611, 1.1614118}, +{0.7996933, 0.6517515, 2.0310485}, +{0.7762187, 0.6758864, 2.1206517}, +{0.8901224, 0.6210238, 2.0374298}, +{1.4593360, 1.7534411, 0.7454903}, +{1.5247875, 1.8225824, 0.7553853}, +{1.3933765, 1.7732067, 0.8119807}, +{1.1051767, 1.6330658, 1.5852716}, +{1.0175937, 1.6681831, 1.6013439}, +{1.1637462, 1.7074854, 1.5991877}, +{0.2079048, 2.9066741, 2.8539057}, +{0.1214557, 2.9459078, 2.8661365}, +{0.2533523, 2.9225912, 2.9366310}, +{2.1865406, 0.9325101, 0.2444057}, +{2.2764936, 0.9637669, 0.2540906}, +{2.1949701, 0.8493636, 0.1977375}, +{0.6729921, 1.0627122, 0.4464383}, +{0.6852199, 1.1570420, 0.4357299}, +{0.5797288, 1.0526611, 0.4654973}, +{0.7959678, 2.5415034, 1.3142992}, +{0.8250527, 2.4539328, 1.3397503}, +{0.8019554, 2.5930488, 1.3947327}, +{3.0055635, 0.3503016, 2.6268432}, +{2.9678719, 0.2925328, 2.5604773}, +{3.0900195, 0.3767663, 2.5903862}, +{2.4326243, 1.5049781, 1.4991169}, +{2.4792805, 1.4943874, 1.4162111}, +{2.4823234, 1.4520557, 1.5614991}, +{1.4261579, 0.5553307, 0.4757133}, +{1.5077444, 0.6050994, 0.4703242}, +{1.3696491, 0.6080198, 0.5322192}, +{2.7218502, 2.5943851, 0.8363311}, +{2.7340646, 2.5221584, 0.7747159}, +{2.8107097, 2.6211266, 0.8598078}, +{1.0416488, 2.5242288, 1.5851345}, +{1.0038087, 2.6118450, 1.5777966}, +{1.0884750, 2.5113771, 1.5026455}, +{2.0134747, 2.3873849, 2.3839467}, +{2.0232134, 2.3633554, 2.2918053}, +{2.0721650, 2.3278441, 2.4305587}, +{2.8217449, 0.2776686, 0.2574855}, +{2.8106289, 0.3073173, 0.1671544}, +{2.7752514, 0.1940790, 0.2611510}, +{0.8787520, 2.3601768, 1.9094853}, +{0.9504912, 2.3195858, 1.8608213}, +{0.9217461, 2.4063137, 1.9814937}, +{2.3661065, 2.0172884, 0.2111986}, +{2.4206848, 2.0699897, 0.2695605}, +{2.4251144, 1.9497740, 0.1776995}, +{0.3128650, 0.8508489, 1.0299500}, +{0.3612798, 0.8952302, 0.9603179}, +{0.3683545, 0.8601558, 1.1073878}, +{3.2687302, 0.6668844, 2.1616092}, +{3.2372091, 0.6135276, 2.2345598}, +{3.1936915, 0.7211916, 2.1374800}, +{3.0712218, 2.9063923, 3.0557213}, +{3.0603147, 3.0011432, 3.0638208}, +{3.1379335, 2.8843198, 3.1207190}, +{0.4015963, 1.2436870, 2.7785566}, +{0.4394538, 1.3002465, 2.8458631}, +{0.3104078, 1.2720333, 2.7719645}, +{1.7099200, 3.0845571, 0.2950869}, +{1.6771821, 2.9974043, 0.3173337}, +{1.6327249, 3.1409829, 0.2994852}, +{1.8933726, 2.8122535, 1.1608722}, +{1.8259989, 2.8493307, 1.1038777}, +{1.9202006, 2.8851507, 1.2168060}, +{1.8764712, 3.0338345, 0.5885882}, +{1.8749711, 3.0441291, 0.6837412}, +{1.8259276, 3.1081526, 0.5556570}, +{3.0098042, 1.4475008, 1.2419705}, +{2.9584754, 1.4286509, 1.3205347}, +{3.0155330, 1.3635283, 1.1963844}, +{2.6959419, 1.1972355, 1.2646970}, +{2.7069669, 1.1037581, 1.2820961}, +{2.7152138, 1.2066711, 1.1714131}, +{2.1227133, 2.5236011, 1.0088490}, +{2.2078486, 2.5662785, 0.9992088}, +{2.0977602, 2.5401940, 1.0997574}, +{1.3572713, 2.9221723, 1.6777587}, +{1.4286047, 2.9761715, 1.7117875}, +{1.2784710, 2.9744353, 1.6926379}, +{1.1480206, 1.5168741, 3.0389962}, +{1.1847718, 1.5075214, 3.1268838}, +{1.2044740, 1.4629923, 2.9835699}, +{2.3853214, 1.1214042, 1.6141469}, +{2.3935120, 1.0271659, 1.6287885}, +{2.3611999, 1.1292961, 1.5218530}, +{0.6311027, 0.1016174, 1.6243318}, +{0.5470228, 0.0855912, 1.5814829}, +{0.6106121, 0.1021853, 1.7178313}, +{2.7464151, 0.0516883, 0.9582975}, +{2.7487745, 0.0281757, 0.8655403}, +{2.8382161, 0.0514651, 0.9854056}, +{1.7304622, 3.1443882, 3.0445254}, +{1.7831426, 3.0679910, 3.0679896}, +{1.6914004, 3.1215546, 2.9601741}, +{0.7906733, 2.6265807, 0.8248448}, +{0.8177398, 2.6642723, 0.7411246}, +{0.8717912, 2.6191671, 0.8751165}, +{2.2210987, 1.6855260, 1.5843459}, +{2.2454548, 1.7748140, 1.6087747}, +{2.3038921, 1.6437551, 1.5606239}, +{1.3751395, 0.1810687, 2.5738945}, +{1.4360177, 0.1949804, 2.6464384}, +{1.3102928, 0.2508413, 2.5833299}, +{0.5880298, 0.0840732, 2.8679204}, +{0.6656166, 0.0619070, 2.9194109}, +{0.5998398, 0.0370806, 2.7853703}, +{0.3778510, 0.8465574, 1.3659148}, +{0.4621186, 0.8020369, 1.3570145}, +{0.3965478, 0.9223754, 1.4212717}, +{1.8169478, 2.4084704, 2.6322603}, +{1.8763278, 2.3982539, 2.5578833}, +{1.7327039, 2.4309149, 2.5927443}, +{1.5286326, 0.6991237, 0.9306894}, +{1.4654825, 0.6483302, 0.9816247}, +{1.4761937, 0.7672477, 0.8885992}, +{2.1650550, 2.2553799, 2.5896070}, +{2.2285602, 2.2476246, 2.5184083}, +{2.2146561, 2.2333372, 2.6684496}, +{2.2807362, 0.2346284, 1.2236534}, +{2.2768052, 0.1389937, 1.2245854}, +{2.2373331, 0.2595900, 1.1420728}, +{2.8195858, 0.9742986, 0.5854561}, +{2.8545740, 0.9761347, 0.4963787}, +{2.7532520, 0.9053121, 0.5837166}, +{0.3833745, 1.5915126, 0.5271609}, +{0.3588574, 1.6840245, 0.5288239}, +{0.4238288, 1.5789949, 0.4413176}, +{1.5773510, 2.7054133, 2.4832747}, +{1.6160283, 2.7219584, 2.5692553}, +{1.5794832, 2.6101697, 2.4739790}, +{1.9801409, 2.0747538, 0.9456382}, +{2.0582950, 2.0198128, 0.9516192}, +{1.9082919, 2.0171092, 0.9716601}, +{1.9932305, 2.0158625, 2.5114071}, +{2.0551198, 1.9690993, 2.4553247}, +{1.9353523, 2.0615161, 2.4503484}, +{3.1968195, 2.9231851, 1.6820378}, +{3.1059105, 2.9434977, 1.7040669}, +{3.1981800, 2.8280821, 1.6712724}, +{0.7788540, 0.7438078, 2.2681112}, +{0.8656738, 0.7805763, 2.2846253}, +{0.7445127, 0.7234683, 2.3551130}, +{0.3270538, 0.2149194, 1.3401216}, +{0.3678668, 0.2812125, 1.3958158}, +{0.3846343, 0.1387992, 1.3473684}, +{0.6344126, 3.1155276, 0.6873341}, +{0.6744579, 3.0585084, 0.7529656}, +{0.6638072, 3.0798850, 0.6035017}, +{1.7117327, 1.6924006, 0.5228162}, +{1.6474893, 1.7582760, 0.4964434}, +{1.7961580, 1.7298888, 0.4977297}, +{1.8567181, 0.0392962, 1.4579177}, +{1.9301559, 0.0872095, 1.4963043}, +{1.7790179, 0.0790635, 1.4972058}, +{1.9086214, 0.6294294, 1.1288141}, +{1.9087464, 0.7080273, 1.0741819}, +{1.8361641, 0.5768396, 1.0949532}, +{2.9234691, 1.3960860, 1.7451727}, +{2.9271364, 1.3906947, 1.6496750}, +{2.9322729, 1.3054395, 1.7746350}, +{2.5961757, 1.2563353, 2.8420835}, +{2.6273327, 1.1874938, 2.9008408}, +{2.6523974, 1.2492404, 2.7649403}, +{1.6142764, 2.0226736, 0.6866920}, +{1.6081376, 2.0269959, 0.5912669}, +{1.7064383, 2.0403221, 0.7055877}, +{3.0252733, 0.9035360, 2.1366932}, +{3.0901032, 0.9705459, 2.1150351}, +{2.9422460, 0.9509875, 2.1408343}, +{0.3319494, 2.7116714, 0.8738325}, +{0.3984171, 2.6437242, 0.8851265}, +{0.3495027, 2.7481673, 0.7871016}, +{1.0411624, 1.9672332, 2.8940678}, +{1.0226711, 1.9455589, 2.9854495}, +{1.0067858, 1.8929725, 2.8444099}, +{1.7266785, 1.2201580, 0.6559714}, +{1.7772967, 1.1410348, 0.6375423}, +{1.7925657, 1.2887030, 0.6670520}, +{1.6122648, 1.4786710, 1.4660317}, +{1.5936929, 1.4748776, 1.5598561}, +{1.6282101, 1.3876483, 1.4410727}, +{1.3454726, 0.4086000, 2.8940857}, +{1.3438760, 0.4810199, 2.9566567}, +{1.4329889, 0.4122240, 2.8554842}, +{1.4343236, 0.1044375, 1.1542399}, +{1.4511993, 0.0542683, 1.2339931}, +{1.3702918, 0.0520548, 1.1060910}, +{0.8520996, 1.4602600, 3.0048344}, +{0.9402733, 1.4945160, 3.0194719}, +{0.8466719, 1.3831707, 3.0613153}, +{0.6967915, 1.3418691, 2.1728470}, +{0.7880154, 1.3524149, 2.1458414}, +{0.6680800, 1.4303742, 2.1953154}, +{1.0052803, 1.2998366, 1.0771683}, +{1.0993463, 1.2829878, 1.0716901}, +{0.9988962, 1.3907951, 1.1062909}, +{1.0115093, 0.9496256, 3.0949585}, +{0.9555437, 0.8916498, 3.0432966}, +{1.0977333, 0.9081325, 3.0924931}, +{1.3767744, 2.0419605, 0.9587992}, +{1.4278080, 2.1229284, 0.9602434}, +{1.3064364, 2.0590961, 0.8961793}, +{1.4703686, 1.6017699, 1.2091622}, +{1.4902636, 1.5690289, 1.2968807}, +{1.3759071, 1.5894221, 1.1998417}, +{2.7590122, 1.1621137, 2.6325266}, +{2.6903048, 1.1850734, 2.5699611}, +{2.8235521, 1.2322922, 2.6240475}, +{2.2294898, 1.9993744, 0.9583678}, +{2.2312427, 2.0027003, 1.0540140}, +{2.3051903, 1.9457094, 0.9348770}, +{2.8789351, 2.0091159, 2.5091674}, +{2.9500446, 2.0648346, 2.5408087}, +{2.8025765, 2.0365949, 2.5599277}, +{0.5827035, 1.7015691, 1.8197843}, +{0.5567152, 1.6421258, 1.7494037}, +{0.5377286, 1.6679941, 1.8973233}, +{1.0069047, 2.5266273, 2.1008394}, +{0.9363064, 2.5817082, 2.1346667}, +{1.0701628, 2.5885010, 2.0643375}, +{3.1180861, 0.1087189, 0.3535311}, +{3.0665042, 0.0533218, 0.2949410}, +{3.1946742, 0.0556394, 0.3754203}, +{0.5493382, 1.4513609, 2.8746886}, +{0.6443306, 1.4460784, 2.8852177}, +{0.5364450, 1.4670707, 2.7811511}, +{1.4356462, 0.3477229, 0.1550310}, +{1.4349927, 0.2701838, 0.0989098}, +{1.5238546, 0.3835943, 0.1452937}, +{1.1569337, 2.1085799, 0.8135269}, +{1.1715567, 2.0675759, 0.7282792}, +{1.1338508, 2.1991546, 0.7928945}, +{0.0195547, 3.0829549, 1.4680568}, +{0.0578572, 3.0378070, 1.3928443}, +{0.0453315, 3.0299537, 1.5434806}, +{1.8353071, 0.3216239, 1.8446139}, +{1.8179893, 0.2730236, 1.9252391}, +{1.9288611, 0.3415372, 1.8482770}, +{1.6484077, 0.6708111, 2.4929168}, +{1.6130813, 0.6675719, 2.5818205}, +{1.6716806, 0.5801089, 2.4730723}, +{2.8151016, 1.8968704, 1.3717885}, +{2.9079685, 1.8750560, 1.3639020}, +{2.7726941, 1.8137376, 1.3930688}, +{0.2040334, 2.0451298, 0.1868566}, +{0.1912639, 1.9994447, 0.2699957}, +{0.1594761, 1.9902769, 0.1222956}, +{0.0877642, 2.6547077, 1.3253226}, +{0.0135259, 2.5946047, 1.3315399}, +{0.1619498, 2.6047463, 1.3594205}, +{2.0650411, 1.0560287, 1.6615973}, +{2.0590000, 1.1335702, 1.7173928}, +{2.0403416, 1.0871904, 1.5745270}, +{0.3421816, 1.6829609, 1.2657359}, +{0.3397636, 1.5993085, 1.2192736}, +{0.3218082, 1.7481857, 1.1987064}, +{1.6759671, 2.6849034, 2.7521308}, +{1.7246289, 2.6391742, 2.8207104}, +{1.5846269, 2.6606596, 2.7673466}, +{1.4172475, 1.7850177, 2.4779270}, +{1.5017433, 1.7889298, 2.4331222}, +{1.4027654, 1.8741878, 2.5095701}, +{2.8529930, 0.7123784, 1.6128566}, +{2.8733006, 0.6209643, 1.5930231}, +{2.7597127, 0.7210023, 1.5931913}, +{2.4085989, 2.2848930, 1.7963345}, +{2.4077091, 2.2641983, 1.8897864}, +{2.4073508, 2.3805458, 1.7929723}, +{0.1691906, 1.2075392, 3.0270104}, +{0.1131272, 1.2801927, 3.0542257}, +{0.2401168, 1.2066383, 3.0912831}, +{1.9907514, 2.5226767, 2.8208237}, +{1.9473301, 2.4663346, 2.7567730}, +{1.9210324, 2.5486188, 2.8810613}, +{1.1102935, 0.8198916, 1.3983347}, +{1.0749289, 0.7895742, 1.3147135}, +{1.1656434, 0.8945083, 1.3752903}, +{1.7714801, 1.8464882, 2.4046018}, +{1.7744614, 1.9392034, 2.4282095}, +{1.8565464, 1.8293086, 2.3642173}, +{0.5937610, 2.2037556, 0.4178426}, +{0.5713465, 2.2714210, 0.3539575}, +{0.5372356, 2.2220151, 0.4929012}, +{2.4509909, 2.2759018, 0.0596903}, +{2.4833527, 2.3638136, 0.0793514}, +{2.5104091, 2.2174301, 0.1067315}, +{2.4632604, 1.6853720, 1.8060201}, +{2.4957321, 1.6907532, 1.8959032}, +{2.4611321, 1.7761866, 1.7758455}, +{1.0052195, 0.8856758, 2.3673074}, +{1.0746095, 0.9312521, 2.3196614}, +{1.0404482, 0.8739728, 2.4555361}, +{1.1241881, 2.6061280, 0.0940612}, +{1.1125401, 2.6648810, 0.0193971}, +{1.0731555, 2.6463270, 0.1643607}, +{2.8064442, 2.3263919, 1.5736471}, +{2.7479289, 2.2527969, 1.5915937}, +{2.8653142, 2.2941003, 1.5054277}, +{2.8880889, 2.1751945, 1.3495091}, +{2.8279512, 2.2157385, 1.2870438}, +{2.8373785, 2.1042574, 1.3889893}, +{3.0745859, 1.5778222, 2.2226985}, +{2.9883964, 1.6001749, 2.2578270}, +{3.0654528, 1.5887885, 2.1280484}, +{1.0401490, 3.0955343, 1.3439633}, +{1.1133231, 3.1363659, 1.3902305}, +{0.9675715, 3.0988345, 1.4062847}, +{1.4736553, 0.8086180, 1.2154341}, +{1.5341075, 0.7913892, 1.1432465}, +{1.3930255, 0.7634901, 1.1904417}, +{1.0647640, 0.3411834, 0.7416006}, +{1.0111769, 0.3909458, 0.8033618}, +{1.0148275, 0.3426734, 0.6599523}, +{1.9401685, 0.6938528, 0.0066064}, +{1.9616201, 0.7865027, -0.0042626}, +{1.8606277, 0.6814493, -0.0451789}, +{2.1122453, 1.7291778, 1.8367143}, +{2.0371990, 1.6859997, 1.7958971}, +{2.1870558, 1.7029707, 1.7830590}, +{0.6342242, 0.8106606, 0.3574771}, +{0.6651949, 0.9012294, 0.3568276}, +{0.5559902, 0.8124952, 0.4125988}, +{0.3853418, 0.4006839, 2.7118683}, +{0.2933022, 0.4231032, 2.7255940}, +{0.3946557, 0.3948757, 2.6167798}, +{2.1416111, 2.7216964, 2.6807227}, +{2.0832665, 2.7863660, 2.6410227}, +{2.0837512, 2.6660483, 2.7328556}, +{0.8238381, 0.8551059, 1.3287103}, +{0.8435801, 0.9477627, 1.3150253}, +{0.7827186, 0.8518817, 1.4150881}, +{2.7235484, 1.3001494, 0.1851126}, +{2.6506553, 1.2466738, 0.1536602}, +{2.7747400, 1.3194400, 0.1065657}, +{0.2224002, 0.4548645, 0.5684708}, +{0.1832067, 0.4332103, 0.4838701}, +{0.3102792, 0.4860598, 0.5468731}, +{0.1678381, 1.3936555, 2.6686006}, +{0.1883233, 1.3333976, 2.5971048}, +{0.1705749, 1.4804389, 2.6283085}, +{2.9617453, 1.8685772, 2.0764592}, +{2.8807852, 1.8229932, 2.0534396}, +{3.0307336, 1.8180844, 2.0334082}, +{1.9212809, 1.2865047, 2.3329756}, +{1.9000707, 1.2352325, 2.4109731}, +{2.0166340, 1.2815305, 2.3262422}, +{2.3672991, 1.9698034, 2.4855709}, +{2.3004782, 1.9742545, 2.5539629}, +{2.3981352, 2.0599461, 2.4763103}, +{1.8650005, 2.9426861, 1.6273446}, +{1.8590415, 3.0276165, 1.5835993}, +{1.8415294, 2.9609120, 1.7183350}, +{0.7784527, 2.2812283, 0.7951221}, +{0.8010033, 2.1884971, 0.8025208}, +{0.7789437, 2.3132672, 0.8853195}, +{0.7716025, 1.4065443, 2.6228643}, +{0.8182636, 1.4625220, 2.5608032}, +{0.6825707, 1.4416565, 2.6245365}, +{2.4861620, 0.5523419, 1.5188867}, +{2.5047450, 0.5098403, 1.6026159}, +{2.4733019, 0.4799409, 1.4576083}, +{2.6230867, 0.7726538, 0.6503510}, +{2.5630689, 0.8467495, 0.6587193}, +{2.5897546, 0.7077196, 0.7122770}, +{1.6573763, 1.5258136, 2.0180345}, +{1.6187967, 1.5473584, 2.1029446}, +{1.7272662, 1.4637092, 2.0385470}, +{0.8124207, 0.9129960, 2.8729720}, +{0.7659423, 0.8308271, 2.8887944}, +{0.7509397, 0.9809828, 2.9005434}, +{3.1470082, 1.1630429, 2.0729537}, +{3.1972566, 1.1060173, 2.0147684}, +{3.1135051, 1.2320911, 2.0157504}, +{-0.0113219, 0.1338957, 1.7308491}, +{0.0405767, 0.1928974, 1.6761897}, +{-0.0879223, 0.1855693, 1.7558399}, +{2.5465775, 0.5641143, 0.8054407}, +{2.4594133, 0.5257691, 0.7957263}, +{2.6034977, 0.4896210, 0.8247582}, +{0.1363115, 2.9111912, 1.2885181}, +{0.1627293, 2.9066296, 1.1966289}, +{0.1138221, 2.8210280, 1.3114780}, +{1.4033453, 2.9274018, 0.3716766}, +{1.3240182, 2.9151552, 0.4238260}, +{1.4427241, 2.8402743, 0.3671547}, +{0.9571599, 2.9728811, 2.3470871}, +{0.8974989, 2.9911551, 2.2744997}, +{1.0015987, 3.0561333, 2.3631051}, +{0.1368403, 2.0247195, 0.7244007}, +{0.2027807, 1.9570136, 0.7092317}, +{0.1707193, 2.0749781, 0.7984858}, +{0.1545013, 0.9651616, 1.9842064}, +{0.2061592, 1.0056378, 1.9145253}, +{0.1423651, 0.8746471, 1.9555329}, +{0.9423909, 1.4345020, 0.7427008}, +{1.0276569, 1.4706254, 0.7669313}, +{0.9361935, 1.3526446, 0.7919275}, +{0.0657699, 0.9486246, 0.2080219}, +{0.1368574, 1.0125556, 0.2033620}, +{0.0344767, 0.9541414, 0.2983138}, +{0.8916632, 1.2025680, 1.9229212}, +{0.9767700, 1.1824419, 1.8840100}, +{0.8843075, 1.2977889, 1.9165003}, +{2.7458506, 2.6529832, 2.7430913}, +{2.7756460, 2.6425157, 2.8334518}, +{2.7145476, 2.7433238, 2.7385068}, +{1.3121479, 0.6154935, 1.1112006}, +{1.3026097, 0.5302228, 1.1536298}, +{1.2223692, 0.6464320, 1.0991621}, +{2.8303406, 2.5877242, 1.2390387}, +{2.9257166, 2.5829055, 1.2455583}, +{2.8017883, 2.6159337, 1.3259370}, +{0.6000233, 1.8206260, 1.4252410}, +{0.5373207, 1.7486693, 1.4179652}, +{0.5462019, 1.8997148, 1.4219928}, +{1.2275105, 1.2209017, 0.8219629}, +{1.2165964, 1.3150317, 0.8084446}, +{1.2387114, 1.2114289, 0.9165521}, +{1.9253128, 0.4222677, 0.8271068}, +{1.9651443, 0.4682186, 0.7531860}, +{1.8692843, 0.4878075, 0.8686720}, +{1.6786568, 0.4025358, 2.4040346}, +{1.7537798, 0.3906794, 2.3459117}, +{1.6192174, 0.3310552, 2.3812354}, +{1.8612810, 0.2029788, 0.0012669}, +{1.8265940, 0.1380947, -0.0599637}, +{1.7840691, 0.2502298, 0.0323791}, +{2.9324153, 0.1620452, 1.4484571}, +{3.0147612, 0.1424477, 1.4931493}, +{2.9067509, 0.0791346, 1.4080901}, +{-0.0635180, 1.9188501, 1.3861413}, +{0.0025801, 1.8640891, 1.4285041}, +{-0.0577561, 2.0028679, 1.4316397}, +{0.2611843, 0.1074089, 0.4061440}, +{0.2940608, 0.1703344, 0.3419425}, +{0.3167955, 0.1203108, 0.4829767}, +{1.6337602, 1.1785666, 2.4895229}, +{1.6433702, 1.0909433, 2.4522114}, +{1.6154366, 1.2347765, 2.4142435}, +{1.1488066, 0.7782422, 2.0664234}, +{1.1031840, 0.8595939, 2.0449107}, +{1.1662766, 0.7846867, 2.1603148}, +{0.2427065, 1.3996728, 0.6616291}, +{0.1606280, 1.4115552, 0.6138353}, +{0.2976444, 1.4728110, 0.6334342}, +{1.9056511, 0.9819774, 0.7092524}, +{1.9774923, 1.0338727, 0.7454190}, +{1.9233923, 0.9787543, 0.6152461}, +{0.8114303, 0.9693785, 2.0592899}, +{0.8158681, 0.9011946, 1.9922558}, +{0.8417076, 1.0486016, 2.0149128}, +{-0.0095149, 1.0161350, 1.6050442}, +{0.0370743, 1.0306236, 1.5226922}, +{-0.0216685, 0.9212861, 1.6093205}, +{3.0591121, 2.1600492, 2.6506753}, +{3.0964267, 2.1413894, 2.7368250}, +{3.1304429, 2.2015145, 2.6021485}, +{1.0368833, 0.9855292, 2.7150295}, +{0.9546423, 0.9458805, 2.7437818}, +{1.0255550, 1.0790707, 2.7318811}, +{0.7766560, 2.9270952, 1.0572725}, +{0.8344874, 2.8631244, 1.0988127}, +{0.8057033, 3.0115523, 1.0917051}, +{1.9196419, 1.4821545, 1.1717540}, +{1.9718955, 1.4070935, 1.1999983}, +{1.8530268, 1.4446487, 1.1141514}, +{2.8695648, 2.6644447, 2.0374599}, +{2.8968818, 2.5760641, 2.0620563}, +{2.9169180, 2.7217915, 2.0977204}, +{2.7697909, 0.7054818, 1.9846574}, +{2.8278015, 0.6905421, 2.0593159}, +{2.7346494, 0.6188927, 1.9639279}, +{2.9882205, 1.6046449, 1.9461987}, +{3.0634844, 1.5522277, 1.9188106}, +{2.9244194, 1.5936081, 1.8757009}, +{0.4467179, 1.8339388, 3.1407397}, +{0.4521850, 1.8137131, 3.0473409}, +{0.3543213, 1.8216805, 3.1625323}, +{0.7677504, 1.6703570, 1.2745169}, +{0.7076899, 1.7230421, 1.3272364}, +{0.7388923, 1.5801394, 1.2883123}, +{2.7283170, 0.4669456, 2.7140481}, +{2.8201253, 0.4778503, 2.6892562}, +{2.7210655, 0.5106573, 2.7988951}, +{0.8607193, 2.7214639, 2.2498615}, +{0.8865188, 2.8093708, 2.2221284}, +{0.8447740, 2.7297256, 2.3438818}, +{1.9233046, 2.1076286, 0.6769425}, +{1.9993286, 2.0742846, 0.6292890}, +{1.9505978, 2.1074941, 0.7686888}, +{1.8795335, 1.5941333, 1.7022258}, +{1.8030465, 1.5479206, 1.7365251}, +{1.8755367, 1.5801402, 1.6076184}, +{1.9874325, 0.5273531, 1.6761723}, +{1.9814804, 0.6103491, 1.7234856}, +{2.0235782, 0.4659078, 1.7400494}, +{2.5604455, 1.7279090, 0.3944272}, +{2.4833403, 1.6712996, 0.3908980}, +{2.5671341, 1.7647883, 0.3063505}, +{1.2008839, 1.7612042, 2.1921813}, +{1.2187626, 1.8362577, 2.2488351}, +{1.2044465, 1.6855886, 2.2507639}, +{1.7749706, 2.1513369, 0.3021400}, +{1.6888816, 2.1884839, 0.2828760}, +{1.7560900, 2.0710893, 0.3507832}, +{0.0100695, 1.5538683, 1.0180876}, +{0.0330222, 1.6369233, 1.0597693}, +{-0.0685642, 1.5248090, 1.0642894}, +{0.8448004, 1.6865317, 2.8273821}, +{0.8519493, 1.6118132, 2.8867822}, +{0.8981603, 1.6621836, 2.7517369}, +{0.3982638, 0.6717119, 1.7753555}, +{0.3508439, 0.6356474, 1.7004353}, +{0.4607366, 0.6032767, 1.7993574}, +{1.0701768, 3.1833744, 2.8914468}, +{1.1120536, 3.1903751, 2.8056586}, +{1.1380969, 3.2098401, 2.9534852}, +{0.7225079, 0.6344430, 2.8513114}, +{0.7014872, 0.5462061, 2.8818843}, +{0.8162239, 0.6314297, 2.8320615}, +{0.0430516, 1.1721973, 2.7855878}, +{0.0843243, 1.2476416, 2.7435513}, +{0.0912546, 1.1611001, 2.8675368}, +{0.1643637, 1.1773787, 0.9241777}, +{0.1358725, 1.2487305, 0.8670858}, +{0.1844909, 1.1054175, 0.8643546}, +{0.2421942, 2.2270110, 1.6116085}, +{0.2600811, 2.1345279, 1.5946015}, +{0.3203130, 2.2585530, 1.6570495}, +{3.0569668, 2.4979150, 1.3805816}, +{2.9852016, 2.5234590, 1.4385436}, +{3.1149578, 2.4455733, 1.4358962}, +{2.2990107, 0.4131403, 2.9083548}, +{2.2151895, 0.4442775, 2.9425130}, +{2.3646326, 0.4645110, 2.9554410}, +{0.5438548, 0.9492766, 2.1264880}, +{0.6382870, 0.9382914, 2.1153436}, +{0.5057713, 0.8710152, 2.0866494}, +{2.5000832, 2.5158784, 0.1953517}, +{2.4683127, 2.6040337, 0.2148860}, +{2.5952880, 2.5250301, 0.1915289}, +{3.1166093, 1.7730014, 2.5394711}, +{3.0660226, 1.7766295, 2.6206508}, +{3.1246512, 1.6795423, 2.5204179}, +{0.6419087, 3.1287403, 2.6241665}, +{0.6084338, 3.1440952, 2.5358152}, +{0.7303003, 3.1654539, 2.6230059}, +{1.9597113, 1.8166590, 0.7783146}, +{1.9125922, 1.7423058, 0.8159140}, +{1.9371998, 1.8904268, 0.8350056}, +{0.2565176, 1.9606136, 2.0379341}, +{0.2441518, 1.8879259, 2.0989742}, +{0.3304879, 2.0096669, 2.0737739}, +{2.9051578, 0.4356207, 1.5685185}, +{2.9412236, 0.4062150, 1.4848713}, +{2.9518826, 0.3840150, 1.6342144}, +{2.6765954, 0.9000398, 1.2174791}, +{2.5811477, 0.8940651, 1.2215232}, +{2.6997609, 0.8577231, 1.1348052}, +{2.5382242, 2.1180766, 0.4009356}, +{2.5484979, 2.0859706, 0.4905233}, +{2.5327988, 2.2132061, 0.4100592}, +{0.7197660, 1.9922315, 0.7275286}, +{0.7088963, 1.9742284, 0.6341474}, +{0.6308909, 2.0080035, 0.7593842}, +{1.9609220, 3.2160480, 0.3154204}, +{1.8752587, 3.1806912, 0.2914618}, +{1.9763113, 3.1835041, 0.4041130}, +{2.6568368, 2.0510352, 3.0470574}, +{2.6461923, 2.1267643, 2.9894893}, +{2.6595795, 2.0881777, 3.1352346}, +{0.3112301, 2.2767274, 0.2865615}, +{0.2872103, 2.1935148, 0.2458058}, +{0.2329145, 2.3310900, 0.2779759}, +{1.8349693, 2.1348836, 2.3291638}, +{1.8336599, 2.1020980, 2.2392430}, +{1.7523602, 2.1823134, 2.3385694}, +{1.0871907, 2.2986407, 1.7408888}, +{1.0759281, 2.2480645, 1.6604059}, +{1.0899495, 2.3897677, 1.7117236}, +{2.1745789, 1.9545420, 2.0102098}, +{2.1424465, 1.9636211, 1.9205025}, +{2.1875739, 1.8603928, 2.0215833}, +{1.0341231, 0.0361474, 1.9128816}, +{0.9838279, 0.1172760, 1.9057497}, +{1.1186494, 0.0634270, 1.9485670}, +{1.7447501, 2.5821242, 0.5457462}, +{1.7939770, 2.5058930, 0.5152858}, +{1.7929615, 2.6126182, 0.6226105}, +{2.2543948, 0.9484131, 2.5884135}, +{2.2959268, 0.9240012, 2.5057004}, +{2.2145505, 0.8673350, 2.6200538}, +{2.9911334, 0.1536013, 0.7670333}, +{3.0556231, 0.0880508, 0.7404527}, +{2.9474194, 0.1785806, 0.6856242}, +{0.9890648, 0.1425652, 0.9406300}, +{1.0179802, 0.1835793, 0.8591189}, +{0.9537708, 0.2147985, 0.9925819}, +{1.4208969, 0.7138847, 2.3057656}, +{1.5102980, 0.7041913, 2.3385649}, +{1.4316294, 0.7431352, 2.2152586}, +{2.6808448, 2.9019826, 2.3981082}, +{2.6196704, 2.8394527, 2.3592489}, +{2.7663434, 2.8595791, 2.3907421}, +{2.9331214, 2.6559207, 2.9693475}, +{2.9813564, 2.7345364, 2.9949460}, +{3.0010905, 2.5922973, 2.9471080}, +{0.6846479, 2.8282986, 0.0989395}, +{0.7656561, 2.8722341, 0.1248174}, +{0.7125992, 2.7412167, 0.0706949}, +{0.6471792, 2.0636654, 0.1676496}, +{0.6151719, 2.1379831, 0.2187839}, +{0.5975092, 2.0676570, 0.0859227}, +{2.8259048, 1.3420453, 1.4605020}, +{2.7576725, 1.3411431, 1.5276277}, +{2.7991333, 1.2744625, 1.3982271}, +{1.1507398, 0.3174069, 2.3144486}, +{1.0659384, 0.3593313, 2.2998414}, +{1.2148813, 0.3859702, 2.2958133}, +{2.2242482, 2.8197093, 0.7125854}, +{2.1659050, 2.8254282, 0.7882538}, +{2.2842941, 2.7483022, 0.7339818}, +{0.9564861, 0.9928752, 1.5636003}, +{0.9705215, 0.9455887, 1.4815679}, +{0.8613610, 0.9950163, 1.5740383}, +{1.3359084, 2.8160994, 2.1822035}, +{1.3190620, 2.9102933, 2.1797481}, +{1.2988122, 2.7829933, 2.1004100}, +{1.9299790, 0.8758406, 1.3003237}, +{1.9262279, 0.7861898, 1.2669921}, +{1.9727029, 0.9255584, 1.2305733}, +{0.2684532, 1.4222771, 1.1195776}, +{0.1966105, 1.4209894, 1.0563376}, +{0.2588698, 1.3404933, 1.1683824}, +{0.2834614, 0.6675173, 1.5270826}, +{0.3294488, 0.7511750, 1.5200925}, +{0.2082182, 0.6765892, 1.4686148}, +{2.9735742, 1.1288265, 1.7898805}, +{3.0344226, 1.0964963, 1.7234384}, +{2.9486508, 1.0508579, 1.8394995}, +{0.9484476, 0.2976201, 1.9149556}, +{0.8746589, 0.2757144, 1.9718564}, +{1.0048378, 0.3528865, 1.9690675}, +{2.1331367, 1.9692905, 2.9734707}, +{2.0968676, 2.0446785, 3.0199842}, +{2.2278235, 1.9831640, 2.9755282}, +{1.1016358, 2.5934031, 2.5717747}, +{1.1602401, 2.6249468, 2.5029788}, +{1.1602087, 2.5645919, 2.6417851}, +{2.9011049, 1.9036500, 0.2222261}, +{2.8885000, 1.8895800, 0.3160636}, +{2.9954231, 1.9166975, 0.2124202}, +{3.0120790, 1.1917392, 0.2806238}, +{3.0653565, 1.2567348, 0.3264431}, +{2.9222972, 1.2236644, 0.2896970}, +{0.4867600, 0.2719674, 0.8842224}, +{0.4731141, 0.1839026, 0.9191610}, +{0.4080592, 0.2897656, 0.8327276}, +{2.3435404, 1.3587844, 2.7926073}, +{2.3379145, 1.4473159, 2.8285634}, +{2.4357238, 1.3348538, 2.8021920}, +{2.6365898, 2.9609728, 1.8114139}, +{2.5982826, 2.9320746, 1.7285902}, +{2.7090270, 3.0180116, 1.7856894}, +{2.1150622, 1.1271752, 0.8136538}, +{2.1540286, 1.2055047, 0.8524922}, +{2.1806004, 1.0963301, 0.7510787}, +{2.9630063, 0.5666408, 0.8626033}, +{3.0525203, 0.5745736, 0.8296390}, +{2.9171021, 0.5162801, 0.7953804}, +{2.2379093, 1.6405119, 2.8651214}, +{2.2198973, 1.7342871, 2.8717609}, +{2.1844885, 1.6110246, 2.7913716}, +{1.9171563, 0.9405604, 0.4047319}, +{1.9082389, 0.8588795, 0.3556298}, +{2.0040133, 0.9732437, 0.3812800}, +{1.9397354, 1.7530928, 1.1208880}, +{1.9113368, 1.6674386, 1.1528130}, +{1.8701869, 1.8130176, 1.1479865}, +{0.6317668, 2.5982196, 2.7025659}, +{0.6780862, 2.5718210, 2.6230679}, +{0.6269335, 2.6936495, 2.6968992}, +{2.7763722, 0.9181970, 1.7990961}, +{2.7674873, 0.8585699, 1.8734465}, +{2.7713945, 0.8614601, 1.7221645}, +{0.0102136, 2.6898615, 2.0399170}, +{0.0033672, 2.5998058, 2.0082088}, +{-0.0536600, 2.6951428, 2.1110127}, +{2.4561839, 0.7099834, 1.8010200}, +{2.3737435, 0.7574791, 1.7905283}, +{2.4987013, 0.7166258, 1.7155187}, +{1.3939223, 2.4582560, 2.2867839}, +{1.3996152, 2.4493568, 2.1916487}, +{1.3508067, 2.5426223, 2.3004108}, +{1.9135660, 1.1220603, 2.5315902}, +{1.8369777, 1.0646460, 2.5312040}, +{1.9465116, 1.1174393, 2.6213429}, +{0.9004487, 0.4625946, 2.3155406}, +{0.9044201, 0.5247172, 2.3882544}, +{0.8068696, 0.4485231, 2.3011444}, +{0.0886837, 2.8912289, 0.1200376}, +{0.0767506, 2.9822719, 0.0929988}, +{0.1769977, 2.8885584, 0.1568592}, +{1.5250142, 2.0289693, 2.9174082}, +{1.6196091, 2.0254824, 2.9316194}, +{1.4925609, 2.0869300, 2.9863260}, +{0.8958684, 0.1152854, 2.5216181}, +{0.9096281, 0.1682966, 2.6001217}, +{0.9839574, 0.0897638, 2.4942086}, +{2.0336621, 2.8774958, 0.8959895}, +{2.0060561, 2.8305523, 0.9747076}, +{1.9766207, 2.9542909, 0.8926578}, +{1.3289750, 0.8581318, 0.7911605}, +{1.3037727, 0.7865198, 0.7328606}, +{1.3678304, 0.9236560, 0.7332023}, +{2.1629212, 1.2174341, 2.9565094}, +{2.1748023, 1.2729852, 3.0335496}, +{2.2153056, 1.2595085, 2.8883336}, +{2.6981475, 1.7715750, 3.0479758}, +{2.7040033, 1.8670747, 3.0507703}, +{2.7880843, 1.7424959, 3.0328715}, +{1.6458204, 2.3960319, 3.1221371}, +{1.6413189, 2.3019559, 3.1050560}, +{1.5613037, 2.4172542, 3.1617460}, +{2.1971915, 0.7671505, 2.1049788}, +{2.1845357, 0.8001442, 2.1939371}, +{2.2187593, 0.8448783, 2.0534470}, +{0.6224402, 2.9699037, 3.0241976}, +{0.6899034, 3.0369391, 3.0133688}, +{0.6394674, 2.9325347, 3.1106610}, +{0.2299824, 1.8719134, 0.3997822}, +{0.1869170, 1.8361518, 0.4774274}, +{0.3218177, 1.8807822, 0.4252762}, +{2.7698395, 0.6161367, 2.9537625}, +{2.7889094, 0.6993777, 2.9105237}, +{2.8367851, 0.6085784, 3.0217588}, +{2.4963174, 1.0814774, 2.0948665}, +{2.5545115, 1.1072582, 2.0233746}, +{2.4824255, 1.1620288, 2.1446743}, +{2.5285950, 1.4406851, 1.2590463}, +{2.5800872, 1.3600342, 1.2615598}, +{2.4551868, 1.4204360, 1.2010503}, +{1.5000346, 1.2697160, 1.3019290}, +{1.4249097, 1.2747705, 1.3610308}, +{1.5352316, 1.1817277, 1.3154023}, +{0.5901845, 2.6962342, 0.3508977}, +{0.5550343, 2.7098212, 0.2629081}, +{0.6281224, 2.6083939, 0.3482337}, +{0.0498685, 1.6067076, 0.2915846}, +{-0.0169917, 1.6683018, 0.2616148}, +{0.1047645, 1.5916337, 0.2146333}, +{0.6201953, 0.4945866, 2.3696377}, +{0.6448801, 0.4784647, 2.4607041}, +{0.5364241, 0.5405491, 2.3753068}, +{0.7168736, 0.9394868, 0.8006921}, +{0.7721955, 1.0065970, 0.8406674}, +{0.7445601, 0.9370626, 0.7090958}, +{2.6671295, 2.7020864, 0.5348983}, +{2.6698348, 2.7215958, 0.6285701}, +{2.5741301, 2.7052181, 0.5124570}, +{2.0432017, 1.5345289, 2.6939590}, +{1.9726073, 1.5970825, 2.6776555}, +{2.0140536, 1.4849213, 2.7704561}, +{2.8526125, 3.1461883, 1.7159655}, +{2.8555989, 3.1337929, 1.6210984}, +{2.9312882, 3.1023211, 1.7483403}, +{2.0595810, 0.6922218, 1.8977623}, +{2.1128202, 0.7533019, 1.8468001}, +{2.1089294, 0.6792440, 1.9787476}, +{2.9648604, 0.5567046, -0.0060417}, +{2.9122286, 0.4795727, 0.0150031}, +{3.0454047, 0.5212051, -0.0436545}, +{0.2892040, 2.1940012, 2.6874871}, +{0.3408917, 2.1275043, 2.6420023}, +{0.3286449, 2.2771475, 2.6611538}, +{1.3549655, 1.8224040, 2.9402862}, +{1.4266188, 1.7592852, 2.9469306}, +{1.3981899, 1.9078085, 2.9404142}, +{0.2691354, 1.8271025, 1.0264000}, +{0.1927256, 1.8609899, 0.9797577}, +{0.3227967, 1.7866358, 0.9582441}, +{1.5400959, 2.3967710, 2.5084748}, +{1.4878405, 2.4114141, 2.4296250}, +{1.4755367, 2.3854625, 2.5782354}, +{0.5326626, 2.3845942, 3.1297238}, +{0.4971890, 2.2957733, 3.1258831}, +{0.5338061, 2.4138892, 3.0386040}, +{1.8223233, 0.5574270, 2.0022380}, +{1.9045489, 0.5924630, 1.9679779}, +{1.7841523, 0.5095990, 1.9286324}, +{1.4984720, 1.5061412, 0.9402193}, +{1.4155788, 1.4745740, 0.9042395}, +{1.4803245, 1.5205697, 1.0330892}, +{2.7332656, 0.7312201, 1.0079825}, +{2.7916124, 0.6726646, 0.9597204}, +{2.6755517, 0.6725637, 1.0568788}, +{2.4424791, 0.1526094, 0.9303625}, +{2.3879998, 0.0911552, 0.8811925}, +{2.5098915, 0.0979013, 0.9706727}, +{0.4960604, 1.5185516, 0.9822090}, +{0.5092490, 1.4334679, 0.9403864}, +{0.4160278, 1.5078251, 1.0336100}, +{2.7628097, 2.3348615, 2.4432676}, +{2.7008138, 2.3951042, 2.4021623}, +{2.7090862, 2.2814241, 2.5017528}, +{1.5446522, 1.6085464, 3.0500593}, +{1.5414374, 1.5329128, 2.9914799}, +{1.6200292, 1.6591480, 3.0197263}, +{2.9932613, 0.8973161, 3.1656961}, +{2.9757838, 0.8035431, 3.1736639}, +{3.0881090, 0.9031082, 3.1541777}, +{1.4010988, 0.4136273, 1.4124979}, +{1.4918234, 0.3873245, 1.3970212}, +{1.3828571, 0.3851750, 1.5020524}, +{0.4023689, 2.0282826, 1.4072916}, +{0.3681280, 2.0982084, 1.4629717}, +{0.4413290, 2.0739450, 1.3327305}, +{0.8990337, 0.0518757, 1.5698578}, +{0.9353620, 0.1321738, 1.6072047}, +{0.8083336, 0.0501535, 1.6004003}, +{3.1075847, 2.2488401, 1.2512697}, +{3.0253933, 2.2144067, 1.2862159}, +{3.0956528, 2.3438134, 1.2511828}, +{0.0557172, 1.8632007, 1.8999640}, +{0.1107633, 1.9053519, 1.9659604}, +{0.1176033, 1.8290632, 1.8354112}, +{3.0890746, 2.3306186, 0.5492309}, +{3.1831112, 2.3327463, 0.5669764}, +{3.0496125, 2.3759732, 0.6237159}, +{2.7296615, 0.9997886, 0.8558961}, +{2.7213280, 0.9053426, 0.8690420}, +{2.7973664, 1.0087538, 0.7888290}, +{1.0974518, 0.8433317, 0.9172019}, +{1.1853055, 0.8660080, 0.8867087}, +{1.0478573, 0.8266026, 0.8370593}, +{0.9604354, 1.2627037, 2.7982440}, +{0.8923366, 1.3030043, 2.7443855}, +{0.9133513, 1.2007528, 2.8539889}, +{2.1899431, 1.9201032, 2.2926776}, +{2.2687562, 1.9190143, 2.3469882}, +{2.2210064, 1.9459480, 2.2059052}, +{2.8820908, 3.0447397, 1.4389324}, +{2.8172474, 3.0341754, 1.3693190}, +{2.9631038, 3.0099263, 1.4016868}, +{0.1538719, 1.7705958, 0.6214464}, +{0.0639039, 1.7650935, 0.6536615}, +{0.2019075, 1.7061505, 0.6734244}, +{0.0391853, 0.9687190, 1.3186412}, +{0.0822218, 0.8836136, 1.3104405}, +{-0.0543289, 0.9483005, 1.3193494}, +{2.8203828, 1.0515431, 3.0258067}, +{2.8715956, 1.0886682, 2.9539645}, +{2.8766954, 0.9834964, 3.0626969}, +{2.0838254, 1.4474046, 1.9963507}, +{2.0867698, 1.5430481, 1.9939114}, +{2.1731501, 1.4201491, 1.9753615}, +{0.6114916, 2.2305501, 1.9186871}, +{0.6924189, 2.2738998, 1.8915964}, +{0.6265373, 2.1378884, 1.8999858}, +{0.6912583, 0.3887711, 2.6120997}, +{0.7765276, 0.4001686, 2.6540706}, +{0.6278685, 0.4030060, 2.6823950}, +{2.3112164, 2.3770421, 0.3152490}, +{2.3938129, 2.4132743, 0.2831964}, +{2.2569349, 2.3682025, 0.2369055}, +{0.9653467, 0.3204466, 1.3443677}, +{0.9325471, 0.3793331, 1.2764053}, +{1.0573641, 0.3067601, 1.3218335}, +{2.4298737, -0.0653387, 2.2467003}, +{2.3855753, -0.0664993, 2.3315449}, +{2.4447195, -0.1576444, 2.2261674}, +{0.3330666, 1.9756161, 1.7666504}, +{0.2981088, 1.9885229, 1.8548189}, +{0.3068178, 1.8865833, 1.7432737}, +{1.2224982, 0.3931379, 2.6188960}, +{1.2696162, 0.4648877, 2.5765386}, +{1.2575655, 0.3907166, 2.7079282}, +{0.1221577, 0.3488992, 2.5562828}, +{0.1666659, 0.3177385, 2.4774771}, +{0.1600637, 0.4352590, 2.5726357}, +{0.1370677, 0.3940715, 2.9506955}, +{0.1213950, 0.4857848, 2.9731758}, +{0.1462143, 0.3499384, 3.0351403}, +{2.9936411, 2.4298966, 0.1545147}, +{3.0637307, 2.4596384, 0.0965042}, +{3.0358431, 2.3665385, 0.2125411}, +{1.1097623, 2.8952229, 2.5843840}, +{1.1726384, 2.8408015, 2.5369790}, +{1.0356706, 2.9039829, 2.5244172}, +{2.2861288, 0.1613493, 0.5273755}, +{2.2930152, 0.0899590, 0.5907657}, +{2.2669575, 0.2386985, 0.5804027}, +{3.0232577, 3.0092733, 1.1222072}, +{3.0991778, 2.9950588, 1.1787440}, +{3.0278275, 3.1019819, 1.0988289}, +{1.6569895, 2.8618333, 2.1561284}, +{1.5619893, 2.8568413, 2.1455276}, +{1.6816905, 2.7763085, 2.1913092}, +{0.9384512, 2.9352140, 0.1355221}, +{1.0034959, 2.9126794, 0.0690111}, +{0.9480820, 2.8673999, 0.2023862}, +{2.9521964, 0.3785538, 2.2238338}, +{3.0048425, 0.4566935, 2.2407119}, +{2.8901725, 0.3752703, 2.2966662}, +{2.4926538, 1.0239352, 0.6558312}, +{2.5726750, 1.0749843, 0.6681965}, +{2.4501441, 1.0640253, 0.5800155}, +{1.1752639, 3.0708451, 0.9287288}, +{1.1221246, 3.1504412, 0.9304650}, +{1.2445648, 3.0896888, 0.8654468}, +{0.7207608, 0.3416515, 0.0138317}, +{0.7764910, 0.2639305, 0.0178195}, +{0.7814180, 0.4151187, 0.0230829}, +{0.0851030, 0.2332970, 0.0435002}, +{0.1223862, 0.1473273, 0.0630318}, +{0.0045395, 0.2141206, -0.0045009}, +{0.4287913, 0.1142516, 0.6276417}, +{0.4935105, 0.0554844, 0.6666309}, +{0.4808621, 0.1800374, 0.5815638}, +{0.9779723, 1.9098200, 2.5051026}, +{1.0436462, 1.9792796, 2.5100632}, +{0.9404826, 1.9185191, 2.4174604}, +{1.3789229, 1.6226406, 0.4962055}, +{1.3935698, 1.6309760, 0.5904303}, +{1.4666483, 1.6253028, 0.4580022}, +{2.0937119, -0.0106692, 0.0739963}, +{2.0536013, 0.0656805, 0.0324732}, +{2.0497866, -0.0176778, 0.1587534}, +{1.2012807, 2.9428875, 0.5265773}, +{1.1624990, 2.9133654, 0.6089590}, +{1.1908652, 3.0380294, 0.5279399}, +{2.2791674, 0.8963562, 0.7781890}, +{2.3401039, 0.9454984, 0.7231063}, +{2.2278645, 0.8441652, 0.7164928}, +{0.1630015, 2.5044470, 2.7893100}, +{0.1709897, 2.4179647, 2.7490694}, +{0.2294918, 2.5575144, 2.7454328}, +{0.7060483, 1.7318893, 0.0501555}, +{0.7625076, 1.7944364, 0.0955704}, +{0.6291210, 1.7829723, 0.0249558}, +{1.1033484, 1.0437927, 2.1403103}, +{1.0219363, 0.9946458, 2.1512179}, +{1.0911753, 1.0925208, 2.0588257}, +{1.9177777, 0.5504727, 0.5690043}, +{1.8460517, 0.5927682, 0.5217941}, +{1.9234505, 0.4629906, 0.5305724}, +{1.4972737, 1.9489530, 1.3204033}, +{1.4237723, 1.9750997, 1.2649396}, +{1.5424597, 2.0309098, 1.3404934}, +{0.8835701, 1.4280628, 0.1674865}, +{0.8531773, 1.4165682, 0.2575225}, +{0.8745712, 1.5219163, 0.1509677}, +{0.1678406, 1.7229354, 2.1899519}, +{0.2111494, 1.6641072, 2.1280980}, +{0.0743808, 1.7103669, 2.1735318}, +{2.0397434, 2.1219344, 1.4409180}, +{2.0295677, 2.1699316, 1.3587289}, +{2.1087670, 2.1689291, 1.4877107}, +{1.2581902, 1.4289570, 1.6551967}, +{1.2654010, 1.4368232, 1.7503201}, +{1.1978847, 1.4988495, 1.6298869}, +{2.9910946, 3.0806005, 0.1484258}, +{2.9137793, 3.0751080, 0.2045908}, +{3.0470388, 3.0086098, 0.1775783}, +{1.0610830, 0.7047814, 1.1418353}, +{0.9734507, 0.6746404, 1.1658028}, +{1.0458002, 0.7749794, 1.0785819}, +{1.6532741, 2.9580233, 1.0485057}, +{1.5689507, 2.9165225, 1.0303516}, +{1.6545630, 2.9690583, 1.1435788}, +{0.8091365, 0.0285435, 3.0111480}, +{0.8982949, 0.0388860, 2.9778893}, +{0.8186450, 0.0310841, 3.1063607}, +{0.5036963, 2.0880661, 2.5342636}, +{0.5332928, 1.9970473, 2.5328660}, +{0.5832631, 2.1388848, 2.5500402}, +{2.2328618, 1.9671422, 1.2397304}, +{2.3016095, 2.0160425, 1.2849501}, +{2.1618116, 1.9610965, 1.3035868}, +{0.2239179, 2.1884501, 0.9155824}, +{0.2009252, 2.1424413, 0.9963093}, +{0.2424263, 2.2781026, 0.9435503}, +{0.8877732, 0.5404216, 0.8066940}, +{0.8117438, 0.4826351, 0.8001699}, +{0.8577675, 0.6134664, 0.8607905}, +{2.9464774, 2.8448186, 0.8989243}, +{3.0209310, 2.7910399, 0.8719642}, +{2.9804733, 2.8987021, 0.9703608}, +{2.1073101, 2.4336813, 0.7530645}, +{2.1230614, 2.4845641, 0.8325954}, +{2.0143700, 2.4467690, 0.7342715}, +{0.4704227, 1.2409600, 1.7399371}, +{0.5620813, 1.2400131, 1.7123669}, +{0.4735311, 1.2236216, 1.8340223}, +{0.2758942, 0.8356323, 2.8198159}, +{0.3543517, 0.8435117, 2.7655511}, +{0.3035489, 0.7822455, 2.8942967}, +{2.8781021, 0.7768593, 2.7527759}, +{2.9437192, 0.8390787, 2.7213841}, +{2.8006170, 0.7948696, 2.6995406}, +{1.8004808, 2.0260513, 3.0032859}, +{1.8451598, 2.0846167, 3.0644105}, +{1.8136942, 2.0663745, 2.9174852}, +{2.5159631, 1.3368416, 2.1436698}, +{2.6018269, 1.3573978, 2.1066947}, +{2.4535270, 1.3737060, 2.0811794}, +{2.8697185, 0.1857669, 2.4604704}, +{2.7906508, 0.1627211, 2.4116902}, +{2.9394827, 0.1358934, 2.4179509}, +{1.1319151, 0.6919709, 1.6536973}, +{1.1910840, 0.7571264, 1.6913286}, +{1.1123677, 0.7251487, 1.5660647}, +{2.0596511, 0.1310353, 1.6251073}, +{2.1053870, 0.2043649, 1.5839574}, +{2.1293004, 0.0782273, 1.6641278}, +{0.9130408, 2.0109093, 0.2851326}, +{0.9477964, 1.9251004, 0.2608174}, +{0.8233567, 2.0107808, 0.2516800}, +{2.2523642, 0.3065261, 1.4769527}, +{2.1838825, 0.3723898, 1.4653536}, +{2.2738736, 0.2784200, 1.3880161}, +{2.9289901, 1.1891373, 0.7054088}, +{2.8951311, 1.1213962, 0.6468679}, +{3.0086887, 1.1511707, 0.7424086}, +{1.6172851, 2.7285078, 1.4677424}, +{1.6248428, 2.7082646, 1.5609916}, +{1.7015549, 2.7023394, 1.4306459}, +{0.9118999, 1.5540966, 2.1797655}, +{0.9988176, 1.5226667, 2.2046609}, +{0.9286639, 1.6201829, 2.1125798}, +{1.8577038, 0.3123721, 0.4259824}, +{1.7935623, 0.2699088, 0.4829479}, +{1.9066210, 0.2399911, 0.3868619}, +{1.6782736, 2.6685839, 0.1501557}, +{1.7692950, 2.6398253, 0.1572518}, +{1.6737049, 2.7129440, 0.0654584}, +{2.8969524, 0.6093825, 0.5232357}, +{2.8875206, 0.5253476, 0.5680855}, +{2.8324332, 0.6662974, 0.5651913}, +{0.5251588, 0.7402523, 2.6969964}, +{0.5936854, 0.7999436, 2.6669402}, +{0.5720883, 0.6724310, 2.7455785}, +{1.7043184, 0.9188465, 2.3983524}, +{1.6931951, 0.8330535, 2.4393177}, +{1.7188920, 0.8994651, 2.3057549}, +{0.3658168, 2.3391819, 1.8964130}, +{0.3424776, 2.3354075, 1.9891672}, +{0.4530553, 2.3000312, 1.8920542}, +{0.2003765, 1.8361878, 1.4404087}, +{0.2785301, 1.8909607, 1.4477754}, +{0.2268270, 1.7643120, 1.3829929}, +{0.8779035, 1.1430768, 1.2612486}, +{0.8973404, 1.1811655, 1.1756111}, +{0.9162037, 1.2043930, 1.3239839}, +{2.1880777, 2.8796663, -0.0180342}, +{2.1398976, 2.8393123, 0.0541638}, +{2.1717946, 2.9734793, -0.0082194}, +{1.8784320, 2.6354129, 0.7891080}, +{1.9437256, 2.6465924, 0.8582029}, +{1.8214574, 2.7118821, 0.7973951}, +{1.2414686, 0.3467959, 1.1827204}, +{1.2969465, 0.2716064, 1.1619582}, +{1.2684450, 0.3728753, 1.2707799}, +{0.4696910, 2.0991523, 0.7883172}, +{0.4123033, 2.1233404, 0.8610077}, +{0.4795347, 2.1798031, 0.7377124}, +{0.8305964, 0.6751534, 2.5289936}, +{0.8204279, 0.6027634, 2.5907884}, +{0.9156948, 0.7132943, 2.5505769}, +{1.0174899, 1.7911044, 1.3506598}, +{1.0601589, 1.7646310, 1.4321512}, +{0.9299651, 1.7527054, 1.3558805}, +{0.6316745, 0.3783214, 0.6611996}, +{0.5958663, 0.3291134, 0.7350823}, +{0.5647446, 0.4438088, 0.6413473}, +{1.6425643, 0.7000317, 0.4213622}, +{1.7280147, 0.7141162, 0.3805923}, +{1.6527015, 0.7335858, 0.5104334}, +{1.1330942, 0.0406595, 2.4146397}, +{1.2183986, -0.0027429, 2.4133332}, +{1.1478934, 0.1239188, 2.3697934}, +{2.8466637, 2.6961110, 2.5011537}, +{2.8191767, 2.7140822, 2.5910635}, +{2.7833884, 2.6318057, 2.4691637}, +{1.0341512, 2.1846373, 1.0978242}, +{1.0069698, 2.0939112, 1.1116887}, +{1.0853837, 2.1822073, 1.0170057}, +{0.1365953, 0.1719048, 2.7987103}, +{0.1584627, 0.2343351, 2.8678954}, +{0.1328731, 0.2247992, 2.7190194}, +{0.7168369, 1.2508167, 1.6494938}, +{0.7857752, 1.2773249, 1.5886076}, +{0.7638478, 1.2148193, 1.7247035}, +{2.8681543, 1.6885868, 1.1241422}, +{2.8835134, 1.6332468, 1.2007183}, +{2.9374192, 1.7545414, 1.1279746}, +{1.1623275, 1.6367633, 0.3493694}, +{1.2317469, 1.6440940, 0.4148639}, +{1.0871481, 1.6806860, 0.3891334}, +{1.4521078, 0.1351103, 0.3432480}, +{1.3832349, 0.0933540, 0.2915252}, +{1.4236991, 0.2261031, 0.3519418}, +{0.8650972, 2.4736595, 2.9118011}, +{0.9075109, 2.3880019, 2.9169161}, +{0.7795016, 2.4604759, 2.9525673}, +{1.9729780, 1.2322768, 1.8556480}, +{1.9931359, 1.3186145, 1.8917284}, +{1.9017249, 1.1994421, 1.9104861}, +{0.9686258, 0.4839060, 0.3089988}, +{1.0579994, 0.5075947, 0.2842288}, +{0.9380490, 0.5576745, 0.3617775}, +{1.1664323, 2.4949052, 1.3470272}, +{1.1619846, 2.4332762, 1.2739219}, +{1.2154081, 2.5695422, 1.3124876}, +{1.8956073, 1.5583949, 0.0690517}, +{1.9310175, 1.6302878, 0.0167083}, +{1.9627470, 1.5415760, 0.1351706}, +{1.5064046, 1.0762715, 1.7345712}, +{1.5842536, 1.0842133, 1.6794459}, +{1.5339825, 1.1096946, 1.8199215}, +{1.5876601, 1.9028364, 0.3956352}, +{1.6268866, 1.8814853, 0.3109727}, +{1.4971380, 1.9260508, 0.3749187}, +{0.8584031, 0.5936577, 0.0163770}, +{0.9082285, 0.6110443, -0.0634820}, +{0.9223219, 0.6030391, 0.0870077} +}; + +const std::vector vel = { +{0.1463685, 0.3065207, 0.3287848}, +{0.7371281, 0.5779085, -1.0004199}, +{0.5550961, 1.1852636, -1.8387126}, +{1.9295115, 2.4173758, 1.1612775}, +{0.1902543, 0.6539089, -0.0383688}, +{-1.5028324, 1.6359708, 1.3793683}, +{1.9993781, -1.3913143, -2.2550328}, +{-0.3714653, -1.4523178, 0.4398792}, +{-2.4598849, -1.4385419, 1.3378714}, +{0.3383568, 0.7856591, 0.9813646}, +{-0.2263594, -0.1698561, -0.1705628}, +{-0.3753851, -0.0276462, -0.6656810}, +{0.8879443, -0.1145656, 1.7698814}, +{-0.5375338, 0.8311055, 0.0003367}, +{0.6233839, 2.9981489, 0.7811897}, +{2.8068020, 1.5577713, -1.2673179}, +{0.4908920, -0.1016197, 0.2136895}, +{-0.4164982, -0.3558269, 0.7050512}, +{-1.4413939, -0.2053909, -1.1536202}, +{0.1910874, -0.4855185, -0.2668713}, +{1.2523756, 1.4426663, 1.7331120}, +{-0.2925380, 1.4046954, 0.4895649}, +{-0.1838700, -0.7461997, 0.0751644}, +{-0.8027396, 1.4148548, -0.1457542}, +{2.7184405, 0.1154586, -1.8597050}, +{0.2690345, 0.4976957, 0.1210623}, +{0.2330270, 1.5617906, 1.5034759}, +{-0.5834623, 1.4057117, -0.8899866}, +{0.0163682, -0.2517941, 0.2510431}, +{-0.8889926, -0.0683436, -0.1141858}, +{-0.1489247, -0.5309870, 0.3066758}, +{0.5441253, -0.1158325, -0.1782701}, +{0.2506767, -0.9799866, 0.2347035}, +{0.4672806, -0.7008654, -0.4286981}, +{-0.2995699, 0.0365136, -0.1786350}, +{-1.1487139, 1.2540857, 1.8533340}, +{-1.7168502, -1.9573603, -0.3638210}, +{-0.2423436, 0.1349948, -0.4697222}, +{-1.9565589, -0.7184421, 2.8537061}, +{0.8596629, -0.5336328, 1.0651920}, +{0.3273928, -0.0453199, -0.3502595}, +{0.3189336, -0.0455603, -0.7143221}, +{0.2910797, -0.5063261, -0.5824001}, +{0.4780722, 0.2395895, -0.2683057}, +{-0.0853229, 0.7292104, 0.1628780}, +{0.1558332, 0.5232158, -1.0917240}, +{0.2999692, -0.0982003, -0.4960083}, +{1.8894519, 1.4626353, -0.6804298}, +{2.4061074, 1.2960715, -0.1970334}, +{0.1257670, 0.3494972, 0.2631694}, +{-1.5875477, 1.5959592, 0.5363353}, +{0.4914568, -2.1938405, 2.1225259}, +{-0.0307748, -0.5625980, -0.0021340}, +{-0.1677499, 0.2009291, -0.0115671}, +{0.3787732, -1.2403874, -0.1354211}, +{-0.0788009, -0.0443135, 0.5921396}, +{-0.7452830, -0.0596749, -0.9905685}, +{1.6973567, 2.2585990, -0.3537931}, +{0.5157012, 0.0667297, -0.3583508}, +{-0.2514844, 0.3777169, -1.7781777}, +{-0.1449715, 0.1046431, -1.0421330}, +{0.4883428, -0.0447277, -0.4162643}, +{0.1407105, 0.0701114, 0.0320429}, +{-0.0063489, -3.0579305, -0.8119215}, +{-0.2687715, -0.1601332, 0.0214399}, +{-0.2032076, 1.1673429, -1.0753449}, +{0.2939929, 0.7388926, 0.1571736}, +{-0.3771812, 0.2392884, -0.3747415}, +{0.0225571, 0.4657770, 1.0899161}, +{-0.2923067, 0.5687450, 1.3903265}, +{0.1170864, 0.0385553, -0.1568191}, +{0.0010100, 0.2176969, -0.1234210}, +{1.9490565, -0.4967891, -0.6301463}, +{-0.0859401, 0.1133912, 0.8298548}, +{-0.1202616, 0.5685778, 0.6898854}, +{-0.3881985, 0.4002085, 0.9764838}, +{-0.1507751, 0.2457515, -0.7290401}, +{-0.5772744, 1.4680581, 1.6817755}, +{1.0109506, 0.6715226, -1.2050654}, +{0.4536923, -0.7803533, 0.6021280}, +{0.9260955, 2.3135042, 0.9460802}, +{-0.9477729, -0.6069506, -1.0168848}, +{-0.2383449, 0.4078479, 0.1112495}, +{0.1125705, 0.3929870, -0.2907176}, +{-1.3702412, 0.9092309, -1.8898387}, +{-0.3272168, -0.1913895, -0.5143399}, +{0.4256406, 0.3591474, -0.3412583}, +{-0.6632770, 0.1610496, -1.5580477}, +{0.3964951, 0.1072337, -0.3882289}, +{0.7646788, -0.5012527, 1.0678464}, +{0.6020142, 2.1914575, -0.2719928}, +{0.1644063, 0.1263480, -0.2869909}, +{0.9220442, -0.5001076, 0.9623897}, +{1.0921648, -3.4606965, 0.3144048}, +{0.6120083, 0.1973298, -0.2805130}, +{1.3155607, -0.1937509, -0.6840057}, +{0.6153530, 0.4152285, 1.0085553}, +{0.2301100, -0.1650680, -0.0686902}, +{0.4512722, -1.0075990, 0.4520470}, +{-0.2611319, 2.2028799, -3.3089883}, +{-0.5119643, 0.5145530, 0.0098749}, +{0.0152831, 1.6550369, -0.1497427}, +{-0.4481210, -1.3859713, 0.9077368}, +{-0.2020931, -0.0773476, 0.4367960}, +{1.6142554, -0.7840701, 0.4810923}, +{0.0643875, 1.3944364, 1.6292443}, +{0.0597737, -0.3002678, -0.3816536}, +{-1.0448049, -0.4816298, 0.3494129}, +{1.0587531, -0.0821829, -1.3195734}, +{0.0280838, 0.0893796, 0.3241968}, +{-0.2812809, -0.0044406, 0.2781212}, +{-1.3846875, 0.9941797, 0.0024104}, +{0.5937585, 0.1984814, 0.3690110}, +{-0.1365554, -1.2706884, 1.2370665}, +{-0.2694786, -0.3533167, -1.3227085}, +{-0.4383570, -0.9224468, -0.4340020}, +{-0.7551824, -1.4043826, -0.4668837}, +{-0.8223447, 0.3034808, -0.2149989}, +{-0.1082864, 0.0745128, 0.1312838}, +{-0.1487938, 0.1547110, -0.1178106}, +{-2.2985251, -0.9117764, -0.2153925}, +{0.0990336, -0.7630978, 0.3328875}, +{-0.8767101, -1.1642810, -1.9598871}, +{0.1997163, 2.5703723, 1.3570105}, +{0.3229017, 0.1493778, 0.2412831}, +{1.5442365, -1.3333116, 1.9242618}, +{-1.1031361, 0.8563766, -1.6298008}, +{-0.0255275, -0.3312931, -0.2943460}, +{-0.1994761, -1.1005089, -1.0633765}, +{0.5494161, -2.7048810, -1.8622029}, +{-0.4401251, -0.2993797, -0.0643224}, +{0.1242682, -1.6107864, -1.0645754}, +{2.5068457, -0.6040909, -0.5811095}, +{-0.1375492, 0.2089872, -0.4277659}, +{-1.5198183, 1.1994056, -1.2697433}, +{-0.1255727, 0.8947816, 1.1931859}, +{0.3675741, -0.2461770, -0.5340475}, +{-1.4963267, -1.2458730, 0.5039476}, +{-1.0796977, -1.5002230, -0.3408699}, +{0.5704201, -0.3208803, 0.5936826}, +{-0.0645790, 0.7497386, -0.7542320}, +{0.2708243, 0.4285077, -0.4548926}, +{0.3694951, -0.5429232, 0.7394574}, +{0.4029164, 0.8574382, 0.0679616}, +{-0.2772374, -3.0572729, -1.1541784}, +{0.2747530, -0.3619337, 0.3421585}, +{0.8771745, -0.7368845, 3.2058256}, +{1.3855928, -2.1130569, -0.9536069}, +{-0.4836731, -0.1780420, 0.5947607}, +{0.2505015, -0.3182768, -0.3001915}, +{-1.1785871, 0.9712771, 0.1857460}, +{0.1791360, 0.4256015, 0.2411605}, +{0.0949873, -1.9160255, 1.9706528}, +{0.6721850, -0.2948928, -0.4824503}, +{-0.0978403, 0.6559012, 0.3559941}, +{1.7525223, 0.8271949, 0.1785358}, +{-0.4757381, 0.3561969, -1.3458381}, +{0.4658725, 0.2744318, -0.3452308}, +{0.8478040, 1.4294609, -0.8133759}, +{-0.5885894, 0.1219341, -0.6724163}, +{0.1305106, 0.2857761, -0.5160971}, +{0.0919217, -0.7459833, -0.5063521}, +{0.2242723, -0.5813210, -0.3394017}, +{0.1403195, 0.3404832, 0.4354262}, +{0.5582833, 3.7375681, -3.2719817}, +{2.3144352, -0.7304362, -1.0354159}, +{0.0564519, -0.1415871, -0.1578124}, +{1.8414284, -1.9642483, 0.0464570}, +{-2.8368704, 1.5143878, -0.6798729}, +{-0.3573252, -0.6014078, -0.5150779}, +{-1.7724653, -2.6391764, 0.2415990}, +{-0.7749498, 0.4440289, 0.6428634}, +{-0.0909959, 0.6293582, 0.8031600}, +{-1.8792617, -0.5474257, -0.5913790}, +{0.8747709, 1.8465655, 0.5552957}, +{-0.1791926, 0.2169411, 0.5043762}, +{0.4750830, 0.2194068, 1.8890547}, +{1.3510096, -0.4896438, -0.2842244}, +{0.2964395, 0.2451214, -0.3959046}, +{0.4008227, -0.1559107, -0.4080295}, +{2.4716084, 1.3746006, 1.2460773}, +{-0.2873621, -0.0548715, -0.3045356}, +{-1.0872899, -0.9724135, -0.6489921}, +{0.4869141, -0.2083705, -1.0554188}, +{0.1693709, 0.0004103, 0.0232621}, +{-0.7277920, 0.5750959, -0.2825442}, +{0.9503970, 0.5802715, -0.4494333}, +{-0.3158120, -0.1988707, 0.2011052}, +{-0.0509036, 0.4959302, 1.2131239}, +{-1.0217791, -0.0612856, -1.0136371}, +{-0.1174749, -0.7295172, 0.2806762}, +{0.3812415, -0.3918555, -1.0103766}, +{1.0120203, 0.4253646, 0.0034888}, +{-0.6076309, 0.3837580, 0.4137383}, +{-1.3120896, 0.3274231, 0.5356969}, +{-1.3723847, -1.0041860, -0.5755426}, +{0.2854691, -0.0545563, -0.1344180}, +{0.5715818, -0.0401829, 0.6594520}, +{-0.0859181, -0.4678149, -0.2037510}, +{-0.1389900, 0.4522794, 0.0672570}, +{0.6666835, 0.3444074, 2.9537859}, +{-0.3528512, 1.2960987, -1.6589533}, +{-0.2094915, 0.6504480, -0.0413949}, +{0.5830479, 1.4213958, 2.7095990}, +{-0.3488207, -2.7650273, 0.6529962}, +{0.5683576, 0.0420401, -0.3145432}, +{0.5255090, 0.5160358, -1.0943756}, +{-0.2616756, 0.5381373, 0.0909482}, +{0.1585326, 0.0909941, 0.4472848}, +{-1.4557503, 0.0540859, -1.2026528}, +{-0.8199168, -0.1020053, 1.7692349}, +{0.6539758, 0.2987118, -0.1798107}, +{2.6815250, -0.2173550, -0.4194057}, +{-0.7916324, -1.8644089, -0.4823986}, +{-0.1490412, 0.6295601, -0.0197517}, +{-0.3245004, 2.0755067, 0.9418771}, +{-3.4721551, 0.3380259, -0.7584451}, +{0.3041831, 0.4033696, -0.3527086}, +{1.1359482, 1.0477014, -0.9718602}, +{-0.2023261, 1.2709041, -2.7235115}, +{0.3146465, 0.2191468, -0.0607031}, +{-0.0037861, 0.9604566, 0.7284797}, +{-0.4148546, 2.0286467, 1.8806714}, +{-0.1704783, -0.8613182, -0.5558572}, +{0.0045281, -0.8705695, -0.4988864}, +{-0.9933478, -0.0220226, 1.8110865}, +{0.0000631, -0.1630390, 0.5633530}, +{1.2073320, -2.5777371, -0.0320323}, +{3.5872779, 1.2186457, -0.0907143}, +{0.1070623, 0.3744718, -0.0653850}, +{1.0001283, 0.3059500, -0.9486852}, +{-0.0936398, 1.9388126, 1.4607439}, +{0.0648986, 0.5466510, 0.3763338}, +{0.4360310, -0.4910959, 1.4234331}, +{-0.8414136, -0.3405721, -1.0278348}, +{0.1501031, 0.3637626, -0.4662275}, +{-0.9113928, 0.2985925, -0.2424654}, +{-0.1585872, -0.9677805, 0.2978905}, +{-0.2356514, 0.1680351, 0.3305846}, +{1.3894721, -0.7831209, 0.2185763}, +{-1.6058164, -0.7840036, 0.1217850}, +{-0.5304492, -0.0053840, -0.0397147}, +{-0.6891729, -0.8453297, -0.6892318}, +{-2.1590698, 0.1574314, 0.1773291}, +{0.3795578, 0.0669959, -0.1586484}, +{-0.4403888, -1.7437466, -1.3736960}, +{0.1112398, 0.0629726, 0.7357940}, +{-0.4289644, -0.7219931, 0.0410823}, +{-1.9703021, -0.1922213, 0.7319959}, +{-2.3396277, -1.8430122, 0.8207880}, +{-0.1674556, 0.4215150, -0.4904200}, +{1.4351790, 0.7337474, -1.5944686}, +{-1.5970559, -0.1244278, 0.1271944}, +{0.3355792, -0.4455394, 0.3222982}, +{0.6912493, -0.1259308, -0.4989391}, +{0.2912660, -1.3756368, 1.7640721}, +{-0.2381211, 0.0730320, -0.1056523}, +{1.5741251, 0.1920993, -0.7603070}, +{-0.0313910, 0.1369859, 1.7348821}, +{-0.2873937, 0.0185019, -0.1707978}, +{-2.3053272, -0.7575927, 3.0161331}, +{-1.3043399, -0.9400668, -0.4116636}, +{0.2422298, 0.2171435, -0.1978996}, +{1.5715605, 0.5110898, -0.3433310}, +{-0.2560965, -0.7728164, -0.4483792}, +{0.3465971, 0.1829943, -0.1122128}, +{-3.6038086, -2.2948482, 3.7347813}, +{0.3920422, 0.3339850, -0.1741748}, +{-0.1183182, 0.2837026, 0.1333865}, +{0.2041813, -0.1373797, 0.2821882}, +{-0.0557131, 0.8464879, 0.3983997}, +{0.3713892, 0.1857527, 0.4548483}, +{0.2865518, 0.8104321, -0.8182375}, +{0.9838055, 2.3792036, 1.1808696}, +{0.1367386, 0.2520233, -0.0759792}, +{0.8400723, -0.8654693, 0.4758402}, +{-0.1864849, 0.2790168, -0.5767189}, +{-0.4632595, -0.4361226, -0.0872157}, +{-1.2937758, -0.9207199, 1.7568275}, +{1.0593350, 0.9945173, 0.3722779}, +{-0.0093096, -0.1536174, 0.3646809}, +{-1.8179445, 1.0808601, -2.6092598}, +{4.5445037, -1.4661922, 2.1868107}, +{-0.6109890, 0.1912777, -0.1957564}, +{0.5192731, 1.2783483, -1.0224750}, +{-0.7259687, -2.0022244, 0.9973031}, +{0.1851406, 0.2087096, 0.2367882}, +{2.4313464, 1.5950943, 2.5163505}, +{0.7359058, -1.8946112, -0.9255536}, +{-0.3909338, 0.2707847, -0.1451767}, +{-0.5690331, -0.8336113, -0.7156954}, +{-0.4062643, 0.3687503, -0.5611530}, +{-0.2398030, -0.0119397, 0.9459276}, +{-0.5081778, -1.7486039, 1.5324827}, +{-1.2418389, 1.3765274, 1.8904744}, +{-0.4419993, 0.3387884, -0.6306401}, +{1.1215024, -0.0648428, -0.2971100}, +{-0.0637442, -1.7081922, 2.4175911}, +{-0.2256767, -0.5690064, -0.1422491}, +{-1.2355829, -0.1615474, 0.3237036}, +{0.4588714, -0.9437417, 0.2973320}, +{-0.4250144, 0.0096513, -0.0124992}, +{0.0899091, 1.6973963, 0.3672677}, +{-0.9629631, -2.1347768, -0.1570699}, +{-0.3425599, -0.4490806, 0.0283966}, +{-1.3060976, -0.6033320, -1.8992586}, +{-0.7450263, -0.5891393, -0.3961650}, +{-0.2645380, -0.4007787, -0.0335750}, +{0.1301489, -0.4958779, 0.2286615}, +{-0.5132384, -1.2561976, -0.0443789}, +{0.1204955, -0.3752933, -0.1110379}, +{0.3614887, -0.4529189, -0.8325626}, +{0.0298213, -1.4107805, -1.7971951}, +{-0.1875802, -0.0735401, -0.2082844}, +{-1.0671041, 0.1263986, 0.4622996}, +{-1.5922501, 0.5552923, 0.4501660}, +{-0.3994837, 0.2728696, -0.1648372}, +{0.5007105, 1.7821091, 1.1414150}, +{-1.1877351, -0.2607154, -1.3311883}, +{-0.1784391, -0.3389329, -0.3607011}, +{-0.2694132, 0.2286964, -0.2709657}, +{0.0138954, -1.5320725, -0.5891992}, +{-0.2294407, -0.1252427, -0.1959939}, +{-0.1857845, -0.8734263, -0.9948279}, +{1.1318990, 0.1178934, 0.9329372}, +{0.3094277, 0.0852543, 0.5415188}, +{-0.9586183, -2.7398086, 0.0353147}, +{0.0695670, 1.2083937, -1.7507937}, +{0.1578899, 0.2668372, 0.1712302}, +{0.7788315, 2.3678105, 0.0833213}, +{-1.2497391, -1.2441902, -1.2230326}, +{-0.1193902, 0.1320118, -0.4264402}, +{-0.0800737, 0.7922408, -0.1864870}, +{0.6491041, -1.5787383, -1.3634958}, +{0.1163738, 0.9949249, -0.1340376}, +{0.1656355, 0.9392821, 1.3841002}, +{-0.3156284, 1.2276682, 2.3234246}, +{0.0048379, 0.4775075, -0.2608450}, +{-1.3494797, -1.3089492, -0.8398163}, +{-1.4926242, 1.3765566, 0.2010730}, +{-0.1031815, 0.0690532, -0.0154183}, +{-1.0939105, -1.4593337, -0.9401022}, +{0.4175293, 0.4991472, 0.4809085}, +{-0.0126498, 0.0574988, -0.6334425}, +{1.3409929, 1.1031606, 0.8996344}, +{0.0004584, -0.0016399, -0.5869642}, +{0.5582238, 0.1899975, -0.3661042}, +{0.1883535, 0.3405917, 0.0429381}, +{-1.3838021, 1.5868164, 0.6275247}, +{-0.6289806, -0.6502675, -0.0752719}, +{-2.0805564, 0.2553050, -0.4071317}, +{0.4086489, -0.5034834, -1.0809975}, +{0.0929592, -0.4298325, 0.1247238}, +{1.6627530, 0.4103838, 1.3428448}, +{-2.2899046, 2.1782064, 0.3195259}, +{0.5879145, 0.1834967, -0.1727275}, +{1.5849533, -0.7238598, 0.6030142}, +{0.4655881, -1.1642094, 0.1762342}, +{-0.0035103, 0.6088200, 0.5954229}, +{-1.1432129, -1.0781606, -0.6292996}, +{-0.4284338, -0.3174027, 0.1460112}, +{0.0954719, -0.1586587, 0.0278252}, +{0.6001241, 0.0413552, 1.3833274}, +{-0.9770479, 0.7500701, 0.2264226}, +{0.2777718, 0.5718384, -0.4627188}, +{-0.3243649, 2.1833947, -2.8639286}, +{2.5957587, 1.8150169, 0.6206218}, +{-0.0459444, 0.1569581, -0.4359023}, +{-1.3571407, 0.6057548, 0.8166431}, +{1.7397357, 1.3031981, -0.4895906}, +{0.0732513, -0.0036223, 0.5333118}, +{0.6249190, 1.0907675, 0.9812954}, +{-0.0406285, 0.7902001, 0.1381157}, +{0.2812554, 0.8642562, 0.3073043}, +{0.5443220, 0.8112164, 0.3173150}, +{-1.1794060, 0.4653952, -0.1680422}, +{0.7782542, 0.5632150, -0.2806699}, +{-1.1499072, -1.9457122, 0.0446199}, +{-1.5672810, -2.7434442, -0.0141365}, +{-0.4427074, 0.2354949, 0.0595492}, +{-0.7595055, 0.0840971, 1.0885637}, +{2.1110585, 1.2906569, -0.5080402}, +{0.2412746, -0.4988034, 0.7184574}, +{0.7833550, -0.8475778, 1.9237827}, +{-1.1489927, -0.1466619, 1.0136181}, +{-0.2450144, -0.0381882, 0.5942707}, +{-0.2911897, -0.3144242, 1.2533340}, +{0.2048488, -0.0136309, 1.7100073}, +{-0.5580387, -0.0963491, -0.1555126}, +{-1.3942404, 0.3036195, -0.3265848}, +{-3.1224911, -0.1353183, -0.5867852}, +{0.7456514, 0.3294421, -0.1394125}, +{-1.9573339, 0.3761309, -0.6951956}, +{-0.6764378, 1.5425678, -0.5734640}, +{0.2407591, 0.1268796, 0.2447225}, +{-0.7002614, 0.0122787, -1.3364549}, +{-0.6048329, 0.1318130, -0.1676119}, +{0.4504908, -0.4163981, 0.5158382}, +{-0.4579805, -0.0982734, 2.0436692}, +{-2.5476120, 0.4458331, 1.2213143}, +{0.0319256, 0.1870618, 0.1629280}, +{1.1440634, 1.9053742, 1.4407378}, +{1.3344333, 1.5005298, -1.8995678}, +{0.1748469, 0.1184098, -0.5447508}, +{-1.5102245, 0.8198828, 0.3668833}, +{-2.4686098, 0.5112382, -0.4195992}, +{0.3162807, 0.4162404, -0.6274319}, +{0.0038307, 0.7471834, 1.1736321}, +{-0.0195135, -1.2599784, -0.1978804}, +{0.0297034, 0.4051444, -0.4162357}, +{-1.6291660, -0.3278001, -0.7457288}, +{1.0103220, -2.9933150, -0.3022198}, +{0.1099940, 0.0974567, -0.2178596}, +{-0.0889168, -2.5315740, 0.3288479}, +{2.9029288, 1.4863762, 1.1560531}, +{-0.4358510, -0.7107344, 0.2419842}, +{-0.4557346, -2.5348732, 1.0783981}, +{-0.3256189, -0.1360448, 0.5196061}, +{-0.3118595, 0.2990566, -0.1760474}, +{-0.4942809, 2.0054057, -1.0919424}, +{1.7754995, -0.2373658, -2.1146696}, +{0.0423195, -0.2077326, 0.7382157}, +{0.9029520, 0.3642891, -0.0041569}, +{0.9870696, 0.1679502, -0.0474408}, +{0.0814686, 0.3009713, 0.3983445}, +{1.1830866, 0.9861013, -1.2154138}, +{-0.7662681, 0.1533094, 1.2102867}, +{-0.9308919, -0.5224693, 0.3565955}, +{-1.0852178, -0.8918798, 0.4046309}, +{-0.7697254, -1.1038946, 0.8435305}, +{0.0099849, 0.0634709, 0.3780330}, +{2.3039122, 0.0298482, 0.3320339}, +{-0.6186993, 0.1970709, -1.6236813}, +{0.1296185, 0.3889717, 0.4551529}, +{0.0991211, -0.2524356, 0.0230410}, +{1.2994289, -1.9434847, -0.0762409}, +{0.1977101, 0.7129424, 0.4811994}, +{0.6452574, 0.1142559, -1.2645766}, +{1.4598246, -0.3629984, -0.6474956}, +{-0.1396337, 0.9131825, -0.0279219}, +{-0.7113034, 1.0358872, -1.0749922}, +{0.7230560, 1.6068482, 0.5849475}, +{0.7265717, -0.4277482, 0.4808604}, +{-0.0532368, 1.6218204, -2.0707946}, +{3.1800213, 2.4518912, 3.2820473}, +{0.1931886, 0.1240467, -0.0431288}, +{0.7176692, 1.3145341, 0.9054470}, +{1.6295356, 2.4653149, 0.8787692}, +{0.1966708, -0.2889460, -0.0766378}, +{1.7743597, 2.4096589, 1.2319211}, +{-0.5483743, -1.5472711, -0.1982777}, +{0.1436681, -0.0165277, -0.7655227}, +{-1.0719875, -1.6428086, 0.4593414}, +{-0.2827050, 1.3697498, -1.2367063}, +{-0.4354425, 0.0038599, -0.0425517}, +{-0.1681594, -0.1186207, -0.0813524}, +{1.1474094, 0.1009282, -0.1804746}, +{-0.2146244, -0.0389726, -0.2795366}, +{0.0372856, -1.5560427, 0.4896329}, +{-0.6697565, 0.2894795, -0.1284500}, +{-0.0171387, 0.4277870, 1.2031248}, +{0.8333345, -0.8604418, 0.1716001}, +{-1.6818731, 0.4227462, 0.5164634}, +{0.4516506, -0.4798773, 0.4543502}, +{0.4715748, -0.9500206, -0.4435107}, +{0.6515050, -1.6586150, -2.0808403}, +{0.2408126, -0.4327915, -0.0297934}, +{-0.1811754, 0.3194553, 0.2832988}, +{1.0936099, -1.7763960, -0.5329738}, +{0.6100679, -0.3310814, -0.0421963}, +{-0.7754856, 0.6387573, 1.1746291}, +{1.0334283, -0.1721340, -0.2478880}, +{0.7380448, 0.6572105, 0.0013778}, +{1.8119537, -0.4436382, -0.6038492}, +{0.0162070, -1.3612309, -1.0385182}, +{-0.1698613, -0.3463221, 0.4485960}, +{1.0597748, 0.0413585, -1.3879155}, +{1.2617191, -1.3189732, 0.2284200}, +{0.0205296, 0.1902005, 0.1247101}, +{-1.2843182, 0.7640929, -0.2627146}, +{-1.0009544, 0.3184503, -1.5302374}, +{0.6199213, 0.2490930, 0.0796102}, +{0.1985586, 0.0420452, 0.2123965}, +{0.4315653, 0.0426582, -0.7515965}, +{-0.4958139, 0.0512674, -0.2768683}, +{-0.8806074, -1.4739645, -1.8952284}, +{-0.2685585, 1.2167181, 0.8473479}, +{0.1985426, 0.1894547, -0.3911186}, +{1.8417711, 1.5517883, 0.3303861}, +{-0.6830100, -1.6951859, -1.5997601}, +{0.1419377, 0.3372928, -0.3692672}, +{-0.2712760, -0.0562181, -1.1328750}, +{-0.1590076, 0.0417397, -0.4969699}, +{0.0256213, -0.0660445, -0.1662798}, +{1.1585598, -0.3514498, 1.1304612}, +{-1.8711193, -1.2621781, -1.6427267}, +{-0.2227830, 0.0744338, -0.3502201}, +{-2.6888635, 1.0788891, 1.3289515}, +{2.5953224, 1.2135713, 1.9075688}, +{0.2316983, -0.4524636, -0.0063374}, +{-2.3347785, -0.8000957, -0.1065990}, +{1.9526070, -1.0923216, -1.2838069}, +{-0.2372181, -0.3247179, 0.8479786}, +{0.9403948, 0.1723811, 0.2459076}, +{-1.6623150, -2.1977525, 2.0999742}, +{0.1078532, 0.0672892, 0.0833597}, +{0.5270470, 0.9306274, -0.4761512}, +{-0.7489356, 0.5218527, 0.4708866}, +{0.3630867, 0.2109770, 0.5005177}, +{-0.0714462, 0.1451556, -0.3251097}, +{0.6894497, 0.1573944, -0.5179086}, +{0.3304723, -0.6630867, 0.2033796}, +{-1.6454142, 0.3296446, -0.7160465}, +{0.2209498, -0.6451601, 0.1993150}, +{-0.6143044, 0.1629350, -0.3242975}, +{0.5276386, 1.0065061, -1.2381550}, +{-0.6224092, 0.2296422, -0.3112732}, +{0.0668032, -0.2382753, 0.0800015}, +{0.5153065, 1.0713665, 0.7442328}, +{-0.5793806, 2.3141253, -1.2995306}, +{-0.3513901, -1.0235918, -0.4102322}, +{-1.8673074, -1.0916836, 1.4161215}, +{1.6333680, -0.1470933, 0.7457550}, +{0.5051037, -0.4764686, -0.2480365}, +{0.9144548, 0.0596116, -0.0749028}, +{2.7541027, -1.5974036, 0.7015495}, +{0.0292706, -0.1940958, -0.1112175}, +{-1.1682134, 0.7888774, -1.5811460}, +{0.2625289, 0.0252434, -1.1937791}, +{-0.2323791, 0.1015220, -0.1224154}, +{-1.2001604, 1.1123600, 0.6012703}, +{0.8172260, -0.2639899, 1.1362014}, +{0.3195513, 0.0192807, 0.6141720}, +{1.7978650, -1.5391456, 0.0542428}, +{-0.2397961, 0.1885594, 2.4371984}, +{-0.4344652, -0.2321434, -0.0609679}, +{0.1911214, -1.1111622, 0.4851777}, +{-0.7911862, -0.1472040, -0.6218022}, +{-0.1687428, -0.2282127, -0.2135310}, +{-0.2653959, -1.0971346, -1.3824099}, +{0.1437597, -0.0467571, 0.6256163}, +{0.1026253, -0.0522451, 0.4115557}, +{0.3849103, -0.8058050, 0.5530728}, +{0.5478404, 1.8026639, -0.1438039}, +{-0.3318665, -0.1425077, 0.2269126}, +{0.9569576, 0.1762537, -3.7831697}, +{-0.6461208, 1.6726865, -0.2906004}, +{0.0469429, 0.0932064, -0.0183315}, +{0.4499544, -2.0204656, -1.9110529}, +{0.1828012, -0.0946532, -0.1773460}, +{-0.4425732, -0.6038175, -0.2758141}, +{-0.7297411, -2.2255304, -0.7644421}, +{-0.6245612, -1.8418353, -0.5259128}, +{-0.2482944, -0.2568923, -0.2475323}, +{-3.2902439, -1.8227388, -1.3184711}, +{-0.7895778, -2.1834373, 2.1704717}, +{0.1713545, 0.0833215, 0.0927554}, +{0.4684750, -0.5202142, 0.1633288}, +{-0.2248142, 1.9171182, -0.4785238}, +{-0.7282562, 0.2385765, -0.0863182}, +{-0.6713707, -0.4410611, -0.2741312}, +{-0.6246666, 0.8001646, -1.6645167}, +{0.4771382, -0.1935240, 0.1729348}, +{-1.5437796, 0.7738726, 1.7700567}, +{0.1360729, -0.2149984, 1.1724257}, +{0.3382888, -0.3772547, 0.1578808}, +{1.1463715, -1.4870659, -2.5929749}, +{0.4250661, 0.3625818, 0.6402887}, +{-0.6933657, 0.2452749, -0.0927253}, +{0.1034608, -0.0722048, 0.1624477}, +{-0.9913676, 0.4826180, -0.1433027}, +{-0.0935688, 0.1995428, -0.6547653}, +{1.1608191, 1.9049717, 1.2298814}, +{-0.1774498, -0.8843687, 1.8625182}, +{0.0649060, 0.0229402, -0.1101102}, +{-0.9751568, -0.5010555, -0.3973644}, +{-1.7760991, -0.0383224, 0.3454512}, +{0.1388863, 0.5901043, -0.1988644}, +{1.5061437, -0.2793217, -0.2188860}, +{0.4423154, -0.3261736, -0.6884017}, +{-0.5011950, -0.1937961, -0.3652804}, +{-1.6091956, -0.3768508, -1.2904631}, +{-0.0498179, -1.3552326, 0.4168391}, +{0.4871420, -0.0844197, 0.4141231}, +{1.1967162, -0.1929903, 1.3103484}, +{1.7376711, -0.6814843, 0.8886285}, +{-0.2198787, 0.5574673, 0.2460255}, +{0.2150799, -1.3087343, 0.3559752}, +{-1.2218831, 0.5380657, -1.0159523}, +{0.1443203, 0.5749034, 0.0385715}, +{0.4441847, 0.3773370, 0.2318112}, +{0.6086680, 0.6600190, 0.3307830}, +{-0.6305811, -0.0241498, -0.5585325}, +{-1.2629336, 0.5264137, -0.6838727}, +{-0.2790469, 0.0787013, 0.1279912}, +{0.4515101, 0.4630355, -0.0592275}, +{-2.2082412, -0.1157780, 2.7591558}, +{2.6254377, 0.7721573, -2.3700695}, +{0.5964879, -0.6634024, 0.1005411}, +{0.2230679, -0.0958167, 0.4818807}, +{0.0040714, -1.1369723, 0.2104573}, +{-0.4895777, 0.9856803, 0.3747058}, +{1.0104352, -1.9559741, 3.9424930}, +{1.1784228, 1.4385589, 1.8307393}, +{0.0420803, 0.3727090, -0.0107701}, +{0.8182687, 0.0478058, -1.3432561}, +{-1.1694639, 0.0408328, 2.5417483}, +{-0.6763859, 0.2878444, 0.4942393}, +{0.1243685, 0.1374741, 1.5603660}, +{0.1147208, 0.2810107, 1.3634101}, +{-0.1050683, -0.1473220, -0.2015614}, +{-0.0374588, 2.0923102, 0.0942508}, +{0.0205983, -0.4973688, -0.4818447}, +{0.0901658, -0.3304800, -0.0816921}, +{-0.7159080, 0.5326605, -1.4220891}, +{-0.1653469, 0.3636841, 0.9031263}, +{-0.5461826, 0.4525362, -0.4663099}, +{0.0494562, 0.5247145, -1.0797148}, +{-1.0430075, 0.6022653, -0.0255519}, +{0.3322296, 0.0496783, 0.7028545}, +{0.3383897, 1.1464728, -0.0528484}, +{-0.1388978, -1.0296679, -0.9013984}, +{0.3952397, 0.3032584, 0.3052112}, +{1.2931573, -0.5179526, 0.0129111}, +{0.1963011, -1.8124188, 0.7520064}, +{0.2012262, -0.1583487, -0.0001268}, +{-1.4672185, -1.0233493, 0.2545846}, +{1.5884234, -0.9333519, 1.3715085}, +{0.1188830, -0.1980365, -0.0329322}, +{-1.1231089, -0.5790876, -0.7454041}, +{-0.8376367, -0.0093966, -1.2741454}, +{-0.2342198, 0.0214044, -0.6899423}, +{-0.1818339, 1.2116463, 0.1587005}, +{-0.7155569, 0.4653520, 0.2098883}, +{0.1088703, 0.2968089, -0.6740763}, +{-0.6073536, -1.4580518, -2.2816110}, +{-0.0837315, 0.7664710, 1.2745030}, +{0.1859004, -0.3899764, 0.1142633}, +{-1.2068350, 1.4926564, -1.3185608}, +{2.1617467, -2.8792753, 2.0201926}, +{0.2498687, -0.3394863, 0.2944191}, +{-0.7181227, -0.1961430, 1.6538742}, +{-1.2979679, -0.9230468, 0.4094451}, +{0.6271785, 0.1229693, 0.1626972}, +{0.6945609, -0.1687448, -0.1565588}, +{0.9486411, 0.4357619, 0.2690426}, +{-0.2849867, -0.6687477, -0.3323660}, +{1.1012446, -1.9448905, -0.5869515}, +{1.9859772, -1.0816211, 0.5414605}, +{0.3309411, -0.2962353, -0.1247496}, +{-0.4865729, 1.7036346, 0.1238249}, +{-0.0071697, 0.5255533, 1.3408386}, +{0.2602957, -0.2987188, 0.5438851}, +{-1.0732430, -1.8404038, 1.3670008}, +{-0.9691575, 1.2968466, 1.8893991}, +{-0.2919253, 0.0596705, -0.2334005}, +{0.4998415, -0.5654499, -0.1635130}, +{-0.6991338, -0.2797665, 0.4048735}, +{-0.0417730, -0.0829125, 0.2179081}, +{-0.6631536, 2.0286617, -0.5463392}, +{0.1493269, 0.1373899, 2.0563958}, +{0.8031858, -0.2848160, -0.1938312}, +{-0.1967443, 1.9868751, -0.2113771}, +{1.6077106, 0.7962940, 1.3271849}, +{0.3491576, -0.4481419, -0.0900661}, +{-2.9178627, 1.7464836, -0.6685467}, +{1.6453142, -1.0443556, -0.4234403}, +{-0.2318110, 0.0447238, 0.1414759}, +{-0.5539651, 1.9298512, -1.2020015}, +{1.0433639, -2.3831403, -2.9409750}, +{0.0805327, -0.1738526, -0.1206513}, +{0.4744514, -1.1034139, -0.1170066}, +{1.8914403, 0.1751100, 1.5737721}, +{-0.1866357, -0.1965747, 0.0013580}, +{1.3352191, 0.2418026, -0.7325017}, +{-0.2074482, 0.9436374, 1.0509238}, +{-0.0441731, -0.2374072, 0.2654554}, +{-1.4433999, -0.0894649, 0.1726760}, +{-0.1908691, -0.1410689, 0.3854937}, +{0.4591390, 0.1630107, 0.2377752}, +{0.5573815, 0.1490560, 0.1248941}, +{0.6424958, -0.1623725, 0.8088378}, +{-0.6994920, -0.1504917, 0.0586263}, +{0.2837780, -1.2025059, 0.4124582}, +{-0.0899596, 0.8424039, -0.7575055}, +{0.0789143, 0.2707123, 0.0833020}, +{0.8126181, 1.1311893, -1.0460445}, +{-1.4918461, -1.3108680, -0.5690937}, +{0.4302622, -0.4091178, 0.2001499}, +{1.2112682, 0.2046875, 0.4236912}, +{0.0414143, -1.5320696, -0.1577607}, +{-0.1012601, -0.1323000, 0.0981359}, +{0.2046574, -1.2747016, -1.2746091}, +{-2.0603578, -0.3276038, 0.4406177}, +{-0.1841328, -0.0156229, 0.3134860}, +{1.0871761, -0.4058494, -1.3040427}, +{-0.6356373, -0.1624665, -1.7245725}, +{0.3627914, -0.0476817, 0.0575114}, +{-0.1324069, 0.1415620, 1.3400656}, +{0.1827174, 0.2003521, 0.5523353}, +{0.4810228, 0.1076838, 0.2522830}, +{2.9370706, -0.0954038, 0.6264281}, +{0.6254615, -0.5256260, 0.5936072}, +{0.0316204, -0.6257699, -0.4519276}, +{-2.0695536, 0.9822586, 0.1439757}, +{2.7216027, 1.6831150, 0.1612642}, +{0.0445529, -0.0587114, -0.1491662}, +{0.2308819, 0.3221707, 0.2789941}, +{-0.7229702, 0.0310881, 0.5714904}, +{-0.3543544, -0.4229161, -0.3544444}, +{-2.4002826, -0.8784989, -1.9358451}, +{-0.5860401, -1.6998978, -1.1202660}, +{-0.3376758, -0.1529908, -0.0973470}, +{0.8566210, 4.4951420, 2.8346822}, +{0.0436772, -0.0463138, 0.0772055}, +{0.3142985, 0.3843620, 0.3288855}, +{-0.0282029, -0.1860206, -0.7393309}, +{-0.7438108, 1.9849600, 0.7028209}, +{-0.2984794, 0.2821260, -0.0039806}, +{-0.9204457, 1.6704372, -0.8977507}, +{-0.7407014, -1.1821867, 1.7877913}, +{0.2195212, 0.6775700, 0.5270379}, +{1.6921985, 2.8719716, -0.1105642}, +{-0.9518794, 1.5843399, -0.4057731}, +{0.3007457, 0.0797739, -0.6140963}, +{-1.0546741, 3.2550197, -0.0514586}, +{-1.3599000, -0.4638538, -0.5689326}, +{0.2676970, 0.0099802, -0.2383103}, +{0.2229907, -0.2187119, -0.7713270}, +{0.1245931, -0.1537386, -1.1022911}, +{-0.0969429, 0.1980785, -0.1258376}, +{-0.3559177, -1.2704024, 0.1400192}, +{1.3204447, -0.3154615, 0.9846767}, +{-0.5822343, 0.3282806, -0.3363256}, +{0.2881370, 0.8619899, -0.7246667}, +{-0.8985610, -1.9429673, 0.4994654}, +{0.2642694, 0.0123944, 0.0454716}, +{-0.3724296, -3.0207868, -1.8849831}, +{2.8390129, 0.7341321, -0.5308905}, +{-0.1534186, 0.4427960, 0.8403004}, +{0.3607836, -1.3535297, 0.8387313}, +{-2.1323020, 0.7994025, 0.5441847}, +{-0.3715549, -0.1039985, 0.2071384}, +{-0.0269172, -0.7558493, 0.7305308}, +{0.8369414, 2.4781291, 0.6691754}, +{0.4176355, -0.5714498, 0.5489961}, +{1.5257384, -0.9230545, 0.1566381}, +{1.3391705, -2.1163802, -2.3188524}, +{-0.4110014, -0.1204128, 0.1673175}, +{0.8397112, 0.1425286, -0.1012473}, +{-0.7522697, -0.5696055, -0.7970169}, +{-0.5427265, 0.4417031, 0.3231464}, +{0.1184500, 0.7918240, 1.3904865}, +{0.8055788, 0.8408670, 1.0637318}, +{-0.5646585, 0.0173484, 0.0293131}, +{-0.9038788, -1.2464575, -0.7960548}, +{0.1062765, 1.9602034, 1.3337764}, +{0.1391939, 0.0422934, 0.0713286}, +{-0.0666521, -0.2542742, -0.0366458}, +{-0.6944364, -1.8178403, -1.2174358}, +{-0.0608818, -0.3761815, 0.4698532}, +{-0.5657020, -1.8425335, -0.6546760}, +{-0.2814495, 0.0367416, 0.0802845}, +{-0.6730975, -0.4910397, 0.2907047}, +{-0.0325192, -0.4107760, -0.0242306}, +{-1.3324134, -0.6451029, -1.8471091}, +{0.0912769, 0.5089654, 0.1652610}, +{-0.7731411, 1.2183405, -0.3799656}, +{-1.1314965, 0.1250667, -0.1002823}, +{-0.4562131, 0.1235238, -0.1567994}, +{-0.0909345, 0.2590376, 1.2533803}, +{0.5105567, -2.2766349, 1.5168715}, +{0.3537846, -0.5404130, 0.8426592}, +{1.9967562, -0.7133290, -3.4267285}, +{-0.2800933, -1.2731930, 3.2459073}, +{1.0584812, -0.2816274, 0.5952811}, +{0.0896634, -0.1932745, 0.4783768}, +{-0.2539656, 2.2155697, 2.1154668}, +{0.5293364, 0.8424042, -0.5720060}, +{0.9352719, 1.1218857, -0.6451174}, +{0.7291377, 0.8154290, -0.2816033}, +{-0.4218264, 0.0210873, -0.3800801}, +{-0.1526775, 0.9724866, -0.1957258}, +{-0.0597535, 1.2922356, -0.4251021}, +{-0.3818575, 0.7014705, 0.0247835}, +{-0.7392194, -0.5444721, -0.4205907}, +{-1.4152304, -0.8065771, -0.5260974}, +{1.1256009, 0.4991480, 0.1149021}, +{1.7105012, 0.5606990, -0.4032411}, +{0.4516316, 1.2219281, 0.9895386}, +{-0.1806890, 0.2285242, -0.4587750}, +{-0.8645759, -0.4874772, 0.3246976}, +{-0.1050305, 0.6367562, -0.6826100}, +{0.4090428, -0.1910766, 0.1086531}, +{1.0989276, -1.3616424, -0.6030692}, +{2.1074481, -0.8544232, -0.3117257}, +{-0.3725802, 0.0860330, 0.1150405}, +{-0.5086529, -1.6774005, -0.1062901}, +{-0.1353993, 0.7255187, -0.8362586}, +{0.1298556, -0.4293651, 0.3395422}, +{0.2269838, -0.6705311, 1.6363398}, +{0.3243878, 0.3028928, 0.9097213}, +{0.4288998, 0.2681254, -0.3544388}, +{0.4873610, 1.7590406, 0.5235385}, +{-0.5606039, -1.4191737, -0.2097450}, +{0.3870388, -0.1399861, 0.0797949}, +{-1.1184598, 0.9804789, -0.1342112}, +{2.5178926, 1.6618083, 0.3534633}, +{0.0756225, 0.3840773, -0.3764325}, +{-0.8271329, 1.8292952, -0.6255151}, +{-0.1168207, 0.3455733, 0.6372470}, +{0.1194294, 0.4205639, 0.1363528}, +{0.3654031, 1.5376556, -1.3719656}, +{-1.3993702, -3.2567592, 0.0692848}, +{-0.0606605, -0.3240614, 0.1275159}, +{1.6384506, -1.9960431, 0.7017054}, +{-0.8291278, 2.3747303, 0.0281784}, +{-0.0253615, -0.3758703, -0.2675837}, +{1.9031972, -2.6440711, 1.0290570}, +{0.4423905, 0.9294944, -0.6929308}, +{-0.1843192, 0.1737868, 0.2763541}, +{0.1109865, 0.1042268, -0.4985347}, +{-0.0179985, 0.5978048, 0.4580854}, +{0.2362465, -0.7950776, -0.4597905}, +{0.5376987, 0.1708956, -0.4879997}, +{1.7962449, 2.1350670, -0.5359567}, +{-0.8615303, 0.6115624, 0.5579742}, +{-1.1248866, 0.3180189, -0.8759377}, +{0.1928000, -0.5279638, -0.7078079}, +{0.1483086, -0.4060442, 0.1213455}, +{0.0046544, -0.1681650, -0.5256475}, +{0.0959436, -0.3405052, -0.1286223}, +{-0.1120882, -0.4962125, -0.0671635}, +{2.0156083, 0.6606585, 1.1232967}, +{-2.1377892, -1.7454376, -1.2312545}, +{-0.1151508, -0.3292519, 0.4903660}, +{-1.6555532, 0.9710532, -1.5222989}, +{1.6080265, 0.0912841, -0.5777804}, +{0.0786679, -0.0610863, -0.3810616}, +{-1.0303075, -0.1595926, 1.0494283}, +{-1.4975801, -1.3398944, -1.0533723}, +{-0.0479056, -0.2696638, -0.3301456}, +{1.6000353, 1.2549686, 1.3918270}, +{2.0823977, 1.9825615, 0.9892039}, +{-0.2380555, -0.3068946, 0.2657515}, +{0.1277418, 0.4347970, 0.6462319}, +{0.2540981, -0.1985672, -0.4360157}, +{-0.2746695, -0.1064759, -0.1104326}, +{1.7218870, -3.6415401, 1.1294148}, +{-1.6716542, -0.5351039, -1.9838389}, +{0.2873380, -0.2859172, 0.2119091}, +{-0.6798285, -1.7854609, -1.1579233}, +{1.3482976, 0.4627154, -0.8927142}, +{-0.0293049, -0.2728602, -0.3965062}, +{-2.4939141, -1.5540693, -0.8010911}, +{-0.6650036, -0.7372102, -0.9759117}, +{-0.0288995, -0.0730811, 0.0533930}, +{-0.0279839, -0.2011407, 0.6131526}, +{0.1886857, -0.3934399, -0.1063639}, +{-0.0120492, -0.5841720, 0.2398524}, +{-1.5828956, 0.3363243, 0.6882188}, +{-1.5861883, -0.2448012, -0.5048170}, +{0.4475064, 0.3646876, 0.3768864}, +{-0.6642146, 1.9723341, -1.1317384}, +{1.1643288, 1.3168014, 0.9964255}, +{0.1790287, -0.8319654, -0.3038422}, +{0.9809780, -0.9111070, -0.1117166}, +{0.8396344, 1.8756160, -1.6214850}, +{-0.4185068, -0.3354447, 0.0903963}, +{-0.2712748, 0.8100449, 0.4338563}, +{0.2863870, -0.2358233, -2.1097579}, +{-0.0115738, -0.0729377, 0.0846855}, +{-0.8700219, -2.4752393, -0.9674845}, +{0.0147204, 1.7888113, 1.3143852}, +{-0.0648608, -0.8295162, -0.7044052}, +{-1.1154621, -0.7724135, -0.6190951}, +{-0.9071154, -0.3540584, 1.8775876}, +{0.0021851, 0.6646261, 0.1571136}, +{0.3694316, -0.6876050, 2.0709667}, +{0.5496082, 1.4114635, -1.2418826}, +{-0.5012478, -0.3136389, -0.1313355}, +{0.3207036, -1.7452430, -0.4021553}, +{-0.9706793, 0.2772669, -0.0749163}, +{0.5276163, 0.1214517, -0.0447900}, +{0.6571423, 0.6483775, -0.2068788}, +{-0.6240408, -0.1099259, 1.4956752}, +{-0.3873582, -0.3227497, -0.2206017}, +{-1.0148128, 0.4047237, -1.1379207}, +{-0.5705405, 0.0184507, 0.7097415}, +{-0.1302813, -0.1808048, -0.2646863}, +{-1.0176399, -0.5757372, -0.2421686}, +{-0.3831736, 0.3707388, -1.1857501}, +{-0.0120249, 0.6274156, -0.3655988}, +{-1.7755460, 1.5170465, 0.9598688}, +{0.1083452, -1.3240900, -0.1684455}, +{0.2769104, 0.1550207, -0.1194407}, +{-1.9779207, -0.7400711, 1.1979021}, +{-0.3752154, 0.1354124, -0.3368089}, +{0.0770292, 0.2770732, 0.2806656}, +{-0.8199117, 2.3035879, -0.7413441}, +{-0.3167888, 0.9953279, -0.5583706}, +{0.1445103, -0.0531334, -0.0914499}, +{1.6064482, 0.8951194, -1.3239285}, +{0.7803992, 0.9423867, -1.9807590}, +{-0.4677485, 0.2416982, -0.4555058}, +{-0.3647484, 1.0247960, -0.0619486}, +{-0.1804494, -1.4674087, -1.9275825}, +{0.2387173, -0.5706677, 0.7144648}, +{-0.6439866, 0.5459545, -0.0835785}, +{-0.5322099, 0.3797651, 0.1304102}, +{-0.2134842, 0.4595691, 0.0916073}, +{0.1361900, 0.0548453, -0.2702972}, +{0.0759168, 0.6819580, -0.2381646}, +{-0.7477380, 0.2167950, -0.0361219}, +{-0.1997234, 0.0843940, 0.6742962}, +{-1.0638267, 1.0126488, 0.3251344}, +{-0.0287161, 0.3685032, 0.6627153}, +{0.2927418, 1.9055200, -2.0334110}, +{-0.1169094, -0.1142073, 1.3445948}, +{-0.4206590, -1.0892667, -0.1863347}, +{0.7595442, 0.1025411, -0.6347377}, +{0.1907749, 0.2210244, 0.7928779}, +{0.1143080, -0.4586751, -0.5704268}, +{1.0245123, -1.7858685, -2.6408331}, +{0.4836851, 0.5746071, -0.4565241}, +{-0.4827699, 0.4456111, 0.3430980}, +{0.0931147, 0.1592496, -1.3985071}, +{-0.0072752, -0.0220023, -0.4194836}, +{-0.5796382, -0.0475154, -0.1855450}, +{-0.3872371, -1.7428253, -0.7551222}, +{0.0315826, -0.6480781, 0.2688148}, +{-0.5874282, -0.0875469, 0.0463187}, +{-0.5923957, -0.1947587, 1.7799063}, +{0.2312946, 0.2475319, -1.2706620}, +{0.5641048, -0.2481861, 0.5240186}, +{0.0261816, -2.4947145, -1.1587911}, +{1.7608348, -1.2693007, 3.2263803}, +{-0.5083733, 0.2032893, -0.1613234}, +{0.7333117, 0.3023056, 0.2562569}, +{1.1723027, 3.9025340, 1.0625470}, +{0.1622269, -0.6884331, 0.8413754}, +{-0.7375718, -0.9083493, -1.0785823}, +{-1.7185649, 0.0896170, -1.7592167}, +{-0.2075505, -0.0748785, -0.1915358}, +{-0.0241743, 0.7003452, 0.8666585}, +{-2.4531255, 0.7417660, -0.9386693}, +{0.4501871, 0.5413329, -0.0072091}, +{1.8110631, 2.0477555, 0.3398954}, +{-2.2759910, -2.3665044, -0.5387013}, +{0.0733779, -0.1371206, 0.3853897}, +{1.0420384, -0.6176485, -0.4857108}, +{0.0509050, -0.2244190, 0.6014292}, +{0.0287327, -0.9357738, 0.1167291}, +{0.3814189, -1.2490888, 1.3466126}, +{0.0104009, -2.4812217, -0.2612014}, +{0.5770580, -0.3609296, -0.0323963}, +{0.4014660, -0.1011707, 0.0880173}, +{0.2136498, -0.3552507, 0.5978501}, +{0.1839118, -0.0506377, -0.2578527}, +{-0.7818285, -0.1656429, -0.7048721}, +{0.8239673, 1.4180502, -0.6775231}, +{-0.2911166, 0.2764204, -0.3457874}, +{-1.7180716, -0.3311240, 0.5362022}, +{1.3176218, 2.0183010, 0.4486347}, +{0.4689183, 0.1457495, -0.0206104}, +{-0.4776118, -1.6178166, 0.0380418}, +{-0.1496455, -0.5695428, -0.1371751}, +{0.5024773, 0.6058019, -0.1998769}, +{0.6603820, 0.6930051, 0.6372589}, +{0.9063758, 0.8917979, 0.5760033}, +{0.6421225, 0.6355802, 0.2973920}, +{-1.0687649, -0.9829665, 0.1538063}, +{-0.8526824, 1.4587477, -0.2966757}, +{0.0223462, 0.3008253, -0.2545978}, +{-1.4571317, 0.3766635, -0.3238012}, +{1.5459518, 1.5656438, -0.2944209}, +{-0.5556840, 0.0515023, -0.2577583}, +{1.3412727, 0.5881845, 1.7111564}, +{-1.4108151, -1.1496933, -0.5554047}, +{0.0045956, 0.2395171, 0.5065791}, +{0.4999195, 0.0637357, 0.9717458}, +{-0.0726863, 0.6653396, 0.1922251}, +{-0.1311285, -0.3149459, -0.1719224}, +{1.3888628, 1.4637512, -2.5333731}, +{-0.1213752, -0.8988352, -1.2517107}, +{0.2472762, 0.3650832, 0.2229694}, +{-0.0416910, -0.9376362, 0.8655400}, +{0.7907557, -0.4510517, 0.6592118}, +{-0.6397190, -0.4813672, -0.2047828}, +{-0.4087202, -1.0854791, -0.5484434}, +{-0.2506976, -0.6711457, -0.5203046}, +{0.2478454, 0.1736772, 0.2481167}, +{0.2287339, -0.7076337, -0.6379371}, +{-0.0392147, -0.4983051, 1.0891336}, +{-0.2133567, 0.2331813, 0.1998139}, +{-0.0792124, 0.5442614, 0.4720795}, +{0.6642052, 3.1903918, -0.9965443}, +{0.0904558, -0.1705763, -0.7270536}, +{0.9900735, 0.2333332, -0.9286861}, +{-1.9781489, -0.4937010, -0.4627864}, +{-0.1216439, 0.2876896, 1.3267334}, +{1.7290910, 2.9619906, 0.5600885}, +{0.5650162, 0.0353873, 0.6903539}, +{0.2920525, -0.3953127, 0.4534266}, +{2.4108098, -0.3961264, 1.7922213}, +{0.5278275, 1.2777495, 1.1654654}, +{-0.9360039, 0.5472942, 0.4653981}, +{-1.0688560, 2.0479159, -1.2617427}, +{-0.0728828, 1.8936592, -3.9346206}, +{-0.1031497, -0.2492748, 0.5487663}, +{0.7925220, 0.7190643, 1.7149022}, +{0.9006867, -1.5110803, -0.1062050}, +{-0.3657721, 0.2027529, -0.2533348}, +{-0.4350386, 1.0778517, 0.9415602}, +{-2.0702777, -0.0731439, -0.6239682}, +{0.3147205, -0.4098002, -0.3409688}, +{-1.5979522, -1.5614549, 0.5054327}, +{-0.1555167, -2.0362530, -0.3715915}, +{-0.2007851, 0.6768172, 0.2985771}, +{0.5494673, 0.1601586, -0.1047192}, +{-0.0960968, 0.7577488, 0.3337031}, +{0.6541576, -1.0118519, -0.2828183}, +{1.1880411, 1.4107165, -0.3248726}, +{-1.7504393, -0.3779505, -0.3790764}, +{0.2675515, -0.0044660, -0.5054805}, +{0.0930980, 0.4952496, 0.0303781}, +{0.0629057, -0.4397722, 1.0745928}, +{-0.4885741, 0.2579194, -0.0778611}, +{0.1632805, 1.3446612, 0.4088346}, +{-2.0047815, 0.6425509, -0.7499821}, +{0.4099120, -0.2162988, 0.3348934}, +{-0.0501539, -0.8605592, 0.5752473}, +{0.0653123, -1.1423181, 0.0200922}, +{-0.0962061, 0.1164308, 0.0176556}, +{-0.7279596, -0.9186597, -0.5732951}, +{-0.0782537, 0.4041039, 0.5243942}, +{-0.6958156, 0.1896553, 0.1482043}, +{-1.2049183, 1.7864807, -0.6340004}, +{-0.1822296, -0.7430115, 0.6273355}, +{0.4621048, 0.5747295, 0.4581633}, +{0.9755961, 2.0120721, 0.5746648}, +{-0.0509419, 1.0090145, -0.5811506}, +{-0.5385144, -0.1793862, -0.1812292}, +{2.5106833, -0.9608070, -0.9450576}, +{-1.4662577, 0.9597332, 1.0850371}, +{0.0384686, 0.6940241, 0.1179197}, +{-0.2129690, 0.6405184, 0.2064315}, +{-1.6216201, 0.3945326, 0.8845551}, +{-0.1326199, -0.2165685, -1.0582020}, +{-1.7355144, -2.6855524, -0.0841889}, +{1.9436344, 0.2477178, 0.4845693}, +{0.0159514, -0.0874918, 0.0755089}, +{-0.6708868, 0.6941916, -0.5396923}, +{-0.2529831, 0.8562879, -0.6597840}, +{-0.3966585, 0.1449992, 0.4314371}, +{-1.4822278, -0.5526297, 0.6686401}, +{0.6631591, -1.5461792, 0.0220727}, +{-0.5075291, 0.2605782, -0.2427005}, +{-0.9278137, -2.1222203, 1.2659264}, +{-0.6702179, 0.5327005, 0.9321823}, +{-0.2936811, 0.4471016, -0.0679108}, +{2.0285032, -0.5747636, -0.9899016}, +{0.6486916, 1.2817971, 0.4961734}, +{0.1220119, 0.2202735, -0.0195380}, +{1.8924577, 0.1806105, 0.2367189}, +{1.0686779, -0.0524534, -0.2435704}, +{0.1246269, 0.0249204, -0.0864869}, +{-2.6346996, -1.5761060, -1.8098959}, +{1.1744313, 0.5186895, 1.0227653}, +{-0.1206008, 0.3020298, -0.0446507}, +{-0.1809819, 0.0069468, -0.0961339}, +{-0.1900747, 0.0687461, -0.1166391}, +{0.4235168, -0.1354770, -0.0378911}, +{0.7577213, -0.5061796, 0.1528046}, +{0.4534358, 0.5500777, -0.7641627}, +{-0.8526109, 0.1675639, 0.6147290}, +{-0.9621929, -0.6056041, 1.0721420}, +{1.0512532, -1.6054955, -3.1321812}, +{-0.0489712, 0.0061946, -0.2572442}, +{-1.0615182, 1.3974590, -1.5627782}, +{-0.0166819, -1.9087529, -1.3830503}, +{0.2878510, 0.0728727, 0.0117204}, +{0.3478831, 0.1542938, 0.6262047}, +{1.3148408, -1.5552021, 1.6187809}, +{-0.4634721, -0.0250706, -0.4853891}, +{-0.5913132, 0.8454204, -1.4767524}, +{-1.0302474, 2.3538275, -0.2006505}, +{-0.0184647, 0.7669418, 1.1072351}, +{1.1901509, 0.0974018, 0.2551078}, +{-1.2220565, 1.4099977, 2.3064020}, +{-0.0062168, -0.1196021, 0.3338327}, +{0.4431188, 0.2678941, -0.9337452}, +{-1.4270200, 0.6710474, 0.5939987}, +{0.0420940, -0.0267296, -0.2268798}, +{-0.0632944, 1.2091922, 1.0222750}, +{-0.6536801, -1.9798430, 0.5617853}, +{0.0998024, -0.6474744, 0.3651051}, +{0.5790746, -0.9678676, 1.6352606}, +{0.5915990, -0.3450723, 0.1313806}, +{-0.7542649, 0.1129151, 0.1000805}, +{-1.8027197, -0.8199614, 0.1729337}, +{1.9305596, -0.2292191, 0.9563832}, +{0.4344710, -0.5465866, -0.0316753}, +{0.3123496, 0.8160999, 0.8936777}, +{-0.4728950, -0.8080313, 1.4018562}, +{0.6276084, -0.0016350, -0.1117846}, +{0.9931358, 1.3879637, 0.8743017}, +{1.0207120, 0.0657278, -1.1743382}, +{0.1619931, -0.1024326, 0.0937419}, +{0.3180248, 0.9032379, 0.5537096}, +{-0.4261253, 2.6898873, -0.0489018}, +{0.5232675, 0.5048167, 0.7344849}, +{1.4210351, 0.5483748, 0.0452680}, +{0.0143798, -0.0691210, 0.0810684}, +{0.4294192, 0.7324024, -0.0082809}, +{0.5578029, 0.0417751, 0.0348604}, +{0.4910645, 1.1223462, 0.0100009}, +{0.0799530, -1.0760900, 0.3549560}, +{-0.0536228, -0.7009214, -0.3362055}, +{-0.5438069, -0.4650533, 1.4558173}, +{0.1051633, 0.3451436, -0.0460200}, +{1.9935627, 0.9394432, 0.9642833}, +{-0.4528536, -0.1786502, 0.3352141}, +{-0.5991598, -0.0838078, 0.0970775}, +{0.1695312, 0.9471599, 0.3543916}, +{-1.6822418, 0.6872265, -0.1857792}, +{0.3858924, 0.2046919, -1.0853095}, +{-0.8596687, 2.3568258, 1.6267102}, +{-0.5045458, -0.0729235, 0.0459361}, +{0.6284422, -1.0192249, 0.0963944}, +{-0.5172116, -1.5094079, -0.4206231}, +{-1.2537881, 1.1635418, 0.0083325}, +{0.3028435, -0.6887947, 0.1333614}, +{-2.0041785, 0.0334768, -0.0201860}, +{-1.9642664, 0.5071329, 0.8378083}, +{-0.2620850, 0.0290688, -0.4039897}, +{2.0317256, -0.3730173, 0.4128231}, +{0.5062681, -0.7662380, -0.8661042}, +{0.3788313, -0.1222697, -0.2975189}, +{-0.3532661, -0.3484318, -1.3523638}, +{0.4544838, -0.1727787, -0.8750522}, +{-0.8397819, 0.7882631, -0.7200504}, +{-0.6082757, 1.1063069, -1.0049216}, +{-0.5397316, 0.8575091, -0.9645947}, +{0.1183377, -0.7251801, 0.4788089}, +{-1.5081551, 1.1400372, -2.5724635}, +{0.0880075, 2.0159881, 1.2291543}, +{-0.0740543, 0.2049074, 0.3368143}, +{0.0768263, 0.5414498, 0.7226129}, +{-1.5296005, 2.0622995, 1.5468980}, +{0.1396170, 0.3841613, 0.2034242}, +{1.4533156, 1.4930223, 1.3633511}, +{-1.8279350, -1.3113228, -1.7624665}, +{0.5484911, 0.1350848, -0.0805405}, +{0.0936660, -0.3812419, -0.3436798}, +{-0.1889361, 1.8312349, -2.9749336}, +{-0.3229899, 0.2515141, -0.5058979}, +{-0.1358183, 0.4249487, -0.3998701}, +{-0.3390605, 0.4336304, -0.6500424}, +{0.1666227, 0.1183850, 0.0625430}, +{0.9783803, 1.8006523, 1.6076189}, +{-1.6294143, -0.9719087, 1.3311400}, +{0.9115926, 0.2928475, 0.1998468}, +{0.7035761, 0.8010129, 0.0275981}, +{0.8571974, 3.4427328, 0.7010845}, +{-0.2997963, -0.4493451, -0.0307683}, +{1.5317101, -0.2873513, 1.4817172}, +{-1.0874724, -0.2871766, 0.0877547}, +{0.4040494, -0.6082664, -1.1973451}, +{-1.6685420, 0.0216910, -1.5668066}, +{0.8361052, 0.6182820, 3.1936123}, +{-0.9287706, 0.1068001, -0.4259240}, +{-0.2355944, 1.1718451, 0.6750979}, +{-1.5557357, 0.9892662, -1.0313249}, +{-0.0979675, 0.2831776, 0.5915201}, +{-0.7153503, -1.4448709, 1.4770329}, +{1.6560863, 0.4368499, 0.2376872}, +{-0.4515944, 0.5441716, -0.1561876}, +{0.1751060, -0.1159138, -0.6489440}, +{-0.8983976, 1.6260513, -1.1078227}, +{0.2689852, -0.3966255, 0.1420892}, +{-1.9064837, -0.5751402, -0.3919129}, +{-2.3102925, -2.5866795, -1.6262082}, +{-0.0172078, 0.3720778, 0.2099063}, +{1.3712870, 0.6646250, 1.8526826}, +{-0.2016302, -0.0983407, 0.8863665}, +{-0.0724852, -0.5409880, -0.1763042}, +{1.0414648, 0.9983483, 2.0752156}, +{-2.1019931, -0.3627156, 1.4446261}, +{0.1769724, 0.4729883, 0.6772742}, +{0.3125473, 0.3620763, 1.0973579}, +{-0.0371385, 0.2322066, 0.8364484}, +{-0.1613040, -0.2620757, -0.2569445}, +{-2.2559087, -1.7747374, 0.5973684}, +{-0.8588541, -1.4293799, 1.2074132}, +{0.0304699, 0.4706365, 0.2924025}, +{0.4877877, -0.4405352, 1.8307768}, +{2.0885613, 0.0379184, -1.8188802}, +{0.0740331, 0.4897541, -0.3967260}, +{-0.8889415, -0.5428897, 1.4722157}, +{-1.3586863, 0.2937176, 0.7478541}, +{-0.2450747, -0.1470140, 0.1792537}, +{-0.6562713, -0.2482109, -1.6881099}, +{-1.2947989, 1.1888698, 0.2909205}, +{-0.4733354, 0.1256735, -0.4475741}, +{-1.1302060, -0.1858992, -0.4109699}, +{0.7272552, -0.0600975, -0.0755262}, +{0.1759815, -0.1152923, 0.4950674}, +{1.4555954, 3.1599369, 1.0980743}, +{0.7639304, -2.2835431, -1.9383806}, +{-0.0151634, -0.1461978, -0.0723898}, +{-0.6230296, 0.2769712, 0.6596333}, +{-0.5590293, 0.6518141, -0.1338007}, +{-0.1701388, -0.0811140, -0.2851782}, +{0.5220708, 0.5652866, 0.6871241}, +{-0.9684417, 0.9273598, -0.6897836}, +{0.0747983, -0.0698491, -0.8042133}, +{1.2378569, -1.5453349, 0.8258891}, +{-1.2840354, 0.3716991, 0.7589560}, +{-0.0003867, -0.3035625, 0.3491605}, +{1.6129618, 1.6912571, -0.5594044}, +{-1.0754962, 0.4910495, -0.8879585}, +{-0.0052262, 0.1463952, -0.2062694}, +{-1.3676133, -0.4533890, 0.7213395}, +{1.5369675, 0.1867791, -0.6485514}, +{-0.7162792, -0.5250033, -0.8768279}, +{-0.1257063, -0.8207173, -0.3108927}, +{0.4422699, -1.0142028, -0.1185792}, +{0.1461655, -0.4889517, -0.7606444}, +{0.1277210, -0.7074326, -1.0483857}, +{-0.4863150, -0.5020490, -0.4203027}, +{-0.2430001, -0.4877402, 0.4610132}, +{1.1148614, -2.1291993, 0.0927693}, +{-1.2554029, -2.3351216, 0.2434097}, +{-0.2053048, -0.0787527, -0.2083896}, +{0.5002351, -0.5466514, -1.0731102}, +{-0.1513285, -0.0905989, -0.2023074}, +{0.6007293, 0.6420060, -0.2315201}, +{1.0522437, 0.1508992, 0.5898951}, +{-0.3144117, -2.0034485, 1.1998167}, +{0.6745151, 0.1231740, 0.6246113}, +{2.4409425, -0.9489883, -0.1815583}, +{1.4819777, 1.3585385, 1.0801462}, +{-0.1538212, 0.0424042, -0.1556802}, +{-1.1998219, -0.5144755, -1.3283106}, +{-0.5603629, -1.6040851, 0.1535652}, +{-0.3893014, -0.2531819, 0.2372292}, +{0.8894876, 1.2872430, -0.4367198}, +{-0.3544282, -0.8271856, 0.9586511}, +{0.0920316, 0.7787223, -0.2435136}, +{0.4973735, 0.4494188, 0.0051523}, +{-0.3510092, 1.9341111, -2.8404565}, +{-0.0558243, -0.5524080, -0.7721931}, +{1.8793273, 0.1912207, -0.3202873}, +{-1.4635324, -1.1236511, -2.0355403}, +{0.0992195, -0.5733134, 0.6257173}, +{0.1489292, -0.4729998, 0.7971892}, +{1.8292041, -1.7319494, 2.2473834}, +{-0.1504988, 0.0895423, -0.0006107}, +{-0.7853769, 2.4470913, -0.0877524}, +{1.4080110, -0.9529006, -0.1259507}, +{0.1119386, 0.3061504, 0.2687672}, +{-0.7954338, 0.2216635, -1.4515017}, +{1.9455783, -0.4829055, -0.9586266}, +{-0.3571868, 0.4605661, -0.2279585}, +{-0.3116943, 0.9259317, -1.8483902}, +{-1.4457235, -1.6434989, 0.2593035}, +{-0.5998355, -0.2388222, 0.6753169}, +{-0.0331422, -0.3642513, 1.4794124}, +{-2.5966220, -0.9495132, -3.9656167}, +{0.1673737, 0.0824089, -0.0308628}, +{-0.0243313, -2.0001829, 1.3771359}, +{-2.2811368, -2.5676489, -1.4988635}, +{-0.4638150, 0.0725238, 0.0422028}, +{-0.8498752, -0.3055201, -1.9383314}, +{-1.1130896, 1.4423227, 0.2800651}, +{-0.7342439, 0.1800840, -0.0865830}, +{-0.3295042, 0.1630732, -0.0841739}, +{-1.9711944, 1.0841630, -0.5017937}, +{-0.1144506, 0.2968848, 0.1121399}, +{0.2263464, 0.7647604, 1.0883456}, +{0.4050767, -0.5867677, -0.1536604}, +{0.0383008, -0.1061127, 0.2620153}, +{-0.7159438, -0.3595225, 0.1906409}, +{1.4953825, 0.7992514, 0.3727340}, +{-0.0865242, 0.4965691, -0.0387025}, +{0.1064324, 2.4653594, -0.6835722}, +{0.7033587, 1.1007611, -0.6717817}, +{0.4946738, 0.3959958, 0.0063729}, +{0.6312544, -3.1784923, 2.0824366}, +{0.5884568, 0.7381170, 0.2175841}, +{-0.3221776, 0.1241037, 0.2152809}, +{-1.8730204, 0.1354688, 0.9102585}, +{-0.7649490, 0.6463721, 0.4496960}, +{-0.0689384, -0.0436685, -0.7261282}, +{2.1674743, -1.0919493, -3.0482585}, +{-1.7260618, 0.3555451, 1.1184113}, +{-0.2787759, 0.0869571, 0.3580036}, +{-0.3879165, 1.0833948, -0.4385405}, +{-0.1459326, 0.0138437, 0.3055888}, +{0.2656147, -0.1721125, -0.1493279}, +{0.1326708, -0.2612583, 0.4299371}, +{2.2340701, -0.5996916, -1.5929811}, +{0.2444561, -0.1169751, 0.3746914}, +{-0.5404827, -5.0598779, -0.0151955}, +{-2.3959954, -1.8315334, 4.0625925}, +{0.0825014, -0.1065096, 0.0518080}, +{1.2566386, -1.0225521, -0.2514191}, +{0.1219118, 1.6772835, 2.0768209}, +{0.0636380, 0.6395640, 0.0070311}, +{-0.8859341, -0.4324053, 0.1775853}, +{-0.6689453, 0.7195464, -0.9794035}, +{0.3811644, -0.2572593, -0.1443813}, +{1.2162232, -0.4877337, 0.5625060}, +{0.0635135, -0.4352696, -0.4769922}, +{-0.4386476, -0.1708216, -0.0274682}, +{-1.3499842, 0.6895011, 0.0753872}, +{-0.5359483, -0.2138547, 0.0809453}, +{0.2740146, -0.4699731, 0.3878778}, +{2.4631681, -0.8505727, 2.3709214}, +{1.0533570, -0.7977022, 2.3490396}, +{-0.1429513, -0.8871351, 0.0085903}, +{-1.7080586, -1.5354165, -1.4467106}, +{-0.2759694, -1.1215115, -0.9392510}, +{-0.1524666, -0.5653043, -0.1113532}, +{-0.0270050, -1.0401520, -0.1179379}, +{-1.1183279, -1.7013677, 0.3438580}, +{0.6442749, -0.1532268, 0.0907051}, +{0.0151216, 0.3167144, 1.2448361}, +{-1.0282609, 1.1287842, 0.0126965}, +{-0.1609591, -0.4670499, -0.1846146}, +{-1.0645536, 0.0150237, 0.6510780}, +{1.4370917, 0.1002747, 0.0813195}, +{-0.0133170, 0.1575730, 0.0310994}, +{-0.4517334, -0.4137699, 0.8565664}, +{-0.2773663, 0.3614351, -1.1792644}, +{-0.0563665, 0.1004595, -0.6348271}, +{0.4699123, 0.2588984, 0.7601516}, +{0.5550365, -0.0424870, -1.3253018}, +{-0.0133301, 0.0092346, -0.0797830}, +{-0.2491377, -0.7505072, -1.9066180}, +{1.0109019, 1.2689916, 1.2987455}, +{0.5091430, -0.1087267, 0.0074857}, +{1.1598519, -2.1482158, -0.6773111}, +{-0.2063361, 1.2358809, -0.1686035}, +{-0.0415009, 0.3571159, -0.8942651}, +{0.6746652, -1.3781649, 1.3304154}, +{0.0150649, -0.2430996, -0.3149388}, +{-0.0746634, 0.5137416, -0.0770948}, +{0.3931600, -0.7831559, -0.4544498}, +{-0.1045937, 0.3412516, 0.0537042}, +{0.4933578, -0.3871075, 0.1791098}, +{2.2799013, -2.4466617, -1.1210489}, +{1.8275158, -3.0976219, -0.2099827}, +{-0.1484346, -0.0077943, 0.5104930}, +{0.2912205, 0.0167001, 0.7964996}, +{-1.0294212, -0.0259235, -0.1916656}, +{-0.3813719, -0.5602254, -0.2028247}, +{-0.1040056, -0.5230039, 1.7021213}, +{-0.5058908, -0.6168824, 0.3263265}, +{0.4841407, -1.0062397, -0.0132921}, +{-1.7313143, 0.8069175, 1.1845553}, +{-2.8063784, -1.1351628, 1.1256739}, +{-0.4032157, 0.1097968, 0.0451004}, +{-1.4811947, -0.0160286, 0.3747717}, +{-0.0302786, 0.8386152, 0.1912695}, +{-0.0078883, -0.1874917, -0.5720541}, +{0.8579852, 0.2250136, -0.6560830}, +{0.1919637, -0.5729259, 0.3951556}, +{-0.0263627, 0.4748738, -0.1150798}, +{-0.3086928, 0.2296063, -2.7179482}, +{-0.1963928, 0.4623427, -1.1539925}, +{0.3414001, -0.2271301, -0.2984318}, +{0.0898680, -1.5341444, 0.5598091}, +{0.7106271, -0.7794825, -0.6217053}, +{-0.1293487, -0.3428493, 0.7448785}, +{0.3917051, -0.6007762, -1.3985732}, +{-0.6083800, -0.9923139, 2.9101422}, +{-0.3410721, 0.7678265, -0.2812357}, +{-0.0530122, 0.9253934, 1.8518695}, +{0.3671373, 0.5389797, 0.4795219}, +{-0.3502986, 0.1309766, -0.0288394}, +{-0.6063095, 0.9062058, 1.1951705}, +{0.7044263, 0.7787728, -0.7305159}, +{-0.7133009, 0.5966861, 0.2712182}, +{-4.2625732, -0.5467063, 1.1796608}, +{1.1217407, 0.2348274, -0.8209032}, +{0.8465682, -0.1397764, -0.1516647}, +{-0.4968221, -1.4188758, -1.4430399}, +{-1.3108801, 0.0790019, 0.2047641}, +{-0.1848867, 0.1353077, 0.1923310}, +{-3.4273348, -0.9886772, -0.5613465}, +{1.7880903, 0.1013947, -0.8688565}, +{0.4259063, 0.2862673, -0.5593183}, +{-0.1032524, -2.5916021, 0.4381824}, +{0.3632469, 1.5316659, -1.3006135}, +{0.5876170, 0.0844997, 0.0357410}, +{1.2548182, 1.0881357, 0.2318727}, +{0.5434791, 0.0047852, -0.1732378}, +{-0.6110012, -0.5113117, -0.4505348}, +{-0.2230034, -2.0063846, -1.1541617}, +{-0.8783473, -0.0970165, -0.3476603}, +{0.1708959, 0.5663093, 0.2468236}, +{-1.5206792, 0.4050083, -1.6414940}, +{1.4326928, -1.1548353, 1.6772214}, +{-0.4678928, -0.1033931, 0.7851334}, +{-1.7098846, -0.6368123, 1.6184266}, +{-0.3384867, 0.4502261, 0.7879426}, +{-0.1872575, -0.0539059, 0.7743368}, +{-0.4571488, -0.5855135, -0.3769014}, +{-0.3204014, -0.8494969, 1.5894504}, +{0.2058301, 0.0447069, 0.1120214}, +{-1.1632720, 1.8394836, -1.6125537}, +{-3.3558908, -2.9813375, -1.0306967}, +{-0.1740287, 0.4310387, -0.3180245}, +{0.9751602, 2.6817889, 1.5377711}, +{-1.6434842, -1.8214968, 1.8242973}, +{0.0184408, -0.0460715, -0.8611053}, +{2.0392048, -2.3329382, -0.5772495}, +{-0.7925140, 1.5643733, -1.5983464}, +{0.5473530, 0.1460869, -0.7072503}, +{0.2449435, -0.2425435, 1.1149036}, +{1.7940990, 1.6485943, -0.4640068}, +{0.3145245, -0.3325312, -0.0544566}, +{0.6621751, -0.0097260, -0.3718347}, +{-0.7395169, -1.1838349, -0.7801086}, +{-0.1700000, -0.9004700, -0.3642338}, +{0.0729174, -1.6716883, -0.3499304}, +{-0.4020687, 0.5866114, 0.8686238}, +{0.0713518, -0.0632844, -0.8587257}, +{-0.6228179, 0.3299691, -1.5073696}, +{0.6360821, -0.1751452, -0.2457427}, +{0.0839259, -1.0554180, -0.1180097}, +{0.1271901, -0.4018731, 0.1420147}, +{-0.2980633, -3.2667911, 0.3643206}, +{-0.0189906, -0.0371089, 0.3131899}, +{1.1690191, 1.9724002, 1.8350645}, +{0.0577194, 0.5326909, -0.2229004}, +{-0.4513277, 0.1538666, 0.0379503}, +{3.2021461, 1.0391836, -1.7942872}, +{-1.5631291, 2.8880899, 3.0492506}, +{-0.4032629, -0.1482417, 0.1465789}, +{-0.7129019, -0.4016533, 0.1859241}, +{-0.4941199, -0.2207631, 0.2180329}, +{-0.3676155, 0.2152157, 0.2450814}, +{-0.3769266, -0.1152559, -1.4715295}, +{-0.8542677, 1.4017730, -0.1509733}, +{-0.1203067, -1.1473116, 0.3920550}, +{0.0564389, -1.5168381, -0.4434991}, +{-0.8228979, -1.4596673, 0.7058583}, +{-0.2377279, -0.1048840, -0.2946626}, +{-0.2220450, -0.0794847, 0.3374262}, +{-0.4204332, 0.8833821, -1.0572069}, +{-0.0487189, -0.7390435, 0.3023879}, +{-0.3313715, -2.5645354, -2.2282236}, +{-0.7539145, 0.7703640, 2.0438766}, +{-0.6950908, -0.3384748, -0.3613007}, +{0.1107293, -0.7629854, -0.5249125}, +{-0.0600292, -1.3284693, 0.0801795}, +{0.1905475, 0.0046461, 0.1924166}, +{0.6823577, 0.4777435, 0.5921394}, +{1.9389360, 0.1581619, -1.2203281}, +{-0.6990853, 0.2534345, 0.2217397}, +{-0.1883084, -0.2376204, 0.3465250}, +{-0.7751147, 0.3180009, 2.6626630}, +{0.4587756, 0.7875891, 0.0102887}, +{-0.7369061, 0.5090522, 0.9599596}, +{1.4701849, 0.1600342, -0.4502756}, +{0.0120958, 0.3879089, -0.1357136}, +{0.4152449, 0.8797461, -0.3672922}, +{1.2002404, -0.2363263, -2.2390356}, +{0.1199916, -0.4148001, -0.0900153}, +{1.1006804, 0.2439329, 2.3812737}, +{-1.1427305, 1.4711945, 0.6475029}, +{-0.4776305, 0.6956913, -0.1026070}, +{0.2500608, 0.2645063, 0.9939335}, +{-0.6994237, 0.6256498, -0.6092173}, +{0.1301987, 0.2909241, -0.1079872}, +{-0.3818280, -2.3859499, 3.1221461}, +{-0.0518047, 0.6728105, -0.8193471}, +{0.2231384, -0.1945435, 0.1111792}, +{-0.0854907, -0.2164667, 0.6216857}, +{1.7537568, -1.4216133, -2.3689878}, +{-0.5997742, 0.4938809, 0.1665092}, +{-0.7617159, 2.4203801, -0.9018137}, +{-0.3631326, -1.1541814, -1.4236598}, +{0.2678425, 0.3168043, -0.4739983}, +{1.2442085, -0.8961097, 0.6770021}, +{0.2344146, -1.1424094, 1.8335809}, +{-0.6105536, -0.3913930, 0.7418756}, +{-1.6189715, 1.4696223, -0.2810023}, +{-1.0635419, 1.1223671, 0.4774674}, +{0.3516184, 0.1482810, -0.2753026}, +{0.4220593, -1.8060484, -0.7805796}, +{1.2127202, 2.8069582, -0.2621439}, +{-0.2024512, 0.9022920, -0.2841470}, +{-0.4734941, 0.0518528, 0.1670933}, +{-0.3072743, 1.0121731, -0.4040352}, +{0.1021592, -0.2732935, -0.6369759}, +{-0.7359254, -0.9807759, -2.5877972}, +{0.2917910, 0.3166210, -0.4470776}, +{-0.3982046, 0.3167405, -0.3659052}, +{-1.7700021, -1.0588946, 0.9186609}, +{1.2472603, 2.7536688, 1.7957426}, +{0.2890026, 0.5810522, 0.7444463}, +{-1.7980118, -0.8011103, -0.5469471}, +{2.2319002, 0.2486596, -1.7051699}, +{0.5398598, 0.3704197, -0.1567266}, +{0.3083899, 0.3977441, 0.1351819}, +{-2.3275244, 0.4027269, 1.6086690}, +{-0.4400217, 0.6981303, -0.0670329}, +{-0.4776775, 1.5788492, 0.0825036}, +{0.1802054, -2.7425990, 1.0835762}, +{-0.3854387, 0.5364287, 0.0898802}, +{1.2136480, -0.0264963, -1.2469928}, +{-0.4976297, -0.8366488, 1.3644434}, +{-0.3578638, -0.2157005, 0.0419456}, +{0.5271105, 0.3382364, 0.4409994}, +{0.8272406, 0.3293103, -0.9168450}, +{0.1875479, -0.6164141, 0.4342974}, +{2.6333239, -2.2381706, -0.8084950}, +{-3.3412673, -2.2538083, -0.5426984}, +{-0.4978231, 0.2974142, 0.4479316}, +{2.7768898, 0.8187923, -1.0874169}, +{-0.6501362, 0.8644630, 2.2513499}, +{0.0068109, -0.4241377, 0.0572952}, +{-1.0888188, -1.5376682, 0.3783700}, +{0.0441744, -0.2746004, 0.1413431}, +{-0.2805978, -0.1189067, -0.7802793}, +{-0.7422571, -0.2942031, -1.1071647}, +{1.1433485, 0.0372024, 0.3120470}, +{0.3415855, -0.0064405, -0.1943550}, +{0.4760248, -2.1790509, -1.8576199}, +{-2.0753047, -0.3323979, 0.0106101}, +{0.5810882, -0.3080234, 0.0218148}, +{-2.0533283, -1.9948022, -2.3189771}, +{-2.0977261, -0.8635808, -1.7658339}, +{-0.0556006, -0.4028431, -0.1145035}, +{-0.8196300, 0.6013172, 2.6801827}, +{-0.9448756, -1.1554872, -0.3737134}, +{0.2439993, -0.4447089, -0.4141581}, +{-1.9118127, -0.5428226, 1.5469441}, +{1.7553388, -0.1835105, -1.9875926}, +{0.3570541, -0.1213805, -0.1528078}, +{0.8007840, -0.0774982, 0.0260091}, +{-0.7856640, -0.7738584, 0.0220996}, +{-0.4243975, -0.4362427, -0.4819456}, +{-0.3275354, -1.0943309, -0.3285370}, +{0.1281350, 0.9064230, 0.7942848}, +{-0.1312412, 0.0147964, 0.1793573}, +{0.1348493, -0.9020844, -1.0268060}, +{2.1472769, -1.8806421, -1.6308359}, +{0.3907004, 0.5219548, 0.1135313}, +{0.4094561, -0.8007862, -0.2260797}, +{1.3640114, 1.5880396, -0.6807774}, +{0.1533283, 0.0558160, 0.3574280}, +{-1.3384002, -0.0287019, 0.3729821}, +{-1.2631186, 0.3254875, 0.2334508}, +{-0.7660232, 0.3684974, 0.4343930}, +{0.0382941, 2.4209304, 1.6565881}, +{0.7406048, 2.3176501, 4.0104694}, +{0.0245845, 0.2596716, 0.0423425}, +{-0.5429582, 0.7078307, -1.1095539}, +{-0.1383518, -0.0030851, -0.4794541}, +{-0.2721680, 0.1152263, 0.6742490}, +{-0.5714346, 0.1459546, 0.5207702}, +{-0.1874640, 0.4117512, 0.8160056}, +{-0.1587321, -0.0874138, -0.2391952}, +{-1.1620744, 0.7692071, -0.3806753}, +{1.0157037, -3.6637421, 3.4502811}, +{-0.1196860, -0.2237165, 0.3665499}, +{-0.7513081, -0.1349108, 0.2548151}, +{-0.0633997, 0.0288818, -0.0566376}, +{-0.0627513, 0.1879723, 0.5904409}, +{0.7064983, -0.7528642, -3.1902597}, +{1.6425140, -2.2264388, 4.1384745}, +{-0.3593427, 0.1635942, -0.2373783}, +{3.6533060, 0.3166709, 1.8474677}, +{-1.0562822, 0.2059910, -0.6404226}, +{-0.0371597, -0.5301757, -0.5653467}, +{0.4176633, -0.6298450, 1.4439236}, +{-1.9420477, -0.0028861, 0.0016794}, +{-0.0506380, 0.1778404, 0.1182914}, +{1.1812309, 0.6636416, -1.7413652}, +{0.4317467, -1.7363037, 0.9821585}, +{0.4157717, -0.0973491, 0.7737355}, +{0.9667376, -0.7467870, 1.6470776}, +{-0.2312093, 0.3063082, 0.5885255}, +{0.2032058, -0.2090829, -0.7738289}, +{-1.0672023, 0.2221961, 0.1279255}, +{-2.3424938, 0.7373233, 1.1348020}, +{0.1563354, -0.6882868, 0.0944632}, +{0.8974662, -1.0004556, -0.1425355}, +{0.3872702, -0.3908966, 0.6433260}, +{-0.3463271, -0.9821521, 0.0837723}, +{0.2895809, 0.0479703, 0.5959830}, +{0.6009442, -0.0287300, 0.3036390}, +{-0.2491309, -0.5438557, 0.0989290}, +{0.3709829, 0.3903061, 0.6213317}, +{-0.1872187, 0.0032794, 0.6448994}, +{-0.8998904, -0.1364890, 0.1521988}, +{-0.1800091, -0.2726554, 0.1494425}, +{-0.1091765, -0.0552239, 1.6042306}, +{-0.3440371, -0.5156183, 0.1163286}, +{0.6025530, -1.1732348, -1.5259087}, +{1.4980414, 0.3643446, -1.9639074}, +{0.2759429, 0.4996029, -0.0324515}, +{2.4050198, 1.4279604, -1.8568753}, +{-0.5302331, 1.1730554, 2.1377094}, +{0.3421816, -0.3518693, -0.0314411}, +{0.1916398, -0.7870270, 0.6647825}, +{0.6205716, -0.1330806, -0.3989946}, +{-0.0510469, -0.5664006, -0.2355356}, +{0.9262422, 0.0148920, 0.2294604}, +{-0.0941510, 0.2016340, -1.2667550}, +{0.6142751, -0.5574608, 0.3193811}, +{0.7308315, 0.3569059, -0.7149442}, +{0.6629853, -0.9520937, 0.8644818}, +{0.1182025, 0.8480482, 0.1017217}, +{0.2840835, 0.4454370, -0.2867168}, +{0.4373770, 0.5253168, -0.3530358}, +{0.2717801, 0.1333019, -0.1423618}, +{0.4154798, 3.7872181, -2.3996720}, +{0.7113321, -0.6560245, 1.4016660}, +{0.0168744, 0.1951629, 0.5904348}, +{-0.9644542, 0.2795021, 0.8562603}, +{0.9377880, -0.2514898, 0.4886467}, +{0.5786381, -0.6934816, -0.5291545}, +{0.5936957, -0.0554908, -0.8634326}, +{-0.4030852, -0.6602322, 0.3438745}, +{0.6681280, 0.0890988, 0.6817686}, +{0.3228040, -0.5394368, 0.1853952}, +{0.3294195, 0.4833917, -0.4827967}, +{-0.8411542, 0.3887134, -0.2942885}, +{-1.3839781, 0.1559289, 0.6936475}, +{-0.8722745, 0.4453044, -0.1846442}, +{0.2595424, -0.2273151, -0.4224686}, +{0.7435429, -0.1735912, -0.6712920}, +{-0.4932189, -0.8413441, -0.3479279}, +{-0.4780951, -0.2250446, 0.1966438}, +{1.8812586, -0.1911945, 0.7712546}, +{2.0451264, -0.0402783, 0.6745865}, +{-0.0442027, 0.1181606, 0.4837865}, +{0.1920580, 0.0604084, 0.2026134}, +{1.6006159, -1.1215152, -1.5534602}, +{0.0692689, -0.1826816, -0.2866292}, +{-1.1345532, 1.0507127, 0.2796448}, +{0.2031618, -1.0734081, 0.4477162}, +{-0.2387525, 0.3258785, -0.1801330}, +{-1.0080117, 0.0509810, -0.1112533}, +{-0.5313817, -0.6460146, 0.0252182}, +{0.3582509, -0.4871479, 0.5314789}, +{1.6799759, 2.1133895, -0.2888947}, +{2.1729989, -0.6036581, -1.9733566}, +{-0.3004933, -0.6192850, -0.0977555}, +{0.7441714, 0.3551746, -0.6382928}, +{0.5200073, -1.6211821, 1.3306246}, +{0.7364481, -0.1975859, -0.3545864}, +{-2.1162448, -1.2637193, -0.7795659}, +{2.6541317, -0.5193951, 1.3839730}, +{-0.1748211, -0.2261724, -0.1901229}, +{-0.7249187, 0.7223470, -0.2642375}, +{-0.6246834, -0.8450777, -0.5405050}, +{0.3605323, -0.1513158, -0.5680587}, +{-0.4357119, 0.3065616, -1.1552588}, +{-1.7072265, 1.3984698, 0.1476204}, +{-0.2294563, -0.0091770, -0.1610713}, +{0.3579019, -0.3691164, 0.7523987}, +{-0.0163182, 1.1958232, 0.0521834}, +{-0.4384914, 0.5273021, -0.0123470}, +{0.4692914, 0.8139228, 0.7075624}, +{-0.1679040, 0.3155763, -0.3359617}, +{-0.0896173, -0.3219143, 0.7847161}, +{0.8058300, 0.1632682, -1.0028859}, +{-2.7548099, -0.7580983, 1.3985016}, +{0.0972656, 0.3919869, 0.5597391}, +{-1.2414438, -0.4580376, 0.0334731}, +{-0.3448749, -0.7417067, -0.5420272}, +{0.5749071, -0.1525669, -0.2357883}, +{0.3273345, -0.2371908, 0.8639200}, +{-0.2095269, 0.5303763, -0.5927044}, +{-0.1296105, 0.1661486, -0.3852164}, +{-0.6788524, -0.0204953, -0.9343838}, +{-0.4126484, -0.1630900, 0.2250159}, +{-0.2357466, 0.6307923, 0.2555752}, +{0.0274334, 0.6275464, 2.0884488}, +{-0.5352890, 0.6010394, -1.9038634}, +{-0.4514222, -0.4261167, -0.5078690}, +{-1.2128975, 2.1964221, 1.3734676}, +{0.4431154, 1.2899444, 1.1118586}, +{-0.4883441, -0.1128901, 0.0203836}, +{-0.8497961, -0.1225853, 0.0607837}, +{0.1362193, 0.0405841, 1.2470638}, +{0.4893224, 0.7248669, 0.3239012}, +{1.2899773, 0.1356311, 0.5850822}, +{2.2893920, -1.2893449, 2.1449039}, +{-0.3549580, 0.2644968, 0.3723411}, +{-0.4521193, 0.5915522, -0.1053825}, +{-0.0086991, 0.5536138, -0.2823060}, +{-0.1000892, -0.3347980, -0.3674718}, +{0.7842045, 0.5970681, -1.4960352}, +{-0.2731287, -0.5779129, -0.5733032}, +{-0.3961816, -0.3217533, 0.3324812}, +{-1.1351290, 0.9933941, 1.5259933}, +{0.6274726, -0.3059130, 0.1070309}, +{-0.4360017, 0.7246332, -0.5858814}, +{-2.2871857, 3.0608087, -0.0562859}, +{-4.0818558, -0.4507090, -4.1741114}, +{0.0627052, 0.4033369, 0.5509209}, +{-0.1103704, 0.3989414, 0.4269076}, +{-1.1213902, 0.8782804, -0.6850675}, +{-0.0679575, -0.0076416, -0.0573076}, +{-1.0927737, 0.2530447, -0.1376902}, +{0.7383588, -2.6247761, -0.1154000}, +{-0.1262005, -0.1137620, 0.2595871}, +{-1.0235318, 2.6827471, 2.2345688}, +{-0.5479641, -1.9206433, 3.7044554}, +{-0.0303097, 0.1440448, 0.4129463}, +{0.6370428, -0.5602659, -2.0050545}, +{-1.1643310, -0.7642316, -0.1530697}, +{-0.4311934, -0.0231765, 0.8014200}, +{-0.3114536, 2.4366505, 0.5797027}, +{-0.4537353, 0.0098081, -0.0687666}, +{-0.0572519, 0.0331194, -0.0517754}, +{0.4196659, 0.6226501, 0.8554487}, +{1.5661806, 1.6387630, 2.5814769}, +{0.0710004, -0.0847330, 0.0145214}, +{2.1129107, 0.4782183, -1.6182104}, +{0.3737516, -0.1412943, -0.1726008}, +{0.1866038, -0.5545984, 0.2746769}, +{0.4793301, -2.0658944, -2.2217510}, +{0.0917216, 2.4177425, 1.2487743}, +{-0.2270329, -0.2661358, 0.5101132}, +{-0.9177775, 2.2058952, -0.9739263}, +{2.1659017, 0.4901278, 1.2518866}, +{-0.1195526, -0.0741382, -0.1627362}, +{0.1170786, 1.4434015, 0.5179232}, +{0.1802484, -3.3042409, -1.0919195}, +{-0.0893703, 0.6249897, -0.5513315}, +{-0.4485382, 0.7706915, -0.7151492}, +{0.1670530, 0.9862249, -0.5032697}, +{-1.0164686, -0.5525413, 0.1687456}, +{-1.1321454, 0.8635002, 1.0641320}, +{-2.9168634, 1.3312420, -1.3367140}, +{-0.1507375, -0.0774953, 0.5743401}, +{0.8819472, 1.7993455, -0.8815492}, +{1.3653853, -1.9692968, -0.8795761}, +{-0.1041668, 0.0373641, -0.3172985}, +{2.5753212, 0.8393606, -1.3855975}, +{-1.1412653, 2.8130586, 0.8077401}, +{0.3533235, -0.5816089, 0.2306671}, +{0.4695485, -0.4775097, 0.3115844}, +{0.4839710, -0.0112274, 0.3021452}, +{0.2047626, 0.0314284, 0.3908203}, +{0.2209693, 0.3958321, -0.7521653}, +{0.0445392, -0.3697540, 1.2334243}, +{-0.7124705, -0.3803739, -0.3235969}, +{-1.6194319, -0.2673967, 1.4292493}, +{-0.5189626, 0.5498879, -0.6958437}, +{0.0032987, 0.1827678, 0.3436147}, +{0.7189997, 0.0811417, 1.6098613}, +{0.4940561, 1.6604526, 0.5569678}, +{0.0583177, 0.6441220, 0.2473282}, +{-0.1052075, 0.6965765, -0.9228516}, +{-0.3893517, 0.3636782, 1.5677528}, +{-0.0735424, 0.2490027, 0.0288087}, +{0.5285566, 0.7237518, -1.2193576}, +{-1.5589927, -1.6174526, -0.0730753}, +{-0.1198490, -0.0050535, 0.4878283}, +{1.4869720, 0.4660648, 1.5726637}, +{-0.4444906, -1.1519502, 1.3471843}, +{0.0814213, 0.2888644, 0.2755355}, +{0.5962121, 0.4989004, -0.3131641}, +{-0.3329013, 0.8033561, -0.1293886}, +{0.3487623, 0.3183354, -0.5297775}, +{1.5599778, -2.0423324, -1.2194607}, +{1.4357452, 0.4740760, -0.8102891}, +{-0.3307560, 0.3375154, -0.8307651}, +{-1.6739295, 2.9080174, -2.0655193}, +{1.1020480, -1.9221469, -0.0409163}, +{0.4473487, 0.0053117, 0.3344325}, +{-1.2907692, 1.3773921, -0.1468267}, +{0.7650314, 0.6300880, 2.7445872}, +{-0.1089692, -0.0742173, -0.0790824}, +{-0.6623679, 0.6466699, 1.8602387}, +{-0.9913586, -0.3368916, 1.2924396}, +{0.0093807, 1.2050279, 0.3249463}, +{-0.5091825, 0.5832558, 0.4913388}, +{-0.4030761, 1.2386496, -0.2504460}, +{0.2911742, 0.3089939, -0.1655284}, +{0.7476227, -0.5371472, 0.6945825}, +{0.5327035, -0.3258407, 0.9163901}, +{0.3546589, -0.2097289, 0.0548301}, +{-1.0350003, 2.7322059, -0.6735828}, +{0.2820315, -1.5894954, -2.5396242}, +{-0.6875293, 0.0836749, -0.1654437}, +{-0.6049310, 1.0045116, 0.4098287}, +{0.3567354, -0.6193478, -0.8521336}, +{-0.3223201, 0.0608509, -0.7501532}, +{-0.7631469, -0.3855076, -1.2581416}, +{0.6600886, 1.4587393, 0.1120742}, +{-0.2488446, 0.0698634, 0.0232714}, +{1.1426162, -0.3494356, 0.4244094}, +{1.2640941, -0.2035670, 1.0527965}, +{0.1735843, 0.4125794, -0.0978521}, +{1.3707356, 1.3783165, 1.1705633}, +{0.5201068, 0.0823810, -0.4084900}, +{-0.2782494, 0.0958790, -0.5514543}, +{-0.0922927, 2.1167324, -0.0220724}, +{1.2254411, -1.5741873, 1.1417360}, +{-0.0981854, -0.7169915, 0.2157694}, +{-1.7439561, 0.1273930, -0.4808360}, +{-0.9851225, -2.3312554, 0.9322094}, +{-0.0668305, -0.5789779, -0.8874201}, +{-0.1252635, -0.8354474, -1.1846999}, +{0.1289192, -0.4097832, -0.6323268}, +{-0.5566838, -0.1708238, 0.0562626}, +{-0.1083918, 0.4096735, 0.0141297}, +{-0.8558725, 0.0099966, 0.2020880}, +{-0.6198559, 0.0917062, -0.1029317}, +{1.6667012, 0.4675438, -0.9135117}, +{1.0477293, -0.9818330, 0.1843526}, +{-1.3755667, 0.0018323, -0.0608455}, +{-2.8249054, 2.9412072, -0.3492000}, +{-2.4000528, 0.1963841, -0.9263573}, +{0.1939051, 0.1492332, 0.1896634}, +{-0.1058462, 0.6438243, 1.1288618}, +{0.3803149, -0.8197573, 0.7432756}, +{-0.9462239, 0.6146897, -0.2389207}, +{-2.2333233, -0.8218598, -0.9886503}, +{-0.7449172, -1.1077415, 0.8897634}, +{0.5061580, -0.2111400, 0.1320356}, +{-1.1841079, 2.1344013, -1.5753845}, +{-1.6306229, 1.9418337, -1.6753001}, +{-0.3682971, 0.4286453, 0.0395469}, +{-0.6870681, -0.2461792, 1.4336015}, +{0.3520807, 1.2169930, -0.2135044}, +{-0.2190091, -0.5951402, 0.5116855}, +{-0.0654591, -0.6448689, 1.0407742}, +{0.1762349, -0.1813840, -0.3313138}, +{-0.1673192, -0.2274300, -0.1776863}, +{-1.9527262, 1.5542111, 1.3724641}, +{0.2503157, -0.4764131, -0.4022397}, +{-0.3847947, -0.4229047, -0.2962437}, +{0.3295841, -0.7521876, -0.6121954}, +{-1.7229941, 0.1334567, -0.9144082}, +{-0.1360444, 0.1894230, 0.1974138}, +{-1.9719614, 0.4719328, 0.3030434}, +{-0.8810191, -0.2908231, 0.9121325}, +{-0.0545961, -0.0246815, 0.3784347}, +{-0.0945213, 0.5767026, -1.6845475}, +{0.0131591, -0.1876959, 1.5493695}, +{0.6269782, -0.1020608, -0.2632858}, +{0.6475096, 0.3304349, -0.2082203}, +{0.5751937, -0.4795052, -0.2502715}, +{0.2252285, 0.1792377, 0.2200207}, +{0.8606573, -0.1518486, -1.4720247}, +{-1.6392212, -1.2011877, -0.1555174}, +{0.5065072, 0.1526759, -0.6774525}, +{1.5896205, -1.9377675, 1.6729956}, +{-1.9164665, 0.8515097, -0.1019328}, +{0.7238614, 0.2174024, 0.0306613}, +{0.1310557, -1.8025273, -0.0645351}, +{-0.0511274, -0.8095074, -0.4928608}, +{-0.3863026, -0.8850787, 0.1354395}, +{-1.0264128, 1.0789131, 2.5079818}, +{-1.0323224, 0.7449657, -2.4614830}, +{-0.1483398, 1.0946008, 0.0778749}, +{-0.1835067, 0.0036281, -0.2629800}, +{-2.1511543, -0.2486482, -1.2995833}, +{-0.6557078, 0.0835366, 0.5069263}, +{-1.9046589, -0.0923909, -0.6092895}, +{-1.6435487, -0.0911415, 0.0130568}, +{-0.2981251, -0.2625151, 0.4238530}, +{-2.4752314, 2.7013135, -2.6626828}, +{-0.3979553, -0.0594405, 0.0987685}, +{0.4777275, -0.4801643, -0.0181768}, +{2.0189075, 1.4931756, 0.1373355}, +{-1.1065471, 0.2504388, -1.3024805}, +{-0.2004947, -0.2065579, 0.1712029}, +{-1.2558006, -0.3847128, -0.3422967}, +{0.2889727, 0.2435948, -0.6990579}, +{0.5787117, 0.3012840, 0.1733864}, +{-0.5418677, 0.6024482, -0.3757900}, +{1.4026364, 1.1813141, -0.2962830}, +{-0.4164277, 0.4739503, 0.7848389}, +{-0.7863477, 0.0924473, -2.5495925}, +{-1.5563153, -2.1041660, 2.2163670}, +{0.2629612, 0.1990956, -0.4032089}, +{2.3525214, -1.0064338, -0.9869704}, +{2.3329594, -0.5407552, 0.0367814}, +{0.1719331, -0.1701401, -0.2958076}, +{0.5440997, -0.7198556, -0.5997350}, +{-0.8281244, -0.3719698, 1.6316886}, +{-0.3548495, -0.8581398, 0.8994423}, +{0.0840301, 0.5310095, 0.6402696}, +{0.1682336, 0.3114828, 0.8562248}, +{-0.6658417, 0.7772980, 0.0175189}, +{-0.5561884, -2.6507237, 1.9436270}, +{-0.7275199, 1.9150484, -0.4857978}, +{0.3220056, 0.3266688, -0.5139164}, +{3.3188691, 2.3036027, 1.2381084}, +{1.7620602, 1.3269072, -0.0774082}, +{-0.0483466, -0.4526103, -0.4721266}, +{0.6425436, 0.1625141, -1.6063076}, +{-0.4198503, -0.9936453, 0.2566823}, +{0.3939855, 0.2935821, 0.8637671}, +{0.8879821, -0.0044060, -0.3550934}, +{0.4282663, 2.9976709, 0.7370121}, +{0.0785574, -0.3806290, 0.0714357}, +{-0.6367553, -1.1548775, 0.9784884}, +{-0.8161538, -0.3885276, 1.2059988}, +{-0.2422301, 0.0655781, 0.0837284}, +{-0.4875989, -0.1584630, 0.7434573}, +{-1.0045851, -0.1156982, 0.4470817}, +{-0.2243544, 0.0507072, -0.0728062}, +{-0.7602751, -0.0035584, 0.3456935}, +{1.5331804, -0.6747557, -1.7172214}, +{0.1556827, 0.2922058, 0.1131539}, +{-0.3785167, 1.6495392, 0.7849973}, +{-1.6629658, 1.3108834, -0.6673427}, +{-0.1649445, -0.0653562, -0.3448776}, +{0.1663657, 1.1941626, -1.4748487}, +{-0.0054579, 0.5279569, -0.8017057}, +{0.2945591, -0.4493866, 0.1082060}, +{-0.0122872, -0.6561130, -0.2850957}, +{-0.3162680, 0.3074164, 0.9603844}, +{-0.0922183, -0.4722785, -0.2311053}, +{1.1354734, -1.0711859, 2.2003136}, +{-0.5091634, -3.0467873, -0.3230970}, +{0.0537527, -0.1225510, 0.1244960}, +{-2.1251440, 0.0446379, 1.9982712}, +{-0.1563031, -1.0263320, -0.8380143}, +{0.0584451, -0.5473534, -0.1342737}, +{-0.2941020, -1.4621412, -1.4217238}, +{-0.4155475, 0.6788667, -1.6569883}, +{-0.2005970, -0.1607690, 0.2635447}, +{0.3808092, 0.5951332, 1.0655397}, +{-0.0931154, -0.4957404, -0.8440910}, +{0.4759851, -0.0289169, -0.1828000}, +{0.3285887, -0.0533843, 0.8533910}, +{0.5400599, 1.1310588, 2.6066661}, +{-0.5212016, 0.1885619, 0.2130472}, +{0.5369341, 0.2852291, 1.6491719}, +{-0.9909765, -1.2667705, 0.1817674}, +{-0.5226406, -0.2810830, -0.2720946}, +{1.7265009, 0.4774947, -0.9708130}, +{1.1130545, -0.0037227, 1.6525193}, +{-0.2515455, -0.4028381, 0.5953164}, +{-0.4996608, 0.3231870, -0.4332215}, +{0.2909288, -0.0877334, -1.2423234}, +{0.3398647, -0.6930928, 0.0171872}, +{0.3794363, -1.1876326, -0.2219684}, +{0.2932744, -0.9216890, -0.0584995}, +{-0.0438074, -0.0045129, -0.1837292}, +{-1.2657819, -0.9869331, 0.0875366}, +{-0.1601799, 0.9392769, -0.7220142}, +{-0.0935264, -0.5361128, -0.4941647}, +{0.9496914, -0.8230011, -0.2284879}, +{-0.8197121, -0.0162203, -0.3750729}, +{0.3620983, -0.0738739, 0.1137382}, +{-0.7467386, 1.4384829, 1.9973658}, +{-0.3593641, -0.0215351, -0.0986081}, +{-0.2046718, 0.0782486, 0.3323226}, +{-0.8221127, -0.4623158, 0.2196519}, +{-0.1531385, 0.3084964, 0.7189144}, +{-0.1384810, 0.2949565, 0.0963963}, +{1.1938125, -1.0738897, 3.8416522}, +{-1.0592971, -0.7643908, -0.4564365}, +{0.3281612, 0.2959066, -0.0318168}, +{0.4113854, 0.7018896, 0.0618027}, +{0.5398616, 0.1590680, -0.2173775}, +{-0.4516699, 0.3592610, 0.1964737}, +{-0.2309006, 0.8867376, 0.8668255}, +{0.3821997, 0.3455814, -0.1695921}, +{0.0089978, -0.2528936, 0.1289878}, +{0.0244208, -0.1454540, -0.9458201}, +{-0.4923910, 0.7517837, -1.6089863}, +{-0.0111535, 0.2233160, -0.2897389}, +{2.7592230, -0.0555178, -0.5207153}, +{-0.8143219, 2.7415404, -2.0592263}, +{0.0459352, 0.7029912, -0.6715726}, +{-0.4351796, 0.3012296, -1.7354831}, +{-0.6628633, -0.5938826, 0.2399949}, +{0.0488428, 0.1918764, 0.0030201}, +{0.1833729, -0.1258096, 0.1801142}, +{-0.6484034, 1.3684894, -0.5258607}, +{-0.3750422, -0.1755417, -0.5750371}, +{0.0840667, 0.7894509, -0.5659788}, +{0.6961635, 0.8040238, -0.4928954}, +{-0.6998194, 0.0615033, -0.7229111}, +{-0.6301228, -0.0089051, -0.6203941}, +{-1.4770467, 1.3135509, -2.4174619}, +{0.9362930, -0.0280945, -0.0419318}, +{-0.3086141, 0.6694016, -1.2287109}, +{1.6757560, -2.6486042, 1.1468122}, +{-0.3388485, -0.0535804, -0.7318301}, +{-0.3145966, 0.1952736, 0.6628577}, +{-0.2768937, 1.2260059, -0.8663012}, +{0.0164021, -0.1422369, 0.3707718}, +{0.6028304, 0.2945823, 0.3645209}, +{-0.6663460, -0.7798146, 0.5352147}, +{-0.2448439, -0.5305834, 0.4687619}, +{-0.3616132, 0.0644210, 0.5403722}, +{-0.0133978, -0.6893759, 0.0022555}, +{-0.2795456, 0.2388185, 0.3066027}, +{-0.3435858, -1.0622294, 1.3839525}, +{-0.4606309, 0.8689625, -0.1808404}, +{0.0436728, 0.0309941, 0.0779769}, +{-1.2144212, 0.3280368, 1.1422435}, +{1.4425974, 1.2029767, -0.0368267}, +{0.1306524, 0.2390520, -0.0081509}, +{2.1217620, -1.0924654, 0.4345268}, +{-0.6106355, -0.7143250, 0.6539160}, +{-0.4319612, 0.0352604, -0.4342513}, +{0.7439396, -0.0795071, 0.0400865}, +{-1.0824246, -0.1299960, 0.6072925}, +{0.5223889, 0.5372722, 0.0671507}, +{0.8613309, 0.3914070, 1.0842696}, +{0.0697017, -0.4788875, 0.0863608}, +{0.3296230, -0.7277058, 0.0446747}, +{0.8332514, -0.6667767, -0.2415466}, +{0.7945235, 0.5439896, -0.6912783}, +{-0.0018718, -0.2746545, -0.7963305}, +{-0.4212657, -0.0741344, -0.6921852}, +{-0.2297236, -0.0449116, -2.4444411}, +{-0.1546410, -0.2619480, -0.4458716}, +{0.9769508, 0.2324532, -1.4755056}, +{0.0603324, -0.2235228, -0.4749199}, +{-0.2261342, 0.1583202, -0.0890588}, +{1.1347500, 0.5231912, -0.0783576}, +{1.2835879, 1.5989308, 0.2675309}, +{-0.1563951, -0.0877257, 0.0056583}, +{-0.4353131, -0.2275659, -0.1538261}, +{1.5696293, -0.5990186, 0.8605889}, +{0.2011114, 0.2541572, 0.2179711}, +{1.4144413, 0.3084099, -0.0707369}, +{-1.4188868, 0.5855426, -0.2045327}, +{-0.0951070, -0.2150468, 0.4492942}, +{-0.4150939, 1.0124195, 1.7362443}, +{-1.6240791, -0.8737992, 0.1607043}, +{0.0286951, -0.2929608, 0.2924671}, +{0.8041289, -2.1361256, 1.8789718}, +{0.9384006, 1.3188051, -0.7108405}, +{0.0588037, 0.2486502, 0.1590979}, +{-1.1750753, -1.2137033, 0.5708227}, +{-0.1466718, -0.3109528, 0.5655375}, +{0.5360453, -0.5760319, -0.9462004}, +{0.0339591, -0.7289788, -2.3281207}, +{-0.6125847, 0.7640702, -0.6292368}, +{-0.0606963, 0.1589563, -0.1900295}, +{0.3024064, 0.0920928, -1.0615352}, +{-0.9067103, -1.0652633, -0.4528189}, +{-0.3342672, 0.0948349, -0.2582483}, +{0.4328010, 1.3181278, -0.4744631}, +{-0.4539895, 0.9821225, 0.0208663}, +{-0.5160073, 0.0583511, -0.1113255}, +{3.1874425, 1.0600907, -3.2202568}, +{0.2045040, 1.1823189, -0.9022408}, +{0.2263491, 0.1163727, 0.5391917}, +{1.2766294, 0.6517097, 1.0558430}, +{-0.1744633, -1.7860831, 0.9612696}, +{1.0932646, -0.2364822, 0.4536990}, +{-0.6022773, 0.2607149, 0.0278037}, +{2.0080938, 1.3418733, 0.1140860}, +{0.1388996, 0.1659812, -0.1547923}, +{-0.3483557, 1.0403330, 0.1808880}, +{-1.5871731, -1.4050128, 0.1111639}, +{0.0513101, 0.9246361, 0.1777123}, +{-0.8135710, 0.7514899, 1.4888937}, +{0.1868052, -1.0575619, 1.3166194}, +{0.4243813, -0.1433290, -0.5605025}, +{0.2122696, -0.8574135, 0.7580556}, +{0.3622668, 0.0998559, -1.0363106}, +{-0.9942097, -0.0725464, -0.1208294}, +{-0.5421924, -2.9266388, 0.2075399}, +{-0.4544846, 0.5861464, -1.0951717}, +{0.2986474, -0.1758485, 0.5562159}, +{0.7042826, 0.2486936, 1.6898185}, +{0.1601723, 1.8819710, 3.3904181}, +{-0.7885876, 0.0685952, -0.0512156}, +{-2.2584867, -0.9708675, -1.3621267}, +{0.4784492, -0.4440466, -0.8422213}, +{-0.4547810, -0.2526099, -0.3042130}, +{-1.7466832, -0.2775930, -0.8734662}, +{0.5982465, 0.9265888, -0.5664800}, +{-0.2812441, -0.4340431, -0.3027408}, +{-0.0099332, -0.2350193, -0.2031857}, +{0.9657702, -1.7529747, -0.0755040}, +{0.8557581, 0.0344044, -0.5119299}, +{-0.4265734, -0.2481560, 1.0991817}, +{-0.9611034, 1.8810757, -1.6863877}, +{0.0680340, -0.2499276, 0.2103311}, +{-0.9813464, 0.7574427, 0.6334512}, +{1.9816474, -0.3008255, 0.5659413}, +{0.0743926, 0.1991030, 0.1739688}, +{-1.2545652, -1.8440899, -0.9652572}, +{-1.2315587, 1.7165680, 0.3927878}, +{0.4524940, 0.6373256, 0.6192719}, +{-1.0007663, -1.4420122, 0.5547880}, +{0.7061728, 0.9638134, 0.6067114}, +{0.1248113, 0.3663825, 0.4235675}, +{0.0890168, 0.2036207, 0.5182387}, +{0.6865680, -0.0064653, 2.6458580}, +{0.7280783, 0.1811616, -0.0053050}, +{2.5963855, -3.6140480, 0.6141892}, +{1.0749336, -1.6271942, -0.1931566}, +{0.6400931, 0.8303810, -0.0525217}, +{0.6228190, 1.3478081, -0.5956874}, +{0.6581643, 0.9540196, 0.8467883}, +{0.2937865, 0.5670866, 0.0420283}, +{1.2441798, 1.1429937, -0.0008812}, +{-1.8047795, -0.9819098, -0.3326008}, +{0.2592802, -0.3606196, 0.3500480}, +{0.7513626, -0.7237280, -2.1067259}, +{0.8302072, -1.2852298, 0.1934827}, +{0.0657602, 0.1933138, 0.1652633}, +{-0.3394072, 0.9632767, -0.0345765}, +{-0.2708515, -0.7377703, 0.5247406}, +{0.5324025, -0.0338855, -0.2557825}, +{-0.0332083, 2.3715754, 2.6812580}, +{0.2106650, 1.2982793, -1.9198284}, +{-0.3882978, 0.2773162, -0.1566467}, +{0.6842939, 0.2363236, -0.0927603}, +{-0.4975215, 0.3493944, -0.0361282}, +{-0.0785213, -0.6406282, 0.1505781}, +{1.3432631, 0.3366086, 0.6945970}, +{0.2470809, -0.0756031, 0.2555925}, +{0.0853592, -0.0652942, -0.5889140}, +{0.7638033, 3.1229467, -0.6648214}, +{-0.4763352, 2.4959598, 0.5056210}, +{-0.1806993, -0.5432213, 0.2843736}, +{-0.2851862, -1.2223417, -2.3436835}, +{0.0488849, -0.1425444, -0.6422551}, +{-0.2694544, -0.4383469, -0.4233050}, +{1.1562103, 0.9095083, -0.4348487}, +{0.2227415, 1.1239938, 0.3942123}, +{0.7497494, 0.0162871, -0.2495404}, +{-0.8118009, 1.4446896, -0.1192937}, +{0.8743648, -0.5178355, 0.3918512}, +{0.5102125, 0.2096758, -0.0837898}, +{-0.3812311, 0.1009151, -2.8909907}, +{1.3811345, -0.7022987, 1.6551329}, +{0.3635255, 0.6113850, 0.1289049}, +{-1.5010520, 2.3515971, -0.1179833}, +{0.8911003, 0.0458043, 2.1255031}, +{0.3383859, -0.5216249, -0.3670131}, +{-0.0222431, -0.4195570, -0.3683732}, +{0.1035808, 0.5594608, -1.0870854}, +{-0.4575243, -0.1457765, 0.2333346}, +{0.9333634, -2.2853220, -0.9771534}, +{1.0375823, -0.7634330, -1.1223359}, +{-0.1559228, 0.1043360, 0.0821770}, +{-0.7102571, 1.1715165, 1.7390429}, +{-0.3811435, 0.1892812, 0.1846211}, +{0.0664489, 0.2080631, 0.6648822}, +{-0.2100766, 0.3373742, -0.5602056}, +{-0.6065773, 0.9566219, -2.3069391}, +{-0.1001610, -0.4580465, 0.2141227}, +{0.1262279, 0.3539358, -3.0745261}, +{0.1043043, -0.3671958, 0.3719296}, +{-0.2817933, -0.2571922, -0.0996102}, +{0.3463142, -0.1981713, -1.0207673}, +{-0.2327146, 0.0020525, 0.7985563}, +{-0.2689331, 0.3785664, 0.0798595}, +{-0.5162449, 0.8201548, -3.1564975}, +{-1.5903827, -1.7621437, 0.6881874}, +{0.0048246, -0.4759708, -0.0738936}, +{1.0543069, 0.2924356, -0.1066342}, +{0.0364947, -0.8517160, 1.0451261}, +{-0.3612126, -0.1745372, 0.3256247}, +{-0.9182695, 0.1880198, 1.1307583}, +{0.1676093, -0.7128160, -0.5507276}, +{0.0711024, 0.5620128, -0.0074725}, +{-0.5144805, 2.1171145, -0.0592497}, +{0.3860890, 0.2278595, 1.4619155}, +{-0.0760329, 0.5528181, -0.6329138}, +{-0.0874852, 0.8025664, -1.2379004}, +{0.1175832, 0.2772044, -0.0147253}, +{0.1065130, 0.5501590, 0.0184569}, +{0.8714615, 0.2682802, -0.1892951}, +{0.3843272, -0.2079395, -0.1060220}, +{0.2366555, -0.6261734, 0.6541875}, +{-1.1383044, -1.3284452, -0.9045585}, +{-0.9462357, 0.2739009, -0.1071676}, +{-0.0149826, 0.4667172, 0.7682894}, +{-0.0803631, -1.0632856, 2.0736759}, +{1.6758080, 2.3316565, -0.6084354}, +{-0.3280069, -0.6008183, -0.3874582}, +{-0.2193978, -0.7154838, -0.3603603}, +{-0.2541980, -0.1756253, -0.3254856}, +{-0.3995382, 0.2999764, 0.4474368}, +{-2.1671083, -1.2442071, 2.2970946}, +{0.3842055, -1.5038354, -1.1651783}, +{0.1253111, -0.3916615, 0.0990714}, +{-0.6258905, -0.3115948, -0.0609327}, +{-0.2318305, -0.3654129, 0.5379831}, +{0.0248208, 0.2172277, -0.2154812}, +{0.5461804, 1.3661685, -0.7178068}, +{0.7874064, -0.1713565, -0.7170748}, +{-0.0668144, 0.4643478, 0.7407570}, +{-0.2472431, 1.1257744, 1.0743895}, +{0.4754061, -1.3696481, -0.1107416}, +{0.0332486, -0.2161750, -0.7318135}, +{0.4546133, 2.6417387, -0.1771612}, +{-0.9954500, -1.1070106, 1.7166064}, +{0.6684822, 0.0389398, -0.5103916}, +{0.7106223, -0.5984623, 1.4676100}, +{-0.0180548, 0.6186212, 0.7124271}, +{0.3684176, 0.1915117, 0.4574291}, +{-0.6605723, -0.4776009, -0.1714699}, +{0.6230213, 0.8811471, -0.5237863}, +{-0.4639271, -0.0289711, -0.1107749}, +{0.0810988, -0.8342401, 1.1062237}, +{-0.0043185, 1.5453044, 1.8495306}, +{0.3252796, 0.5535001, -0.0210690}, +{0.7039585, 0.0304528, 0.7488002}, +{-3.1266320, 0.8982795, 0.7932382}, +{-0.3040464, -0.0956764, 0.1787673}, +{1.5714536, -0.2443707, 0.2651815}, +{1.6010883, -0.3409451, -0.7286844}, +{-0.2446991, 0.3281004, 0.4191608}, +{0.2511722, 1.5679746, 0.7382987}, +{0.1747750, -2.0016353, -0.6139721}, +{-0.1808464, -0.2324242, 0.1796414}, +{-1.3749504, -0.4150036, -2.2158248}, +{-0.7579169, 0.8251844, -2.5272484}, +{0.3365933, 0.0655660, 0.2658690}, +{1.3894050, -0.1512876, 1.5279932}, +{0.2145588, -1.4648892, 0.2948973}, +{-0.0487690, 0.4385817, -0.1938620}, +{0.4509403, -1.5200739, -0.4747092}, +{-0.2927358, 0.6016082, 1.8909622}, +{-0.6322096, -0.2535308, -0.2843190}, +{1.2373637, 2.3364511, -2.3392823}, +{-1.0114760, -1.0720674, 0.0711724}, +{-0.1732398, -0.0261945, -0.6678236}, +{0.8655713, -2.0310826, 0.2035973}, +{-0.3951114, -3.2660396, 0.9068025}, +{0.4633079, -0.4011953, 0.1509482}, +{-1.1632513, -0.2686191, 0.7479566}, +{-1.1288460, 0.5224013, -0.7071405}, +{0.2753272, -0.1049730, 0.4954640}, +{0.2280669, 0.2922401, -0.9084337}, +{-0.4034806, 0.0632414, -1.2777942}, +{0.9172549, 0.0381378, -0.0020629}, +{-1.2033563, 0.0080304, 0.6273499}, +{1.1239382, -1.5385803, 0.7743198}, +{-0.2292927, -0.0302441, 0.2960904}, +{-1.1285660, 0.4411039, -0.1940200}, +{-0.2111314, 0.7835525, 1.5255970}, +{0.5109436, -0.5191429, -0.5383697}, +{0.8612888, 1.2402579, -0.7108637}, +{-2.2914145, -0.6560324, -1.4838983}, +{-0.0423224, 0.6251078, 0.5791327}, +{0.9559423, -1.2503113, -0.2148864}, +{0.2743281, 0.2480550, 0.5128396}, +{-0.6473759, -0.0634553, -0.1410885}, +{-1.2001119, 0.7783778, 0.6844893}, +{0.1962320, -0.8177443, 0.9078065}, +{-0.7795309, -0.1459623, 0.4616510}, +{-0.2013292, -1.7937678, -2.7544332}, +{0.3951344, 2.8615417, -0.3757853}, +{-0.1747396, 0.0131728, -0.4296161}, +{-1.0168656, 0.8491535, 1.0783796}, +{-1.7667279, 2.5400186, 2.9606388}, +{-0.1650680, -0.2646386, -0.5213848}, +{-0.0222441, 1.8407776, -1.1231588}, +{0.8195877, 0.7836348, -0.4222779}, +{0.0756311, -0.6076029, -0.0214414}, +{-0.4997029, 2.1816645, -1.1829225}, +{0.5428643, -1.3364594, 0.4281762}, +{0.2795046, -0.0568897, 0.5771241}, +{-0.6909153, 0.3522191, -0.1823404}, +{-0.7245165, 1.5655990, 0.4610687}, +{-0.2262031, -0.2609998, -0.2442952}, +{-1.1189588, 0.4458430, -1.3053010}, +{2.3245552, 2.1020088, -2.1802189}, +{0.4141465, -0.1931222, -0.1940308}, +{1.5178657, -0.5221220, -1.2199500}, +{0.6123936, -0.1649587, -0.4476845}, +{0.4898485, 0.5140274, -0.4363274}, +{-0.1475200, 1.6245583, -0.6914984}, +{0.5409344, -0.8558110, -0.0906438}, +{-0.4149029, -0.0973401, 0.2261453}, +{1.2430096, -0.5414080, 1.0359372}, +{-1.4536083, 1.1314714, -0.8227271}, +{-0.0739528, 0.3550161, -0.2813268}, +{0.0728111, 1.0232264, 0.2419352}, +{-0.6875274, -0.5136456, -0.3851624}, +{0.2719647, 0.1005786, -0.0421788}, +{0.0329587, 1.7026182, 2.2875586}, +{0.6616063, 0.6036244, 1.0885552}, +{-0.3212471, 0.4800737, -0.0186967}, +{2.5871515, 0.1145867, -0.1377340}, +{-0.3430902, 1.6900281, -0.0151148}, +{0.5332945, 0.7661790, 0.6845329}, +{2.2581165, -2.2959800, 1.0272455}, +{-0.7071382, 3.4413819, 0.3576091}, +{0.1060316, 0.3053801, -0.1398560}, +{-0.8212290, 0.1110008, 0.3181683}, +{0.0409975, -0.1065134, -1.2176194}, +{0.3714863, 0.3128957, 0.1250173}, +{-0.1359615, 1.6703734, -1.1533105}, +{-0.9583793, 1.2406772, 1.5374537}, +{0.5514312, -0.2751155, -0.0967078}, +{1.4590201, -1.4057349, -1.1647836}, +{1.7223262, 1.1741972, 0.1305296}, +{0.2369588, 0.0977347, 0.2035000}, +{-0.5651605, -1.1933389, -0.7634996}, +{0.3525024, 0.7151349, 1.3669395}, +{0.1494075, 0.0546159, -0.1346167}, +{0.6174384, -2.2808917, 0.5443513}, +{-0.0253756, 0.5467376, 2.5576780}, +{0.0870596, -0.4208933, -0.3515500}, +{-0.0521946, -1.2504283, -2.3431804}, +{0.1326849, 1.5246128, -0.7345757}, +{-0.0729481, 0.0055636, 0.5246770}, +{0.3851186, 0.1467380, 1.3317426}, +{1.3889802, 0.9790010, 0.2114205}, +{0.8874863, 0.1094970, -0.4470561}, +{1.0893173, -0.9360121, -1.1712661}, +{1.2030444, 1.3442061, 0.0820334}, +{-0.3377520, -0.2605527, 0.1224524}, +{2.2476363, 0.5014247, 0.1100320}, +{-1.1900799, -0.9660457, 0.9357408}, +{0.6751202, 0.8709425, -0.4217593}, +{-0.3844710, 0.1591683, 0.5398039}, +{1.3850998, -0.4400775, -1.1595434}, +{0.2331452, 0.4941926, -0.4111556}, +{2.1051412, -0.1981188, 0.6622845}, +{0.5621961, -0.0153541, -2.5061831}, +{0.2710508, -0.0332247, 0.0466747}, +{-0.4380794, 0.0377458, -0.3879628}, +{0.6304389, 0.1697129, 0.0387581}, +{0.1869036, -0.1646213, -0.0040420}, +{-2.9431393, -0.8826652, -2.4652698}, +{-2.4716263, -0.4598258, 0.9287906}, +{0.2538436, 0.3020846, 0.7762181}, +{-0.2919392, 0.3549357, 0.3479130}, +{-1.9860728, -0.8739800, -2.1916211}, +{0.0718299, -0.2183405, 0.0526539}, +{0.8886699, -1.7341677, -2.3292537}, +{1.1824337, 0.4483269, -0.6684165}, +{0.2444049, 0.4654630, 0.1074933}, +{-1.8459442, -0.5480993, -0.6839509}, +{-0.8411992, 0.9080196, 1.0119698}, +{-0.7822326, 0.2243735, 0.4362777}, +{-0.3760080, 0.4634489, 1.2608665}, +{-0.9150872, 0.0946041, 0.3221638}, +{-0.1206276, -0.6073695, -0.5531824}, +{-0.3791826, -0.0968147, -0.2610960}, +{-0.3311057, -0.6679179, 0.3981678}, +{-0.0095479, -0.5737157, 0.0870669}, +{-0.3695840, -0.5543298, -1.2533088}, +{0.7445883, -1.8487699, 0.7753882}, +{-0.2136426, -0.3134682, 0.2693648}, +{0.5548847, -1.3195339, 0.2302717}, +{-0.7647904, -0.3060101, 0.7871435}, +{0.0333131, 0.7000988, 0.3295616}, +{0.7506181, 0.3002109, -1.5722436}, +{0.7997450, 0.5823374, 0.3900973}, +{-0.1578774, -0.0265839, 0.2702753}, +{1.1937959, -1.2557060, 0.3684081}, +{0.9932565, -0.5843939, 0.7774101}, +{-0.0788409, -0.1011954, 0.6223034}, +{-0.0284122, 0.2541364, 0.1689752}, +{-1.5475578, -0.2326246, -1.7748033}, +{-0.4183896, 0.4030563, -0.7385012}, +{-1.4740523, 0.5550991, -0.2141495}, +{-0.5519641, 0.4148456, -1.3050870}, +{-0.0502150, -0.6106843, -0.3348640}, +{-2.1921139, -0.5020902, -0.1717405}, +{0.3945543, 0.0663796, -3.2730620}, +{-0.2018403, 0.0678087, 0.3422906}, +{-0.1123440, -0.1664633, 0.0468393}, +{0.1686210, -0.0475791, 0.5621452}, +{-0.1679789, -0.1245326, -0.5708570}, +{-2.3219974, 1.5279332, -0.5255268}, +{1.8733239, 1.6172699, -0.1331223}, +{-0.1847003, 0.1981145, 0.4501662}, +{-1.9631660, 0.0846889, 0.1142958}, +{-0.4951121, 0.5100477, 0.5506064}, +{-0.3028322, 0.1818124, -0.1747748}, +{2.9946721, 1.5612638, 2.0427296}, +{0.2516814, 0.5605670, 0.1005344}, +{-0.4528318, -0.0433427, 0.3809957}, +{-1.1957211, 0.2300788, -0.6495776}, +{-0.3508146, -0.6458142, 1.5076011}, +{-0.2025355, -0.2468513, 0.4147938}, +{-1.0257332, 2.7190862, -2.9409275}, +{0.4485800, -0.0428527, 1.6062663}, +{0.1880595, -0.0823561, -0.6946436}, +{-0.1032507, 1.2205203, 0.7530265}, +{0.7883430, -1.3692307, 1.3779318}, +{0.0741224, -0.6160498, 0.5319684}, +{0.5968047, -0.7766421, -0.3892636}, +{0.9095093, -0.7126544, 0.5339088}, +{-0.0804346, 0.1129407, -0.1689872}, +{-0.5798643, 0.6110374, -0.0314167}, +{-0.7950493, 0.7874534, 0.1465069}, +{0.8130277, 0.0035119, 0.4362926}, +{-2.0421975, -0.0897226, -0.4865768}, +{-0.5780741, 0.5385581, 1.2131044}, +{-0.0285086, -0.2417564, 0.6944125}, +{0.5191757, -0.2664703, -1.1074744}, +{-0.1830286, 1.7174866, 0.7125751}, +{-0.1684143, -0.0974395, -0.1063207}, +{0.4360677, -1.9195026, -1.8097597}, +{-0.2612115, -0.3045791, -1.0861151}, +{-0.0706915, -0.0059983, 0.0716696}, +{0.6907970, -0.9097346, -0.0772231}, +{-1.0820535, 0.8814815, -0.2220984}, +{-0.4010280, 0.0277108, -0.0530600}, +{0.8424790, 0.7044147, -0.6721722}, +{1.1460623, 0.2719930, 1.3990902}, +{-0.5665182, 0.1469257, 0.0218538}, +{-0.0851942, 1.4517957, 0.4060135}, +{1.1463039, -0.1761454, -0.6773041}, +{0.0357431, -0.4357459, 0.1937613}, +{-0.9913079, 2.2639842, 1.4065881}, +{0.1428457, -1.1586103, 0.0109180}, +{0.6074266, 0.2727721, -0.1382518}, +{-0.4322366, 0.7369309, -2.2064323}, +{1.1483483, 0.1411776, 0.3180246}, +{-0.2594711, 0.6325002, 0.1287930}, +{-1.9607490, -1.8322183, -0.7937443}, +{1.7338630, -0.5794216, 2.2493713}, +{0.2673426, -0.1597674, -0.5226926}, +{0.1080047, -0.1557170, -0.4686148}, +{0.4015809, 0.1332406, -0.9526657}, +{0.0936265, 0.0743585, 0.2335869}, +{-1.0205194, 0.0692118, 1.3590918}, +{1.1881797, 0.3579656, -0.9436999}, +{0.6904192, -0.0019986, 0.3392285}, +{0.3912680, -2.1206980, 0.3364756}, +{-0.6591944, 0.7831136, -1.0224345}, +{0.1720738, -0.0842649, 0.2511529}, +{1.2886822, 1.1883541, 0.4512889}, +{0.6559697, -1.2316865, 0.0939906}, +{-0.6291719, 0.0987552, -0.7535119}, +{-0.2204676, -0.2726866, -0.5871083}, +{-1.0658157, 1.9406302, -1.5409926}, +{-0.0554852, 0.0184100, 0.7208944}, +{0.5691118, 0.4146146, 0.9038186}, +{1.2543690, -0.1573769, 3.8439217}, +{-0.5332232, 0.3123770, -0.2655576}, +{-0.2752865, 0.8534500, 0.9998737}, +{-1.9741675, 0.4666367, -0.3780151}, +{0.2007645, 0.1135765, 0.9117863}, +{0.0398454, 0.1548842, 0.5897847}, +{-2.6355815, 1.1258231, 0.5080641}, +{0.0914914, -0.3113448, 0.2668859}, +{0.9919775, 0.5456223, 0.8703047}, +{-0.3051947, 0.8162928, 0.4344322}, +{0.0683383, 0.1031249, -0.5070200}, +{0.3259829, -0.0975287, -0.2761288}, +{-0.9550345, 1.4984384, -0.8833745}, +{0.3639604, -0.2223184, 0.0702380}, +{-0.7582729, -0.8033005, 0.8367257}, +{2.8126307, -0.1317658, -1.0419916}, +{0.3297430, 0.3625096, -0.2009601}, +{0.2007120, 0.4205164, 0.2449099}, +{-1.1571105, 1.6408093, 0.0635439}, +{-0.9417689, 0.9980576, -0.1540141}, +{0.8092425, 0.0306801, 0.6645252}, +{1.4946065, -0.2553121, -1.4854876}, +{-0.2821849, 0.9171243, 0.0803657}, +{-0.5010048, -0.5144395, -2.9023211}, +{-0.7419951, 0.0443254, -1.4067882}, +{-0.3731175, -0.2321450, 0.2605013}, +{-1.0260322, -0.8049412, 1.9138852}, +{0.2387373, -2.2399294, 0.2145263}, +{0.0146068, -0.5217500, -0.0928021}, +{-0.5165490, 0.0473421, 0.4899678}, +{-0.0588376, -1.5287520, 0.2664182}, +{-0.1583689, -1.2201079, 0.1286481}, +{0.1015012, -1.5666679, 0.1225969}, +{1.7676047, -0.1250552, -1.0923731}, +{-0.0884068, 0.3550341, 0.3517229}, +{1.0522006, 1.6226590, 0.9756668}, +{-1.1522766, 0.7175042, 1.4295297}, +{0.1033235, -0.1532708, -0.0285741}, +{1.9980594, -0.4767149, 0.3030482}, +{-0.2539494, 0.8780801, -3.0760355}, +{-0.0697192, 0.2145880, 0.1386372}, +{0.7043540, 0.1936789, 0.9466585}, +{0.7823062, -2.1523302, -0.5020938}, +{-0.0574027, 0.1423455, 0.5135712}, +{-0.7774902, 0.0330973, 0.6058371}, +{-0.2667536, 0.1220984, 0.3016899}, +{-0.2348238, 0.3927772, -0.2601168}, +{0.5806867, 0.0592215, 1.1926886}, +{-1.4486833, 1.1966019, 1.3879683}, +{-0.1275574, -0.1593172, -0.3171982}, +{1.6229414, 1.7786614, 1.1632363}, +{0.4193570, -0.2496879, -0.9531791}, +{0.1785847, -0.8162258, -0.5761198}, +{0.6370699, 0.6642181, -0.5160198}, +{1.1117023, -1.2940826, -1.5034223}, +{-0.2192285, -0.1101295, 0.2561440}, +{-0.0106426, 0.1904371, 1.2885914}, +{0.6077187, -0.6442351, 0.4569452}, +{-0.3446608, 0.2477424, 0.3465205}, +{0.1966575, 0.3548093, 0.4743665}, +{-0.2865349, -0.3678663, 0.4601056}, +{0.3918188, 0.0643876, 0.1034784}, +{3.9110799, -2.1930604, 2.8604395}, +{2.4029074, 0.3370222, -0.7531694}, +{0.3196436, 0.8067563, 0.1359811}, +{0.3144977, 1.1365383, 0.1749476}, +{0.6672608, -0.1306082, -0.0374105}, +{0.3660787, -0.0129517, -0.1434708}, +{0.5302131, -1.0710094, -1.6953470}, +{-3.0996675, -0.1991017, -0.6331081}, +{0.2270696, -0.6395828, 0.0939506}, +{-0.2028331, 0.6810054, 1.6606349}, +{-1.1375883, 1.1953206, 0.8480914}, +{-0.2145544, 0.0446063, -0.1258891}, +{1.7118497, 2.6503046, -0.4642426}, +{-0.1909427, -0.5168851, -0.6455520}, +{0.6685079, 0.7275302, -0.1457919}, +{0.7726604, -0.0904229, -0.3671038}, +{1.2108988, 2.2489240, -0.7640979}, +{-0.0537513, -0.3229373, 0.5962414}, +{-1.6526722, 0.1892129, 1.0147537}, +{2.0532992, -0.0067418, -0.2755892}, +{0.3863001, 0.1848747, -0.0086033}, +{2.1328139, 1.5326600, -0.5981897}, +{-0.2671626, 3.3582578, -2.4123821}, +{1.0211469, 0.3527845, 0.0910533}, +{-0.4963009, 3.5257967, 0.0394728}, +{-0.3179801, -0.0514200, 0.2587981}, +{-0.6233700, 0.2616705, -0.2835513}, +{1.8534980, 1.1764400, 0.3797418}, +{-1.2030880, -0.7938480, 0.2828699}, +{0.1359778, -0.4647487, 0.6558750}, +{1.2983428, -0.4135988, 0.0156575}, +{0.5066807, -0.0752325, -2.8942995}, +{0.4701657, 0.5376399, -0.1334778}, +{0.2813871, -1.8618318, 0.5929232}, +{-0.0956991, -0.1122485, -1.0591098}, +{-0.1220059, 0.0137590, 0.4294175}, +{2.0208197, -1.2264850, 0.7505284}, +{2.1963711, -0.4620777, -1.4420916}, +{-0.1589621, -0.1424045, -1.1627051}, +{1.5759472, 0.6422336, -1.8273895}, +{-1.5266118, -0.4572094, -1.2595973}, +{0.2317313, -0.3245305, 0.4702481}, +{0.1740259, -0.3300968, -0.8634441}, +{0.4384616, 0.2849818, -0.4180621}, +{0.5383259, 0.0227820, -0.4770480}, +{-0.3574426, -0.1600805, -1.6900026}, +{1.1444541, -1.8931904, 0.1823831}, +{-0.2963827, 0.6547326, 0.0524469}, +{0.4766048, 1.1353862, 0.3695239}, +{0.8964642, 0.0092930, -0.0221161}, +{-0.1658179, 0.2722859, -0.2497851}, +{0.5990334, 0.1842503, 1.5463277}, +{1.7770616, -0.0702329, -1.5356592}, +{0.5722326, -0.0361564, 0.2246031}, +{-0.4416194, -1.5883330, -1.0111673}, +{-0.9885341, 0.9255606, -1.9045055}, +{-0.1824374, 0.0269213, 0.2286639}, +{0.6313763, -0.7452465, -1.9685919}, +{-2.1414912, 1.0299960, 0.3344697}, +{-0.2090014, 0.0548566, -0.3919711}, +{0.4107269, -0.6021173, -0.1356743}, +{0.2956126, 1.2751666, -1.3086487}, +{-0.3627963, -0.0879567, -0.4310247}, +{0.3563787, -0.9919942, 1.2132691}, +{-0.6370059, -1.1982492, 1.5301647}, +{-0.3120021, 0.3356211, -0.6419587}, +{-0.5405554, 0.1122788, 1.4597992}, +{-0.0433941, -1.4200183, 3.5880423}, +{0.3868426, 0.1268371, 0.4259449}, +{0.8275454, 0.3298776, 0.5812069}, +{-0.6240539, -0.0175077, 0.9668505}, +{-0.1463688, -0.6979248, -0.5676000}, +{-1.5020248, 0.9482570, -1.7663740}, +{-1.0598823, 0.2743153, -1.2381145}, +{0.3219805, 0.0832126, -0.3169729}, +{0.6270071, 0.7850292, -0.3955949}, +{0.9385762, -0.4952129, -0.9076512}, +{0.1900787, 0.6720265, -0.1446555}, +{-1.7723001, -1.1502981, -1.1688106}, +{-0.5658141, 0.0370063, -0.3974012}, +{0.0924157, -0.7659582, 0.2837994}, +{-0.2101512, 1.9625436, -1.4274324}, +{-0.2243468, 1.5177820, -1.2479485}, +{-0.7112671, -0.1598022, -0.3567881}, +{-1.2621156, -0.2679341, 0.3995107}, +{-0.6821368, 0.4237337, -0.6507512}, +{-0.1011014, 0.1921293, -0.1153116}, +{-0.6209096, 0.3092612, -0.0884591}, +{1.5190843, -0.3775480, 0.2195322}, +{0.0196044, 0.0860823, 0.2973800}, +{-0.3387913, 1.5387986, 0.5497510}, +{-0.6603910, -0.4352000, -0.6664391}, +{0.3120975, 0.5528405, -0.2274425}, +{-1.1137364, 1.8695363, 2.7239711}, +{1.1564933, 0.4023444, -1.3802921}, +{-0.0743923, -0.0733330, 0.3583429}, +{-0.8186594, -1.7662607, 0.1534434}, +{-2.1364610, 0.2043771, 0.1883618}, +{-0.1740492, 0.1797984, -0.2892924}, +{2.0078225, -2.1446202, 2.0730276}, +{1.1344044, -0.3644475, -0.7590541}, +{0.0854935, 0.0270803, 0.4509822}, +{0.1837166, -1.3012282, 2.9484854}, +{0.0004204, 0.2278706, 0.0147970}, +{-0.0552170, -0.3517761, -0.2091179}, +{-0.7003056, 1.7923379, 0.0188573}, +{0.7175202, -0.4975690, -0.8741381}, +{0.2428824, 0.1524490, -0.8271532}, +{-0.7403136, 1.5520018, -0.6560709}, +{0.3560133, 0.0181020, 0.0573789}, +{-0.7088351, -0.5266527, -0.0623918}, +{-0.6774435, -0.2173230, -0.6340031}, +{-0.8446214, -0.2742446, -0.4378030}, +{0.2340351, 0.0017753, -0.1101530}, +{0.3561848, -0.6642830, -1.7600967}, +{0.1073545, 0.7226250, 0.1867609}, +{-0.1520944, -0.0409526, 0.0724849}, +{-2.3091717, -0.1119149, 0.1751748}, +{0.1415150, 1.5004507, 1.4573934}, +{0.2246373, -0.7106193, -0.3996265}, +{0.7687288, 0.6036479, -1.3184373}, +{-0.5265087, 1.0463331, 1.0482836}, +{-0.3498624, 0.2581154, 0.5188651}, +{2.2946980, -0.5753409, -0.2251089}, +{-2.4343500, -1.1803403, -1.0390882}, +{-0.0420544, -0.0912205, 0.1183695}, +{0.2125504, 0.4044687, 0.8048229}, +{0.3298763, 0.9782372, -1.0471267}, +{0.5841959, 0.0842409, 0.2081068}, +{0.3496853, 0.1177010, 0.6513656}, +{0.5201629, 0.2740540, 0.2508169}, +{0.1798604, -0.2892801, 0.5653869}, +{-0.3199445, -0.6915660, 1.2055200}, +{-0.3311461, 0.0260270, -1.2230072}, +{0.5410323, 0.0047646, 0.0064614}, +{0.3915576, -0.4731174, -0.9129841}, +{2.6600547, 0.9133549, 5.2014017}, +{-0.4977411, 0.4708571, -0.5003035}, +{-0.8105456, -1.0926651, -0.1236163}, +{1.8522243, 0.5612028, -1.1810312}, +{-0.1053167, 0.6057392, -0.3428728}, +{-1.0538895, 0.3794276, -0.4498492}, +{-0.8366367, 0.9600160, -0.5135319}, +{-0.1797072, 0.0975158, -0.0620564}, +{1.7915609, -1.8351694, 3.9484658}, +{-0.7902451, 2.3364801, -0.5674584}, +{-0.1480844, 0.2718256, 0.3480698}, +{-1.5157764, -1.9246758, -0.6663021}, +{-0.3502777, -0.0334997, 0.2304987}, +{0.3150263, -0.1954090, 0.0230561}, +{1.4908941, 0.5816092, -0.0367951}, +{-2.0410471, -1.3067585, 0.2442299}, +{0.2270925, -0.0587633, -0.1868389}, +{-0.0896880, 0.1807815, 0.4304860}, +{-1.2500017, 2.8124261, 0.7810630}, +{0.2250600, -0.2852002, -0.2544924}, +{-0.1544874, -0.9561267, 0.4643451}, +{0.3821835, -0.2090691, -0.9224794}, +{-0.0841490, -0.2448371, 0.0123721}, +{-3.2711694, 0.4130130, 2.2697542}, +{0.7381184, 1.4675046, -1.4138809}, +{-0.2309129, 0.1334297, -0.5507937}, +{-0.3781918, 0.4875311, 1.4868340}, +{-1.9950997, 1.2088904, -2.2154684}, +{0.0753145, 0.1323792, -0.5294404}, +{-1.6599053, -1.1509786, 0.7889889}, +{0.8572137, 0.3763480, 1.1621208}, +{0.5563838, 0.1153576, -0.0271555}, +{-0.3684671, 0.0219985, -0.3995056}, +{1.3066648, 0.7430841, 0.0171679}, +{0.4138333, -0.0423945, -0.1950621}, +{-3.0832880, 0.7055725, -0.1394205}, +{0.7865282, -0.7032972, -0.7492079}, +{0.3730027, -0.2462053, -0.1843648}, +{-0.9904535, 0.2853409, -0.0957325}, +{0.0995947, 0.3689333, 0.1442961}, +{-0.0727069, -0.5527809, -0.0586388}, +{0.1626593, -0.4746469, 0.4775504}, +{-0.1508746, -0.7287767, -0.8511173}, +{0.0672912, -0.3608705, 0.2575250}, +{0.5449254, -0.3445344, 0.2704121}, +{-0.5439202, -0.6435033, -0.8591672}, +{0.4488284, 0.3316808, 0.7533852}, +{-1.9470593, 3.7639956, -0.5129005}, +{-0.6385725, -1.0070664, -2.0543072}, +{-0.4107278, 0.0005204, -0.5987951}, +{-1.3172512, 0.8079382, -2.3034844}, +{2.3986535, -0.1548067, -1.0269145}, +{-0.3918560, -0.3249387, 0.6937745}, +{0.0871469, -0.7324569, 0.7717754}, +{-0.4687026, 0.8964357, 0.5454189}, +{-0.0763474, -0.0195979, -0.2843160}, +{-0.9732656, 1.3373082, 1.5794865}, +{-1.1804993, 0.4382990, 0.7195058}, +{-0.0091989, 0.1671064, -0.7479311}, +{0.2783962, 1.7838250, -0.1778455}, +{0.6078019, -0.8949001, 1.2569758}, +{0.1096788, -0.5518859, -0.4744784}, +{0.7819977, -0.2198442, -1.1711152}, +{0.0608847, -0.9257585, -0.3354142}, +{-0.1238085, -0.2633382, 0.2053835}, +{0.0081768, -0.0029068, 0.4442386}, +{0.5097581, 0.0604296, 1.2095935}, +{0.7611731, -0.5562501, -0.6874958}, +{-0.0039368, 0.8525688, -0.2588333}, +{-0.1680904, -1.0188329, -1.9486998}, +{-0.0882039, 0.5803663, -0.0416845}, +{1.6542871, 3.0614572, 0.6032845}, +{-1.2981867, -1.4436511, -0.5161183}, +{-0.0224709, -0.5000301, 0.7719707}, +{-0.8648980, 2.4311323, 1.8762631}, +{0.4183536, 1.0172172, -1.4858289}, +{0.2040381, -0.1198477, -0.2146469}, +{0.7342027, -1.1127731, 0.9749743}, +{0.4669384, 0.8732132, -0.0761847}, +{0.4349642, -0.5918078, 0.1747871}, +{0.4832168, -1.4230698, 0.3752550}, +{0.5239087, 1.3984516, -0.1885493}, +{-0.1276229, -0.4617692, 0.5400417}, +{0.5906874, 0.2008977, -0.8847906}, +{-2.2619503, -0.3376203, -0.0827895}, +{-0.2490359, -0.0096206, -0.6939417}, +{0.9771618, 0.8436343, -0.7519156}, +{0.8550339, 1.9923643, -0.4752832}, +{-0.2576922, 0.3191662, 0.0823885}, +{0.2153384, 1.0574030, 1.3205327}, +{-1.3408494, -0.0754505, 0.7083285}, +{0.1473799, 0.1162142, 0.6459522}, +{-0.9384412, 0.5154702, 0.0736638}, +{-1.4143867, -0.9784397, -2.2815325}, +{-0.3448535, 0.0941069, 0.1597455}, +{1.8150656, 1.5128734, 0.3585925}, +{-1.3304186, 1.1480422, 1.7970989}, +{0.3544706, 0.0666241, -0.0160328}, +{1.2672811, 1.0309504, 0.9032988}, +{-0.9101483, 0.7024614, -0.5353448}, +{-0.0658098, 0.5021660, -0.2418520}, +{-0.2573677, -0.3536445, -0.6290275}, +{0.2786247, 0.4970271, 0.0826009}, +{0.1084428, -0.2811415, 0.7457543}, +{1.3460747, 1.1374136, -0.0860377}, +{-1.2410277, 2.4784880, 0.1839910}, +{0.0249650, -0.2588879, 0.0697544}, +{-0.4928717, 0.0003062, 0.3508443}, +{-0.8587130, -0.2909271, 0.0035082}, +{-0.5618606, 0.1873441, -0.5341417}, +{-1.2169414, 0.1206937, -2.5025930}, +{-1.7895788, -0.6976333, 0.6339008}, +{0.5397766, 0.0050049, 0.4334220}, +{1.0274590, 1.1073549, -1.8176671}, +{-1.4525179, -1.2487983, 0.3598966}, +{-0.2722475, 0.4382981, -0.1663276}, +{1.4440126, 1.6699879, 0.3453755}, +{1.7331709, -0.9411019, 0.7492484}, +{0.3380721, 0.2873397, -0.3249937}, +{0.4294828, -1.0953101, 1.1471711}, +{-0.2262238, 1.1458008, 2.0756519}, +{0.0561207, -0.4521647, 0.2512634}, +{3.4772489, -1.5042380, 2.6120212}, +{-0.9934180, -1.4533414, -1.2454156}, +{0.3016475, -0.0573869, -0.0732524}, +{0.2874741, -1.4768513, -2.4165094}, +{-0.4094175, 0.1081606, -0.6735604}, +{-0.6349090, 0.0747228, -0.9409584}, +{0.8994194, 0.8142163, -2.0331502}, +{0.6012303, 0.2917452, 1.8704175}, +{-0.1960032, -0.7715361, 0.6562485}, +{0.5379429, -0.8896164, 0.6886985}, +{-0.0455518, 0.1723307, 1.8003830}, +{-0.0640825, 0.4523121, -0.0855005}, +{0.9607145, 3.5865724, -0.4398001}, +{-0.5160860, -3.3554018, -0.9243845}, +{0.8192768, 0.5932611, 0.6510293}, +{-0.6469444, 0.7199324, -0.1530534}, +{0.1459192, 0.5902175, 0.2657698}, +{-0.1015517, 0.1540838, 0.2384614}, +{0.8414450, -0.5550307, 1.1410275}, +{-0.0537884, 0.6413527, 0.2257701}, +{0.4710964, 0.5098178, -0.0593317}, +{0.9465701, 0.7356147, 1.5549394}, +{0.5513063, 0.6685256, -0.0500042}, +{-0.0833613, -0.3030859, 0.0659485}, +{1.7019023, 2.4069221, -2.5039151}, +{-1.5266738, -0.1283427, -1.5275842}, +{0.6539321, 0.7518348, -0.1989176}, +{0.6906852, 0.6463949, 0.4515626}, +{0.1533164, 1.6890860, -0.9568561}, +{-0.0688325, 0.1627806, 0.1546466}, +{1.0651517, 0.2124171, 1.9008875}, +{-0.5433175, -0.2787330, -0.4279428}, +{0.4062927, -0.6656478, -0.3035466}, +{0.7288890, -1.5553913, -0.2263021}, +{0.2082396, -0.1094010, -0.3257836}, +{0.2137125, 0.1086558, 0.3555781}, +{0.3459284, -0.2445320, -0.1789996}, +{0.1353031, -0.8651410, -0.6532210}, +{-0.1454497, 0.1734143, 0.1463475}, +{0.1716206, -0.9870976, -0.0461260}, +{0.2334210, -1.3652763, -0.2757375}, +{0.5243182, 0.2594459, -0.1280432}, +{0.2258225, -1.1423697, 0.3634787}, +{1.2530982, 2.2250724, -0.7813466}, +{-0.3481497, 0.5006183, -0.2100560}, +{-0.5647894, 1.1127058, -0.9872646}, +{-1.8693478, -2.4195170, -1.9227022}, +{0.3887536, 0.2825685, 0.5722139}, +{0.0389663, 0.1362318, -0.9134513}, +{0.2218809, 0.5816891, -1.9656017}, +{0.0182663, -0.7612534, 0.6911052}, +{-0.4634917, -0.4267094, 0.4215980}, +{1.1969125, 0.5636480, 1.2777973}, +{0.4553687, -0.6552415, -0.1948107}, +{-1.0294484, -0.3919659, -3.6920843}, +{0.3492595, 0.3691270, -3.4864273}, +{-0.2267344, -0.1671958, 0.2387004}, +{-0.7226841, 0.6724289, -0.0473232}, +{0.3409331, 0.0361212, -1.1534288}, +{-0.1529247, 0.4523427, -0.3651458}, +{-0.1092331, 0.1253513, -0.3916814}, +{-0.3644117, 2.6290045, -0.8258311}, +{-0.3511171, 0.4697167, -0.5182003}, +{0.5479014, 0.0746550, 1.1220559}, +{1.3251113, 0.0840344, -1.7808622}, +{-0.1350763, -0.4736007, -0.1680565}, +{0.0800003, 1.3332638, 1.3467768}, +{-0.7834795, -2.5770895, -1.9924150}, +{-0.5963185, -0.0408362, -0.0924476}, +{-0.0337971, -0.3395993, 0.3716938}, +{0.4661427, 0.0121882, 0.3824299}, +{0.4309115, -0.4509071, 0.4288987}, +{-0.3831378, -1.8938913, 0.3706663}, +{0.9654326, -0.3011430, -1.3204855}, +{0.0691856, -0.0942582, -0.0495481}, +{-0.0398439, 0.2837080, 0.3215376}, +{-1.0192753, 0.6946195, 0.4262432}, +{-0.3629702, -0.0243083, -0.1675541}, +{-0.8095111, 2.6831703, -1.5470415}, +{-2.7248163, 1.0304692, 0.2239088}, +{-0.3627642, 0.1097892, -0.2494321}, +{-0.4320222, 0.1963417, -0.7892334}, +{0.8890470, 0.7900113, 0.0408320}, +{-0.1130301, 0.5669448, 0.1387720}, +{-0.0915618, 0.7410914, 0.3202724}, +{-0.3344726, -0.1646619, -0.3469692}, +{0.0659482, -0.0911694, 0.4364440}, +{-0.9877858, 0.5657336, -1.9585155}, +{-1.7361768, 0.4485280, 2.5608842}, +{0.2031167, -0.5699490, 0.3636538}, +{-0.7144371, 0.0008824, 1.3509007}, +{0.6091772, 0.2562762, -0.5784369}, +{-0.3276436, 0.7317288, 0.3788413}, +{-0.3214622, -1.7530751, 0.0691260}, +{1.8124120, 1.0120775, 1.3165660}, +{-0.1668981, 0.2575147, -0.1877203}, +{-0.1895127, 1.3016299, -0.5970626}, +{-1.0429136, -0.3896537, -1.0129049}, +{-0.4501895, -0.1184276, 0.2295866}, +{-0.4939230, -2.1808956, 0.7280374}, +{0.1189931, 2.1533477, 2.6575902}, +{0.0925906, 0.0766216, -0.3554001}, +{-0.9312062, 1.0662359, -1.3801832}, +{2.5177770, -2.4244611, 2.2008152}, +{0.6492884, -0.3243286, -0.1295348}, +{-0.6173241, 1.5420395, 0.5746314}, +{-0.1021385, -0.3612273, 0.3674847}, +{0.3356473, -0.5923102, -0.3326727}, +{-0.7646415, -1.1361380, 0.6917490}, +{0.4785691, 1.2140300, 0.1097926}, +{-0.3912964, -0.0855925, 0.5627546}, +{-0.9614040, -0.5266327, 0.4802535}, +{-0.0359453, -0.4920498, 2.6995592}, +{-0.2424167, -0.5811092, 0.3715576}, +{2.0336010, -0.4604709, -2.3148305}, +{-0.9361116, -1.0506213, 1.6778309}, +{-0.1443606, 0.0798728, 0.1893478}, +{-0.4597309, -0.7833479, -0.5094951}, +{0.2654067, -0.5923091, -0.3348869}, +{0.4674697, 0.0778034, -0.3657756}, +{0.6166626, 0.1596657, 0.1670346}, +{1.2982385, -0.0440956, -0.9131714}, +{-0.6053553, -0.7692646, -0.1896511}, +{-1.5793655, -1.9473196, 0.0921175}, +{-0.0790121, 0.9685358, 0.4756566}, +{0.2350249, -0.0468491, -0.7311363}, +{-0.5087016, 0.0699998, 0.2206540}, +{2.2148252, -0.1500365, 0.2088574}, +{-0.0043059, -0.6256838, -0.2831102}, +{1.0417457, -1.7080154, -0.1745928}, +{1.4621569, -0.3884174, 2.0751650}, +{-0.0302169, 0.5882015, 0.4287615}, +{1.8859391, -0.5537729, 1.3762642}, +{-1.6265494, 3.0116100, -0.5493395}, +{0.2331057, -0.2556915, 0.1090182}, +{-0.8660760, 0.3077650, -1.5646113}, +{-0.4102871, 0.2212554, -0.5677160}, +{0.4642053, -0.5815051, -0.3633591}, +{-1.8386304, 1.3869263, 0.2780222}, +{-1.0453594, -2.9217319, -1.1768422}, +{-0.0544233, 0.4587353, -0.2696949}, +{0.5549155, -0.3994481, 0.6202176}, +{-0.7764343, -1.0913738, -1.2938977}, +{0.4520560, 0.3101609, 0.0246172}, +{1.1459858, 0.0789252, -1.4473275}, +{2.8826160, 1.0362169, -1.5757072}, +{0.1950696, -0.0617684, 0.0244832}, +{-0.3874945, 2.8472085, 1.9553250}, +{3.0649655, -1.5314090, 0.3003876}, +{0.0930745, 0.1602249, -0.1719821}, +{-1.2194415, -3.8809578, -0.7395230}, +{-1.1115692, 0.9907128, 3.2363007}, +{-0.2745497, 0.8498743, 0.0673484}, +{-0.8782723, -0.9067239, 1.2525970}, +{-0.5084704, 2.8856151, -0.8540258}, +{-0.0988160, 0.1995385, -0.0009457}, +{1.3680693, 1.0791593, 0.2912115}, +{0.4738972, -1.4858443, 0.8924816}, +{-0.1306914, -0.2564970, -0.4436179}, +{-0.4520518, 0.2270908, -0.4645155}, +{0.2844065, 0.1941214, -0.8816218}, +{0.0863048, 0.1430017, 0.1797525}, +{1.1644093, -0.8917708, 1.8344322}, +{1.4035509, 0.2816571, -1.7015198}, +{-0.4342643, -0.0008572, -0.5074114}, +{-0.9106628, 1.4456736, 0.1283984}, +{0.4687289, -0.2044256, -1.1792502}, +{-0.0408045, -0.4291363, 0.3876804}, +{-0.3923119, 0.1261225, 0.8773128}, +{-1.0850151, 2.8279836, 0.3617758}, +{0.1528850, -0.0976621, 0.2615215}, +{-0.1184761, 1.7489783, -0.3879750}, +{0.7683228, 0.8131977, 0.1280721}, +{-0.0712774, 0.2184171, -0.2841342}, +{-0.7690090, -0.1304596, 1.8995746}, +{0.1980280, -0.0320436, -0.5340676}, +{0.0459253, -0.3903672, 0.0966308}, +{0.7122316, 1.2306657, -2.0154083}, +{1.0826155, 0.5206999, 1.3258961}, +{0.1874662, -0.1674248, -0.2266619}, +{-0.6809043, -0.9111043, -0.9662595}, +{-1.1619743, -0.0881198, 0.7962888}, +{0.1415826, -0.5771257, 0.3549959}, +{-0.5149600, 0.5041939, 0.3577995}, +{0.5584505, 0.4092163, -0.6352714}, +{0.2190954, -0.0404649, 0.1866136}, +{-0.6563748, -2.1792681, 1.2619953}, +{1.3069395, 0.7205825, -0.7408518}, +{0.2277157, -0.4160430, -0.2705389}, +{-1.7670697, -0.2802293, 0.0434262}, +{0.4303937, -1.0549341, -2.1575847}, +{-0.5799810, 0.0636395, -0.3780760}, +{-0.8476939, -0.2495265, -1.1969483}, +{0.1549697, 0.2587599, -0.3469005}, +{-0.4648575, -0.9830749, 0.2260747}, +{-1.3217973, -0.6573109, -1.0000709}, +{1.5517104, 0.9700270, 1.0828738}, +{0.4662367, -0.2977712, 0.0329859}, +{1.0277424, -1.2137572, -0.4007829}, +{-0.1694970, 1.6183819, 1.4088627}, +{0.3556900, 0.0728072, 0.8011025}, +{0.6566421, 0.6695959, 0.0635623}, +{-0.4677703, -0.3805525, 0.4565152}, +{-0.2470707, -0.0299033, 0.8534603}, +{0.2174278, -4.2554460, -1.7126447}, +{0.2335066, -1.2625257, -0.5211669}, +{-0.4506806, 0.5702285, -0.0723186}, +{-0.8613529, -0.6360591, 1.0450517}, +{-0.6316258, 0.0042910, 0.1344860}, +{0.1594746, 0.2350933, 0.0386571}, +{2.3657365, -0.7328835, -1.3477842}, +{0.8324553, -0.6989261, -0.4687403}, +{-0.4536468, 0.0671110, 0.4089321}, +{-1.2469934, 0.0808527, -0.7087238}, +{0.3834743, 0.5402464, -0.2490568}, +{0.0465880, 0.1906842, -0.5050662}, +{-0.3145027, -0.4245524, 1.1394728}, +{0.0636200, 0.1814519, -0.7610149}, +{0.0355678, 0.4493580, -0.0116866}, +{-1.6383457, -1.2609742, -0.1881136}, +{1.2866765, 0.8119044, 0.1299509}, +{0.5006986, -0.1953869, 0.1468565}, +{0.9360201, 0.7593806, -0.9745607}, +{0.1997306, -0.8256070, 0.2046241}, +{0.1165280, 0.1819563, -0.3335957}, +{-0.1498930, -4.0531664, -0.8168744}, +{-0.7980457, -1.8356909, -1.5085995}, +{-0.0694953, 0.7460342, -0.2419973}, +{-0.6679947, 0.2092593, 1.2473831}, +{1.5172833, 1.1821281, 0.5524324}, +{-0.0469138, -0.4237493, 0.4833672}, +{-2.5064936, 0.0946723, -1.5600290}, +{-0.8815773, -0.9032957, 0.5700961}, +{0.1290586, -0.4307001, -0.5327262}, +{0.6995362, 1.0346541, 0.4234308}, +{0.9368824, 0.9892706, 0.1361702}, +{-0.2657675, 0.2248059, -0.0519017}, +{0.7496653, 0.1691688, 0.0484315}, +{-0.7640690, -0.4733433, -0.1021922}, +{0.6660147, 0.0135897, -0.2247631}, +{2.0375342, -1.5280222, -0.8443654}, +{-0.4228482, -1.4986917, -1.2030963}, +{-0.1376247, 0.0419212, -0.3619925}, +{-0.1980927, -0.4199083, -1.2895747}, +{1.4239345, 1.0790405, -0.4177651}, +{0.0967801, 0.1652060, 0.1868118}, +{-0.2743653, 1.3516721, 0.1703487}, +{-1.1124676, -2.9112866, 0.4605837}, +{-0.1019230, -0.3345412, -0.5002841}, +{0.0924527, -0.5690290, -0.2706624}, +{0.0988404, -0.7390521, 0.1920539}, +{-0.0973991, 0.2173977, -0.0412308}, +{1.1861721, 1.2512535, 0.5770214}, +{-0.2925737, -0.9498628, 1.1035625}, +{0.0650130, -0.5317082, 0.0869889}, +{1.5382264, -0.2533752, 1.1475521}, +{-0.2129255, -0.5030677, -0.3643261}, +{-0.1545842, 0.0240418, -0.5093538}, +{0.9645492, -0.9970759, -1.3071234}, +{0.7960411, 0.6361202, 0.5951841}, +{0.0196821, -0.2035724, 0.2518326}, +{1.8255240, 1.3117342, -1.0592895}, +{0.1038857, -0.9001826, 0.3633009}, +{0.5928358, 0.3432412, -0.2189609}, +{0.3511599, -0.0435627, -0.1778469}, +{-0.0430759, 0.4796642, -0.2207087}, +{-0.0638916, 0.0332083, 0.1442695}, +{-1.2440709, 0.9524733, 1.2096698}, +{0.5033259, -0.9700074, -0.2244985}, +{0.2980868, 0.2067008, -0.5602028}, +{1.4244348, -1.7092429, -1.6729723}, +{0.4223059, -0.0749001, -0.3316498}, +{-0.1978276, 0.6987300, -0.0038049}, +{-1.9872353, -1.7847530, -2.2861674}, +{-1.7191769, -1.2037894, -1.3971983}, +{-0.0986813, 0.1623161, -0.4471042}, +{0.2016876, 3.4718263, 0.5991595}, +{-2.6355481, 1.9461446, -0.5163711}, +{0.2977748, -0.0613753, 0.2726742}, +{-0.2880998, -1.3256470, -1.2797643}, +{0.6168802, -0.9403800, -1.5590556}, +{0.0454932, -0.4672041, 0.1841905}, +{0.4032496, 1.4282758, -0.1782223}, +{-1.2343112, 0.1043059, 1.3402308}, +{0.2951259, -0.4018296, 0.2071399}, +{1.6251297, -0.5768241, 2.6406765}, +{2.1114595, -2.3178022, 1.1979437}, +{-0.5508848, -0.4513485, 0.1587579}, +{3.1849868, -0.9688381, -0.2506410}, +{3.8478677, -0.1208772, -0.3343852}, +{0.3394571, 0.3288479, 0.2121731}, +{-0.0219260, 0.8145862, -0.0607387}, +{1.0252570, -1.6948912, -0.9305259}, +{0.4016863, -0.5711923, 0.1049533}, +{0.7871976, 0.9286956, 1.3544486}, +{-0.7587793, 0.9012746, -0.1920989}, +{-0.0466974, 0.0644121, 0.3149738}, +{-0.0320310, -0.7426583, 0.3798445}, +{0.4964424, 1.5345387, -0.0322865}, +{0.4873657, 0.2819966, -1.4279664}, +{-3.4429936, 1.1513064, 1.9244943}, +{1.6145058, 0.4685136, 0.8944612}, +{-0.3958128, 0.3423222, 0.0822672}, +{-1.8426415, -0.3842394, 0.7226458}, +{-0.7653251, 2.1658311, 0.0662310}, +{0.3330501, -0.0370922, -0.4391402}, +{2.2461066, -0.7608532, 0.8254874}, +{-0.3921336, 0.7230959, -0.8614879}, +{0.1620374, 0.5327396, -0.2320358}, +{-0.0375869, 0.6868178, -0.7222784}, +{0.2996042, 0.4975377, -0.0511463}, +{0.0233641, -0.0168409, -0.5032887}, +{-0.4454360, -0.2286583, -0.5009743}, +{0.0455388, -0.1465159, -0.7786998}, +{0.0930586, 0.1009375, -0.5629689}, +{0.3923812, -0.0058704, -0.5335502}, +{-0.6625926, 0.5610203, 0.2055977}, +{0.4666490, -0.1677387, -0.0591405}, +{0.7508925, 0.2970353, 0.3906536}, +{-0.1290875, -0.4482655, 0.2588366}, +{0.1830362, 0.6442631, 0.4032815}, +{0.2886492, 1.2192619, 0.3750167}, +{-0.1925070, -0.6002199, 0.5222709}, +{-0.3266450, -0.8703485, 0.0852678}, +{-1.5905187, -0.4142166, -0.7303457}, +{0.9161773, -1.3163726, -1.0235921} +}; + #else // SIRE_USE_OPENMM namespace SireMove { From dca33f42e274aba64916bbdf19900a813e383bc7 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 5 May 2022 12:52:46 +0100 Subject: [PATCH 108/148] set box correctly; added force groups energy output to ::minimize() --- corelib/src/libs/SireMove/openmmpmefep.cpp | 24 +++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index b0e752dea..9525ed27b 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -729,7 +729,7 @@ void OpenMMPMEFEP::initialise() OpenMM::Vec3(0, 6, 0), OpenMM::Vec3(0, 0, 6)); - const double converted_cutoff_distance = convertTo(cutoff_distance.value(), + const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); // HHL @@ -2573,9 +2573,16 @@ void OpenMMPMEFEP::initialise() platform.setPropertyDefaultValue("CudaDeviceIndex", "0"); platform.setPropertyDefaultValue("CudaPrecision", "mixed"); + const double boxl = 3.2; + system_openmm->setDefaultPeriodicBoxVectors + (OpenMM::Vec3(boxl, 0.0, 0.0), + OpenMM::Vec3(0.0, boxl, 0.0), + OpenMM::Vec3(0.0, 0.0, boxl)); + auto context = *new OpenMM::Context(*system_openmm, integrator, platform); + context.setPositions(pos); context.setVelocities(vel); @@ -2929,6 +2936,21 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, qDebug() << "Energy before minimisation:" << Epot << "kcal/mol at lambda =" << current_lambda; + + const OpenMM::State state1 = openmm_context->getState + (OpenMM::State::Energy, false, 1 << BOND_FCG | 1 << RECIP_FCG); + const OpenMM::State state2 = openmm_context->getState + (OpenMM::State::Energy, false, 1 << DIRECT_FCG); + const OpenMM::State state4 = openmm_context->getState + (OpenMM::State::Energy, false, 1 << CORR_FCG); + + qDebug() << "Reciprocal energy =" + << state1.getPotentialEnergy() * kJ_per_mol; + qDebug() << "Direct energy =" + << state2.getPotentialEnergy() * kJ_per_mol; + qDebug() << "Correction energy =" + << state4.getPotentialEnergy() * kJ_per_mol; + } // Step 2 minimise From 1e7f3b033d601e0b4ff7e4a61cd5892920b46c3f Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 5 May 2022 13:17:06 +0100 Subject: [PATCH 109/148] removed computation and output of force groups in ::initialise() --- corelib/src/libs/SireMove/openmmpmefep.cpp | 48 +--------------------- 1 file changed, 2 insertions(+), 46 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 9525ed27b..2d47762ae 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -2559,50 +2559,6 @@ void OpenMMPMEFEP::initialise() this->openmm_system = system_openmm; this->isSystemInitialised = true; - - // xXx - if (Debug) { - auto integrator = *new OpenMM::VerletIntegrator(2.0 * OpenMM::PsPerFs); - - OpenMM::Platform::loadPluginsFromDirectory - (OpenMM::Platform::getDefaultPluginsDirectory()); - - OpenMM::Platform &platform = - OpenMM::Platform::getPlatformByName("CUDA"); - - platform.setPropertyDefaultValue("CudaDeviceIndex", "0"); - platform.setPropertyDefaultValue("CudaPrecision", "mixed"); - - const double boxl = 3.2; - system_openmm->setDefaultPeriodicBoxVectors - (OpenMM::Vec3(boxl, 0.0, 0.0), - OpenMM::Vec3(0.0, boxl, 0.0), - OpenMM::Vec3(0.0, 0.0, boxl)); - - auto context = *new OpenMM::Context(*system_openmm, integrator, - platform); - - - context.setPositions(pos); - context.setVelocities(vel); - - const OpenMM::State state = context.getState(OpenMM::State::Energy); - const OpenMM::State state1 = context.getState - (OpenMM::State::Energy, false, 1 << BOND_FCG | 1 << RECIP_FCG); - const OpenMM::State state2 = context.getState - (OpenMM::State::Energy, false, 1 << DIRECT_FCG); - const OpenMM::State state4 = context.getState - (OpenMM::State::Energy, false, 1 << CORR_FCG); - - qDebug() << "Total energy =" - << state.getPotentialEnergy() * kJ_per_mol; - qDebug() << "Reciprocal energy =" - << state1.getPotentialEnergy() * kJ_per_mol; - qDebug() << "Direct energy =" - << state2.getPotentialEnergy() * kJ_per_mol; - qDebug() << "Correction energy =" - << state4.getPotentialEnergy() * kJ_per_mol; - } } // OpenMMPMEFEP::initialise END /** @@ -2934,7 +2890,7 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, if (Debug) { MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; - qDebug() << "Energy before minimisation:" << Epot + qDebug() << "Total energy before minimisation:" << Epot << "kcal/mol at lambda =" << current_lambda; const OpenMM::State state1 = openmm_context->getState @@ -2993,7 +2949,7 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, if (Debug) { MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; - qDebug() << "Energy after minimisation:" << Epot + qDebug() << "Total energy after minimisation:" << Epot << "kcal/mol at lambda =" << current_lambda; } From 2fc3f39d20a564498f98be01a489a5dc487182b8 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sat, 7 May 2022 08:22:08 +0100 Subject: [PATCH 110/148] a few if (!fullPME) in places --- corelib/src/libs/SireMove/openmmpmefep.cpp | 108 ++++++++++++--------- wrapper/CMakeLists.txt | 6 ++ 2 files changed, 69 insertions(+), 45 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 2d47762ae..4acf2bb60 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -432,10 +432,11 @@ static void addPerAngleParameters(OpenMM::CustomAngleForce &force, void OpenMMPMEFEP::addAndersenThermostat(OpenMM::System &system) { - const double converted_Temperature = convertTo(Temperature.value(), kelvin); + const double converted_Temperature = + convertTo(Temperature.value(), kelvin); auto thermostat = new OpenMM::AndersenThermostat(converted_Temperature, - Andersen_frequency); + Andersen_frequency); thermostat->setRandomNumberSeed(random_seed); system.addForce(thermostat); @@ -449,12 +450,13 @@ void OpenMMPMEFEP::addAndersenThermostat(OpenMM::System &system) void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) { - const double converted_Temperature = convertTo(Temperature.value(), kelvin); + const double converted_Temperature = + convertTo(Temperature.value(), kelvin); const double converted_Pressure = convertTo(Pressure.value(), bar); auto barostat = new OpenMM::MonteCarloBarostat(converted_Pressure, - converted_Temperature, - MCBarostat_frequency); + converted_Temperature, + MCBarostat_frequency); barostat->setRandomNumberSeed(random_seed); system.addForce(barostat); @@ -619,7 +621,7 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { void OpenMMPMEFEP::initialise() { // NOTE: only for debugging with simple non-dummy systems like ions - const bool fullPME = false; // use false for production + const bool fullPME = true; // use false for production if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; @@ -642,8 +644,8 @@ void OpenMMPMEFEP::initialise() const MoleculeGroup solutetodummy = this->solutetodummy.read(); const MoleculeGroup solutefromdummy = this->solutefromdummy.read(); - AtomicVelocityWorkspace ws = this->createWorkspace( - moleculegroup).read().asA(); + AtomicVelocityWorkspace ws = + this->createWorkspace(moleculegroup).read().asA(); const int nmols = ws.nMolecules(); @@ -726,11 +728,11 @@ void OpenMMPMEFEP::initialise() } system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), - OpenMM::Vec3(0, 6, 0), - OpenMM::Vec3(0, 0, 6)); + OpenMM::Vec3(0, 6, 0), + OpenMM::Vec3(0, 0, 6)); - const double converted_cutoff_distance = convertTo(cutoff_distance.value(), - nanometer); + const double converted_cutoff_distance = convertTo(cutoff_distance.value(), + nanometer); // HHL // Use NonbondedForce to compute Ewald reciprocal and self terms @@ -741,7 +743,6 @@ void OpenMMPMEFEP::initialise() recip_space->setCutoffDistance(converted_cutoff_distance); recip_space->setIncludeDirectSpace(fullPME); recip_space->setUseDispersionCorrection(false); - recip_space->setForceGroup(RECIP_FCG); // scale the charges in the reciprocal space recip_space->addGlobalParameter("lambda_offset", current_lambda); @@ -758,7 +759,6 @@ void OpenMMPMEFEP::initialise() << "computed from PME error tolerance =" << tolerance_PME; } - /*** NON-BONDED FORCE FIELDS ***/ QString lam_pre = ""; @@ -773,8 +773,14 @@ void OpenMMPMEFEP::initialise() QString general_ff = GENERAL.arg(lam_pre); general_ff.append(GENERAL_SIGMA[flag_combRules]); - auto direct_space = new OpenMM::CustomNonbondedForce(general_ff.toStdString()); + auto direct_space = + new OpenMM::CustomNonbondedForce(general_ff.toStdString()); + /* correction term for 1-2, 1-3, 1-4 exceptions in reciprocal space */ + auto custom_corr_recip = + new OpenMM::CustomBondForce(CORR_RECIP.toStdString()); + + if (!fullPME) { // This ensures that also the direct space is subject to PBC direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); direct_space->setCutoffDistance(converted_cutoff_distance); @@ -790,16 +796,13 @@ void OpenMMPMEFEP::initialise() "sigmastart", "sigmaend", "isHD", "isTD", "isFD", "isSolvent"}); - /* correction term for 1-2, 1-3, 1-4 exceptions in reciprocal space */ - - auto custom_corr_recip = new OpenMM::CustomBondForce(CORR_RECIP.toStdString()); - custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); + } if (coulomb_power > 0) lam_pre = "(lamtd^ntd) *"; @@ -1166,11 +1169,11 @@ void OpenMMPMEFEP::initialise() charge_diff = 0.0; if (charge_diff != 0.0) { - // charge = charge_start + lambda_offset * charge_diff - recip_space->addParticleParameterOffset("lambda_offset", - nonbond_idx, - charge_diff, - 0.0, 0.0); // sigma, epsilon not needed + // charge = charge_start + lambda_offset * charge_diff + recip_space->addParticleParameterOffset("lambda_offset", + nonbond_idx, + charge_diff, + 0.0, 0.0); // sigma, epsilon not needed if (Debug) qDebug() << "Adding offset for atom idx" << nonbond_idx @@ -1315,7 +1318,8 @@ void OpenMMPMEFEP::initialise() // Adds the custom parmaters to _all_ atoms // Must be in the same order as in the System - direct_space->addParticle(custom_non_bonded_params); + if (!fullPME) + direct_space->addParticle(custom_non_bonded_params); } if (Restraint_flag) { @@ -2199,10 +2203,12 @@ void OpenMMPMEFEP::initialise() recip_space->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, epsilon_avg); - direct_space->addExclusion(p1, p2); + if (!fullPME) { + direct_space->addExclusion(p1, p2); - direct_space->getParticleParameters(p1, p1_params); - direct_space->getParticleParameters(p2, p2_params); + direct_space->getParticleParameters(p1, p1_params); + direct_space->getParticleParameters(p2, p2_params); + } Qstart_p1 = p1_params[0]; Qend_p1 = p1_params[1]; @@ -2383,14 +2389,21 @@ void OpenMMPMEFEP::initialise() } - custom_corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); + if (!fullPME) + custom_corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); + + if (Debug) + qDebug() << "Adding qprod_start =" << qprod_start + << "and qprod_end =" << qprod_end + << "to correction term for bond" + << p1 << "-" << p2; } // end of loop over exceptions /*** add non-bonded force fields to System ***/ - int npairs = (direct_space->getNumParticles() * (direct_space->getNumParticles() - - 1)) / 2; + unsigned int nAtoms = recip_space->getNumParticles(); + unsigned int npairs = (nAtoms * (nAtoms - 1)) / 2; if (Debug) { qDebug() << "Num pairs = " << npairs; @@ -2404,12 +2417,14 @@ void OpenMMPMEFEP::initialise() } system_openmm->addForce(recip_space); + recip_space->setForceGroup(RECIP_FCG); if (!fullPME) { if (npairs != num_exceptions) { direct_space->setForceGroup(DIRECT_FCG); system_openmm->addForce(direct_space); - perturbed_energies_tmp[0] = true; //Custom non bonded 1-5 is added to the system + perturbed_energies_tmp[0] = true; + if (Debug) qDebug() << "Added 1-5 direct space (PME, LJ):" << general_ff; } @@ -2426,35 +2441,38 @@ void OpenMMPMEFEP::initialise() if (custom_intra_14_clj->getNumBonds() != 0) { custom_intra_14_clj->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_clj); - perturbed_energies_tmp[1] = true; //Custom non bonded 1-4 is added to the system - if (Debug) + perturbed_energies_tmp[1] = true; + + if (Debug) qDebug() << "Added 1-4 CLJ:" << intra_14_clj; } - if (custom_intra_14_todummy->getNumBonds() != 0) { custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_todummy); - perturbed_energies_tmp[2] = true; //Custom non bonded 1-4 is added to the system - if (Debug) + perturbed_energies_tmp[2] = true; + + if (Debug) qDebug() << "Added 1-4 To Dummy:" << intra_14_todummy; } - if (custom_intra_14_fromdummy->getNumBonds() != 0) { custom_intra_14_fromdummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_fromdummy); - perturbed_energies_tmp[3] = true; //Custom non bonded 1-4 is added to the system - if (Debug) + perturbed_energies_tmp[3] = true; + + if (Debug) qDebug() << "Added 1-4 From Dummy:" << intra_14_fromdummy; } if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) { custom_intra_14_fromdummy_todummy->setForceGroup(NONBONDED_FCG); system_openmm->addForce(custom_intra_14_fromdummy_todummy); - perturbed_energies_tmp[4] = true; //Custom non bonded 1-4 is added to the system - if (Debug) - qDebug() << "Added 1-4 From Dummy To Dummy:" << intra_14_fromdummy_todummy; + perturbed_energies_tmp[4] = true; + + if (Debug) + qDebug() << "Added 1-4 From Dummy To Dummy:" + << intra_14_fromdummy_todummy; } } // if (!fullPME) @@ -2888,13 +2906,13 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, std::vector old_positions_openmm = state_openmm.getPositions(); if (Debug) { - MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; + MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; qDebug() << "Total energy before minimisation:" << Epot << "kcal/mol at lambda =" << current_lambda; const OpenMM::State state1 = openmm_context->getState - (OpenMM::State::Energy, false, 1 << BOND_FCG | 1 << RECIP_FCG); + (OpenMM::State::Energy, false, 1 << RECIP_FCG); const OpenMM::State state2 = openmm_context->getState (OpenMM::State::Energy, false, 1 << DIRECT_FCG); const OpenMM::State state4 = openmm_context->getState diff --git a/wrapper/CMakeLists.txt b/wrapper/CMakeLists.txt index db1b145dc..2647712d2 100644 --- a/wrapper/CMakeLists.txt +++ b/wrapper/CMakeLists.txt @@ -251,6 +251,7 @@ endif() include_directories (BEFORE ${SIRE_INCLUDE_DIR}) include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}) include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR}) +set (TBB_INCLUDE_DIR "/usr/include/tbb") if (TBB_INCLUDE_DIR) include_directories (${TBB_INCLUDE_DIR}) message( STATUS "Using TBB from ${TBB_INCLUDE_DIR}") @@ -411,6 +412,11 @@ if (NOT ${SIRE_FOUND_BOOST_PYTHON}) set ( BOOST_PYTHON_HEADERS "${Boost_INCLUDE_DIR}" ) endif() +set (PYTHON_LIBRARIES "/usr/lib/x86_64-linux-gnu/libpython3.8.so") +set (PYTHON_INCLUDE_DIR "/usr/include/python3.8") +set (BOOST_PYTHON_LIBRARY "/usr/local/lib/libboost_python38.so") +set (BOOST_PYTHON_HEADERS "/usr/local/include/boost") + message( STATUS "Python paths ${PYTHON_LIBRARIES} | ${PYTHON_INCLUDE_DIR} | ${PYTHON_SITE_DIR}" ) include_directories( ${PYTHON_INCLUDE_DIR} ) include_directories( "${BOOST_PYTHON_HEADERS}" ) From 566cd64e9b88420cd9b166a3b65f6c3867fa4d6b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sat, 7 May 2022 09:42:55 +0100 Subject: [PATCH 111/148] useOffset for debugging --- corelib/src/libs/SireMove/openmmpmefep.cpp | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4acf2bb60..3edf82cd5 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -614,15 +614,16 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { }; +// NOTE: only for debugging with simple non-dummy systems like ions +const bool fullPME = true; // use false for production +const bool useOffset = false; // use true for production + /** * initialises the openMM Free energy single topology calculation * Initialise must be called before anything else happens. */ void OpenMMPMEFEP::initialise() { - // NOTE: only for debugging with simple non-dummy systems like ions - const bool fullPME = true; // use false for production - if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; const std::string version = OpenMM::Platform::getOpenMMVersion(); @@ -745,7 +746,8 @@ void OpenMMPMEFEP::initialise() recip_space->setUseDispersionCorrection(false); // scale the charges in the reciprocal space - recip_space->addGlobalParameter("lambda_offset", current_lambda); + if (useOffset) + recip_space->addGlobalParameter("lambda_offset", current_lambda); // use default tolerance for the moment double tolerance_PME = recip_space->getEwaldErrorTolerance(); @@ -1168,7 +1170,7 @@ void OpenMMPMEFEP::initialise() if (abs(charge_diff) < 0.00001) charge_diff = 0.0; - if (charge_diff != 0.0) { + if (useOffset && charge_diff != 0.0) { // charge = charge_start + lambda_offset * charge_diff recip_space->addParticleParameterOffset("lambda_offset", nonbond_idx, @@ -2379,7 +2381,7 @@ void OpenMMPMEFEP::initialise() qprod_diff = qprod_end - qprod_start; - if (qprod_diff != 0.0) { + if (useOffset && qprod_diff != 0.0) { recip_space->addExceptionParameterOffset("lambda_offset", i, qprod_diff, 0.0, 0.0); @@ -3413,7 +3415,8 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) // lambda for the offsets (linear scaling) of the charges in // reciprocal space - openmm_context->setParameter("lambda_offset", lambda); + if (useOffset) + openmm_context->setParameter("lambda_offset", lambda); } boost::tuples::tuple OpenMMPMEFEP::calculateGradient( From cfde93cae1c411107f9b54b29931229ad8c70861 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 13 May 2022 09:20:42 +0100 Subject: [PATCH 112/148] useOffset in output --- corelib/src/libs/SireMove/openmmpmefep.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 3edf82cd5..90e27edac 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -630,6 +630,7 @@ void OpenMMPMEFEP::initialise() qDebug() << "OpenMM Version:" << QString::fromUtf8(version.data(), version.size()); qDebug() << "fullPME =" << fullPME; + qDebug() << "useOffset =" << useOffset; } // Create a workspace using the stored molgroup From e422f6197f65144c2068102e63746cca38cb78f6 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 16 May 2022 15:33:07 +0100 Subject: [PATCH 113/148] minor changes --- corelib/src/libs/SireMove/openmmpmefep.cpp | 47 +++++++++++++++------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 90e27edac..e2dfcef85 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -615,8 +615,8 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { // NOTE: only for debugging with simple non-dummy systems like ions -const bool fullPME = true; // use false for production -const bool useOffset = false; // use true for production +const bool fullPME = false; // use false for production +const bool useOffset = true; // use true for production /** * initialises the openMM Free energy single topology calculation @@ -747,9 +747,13 @@ void OpenMMPMEFEP::initialise() recip_space->setUseDispersionCorrection(false); // scale the charges in the reciprocal space - if (useOffset) + if (useOffset) { recip_space->addGlobalParameter("lambda_offset", current_lambda); + if (Debug) + qDebug() << "Adding lambda offset to reciprocal space"; + } + // use default tolerance for the moment double tolerance_PME = recip_space->getEwaldErrorTolerance(); @@ -1179,7 +1183,7 @@ void OpenMMPMEFEP::initialise() 0.0, 0.0); // sigma, epsilon not needed if (Debug) - qDebug() << "Adding offset for atom idx" << nonbond_idx + qDebug() << "Adding offset to atom idx" << nonbond_idx << "; charge_diff =" << charge_diff; } @@ -3151,10 +3155,11 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, const double beta = 1.0 / (0.0083144621 * convertTo(Temperature.value(), kelvin)); //mol/kJ - int stateTypes = OpenMM::State::Positions | OpenMM::State::Velocities - | OpenMM::State::Energy; + int stateTypes = OpenMM::State::Energy | OpenMM::State::Positions + | OpenMM::State::Velocities; OpenMM::State state_openmm; + OpenMM::Integrator &integrator = openmm_context->getIntegrator(); int sample_count = 1; @@ -3187,7 +3192,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, exit(-1); } - (openmm_context->getIntegrator()).step(new_nmoves); + integrator.step(new_nmoves); n_samples = (nmoves - new_nmoves) / energy_frequency; @@ -3204,8 +3209,8 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, emptyContainers(); while (sample_count <= n_samples) { - //*********************MD STEPS**************************** - (openmm_context->getIntegrator()).step(energy_frequency); + //*********************MD STEPS**************************** + integrator.step(energy_frequency); state_openmm = openmm_context->getState(stateTypes, false, group_mask); double p_energy_lambda = state_openmm.getPotentialEnergy(); @@ -3295,6 +3300,7 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, } updateOpenMMContextLambda(current_lambda); + sample_count = sample_count + 1.0; } // end while (sample_count <= n_samples) @@ -3389,9 +3395,20 @@ double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) { // nonbonded terms - if (perturbed_energies[0]) + if (perturbed_energies[0]) { openmm_context->setParameter("lam", lambda); // 1-5 HD + if (Debug) qDebug() << "Updating direct space lambda tp" << lambda; + } + + // reciprocal space corrections for 1-2, 1-3 and scaled 1-4 + if (perturbed_energies[8]) { + openmm_context->setParameter("lam_corr", lambda); + + if (Debug) + qDebug() << "Updating correction lambda to" << lambda; + } + // 1-4 Interactions if (perturbed_energies[1]) openmm_context->setParameter("lamhd", lambda); // 1-4 HD @@ -3402,10 +3419,6 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) if (perturbed_energies[4]) openmm_context->setParameter("lamftd", lambda); // 1-4 From Dummy to Dummy - // reciprocal space corrections for 1-2, 1-3 and scaled 1-4 - if (perturbed_energies[8]) - openmm_context->setParameter("lam_corr", lambda); - // bonded perturbed terms if (perturbed_energies[5]) openmm_context->setParameter("lambond", lambda); // Bonds @@ -3416,8 +3429,12 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) // lambda for the offsets (linear scaling) of the charges in // reciprocal space - if (useOffset) + if (useOffset) { openmm_context->setParameter("lambda_offset", lambda); + + if (Debug) + qDebug() << "Updating lambda_offset to" << lambda; + } } boost::tuples::tuple OpenMMPMEFEP::calculateGradient( From 006fbf7029874a3cd606e4f2e81e3a372431231b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 18 May 2022 08:08:18 +0100 Subject: [PATCH 114/148] added ::initialise_ion() to run a single ion system for debugging purposes --- corelib/src/libs/SireMove/openmmpmefep.cpp | 304 +- corelib/src/libs/SireMove/openmmpmefep.h | 1 + corelib/src/libs/SireMove/posvel.h | 12467 +++++++++++++++++++ wrapper/Move/OpenMMPMEFEP.pypp.cpp | 11 + 4 files changed, 12782 insertions(+), 1 deletion(-) create mode 100644 corelib/src/libs/SireMove/posvel.h diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e2dfcef85..6307161f6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -615,8 +615,310 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { // NOTE: only for debugging with simple non-dummy systems like ions -const bool fullPME = false; // use false for production +const bool fullPME = true; // use false for production const bool useOffset = true; // use true for production +const bool doCharge = true; + + +/* + A simple system of an ion in a water box. This is really for debugging + purposes only and assumes that the parm7 and rst7 file are describing + such a system exactly as in the code below. + */ + +#include "posvel.h" +void OpenMMPMEFEP::initialise_ion() +{ + if (Debug) { + qDebug() << "Initialising OpenMMPMEFEP"; + const std::string version = OpenMM::Platform::getOpenMMVersion(); + qDebug() << "OpenMM Version:" << QString::fromUtf8(version.data(), + version.size()); + qDebug() << "Running single ion debug system"; + qDebug() << "fullPME =" << fullPME; + qDebug() << "doCharge =" << doCharge; + } + + // Create a workspace using the stored molgroup + const MoleculeGroup moleculegroup = this->molgroup.read(); + + if (moleculegroup.isEmpty()) + throw SireError::program_bug( + QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup has not been defined"), + CODELOC); + + const MoleculeGroup solute = this->solute.read(); + const MoleculeGroup solutehard = this->solutehard.read(); + const MoleculeGroup solutetodummy = this->solutetodummy.read(); + const MoleculeGroup solutefromdummy = this->solutefromdummy.read(); + + AtomicVelocityWorkspace ws = + this->createWorkspace(moleculegroup).read().asA(); + + const int nmols = ws.nMolecules(); + + int nats = 0; + + for (int i = 0; i < nmols; ++i) { + nats = nats + ws.nAtoms(i); + } + + if (Debug) + qDebug() << "There are" << nats << "atoms. " << "There are" << nmols + << "molecules"; + + int flag_combRules; + + if (combiningRules == "arithmetic") + flag_combRules = ARITHMETIC; + else if (combiningRules == "geometric") + flag_combRules = GEOMETRIC; + else + throw SireError::program_bug( + QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), + CODELOC); + + if (Debug) + qDebug() << "combiningRules =" << combiningRules; + + bool flag_noperturbedconstraints = false; + int flag_constraint; + bool flag_constraint_water = false; + + if (ConstraintType == "none") + flag_constraint = NONE; + else if (ConstraintType == "hbonds") + flag_constraint = HBONDS; + else if (ConstraintType == "allbonds") + flag_constraint = ALLBONDS; + else if (ConstraintType == "hangles") + flag_constraint = HANGLES; + else if (ConstraintType == "hbonds-notperturbed") { + flag_constraint = HBONDS; + flag_noperturbedconstraints = true; + } + else if (ConstraintType == "none-notwater") { + flag_constraint = NONE; + flag_constraint_water = true; + } + else + throw SireError::program_bug( + QObject::tr("The Constraints method has not been specified." + "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), + CODELOC); + + if (Debug) + qDebug() << "Constraint Type =" << ConstraintType; + + // Load Plugins from the OpenMM standard Plugin Directory + OpenMM::Platform::loadPluginsFromDirectory( + OpenMM::Platform::getDefaultPluginsDirectory()); + + // the system will hold all + auto system = new OpenMM::System(); + + // Andersen thermostat + if (Andersen_flag) + addAndersenThermostat(*system); + + // Monte Carlo Barostat + if (MCBarostat_flag) + addMCBarostat(*system); + + if (CMMremoval_frequency > 0) { + auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); + + system->addForce(cmmotionremover); + + if (Debug) + qDebug() << "\nWill remove Center of Mass motion every" << + CMMremoval_frequency << "steps\n"; + } + + auto recip_space = new OpenMM::NonbondedForce(); + std::vector > pairs; + + const double cutoff = convertTo(cutoff_distance.value(), nanometer); + + system->addForce(recip_space); + system->setDefaultPeriodicBoxVectors(OpenMM::Vec3(boxl_ion, 0.0, 0.0), + OpenMM::Vec3(0.0, boxl_ion, 0.0), + OpenMM::Vec3(0.0, 0.0, boxl_ion)); + + recip_space->setForceGroup(RECIP_FCG); + recip_space->setNonbondedMethod(OpenMM::NonbondedForce::PME); + recip_space->setCutoffDistance(cutoff); + recip_space->setIncludeDirectSpace(fullPME); + recip_space->setUseDispersionCorrection(false); + + // sodium assumed to come first + system->addParticle(atom_Na.mass); + const unsigned int idx = + recip_space->addParticle(atom_Na.charge, atom_Na.sigma, + atom_Na.epsilon); + + double charge_scale = 0.0; + double sigma_scale = 0.0; + double epsilon_scale = 0.0; + + if (doCharge) { // discharge + charge_scale = -atom_Na.charge; + } else { // shrink + sigma_scale = -atom_Na.sigma; + epsilon_scale = -atom_Na.epsilon; + + // make sure the charge is zero before attempting to shrink + recip_space->setParticleParameters(idx, 0.0, + atom_Na.sigma, atom_Na.epsilon); + } + + // linear scaling of the charges + recip_space->addGlobalParameter("lambda_offset", current_lambda); + recip_space->addParticleParameterOffset("lambda_offset", idx, + charge_scale, + sigma_scale, epsilon_scale); + + // NOTE: can't be *new for some reason + auto direct_space = new OpenMM::CustomNonbondedForce(GENERAL_ION); + std::vector params(10); + auto corr_recip = new OpenMM::CustomBondForce(CORR_ION); + + /* + * Direct space and reciprocal correction setup through explict energy + * expressions + */ + + if (!fullPME) { + double tolerance_PME = recip_space->getEwaldErrorTolerance(); + double alpha_PME = (1.0 / cutoff) + * std::sqrt(-log(2.0 * tolerance_PME)); + + system->addForce(direct_space); + + direct_space->setForceGroup(DIRECT_FCG); + direct_space->setNonbondedMethod + (OpenMM::CustomNonbondedForce::CutoffPeriodic); + direct_space->setCutoffDistance(cutoff); + + direct_space->addGlobalParameter("lam", current_lambda); + direct_space->addGlobalParameter("alpha_pme", alpha_PME); + + direct_space->addPerParticleParameter("qstart"); + direct_space->addPerParticleParameter("qend"); + direct_space->addPerParticleParameter("sigmastart"); + direct_space->addPerParticleParameter("sigmaend"); + direct_space->addPerParticleParameter("epstart"); + direct_space->addPerParticleParameter("epend"); + direct_space->addPerParticleParameter("isHD"); + direct_space->addPerParticleParameter("isTD"); + direct_space->addPerParticleParameter("isFD"); + direct_space->addPerParticleParameter("isSolvent"); + + if (doCharge) { + params = { + atom_Na.charge, 0.0, + atom_Na.sigma, atom_Na.sigma, + atom_Na.epsilon, atom_Na.epsilon, + 1.0, 0.0, 0.0, 0.0 + }; + } else { + params = { + 0.0, 0.0, + atom_Na.sigma, 0.0, + atom_Na.epsilon, 0.0, + 1.0, 0.0, 0.0, 0.0 + }; + } + + direct_space->addParticle(params); + + system->addForce(corr_recip); + corr_recip->setForceGroup(CORR_FCG); + + corr_recip->addGlobalParameter("lambda_corr", current_lambda); + corr_recip->addGlobalParameter("alpha_pme", alpha_PME); + + corr_recip->addPerBondParameter("qcstart"); + corr_recip->addPerBondParameter("qcend"); + } + + for (int i = 0; i < nwater_ion; i++) { + int idx_O = system->addParticle(water[0].mass); + int idx_H1 = system->addParticle(water[1].mass); + int idx_H2 = system->addParticle(water[2].mass); + + recip_space->addParticle(water[0].charge, water[0].sigma, + water[0].epsilon); + recip_space->addParticle(water[1].charge, water[1].sigma, + water[1].epsilon); + recip_space->addParticle(water[2].charge, water[2].sigma, + water[2].epsilon); + + if (!fullPME) { + direct_space->addParticle({water[0].charge, water[0].charge, + water[0].sigma, water[0].sigma, + water[0].epsilon, water[0].epsilon, + 1.0, 0.0, 0.0, 1.0}); + direct_space->addParticle({water[1].charge, water[1].charge, + water[1].sigma, water[1].sigma, + water[1].epsilon, water[1].epsilon, + 1.0, 0.0, 0.0, 1.0}); + direct_space->addParticle({water[2].charge, water[2].charge, + water[2].sigma, water[2].sigma, + water[2].epsilon, water[2].epsilon, + 1.0, 0.0, 0.0, 1.0}); + } + + pairs.push_back(std::make_pair(idx_O, idx_H1)); + pairs.push_back(std::make_pair(idx_O, idx_H2)); + + system->addConstraint(idx_O, idx_H1, r_OH); + system->addConstraint(idx_O, idx_H2, r_OH); + system->addConstraint(idx_H1, idx_H2, r_HH); + } + + recip_space->createExceptionsFromBonds(pairs, Coul14_scale_ion, + LJ14_scale_ion); + + /* + * Setup of exclusions for direct space and reciprocal space corrections + * which are custom bond forces + */ + + if (!fullPME) { + int p1, p2; + std::vector p1_params(6); + std::vector p2_params(6); + + double charge_prod, sigma_avg, epsilon_avg; + double qprod_start, qprod_end; + double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; + + for (unsigned int i = 0; i < recip_space->getNumExceptions(); i++) { + recip_space->getExceptionParameters + (i, p1, p2, charge_prod, sigma_avg, epsilon_avg); + + direct_space->addExclusion(p1, p2); + + direct_space->getParticleParameters(p1, p1_params); + direct_space->getParticleParameters(p2, p2_params); + + // NOTE: these are just the TIP3P atom charges + Qstart_p1 = p1_params[0]; + Qend_p1 = p1_params[1]; + Qstart_p2 = p2_params[0]; + Qend_p2 = p2_params[1]; + + qprod_start = Qstart_p1 * Qstart_p2; + qprod_end = Qend_p1 * Qend_p2; + + corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); + } + } + + this->openmm_system = system; + this->isSystemInitialised = true; +} // OpenMMPMEFEP::initialise_ion END /** * initialises the openMM Free energy single topology calculation diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 136bac464..4b35e5729 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -95,6 +95,7 @@ namespace SireMove { bool isTimeReversible() const; void initialise(); + void initialise_ion(); SireUnits::Dimension::MolarEnergy getPotentialEnergy(const System &system); diff --git a/corelib/src/libs/SireMove/posvel.h b/corelib/src/libs/SireMove/posvel.h new file mode 100644 index 000000000..4a0d02f56 --- /dev/null +++ b/corelib/src/libs/SireMove/posvel.h @@ -0,0 +1,12467 @@ +// + +struct Atom_ion { + double mass, charge, sigma, epsilon; +}; + +// Aqvist: 0.3241 nm, 0.0859 kJ/mol +// NOTE: discharge dG depends on sigma and also epsilon +const Atom_ion atom_Na = {22.9, 1.0, + 2.439281 * OpenMM::NmPerAngstrom, // * OpenMM::SigmaPerVdwRadius, + 0.087439 * OpenMM::KJPerKcal}; + +const Atom_ion water[] = { + {15.994, -0.834, + 1.7683 * OpenMM::NmPerAngstrom * OpenMM::SigmaPerVdwRadius, // O-O + 0.1520 * OpenMM::KJPerKcal}, // O-O + {1.00794, 0.417, + 0.0001 * OpenMM::NmPerAngstrom * OpenMM::SigmaPerVdwRadius, 0.0}, + {1.00794, 0.417, + 0.0001 * OpenMM::NmPerAngstrom * OpenMM::SigmaPerVdwRadius, 0.0} +}; + +const double r_OH = 0.9572 * OpenMM::NmPerAngstrom; +const double r_HH = 1.5136 * OpenMM::NmPerAngstrom; // AMBER +// const double k_OH = 553.0 * OpenMM::KJPerKcal; +// const double a_HOH = 104.52 * OpenMM::RadiansPerDegree; +// const double k_HOH = 100.0 * OpenMM::KJPerKcal; + +constexpr double Coul14_scale_ion = 1.0 / 1.2; +constexpr double LJ14_scale_ion = 1.0 / 2.0; + +const double boxl_ion = 3.2; //3.150519513450217; +const int nwater_ion = 1030; + +const char HEADER_ION[] = + "#General information on simulation parameters:\n" + "#Total initial energy: %f\n" + "#Reciprocal energy: %f\n" + "#Direct energy: %f\n" + "#Correction energy: %f\n" + "#%s\n" + "#%s\n" + "#Simulation used 10000 moves, 10 cycles and 400 ps of simulation time\n" + "#Generating lambda is %f\n" + "#Alchemical array is (%s)\n" + "#Generating temperature is 25 C\n" + "#Energy was saved every 250 steps\n" + "#\n" + "#\n" + "# [step] [potential kcal/mol] [gradient kcal/mol] [forward Metropolis] [backward Metropolis] [u_kl]\n"; + +const std::string GENERAL_ION = + "U_direct + U_LJ;" + + "U_direct = 138.935456 * q_prod * erfc(alpha_pme*r) / r;" + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lambda) * 0.1;" + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_hard;" + + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2), D_om_lam);" + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2, D_lam);" + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2), D_mix);" + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" + + "q_prod = (qend1*lam + (1.0-lam)*qstart1) *" + "(qend2*lam + (1.0-lam)*qstart2);" + "eps_avg = sqrt((epend1*lam + (1.0-lam)*epstart1) *" + "(epend2*lam + (1.0-lam)*epstart2));" + "sigma_avg = 0.5 * ((sigmaend1*lam + (1.0-lam)*sigmastart1) +" + "(sigmaend2*lam + (1.0-lam)*sigmastart2));"; + +const std::string CORR_ION = + "-U_corr;" + "U_corr = 138.935456 * q_prod * erf(alpha_pme*r) / r;" + "q_prod = lambda_corr*qcend + (1-lambda_corr)*qcstart;"; + +// converted from XML state file +const std::vector pos_ion = { +{1.9223304986953735, 1.6858844757080078, 1.6916338205337524}, +{2.6326520442962646, 2.417417287826538, 1.9363573789596558}, +{2.694607734680176, 2.4728050231933594, 1.8888601064682007}, +{2.5679726600646973, 2.478566884994507, 1.9715657234191895}, +{0.5884751081466675, 2.482395887374878, 0.7891399264335632}, +{0.5514819622039795, 2.557675361633301, 0.743022084236145}, +{0.6806533336639404, 2.5049309730529785, 0.8016961812973022}, +{1.6036107540130615, 0.6394187808036804, 2.0714375972747803}, +{1.5332422256469727, 0.6147235631942749, 2.131443977355957}, +{1.6236917972564697, 0.7302120327949524, 2.0941457748413086}, +{1.7062562704086304, 3.068511962890625, 2.2200374603271484}, +{1.6996581554412842, 3.1507670879364014, 2.2685439586639404}, +{1.6776123046875, 3.0906031131744385, 2.131415843963623}, +{1.1511931419372559, 1.8701492547988892, 2.5026540756225586}, +{1.0572084188461304, 1.8874561786651611, 2.5080995559692383}, +{1.179735779762268, 1.8639988899230957, 2.5938122272491455}, +{2.065350294113159, 2.031670331954956, 1.927186369895935}, +{2.1590957641601562, 2.032942771911621, 1.9464858770370483}, +{2.054959535598755, 2.0934274196624756, 1.8547955751419067}, +{1.265281319618225, 3.131040573120117, 0.18036754429340363}, +{1.2299091815948486, 3.100273609161377, 0.09691386669874191}, +{1.2824305295944214, 3.224146842956543, 0.166244775056839}, +{3.12646746635437, 1.5098481178283691, 1.8236398696899414}, +{3.13079571723938, 1.602994680404663, 1.84525728225708}, +{3.1079347133636475, 1.5078860521316528, 1.7297515869140625}, +{2.1053600311279297, 0.7991490364074707, 0.9865232706069946}, +{2.1258435249328613, 0.7199870347976685, 1.0362838506698608}, +{2.1876227855682373, 0.8480419516563416, 0.9843692183494568}, +{0.2510855495929718, 1.9237382411956787, 3.1683294773101807}, +{0.2934381663799286, 1.945312738418579, 3.085244655609131}, +{0.17336079478263855, 1.8737765550613403, 3.143329381942749}, +{1.4432909488677979, 2.1364786624908447, 2.3505775928497314}, +{1.4889822006225586, 2.0532708168029785, 2.3628690242767334}, +{1.464884877204895, 2.1874265670776367, 2.4286820888519287}, +{2.582895278930664, 3.004650592803955, 1.3459910154342651}, +{2.6318321228027344, 2.995164155960083, 1.4277070760726929}, +{2.5038695335388184, 3.052612543106079, 1.3708288669586182}, +{0.8033796548843384, 2.4806907176971436, 1.491066336631775}, +{0.7402552962303162, 2.4368600845336914, 1.4340004920959473}, +{0.8795700073242188, 2.4227495193481445, 1.4914648532867432}, +{2.072251796722412, 2.6894896030426025, 2.3684940338134766}, +{2.142765522003174, 2.6963775157928467, 2.3041303157806396}, +{2.0546200275421143, 2.7799134254455566, 2.3944742679595947}, +{0.6669195294380188, 2.3912835121154785, 1.812272071838379}, +{0.6386646628379822, 2.448125123977661, 1.7406270503997803}, +{0.7031950950622559, 2.3141305446624756, 1.7687541246414185}, +{1.3692362308502197, 0.887884795665741, 0.873619556427002}, +{1.3080337047576904, 0.9541559219360352, 0.9056305885314941}, +{1.3482173681259155, 0.8787710666656494, 0.7806816101074219}, +{0.6331247091293335, 0.7281622290611267, 0.46122872829437256}, +{0.5945608019828796, 0.7444494962692261, 0.37514811754226685}, +{0.6404531002044678, 0.8149221539497375, 0.5009946823120117}, +{2.052685022354126, 2.981060028076172, 2.531367778778076}, +{2.026340961456299, 3.061401128768921, 2.486494541168213}, +{1.98316490650177, 2.965425729751587, 2.595280408859253}, +{1.0753761529922485, 2.402866840362549, 0.031034326180815697}, +{1.0737380981445312, 2.384697437286377, 0.12499982863664627}, +{1.05540132522583, 2.4962399005889893, 0.024342354387044907}, +{1.6276400089263916, 2.681452751159668, 2.997422933578491}, +{1.6586015224456787, 2.6878445148468018, 3.087771415710449}, +{1.707054615020752, 2.687910318374634, 2.944376230239868}, +{0.7104436159133911, 2.8104207515716553, 0.8994051814079285}, +{0.6371245384216309, 2.8482666015625, 0.9479265809059143}, +{0.7660859823226929, 2.771296501159668, 0.9667515158653259}, +{1.9713635444641113, 2.166897773742676, -0.1003415659070015}, +{1.973814606666565, 2.146090030670166, -0.006942697800695896}, +{1.8909655809402466, 2.217637777328491, -0.11147408932447433}, +{2.339824676513672, 1.757002353668213, 2.4961485862731934}, +{2.3143787384033203, 1.8046889305114746, 2.417149782180786}, +{2.3988280296325684, 1.8166792392730713, 2.542187213897705}, +{0.13797283172607422, 3.092522144317627, 0.4809221625328064}, +{0.12586475908756256, 3.0265350341796875, 0.41264745593070984}, +{0.14326134324073792, 3.042215347290039, 0.5621845722198486}, +{0.3099450469017029, 0.5593347549438477, 0.34924057126045227}, +{0.3825742304325104, 0.6054233908653259, 0.30725061893463135}, +{0.23163080215454102, 0.5942163467407227, 0.30666741728782654}, +{0.7598908543586731, 2.7907278537750244, 2.3465285301208496}, +{0.7502944469451904, 2.8319664001464844, 2.2606823444366455}, +{0.7712175846099854, 2.6976542472839355, 2.3272581100463867}, +{1.2094507217407227, 1.027964472770691, 0.16598665714263916}, +{1.257563591003418, 1.019169807434082, 0.24826741218566895}, +{1.1713547706604004, 1.1156949996948242, 0.1697767674922943}, +{2.2909607887268066, 1.7640712261199951, 1.3704901933670044}, +{2.381523370742798, 1.7483209371566772, 1.3971859216690063}, +{2.269477128982544, 1.6900029182434082, 1.3137922286987305}, +{1.5508102178573608, 0.8928442597389221, 0.2027367502450943}, +{1.6237618923187256, 0.8325899243354797, 0.18825289607048035}, +{1.4794509410858154, 0.8572180867195129, 0.14981278777122498}, +{1.2794451713562012, 1.8387343883514404, 3.0552725791931152}, +{1.3388797044754028, 1.7812896966934204, 3.1035423278808594}, +{1.204184651374817, 1.783346176147461, 3.0345287322998047}, +{2.672915458679199, 0.47989219427108765, 0.6971871256828308}, +{2.6717495918273926, 0.39143016934394836, 0.7337306141853333}, +{2.600023031234741, 0.4811457693576813, 0.6351594924926758}, +{1.8255535364151, 1.5711257457733154, 2.0257904529571533}, +{1.7511683702468872, 1.5844863653182983, 1.9670480489730835}, +{1.8984484672546387, 1.549584984779358, 1.9676127433776855}, +{2.466289520263672, 1.9212393760681152, 2.7230005264282227}, +{2.459914445877075, 2.0076053142547607, 2.6822257041931152}, +{2.3985486030578613, 1.9216216802597046, 2.7906272411346436}, +{0.40503743290901184, 0.17368273437023163, 2.633207082748413}, +{0.3447113335132599, 0.15012794733047485, 2.5627212524414062}, +{0.4544354975223541, 0.09348596632480621, 2.6502552032470703}, +{2.779369592666626, 1.2708040475845337, 1.633843183517456}, +{2.8386647701263428, 1.3308968544006348, 1.6789568662643433}, +{2.818647623062134, 1.1844295263290405, 1.6464530229568481}, +{2.527540683746338, 1.2659623622894287, 0.35910359025001526}, +{2.441258430480957, 1.2245228290557861, 0.3597692549228668}, +{2.5099222660064697, 1.3582631349563599, 0.3773375153541565}, +{0.8076217174530029, 1.9677767753601074, 1.4292211532592773}, +{0.8971787691116333, 1.9965736865997314, 1.4115407466888428}, +{0.8159851431846619, 1.9075350761413574, 1.5031354427337646}, +{1.5281085968017578, 0.26261141896247864, 1.8846299648284912}, +{1.584081768989563, 0.33068689703941345, 1.9219802618026733}, +{1.5412440299987793, 0.26999661326408386, 1.790103554725647}, +{0.2659021317958832, 0.22882024943828583, 1.747779369354248}, +{0.23887626826763153, 0.3019477128982544, 1.8033157587051392}, +{0.1901514232158661, 0.17031452059745789, 1.7466726303100586}, +{0.7893281579017639, 2.062469959259033, 0.17672713100910187}, +{0.7606179714202881, 2.0348305702209473, 0.2637564539909363}, +{0.8011866807937622, 2.1571450233459473, 0.18436387181282043}, +{2.152646541595459, 1.1651867628097534, 2.1281754970550537}, +{2.077162504196167, 1.2017723321914673, 2.0820670127868652}, +{2.1297476291656494, 1.1720870733261108, 2.2208597660064697}, +{1.8927026987075806, 2.529974937438965, 0.9358763098716736}, +{1.9001308679580688, 2.5770905017852783, 0.8528867959976196}, +{1.9288382530212402, 2.590188980102539, 1.0009211301803589}, +{3.0421571731567383, 3.1837897300720215, 0.7623470425605774}, +{3.0923476219177246, 3.2634754180908203, 0.7452169060707092}, +{2.978180170059204, 3.1800310611724854, 0.6912476420402527}, +{1.6746412515640259, 2.755786657333374, 1.9839234352111816}, +{1.671305775642395, 2.6991140842437744, 1.906855821609497}, +{1.6690319776535034, 2.844580888748169, 1.9486182928085327}, +{2.1570568084716797, 0.7009051442146301, 0.048182860016822815}, +{2.1695854663848877, 0.6747167706489563, -0.043028537184000015}, +{2.1059887409210205, 0.6297184228897095, 0.08674220740795135}, +{2.9896600246429443, 1.521034598350525, 1.5845049619674683}, +{2.927546501159668, 1.4888943433761597, 1.5191503763198853}, +{2.942756175994873, 1.5912054777145386, 1.6296535730361938}, +{2.5452306270599365, 2.7417163848876953, 1.549273133277893}, +{2.6048526763916016, 2.6673972606658936, 1.5584495067596436}, +{2.5987629890441895, 2.8181450366973877, 1.570610523223877}, +{0.8664768934249878, 1.3564079999923706, 2.9943759441375732}, +{0.9218819737434387, 1.4175623655319214, 2.945870876312256}, +{0.800121545791626, 1.3288675546646118, 2.931124210357666}, +{0.03634113818407059, 1.7486748695373535, 2.334235668182373}, +{-0.0088273286819458, 1.7013757228851318, 2.264343500137329}, +{-0.024285484105348587, 1.8184969425201416, 2.358966588973999}, +{1.6999112367630005, 0.9916169047355652, 2.360051155090332}, +{1.7643662691116333, 0.9230634570121765, 2.3424930572509766}, +{1.6986942291259766, 0.9994844198226929, 2.455439567565918}, +{1.6861275434494019, 2.8885817527770996, 1.7124632596969604}, +{1.6993273496627808, 2.9788544178009033, 1.7414275407791138}, +{1.7716484069824219, 2.8613574504852295, 1.6791867017745972}, +{3.100764274597168, 0.7913712859153748, 0.9579952359199524}, +{3.087550163269043, 0.8791022300720215, 0.9220649600028992}, +{3.0464179515838623, 0.7346522808074951, 0.9032984375953674}, +{0.48869627714157104, 0.9438481330871582, 1.113094687461853}, +{0.5155072808265686, 0.8581103682518005, 1.0800414085388184}, +{0.5640392303466797, 0.9747552871704102, 1.1633987426757812}, +{1.6381715536117554, 1.4057341814041138, 0.5070893168449402}, +{1.6650134325027466, 1.3282694816589355, 0.45768237113952637}, +{1.545911431312561, 1.3903757333755493, 0.5274490118026733}, +{2.050800323486328, 2.061832904815674, 0.2553287446498871}, +{2.098982810974121, 2.0776963233947754, 0.3365021049976349}, +{2.0233778953552246, 1.9703162908554077, 0.26124751567840576}, +{0.3258724510669708, 2.17987060546875, 1.835482120513916}, +{0.3260234594345093, 2.2668774127960205, 1.7955806255340576}, +{0.27277374267578125, 2.1898491382598877, 1.9144964218139648}, +{2.4719254970550537, 2.6601455211639404, 1.9280356168746948}, +{2.4117095470428467, 2.663578748703003, 1.8537081480026245}, +{2.4865877628326416, 2.7518463134765625, 1.9512373208999634}, +{0.9489600658416748, 2.178044319152832, 1.727454423904419}, +{0.9579604268074036, 2.154371976852417, 1.8197633028030396}, +{0.8611318469047546, 2.1484038829803467, 1.703580379486084}, +{2.7300150394439697, 1.2559359073638916, 1.3564265966415405}, +{2.7386844158172607, 1.264872431755066, 1.4513332843780518}, +{2.814805030822754, 1.222043752670288, 1.3277159929275513}, +{3.2020511627197266, 1.3391577005386353, 0.13016247749328613}, +{3.198591947555542, 1.395827054977417, 0.05309799686074257}, +{3.114574432373047, 1.3006707429885864, 0.13553690910339355}, +{0.4838334619998932, 2.8448431491851807, 1.645143985748291}, +{0.5346422791481018, 2.886155366897583, 1.575329303741455}, +{0.5298968553543091, 2.7628555297851562, 1.6629905700683594}, +{2.1216208934783936, 2.1937010288238525, 2.283449411392212}, +{2.0878922939300537, 2.2207868099212646, 2.3688371181488037}, +{2.0439019203186035, 2.166980743408203, 2.2343766689300537}, +{0.6222054958343506, 0.04564570263028145, 1.5613254308700562}, +{0.6594587564468384, 0.07049050182104111, 1.6459259986877441}, +{0.670723557472229, 0.09794336557388306, 1.4975032806396484}, +{1.626046895980835, 2.6880908012390137, 2.4864389896392822}, +{1.6371557712554932, 2.727269411087036, 2.399813652038574}, +{1.6672651767730713, 2.750338554382324, 2.5463438034057617}, +{0.08395248651504517, 0.04538280889391899, 1.816794753074646}, +{0.055178768932819366, 0.03757965937256813, 1.725835919380188}, +{0.1009816974401474, -0.04469260573387146, 1.8443399667739868}, +{2.0700504779815674, 0.37946847081184387, 0.6949761509895325}, +{1.9847187995910645, 0.41698387265205383, 0.7167346477508545}, +{2.0498344898223877, 0.3059024214744568, 0.6371689438819885}, +{1.8461613655090332, 1.7283490896224976, 0.7759722471237183}, +{1.8648366928100586, 1.8201059103012085, 0.7561172246932983}, +{1.855025291442871, 1.6833760738372803, 0.6919414401054382}, +{2.141624927520752, 1.704287052154541, 1.6222412586212158}, +{2.147178888320923, 1.74285888671875, 1.5348130464553833}, +{2.2313733100891113, 1.677903413772583, 1.6425254344940186}, +{1.826816439628601, 0.13913996517658234, 0.8702711462974548}, +{1.791649341583252, 0.17847105860710144, 0.7904046773910522}, +{1.7942216396331787, 0.19499951601028442, 0.9408375024795532}, +{1.5442129373550415, 2.8765387535095215, 1.3192907571792603}, +{1.6080470085144043, 2.820237159729004, 1.275499701499939}, +{1.4602917432785034, 2.8324685096740723, 1.3059732913970947}, +{0.5592716932296753, 2.5766282081604004, 1.6364710330963135}, +{0.6460477709770203, 2.6055119037628174, 1.6082227230072021}, +{0.5075191855430603, 2.5740249156951904, 1.5559898614883423}, +{0.4384300112724304, 1.9122360944747925, 0.23808106780052185}, +{0.3869723081588745, 1.917453646659851, 0.15753790736198425}, +{0.519483208656311, 1.8685450553894043, 0.21193158626556396}, +{0.4065684676170349, 1.8065391778945923, 1.3016924858093262}, +{0.49207931756973267, 1.7796053886413574, 1.2681547403335571}, +{0.4058268666267395, 1.9017343521118164, 1.2917107343673706}, +{2.919402837753296, 1.7708779573440552, 2.36124587059021}, +{2.890219211578369, 1.7748373746871948, 2.4523227214813232}, +{2.8855807781219482, 1.687391996383667, 2.3288657665252686}, +{0.004383731633424759, 0.5954565405845642, 2.564349412918091}, +{-0.04272891581058502, 0.6772982478141785, 2.5799906253814697}, +{0.0618654228746891, 0.6146919131278992, 2.490267038345337}, +{2.1848859786987305, 3.1176559925079346, 0.12780453264713287}, +{2.161315441131592, 3.1944520473480225, 0.17985357344150543}, +{2.1168956756591797, 3.0533359050750732, 0.14786909520626068}, +{0.8249475359916687, 2.523378372192383, 0.482353150844574}, +{0.785812258720398, 2.4829249382019043, 0.40493059158325195}, +{0.9001080989837646, 2.5720582008361816, 0.44853755831718445}, +{0.42102664709091187, 1.1907862424850464, 0.5707678198814392}, +{0.37046411633491516, 1.1982253789901733, 0.4898332357406616}, +{0.3569397032260895, 1.1641302108764648, 0.6366816163063049}, +{1.6721751689910889, -0.009986679069697857, 1.8235633373260498}, +{1.7176986932754517, 0.07352964580059052, 1.8342849016189575}, +{1.5798882246017456, 0.011035109870135784, 1.8378292322158813}, +{1.6124554872512817, 1.5114073753356934, 2.9120893478393555}, +{1.607971429824829, 1.4343582391738892, 2.968707799911499}, +{1.6722429990768433, 1.5709209442138672, 2.9573209285736084}, +{3.007296085357666, 1.080641508102417, 3.1077992916107178}, +{2.9920268058776855, 1.1315191984176636, 3.187427520751953}, +{2.950230836868286, 1.1209031343460083, 3.0423405170440674}, +{1.6280747652053833, 1.5364537239074707, 0.8085994720458984}, +{1.5835812091827393, 1.453066349029541, 0.8237382173538208}, +{1.6768989562988281, 1.5231451988220215, 0.7273504734039307}, +{2.384371042251587, 2.6954290866851807, 1.3317809104919434}, +{2.4172279834747314, 2.6657888889312744, 1.4166585206985474}, +{2.348970413208008, 2.6164517402648926, 1.2908945083618164}, +{2.0162410736083984, 0.2746312916278839, 2.718250274658203}, +{2.03225040435791, 0.20018893480300903, 2.7762532234191895}, +{2.101728677749634, 0.3167181611061096, 2.7091445922851562}, +{0.4426819980144501, 3.1746435165405273, 0.8205464482307434}, +{0.45681408047676086, 3.2065258026123047, 0.9096875190734863}, +{0.3837723433971405, 3.238987684249878, 0.7811536192893982}, +{1.6592880487442017, 2.504606246948242, 0.6365962028503418}, +{1.681106448173523, 2.430528402328491, 0.6931536197662354}, +{1.740325689315796, 2.5552563667297363, 0.6311386227607727}, +{1.8008939027786255, 0.57280033826828, 2.634859323501587}, +{1.8131986856460571, 0.47847872972488403, 2.6241660118103027}, +{1.7365789413452148, 0.5962991714477539, 2.5679736137390137}, +{0.47858119010925293, 2.7966887950897217, 2.8775742053985596}, +{0.49494868516921997, 2.7789995670318604, 2.9702107906341553}, +{0.5637695789337158, 2.7849507331848145, 2.8355329036712646}, +{0.0383930429816246, 2.88844895362854, 0.2916748821735382}, +{0.0023958184756338596, 2.885660409927368, 0.20302534103393555}, +{0.11515278369188309, 2.8313705921173096, 0.28816258907318115}, +{2.3104171752929688, 0.3521048426628113, 0.5645092129707336}, +{2.38555908203125, 0.3384626805782318, 0.6222144365310669}, +{2.2343857288360596, 0.3459734618663788, 0.6223360300064087}, +{1.6891202926635742, 1.9275963306427002, 2.96610689163208}, +{1.6101850271224976, 1.9563868045806885, 2.9202520847320557}, +{1.7610008716583252, 1.9690766334533691, 2.9184112548828125}, +{0.22476576268672943, 2.8871843814849854, 1.574384093284607}, +{0.2380414605140686, 2.963355302810669, 1.5179566144943237}, +{0.3115752339363098, 2.868389368057251, 1.6100656986236572}, +{1.5001671314239502, 2.9956576824188232, 2.713799238204956}, +{1.4191855192184448, 2.978641986846924, 2.761911153793335}, +{1.569757103919983, 2.9687774181365967, 2.7737741470336914}, +{0.605975866317749, 1.306647777557373, 2.5592308044433594}, +{0.682287871837616, 1.2495113611221313, 2.5506155490875244}, +{0.6001384258270264, 1.324833631515503, 2.6530258655548096}, +{0.23823411762714386, 1.9077348709106445, 2.138532876968384}, +{0.18166066706180573, 1.9769870042800903, 2.1043877601623535}, +{0.18610751628875732, 1.8278958797454834, 2.130115032196045}, +{0.6901768445968628, 2.838442802429199, 2.0876333713531494}, +{0.6734433174133301, 2.899907350540161, 2.016188144683838}, +{0.7151558995246887, 2.7570645809173584, 2.0438621044158936}, +{0.8239476680755615, 0.2686867117881775, 0.5691923499107361}, +{0.8175297379493713, 0.3542364537715912, 0.5267379283905029}, +{0.7784185409545898, 0.27988529205322266, 0.6526430249214172}, +{2.3553593158721924, 0.22959622740745544, 2.9773967266082764}, +{2.33557391166687, 0.22753700613975525, 3.0710270404815674}, +{2.386486053466797, 0.14128205180168152, 2.9575462341308594}, +{1.1378568410873413, 1.8479641675949097, 1.9950931072235107}, +{1.1702691316604614, 1.7661776542663574, 2.0328123569488525}, +{1.10202956199646, 1.8961703777313232, 2.069624185562134}, +{2.9018568992614746, 2.181433916091919, 2.9538991451263428}, +{2.9359843730926514, 2.1205928325653076, 2.888355016708374}, +{2.83368182182312, 2.2304184436798096, 2.907910108566284}, +{2.8488733768463135, 0.22911399602890015, 0.03656379133462906}, +{2.9416701793670654, 0.21996909379959106, 0.05818422883749008}, +{2.8460159301757812, 0.30067676305770874, -0.02694150246679783}, +{1.3197031021118164, 1.8233349323272705, 0.47586578130722046}, +{1.239157795906067, 1.816851258277893, 0.5271759033203125}, +{1.3751345872879028, 1.8833208084106445, 0.5257793068885803}, +{0.6633480787277222, 1.9788498878479004, 0.41489753127098083}, +{0.6627059578895569, 1.9534600973129272, 0.5071865320205688}, +{0.5818306803703308, 1.9431326389312744, 0.37966254353523254}, +{0.5630747079849243, 1.0719873905181885, 0.23579904437065125}, +{0.5710214972496033, 1.0510164499282837, 0.32885485887527466}, +{0.6305171847343445, 1.138122320175171, 0.22030678391456604}, +{2.6615967750549316, 0.945190966129303, 2.217928409576416}, +{2.688066005706787, 0.8545135855674744, 2.233398199081421}, +{2.7430713176727295, 0.9951556921005249, 2.2231967449188232}, +{0.9712032079696655, 2.269775152206421, 0.6081643104553223}, +{1.006057858467102, 2.195606231689453, 0.6576256155967712}, +{1.0479099750518799, 2.308779239654541, 0.5662466883659363}, +{1.814204454421997, 0.13574859499931335, 0.267467200756073}, +{1.8224538564682007, 0.11787454783916473, 0.36114102602005005}, +{1.7198231220245361, 0.1371949166059494, 0.25158050656318665}, +{2.6721105575561523, 1.7190546989440918, 0.943368136882782}, +{2.673217296600342, 1.7618333101272583, 0.8577463626861572}, +{2.6997504234313965, 1.6291542053222656, 0.9255850315093994}, +{1.3299726247787476, 3.0842368602752686, 2.136585235595703}, +{1.2788193225860596, 3.082911252975464, 2.0556907653808594}, +{1.3640565872192383, 2.9951717853546143, 2.1448323726654053}, +{0.9512899518013, 1.835361123085022, 0.12148898094892502}, +{0.8902390003204346, 1.9033983945846558, 0.14987967908382416}, +{1.0268093347549438, 1.8452357053756714, 0.17946851253509521}, +{2.7049951553344727, 2.7416162490844727, 0.8946581482887268}, +{2.764157772064209, 2.8168551921844482, 0.8957507610321045}, +{2.654398202896118, 2.7497570514678955, 0.9755036234855652}, +{1.3140679597854614, 0.5552121996879578, 0.7291603684425354}, +{1.2193124294281006, 0.5455372929573059, 0.7386520504951477}, +{1.3501875400543213, 0.5167985558509827, 0.8090483546257019}, +{0.429066002368927, 2.916274309158325, 2.182957649230957}, +{0.4434790313243866, 3.0085411071777344, 2.2039682865142822}, +{0.5170393586158752, 2.8789896965026855, 2.1772258281707764}, +{0.6121252179145813, 2.9823100566864014, 1.4113434553146362}, +{0.602735161781311, 3.0616283416748047, 1.4640953540802002}, +{0.570202112197876, 3.0038506984710693, 1.32803213596344}, +{3.063021659851074, 1.3212692737579346, 0.6560187935829163}, +{3.142289400100708, 1.3649107217788696, 0.6872332096099854}, +{2.9919488430023193, 1.380804419517517, 0.6798210740089417}, +{0.29476627707481384, 1.1946208477020264, 1.3926492929458618}, +{0.22978082299232483, 1.2638717889785767, 1.3806700706481934}, +{0.26534950733184814, 1.123965859413147, 1.3351614475250244}, +{1.158874273300171, 3.1017398834228516, 3.063762664794922}, +{1.2472858428955078, 3.096249580383301, 3.027491807937622}, +{1.1077362298965454, 3.0398027896881104, 3.011695146560669}, +{0.5022509694099426, 2.3338303565979004, 2.04998517036438}, +{0.4124786853790283, 2.3530216217041016, 2.0228750705718994}, +{0.5565438866615295, 2.3679466247558594, 1.9789170026779175}, +{1.0404285192489624, 0.5394441485404968, 1.744773030281067}, +{1.0355948209762573, 0.6256842613220215, 1.786023497581482}, +{1.0984734296798706, 0.5520193576812744, 1.6697065830230713}, +{1.995019793510437, 2.9556210041046143, 0.4906286895275116}, +{2.0773403644561768, 2.9372599124908447, 0.5358894467353821}, +{1.9286184310913086, 2.9525580406188965, 0.5595039129257202}, +{2.364900588989258, 0.6509662866592407, 0.5809966921806335}, +{2.290937662124634, 0.7013082504272461, 0.5469749569892883}, +{2.3463733196258545, 0.6413357853889465, 0.674411416053772}, +{1.3355321884155273, 1.8501821756362915, 2.7588744163513184}, +{1.3951631784439087, 1.9220728874206543, 2.7379415035247803}, +{1.2998484373092651, 1.872893214225769, 2.8447418212890625}, +{1.0312883853912354, 0.8978121876716614, 2.2387049198150635}, +{1.0595570802688599, 0.9102654457092285, 2.329303503036499}, +{0.9458467364311218, 0.9407235383987427, 2.234160900115967}, +{2.2798924446105957, 2.2436389923095703, 1.838220477104187}, +{2.2687814235687256, 2.3191440105438232, 1.895994782447815}, +{2.348280191421509, 2.191333532333374, 1.8800482749938965}, +{1.0502513647079468, 1.9862544536590576, 2.2270498275756836}, +{0.9859189987182617, 2.0308585166931152, 2.282132863998413}, +{1.0835829973220825, 1.9152231216430664, 2.2818756103515625}, +{0.6040713787078857, 0.06197153404355049, 2.942612648010254}, +{0.6305046677589417, -0.014260482043027878, 2.994112968444824}, +{0.5269505381584167, 0.032557833939790726, 2.8941407203674316}, +{2.5998759269714355, 1.7737237215042114, 0.33520522713661194}, +{2.560950756072998, 1.8068886995315552, 0.4161202013492584}, +{2.649146318435669, 1.8479294776916504, 0.3001587986946106}, +{1.0399584770202637, 2.74605655670166, 2.172919750213623}, +{1.0933359861373901, 2.666764736175537, 2.1780169010162354}, +{0.9802265763282776, 2.730062961578369, 2.099853754043579}, +{0.7060624361038208, 2.193690538406372, 0.61078941822052}, +{0.6844263672828674, 2.1567914485931396, 0.5251584649085999}, +{0.7943335771560669, 2.2291038036346436, 0.5999995470046997}, +{2.6072752475738525, 0.3447069525718689, 2.986051559448242}, +{2.5977516174316406, 0.4098556637763977, 3.055530071258545}, +{2.5176918506622314, 0.32707878947257996, 2.9573044776916504}, +{0.26081782579421997, 1.194732904434204, 0.3532522916793823}, +{0.16719761490821838, 1.214499831199646, 0.35586854815483093}, +{0.30250847339630127, 1.2787413597106934, 0.3341003954410553}, +{1.728398084640503, 1.96580970287323, 2.381990671157837}, +{1.7307301759719849, 1.9008593559265137, 2.4522640705108643}, +{1.7840622663497925, 1.9289124011993408, 2.3134167194366455}, +{1.1929932832717896, 1.209082841873169, 3.064584970474243}, +{1.1989613771438599, 1.153777837753296, 3.1424827575683594}, +{1.1055474281311035, 1.1918985843658447, 3.0296530723571777}, +{2.360150098800659, 2.432511329650879, 1.2481470108032227}, +{2.4103009700775146, 2.380585193634033, 1.3110032081604004}, +{2.3560562133789062, 2.377779483795166, 1.1697250604629517}, +{1.8160432577133179, 1.676605224609375, 3.009641170501709}, +{1.7769513130187988, 1.763587474822998, 3.0179007053375244}, +{1.8901258707046509, 1.6777876615524292, 3.0702438354492188}, +{1.3147779703140259, 2.07973051071167, 0.6123774647712708}, +{1.3072408437728882, 2.1390554904937744, 0.6871174573898315}, +{1.3092238903045654, 2.1368727684020996, 0.5357861518859863}, +{3.069643497467041, 0.20830228924751282, 2.7323083877563477}, +{3.1176223754882812, 0.12637397646903992, 2.744478464126587}, +{3.0693440437316895, 0.24898084998130798, 2.8189539909362793}, +{2.200293779373169, 1.0710982084274292, 3.1042680740356445}, +{2.133213520050049, 1.057930588722229, 3.037266731262207}, +{2.1577680110931396, 1.125799536705017, 3.1703107357025146}, +{0.07798819243907928, 2.510202646255493, 0.09243810176849365}, +{0.0029227244667708874, 2.484196662902832, 0.03904170170426369}, +{0.04837034270167351, 2.4985086917877197, 0.1827063262462616}, +{2.2041773796081543, 1.3101139068603516, 2.9047954082489014}, +{2.283294439315796, 1.363837480545044, 2.9088668823242188}, +{2.1723906993865967, 1.3074113130569458, 2.9950430393218994}, +{0.5125660300254822, 1.5059832334518433, 2.9565374851226807}, +{0.4347727298736572, 1.5097980499267578, 2.9008960723876953}, +{0.5455222725868225, 1.4167897701263428, 2.9455485343933105}, +{1.2729194164276123, 1.6431200504302979, 2.1512417793273926}, +{1.3494971990585327, 1.5856921672821045, 2.151693105697632}, +{1.2212934494018555, 1.614793300628662, 2.2267048358917236}, +{1.7938424348831177, 2.887235403060913, 2.6826345920562744}, +{1.8096013069152832, 2.9339044094085693, 2.764707565307617}, +{1.8265811204910278, 2.798741102218628, 2.698735237121582}, +{0.14607833325862885, 1.4476834535598755, 2.646285057067871}, +{0.2039186954498291, 1.4336578845977783, 2.72125244140625}, +{0.1846015304327011, 1.395150065422058, 2.576152801513672}, +{2.017453193664551, 0.7771768569946289, 1.4780808687210083}, +{2.1121280193328857, 0.7761711478233337, 1.4640096426010132}, +{1.9844179153442383, 0.705545961856842, 1.4238590002059937}, +{0.3550054728984833, 2.1550586223602295, 0.43933722376823425}, +{0.350892037153244, 2.240934133529663, 0.39725667238235474}, +{0.4122934639453888, 2.1033551692962646, 0.38270536065101624}, +{2.5185885429382324, 2.7675881385803223, 1.1125694513320923}, +{2.466779947280884, 2.8440518379211426, 1.0874404907226562}, +{2.4764323234558105, 2.7352020740509033, 1.19217050075531}, +{0.4176520109176636, 0.03992919251322746, 2.213163137435913}, +{0.3660176694393158, 0.06412134319543839, 2.290045976638794}, +{0.3662923276424408, 0.07163816690444946, 2.1388728618621826}, +{2.5843722820281982, 2.5051581859588623, 0.6342360377311707}, +{2.5378077030181885, 2.587324857711792, 0.6498144865036011}, +{2.6507723331451416, 2.52726674079895, 0.5689324736595154}, +{2.7260916233062744, 2.944004535675049, 1.5810396671295166}, +{2.814183473587036, 2.978423595428467, 1.5662938356399536}, +{2.7167043685913086, 2.9422247409820557, 1.6762815713882446}, +{0.20982450246810913, 0.8940290212631226, 2.171161651611328}, +{0.16796594858169556, 0.8144387602806091, 2.2039575576782227}, +{0.23033207654953003, 0.874382495880127, 2.07975172996521}, +{0.4841754734516144, 0.5203399658203125, 2.928253173828125}, +{0.5203781723976135, 0.5652796626091003, 2.8518850803375244}, +{0.4428676962852478, 0.44176340103149414, 2.8924522399902344}, +{2.559222936630249, 1.690995693206787, 1.9000556468963623}, +{2.530297040939331, 1.637136697769165, 1.9737091064453125}, +{2.619591236114502, 1.7542972564697266, 1.938926339149475}, +{1.5990475416183472, 0.4468620717525482, 0.1582438051700592}, +{1.5378137826919556, 0.4906924068927765, 0.09915368258953094}, +{1.6829779148101807, 0.44990235567092896, 0.11232230067253113}, +{2.519986867904663, 1.8997950553894043, 0.05372406914830208}, +{2.5138134956359863, 1.9899389743804932, 0.08531983196735382}, +{2.571993112564087, 1.8546277284622192, 0.12018901854753494}, +{0.2006574273109436, 2.2699029445648193, 2.0537514686584473}, +{0.14666450023651123, 2.342118740081787, 2.0858752727508545}, +{0.1557157039642334, 2.191039562225342, 2.084135055541992}, +{1.559256911277771, 0.3030206263065338, 1.619766354560852}, +{1.5910100936889648, 0.31176769733428955, 1.5298912525177002}, +{1.4681545495986938, 0.3321394920349121, 1.615922451019287}, +{2.0015413761138916, 3.257892608642578, 1.2528382539749146}, +{2.0429399013519287, 3.2535488605499268, 1.3390334844589233}, +{1.9783661365509033, 3.167207717895508, 1.2328011989593506}, +{0.1193501353263855, 0.10136101394891739, 1.2945607900619507}, +{0.1995069980621338, 0.15034672617912292, 1.2761869430541992}, +{0.08116757869720459, 0.08471336960792542, 1.2083791494369507}, +{0.09278304874897003, 0.35808297991752625, 1.4706974029541016}, +{0.1290542483329773, 0.26961469650268555, 1.475178837776184}, +{0.14073458313941956, 0.4070422947406769, 1.5375252962112427}, +{2.75618314743042, 1.5697921514511108, 0.21847020089626312}, +{2.801720142364502, 1.6262590885162354, 0.15601873397827148}, +{2.680706262588501, 1.621394395828247, 0.24680322408676147}, +{1.1668130159378052, 0.6947407126426697, 2.0755646228790283}, +{1.141198754310608, 0.6887204647064209, 1.9835320711135864}, +{1.1185013055801392, 0.770317554473877, 2.1089775562286377}, +{1.1084842681884766, 2.872000217437744, 2.3802428245544434}, +{1.198782205581665, 2.8412575721740723, 2.3882107734680176}, +{1.0732229948043823, 2.8236424922943115, 2.305540084838867}, +{1.252167820930481, 1.8524155616760254, 1.263885736465454}, +{1.1825944185256958, 1.8831015825271606, 1.3220254182815552}, +{1.3165390491485596, 1.8126142024993896, 1.3224904537200928}, +{0.032632943242788315, 0.10685194283723831, 1.0178444385528564}, +{0.03701917454600334, 0.016011051833629608, 0.9879946112632751}, +{0.07948105037212372, 0.15642023086547852, 0.9506837129592896}, +{2.580752372741699, 3.025876522064209, 2.2469091415405273}, +{2.6078381538391113, 3.112339973449707, 2.277775764465332}, +{2.662839651107788, 2.9788482189178467, 2.2323379516601562}, +{0.9077188372612, 2.821028232574463, 2.572126626968384}, +{0.9892085790634155, 2.8471181392669678, 2.529219150543213}, +{0.8428673148155212, 2.819941997528076, 2.5017318725585938}, +{0.7308036684989929, 3.036407947540283, -0.04708518460392952}, +{0.6862447261810303, 2.951702117919922, -0.04577183350920677}, +{0.7722810506820679, 3.0429883003234863, 0.03893021494150162}, +{2.356762170791626, 0.4617875814437866, 0.3039192855358124}, +{2.3277742862701416, 0.4365582764148712, 0.3915863037109375}, +{2.4422085285186768, 0.5026423335075378, 0.31777897477149963}, +{0.07059000432491302, 1.7885208129882812, 1.313259243965149}, +{0.126066654920578, 1.8664052486419678, 1.3089361190795898}, +{0.002400257159024477, 1.804028034210205, 1.2478986978530884}, +{1.8166611194610596, 1.1474956274032593, 0.04780776426196098}, +{1.8286494016647339, 1.0599195957183838, 0.011078383773565292}, +{1.848210096359253, 1.1402143239974976, 0.13788530230522156}, +{2.589472532272339, 0.1419936567544937, 0.06507421284914017}, +{2.550668716430664, 0.21903632581233978, 0.0235891193151474}, +{2.6836259365081787, 0.15922099351882935, 0.06426271796226501}, +{0.715049147605896, 1.6260526180267334, 1.3417308330535889}, +{0.7003956437110901, 1.6864300966262817, 1.2689149379730225}, +{0.8096834421157837, 1.6281930208206177, 1.35594642162323}, +{0.8879607915878296, 0.6631634831428528, 2.2849113941192627}, +{0.9474152326583862, 0.734614908695221, 2.2620604038238525}, +{0.8518043160438538, 0.634357213973999, 2.20109486579895}, +{1.3381792306900024, 0.48925483226776123, 1.789476752281189}, +{1.3985517024993896, 0.5629451870918274, 1.7801382541656494}, +{1.336551547050476, 0.4713922441005707, 1.8835011720657349}, +{1.5209548473358154, 2.780977964401245, 0.582006573677063}, +{1.529967188835144, 2.6869301795959473, 0.5973737835884094}, +{1.4334475994110107, 2.8022680282592773, 0.614433765411377}, +{3.0611469745635986, 1.5529730319976807, 2.1572306156158447}, +{3.060861110687256, 1.471434473991394, 2.207367420196533}, +{2.998866558074951, 1.5376218557357788, 2.0861823558807373}, +{1.3725862503051758, 0.2992396354675293, 2.5945420265197754}, +{1.4388372898101807, 0.23546326160430908, 2.567976951599121}, +{1.3177274465560913, 0.2520887851715088, 2.657228708267212}, +{1.690394639968872, 1.9593703746795654, 2.004434108734131}, +{1.6560579538345337, 2.044942855834961, 2.030137300491333}, +{1.6622111797332764, 1.9002922773361206, 2.074275255203247}, +{2.3161046504974365, 2.4140381813049316, 0.6289855241775513}, +{2.402658462524414, 2.427199363708496, 0.5902876853942871}, +{2.311408519744873, 2.3199081420898438, 0.6457120776176453}, +{1.8914796113967896, 0.5215781331062317, 0.9794341325759888}, +{1.9209363460540771, 0.4343104362487793, 1.0054912567138672}, +{1.8594725131988525, 0.510320246219635, 0.8899292349815369}, +{1.7128268480300903, 2.99810791015625, 2.939162015914917}, +{1.7895145416259766, 2.994424819946289, 2.996326208114624}, +{1.6729540824890137, 3.083059787750244, 2.9580206871032715}, +{0.7645607590675354, 1.7845999002456665, 2.2331745624542236}, +{0.8198285102844238, 1.707155704498291, 2.2436723709106445}, +{0.6841434836387634, 1.7514029741287231, 2.193258047103882}, +{1.4338173866271973, 2.202939748764038, -0.05688230320811272}, +{1.3546301126480103, 2.241847038269043, -0.01976197585463524}, +{1.5046695470809937, 2.2349441051483154, -0.001043211086653173}, +{0.9713637232780457, 2.5220530033111572, 1.1510992050170898}, +{0.9893780946731567, 2.429234743118286, 1.1361802816390991}, +{0.8761875629425049, 2.526834726333618, 1.1600968837738037}, +{2.7253036499023438, 0.5659642219543457, 1.4525717496871948}, +{2.63261079788208, 0.5766946077346802, 1.4739073514938354}, +{2.7259957790374756, 0.5049828290939331, 1.3787941932678223}, +{0.2346819043159485, 0.5120766162872314, 0.0471901074051857}, +{0.15421876311302185, 0.512204647064209, -0.004655676893889904}, +{0.28258928656578064, 0.5893474221229553, 0.01724989339709282}, +{2.4315195083618164, 1.8610951900482178, 0.9312449097633362}, +{2.5029380321502686, 1.8144149780273438, 0.9746345281600952}, +{2.4553956985473633, 1.9535033702850342, 0.9385235905647278}, +{2.155073881149292, 3.061328649520874, 0.757125198841095}, +{2.1456363201141357, 3.12377667427063, 0.8290522694587708}, +{2.097916841506958, 3.095292329788208, 0.6882639527320862}, +{1.2983242273330688, 1.6037005186080933, 1.086100459098816}, +{1.2878665924072266, 1.6154638528823853, 0.9916834235191345}, +{1.315500020980835, 1.691763162612915, 1.1194514036178589}, +{1.429795265197754, 2.3111581802368164, 1.2153100967407227}, +{1.4783859252929688, 2.376833915710449, 1.1654304265975952}, +{1.4280054569244385, 2.3454370498657227, 1.3046637773513794}, +{2.874068021774292, 1.7754162549972534, 0.11695510149002075}, +{2.9346585273742676, 1.8457441329956055, 0.09360803663730621}, +{2.8715767860412598, 1.7767267227172852, 0.21263369917869568}, +{2.1314780712127686, 3.170755624771118, 2.8520963191986084}, +{2.1207916736602783, 3.0759544372558594, 2.859896421432495}, +{2.209634304046631, 3.1903796195983887, 2.903756856918335}, +{3.009692430496216, 1.3168377876281738, 2.2850887775421143}, +{2.930807113647461, 1.2640284299850464, 2.2973599433898926}, +{3.0700998306274414, 1.2591520547866821, 2.2383382320404053}, +{1.5411385297775269, 2.080995559692383, 0.7718697786331177}, +{1.4616892337799072, 2.0571506023406982, 0.7241039872169495}, +{1.5274426937103271, 2.172321081161499, 0.7970569133758545}, +{1.2180169820785522, 2.953413486480713, 1.5098334550857544}, +{1.1362031698226929, 2.908616781234741, 1.488337516784668}, +{1.2634899616241455, 2.893254041671753, 1.5687856674194336}, +{0.048572100698947906, 2.4735970497131348, 1.8435195684432983}, +{0.13807088136672974, 2.4410505294799805, 1.833875298500061}, +{0.034936435520648956, 2.4785046577453613, 1.938136100769043}, +{1.285030484199524, 1.4669820070266724, 2.9693856239318848}, +{1.2885464429855347, 1.3828401565551758, 3.0148839950561523}, +{1.2520424127578735, 1.4456512928009033, 2.8820981979370117}, +{2.596080780029297, 0.2309705764055252, 0.799456775188446}, +{2.642261505126953, 0.17152884602546692, 0.7403269410133362}, +{2.630152702331543, 0.2096046358346939, 0.8863182663917542}, +{0.2729171812534332, 0.18008208274841309, 0.46438780426979065}, +{0.23746749758720398, 0.09122339636087418, 0.4675142168998718}, +{0.36547499895095825, 0.1682073026895523, 0.44307222962379456}, +{0.0922275111079216, 1.151701807975769, 2.9101247787475586}, +{0.06833027303218842, 1.1605271100997925, 3.002392530441284}, +{0.010218212381005287, 1.1291959285736084, 2.86618971824646}, +{0.40363678336143494, 1.402247428894043, 1.0876166820526123}, +{0.3149547278881073, 1.3935911655426025, 1.1225863695144653}, +{0.42153701186180115, 1.3176740407943726, 1.0465164184570312}, +{1.0248733758926392, 1.9986834526062012, 0.6678715944290161}, +{1.1197961568832397, 1.9936832189559937, 0.6791397929191589}, +{1.003753423690796, 1.9255294799804688, 0.6098649501800537}, +{0.45605888962745667, 1.048431396484375, -0.02415771782398224}, +{0.36747831106185913, 1.0681772232055664, 0.006270957179367542}, +{0.507905125617981, 1.0413905382156372, 0.055996593087911606}, +{2.39209246635437, 1.398310899734497, 0.9810745120048523}, +{2.3474671840667725, 1.3420463800430298, 0.9177877306938171}, +{2.444389820098877, 1.338073492050171, 1.0339776277542114}, +{0.1821647733449936, 0.5990367531776428, 0.9641402959823608}, +{0.24539074301719666, 0.6228329539299011, 0.896327793598175}, +{0.11342903226613998, 0.6652806401252747, 0.9571073055267334}, +{0.982261598110199, 2.480074882507324, 2.541902542114258}, +{0.9262936115264893, 2.5107648372650146, 2.470571994781494}, +{0.9330906867980957, 2.500551223754883, 2.621433973312378}, +{0.2549978792667389, 2.080012559890747, 2.8749196529388428}, +{0.2272677719593048, 2.1632330417633057, 2.836609125137329}, +{0.17361703515052795, 2.0313162803649902, 2.8878865242004395}, +{3.148529529571533, 0.43224114179611206, 1.146159052848816}, +{3.203352212905884, 0.4839114248752594, 1.0871083736419678}, +{3.1908321380615234, 0.34642884135246277, 1.1491700410842896}, +{0.3535672724246979, 1.5438965559005737, 3.23530912399292}, +{0.41139453649520874, 1.5580867528915405, 3.160362720489502}, +{0.28308188915252686, 1.6075862646102905, 3.2235727310180664}, +{2.8860843181610107, 2.5730621814727783, 0.760535478591919}, +{2.8382070064544678, 2.4905450344085693, 0.7527258992195129}, +{2.8282153606414795, 2.629577875137329, 0.8117163181304932}, +{0.11566115915775299, 3.024700403213501, 2.7317006587982178}, +{0.1046949177980423, 3.0551254749298096, 2.6416096687316895}, +{0.033711571246385574, 2.97953724861145, 2.751871347427368}, +{2.594423532485962, 0.2748863101005554, 2.5935046672821045}, +{2.606651544570923, 0.3444589078426361, 2.6580991744995117}, +{2.647836208343506, 0.3018988370895386, 2.5188071727752686}, +{0.8513423800468445, 2.258596658706665, 2.1800971031188965}, +{0.9078591465950012, 2.283259153366089, 2.2533087730407715}, +{0.7629396319389343, 2.259279727935791, 2.2167959213256836}, +{0.8784563541412354, 0.21289493143558502, 2.3884263038635254}, +{0.8120927810668945, 0.1767231673002243, 2.3296914100646973}, +{0.9375134706497192, 0.1396111100912094, 2.4058635234832764}, +{2.6049249172210693, 1.524878740310669, 2.3418235778808594}, +{2.584803342819214, 1.4332547187805176, 2.3608627319335938}, +{2.600935935974121, 1.5309436321258545, 2.2463793754577637}, +{0.2994561791419983, 2.7094500064849854, 0.36504364013671875}, +{0.3851962387561798, 2.6879801750183105, 0.4017859995365143}, +{0.30547571182250977, 2.6831188201904297, 0.27321362495422363}, +{1.737034559249878, 2.6940484046936035, 0.10074006766080856}, +{1.76238214969635, 2.6233956813812256, 0.160137340426445}, +{1.729645848274231, 2.7711398601531982, 0.15699502825737}, +{0.72552889585495, 1.3145033121109009, 1.184910774230957}, +{0.688217282295227, 1.3175970315933228, 1.0968165397644043}, +{0.6620525121688843, 1.3609614372253418, 1.2394517660140991}, +{2.3367209434509277, 0.3792075216770172, 2.314265489578247}, +{2.3478434085845947, 0.44221365451812744, 2.243069648742676}, +{2.2466471195220947, 0.34818893671035767, 2.3049445152282715}, +{0.6661024689674377, 3.0106685161590576, 1.8606884479522705}, +{0.5994890332221985, 2.981830358505249, 1.7982919216156006}, +{0.6610504984855652, 3.106233596801758, 1.8586565256118774}, +{0.1381828337907791, 2.4410030841827393, 2.890045166015625}, +{0.1505538374185562, 2.535677433013916, 2.8832569122314453}, +{0.06539854407310486, 2.4306938648223877, 2.9513516426086426}, +{1.9359238147735596, 0.096039317548275, 2.083298444747925}, +{2.0009829998016357, 0.105338454246521, 2.0137057304382324}, +{1.8598005771636963, 0.14462809264659882, 2.051569938659668}, +{2.3225879669189453, 0.10561369359493256, 1.2461985349655151}, +{2.2271664142608643, 0.09826791286468506, 1.2479461431503296}, +{2.3479790687561035, 0.10981868952512741, 1.3383935689926147}, +{0.07784933596849442, 0.35516592860221863, 0.3653770089149475}, +{0.1251523792743683, 0.2864145040512085, 0.41225963830947876}, +{0.1284456104040146, 0.4346921443939209, 0.3820479214191437}, +{2.838958978652954, 2.0259504318237305, 1.0503252744674683}, +{2.826878070831299, 2.005174160003662, 0.9576715230941772}, +{2.933912992477417, 2.027886152267456, 1.0622543096542358}, +{1.474800944328308, 0.11096606403589249, 0.8973067998886108}, +{1.5359175205230713, 0.17951670289039612, 0.9242863059043884}, +{1.4841957092285156, 0.106597401201725, 0.8021491765975952}, +{1.1549921035766602, 2.2772161960601807, 1.2121801376342773}, +{1.1415878534317017, 2.286572217941284, 1.3064939975738525}, +{1.2498570680618286, 2.2829670906066895, 1.2007839679718018}, +{1.5035579204559326, 1.2641581296920776, 0.7770890593528748}, +{1.4683325290679932, 1.1897132396697998, 0.7283095121383667}, +{1.4507553577423096, 1.2676759958267212, 0.8568500876426697}, +{2.960796594619751, 1.2263953685760498, 0.18488143384456635}, +{2.9850900173187256, 1.2232513427734375, 0.2774139642715454}, +{2.8675014972686768, 1.2477999925613403, 0.1853259950876236}, +{2.0089776515960693, 1.4302619695663452, 2.3508670330047607}, +{2.0290350914001465, 1.3376985788345337, 2.36472487449646}, +{2.084833860397339, 1.4767532348632812, 2.386176109313965}, +{2.265974998474121, 1.5461926460266113, 1.2097111940383911}, +{2.2846767902374268, 1.4948796033859253, 1.1311012506484985}, +{2.2658276557922363, 1.4820173978805542, 1.280731201171875}, +{0.20320437848567963, 2.8487963676452637, 0.5774915218353271}, +{0.22584916651248932, 2.782618999481201, 0.5121455788612366}, +{0.16536428034305573, 2.798964023590088, 0.6499289870262146}, +{0.9621376395225525, 2.655120611190796, 3.130631923675537}, +{0.8943725824356079, 2.6507153511047363, 3.0631723403930664}, +{1.0282660722732544, 2.7140469551086426, 3.0943410396575928}, +{2.438685417175293, 1.6261802911758423, 2.810462474822998}, +{2.4559004306793213, 1.579382061958313, 2.7287564277648926}, +{2.456427574157715, 1.7179242372512817, 2.789712429046631}, +{2.056159257888794, 2.2033214569091797, 1.2158071994781494}, +{2.1209850311279297, 2.2583072185516357, 1.259812831878662}, +{2.0967273712158203, 2.11669921875, 1.2121831178665161}, +{1.3667443990707397, 1.6517274379730225, 0.8122207522392273}, +{1.4078221321105957, 1.7370291948318481, 0.8263115286827087}, +{1.438921332359314, 1.5891282558441162, 0.8180649876594543}, +{2.4538567066192627, 0.5378469824790955, 2.7861404418945312}, +{2.5300345420837402, 0.5745692253112793, 2.7412989139556885}, +{2.3954641819000244, 0.6125520467758179, 2.7992475032806396}, +{1.5755321979522705, 2.361245632171631, 2.482111930847168}, +{1.6554001569747925, 2.344818592071533, 2.532247543334961}, +{1.5929124355316162, 2.443016767501831, 2.435488700866699}, +{0.07133626937866211, 0.7431055307388306, 1.2231402397155762}, +{0.00864163227379322, 0.687232494354248, 1.2690738439559937}, +{0.027269085869193077, 0.7664061188697815, 1.141424298286438}, +{0.3850657045841217, 0.837343156337738, 1.9170037508010864}, +{0.4321833550930023, 0.767315149307251, 1.8718559741973877}, +{0.405301034450531, 0.9161768555641174, 1.866624355316162}, +{2.9705142974853516, 2.37424898147583, 1.7731720209121704}, +{3.0567729473114014, 2.4147377014160156, 1.7822505235671997}, +{2.962151527404785, 2.3564465045928955, 1.6794946193695068}, +{1.492997407913208, 2.5271694660186768, 0.28168290853500366}, +{1.41499662399292, 2.5637166500091553, 0.23993946611881256}, +{1.518214225769043, 2.5926365852355957, 0.34680211544036865}, +{1.2560415267944336, 0.7265045046806335, 2.7978057861328125}, +{1.2496380805969238, 0.6448959112167358, 2.8474178314208984}, +{1.3362455368041992, 0.7170650362968445, 2.746419668197632}, +{3.1829617023468018, 0.06883810460567474, 1.5470322370529175}, +{3.2277259826660156, 0.04059811681509018, 1.4672764539718628}, +{3.1174826622009277, 0.13174942135810852, 1.5167508125305176}, +{2.301342010498047, 1.0656449794769287, 2.793426036834717}, +{2.2270078659057617, 1.1259394884109497, 2.7945706844329834}, +{2.342106819152832, 1.0762468576431274, 2.879380464553833}, +{3.0826706886291504, 2.0694262981414795, 1.6714653968811035}, +{3.170138120651245, 2.0381691455841064, 1.6483402252197266}, +{3.0819454193115234, 2.161102533340454, 1.6439471244812012}, +{1.48699152469635, 1.1671514511108398, 2.646069049835205}, +{1.5685300827026367, 1.2160083055496216, 2.6573286056518555}, +{1.4316400289535522, 1.2247557640075684, 2.5933406352996826}, +{0.8440062999725342, 1.1455382108688354, 0.02801482006907463}, +{0.8524594306945801, 1.2222304344177246, -0.028634805232286453}, +{0.8932443261146545, 1.0769299268722534, -0.017049923539161682}, +{0.2279829978942871, 0.9735391139984131, 1.2480518817901611}, +{0.183219313621521, 0.8894534707069397, 1.238663673400879}, +{0.3132750689983368, 0.9600078463554382, 1.2067663669586182}, +{0.8189164400100708, 0.12828151881694794, 2.7752740383148193}, +{0.745846152305603, 0.06784918904304504, 2.7883501052856445}, +{0.7863388061523438, 0.2124868631362915, 2.8070621490478516}, +{0.3214362859725952, 1.378549575805664, 1.7321373224258423}, +{0.35359078645706177, 1.397937536239624, 1.6440889835357666}, +{0.35869550704956055, 1.4475854635238647, 1.786983609199524}, +{2.452610969543457, 2.314079523086548, 0.17093229293823242}, +{2.4246456623077393, 2.2496132850646973, 0.10593711584806442}, +{2.5031771659851074, 2.3781373500823975, 0.12091246247291565}, +{1.9119032621383667, 2.08471941947937, 2.166574478149414}, +{1.8616116046905518, 2.1610870361328125, 2.1382715702056885}, +{1.9693851470947266, 2.065131664276123, 2.0925848484039307}, +{2.867487907409668, 1.659898281097412, 2.8215384483337402}, +{2.793321371078491, 1.673190712928772, 2.8805718421936035}, +{2.887265920639038, 1.7472925186157227, 2.787872552871704}, +{0.3766750395298004, 0.8038432598114014, 0.6723412871360779}, +{0.3046610951423645, 0.741247832775116, 0.6799651980400085}, +{0.38073262572288513, 0.824425995349884, 0.5789484977722168}, +{2.576463460922241, 0.5568087100982666, 0.42972174286842346}, +{2.5075507164001465, 0.5800727009773254, 0.49194827675819397}, +{2.6327970027923584, 0.6341233253479004, 0.4263606071472168}, +{2.319561719894409, 0.7254052758216858, 2.441591739654541}, +{2.4019458293914795, 0.682745635509491, 2.418026924133301}, +{2.314929962158203, 0.7175672650337219, 2.5368778705596924}, +{2.8322081565856934, 1.15086030960083, 0.987220048904419}, +{2.820014476776123, 1.1462857723236084, 0.8923901319503784}, +{2.767366409301758, 1.0900218486785889, 1.0226682424545288}, +{0.6167944073677063, 0.29147738218307495, 0.2868543863296509}, +{0.5937119126319885, 0.23051342368125916, 0.35694658756256104}, +{0.5539424419403076, 0.27272582054138184, 0.21713829040527344}, +{2.0607597827911377, 1.3055132627487183, 0.03565065935254097}, +{1.970644474029541, 1.2779014110565186, 0.01894332841038704}, +{2.056047201156616, 1.4009946584701538, 0.04048972204327583}, +{3.1811811923980713, 2.1877102851867676, 0.952794075012207}, +{3.130950689315796, 2.2664992809295654, 0.9320212602615356}, +{3.1327598094940186, 2.146625518798828, 1.0244163274765015}, +{1.5164740085601807, 1.6919851303100586, 2.435077667236328}, +{1.4859956502914429, 1.6334891319274902, 2.504443407058716}, +{1.4780404567718506, 1.77692449092865, 2.45676851272583}, +{0.9681146740913391, 2.777168035507202, 1.0347992181777954}, +{0.9799647927284241, 2.760277032852173, 0.9413294792175293}, +{0.9830682873725891, 2.6923422813415527, 1.076551914215088}, +{2.523895263671875, 1.0053246021270752, 2.671335220336914}, +{2.4490773677825928, 1.038918137550354, 2.720691680908203}, +{2.4976048469543457, 1.0132502317428589, 2.5796382427215576}, +{0.7487865090370178, 2.1915881633758545, 2.4824092388153076}, +{0.6597838401794434, 2.2086589336395264, 2.451596260070801}, +{0.7457313537597656, 2.210601329803467, 2.576172113418579}, +{1.4517459869384766, 0.7625452280044556, 1.7791014909744263}, +{1.5064624547958374, 0.7663023471832275, 1.857550859451294}, +{1.501234531402588, 0.8110113739967346, 1.7130391597747803}, +{0.6120957136154175, 2.784374237060547, -0.02095438539981842}, +{0.6656054258346558, 2.785646677017212, 0.05840183049440384}, +{0.5309803485870361, 2.828564167022705, 0.004142904654145241}, +{2.398308753967285, -0.034292012453079224, 1.5233638286590576}, +{2.338380813598633, -0.08566343784332275, 1.577511191368103}, +{2.461503505706787, 0.0020189236383885145, 1.5854144096374512}, +{0.32603588700294495, 2.39115834236145, 2.7010767459869385}, +{0.27605193853378296, 2.3953945636749268, 2.782599687576294}, +{0.40155813097953796, 2.447962522506714, 2.7163076400756836}, +{1.3073810338974, 2.442249059677124, 1.8357785940170288}, +{1.28451406955719, 2.352479934692383, 1.8598805665969849}, +{1.3275583982467651, 2.4849956035614014, 1.9190127849578857}, +{1.955005168914795, 0.8185998201370239, 2.6846864223480225}, +{1.8781530857086182, 0.7644115090370178, 2.666806221008301}, +{1.9242254495620728, 0.9084618091583252, 2.6728646755218506}, +{3.0226998329162598, 0.7425222396850586, 0.24504899978637695}, +{2.928358316421509, 0.7324193120002747, 0.25769469141960144}, +{3.034508466720581, 0.7403154373168945, 0.15008580684661865}, +{2.3121252059936523, 0.2798914909362793, 1.6500725746154785}, +{2.393892765045166, 0.30930277705192566, 1.6902141571044922}, +{2.243607997894287, 0.31386473774909973, 1.7076359987258911}, +{2.3473854064941406, 0.2890665829181671, 0.94576096534729}, +{2.428297519683838, 0.2527596354484558, 0.9097422361373901}, +{2.291140079498291, 0.21290408074855804, 0.9598344564437866}, +{0.3222373425960541, 2.4410970211029053, 1.7666120529174805}, +{0.3160177767276764, 2.4257397651672363, 1.6723370552062988}, +{0.39698395133018494, 2.5000855922698975, 1.7763899564743042}, +{0.657442033290863, 0.9100344777107239, 2.9919376373291016}, +{0.6050615906715393, 0.9332433938980103, 2.9152567386627197}, +{0.6091140508651733, 0.9467436075210571, 3.0659589767456055}, +{0.16846808791160583, 2.0519657135009766, 0.6090055704116821}, +{0.19988787174224854, 2.1189777851104736, 0.6697056293487549}, +{0.22897158563137054, 2.0564494132995605, 0.5349681377410889}, +{1.7633990049362183, 0.7183070778846741, 0.1535324901342392}, +{1.7857654094696045, 0.6330827474594116, 0.11613090336322784}, +{1.7673282623291016, 0.7046941518783569, 0.24819806218147278}, +{2.216792583465576, 0.3787209093570709, 1.4069324731826782}, +{2.1249117851257324, 0.36000874638557434, 1.4261703491210938}, +{2.2655608654022217, 0.33021280169487, 1.473497748374939}, +{2.013233184814453, 1.8041459321975708, 2.231900930404663}, +{1.9707891941070557, 1.8898183107376099, 2.2273106575012207}, +{1.9420216083526611, 1.7431350946426392, 2.251107692718506}, +{2.1471221446990967, 1.8138468265533447, 0.6775843501091003}, +{2.128389358520508, 1.892683982849121, 0.7285362482070923}, +{2.2059192657470703, 1.762772798538208, 0.7332322001457214}, +{2.6912710666656494, 2.1853384971618652, 2.064408302307129}, +{2.6401383876800537, 2.1643266677856445, 2.1425507068634033}, +{2.6557693481445312, 2.268988609313965, 2.0343315601348877}, +{0.37707120180130005, 0.6747189164161682, 1.4777798652648926}, +{0.3502071499824524, 0.6298487186431885, 1.3976093530654907}, +{0.4585387110710144, 0.7191128730773926, 1.4542312622070312}, +{2.9610402584075928, 2.315948963165283, 2.043593645095825}, +{2.876877784729004, 2.270596981048584, 2.048305034637451}, +{2.974745988845825, 2.331355333328247, 1.9501211643218994}, +{2.630018472671509, 0.3444121479988098, 1.9241678714752197}, +{2.7119734287261963, 0.38240256905555725, 1.89250648021698}, +{2.567077875137329, 0.3614414930343628, 1.8540908098220825}, +{1.4076889753341675, 2.6215388774871826, 2.606558084487915}, +{1.4957358837127686, 2.633793592453003, 2.571063280105591}, +{1.363754391670227, 2.565315008163452, 2.5427544116973877}, +{2.7843141555786133, 2.134791374206543, 2.5719034671783447}, +{2.7515172958374023, 2.0599663257598877, 2.6217823028564453}, +{2.784381628036499, 2.1048057079315186, 2.481001615524292}, +{2.482067823410034, 2.2098026275634766, 0.4164195954799652}, +{2.559730052947998, 2.154423713684082, 0.40841397643089294}, +{2.4650187492370605, 2.240180492401123, 0.32726335525512695}, +{2.697925329208374, 0.13761837780475616, 2.811546802520752}, +{2.6491305828094482, 0.1712738424539566, 2.886704683303833}, +{2.658916473388672, 0.1816146969795227, 2.736015796661377}, +{1.9950498342514038, -0.009464932605624199, 1.7665995359420776}, +{1.9805537462234497, -0.04670080542564392, 1.6796185970306396}, +{1.9246560335159302, 0.0545075349509716, 1.7773027420043945}, +{1.7926877737045288, 2.15582013130188, 2.6090309619903564}, +{1.750772476196289, 2.122197389602661, 2.5298163890838623}, +{1.8148994445800781, 2.0775420665740967, 2.659444570541382}, +{0.6489708423614502, 1.621810793876648, 2.578131675720215}, +{0.558157742023468, 1.6322022676467896, 2.5497183799743652}, +{0.669235348701477, 1.7034051418304443, 2.623892307281494}, +{0.2806848883628845, 2.7182581424713135, 2.7149498462677}, +{0.31406229734420776, 2.7120864391326904, 2.6254501342773438}, +{0.3484587073326111, 2.766270160675049, 2.7625300884246826}, +{2.8669216632843018, 0.020719068124890327, 0.3810577690601349}, +{2.9052348136901855, 0.10812731832265854, 0.37369465827941895}, +{2.7787740230560303, 0.030085084959864616, 0.3449389934539795}, +{1.990631341934204, 0.04035418853163719, 2.348666191101074}, +{1.9969656467437744, 0.033559467643499374, 2.2533979415893555}, +{1.9017239809036255, 0.07205963134765625, 2.364558219909668}, +{1.7730671167373657, 2.3035407066345215, 2.1154239177703857}, +{1.802491545677185, 2.3840372562408447, 2.158047914505005}, +{1.7795106172561646, 2.3222904205322266, 2.0217795372009277}, +{1.677820086479187, 2.88720965385437, 0.24378056824207306}, +{1.6286909580230713, 2.924004316329956, 0.31722989678382874}, +{1.6620619297027588, 2.948024272918701, 0.17156149446964264}, +{2.7814037799835205, 0.7828422784805298, 1.2760250568389893}, +{2.771651268005371, 0.7478337287902832, 1.1874722242355347}, +{2.7550692558288574, 0.7108067274093628, 1.3332936763763428}, +{2.0823538303375244, 2.535475015640259, 2.5694568157196045}, +{2.081021308898926, 2.443108081817627, 2.5443787574768066}, +{2.0799009799957275, 2.5828962326049805, 2.4863452911376953}, +{2.09721302986145, 2.653191566467285, 0.27778172492980957}, +{2.1290297508239746, 2.585423231124878, 0.2181372344493866}, +{2.153857707977295, 2.728480577468872, 0.2608923017978668}, +{1.3415632247924805, 1.3610846996307373, 0.5078599452972412}, +{1.3229161500930786, 1.440562129020691, 0.5578393340110779}, +{1.2973185777664185, 1.374558448791504, 0.42405545711517334}, +{2.3826687335968018, 2.5743589401245117, 0.3049129247665405}, +{2.405773639678955, 2.4815142154693604, 0.3020268678665161}, +{2.464413642883301, 2.6186892986297607, 0.3276044726371765}, +{2.462786912918091, 2.1564908027648926, 3.06447434425354}, +{2.458251953125, 2.2380988597869873, 3.0146563053131104}, +{2.5140342712402344, 2.097498893737793, 3.009193181991577}, +{0.8811582922935486, 1.8951292037963867, 2.458233118057251}, +{0.8304376006126404, 1.8639270067214966, 2.3832921981811523}, +{0.8181061744689941, 1.8982914686203003, 2.5301828384399414}, +{2.1226754188537598, 0.936913013458252, 2.486522674560547}, +{2.18452787399292, 0.8720899820327759, 2.4528391361236572}, +{2.083658218383789, 0.8951517343521118, 2.563307762145996}, +{1.5910682678222656, -0.04232160747051239, 0.060311902314424515}, +{1.6030267477035522, 0.022022241726517677, -0.009539245627820492}, +{1.5802444219589233, 0.01016175840049982, 0.13962557911872864}, +{0.6000057458877563, 1.421027660369873, 1.4653507471084595}, +{0.6668391227722168, 1.480806827545166, 1.4318535327911377}, +{0.518341064453125, 1.4705928564071655, 1.4593095779418945}, +{2.7937681674957275, 2.1058340072631836, 0.7641414403915405}, +{2.745729446411133, 2.167043447494507, 0.8198910355567932}, +{2.741447687149048, 2.025698184967041, 0.7659181952476501}, +{1.7331345081329346, 1.7898777723312378, 2.600431203842163}, +{1.6958595514297485, 1.7212291955947876, 2.6557509899139404}, +{1.8176082372665405, 1.7547351121902466, 2.5722978115081787}, +{0.2327430546283722, 0.506737232208252, 1.6336215734481812}, +{0.21513375639915466, 0.5574103593826294, 1.7128961086273193}, +{0.2930515706539154, 0.5613454580307007, 1.583191990852356}, +{0.4113583266735077, 2.0874555110931396, 1.242104172706604}, +{0.40267571806907654, 2.045548677444458, 1.1564843654632568}, +{0.5025283098220825, 2.116422653198242, 1.2454572916030884}, +{1.7669175863265991, 1.8791155815124512, 1.263993263244629}, +{1.7048691511154175, 1.9519851207733154, 1.262460708618164}, +{1.7502871751785278, 1.831778645515442, 1.1824766397476196}, +{0.6872342824935913, 0.3579636514186859, 0.8097110986709595}, +{0.6811272501945496, 0.4435189962387085, 0.7672222852706909}, +{0.7344590425491333, 0.37501052021980286, 0.8912068009376526}, +{2.4254918098449707, 3.0704381465911865, 0.6173702478408813}, +{2.4053614139556885, 3.08912992477417, 0.5256767272949219}, +{2.342442750930786, 3.083228588104248, 0.6632130742073059}, +{2.746370315551758, 2.925312042236328, 0.22723402082920074}, +{2.6780683994293213, 2.969672918319702, 0.2775258421897888}, +{2.8271267414093018, 2.9434711933135986, 0.2753065824508667}, +{1.9362313747406006, 0.8855317831039429, 0.01607407256960869}, +{2.0098514556884766, 0.8383280038833618, -0.022838549688458443}, +{1.8802286386489868, 0.8168826699256897, 0.052313532680273056}, +{3.097146511077881, 1.9498639106750488, 0.12173416465520859}, +{3.1079907417297363, 2.0344622135162354, 0.16518338024616241}, +{3.132340908050537, 1.8862653970718384, 0.18401512503623962}, +{0.7999619245529175, 0.9494876265525818, 1.0201048851013184}, +{0.7675086259841919, 0.9506385326385498, 1.1101480722427368}, +{0.7886011600494385, 1.0394343137741089, 0.9893993139266968}, +{2.873307228088379, 2.6648318767547607, 1.7803690433502197}, +{2.9037458896636963, 2.7551074028015137, 1.7896476984024048}, +{2.9503467082977295, 2.6114602088928223, 1.7998294830322266}, +{1.5517852306365967, 0.1712138056755066, 0.20802819728851318}, +{1.540088176727295, 0.25725623965263367, 0.16775169968605042}, +{1.4876205921173096, 0.16907984018325806, 0.27902576327323914}, +{1.4761689901351929, 2.321380853652954, 0.5275360941886902}, +{1.5310732126235962, 2.246196985244751, 0.5052818655967712}, +{1.537041187286377, 2.3951432704925537, 0.531535267829895}, +{2.986473798751831, 2.451181173324585, 0.26177144050598145}, +{3.014716148376465, 2.4921414852142334, 0.3435451090335846}, +{2.9233312606811523, 2.5128157138824463, 0.22467041015625}, +{0.04281168058514595, 2.6869735717773438, 1.6161260604858398}, +{0.06368251144886017, 2.6627190113067627, 1.7063393592834473}, +{0.09702347218990326, 2.763951063156128, 1.5988670587539673}, +{2.552752733230591, 0.22611665725708008, 2.3245794773101807}, +{2.565401315689087, 0.17965419590473175, 2.4073054790496826}, +{2.4702234268188477, 0.27325212955474854, 2.335958242416382}, +{2.1410813331604004, 1.4723387956619263, 2.089822769165039}, +{2.105156898498535, 1.4104866981506348, 2.0262138843536377}, +{2.085611343383789, 1.4620929956436157, 2.1671557426452637}, +{2.4448747634887695, 1.7170226573944092, 1.6048139333724976}, +{2.514677047729492, 1.6561667919158936, 1.5805957317352295}, +{2.4630234241485596, 1.7391629219055176, 1.696152687072754}, +{0.12220601737499237, 0.9476009607315063, 2.6377198696136475}, +{0.05208225175738335, 1.0031613111495972, 2.6717495918273926}, +{0.1937563717365265, 1.0082794427871704, 2.618720293045044}, +{2.31843638420105, 0.24723775684833527, 0.10031033307313919}, +{2.2358169555664062, 0.22896893322467804, 0.14506053924560547}, +{2.384600877761841, 0.24255429208278656, 0.16932234168052673}, +{1.209205150604248, 0.37926262617111206, 1.370006799697876}, +{1.2076362371444702, 0.36180755496025085, 1.4641087055206299}, +{1.2922440767288208, 0.3421768844127655, 1.3401490449905396}, +{1.1843485832214355, -0.034162960946559906, 1.9156341552734375}, +{1.2348711490631104, -0.022793632000684738, 1.8351324796676636}, +{1.1232986450195312, 0.03955879434943199, 1.9162102937698364}, +{2.724294424057007, 0.26520058512687683, 1.6350007057189941}, +{2.6828255653381348, 0.26411569118499756, 1.5487366914749146}, +{2.779397964477539, 0.343463659286499, 1.634103775024414}, +{3.080336093902588, 2.10315203666687, 1.2350127696990967}, +{3.0312390327453613, 2.0292069911956787, 1.2708444595336914}, +{3.1706979274749756, 2.087428092956543, 1.2623957395553589}, +{1.9794524908065796, 2.988081455230713, 0.22526368498802185}, +{1.9812718629837036, 2.976976156234741, 0.32031989097595215}, +{1.8894214630126953, 2.9671177864074707, 0.20041930675506592}, +{0.17812269926071167, 0.11112844198942184, 3.016200542449951}, +{0.17908094823360443, 0.10415683686733246, 3.111661434173584}, +{0.23041409254074097, 0.03676702454686165, 2.9862287044525146}, +{3.0911688804626465, 2.8197762966156006, 2.254530906677246}, +{3.1799843311309814, 2.824711561203003, 2.2191786766052246}, +{3.099315881729126, 2.764291763305664, 2.3321027755737305}, +{2.0807106494903564, 0.09203000366687775, 0.9438484311103821}, +{1.9956660270690918, 0.12160304188728333, 0.9113650321960449}, +{2.0598971843719482, 0.019962351769208908, 1.0033073425292969}, +{2.79133677482605, 1.1045112609863281, 2.5355029106140137}, +{2.7080767154693604, 1.1509348154067993, 2.544158935546875}, +{2.8094866275787354, 1.1052014827728271, 2.4415218830108643}, +{0.9749118685722351, 2.106992244720459, 1.9872095584869385}, +{1.0170352458953857, 2.0526368618011475, 2.0537936687469482}, +{0.939251184463501, 2.1812500953674316, 2.0359580516815186}, +{3.0639073848724365, 2.0421221256256104, 2.7459869384765625}, +{3.116130828857422, 2.1011335849761963, 2.691648483276367}, +{3.06219482421875, 1.9598164558410645, 2.6971487998962402}, +{2.850555896759033, 2.9643263816833496, 1.0093469619750977}, +{2.9301068782806396, 3.015495538711548, 0.9946614503860474}, +{2.87638521194458, 2.89762020111084, 1.072950839996338}, +{3.0438520908355713, 1.1616644859313965, 0.4472814202308655}, +{3.070173740386963, 1.2132219076156616, 0.5235134363174438}, +{3.0293502807617188, 1.0735690593719482, 0.4817955493927002}, +{1.8532191514968872, 2.152702569961548, 1.064972996711731}, +{1.7701520919799805, 2.1494290828704834, 1.1124227046966553}, +{1.9184761047363281, 2.1721692085266113, 1.1322404146194458}, +{2.7329399585723877, 2.4283130168914795, 3.1706466674804688}, +{2.7747280597686768, 2.5063188076019287, 3.20713210105896}, +{2.6730191707611084, 2.462144136428833, 3.1041088104248047}, +{1.4632506370544434, 1.068786382675171, 3.046016216278076}, +{1.4634402990341187, 0.9768898487091064, 3.07279896736145}, +{1.3708552122116089, 1.0937811136245728, 3.046832323074341}, +{1.928011178970337, 1.272900938987732, 1.9954291582107544}, +{1.8820828199386597, 1.2186416387557983, 1.9313291311264038}, +{1.8712611198425293, 1.2721322774887085, 2.0725080966949463}, +{1.9419853687286377, 0.958102285861969, 1.1961286067962646}, +{1.8653414249420166, 0.9021400809288025, 1.2086291313171387}, +{1.977241039276123, 0.9317943453788757, 1.1111153364181519}, +{0.93028724193573, 2.8333473205566406, 0.4305434823036194}, +{1.0244741439819336, 2.8279991149902344, 0.44674643874168396}, +{0.8947243690490723, 2.874441623687744, 0.5093398094177246}, +{0.8576458096504211, 2.5555484294891357, 2.8043429851531982}, +{0.9442301392555237, 2.5147809982299805, 2.8062140941619873}, +{0.8158624768257141, 2.526768445968628, 2.8855104446411133}, +{2.943450689315796, 0.2648901343345642, 0.3846242427825928}, +{2.8951961994171143, 0.3472045660018921, 0.37699782848358154}, +{3.0352187156677246, 0.2914050221443176, 0.3907802402973175}, +{2.535296678543091, 0.7063629627227783, 2.0500082969665527}, +{2.452359199523926, 0.7098736763000488, 2.002349376678467}, +{2.5101451873779297, 0.6880679726600647, 2.1405346393585205}, +{2.3317205905914307, 2.884946346282959, 0.23671679198741913}, +{2.2730793952941895, 2.9417991638183594, 0.18680419027805328}, +{2.409334659576416, 2.8761098384857178, 0.1813969612121582}, +{2.818601131439209, 0.8238366842269897, 2.5932629108428955}, +{2.8084824085235596, 0.9187883138656616, 2.586620807647705}, +{2.899376153945923, 0.8117921352386475, 2.6431891918182373}, +{1.8304671049118042, 0.21916495263576508, 1.8080421686172485}, +{1.8728020191192627, 0.2561280429363251, 1.7305580377578735}, +{1.7782050371170044, 0.29113802313804626, 1.8434100151062012}, +{2.4286038875579834, 0.5383091568946838, 1.4192540645599365}, +{2.335907220840454, 0.5168524384498596, 1.429706335067749}, +{2.4525816440582275, 0.5003820061683655, 1.334702730178833}, +{0.5527380108833313, 0.7041057348251343, 1.759186029434204}, +{0.5797312259674072, 0.751801609992981, 1.6807080507278442}, +{0.625340461730957, 0.6443378925323486, 1.777047038078308}, +{1.5851802825927734, 0.23716361820697784, 0.5707923769950867}, +{1.5531055927276611, 0.3273400664329529, 0.5694724917411804}, +{1.510163426399231, 0.18464946746826172, 0.5429166555404663}, +{1.5439177751541138, 1.0795276165008545, 1.4283337593078613}, +{1.5269945859909058, 1.0572197437286377, 1.3368008136749268}, +{1.6229513883590698, 1.1334598064422607, 1.4256242513656616}, +{0.15002265572547913, 0.32340487837791443, 0.8717390894889832}, +{0.13593217730522156, 0.415498822927475, 0.8937045931816101}, +{0.24520565569400787, 0.3133431375026703, 0.870609700679779}, +{1.3883538246154785, 0.6439763903617859, 2.230985641479492}, +{1.3319175243377686, 0.6870813369750977, 2.166804552078247}, +{1.3297944068908691, 0.5852102637290955, 2.278731346130371}, +{1.4509522914886475, 1.3239353895187378, 0.15102224051952362}, +{1.357041597366333, 1.315487027168274, 0.16750657558441162}, +{1.4614901542663574, 1.2990143299102783, 0.0592060461640358}, +{1.172749638557434, 0.38365069031715393, 0.5102040767669678}, +{1.1555347442626953, 0.4667992889881134, 0.46601951122283936}, +{1.1327461004257202, 0.39369651675224304, 0.5965818166732788}, +{0.8044663071632385, 1.6640727519989014, 0.9475761651992798}, +{0.8166229128837585, 1.636177659034729, 0.8568215370178223}, +{0.8282409906387329, 1.7567932605743408, 0.9475230574607849}, +{2.629990577697754, 2.7089593410491943, 0.3894974887371063}, +{2.7186567783355713, 2.7042489051818848, 0.4252525568008423}, +{2.579719066619873, 2.7557103633880615, 0.456201434135437}, +{1.8687846660614014, 1.6902745962142944, 1.4442253112792969}, +{1.8936108350753784, 1.6227675676345825, 1.3810685873031616}, +{1.850292444229126, 1.767473578453064, 1.3907400369644165}, +{0.9282223582267761, 0.4144105017185211, 1.3106118440628052}, +{0.8638176321983337, 0.42663633823394775, 1.38036048412323}, +{1.0128802061080933, 0.42414942383766174, 1.3542068004608154}, +{1.718910574913025, 1.1056488752365112, 0.6327759623527527}, +{1.659032940864563, 1.1132603883743286, 0.7070663571357727}, +{1.6667481660842896, 1.0640586614608765, 0.5641344785690308}, +{3.019350528717041, 0.9106246829032898, 2.0380842685699463}, +{3.048537492752075, 0.9677102565765381, 1.96700918674469}, +{3.015244722366333, 0.8234919309616089, 1.9986716508865356}, +{2.7161476612091064, 2.2637007236480713, 1.1614233255386353}, +{2.6467533111572266, 2.2940173149108887, 1.1028772592544556}, +{2.7188220024108887, 2.1689178943634033, 1.148331642150879}, +{1.8300338983535767, 2.5378761291503906, 2.247011184692383}, +{1.9193236827850342, 2.572036027908325, 2.251781940460205}, +{1.7745490074157715, 2.6127309799194336, 2.2689309120178223}, +{1.1415008306503296, 2.4813172817230225, 2.132033348083496}, +{1.2310147285461426, 2.513322353363037, 2.120842218399048}, +{1.151127576828003, 2.3867783546447754, 2.1435253620147705}, +{0.08141916245222092, 2.2245523929595947, 2.616105794906616}, +{0.1622563898563385, 2.269732713699341, 2.591890335083008}, +{0.015782002359628677, 2.294029951095581, 2.6212971210479736}, +{0.3549971282482147, 1.1166237592697144, 2.5548315048217773}, +{0.35197728872299194, 1.1669155359268188, 2.636219024658203}, +{0.3436877429485321, 1.1820056438446045, 2.4858415126800537}, +{0.22210586071014404, 0.04866127297282219, 0.12288756668567657}, +{0.28172755241394043, 0.1178572028875351, 0.15151438117027283}, +{0.17399805784225464, 0.024266686290502548, 0.20196260511875153}, +{1.6137672662734985, 1.8834760189056396, 1.689380168914795}, +{1.7052770853042603, 1.8845638036727905, 1.717435359954834}, +{1.5680630207061768, 1.8356934785842896, 1.7585920095443726}, +{0.8536749482154846, 1.4952266216278076, 2.7353055477142334}, +{0.8630895614624023, 1.4851993322372437, 2.6405787467956543}, +{0.7791456580162048, 1.5543595552444458, 2.7458410263061523}, +{1.112949252128601, 1.5177825689315796, 0.05987310782074928}, +{1.109497308731079, 1.551021695137024, -0.029823947697877884}, +{1.1448683738708496, 1.591723918914795, 0.11160469800233841}, +{1.6524064540863037, 0.5975595116615295, 2.412052869796753}, +{1.5782541036605835, 0.57970130443573, 2.3542184829711914}, +{1.7293397188186646, 0.5731831192970276, 2.3605809211730957}, +{1.0075935125350952, 2.2146265506744385, 2.4268240928649902}, +{1.0298786163330078, 2.2674245834350586, 2.503492593765259}, +{0.9146594405174255, 2.1944973468780518, 2.437796115875244}, +{0.6364988088607788, 1.7807025909423828, 0.120817631483078}, +{0.6375401616096497, 1.6874492168426514, 0.14238272607326508}, +{0.6989313364028931, 1.789324402809143, 0.048774875700473785}, +{2.0292468070983887, 0.8858628273010254, 0.7507957220077515}, +{1.9488197565078735, 0.8448768854141235, 0.718953013420105}, +{2.041262149810791, 0.8499292135238647, 0.8386975526809692}, +{3.176238536834717, 2.7350916862487793, 2.4840571880340576}, +{3.110891580581665, 2.7377495765686035, 2.553950309753418}, +{3.257126569747925, 2.764770746231079, 2.5257534980773926}, +{0.2134483903646469, 2.6703872680664062, 0.8266498446464539}, +{0.21266010403633118, 2.576265335083008, 0.8440496921539307}, +{0.12793400883674622, 2.701038360595703, 0.8568180203437805}, +{2.956083059310913, 2.9229307174682617, 0.4158240556716919}, +{3.034120559692383, 2.8916449546813965, 0.37006741762161255}, +{2.9655535221099854, 3.018174409866333, 0.41695791482925415}, +{0.09066149592399597, 0.7998008131980896, 1.5736688375473022}, +{0.13804787397384644, 0.7500444054603577, 1.5070269107818604}, +{-0.0017058346420526505, 0.7860721945762634, 1.5526422262191772}, +{1.7479387521743774, 1.025416374206543, 2.6441352367401123}, +{1.7579666376113892, 1.1203992366790771, 2.650461435317993}, +{1.7202422618865967, 0.9983727335929871, 2.7316787242889404}, +{1.1287850141525269, 0.4690265953540802, 2.7954680919647217}, +{1.0460072755813599, 0.4458511769771576, 2.837575912475586}, +{1.104623556137085, 0.490592896938324, 2.7053935527801514}, +{0.5447781682014465, 0.37450554966926575, 2.0223793983459473}, +{0.5920628309249878, 0.3163939118385315, 1.9628016948699951}, +{0.4573996663093567, 0.3821512758731842, 1.9840537309646606}, +{0.04581160098314285, 2.9915924072265625, 0.901391327381134}, +{0.024710888043045998, 3.0481796264648438, 0.8271283507347107}, +{0.0009622575016692281, 2.9092259407043457, 0.8822442889213562}, +{1.893625259399414, 0.8022207617759705, 2.320986032485962}, +{1.980877161026001, 0.8359267711639404, 2.3006558418273926}, +{1.9013018608093262, 0.7074863910675049, 2.3096377849578857}, +{1.729299783706665, 1.5578069686889648, 1.7096587419509888}, +{1.7114880084991455, 1.4718799591064453, 1.7478896379470825}, +{1.6678144931793213, 1.5647389888763428, 1.6366257667541504}, +{2.9299371242523193, 0.6547620296478271, 0.7943304777145386}, +{2.850322723388672, 0.6294904947280884, 0.7475840449333191}, +{3.000922441482544, 0.6147413849830627, 0.7441135048866272}, +{1.5688005685806274, 0.5654926300048828, 0.9227067828178406}, +{1.5780081748962402, 0.6507713198661804, 0.8802205920219421}, +{1.517284631729126, 0.5833649635314941, 1.001376986503601}, +{1.0348923206329346, 0.7989833354949951, 1.8501815795898438}, +{0.9609050750732422, 0.8444334268569946, 1.8904616832733154}, +{1.0791025161743164, 0.8663268089294434, 1.7984840869903564}, +{2.039989709854126, 1.585270643234253, 3.145446538925171}, +{2.0748510360717773, 1.5805957317352295, 3.0564231872558594}, +{2.105430841445923, 1.635300874710083, 3.1941986083984375}, +{0.7627429962158203, 1.1695234775543213, 2.7674686908721924}, +{0.7774507403373718, 1.120118498802185, 2.686814308166504}, +{0.8445962071418762, 1.1606053113937378, 2.8162829875946045}, +{1.3675745725631714, 2.049285888671875, 1.7227716445922852}, +{1.3225177526474, 2.1102781295776367, 1.781185269355774}, +{1.4580154418945312, 2.048494577407837, 1.7541108131408691}, +{-0.0004579703090712428, 2.022402048110962, 2.4368934631347656}, +{-0.06342468410730362, 2.0930871963500977, 2.4227118492126465}, +{0.056792352348566055, 2.05490779876709, 2.506378173828125}, +{1.2514036893844604, 1.57034432888031, 1.3764851093292236}, +{1.2617789506912231, 1.570123553276062, 1.2813293933868408}, +{1.3127108812332153, 1.6371724605560303, 1.407107949256897}, +{1.2755815982818604, 0.46886172890663147, 2.4020426273345947}, +{1.3030436038970947, 0.40570923686027527, 2.4685251712799072}, +{1.1812270879745483, 0.4780585765838623, 2.415269613265991}, +{2.4515695571899414, 1.537591814994812, 0.32935166358947754}, +{2.397998094558716, 1.5411306619644165, 0.408597469329834}, +{2.5025787353515625, 1.6185648441314697, 0.33128848671913147}, +{2.478041410446167, 1.3878145217895508, 2.6525657176971436}, +{2.569648027420044, 1.4127956628799438, 2.6646690368652344}, +{2.470777988433838, 1.3022184371948242, 2.6947896480560303}, +{1.9686579704284668, 1.545780897140503, 0.9271689057350159}, +{2.0499491691589355, 1.5554141998291016, 0.8775579333305359}, +{1.9105552434921265, 1.6128020286560059, 0.8911888599395752}, +{2.4007644653320312, 2.5643961429595947, 0.02510814554989338}, +{2.3440892696380615, 2.549483299255371, 0.1007906049489975}, +{2.440359354019165, 2.6500182151794434, 0.04133806750178337}, +{2.3618648052215576, 0.40675032138824463, 1.9922891855239868}, +{2.453115463256836, 0.3795608878135681, 2.0021049976348877}, +{2.3669958114624023, 0.4978750944137573, 1.963440179824829}, +{2.7442879676818848, 0.6126341819763184, 1.0327037572860718}, +{2.654404401779175, 0.6286349296569824, 1.0039422512054443}, +{2.7970190048217773, 0.6232433915138245, 0.9535253643989563}, +{1.4414654970169067, 0.6297906041145325, 1.4124960899353027}, +{1.4905991554260254, 0.6845207214355469, 1.4737564325332642}, +{1.349973440170288, 0.6413054466247559, 1.4381656646728516}, +{2.284597873687744, 0.769457995891571, 2.74772310256958}, +{2.212613582611084, 0.738370418548584, 2.802624464035034}, +{2.2742884159088135, 0.8646109700202942, 2.7463271617889404}, +{1.608991026878357, 3.051408052444458, 1.5100852251052856}, +{1.5768351554870605, 2.9923839569091797, 1.4419349431991577}, +{1.5955225229263306, 3.0033085346221924, 1.5917391777038574}, +{1.983639121055603, 1.3496235609054565, 1.4872751235961914}, +{2.0765151977539062, 1.3585169315338135, 1.46589195728302}, +{1.9816006422042847, 1.3425979614257812, 1.5827151536941528}, +{2.369354248046875, 2.2457618713378906, 2.188922166824341}, +{2.2896995544433594, 2.231717824935913, 2.240110158920288}, +{2.3423469066619873, 2.304300546646118, 2.1181681156158447}, +{2.215144395828247, 2.9934873580932617, 1.715458869934082}, +{2.2437682151794434, 3.0557236671447754, 1.7823140621185303}, +{2.119703769683838, 3.000791072845459, 1.7152302265167236}, +{1.2309417724609375, 0.7013171911239624, 1.5772877931594849}, +{1.2581238746643066, 0.7865971326828003, 1.5433646440505981}, +{1.285992980003357, 0.6875503063201904, 1.6543731689453125}, +{0.7786443829536438, 2.9337918758392334, 0.647307276725769}, +{0.8181865215301514, 3.0191657543182373, 0.6649149656295776}, +{0.7601302862167358, 2.897637367248535, 0.7339813709259033}, +{0.7439048290252686, 2.217999219894409, 2.7428412437438965}, +{0.7000494003295898, 2.2690649032592773, 2.8108952045440674}, +{0.7833178639411926, 2.1444506645202637, 2.7897403240203857}, +{2.847533941268921, -0.06451679021120071, 1.816575050354004}, +{2.897433042526245, 0.010164293460547924, 1.7834824323654175}, +{2.8560616970062256, -0.05874423310160637, 1.911739468574524}, +{2.2537286281585693, 3.119351863861084, 1.9595441818237305}, +{2.2644171714782715, 3.1360604763031006, 2.0531866550445557}, +{2.2391366958618164, 3.205873489379883, 1.9212892055511475}, +{0.3608923554420471, -0.05119665712118149, 1.4236955642700195}, +{0.33800408244132996, 0.040679510682821274, 1.4096522331237793}, +{0.4361945688724518, -0.048368606716394424, 1.482720136642456}, +{3.0358691215515137, 2.2245354652404785, 0.689166784286499}, +{3.113232374191284, 2.188199758529663, 0.7322593331336975}, +{2.9624719619750977, 2.1759231090545654, 0.7267434597015381}, +{2.3229944705963135, 0.930441677570343, 0.8816254734992981}, +{2.4095165729522705, 0.9159807562828064, 0.8433222770690918}, +{2.3004395961761475, 1.0200635194778442, 0.856695294380188}, +{1.4670923948287964, 1.881636381149292, 0.9354293346405029}, +{1.5151243209838867, 1.9075919389724731, 1.0140522718429565}, +{1.5060200691223145, 1.9338215589523315, 0.8652605414390564}, +{0.08443308621644974, 2.5128397941589355, 2.1230111122131348}, +{0.05515037477016449, 2.48935866355896, 2.2110650539398193}, +{0.10347611457109451, 2.6064980030059814, 2.1282832622528076}, +{2.584935426712036, 0.053094323724508286, 1.7022534608840942}, +{2.6251883506774902, 0.031429316848516464, 1.7863526344299316}, +{2.623046398162842, 0.13763481378555298, 1.6785303354263306}, +{2.8252177238464355, 2.4951069355010986, 1.2569749355316162}, +{2.7756776809692383, 2.421358823776245, 1.2213478088378906}, +{2.7598938941955566, 2.5638909339904785, 1.2697763442993164}, +{1.646407961845398, 1.1896592378616333, 0.31852543354034424}, +{1.5869956016540527, 1.25667405128479, 0.2847393751144409}, +{1.6196321249008179, 1.109264850616455, 0.2740045487880707}, +{0.7764081358909607, 0.15163129568099976, 1.3477637767791748}, +{0.8295324444770813, 0.1253860741853714, 1.2725884914398193}, +{0.8010129332542419, 0.2427264153957367, 1.3638449907302856}, +{1.2493289709091187, 0.921500563621521, 1.411584496498108}, +{1.3207836151123047, 0.960828423500061, 1.3614859580993652}, +{1.1902860403060913, 0.8858981132507324, 1.3451863527297974}, +{2.5070981979370117, 2.0438764095306396, 2.4013988971710205}, +{2.425109386444092, 2.00131893157959, 2.3763182163238525}, +{2.5754287242889404, 1.9851276874542236, 2.3691213130950928}, +{0.6799770593643188, 1.864038109779358, 2.6881532669067383}, +{0.7369750142097473, 1.9239212274551392, 2.736398220062256}, +{0.591264545917511, 1.8925392627716064, 2.710064172744751}, +{0.7483628988265991, 1.0451375246047974, 2.2361459732055664}, +{0.7179639339447021, 1.111213207244873, 2.1739187240600586}, +{0.7522760629653931, 0.9642226696014404, 2.1851577758789062}, +{0.8240984082221985, 1.5513789653778076, 0.6627528071403503}, +{0.7725789546966553, 1.4721049070358276, 0.677708625793457}, +{0.7771703004837036, 1.597707748413086, 0.5933718681335449}, +{3.0958685874938965, 1.7531547546386719, 1.8936033248901367}, +{3.1787233352661133, 1.8003114461898804, 1.9021856784820557}, +{3.02888822555542, 1.8213778734207153, 1.8982470035552979}, +{2.331860065460205, 0.8041039109230042, 1.6760833263397217}, +{2.304969072341919, 0.8107080459594727, 1.584455966949463}, +{2.39190936088562, 0.8775566816329956, 1.6887751817703247}, +{3.0982472896575928, 1.8486442565917969, 0.9447349905967712}, +{3.056529998779297, 1.7787179946899414, 0.9950568675994873}, +{3.187692165374756, 1.8524457216262817, 0.9786093235015869}, +{2.614459753036499, 0.4670538902282715, 2.2233147621154785}, +{2.675781011581421, 0.45342645049095154, 2.1510908603668213}, +{2.6056156158447266, 0.3807818293571472, 2.263827085494995}, +{2.280531883239746, 0.35774049162864685, 2.6417367458343506}, +{2.2963948249816895, 0.3977029621601105, 2.5562164783477783}, +{2.29966139793396, 0.42733249068260193, 2.7046122550964355}, +{2.988680124282837, 0.8949480056762695, 0.555273175239563}, +{3.058411121368408, 0.831783652305603, 0.5376616716384888}, +{3.008204221725464, 0.928390622138977, 0.6428101062774658}, +{2.848814010620117, 0.5042521953582764, 0.46642765402793884}, +{2.7550132274627686, 0.5158857107162476, 0.48154130578041077}, +{2.864070415496826, 0.542471170425415, 0.38000500202178955}, +{0.6472200155258179, 1.8293160200119019, 0.6531873345375061}, +{0.6174643635749817, 1.7524499893188477, 0.7018548250198364}, +{0.6134805679321289, 1.9037530422210693, 0.7030180096626282}, +{0.9426969289779663, 1.476967453956604, 1.0605154037475586}, +{0.8978290557861328, 1.558036208152771, 1.0364936590194702}, +{0.8949254751205444, 1.444917917251587, 1.1370205879211426}, +{1.9764724969863892, 1.5432597398757935, 1.2375919818878174}, +{2.070070743560791, 1.5246989727020264, 1.2451528310775757}, +{1.9633827209472656, 1.5629884004592896, 1.1448463201522827}, +{2.882401704788208, 0.6608948111534119, 2.3515944480895996}, +{2.8442468643188477, 0.6480461955070496, 2.2647528648376465}, +{2.8330087661743164, 0.7339118719100952, 2.388892650604248}, +{3.0016682147979736, 1.3729232549667358, 2.582024574279785}, +{3.0913262367248535, 1.401362657546997, 2.5997707843780518}, +{3.0064635276794434, 1.3307183980941772, 2.4962451457977295}, +{0.5004401803016663, 2.384727954864502, 3.0977935791015625}, +{0.4407607316970825, 2.3844470977783203, 3.022956371307373}, +{0.4942138195037842, 2.296226978302002, 3.133725643157959}, +{2.6677799224853516, 1.853855848312378, 0.7059210538864136}, +{2.5844521522521973, 1.8437888622283936, 0.6599053144454956}, +{2.7342357635498047, 1.8394615650177002, 0.6385507583618164}, +{2.1097030639648438, 0.10876419395208359, 1.4818315505981445}, +{2.1590776443481445, 0.1031835749745369, 1.5636441707611084}, +{2.043833017349243, 0.03966859355568886, 1.4888489246368408}, +{2.5891473293304443, 2.3297739028930664, 1.6727508306503296}, +{2.5922229290008545, 2.4249019622802734, 1.6625759601593018}, +{2.5859005451202393, 2.3159027099609375, 1.7674046754837036}, +{1.0353009700775146, 2.3007588386535645, 1.4981791973114014}, +{1.1134241819381714, 2.3559441566467285, 1.501874566078186}, +{1.0292901992797852, 2.261880874633789, 1.5854414701461792}, +{0.8549602627754211, 0.08585233241319656, 1.0996047258377075}, +{0.9231407046318054, 0.01889554038643837, 1.0940792560577393}, +{0.792218029499054, 0.06183008849620819, 1.031423568725586}, +{2.6264679431915283, 3.045808792114258, 1.099428415298462}, +{2.716327667236328, 3.0211517810821533, 1.0775295495986938}, +{2.621335506439209, 3.0356719493865967, 1.1944717168807983}, +{1.2914334535598755, 1.0049461126327515, 2.7291922569274902}, +{1.3019471168518066, 0.9122512340545654, 2.750626564025879}, +{1.3799161911010742, 1.0410196781158447, 2.734834671020508}, +{0.3426347076892853, 2.5313737392425537, 0.14073243737220764}, +{0.2551957964897156, 2.535734176635742, 0.1020316630601883}, +{0.3973950743675232, 2.4934728145599365, 0.07197827845811844}, +{0.6870060563087463, 0.27483710646629333, 3.0815463066101074}, +{0.7527020573616028, 0.23395873606204987, 3.1378960609436035}, +{0.6582253575325012, 0.20447984337806702, 3.0233752727508545}, +{1.3277509212493896, 0.7964003086090088, 0.6194522976875305}, +{1.2332112789154053, 0.8111748099327087, 0.6169452667236328}, +{1.3380144834518433, 0.7153711915016174, 0.669364869594574}, +{0.8714544773101807, 0.9934670925140381, 1.9664459228515625}, +{0.9397255778312683, 1.058274269104004, 1.9838072061538696}, +{0.8279024958610535, 1.02516770362854, 1.887321949005127}, +{2.871405601501465, 1.7423937320709229, 1.7064980268478394}, +{2.904036521911621, 1.827492117881775, 1.7357521057128906}, +{2.8119471073150635, 1.71433687210083, 1.7760670185089111}, +{0.45811134576797485, 2.767012596130371, 0.7443695068359375}, +{0.5025097131729126, 2.8283703327178955, 0.8029043674468994}, +{0.3838590085506439, 2.734692335128784, 0.7954018712043762}, +{2.698683738708496, 1.2322348356246948, 3.002742290496826}, +{2.7023229598999023, 1.2526332139968872, 3.0961928367614746}, +{2.680966377258301, 1.3163065910339355, 2.960548162460327}, +{2.927912473678589, 2.3372981548309326, 1.4699403047561646}, +{2.8867950439453125, 2.256443738937378, 1.4393757581710815}, +{2.905600070953369, 2.402216911315918, 1.4032316207885742}, +{1.6949423551559448, 0.660473644733429, 0.4469839036464691}, +{1.6249743700027466, 0.6039686799049377, 0.4797557294368744}, +{1.705671787261963, 0.727120578289032, 0.514846920967102}, +{1.167059063911438, 1.5462208986282349, 1.6553118228912354}, +{1.181480050086975, 1.5501022338867188, 1.560763955116272}, +{1.1210933923721313, 1.627621054649353, 1.6758906841278076}, +{0.41938516497612, 0.8709825873374939, 2.465010643005371}, +{0.3670749068260193, 0.9510810375213623, 2.468203544616699}, +{0.43552467226982117, 0.849240779876709, 2.556820869445801}, +{0.7921525835990906, 0.14659231901168823, 1.7688102722167969}, +{0.8814311027526855, 0.14742448925971985, 1.734299898147583}, +{0.8023030757904053, 0.16608895361423492, 1.8619722127914429}, +{0.5072961449623108, 0.6881592273712158, 0.18151012063026428}, +{0.43874219059944153, 0.7237150073051453, 0.1249551773071289}, +{0.571514904499054, 0.6511538028717041, 0.12093894183635712}, +{1.5030146837234497, 1.5801141262054443, 2.6905510425567627}, +{1.5623854398727417, 1.5372024774551392, 2.7521629333496094}, +{1.4756190776824951, 1.6600922346115112, 2.735442876815796}, +{2.6568338871002197, 0.9966395497322083, 1.1342906951904297}, +{2.7288897037506104, 0.9467787742614746, 1.1728156805038452}, +{2.578409433364868, 0.9624637365341187, 1.1772315502166748}, +{3.080937623977661, 0.3434472680091858, 2.466738224029541}, +{3.0882046222686768, 0.3023778796195984, 2.552893877029419}, +{3.1080877780914307, 0.4341123402118683, 2.4810569286346436}, +{1.8227890729904175, 1.7185734510421753, 0.2558850049972534}, +{1.7887457609176636, 1.641830563545227, 0.2099078893661499}, +{1.8019970655441284, 1.7921628952026367, 0.19831232726573944}, +{1.9612629413604736, 0.584395706653595, 1.9283086061477661}, +{1.9934200048446655, 0.5938705205917358, 2.0179660320281982}, +{1.9655346870422363, 0.6728026866912842, 1.8918631076812744}, +{1.2949471473693848, 2.6298203468322754, 0.6770082712173462}, +{1.2163646221160889, 2.6644794940948486, 0.7192675471305847}, +{1.3595690727233887, 2.6243503093719482, 0.7474101185798645}, +{0.30540066957473755, 2.789278507232666, 2.4314825534820557}, +{0.37879127264022827, 2.833096504211426, 2.474565267562866}, +{0.30936843156814575, 2.8195197582244873, 2.340751886367798}, +{0.23607417941093445, 1.601745843887329, 0.9239513278007507}, +{0.21008744835853577, 1.6938011646270752, 0.9275330305099487}, +{0.241217702627182, 1.5747259855270386, 1.0156344175338745}, +{2.712406873703003, 1.673270583152771, 2.5584442615509033}, +{2.744354248046875, 1.5951563119888306, 2.6036088466644287}, +{2.6727395057678223, 1.639876365661621, 2.477985143661499}, +{1.0885183811187744, 2.304478883743286, 0.26395541429519653}, +{1.116994857788086, 2.3678581714630127, 0.329792320728302}, +{1.1551494598388672, 2.235802173614502, 0.2664259374141693}, +{0.7737382054328918, 0.5593626499176025, 1.7917345762252808}, +{0.7685510516166687, 0.5524786710739136, 1.8870656490325928}, +{0.8637164831161499, 0.5343254208564758, 1.7707735300064087}, +{1.8256162405014038, 1.6413276195526123, 2.3066728115081787}, +{1.8243789672851562, 1.6150093078613281, 2.2146503925323486}, +{1.8680776357650757, 1.56841242313385, 2.3518691062927246}, +{1.1853069067001343, 1.964658498764038, 0.9912031888961792}, +{1.2750580310821533, 1.9630025625228882, 0.9579718112945557}, +{1.1912481784820557, 1.9251911640167236, 1.0782052278518677}, +{1.6872904300689697, 1.001711130142212, 2.9060959815979004}, +{1.6075489521026611, 1.030382513999939, 2.950610637664795}, +{1.6793276071548462, 0.9064241051673889, 2.901702880859375}, +{1.7721059322357178, 0.6980836987495422, 1.1396323442459106}, +{1.7951600551605225, 0.6380058526992798, 1.0687700510025024}, +{1.6825801134109497, 0.7254449129104614, 1.1196621656417847}, +{0.5300256609916687, 1.9532606601715088, 1.876751184463501}, +{0.5306179523468018, 1.8929554224014282, 1.8024191856384277}, +{0.45423662662506104, 2.0096356868743896, 1.861253261566162}, +{1.5844205617904663, 0.8504628539085388, 1.5745019912719727}, +{1.540103793144226, 0.9089969396591187, 1.5130845308303833}, +{1.6752970218658447, 0.8805229067802429, 1.5749057531356812}, +{3.0238022804260254, 1.0637418031692505, 2.7422657012939453}, +{2.9767026901245117, 1.1033401489257812, 2.668944835662842}, +{2.955047845840454, 1.027403712272644, 2.798074960708618}, +{2.8625741004943848, 1.6559337377548218, 1.347265601158142}, +{2.920459747314453, 1.7026010751724243, 1.4075459241867065}, +{2.8201870918273926, 1.725069284439087, 1.2964136600494385}, +{2.724233627319336, 2.5440921783447266, 1.5828560590744019}, +{2.790013074874878, 2.5068535804748535, 1.5241307020187378}, +{2.7735774517059326, 2.570199728012085, 1.6606113910675049}, +{0.19365061819553375, 1.9049512147903442, 0.9731165170669556}, +{0.14220622181892395, 1.9819331169128418, 0.9488351941108704}, +{0.2838149070739746, 1.9367927312850952, 0.9774565696716309}, +{2.1738743782043457, 2.8805930614471436, 2.9869019985198975}, +{2.144134521484375, 2.8349556922912598, 2.9081931114196777}, +{2.254481554031372, 2.835369110107422, 3.0117945671081543}, +{1.8092477321624756, 0.2799459397792816, 2.567841053009033}, +{1.7625796794891357, 0.20721957087516785, 2.6090147495269775}, +{1.893902063369751, 0.2824026346206665, 2.6124496459960938}, +{1.9574275016784668, 1.1666980981826782, 0.7704062461853027}, +{1.8713252544403076, 1.1672337055206299, 0.7285920977592468}, +{1.9894511699676514, 1.0773305892944336, 0.7581480741500854}, +{0.2531035840511322, 0.8251312375068665, 0.13350865244865417}, +{0.20739975571632385, 0.9057883024215698, 0.10967777669429779}, +{0.26863881945610046, 0.7808591723442078, 0.050076279789209366}, +{1.053713083267212, 0.5800948143005371, 3.11741042137146}, +{0.9859071373939514, 0.5984007716178894, 3.052375316619873}, +{1.0066540241241455, 0.576381504535675, 3.20068097114563}, +{0.5697636008262634, 0.0988488644361496, 0.4713165760040283}, +{0.5467622876167297, 0.006208062171936035, 0.4784536063671112}, +{0.620915949344635, 0.11697040498256683, 0.5501668453216553}, +{1.4842653274536133, 1.4764255285263062, 2.1262552738189697}, +{1.5280358791351318, 1.4139890670776367, 2.068392038345337}, +{1.48272705078125, 1.4330166578292847, 2.211552619934082}, +{-0.06020676717162132, 0.23820452392101288, 3.0194599628448486}, +{-0.05153876170516014, 0.31479671597480774, 3.076212167739868}, +{0.02725801430642605, 0.19933897256851196, 3.0181570053100586}, +{2.7398743629455566, 0.9990533590316772, 2.8304603099823}, +{2.7177743911743164, 1.0779176950454712, 2.8800015449523926}, +{2.6593661308288574, 0.9767857193946838, 2.783717155456543}, +{3.2329227924346924, 0.24831876158714294, 2.260603189468384}, +{3.278613805770874, 0.3264675438404083, 2.229499578475952}, +{3.1933069229125977, 0.2751414477825165, 2.3435094356536865}, +{2.814300537109375, 0.5544043183326721, 1.8151310682296753}, +{2.7685492038726807, 0.6377044320106506, 1.803719401359558}, +{2.9066078662872314, 0.5757016539573669, 1.8014166355133057}, +{1.841592788696289, 2.230325698852539, 0.28311702609062195}, +{1.8948510885238647, 2.304936408996582, 0.3106684684753418}, +{1.9048035144805908, 2.1671130657196045, 0.24889856576919556}, +{0.45897239446640015, 1.1569637060165405, 0.9549174308776855}, +{0.5523173213005066, 1.156672477722168, 0.9337287545204163}, +{0.4465484321117401, 1.079284906387329, 1.0094516277313232}, +{1.5626190900802612, 2.156043767929077, 1.524316430091858}, +{1.6026899814605713, 2.1071462631225586, 1.5961889028549194}, +{1.4820044040679932, 2.1082475185394287, 1.504845380783081}, +{0.7362588047981262, 1.275467038154602, 0.24463926255702972}, +{0.7810957431793213, 1.2217975854873657, 0.17928212881088257}, +{0.7526056170463562, 1.3656116724014282, 0.2169075310230255}, +{1.1555122137069702, 1.5317720174789429, 0.6819756031036377}, +{1.2364615201950073, 1.5519542694091797, 0.7289031147956848}, +{1.1385672092437744, 1.6095938682556152, 0.6288819909095764}, +{1.7595956325531006, 2.3995232582092285, 1.8474115133285522}, +{1.6855355501174927, 2.459663152694702, 1.8396258354187012}, +{1.7527575492858887, 2.343018054962158, 1.7704522609710693}, +{0.40737131237983704, 2.4197025299072266, 0.3920029103755951}, +{0.4779927432537079, 2.4842121601104736, 0.3956691026687622}, +{0.3610588312149048, 2.4394898414611816, 0.3106030523777008}, +{1.0562463998794556, 3.1949362754821777, 1.6336592435836792}, +{0.9944887757301331, 3.121805191040039, 1.633288025856018}, +{1.1350176334381104, 3.1599764823913574, 1.5920032262802124}, +{0.5798795223236084, 1.9939203262329102, 2.408979654312134}, +{0.6635636687278748, 2.0052597522735596, 2.454042911529541}, +{0.6030215620994568, 1.9896773099899292, 2.3161962032318115}, +{2.274718761444092, 1.9477595090866089, 2.3179614543914795}, +{2.249985933303833, 1.9008703231811523, 2.2382619380950928}, +{2.217531204223633, 2.0245063304901123, 2.319321870803833}, +{2.7152817249298096, 2.7436256408691406, 1.2851577997207642}, +{2.653449296951294, 2.7719132900238037, 1.2177865505218506}, +{2.692966938018799, 2.7964069843292236, 1.361829161643982}, +{2.3241472244262695, 1.9863715171813965, 1.9412295818328857}, +{2.3162684440612793, 1.910811424255371, 1.999461054801941}, +{2.3276453018188477, 1.9486151933670044, 1.8533402681350708}, +{1.3882101774215698, 2.5817184448242188, 2.063652753829956}, +{1.4473834037780762, 2.518693447113037, 2.1047465801239014}, +{1.4365943670272827, 2.6643009185791016, 2.064847707748413}, +{2.6391022205352783, 0.2984515130519867, 0.4686714708805084}, +{2.619022846221924, 0.3839053213596344, 0.43050360679626465}, +{2.7340312004089355, 0.2899639308452606, 0.4597950279712677}, +{2.635979175567627, 1.4980201721191406, 2.9547903537750244}, +{2.674018621444702, 1.5800564289093018, 2.9861810207366943}, +{2.5554001331329346, 1.5244293212890625, 2.9103844165802}, +{2.3777835369110107, 0.8853794932365417, 1.1507230997085571}, +{2.3632876873016357, 0.9327449798583984, 1.0688164234161377}, +{2.3803341388702393, 0.7932242155075073, 1.1249700784683228}, +{2.0113816261291504, 1.4917501211166382, 1.8165204524993896}, +{1.9807615280151367, 1.4129385948181152, 1.8613921403884888}, +{2.091404914855957, 1.464266061782837, 1.7717630863189697}, +{1.5098193883895874, 2.3541860580444336, 2.1938247680664062}, +{1.59783935546875, 2.3192524909973145, 2.179880380630493}, +{1.470970630645752, 2.295891046524048, 2.2590537071228027}, +{2.5703845024108887, 0.6639065146446228, 2.3878252506256104}, +{2.612863063812256, 0.64211106300354, 2.4707882404327393}, +{2.589012384414673, 0.5891542434692383, 2.33101487159729}, +{2.431349277496338, 3.077051877975464, 2.861893892288208}, +{2.4487736225128174, 2.995731830596924, 2.814504384994507}, +{2.4413185119628906, 3.0536108016967773, 2.954162359237671}, +{0.4448138475418091, 2.1653647422790527, 1.541422963142395}, +{0.3794201612472534, 2.2332632541656494, 1.558030366897583}, +{0.4758349657058716, 2.1831917762756348, 1.4526411294937134}, +{0.933966875076294, 0.7428533434867859, 0.886003851890564}, +{0.9595420360565186, 0.798676609992981, 0.8125736713409424}, +{0.8867171406745911, 0.8013455867767334, 0.9452359080314636}, +{1.0393931865692139, 1.1070713996887207, 2.8382391929626465}, +{1.11906099319458, 1.0576353073120117, 2.8189666271209717}, +{1.068392038345337, 1.198143482208252, 2.8434605598449707}, +{0.43346551060676575, 1.619296908378601, 0.7564336657524109}, +{0.3830603361129761, 1.6098772287368774, 0.8372600674629211}, +{0.37907207012176514, 1.5780402421951294, 0.6893399953842163}, +{1.4199436902999878, 2.8827176094055176, 0.02442394755780697}, +{1.4063040018081665, 2.954310655593872, 0.08647792041301727}, +{1.4862626791000366, 2.9158244132995605, -0.03614044189453125}, +{0.31738024950027466, 2.4713728427886963, 2.4362916946411133}, +{0.3401581943035126, 2.561628580093384, 2.4585933685302734}, +{0.3095162808895111, 2.427079200744629, 2.5207817554473877}, +{0.5437595248222351, 2.050314426422119, 0.7794649004936218}, +{0.5963820815086365, 2.10375714302063, 0.7199918627738953}, +{0.47176843881607056, 2.1076300144195557, 0.8058189153671265}, +{1.7831556797027588, 1.2451181411743164, 2.2243144512176514}, +{1.8097716569900513, 1.315081238746643, 2.2839725017547607}, +{1.749352216720581, 1.1763226985931396, 2.2816455364227295}, +{0.4914722144603729, 0.8718479871749878, 2.7379748821258545}, +{0.5201206207275391, 0.7838938236236572, 2.713365077972412}, +{0.40768349170684814, 0.8582452535629272, 2.782209873199463}, +{2.6144556999206543, 2.889974355697632, 2.739750623703003}, +{2.5918078422546387, 2.8062827587127686, 2.699190616607666}, +{2.6447155475616455, 2.9444072246551514, 2.6670613288879395}, +{0.7199143171310425, 0.9696484208106995, 1.302108645439148}, +{0.755294144153595, 1.04548180103302, 1.3485832214355469}, +{0.7363398671150208, 0.8958078622817993, 1.360761046409607}, +{3.027639150619507, 3.21815824508667, 2.2921009063720703}, +{2.9519858360290527, 3.268869638442993, 2.3215503692626953}, +{3.094165802001953, 3.2839419841766357, 2.2718753814697266}, +{0.4454035758972168, 1.5515915155410767, 1.9014924764633179}, +{0.5049293637275696, 1.5995901823043823, 1.8439152240753174}, +{0.45666730403900146, 1.5926799774169922, 1.9872082471847534}, +{2.8608529567718506, 0.4189438819885254, 1.181220531463623}, +{2.9361155033111572, 0.38174089789390564, 1.135244607925415}, +{2.818998336791992, 0.4757876694202423, 1.1165730953216553}, +{1.508371114730835, 0.171964630484581, 2.151618242263794}, +{1.4633557796478271, 0.08894669264554977, 2.1359989643096924}, +{1.4938416481018066, 0.22250641882419586, 2.071638584136963}, +{1.017454743385315, 1.7314547300338745, 3.037132740020752}, +{0.9961819648742676, 1.765834093093872, 3.1238958835601807}, +{0.9350460171699524, 1.73610520362854, 2.988661050796509}, +{0.12827321887016296, 1.4357091188430786, 1.151996374130249}, +{0.07173338532447815, 1.3584731817245483, 1.1524291038513184}, +{0.13148435950279236, 1.4635543823242188, 1.2435203790664673}, +{0.9373178482055664, 0.9545696377754211, 3.043079376220703}, +{0.8507148623466492, 0.9195014834403992, 3.0222837924957275}, +{0.9717345833778381, 0.9847933650016785, 2.9590299129486084}, +{3.0116758346557617, 0.7810040712356567, 3.0986409187316895}, +{2.9228572845458984, 0.7528406977653503, 3.0767223834991455}, +{3.0053632259368896, 0.8761909008026123, 3.106511116027832}, +{1.7797636985778809, 2.0358200073242188, 0.6792694926261902}, +{1.752432942390442, 2.0651471614837646, 0.5923483967781067}, +{1.69873046875, 2.032888412475586, 0.730135440826416}, +{1.8524788618087769, 2.4689958095550537, 1.2371361255645752}, +{1.8530579805374146, 2.4133493900299072, 1.3150172233581543}, +{1.9242607355117798, 2.435624599456787, 1.1833211183547974}, +{0.5493481159210205, 2.4030377864837646, 2.3077428340911865}, +{0.5209336876869202, 2.3709938526153564, 2.2221384048461914}, +{0.46833693981170654, 2.412660837173462, 2.35781192779541}, +{1.0748308897018433, 0.9626320004463196, 2.4993155002593994}, +{1.115849256515503, 0.9920057058334351, 2.580660343170166}, +{1.0239156484603882, 0.8856255412101746, 2.5246129035949707}, +{0.5782394409179688, 0.6013264060020447, 2.6897389888763428}, +{0.5634627342224121, 0.5244970917701721, 2.634591579437256}, +{0.657294750213623, 0.6416822075843811, 2.6539061069488525}, +{2.697910785675049, 2.358280897140503, 0.8322840929031372}, +{2.6574912071228027, 2.4080913066864014, 0.9033297896385193}, +{2.6427786350250244, 2.3761680126190186, 0.7561079263687134}, +{0.32684245705604553, 0.3235293924808502, 2.8627824783325195}, +{0.33717769384384155, 0.2851845324039459, 2.7756896018981934}, +{0.30093836784362793, 0.25004684925079346, 2.9183847904205322}, +{2.005791664123535, 1.0445624589920044, 2.9120194911956787}, +{1.9110908508300781, 1.0335923433303833, 2.920605421066284}, +{2.016110897064209, 1.1262165307998657, 2.863147735595703}, +{0.0034736059606075287, 0.5424983501434326, 3.0260519981384277}, +{-0.028437204658985138, 0.6216287016868591, 3.0694386959075928}, +{0.07652835547924042, 0.5726081728935242, 2.972026824951172}, +{2.4859635829925537, 1.096813678741455, 0.6352876424789429}, +{2.5714757442474365, 1.0562360286712646, 0.6495507955551147}, +{2.4914133548736572, 1.13382887840271, 0.5471826195716858}, +{1.3603994846343994, 0.18107672035694122, 0.40451580286026}, +{1.2919443845748901, 0.24784159660339355, 0.4088370203971863}, +{1.3129125833511353, 0.09797447919845581, 0.40567007660865784}, +{1.0517597198486328, 0.1952591985464096, 0.3062208294868469}, +{1.0754553079605103, 0.2636372148990631, 0.3688729405403137}, +{1.1156615018844604, 0.2043512910604477, 0.23553693294525146}, +{0.4988906681537628, 0.1332237869501114, 1.8650459051132202}, +{0.4446801543235779, 0.13281773030757904, 1.9439343214035034}, +{0.44038456678390503, 0.16426776349544525, 1.7959400415420532}, +{1.2609162330627441, 3.1136701107025146, 1.248840093612671}, +{1.2230342626571655, 3.0878376960754395, 1.332863688468933}, +{1.1867263317108154, 3.114504337310791, 1.1883628368377686}, +{0.1320076584815979, 0.6489079594612122, 0.6937786936759949}, +{0.0681542381644249, 0.5790399312973022, 0.6795127391815186}, +{0.13057270646095276, 0.6996079683303833, 0.6126013398170471}, +{2.8251736164093018, 0.4030686318874359, 2.8022329807281494}, +{2.8594248294830322, 0.31704118847846985, 2.777974843978882}, +{2.7647898197174072, 0.3853395879268646, 2.874356269836426}, +{1.9542354345321655, 2.9259300231933594, 1.949047327041626}, +{1.9328765869140625, 2.972214937210083, 2.030064821243286}, +{1.961046576499939, 2.9949734210968018, 1.883100986480713}, +{2.06304931640625, 1.1806923151016235, 2.3907485008239746}, +{2.06069278717041, 1.2337496280670166, 2.4703831672668457}, +{2.0648560523986816, 1.0903147459030151, 2.422227621078491}, +{1.8073474168777466, 2.393347978591919, 1.5334516763687134}, +{1.862402081489563, 2.4531803131103516, 1.5839630365371704}, +{1.8176980018615723, 2.3087401390075684, 1.5770025253295898}, +{3.063377618789673, 2.222951650619507, 2.27970290184021}, +{3.056365489959717, 2.298717975616455, 2.3377771377563477}, +{3.041430950164795, 2.2571046352386475, 2.1930184364318848}, +{1.1983673572540283, 0.7587328553199768, 0.14679478108882904}, +{1.1387518644332886, 0.7400270700454712, 0.07427991926670074}, +{1.2158443927764893, 0.8525859117507935, 0.13983222842216492}, +{2.283301591873169, 0.87222820520401, 1.4131630659103394}, +{2.3222107887268066, 0.8509721755981445, 1.3283305168151855}, +{2.240553140640259, 0.9567592740058899, 1.3994008302688599}, +{0.6819612383842468, 0.5634946823120117, -0.006878870539367199}, +{0.7030118107795715, 0.47045519948005676, 0.0010485625825822353}, +{0.655415415763855, 0.5743486881256104, -0.09820154309272766}, +{2.0968573093414307, 0.903373658657074, 0.29585230350494385}, +{2.0142409801483154, 0.9396638870239258, 0.26391685009002686}, +{2.13274884223938, 0.8559225797653198, 0.22086885571479797}, +{1.410232663154602, 1.6344283819198608, 3.152554750442505}, +{1.3988274335861206, 1.558351993560791, 3.095592975616455}, +{1.4907233715057373, 1.6161925792694092, 3.2010419368743896}, +{2.881263017654419, 2.6719255447387695, 0.49008795619010925}, +{2.8969228267669678, 2.648799180984497, 0.5816426277160645}, +{2.8914954662323, 2.767056941986084, 0.4873267412185669}, +{-0.012240035459399223, 1.6045371294021606, 0.7335913181304932}, +{0.07378777116537094, 1.6129467487335205, 0.7747108340263367}, +{-0.02716166153550148, 1.6893086433410645, 0.691717267036438}, +{0.029002416878938675, 3.07098650932312, 2.4676997661590576}, +{-0.04107284918427467, 3.0948586463928223, 2.4070210456848145}, +{0.03705702722072601, 2.976020336151123, 2.4588191509246826}, +{2.7529690265655518, 2.1502766609191895, 0.07628069072961807}, +{2.785332441329956, 2.1351945400238037, -0.012530626729130745}, +{2.7226431369781494, 2.241063356399536, 0.07562629133462906}, +{0.1680019050836563, 0.6057265996932983, 2.8083627223968506}, +{0.09433136135339737, 0.6103008389472961, 2.747419834136963}, +{0.21381986141204834, 0.5251302123069763, 2.784545421600342}, +{1.069197416305542, 3.0307376384735107, 0.7756684422492981}, +{1.130049228668213, 3.082266092300415, 0.8286229968070984}, +{1.0411370992660522, 3.090557098388672, 0.7064111828804016}, +{1.9190818071365356, 3.0532994270324707, 1.5368828773498535}, +{1.9676440954208374, 2.9986913204193115, 1.4750607013702393}, +{1.8297641277313232, 3.0547831058502197, 1.5024958848953247}, +{0.3569090962409973, 1.5528301000595093, 1.4714577198028564}, +{0.3521653115749359, 1.6212263107299805, 1.4046611785888672}, +{0.2670843005180359, 1.5442827939987183, 1.5034072399139404}, +{0.39417338371276855, 1.88254714012146, 2.6959309577941895}, +{0.3901907205581665, 1.89345121383667, 2.6009175777435303}, +{0.35207241773605347, 1.9611037969589233, 2.7308404445648193}, +{2.5931637287139893, 1.2388001680374146, 2.346385955810547}, +{2.5256221294403076, 1.195181131362915, 2.3983266353607178}, +{2.5521297454833984, 1.2534000873565674, 2.261148691177368}, +{1.732940435409546, 0.18011267483234406, 2.3140993118286133}, +{1.6691913604736328, 0.23969526588916779, 2.2747509479522705}, +{1.7536996603012085, 0.21973299980163574, 2.3987255096435547}, +{2.616211175918579, 1.0169509649276733, 3.173553943634033}, +{2.596224308013916, 1.0996110439300537, 3.129620313644409}, +{2.534471273422241, 0.9925218224525452, 3.2169606685638428}, +{3.084578275680542, 2.47491717338562, 0.6013457179069519}, +{3.013666868209839, 2.5292932987213135, 0.635654628276825}, +{3.070113182067871, 2.3889496326446533, 0.640876293182373}, +{0.8851416707038879, 3.0663692951202393, 2.2927703857421875}, +{0.8507260084152222, 3.0525805950164795, 2.204522132873535}, +{0.9576804041862488, 3.0043532848358154, 2.300150156021118}, +{1.8203340768814087, 3.0009403228759766, 1.2772754430770874}, +{1.8071439266204834, 2.9156978130340576, 1.2357779741287231}, +{1.7682406902313232, 3.061544418334961, 1.2245900630950928}, +{1.216223955154419, 2.2269434928894043, 2.220602035522461}, +{1.1438815593719482, 2.2206902503967285, 2.2829701900482178}, +{1.2929000854492188, 2.197646379470825, 2.2698440551757812}, +{0.92735356092453, 0.3653888702392578, 2.953388214111328}, +{0.8356765508651733, 0.34986478090286255, 2.9761178493499756}, +{0.9755082130432129, 0.29713761806488037, 3.0001344680786133}, +{0.8316515684127808, 0.11691911518573761, 0.1638496071100235}, +{0.9139049053192139, 0.1314152628183365, 0.21061044931411743}, +{0.7645975947380066, 0.1538272649049759, 0.22132888436317444}, +{3.0804572105407715, 2.6995062828063965, 0.9398274421691895}, +{3.0324511528015137, 2.6288084983825684, 0.8967047929763794}, +{3.025703191757202, 2.7235195636749268, 1.0145782232284546}, +{1.7241041660308838, 1.711806297302246, 1.0709301233291626}, +{1.7389495372772217, 1.69900643825531, 0.9772385954856873}, +{1.6525782346725464, 1.6518760919570923, 1.0922541618347168}, +{0.25466686487197876, 2.387033700942993, 1.49146568775177}, +{0.3201060891151428, 2.427535057067871, 1.434547781944275}, +{0.17457938194274902, 2.3861639499664307, 1.4390485286712646}, +{0.6275642514228821, 0.21717967092990875, 2.2695765495300293}, +{0.6040536165237427, 0.27217209339141846, 2.194841146469116}, +{0.5519020557403564, 0.1598528027534485, 2.281872272491455}, +{2.6333189010620117, 0.18857155740261078, 1.066447377204895}, +{2.611753463745117, 0.09588125348091125, 1.0767313241958618}, +{2.7280986309051514, 0.1897752434015274, 1.053118348121643}, +{1.9461435079574585, 2.9787139892578125, 3.0888166427612305}, +{1.9287737607955933, 2.9408469200134277, 3.174994945526123}, +{2.031348705291748, 2.943045139312744, 3.063714027404785}, +{0.24112293124198914, 1.0134661197662354, 0.8116376996040344}, +{0.3009677231311798, 1.0745207071304321, 0.8546872735023499}, +{0.29753363132476807, 0.960053563117981, 0.7557159066200256}, +{0.4932333528995514, 2.157670497894287, 0.08147243410348892}, +{0.5288283228874207, 2.0805652141571045, 0.125632181763649}, +{0.4121159017086029, 2.176896810531616, 0.12851104140281677}, +{2.4582772254943848, 2.9407806396484375, 1.9941823482513428}, +{2.4875752925872803, 2.9601542949676514, 2.0832250118255615}, +{2.375825881958008, 2.9885597229003906, 1.985168695449829}, +{1.4697840213775635, 0.5949443578720093, 2.6958963871002197}, +{1.4942008256912231, 0.6283542513847351, 2.6095833778381348}, +{1.4728260040283203, 0.49973854422569275, 2.6864662170410156}, +{0.5447174906730652, 1.6776001453399658, 1.0528595447540283}, +{0.6314951181411743, 1.6729590892791748, 1.0127294063568115}, +{0.5025256872177124, 1.5952732563018799, 1.0282740592956543}, +{0.5533978939056396, 2.6436767578125, 0.4884296953678131}, +{0.6377830505371094, 2.605297088623047, 0.5122721791267395}, +{0.5220322608947754, 2.684560537338257, 0.5690959692001343}, +{1.1521008014678955, 1.1706321239471436, 1.4813014268875122}, +{1.1810108423233032, 1.0795117616653442, 1.4764434099197388}, +{1.0692158937454224, 1.1720467805862427, 1.4334430694580078}, +{1.5600639581680298, 2.563610076904297, 1.7529674768447876}, +{1.5356742143630981, 2.6404194831848145, 1.701317310333252}, +{1.476753830909729, 2.5283186435699463, 1.7842127084732056}, +{0.7606029510498047, 1.327089786529541, 1.8725061416625977}, +{0.8128494024276733, 1.4004701375961304, 1.9048781394958496}, +{0.7069571018218994, 1.3010162115097046, 1.947370171546936}, +{1.9285246133804321, 1.4981695413589478, 2.8091659545898438}, +{1.9509050846099854, 1.5657434463500977, 2.7451722621917725}, +{1.8973947763442993, 1.546831727027893, 2.8854892253875732}, +{1.085676908493042, 1.9535621404647827, 1.4684048891067505}, +{1.1137803792953491, 1.922694206237793, 1.5545424222946167}, +{1.092774510383606, 2.048875570297241, 1.4736295938491821}, +{1.0604687929153442, 2.2237207889556885, 0.9799036383628845}, +{1.0979446172714233, 2.2307822704315186, 1.0676989555358887}, +{1.0893369913101196, 2.1380836963653564, 0.9483559727668762}, +{1.0828635692596436, 0.26291394233703613, 2.1894032955169678}, +{1.0315284729003906, 0.30466821789741516, 2.2585668563842773}, +{1.152673602104187, 0.21680304408073425, 2.235908031463623}, +{1.0514262914657593, 1.42058527469635, 0.38220667839050293}, +{0.9947220087051392, 1.491995930671692, 0.35309526324272156}, +{1.0392811298370361, 1.417522668838501, 0.4771036207675934}, +{0.7047921419143677, 2.767481803894043, 2.7599995136260986}, +{0.742376446723938, 2.6829211711883545, 2.784478187561035}, +{0.7565481662750244, 2.7957746982574463, 2.68461275100708}, +{2.9081568717956543, 1.0483659505844116, 2.2607645988464355}, +{2.9545743465423584, 1.0155895948410034, 2.3377933502197266}, +{2.9617435932159424, 1.0200691223144531, 2.1866695880889893}, +{0.27919915318489075, 0.4592059850692749, 1.934998631477356}, +{0.2215692102909088, 0.5305320024490356, 1.9075449705123901}, +{0.2715103328227997, 0.45756953954696655, 2.030395269393921}, +{2.5186054706573486, 2.756135940551758, 0.6601774096488953}, +{2.5599634647369385, 2.775848150253296, 0.7442206144332886}, +{2.4544098377227783, 2.826099395751953, 0.6480794548988342}, +{2.9986352920532227, 2.8650424480438232, 2.7173163890838623}, +{2.976641893386841, 2.9454667568206787, 2.7643327713012695}, +{2.960150957107544, 2.87678599357605, 2.6304640769958496}, +{0.3866350054740906, 2.913573741912842, 0.06566329300403595}, +{0.31381094455718994, 2.8538098335266113, 0.048714540898799896}, +{0.34615689516067505, 2.9892237186431885, 0.1081005334854126}, +{2.8767411708831787, 1.7951725721359253, 0.5352417826652527}, +{2.9274449348449707, 1.7234869003295898, 0.4971284866333008}, +{2.9229929447174072, 1.8743963241577148, 0.5079164505004883}, +{0.8212215900421143, 2.32346248626709, 0.9163143038749695}, +{0.7873013019561768, 2.2718605995178223, 0.8431774973869324}, +{0.9014861583709717, 2.2782602310180664, 0.9423274993896484}, +{0.04822356626391411, 1.8784016370773315, 0.36090123653411865}, +{0.07703989744186401, 1.9496569633483887, 0.4179506003856659}, +{0.01620185375213623, 1.8110945224761963, 0.4209567904472351}, +{0.3007993996143341, 1.283398985862732, 2.800210952758789}, +{0.38360512256622314, 1.2528526782989502, 2.8372576236724854}, +{0.23535878956317902, 1.2615087032318115, 2.866548538208008}, +{2.908573865890503, 3.141735315322876, 2.0731236934661865}, +{2.975710868835449, 3.16373872756958, 2.1377053260803223}, +{2.836578130722046, 3.201936721801758, 2.0919578075408936}, +{0.8118754625320435, 1.251791000366211, 0.5062885880470276}, +{0.8151193857192993, 1.2551257610321045, 0.41068172454833984}, +{0.7351620197296143, 1.3041266202926636, 0.5294907093048096}, +{0.45533519983291626, 2.534637451171875, 1.3812183141708374}, +{0.4087845981121063, 2.585402011871338, 1.314747929573059}, +{0.5147399306297302, 2.4785876274108887, 1.3313002586364746}, +{1.3108175992965698, 2.2599592208862305, 0.8244134783744812}, +{1.3743815422058105, 2.326218605041504, 0.8514620661735535}, +{1.2369730472564697, 2.2718119621276855, 0.8841530680656433}, +{1.1837493181228638, 1.289136290550232, 0.19898450374603271}, +{1.1262238025665283, 1.3187733888626099, 0.26951655745506287}, +{1.1798927783966064, 1.3592090606689453, 0.13389042019844055}, +{0.6859503388404846, 1.3071881532669067, 2.1536295413970947}, +{0.703140139579773, 1.3856745958328247, 2.205655574798584}, +{0.5933165550231934, 1.2883182764053345, 2.168637275695801}, +{0.08048057556152344, 2.749161720275879, 2.906688928604126}, +{0.003037493210285902, 2.7621779441833496, 2.8519582748413086}, +{0.15296021103858948, 2.7828826904296875, 2.8540401458740234}, +{2.9571990966796875, 0.7326502203941345, 1.5379197597503662}, +{2.8637921810150146, 0.71275395154953, 1.5443699359893799}, +{2.9881627559661865, 0.6788837909698486, 1.4650311470031738}, +{1.0200135707855225, 3.009673833847046, 1.1434670686721802}, +{0.9746636152267456, 2.9985668659210205, 1.227027416229248}, +{1.0094279050827026, 2.925520658493042, 1.0990995168685913}, +{0.9094709157943726, 2.5449724197387695, 0.7697066068649292}, +{0.8780769109725952, 2.5130507946014404, 0.685103178024292}, +{0.9187994599342346, 2.466083288192749, 0.8231089115142822}, +{2.6622190475463867, 0.7663405537605286, 1.8010907173156738}, +{2.620734214782715, 0.8480744957923889, 1.7735064029693604}, +{2.6161108016967773, 0.7419775128364563, 1.8813576698303223}, +{1.4007179737091064, 1.7750264406204224, 1.4921756982803345}, +{1.4197685718536377, 1.8528867959976196, 1.544493556022644}, +{1.4779123067855835, 1.71946120262146, 1.5029393434524536}, +{0.6821587681770325, 2.1318819522857666, 1.6775234937667847}, +{0.605828583240509, 2.136425256729126, 1.6199440956115723}, +{0.6631621718406677, 2.059152126312256, 1.7367839813232422}, +{2.0512888431549072, 2.6404201984405518, 1.995417833328247}, +{2.0144286155700684, 2.724921703338623, 1.9696663618087769}, +{2.0987422466278076, 2.6587018966674805, 2.076512098312378}, +{0.16013549268245697, 2.936912775039673, 1.840491533279419}, +{0.1679050624370575, 2.910430669784546, 1.7488365173339844}, +{0.07042073458433151, 2.9138131141662598, 1.8645741939544678}, +{2.2577571868896484, 2.537656545639038, 0.8810963034629822}, +{2.262138605117798, 2.630286931991577, 0.8573747277259827}, +{2.2618021965026855, 2.4912946224212646, 0.7974510788917542}, +{1.2653692960739136, 1.682043433189392, 0.22969962656497955}, +{1.3442903757095337, 1.67552649974823, 0.17592868208885193}, +{1.2935638427734375, 1.7293621301651, 0.3079831898212433}, +{1.6202033758163452, 1.279919981956482, 3.066171407699585}, +{1.7038286924362183, 1.256205439567566, 3.106255531311035}, +{1.577038049697876, 1.1961355209350586, 3.0494613647460938}, +{2.274726629257202, 1.1409251689910889, 1.8265043497085571}, +{2.260728359222412, 1.1273975372314453, 1.9202239513397217}, +{2.3698787689208984, 1.144685983657837, 1.816797137260437}, +{1.1565930843353271, 0.43642815947532654, 1.0973401069641113}, +{1.1685632467269897, 0.4104236364364624, 1.1886789798736572}, +{1.2002041339874268, 0.5213778018951416, 1.0907102823257446}, +{2.1676559448242188, 2.7354917526245117, 2.7471280097961426}, +{2.1418001651763916, 2.6650209426879883, 2.6877338886260986}, +{2.2249534130096436, 2.7913095951080322, 2.6945571899414062}, +{1.3853962421417236, 2.8224802017211914, 1.6613258123397827}, +{1.3579691648483276, 2.821138858795166, 1.7530224323272705}, +{1.4704338312149048, 2.8664093017578125, 1.662401556968689}, +{1.0148019790649414, 0.1683100014925003, 3.101818323135376}, +{0.9681854248046875, 0.11957179009914398, 3.169743299484253}, +{1.085487961769104, 0.1097918301820755, 3.074589252471924}, +{0.7053584456443787, 2.1619131565093994, 1.1028720140457153}, +{0.7235217094421387, 2.2536461353302, 1.0824397802352905}, +{0.7422502636909485, 2.1132049560546875, 1.029191493988037}, +{2.1116673946380615, 1.7425451278686523, 0.40739622712135315}, +{2.1391913890838623, 1.7616764307022095, 0.4970552623271942}, +{2.0270655155181885, 1.6988390684127808, 0.41712331771850586}, +{1.524678111076355, 0.09629747271537781, 2.9346797466278076}, +{1.5939624309539795, 0.15930452942848206, 2.954481601715088}, +{1.4439034461975098, 0.1475088894367218, 2.9385743141174316}, +{3.08620285987854, 1.0660828351974487, 1.7973281145095825}, +{3.02099871635437, 1.0473204851150513, 1.7298098802566528}, +{3.1688716411590576, 1.0728826522827148, 1.749558448791504}, +{0.8224638104438782, 0.7218127250671387, 2.8813352584838867}, +{0.7868160605430603, 0.6331263780593872, 2.8864619731903076}, +{0.7532376646995544, 0.7775443196296692, 2.91688871383667}, +{1.2259416580200195, 3.0000553131103516, 2.805624008178711}, +{1.1780023574829102, 3.0258166790008545, 2.7268807888031006}, +{1.1777287721633911, 2.9245755672454834, 2.839397668838501}, +{2.0805752277374268, 0.7737628221511841, 2.917898654937744}, +{2.0193376541137695, 0.7644233107566833, 2.844925880432129}, +{2.096794366836548, 0.8679230213165283, 2.923654079437256}, +{1.645433783531189, 1.4351202249526978, 2.456571578979492}, +{1.5857043266296387, 1.384758710861206, 2.401268482208252}, +{1.630424976348877, 1.5262116193771362, 2.4312849044799805}, +{1.2354944944381714, 2.7040975093841553, 3.06539249420166}, +{1.3067069053649902, 2.7599446773529053, 3.0965731143951416}, +{1.2650707960128784, 2.673128604888916, 2.979785919189453}, +{0.3326892554759979, 1.634078860282898, 2.4167490005493164}, +{0.2438642829656601, 1.6307594776153564, 2.381232500076294}, +{0.34856972098350525, 1.7270817756652832, 2.432891368865967}, +{0.9628923535346985, 1.5807983875274658, 2.2260372638702393}, +{0.9391059279441833, 1.489572525024414, 2.2426013946533203}, +{1.0211020708084106, 1.603896141052246, 2.2984280586242676}, +{0.6591838598251343, 3.1742167472839355, 2.530315637588501}, +{0.711984395980835, 3.225661039352417, 2.59137225151062}, +{0.7173551917076111, 3.15812087059021, 2.4560234546661377}, +{2.347527265548706, 2.1440906524658203, 2.6716902256011963}, +{2.3622727394104004, 2.198273181915283, 2.5941715240478516}, +{2.2713048458099365, 2.183375597000122, 2.7142248153686523}, +{1.2234001159667969, 0.2751689851284027, 1.6280606985092163}, +{1.2464481592178345, 0.3280348479747772, 1.7044563293457031}, +{1.1494542360305786, 0.22185681760311127, 1.6572520732879639}, +{2.5266919136047363, 2.5172507762908936, 0.9900338649749756}, +{2.4351139068603516, 2.498988389968872, 0.9690034985542297}, +{2.5261101722717285, 2.6068129539489746, 1.0238064527511597}, +{2.7950761318206787, 0.3643782138824463, 2.4330291748046875}, +{2.859373092651367, 0.30041787028312683, 2.4636447429656982}, +{2.8469643592834473, 0.4415864646434784, 2.4104721546173096}, +{0.42489945888519287, 1.2931032180786133, 2.173279285430908}, +{0.3554156720638275, 1.3153131008148193, 2.1113030910491943}, +{0.38362932205200195, 1.3008066415786743, 2.25930118560791}, +{2.0628011226654053, 3.003662109375, 1.1044825315475464}, +{2.114509344100952, 2.9784979820251465, 1.1810027360916138}, +{2.124981641769409, 3.0013587474823, 1.0317460298538208}, +{2.2149415016174316, 2.793793201446533, 0.7751439809799194}, +{2.219525098800659, 2.783813238143921, 0.680056095123291}, +{2.2104170322418213, 2.888381004333496, 0.7891088128089905}, +{3.0834908485412598, 0.4634588062763214, 0.6299324631690979}, +{3.0002963542938232, 0.4712201654911041, 0.5832338333129883}, +{3.12143874168396, 0.38165754079818726, 0.5978259444236755}, +{1.5191537141799927, 2.452023506164551, 1.4572906494140625}, +{1.5735859870910645, 2.5152220726013184, 1.4103292226791382}, +{1.581459879875183, 2.389134168624878, 1.4936939477920532}, +{0.8942351937294006, 1.210085391998291, 1.3569921255111694}, +{0.8402118682861328, 1.2538912296295166, 1.2912285327911377}, +{0.8918471336364746, 1.2685401439666748, 1.4327526092529297}, +{2.1548614501953125, 1.2278220653533936, 1.083563208580017}, +{2.0618152618408203, 1.2440495491027832, 1.0680265426635742}, +{2.1963045597076416, 1.2428187131881714, 0.998593270778656}, +{1.3620505332946777, 1.180288314819336, 1.6560289859771729}, +{1.297515630722046, 1.2096425294876099, 1.591718077659607}, +{1.4333875179290771, 1.1439980268478394, 1.6035277843475342}, +{0.7556520104408264, 1.225024938583374, 0.8818028569221497}, +{0.7072111368179321, 1.2473794221878052, 0.8023291230201721}, +{0.8224904537200928, 1.2931574583053589, 0.8890752196311951}, +{1.1577948331832886, 1.4267919063568115, 2.009552478790283}, +{1.1211227178573608, 1.5151218175888062, 2.0134642124176025}, +{1.2513985633850098, 1.4389959573745728, 2.025418281555176}, +{0.414385050535202, 0.5629353523254395, 2.3777577877044678}, +{0.4586138129234314, 0.48464250564575195, 2.4105658531188965}, +{0.47074705362319946, 0.6354067921638489, 2.404841423034668}, +{2.041173219680786, 1.4635363817214966, 0.6262058019638062}, +{1.960656762123108, 1.4980735778808594, 0.5876491665840149}, +{2.014451026916504, 1.430696964263916, 0.7120534777641296}, +{0.8477614521980286, 1.6327571868896484, 0.35908326506614685}, +{0.7556456923484802, 1.6554014682769775, 0.3718991279602051}, +{0.8591587543487549, 1.6316615343093872, 0.26405054330825806}, +{0.9711195826530457, 1.6303439140319824, 1.3871842622756958}, +{1.0667790174484253, 1.6337310075759888, 1.3875384330749512}, +{0.9449000954627991, 1.6863389015197754, 1.46025550365448}, +{2.6792140007019043, 0.1542631983757019, 2.1142804622650146}, +{2.6608097553253174, 0.2157444804906845, 2.043261766433716}, +{2.6232123374938965, 0.18334831297397614, 2.1862540245056152}, +{2.932041883468628, 1.100440502166748, 1.3120577335357666}, +{3.025387763977051, 1.0902074575424194, 1.3306092023849487}, +{2.9002063274383545, 1.0110664367675781, 1.2993658781051636}, +{1.6969701051712036, 0.7908605933189392, 0.6874765753746033}, +{1.6948492527008057, 0.8121780157089233, 0.7807685732841492}, +{1.661049485206604, 0.8684072494506836, 0.6443658471107483}, +{2.347615957260132, 2.4293007850646973, 2.9404361248016357}, +{2.3926095962524414, 2.4910809993743896, 2.998065233230591}, +{2.365715265274048, 2.4614124298095703, 2.8520984649658203}, +{1.089487075805664, 2.6251108646392822, 1.8184317350387573}, +{1.1530405282974243, 2.6938300132751465, 1.7984083890914917}, +{1.1425495147705078, 2.551673412322998, 1.8493130207061768}, +{1.6439225673675537, 0.7110452651977539, 2.867058277130127}, +{1.7234418392181396, 0.6593793630599976, 2.854033946990967}, +{1.5804917812347412, 0.6731289625167847, 2.806220769882202}, +{2.1299407482147217, 2.574563503265381, 0.5401681065559387}, +{2.1979782581329346, 2.508539915084839, 0.5533621311187744}, +{2.1358354091644287, 2.5967938899993896, 0.44725215435028076}, +{0.8949082493782043, 2.717625856399536, 1.6142146587371826}, +{0.8684226274490356, 2.6372601985931396, 1.56946861743927}, +{0.9595679044723511, 2.688938617706299, 1.6787011623382568}, +{2.3125388622283936, 1.5616176128387451, 0.5587125420570374}, +{2.230975389480591, 1.517619013786316, 0.5347574949264526}, +{2.3139753341674805, 1.5589720010757446, 0.6543851494789124}, +{0.14920270442962646, 1.135154366493225, 1.6339352130889893}, +{0.2040102779865265, 1.1890168190002441, 1.6910078525543213}, +{0.20454832911491394, 1.1166754961013794, 1.5580556392669678}, +{2.3616867065429688, 3.0285024642944336, 1.075325846672058}, +{2.3403186798095703, 3.1007752418518066, 1.134337306022644}, +{2.457357168197632, 3.025461435317993, 1.074842095375061}, +{0.3915144205093384, 0.2808094322681427, 0.0933411717414856}, +{0.4611997902393341, 0.2757807970046997, 0.027911974117159843}, +{0.3476726710796356, 0.3639634847640991, 0.07529613375663757}, +{0.5229347348213196, 0.8621352314949036, 2.1817786693573}, +{0.4621542990207672, 0.8868135809898376, 2.2514853477478027}, +{0.4894225001335144, 0.9066083431243896, 2.103923797607422}, +{1.421294093132019, 3.1554131507873535, 0.6440016627311707}, +{1.3521610498428345, 3.1558542251586914, 0.5777993202209473}, +{1.4330377578735352, 3.0629398822784424, 0.6657521724700928}, +{2.2567617893218994, 2.1600501537323, 0.7329679727554321}, +{2.186110019683838, 2.1223795413970947, 0.7854232788085938}, +{2.325334310531616, 2.180727005004883, 0.7964708805084229}, +{1.7732752561569214, 2.9435715675354004, 0.6451000571250916}, +{1.688927412033081, 2.9276745319366455, 0.6027321815490723}, +{1.7532074451446533, 2.9448511600494385, 0.7386839985847473}, +{0.46657368540763855, 1.9421653747558594, 1.0109256505966187}, +{0.5091692805290222, 1.9703172445297241, 0.9299601912498474}, +{0.507270336151123, 1.8579765558242798, 1.031379222869873}, +{2.295496940612793, 0.6596418023109436, 1.8941248655319214}, +{2.328889846801758, 0.7182203531265259, 1.8261853456497192}, +{2.201456069946289, 0.6543428301811218, 1.877078890800476}, +{2.036720037460327, 2.729212522506714, 1.1390653848648071}, +{2.0285749435424805, 2.8231351375579834, 1.1224970817565918}, +{2.1220052242279053, 2.7057461738586426, 1.1024855375289917}, +{1.328328013420105, -0.013648063875734806, 1.6902880668640137}, +{1.3720084428787231, 0.06758318841457367, 1.664678931236267}, +{1.3076434135437012, -0.0568719319999218, 1.6074258089065552}, +{1.126552700996399, 1.3953449726104736, 2.7440974712371826}, +{1.0990971326828003, 1.3498345613479614, 2.664490222930908}, +{1.0598163604736328, 1.462656021118164, 2.757431983947754}, +{2.8531482219696045, 0.9984753727912903, 1.6224902868270874}, +{2.8681888580322266, 0.9362119436264038, 1.551361083984375}, +{2.764251947402954, 0.9795329570770264, 1.6525057554244995}, +{0.07347982376813889, 0.22037485241889954, 0.6527082920074463}, +{0.14894264936447144, 0.21395213901996613, 0.5941725969314575}, +{0.10395976155996323, 0.27497872710227966, 0.7251769304275513}, +{2.996490001678467, 2.920896291732788, 1.5682364702224731}, +{3.0419068336486816, 2.8389506340026855, 1.5486260652542114}, +{3.047312021255493, 2.987959623336792, 1.5226083993911743}, +{2.068956136703491, 0.4780348837375641, 0.2093968689441681}, +{2.1587984561920166, 0.4625687897205353, 0.2385764718055725}, +{2.0240979194641113, 0.5118827223777771, 0.28688478469848633}, +{0.9112588763237, 2.965219497680664, 1.6480833292007446}, +{0.8620031476020813, 2.9949963092803955, 1.7245655059814453}, +{0.8979218006134033, 2.870447874069214, 1.6464157104492188}, +{2.180725336074829, 1.108062744140625, 1.3281142711639404}, +{2.091252565383911, 1.075905203819275, 1.3391978740692139}, +{2.180633544921875, 1.1499457359313965, 1.2420438528060913}, +{0.9967225790023804, 0.734213650226593, 2.67448353767395}, +{1.0806652307510376, 0.6945868730545044, 2.697843313217163}, +{0.9542637467384338, 0.7516433000564575, 2.7584822177886963}, +{0.5649971961975098, 2.878345489501953, 2.4996542930603027}, +{0.6381070613861084, 2.8480005264282227, 2.445835590362549}, +{0.5936902165412903, 2.9632065296173096, 2.533383369445801}, +{1.0189812183380127, 1.3378562927246094, 0.8573604822158813}, +{1.04489004611969, 1.4021364450454712, 0.7913368344306946}, +{1.0156084299087524, 1.3875237703323364, 0.9391167759895325}, +{2.093522071838379, 2.4849648475646973, 3.1811468601226807}, +{2.01052188873291, 2.4580812454223633, 3.1417696475982666}, +{2.160112142562866, 2.4374349117279053, 3.131457805633545}, +{1.5852546691894531, 1.5944738388061523, 1.439083218574524}, +{1.562642216682434, 1.525829792022705, 1.3763220310211182}, +{1.6714246273040771, 1.6252163648605347, 1.41094172000885}, +{2.0300920009613037, 2.268362045288086, 2.5426931381225586}, +{1.9435926675796509, 2.2339961528778076, 2.565035581588745}, +{2.0742478370666504, 2.278733491897583, 2.6269843578338623}, +{2.4908878803253174, 0.39468109607696533, 1.1805516481399536}, +{2.405536413192749, 0.35141003131866455, 1.1783043146133423}, +{2.5454516410827637, 0.343121737241745, 1.1211652755737305}, +{2.8657853603363037, 1.521896243095398, 0.7040867805480957}, +{2.921693801879883, 1.5824882984161377, 0.7527198195457458}, +{2.880232095718384, 1.5444819927215576, 0.6121982932090759}, +{0.015058605000376701, 1.7883261442184448, 2.6250131130218506}, +{0.088969387114048, 1.8299139738082886, 2.5806288719177246}, +{0.024614647030830383, 1.6951518058776855, 2.605276107788086}, +{1.3014929294586182, 0.2785821557044983, 2.910602569580078}, +{1.2714130878448486, 0.3691179156303406, 2.9183998107910156}, +{1.241742491722107, 0.23886488378047943, 2.847240447998047}, +{2.2505314350128174, 2.2907955646514893, 0.9990561008453369}, +{2.2268056869506836, 2.3781394958496094, 0.9679045081138611}, +{2.1695199012756348, 2.2402260303497314, 0.9925625324249268}, +{2.0819146633148193, 2.1656737327575684, 1.6726434230804443}, +{2.1616804599761963, 2.1908791065216064, 1.719166874885559}, +{2.083102226257324, 2.2183995246887207, 1.5927629470825195}, +{2.333189010620117, 3.0799074172973633, 2.2494187355041504}, +{2.312363862991333, 3.1168787479400635, 2.335219383239746}, +{2.4255921840667725, 3.055694580078125, 2.2555594444274902}, +{0.9651831984519958, 0.8569744229316711, 1.528813123703003}, +{0.9321863651275635, 0.9243544936180115, 1.5882558822631836}, +{1.0275615453720093, 0.807018518447876, 1.5814976692199707}, +{0.3511142134666443, 0.12962204217910767, 1.073682427406311}, +{0.3243396282196045, 0.20841583609580994, 1.1209790706634521}, +{0.4368537962436676, 0.10774832963943481, 1.1101869344711304}, +{0.412395179271698, 0.3476283848285675, 0.8394314646720886}, +{0.39660874009132385, 0.38555049896240234, 0.7529732584953308}, +{0.5073487758636475, 0.33629634976387024, 0.8436403274536133}, +{2.23142671585083, 1.674506664276123, 0.15330447256565094}, +{2.2049601078033447, 1.729760766029358, 0.22684910893440247}, +{2.3130922317504883, 1.633746862411499, 0.18214350938796997}, +{1.799233078956604, 0.4912833869457245, 0.728413999080658}, +{1.717902660369873, 0.5126146674156189, 0.7741596698760986}, +{1.7800757884979248, 0.5084778666496277, 0.636220395565033}, +{2.235211133956909, 1.3801268339157104, 1.426364779472351}, +{2.251227378845215, 1.4072555303573608, 1.516752004623413}, +{2.25118088722229, 1.2857484817504883, 1.4264973402023315}, +{2.5541739463806152, 1.5073044300079346, 2.0737202167510986}, +{2.480522871017456, 1.4681062698364258, 2.120638847351074}, +{2.5887486934661865, 1.4362181425094604, 2.019742250442505}, +{2.8020663261413574, 0.6479642391204834, 2.084191083908081}, +{2.7127325534820557, 0.6805055141448975, 2.073105573654175}, +{2.819965362548828, 0.5992498397827148, 2.0037620067596436}, +{1.6652947664260864, 2.1599957942962646, 0.45850977301597595}, +{1.620522141456604, 2.1150951385498047, 0.38680440187454224}, +{1.739960789680481, 2.2030673027038574, 0.41689053177833557}, +{2.7450506687164307, 1.9021294116973877, 2.7050886154174805}, +{2.736318349838257, 1.8295809030532837, 2.6432600021362305}, +{2.6592986583709717, 1.908172845840454, 2.7471883296966553}, +{0.39737144112586975, 2.5305018424987793, 1.063469648361206}, +{0.3464199900627136, 2.574733018875122, 1.1313657760620117}, +{0.3318554759025574, 2.4871768951416016, 1.008762001991272}, +{1.5119575262069702, 1.92082679271698, 0.055540334433317184}, +{1.5857369899749756, 1.9346212148666382, -0.0038618873804807663}, +{1.4354925155639648, 1.9163874387741089, -0.0018679441418498755}, +{1.8028377294540405, 1.1393910646438599, 1.3632062673568726}, +{1.8224817514419556, 1.2257426977157593, 1.3995356559753418}, +{1.8450121879577637, 1.1393983364105225, 1.277278184890747}, +{1.142255187034607, 1.9243791103363037, 1.7257455587387085}, +{1.1291723251342773, 1.894720196723938, 1.8158094882965088}, +{1.2309025526046753, 1.9604829549789429, 1.7250566482543945}, +{1.8557217121124268, 2.6019680500030518, 2.7540478706359863}, +{1.8207799196243286, 2.5138323307037354, 2.7672183513641357}, +{1.9437566995620728, 2.5878732204437256, 2.719212770462036}, +{1.7331173419952393, 3.035238027572632, 0.9110709428787231}, +{1.770876169204712, 3.117081642150879, 0.8788498640060425}, +{1.7241264581680298, 3.048524856567383, 1.005436897277832}, +{0.4562826156616211, 1.3933093547821045, 0.2876450717449188}, +{0.5382047295570374, 1.360247254371643, 0.2507942318916321}, +{0.4186873435974121, 1.447134256362915, 0.21799027919769287}, +{0.557606041431427, 1.2236894369125366, 2.925414562225342}, +{0.622983455657959, 1.1761623620986938, 2.8741378784179688}, +{0.533933162689209, 1.1633613109588623, 2.995859146118164}, +{1.3702514171600342, 1.2992609739303589, 1.2857426404953003}, +{1.4170855283737183, 1.2517400979995728, 1.3543767929077148}, +{1.2992666959762573, 1.3440316915512085, 1.3317759037017822}, +{1.2973723411560059, 1.0082967281341553, 2.0985727310180664}, +{1.328339695930481, 0.985588788986206, 2.1862521171569824}, +{1.2056480646133423, 1.0326181650161743, 2.1111199855804443}, +{1.4795522689819336, 2.550140380859375, 0.8478246927261353}, +{1.5222408771514893, 2.535372734069824, 0.932216227054596}, +{1.5498945713043213, 2.541243553161621, 0.7835197448730469}, +{0.2262696474790573, 1.8350684642791748, 1.827314019203186}, +{0.3053719699382782, 1.7981441020965576, 1.7880491018295288}, +{0.253273069858551, 1.8614795207977295, 1.9152661561965942}, +{2.607023239135742, 0.7434468269348145, 3.1442034244537354}, +{2.5184504985809326, 0.7079805731773376, 3.151906967163086}, +{2.5993716716766357, 0.8338350057601929, 3.174760580062866}, +{2.0567963123321533, 1.9209105968475342, 1.1764280796051025}, +{2.108466863632202, 1.861242651939392, 1.230578064918518}, +{1.9659888744354248, 1.9025121927261353, 1.200466275215149}, +{2.15126371383667, 1.8917573690414429, 2.750751495361328}, +{2.2079732418060303, 1.935056447982788, 2.6869428157806396}, +{2.18733286857605, 1.916877031326294, 2.835782766342163}, +{0.02157505974173546, 1.0782382488250732, 1.3908708095550537}, +{0.03303169459104538, 1.0361337661743164, 1.4760663509368896}, +{0.09494619816541672, 1.0463318824768066, 1.33832585811615}, +{1.250948190689087, 2.8437864780426025, 1.897401213645935}, +{1.215077519416809, 2.932436466217041, 1.9014959335327148}, +{1.2666350603103638, 2.8200511932373047, 1.988795280456543}, +{0.674960732460022, 1.0210381746292114, 0.5162409543991089}, +{0.7364394664764404, 1.0941650867462158, 0.5103130340576172}, +{0.5999003648757935, 1.056645393371582, 0.5637843608856201}, +{0.198933944106102, 1.1282870769500732, 0.08344673365354538}, +{0.15072475373744965, 1.2106083631515503, 0.09128285199403763}, +{0.2192232459783554, 1.1037273406982422, 0.17371012270450592}, +{1.2192211151123047, 3.0847489833831787, 0.43593618273735046}, +{1.229652762413025, 3.1053781509399414, 0.3430494964122772}, +{1.1983911991119385, 2.9913365840911865, 0.4375327229499817}, +{1.0656994581222534, 1.7474576234817505, 0.5082168579101562}, +{0.9887535572052002, 1.695940375328064, 0.4839760959148407}, +{1.0763115882873535, 1.8098849058151245, 0.43643563985824585}, +{0.26640790700912476, 2.71929669380188, 1.2304234504699707}, +{0.17938536405563354, 2.705906391143799, 1.2679747343063354}, +{0.261009156703949, 2.8045637607574463, 1.1872646808624268}, +{1.955042839050293, 0.5849990844726562, 0.42368000745773315}, +{2.000401735305786, 0.6380075216293335, 0.48921626806259155}, +{1.8626024723052979, 0.6072868704795837, 0.43465009331703186}, +{1.7746590375900269, 0.33960071206092834, 2.933077573776245}, +{1.8080974817276, 0.33675116300582886, 2.8434336185455322}, +{1.8165541887283325, 0.26537463068962097, 2.9766390323638916}, +{2.2859530448913574, 1.6448506116867065, 0.8669996857643127}, +{2.3391003608703613, 1.7198443412780762, 0.8937135934829712}, +{2.3084635734558105, 1.5760273933410645, 0.92960125207901}, +{1.1070188283920288, 1.971892237663269, 0.3088257908821106}, +{1.185560703277588, 2.0058817863464355, 0.3517001271247864}, +{1.111266851425171, 2.006882667541504, 0.21983176469802856}, +{0.8830074667930603, 3.0026943683624268, 1.3705723285675049}, +{0.9073386192321777, 3.0166711807250977, 1.4620871543884277}, +{0.7894570231437683, 2.9826366901397705, 1.3734562397003174}, +{1.7292789220809937, 0.45020943880081177, 1.9313437938690186}, +{1.684172511100769, 0.5021485090255737, 1.997902512550354}, +{1.816817283630371, 0.4885968267917633, 1.9262675046920776}, +{0.9000285863876343, 1.3044894933700562, 1.6579546928405762}, +{0.965727686882019, 1.374101996421814, 1.6577268838882446}, +{0.8451178669929504, 1.3236281871795654, 1.7339866161346436}, +{1.7125440835952759, 2.814941644668579, 2.25303316116333}, +{1.7063729763031006, 2.7916276454925537, 2.1604011058807373}, +{1.7468976974487305, 2.9042844772338867, 2.2530078887939453}, +{0.8947782516479492, 1.9870611429214478, 2.858761787414551}, +{0.8374161124229431, 2.013857364654541, 2.9305522441864014}, +{0.968524694442749, 2.0479345321655273, 2.8630306720733643}, +{2.5228991508483887, 0.9957737922668457, 1.6839442253112793}, +{2.5404064655303955, 1.072901964187622, 1.7378615140914917}, +{2.493913173675537, 1.0313513278961182, 1.5999419689178467}, +{2.0765233039855957, 2.072556972503662, 0.9289240837097168}, +{2.0764551162719727, 2.013633966445923, 1.0043588876724243}, +{1.9926378726959229, 2.118354558944702, 0.9342292547225952}, +{2.6798834800720215, 1.2429968118667603, 2.064610004425049}, +{2.769526481628418, 1.2452303171157837, 2.0311217308044434}, +{2.686175584793091, 1.1940897703170776, 2.14665150642395}, +{1.638472080230713, 0.09753794968128204, 2.6633644104003906}, +{1.5791031122207642, 0.09991472959518433, 2.7384111881256104}, +{1.63068425655365, 0.0083558838814497, 2.629478931427002}, +{1.9308922290802002, 0.5409057140350342, 1.2995754480361938}, +{2.00974440574646, 0.5438867211341858, 1.2453927993774414}, +{1.873420000076294, 0.6075460910797119, 1.261914849281311}, +{0.9355344772338867, 1.2983382940292358, 2.281355857849121}, +{0.9843584895133972, 1.2740861177444458, 2.202677011489868}, +{0.8473334312438965, 1.26436448097229, 2.2662339210510254}, +{0.03137785196304321, 2.3726861476898193, 1.3363889455795288}, +{-0.0035116258077323437, 2.356308698654175, 1.2487714290618896}, +{-0.03943657875061035, 2.3471736907958984, 1.3955222368240356}, +{1.8392568826675415, 2.439377546310425, 3.0696587562561035}, +{1.7802960872650146, 2.4341623783111572, 3.144883394241333}, +{1.782155156135559, 2.4282121658325195, 2.993651866912842}, +{2.7845733165740967, 2.00140118598938, 1.4598013162612915}, +{2.8712267875671387, 1.9691886901855469, 1.484618067741394}, +{2.750310182571411, 1.9346299171447754, 1.4003880023956299}, +{1.0615466833114624, 1.2751054763793945, 2.5255048274993896}, +{1.0702645778656006, 1.1803340911865234, 2.5152719020843506}, +{1.0160049200057983, 1.3036589622497559, 2.446302652359009}, +{1.8577601909637451, 2.52561354637146, 0.3377353250980377}, +{1.9300986528396606, 2.5754737854003906, 0.29974281787872314}, +{1.877175211906433, 2.522854804992676, 0.4314250349998474}, +{1.9894989728927612, 2.5311012268066406, 1.7619067430496216}, +{1.9188976287841797, 2.471480131149292, 1.7868680953979492}, +{2.032888174057007, 2.5527286529541016, 1.844441294670105}, +{0.1627952605485916, 2.0491743087768555, 1.3348278999328613}, +{0.17710351943969727, 2.0373854637145996, 1.428735375404358}, +{0.2437228560447693, 2.0892674922943115, 1.303117036819458}, +{0.022531425580382347, 2.4592947959899902, 2.384826898574829}, +{0.11253967881202698, 2.4387242794036865, 2.4100794792175293}, +{0.004009414464235306, 2.5426957607269287, 2.427995443344116}, +{1.259183406829834, 3.1067001819610596, 0.9602501392364502}, +{1.2372674942016602, 3.114928722381592, 1.0530633926391602}, +{1.3276840448379517, 3.1720073223114014, 0.9459338784217834}, +{1.4405512809753418, 0.22057858109474182, 1.2394150495529175}, +{1.5011661052703857, 0.22723539173603058, 1.1656326055526733}, +{1.4037399291992188, 0.13250690698623657, 1.2322998046875}, +{0.6938831210136414, 3.0959079265594482, 0.9539066553115845}, +{0.7160560488700867, 3.0049431324005127, 0.9340046048164368}, +{0.6532188057899475, 3.128743886947632, 0.8737160563468933}, +{1.8175615072250366, 0.083229660987854, 0.5782377123832703}, +{1.7971991300582886, -6.4574123825877905e-06, 0.6208925843238831}, +{1.7322354316711426, 0.12386228144168854, 0.5630471706390381}, +{2.5147364139556885, 1.4678919315338135, 1.7451845407485962}, +{2.545064926147461, 1.5410585403442383, 1.7989354133605957}, +{2.5557212829589844, 1.482236623764038, 1.6598803997039795}, +{0.35716113448143005, 0.9211186170578003, 0.3975023031234741}, +{0.344949334859848, 1.0125815868377686, 0.37205183506011963}, +{0.3806026875972748, 0.8765337467193604, 0.31610819697380066}, +{2.8512861728668213, 0.07091227173805237, 2.554825782775879}, +{2.9309067726135254, 0.022754792124032974, 2.5772690773010254}, +{2.795804262161255, 0.06294991821050644, 2.632418632507324}, +{2.2557268142700195, 2.783825397491455, 2.1817638874053955}, +{2.2502691745758057, 2.867589235305786, 2.2277655601501465}, +{2.3496055603027344, 2.766803741455078, 2.174058437347412}, +{0.31082209944725037, 0.30498000979423523, 1.25960111618042}, +{0.2880576550960541, 0.39498209953308105, 1.236283302307129}, +{0.360870361328125, 0.3131978511810303, 1.3407796621322632}, +{2.3044705390930176, 1.9559664726257324, 2.967146396636963}, +{2.359933614730835, 1.900213360786438, 3.0217151641845703}, +{2.293311834335327, 2.0360805988311768, 3.0183279514312744}, +{2.4771015644073486, 0.6123775243759155, 1.0003223419189453}, +{2.4713776111602783, 0.5334606766700745, 1.054189682006836}, +{2.4012720584869385, 0.607212483882904, 0.9421372413635254}, +{0.16561481356620789, 1.6472911834716797, 2.051210641860962}, +{0.194748654961586, 1.5569301843643188, 2.039027690887451}, +{0.07524245232343674, 1.647778034210205, 2.0196683406829834}, +{2.950254201889038, 1.306046962738037, 1.910911202430725}, +{3.0001564025878906, 1.231043815612793, 1.8785595893859863}, +{3.012965440750122, 1.3783628940582275, 1.910853385925293}, +{1.8310295343399048, 1.1139925718307495, 1.797382116317749}, +{1.74779212474823, 1.0722471475601196, 1.8195446729660034}, +{1.8707183599472046, 1.0555059909820557, 1.7328342199325562}, +{2.801873207092285, 2.539793014526367, 2.1578173637390137}, +{2.748495578765869, 2.5388383865356445, 2.0783679485321045}, +{2.8720946311950684, 2.4771625995635986, 2.1402480602264404}, +{0.661193311214447, 1.874762773513794, 1.2271000146865845}, +{0.6981114745140076, 1.9285236597061157, 1.1570348739624023}, +{0.7010902762413025, 1.908980131149292, 1.3070982694625854}, +{0.5927590727806091, 1.3653476238250732, 0.713557243347168}, +{0.5576704740524292, 1.4522260427474976, 0.7331342101097107}, +{0.5233411192893982, 1.322135329246521, 0.6637961864471436}, +{1.1863815784454346, 1.626682162284851, 2.404733180999756}, +{1.177891731262207, 1.7202141284942627, 2.423226833343506}, +{1.201583981513977, 1.5866260528564453, 2.4903292655944824}, +{2.0718026161193848, 0.771650493144989, 1.7626571655273438}, +{2.0364816188812256, 0.780539333820343, 1.6741374731063843}, +{2.1637611389160156, 0.7969037294387817, 1.7543991804122925}, +{2.798738479614258, 0.5442487001419067, 0.20436593890190125}, +{2.836435556411743, 0.528438150882721, 0.11781381815671921}, +{2.7051424980163574, 0.5558053255081177, 0.18797798454761505}, +{2.236642599105835, 1.3984397649765015, 1.7116683721542358}, +{2.2284083366394043, 1.3096364736557007, 1.746431589126587}, +{2.319204330444336, 1.4307321310043335, 1.7477669715881348}, +{1.497765302658081, 1.158639907836914, 2.0404093265533447}, +{1.5006245374679565, 1.2004451751708984, 2.1264700889587402}, +{1.4263007640838623, 1.0952932834625244, 2.0469157695770264}, +{2.466299295425415, 2.302445888519287, 2.4341375827789307}, +{2.498847484588623, 2.2126808166503906, 2.427417278289795}, +{2.4280030727386475, 2.320526599884033, 2.3482959270477295}, +{-0.05152200162410736, 1.062696099281311, 0.7945370078086853}, +{0.04185919836163521, 1.0431547164916992, 0.8023092746734619}, +{-0.054590992629528046, 1.1540493965148926, 0.7661208510398865}, +{2.8463196754455566, 1.4368997812271118, 0.9601662755012512}, +{2.8638689517974854, 1.4435756206512451, 0.8663058876991272}, +{2.8544111251831055, 1.3434945344924927, 0.9794614315032959}, +{0.5567076802253723, 2.87746524810791, 1.1425813436508179}, +{0.5594757795333862, 2.8258678913116455, 1.2231565713882446}, +{0.4681847095489502, 2.9138171672821045, 1.140447735786438}, +{1.8996596336364746, 2.665602445602417, 0.6745227575302124}, +{1.9883588552474976, 2.647071123123169, 0.6436786651611328}, +{1.8663806915283203, 2.7314794063568115, 0.6135714054107666}, +{1.0342601537704468, 2.787651538848877, 2.879570960998535}, +{0.9912102222442627, 2.872126817703247, 2.8664190769195557}, +{0.9764236807823181, 2.7244017124176025, 2.8369481563568115}, +{2.9584968090057373, 2.777714729309082, 1.1762768030166626}, +{3.0297720432281494, 2.7506508827209473, 1.2341532707214355}, +{2.8788814544677734, 2.7510645389556885, 1.2222492694854736}, +{0.36214572191238403, 1.3508403301239014, 2.4378461837768555}, +{0.44354385137557983, 1.341695785522461, 2.4873743057250977}, +{0.3496707081794739, 1.4453775882720947, 2.429514169692993}, +{0.6772602200508118, 1.6268908977508545, 1.7549970149993896}, +{0.7234126329421997, 1.561384677886963, 1.7026405334472656}, +{0.715678334236145, 1.6191571950912476, 1.8423271179199219}, +{0.21278807520866394, 0.9185108542442322, 2.927867889404297}, +{0.17083239555358887, 0.8717790246009827, 2.855630874633789}, +{0.16863778233528137, 1.003404974937439, 2.930327892303467}, +{2.0785555839538574, 0.30955904722213745, 2.2436463832855225}, +{2.113492727279663, 0.3151845335960388, 2.154707908630371}, +{2.046997308731079, 0.21951836347579956, 2.2513318061828613}, +{2.842121124267578, 3.0634350776672363, 0.011697090230882168}, +{2.833348274230957, 3.158165454864502, 0.0222551841288805}, +{2.799614429473877, 3.0266616344451904, 0.0891774594783783}, +{0.9101548790931702, 0.0011387780541554093, 0.5653003454208374}, +{0.8739038109779358, 0.08972769975662231, 0.5657222867012024}, +{0.9835611581802368, 0.005589697510004044, 0.5040302276611328}, +{2.947078227996826, 2.348034143447876, 0.9893786311149597}, +{2.9025049209594727, 2.2960641384124756, 1.0562714338302612}, +{2.878373622894287, 2.3701486587524414, 0.9265062808990479}, +{0.48287874460220337, 1.7877044677734375, 1.6677762269973755}, +{0.5700817108154297, 1.7495152950286865, 1.6777534484863281}, +{0.45264050364494324, 1.756415605545044, 1.5825179815292358}, +{1.3573102951049805, 1.2280439138412476, 1.014560341835022}, +{1.381641149520874, 1.2669349908828735, 1.0985711812973022}, +{1.2667906284332275, 1.2558624744415283, 1.0006088018417358}, +{2.2634613513946533, 1.1671197414398193, 0.3453117311000824}, +{2.232880115509033, 1.078407645225525, 0.36421331763267517}, +{2.1852054595947266, 1.2136396169662476, 0.3157438635826111}, +{1.3057568073272705, 0.5053162574768066, 0.05078320577740669}, +{1.2326701879501343, 0.49758538603782654, -0.01054295152425766}, +{1.2729456424713135, 0.5626673102378845, 0.12004067748785019}, +{1.199514627456665, 2.781466007232666, 0.4396744966506958}, +{1.2229657173156738, 2.738694667816162, 0.5220333337783813}, +{1.2325541973114014, 2.722565174102783, 0.3718409538269043}, +{0.4144238233566284, 0.3019675016403198, 1.5263025760650635}, +{0.47555336356163025, 0.2471521496772766, 1.575503945350647}, +{0.3469020426273346, 0.3255820572376251, 1.5899066925048828}, +{0.19255274534225464, 2.8040974140167236, 2.1009631156921387}, +{0.2653144598007202, 2.8515372276306152, 2.141181230545044}, +{0.19416464865207672, 2.8311314582824707, 2.0091540813446045}, +{2.8810462951660156, 0.17110998928546906, 0.993865430355072}, +{2.9101195335388184, 0.09446097165346146, 0.9444490075111389}, +{2.9606211185455322, 0.2045050859451294, 1.035277009010315}, +{1.7728955745697021, 1.3068957328796387, 2.6784346103668213}, +{1.7892670631408691, 1.364207148551941, 2.7533326148986816}, +{1.736156940460205, 1.3647348880767822, 2.6115972995758057}, +{0.17994630336761475, 0.6975128650665283, 1.8075947761535645}, +{0.24720460176467896, 0.7528495192527771, 1.8472999334335327}, +{0.1695537269115448, 0.7322711944580078, 1.7190160751342773}, +{0.2845391631126404, 1.483776330947876, 0.5608519911766052}, +{0.21590101718902588, 1.4344162940979004, 0.6057374477386475}, +{0.249481201171875, 1.4992027282714844, 0.4731292128562927}, +{1.9069756269454956, 1.1287713050842285, 0.35530731081962585}, +{1.8189572095870972, 1.1500980854034424, 0.3243195414543152}, +{1.9024487733840942, 1.1404705047607422, 0.45020174980163574}, +{1.6373333930969238, 0.9414364695549011, 2.0925164222717285}, +{1.611586570739746, 0.9309213161468506, 2.1841070652008057}, +{1.6047953367233276, 1.028135895729065, 2.0682923793792725}, +{0.8088748455047607, 1.043460726737976, 1.6893421411514282}, +{0.862282931804657, 1.1228362321853638, 1.6924093961715698}, +{0.7248701453208923, 1.0724742412567139, 1.6537928581237793}, +{0.01798328012228012, 1.9536991119384766, 2.9691011905670166}, +{-0.017552364617586136, 2.0026581287384033, 2.8949217796325684}, +{-0.03677498549222946, 1.9794825315475464, 3.0432567596435547}, +{0.8342364430427551, 1.489781141281128, 0.10114672780036926}, +{0.9283488392829895, 1.4883474111557007, 0.08373647183179855}, +{0.7937785983085632, 1.4848123788833618, 0.014539593830704689}, +{0.46452924609184265, 2.9892799854278564, 0.496116578578949}, +{0.3727685213088989, 2.963956117630005, 0.5061658024787903}, +{0.5126032829284668, 2.927455425262451, 0.551152229309082}, +{2.1534335613250732, 2.3115761280059814, 1.4523578882217407}, +{2.1564462184906006, 2.397819995880127, 1.4937732219696045}, +{2.238922357559204, 2.272909641265869, 1.4713023900985718}, +{2.681487560272217, 2.096545457839966, 1.7067052125930786}, +{2.6704163551330566, 2.0446295738220215, 1.6270530223846436}, +{2.65510892868042, 2.1850335597991943, 1.6814793348312378}, +{2.5563406944274902, 1.196728229522705, 1.8314199447631836}, +{2.6109507083892822, 1.2139859199523926, 1.9081156253814697}, +{2.535081148147583, 1.2835313081741333, 1.797133207321167}, +{0.07747702300548553, 1.3632346391677856, 1.4129936695098877}, +{0.07000987231731415, 1.3852028846740723, 1.5058588981628418}, +{0.04503362998366356, 1.273383378982544, 1.4069527387619019}, +{0.00023112382041290402, 1.6491178274154663, 2.892383098602295}, +{-0.07728538662195206, 1.6123508214950562, 2.8499367237091064}, +{0.026301728561520576, 1.7218055725097656, 2.835822105407715}, +{0.6321677565574646, 0.6863853931427002, 1.341518759727478}, +{0.6796731948852539, 0.661327064037323, 1.2622872591018677}, +{0.6521034836769104, 0.6169854998588562, 1.4043561220169067}, +{2.301466464996338, 0.07809491455554962, 2.5356369018554688}, +{2.3584015369415283, 0.08812659233808517, 2.611926317214966}, +{2.2300665378570557, 0.1400357186794281, 2.550726890563965}, +{1.000779151916504, 0.4523647129535675, 2.4546313285827637}, +{0.9534361958503723, 0.36972540616989136, 2.464207887649536}, +{0.9384230971336365, 0.5108391642570496, 2.4115641117095947}, +{2.4797375202178955, 2.1219987869262695, 1.0553946495056152}, +{2.4430878162384033, 2.0593509674072266, 1.1177994012832642}, +{2.4082753658294678, 2.183333158493042, 1.03826105594635}, +{1.5957164764404297, 1.4485647678375244, 1.2143878936767578}, +{1.5219953060150146, 1.3917179107666016, 1.236657738685608}, +{1.6542481184005737, 1.392877459526062, 1.1630529165267944}, +{2.0704739093780518, 0.39332544803619385, 1.7145309448242188}, +{2.0296554565429688, 0.4737957715988159, 1.7464792728424072}, +{2.005387544631958, 0.355221688747406, 1.6555886268615723}, +{2.272663116455078, 1.2250715494155884, 0.7861461043357849}, +{2.217592239379883, 1.2381706237792969, 0.7089585065841675}, +{2.356489419937134, 1.1951175928115845, 0.7509572505950928}, +{1.5823029279708862, 1.7528667449951172, 2.1674370765686035}, +{1.5454761981964111, 1.667158842086792, 2.1459834575653076}, +{1.5856636762619019, 1.7542293071746826, 2.2630884647369385}, +{1.4877575635910034, 2.1009154319763184, 2.8421566486358643}, +{1.463749885559082, 2.1348659992218018, 2.928373098373413}, +{1.5094118118286133, 2.178814172744751, 2.7909200191497803}, +{3.032632827758789, 1.8669272661209106, 1.468990445137024}, +{3.065131425857544, 1.9272427558898926, 1.5358349084854126}, +{3.109708070755005, 1.8457497358322144, 1.416329026222229}, +{3.1823318004608154, 1.5848089456558228, 0.0021703431848436594}, +{3.1098954677581787, 1.6466114521026611, 0.011956962756812572}, +{3.2028636932373047, 1.5865800380706787, -0.09130489081144333}, +{0.18936528265476227, 1.3525989055633545, 1.9940495491027832}, +{0.20373398065567017, 1.3422704935073853, 1.8999794721603394}, +{0.10175959765911102, 1.3905596733093262, 2.0008716583251953}, +{1.374974250793457, 2.869913339614868, 2.4668996334075928}, +{1.3968944549560547, 2.938988447189331, 2.529433250427246}, +{1.3965460062026978, 2.788576602935791, 2.5125210285186768}, +{0.1846504509449005, 0.7160717844963074, 2.3964695930480957}, +{0.2722562253475189, 0.677589476108551, 2.3938891887664795}, +{0.1968008130788803, 0.8003799915313721, 2.440136671066284}, +{0.3585450351238251, 0.7200956344604492, 3.0777828693389893}, +{0.40791356563568115, 0.659324049949646, 3.0227203369140625}, +{0.32088884711265564, 0.7829949855804443, 3.0162360668182373}, +{0.14332590997219086, 1.348420262336731, 0.7797447443008423}, +{0.1606554239988327, 1.267846703529358, 0.8284264802932739}, +{0.14988887310028076, 1.4178799390792847, 0.8452779650688171}, +{0.8285697102546692, 2.616565465927124, 1.9633513689041138}, +{0.7908585667610168, 2.534273386001587, 1.9322352409362793}, +{0.9085254669189453, 2.6272671222686768, 1.9118257761001587}, +{3.0426018238067627, 2.889446973800659, 1.8867155313491821}, +{2.999969959259033, 2.9292068481445312, 1.810794472694397}, +{3.004227876663208, 2.9344048500061035, 1.9620052576065063}, +{2.0648880004882812, 0.150638148188591, 0.5552582740783691}, +{1.9775590896606445, 0.11610138416290283, 0.5737831592559814}, +{2.0818445682525635, 0.12545272707939148, 0.4644811153411865}, +{0.19922713935375214, 0.49330785870552063, 2.204051971435547}, +{0.13627128303050995, 0.5648482441902161, 2.1950600147247314}, +{0.2661352753639221, 0.5275879502296448, 2.263301372528076}, +{2.6038506031036377, 2.5503346920013428, 2.3756747245788574}, +{2.691714286804199, 2.5393214225769043, 2.3393287658691406}, +{2.5732858180999756, 2.461089611053467, 2.3919060230255127}, +{2.7420170307159424, 1.4353866577148438, 2.6873786449432373}, +{2.814754009246826, 1.3911012411117554, 2.6436703205108643}, +{2.783344030380249, 1.485990285873413, 2.757333517074585}, +{0.2253441959619522, 0.08578494191169739, 2.4158358573913574}, +{0.17961469292640686, 0.11829063296318054, 2.338282585144043}, +{0.1697542369365692, 0.015051456168293953, 2.448529005050659}, +{1.694874882698059, 2.3261446952819824, 0.8644862174987793}, +{1.759108304977417, 2.2553701400756836, 0.8697152137756348}, +{1.7318826913833618, 2.3961031436920166, 0.9183244705200195}, +{3.1528677940368652, 2.0429160594940186, 2.0796594619750977}, +{3.0719380378723145, 1.998387098312378, 2.0545623302459717}, +{3.1307663917541504, 2.0889339447021484, 2.160629987716675}, +{2.699347972869873, 0.26021817326545715, 1.3602832555770874}, +{2.624948024749756, 0.24672244489192963, 1.3015908002853394}, +{2.7715206146240234, 0.2844826281070709, 1.3022774457931519}, +{2.5928118228912354, 1.5281562805175781, 1.4728641510009766}, +{2.6638240814208984, 1.554954171180725, 1.4145421981811523}, +{2.587416887283325, 1.4332103729248047, 1.4619790315628052}, +{2.2557568550109863, 2.8381714820861816, 0.5022435784339905}, +{2.291447639465332, 2.8863911628723145, 0.42765581607818604}, +{2.207345962524414, 2.7655789852142334, 0.4628858268260956}, +{0.9021554589271545, 1.924246907234192, 0.9145355820655823}, +{0.9019705057144165, 1.9462263584136963, 0.8213734030723572}, +{0.9942951798439026, 1.92887544631958, 0.9400534629821777}, +{2.8288145065307617, 2.657306671142578, 0.15076103806495667}, +{2.879854917526245, 2.7319583892822266, 0.11938740313053131}, +{2.7662155628204346, 2.6953024864196777, 0.21240516006946564}, +{0.34271830320358276, 1.8967483043670654, 2.41497802734375}, +{0.42336970567703247, 1.9464402198791504, 2.401252508163452}, +{0.2849164605140686, 1.924831509590149, 2.3440370559692383}, +{0.21781358122825623, 2.3999249935150146, 0.8904587626457214}, +{0.18250584602355957, 2.3128199577331543, 0.9085795283317566}, +{0.3026196360588074, 2.3833067417144775, 0.8492995500564575}, +{2.150834083557129, 2.273799419403076, 2.805323362350464}, +{2.210484504699707, 2.3436203002929688, 2.832326889038086}, +{2.0913984775543213, 2.263023853302002, 2.879577159881592}, +{1.5648558139801025, 2.528231382369995, 1.1157335042953491}, +{1.5333313941955566, 2.6185872554779053, 1.113652229309082}, +{1.6581960916519165, 2.5358798503875732, 1.135517954826355}, +{2.2713100910186768, 2.4542503356933594, 2.048076629638672}, +{2.32574725151062, 2.5268020629882812, 2.017496347427368}, +{2.183305263519287, 2.4913599491119385, 2.0544283390045166}, +{0.6518973112106323, 0.6126875877380371, 2.0583345890045166}, +{0.5757554769515991, 0.6669446229934692, 2.078850507736206}, +{0.615988552570343, 0.5248902440071106, 2.04550838470459}, +{2.1913208961486816, 2.1537177562713623, 0.46242621541023254}, +{2.2832446098327637, 2.1795380115509033, 0.4691839814186096}, +{2.1610777378082275, 2.14886212348938, 0.5531129837036133}, +{2.360158681869507, 1.1436594724655151, 2.4817423820495605}, +{2.2973575592041016, 1.0735414028167725, 2.4643702507019043}, +{2.314312696456909, 1.223730206489563, 2.4562642574310303}, +{0.14432057738304138, 2.7690787315368652, 3.167529582977295}, +{0.10624833405017853, 2.6869711875915527, 3.19869327545166}, +{0.11575117707252502, 2.7756638526916504, 3.0764100551605225}, +{0.9290724396705627, 0.3567622900009155, 0.9807837605476379}, +{1.0180236101150513, 0.38146963715553284, 1.0060731172561646}, +{0.9081780314445496, 0.28194642066955566, 1.0367152690887451}, +{2.060565948486328, 1.2852122783660889, 2.6333532333374023}, +{2.113389730453491, 1.3560134172439575, 2.670219898223877}, +{1.9736926555633545, 1.2977651357650757, 2.6715340614318848}, +{2.44834566116333, 2.449526309967041, 2.6715457439422607}, +{2.471224784851074, 2.539968490600586, 2.6501197814941406}, +{2.4587178230285645, 2.4020211696624756, 2.5890958309173584}, +{3.025928258895874, 2.864806652069092, 3.215013027191162}, +{3.0948398113250732, 2.8320112228393555, 3.157238006591797}, +{2.9865238666534424, 2.9373257160186768, 3.166530132293701}, +{1.232385516166687, 0.25403597950935364, 0.12256062030792236}, +{1.2831445932388306, 0.33518579602241516, 0.12182248383760452}, +{1.1650820970535278, 0.267275333404541, 0.055797673761844635}, +{0.1246955469250679, 1.5042718648910522, 0.33226871490478516}, +{0.12147168815135956, 1.4397292137145996, 0.26165592670440674}, +{0.14827288687229156, 1.586210012435913, 0.2887650728225708}, +{0.5538745522499084, 0.6949213743209839, 1.0258396863937378}, +{0.5641947984695435, 0.652664065361023, 0.9405746459960938}, +{0.6400290727615356, 0.6874257326126099, 1.0668704509735107}, +{1.2890422344207764, 0.41750162839889526, 2.053809881210327}, +{1.2310142517089844, 0.3474992513656616, 2.083721876144409}, +{1.255805492401123, 0.4962296783924103, 2.0969319343566895}, +{1.801629662513733, 0.320627897977829, 1.1659727096557617}, +{1.851099967956543, 0.4024638533592224, 1.170201301574707}, +{1.8508727550506592, 0.2599870562553406, 1.2212910652160645}, +{0.7467064261436462, 0.7352943420410156, 2.5335147380828857}, +{0.8299787044525146, 0.7571872472763062, 2.5753328800201416}, +{0.7714253067970276, 0.6990818381309509, 2.4484269618988037}, +{1.7171502113342285, 0.12824589014053345, 1.4244050979614258}, +{1.6798509359359741, 0.04990655183792114, 1.4648281335830688}, +{1.6557101011276245, 0.15070709586143494, 1.3545271158218384}, +{2.2006466388702393, 0.5208346247673035, 1.1591356992721558}, +{2.2167484760284424, 0.45749130845069885, 1.0892022848129272}, +{2.2341158390045166, 0.4783458709716797, 1.2381093502044678}, +{1.0392907857894897, 1.189420461654663, 2.0274925231933594}, +{1.0833158493041992, 1.2743831872940063, 2.025160551071167}, +{1.087343692779541, 1.1358058452606201, 1.9644155502319336}, +{0.47412803769111633, 1.101845622062683, 1.8481214046478271}, +{0.4754180610179901, 1.1638697385787964, 1.9210163354873657}, +{0.5108520984649658, 1.1506987810134888, 1.774453043937683}, +{3.0375826358795166, 1.6139719486236572, 1.1016736030578613}, +{2.9533722400665283, 1.576915979385376, 1.1280887126922607}, +{3.1007614135742188, 1.5439603328704834, 1.1180789470672607}, +{0.7243713140487671, 0.4441218376159668, 1.488349199295044}, +{0.7420797944068909, 0.456531822681427, 1.5815945863723755}, +{0.6314579844474792, 0.4214494824409485, 1.4844251871109009}, +{2.686314821243286, 1.745945692062378, 3.020559072494507}, +{2.759376049041748, 1.767681360244751, 3.0784549713134766}, +{2.6161556243896484, 1.8053666353225708, 3.047189235687256}, +{1.366998553276062, 2.572283983230591, 2.858743906021118}, +{1.4462093114852905, 2.615570545196533, 2.8905911445617676}, +{1.3613680601119995, 2.597445011138916, 2.76656174659729}, +{2.755472421646118, 1.9811099767684937, 0.28391823172569275}, +{2.750744104385376, 2.048753023147583, 0.21635806560516357}, +{2.8244662284851074, 2.011134386062622, 0.3430851995944977}, +{2.9709808826446533, 1.580482840538025, 0.3784579932689667}, +{3.0503671169281006, 1.5270562171936035, 0.3760630190372467}, +{2.9104833602905273, 1.536167860031128, 0.3189724385738373}, +{0.259650319814682, 2.966261863708496, 1.1145726442337036}, +{0.2263483852148056, 2.9763569831848145, 1.0254020690917969}, +{0.28239092230796814, 3.0551490783691406, 1.1418533325195312}, +{2.226630210876465, 1.7618348598480225, 2.0681228637695312}, +{2.2115159034729004, 1.6675896644592285, 2.0609309673309326}, +{2.1421005725860596, 1.7976490259170532, 2.0952227115631104}, +{2.3225185871124268, 2.709132671356201, 1.6974290609359741}, +{2.397623300552368, 2.7133002281188965, 1.6382323503494263}, +{2.2953479290008545, 2.800292730331421, 1.708103060722351}, +{1.8814705610275269, 1.2980806827545166, 0.975227952003479}, +{1.9125871658325195, 1.2575252056121826, 0.8942999839782715}, +{1.8938660621643066, 1.3919636011123657, 0.9612752795219421}, +{0.5914955735206604, 0.640208899974823, 0.7566893100738525}, +{0.6262878179550171, 0.640988826751709, 0.6675196886062622}, +{0.5292510390281677, 0.7128978967666626, 0.7587491273880005}, +{1.9094833135604858, 2.029297351837158, 2.836505174636841}, +{1.9385145902633667, 2.082029342651367, 2.910928726196289}, +{1.9857709407806396, 1.9762427806854248, 2.813533067703247}, +{1.8228161334991455, 1.5894678831100464, 0.5091588497161865}, +{1.823913812637329, 1.639997124671936, 0.4278698265552521}, +{1.7450485229492188, 1.5341320037841797, 0.5019150972366333}, +{1.4618765115737915, 1.0033977031707764, 1.1753429174423218}, +{1.3780605792999268, 0.9573081135749817, 1.1717420816421509}, +{1.4656363725662231, 1.0527055263519287, 1.093386173248291}, +{1.2437399625778198, 2.1987152099609375, 1.9109489917755127}, +{1.1508013010025024, 2.180622100830078, 1.8969004154205322}, +{1.2504377365112305, 2.2184884548187256, 2.0043647289276123}, +{2.6822142601013184, 0.5878829956054688, 2.640638828277588}, +{2.740079164505005, 0.5262743830680847, 2.6855647563934326}, +{2.7340404987335205, 0.6679635643959045, 2.6326727867126465}, +{1.1220442056655884, 2.471928119659424, 2.9240264892578125}, +{1.115898609161377, 2.519381284713745, 3.0069284439086914}, +{1.2152246236801147, 2.473806142807007, 2.9022042751312256}, +{2.511427402496338, 0.4921223521232605, 1.7106395959854126}, +{2.460402727127075, 0.5362971425056458, 1.6427617073059082}, +{2.5988879203796387, 0.5303700566291809, 1.7035616636276245}, +{1.2340580224990845, 2.479099750518799, 1.5508092641830444}, +{1.237694263458252, 2.5258357524871826, 1.6342648267745972}, +{1.32562255859375, 2.4700307846069336, 1.5244275331497192}, +{0.8421373963356018, 1.6072919368743896, 1.9747627973556519}, +{0.8295000791549683, 1.7019400596618652, 1.9814236164093018}, +{0.8806126713752747, 1.5822948217391968, 2.058769464492798}, +{0.5729889869689941, 0.05898355320096016, 1.192214012145996}, +{0.5985503196716309, -0.008821791969239712, 1.1296731233596802}, +{0.6430700421333313, 0.059077102690935135, 1.257413387298584}, +{1.8398905992507935, 0.1143871396780014, 3.084487199783325}, +{1.8437520265579224, 0.10748403519392014, 3.179879903793335}, +{1.89112389087677, 0.03991926833987236, 3.0529911518096924}, +{1.147913932800293, 2.0321898460388184, 0.05557972192764282}, +{1.2002732753753662, 1.9709528684616089, 0.0038995379582047462}, +{1.077168345451355, 2.058730363845825, -0.0031824475154280663}, +{1.2972712516784668, 0.08600122481584549, 2.3650918006896973}, +{1.3152186870574951, 0.01566341519355774, 2.302699565887451}, +{1.3623112440109253, 0.15322360396385193, 2.3447630405426025}, +{1.6844236850738525, 1.1289372444152832, 0.9812694191932678}, +{1.7673999071121216, 1.1766548156738281, 0.9807288646697998}, +{1.6218329668045044, 1.1892772912979126, 0.9412218928337097}, +{1.5794605016708374, 3.094217538833618, 1.1551467180252075}, +{1.5573407411575317, 3.035944700241089, 1.2277919054031372}, +{1.4972715377807617, 3.1051230430603027, 1.1073099374771118}, +{2.1861538887023926, 1.6078869104385376, 2.904968738555908}, +{2.2778360843658447, 1.6198885440826416, 2.880216598510742}, +{2.141199827194214, 1.5899550914764404, 2.8223862648010254}, +{2.7045321464538574, 2.27231764793396, 2.774930000305176}, +{2.6194519996643066, 2.3072617053985596, 2.7484238147735596}, +{2.738774061203003, 2.230254888534546, 2.6960597038269043}, +{1.719480276107788, 2.354815721511841, 2.8215248584747314}, +{1.7280172109603882, 2.2755801677703857, 2.7685043811798096}, +{1.627533197402954, 2.3798599243164062, 2.8125336170196533}, +{2.367684841156006, 1.3602468967437744, 2.18398380279541}, +{2.3447039127349854, 1.2696770429611206, 2.1632161140441895}, +{2.2845864295959473, 1.4075795412063599, 2.179908514022827}, +{0.9227069020271301, 3.0629329681396484, 2.920711040496826}, +{0.9071148633956909, 3.1541407108306885, 2.8962082862854004}, +{0.850328803062439, 3.0412073135375977, 2.9794623851776123}, +{0.6976985335350037, 2.033371925354004, 3.0797975063323975}, +{0.6234859824180603, 2.086975336074829, 3.107752799987793}, +{0.7636806964874268, 2.046435594558716, 3.1479005813598633}, +{2.7760136127471924, 0.7177324295043945, 2.929643154144287}, +{2.759448289871216, 0.8005865812301636, 2.884664297103882}, +{2.716449022293091, 0.7188254594802856, 3.0045642852783203}, +{0.09588933736085892, 1.1573524475097656, 2.2234115600585938}, +{0.13533562421798706, 1.0708454847335815, 2.212327241897583}, +{0.12518830597400665, 1.2070050239562988, 2.147001266479492}, +{2.437969446182251, 1.1477789878845215, 1.4444700479507446}, +{2.501270294189453, 1.1776361465454102, 1.3791717290878296}, +{2.362649440765381, 1.1184914112091064, 1.393172264099121}, +{1.0726394653320312, 1.1797341108322144, 1.146470308303833}, +{1.097736120223999, 1.2709776163101196, 1.1608614921569824}, +{0.9876174330711365, 1.1711900234222412, 1.1896045207977295}, +{0.7128943204879761, 2.540372371673584, 3.036193370819092}, +{0.6819897890090942, 2.623995304107666, 3.0710418224334717}, +{0.6391283869743347, 2.480607271194458, 3.048401117324829}, +{2.363692045211792, 0.8960049152374268, 0.06538370251655579}, +{2.3013648986816406, 0.9511116743087769, 0.018045678734779358}, +{2.3125064373016357, 0.8197994828224182, 0.09249580651521683}, +{1.1470179557800293, 0.18226170539855957, 2.6975038051605225}, +{1.1380001306533813, 0.09101834148168564, 2.6700148582458496}, +{1.0570729970932007, 0.2124711275100708, 2.7101380825042725}, +{1.0098944902420044, 0.8557901978492737, 0.6454586386680603}, +{0.9685741662979126, 0.810502290725708, 0.5719470381736755}, +{1.0196880102157593, 0.9461609721183777, 0.6154665350914001}, +{3.0438435077667236, 2.419563055038452, 3.0350117683410645}, +{2.987426280975342, 2.346905469894409, 3.0085487365722656}, +{2.99235463142395, 2.4979984760284424, 3.016062021255493}, +{2.2603306770324707, 1.4899885654449463, 2.5069267749786377}, +{2.3271772861480713, 1.4481545686721802, 2.561183452606201}, +{2.2886974811553955, 1.581146478652954, 2.500009059906006}, +{0.256063848733902, 0.12630923092365265, 2.0174314975738525}, +{0.2048637866973877, 0.08618900924921036, 1.9472086429595947}, +{0.19242829084396362, 0.1777721643447876, 2.0670742988586426}, +{2.127903461456299, 0.844255805015564, 2.1332273483276367}, +{2.218562364578247, 0.8670089840888977, 2.1538562774658203}, +{2.0915687084198, 0.9237144589424133, 2.0941321849823}, +{0.059971172362565994, 0.7765003442764282, 0.4359748959541321}, +{-0.0014215006958693266, 0.7611851096153259, 0.3641507923603058}, +{0.13367903232574463, 0.821961522102356, 0.3951979875564575}, +{0.5787862539291382, 2.0721020698547363, 2.1339287757873535}, +{0.5507448315620422, 2.010061502456665, 2.066645860671997}, +{0.565220832824707, 2.1581687927246094, 2.0942955017089844}, +{1.3857461214065552, 0.9888049364089966, 2.347843885421753}, +{1.4729350805282593, 0.9930126667022705, 2.3871212005615234}, +{1.3294495344161987, 0.9559887051582336, 2.417958974838257}, +{2.917109251022339, 1.9676438570022583, 1.8443000316619873}, +{2.9830360412597656, 2.0157055854797363, 1.7942397594451904}, +{2.836348533630371, 2.0174098014831543, 1.831518292427063}, +{1.0118695497512817, 2.1923446655273438, 3.019869327545166}, +{1.018575668334961, 2.2599363327026367, 2.952425003051758}, +{1.0150375366210938, 2.240560531616211, 3.1024980545043945}, +{0.24392694234848022, 2.216057300567627, 0.1672898232936859}, +{0.23583215475082397, 2.2991952896118164, 0.120547354221344}, +{0.1545364111661911, 2.1820719242095947, 0.17137038707733154}, +{1.4736664295196533, 0.7857916951179504, 3.071483850479126}, +{1.5249391794204712, 0.7396061420440674, 3.0051491260528564}, +{1.4160819053649902, 0.7187355160713196, 3.1082236766815186}, +{2.110098123550415, 0.7623801827430725, 0.5305149555206299}, +{2.1184380054473877, 0.8157433271408081, 0.45148876309394836}, +{2.087277889251709, 0.824884831905365, 0.5993242859840393}, +{2.5749471187591553, 3.14057993888855, 0.29097554087638855}, +{2.572777032852173, 3.22501277923584, 0.24593433737754822}, +{2.500701427459717, 3.0922093391418457, 0.2547791600227356}, +{2.5246782302856445, 1.2548513412475586, 1.1723603010177612}, +{2.5970261096954346, 1.2442210912704468, 1.2341266870498657}, +{2.5224030017852783, 1.1724395751953125, 1.1237244606018066}, +{0.5722611546516418, 1.1459304094314575, 1.5928142070770264}, +{0.4871481955051422, 1.1498385667800903, 1.5491929054260254}, +{0.6117590069770813, 1.2314784526824951, 1.5759685039520264}, +{2.887186288833618, 3.0946543216705322, 2.8720836639404297}, +{2.8075525760650635, 3.144352436065674, 2.853351354598999}, +{2.920712947845459, 3.1328232288360596, 2.953209400177002}, +{2.010073661804199, 1.6767914295196533, 2.5989904403686523}, +{2.0461626052856445, 1.7454713582992554, 2.655052661895752}, +{2.079514980316162, 1.6586103439331055, 2.53566837310791}, +{3.0481719970703125, 0.692048966884613, 1.8055673837661743}, +{3.1422111988067627, 0.6891059875488281, 1.823181390762329}, +{3.041680097579956, 0.7230991125106812, 1.7152564525604248}, +{1.8893216848373413, 0.5165960192680359, 2.283776044845581}, +{1.892685055732727, 0.42163610458374023, 2.272216558456421}, +{1.9791916608810425, 0.541262686252594, 2.305622100830078}, +{0.09495751559734344, 1.620086908340454, 1.554903507232666}, +{-0.0005408352008089423, 1.613598108291626, 1.554375171661377}, +{0.11414593458175659, 1.695534348487854, 1.4992095232009888}, +{1.3405418395996094, 2.90923810005188, 0.7606507539749146}, +{1.3353252410888672, 2.9799962043762207, 0.8249033689498901}, +{1.2666839361190796, 2.8521547317504883, 0.781836211681366}, +{0.0003356743836775422, 2.674506425857544, 1.3369636535644531}, +{-0.004367394372820854, 2.579805612564087, 1.3238511085510254}, +{0.0318806990981102, 2.684715747833252, 1.4267579317092896}, +{2.8477232456207275, 2.0565643310546875, 2.33577299118042}, +{2.9358136653900146, 2.092768907546997, 2.3262009620666504}, +{2.8600244522094727, 1.961808204650879, 2.330090284347534}, +{0.10791847109794617, 2.469700336456299, 0.38294121623039246}, +{0.18794161081314087, 2.5185928344726562, 0.4021279215812683}, +{0.0553901381790638, 2.4775326251983643, 0.46257632970809937}, +{2.7784059047698975, 1.117234468460083, 0.6736971735954285}, +{2.8302712440490723, 1.071582317352295, 0.6074536442756653}, +{2.8172192573547363, 1.2046010494232178, 0.678485631942749}, +{1.6381571292877197, 0.8633572459220886, 0.9453138709068298}, +{1.5486814975738525, 0.8530383706092834, 0.977716863155365}, +{1.6603020429611206, 0.9544368982315063, 0.9647153615951538}, +{1.3656713962554932, 1.3733508586883545, 2.5419275760650635}, +{1.4053806066513062, 1.446098804473877, 2.589815378189087}, +{1.2921749353408813, 1.3458677530288696, 2.596747875213623}, +{2.416635036468506, 2.2360849380493164, 1.4807003736495972}, +{2.4522645473480225, 2.2619502544403076, 1.565693736076355}, +{2.48410701751709, 2.1799347400665283, 1.4425296783447266}, +{2.670308828353882, 3.1516873836517334, 0.6519923210144043}, +{2.695936441421509, 3.1266252994537354, 0.5632373690605164}, +{2.5953564643859863, 3.0956194400787354, 0.6720131039619446}, +{3.0842714309692383, 1.252716064453125, 1.1255218982696533}, +{3.030465841293335, 1.2468376159667969, 1.0465742349624634}, +{3.0304462909698486, 1.2133268117904663, 1.1941779851913452}, +{3.114250659942627, 0.6199703812599182, 2.188124656677246}, +{3.0627527236938477, 0.5742459297180176, 2.1216447353363037}, +{3.0515520572662354, 0.6394549608230591, 2.257777690887451}, +{3.000653028488159, 0.7036073207855225, 2.743915319442749}, +{2.9809370040893555, 0.6161613464355469, 2.7103471755981445}, +{2.957587480545044, 0.7067411541938782, 2.829342842102051}, +{2.9775524139404297, 2.3595497608184814, 2.5986111164093018}, +{2.9040653705596924, 2.3000354766845703, 2.5837783813476562}, +{2.9469058513641357, 2.4188055992126465, 2.6672542095184326}, +{0.6647849082946777, 1.5040805339813232, 2.330498695373535}, +{0.6067756414413452, 1.447788953781128, 2.381767511367798}, +{0.6834665536880493, 1.5781222581863403, 2.3882148265838623}, +{0.6018164157867432, 0.35968461632728577, 2.5110650062561035}, +{0.5483189225196838, 0.2886596620082855, 2.546502113342285}, +{0.6671817302703857, 0.3156333267688751, 2.456758499145508}, +{2.177304744720459, 2.9740054607391357, 1.3770592212677002}, +{2.2043943405151367, 2.8887617588043213, 1.411147117614746}, +{2.236924648284912, 3.0364036560058594, 1.418462872505188}, +{1.0403386354446411, 0.4655117988586426, 0.7507758736610413}, +{1.0092898607254028, 0.39618682861328125, 0.8090196847915649}, +{0.9955247640609741, 0.5443633794784546, 0.7813776135444641}, +{2.12387752532959, 0.295818954706192, 1.9682918787002563}, +{2.0767264366149902, 0.3423316478729248, 1.8991857767105103}, +{2.20859432220459, 0.3400765359401703, 1.9734529256820679}, +{2.6962382793426514, 1.8950618505477905, 2.019907236099243}, +{2.7816641330718994, 1.871878981590271, 1.9834754467010498}, +{2.6942265033721924, 1.990723729133606, 2.017245292663574}, +{1.4437828063964844, 1.2665866613388062, 2.296445369720459}, +{1.411987066268921, 1.1809272766113281, 2.3249731063842773}, +{1.4018092155456543, 1.3287391662597656, 2.3559229373931885}, +{2.3210573196411133, 2.932859420776367, 2.5651090145111084}, +{2.2303884029388428, 2.958430528640747, 2.5481510162353516}, +{2.3702750205993652, 3.0148420333862305, 2.560774087905884}, +{2.663916826248169, 2.88663911819458, 3.000671625137329}, +{2.637239694595337, 2.897059202194214, 2.909336805343628}, +{2.6852869987487793, 2.9753289222717285, 3.029649496078491}, +{2.9820995330810547, 2.0651543140411377, 0.4562282860279083}, +{2.9812090396881104, 2.110527515411377, 0.5405063629150391}, +{3.0403225421905518, 2.117698907852173, 0.4013517200946808}, +{1.452629804611206, 2.34951114654541, 2.748049020767212}, +{1.401674747467041, 2.4244818687438965, 2.778794527053833}, +{1.4586488008499146, 2.3618698120117188, 2.6533212661743164}, +{2.42293119430542, 3.095752239227295, -0.026507234200835228}, +{2.3388149738311768, 3.133366823196411, -0.0005859397351741791}, +{2.488077402114868, 3.149183511734009, 0.01891748420894146}, +{3.1283440589904785, 2.2192580699920654, 0.26656463742256165}, +{3.064610242843628, 2.2888343334198, 0.25045713782310486}, +{3.203141212463379, 2.2639877796173096, 0.30614960193634033}, +{1.4574517011642456, 2.8518149852752686, 2.187943696975708}, +{1.5477806329727173, 2.8447763919830322, 2.2188220024108887}, +{1.4048258066177368, 2.852898359298706, 2.2678914070129395}, +{0.6730559468269348, 2.4657208919525146, 1.1230354309082031}, +{0.59139484167099, 2.5112690925598145, 1.1025623083114624}, +{0.7077674269676208, 2.4393203258514404, 1.0378271341323853}, +{2.2801032066345215, 0.5179218649864197, 0.817458987236023}, +{2.33445143699646, 0.44046705961227417, 0.831927478313446}, +{2.203479766845703, 0.48498237133026123, 0.7704889178276062}, +{1.5111502408981323, 1.9572813510894775, 0.3087153434753418}, +{1.5132012367248535, 1.8701330423355103, 0.3482537567615509}, +{1.515472412109375, 1.9409449100494385, 0.21449881792068481}, +{1.3245924711227417, 2.8095860481262207, 1.1696538925170898}, +{1.2623074054718018, 2.7762765884399414, 1.2342554330825806}, +{1.278408169746399, 2.8816416263580322, 1.1267900466918945}, +{1.02211594581604, 0.5506346821784973, 0.2999337315559387}, +{0.935440719127655, 0.5158007144927979, 0.3208220601081848}, +{1.0126450061798096, 0.6454525589942932, 0.30899983644485474}, +{2.544755697250366, 2.775782346725464, 0.0774732157588005}, +{2.630209445953369, 2.7875213623046875, 0.11897242814302444}, +{2.54644775390625, 2.8347232341766357, 0.002071536146104336}, +{0.3642171621322632, 0.43323439359664917, 0.5766662359237671}, +{0.37877196073532104, 0.5117748975753784, 0.523922860622406}, +{0.33383625745773315, 0.3675810396671295, 0.5139847993850708}, +{0.8159968256950378, 2.541785717010498, 2.2942893505096436}, +{0.7407695055007935, 2.485867977142334, 2.274888753890991}, +{0.8727016448974609, 2.53308367729187, 2.217665910720825}, +{1.4832344055175781, 0.4825277626514435, 0.5389578342437744}, +{1.4260029792785645, 0.5134091973304749, 0.6091946363449097}, +{1.4236729145050049, 0.46144720911979675, 0.4670525789260864}, +{0.9770771861076355, 2.628633499145508, 0.26167964935302734}, +{0.9602023959159851, 2.7063241004943848, 0.3149874210357666}, +{0.9748766422271729, 2.660548210144043, 0.17146363854408264}, +{1.089897632598877, 2.779128313064575, 0.76585453748703}, +{1.072324275970459, 2.8727073669433594, 0.7560343742370605}, +{1.0058497190475464, 2.736966609954834, 0.7479473352432251}, +{2.879535675048828, 0.5107750296592712, 3.0832359790802}, +{2.9626011848449707, 0.4994831085205078, 3.0370309352874756}, +{2.81886625289917, 0.5420693755149841, 3.0161375999450684}, +{2.4942424297332764, 2.70080828666687, 2.5837926864624023}, +{2.540769338607788, 2.666606903076172, 2.5074527263641357}, +{2.4357566833496094, 2.767706871032715, 2.5482072830200195}, +{3.1235737800598145, 1.8643254041671753, 0.6594033241271973}, +{3.096454381942749, 1.8768742084503174, 0.7503395080566406}, +{3.1796789169311523, 1.9395506381988525, 0.6405432820320129}, +{0.799936056137085, 0.5955273509025574, 1.1197279691696167}, +{0.8678464889526367, 0.6167960166931152, 1.055711269378662}, +{0.8113289475440979, 0.5019882321357727, 1.136549472808838}, +{2.0642447471618652, 0.19571556150913239, 0.25322094559669495}, +{2.042595624923706, 0.28829333186149597, 0.2643110454082489}, +{1.982726812362671, 0.15547876060009003, 0.22325150668621063}, +{1.813162088394165, 2.1354050636291504, 1.7113043069839478}, +{1.9007818698883057, 2.1309337615966797, 1.673027753829956}, +{1.8039900064468384, 2.053382635116577, 1.7597861289978027}, +{0.5930308699607849, 1.5933010578155518, 0.436619371175766}, +{0.5138459205627441, 1.646278977394104, 0.4458608031272888}, +{0.5613736510276794, 1.5077872276306152, 0.40750718116760254}, +{0.48313742876052856, 1.7072612047195435, 2.172187089920044}, +{0.4095674157142639, 1.7669376134872437, 2.1859164237976074}, +{0.46448859572410583, 1.6327208280563354, 2.2292683124542236}, +{1.8837531805038452, 1.8499038219451904, 1.8371127843856812}, +{1.8043911457061768, 1.863534688949585, 1.8888638019561768}, +{1.952378749847412, 1.8951892852783203, 1.8861238956451416}, +{1.448570966720581, 1.796783447265625, 1.9107532501220703}, +{1.475306510925293, 1.7791658639907837, 2.0009593963623047}, +{1.361975908279419, 1.8367669582366943, 1.9188122749328613}, +{2.367842197418213, 0.1258554309606552, 0.42605873942375183}, +{2.3143649101257324, 0.19036224484443665, 0.47233372926712036}, +{2.4568381309509277, 0.14140698313713074, 0.4576842784881592}, +{1.2409899234771729, 0.8467521667480469, 1.1386542320251465}, +{1.1634069681167603, 0.8219119310379028, 1.1889152526855469}, +{1.2105096578598022, 0.8508344888687134, 1.048008680343628}, +{1.6009665727615356, 2.8020107746124268, 0.9428640007972717}, +{1.6411396265029907, 2.8872833251953125, 0.9262195825576782}, +{1.5332908630371094, 2.7938904762268066, 0.8756599426269531}, +{1.1257766485214233, 3.0832815170288086, 2.543233633041382}, +{1.193004846572876, 3.1325302124023438, 2.4961459636688232}, +{1.11188805103302, 3.004884719848633, 2.490097999572754}, +{0.5534301996231079, 2.577692747116089, 2.59504771232605}, +{0.6410675048828125, 2.5423812866210938, 2.57971453666687}, +{0.5681118965148926, 2.669900894165039, 2.6161296367645264}, +{2.4244000911712646, 1.8419780731201172, 0.543384313583374}, +{2.3551886081695557, 1.908098816871643, 0.5430365204811096}, +{2.3782875537872314, 1.7591052055358887, 0.5563471913337708}, +{0.7229244112968445, 2.2674901485443115, 1.3542582988739014}, +{0.7304412126541138, 2.217848539352417, 1.2727628946304321}, +{0.7730495929718018, 2.216625690460205, 1.4179967641830444}, +{0.31524232029914856, 0.572805643081665, 1.2185629606246948}, +{0.2452673316001892, 0.6169710159301758, 1.1704460382461548}, +{0.3905332088470459, 0.5758777856826782, 1.1595362424850464}, +{0.40593022108078003, 2.287105083465576, 0.7149090766906738}, +{0.48402950167655945, 2.3388566970825195, 0.7345203161239624}, +{0.3943357467651367, 2.296144962310791, 0.6203249096870422}, +{1.7557240724563599, 2.7402536869049072, 1.1823285818099976}, +{1.8153789043426514, 2.669018030166626, 1.205330491065979}, +{1.7423689365386963, 2.730800151824951, 1.088017463684082}, +{0.8023598194122314, 1.8781936168670654, 1.8975893259048462}, +{0.7178134918212891, 1.916629672050476, 1.9207607507705688}, +{0.8668285608291626, 1.942280650138855, 1.9275717735290527}, +{3.089510440826416, 0.9184054136276245, 2.425184726715088}, +{3.1363515853881836, 0.9106683731079102, 2.508301258087158}, +{3.1538569927215576, 0.8931192755699158, 2.3589847087860107}, +{2.38122820854187, 0.9038059115409851, 2.2391958236694336}, +{2.372511386871338, 0.8466134071350098, 2.3154542446136475}, +{2.4740123748779297, 0.9272563457489014, 2.237325429916382}, +{1.2054303884506226, 2.3923418521881104, 0.5146104693412781}, +{1.2117441892623901, 2.474375009536743, 0.5635290145874023}, +{1.2951143980026245, 2.358982563018799, 0.5121108889579773}, +{2.012112855911255, 2.6634185314178467, 1.4051809310913086}, +{1.9708213806152344, 2.578472375869751, 1.3896420001983643}, +{2.0071499347686768, 2.7082626819610596, 1.3207610845565796}, +{3.0815510749816895, 0.560925304889679, 1.3726810216903687}, +{3.067094087600708, 0.5030758380889893, 1.2978028059005737}, +{3.139864921569824, 0.511459231376648, 1.4302564859390259}, +{1.4279152154922485, 0.6545555591583252, 1.14520263671875}, +{1.3771697282791138, 0.7356482744216919, 1.1418581008911133}, +{1.4330915212631226, 0.6333673000335693, 1.2384045124053955}, +{1.9246424436569214, 2.754520893096924, 1.6424612998962402}, +{1.9490859508514404, 2.6736137866973877, 1.6873934268951416}, +{1.962489366531372, 2.7457103729248047, 1.5549838542938232}, +{0.7288158535957336, 1.7162761688232422, 3.005986213684082}, +{0.7238091230392456, 1.7974823713302612, 2.9555599689483643}, +{0.6621270775794983, 1.65973699092865, 2.9670217037200928}, +{1.905730128288269, 0.30854931473731995, 1.523366928100586}, +{1.89450204372406, 0.36788955330848694, 1.4491039514541626}, +{1.8622381687164307, 0.22771598398685455, 1.4962236881256104}, +{2.695164442062378, 1.3227448463439941, 0.1328517645597458}, +{2.654397487640381, 1.2902686595916748, 0.2131367027759552}, +{2.6959421634674072, 1.4179024696350098, 0.14318321645259857}, +{1.6175459623336792, 2.1251800060272217, 1.265407919883728}, +{1.6455658674240112, 2.151515007019043, 1.3530645370483398}, +{1.550526738166809, 2.1891849040985107, 1.2414473295211792}, +{1.6074750423431396, 1.368379831314087, 1.8982964754104614}, +{1.5839422941207886, 1.2809712886810303, 1.9294136762619019}, +{1.527007818222046, 1.4023245573043823, 1.8591164350509644}, +{1.6259528398513794, 0.3090572655200958, 0.9816831946372986}, +{1.6207960844039917, 0.4022742509841919, 0.9605569243431091}, +{1.6715340614318848, 0.30604830384254456, 1.0657998323440552}, +{1.2724807262420654, 2.666706085205078, 0.19732266664505005}, +{1.2298976182937622, 2.636719226837158, 0.11701223254203796}, +{1.28416907787323, 2.760843515396118, 0.18452203273773193}, +{2.710282325744629, 1.0311753749847412, 0.27759987115859985}, +{2.67348051071167, 1.0403485298156738, 0.1897147297859192}, +{2.657681703567505, 1.0899361371994019, 0.33184608817100525}, +{0.7468101978302002, 1.0464833974838257, 2.5401313304901123}, +{0.6961326599121094, 0.9659116268157959, 2.530017375946045}, +{0.7727055549621582, 1.0698398351669312, 2.4509897232055664}, +{1.8255354166030884, 0.9399771094322205, 1.5693780183792114}, +{1.8941261768341064, 0.8769306540489197, 1.5474063158035278}, +{1.831218957901001, 1.006446361541748, 1.5007351636886597}, +{2.8813438415527344, 2.9189226627349854, 2.492260456085205}, +{2.854875326156616, 2.8619296550750732, 2.420055866241455}, +{2.858222007751465, 3.0070536136627197, 2.462923765182495}, +{0.19401361048221588, 2.0032942295074463, 1.595664381980896}, +{0.2070751041173935, 1.944628119468689, 1.6701626777648926}, +{0.2775280177593231, 2.049128293991089, 1.5863416194915771}, +{0.8959425091743469, 1.7958253622055054, 1.642708659172058}, +{0.8347411155700684, 1.7698140144348145, 1.711557149887085}, +{0.9359958171844482, 1.8763645887374878, 1.6754419803619385}, +{2.891249179840088, 2.672226905822754, 2.9438118934631348}, +{2.824303150177002, 2.684185266494751, 3.0111734867095947}, +{2.87373948097229, 2.741468906402588, 2.8800837993621826}, +{1.3154287338256836, 2.161754608154297, 0.34227481484413147}, +{1.3748797178268433, 2.094468355178833, 0.30910173058509827}, +{1.3610917329788208, 2.2442643642425537, 0.3258625566959381}, +{0.7735501527786255, 0.4865395724773407, 0.38989830017089844}, +{0.7249590754508972, 0.5638760328292847, 0.4185391664505005}, +{0.7126884460449219, 0.439863383769989, 0.3326314091682434}, +{0.38753437995910645, 1.6119606494903564, 2.70685076713562}, +{0.38511422276496887, 1.7051972150802612, 2.7283778190612793}, +{0.3157811462879181, 1.599867582321167, 2.6446611881256104}, +{1.1905282735824585, 1.0351158380508423, 1.8407737016677856}, +{1.2417246103286743, 1.0172274112701416, 1.9196486473083496}, +{1.246447205543518, 1.092523455619812, 1.7884310483932495}, +{1.0302029848098755, 0.7929014563560486, 1.2771942615509033}, +{1.006916880607605, 0.808455228805542, 1.3687264919281006}, +{0.9619067311286926, 0.7342067956924438, 1.244746208190918}, +{0.8729746341705322, 0.7446132898330688, 0.10727706551551819}, +{0.897858738899231, 0.8333834409713745, 0.08152897655963898}, +{0.788536548614502, 0.7300782799720764, 0.06460080295801163}, +{2.7691445350646973, 0.777043342590332, 0.4101187586784363}, +{2.7229158878326416, 0.8529146909713745, 0.37449911236763}, +{2.844733238220215, 0.8142234683036804, 0.45557519793510437}, +{1.2350223064422607, 2.4518463611602783, 2.482487678527832}, +{1.251682162284851, 2.383296489715576, 2.4177908897399902}, +{1.139600157737732, 2.4564731121063232, 2.488449811935425}, +{2.8189632892608643, 2.837188720703125, 2.232013463973999}, +{2.7813963890075684, 2.753122091293335, 2.205862522125244}, +{2.9014155864715576, 2.8426434993743896, 2.1837003231048584}, +{1.14013671875, 2.66314435005188, 1.3358573913574219}, +{1.1448582410812378, 2.610546112060547, 1.4156912565231323}, +{1.0660090446472168, 2.62668514251709, 1.2875031232833862}, +{0.3330056071281433, -0.09019116312265396, 2.9084908962249756}, +{0.38153785467147827, -0.17024242877960205, 2.9284591674804688}, +{0.26322832703590393, -0.11858570575714111, 2.849438428878784}, +{1.402381181716919, 1.5201642513275146, 1.8120274543762207}, +{1.415051817893982, 1.6127378940582275, 1.832809567451477}, +{1.3412103652954102, 1.5202994346618652, 1.7384039163589478}, +{2.692054510116577, 1.8674921989440918, 1.2185213565826416}, +{2.7261698246002197, 1.9311606884002686, 1.1557137966156006}, +{2.672440528869629, 1.79002046585083, 1.1658360958099365}, +{1.1345983743667603, 1.0353386402130127, 0.9341931939125061}, +{1.0557630062103271, 1.061838984489441, 0.8868114352226257}, +{1.1180177927017212, 1.0614588260650635, 1.0247753858566284}, +{1.6271116733551025, 2.338740587234497, 0.12860894203186035}, +{1.7018834352493286, 2.2964346408843994, 0.17081934213638306}, +{1.5908983945846558, 2.3962132930755615, 0.19604632258415222}, +{0.7420777678489685, 2.895324945449829, 0.2274666279554367}, +{0.8292218446731567, 2.8852171897888184, 0.26575571298599243}, +{0.6832786202430725, 2.9006199836730957, 0.3028121292591095}, +{2.1499884128570557, 0.6068810224533081, 2.249272108078003}, +{2.117464542388916, 0.6848126649856567, 2.2042033672332764}, +{2.2237257957458496, 0.6384457349777222, 2.3015098571777344}, +{1.8477978706359863, 0.4795571565628052, 0.003892952110618353}, +{1.9093341827392578, 0.4177784323692322, 0.043376944959163666}, +{1.8214701414108276, 0.43797290325164795, -0.07820408046245575}, +{1.0146385431289673, 1.165470838546753, 0.6555998921394348}, +{1.0303051471710205, 1.2228920459747314, 0.7305643558502197}, +{0.9361645579338074, 1.201208472251892, 0.6140430569648743}, +{1.2764103412628174, 1.1003215312957764, 0.5865452885627747}, +{1.2838337421417236, 1.1920207738876343, 0.560116708278656}, +{1.1936209201812744, 1.0958077907562256, 0.6343770027160645}, +{0.9826582074165344, 0.2296346127986908, 1.9436429738998413}, +{1.0127708911895752, 0.307962030172348, 1.8975956439971924}, +{1.0209171772003174, 0.23705355823040009, 2.0310702323913574}, +{1.6672379970550537, 1.5026524066925049, 0.10733108222484589}, +{1.6027967929840088, 1.433679461479187, 0.12321776896715164}, +{1.7113953828811646, 1.4760581254959106, 0.026676295325160027}, +{1.5415749549865723, 0.9477790594100952, 0.5049782395362854}, +{1.4533668756484985, 0.9550033211708069, 0.5414401888847351}, +{1.5276728868484497, 0.9267820715904236, 0.4126301109790802} +}; + +const std::vector vel_ion = { +{0.1467217206954956, -0.11797984689474106, -0.1087578535079956}, +{-0.6771957874298096, -0.6940732598304749, -0.23710662126541138}, +{-1.8923448324203491, -0.5363240838050842, -2.129716396331787}, +{0.2713707387447357, -0.5997428894042969, 1.8589918613433838}, +{-0.3989928960800171, -0.22925375401973724, 0.40009310841560364}, +{-3.61399245262146, -0.4961731731891632, 1.6890850067138672}, +{-0.6460204124450684, 2.546718120574951, -1.061387300491333}, +{0.8057949542999268, -0.3814959228038788, 0.023568525910377502}, +{0.9255039691925049, -2.0295863151550293, -0.346884548664093}, +{-0.7174471020698547, -0.30883508920669556, 1.0058395862579346}, +{-0.12521874904632568, -0.6182706952095032, -0.3129156231880188}, +{-1.793103575706482, -0.7185811996459961, -0.184752956032753}, +{0.8765844106674194, -0.7610618472099304, -0.6097444891929626}, +{0.44188445806503296, -0.2708176076412201, 0.006337379105389118}, +{0.6039456129074097, 1.0023545026779175, 0.30828559398651123}, +{0.8501679301261902, 0.32990938425064087, 0.021834084764122963}, +{0.5726728439331055, 0.270455926656723, 0.04110236465930939}, +{0.6113097071647644, -1.3219085931777954, 0.1165095642209053}, +{1.4843956232070923, 0.9596050977706909, 0.43319377303123474}, +{-0.587532103061676, 0.2310495227575302, 0.4115220308303833}, +{1.4369468688964844, 0.27569282054901123, -0.6530088186264038}, +{2.151188373565674, -0.15258802473545074, -0.3896177113056183}, +{0.19128622114658356, -0.3342824876308441, -0.03577852621674538}, +{0.39130738377571106, 0.24501895904541016, -2.0980796813964844}, +{2.0200040340423584, -2.395005226135254, -0.5670769810676575}, +{-0.21001434326171875, -0.5842105746269226, -0.3911866545677185}, +{-1.3390575647354126, -0.04077404737472534, 1.048425316810608}, +{-0.018477987498044968, -1.1415455341339111, 0.10373607277870178}, +{-0.29131031036376953, 0.11380365490913391, 0.4220029413700104}, +{-0.7219188809394836, 0.9870460033416748, 0.4220239818096161}, +{-0.5485718846321106, 0.6072112917900085, 0.2952224612236023}, +{-0.2632232904434204, -0.20604659616947174, 0.33111003041267395}, +{-1.2910702228546143, -0.6302264332771301, 1.4237991571426392}, +{-2.8540804386138916, -1.0348565578460693, 2.013310432434082}, +{-0.1195688471198082, -0.2974643409252167, -0.49949532747268677}, +{-0.08387903869152069, 0.5445023775100708, -0.4652911126613617}, +{-0.831779420375824, -1.3010449409484863, -0.6467666625976562}, +{0.5230531692504883, 0.018351614475250244, 0.19829949736595154}, +{0.40457019209861755, -0.13260112702846527, 0.3122366964817047}, +{0.45989716053009033, -0.12073573470115662, 0.33000898361206055}, +{0.9761368632316589, 0.01811053231358528, 0.15848366916179657}, +{-0.7587983012199402, 1.780690312385559, -1.8271327018737793}, +{0.6396113634109497, -0.5665830969810486, 2.1723968982696533}, +{-0.06420915573835373, -0.2766948938369751, -0.03204471617937088}, +{1.177464246749878, 0.651482105255127, 0.12456753849983215}, +{-0.1044972687959671, -0.07871188968420029, -0.42425814270973206}, +{-0.209699809551239, -0.6818757653236389, 0.2514672875404358}, +{-1.479522943496704, -1.2300068140029907, -0.9977278113365173}, +{-2.2022392749786377, -4.591115951538086, 0.6729270219802856}, +{0.09485312551259995, 0.13476033508777618, -0.2696446180343628}, +{-1.377172589302063, -0.1749037802219391, 0.34403282403945923}, +{0.735177218914032, 0.2959458827972412, -0.6864802241325378}, +{0.35009434819221497, 0.578615665435791, -0.4056841731071472}, +{1.7503910064697266, 2.0522732734680176, 0.9787489175796509}, +{-1.556474208831787, -1.4408529996871948, -2.530616283416748}, +{-0.39269527792930603, -0.19206485152244568, -0.12708747386932373}, +{-0.24748595058918, 0.9392767548561096, 0.0953923910856247}, +{3.358896255493164, 0.8342639207839966, -0.797726035118103}, +{0.34517374634742737, -0.04867636784911156, 0.33457913994789124}, +{2.7905514240264893, -0.14673884212970734, -0.43090954422950745}, +{-1.012330174446106, 2.7049336433410645, -1.8475922346115112}, +{-0.45398417115211487, 0.07556984573602676, 0.3935472071170807}, +{-0.010597662068903446, -2.0258285999298096, 3.2012429237365723}, +{1.3995496034622192, -1.6632637977600098, -1.8050616979599}, +{0.471614271402359, -0.455892950296402, 0.06384947896003723}, +{-2.212420701980591, -0.22910532355308533, 0.31368929147720337}, +{1.4275550842285156, 0.6277894377708435, -2.1842360496520996}, +{-0.4294940233230591, 0.6674331426620483, -0.2770402431488037}, +{0.7893542647361755, 1.0107364654541016, -0.5349727272987366}, +{0.9451764822006226, -0.5548660159111023, -0.4687524735927582}, +{0.7917143106460571, 0.4347835183143616, -0.24542714655399323}, +{-2.2776715755462646, -1.1480969190597534, 1.4444843530654907}, +{-1.2273398637771606, 2.046241044998169, 1.1043713092803955}, +{-0.4710245728492737, -0.33891624212265015, 0.384732723236084}, +{-0.9447648525238037, 0.0493243932723999, -0.04794596508145332}, +{-0.9575300216674805, -0.6620880365371704, 1.0131007432937622}, +{0.3677968382835388, -0.2299290895462036, -0.04698815569281578}, +{0.5378456711769104, 0.03264434263110161, 0.08477258682250977}, +{3.321488857269287, 0.05749794468283653, -0.44298994541168213}, +{-0.5630426406860352, -0.13562464714050293, 0.2920467257499695}, +{-0.6274244785308838, -0.8692653775215149, 0.3031611144542694}, +{1.12924063205719, 0.745198667049408, 0.03779191896319389}, +{0.7083978652954102, -0.5464071035385132, -0.016800038516521454}, +{1.635204553604126, -0.7519877552986145, -2.9670984745025635}, +{0.19278983771800995, 1.1011041402816772, -2.183673143386841}, +{-0.12036919593811035, 0.08455304056406021, 0.2072792947292328}, +{-0.5519915819168091, -0.767609715461731, 1.339279055595398}, +{0.5693802833557129, 1.8189687728881836, -2.459902286529541}, +{0.3484218418598175, -0.4943358898162842, 0.41503146290779114}, +{-0.9826947450637817, -0.7980496883392334, 1.8398250341415405}, +{-0.38083577156066895, 0.4855629503726959, 0.7464038133621216}, +{-0.22016282379627228, -0.696189284324646, -0.5510905981063843}, +{-0.20981205999851227, -0.51346355676651, -0.23738539218902588}, +{0.08394835889339447, -0.8508774638175964, -0.9692677855491638}, +{-0.47172775864601135, 0.43743377923965454, -0.4859845042228699}, +{-0.5392453670501709, -1.2010061740875244, -0.9148380160331726}, +{-0.3230184018611908, -0.3472363352775574, 0.06383173912763596}, +{0.25615498423576355, 0.5884155035018921, -0.38274309039115906}, +{-0.10701203346252441, 0.20353814959526062, -0.8353768587112427}, +{-1.2247638702392578, 0.0651983842253685, -1.7848174571990967}, +{-0.430864155292511, -0.5707208514213562, 0.888866126537323}, +{0.38018807768821716, -0.6343905329704285, 0.235519677400589}, +{0.4660089612007141, -0.18361034989356995, 0.36564603447914124}, +{0.47146308422088623, 0.2793763279914856, 0.02283555082976818}, +{0.05718480423092842, 0.7578485012054443, -0.025639871135354042}, +{1.7223658561706543, 0.5322862267494202, -1.057923436164856}, +{-0.2706362307071686, -0.08027952909469604, -0.6550452709197998}, +{0.12724512815475464, -1.0248734951019287, -0.2594594657421112}, +{-0.9700368642807007, -0.760962724685669, 3.728029727935791}, +{-0.11542872339487076, 0.2468143254518509, -0.5585581064224243}, +{-0.43364325165748596, 1.0539578199386597, -1.231706976890564}, +{1.0041593313217163, -0.19193243980407715, -1.0571616888046265}, +{0.24291692674160004, -0.01197065133601427, -0.2917690575122833}, +{0.057111021131277084, 0.362870454788208, -0.4893783926963806}, +{0.48092591762542725, -0.19955693185329437, -0.1860431283712387}, +{-0.7177440524101257, 0.4827338457107544, 0.13304737210273743}, +{0.9617817401885986, 0.8244199156761169, 0.6807070374488831}, +{-1.3872535228729248, 0.9340505003929138, 1.8236593008041382}, +{0.0767391100525856, -0.3322048485279083, -0.11757470667362213}, +{3.9468801021575928, -0.33765533566474915, 1.6615749597549438}, +{-2.02321457862854, 0.18078213930130005, -1.8880548477172852}, +{-0.03193085640668869, -0.15072308480739594, 0.24126146733760834}, +{-0.5711174607276917, -2.0531721115112305, -0.6260514259338379}, +{0.3868178725242615, 2.4120757579803467, 0.2567151188850403}, +{0.4231373965740204, -0.2807258367538452, -0.7368137240409851}, +{2.220900535583496, -0.8014377355575562, -0.8381134867668152}, +{-1.236477017402649, 0.256518691778183, -0.07257338613271713}, +{-0.40553635358810425, 0.03960331901907921, 0.010554229840636253}, +{-0.6935656666755676, 0.1744319200515747, -0.4632236361503601}, +{0.957312822341919, -1.6139315366744995, -1.1151520013809204}, +{0.029367409646511078, -0.16047805547714233, -0.29110875725746155}, +{1.0654256343841553, -0.5286027193069458, -0.08861657977104187}, +{-0.1840427666902542, -0.18388402462005615, -0.7057140469551086}, +{0.32227596640586853, 0.6246970295906067, -0.16117827594280243}, +{-2.9057424068450928, 1.5795806646347046, -1.1372631788253784}, +{3.1053965091705322, -0.5968194603919983, 1.7484016418457031}, +{-0.5192649364471436, 0.5381086468696594, -0.6294572949409485}, +{0.1463107466697693, -2.223747491836548, -0.18993259966373444}, +{-2.5347204208374023, -0.016493573784828186, -1.7314146757125854}, +{0.7384518980979919, 0.09535468369722366, -0.2613598108291626}, +{-1.463370680809021, -1.6851402521133423, 1.2910914421081543}, +{3.002892255783081, -0.9988404512405396, -0.9657319188117981}, +{0.4053252041339874, -0.23219482600688934, -0.25056836009025574}, +{0.7271224856376648, -0.08896185457706451, 0.3121260404586792}, +{1.6861692667007446, -1.3464187383651733, -1.1717201471328735}, +{-0.45136314630508423, -0.19575439393520355, 0.4508085250854492}, +{-0.014634382911026478, -1.0605711936950684, 0.6590449213981628}, +{-2.3134591579437256, -2.071211814880371, 1.6960394382476807}, +{0.4855760931968689, -0.19301338493824005, -0.24260881543159485}, +{0.2577188014984131, -0.9992640614509583, 1.15793776512146}, +{-0.6917112469673157, 0.7574703693389893, -0.2860647141933441}, +{0.2203485667705536, 0.9428470730781555, 0.15915901958942413}, +{1.3133572340011597, 1.1818960905075073, -1.1533312797546387}, +{0.6382275223731995, -1.51777982711792, 2.393336057662964}, +{0.3971388041973114, 0.06711230427026749, 0.3163696527481079}, +{0.8278281092643738, -0.09276983141899109, -0.0110320458188653}, +{1.7992477416992188, -0.27703186869621277, -0.9181112051010132}, +{-0.2520400285720825, -0.33572742342948914, -0.17750518023967743}, +{0.45131105184555054, -0.07222173362970352, -0.11603615432977676}, +{0.049367841333150864, 0.714381217956543, -1.1640419960021973}, +{-0.6970853805541992, -0.36372843384742737, 0.49542680382728577}, +{0.16204312443733215, 0.21291273832321167, -0.33979952335357666}, +{-1.2525759935379028, -0.5060796141624451, -1.9210076332092285}, +{0.37806400656700134, 0.5542001128196716, 0.5458782911300659}, +{-0.8681692481040955, -0.3247007727622986, 1.5302000045776367}, +{-1.138858675956726, 0.9764885902404785, 0.04118131101131439}, +{0.2551044225692749, -0.05668710544705391, 0.1667824685573578}, +{-0.3948127031326294, -0.40358948707580566, -0.47164562344551086}, +{-1.19896399974823, -0.060356419533491135, -0.6599250435829163}, +{0.9059739112854004, -0.3103170692920685, 0.03945522755384445}, +{0.08320382237434387, 0.3435664176940918, 0.7220596075057983}, +{-0.23984649777412415, -0.31598857045173645, 1.7267197370529175}, +{-0.23618856072425842, -0.16092844307422638, 0.3379763662815094}, +{-0.8918102979660034, 2.36514949798584, 1.279393196105957}, +{0.5058212876319885, -2.5375709533691406, -0.15752525627613068}, +{0.24670736491680145, -0.4884890615940094, -0.8876228332519531}, +{-2.1848340034484863, -1.0319803953170776, -0.4321633279323578}, +{1.1279470920562744, 0.1901041567325592, 1.0763020515441895}, +{0.24281175434589386, 0.052137866616249084, -0.07420840859413147}, +{-1.0817800760269165, 0.8159185647964478, 0.5611326694488525}, +{-0.23051518201828003, 1.09340238571167, 1.8033915758132935}, +{0.12927791476249695, -0.24929112195968628, 0.09245293587446213}, +{-0.9575191736221313, -0.3078474998474121, -0.6128958463668823}, +{0.3597484230995178, -0.328010618686676, -0.7867737412452698}, +{0.1736418753862381, 0.11850649863481522, 0.2879880666732788}, +{0.39887821674346924, -1.7500276565551758, 0.8856514096260071}, +{-0.18849092721939087, 2.311537981033325, -0.683223307132721}, +{0.4340616762638092, -0.302706778049469, -0.29744482040405273}, +{0.7304089069366455, -0.6281061768531799, -0.19648365676403046}, +{-1.3288938999176025, 1.855106234550476, -0.13349397480487823}, +{0.020496968179941177, 0.5922131538391113, 0.15527655184268951}, +{-0.009881388396024704, 0.456569641828537, 0.1184253916144371}, +{-0.22501760721206665, 0.7727169990539551, 0.09694024175405502}, +{-0.29360899329185486, -0.34796983003616333, 0.7542030215263367}, +{0.002308385679498315, 1.8193202018737793, 0.3782944977283478}, +{-0.3776785433292389, -1.1758310794830322, -1.2446696758270264}, +{0.7537961602210999, 0.22403936088085175, -0.9260585308074951}, +{0.4240817725658417, -0.14294326305389404, -0.9092555642127991}, +{0.9961618781089783, -0.6967849731445312, 0.2854682505130768}, +{-0.34596729278564453, -0.9662646651268005, -0.19824624061584473}, +{-2.0433621406555176, -0.6454344391822815, -0.36536189913749695}, +{0.7071678042411804, -1.1082470417022705, -0.049980033189058304}, +{0.6296641230583191, -0.28029096126556396, -0.18868635594844818}, +{-0.8886677026748657, -0.161065012216568, -0.20266054570674896}, +{1.1302608251571655, -0.0830078125, -1.705603003501892}, +{-0.5316011905670166, -0.35777124762535095, 0.08667466044425964}, +{0.4626556932926178, 0.6091567873954773, 0.10649317502975464}, +{-0.06340213865041733, -0.3068799376487732, 0.06955740600824356}, +{-0.20163875818252563, 0.03296859562397003, 0.5419594645500183}, +{-0.17477184534072876, 0.1580394208431244, 0.45019111037254333}, +{0.009014805778861046, -0.8173325061798096, 1.658774495124817}, +{0.364660382270813, -0.3961508870124817, -0.25819382071495056}, +{0.4905056357383728, -0.02007920667529106, 0.5736061930656433}, +{0.6672555804252625, 0.8171567320823669, -0.5553292632102966}, +{0.5868459343910217, -0.0689719021320343, 0.187228262424469}, +{2.8604090213775635, -0.1367161124944687, -1.4382069110870361}, +{1.8987561464309692, 0.5632640719413757, 2.1786580085754395}, +{0.2781497836112976, 0.42623206973075867, -0.695010781288147}, +{2.032428026199341, 1.259416937828064, 2.2979862689971924}, +{-1.4645848274230957, 0.4292377531528473, -2.334416627883911}, +{-0.03134043142199516, -0.08620274811983109, -0.19232219457626343}, +{-0.13441181182861328, 0.4437578618526459, -0.24779368937015533}, +{-1.203945517539978, 0.32244572043418884, -0.1598411202430725}, +{-0.3348962068557739, -0.07934026420116425, -0.23932740092277527}, +{-0.6963821649551392, 0.15813075006008148, -1.7931184768676758}, +{1.317305564880371, -0.6480634212493896, 0.6524204611778259}, +{-0.27910706400871277, -0.40616080164909363, 0.050870198756456375}, +{-1.7849817276000977, -0.726223349571228, -0.12312860786914825}, +{0.559802234172821, -1.3572185039520264, -0.27180638909339905}, +{0.41741427779197693, -0.021071553230285645, 0.5678096413612366}, +{0.5923036336898804, 0.47925156354904175, 0.10698379576206207}, +{-0.020998448133468628, 0.976512610912323, 0.836319625377655}, +{-0.19219547510147095, 0.07196784764528275, -0.3433815538883209}, +{1.8781746625900269, 0.6816754341125488, -1.7295047044754028}, +{-2.3145835399627686, 1.5818521976470947, -1.675347089767456}, +{0.6264262199401855, -0.40726518630981445, 0.10865969955921173}, +{0.3965327739715576, 0.2172042578458786, -1.1876107454299927}, +{0.36950477957725525, -0.35148173570632935, -1.1321707963943481}, +{-0.0772676020860672, -0.6138520836830139, 0.2722199857234955}, +{0.6153097152709961, -1.0121108293533325, 0.0762709453701973}, +{0.4641023576259613, -0.7625477313995361, -0.08717929571866989}, +{-0.35144779086112976, -0.2685718834400177, -0.590668797492981}, +{-2.0750555992126465, -1.835145115852356, 0.3332614600658417}, +{-1.0730592012405396, -0.6053736209869385, -0.10366825759410858}, +{0.5726631283760071, 0.1560409963130951, 0.06962647289037704}, +{1.8678442239761353, -0.821350634098053, -0.23309528827667236}, +{0.5145425796508789, 1.5579026937484741, -0.041832827031612396}, +{-0.12706315517425537, -0.07059664279222488, 0.3654957711696625}, +{1.3167057037353516, 0.23261559009552002, 0.028459953144192696}, +{-2.4844987392425537, 0.06396700441837311, 1.8684533834457397}, +{-0.3592314124107361, 0.6008352041244507, 0.671818196773529}, +{0.9104816913604736, 0.7777960896492004, 0.5896465182304382}, +{-0.44875702261924744, 0.48666244745254517, -1.3883386850357056}, +{0.08075421303510666, -0.06875702738761902, 0.09981714189052582}, +{0.8340955376625061, -1.0954420566558838, 0.1956399381160736}, +{1.6726064682006836, 1.7241923809051514, 0.38271504640579224}, +{-0.8502488136291504, -0.052502695471048355, -0.5860599279403687}, +{-0.24510252475738525, 0.34222373366355896, -0.34962135553359985}, +{-0.9275189638137817, 0.38234585523605347, -1.3216676712036133}, +{-0.9462252855300903, 0.48977211117744446, 0.7480777502059937}, +{-0.05978606641292572, 0.31742149591445923, 2.415735960006714}, +{-1.601967453956604, -1.2540292739868164, 0.8229246735572815}, +{0.009192879311740398, -0.49449729919433594, -0.7645055055618286}, +{-0.7059863209724426, 1.5587490797042847, -0.1424049586057663}, +{1.033425211906433, 0.9256712198257446, 0.6457036137580872}, +{-0.19242481887340546, 0.636968195438385, 0.0010496042668819427}, +{1.8498739004135132, 3.495866060256958, -1.2632036209106445}, +{-0.6388140320777893, 0.012965813279151917, 0.5154371857643127}, +{-0.7914056777954102, -0.6860923767089844, -0.36755630373954773}, +{-1.6867915391921997, 0.9983177185058594, 1.3418352603912354}, +{-2.158374071121216, -1.5155433416366577, -1.8876513242721558}, +{0.7310876250267029, -0.24008461833000183, 0.7119634747505188}, +{-0.3433036506175995, -1.3809369802474976, 1.7679771184921265}, +{-0.18890097737312317, -0.23372969031333923, -1.1907814741134644}, +{0.13126836717128754, 0.44832393527030945, -0.11920619010925293}, +{-0.44681042432785034, 0.8886340856552124, 0.22638127207756042}, +{0.26868900656700134, 1.1826714277267456, -0.07482888549566269}, +{-0.275963693857193, 0.020739102736115456, 0.016283579170703888}, +{-0.605835497379303, 0.049968376755714417, -0.4174681305885315}, +{-0.6826683282852173, -0.4505351781845093, 0.13036012649536133}, +{-0.2724769115447998, 0.02371121197938919, -0.06978995352983475}, +{0.12832523882389069, 0.500557541847229, -0.09964749962091446}, +{-0.356083482503891, 0.15994518995285034, -0.036573369055986404}, +{-0.5948976874351501, 0.23853707313537598, -0.14768783748149872}, +{-0.09748175740242004, -0.6593284606933594, -3.6083319187164307}, +{0.3823713958263397, -0.28117355704307556, -1.6484745740890503}, +{0.22621072828769684, -0.09043824672698975, 0.5998497605323792}, +{1.253396987915039, -0.20124657452106476, 0.08601503074169159}, +{-1.0768749713897705, -0.7459186911582947, 0.9292473196983337}, +{0.10596232116222382, 0.3645603358745575, -0.5515658259391785}, +{6.239713191986084, 3.8840584754943848, 2.899857521057129}, +{1.6834399700164795, 1.0147753953933716, 0.10110262036323547}, +{0.3155834376811981, -0.33303800225257874, -0.24094253778457642}, +{0.29873695969581604, -0.07293284684419632, -0.2096361368894577}, +{0.6415837407112122, -0.39290541410446167, 0.04451306536793709}, +{0.1353665590286255, 0.22851362824440002, -0.30547037720680237}, +{-1.0562115907669067, 0.05446173995733261, 0.4384074807167053}, +{0.6086847186088562, 1.3032335042953491, -0.8603925704956055}, +{0.6092091798782349, -0.16846121847629547, 0.615606427192688}, +{1.1834691762924194, -1.0505865812301636, 1.6857877969741821}, +{0.262216717004776, -1.4327229261398315, -0.3557289242744446}, +{-0.4705982804298401, -0.052371639758348465, -0.32293716073036194}, +{-0.764565646648407, 0.0626702606678009, 1.4176104068756104}, +{0.515282928943634, 0.1744774729013443, -0.11451791226863861}, +{0.41778483986854553, -0.21335072815418243, 0.4352833926677704}, +{0.9037281274795532, -0.6330071091651917, 1.178911805152893}, +{-0.8348633050918579, 3.4074506759643555, -1.7806212902069092}, +{0.5078327655792236, -0.2194230854511261, 0.3114096224308014}, +{-0.9692989587783813, 2.0331709384918213, 1.1647976636886597}, +{0.692791759967804, -0.5000742673873901, 0.13174675405025482}, +{-0.10379906743764877, -0.3369905948638916, -0.19881869852542877}, +{-2.062849283218384, -1.5688681602478027, -0.20348747074604034}, +{1.785719871520996, -1.6031763553619385, 1.679172396659851}, +{0.12803804874420166, -0.24717171490192413, 0.40823349356651306}, +{1.7386583089828491, -0.008128652349114418, -0.9477515816688538}, +{-0.8170549273490906, 1.5356165170669556, 2.9584977626800537}, +{-0.17358458042144775, -0.00026230234652757645, 0.05124863609671593}, +{2.6758265495300293, 1.9911043643951416, 1.8482855558395386}, +{-1.6529929637908936, 1.6846446990966797, -1.5204522609710693}, +{0.2073451429605484, 0.3826543390750885, 0.3503114581108093}, +{2.496446371078491, 0.06471887975931168, 0.2661808133125305}, +{-0.48398736119270325, -2.9542782306671143, 1.9368337392807007}, +{0.3542120158672333, 0.3102913200855255, -0.4041009843349457}, +{0.2682916224002838, -0.5727171897888184, -0.821739137172699}, +{-0.7858884930610657, -0.2852533757686615, 0.20537473261356354}, +{-0.7518368363380432, -0.25803330540657043, -0.009617678821086884}, +{1.6659139394760132, 0.024470016360282898, -1.679818868637085}, +{-1.414444088935852, -0.4414069652557373, 1.0085289478302002}, +{0.17874422669410706, -0.2703815698623657, 1.1631600856781006}, +{1.7329555749893188, 1.5844839811325073, 0.19399726390838623}, +{0.5547966957092285, -1.1533502340316772, 0.983407735824585}, +{-0.6203209757804871, -0.8459252119064331, 0.33971554040908813}, +{-1.5860179662704468, 0.12570074200630188, -1.3659402132034302}, +{-0.8090019822120667, 0.5352538824081421, 0.17074689269065857}, +{-0.2580549120903015, 0.04457010701298714, 0.243826761841774}, +{-0.4263823926448822, 0.7414884567260742, 1.151364803314209}, +{0.35954952239990234, -0.06856196373701096, 0.044034793972969055}, +{0.0380115881562233, -0.5759187936782837, -0.3012048006057739}, +{0.4703604578971863, -1.0557277202606201, 2.1900999546051025}, +{-0.0810113325715065, -0.9006937742233276, -1.9282625913619995}, +{0.051350221037864685, 0.11262128502130508, 0.33987489342689514}, +{1.3038448095321655, -0.20934075117111206, 1.1245228052139282}, +{1.2574174404144287, 2.1193764209747314, 0.19086439907550812}, +{0.2429475039243698, -0.21537315845489502, 0.3559522330760956}, +{2.23640513420105, 0.6157689094543457, -4.27158784866333}, +{1.6149157285690308, 1.1569044589996338, 1.4840643405914307}, +{-0.5458301901817322, 0.30401411652565, 0.13099348545074463}, +{-0.3460984230041504, 0.48825499415397644, 0.3080129027366638}, +{-1.7409952878952026, 0.006462551187723875, 1.1241785287857056}, +{0.32518625259399414, 0.10163116455078125, 0.1710725873708725}, +{0.34219563007354736, -0.40732133388519287, 0.28802743554115295}, +{-0.1638815850019455, 1.0702064037322998, -0.5794267058372498}, +{-0.22528895735740662, 0.08454492688179016, 0.14507825672626495}, +{-0.17663024365901947, 0.44168707728385925, 0.06904974579811096}, +{0.048585355281829834, 1.092110276222229, 0.8303998708724976}, +{0.2683510184288025, 0.21193276345729828, -0.004623762797564268}, +{0.028306981548666954, -0.2056395262479782, 1.0399824380874634}, +{0.036636557430028915, 1.348967432975769, 0.05156765878200531}, +{-0.08287021517753601, -0.7369256019592285, 0.21742312610149384}, +{0.31630513072013855, -3.3134701251983643, -1.2232989072799683}, +{0.7775358557701111, 3.131711721420288, 1.8689285516738892}, +{-0.2302999347448349, -0.22747056186199188, 0.08444468677043915}, +{0.8029054999351501, 2.8553993701934814, 1.5146610736846924}, +{0.9209516048431396, 0.7563357353210449, 0.5017060041427612}, +{0.928099513053894, 0.0032341904006898403, 0.6618394255638123}, +{1.8733822107315063, -1.1750493049621582, -0.295955091714859}, +{0.2302517294883728, 2.4172399044036865, -0.14896543323993683}, +{0.3194134533405304, 0.5960922241210938, -0.02696283534169197}, +{-1.13747239112854, 2.36944842338562, 0.26872071623802185}, +{-0.6409850716590881, -1.152998924255371, -1.7326805591583252}, +{0.2189987450838089, -0.25920793414115906, 0.09056868404150009}, +{0.0501403734087944, 0.5253839492797852, -0.9248085021972656}, +{2.373070001602173, 1.6220417022705078, -0.4849286675453186}, +{-0.1052151769399643, -0.5783418416976929, 0.042189568281173706}, +{-0.5419229865074158, -2.2978761196136475, 1.0417895317077637}, +{1.343087077140808, -0.8724225163459778, -1.0050462484359741}, +{0.3770333528518677, -0.37000536918640137, 0.18538421392440796}, +{-0.7748129963874817, -0.39145514369010925, 0.7789492607116699}, +{0.5645773410797119, -0.011740762740373611, -0.5384448170661926}, +{0.07660128176212311, -0.09393983334302902, 0.3453461527824402}, +{1.5525095462799072, 1.9113080501556396, 0.3822067677974701}, +{0.05110349878668785, -1.0275272130966187, -1.970318078994751}, +{-0.024236464872956276, 0.22443488240242004, 0.28963741660118103}, +{-0.5248584747314453, -0.1106744185090065, -0.9459664821624756}, +{-1.8500750064849854, 0.6956537961959839, 1.6592847108840942}, +{0.10131444036960602, -0.34151771664619446, -0.24683095514774323}, +{0.3839625418186188, -1.1140046119689941, 0.0036604488268494606}, +{-0.8321281671524048, 1.8852969408035278, -0.8234007358551025}, +{-0.6013950109481812, 0.2532312572002411, 0.4092307686805725}, +{-1.238694190979004, 0.03848112374544144, 0.5083830952644348}, +{-0.3398646116256714, -0.08467236906290054, 0.15973038971424103}, +{-0.10860221087932587, -0.19941046833992004, 0.33623769879341125}, +{-0.6031429171562195, -2.084958791732788, -0.42567700147628784}, +{-1.523210883140564, 0.7749836444854736, 1.1228795051574707}, +{-0.15029367804527283, -0.2703218162059784, 0.31159788370132446}, +{0.080246202647686, -1.2917050123214722, -0.6727930307388306}, +{-1.5627996921539307, -0.1554764062166214, -1.046218752861023}, +{-0.6357116103172302, 0.1490803360939026, 0.29303595423698425}, +{-0.9348549246788025, -0.7822854518890381, -0.2469373345375061}, +{-0.8376742601394653, 1.111066460609436, 0.18563370406627655}, +{0.31549346446990967, -0.02579859085381031, 0.11745306849479675}, +{0.3680194020271301, -1.117264747619629, -0.5722811222076416}, +{0.4818265438079834, 1.235813856124878, -0.8888469934463501}, +{0.7833511829376221, -0.6296106576919556, -0.027650410309433937}, +{-0.29676303267478943, -1.1606661081314087, -0.03495306894183159}, +{2.244436502456665, 1.0420676469802856, -1.5155268907546997}, +{-0.24152952432632446, -0.07716789096593857, 0.4358092248439789}, +{0.9539434909820557, 0.05388033017516136, 0.5211693644523621}, +{0.1489797979593277, -0.008173692040145397, 0.5031073093414307}, +{0.2344789206981659, 0.09436781704425812, 0.34649524092674255}, +{1.0032347440719604, 0.5988884568214417, 0.28291216492652893}, +{1.4140150547027588, 0.9665120244026184, -0.11512506753206253}, +{-0.20206154882907867, 0.3647885024547577, 0.44021856784820557}, +{-0.2531978189945221, -2.082287073135376, 0.8656622171401978}, +{-1.3389772176742554, -0.16511967778205872, 0.015376001596450806}, +{0.228519007563591, 0.2621467113494873, -0.4382009208202362}, +{-0.9419896602630615, 3.642763614654541, -1.027126669883728}, +{-0.8328084349632263, 0.9834280014038086, -0.7919356822967529}, +{-0.10022427886724472, 0.2453947514295578, 0.30320554971694946}, +{0.9230880737304688, -1.176540493965149, 1.0108743906021118}, +{-0.7824358940124512, 0.6126046180725098, 0.09842261672019958}, +{-0.11401109397411346, -0.24857781827449799, -0.7280480861663818}, +{-1.701238751411438, 1.0973942279815674, 1.3336868286132812}, +{-1.7600014209747314, -0.7648136615753174, -2.100914478302002}, +{-0.33159011602401733, 0.03134623542428017, 0.4622208774089813}, +{1.0352851152420044, 1.6272529363632202, 1.270275592803955}, +{-1.8044284582138062, -2.3370323181152344, -1.22617769241333}, +{0.5259077548980713, -0.2502526342868805, 0.4263354539871216}, +{3.667407274246216, -1.035665512084961, 0.5439451336860657}, +{-0.8053811192512512, -1.156083106994629, -1.17854905128479}, +{0.22071343660354614, 0.5194921493530273, 0.40501275658607483}, +{-0.4990619719028473, -0.7743863463401794, 0.7542064189910889}, +{0.6704578399658203, 1.4833016395568848, -0.24095305800437927}, +{-0.1615944355726242, -0.20738819241523743, -0.5387473702430725}, +{-0.16005054116249084, -1.0583908557891846, -0.6020705103874207}, +{-0.46727535128593445, -1.7203991413116455, 1.3179799318313599}, +{-0.1788523942232132, 0.14551888406276703, -0.4131810963153839}, +{-1.5506064891815186, -1.2307602167129517, -3.6333348751068115}, +{-1.8990510702133179, -1.883873462677002, -0.5831083059310913}, +{-0.05886363238096237, 0.2566238045692444, 0.525739312171936}, +{-0.8292429447174072, -0.4165807068347931, 0.08681299537420273}, +{-1.241586685180664, -0.903242826461792, -0.5316869020462036}, +{-0.27378585934638977, 0.37269327044487, 0.14990156888961792}, +{1.4394670724868774, 2.662977933883667, 0.6502485871315002}, +{-1.2622631788253784, -0.9731787443161011, 0.4313352704048157}, +{0.7157421112060547, -0.005150886718183756, 0.4953571856021881}, +{-0.06740551441907883, -0.32012709975242615, 0.276386022567749}, +{-0.9466416239738464, 0.01885300874710083, -1.3666399717330933}, +{0.6311535239219666, 0.25381502509117126, -0.2954455018043518}, +{-0.4276386499404907, 3.6016921997070312, -0.3233506381511688}, +{0.4369797706604004, 1.5146127939224243, -0.20616783201694489}, +{-0.027543848380446434, 0.26391106843948364, 0.4700901508331299}, +{-2.577359437942505, 1.482286810874939, 0.9165555238723755}, +{-1.8487958908081055, -0.5464612245559692, 0.1788032501935959}, +{-0.3372763693332672, 0.2781938314437866, -0.7662651538848877}, +{0.772589921951294, 1.3298372030258179, 0.3125298023223877}, +{2.3064513206481934, -0.6775752305984497, -2.21504545211792}, +{-0.41082778573036194, -0.4559866189956665, -0.1239461824297905}, +{-1.3117610216140747, -1.4912241697311401, -1.1379897594451904}, +{-0.8754559755325317, -0.8049954771995544, 1.4983221292495728}, +{0.5390713214874268, -0.8287450075149536, 0.057639800012111664}, +{0.4006483256816864, -0.09382180124521255, 0.812582790851593}, +{0.7042940855026245, 0.9315276741981506, 0.205998495221138}, +{0.04722434654831886, 0.6138114929199219, 0.13029134273529053}, +{-0.9419750571250916, 0.15599389374256134, 1.2185391187667847}, +{-0.5692178010940552, -0.10607116669416428, 0.13956911861896515}, +{-0.19222712516784668, -0.2990367114543915, -0.4811595678329468}, +{-0.7478691935539246, -0.9299678206443787, 0.1190786063671112}, +{0.877688467502594, -0.8149599432945251, -0.1269974708557129}, +{0.4061276614665985, -0.16862322390079498, 0.16862915456295013}, +{-1.166860818862915, 0.3488776683807373, -0.4419914484024048}, +{-0.7737617492675781, -3.0225448608398438, 1.217339038848877}, +{0.2222757190465927, 0.5559084415435791, -0.12194032967090607}, +{-1.9224694967269897, 0.7267239093780518, 1.0305267572402954}, +{-0.14564011991024017, 0.5883703231811523, -0.10717418789863586}, +{-0.12422650307416916, -0.3743705451488495, -0.32504379749298096}, +{0.10928726196289062, -0.7157386541366577, -0.18018358945846558}, +{-0.17009633779525757, 0.19148580729961395, -0.43133899569511414}, +{0.18858148157596588, -0.28516796231269836, 0.7118281722068787}, +{-1.0794554948806763, -0.8615975975990295, 2.0915699005126953}, +{-0.36801740527153015, -0.42147353291511536, 1.113729476928711}, +{0.13763834536075592, -0.7130023241043091, -0.15287794172763824}, +{0.2870575785636902, 0.38380226492881775, 0.7860313653945923}, +{0.628002941608429, -0.7113975286483765, 1.169172763824463}, +{-0.21156536042690277, -0.16159580647945404, 0.15989229083061218}, +{0.28197264671325684, -0.9394557476043701, 0.08399124443531036}, +{0.5380828976631165, 0.8974738717079163, -0.9789895415306091}, +{-0.31190359592437744, 0.026138175278902054, 0.41328319907188416}, +{-0.42661839723587036, 0.19118747115135193, 1.5991750955581665}, +{-0.2744201123714447, -2.799729585647583, 1.8451581001281738}, +{1.0381464958190918, -0.3103385865688324, 0.36173683404922485}, +{-1.550289273262024, -2.772540807723999, -0.8912594318389893}, +{-0.8116962313652039, -1.6392089128494263, 1.695450782775879}, +{-0.0024696653708815575, -0.5939406156539917, 0.9390121698379517}, +{0.3103124797344208, -0.6457461714744568, 0.9082885980606079}, +{-1.484375, -0.20803067088127136, 0.21468831598758698}, +{-0.23874525725841522, 0.48924797773361206, 0.49737995862960815}, +{0.7635846138000488, 0.10410162061452866, 0.5167299509048462}, +{-0.6931209564208984, -0.5044821500778198, 0.88157057762146}, +{-0.28811395168304443, 0.5593769550323486, -0.034696970134973526}, +{-1.6474334001541138, 1.9544248580932617, -2.1922712326049805}, +{-2.4658401012420654, 0.8880385756492615, 1.6743159294128418}, +{0.12781929969787598, 0.1017855852842331, -0.3732738792896271}, +{1.1468372344970703, -0.5355668067932129, -0.7840747237205505}, +{0.7883071303367615, -0.2407001256942749, -0.5398221015930176}, +{-0.46036744117736816, 0.04721102863550186, 0.5434152483940125}, +{2.4793379306793213, -0.8072592616081238, 1.4984617233276367}, +{0.7277660965919495, -1.2925997972488403, -1.8261555433273315}, +{-0.10867992043495178, -0.27273935079574585, -0.049785107374191284}, +{-0.21958057582378387, -0.10303553193807602, -1.0563076734542847}, +{-0.5270441770553589, -0.7641876935958862, 0.2611934542655945}, +{0.3826804757118225, -0.032356731593608856, 0.2698375880718231}, +{-0.8749226331710815, -0.1779857873916626, 0.13163739442825317}, +{-0.2869289219379425, -0.9440482258796692, 0.36012983322143555}, +{0.33092671632766724, -0.12172681838274002, -0.512337863445282}, +{1.0438462495803833, -0.36842069029808044, -1.7900398969650269}, +{0.5515243411064148, -1.4644570350646973, -1.7659746408462524}, +{0.0548807755112648, -0.5334458947181702, 0.04294099658727646}, +{3.110489845275879, -2.9014410972595215, -3.228692054748535}, +{-0.12713946402072906, -1.7347913980484009, 2.8053958415985107}, +{0.42405736446380615, 0.37051519751548767, 0.09363146126270294}, +{0.7218700051307678, 0.04335547983646393, -0.27913108468055725}, +{0.8243515491485596, -0.320568323135376, 0.1291513741016388}, +{0.36648839712142944, -0.5450053215026855, -0.11405996233224869}, +{0.14145955443382263, -0.19879192113876343, 0.6777829527854919}, +{-0.40045881271362305, -0.7650181651115417, -0.09406166523694992}, +{-0.2689604163169861, 0.43109700083732605, -0.5436668992042542}, +{-0.6558736562728882, 0.17366333305835724, -2.019778251647949}, +{-0.3007378578186035, 0.08074022084474564, -0.31121957302093506}, +{-0.22169245779514313, 0.015543196350336075, -0.16052661836147308}, +{-0.4068017303943634, 0.8640126585960388, 1.36747407913208}, +{1.412102460861206, -2.060208559036255, -1.4285290241241455}, +{-0.38906148076057434, -0.47316640615463257, -0.20385125279426575}, +{-1.6303819417953491, -1.9542125463485718, -0.22537972033023834}, +{-0.5012866258621216, 1.072572112083435, 1.1379259824752808}, +{0.011802642606198788, -0.16734465956687927, 0.4898444712162018}, +{-3.484848976135254, -0.5291270017623901, -1.669603705406189}, +{0.10776898264884949, 0.18618088960647583, 0.6065698862075806}, +{0.36386945843696594, -0.0061605991795659065, -0.2758459746837616}, +{0.01161180343478918, 0.7425435781478882, -0.7252243161201477}, +{0.23351632058620453, -0.4960024058818817, -2.73423433303833}, +{0.23166513442993164, -0.03895414620637894, -0.2022491693496704}, +{1.2351303100585938, 0.07675434648990631, -0.7180020213127136}, +{-1.3977887630462646, -0.1855199784040451, 0.409743070602417}, +{-0.4803653061389923, -0.49972793459892273, -0.019694378599524498}, +{0.5098156929016113, -0.47638535499572754, -1.1761678457260132}, +{0.4490055441856384, 0.061034321784973145, -0.2253534197807312}, +{-0.054419346153736115, 0.2350175380706787, -0.4169411063194275}, +{0.553496778011322, 0.6715222597122192, 0.5102237462997437}, +{0.6311810612678528, -0.5399609208106995, -1.1395243406295776}, +{0.4103841185569763, -0.32340237498283386, -0.07011239975690842}, +{0.18153797090053558, 1.066518783569336, -1.564326524734497}, +{0.2297699898481369, 1.5656636953353882, -0.7857654094696045}, +{-0.1590120792388916, 0.006715361960232258, -0.07318803668022156}, +{-1.4988408088684082, -0.16061945259571075, -0.615058958530426}, +{-0.24939215183258057, 1.4046852588653564, -1.3972618579864502}, +{0.5213688015937805, -0.7409919500350952, -0.22530032694339752}, +{0.7741886377334595, 1.6752725839614868, 0.5474430918693542}, +{-1.6159356832504272, -0.3188059628009796, -0.7090439796447754}, +{0.6532257795333862, -0.24921944737434387, 0.720517098903656}, +{0.5104047060012817, 0.0753985196352005, 0.9643113613128662}, +{0.7734020352363586, -0.45889124274253845, 0.4668208062648773}, +{-0.04225582629442215, 0.18579153716564178, 0.061098091304302216}, +{0.21381361782550812, 0.9754023551940918, 0.710886538028717}, +{-0.3318801522254944, 0.3846887946128845, -1.276902198791504}, +{-0.08219978213310242, 0.6294499039649963, 0.4666754901409149}, +{2.2174220085144043, 0.8903222680091858, 0.7078122496604919}, +{-0.5174185037612915, 1.665223479270935, 1.299552321434021}, +{-0.6054795384407043, 0.02889913320541382, -0.4884825646877289}, +{-0.29557502269744873, -1.2374154329299927, -0.6990171670913696}, +{1.0860540866851807, 0.38243567943573, -1.7286157608032227}, +{0.20478463172912598, -0.6336575150489807, -0.22632825374603271}, +{1.842605471611023, -1.2398806810379028, 0.6075087189674377}, +{-0.28434887528419495, -1.0654956102371216, -0.20624098181724548}, +{-0.8382132053375244, 1.2447532415390015, -0.20109398663043976}, +{-0.7420626878738403, 1.0508761405944824, -0.08931080251932144}, +{2.1789748668670654, -1.329004168510437, 0.320894330739975}, +{1.0934815406799316, 0.35485216975212097, -0.20569771528244019}, +{0.6467168927192688, 0.4058423340320587, -0.09270254522562027}, +{-0.4056141972541809, 0.4029800295829773, 2.665802478790283}, +{0.13080166280269623, -0.2282569706439972, 0.7089022994041443}, +{-0.5496722459793091, -0.09669762849807739, -2.0453708171844482}, +{-0.4578345715999603, 0.8638384342193604, -1.4385743141174316}, +{-0.29082542657852173, -0.14896397292613983, 0.9038097262382507}, +{-0.9031386971473694, 0.4308883845806122, 1.6917836666107178}, +{1.580711841583252, 0.7543056607246399, -0.5896422863006592}, +{-0.1806834489107132, 0.6096286177635193, -0.147810697555542}, +{1.0805637836456299, -1.3019709587097168, -2.0593278408050537}, +{0.03218690678477287, 1.4219589233398438, 0.4798637628555298}, +{0.538847029209137, -0.2585354447364807, 0.0838392823934555}, +{0.7675584554672241, 0.3887486755847931, -0.28284794092178345}, +{0.7980712056159973, -0.6257301568984985, 0.06876512616872787}, +{0.14262549579143524, 0.4610523581504822, -0.12171906232833862}, +{0.25589296221733093, 0.8758535981178284, 0.6501075625419617}, +{1.9610017538070679, -0.6307855248451233, -0.5076091289520264}, +{-0.2057303935289383, 0.5212827324867249, -0.618092954158783}, +{-2.3062074184417725, -1.939363718032837, -0.06610938161611557}, +{-0.6368934512138367, 0.4975334405899048, -0.3221832513809204}, +{-0.031310074031353, -0.3598259687423706, -0.21561086177825928}, +{-0.33859553933143616, -0.3173867464065552, -0.3735707700252533}, +{-0.6830579042434692, -0.5117213129997253, -3.8152809143066406}, +{-0.2505202889442444, -0.027254315093159676, 0.40922829508781433}, +{-0.7063128352165222, -2.442187786102295, 0.6631839275360107}, +{-0.002357382560148835, 1.1676896810531616, -0.6204118728637695}, +{0.10389640927314758, -0.10821743309497833, -1.105412244796753}, +{1.4733331203460693, -2.1508448123931885, 3.2551491260528564}, +{-0.1329190582036972, 0.6270176768302917, -3.1265382766723633}, +{-0.20473624765872955, 0.36520761251449585, 0.7108851671218872}, +{-0.18578849732875824, 0.5378113389015198, 0.25245001912117004}, +{-0.4627516567707062, -0.1531871259212494, 1.4929200410842896}, +{-0.21857351064682007, -0.3409583568572998, 0.16567008197307587}, +{0.20626972615718842, 0.4738435447216034, 1.135503888130188}, +{1.144563913345337, 1.9236516952514648, -0.4912792444229126}, +{-0.47860515117645264, -0.33018454909324646, -0.3070690929889679}, +{2.0199196338653564, 0.007731403689831495, -2.837756872177124}, +{-0.7940601706504822, -0.6461886763572693, -0.39566031098365784}, +{-0.12802018225193024, 0.3085893988609314, -0.02575438842177391}, +{-1.0352433919906616, 0.592944324016571, -0.9046400785446167}, +{-0.6389594078063965, -0.263420045375824, 0.5166481733322144}, +{0.41795870661735535, 0.7660757899284363, 0.18594305217266083}, +{1.9469438791275024, 1.8667560815811157, -0.6322973966598511}, +{-1.2557754516601562, -0.5429832935333252, -0.44533979892730713}, +{-0.16120527684688568, 0.23269222676753998, -0.08266603201627731}, +{0.19859549403190613, -0.3467608392238617, -1.449226975440979}, +{-0.10633625835180283, 0.5124447345733643, 0.21590857207775116}, +{0.1209295317530632, -0.5646935105323792, 0.7147045731544495}, +{0.44509193301200867, -2.153252601623535, -0.6117814779281616}, +{-0.6494355797767639, -0.9509614109992981, 2.230984926223755}, +{-0.23288340866565704, 0.28209030628204346, 0.09930805116891861}, +{-0.7020564675331116, -1.9281785488128662, -0.8070266842842102}, +{-0.072775699198246, 0.1259016990661621, -1.116469144821167}, +{-0.21587306261062622, 0.2841345965862274, 0.36679980158805847}, +{0.08000966906547546, 0.10875594615936279, -1.696642518043518}, +{-0.23518522083759308, -1.15705406665802, 2.3274996280670166}, +{-0.04548623785376549, -0.39047273993492126, -0.20388367772102356}, +{-0.9896796345710754, 1.641837477684021, 0.542549192905426}, +{-1.2090296745300293, 1.5573256015777588, 0.1798994094133377}, +{0.28135284781455994, 0.3178653419017792, -0.5967369079589844}, +{1.9175314903259277, -0.6606805324554443, 0.23043885827064514}, +{0.027467070147395134, 0.18958936631679535, -0.723411500453949}, +{0.24514247477054596, 0.1980157047510147, 0.5888027548789978}, +{0.6716282367706299, -0.6871854066848755, 0.6754403114318848}, +{0.4511471390724182, -0.5478281378746033, 1.0310779809951782}, +{-0.16646938025951385, 0.07706332206726074, -0.11818847060203552}, +{-1.0504428148269653, -1.7300491333007812, 1.6873726844787598}, +{0.01716371439397335, 0.48907166719436646, 1.1342597007751465}, +{-0.05236325040459633, 0.08106546849012375, 0.04711473360657692}, +{-2.5377402305603027, 0.5802818536758423, 0.4841540455818176}, +{-1.7595252990722656, 0.1393302083015442, 0.16644169390201569}, +{-0.4012376368045807, 0.2968023419380188, 0.2569196820259094}, +{0.40480566024780273, 0.017789307981729507, -1.567082405090332}, +{-2.778576374053955, -0.9649628400802612, 0.2344733029603958}, +{-0.7555615305900574, 0.35497722029685974, 0.3658263385295868}, +{3.948148488998413, 0.03682004660367966, -1.111742377281189}, +{0.13940951228141785, -0.43415749073028564, 1.6586898565292358}, +{0.36535030603408813, -0.31374281644821167, -0.41182318329811096}, +{-0.14073729515075684, -1.9345875978469849, -0.37666425108909607}, +{0.6123262047767639, 0.5322259664535522, -0.8536192774772644}, +{-0.7186235785484314, -0.4210444688796997, -0.274099737405777}, +{-1.9036483764648438, 0.5911264419555664, 0.3007856607437134}, +{-0.37832412123680115, -1.583740234375, -0.07864999026060104}, +{0.27892422676086426, 0.46752116084098816, -0.11223983764648438}, +{-0.3236388862133026, -0.8565214276313782, 0.9267280697822571}, +{-1.406067967414856, 0.34539994597435, -0.2900067865848541}, +{-0.2679230570793152, -0.8838344812393188, 0.5345838665962219}, +{0.9799333810806274, -0.9678974747657776, 0.096408911049366}, +{-0.8012883067131042, 0.3732577860355377, 0.08153198659420013}, +{0.6536955833435059, -0.28660568594932556, -0.04794785752892494}, +{1.529692530632019, 2.369760513305664, 0.7278096675872803}, +{0.6094935536384583, -0.1830783635377884, 0.3846309185028076}, +{0.6336996555328369, 0.2312936782836914, -0.5479574799537659}, +{0.5942596197128296, -1.3567073345184326, -2.195016622543335}, +{-1.0780067443847656, -1.0718709230422974, 0.058122940361499786}, +{-0.576438844203949, -0.04304436221718788, -0.014134961180388927}, +{1.5176851749420166, 1.0317286252975464, -0.46538931131362915}, +{-2.049898386001587, 1.1603974103927612, -0.8660481572151184}, +{0.2359185367822647, -0.1934870332479477, -0.38424861431121826}, +{2.4471511840820312, 0.9438983798027039, -0.9148597717285156}, +{0.07295329123735428, 1.4634909629821777, 1.4088473320007324}, +{0.6291994452476501, 0.057883892208337784, 0.3029451370239258}, +{0.008814227767288685, 1.4008538722991943, -1.1334125995635986}, +{-0.1692308485507965, -0.9891752004623413, 0.2001255601644516}, +{0.2041185051202774, -0.2204854041337967, -0.015803154557943344}, +{1.078710675239563, -0.9428069591522217, 0.10594555735588074}, +{0.09162493050098419, 1.5849086046218872, -1.024922490119934}, +{-0.31204748153686523, 0.3208199441432953, 0.6972668766975403}, +{0.5495902299880981, -1.179634690284729, 2.022771120071411}, +{-0.03996646776795387, 0.8617932200431824, 0.7394894957542419}, +{-0.09020005911588669, -0.1980803906917572, 0.8353984951972961}, +{0.29907602071762085, 0.999099612236023, 0.6794887781143188}, +{0.20379845798015594, 1.1249083280563354, 1.0769407749176025}, +{0.15530209243297577, -0.7919456958770752, 0.36860573291778564}, +{-0.8423983454704285, -1.2034605741500854, -0.41989338397979736}, +{1.0268487930297852, -1.9086884260177612, 0.28395989537239075}, +{0.11807553470134735, 0.07375872135162354, 0.20519469678401947}, +{-0.5507686138153076, -1.5930176973342896, 0.987289547920227}, +{-1.4184606075286865, 0.987413227558136, 1.2576234340667725}, +{0.6362811923027039, -0.09055359661579132, -0.7175500988960266}, +{-1.0469439029693604, -0.3338679373264313, -1.1666706800460815}, +{-1.2104783058166504, 0.2395894080400467, -1.1968992948532104}, +{0.26834338903427124, -0.4269298017024994, -0.3677230775356293}, +{-0.9326630234718323, -0.7423686385154724, 0.8303462266921997}, +{-1.1180862188339233, 0.598900556564331, -1.203774333000183}, +{1.2144395112991333, 0.17652861773967743, 0.10755576938390732}, +{-3.2687478065490723, 0.9580140113830566, -1.8808605670928955}, +{-1.549830675125122, 0.6629247069358826, -1.1930813789367676}, +{0.3109171688556671, -0.12838007509708405, -0.31448325514793396}, +{-0.6261988282203674, -0.4816533029079437, 1.6557295322418213}, +{0.3263067603111267, 0.016081616282463074, -0.46346667408943176}, +{-0.11928972601890564, -0.004848683252930641, 0.033739883452653885}, +{1.6409931182861328, -0.4329812228679657, -1.393381953239441}, +{-1.0300893783569336, -1.1261693239212036, -0.7040577530860901}, +{0.05932563543319702, -0.20909728109836578, -0.2802727520465851}, +{0.4039490520954132, 0.5039653182029724, 0.7142937183380127}, +{0.1682737171649933, -0.31610751152038574, 0.6728744506835938}, +{-0.37232089042663574, 0.0987374410033226, 0.05283650755882263}, +{-0.48606765270233154, 2.412951946258545, 1.1721631288528442}, +{-1.9771647453308105, 0.5865335464477539, 0.316074013710022}, +{-0.287104070186615, -0.4102511703968048, -0.029818955808877945}, +{-1.7868984937667847, -0.39560097455978394, -1.872066617012024}, +{2.3736886978149414, -0.9844900369644165, -1.9761148691177368}, +{-0.25431299209594727, -0.027430666610598564, -0.7657761573791504}, +{-2.766570806503296, -1.0711992979049683, -1.9092272520065308}, +{2.3776941299438477, 0.29462653398513794, 0.49416384100914}, +{0.018785418942570686, 0.3463755249977112, -0.2463853806257248}, +{0.37169912457466125, 0.02172331139445305, -0.36304062604904175}, +{0.42884528636932373, -1.0829267501831055, -0.1409478634595871}, +{0.7782348394393921, 0.46598246693611145, 0.3225792646408081}, +{1.128805160522461, 0.3301166296005249, -0.6216011643409729}, +{2.029092788696289, 2.632826805114746, -1.8423291444778442}, +{-1.0587257146835327, -0.8105950951576233, 0.0384465791285038}, +{2.6847763061523438, -0.9499141573905945, 0.8593837022781372}, +{-0.3940897583961487, 2.2203235626220703, 0.1728270798921585}, +{-0.08323083072900772, 0.7462331056594849, 0.3611096441745758}, +{-0.0459333136677742, -0.267633318901062, 0.6917930841445923}, +{-0.5425665974617004, -0.2016220986843109, -0.6522939801216125}, +{-0.1472984254360199, -0.38466814160346985, -0.6062381267547607}, +{0.8739911317825317, 0.901477038860321, -1.3279902935028076}, +{-0.7164652347564697, -0.9655076265335083, -0.21248652040958405}, +{0.26653268933296204, 0.01054361741989851, -0.738865077495575}, +{0.16166532039642334, -0.15065152943134308, -1.269452452659607}, +{0.06535162031650543, -0.28203049302101135, -2.0758538246154785}, +{-0.19034235179424286, -1.0914729833602905, 0.2731507122516632}, +{-0.7392172813415527, 0.10661574453115463, 0.05623927339911461}, +{-0.6511049866676331, -2.2375781536102295, -0.7788089513778687}, +{0.36884480714797974, 0.21714317798614502, -0.12779971957206726}, +{0.2136153280735016, 0.5962923169136047, 0.48378708958625793}, +{1.1639021635055542, 0.9659562110900879, -0.038659244775772095}, +{0.20460569858551025, 0.21552880108356476, -0.09508900344371796}, +{-0.8893809914588928, 0.9304407835006714, -1.1046801805496216}, +{0.22891700267791748, -0.484707772731781, 0.23450501263141632}, +{-0.6507701873779297, -0.18746955692768097, 0.05878731980919838}, +{-0.7041249871253967, 0.2285183072090149, 1.9733514785766602}, +{0.4699050188064575, 0.1669396013021469, 0.269808292388916}, +{0.19330430030822754, 0.3070663511753082, 0.12048782408237457}, +{-0.059056587517261505, 1.7695140838623047, 0.3318970799446106}, +{0.3074987232685089, -0.5526771545410156, 1.254717230796814}, +{0.27237579226493835, -0.4187558591365814, 0.6938673853874207}, +{-0.1880675107240677, -2.0364935398101807, 2.2494759559631348}, +{-1.0132743120193481, -0.7645686864852905, -1.3723509311676025}, +{-0.17619925737380981, -0.18108390271663666, -0.406385213136673}, +{-0.5458329319953918, -0.6653494834899902, -1.3454357385635376}, +{1.1678950786590576, 0.0669935792684555, 0.45233044028282166}, +{0.22086341679096222, -0.15143607556819916, -0.2041121870279312}, +{0.6531261801719666, -1.0486215353012085, 0.6563120484352112}, +{-0.26778826117515564, 0.4103637635707855, 0.9751296043395996}, +{-0.005587256979197264, -0.11460714787244797, -0.2681136131286621}, +{0.5459777116775513, -0.9063416123390198, 0.4769461154937744}, +{-0.4220047891139984, -1.1037402153015137, -0.49415767192840576}, +{0.16289952397346497, -0.1607832908630371, -0.3857499361038208}, +{0.33606740832328796, 2.1533238887786865, -1.0390245914459229}, +{2.2256968021392822, -1.5830492973327637, -0.8932647109031677}, +{-0.004443094599992037, 0.11744214594364166, 0.10714872181415558}, +{0.11004982888698578, 0.46960335969924927, -0.6257995963096619}, +{1.0255173444747925, 0.4948396682739258, 0.29078105092048645}, +{0.3845123052597046, -0.2978884279727936, 0.09612266719341278}, +{0.03742514178156853, 1.142905831336975, 0.13156862556934357}, +{0.9112961888313293, -1.4751157760620117, -0.6481674909591675}, +{0.0899551659822464, 0.2643386423587799, -0.2621690630912781}, +{-0.4349253177642822, 1.147469162940979, 0.49345266819000244}, +{1.2437788248062134, -1.2455579042434692, -0.888480007648468}, +{0.4112609028816223, -0.5902150869369507, -0.08102912455797195}, +{0.2721579074859619, -0.2585594356060028, -0.07126418501138687}, +{0.4959636926651001, -0.6834309101104736, 1.9463176727294922}, +{0.1584082692861557, -0.043548837304115295, 0.20126977562904358}, +{0.5924654603004456, -0.3668498992919922, -2.1052167415618896}, +{-1.2387912273406982, 1.311050534248352, 0.051727041602134705}, +{-0.1492157131433487, -0.012267631478607655, 0.6124968528747559}, +{-1.7356417179107666, 0.3407811224460602, 0.36562055349349976}, +{-0.47679147124290466, 0.1275792270898819, -0.6208001375198364}, +{-0.02187245339155197, -0.2309122085571289, 0.07701852172613144}, +{0.7373022437095642, -1.29656982421875, 0.5122990608215332}, +{-0.4209674596786499, 0.11988367885351181, 1.2758114337921143}, +{0.5469776391983032, -0.04931125044822693, -0.05039098486304283}, +{0.3782052993774414, 1.3029557466506958, -1.0027110576629639}, +{1.6883575916290283, -0.15777082741260529, -0.47110503911972046}, +{-0.6273480653762817, -0.017266444861888885, 0.34430867433547974}, +{-1.467455267906189, 1.9164317846298218, 3.081993818283081}, +{2.513728380203247, -1.2013078927993774, 0.9570307731628418}, +{-0.14572922885417938, -0.7671549916267395, -0.0451439768075943}, +{0.42047977447509766, -2.237774610519409, -0.12401016056537628}, +{-0.8640867471694946, 1.1462050676345825, 0.7278141975402832}, +{-0.15700416266918182, -0.4650890827178955, -0.2009248584508896}, +{-1.5023447275161743, 1.5669618844985962, 0.9410427808761597}, +{-0.6241052150726318, 0.512225329875946, -2.7707419395446777}, +{-0.31263700127601624, -0.530640721321106, 0.12450490146875381}, +{-0.03243546932935715, -1.0803632736206055, -0.05200104042887688}, +{-0.7041617035865784, 0.02309134230017662, 0.15153609216213226}, +{0.6862853169441223, -0.16692383587360382, 0.01878107525408268}, +{0.432084321975708, 2.0491790771484375, -0.11279734969139099}, +{0.9422800540924072, -0.28769177198410034, -1.0296052694320679}, +{-0.8003067374229431, 0.39497116208076477, 0.2111319899559021}, +{-0.452644944190979, -0.29318901896476746, -1.5830423831939697}, +{0.9683270454406738, -1.6423388719558716, 0.9111502766609192}, +{0.1913144290447235, 0.04062509909272194, -0.6606177091598511}, +{-0.38350656628608704, 0.13445809483528137, 1.0869061946868896}, +{-0.5726221203804016, 0.16032059490680695, 1.8291425704956055}, +{-0.25949808955192566, 0.5062633156776428, -0.14956702291965485}, +{-0.1276778131723404, 1.624724268913269, 1.2709118127822876}, +{-1.8010700941085815, 0.9763959050178528, -0.3887098431587219}, +{0.07066147029399872, -0.03450144827365875, -0.032878898084163666}, +{-0.6366595029830933, 0.7751282453536987, 0.8715413212776184}, +{-0.8969981074333191, -1.907193660736084, 0.1166577935218811}, +{0.02744372934103012, 0.31766611337661743, 0.040116894990205765}, +{-0.5683591961860657, -1.645837664604187, 0.3930128216743469}, +{-1.8929775953292847, 1.4816948175430298, -0.244949609041214}, +{-0.6811400651931763, 0.33582139015197754, 0.30044251680374146}, +{2.583332061767578, -0.947842538356781, 0.12644459307193756}, +{-0.15439656376838684, -0.4695025682449341, 2.0977702140808105}, +{0.49947020411491394, 0.5342103242874146, 0.2701653838157654}, +{1.893744707107544, 0.7085595726966858, -0.7147294878959656}, +{-1.6132533550262451, -0.7125840187072754, -0.26286160945892334}, +{0.10127008706331253, 0.005166560877114534, -0.1476503610610962}, +{-0.39048928022384644, 0.4960867762565613, -0.46122029423713684}, +{1.88155996799469, -1.7436933517456055, 0.8949451446533203}, +{-0.7528080940246582, 0.4778420925140381, -0.012391112744808197}, +{0.1161734014749527, 0.5822556614875793, 0.10825412720441818}, +{0.09580601751804352, 0.8011970520019531, 0.034228768199682236}, +{0.3081529438495636, -0.5334154367446899, -0.41337913274765015}, +{0.10990892350673676, 0.24021589756011963, -0.6946590542793274}, +{-0.4477156102657318, -0.3352023959159851, 0.22822025418281555}, +{0.7379423379898071, 0.6007155179977417, -0.0037505128420889378}, +{-0.006352749653160572, 0.22864936292171478, 0.6181173324584961}, +{1.2786688804626465, -0.20000196993350983, -0.1671292632818222}, +{0.3500392436981201, -0.09244491159915924, -0.2221975177526474}, +{-0.8335962891578674, -1.1533674001693726, 1.1251038312911987}, +{-0.49539756774902344, -0.9379491806030273, -0.1562831848859787}, +{0.33238062262535095, -0.014720482751727104, 0.7782352566719055}, +{0.7931318283081055, -0.26318788528442383, 1.135599970817566}, +{0.5951030850410461, 0.37129732966423035, 1.5282642841339111}, +{0.17811623215675354, 0.5318229794502258, 0.051191236823797226}, +{0.9306681752204895, 0.9879857301712036, -0.42040741443634033}, +{0.628102719783783, 0.4310897886753082, 1.216976523399353}, +{0.671090841293335, -0.13205790519714355, 0.21791835129261017}, +{0.0070339469239115715, 1.287365436553955, 1.5136826038360596}, +{-0.604766845703125, -0.39700695872306824, 0.020123256370425224}, +{0.3248845040798187, 0.5977877974510193, 0.6505368947982788}, +{0.05938606336712837, 2.1373445987701416, 1.8864465951919556}, +{0.7421141862869263, 0.914301872253418, 0.43849003314971924}, +{0.5036876797676086, 0.022067414596676826, -0.5784108638763428}, +{-0.1410316526889801, 0.5700569748878479, -1.7907390594482422}, +{-0.7252503037452698, 1.4321165084838867, -1.2247258424758911}, +{-0.6749296188354492, -0.4212835431098938, -0.6385661363601685}, +{-1.7399067878723145, 0.06737644970417023, -0.7164433598518372}, +{1.6242802143096924, -1.32787024974823, -0.42773106694221497}, +{0.31050726771354675, -0.24008779227733612, 0.6944953799247742}, +{1.413068413734436, 0.9766321778297424, 1.8299369812011719}, +{-0.11495040357112885, -1.9256788492202759, 0.16450197994709015}, +{0.06092501059174538, 0.19240137934684753, -0.02081981673836708}, +{-1.1388541460037231, -0.9071017503738403, -0.07095485180616379}, +{0.05261703580617905, 0.09469207376241684, -0.11250737309455872}, +{0.31236472725868225, 0.055763084441423416, 0.15143197774887085}, +{-1.382777214050293, 0.08060957491397858, 0.1273827850818634}, +{0.30927741527557373, -0.020105494186282158, 1.5899986028671265}, +{-0.6569291353225708, -0.3734842538833618, 0.0815126970410347}, +{-1.9046409130096436, -0.6896768808364868, 0.7516724467277527}, +{-3.561098098754883, -0.3596421182155609, 1.7058923244476318}, +{0.3192375898361206, -0.31017929315567017, -0.11192557215690613}, +{0.3931695818901062, 2.2507994174957275, 0.45727771520614624}, +{3.1847431659698486, 0.004399958997964859, -1.4282515048980713}, +{-0.29109659790992737, -0.341680645942688, -0.7409290671348572}, +{2.2863752841949463, -1.3771517276763916, 0.24644504487514496}, +{-2.8065147399902344, 2.873783588409424, 0.3492884337902069}, +{-0.6355088353157043, 0.4783654808998108, 0.47752800583839417}, +{0.34684985876083374, -0.07620096951723099, -2.219475507736206}, +{-0.2654745280742645, 0.22593699395656586, -0.6498739123344421}, +{0.3363572657108307, 0.2062361091375351, -0.0249654371291399}, +{0.6912697553634644, 1.4886735677719116, -0.14529858529567719}, +{0.2555778920650482, -0.10847079753875732, 0.06484964489936829}, +{0.35258644819259644, -0.1606348603963852, 0.4983467161655426}, +{-1.3354920148849487, 0.343111515045166, 1.1759957075119019}, +{-0.015737472102046013, 0.6341428160667419, 0.6601419448852539}, +{0.3286740779876709, 0.6382980942726135, -0.16208145022392273}, +{0.5642145276069641, 0.7799229025840759, -0.21473632752895355}, +{1.486225962638855, 1.372672438621521, 0.16715358197689056}, +{-0.48769068717956543, -0.08409702777862549, -0.09071499854326248}, +{-0.034862689673900604, -0.28184863924980164, -0.09192319214344025}, +{-1.5277208089828491, 0.1937454640865326, -0.16780219972133636}, +{-0.39946120977401733, -0.13026008009910583, -0.17572148144245148}, +{-0.054977115243673325, -0.17194543778896332, 0.4093879759311676}, +{-2.9141592979431152, -0.34362587332725525, -0.44809794425964355}, +{-0.35636091232299805, -0.14951029419898987, 0.17751680314540863}, +{0.9630304574966431, -1.1618002653121948, 1.8279587030410767}, +{0.4367646276950836, -0.5245550870895386, 0.4906780421733856}, +{-0.18893088400363922, -0.11749516427516937, -0.0009920882293954492}, +{1.1940513849258423, -0.2521418333053589, 0.8494338393211365}, +{0.2412543147802353, 1.4104329347610474, -0.06066621467471123}, +{-0.2910427451133728, -0.41794347763061523, 0.11844700574874878}, +{1.3446192741394043, -0.12466929107904434, -0.5893222093582153}, +{-0.9068894386291504, 1.0148266553878784, -0.1319575011730194}, +{-0.14760801196098328, -0.2895287871360779, -0.17360204458236694}, +{0.1440809816122055, 1.2373262643814087, 1.9456251859664917}, +{1.022534966468811, 1.4352384805679321, -1.288901686668396}, +{0.2406349629163742, -0.19362501800060272, -0.27150318026542664}, +{-0.08401653170585632, -0.8299611806869507, 0.23181602358818054}, +{1.1304068565368652, -2.072206735610962, 0.665668249130249}, +{-0.32928600907325745, -0.4509661793708801, -0.3071485757827759}, +{0.8197237849235535, 0.46983838081359863, -0.30580171942710876}, +{1.2972015142440796, -0.4479255974292755, 0.45729103684425354}, +{-0.7377203702926636, -0.14973627030849457, -0.4702759385108948}, +{2.2613518238067627, -0.38922885060310364, -0.25927799940109253}, +{0.07193681597709656, 0.1901034414768219, -0.5729132890701294}, +{-0.19102123379707336, -0.2850390374660492, -0.18567144870758057}, +{-1.2609750032424927, 1.1816661357879639, -0.09684846550226212}, +{-0.9963430166244507, -0.8812257051467896, 2.850036859512329}, +{-0.42195621132850647, 0.13340558111667633, 0.1008293479681015}, +{-1.1662534475326538, 0.39486321806907654, -0.6797605156898499}, +{-0.09928850084543228, -0.14136604964733124, 0.24384869635105133}, +{-0.8934136629104614, -0.4478655159473419, -0.516928493976593}, +{-0.8236813545227051, -2.390655517578125, -2.6072659492492676}, +{-1.021061658859253, 0.3941733241081238, -1.8711611032485962}, +{-0.5126922130584717, 0.06424572318792343, -0.05665602907538414}, +{1.9245754480361938, 1.1483405828475952, -0.07400596886873245}, +{-1.7560807466506958, -0.7066892981529236, -2.6640686988830566}, +{-0.9341732263565063, -0.34963420033454895, 0.0487917996942997}, +{0.03651394322514534, 1.1310689449310303, -0.980341374874115}, +{-1.3355519771575928, 0.4609123468399048, 1.1940034627914429}, +{0.08795299381017685, -0.4631243646144867, 0.23516817390918732}, +{0.7294144034385681, 0.30047184228897095, 2.3601441383361816}, +{0.7830087542533875, 3.1161394119262695, -2.5612778663635254}, +{-0.22789691388607025, -0.3734772801399231, 0.5192499756813049}, +{-2.1261050701141357, -0.4067600965499878, 0.4255659580230713}, +{0.5611076354980469, 0.38372886180877686, -0.024499675258994102}, +{-0.13472995162010193, -0.6387026906013489, 0.3865502178668976}, +{0.7004455327987671, -3.3216896057128906, -0.5663669109344482}, +{-0.3707145154476166, 2.276978015899658, -0.29543837904930115}, +{-0.536432683467865, -0.1557741016149521, 0.1532936543226242}, +{0.30531400442123413, 2.747610092163086, -0.7481249570846558}, +{-0.060365039855241776, 0.5997200012207031, -0.9637912511825562}, +{0.314656138420105, 0.177008256316185, -0.12099029868841171}, +{-0.5140015482902527, 0.4290638267993927, -2.0083425045013428}, +{0.5646244883537292, -0.022974804043769836, -0.3047938644886017}, +{-0.3502081632614136, 0.3349493443965912, 0.1359928697347641}, +{0.6699255704879761, -0.23056448996067047, 1.035453200340271}, +{-1.5573265552520752, -0.8736845850944519, -0.2322671115398407}, +{0.7898190021514893, 0.06591478735208511, 0.4126393795013428}, +{-2.238175630569458, 1.995727300643921, -0.48118311166763306}, +{-1.0947620868682861, -0.9703373312950134, -2.4332594871520996}, +{0.7475672364234924, 0.5133898854255676, -0.12700986862182617}, +{1.4262614250183105, 0.19176623225212097, 0.5779035091400146}, +{1.3071752786636353, -0.4899677336215973, -3.384089708328247}, +{-0.08984309434890747, -0.36734452843666077, 0.2658855617046356}, +{-1.9830104112625122, -1.0901472568511963, -0.9335953593254089}, +{0.465910404920578, -0.42232292890548706, 0.8993545770645142}, +{0.5389429330825806, -0.449564665555954, -0.6481040716171265}, +{0.9591172337532043, -0.7849687933921814, 0.7768486738204956}, +{0.5774750709533691, -0.40202856063842773, -0.4522879719734192}, +{0.6738907098770142, -0.4715741276741028, 0.25507092475891113}, +{0.5488549470901489, -1.7247663736343384, 1.0105441808700562}, +{0.5707348585128784, 0.028747359290719032, 1.3115835189819336}, +{-0.4641648232936859, -0.6374822854995728, 0.4568712115287781}, +{0.8339200019836426, 0.8050389885902405, 0.7762609720230103}, +{-1.5599918365478516, -0.015437466092407703, -1.1396677494049072}, +{-0.3613828122615814, 0.18680284917354584, -0.08476997166872025}, +{2.6606850624084473, -1.0606484413146973, -0.9426119923591614}, +{-1.3114010095596313, -1.515736699104309, 2.8046634197235107}, +{0.60712730884552, 0.25384747982025146, -1.0699824094772339}, +{-0.006234489381313324, -0.6935146450996399, -0.00866149365901947}, +{1.9401084184646606, 0.43048569560050964, 0.102882981300354}, +{-0.6164020299911499, 0.3788885176181793, 0.8067459464073181}, +{-1.6201395988464355, -0.3811001479625702, -0.30095863342285156}, +{1.3176811933517456, 0.644835352897644, 0.42257365584373474}, +{0.4447213411331177, 0.12827879190444946, 0.3002256751060486}, +{0.8822354674339294, 0.4001525640487671, 1.087350606918335}, +{0.8313015699386597, -0.3473769426345825, 0.6359043717384338}, +{0.08929700404405594, -0.11975423991680145, -0.32337233424186707}, +{-0.21854321658611298, 0.508640706539154, -0.612575352191925}, +{-0.604489803314209, 2.6734657287597656, 0.7223615050315857}, +{0.15746240317821503, -0.19038569927215576, 0.47381591796875}, +{2.347745418548584, 3.344562530517578, 1.5014281272888184}, +{1.030508041381836, 1.566102385520935, 0.8702991008758545}, +{0.07756341993808746, 0.4812716841697693, 0.056677546352148056}, +{-0.7442460060119629, 1.662518858909607, -0.3429187834262848}, +{-0.5943694710731506, -0.04731864482164383, 1.3895723819732666}, +{-0.16914519667625427, -0.08648654818534851, 0.23177938163280487}, +{0.570463240146637, -1.9805750846862793, -0.21998640894889832}, +{0.7840962409973145, -0.5302338004112244, -1.5802894830703735}, +{0.03368630260229111, -0.21979887783527374, -0.05341295152902603}, +{-2.1211109161376953, 1.2021169662475586, 0.14872294664382935}, +{-0.4592795670032501, -2.3618314266204834, 0.485691636800766}, +{-0.5926448106765747, -0.24788278341293335, 0.15930472314357758}, +{-0.11024655401706696, 0.04513942450284958, 0.19285956025123596}, +{-0.6559587121009827, -0.6071740984916687, 0.5718949437141418}, +{-0.48600807785987854, 0.12594985961914062, 0.3404114246368408}, +{-0.170948326587677, 2.518338203430176, 0.680557370185852}, +{0.4524707496166229, 0.003508246038109064, 2.1390347480773926}, +{-0.05109737813472748, -0.13269035518169403, -0.5121294260025024}, +{-0.12339315563440323, 1.434556245803833, -0.6298602819442749}, +{0.5105658173561096, -1.9389897584915161, -1.6337987184524536}, +{-0.18601293861865997, -0.844677746295929, -0.14598356187343597}, +{0.1748896837234497, 1.3783072233200073, 0.5425540804862976}, +{-1.2902969121932983, -2.373324394226074, -2.01963210105896}, +{0.09707672148942947, -0.21574175357818604, 0.14977268874645233}, +{0.6954144239425659, 1.4209909439086914, -0.5813193321228027}, +{0.4980740249156952, -1.6244478225708008, 0.16607846319675446}, +{-0.23955176770687103, 0.12989559769630432, -0.19025397300720215}, +{0.5581144690513611, -0.04285877197980881, -0.7116366624832153}, +{-1.7543184757232666, -1.072594165802002, 0.5262075066566467}, +{0.34277865290641785, 0.671793520450592, -0.4395493268966675}, +{3.256218671798706, -1.5642224550247192, -0.6229754090309143}, +{-3.965564727783203, 0.2789347469806671, -0.45380711555480957}, +{-0.605977475643158, -0.02157686837017536, 0.58025062084198}, +{0.8432276844978333, -1.3564674854278564, 2.4828898906707764}, +{-3.00605845451355, -1.3463865518569946, 0.2969173491001129}, +{-0.290365070104599, 0.18814809620380402, -0.25839194655418396}, +{0.7771692276000977, 1.0458483695983887, -0.9657662510871887}, +{1.2430866956710815, 0.25890880823135376, 0.5525074005126953}, +{-0.5771448016166687, 0.15907838940620422, 0.4254228174686432}, +{-0.3792189657688141, 1.9194096326828003, 1.0368508100509644}, +{0.16626235842704773, -0.7870262861251831, -0.1345154047012329}, +{-0.2421053797006607, -0.46249619126319885, 0.19909782707691193}, +{-0.9942073822021484, -0.14898347854614258, 0.418140709400177}, +{-0.3286512494087219, -0.756685733795166, 0.3122982978820801}, +{-0.3895150125026703, 0.8319537043571472, -0.28061598539352417}, +{0.6125504374504089, 0.9460018873214722, -0.039834413677453995}, +{-0.8192551136016846, -0.15266722440719604, -0.12186872214078903}, +{0.5329774618148804, 0.3977210521697998, 0.5045924782752991}, +{0.4324186444282532, 0.5963903069496155, 0.36176642775535583}, +{0.7655956745147705, 0.11503176391124725, 0.5726991891860962}, +{-0.4486047625541687, 0.057794831693172455, -0.2513596713542938}, +{0.4209991991519928, -1.1913996934890747, -0.24238979816436768}, +{1.3862152099609375, -1.3634860515594482, 0.6742067933082581}, +{0.8775848150253296, -0.1843588501214981, -0.22783350944519043}, +{0.9445410966873169, 1.0997484922409058, 0.740622341632843}, +{-0.6523793935775757, -1.3859226703643799, -0.13121987879276276}, +{0.4277832806110382, 0.09421655535697937, -0.40159621834754944}, +{0.786708414554596, 0.7971466183662415, -2.503087282180786}, +{1.4316555261611938, -2.8985040187835693, -0.8986732959747314}, +{-0.5688917636871338, -0.19228781759738922, -0.10246072709560394}, +{-1.277855396270752, -0.6241584420204163, 0.2389712631702423}, +{-0.8786401152610779, 0.6686594486236572, 0.5748103857040405}, +{0.713729977607727, -0.1173354908823967, 0.3346415162086487}, +{1.046966314315796, -0.9569786787033081, -0.3965923488140106}, +{0.16486965119838715, -2.086735248565674, -0.1781647503376007}, +{0.13663537800312042, 0.45419320464134216, -0.11530298739671707}, +{-0.05336941033601761, 1.0082368850708008, 0.5717298984527588}, +{0.39152687788009644, 2.076029062271118, 0.11404254287481308}, +{-0.5492193102836609, 0.10767979919910431, -0.05763211101293564}, +{-0.7751637101173401, 0.5337408781051636, 3.3416948318481445}, +{-1.132557988166809, -1.2710708379745483, 0.7286723852157593}, +{-0.321913480758667, -0.19285891950130463, -0.4975690245628357}, +{1.3089290857315063, 0.6175349950790405, 0.6308634877204895}, +{0.22450368106365204, -0.07992566376924515, -0.08455732464790344}, +{-0.5180381536483765, 1.1932021379470825, 0.0012741726823151112}, +{-0.046321477741003036, -0.6035796403884888, 0.8996699452400208}, +{-0.0417545922100544, -1.0069812536239624, 0.9925459623336792}, +{0.37708616256713867, -0.5693784356117249, -0.42539188265800476}, +{0.519351065158844, -2.0907297134399414, -1.3920618295669556}, +{-0.5018038749694824, -1.7088760137557983, -0.25128117203712463}, +{-0.14386165142059326, 0.051591161638498306, 0.0504787340760231}, +{-1.7891250848770142, -0.45455989241600037, 2.413365364074707}, +{0.7913916110992432, -0.7492114901542664, -1.3645614385604858}, +{0.06081165373325348, 0.4269244968891144, -0.17005223035812378}, +{-1.102569580078125, 0.905943751335144, -0.15402670204639435}, +{-0.826580822467804, 1.748356580734253, -0.9774469137191772}, +{-0.32162803411483765, -0.5456570982933044, -0.6899834871292114}, +{0.2524794638156891, -0.4093262255191803, -0.6468973755836487}, +{-0.14847663044929504, -0.6922493577003479, -2.340735912322998}, +{-0.6503860950469971, -0.16128700971603394, 0.5295544862747192}, +{1.8278393745422363, 1.1171469688415527, -1.0953420400619507}, +{-3.1136529445648193, 0.13394711911678314, -1.4934407472610474}, +{-0.40474286675453186, 0.06442945450544357, -0.7789009213447571}, +{-0.2669019103050232, -0.9365489482879639, -0.3955596685409546}, +{-0.523987889289856, 0.9315335154533386, -0.8914346098899841}, +{0.3147777318954468, 0.14635804295539856, 0.016820870339870453}, +{2.185634136199951, 2.334803819656372, 2.886209487915039}, +{2.5096523761749268, -0.5536103844642639, 1.344260573387146}, +{-0.1453700065612793, 0.017093049362301826, 0.14326371252536774}, +{-0.1036638468503952, 0.49544936418533325, 0.00265508983284235}, +{-2.2243950366973877, 0.6194326877593994, 0.2068321257829666}, +{-0.6104834079742432, -0.29725831747055054, -0.005844626110047102}, +{-0.40660181641578674, -1.801286220550537, -0.603787362575531}, +{0.82598876953125, 1.8477656841278076, -0.25731268525123596}, +{0.07511058449745178, 0.17757602035999298, 0.145687535405159}, +{1.5149775743484497, 1.563069224357605, -0.8871836066246033}, +{-2.4843647480010986, 0.4744530916213989, 1.2235981225967407}, +{-0.021094748750329018, 0.2816835641860962, 0.04503895714879036}, +{1.0576037168502808, 1.4029191732406616, 0.995098352432251}, +{0.7556219696998596, -0.5742015242576599, -1.2519160509109497}, +{0.8076429963111877, 0.3259798288345337, 0.17739851772785187}, +{-0.348499059677124, 1.8243337869644165, -0.8549973368644714}, +{1.2393391132354736, 1.1879651546478271, -0.6941096186637878}, +{0.5539050698280334, 0.4446403682231903, 0.5321936011314392}, +{0.6313415169715881, 0.07080141454935074, 0.2867526412010193}, +{-2.9867186546325684, 0.6143251061439514, -0.19339661300182343}, +{0.27860790491104126, -0.40109875798225403, 1.0959258079528809}, +{-0.356326699256897, -1.3937954902648926, 1.2011539936065674}, +{0.8997384905815125, -0.5885680913925171, 1.7021677494049072}, +{0.00037411146331578493, -0.25402045249938965, 0.27692297101020813}, +{-0.4737793803215027, 1.0198112726211548, 0.3051304817199707}, +{-1.2533469200134277, -0.4943334460258484, -1.2220717668533325}, +{0.1775570660829544, -0.3446560502052307, 0.187270849943161}, +{0.027332432568073273, 0.3764398396015167, 0.24233533442020416}, +{0.8277716040611267, -0.7207159399986267, -2.075427293777466}, +{0.012055531144142151, 0.16833391785621643, 0.26610907912254333}, +{0.5567678809165955, -1.1607199907302856, -1.0044991970062256}, +{0.5166748762130737, 1.0495103597640991, -1.880434274673462}, +{-0.3962244689464569, -0.057005610316991806, 0.41992542147636414}, +{0.5714840888977051, 0.7101445198059082, 0.02406252734363079}, +{-1.3318299055099487, -0.7295316457748413, -0.16446664929389954}, +{-0.1493867039680481, 0.09593088179826736, 0.2183944433927536}, +{-1.1521034240722656, 0.9872470498085022, 0.0909121111035347}, +{-1.6487184762954712, 1.5027812719345093, -0.27823904156684875}, +{-0.697002649307251, -0.3447813093662262, 0.40034449100494385}, +{-0.922837495803833, -1.1924418210983276, 1.1698651313781738}, +{-1.5684292316436768, -1.9192572832107544, -1.0809625387191772}, +{-0.06464259326457977, 0.11090300232172012, 0.3070729076862335}, +{-2.3452067375183105, -0.3928219676017761, -0.05594731494784355}, +{-0.09701082855463028, -0.3262048363685608, 1.7863800525665283}, +{0.15998007357120514, 0.5687448978424072, 0.4806946814060211}, +{-0.28742697834968567, 0.4782303273677826, 0.4153297245502472}, +{0.6171497106552124, 0.7447525858879089, 0.2044101059436798}, +{-0.12319010496139526, 0.5514431595802307, 0.5643701553344727}, +{-1.5953342914581299, -0.6195645332336426, 2.5695693492889404}, +{-0.9428330063819885, 1.9073715209960938, -1.4456181526184082}, +{-0.24315032362937927, -0.03221454471349716, 0.01505996659398079}, +{-0.15157738327980042, 0.1475210189819336, -0.28359246253967285}, +{-0.09820602834224701, 0.06780965626239777, 0.2735804617404938}, +{0.3002607524394989, 0.12209969013929367, -0.006723068654537201}, +{-1.3021867275238037, 0.02746022865176201, 0.48581403493881226}, +{2.255216598510742, -0.7667343616485596, 1.3426766395568848}, +{0.06806537508964539, 0.03357664495706558, -0.044587891548871994}, +{1.1009178161621094, -1.9621543884277344, -0.11975356191396713}, +{0.35301026701927185, 1.4740310907363892, 0.5311957001686096}, +{0.6286545991897583, 0.47120216488838196, 0.1960853785276413}, +{0.823056161403656, 0.34871912002563477, 0.3213641941547394}, +{0.7115134596824646, 0.7109269499778748, 0.060737743973731995}, +{0.22373202443122864, 0.8903642892837524, -0.06793900579214096}, +{-0.46865513920783997, 0.7777960896492004, -0.6976194977760315}, +{-0.5659520626068115, 0.6969572901725769, -1.770654320716858}, +{-0.07637077569961548, 0.30263271927833557, -0.504554033279419}, +{0.7133068442344666, -0.7540821433067322, 1.4162899255752563}, +{1.3971447944641113, 0.2737358808517456, -0.23265719413757324}, +{-0.2616438865661621, 0.6495674252510071, 0.07816451787948608}, +{1.7023942470550537, -1.005321979522705, 2.252528190612793}, +{0.08795593678951263, -2.2475790977478027, -0.8311958312988281}, +{0.36025404930114746, 0.5419203042984009, 0.29883918166160583}, +{0.9278594851493835, 0.4825378954410553, -0.37084317207336426}, +{-1.3989894390106201, 1.6075146198272705, 0.018831444904208183}, +{-0.03806208074092865, -0.9235990047454834, -0.4701652526855469}, +{-0.8538227081298828, 2.7630298137664795, 0.5266278982162476}, +{-1.5160105228424072, 3.009249210357666, 0.467113196849823}, +{-0.0717351958155632, -0.6201600432395935, 0.08351507782936096}, +{0.18258576095104218, -0.31812116503715515, -0.00457564415410161}, +{0.09515593945980072, -0.3789816200733185, -0.45880407094955444}, +{0.18537232279777527, -0.45266345143318176, -0.10852324962615967}, +{1.2181223630905151, 0.9573623538017273, 0.7168677449226379}, +{0.36802393198013306, -0.07110648602247238, -2.455305576324463}, +{0.2338598370552063, 0.12311386317014694, -0.291044145822525}, +{0.4848526418209076, -0.7543709874153137, -1.0260672569274902}, +{-0.5329539179801941, -0.1495746672153473, 0.5376531481742859}, +{0.0055718435905873775, -0.13165363669395447, -0.3079197108745575}, +{-1.7745566368103027, 0.022228114306926727, -0.5058084726333618}, +{2.7108750343322754, -0.5632480978965759, -3.0136139392852783}, +{0.053654592484235764, -0.13268128037452698, 0.04526800662279129}, +{-0.24766622483730316, -0.3299068212509155, 0.5686864852905273}, +{0.04857860878109932, 1.6150343418121338, -1.6161202192306519}, +{0.2561131715774536, 0.4009581506252289, -0.271157443523407}, +{-1.2219473123550415, 1.0400002002716064, 0.6307726502418518}, +{0.3988606631755829, -1.2671246528625488, 0.27685073018074036}, +{-0.18354080617427826, 0.4629862606525421, 0.20811490714550018}, +{-0.9288906455039978, 1.5844675302505493, -1.9607908725738525}, +{-0.0333557054400444, -0.8082621097564697, -1.6472158432006836}, +{-0.029334349557757378, -0.17775790393352509, 0.0965714231133461}, +{-0.22920860350131989, -1.2450703382492065, 0.28014785051345825}, +{-0.06021475791931152, 0.5223556756973267, -0.5715624094009399}, +{-0.08415932208299637, -0.07024460285902023, -0.1731734275817871}, +{2.391533613204956, 1.9898688793182373, -1.23516845703125}, +{-0.41655611991882324, 0.7070897221565247, 0.7298187613487244}, +{0.25553104281425476, -0.2327389270067215, 0.24953892827033997}, +{-0.8583917021751404, -1.0873124599456787, 0.20851635932922363}, +{0.1489545702934265, 1.258291244506836, 0.5487199425697327}, +{0.20237170159816742, 0.23263287544250488, -0.07422872632741928}, +{-1.7538230419158936, -0.4117410480976105, 2.847606658935547}, +{-0.2140987068414688, -0.7630223631858826, 0.7169916033744812}, +{0.7634281516075134, -0.4812444746494293, -0.23284751176834106}, +{-1.647420048713684, -0.5347461104393005, -0.6715999841690063}, +{1.1496901512145996, -0.1000891700387001, -1.7511467933654785}, +{-0.14553053677082062, -0.16591550409793854, -0.49197274446487427}, +{1.6394445896148682, -1.0744549036026, -1.6987122297286987}, +{0.05704460293054581, -0.0675356388092041, 1.9392484426498413}, +{-0.19151842594146729, -0.24423879384994507, -0.4828576445579529}, +{0.9937573075294495, -1.472931981086731, 0.49752745032310486}, +{-0.9072443246841431, 0.19451314210891724, -0.7531191110610962}, +{0.09029579162597656, 0.2483927458524704, -0.39068400859832764}, +{0.003603402990847826, 0.29225143790245056, 0.5248706340789795}, +{0.06865213811397552, -0.35035455226898193, -1.4989908933639526}, +{-0.6016660332679749, -0.05346103012561798, -0.399933397769928}, +{-0.16287864744663239, 0.866797149181366, 0.3805488049983978}, +{-0.9612628221511841, -0.4962644577026367, -0.7492592334747314}, +{-0.3294391930103302, -0.4290926158428192, -0.41082438826560974}, +{0.08977814763784409, 0.1644359827041626, -0.10330286622047424}, +{-0.5811731815338135, -0.05856294557452202, -1.484707236289978}, +{-0.1643604338169098, -0.08975788205862045, -0.6025073528289795}, +{0.44484442472457886, 1.7420910596847534, 2.8370728492736816}, +{-1.1602061986923218, -0.3769180476665497, -1.527936339378357}, +{-0.09912565350532532, 0.3334895372390747, 0.2238711267709732}, +{-0.5813807249069214, -3.206937789916992, -1.120588779449463}, +{0.6361451148986816, 0.8309734463691711, 0.6174685955047607}, +{-0.2425364851951599, -0.08920218795537949, 0.606300413608551}, +{-0.5069741606712341, -0.5440882444381714, 1.1779519319534302}, +{-0.31348198652267456, -0.4711894094944, 0.5879424214363098}, +{-0.23140130937099457, -0.31249746680259705, 0.025221874937415123}, +{-0.45987385511398315, 0.007272408343851566, 0.0018288139253854752}, +{1.5357929468154907, 0.02694380283355713, 2.0353283882141113}, +{-0.2512909770011902, 0.29516106843948364, -0.4942113161087036}, +{1.2816882133483887, 0.13478298485279083, -0.9654635787010193}, +{0.7554628252983093, -0.9094260931015015, -0.9124767184257507}, +{-0.25994372367858887, 0.21992850303649902, 0.30559974908828735}, +{-0.30811387300491333, -0.39038220047950745, 0.3213713467121124}, +{0.06999795883893967, -1.557888150215149, 0.20494340360164642}, +{-0.1899365335702896, 0.18617583811283112, -0.6417786478996277}, +{0.1528812199831009, 0.9779233932495117, 0.1286512166261673}, +{0.04798207804560661, 3.1133580207824707, 1.3349790573120117}, +{0.34859102964401245, -0.17055708169937134, 0.6214092969894409}, +{-0.20794011652469635, 2.068535327911377, -1.0092742443084717}, +{0.3173573315143585, 0.48818445205688477, -0.728687584400177}, +{-0.37603214383125305, 0.012835337780416012, 0.22022223472595215}, +{-1.495060682296753, 0.3236982226371765, 0.09842183440923691}, +{-0.23569566011428833, 1.0294878482818604, 0.23614375293254852}, +{0.5303937792778015, -0.1902388036251068, -0.03158196806907654}, +{0.17368413507938385, -5.574008173425682e-05, -0.11316879093647003}, +{-1.1921660900115967, 0.6855078935623169, 0.041302528232336044}, +{0.45157307386398315, -0.28272613883018494, 0.03646888583898544}, +{1.7738536596298218, 0.8907960057258606, 0.21891047060489655}, +{-0.1805112659931183, -0.769061267375946, 0.015126966871321201}, +{-0.05841642618179321, -0.8727020025253296, 0.32594937086105347}, +{-0.19846779108047485, -1.1690995693206787, -0.5607279539108276}, +{2.02852201461792, -1.1120857000350952, 0.2546757161617279}, +{-0.6364814043045044, 0.2209213227033615, 0.07582434266805649}, +{-0.06315483152866364, 2.1330406665802, -0.15822939574718475}, +{0.1822308450937271, -0.3194391429424286, -1.6921807527542114}, +{0.31863969564437866, 0.10725727677345276, -0.0627882108092308}, +{-0.8789733052253723, -0.08036720752716064, -0.3863731920719147}, +{-0.4948175251483917, 1.2663233280181885, 0.9486490488052368}, +{0.02816351316869259, 0.4341794550418854, -0.15615715086460114}, +{-1.2555376291275024, -1.6651421785354614, 0.7921218872070312}, +{-1.548466682434082, -0.08676192164421082, -3.233579158782959}, +{-0.5324714779853821, -0.018759967759251595, 0.2663027048110962}, +{-1.0134766101837158, -1.9003024101257324, -0.10355617105960846}, +{0.9215923547744751, 0.36537590622901917, -0.11172513663768768}, +{0.2010696530342102, -0.20744748413562775, -0.23781080543994904}, +{0.48725154995918274, -0.4836007356643677, -0.2723504602909088}, +{-0.509174644947052, 0.4035693407058716, -0.16394571959972382}, +{-0.21196900308132172, -0.7453299164772034, -0.13533757627010345}, +{0.8556456565856934, -2.1598496437072754, -0.10307150334119797}, +{-0.8525335192680359, -0.6786468625068665, 0.9084988236427307}, +{0.6414399147033691, -0.07462581247091293, -0.21175545454025269}, +{0.9488096237182617, -0.6014013290405273, -0.5135636329650879}, +{-0.6434828042984009, 0.8659427165985107, 0.8562718629837036}, +{0.01769309677183628, 0.09977538883686066, 0.5973984599113464}, +{1.0179673433303833, -0.34892892837524414, -0.07046936452388763}, +{-1.2427973747253418, -1.1934082508087158, 2.1282362937927246}, +{-0.5003047585487366, -0.2963555157184601, -0.8117982745170593}, +{-1.1336368322372437, -0.9197875261306763, -0.8102430701255798}, +{1.4807226657867432, -0.28433817625045776, -2.4557135105133057}, +{-0.15655417740345, 0.2638608515262604, 0.3012927770614624}, +{-1.200735092163086, -0.03448391333222389, -0.29681554436683655}, +{0.8392134308815002, 0.1477988213300705, 0.1010427176952362}, +{0.0546310618519783, -0.09948020428419113, 0.26025837659835815}, +{-0.09768817573785782, 0.017366690561175346, 0.14403237402439117}, +{-0.050141870975494385, -0.3522224426269531, 0.44954991340637207}, +{-0.23486682772636414, -0.11909552663564682, 0.3961328864097595}, +{0.07497064769268036, -0.590391993522644, 0.04701898992061615}, +{0.33668407797813416, -0.832412838935852, 2.4751574993133545}, +{-0.03506215289235115, -0.28543993830680847, -0.31692102551460266}, +{-0.997197151184082, 2.857722282409668, -2.5552971363067627}, +{-0.5944269895553589, 0.1592956781387329, -2.2840023040771484}, +{-0.36240676045417786, -0.18037034571170807, 0.019706588238477707}, +{1.5770635604858398, 0.8117725253105164, -0.01866079494357109}, +{0.2554915249347687, 0.41575196385383606, -0.8406690955162048}, +{-0.7739591002464294, -0.1331157684326172, 0.4039836823940277}, +{-0.06261062622070312, -0.5787307024002075, 0.3238418698310852}, +{-1.5285903215408325, -0.18577219545841217, 1.0354686975479126}, +{-0.11699992418289185, -0.08210179209709167, 0.3862987458705902}, +{-0.49773868918418884, 0.6847126483917236, 0.902326226234436}, +{-0.8224319815635681, -0.7357744574546814, -0.2745668590068817}, +{-0.3818274140357971, 0.6178824305534363, 0.3574134409427643}, +{-0.944750964641571, 0.619746208190918, 0.5507563352584839}, +{-0.5578835010528564, 0.7289769649505615, 0.020573843270540237}, +{0.5630686283111572, 0.03304227814078331, -0.11670857667922974}, +{-1.1516203880310059, 1.6711742877960205, 1.0436726808547974}, +{0.6184437870979309, -1.1776312589645386, 0.1327780783176422}, +{-0.08906704187393188, -0.2745429277420044, 0.4372311532497406}, +{-1.0167309045791626, -0.873258650302887, -0.21526990830898285}, +{-1.4968535900115967, -0.44848328828811646, -0.251453161239624}, +{0.16476215422153473, 0.2321305274963379, 0.11053860932588577}, +{-0.21927306056022644, 1.7405376434326172, 0.6195921301841736}, +{1.4334790706634521, -1.0300685167312622, 1.3131967782974243}, +{0.6108865141868591, 0.08851119130849838, 0.37635722756385803}, +{1.9148035049438477, 1.6257323026657104, -0.34298068284988403}, +{0.6186057329177856, 0.5603753328323364, 0.14415930211544037}, +{0.02141118235886097, 0.3568854033946991, -0.027918098494410515}, +{0.05564059317111969, -0.34506410360336304, 0.42786845564842224}, +{-0.7318001985549927, 0.8906919360160828, 0.11982487887144089}, +{-0.09768098592758179, -0.46155253052711487, 0.10515308380126953}, +{0.6970492601394653, 0.1742495894432068, 1.3622058629989624}, +{0.3037373125553131, 0.19551736116409302, -0.537420392036438}, +{0.2044486254453659, 0.6170803904533386, -0.3772003948688507}, +{-0.709896981716156, 1.1419140100479126, 2.2784881591796875}, +{0.5168560743331909, -2.356157064437866, -1.0776585340499878}, +{-0.05633239448070526, 0.048232853412628174, 0.26409661769866943}, +{-0.5143500566482544, -3.245563507080078, 0.7873747944831848}, +{1.1777575016021729, 0.8812358975410461, 0.2589477300643921}, +{0.5053922533988953, 0.9611305594444275, 0.3198360204696655}, +{0.5989283323287964, -2.1471452713012695, 0.6054933071136475}, +{-1.7565900087356567, 0.6155953407287598, -1.205200433731079}, +{0.17070667445659637, 0.0011427482822909951, -0.1841101497411728}, +{-0.10465580224990845, 1.1010905504226685, -0.5134608149528503}, +{0.6385776400566101, -0.20339423418045044, -0.09378737211227417}, +{0.7854900360107422, 0.1706184446811676, 0.3401917815208435}, +{1.9093544483184814, 0.1903771609067917, -0.5409836769104004}, +{0.34287554025650024, 0.060688357800245285, 0.05405832454562187}, +{-0.5915377140045166, 0.12496209889650345, -0.09691333770751953}, +{0.12114584445953369, -0.8300780653953552, -1.1012296676635742}, +{0.5258243680000305, -0.9209901094436646, 1.0798254013061523}, +{0.17456355690956116, -0.10070102661848068, -0.3896423578262329}, +{0.2938486337661743, -0.18533509969711304, -0.4254615902900696}, +{0.6586993336677551, -0.6568048596382141, -0.7615314722061157}, +{-0.5559385418891907, 0.7601099610328674, -0.7085506916046143}, +{-0.5170803666114807, 0.9399817585945129, 0.22999313473701477}, +{1.7895193099975586, -0.3307206332683563, -0.736883282661438}, +{-0.18512481451034546, 0.7980604767799377, 0.5106045007705688}, +{1.1161221265792847, -0.7741405963897705, 0.4444405436515808}, +{0.2351255863904953, -0.5477688908576965, -0.12004637718200684}, +{-0.3543799817562103, -0.6844756007194519, -0.18968725204467773}, +{0.8333978056907654, 0.4390164911746979, -3.204956293106079}, +{-1.3639285564422607, 0.08217575401067734, 0.3536517024040222}, +{0.26951098442077637, 0.06578144431114197, 0.26880303025245667}, +{0.004262908361852169, 0.7616297602653503, -1.5544096231460571}, +{1.8266451358795166, -1.661787986755371, 0.2864147126674652}, +{0.5429892539978027, 0.5104308128356934, -0.5763939619064331}, +{-2.8524107933044434, -0.3451906442642212, -1.6923402547836304}, +{1.7655346393585205, -2.1516387462615967, 2.1357078552246094}, +{-0.12540782988071442, -0.6561192274093628, -0.3974250257015228}, +{0.44821789860725403, 3.499277114868164, -2.4459152221679688}, +{-0.17536313831806183, -1.257237434387207, -0.1304110437631607}, +{-0.46310099959373474, 0.3738255798816681, -0.13641329109668732}, +{-0.8826619982719421, 1.4087719917297363, 1.0423359870910645}, +{1.8033983707427979, -0.2719281315803528, -0.8038154244422913}, +{0.11854287981987, 0.4034733176231384, -0.9777939319610596}, +{-0.23437385261058807, -0.729872465133667, 1.3039870262145996}, +{2.2200441360473633, 1.7754523754119873, 1.4802409410476685}, +{-0.13853083550930023, 0.09960989654064178, 0.48302334547042847}, +{-1.3232249021530151, 1.0099605321884155, 2.1636078357696533}, +{0.7165543437004089, 0.04360009729862213, 0.07076232135295868}, +{0.536334753036499, 0.3479563295841217, -0.2783830761909485}, +{-0.9383651614189148, 0.33616766333580017, 1.2427759170532227}, +{0.4551953077316284, -1.65018892288208, -0.9439091086387634}, +{0.30589523911476135, 0.16278952360153198, 0.407317578792572}, +{-0.1436879187822342, 1.490047812461853, -0.5663797855377197}, +{1.2567689418792725, -0.8638509511947632, 1.5475373268127441}, +{0.05547882989048958, -0.9040313363075256, 0.22019779682159424}, +{-3.780170202255249, -1.8633612394332886, 0.9567018151283264}, +{0.7951396703720093, -0.5652086138725281, 0.6884943246841431}, +{-0.8493630290031433, -0.7427207231521606, 0.5280631184577942}, +{0.8805403709411621, -1.7191232442855835, 0.7508345246315002}, +{0.8530703186988831, -2.295180559158325, -2.0815820693969727}, +{0.047117121517658234, 0.11649875342845917, -0.7007951736450195}, +{0.826998770236969, 0.24810372292995453, 1.795350432395935}, +{1.1063733100891113, 1.4191105365753174, -1.9078556299209595}, +{0.566743016242981, 0.1439560204744339, -0.06461485475301743}, +{-1.6201651096343994, 0.9856181144714355, -0.5225517153739929}, +{1.5870893001556396, 0.2597231864929199, 1.9189969301223755}, +{-0.08610086888074875, -0.11535204946994781, -0.03463213890790939}, +{0.27478519082069397, 0.24454107880592346, -0.5456437468528748}, +{-1.2510054111480713, -0.2039661705493927, 0.1170649528503418}, +{0.14235880970954895, -0.6928183436393738, -0.059629254043102264}, +{0.4352036118507385, 1.0031789541244507, 0.6390636563301086}, +{-1.0034501552581787, -1.1651321649551392, 0.22626101970672607}, +{0.5524111390113831, -0.46749356389045715, -0.3701891005039215}, +{0.5144160985946655, 0.2741592526435852, 0.020983155816793442}, +{0.4178849458694458, -0.035884108394384384, -0.8264319896697998}, +{-0.18857918679714203, 0.19241108000278473, -0.3953973650932312}, +{-0.7661382555961609, -2.073613166809082, -1.243786334991455}, +{0.7533232569694519, -0.2420222908258438, 1.2958894968032837}, +{0.16993357241153717, -0.007996265776455402, -0.17298367619514465}, +{0.9021741151809692, 1.540436863899231, 0.6634089350700378}, +{0.5431374311447144, -0.20534278452396393, 0.5259847640991211}, +{1.020613431930542, 0.29552435874938965, 0.3376862108707428}, +{-1.9528175592422485, 0.5232732892036438, 0.8521203994750977}, +{-0.525222897529602, 0.573363721370697, 1.420135736465454}, +{-0.015726739540696144, -0.19343335926532745, -0.22132933139801025}, +{-0.8204877972602844, 0.20560625195503235, -0.10696295648813248}, +{-1.7688827514648438, 0.3465522229671478, 0.9847247004508972}, +{-0.20260801911354065, 0.6771560907363892, -0.5398668050765991}, +{0.4917455017566681, -1.0317684412002563, -0.4873065948486328}, +{-0.7959995865821838, 1.5998095273971558, 1.1077767610549927}, +{-0.8686408996582031, 0.4986654222011566, -0.1809147745370865}, +{-1.278818130493164, -0.5884734392166138, 0.029895689338445663}, +{-0.25172704458236694, 2.6666481494903564, -0.6166698336601257}, +{0.3431190550327301, -0.5206947922706604, -0.19590042531490326}, +{1.028916835784912, -0.00654569361358881, -1.8333079814910889}, +{-0.7400212287902832, -1.9876521825790405, -0.7976565957069397}, +{0.05314143747091293, -0.21307115256786346, 0.3582172691822052}, +{-1.5718104839324951, -0.4493877589702606, -1.42251718044281}, +{-0.6168738603591919, 1.6370468139648438, 1.0087522268295288}, +{-0.12496498227119446, 0.11232160031795502, 0.002314259298145771}, +{-2.0987296104431152, -0.11640600115060806, 1.1390131711959839}, +{-1.3769103288650513, -0.2922845184803009, 0.725465714931488}, +{0.18766702711582184, -0.09845960140228271, 1.0407651662826538}, +{0.8854707479476929, 1.5633622407913208, -0.7047896981239319}, +{0.5249525308609009, 0.31523603200912476, 1.4980942010879517}, +{0.012723986990749836, 0.013754567131400108, 0.5195157527923584}, +{-0.6655788421630859, -0.9982616901397705, 0.44318392872810364}, +{0.3184867203235626, 0.7932167053222656, 0.8820093870162964}, +{-0.3795416057109833, 0.27082350850105286, 0.23058359324932098}, +{-1.9394783973693848, -1.6312776803970337, 0.7432070970535278}, +{1.3909980058670044, 1.6612541675567627, 1.0463684797286987}, +{0.7963758111000061, -0.06053746119141579, 0.18642869591712952}, +{0.1773206889629364, -1.6908825635910034, -1.2852922677993774}, +{1.4936710596084595, -0.7946417331695557, -0.2694798707962036}, +{-0.3704550266265869, -0.039805781096220016, 0.7022280097007751}, +{-0.8955895900726318, -0.5929895043373108, 0.2189491242170334}, +{0.09282074868679047, -0.08460599184036255, 0.10485848039388657}, +{-0.29922011494636536, 0.31088748574256897, 0.15311528742313385}, +{0.11824657768011093, -0.23283621668815613, 0.705734372138977}, +{-0.3126438856124878, -0.030631734058260918, -0.4447801411151886}, +{-0.44498440623283386, -0.15912958979606628, 0.18422061204910278}, +{1.0362640619277954, 1.0209523439407349, -0.860684335231781}, +{-0.4093940854072571, -0.14863651990890503, -0.3323127031326294}, +{0.07523678243160248, 0.07963142544031143, 0.6062469482421875}, +{-1.8994113206863403, 0.07693932950496674, 1.7966082096099854}, +{-0.33767610788345337, 1.5783339738845825, -0.5539847612380981}, +{0.47613251209259033, -0.08222977817058563, 0.6348174810409546}, +{0.8699155449867249, 1.4282195568084717, 1.1783708333969116}, +{-0.29533278942108154, 2.403646230697632, 1.473751187324524}, +{-0.4138670265674591, -0.25935429334640503, 0.017383825033903122}, +{-0.3810952603816986, -0.41227132081985474, 0.12407314777374268}, +{1.1200653314590454, -0.07475105673074722, -1.0438553094863892}, +{0.4673892855644226, -0.17242762446403503, -0.8782320022583008}, +{0.1454291194677353, -2.5335137844085693, -0.10456133633852005}, +{0.6893900036811829, 0.2768353819847107, -1.177403211593628}, +{0.4239979088306427, -0.28829750418663025, -0.23504838347434998}, +{0.7152119278907776, 0.6425967216491699, 1.7887496948242188}, +{0.5811812281608582, -0.7913960814476013, 0.5048699378967285}, +{0.3997374475002289, 0.43642985820770264, -0.3586438000202179}, +{2.3172173500061035, 1.4156129360198975, -1.885617733001709}, +{-1.3757511377334595, -1.630200982093811, 2.8565993309020996}, +{-0.36671677231788635, 0.5799911618232727, -0.2643001973628998}, +{-2.280226230621338, 2.494263172149658, 1.3252240419387817}, +{0.06272529065608978, -1.0907204151153564, -0.9290131330490112}, +{0.33196085691452026, 0.2090316116809845, -0.4598941206932068}, +{-0.9411187767982483, 0.03301248699426651, 1.855477213859558}, +{0.1982884407043457, 0.23836778104305267, -1.3065438270568848}, +{-0.5604885220527649, 0.383049339056015, -0.4800414741039276}, +{0.2653813362121582, 0.6772339344024658, -1.5068780183792114}, +{-2.132206439971924, -1.39198899269104, 0.14987801015377045}, +{0.26133161783218384, -0.7768764495849609, 0.3505156338214874}, +{0.20060287415981293, 0.4645172953605652, 0.7810642719268799}, +{0.5424441695213318, -1.2869490385055542, 0.4031386375427246}, +{0.17075718939304352, 0.09046407788991928, -0.35271209478378296}, +{1.9638285636901855, -0.4005955159664154, -0.5338578820228577}, +{-1.5489486455917358, 1.451655387878418, 0.5699930787086487}, +{-0.3253975808620453, 0.35054531693458557, 0.7054582834243774}, +{-0.2812073528766632, 0.4872741103172302, 0.7326639294624329}, +{0.34383633732795715, 0.4770413935184479, 0.8278252482414246}, +{-0.5370811223983765, -0.1717846840620041, -0.5669102072715759}, +{-1.3472909927368164, -0.5174575448036194, 0.020800745114684105}, +{-0.4739700257778168, 0.15205498039722443, 0.015224244445562363}, +{-0.4607982635498047, -0.18484973907470703, -0.0463189035654068}, +{0.1659262478351593, -0.0809464156627655, 0.1888704001903534}, +{-0.7538469433784485, 0.5343500971794128, 0.1807117909193039}, +{0.21983999013900757, -0.12626220285892487, -0.6065018177032471}, +{1.9151122570037842, -0.9702302813529968, -0.5093581080436707}, +{-1.0318670272827148, 0.9681470990180969, -1.3189986944198608}, +{0.3905045688152313, -0.16782501339912415, 0.01442374475300312}, +{-0.8610546588897705, -0.7441495060920715, 0.26882830262184143}, +{0.019974183291196823, 1.1543433666229248, 0.01806027442216873}, +{-0.6859058141708374, 0.02083478309214115, 0.3340722620487213}, +{0.8583522439002991, -1.1500784158706665, 0.8360928893089294}, +{-2.0025033950805664, 0.10542546957731247, -3.304149627685547}, +{0.21815279126167297, 0.20719479024410248, -0.05099938064813614}, +{0.6443390846252441, -1.2810157537460327, 1.263590693473816}, +{-1.9420599937438965, -0.10316094011068344, -0.7151532769203186}, +{-0.3181212544441223, -0.24418886005878448, 0.060967717319726944}, +{2.040621757507324, -0.15336555242538452, -0.9112433195114136}, +{0.06677296757698059, -1.5921146869659424, 1.4089939594268799}, +{-0.2526882588863373, -0.5858047604560852, -0.9837510585784912}, +{0.9260772466659546, 0.38295021653175354, -0.8345938920974731}, +{-1.5993901491165161, -0.2347293198108673, -0.5124744176864624}, +{-0.18653453886508942, -0.23389117419719696, 0.09546685218811035}, +{0.22780966758728027, -0.8485183715820312, -0.5303974747657776}, +{0.14029107987880707, -0.1315123438835144, -0.04392794147133827}, +{-0.3593207895755768, -0.05397919565439224, -0.2256566733121872}, +{-0.6322368383407593, -0.5236495733261108, -0.3177671730518341}, +{0.7656171917915344, 0.6376447081565857, -0.8479622602462769}, +{0.18976716697216034, -0.29346686601638794, -0.49848490953445435}, +{0.5874608755111694, -0.6996319890022278, 0.36818990111351013}, +{-1.3710815906524658, 2.7945854663848877, 0.8010739088058472}, +{-0.7232711315155029, 0.03205989673733711, 0.48684775829315186}, +{0.7344942688941956, -1.3412920236587524, 1.026220679283142}, +{0.009831750765442848, 1.4724745750427246, 0.47999465465545654}, +{0.07561758160591125, 0.050478413701057434, -0.18365798890590668}, +{-0.6967030763626099, -1.162827968597412, 1.6298407316207886}, +{2.2699153423309326, -1.2554850578308105, 0.1746150255203247}, +{0.5732100605964661, -0.004941069055348635, -0.08759015798568726}, +{1.8914293050765991, 1.6969974040985107, -1.5258073806762695}, +{0.34732505679130554, -0.06785476952791214, 0.77813321352005}, +{0.25952839851379395, 0.27472010254859924, -0.47862911224365234}, +{0.5151540637016296, -0.3546597361564636, -0.9330262541770935}, +{-0.7511531710624695, 0.19578713178634644, -0.7503776550292969}, +{0.17346376180648804, 0.3493836224079132, -0.28356680274009705}, +{0.33550888299942017, 1.6673541069030762, 1.4748252630233765}, +{-1.223215103149414, -1.6450937986373901, 0.2643047273159027}, +{0.34228554368019104, -0.2763946056365967, 0.20872431993484497}, +{-0.6165165305137634, 0.3057844638824463, 3.358595371246338}, +{-0.2767821252346039, 0.22208288311958313, 2.439700126647949}, +{-0.23798198997974396, -0.438716322183609, 0.36668676137924194}, +{-1.8597397804260254, -1.3492227792739868, -1.284779667854309}, +{-0.2780005633831024, 0.4342016577720642, -0.5837079882621765}, +{0.19829048216342926, 0.03568711876869202, -0.250785768032074}, +{0.2968694865703583, -0.02026672288775444, -0.25389814376831055}, +{-0.6211626529693604, -0.016170693561434746, 1.3882818222045898}, +{-0.16346046328544617, -0.6397242546081543, 0.04035179689526558}, +{0.13936248421669006, -1.1979966163635254, -0.33183974027633667}, +{-1.2945514917373657, -0.8421855568885803, 0.8387005925178528}, +{-0.8748086094856262, -0.30783161520957947, 0.5097302198410034}, +{-0.029950333759188652, -0.8145315647125244, 0.20991098880767822}, +{-1.240172028541565, 0.4901565909385681, -0.7816200852394104}, +{0.2068091481924057, -0.07622641324996948, -0.7336734533309937}, +{0.03242679312825203, -1.3724943399429321, 0.9859358072280884}, +{0.18580617010593414, 3.2934398651123047, 3.118706703186035}, +{0.8219599723815918, 0.44824159145355225, 0.7782390713691711}, +{1.3890101909637451, 0.7962890267372131, 0.6064724922180176}, +{1.4658268690109253, 0.7206101417541504, 0.6442506909370422}, +{-0.5971456170082092, 0.6889879107475281, -0.26516759395599365}, +{-1.389549970626831, 1.363092303276062, -1.9161020517349243}, +{1.3198269605636597, -0.874933123588562, -0.6399511694908142}, +{-0.1988782286643982, 0.3528348505496979, 0.18217551708221436}, +{-0.32215583324432373, -0.1259189397096634, 2.1643238067626953}, +{-1.2316148281097412, 2.0379812717437744, -0.11195319890975952}, +{0.3044528365135193, -0.25864994525909424, 0.07429690659046173}, +{0.36054205894470215, 0.8274554014205933, 0.9682952761650085}, +{-0.857613742351532, -1.4308711290359497, 0.45634910464286804}, +{-0.11988130956888199, 0.6047183275222778, 0.5424140095710754}, +{-0.6920639872550964, -0.08656176924705505, 0.010798333212733269}, +{0.6664599776268005, 0.37419214844703674, 0.20248857140541077}, +{-0.006650839000940323, 0.03767566382884979, 0.06977121531963348}, +{0.3500939905643463, -0.87349534034729, 0.12316469103097916}, +{0.8409191966056824, -1.721753478050232, 0.3912254273891449}, +{-0.1609179526567459, -0.33383283019065857, -0.27249985933303833}, +{-1.8532358407974243, 0.047022026032209396, -0.8978824615478516}, +{2.1711292266845703, -1.0992103815078735, 1.6389663219451904}, +{0.13617268204689026, 0.6057916283607483, 0.4868395924568176}, +{0.31698155403137207, 0.8450424671173096, -0.5576357841491699}, +{0.25265997648239136, 1.303318738937378, 0.9892562031745911}, +{0.013377124443650246, -0.6744953393936157, 0.5738140940666199}, +{1.0217196941375732, -1.3385800123214722, 0.8119291067123413}, +{0.8550233244895935, 0.4402146339416504, 0.4656829535961151}, +{0.591607391834259, -0.08493020385503769, -0.1227322518825531}, +{-0.5948666930198669, 1.1212522983551025, -0.6930591464042664}, +{0.27786684036254883, 0.47252795100212097, 0.625235915184021}, +{0.7419337630271912, -0.12275300920009613, -0.021416688337922096}, +{1.2490888833999634, -0.220821812748909, 0.43501847982406616}, +{0.49427953362464905, -0.13604694604873657, -0.49074146151542664}, +{0.2154194712638855, 0.1816278100013733, 0.25941410660743713}, +{0.9042859077453613, 0.4724139869213104, -0.704300045967102}, +{0.08345457166433334, 1.1002449989318848, 1.0406286716461182}, +{-0.3596016466617584, 0.20954009890556335, 0.3546976149082184}, +{1.194621205329895, -0.0007127445423975587, -0.3570670783519745}, +{0.7116460800170898, 0.11731912940740585, -0.20103098452091217}, +{0.697979748249054, 0.04501825198531151, -0.2149914652109146}, +{0.2934853136539459, -0.7280758023262024, 0.24794958531856537}, +{-0.1086176335811615, 0.8045130968093872, -0.8353225588798523}, +{0.12393224984407425, -0.15663869678974152, -0.3972574770450592}, +{-0.15035676956176758, 0.3394325375556946, -0.18173550069332123}, +{-0.49474769830703735, -0.06761153042316437, -0.4524343013763428}, +{0.4140813648700714, 0.1578524112701416, 0.20043425261974335}, +{-0.4163329303264618, -0.39359012246131897, -0.6031964421272278}, +{-0.4133274555206299, -0.28674572706222534, 0.3795740306377411}, +{-0.4261270761489868, 0.037002336233854294, -0.17150066792964935}, +{-0.6736116409301758, 0.1674167513847351, -0.8538553714752197}, +{1.690832495689392, -0.2709907293319702, -0.9497566223144531}, +{0.04590805992484093, -0.36180609464645386, -0.020748665556311607}, +{1.5714616775512695, -0.9593705534934998, 0.5309287905693054}, +{-0.5025797486305237, 1.5079338550567627, 1.0495450496673584}, +{0.5293316841125488, -0.8320942521095276, 0.258070707321167}, +{-0.46596649289131165, -0.12737387418746948, -0.43454501032829285}, +{-0.8209221959114075, -0.3749850392341614, 0.32891079783439636}, +{0.6323422193527222, -0.4031282067298889, 1.1251932382583618}, +{-0.590490996837616, 1.3420679569244385, 2.416459798812866}, +{-0.4285697340965271, -0.46412160992622375, 0.4915468990802765}, +{0.2540941834449768, 0.12761828303337097, -0.01777852140367031}, +{-0.6863183379173279, 0.15283186733722687, 2.94742751121521}, +{-0.19438333809375763, -0.046926308423280716, 1.8066270351409912}, +{-0.23595091700553894, -0.06720370799303055, -0.6184099316596985}, +{-0.30914631485939026, 0.7925930619239807, -0.2226896584033966}, +{-0.32360729575157166, -1.218493938446045, -0.4840896427631378}, +{0.28196364641189575, 0.3068182170391083, 0.30847394466400146}, +{1.8392736911773682, 0.3979594111442566, 0.4622971713542938}, +{-2.2105555534362793, -1.683872103691101, -2.580592393875122}, +{0.21516136825084686, 0.04322915896773338, 0.5611096024513245}, +{0.14923201501369476, -2.0163326263427734, 1.3445311784744263}, +{0.38750016689300537, -0.5215392112731934, 0.8366133570671082}, +{0.8119175434112549, -0.9871025681495667, -0.6706006526947021}, +{-1.6451176404953003, 1.480576515197754, 0.027037685737013817}, +{0.029713142663240433, -0.0344713069498539, 0.1560208797454834}, +{0.0420638844370842, -0.05829944089055061, 0.5774545073509216}, +{-2.0471582412719727, 0.8852632641792297, -0.33585652709007263}, +{1.9616405963897705, -2.363888740539551, 1.976227879524231}, +{0.18086694180965424, 0.7224838137626648, 0.1660846471786499}, +{1.091068983078003, -0.1351894736289978, 1.6071101427078247}, +{-2.983795166015625, -0.47154203057289124, 1.7660762071609497}, +{0.16504967212677002, 0.10867402702569962, 0.09012623876333237}, +{-0.4300483167171478, -1.8291696310043335, 0.903850257396698}, +{-1.2092245817184448, 1.5706536769866943, 1.5008859634399414}, +{0.19700773060321808, -0.23482994735240936, 0.24659204483032227}, +{-0.21880199015140533, 2.647718906402588, 2.552518606185913}, +{1.542884111404419, -1.0574944019317627, -0.9256108999252319}, +{-0.4869069755077362, 0.03354259207844734, 0.5627356767654419}, +{-1.895447015762329, -0.6281833648681641, 0.8261054158210754}, +{0.01499053556472063, 1.2673969268798828, 1.8342849016189575}, +{-0.056577835232019424, -0.4077399969100952, 0.8173136711120605}, +{0.2957715392112732, -0.5879267454147339, -1.9252216815948486}, +{-2.5904741287231445, -0.5810835361480713, 0.39596524834632874}, +{0.20963822305202484, 0.5874475240707397, -0.6543944478034973}, +{-1.3989702463150024, -0.7753390073776245, -0.8440231680870056}, +{1.8439767360687256, -0.5536134243011475, -2.018636703491211}, +{-0.21860285103321075, -0.6496385931968689, -0.13393381237983704}, +{-0.4425356686115265, -0.9067131876945496, 0.0951630100607872}, +{-0.9119622707366943, 0.6474111676216125, -0.5856766104698181}, +{0.020999358966946602, -0.7793946862220764, 0.1814991980791092}, +{0.6277645230293274, 2.145167112350464, 0.9734159708023071}, +{-0.35117876529693604, -2.670607089996338, -0.4061594009399414}, +{0.5945437550544739, -0.11257792264223099, -0.4903588593006134}, +{-0.9203949570655823, 0.9665855169296265, -0.6604440808296204}, +{1.5563938617706299, 0.2150716483592987, -1.6057202816009521}, +{-0.44170454144477844, 0.46292510628700256, -0.15228915214538574}, +{0.30540964007377625, -0.20070214569568634, -0.3317456543445587}, +{1.594496250152588, -1.4306541681289673, -1.6947276592254639}, +{0.6199663281440735, -0.45482826232910156, 0.1144455075263977}, +{-0.7693785429000854, -1.5840429067611694, 1.3856343030929565}, +{-0.12237628549337387, 1.5329841375350952, 0.12512610852718353}, +{-0.03787262737751007, -0.39180243015289307, 0.49842408299446106}, +{0.5551635026931763, -1.2467893362045288, 1.188720703125}, +{0.13648462295532227, 0.3959611654281616, 1.2452118396759033}, +{0.2617197334766388, -0.5055072903633118, -0.401946485042572}, +{-1.4750384092330933, 1.3779716491699219, -1.4786510467529297}, +{0.3856002390384674, 0.06889720261096954, 1.6930345296859741}, +{-0.4102368950843811, 0.2047046571969986, 0.6202709674835205}, +{-0.11121348291635513, 1.9058403968811035, -1.3973206281661987}, +{0.7441914081573486, 1.1176104545593262, 2.6144180297851562}, +{-0.10263825207948685, 0.08702584356069565, -0.881858229637146}, +{0.19945719838142395, -1.025251030921936, 0.862936794757843}, +{-2.2772037982940674, 1.6960471868515015, 0.14953210949897766}, +{-0.4707547128200531, -0.399271696805954, 1.1845463514328003}, +{-1.6218409538269043, -0.3981396555900574, 2.079002618789673}, +{0.22630558907985687, -0.47841164469718933, 0.3588465750217438}, +{-0.0745992362499237, 0.1213512197136879, -0.10408592224121094}, +{-0.3744089603424072, 0.3938290476799011, -0.23518256843090057}, +{0.546556293964386, 0.43795180320739746, 0.3989552855491638}, +{-0.2604375183582306, -0.36121758818626404, 0.71405029296875}, +{3.051100969314575, 0.013631889596581459, -0.7893686294555664}, +{-3.2856390476226807, 0.16787458956241608, 1.4960836172103882}, +{0.26566940546035767, 0.6743773221969604, 0.017566796392202377}, +{-0.5463098287582397, -0.47711876034736633, 0.5898305177688599}, +{-0.5664529204368591, -0.2927981913089752, 0.2718247175216675}, +{-0.2897990047931671, 0.3613959550857544, -0.5131464600563049}, +{0.7554011344909668, 0.011293874122202396, -0.5449640154838562}, +{-0.31351199746131897, 1.228736400604248, -0.28499314188957214}, +{0.17063337564468384, 0.4913777709007263, -0.0865846574306488}, +{-3.0747902393341064, 0.6130152940750122, 0.7770771384239197}, +{0.4386667013168335, 0.5561542510986328, 0.05564659461379051}, +{-0.6054700016975403, -0.4258134067058563, 0.17438524961471558}, +{-1.5428624153137207, 0.6822690963745117, 2.2219934463500977}, +{-0.005886049475520849, -1.1970648765563965, -1.913820743560791}, +{-0.35582235455513, -0.1326896846294403, -0.5326398611068726}, +{-0.5954418182373047, -1.4422247409820557, -0.7709033489227295}, +{0.5821296572685242, -0.2475849837064743, 0.5029184222221375}, +{0.39096716046333313, -0.10667181015014648, 0.41449639201164246}, +{0.31471872329711914, 1.1372281312942505, 0.23473304510116577}, +{-0.1304801106452942, -0.17830301821231842, 1.481411099433899}, +{-0.3612380027770996, 0.9654181599617004, 0.03684883192181587}, +{-2.491915702819824, -0.4704635739326477, 2.2132928371429443}, +{2.262352228164673, 2.747673988342285, -2.784188985824585}, +{0.40781161189079285, -0.457168310880661, -0.000617736135609448}, +{-0.5067583918571472, 1.3746185302734375, -0.5036519169807434}, +{-0.1045706495642662, -2.146395444869995, -1.4012531042099}, +{0.04441802576184273, -0.19344384968280792, -0.5377693176269531}, +{0.29565882682800293, 0.4266709089279175, -0.95567387342453}, +{0.6481162309646606, 2.0012078285217285, -2.183356523513794}, +{0.33356955647468567, -0.34294700622558594, -0.09528687596321106}, +{-0.18402111530303955, -0.08220790326595306, 0.058544229716062546}, +{0.38457149267196655, -1.54648756980896, -0.4302184283733368}, +{-0.12986281514167786, 0.17137540876865387, -0.23469240963459015}, +{1.927998423576355, -0.029884036630392075, -0.49516427516937256}, +{-2.1362929344177246, -0.354918897151947, -1.1728792190551758}, +{-0.16522011160850525, -0.28888219594955444, 0.3804464638233185}, +{0.24222725629806519, -2.7986347675323486, -0.811096727848053}, +{0.6057982444763184, -1.6668583154678345, -0.3450031578540802}, +{0.36448726058006287, 0.05702242627739906, -0.13331419229507446}, +{-0.41379985213279724, -0.6263756155967712, 0.2403586059808731}, +{-2.9209630489349365, -1.637365698814392, 1.8772883415222168}, +{-0.26461341977119446, -0.08157633990049362, 0.6689081788063049}, +{-0.8284793496131897, 0.8892422318458557, 2.4267919063568115}, +{0.2600560784339905, -0.7351574301719666, 1.6163537502288818}, +{0.07706619054079056, -0.030494434759020805, -0.5148664116859436}, +{2.98414945602417, 3.5814919471740723, 1.4520386457443237}, +{-2.251974582672119, 0.9468509554862976, 1.217736840248108}, +{0.079214908182621, -0.4459511339664459, -0.0993150994181633}, +{0.6642618179321289, 0.6838811635971069, -0.509270966053009}, +{0.45596352219581604, -0.055847179144620895, -0.6417652368545532}, +{0.1570124477148056, -0.25027257204055786, -1.0223973989486694}, +{-0.2221985161304474, 0.810392439365387, -3.3947408199310303}, +{-2.0325098037719727, 1.346672534942627, 2.0286059379577637}, +{0.07750856876373291, -0.2351459562778473, 0.5452452898025513}, +{0.7568109035491943, -1.9468783140182495, 1.0373352766036987}, +{1.0604956150054932, 0.759330153465271, -0.24932749569416046}, +{-0.2513967454433441, -0.7550997734069824, 0.045603036880493164}, +{-1.273422360420227, 2.4517977237701416, -0.8667077422142029}, +{-2.975233793258667, -4.249600887298584, -1.2829948663711548}, +{-0.17106592655181885, 0.1638583093881607, -0.17822237312793732}, +{-0.05333223566412926, 1.136487603187561, -0.5431616902351379}, +{0.0813792422413826, 2.959984540939331, -1.465476155281067}, +{-0.13584795594215393, 0.22980459034442902, 0.21056392788887024}, +{-1.625077486038208, 1.2406147718429565, 0.24253594875335693}, +{0.6804196834564209, 1.0041155815124512, 0.5829088091850281}, +{-0.266247421503067, 0.3252023160457611, -0.36654818058013916}, +{-0.5824097990989685, 2.017047643661499, -0.6619976758956909}, +{-1.0938501358032227, 1.0442256927490234, -1.4919284582138062}, +{-0.4047294855117798, 0.056486260145902634, 0.685369074344635}, +{-0.2574290633201599, -1.297321081161499, -0.15464115142822266}, +{-0.21186009049415588, -1.2343409061431885, 0.29835864901542664}, +{-0.26764166355133057, -0.46883413195610046, 0.502329409122467}, +{-0.45147705078125, -0.35732221603393555, 0.5702306032180786}, +{0.4625592827796936, -1.7247639894485474, -0.5150659680366516}, +{-0.2904445230960846, 0.2605028450489044, -0.2919723391532898}, +{-0.02999432571232319, 0.14594483375549316, -0.11527755111455917}, +{-0.08049347996711731, 0.5156431794166565, 0.9777169823646545}, +{0.014915453270077705, -0.41888558864593506, 0.6098575592041016}, +{-0.09267450124025345, -0.24349050223827362, 0.6159224510192871}, +{1.0120126008987427, 0.9317930340766907, 1.4957443475723267}, +{-0.2913486063480377, -0.0009738738881424069, 0.734848141670227}, +{-2.447767734527588, 1.6258381605148315, 2.1161625385284424}, +{2.335315227508545, 1.588642954826355, 1.295103907585144}, +{0.22018569707870483, 0.2840425968170166, -0.17984221875667572}, +{-1.2680960893630981, -0.6900843977928162, -0.7242212891578674}, +{-0.8835594654083252, -0.25091901421546936, -1.7017806768417358}, +{-0.10876300185918808, -0.00577721418812871, -0.2890753746032715}, +{-1.0624176263809204, -3.4220309257507324, 1.14113450050354}, +{-1.1774977445602417, -1.1970314979553223, 1.5921525955200195}, +{-0.4593721032142639, 0.3822985589504242, 0.4611981213092804}, +{2.34865403175354, -0.9264209866523743, 0.4380797743797302}, +{1.167170524597168, 0.19001176953315735, 2.099268674850464}, +{0.0029809868428856134, 0.054193951189517975, -0.14476850628852844}, +{0.974943220615387, -0.7108162641525269, 1.6420167684555054}, +{0.7042682766914368, -0.6201905012130737, 0.8110059499740601}, +{0.48812901973724365, 0.2785683572292328, -0.47959378361701965}, +{-0.3045543432235718, -0.09858625382184982, 2.0612709522247314}, +{-1.7237509489059448, 0.3766094446182251, -1.2732319831848145}, +{0.6589301824569702, 0.3270680010318756, -0.13405264914035797}, +{-0.8100982308387756, -0.14489701390266418, 0.9382211565971375}, +{-0.8476755619049072, 0.28831812739372253, 2.0859498977661133}, +{0.6964033842086792, 0.5471482872962952, -0.5058611035346985}, +{-1.0309709310531616, 0.15022556483745575, -0.46132344007492065}, +{1.5598366260528564, 0.8134493827819824, 2.4071292877197266}, +{-0.13706058263778687, -0.3995976448059082, -0.2003234326839447}, +{1.6335840225219727, -1.7341699600219727, -0.14179642498493195}, +{1.0017266273498535, -0.685617208480835, 0.5478862524032593}, +{-0.35331207513809204, -0.8058698177337646, 0.6853300929069519}, +{0.8800609111785889, -1.5029047727584839, 0.3323248624801636}, +{1.1497952938079834, 0.27940094470977783, 0.8961238265037537}, +{0.16394536197185516, -0.06199953705072403, -0.8229898810386658}, +{-1.1630902290344238, -0.6931753754615784, -0.49315887689590454}, +{-3.3344786167144775, 0.5496117472648621, 1.4541159868240356}, +{-0.03271063417196274, -0.393736869096756, 0.1908883899450302}, +{1.7020004987716675, -0.2635802924633026, -0.3738831579685211}, +{0.5671740174293518, -0.04701557755470276, -0.7695227265357971}, +{0.1224791556596756, -1.068145751953125, 0.639504075050354}, +{2.269911527633667, -0.6645141243934631, 2.059246063232422}, +{3.3818395137786865, 1.302627682685852, -1.0496606826782227}, +{0.43867406249046326, -0.19240479171276093, -0.8463149070739746}, +{-0.3443593382835388, 0.16117489337921143, 1.2208629846572876}, +{2.9351017475128174, -1.020790934562683, -0.38284093141555786}, +{-0.44527775049209595, -0.10567202419042587, -0.30930542945861816}, +{-0.3201073408126831, 0.2400076985359192, 1.0368880033493042}, +{-1.1539443731307983, -1.6730884313583374, -1.4559160470962524}, +{-0.8867519497871399, 0.6269978284835815, -0.07342123240232468}, +{-1.2205917835235596, 0.5910669565200806, 0.1532917469739914}, +{-0.7061823606491089, 0.5080634951591492, 0.1995667815208435}, +{0.05036112293601036, -0.33483830094337463, -0.3122905194759369}, +{-1.8683496713638306, -1.5850768089294434, -0.029103299602866173}, +{-3.0794763565063477, -2.9864397048950195, -0.14664974808692932}, +{0.0547562800347805, -0.38427025079727173, 0.2665373980998993}, +{-0.08347371220588684, 0.33794090151786804, 0.19099512696266174}, +{3.092648506164551, 2.6342484951019287, -2.6744930744171143}, +{1.1490641832351685, -0.18904370069503784, -0.05501013994216919}, +{2.4476962089538574, 0.5653263330459595, -0.38480624556541443}, +{-2.275554895401001, -1.8812406063079834, 0.9367884397506714}, +{0.17245712876319885, 0.716301679611206, 0.2995741367340088}, +{0.44018253684043884, 0.2764612138271332, 0.5625665187835693}, +{-0.4593082368373871, 1.6297082901000977, -1.5935198068618774}, +{-0.43091219663619995, 0.5587728023529053, 0.2817918062210083}, +{-0.8374646306037903, -0.31005755066871643, 1.49904203414917}, +{0.5935283899307251, 0.020877433940768242, -0.0849582627415657}, +{-0.22085987031459808, 0.4173264801502228, -0.16221915185451508}, +{0.3213236331939697, 0.4506395161151886, -0.36705854535102844}, +{-0.7333693504333496, -0.14287786185741425, 0.9444096088409424}, +{-0.3752729892730713, -0.29425671696662903, -0.3595721125602722}, +{-1.4591026306152344, 0.2688457667827606, -0.4443325102329254}, +{-1.0334311723709106, 0.03760605305433273, -0.4156557023525238}, +{-0.1833597868680954, -0.1337365359067917, -0.3710211515426636}, +{0.5756313800811768, 1.3259341716766357, -0.5311458110809326}, +{0.6217923164367676, 0.2015242576599121, 0.4366689920425415}, +{-0.558543860912323, -0.33964574337005615, 0.228729248046875}, +{0.06665273010730743, -0.36075857281684875, -0.4594883620738983}, +{-0.4910876452922821, -0.455732524394989, 1.0112178325653076}, +{0.036498136818408966, -0.5097755789756775, 0.33254796266555786}, +{2.180659294128418, -0.7256544828414917, 0.36866164207458496}, +{0.7841360569000244, 1.6941550970077515, -1.3647561073303223}, +{0.664379358291626, 0.34742066264152527, 0.09246314316987991}, +{-1.437018632888794, -0.4678964614868164, 0.870105504989624}, +{-1.190948247909546, -0.5458102226257324, -1.279401183128357}, +{0.06482498347759247, -0.12664805352687836, -0.46658855676651}, +{-0.029438799247145653, -0.3574351966381073, 0.41831085085868835}, +{0.8171326518058777, -2.476231575012207, 1.3225011825561523}, +{-0.4238712191581726, -0.0032422197982668877, 0.17047356069087982}, +{1.2239912748336792, -0.353733092546463, 1.8521149158477783}, +{0.5542296171188354, 2.2572078704833984, 2.2572858333587646}, +{-0.7626457810401917, -0.011376243084669113, -0.506236732006073}, +{0.1249951496720314, -0.5866129994392395, -0.06548986583948135}, +{-0.6458944082260132, 0.19134917855262756, 0.5500982403755188}, +{0.6359159350395203, -0.3273177146911621, 0.442554235458374}, +{-0.2345883697271347, 3.9630000591278076, 1.9929760694503784}, +{1.1042201519012451, -1.5704177618026733, 0.10227388888597488}, +{0.16980622708797455, 0.4999055564403534, 0.4756629467010498}, +{0.34497806429862976, -0.8785353302955627, 0.12649030983448029}, +{1.7026735544204712, -1.0222926139831543, 1.901720643043518}, +{-0.3505394756793976, 0.21140097081661224, -0.6743360757827759}, +{1.7731313705444336, -1.500731348991394, 0.5232259631156921}, +{2.154916286468506, -0.5848235487937927, -0.02989661507308483}, +{-0.2780844271183014, -0.10377927869558334, 0.04300966486334801}, +{-0.8073202967643738, -0.5334720611572266, 0.4706355929374695}, +{-1.9546613693237305, 0.2677876353263855, 1.061963438987732}, +{-0.4103226065635681, -0.7273520827293396, -0.7024195790290833}, +{0.28407540917396545, 0.1759893298149109, 0.6149189472198486}, +{2.5751259326934814, 1.5407766103744507, 2.2691099643707275}, +{0.08409272879362106, 0.158166766166687, -0.15328727662563324}, +{-0.2949873208999634, -0.046671219170093536, 0.2581881582736969}, +{0.9385567903518677, 0.920955240726471, -1.4243931770324707}, +{0.5392168164253235, -0.06917884945869446, 0.33925363421440125}, +{-0.3122645318508148, -0.6291204690933228, 1.4312206506729126}, +{0.6720786094665527, 1.2504281997680664, 2.3428122997283936}, +{-0.12015704810619354, 0.22405172884464264, -0.35061582922935486}, +{1.3726351261138916, 0.8393502831459045, -0.3524162173271179}, +{0.7970015406608582, -0.3616037368774414, -0.676156222820282}, +{0.47563135623931885, 0.4971204102039337, -0.06728173047304153}, +{0.4187777042388916, 0.4874056875705719, -0.11399155855178833}, +{0.45080798864364624, 0.7158102989196777, -0.1273437738418579}, +{0.24579082429409027, -0.0483696274459362, 0.5719025135040283}, +{1.7385623455047607, 0.08512458205223083, 0.6763805150985718}, +{1.981484293937683, 0.09688077121973038, 0.4869146943092346}, +{0.10244889557361603, -0.10552530735731125, 0.5703572630882263}, +{0.6631793975830078, -1.4976273775100708, 1.4348304271697998}, +{0.3832474648952484, -0.760503888130188, 0.8766001462936401}, +{-0.09571290761232376, 0.41730213165283203, -0.750654399394989}, +{0.48188653588294983, 1.8221969604492188, -0.8221554756164551}, +{0.4625396430492401, -0.42704370617866516, 1.086028814315796}, +{0.20123377442359924, -0.19510233402252197, -0.7363716959953308}, +{0.7076186537742615, 1.9686572551727295, -0.12558846175670624}, +{0.15483923256397247, -0.7279033064842224, -1.342930555343628}, +{1.0881340503692627, 0.15718109905719757, -0.19942599534988403}, +{1.0472954511642456, 0.27592310309410095, -0.16891597211360931}, +{-0.19940659403800964, 0.9832317233085632, 0.07314828038215637}, +{-0.39004185795783997, 0.20755960047245026, -0.03598881885409355}, +{-0.6400513648986816, -0.6551609039306641, 1.0144917964935303}, +{0.014482581056654453, -0.9829216003417969, -0.8034499883651733}, +{0.4730651378631592, 0.16391585767269135, 0.33639010787010193}, +{2.945333957672119, 0.641562283039093, 1.1558352708816528}, +{0.5309596061706543, 0.27477550506591797, -2.2569289207458496}, +{-0.6498082876205444, 0.8842688202857971, 0.5917031764984131}, +{0.5032888650894165, -1.5237321853637695, -0.2231798619031906}, +{0.4663039743900299, 2.7121264934539795, -0.8268077373504639}, +{0.14412865042686462, -0.046808790415525436, -0.00669130077585578}, +{1.1216187477111816, 0.19559785723686218, 1.489919662475586}, +{0.2585091292858124, 0.7782410383224487, -0.4134288728237152}, +{0.4185246527194977, 0.20601345598697662, -0.47196438908576965}, +{-2.141925811767578, -1.1377241611480713, 0.9021415710449219}, +{-0.7808468341827393, 1.238013505935669, -3.81406307220459}, +{0.1286320984363556, 0.3500359058380127, 0.28811848163604736}, +{0.16512197256088257, -0.10156998038291931, 2.32611083984375}, +{0.191009521484375, 0.27126604318618774, 1.0333763360977173}, +{-0.4458600580692291, 0.34261125326156616, -0.04137520492076874}, +{-0.9390363097190857, 1.2335432767868042, 0.10364674031734467}, +{-0.1506001353263855, -1.7361435890197754, -0.1429138481616974}, +{0.07775875926017761, -0.14459475874900818, -0.36502495408058167}, +{-1.1346830129623413, 0.18869923055171967, -2.2773101329803467}, +{0.8060072660446167, 0.15644413232803345, 1.0932079553604126}, +{-0.5696159601211548, 0.7308841347694397, 0.4785729646682739}, +{-0.5005931854248047, -0.04306153953075409, 0.014361717738211155}, +{0.04582890123128891, 0.36016392707824707, 0.42016053199768066}, +{0.3175676763057709, -0.00039218898746185005, 0.3237827718257904}, +{0.34559711813926697, -1.9132637977600098, 0.5239012241363525}, +{-1.1974022388458252, 0.4588724970817566, -0.8250070810317993}, +{-0.08615867793560028, 0.06287845224142075, -0.17953349649906158}, +{-0.8972168564796448, -0.15459290146827698, 0.7819188833236694}, +{-2.2162389755249023, 0.2508232593536377, 1.210100531578064}, +{-0.18691237270832062, -0.7673104405403137, 0.4734468460083008}, +{-0.8304779529571533, 0.9814290404319763, -0.7999595999717712}, +{-1.0229904651641846, 0.43278568983078003, -0.3075430691242218}, +{0.7453559041023254, 0.2385053038597107, -0.457160085439682}, +{0.2736808955669403, -0.10161621868610382, 0.6095927953720093}, +{0.02063927985727787, 0.3664913475513458, 0.5323935747146606}, +{0.31976935267448425, 0.5591679215431213, 0.08351776748895645}, +{-3.333498001098633, 1.4233916997909546, 0.9307901263237}, +{2.1037704944610596, -1.1345728635787964, -0.7275922298431396}, +{-0.09237224608659744, -0.002358653349801898, 0.7218770980834961}, +{-1.689534306526184, 2.251068592071533, 0.44449582695961}, +{0.22839903831481934, 3.063366651535034, -0.0774855986237526}, +{-0.4612599313259125, 0.27383965253829956, 0.0942184180021286}, +{3.5716702938079834, 1.6497795581817627, 1.3317065238952637}, +{-1.21192467212677, 1.1540662050247192, -1.6867072582244873}, +{0.4120325744152069, -0.4438958168029785, 0.42996442317962646}, +{1.5322949886322021, 0.698600709438324, -0.5923708081245422}, +{-1.1052415370941162, 1.8318383693695068, 1.6481525897979736}, +{-0.10481422394514084, -0.38362884521484375, -0.3403538763523102}, +{-0.50599205493927, -0.4666423797607422, 1.2310090065002441}, +{0.25470417737960815, -0.5019163489341736, 0.22117823362350464}, +{-0.07276372611522675, -0.03256053850054741, -0.5054154992103577}, +{-1.0851105451583862, -0.6736130714416504, 0.6781756281852722}, +{1.211345911026001, -1.1712597608566284, -1.6206680536270142}, +{-0.6106740832328796, 0.13711287081241608, 0.021116631105542183}, +{-1.236189842224121, -1.7841646671295166, -0.10811176151037216}, +{-0.024166148155927658, 2.0888397693634033, 0.1932150274515152}, +{-0.04299739748239517, 0.27424269914627075, -0.24577215313911438}, +{0.26873257756233215, 1.401276707649231, -0.13509505987167358}, +{-0.21851783990859985, -0.6293848752975464, -0.4898674488067627}, +{0.024504266679286957, 0.36796805262565613, -0.12418869882822037}, +{-0.7115797400474548, 0.8714780211448669, -0.20710717141628265}, +{0.08499889075756073, 0.33934974670410156, 0.5166783928871155}, +{0.10077036172151566, 0.2707413136959076, -0.18007731437683105}, +{-0.23213374614715576, 0.27430459856987, 0.17434191703796387}, +{0.5337967872619629, 0.7586864829063416, -0.9744604825973511}, +{-0.4898393154144287, -0.1889258176088333, -0.5017973780632019}, +{0.9875380396842957, -1.5593721866607666, -0.9095408916473389}, +{-1.8491415977478027, -1.6511491537094116, -0.5281237959861755}, +{0.4375048577785492, -0.03694785758852959, -0.016016699373722076}, +{0.3804895877838135, -0.42151015996932983, -0.08724275976419449}, +{0.43371152877807617, 0.3142257630825043, -0.30357176065444946}, +{0.1898391842842102, -0.39554107189178467, -0.20109160244464874}, +{0.5544655919075012, 1.1969311237335205, -1.370764136314392}, +{1.5265672206878662, -2.184556245803833, -0.04220912232995033}, +{-0.5787532329559326, 0.5694423317909241, -0.14435037970542908}, +{-1.3372080326080322, -1.6261035203933716, -0.5922603011131287}, +{-0.21465913951396942, 0.6418293714523315, 0.20475734770298004}, +{0.3130730986595154, 0.12958543002605438, -0.3670341372489929}, +{0.7978788614273071, -0.09377145767211914, -0.6889083385467529}, +{0.760245680809021, -0.3393973112106323, -0.7615801692008972}, +{-0.37304574251174927, 0.6671677827835083, -0.8415578603744507}, +{0.2012633979320526, 0.8958518505096436, -0.6620872616767883}, +{-0.5288043022155762, -0.18161235749721527, 2.106321096420288}, +{0.6395268440246582, 0.009828664362430573, -0.07594883441925049}, +{-0.9543130397796631, -0.6511070728302002, 0.5123632550239563}, +{0.8597548007965088, -0.7829238176345825, 1.7184168100357056}, +{-0.009770194999873638, 0.05288025736808777, -0.010269845835864544}, +{-1.602265477180481, -2.4746785163879395, 0.42642495036125183}, +{2.3135316371917725, 1.557689905166626, 1.401741862297058}, +{-0.13760420680046082, 0.4175950586795807, 1.0572642087936401}, +{-0.24670453369617462, 1.333488941192627, -0.9494701623916626}, +{1.9293854236602783, 1.1974440813064575, 1.088025689125061}, +{-0.09814354032278061, -0.36539942026138306, -0.014506357721984386}, +{0.05982726067304611, 3.194925308227539, -1.2674094438552856}, +{-0.9091781973838806, 0.7355161905288696, -1.1659562587738037}, +{-0.5146609544754028, -0.21894571185112, -0.05737657472491264}, +{-0.6660178899765015, 0.5420835614204407, 0.5603249073028564}, +{0.028471073135733604, -0.6700268983840942, 0.49210935831069946}, +{0.05647037923336029, 0.4941459000110626, -0.007879771292209625}, +{0.5705912709236145, -0.9724709987640381, -2.5453920364379883}, +{-1.52882981300354, 1.0031989812850952, -0.04138056933879852}, +{0.16397573053836823, 0.3549756705760956, -0.6050198078155518}, +{1.0600396394729614, 1.775847315788269, -0.9810144901275635}, +{-2.666280508041382, -1.2316962480545044, -1.5934581756591797}, +{0.060217030346393585, 0.04459567740559578, 0.04174110293388367}, +{-1.5430837869644165, 1.8187413215637207, -0.4020433723926544}, +{-1.357869267463684, 0.3691598176956177, -0.1819448620080948}, +{-0.31423425674438477, -0.3426116108894348, -0.42019981145858765}, +{-1.2839804887771606, 0.7425776720046997, -0.31492841243743896}, +{0.9143190979957581, 0.5529376864433289, -0.4822401702404022}, +{-0.45287153124809265, 0.32383641600608826, 0.23100069165229797}, +{-0.059648994356393814, 1.1218560934066772, -3.683715581893921}, +{-1.1125401258468628, 2.7486188411712646, -0.8992776274681091}, +{0.06859899312257767, 0.444164901971817, 0.3085813820362091}, +{-1.6493420600891113, -1.7276458740234375, -0.17972253262996674}, +{1.251297950744629, 1.913495659828186, 0.6840310096740723}, +{-0.10954395681619644, 0.604731559753418, 0.07929249852895737}, +{0.23415051400661469, 0.3280261158943176, 0.3263165056705475}, +{0.17927806079387665, 1.173241376876831, -0.00020347963436506689}, +{0.27690985798835754, 0.012216079980134964, -0.1508377343416214}, +{-0.563967764377594, 1.8411893844604492, -0.9125906229019165}, +{-1.4735169410705566, 1.0255120992660522, -0.1290537565946579}, +{-0.34958386421203613, -0.08935845643281937, -0.4553426206111908}, +{1.0119270086288452, -1.1922436952590942, -0.6310713291168213}, +{-1.5003814697265625, -0.18059983849525452, -1.382535457611084}, +{0.0046412209048867226, -0.049610935151576996, -0.23381716012954712}, +{0.32966306805610657, 0.2272956669330597, -0.6174439191818237}, +{0.10227310657501221, -2.169588088989258, 2.027024984359741}, +{-0.5042216777801514, 0.5864580869674683, -0.09208674728870392}, +{-0.03928422927856445, -2.3927175998687744, 0.39607346057891846}, +{1.5910677909851074, 1.5480191707611084, -2.0848214626312256}, +{0.0020363223738968372, 0.3126022517681122, -0.3585198223590851}, +{-1.228519320487976, -0.6946499943733215, -1.0369704961776733}, +{1.4694007635116577, 1.6802071332931519, -0.30015668272972107}, +{-0.39685994386672974, 0.567352831363678, -0.0017696316353976727}, +{-0.11227840185165405, 0.2556597888469696, -0.4736069440841675}, +{0.3421209454536438, 0.663151204586029, -0.4774170517921448}, +{0.4878734350204468, -0.7222210168838501, 0.03648398071527481}, +{0.8543081283569336, -1.6069170236587524, -0.08817320317029953}, +{-0.06994453072547913, 0.7753170132637024, 0.25426727533340454}, +{-0.5878971219062805, -0.5801769495010376, -0.5248152613639832}, +{-0.8838059902191162, 0.19274219870567322, -0.14054414629936218}, +{0.030591025948524475, -0.5588011741638184, -0.42419686913490295}, +{-0.4114333987236023, 0.4555260241031647, -0.2653469741344452}, +{0.5624908804893494, 2.0547025203704834, 0.8069775700569153}, +{-2.0192811489105225, -0.9836549758911133, -2.1452417373657227}, +{-0.21066896617412567, 0.6339011192321777, 0.1302238553762436}, +{-0.34930768609046936, 0.9611310958862305, 0.3207450211048126}, +{0.044073570519685745, -1.9008057117462158, -1.833204984664917}, +{-0.904982328414917, -0.2108210027217865, -0.058399736881256104}, +{1.1154685020446777, 0.3963758945465088, 1.5129910707473755}, +{-1.6547958850860596, -1.6637861728668213, -1.3308043479919434}, +{0.06164368614554405, -0.22473914921283722, -0.08182628452777863}, +{1.0360807180404663, -0.791605532169342, -0.41659924387931824}, +{-1.188469648361206, 0.20305782556533813, 0.0490637943148613}, +{-0.29482898116111755, 0.42961829900741577, -0.23417170345783234}, +{-1.6801049709320068, 0.09300093352794647, 0.35526713728904724}, +{0.6775414943695068, 1.4157118797302246, -0.13502104580402374}, +{-0.027241598814725876, -0.3093824088573456, 0.3604286015033722}, +{0.9377912878990173, -0.5996825695037842, 0.9125723838806152}, +{0.2158232033252716, -1.662360429763794, 0.5782380104064941}, +{0.1593679040670395, 0.13596397638320923, 0.5747512578964233}, +{1.1882115602493286, 0.8187084197998047, 1.6158899068832397}, +{-1.8334028720855713, 1.4498528242111206, 0.7095765471458435}, +{-0.42915263772010803, -0.4495657980442047, 0.36968764662742615}, +{1.1948596239089966, 0.641151487827301, -0.4882235527038574}, +{-1.3828716278076172, 1.2878739833831787, 1.310987949371338}, +{-0.09640812128782272, -0.351214200258255, 0.19098612666130066}, +{-0.2662491798400879, -1.0576103925704956, 0.3329196870326996}, +{-0.4096817374229431, -1.4596787691116333, 0.6146266460418701}, +{-0.050300318747758865, -0.16178996860980988, -0.17569564282894135}, +{1.1360673904418945, 2.080265760421753, -0.05105840042233467}, +{-0.20529349148273468, -0.3392641842365265, 2.7240803241729736}, +{-0.4653627872467041, 0.07838455587625504, 0.4491701126098633}, +{-0.15186402201652527, -0.9042744040489197, 0.8177109360694885}, +{-1.5404475927352905, 0.3078095018863678, 0.5135574340820312}, +{0.8648372292518616, -0.03917090967297554, 0.06328218430280685}, +{-0.1825215369462967, -2.0109293460845947, 1.4547353982925415}, +{-0.6518334746360779, -0.3321642577648163, -0.5833715200424194}, +{0.6199634671211243, 0.16187620162963867, -0.13276386260986328}, +{1.6430158615112305, 0.624369740486145, 0.863058865070343}, +{1.1340337991714478, -0.9051179885864258, 2.861788272857666}, +{-0.24920502305030823, -0.1085035428404808, -0.5281832218170166}, +{1.0110048055648804, -1.0590802431106567, -1.144881010055542}, +{1.7547446489334106, 0.6456780433654785, -0.680976152420044}, +{-0.45476651191711426, 0.012846213765442371, -0.18255485594272614}, +{-0.04746953770518303, -0.5448347330093384, -0.8742079734802246}, +{0.38931024074554443, 1.0260576009750366, -0.1833413690328598}, +{0.7074894905090332, 0.03519627824425697, 0.44318488240242004}, +{0.2801411747932434, 0.03709512948989868, 0.4554692208766937}, +{-0.40192848443984985, 1.8592686653137207, -1.8659641742706299}, +{-0.3308294117450714, 0.4983534812927246, 0.07608957588672638}, +{-0.21139317750930786, -0.16129885613918304, -0.7625452876091003}, +{-0.20645076036453247, -1.7676606178283691, 0.5983028411865234}, +{-0.3219546973705292, 0.009673799388110638, -0.09013301879167557}, +{-0.6326681971549988, 0.12848401069641113, 2.421419382095337}, +{-1.2952519655227661, -2.1500158309936523, 0.8045824766159058}, +{-0.1287952959537506, 0.3855646252632141, -0.6434397101402283}, +{0.9685001373291016, 0.13012805581092834, -1.7219182252883911}, +{-0.7558104991912842, -0.7069376111030579, -0.9688486456871033}, +{-0.5695779323577881, 0.5490730404853821, 0.07553786784410477}, +{1.663872241973877, -0.45240727066993713, 2.295452117919922}, +{-2.622441530227661, 0.4234154224395752, -1.0117177963256836}, +{0.03548029065132141, -0.6082348227500916, 0.09610973298549652}, +{1.128456711769104, 0.008438309654593468, -1.33706533908844}, +{-0.34939414262771606, -1.0015159845352173, 0.6872060298919678}, +{0.0858224481344223, 0.16606897115707397, 0.7077407836914062}, +{0.5408244132995605, -0.4933226704597473, -1.8959704637527466}, +{0.15531028807163239, -0.15009593963623047, 0.06583104282617569}, +{-0.038398828357458115, 0.014156858436763287, -0.07554477453231812}, +{-0.44228658080101013, 1.6557729244232178, -0.010393604636192322}, +{-1.9799809455871582, 1.3660814762115479, 0.6865350008010864}, +{-0.2744535207748413, 0.9001865983009338, -0.35845914483070374}, +{-1.1404149532318115, 1.4720667600631714, -0.8485036492347717}, +{-0.6755882501602173, -1.3697214126586914, 1.6890307664871216}, +{0.15904928743839264, -0.07407807558774948, -0.5083595514297485}, +{-1.4451857805252075, -1.9398298263549805, 0.8792074918746948}, +{-1.1886078119277954, -1.6116114854812622, -0.3311387002468109}, +{0.647809624671936, -0.00322913471609354, 0.03821796923875809}, +{-0.5121561884880066, -0.24726180732250214, -0.34981200098991394}, +{1.455720067024231, 1.978125810623169, -0.5771809220314026}, +{0.03759617730975151, 0.6972923874855042, -0.27070152759552}, +{-2.5557312965393066, -2.6385157108306885, -1.7462077140808105}, +{0.23807169497013092, 0.06339027732610703, -3.2555341720581055}, +{0.1189451739192009, 0.05628746375441551, -0.073343925178051}, +{-0.12420929968357086, -1.4445065259933472, 1.0908315181732178}, +{0.27015289664268494, -0.19655254483222961, -0.951996386051178}, +{-0.13064497709274292, -0.41224759817123413, -0.35044124722480774}, +{-1.054578423500061, -1.9502242803573608, -1.3710076808929443}, +{0.9148566722869873, -0.5284152030944824, -0.46945616602897644}, +{0.19977645576000214, 0.9096406102180481, -0.18856388330459595}, +{2.649742364883423, 2.937681198120117, -0.8523287773132324}, +{-7.757961429888383e-05, 0.6764005422592163, 1.4769002199172974}, +{-0.21048477292060852, 0.06677021086215973, -0.015275975689291954}, +{1.799949049949646, -0.6823426485061646, 2.8691234588623047}, +{-2.285088539123535, 0.997606098651886, -3.0521891117095947}, +{0.36454081535339355, 0.8505481481552124, -0.6576710343360901}, +{0.5872050523757935, 2.1919045448303223, 0.3330235481262207}, +{-1.8270102739334106, -1.36221444606781, -0.1675005853176117}, +{-0.016591055318713188, -0.2982965111732483, 0.059562575072050095}, +{0.23321907222270966, 0.39860811829566956, -0.7065214514732361}, +{1.055596947669983, -0.9634543657302856, 1.0576831102371216}, +{-0.07133346050977707, 0.23306864500045776, -0.3868700861930847}, +{0.24964898824691772, 1.6778162717819214, -2.2483346462249756}, +{0.07289410382509232, -1.513330340385437, 0.13092416524887085}, +{0.09684719890356064, 0.10095027089118958, -0.23697637021541595}, +{1.3784888982772827, -1.3131437301635742, 2.1350831985473633}, +{-1.0964285135269165, 1.7322604656219482, -0.2688061594963074}, +{0.4239870309829712, 0.33075353503227234, 0.32916945219039917}, +{0.42269957065582275, 0.6179118752479553, 0.6440432667732239}, +{0.721488893032074, -0.890191376209259, 0.013945449143648148}, +{0.19866792857646942, -0.6272496581077576, 0.5485812425613403}, +{-1.126722812652588, 0.859441339969635, -1.8520324230194092}, +{-2.4485840797424316, -0.8188236951828003, -0.8855343461036682}, +{0.002644973574206233, 0.0055220159702003, 0.39227229356765747}, +{-0.1772521585226059, -1.2519205808639526, 0.02940625697374344}, +{-0.7449871897697449, 2.2577898502349854, 1.2830251455307007}, +{0.6689369678497314, -0.43362846970558167, -0.5175297856330872}, +{0.6557519435882568, -0.2590656876564026, -0.37612876296043396}, +{1.563501000404358, -0.6203011870384216, 1.7406712770462036}, +{-0.08693742007017136, 0.6335686445236206, 0.1615799367427826}, +{3.059197425842285, -0.5768571496009827, 0.13810394704341888}, +{-2.76759672164917, 1.7724303007125854, -0.2049368917942047}, +{0.338744193315506, 0.13512717187404633, 0.26849982142448425}, +{-0.33566269278526306, 0.1328708976507187, -0.9503063559532166}, +{-1.14699387550354, -0.36129599809646606, 0.5091608166694641}, +{0.3264651596546173, -0.11134713888168335, 0.12386763840913773}, +{1.0309839248657227, 1.0342313051223755, 0.031151195988059044}, +{1.2029871940612793, -0.8489366173744202, -0.046264443546533585}, +{0.05667152255773544, 0.04115781560540199, 0.07540318369865417}, +{-0.8010499477386475, 0.4483431279659271, 0.8901854753494263}, +{-1.1347887516021729, -0.39122673869132996, -1.14920973777771}, +{0.4177876114845276, 0.12133674323558807, 0.35394608974456787}, +{-0.42094215750694275, 0.05255405977368355, 0.7583239078521729}, +{0.27487441897392273, 0.12477733939886093, -0.5893192291259766}, +{0.018632901832461357, -0.18369419872760773, -0.5148738026618958}, +{-0.5711164474487305, 2.502182722091675, 0.40783029794692993}, +{1.2606016397476196, 0.6984987854957581, 0.6331619024276733}, +{0.3477822542190552, -0.5846375226974487, 0.17694057524204254}, +{0.44518694281578064, 0.35465189814567566, -0.8580797910690308}, +{1.3129953145980835, 0.5116350054740906, -0.4869586229324341}, +{0.15184833109378815, 0.47929537296295166, -0.002976372605189681}, +{0.5815399885177612, -0.011968896724283695, 2.0626096725463867}, +{0.4735616147518158, 0.1463940590620041, 1.248631238937378}, +{-0.1750924438238144, 0.10823743790388107, -0.8932545781135559}, +{0.3650292456150055, 0.27443188428878784, -1.1055105924606323}, +{-0.07657783478498459, -0.5307952165603638, -0.8269047141075134}, +{0.2733248770236969, 0.26201486587524414, -0.4211848974227905}, +{-1.5291969776153564, 0.8454769849777222, -1.9336987733840942}, +{1.385881781578064, 2.0292110443115234, -1.3110878467559814}, +{0.09354867786169052, -0.1290140300989151, 0.27335384488105774}, +{0.09783556312322617, 0.19414114952087402, 0.3181927800178528}, +{-1.0223278999328613, -1.983079195022583, -0.3179064393043518}, +{-0.6226887106895447, 0.8380668759346008, -0.4176121950149536}, +{-0.807981550693512, 0.7331771850585938, 0.5780054330825806}, +{-1.2088367938995361, -0.3997625410556793, -0.5543164610862732}, +{0.340547114610672, -0.03832540288567543, 0.33540815114974976}, +{-0.5031346678733826, 0.8199889659881592, 0.45208990573883057}, +{-0.7559480667114258, -0.5686184167861938, -0.6530025601387024}, +{-0.14437314867973328, 0.1993235945701599, 0.07295268028974533}, +{-0.17288047075271606, 0.15060707926750183, 1.8443078994750977}, +{0.3301888108253479, -1.352530598640442, -0.29898402094841003}, +{0.48249346017837524, -0.7920406460762024, 0.28466281294822693}, +{-0.3160148561000824, 1.0881980657577515, 0.6245065331459045}, +{-0.5577881932258606, -0.7012969851493835, -1.5383390188217163}, +{-0.3803260326385498, 0.16102845966815948, -0.5096157789230347}, +{-0.729000449180603, 0.9166206121444702, -1.1826977729797363}, +{-0.6811763644218445, 1.713500738143921, 0.6855194568634033}, +{-0.24485544860363007, 0.24710915982723236, -0.028506005182862282}, +{0.9125244617462158, -0.5164896845817566, 3.244347333908081}, +{-2.2342844009399414, 0.8112821578979492, 0.9912243485450745}, +{-0.2578909695148468, -0.257345974445343, -0.15986816585063934}, +{-0.5899289846420288, -1.9068210124969482, 1.5020313262939453}, +{-0.3041438162326813, -0.7836155891418457, 0.3007524907588959}, +{0.667151689529419, -0.21542462706565857, -0.2693457305431366}, +{0.886024534702301, 0.02065080590546131, -0.21545295417308807}, +{1.5566940307617188, 0.43685439229011536, 0.04256905987858772}, +{0.21092620491981506, 0.19868764281272888, 0.31809523701667786}, +{-2.148355484008789, 1.264273762702942, 2.8257195949554443}, +{1.1834399700164795, -0.719626784324646, -0.7509543895721436}, +{-0.0027901316061615944, 0.09644466638565063, 0.4422910213470459}, +{0.0801539197564125, -0.3186160922050476, 0.5987548232078552}, +{0.11879530549049377, 0.49605390429496765, 0.5735436081886292}, +{0.12497011572122574, 0.4438895583152771, -0.3317252993583679}, +{-0.7912535667419434, -0.9051770567893982, 0.01838988997042179}, +{0.428103506565094, -1.7755951881408691, -1.0912269353866577}, +{0.21428701281547546, 0.12875081598758698, 0.10447075217962265}, +{-0.0451103039085865, 0.21082238852977753, -0.04760389029979706}, +{-0.09136112034320831, 0.9698209762573242, -0.3099418580532074}, +{0.08276581764221191, 0.14226441085338593, 0.6715441942214966}, +{-1.3316137790679932, 1.5017915964126587, 0.8230738639831543}, +{-0.018525725230574608, -1.4345049858093262, 0.9480366110801697}, +{-0.09965138137340546, -0.038337696343660355, 0.17725636065006256}, +{0.09092406183481216, -0.06516098976135254, 0.22287073731422424}, +{2.954080820083618, -1.109992504119873, 0.36604076623916626}, +{0.151129350066185, 0.2178264856338501, 0.39778098464012146}, +{-1.798505425453186, 1.3220781087875366, -1.354712963104248}, +{-1.3166940212249756, 2.1044633388519287, 0.003768924158066511}, +{-0.18193696439266205, 0.2845052480697632, 0.9506706595420837}, +{-0.11605153977870941, 0.3889220058917999, 0.965638279914856}, +{1.120086669921875, 0.5245475769042969, 0.48437175154685974}, +{-0.16416171193122864, -0.5472566485404968, -0.047763314098119736}, +{-0.8508359789848328, -1.8653044700622559, -0.9170266389846802}, +{-0.6434422731399536, -1.2211863994598389, -0.3335830867290497}, +{-0.2415294051170349, 1.1907734870910645, -0.49999716877937317}, +{-0.3424876034259796, -1.661791443824768, -1.386757254600525}, +{-0.9457290172576904, 1.0585604906082153, -0.4893326461315155}, +{-0.4238988757133484, 0.06993629783391953, 0.2602420449256897}, +{0.9363341927528381, -0.8166611194610596, 1.4223593473434448}, +{-1.0755624771118164, 0.3735736608505249, -0.655092179775238}, +{0.12178342044353485, -0.12512126564979553, -0.10760440677404404}, +{0.9751707911491394, 0.002846020506694913, 1.1377238035202026}, +{1.6047732830047607, 1.896281361579895, 0.5342375636100769}, +{0.44179439544677734, -0.19409963488578796, -0.21515214443206787}, +{-2.3485841751098633, -0.44236621260643005, -2.177971363067627}, +{-0.31507793068885803, -0.2654719948768616, 3.1764795780181885}, +{0.1309499740600586, 0.4224407970905304, 0.5063117742538452}, +{-0.5181815028190613, 1.9798635244369507, 0.28241628408432007}, +{-0.0860210508108139, 0.7933056950569153, 0.32486772537231445}, +{0.2941845953464508, 0.15462864935398102, -0.6191063523292542}, +{0.9330229163169861, 2.4355461597442627, 0.2915358245372772}, +{-0.7952304482460022, 0.08538900315761566, 0.2422703355550766}, +{0.29355406761169434, -0.03203557804226875, -0.3360363245010376}, +{0.10598543286323547, 0.6899434924125671, 2.190399646759033}, +{1.3869866132736206, -1.8434895277023315, 0.8132911324501038}, +{-0.8191516995429993, 0.9332700371742249, 0.2109614908695221}, +{-0.14282524585723877, 0.8725948333740234, 0.2150537520647049}, +{0.042791809886693954, 0.6219462156295776, -0.33955666422843933}, +{0.05563532933592796, -0.4127352237701416, -0.39615029096603394}, +{0.03938579186797142, 0.04020156338810921, 0.0339634083211422}, +{0.09627532213926315, -1.5731425285339355, -0.5268971920013428}, +{-0.24760620296001434, -0.3198913037776947, 0.4363063871860504}, +{0.8141822814941406, -1.6136910915374756, 0.1668783277273178}, +{-1.6749019622802734, 1.9863728284835815, 0.7544751167297363}, +{-0.1582355946302414, 0.854539155960083, -0.2595762014389038}, +{-1.8182730674743652, -0.06775740534067154, -0.03868739679455757}, +{0.6751595735549927, 0.4306066930294037, 1.472873330116272}, +{0.3417447507381439, -0.1624339073896408, -0.11893603205680847}, +{-0.3753279447555542, -1.1929287910461426, 2.900574207305908}, +{0.020496651530265808, 0.7545167803764343, -1.8293838500976562}, +{-0.745255708694458, -0.4728820323944092, -0.41911688446998596}, +{-2.177497386932373, 1.915612816810608, -0.8027933835983276}, +{2.254509687423706, -3.329228639602661, -0.39701151847839355}, +{0.2697567641735077, 0.0920390635728836, -0.18321412801742554}, +{-0.5575094223022461, 1.9322253465652466, -0.7852747440338135}, +{2.0149919986724854, -0.7159978747367859, -0.43247857689857483}, +{0.5554611086845398, -0.2481471300125122, -0.604024350643158}, +{0.32012033462524414, -0.07362347841262817, -1.5518956184387207}, +{0.840775728225708, 0.7742420434951782, -0.42831480503082275}, +{0.2846857011318207, -0.32975897192955017, 0.006741039454936981}, +{-0.3456799387931824, -0.1565076857805252, 0.2633325159549713}, +{0.4114953577518463, -0.4209922254085541, -1.7606998682022095}, +{-0.8845919370651245, -0.3219779431819916, 0.07125615328550339}, +{0.29588013887405396, -0.2586672902107239, -0.5204024314880371}, +{-0.26017507910728455, -1.996955156326294, -0.08161060512065887}, +{0.22117841243743896, -0.6571108102798462, 0.17141608893871307}, +{1.5477627515792847, -0.8043229579925537, -1.3469961881637573}, +{0.44600197672843933, -2.236459732055664, 0.9617413282394409}, +{0.30492550134658813, -0.24328289926052094, 0.17294558882713318}, +{-0.8279333114624023, -3.0332283973693848, -0.45849543809890747}, +{0.5272300243377686, 1.256086826324463, 0.3522973954677582}, +{0.7030126452445984, -0.2317916601896286, 0.9115757942199707}, +{1.2736347913742065, -0.3359634578227997, 1.043437123298645}, +{0.5901345014572144, -1.4072712659835815, 1.569663405418396}, +{0.34415486454963684, -0.22897391021251678, -0.054245952516794205}, +{-1.3607993125915527, 0.17525914311408997, 1.927716612815857}, +{0.264616996049881, -1.054240107536316, -0.06711884588003159}, +{-0.8399623036384583, 0.6283382773399353, -0.5485196709632874}, +{0.725864827632904, 0.6766858696937561, -2.0879642963409424}, +{-0.2683231830596924, 0.15499398112297058, 0.31786879897117615}, +{0.6796512007713318, -0.7145307660102844, 0.6726639270782471}, +{-0.5749551057815552, -0.27951672673225403, 1.5076287984848022}, +{-0.22273734211921692, 0.3961621820926666, 1.6450881958007812}, +{-0.3501208424568176, 0.09589941799640656, -0.12829089164733887}, +{0.8228675127029419, 0.3054772615432739, 0.4078380763530731}, +{-1.0086005926132202, -1.5806293487548828, 1.6282721757888794}, +{0.46538472175598145, -0.04250973090529442, 0.45028090476989746}, +{2.973445415496826, 2.2601048946380615, -2.287733316421509}, +{-1.9226088523864746, 2.4673452377319336, 1.4311445951461792}, +{0.08842801302671432, -0.00985706876963377, -0.1745125651359558}, +{-1.5021713972091675, 1.8897281885147095, -1.6891283988952637}, +{1.525709629058838, -2.261443853378296, 2.2861812114715576}, +{0.49284395575523376, -0.05509272590279579, 0.5695704221725464}, +{0.45873263478279114, 0.530744731426239, 0.6485635638237}, +{2.5205702781677246, 2.185758113861084, -1.4560012817382812}, +{0.22576649487018585, 0.11561619490385056, 0.4819384813308716}, +{0.0876343622803688, 1.4126029014587402, 1.3294967412948608}, +{-2.77213191986084, 1.730123519897461, 1.5518875122070312}, +{-0.6383677124977112, -0.42481696605682373, 0.37123921513557434}, +{0.09480506181716919, -0.43571820855140686, 2.303217887878418}, +{-1.333646535873413, 1.0345903635025024, 0.1345476359128952}, +{-0.2519485652446747, 0.25464650988578796, 0.08686313033103943}, +{-1.2362768650054932, 0.13325908780097961, 0.1304846853017807}, +{0.41842615604400635, 0.43952664732933044, 0.023669570684432983}, +{-0.1896248310804367, -0.6211363673210144, -0.13280679285526276}, +{1.6778333187103271, -2.3526456356048584, -1.3311221599578857}, +{0.17032356560230255, -1.2537044286727905, 1.2287079095840454}, +{0.5853699445724487, -0.09461712837219238, 0.2647162079811096}, +{0.824064314365387, -1.167448878288269, 0.45726048946380615}, +{0.43995869159698486, -1.0403337478637695, -0.10293292999267578}, +{-0.003007772844284773, 0.2779291868209839, -0.2506254315376282}, +{1.6410434246063232, -0.2537546753883362, -1.0408697128295898}, +{0.07906793057918549, 1.0809385776519775, -0.8480939865112305}, +{0.16361558437347412, 0.8541096448898315, -0.3647918701171875}, +{0.41150644421577454, 0.8596977591514587, -0.286151647567749}, +{0.1446767896413803, 0.8749299049377441, -0.16042526066303253}, +{-0.29250818490982056, 0.25676336884498596, 0.3710425794124603}, +{-3.3368330001831055, -0.9987892508506775, 0.08046232163906097}, +{0.2652585208415985, 1.8543503284454346, 0.27549201250076294}, +{-0.2398747056722641, -0.4396626353263855, -0.824180543422699}, +{-0.29873141646385193, -0.21548789739608765, 0.4767451882362366}, +{-0.025800110772252083, -0.44992318749427795, -0.6003336310386658}, +{0.07691065967082977, 0.21566297113895416, -0.007468470372259617}, +{1.2673876285552979, 0.6645131707191467, 0.3095051050186157}, +{-0.25513654947280884, 0.2302563339471817, -0.3875320255756378}, +{-0.3146457374095917, -0.3359489142894745, -0.5701026916503906}, +{-0.7409754991531372, 0.905410647392273, 0.31451237201690674}, +{0.18668942153453827, 1.2131015062332153, -0.6170883774757385}, +{-0.18426024913787842, 0.5771768689155579, 0.18147815763950348}, +{-1.2836642265319824, -1.828425645828247, -2.5626845359802246}, +{-0.5027505159378052, 1.2626959085464478, 0.9425243735313416}, +{0.3819228410720825, -0.2520674467086792, -0.7677362561225891}, +{3.307633876800537, 1.3411633968353271, -1.2593724727630615}, +{-1.7039746046066284, 1.419346809387207, -0.9202364683151245}, +{-0.2584998309612274, -0.1732827126979828, -0.40726009011268616}, +{-1.6280573606491089, 0.8913427591323853, 1.9847047328948975}, +{-1.5240169763565063, 1.9236736297607422, -0.9590573906898499}, +{0.793685793876648, -0.6245618462562561, 0.1504814624786377}, +{0.8996796607971191, -1.0939279794692993, 0.26230430603027344}, +{1.7997647523880005, -0.5017832517623901, -0.6802692413330078}, +{-0.47724559903144836, -0.19451723992824554, -0.6414370536804199}, +{-0.8451524972915649, -1.289554476737976, 0.18203842639923096}, +{-0.923181414604187, 0.3163057267665863, -0.36344772577285767}, +{0.6076056957244873, 0.06184522435069084, 0.10263285785913467}, +{-0.08328568935394287, -1.7251607179641724, 1.5166758298873901}, +{0.14926691353321075, -0.2575833201408386, -1.077637791633606}, +{-0.3684888780117035, 0.30248725414276123, -0.58232182264328}, +{-0.4005362391471863, 0.02603471837937832, -0.5968520045280457}, +{3.1335670948028564, -1.197422742843628, 1.0892071723937988}, +{0.16013506054878235, -0.5285173654556274, -0.10544712841510773}, +{-1.6229357719421387, -0.4225521981716156, -1.9643055200576782}, +{1.4143215417861938, 0.11530499160289764, 1.0818291902542114}, +{-0.36406639218330383, 0.020022541284561157, -0.1290503293275833}, +{-0.8551033735275269, -0.04914407059550285, -0.4366014003753662}, +{0.4701627790927887, 0.6958136558532715, 0.9165624976158142}, +{-0.32701754570007324, -0.011124184355139732, 0.06279391050338745}, +{0.6551551818847656, -2.137033462524414, -0.7581363320350647}, +{-1.0240654945373535, 1.492857575416565, 1.2508490085601807}, +{0.6501609086990356, -0.7185206413269043, 0.00033512484515085816}, +{0.7382829189300537, -0.5592777132987976, -0.9823582172393799}, +{-0.35987353324890137, -0.8593743443489075, 0.3837890028953552}, +{-0.3712061941623688, -0.8387371301651001, 0.5511136651039124}, +{1.8589704036712646, 1.5488789081573486, -0.8682065606117249}, +{0.2953391671180725, 1.9419597387313843, 0.653312623500824}, +{0.22261442244052887, 0.21088676154613495, 0.3399582505226135}, +{1.4808982610702515, 0.06790424883365631, 2.199847936630249}, +{-0.5820016264915466, -1.4032984972000122, -0.554137647151947}, +{0.40416672825813293, 0.25302475690841675, 0.039534393697977066}, +{-1.8092708587646484, -2.0030124187469482, 2.518073558807373}, +{1.30783212184906, -0.2225216180086136, 0.8226987719535828}, +{0.07229356467723846, 0.5017457008361816, -0.6219882369041443}, +{-1.1945507526397705, 0.1059715524315834, -0.2712416350841522}, +{-1.5689551830291748, -1.2356398105621338, -0.18341094255447388}, +{-0.17994219064712524, 0.26779815554618835, -0.48759517073631287}, +{0.4755372703075409, 1.2131500244140625, -0.3348044157028198}, +{-0.22397442162036896, 0.02955508418381214, -0.4895761013031006}, +{0.3459686040878296, 0.36129477620124817, 0.09504665434360504}, +{-0.030573198571801186, 1.5920110940933228, -0.6067512631416321}, +{-2.231826066970825, 2.265707492828369, 0.48429515957832336}, +{-0.09634389728307724, 0.5791678428649902, 0.6695123314857483}, +{-1.7736798524856567, 0.6275977492332458, -0.39726340770721436}, +{0.648464560508728, -1.7030665874481201, 1.5291928052902222}, +{0.09250238537788391, 0.8284870982170105, -0.6432845592498779}, +{2.7422356605529785, -0.14615042507648468, -0.25261005759239197}, +{-2.6043238639831543, 1.7741249799728394, 1.3606637716293335}, +{-0.5421582460403442, -0.8267714977264404, -0.7372952699661255}, +{-0.16328555345535278, -1.2294492721557617, -0.6927763819694519}, +{0.02352292090654373, -0.9691370129585266, -0.7641642093658447}, +{-0.15747235715389252, 0.24179522693157196, 0.45570722222328186}, +{0.48532813787460327, -1.5130258798599243, -0.35522177815437317}, +{-0.5531103014945984, 1.7431474924087524, 0.7136029601097107}, +{-0.4383459985256195, -0.4499293267726898, 0.12098166346549988}, +{-0.7669337391853333, -1.6377408504486084, 0.024706454947590828}, +{-0.33109933137893677, 1.4623106718063354, 0.03895571455359459}, +{-0.20711462199687958, 0.21376395225524902, 0.20411302149295807}, +{-2.156332492828369, 0.16599319875240326, -0.11600036919116974}, +{1.0623496770858765, 0.5457847118377686, -0.3098269999027252}, +{0.058621883392333984, -0.1895063817501068, -0.42292529344558716}, +{2.3984017372131348, -1.455648422241211, -1.7720222473144531}, +{0.013250446878373623, 1.9209907054901123, 0.9251354336738586}, +{-0.23880276083946228, 0.06098262220621109, 0.30730098485946655}, +{2.6866860389709473, 2.566206455230713, 0.1591777801513672}, +{0.07505571842193604, 2.3026363849639893, 0.03595089539885521}, +{-0.08056683093309402, 0.7203112244606018, -0.03961066156625748}, +{-0.3433339595794678, 0.3051168620586395, -1.8779668807983398}, +{-1.7286250591278076, -1.6987050771713257, 0.6008428931236267}, +{0.4395309388637543, 0.19378280639648438, 0.11540787667036057}, +{0.4228929877281189, -0.8561888933181763, -1.6199051141738892}, +{0.2839367687702179, -1.0622178316116333, -0.904665470123291}, +{-0.18831613659858704, -0.28131353855133057, 0.5036118030548096}, +{-0.5519382953643799, -0.182795912027359, 0.5449411273002625}, +{0.3907533288002014, 0.4977636933326721, -0.33331426978111267}, +{-0.04119575768709183, -0.20739451050758362, -0.41694459319114685}, +{-1.6666170358657837, -0.5833990573883057, -0.13806921243667603}, +{-1.8935184478759766, -0.5455996990203857, -0.09693600982427597}, +{-0.25553098320961, 0.11873622238636017, -0.42628875374794006}, +{-1.5901305675506592, 1.1609476804733276, 0.3694468140602112}, +{-2.08484148979187, -0.011551168747246265, -0.1803339719772339}, +{0.03172147274017334, 0.37240666151046753, 0.4348606467247009}, +{0.44182881712913513, 0.010979600250720978, 0.5343031883239746}, +{1.3706656694412231, -0.13193026185035706, 0.35091400146484375}, +{-0.05867214500904083, 0.10391713678836823, 0.12867462635040283}, +{0.38092735409736633, -1.0140459537506104, 0.1959111988544464}, +{-0.16060170531272888, -0.6268797516822815, -1.1263905763626099}, +{0.5743659734725952, -0.6762388944625854, -0.2220604121685028}, +{2.2823519706726074, -0.770944356918335, 0.8526782393455505}, +{0.06399291008710861, -0.026551688089966774, 0.6450778841972351}, +{0.43487387895584106, 0.6036956906318665, -0.06464669108390808}, +{-0.43699949979782104, -1.0796972513198853, 1.0196748971939087}, +{0.2692722976207733, 0.11868927627801895, 0.5410767197608948}, +{0.07086238265037537, -0.2649983763694763, -0.2208242118358612}, +{-1.1463857889175415, 0.3359166383743286, 0.037392508238554}, +{0.41832366585731506, 0.8824149966239929, 0.6034637689590454}, +{0.264967679977417, 0.43361151218414307, -0.4394993782043457}, +{1.759035587310791, -0.7259782552719116, -0.9520295262336731}, +{-1.8056838512420654, -1.5906256437301636, -0.6244449615478516}, +{-0.3511778712272644, -0.2187027633190155, -0.8246354460716248}, +{0.9560621976852417, -1.1015807390213013, 2.592146635055542}, +{-0.11092253774404526, -1.2881174087524414, 0.5751360058784485}, +{0.007369721308350563, 0.09758815169334412, 0.3008546233177185}, +{2.017367124557495, 0.37089285254478455, 2.7310750484466553}, +{-3.12688946723938, 0.8939788341522217, 2.7057642936706543}, +{-0.25576457381248474, -1.1524633169174194, 0.38916122913360596}, +{1.0273579359054565, -0.7353780269622803, -0.5222318768501282}, +{0.873518168926239, 0.47644075751304626, 1.4177472591400146}, +{0.08777013421058655, 0.5601645708084106, 0.20526647567749023}, +{-0.20467787981033325, 0.8008953928947449, -0.7049183249473572}, +{-0.04902663826942444, -0.29573583602905273, 0.3302300274372101}, +{-0.1265484243631363, 0.25219279527664185, -0.31967392563819885}, +{-1.7270911931991577, 0.12273069471120834, -0.6416036486625671}, +{-2.1914210319519043, 0.6676101088523865, -0.5152944922447205}, +{-0.20316724479198456, 0.5360240340232849, -0.014158952981233597}, +{-0.18809211254119873, 0.6063888072967529, 0.03398485109210014}, +{-0.4792689383029938, 1.8779953718185425, -1.0355324745178223}, +{-0.26375651359558105, 0.39605462551116943, 0.1927701085805893}, +{-1.1883525848388672, -0.41610094904899597, -0.6908742785453796}, +{-1.2455031871795654, -1.4380160570144653, -0.10536409914493561}, +{-0.007920722477138042, 0.8181653022766113, -0.2859721779823303}, +{-0.11255698651075363, 0.0899786502122879, -0.22198766469955444}, +{0.15979836881160736, 1.2584950923919678, -0.5810640454292297}, +{-0.07724695652723312, -0.27545270323753357, -0.16611218452453613}, +{1.2286638021469116, 0.5010938048362732, -1.3333004713058472}, +{-2.2678370475769043, -0.06307484209537506, 1.4590983390808105}, +{-0.5970278978347778, 0.7482635974884033, -0.49317190051078796}, +{-1.2373239994049072, -1.1803432703018188, 1.645184874534607}, +{0.22315973043441772, 0.6417776942253113, -0.6711665391921997}, +{0.05673763155937195, 0.2074279487133026, -0.01727296970784664}, +{0.9136999249458313, 1.7900265455245972, -0.9724395871162415}, +{1.2841368913650513, 1.9853500127792358, 0.9301446676254272}, +{-0.5028285384178162, 0.08247160166501999, 0.5649330019950867}, +{0.19404593110084534, -0.6258025169372559, -0.8059408068656921}, +{-2.4544758796691895, -1.0003186464309692, 2.1638343334198}, +{-0.1309834122657776, -0.23270440101623535, 0.18724776804447174}, +{-0.38127997517585754, 0.029137663543224335, -0.16046302020549774}, +{0.9860655069351196, -1.1351685523986816, 1.4375797510147095}, +{0.4287581443786621, 0.6773061752319336, -0.608563244342804}, +{-1.3950555324554443, 0.0854194164276123, 0.053552087396383286}, +{0.5436425805091858, -0.2911057472229004, 0.0750599279999733}, +{0.36498594284057617, 0.42046794295310974, 0.3337518274784088}, +{-0.2722608149051666, 1.5586137771606445, 0.586319625377655}, +{-0.24807727336883545, 0.4851588308811188, 0.174017071723938}, +{1.26661217212677, 0.9442088603973389, 0.01615995727479458}, +{1.809863567352295, 1.4998739957809448, -0.23152069747447968}, +{0.5059798359870911, -0.23821230232715607, 1.6913894414901733}, +{-0.30462291836738586, -0.2493075579404831, -0.04709186777472496}, +{-0.41815847158432007, -0.6444503664970398, -0.0679929181933403}, +{-0.45476752519607544, -0.06045973673462868, 1.0571013689041138}, +{0.11076372116804123, 0.09562305361032486, 0.1724918633699417}, +{-0.3181844651699066, 0.30770111083984375, -0.7884297966957092}, +{0.7592943906784058, 0.3789708614349365, -0.40372234582901}, +{0.2597615718841553, -0.2543342709541321, -0.48662522435188293}, +{-0.8623195886611938, 1.8738809823989868, 0.8786701560020447}, +{0.0022562958765774965, -0.13979007303714752, -0.9698074460029602}, +{-0.2552191913127899, -0.41458311676979065, -0.42470628023147583}, +{-0.030584532767534256, -0.32723525166511536, -1.9315330982208252}, +{0.19955335557460785, -0.9486232399940491, -0.06407827883958817}, +{-0.17368023097515106, 0.3391052186489105, 0.3597041666507721}, +{-0.7148786187171936, 1.1978895664215088, 0.8694244027137756}, +{0.07675027847290039, 2.257559299468994, -0.6190156936645508}, +{0.37204617261886597, 0.45859476923942566, -0.07746289670467377}, +{0.7187116146087646, -0.5319699048995972, -0.25790277123451233}, +{0.9071753621101379, -1.3440883159637451, -0.3404206335544586}, +{-0.24735665321350098, -0.3210541605949402, -0.001790575566701591}, +{-1.9374022483825684, 0.023612719029188156, -1.8905000686645508}, +{0.07113581895828247, -0.2826896905899048, 0.1179535835981369}, +{0.2922011911869049, -0.41812992095947266, -0.47266072034835815}, +{0.6739452481269836, 0.7383362650871277, 0.44662076234817505}, +{-0.7635881304740906, 0.8800710439682007, -2.0323562622070312}, +{-0.15554580092430115, 0.9074932336807251, -0.17644281685352325}, +{-0.07266131788492203, -0.4630863666534424, -0.5901017189025879}, +{-0.3605353832244873, 2.640943765640259, 0.15006397664546967}, +{0.5104185938835144, 0.7133491635322571, 0.046816155314445496}, +{-0.4937072992324829, 1.9020079374313354, 1.08851158618927}, +{-1.9135383367538452, -0.4880426526069641, -1.5339107513427734}, +{-0.08495533466339111, 0.35340675711631775, 0.0023264302872121334}, +{1.1129581928253174, -1.0003063678741455, 1.0702943801879883}, +{1.0515097379684448, 1.867627501487732, -0.5366887450218201}, +{0.5443616509437561, -0.602604866027832, 0.2703743875026703}, +{-0.7343040704727173, -0.22117207944393158, -0.22215227782726288}, +{0.6360933780670166, -1.6029117107391357, 1.040205717086792}, +{-0.20977835357189178, -0.34713536500930786, -0.32711437344551086}, +{0.37110093235969543, -0.31401708722114563, -1.3769652843475342}, +{-0.9494670033454895, 1.8264389038085938, -0.4089476466178894}, +{0.2892519235610962, -0.3687920570373535, -0.1844082623720169}, +{-0.9875137209892273, -0.32989904284477234, 3.549607276916504}, +{0.7343537211418152, 0.02578701265156269, -1.703511357307434}, +{0.13987556099891663, 0.05419839918613434, -0.4545142948627472}, +{0.9414405822753906, -1.0421152114868164, -1.8064149618148804}, +{0.23627980053424835, 0.9129041433334351, -1.9214975833892822}, +{0.3247360289096832, 0.23268727958202362, -0.23556894063949585}, +{0.4309006631374359, 0.3417932689189911, -0.1877344697713852}, +{-0.03533216193318367, 0.37665173411369324, -1.6678156852722168}, +{-0.12563470005989075, 0.043800678104162216, 0.32990142703056335}, +{0.323031485080719, -1.4628806114196777, 0.23708024621009827}, +{-0.1677131950855255, 0.8364847898483276, 0.41443297266960144}, +{0.4556345045566559, -0.24146583676338196, 0.32416990399360657}, +{0.5690512657165527, -0.7815491557121277, 1.3081762790679932}, +{0.5625146627426147, -0.737878680229187, -2.0886900424957275}, +{0.05508466809988022, 0.16662974655628204, -0.6333199739456177}, +{-2.772287368774414, 1.589807152748108, 0.5919135808944702}, +{0.8399973511695862, -0.48975086212158203, -0.9814003109931946}, +{0.14931631088256836, 0.2525893449783325, -0.05499115213751793}, +{-0.3701934814453125, 0.8430165648460388, 1.2321093082427979}, +{-0.39067819714546204, 0.6298123598098755, 0.12797579169273376}, +{0.21666410565376282, -0.3904597759246826, 0.4169962704181671}, +{-2.7625319957733154, 2.284036874771118, 0.2941751778125763}, +{-0.9649312496185303, -2.8544323444366455, -0.9313448667526245}, +{0.37934085726737976, 0.37422093749046326, -0.35947906970977783}, +{-0.7089390754699707, 0.7622408866882324, 0.132786825299263}, +{-0.19815850257873535, 1.2313460111618042, -0.9637302756309509}, +{0.5304979085922241, 0.31885847449302673, 0.4411334991455078}, +{-1.2667782306671143, -1.0507426261901855, -1.1374787092208862}, +{0.3655990958213806, 0.53363436460495, 0.8966384530067444}, +{0.18580478429794312, 0.055144473910331726, 0.12884792685508728}, +{1.2123759984970093, -0.2103193998336792, -2.978654623031616}, +{-2.265514373779297, -0.732221245765686, 2.1410105228424072}, +{0.2257235050201416, -0.14583346247673035, -0.2966284155845642}, +{1.4281977415084839, -0.3695926368236542, -0.34223616123199463}, +{1.230407476425171, -0.30210110545158386, -0.14811304211616516}, +{-0.018909700214862823, -0.01931431144475937, -0.5848145484924316}, +{0.006185370963066816, -0.07115747034549713, -0.5020249485969543}, +{-0.8026382923126221, -3.560206413269043, 1.0018885135650635}, +{-0.16705699265003204, 0.4336012601852417, -0.03561787307262421}, +{0.9128155708312988, -0.2013198584318161, 0.5089695453643799}, +{0.1127861961722374, -0.2310774028301239, 1.3758444786071777}, +{-0.33370113372802734, -0.41458240151405334, 0.5961466431617737}, +{-1.147092580795288, 0.1945037841796875, -0.18885017931461334}, +{0.6483466625213623, 0.5065469145774841, 0.46510112285614014}, +{0.7107232809066772, -0.3373349606990814, -0.6694406270980835}, +{1.440678596496582, 2.2040932178497314, -2.7751359939575195}, +{-0.4332644045352936, -0.18074293434619904, -1.1108338832855225}, +{-0.48014035820961, 0.14174014329910278, 0.5775548219680786}, +{0.7556803226470947, -1.6038851737976074, -1.3706663846969604}, +{0.757372260093689, -1.2652519941329956, -0.9642624258995056}, +{-0.3652456998825073, -0.4420761168003082, 0.5054541826248169}, +{-2.791451930999756, -2.0236775875091553, 1.1054106950759888}, +{-0.1315726339817047, 0.025326231494545937, 0.5493928790092468}, +{-0.35215258598327637, -0.0975252091884613, 0.15186724066734314}, +{0.3818977475166321, -0.4374328553676605, 0.41246435046195984}, +{0.6646024584770203, -0.856733500957489, 1.4580769538879395}, +{0.40084323287010193, -0.031748414039611816, -0.4193120002746582}, +{1.4014827013015747, -0.91038978099823, 0.23333808779716492}, +{2.221492290496826, -0.13728363811969757, 0.494844526052475}, +{-0.5110340118408203, -0.10204211622476578, -0.5896515250205994}, +{-1.3690451383590698, 0.12887297570705414, -2.3769962787628174}, +{-0.7926693558692932, -0.03728576749563217, 1.5027815103530884}, +{-0.1380711793899536, -0.5097317695617676, 0.02151181921362877}, +{-1.9807713031768799, -1.0911873579025269, 0.39877405762672424}, +{-0.07400992512702942, -1.2331130504608154, -2.0507030487060547}, +{0.7381329536437988, -0.2844245731830597, -0.6842278838157654}, +{0.9647881984710693, 0.05805201455950737, -1.0175057649612427}, +{-0.5620201826095581, -2.6213719844818115, 1.6894646883010864}, +{-0.20781753957271576, -0.19719618558883667, -0.32682403922080994}, +{-1.025093674659729, 0.6181418299674988, 0.788296103477478}, +{1.4054412841796875, -1.0656085014343262, -0.8934080004692078}, +{0.4945210814476013, -0.018496831879019737, -0.05278104543685913}, +{0.2285149246454239, -0.3907109200954437, -0.4131292402744293}, +{1.2024766206741333, 0.0418357253074646, -0.8545067310333252}, +{-0.23337265849113464, 0.3728026747703552, -0.0863727554678917}, +{-0.7964188456535339, -1.0244805812835693, 2.5262417793273926}, +{-0.3396078944206238, -1.0846869945526123, 1.0246566534042358}, +{-0.0261963102966547, -0.6455555558204651, -0.24698223173618317}, +{0.42732664942741394, -0.40158629417419434, -0.5087653398513794}, +{2.10681414604187, -0.8343645930290222, -0.8260190486907959}, +{-0.021350713446736336, 0.09703828394412994, -1.0682950019836426}, +{-1.211812973022461, 0.1667937934398651, -0.48138031363487244}, +{0.5085326433181763, 1.3048593997955322, -0.5313525795936584}, +{0.11109470576047897, -0.23720498383045197, 0.22606895864009857}, +{1.0838816165924072, -0.44704166054725647, 1.3359426259994507}, +{1.0901966094970703, -0.06098111718893051, 0.7434617280960083}, +{0.4668430984020233, -0.18462736904621124, 0.11792159080505371}, +{0.43770450353622437, 0.5901762247085571, -0.45037931203842163}, +{1.1561895608901978, -0.11409646272659302, 1.3076826333999634}, +{0.24607974290847778, 0.5881760120391846, 0.1627863198518753}, +{-0.5618895292282104, 1.5711406469345093, -0.07489696145057678}, +{-1.488364577293396, -0.8376230597496033, 0.7006843686103821}, +{-0.08352600783109665, 0.2152004837989807, 0.5816812515258789}, +{1.222810983657837, -1.318880319595337, 1.3600088357925415}, +{-1.1479912996292114, -1.080082654953003, -0.29314786195755005}, +{-0.035867441445589066, -0.23362424969673157, -0.13665595650672913}, +{0.39647719264030457, -0.632640540599823, -0.4207339584827423}, +{0.019853033125400543, -0.33481308817863464, -0.45035430788993835}, +{-0.5424574613571167, -0.1253679394721985, 0.21700718998908997}, +{-0.7938164472579956, 0.10499386489391327, 1.3482872247695923}, +{-1.8777068853378296, 0.18024002015590668, 0.2389281988143921}, +{1.117082118988037, 0.36618316173553467, -0.5917986035346985}, +{0.3673303425312042, 2.2847723960876465, 0.44198527932167053}, +{2.2284810543060303, 2.291316509246826, -0.9613816142082214}, +{-0.3388749063014984, -0.33738604187965393, -0.4371851682662964}, +{-0.8772599697113037, 0.10452970117330551, 0.7959040999412537}, +{0.09296438097953796, -0.7466832995414734, -1.7784316539764404}, +{-0.13953328132629395, 0.014692218042910099, 0.4231104850769043}, +{2.2265944480895996, 0.3779181241989136, 0.6826929450035095}, +{-0.6822554469108582, 1.9037764072418213, -3.454155206680298}, +{-0.6179018020629883, 0.04231713339686394, -0.34503817558288574}, +{0.705557644367218, 0.6865458488464355, -0.8396656513214111}, +{-0.6686041951179504, 0.8980273604393005, 2.305114269256592}, +{0.07644263654947281, 0.28669118881225586, -0.25174519419670105}, +{-2.5185189247131348, -1.3717437982559204, 1.1413642168045044}, +{1.0023671388626099, 2.092323064804077, 1.5044654607772827}, +{-0.23481474816799164, -0.1401056945323944, -0.24309049546718597}, +{1.9282324314117432, 0.2680192291736603, -0.9959668517112732}, +{-0.6552737951278687, -0.3729039132595062, -0.20228931307792664}, +{0.12817732989788055, 0.8528521656990051, 0.3762044310569763}, +{0.577324390411377, 1.2631210088729858, 0.06013984605669975}, +{-0.6667595505714417, -0.047753214836120605, 1.4130467176437378}, +{0.4907183349132538, -0.12336459010839462, 0.8861719965934753}, +{0.4842994213104248, 0.42393872141838074, 0.9861710071563721}, +{-1.663282871246338, -1.846075415611267, 1.2964441776275635}, +{0.18659146130084991, -0.25572001934051514, -0.5404255390167236}, +{-1.8705122470855713, -0.6969180107116699, -2.412163257598877}, +{-1.72024667263031, 0.10170648992061615, 1.7068511247634888}, +{0.10332053899765015, 0.3375381529331207, 0.07391203939914703}, +{-0.022597283124923706, 0.7760697603225708, -0.5169131755828857}, +{-0.3083806335926056, 0.7749244570732117, 0.001000316464342177}, +{0.32670578360557556, 0.21379350125789642, 0.2974195182323456}, +{1.4098706245422363, -1.5109140872955322, 2.852383852005005}, +{2.6790075302124023, 1.5874062776565552, -1.7766321897506714}, +{0.38206687569618225, -0.00666979281231761, 0.6142944693565369}, +{-1.1644278764724731, 1.3276184797286987, 1.4528623819351196}, +{0.8509018421173096, 0.8001205325126648, 0.20197664201259613}, +{0.22052018344402313, -0.5191170573234558, -0.1103251650929451}, +{-0.13258284330368042, 2.3686575889587402, -0.626653790473938}, +{0.2563553750514984, -0.2772938311100006, -0.12362352758646011}, +{0.13443833589553833, -0.06721124053001404, 0.41593968868255615}, +{-0.7105627655982971, -1.4056084156036377, 1.2264283895492554}, +{1.1629455089569092, 2.497798442840576, -0.7024103403091431}, +{-0.19128583371639252, -0.3675278425216675, -0.15295468270778656}, +{1.4208616018295288, -0.4370850920677185, -0.13640829920768738}, +{-0.3347401022911072, -0.9508472681045532, -1.8058851957321167}, +{0.3252696096897125, -0.4084225594997406, -0.02309727855026722}, +{0.3688574433326721, -1.1000410318374634, 2.3539669513702393}, +{-0.6256160736083984, -1.4734203815460205, 1.9961762428283691}, +{0.07839080691337585, 0.21484963595867157, -0.18059003353118896}, +{-1.3390164375305176, -0.10881832987070084, -0.8056264519691467}, +{-0.7913880944252014, -0.8381737470626831, -1.5980380773544312}, +{0.005628675222396851, -0.5765364766120911, 0.39870861172676086}, +{-1.0871868133544922, -2.1988418102264404, 0.8364611268043518}, +{1.8923990726470947, 3.340540647506714, -1.5737353563308716}, +{-0.06246712803840637, 0.625848114490509, 0.009527982212603092}, +{-2.730917453765869, 0.19519184529781342, -0.616218626499176}, +{-1.5311188697814941, -1.2312875986099243, -0.9821237325668335}, +{-0.4158099889755249, 0.17675434052944183, -0.032846029847860336}, +{-0.6935634016990662, -0.21918269991874695, 1.6750411987304688}, +{-0.5051353573799133, -1.5256558656692505, -1.172443151473999}, +{0.17723819613456726, 0.24309080839157104, -0.181318998336792}, +{-0.9171977043151855, 0.08150475472211838, -1.564471960067749}, +{0.003436814295127988, -1.683388352394104, 1.2386456727981567}, +{-0.8109168410301208, 0.21747474372386932, -0.07472436875104904}, +{1.6257749795913696, -0.5647549033164978, 2.932436227798462}, +{-1.6464649438858032, 1.2364295721054077, -1.4486849308013916}, +{-0.07210137695074081, -0.44463205337524414, -0.29188811779022217}, +{-0.1214660257101059, -1.0525519847869873, 1.0752558708190918}, +{-0.43746379017829895, -0.5964857935905457, -2.114389419555664}, +{-0.25069287419319153, -1.0260932445526123, -0.06307835876941681}, +{-1.3276500701904297, -2.6081223487854004, -0.6496893763542175}, +{1.1138213872909546, -1.6226037740707397, 1.0469927787780762}, +{0.36542487144470215, -0.3954336941242218, 0.488817036151886}, +{0.809169352054596, -0.31461140513420105, 0.04255974292755127}, +{0.14572343230247498, -0.5660176277160645, 0.18372394144535065}, +{-0.21281427145004272, -0.11237914115190506, 0.12046656757593155}, +{-1.1656205654144287, 0.5867972373962402, 0.15944814682006836}, +{0.43043845891952515, 0.01699419505894184, 0.6479252576828003}, +{0.41591450572013855, -0.44155123829841614, -0.24311067163944244}, +{0.5813778042793274, 0.1860426515340805, -2.9587345123291016}, +{1.7201329469680786, 0.09391593188047409, -1.8257313966751099}, +{-0.6781286597251892, 0.19170616567134857, -0.5876026153564453}, +{-2.060030460357666, -1.5394506454467773, 0.09632986783981323}, +{-0.6201095581054688, 0.7576196193695068, 3.480696439743042}, +{0.06586817651987076, -0.19214820861816406, 0.5254509449005127}, +{0.11470374464988708, 0.10588044673204422, 0.2864293158054352}, +{0.1380539983510971, 0.32101723551750183, 0.26566237211227417}, +{0.26787152886390686, -0.26873666048049927, -0.5488287806510925}, +{1.0670621395111084, -2.0819621086120605, -1.3576358556747437}, +{1.180043339729309, 0.9781126379966736, 0.6219497919082642}, +{-0.5725812911987305, 0.4799281060695648, -0.6591428518295288}, +{0.17022164165973663, 0.27122458815574646, -1.2765107154846191}, +{-1.165054202079773, 2.7049057483673096, 0.5532720685005188}, +{0.021792996674776077, -0.3118479251861572, -0.20879997313022614}, +{-1.5958292484283447, -1.4683749675750732, 1.452337384223938}, +{0.0031514365691691637, -1.0802960395812988, -1.5663646459579468}, +{0.09724137932062149, 0.30065056681632996, -0.2538701593875885}, +{-0.7054571509361267, 2.1127443313598633, 1.754881739616394}, +{-1.4424481391906738, 2.6464524269104004, -0.002559511223807931}, +{0.23681484162807465, -0.0398159883916378, -0.3089772164821625}, +{1.0844331979751587, -0.7018754482269287, -0.10155658423900604}, +{1.2976714372634888, 2.592198371887207, 1.432484745979309}, +{-0.06956494599580765, -0.3448289930820465, -0.5748087167739868}, +{-0.5649181604385376, 0.4927349388599396, 0.1911420226097107}, +{0.5239320397377014, -1.3406842947006226, 0.09744273126125336}, +{-0.13418027758598328, -1.033370852470398, -0.10725433379411697}, +{0.28114286065101624, 0.57205730676651, 2.2156054973602295}, +{-0.6707878112792969, 0.2849391996860504, 0.2850137948989868}, +{-0.1092117428779602, 0.6679735779762268, 0.07960709929466248}, +{1.1230688095092773, 2.4622159004211426, -0.4048840403556824}, +{2.1464223861694336, -1.5542889833450317, 0.36309611797332764}, +{-0.0011548760812729597, -0.09850265085697174, 0.22659292817115784}, +{1.6384775638580322, -0.019414640963077545, 0.24196995794773102}, +{-2.4424383640289307, -0.3022032380104065, -0.23579992353916168}, +{-0.23505547642707825, 0.3127745985984802, -0.9931886792182922}, +{1.0561050176620483, 0.6050722002983093, -0.5114427804946899}, +{1.0162073373794556, 0.1570386290550232, -4.507918357849121}, +{0.30273380875587463, 0.4770655632019043, -0.025484466925263405}, +{-0.6393281817436218, -0.9598004221916199, 1.0761146545410156}, +{-0.9121248126029968, 0.20518238842487335, 0.20674028992652893}, +{0.05038771405816078, 0.5070115923881531, 0.31197741627693176}, +{0.19046545028686523, -1.3920565843582153, -0.2951032221317291}, +{-0.04863695055246353, 0.006367858499288559, -3.2652461528778076}, +{0.07719995826482773, 0.260238379240036, 0.08643545210361481}, +{-1.0230107307434082, -1.454958438873291, -0.18239645659923553}, +{1.0563191175460815, 3.0913121700286865, -1.3301814794540405}, +{-0.2558581829071045, 0.35731637477874756, -0.4012298882007599}, +{2.26273775100708, -1.6524454355239868, 1.0585137605667114}, +{-0.7156040072441101, -0.8422680497169495, -0.6711562871932983}, +{-0.38724806904792786, 0.4298398792743683, -0.259017676115036}, +{-0.5965800285339355, 0.03433476760983467, 0.6365054249763489}, +{0.7218889594078064, 0.3452649414539337, -0.42528679966926575}, +{-0.048730526119470596, 0.049734704196453094, 0.8074194192886353}, +{-0.808509886264801, -0.006475981790572405, 0.2986312210559845}, +{-0.053617265075445175, -0.8976842761039734, 1.85738205909729}, +{-0.0047696554102003574, 0.14476622641086578, 0.05248187854886055}, +{-0.33963125944137573, 0.921482503414154, 2.985999822616577}, +{-1.3755342960357666, 1.2432341575622559, 0.931800365447998}, +{0.3404357433319092, -0.09215259552001953, 0.247123122215271}, +{0.06371237337589264, -1.9092026948928833, 2.390899181365967}, +{1.5264308452606201, -1.9065752029418945, -0.11576942354440689}, +{0.34280505776405334, 0.12307721376419067, -0.22964097559452057}, +{4.050431251525879, -0.4008258581161499, 0.37044480443000793}, +{-0.9515289068222046, 2.1414923667907715, 0.06216995418071747}, +{-0.691161036491394, 0.022757699713110924, 0.5795772671699524}, +{0.4280315935611725, -1.7640963792800903, 1.6085933446884155}, +{-2.969743490219116, -0.39993080496788025, -0.807075023651123}, +{-0.16064055263996124, -0.47693416476249695, 0.4026937782764435}, +{0.03215846046805382, 0.5226278305053711, -2.086745262145996}, +{0.9742074608802795, 1.4500672817230225, 1.2587170600891113}, +{-0.5834243893623352, 0.49404376745224, -0.05794443190097809}, +{1.0842245817184448, 1.1113775968551636, 0.6082412600517273}, +{-0.5829259157180786, 0.5702412724494934, 1.5775253772735596}, +{-0.5555906295776367, 0.1856164038181305, 0.027739034965634346}, +{-0.7404046058654785, 0.7494074106216431, -0.3544933497905731}, +{0.054697390645742416, -0.0448523610830307, -0.02766198292374611}, +{0.18437659740447998, -0.19467602670192719, -0.10885977745056152}, +{-0.35603252053260803, 1.2387350797653198, -1.7317143678665161}, +{0.884018063545227, 0.1711249053478241, 0.8421206474304199}, +{0.5457010269165039, -0.26955652236938477, 0.44672679901123047}, +{1.6030982732772827, -1.2222325801849365, 0.352430522441864}, +{0.7933719158172607, 1.1089948415756226, -1.5091742277145386}, +{-0.18236272037029266, 0.5988022685050964, -0.4189598560333252}, +{0.7790672183036804, -1.9039983749389648, 0.41476649045944214}, +{1.807615876197815, -2.1037635803222656, 1.3384944200515747}, +{-0.29037418961524963, -0.6423099040985107, -0.7145255208015442}, +{-1.5314669609069824, -0.6221850514411926, 0.1646077185869217}, +{-0.6010417938232422, 2.2614974975585938, 0.790835440158844}, +{-0.2639884948730469, 0.16253052651882172, -0.35614222288131714}, +{-2.3306989669799805, 0.3265436887741089, 0.9037640690803528}, +{1.6930828094482422, -0.8339565396308899, 2.1520256996154785}, +{-0.27787137031555176, -0.4727484881877899, 0.09975750744342804}, +{-1.4608832597732544, 0.013659480027854443, -0.5731651782989502}, +{-2.072938919067383, 0.03258670121431351, -0.6580451130867004}, +{-0.1817486435174942, 0.5659233331680298, 0.5157291889190674}, +{-0.8697461485862732, 1.5724644660949707, -0.3390330374240875}, +{-0.5876722931861877, 1.4655325412750244, -0.49813681840896606}, +{-0.05669306218624115, 0.043802641332149506, -0.9271306395530701}, +{-0.7730972170829773, 0.5078057050704956, -1.2929385900497437}, +{0.19167138636112213, -0.0479670874774456, -1.007899522781372}, +{-0.4412689805030823, 0.608203649520874, 0.5233701467514038}, +{-1.500477910041809, 0.4338468313217163, -1.0877881050109863}, +{-0.941700279712677, 0.8843485713005066, -0.24815744161605835}, +{-0.1662738025188446, 0.26843011379241943, 0.14027050137519836}, +{-2.7390999794006348, -0.044742606580257416, 2.390374183654785}, +{0.7284795045852661, -0.21750953793525696, -0.25814053416252136}, +{0.49512821435928345, 0.26024046540260315, -0.07650022208690643}, +{-1.9562071561813354, -1.453857421875, -2.966174602508545}, +{-0.19830775260925293, -0.38969022035598755, 0.6907382607460022}, +{0.035268232226371765, -0.31390857696533203, -0.12994389235973358}, +{1.20379638671875, 0.29118382930755615, -0.5095766186714172}, +{0.010919980704784393, -0.32949569821357727, 1.6239489316940308}, +{0.26007863879203796, -0.41226905584335327, -0.7157371640205383}, +{0.7514331936836243, 0.17248302698135376, -0.2611841559410095}, +{0.1888464093208313, -0.3431079685688019, 0.21872439980506897}, +{-0.20626722276210785, -0.20645663142204285, -0.004998649470508099}, +{2.262068510055542, -1.5346530675888062, -0.6766420602798462}, +{-2.799483060836792, -1.6504789590835571, -0.11207816749811172}, +{0.10246622562408447, -0.4699273407459259, 0.45293211936950684}, +{0.44705870747566223, 0.23468929529190063, -0.21849200129508972}, +{1.1316343545913696, -0.9805670976638794, -1.0954757928848267}, +{0.03201860189437866, -0.14793437719345093, 0.1575348973274231}, +{-0.8962348103523254, 0.6243958473205566, 0.550321102142334}, +{0.7022349238395691, -0.47461679577827454, 0.6773437857627869}, +{-0.2706772983074188, -1.154652714729309, -0.2609729468822479}, +{0.15170173346996307, 1.4641696214675903, -1.4748890399932861}, +{-2.5031533241271973, -0.922656774520874, -2.962364435195923}, +{-0.16255389153957367, -0.01641710475087166, -0.6478546261787415}, +{-1.4265400171279907, -0.8346216678619385, -0.5141047239303589}, +{-0.04907991364598274, 0.3862241506576538, -0.5777785778045654}, +{-1.0872079133987427, 0.5609357357025146, -0.04728609323501587}, +{-0.44907936453819275, 1.2304880619049072, 1.2224705219268799}, +{-0.15453431010246277, -1.7871893644332886, 1.7763915061950684}, +{0.31864073872566223, -0.24995824694633484, 0.2243204116821289}, +{-0.20258145034313202, -1.1249836683273315, -1.8125495910644531}, +{-1.072535514831543, 1.1776154041290283, 1.7622958421707153}, +{0.05022973567247391, 0.1851787120103836, -0.29960915446281433}, +{-0.32420337200164795, -1.3726922273635864, 0.7853130102157593}, +{-0.977895200252533, 0.4447703957557678, -1.0656410455703735}, +{0.6016391515731812, -0.8695646524429321, 0.400376558303833}, +{1.4549760818481445, 1.276525855064392, 1.1253877878189087}, +{0.30412203073501587, 0.1591842919588089, 0.02630624547600746}, +{-0.39557692408561707, 0.22758381068706512, 0.3061710000038147}, +{-0.5870858430862427, -0.3255372941493988, -1.1438347101211548}, +{0.508849561214447, 1.6588495969772339, -2.4838547706604004}, +{0.4496828317642212, -0.06968362629413605, -0.4954817593097687}, +{2.684396982192993, 0.315533846616745, 0.56185382604599}, +{0.2676514685153961, -1.0024867057800293, -0.32038652896881104}, +{-0.11965757608413696, 0.37505272030830383, 0.30386149883270264}, +{-0.3402644693851471, 2.5038883686065674, 1.3826863765716553}, +{1.236664891242981, 1.055166244506836, 0.045338187366724014}, +{0.09053344279527664, 0.7874690294265747, -0.2639647126197815}, +{-0.4291783273220062, 1.5155439376831055, -0.8711012601852417}, +{1.2626408338546753, 0.8363125920295715, 1.2647804021835327}, +{0.1225375235080719, -0.42170241475105286, 0.31988710165023804}, +{-0.6967427134513855, 1.681700348854065, 1.878322958946228}, +{-0.818784773349762, 3.0338292121887207, 2.4822769165039062}, +{0.07085157930850983, -0.4164443612098694, -0.4622693657875061}, +{-0.048622459173202515, 0.27185359597206116, 0.5791730880737305}, +{-1.0542211532592773, 0.6629449725151062, -1.1556380987167358}, +{-0.3367897868156433, 0.2596490979194641, 0.28383299708366394}, +{-0.800071656703949, 0.9228042364120483, 0.043719977140426636}, +{-1.4667104482650757, 1.7516547441482544, -0.8967850208282471}, +{-0.6318924427032471, -0.05075559392571449, 0.05950222909450531}, +{-1.7713770866394043, -0.9028547406196594, -0.3859332203865051}, +{0.5652417540550232, 2.9924943447113037, -2.0714566707611084}, +{-0.020539071410894394, 0.711259663105011, -0.26782748103141785}, +{2.772413969039917, 1.3914711475372314, -0.07842005789279938}, +{0.6907781362533569, 0.9517874717712402, -0.19459092617034912}, +{-0.4830031394958496, 0.4692533016204834, 0.036490343511104584}, +{-0.9220902919769287, 0.3834012448787689, -4.2166008949279785}, +{0.14249001443386078, -0.6680679321289062, -0.29288679361343384}, +{-0.43651068210601807, 0.31311625242233276, -0.07423506677150726}, +{0.0962333232164383, 0.5225176215171814, 0.4933907091617584}, +{-0.30361950397491455, -0.3415085971355438, -0.6574264764785767}, +{0.1645355224609375, -0.5696031451225281, -0.12680844962596893}, +{-0.9394868016242981, -0.5259748697280884, -0.8678627610206604}, +{-0.7377288341522217, -0.9099175930023193, 0.60408616065979}, +{0.12529411911964417, -0.01371051836758852, -0.12194883078336716}, +{0.5434392094612122, -0.9880720973014832, 0.0755419135093689}, +{2.364814043045044, -0.8131471276283264, 1.560269832611084}, +{0.16514866054058075, -0.5610104203224182, -0.4609173834323883}, +{0.350405216217041, 0.9775956273078918, 0.052328985184431076}, +{0.985500693321228, -0.7704265713691711, -1.5271236896514893}, +{-0.5401077270507812, 0.5915654897689819, -0.17123417556285858}, +{-0.6636965274810791, 0.4926707446575165, 0.20900586247444153}, +{0.15124118328094482, 1.2192095518112183, -3.6772234439849854}, +{0.02866346389055252, -0.5095990896224976, -0.0352507010102272}, +{0.9532291293144226, -0.21298198401927948, 1.7361092567443848}, +{-0.7544800043106079, -0.6325211524963379, -0.2485712766647339}, +{-0.856351912021637, -0.09886924922466278, 0.29414328932762146}, +{-0.28244397044181824, 0.7921792268753052, -0.49260804057121277}, +{-1.6340481042861938, -0.3514980673789978, 1.3555381298065186}, +{-0.08013595640659332, 0.3699113130569458, -0.34311744570732117}, +{-0.039892006665468216, 0.31495577096939087, 0.20747599005699158}, +{0.4415256083011627, 0.18423254787921906, -0.4000331163406372}, +{-0.40236350893974304, 0.41942161321640015, 0.06698206812143326}, +{-1.1320818662643433, 2.136953592300415, -1.1959784030914307}, +{-0.6830748319625854, 0.5187806487083435, 0.42357495427131653}, +{0.5368807315826416, -0.07997037470340729, 0.3616587817668915}, +{2.3559346199035645, 0.08729799836874008, -0.07131969928741455}, +{-0.7605815529823303, -2.598200798034668, 1.8024448156356812}, +{-0.2780609726905823, -0.18770644068717957, -0.15194405615329742}, +{0.5602170825004578, -0.6611083745956421, 1.5092241764068604}, +{-0.06243463233113289, -2.4488914012908936, 0.7624999284744263}, +{-0.159432515501976, -0.9314392805099487, 0.3786863088607788}, +{-2.5072546005249023, 0.15703272819519043, -2.2464849948883057}, +{2.7305846214294434, 0.8543983697891235, -0.8195620775222778}, +{-0.21537351608276367, 0.002378888661041856, -0.05352822691202164}, +{-0.5188079476356506, 0.1365422010421753, -0.304787278175354}, +{-0.4214560389518738, -0.06282316148281097, 0.2530863881111145}, +{-0.6604695916175842, -0.02314198948442936, -0.38828372955322266}, +{1.682035207748413, -1.4163917303085327, 1.1054648160934448}, +{2.3766305446624756, -2.001784324645996, 1.171963095664978}, +{-0.5408313870429993, -0.18627747893333435, -0.16290098428726196}, +{-0.4283329248428345, 0.20888543128967285, -0.9606878161430359}, +{-0.6423344016075134, -0.43536376953125, 0.9053719639778137}, +{-0.4744490087032318, 0.11591131240129471, 0.0293116457760334}, +{-0.5219810009002686, -0.014945865608751774, 1.0466413497924805}, +{-0.38425126671791077, -0.30385586619377136, -1.3918249607086182}, +{-0.5624527931213379, 0.6713109016418457, 0.03636865317821503}, +{0.3735083043575287, 0.8546026945114136, 0.016386108472943306}, +{-0.042174264788627625, 1.278342604637146, 0.06944902241230011}, +{0.42136117815971375, -0.16216394305229187, -0.14687968790531158}, +{-0.1796862781047821, -2.0428688526153564, -1.1837882995605469}, +{0.3161030411720276, -0.5186017751693726, -0.33021214604377747}, +{0.3468332290649414, -0.12231048196554184, -0.27879607677459717}, +{0.498979389667511, -0.6246800422668457, 0.6746193766593933}, +{-0.3287166655063629, 2.5031421184539795, -0.21608516573905945}, +{0.13900119066238403, 0.40784838795661926, 0.29031550884246826}, +{-1.2454432249069214, -0.89244145154953, 0.41355037689208984}, +{0.20446175336837769, 0.7061618566513062, 0.4161307215690613}, +{-1.1546037197113037, 0.34176695346832275, 0.662013590335846}, +{-1.4751194715499878, -0.1051042303442955, 0.06208274886012077}, +{-1.6053706407546997, 0.286896675825119, 1.6066734790802002}, +{0.3859497606754303, -0.12605008482933044, -0.5574460029602051}, +{0.6321598291397095, 1.7353229522705078, -0.32046744227409363}, +{0.4083192050457001, -1.0770536661148071, -0.05065299943089485}, +{0.05764491483569145, 0.4853268265724182, 0.2542550265789032}, +{-0.1579810231924057, 1.4262681007385254, 1.0487172603607178}, +{0.18351177871227264, -0.27310171723365784, -0.28031545877456665}, +{0.1505744457244873, -0.5195662379264832, -0.2851721942424774}, +{-0.15204620361328125, -1.0013153553009033, 0.34452390670776367}, +{0.29654669761657715, -0.25534334778785706, -0.4386886656284332}, +{-0.0607183501124382, -0.10205826163291931, -0.25616782903671265}, +{1.1190440654754639, -0.339249849319458, -1.895007610321045}, +{0.72856605052948, 0.9374567866325378, 0.14760848879814148}, +{-0.12101508677005768, -0.3155595362186432, -0.17649373412132263}, +{-0.6276732683181763, -0.6194391250610352, 0.023961257189512253}, +{-0.3125242292881012, -0.3844253420829773, -0.0325680673122406}, +{-0.2775537967681885, -0.43034303188323975, 0.25596991181373596}, +{-1.1898019313812256, -1.0782166719436646, 1.247922420501709}, +{-0.7118794322013855, -1.8674660921096802, 0.0511685349047184}, +{1.018688678741455, -0.40522903203964233, 0.02757168374955654}, +{-1.0822824239730835, -2.718940019607544, -2.259206771850586}, +{2.136152744293213, 2.246553659439087, -0.030923452228307724}, +{-0.5919275879859924, -0.2978871166706085, 0.520370602607727}, +{-0.4900597035884857, -0.7596127986907959, -0.4304559826850891}, +{-0.766777515411377, -0.7229320406913757, 1.1063390970230103}, +{0.016545411199331284, 0.5550884008407593, 0.3930586278438568}, +{3.0467145442962646, -0.8063393235206604, -1.670705795288086}, +{0.8696195483207703, 0.2284695953130722, 0.18234926462173462}, +{0.18488194048404694, 0.30990177392959595, -0.723087728023529}, +{1.7167948484420776, -0.6876701712608337, -0.2903481423854828}, +{1.2785676717758179, 0.12840117514133453, 1.3183832168579102}, +{0.2835521996021271, -0.26668012142181396, 0.9437646269798279}, +{-0.48284095525741577, 0.4266757667064667, 1.068293571472168}, +{2.4833390712738037, 1.4487847089767456, -1.384185552597046}, +{-0.03316590562462807, -0.29509779810905457, -0.5428316593170166}, +{-0.9958748817443848, -0.07742537558078766, -0.823154091835022}, +{0.5123118758201599, 0.4723361134529114, -1.1029980182647705}, +{-0.10197757929563522, 0.2555898129940033, -0.28139787912368774}, +{-0.9282134771347046, 0.2458549290895462, -0.34035104513168335}, +{0.7885982990264893, 0.6813586950302124, -0.8730482459068298}, +{-0.005045489873737097, -0.1511789709329605, -0.004514358937740326}, +{-0.8033340573310852, 1.6883748769760132, -0.24351467192173004}, +{2.686657667160034, -0.16404865682125092, 0.8593407273292542}, +{0.028560273349285126, 0.4301389157772064, 0.20888730883598328}, +{-2.4248321056365967, -0.820383608341217, 0.8624773025512695}, +{0.5020092129707336, -0.0487164668738842, 1.1024177074432373}, +{-0.37579694390296936, 0.0881219282746315, -0.3739832043647766}, +{-1.1155319213867188, 0.715708315372467, -0.29839807748794556}, +{0.5833553075790405, -0.6534621119499207, -0.3979729413986206}, +{-0.2812003493309021, -0.0834093987941742, -0.29212889075279236}, +{0.8601534366607666, -0.11483126133680344, 2.3923826217651367}, +{2.6262946128845215, 0.18559855222702026, -0.24875423312187195}, +{-0.10688157379627228, -0.2800002992153168, 0.19335301220417023}, +{0.34511420130729675, 0.010539516806602478, -0.4048912823200226}, +{0.1900581568479538, -0.04747901111841202, 0.5038553476333618}, +{-0.06622571498155594, -0.3947717249393463, 0.3792383372783661}, +{0.2597599923610687, -0.1925470381975174, 0.33273452520370483}, +{-0.14001019299030304, -0.18136373162269592, 0.14668196439743042}, +{0.5331964492797852, -0.4069266617298126, -0.1062517911195755}, +{-0.9714490175247192, -0.16999559104442596, -1.2644838094711304}, +{0.6552728414535522, -0.8726925849914551, 0.745944082736969}, +{0.2729799151420593, 0.07012128829956055, 0.22450238466262817}, +{0.061659786850214005, 1.2424900531768799, -0.21896247565746307}, +{0.3662235140800476, -0.8777066469192505, -1.0127846002578735}, +{-0.4409383535385132, 0.21857203543186188, 0.4200705289840698}, +{-1.614235758781433, -0.6977337002754211, 0.11137808114290237}, +{0.26925113797187805, -0.325225830078125, -0.8889402151107788}, +{0.10315436124801636, -0.1664441078901291, -0.7311663031578064}, +{-0.17269641160964966, -0.9321576952934265, 1.4808117151260376}, +{0.1926722526550293, 0.9269899725914001, -1.8415979146957397}, +{0.08934564888477325, -0.5165647864341736, -0.19618332386016846}, +{1.7754693031311035, -0.32028552889823914, -0.3006724417209625}, +{-2.5850772857666016, -0.2374969720840454, 2.3377702236175537}, +{-0.2898823022842407, 0.15096405148506165, 1.1663683652877808}, +{-0.3238982856273651, 1.2187820672988892, 1.5180827379226685}, +{1.1960026025772095, -2.7911500930786133, -1.049338936805725}, +{-0.1384231001138687, 0.43696099519729614, -0.10624624788761139}, +{-0.39077845215797424, 1.1824871301651, -0.29392874240875244}, +{0.5457850098609924, -0.987127959728241, 0.46049249172210693}, +{-0.5149458646774292, 0.31031662225723267, 0.43662726879119873}, +{0.8055153489112854, 0.006310782860964537, 0.6085681319236755}, +{0.46092689037323, 0.617970883846283, -1.899012804031372}, +{-0.15162408351898193, -0.696702241897583, -0.20573408901691437}, +{-1.497009515762329, -0.3294498324394226, 2.075504779815674}, +{-0.12747864425182343, -0.7749518752098083, -0.07304133474826813}, +{0.09434150904417038, -0.2840859591960907, -0.5432049632072449}, +{0.32244205474853516, 0.13124984502792358, -0.9729753732681274}, +{0.0029126983135938644, 0.4964517652988434, -1.6663047075271606}, +{-0.7439943552017212, 0.46719297766685486, -0.55229651927948}, +{-1.9737569093704224, 0.9783417582511902, -1.069586157798767}, +{-1.369024634361267, 0.20649933815002441, -1.7198330163955688}, +{-0.26051807403564453, -0.663629949092865, 0.1441924273967743}, +{-1.6262623071670532, -2.0943820476531982, -0.6097400188446045}, +{-0.9886749982833862, 1.5155270099639893, -0.6706466674804688}, +{-0.2604297697544098, -0.16130411624908447, -0.16385895013809204}, +{0.01675371825695038, 0.2032482773065567, 1.5560365915298462}, +{1.5486918687820435, -1.016255259513855, -1.9898806810379028}, +{-0.05005300045013428, 0.18968462944030762, -0.5431259870529175}, +{1.6543382406234741, 0.2609579563140869, -1.0877087116241455}, +{-0.9594274759292603, 0.6497546434402466, 0.12034375220537186}, +{-0.17045806348323822, 0.18861496448516846, 0.4733799993991852}, +{-1.414884328842163, -0.1865510642528534, -0.6131159067153931}, +{0.20028556883335114, -0.5385155081748962, 1.4213463068008423}, +{0.09568773210048676, 0.20083589851856232, -0.16897739470005035}, +{-0.5901970863342285, -1.0908888578414917, -0.18203496932983398}, +{-0.9047163724899292, -1.248689889907837, 0.05098447576165199}, +{0.20167982578277588, 0.4545518755912781, -0.1897728592157364}, +{0.09477993100881577, -0.925728440284729, -1.4283721446990967}, +{3.0824990272521973, 2.2571675777435303, 0.01032831147313118}, +{0.28355929255485535, -0.21511361002922058, 0.41893860697746277}, +{0.39656081795692444, 1.1759742498397827, 0.5963760018348694}, +{0.008198236115276814, -0.41772183775901794, 0.20099937915802002}, +{0.4489741325378418, -0.5932203531265259, 1.0165256261825562}, +{2.0562820434570312, -0.9913203120231628, -1.3657022714614868}, +{-0.5259674787521362, -0.4275912940502167, 2.393860101699829}, +{0.46321535110473633, -0.03804997354745865, -0.46674391627311707}, +{1.0649585723876953, 0.7777397632598877, 0.06317313015460968}, +{-0.0332038477063179, -1.4367928504943848, 0.3967588245868683}, +{-0.5657395720481873, 0.06650617718696594, -0.08014502376317978}, +{1.1062994003295898, 0.6263532042503357, -0.6877593398094177}, +{0.05353884771466255, 1.4917006492614746, -0.1058502197265625}, +{0.006596739869564772, -0.14525771141052246, -0.7322695851325989}, +{0.7670343518257141, 0.8212203979492188, 2.1293742656707764}, +{0.3656722605228424, -0.6763006448745728, -0.09031273424625397}, +{-0.2506001591682434, -0.203166201710701, -0.79652339220047}, +{1.4338617324829102, -1.2303316593170166, -1.7502684593200684}, +{-0.16530922055244446, 0.015369663015007973, -0.8896124362945557}, +{0.8550922870635986, 0.6803084015846252, 0.2528253495693207}, +{0.7454816102981567, 0.5889210104942322, -0.14497406780719757}, +{1.3406474590301514, 0.5089550018310547, 0.5835989713668823}, +{-0.020348092541098595, 0.5288230776786804, 0.39298123121261597}, +{0.029292605817317963, 3.3756024837493896, 0.6797427535057068}, +{-0.8509429693222046, 0.7355672717094421, 0.3746106028556824} +}; + +// converted from rst7 +const std::vector pos_rst7_ion = { +{1.8714733, 2.0093072, 1.5697786}, +{2.3410058, 2.2534769, 2.3912187}, +{2.4123218, 2.2097239, 2.3447208}, +{2.3236573, 2.3322954, 2.3397508}, +{2.9121613, 2.3492215, 0.7791028}, +{2.9701569, 2.3562055, 0.8549319}, +{2.8585203, 2.2719922, 0.7970076}, +{1.9955003, 0.3149785, 2.2423062}, +{1.9926479, 0.4095558, 2.2567744}, +{2.0791612, 0.2999967, 2.1982753}, +{2.6928813, 2.3925345, 1.8233089}, +{2.7714777, 2.3687406, 1.7741277}, +{2.6953061, 2.4881298, 1.8275503}, +{1.8859747, 2.2279131, 0.0221965}, +{1.8729649, 2.2019708, 0.1134108}, +{1.8752797, 2.3230329, 0.0225898}, +{2.1873992, 1.4944423, 2.4686804}, +{2.2203777, 1.4077752, 2.4924192}, +{2.1322699, 1.5201602, 2.5425837}, +{2.4244375, 2.7740912, 0.4115550}, +{2.4114471, 2.8517580, 0.3571359}, +{2.3360179, 2.7473867, 0.4366779}, +{0.3192323, 0.9373813, 1.7654681}, +{0.4027351, 0.9709340, 1.7980841}, +{0.3378116, 0.8467744, 1.7408200}, +{2.0770912, 0.4757980, 1.2649555}, +{2.0189149, 0.5414219, 1.2265975}, +{2.0861096, 0.4090838, 1.1969099}, +{3.1420124, 1.3793559, 0.4262370}, +{3.1675544, 1.4544941, 0.3727191}, +{3.0823748, 1.4157288, 0.4916794}, +{0.9195626, 2.0205722, 1.8073353}, +{0.9727501, 2.0297411, 1.8863881}, +{0.8292211, 2.0262151, 1.8384625}, +{2.1914213, 2.6253052, 2.0008349}, +{2.2693207, 2.6805322, 2.0074661}, +{2.1387553, 2.6489110, 2.0771985}, +{1.1613787, 1.8075274, 0.8593214}, +{1.0769869, 1.7837379, 0.8209235}, +{1.1426912, 1.8852817, 0.9119271}, +{2.3656797, 2.2463682, 2.0618634}, +{2.2734664, 2.2209744, 2.0656245}, +{2.4063559, 2.1997600, 2.1349077}, +{1.2495650, 1.8392531, 1.8042736}, +{1.3023792, 1.8273976, 1.8832192}, +{1.1594846, 1.8442798, 1.8362514}, +{0.8948215, 1.2272468, 3.1108265}, +{0.8930716, 1.2464726, 3.2045794}, +{0.9516804, 1.1506281, 3.1031461}, +{1.1058699, 0.0954337, 0.4634076}, +{1.1560405, 0.1769220, 0.4611994}, +{1.0302193, 0.1153705, 0.5185604}, +{2.5649617, 2.8403142, 3.0171099}, +{2.4742958, 2.8230186, 2.9917543}, +{2.6057146, 2.8753543, 2.9379029}, +{1.0460893, 2.1729279, 2.5710580}, +{1.0186667, 2.2646270, 2.5698025}, +{1.1079191, 2.1674142, 2.6439209}, +{1.1829147, 2.4895406, 2.8285499}, +{1.1264546, 2.4143443, 2.8464406}, +{1.1447422, 2.5608640, 2.8797178}, +{1.2281252, 2.9957016, 1.1784958}, +{1.1675032, 3.0287065, 1.1121787}, +{1.1757400, 2.9906747, 1.2584510}, +{2.5857217, 2.2437053, 0.8117682}, +{2.4932706, 2.2281385, 0.7924598}, +{2.6306846, 2.2265863, 0.7290180}, +{2.3980131, 1.6851198, 2.4044547}, +{2.3557160, 1.7708534, 2.4092503}, +{2.3272383, 1.6225894, 2.4200501}, +{0.6590213, 2.9510722, 0.4513275}, +{0.6595361, 3.0106947, 0.3764462}, +{0.6242970, 2.8690102, 0.4163654}, +{0.5970418, 1.4204073, 0.6097964}, +{0.6892765, 1.4127195, 0.5853837}, +{0.5534034, 1.4494249, 0.5296966}, +{0.6092885, 2.5839977, 2.2295759}, +{0.6968071, 2.6227508, 2.2305791}, +{0.5664251, 2.6236041, 2.1537051}, +{1.5213833, 0.7167559, 2.7362700}, +{1.5974512, 0.6993903, 2.7917173}, +{1.4696180, 0.7802213, 2.7858157}, +{2.1873622, 1.6386300, 1.1216463}, +{2.1768334, 1.7335248, 1.1284618}, +{2.1063142, 1.6028736, 1.1579093}, +{2.2214379, 1.3773025, 0.0095251}, +{2.2207689, 1.3624631, 0.1040854}, +{2.2945559, 1.4373997, -0.0047714}, +{1.3882475, 0.9674677, 2.8324666}, +{1.4603108, 1.0266367, 2.8541055}, +{1.3723517, 0.9821788, 2.7392292}, +{2.5977867, 1.0969528, 3.1560195}, +{2.6764765, 1.0787903, 3.1046352}, +{2.5260529, 1.0620470, 3.1031218}, +{1.2085752, 1.5594130, 1.1461924}, +{1.1932180, 1.4868326, 1.2066786}, +{1.1246671, 1.6052868, 1.1420319}, +{1.9753081, 1.0345433, 2.1106830}, +{2.0689545, 1.0363116, 2.0909464}, +{1.9595129, 1.1155562, 2.1591573}, +{0.3609825, 0.1267603, 2.9894757}, +{0.4453993, 0.0903916, 2.9627655}, +{0.2995421, 0.0961978, 2.9227424}, +{0.1541942, 1.1946498, 1.7445748}, +{0.1262022, 1.1143812, 1.7005780}, +{0.2494011, 1.1954185, 1.7347075}, +{2.2937961, 1.6019148, 0.4483269}, +{2.3086050, 1.6843218, 0.4947178}, +{2.2288742, 1.6234553, 0.3813682}, +{0.9990262, 2.1062458, 1.5736318}, +{0.9791179, 2.0896840, 1.6657821}, +{0.9535244, 2.0365295, 1.5263926}, +{1.4188724, 0.2104137, 1.6748135}, +{1.4207870, 0.2584441, 1.7575887}, +{1.4114487, 0.1185326, 1.7006026}, +{0.5409242, 0.3533280, 1.2072754}, +{0.5819036, 0.3184477, 1.2864357}, +{0.4502869, 0.3228892, 1.2118223}, +{1.0826149, 2.9036253, 2.8625534}, +{1.0481732, 2.9920867, 2.8748272}, +{1.0944285, 2.8954387, 2.7679186}, +{2.5876117, 1.7993220, 1.5380435}, +{2.5330219, 1.7260041, 1.5664471}, +{2.5430062, 1.8338423, 1.4607064}, +{2.5861979, 2.4211278, 0.9988453}, +{2.5930321, 2.3488498, 0.9364632}, +{2.6507537, 2.4850216, 0.9686393}, +{3.0959153, 2.3726160, 0.9809340}, +{3.1003559, 2.3088334, 1.0521685}, +{3.1869769, 2.3978636, 0.9656800}, +{1.7283366, 2.4462767, 1.9940965}, +{1.6934389, 2.3852124, 2.0590246}, +{1.7179629, 2.4008474, 1.9104850}, +{2.3323550, 1.1669875, 0.4516330}, +{2.3621090, 1.1482339, 0.3626086}, +{2.2441990, 1.2025584, 0.4404286}, +{0.0220412, 1.5049345, 2.4448464}, +{0.0562837, 1.4157783, 2.4384482}, +{-0.0137405, 1.5231419, 2.3579528}, +{2.1041064, 2.3880076, 1.8606795}, +{2.1704447, 2.4556901, 1.8741194}, +{2.1462138, 2.3243299, 1.8029352}, +{1.6852874, 1.5090879, 0.7188575}, +{1.6166258, 1.5389485, 0.7784917}, +{1.6740550, 1.5629323, 0.6405188}, +{0.0060239, 1.3918827, 1.8736285}, +{0.0560312, 1.3119745, 1.8570069}, +{-0.0685961, 1.3862913, 1.8139384}, +{2.6419570, 0.8376300, 2.5770764}, +{2.6550355, 0.9314166, 2.5630999}, +{2.5884690, 0.8324484, 2.6562881}, +{1.6914840, 0.1915934, 1.1744342}, +{1.6792045, 0.2416639, 1.2550846}, +{1.6077733, 0.1472166, 1.1608130}, +{2.6618481, 0.2082174, 1.4834031}, +{2.6705999, 0.2574298, 1.5650356}, +{2.7497678, 0.1744933, 1.4662235}, +{2.7661414, 1.5829711, 1.3602623}, +{2.6835599, 1.5890517, 1.3122450}, +{2.7775269, 1.4893402, 1.3765699}, +{2.0119326, 0.9692406, -0.0054603}, +{2.0839298, 0.9610233, -0.0679999}, +{2.0548046, 0.9874631, 0.0781594}, +{1.4812555, 1.2569597, 0.4099494}, +{1.5267164, 1.1993010, 0.3485400}, +{1.5392387, 1.2614664, 0.4859754}, +{1.8889096, 2.6428440, 1.3883883}, +{1.9534597, 2.6980693, 1.3442775}, +{1.8585960, 2.5825450, 1.3205102}, +{2.4501414, 2.4929545, 2.1629026}, +{2.4999258, 2.4287300, 2.1123157}, +{2.3586922, 2.4749024, 2.1411431}, +{0.9516214, 2.3035397, 1.3313228}, +{0.9546950, 2.2283449, 1.3904719}, +{0.9872548, 2.2705872, 1.2488200}, +{2.2577932, 1.3315544, 1.7362471}, +{2.2906978, 1.2428913, 1.7214671}, +{2.2378077, 1.3645953, 1.6486616}, +{0.7421976, 1.9652969, 2.7830887}, +{0.7927862, 1.9580919, 2.7021491}, +{0.7579489, 1.8825864, 2.8286209}, +{2.5942872, 2.5944612, 2.4166331}, +{2.5317798, 2.6054306, 2.4882908}, +{2.5397544, 2.5808175, 2.3391583}, +{2.0283597, 1.7133380, 2.3352683}, +{2.0777192, 1.7841151, 2.2938371}, +{2.0944724, 1.6620537, 2.3817587}, +{0.2643212, 0.5706549, 0.9581341}, +{0.3569053, 0.5463682, 0.9573163}, +{0.2646451, 0.6663539, 0.9561551}, +{1.5737172, 3.0730326, 2.8318465}, +{1.4868236, 3.0765395, 2.7918529}, +{1.6232270, 3.0128007, 2.7763197}, +{2.6463740, 0.4374348, 2.0323663}, +{2.6767571, 0.4000641, 2.1150863}, +{2.5579584, 0.4688361, 2.0513125}, +{-0.0005820, 0.3898373, 0.2903230}, +{-0.0561905, 0.3169974, 0.3179702}, +{0.0401707, 0.3594197, 0.2092286}, +{2.9891846, 1.6474910, 1.5328140}, +{2.9821630, 1.7425284, 1.5418094}, +{2.8985991, 1.6173189, 1.5260137}, +{2.2843482, 1.1963381, 2.2855990}, +{2.3410571, 1.2672596, 2.2553244}, +{2.2799192, 1.2080623, 2.3804951}, +{2.2655401, 0.4148379, 0.6052363}, +{2.3611197, 0.4193121, 0.6078526}, +{2.2418106, 0.4574989, 0.5229000}, +{1.3695780, 2.4555309, 1.9906495}, +{1.4333409, 2.4491723, 1.9195427}, +{1.3099644, 2.5252106, 1.9632034}, +{0.5215120, 0.0725599, 1.8818469}, +{0.5060484, -0.0077827, 1.9315285}, +{0.4420247, 0.1243249, 1.8946722}, +{1.3398832, 1.5050503, 0.1413307}, +{1.3979007, 1.5556989, 0.0844888}, +{1.3098774, 1.5678766, 0.2070182}, +{0.4758237, 2.1216948, 3.1157629}, +{0.4834872, 2.0485101, 3.0545456}, +{0.3819239, 2.1288455, 3.1329100}, +{0.1121096, 2.4833777, 1.8929650}, +{0.0805746, 2.4144707, 1.9514430}, +{0.2018757, 2.4999924, 1.9217454}, +{-0.0230301, 2.9027212, 2.5394030}, +{-0.0000686, 2.8170190, 2.5753229}, +{0.0531463, 2.9576435, 2.5579228}, +{2.0543988, 0.3448725, 3.0178018}, +{2.0161560, 0.3051702, 3.0960548}, +{2.0827470, 0.2705017, 2.9646256}, +{0.7532561, 2.5765328, 0.0007234}, +{0.7797561, 2.4889612, 0.0288527}, +{0.8350058, 2.6192129, -0.0249229}, +{2.6915286, 1.5213466, 0.5846333}, +{2.6122558, 1.4687427, 0.5740991}, +{2.6716106, 1.6038194, 0.5403182}, +{1.9728063, 2.6637034, 1.8147571}, +{1.9580905, 2.5805175, 1.7697475}, +{2.0609922, 2.6559629, 1.8511666}, +{1.7066898, 1.8547826, 0.1471348}, +{1.7573370, 1.9352055, 0.1357625}, +{1.7496407, 1.7911437, 0.0899717}, +{0.5658315, 1.5258391, 0.2610209}, +{0.6092113, 1.5584588, 0.1821763}, +{0.5485848, 1.4335406, 0.2424235}, +{2.4318130, 1.0374688, 0.2389770}, +{2.4746926, 1.0667633, 0.1585687}, +{2.4794953, 0.9583632, 0.2640970}, +{2.3650434, 2.5692599, 1.7612191}, +{2.3511376, 2.6254137, 1.6849585}, +{2.3557591, 2.6279974, 1.8362259}, +{1.8930471, 0.6180154, 2.2579937}, +{1.8850559, 0.7129375, 2.2673881}, +{1.8557535, 0.5992481, 2.1718583}, +{0.8676053, 2.2363732, 0.4351578}, +{0.8953149, 2.1514175, 0.4008502}, +{0.7720591, 2.2311814, 0.4376682}, +{2.0940671, 2.9197986, 0.4874092}, +{2.1292098, 2.8985815, 0.5738796}, +{1.9995917, 2.9269311, 0.5010420}, +{2.1916382, 3.1198616, 2.4406855}, +{2.2147779, 3.2012827, 2.4853787}, +{2.2357416, 3.0514913, 2.4911103}, +{0.4691071, 0.5663696, 0.5270882}, +{0.4525084, 0.6603482, 0.5344919}, +{0.5250099, 0.5579332, 0.4498482}, +{0.4161572, 2.6283128, 0.1017281}, +{0.4712690, 2.5568910, 0.1337269}, +{0.3663519, 2.5897014, 0.0296801}, +{2.2261381, 3.1628003, 0.7525169}, +{2.1510873, 3.1064224, 0.7337754}, +{2.2644422, 3.1260028, 0.8321477}, +{1.7423459, 2.3331251, 0.7393015}, +{1.8010900, 2.2706535, 0.6967722}, +{1.6965648, 2.3759987, 0.6669947}, +{2.9650052, 2.9106493, 1.8666363}, +{2.9880989, 2.9578836, 1.9466232}, +{2.8949318, 2.8511584, 1.8933365}, +{2.0993907, 2.8824348, 2.1586714}, +{2.0258322, 2.8352075, 2.1196709}, +{2.0737469, 2.8955362, 2.2499571}, +{3.0903430, 1.1845149, 2.3457496}, +{3.0222211, 1.1173600, 2.3492107}, +{3.1313045, 1.1726857, 2.2600493}, +{0.5575735, 2.6423945, 1.2428064}, +{0.5241982, 2.7191076, 1.2893200}, +{0.6513630, 2.6417232, 1.2619221}, +{0.7655202, 2.7303152, 1.5237868}, +{0.7157991, 2.8115053, 1.5337009}, +{0.8552235, 2.7590845, 1.5068171}, +{1.6539570, 2.8571241, 3.1058025}, +{1.6745796, 2.8963537, 3.0209613}, +{1.5677329, 2.8922098, 3.1280894}, +{2.1644347, 0.7679061, 0.5410000}, +{2.1929455, 0.7347377, 0.4558572}, +{2.1026931, 0.7020806, 0.5728950}, +{1.5911506, 1.2584882, 2.2015827}, +{1.5928532, 1.2019148, 2.1243892}, +{1.6826020, 1.2833070, 2.2151101}, +{2.9239876, 2.4235945, 2.1005917}, +{2.9292433, 2.3765335, 2.1837780}, +{2.9328282, 2.3554709, 2.0339336}, +{1.8971509, 0.6944004, 0.2738664}, +{1.9796025, 0.6616040, 0.3097614}, +{1.9097196, 0.6920776, 0.1790036}, +{2.8964486, 0.9102153, 0.3082056}, +{2.9436123, 0.9860346, 0.2737191}, +{2.9504971, 0.8351527, 0.2835742}, +{0.7412165, 2.1810153, 2.9806244}, +{0.7570237, 2.1053522, 2.9241662}, +{0.6490657, 2.2026649, 2.9664176}, +{2.9512155, 1.4367526, 0.6172913}, +{2.8677461, 1.4722706, 0.5867359}, +{2.9279220, 1.3544866, 0.6603268}, +{2.4157205, 1.5753697, 3.0732467}, +{2.3567586, 1.5695081, 2.9980705}, +{2.4496496, 1.6648213, 3.0701570}, +{1.9269323, 2.9633610, 2.9636562}, +{1.9953382, 2.9022303, 2.9909689}, +{1.9691856, 3.0188584, 2.8981044}, +{1.0674497, 0.3315379, 2.9574826}, +{1.1624920, 0.3336736, 2.9686496}, +{1.0336113, 0.3097880, 3.0443401}, +{2.7274344, 2.2233546, 0.5808761}, +{2.7165220, 2.2875655, 0.5107322}, +{2.7745123, 2.1508176, 0.5398348}, +{0.0197255, 2.6463973, 1.6904681}, +{0.0143753, 2.6206718, 1.7825109}, +{0.0342286, 2.5642898, 1.6434542}, +{0.9279701, 1.7203976, 0.4752721}, +{0.9237586, 1.7280611, 0.5705918}, +{0.8759444, 1.7939811, 0.4430058}, +{2.4401717, 2.9929092, 0.6649299}, +{2.4900198, 2.9588854, 0.7392259}, +{2.3562014, 2.9471855, 0.6694720}, +{1.7161725, 0.5126162, 0.9947148}, +{1.6449056, 0.4496341, 1.0055137}, +{1.6721382, 0.5964975, 0.9810316}, +{0.7240379, 2.3807077, 1.0731586}, +{0.6435918, 2.4325619, 1.0717738}, +{0.7696083, 2.4093072, 1.1523277}, +{0.4328994, 2.9244270, 1.6131009}, +{0.4770735, 2.8569841, 1.6646998}, +{0.3630996, 2.9564276, 1.6702522}, +{0.2357902, 1.2145060, 0.2655490}, +{0.1854626, 1.2957638, 0.2603897}, +{0.1978721, 1.1675233, 0.3398266}, +{2.4134474, 1.6720803, 2.1030695}, +{2.3559372, 1.6001677, 2.0769260}, +{2.4348714, 1.6535847, 2.1945095}, +{1.8235912, 0.3928108, 2.8125515}, +{1.8649511, 0.4347727, 2.7371135}, +{1.8953170, 0.3784821, 2.8742964}, +{0.1954663, 3.0615437, 1.8188611}, +{0.1975980, 3.1410482, 1.7655994}, +{0.1225677, 3.0107784, 1.7832099}, +{0.2003201, 0.9331254, 2.5174694}, +{0.2729960, 0.9595453, 2.4610555}, +{0.2289434, 0.9562793, 2.6058261}, +{1.6736779, 3.0784504, 2.4393055}, +{1.6866149, 3.0111013, 2.5060818}, +{1.7519307, 3.0731218, 2.3844383}, +{2.6498284, 1.4220648, 3.0637672}, +{2.5899897, 1.4927036, 3.0880945}, +{2.6164446, 1.3902113, 2.9799032}, +{1.8238467, 1.7083244, 2.6639714}, +{1.7653881, 1.6410483, 2.6290598}, +{1.8206924, 1.7787460, 2.5992167}, +{0.6357475, 0.5198504, 0.2669439}, +{0.6590760, 0.6125314, 0.2616211}, +{0.6717437, 0.4814615, 0.1869883}, +{2.1645093, 2.6710515, 1.2976561}, +{2.2512760, 2.6309032, 1.3023452}, +{2.1498890, 2.7067878, 1.3852431}, +{1.9094465, 2.1285896, 2.7445493}, +{1.9423703, 2.1002295, 2.6592612}, +{1.8876108, 2.2209747, 2.7322807}, +{1.0030845, 0.6577297, 2.9544363}, +{1.0656595, 0.6050904, 3.0041935}, +{1.0158614, 0.6305588, 2.8635473}, +{2.9123678, 1.7329363, 0.4687765}, +{2.9046371, 1.6393651, 0.4501488}, +{2.9385073, 1.7369642, 0.5607701}, +{1.0824014, 2.0025227, 2.0471020}, +{1.1712251, 1.9997723, 2.0115335}, +{1.0928181, 1.9792726, 2.1393693}, +{1.3376243, 1.9620665, 0.2940955}, +{1.3901855, 1.8975013, 0.2468623}, +{1.2648521, 1.9116781, 0.3305306}, +{0.0930919, 0.6503953, 2.9970949}, +{0.0939617, 0.6647339, 3.0917308}, +{0.0918871, 0.7384329, 2.9595416}, +{2.8074789, 0.4225415, 0.6820116}, +{2.8124750, 0.3539194, 0.6154656}, +{2.7544007, 0.3843162, 0.7518961}, +{1.1339157, 1.7744818, 3.0830243}, +{1.2068850, 1.8184739, 3.0394065}, +{1.1452906, 1.6819571, 3.0612962}, +{1.6970062, 0.4446053, 0.1751104}, +{1.7529389, 0.5173151, 0.2024445}, +{1.6916878, 0.3881698, 0.2522405}, +{2.2371857, 2.3719399, 1.3476613}, +{2.3163056, 2.3615294, 1.2948033}, +{2.1652541, 2.3569093, 1.2863243}, +{1.9754658, 1.7986997, 0.5031732}, +{2.0018821, 1.8890376, 0.4857503}, +{1.9776397, 1.7910836, 0.5985650}, +{1.1827523, 2.4277849, 1.0796869}, +{1.1264278, 2.3505132, 1.0840435}, +{1.2580794, 2.3996203, 1.0277746}, +{2.9174871, 2.9954517, 2.6693654}, +{2.9434962, 2.9541180, 2.5870404}, +{3.0000622, 3.0130577, 2.7144620}, +{2.1268244, 1.5973812, 0.8367526}, +{2.1639965, 1.6093577, 0.9241432}, +{2.1104193, 1.6862896, 0.8053121}, +{2.8241251, 2.1166360, 0.9319483}, +{2.8400149, 2.1519609, 1.0194811}, +{2.7334909, 2.1405492, 0.9125593}, +{2.1044021, 1.8628262, 2.7146611}, +{2.1111798, 1.9124326, 2.7962429}, +{2.0665724, 1.9246318, 2.6521206}, +{0.3225958, 1.6343441, 2.9514580}, +{0.3879036, 1.5704181, 2.9799304}, +{0.2793887, 1.5928215, 2.8768165}, +{1.0221599, 1.7334803, 2.0014744}, +{0.9862989, 1.8222070, 2.0034456}, +{1.0920019, 1.7344157, 2.0669231}, +{2.0946009, 3.0818512, 2.7764700}, +{2.1512353, 3.0229399, 2.7266271}, +{2.1551130, 3.1401174, 2.8223574}, +{2.3593314, 1.8879915, 0.6143693}, +{2.3648212, 1.8882451, 0.7099314}, +{2.4500351, 1.8969924, 0.5851439}, +{2.2702684, 0.4653515, 2.6305857}, +{2.3406951, 0.4956426, 2.5732720}, +{2.3105071, 0.4601467, 2.7172809}, +{0.6625214, 1.9358430, 0.4474536}, +{0.6503104, 2.0242851, 0.4129398}, +{0.5918860, 1.8847452, 0.4079317}, +{2.4419846, 2.6034036, 1.2903799}, +{2.4524515, 2.5096142, 1.2743695}, +{2.4683018, 2.6448147, 1.2081921}, +{0.2388505, 2.8861618, 2.0316002}, +{0.1470522, 2.8600147, 2.0244093}, +{0.2489594, 2.9561069, 1.9670416}, +{2.5481868, 2.9444427, 1.5663530}, +{2.5004070, 3.0124109, 1.5188162}, +{2.6257753, 2.9278135, 1.5128196}, +{2.4184921, 0.5802947, 2.0611312}, +{2.4392235, 0.6186362, 1.9759113}, +{2.3403399, 0.6273153, 2.0901766}, +{0.3910323, 0.5905544, 2.9814229}, +{0.4570149, 0.5219214, 2.9715159}, +{0.3110933, 0.5523331, 2.9452121}, +{-0.0182588, 1.0194688, 0.7585768}, +{-0.0118893, 0.9788160, 0.8450007}, +{-0.0188073, 0.9458155, 0.6974440}, +{2.6328211, 2.1879127, 2.6426773}, +{2.5524304, 2.1943970, 2.6942291}, +{2.6933763, 2.2487893, 2.6849790}, +{1.1729031, 0.9964514, 0.3787578}, +{1.0920544, 0.9532434, 0.3512097}, +{1.1452578, 1.0578854, 0.4467571}, +{2.1395352, 2.0460222, 0.5045939}, +{2.1883287, 2.1201673, 0.4687612}, +{2.2070503, 1.9854224, 0.5351176}, +{0.4402409, 1.5850054, 2.0197873}, +{0.4712560, 1.5680047, 2.1087329}, +{0.3582837, 1.5359930, 2.0132220}, +{1.6543146, 0.3199280, 1.3946537}, +{1.7067885, 0.3994293, 1.4040531}, +{1.6927384, 0.2583514, 1.4570575}, +{1.4972435, 0.3155436, 0.9871106}, +{1.4596480, 0.2424876, 1.0362197}, +{1.4214578, 0.3625466, 0.9523317}, +{0.6701496, 2.8699224, 0.8155157}, +{0.6892066, 2.7763424, 0.8090401}, +{0.7043943, 2.8954678, 0.9011722}, +{0.2769080, 0.1755955, 1.9831259}, +{0.2970012, 0.2597972, 2.0239754}, +{0.1954684, 0.1475468, 2.0248773}, +{2.9895637, 1.6483345, 0.1066921}, +{2.9565566, 1.7248058, 0.1538617}, +{2.9358170, 1.5756881, 0.1382533}, +{1.5607988, 0.5254035, 2.0633485}, +{1.5195649, 0.5862818, 2.0020630}, +{1.6538327, 0.5282760, 2.0410159}, +{0.8412059, 0.0331898, 0.1249932}, +{0.8978999, -0.0420894, 0.1417604}, +{0.7691841, 0.0232719, 0.1872572}, +{1.6913196, 2.9723914, 1.3210536}, +{1.6528621, 2.9063368, 1.3786741}, +{1.6364878, 3.0498602, 1.3334777}, +{2.5328731, 2.1246798, 2.2569039}, +{2.6020193, 2.1626747, 2.2027051}, +{2.5629320, 2.0356505, 2.2751403}, +{2.3643424, 2.5766487, 2.5906930}, +{2.3065753, 2.5032980, 2.5695987}, +{2.3092392, 2.6369517, 2.6405878}, +{0.9836999, 2.7414150, 0.3170417}, +{0.9735875, 2.7602842, 0.4103370}, +{0.9428052, 2.6556599, 0.3053795}, +{0.3599092, 2.7081237, 2.7204304}, +{0.4149048, 2.6824727, 2.7944562}, +{0.2990420, 2.7723491, 2.7569351}, +{2.4164088, 0.6443670, 0.3540697}, +{2.4854667, 0.5890868, 0.3174989}, +{2.4545255, 0.7321482, 0.3560468}, +{2.3994186, 2.6241496, 0.9728600}, +{2.4524238, 2.5452232, 0.9617502}, +{2.4631503, 2.6954691, 0.9766145}, +{1.7376107, 1.7412398, 2.9520926}, +{1.7656901, 1.8293871, 2.9766674}, +{1.7717859, 1.7290385, 2.8635178}, +{1.6300310, 0.8114660, 0.6524494}, +{1.5638367, 0.8580234, 0.6013314}, +{1.6484904, 0.8695275, 0.7262764}, +{1.2669666, 1.9886229, 1.1955822}, +{1.3203849, 2.0087943, 1.1187582}, +{1.1852429, 1.9541877, 1.1595577}, +{1.3154730, 0.6569121, 2.5581789}, +{1.3863324, 0.6698116, 2.6212254}, +{1.3520533, 0.6861918, 2.4747109}, +{1.6831036, 0.6864319, 1.7295200}, +{1.6993969, 0.6900799, 1.6352675}, +{1.7175722, 0.7692140, 1.7630067}, +{1.8289160, 3.0614631, 0.8600294}, +{1.7482997, 3.0307453, 0.9014993}, +{1.8274205, 3.1563995, 0.8721608}, +{2.6750693, 1.1605911, 1.8848736}, +{2.7443922, 1.1827424, 1.9470508}, +{2.7081869, 1.0836994, 1.8384713}, +{1.9724337, 3.1950347, 1.8865892}, +{1.9900658, 3.2337449, 1.8008398}, +{2.0590019, 3.1742044, 1.9217223}, +{1.5872844, 2.2576742, 2.1886542}, +{1.5574524, 2.1916709, 2.1260769}, +{1.5096614, 2.2780178, 2.2408380}, +{2.9956219, 2.1640286, 2.9461095}, +{2.9492075, 2.2347262, 2.9012775}, +{3.0850956, 2.1690061, 2.9124644}, +{1.7096837, 0.1986772, 1.6432632}, +{1.7577829, 0.2314066, 1.7192736}, +{1.6195177, 0.2273192, 1.6578255}, +{2.1386294, 0.5438677, 0.3314573}, +{2.1290076, 0.4511681, 0.3096279}, +{2.2318320, 0.5618356, 0.3190979}, +{0.7650658, 2.1376100, 2.5213192}, +{0.7453382, 2.1935925, 2.4462252}, +{0.8592409, 2.1480541, 2.5348947}, +{0.9856669, 1.7171329, 0.1437816}, +{1.0476937, 1.6825552, 0.2079640}, +{1.0381499, 1.7313635, 0.0650076}, +{1.6421061, 2.3907270, 1.4804719}, +{1.6646216, 2.3975062, 1.3876849}, +{1.5484291, 2.4101036, 1.4838643}, +{2.4316094, 1.0387940, 0.9552670}, +{2.3654730, 0.9945975, 0.9020224}, +{2.5094423, 1.0412549, 0.8996045}, +{0.5132794, 1.2429434, 0.2308677}, +{0.4291947, 1.2120869, 0.2646311}, +{0.5579326, 1.1635065, 0.2015728}, +{1.6820676, 2.8520205, 0.7613563}, +{1.6945373, 2.9387486, 0.7228199}, +{1.6015561, 2.8193259, 0.7212157}, +{2.0702898, 0.2868189, 1.0423578}, +{2.0247016, 0.2033347, 1.0530548}, +{2.0126762, 0.3385284, 0.9860631}, +{1.9843912, 1.1566390, 1.4450015}, +{1.9972804, 1.1227024, 1.3564323}, +{2.0231953, 1.2441182, 1.4430146}, +{2.2182362, 2.5653105, 0.5130404}, +{2.1488578, 2.5471571, 0.5764393}, +{2.2462270, 2.4789231, 0.4827738}, +{2.3975186, 2.1903710, 2.7691264}, +{2.3945692, 2.1455278, 2.8536408}, +{2.3894451, 2.2832127, 2.7909794}, +{2.0788777, 2.2758670, 2.0997748}, +{2.0342002, 2.1918125, 2.1098297}, +{2.0531607, 2.3064048, 2.0127783}, +{0.1783671, 1.8784395, 2.5981960}, +{0.1578446, 1.9712187, 2.5866559}, +{0.0981172, 1.8328270, 2.5728629}, +{1.6632726, 2.3131890, 1.0135151}, +{1.6594592, 2.2180502, 1.0036955}, +{1.7045476, 2.3439610, 0.9328195}, +{1.4803901, 2.6592510, 1.2223798}, +{1.5306160, 2.6779396, 1.3016919}, +{1.5277244, 2.5874052, 1.1804275}, +{0.6837543, 1.7004693, 2.4274294}, +{0.7508138, 1.7466190, 2.3770754}, +{0.6404389, 1.7691039, 2.4781775}, +{1.1411927, 1.4649131, 2.2682679}, +{1.1664184, 1.5003501, 2.3535333}, +{1.1898483, 1.3827926, 2.2611153}, +{3.0779069, 0.6804932, 1.1097274}, +{3.0244229, 0.6217276, 1.0563568}, +{3.1430690, 0.6233280, 1.1503271}, +{0.1969125, 0.7999193, 0.4099044}, +{0.1111407, 0.7587862, 0.3992464}, +{0.2579998, 0.7390308, 0.3683924}, +{2.8264813, 1.4989989, 0.3259530}, +{2.8100045, 1.4170247, 0.2793585}, +{2.7631485, 1.4989008, 0.3977252}, +{0.5845742, 2.2724712, 1.5652804}, +{0.6492001, 2.3415713, 1.5798061}, +{0.6321878, 2.1911905, 1.5822725}, +{1.3550177, 2.5894437, 0.5522795}, +{1.4319309, 2.6198018, 0.5040606}, +{1.3148459, 2.6694622, 0.5861265}, +{0.3492166, 0.6444935, 0.2208706}, +{0.4288977, 0.6562431, 0.1691484}, +{0.2789139, 0.6406725, 0.1560226}, +{2.4670827, 1.8028463, 1.2799479}, +{2.5121534, 1.7487937, 1.2150692}, +{2.3769743, 1.8083243, 1.2481233}, +{1.3075612, 0.4356000, 0.8103200}, +{1.2694739, 0.5167696, 0.7768060}, +{1.2515557, 0.3664850, 0.7749812}, +{0.4910012, 2.0979931, 2.1243012}, +{0.4323250, 2.1473954, 2.1815627}, +{0.5286052, 2.1638915, 2.0659432}, +{0.0578629, 2.7593703, 0.8114767}, +{0.0531583, 2.7730706, 0.7168590}, +{0.1514677, 2.7516351, 0.8299326}, +{2.2404411, 0.0327961, 1.8300445}, +{2.2604232, 0.0136552, 1.9216778}, +{2.3100979, 0.0922798, 1.8022606}, +{0.0974365, 0.9283392, 3.0126777}, +{0.1524632, 0.9092092, 2.9367275}, +{0.0957323, 1.0239197, 3.0175543}, +{2.6784375, 2.9037516, 0.7836549}, +{2.6834912, 2.9627857, 0.7084768}, +{2.7663460, 2.9055664, 0.8214850}, +{0.0836577, 2.1209667, 2.8446317}, +{0.1585192, 2.1382492, 2.7875404}, +{0.0965081, 2.0308964, 2.8743730}, +{2.5167794, 0.3068167, 2.7316771}, +{2.4714971, 0.3364888, 2.8106162}, +{2.5992029, 0.3554861, 2.7316215}, +{0.5038749, 2.3738491, 1.3183770}, +{0.5218666, 2.4678626, 1.3180954}, +{0.5158341, 2.3474476, 1.4096035}, +{1.2454827, 0.0940776, 3.0993612}, +{1.3358598, 0.1254011, 3.1029875}, +{1.2016215, 0.1390790, 3.1715651}, +{0.1842959, 1.7456124, 1.6979568}, +{0.1849337, 1.7568830, 1.6029048}, +{0.1703129, 1.6518023, 1.7108592}, +{0.4536920, 2.5917311, 0.5849202}, +{0.5092427, 2.6263988, 0.5151020}, +{0.3643268, 2.6058743, 0.5536767}, +{2.4967804, 0.2426428, 3.1782391}, +{2.4980402, 0.1970108, 3.0941055}, +{2.4711294, 0.1755416, 3.2414987}, +{0.9008789, 1.7600172, 0.7647498}, +{0.8557037, 1.6999091, 0.8239828}, +{0.8542477, 1.8430156, 0.7747053}, +{2.1795778, 3.1438193, 2.1036255}, +{2.1984453, 3.1826649, 2.1890502}, +{2.1416118, 3.0583544, 2.1240375}, +{0.7482341, 0.7066222, 1.7839291}, +{0.7457371, 0.7127150, 1.8794223}, +{0.8371063, 0.6770926, 1.7641289}, +{2.8649092, 1.4900875, 2.8105652}, +{2.8910971, 1.5242095, 2.7250538}, +{2.9152474, 1.5418168, 2.8734336}, +{2.4295516, 0.1482109, 2.0379190}, +{2.5178802, 0.1531281, 2.0013645}, +{2.4299416, 0.0684588, 2.0908508}, +{2.4314852, 0.0500857, 1.4687470}, +{2.5098026, 0.0887686, 1.4296020}, +{2.3872767, 0.1234905, 1.5114048}, +{0.4156466, 0.3368271, 3.1477161}, +{0.4013515, 0.2740769, 3.0768614}, +{0.5108376, 0.3418472, 3.1564214}, +{3.1115756, 1.8532823, 1.1165141}, +{3.1038578, 1.8718256, 1.2101030}, +{3.1279166, 1.9386638, 1.0764481}, +{1.6271554, 1.0081229, 1.3328984}, +{1.5640870, 0.9454293, 1.2974836}, +{1.7114986, 0.9797754, 1.2976145}, +{1.8857219, 2.2685883, 1.6731218}, +{1.9564896, 2.3233678, 1.6391591}, +{1.8152303, 2.3301859, 1.6930959}, +{1.4594719, 1.1599877, 3.0658443}, +{1.3769027, 1.1850663, 3.0244234}, +{1.4352641, 1.1370650, 3.1555710}, +{0.5770164, 1.2694687, 0.8353566}, +{0.5626905, 1.3266805, 0.7599651}, +{0.6655903, 1.2353351, 0.8230325}, +{1.7655202, 0.8793496, 2.1394968}, +{1.8459513, 0.9261115, 2.1169915}, +{1.7559942, 0.8135606, 2.0706246}, +{2.4673088, 1.8584262, 0.8801485}, +{2.5091872, 1.7842855, 0.9238712}, +{2.5398793, 1.9156744, 0.8552797}, +{0.5073391, 2.3540635, 0.6927225}, +{0.4743643, 2.4407256, 0.6689599}, +{0.5985147, 2.3691397, 0.7176631}, +{1.1869973, 0.0069852, 0.2298261}, +{1.1808685, -0.0878405, 0.2413521}, +{1.1511999, 0.0433212, 0.3108234}, +{2.6046932, 1.8357429, 2.6378818}, +{2.5620329, 1.7680523, 2.6904216}, +{2.5475156, 1.9120628, 2.6461482}, +{1.8136911, 2.0696192, 2.0584218}, +{1.7304506, 2.1157048, 2.0479598}, +{1.7914154, 1.9771662, 2.0475340}, +{0.9730627, 2.7394595, 1.1390134}, +{1.0245099, 2.6876483, 1.0771174}, +{0.9680254, 2.6849234, 1.2175167}, +{1.6381097, 1.0507834, 0.3490207}, +{1.7185095, 1.0168779, 0.3883727}, +{1.6668882, 1.0922463, 0.2676884}, +{2.0200162, 2.6963561, 2.3652277}, +{2.0146904, 2.6140289, 2.4137683}, +{1.9629277, 2.6832588, 2.2895198}, +{2.9405653, 0.9576076, 1.0373093}, +{2.8530388, 0.9189986, 1.0340291}, +{2.9971676, 0.8921455, 0.9964042}, +{0.6476248, 1.1184535, 2.7290316}, +{0.5692672, 1.1727514, 2.7204208}, +{0.6327927, 1.0453197, 2.6690836}, +{2.8419216, 1.9384192, 0.7193613}, +{2.9187410, 1.9840723, 0.6850558}, +{2.8316519, 1.9723067, 0.8082910}, +{2.3169124, 2.2255061, 0.7560075}, +{2.2458146, 2.1635633, 0.7724544}, +{2.2726915, 2.3083384, 0.7374169}, +{1.0748703, 0.6871912, 2.6919115}, +{1.1633543, 0.6619518, 2.6655319}, +{1.0861098, 0.7714646, 2.7358887}, +{0.0774770, 3.0752191, 2.2247641}, +{0.0322728, 3.0844369, 2.1408956}, +{0.1659322, 3.0471282, 2.2013359}, +{2.9438622, 1.2409064, 2.8600609}, +{3.0338154, 1.2337920, 2.8281209}, +{2.9221046, 1.3335679, 2.8499239}, +{2.2378011, 1.9386177, 1.6808851}, +{2.1502020, 1.9167708, 1.7126883}, +{2.2467830, 2.0323760, 1.6979440}, +{1.4227408, 1.7841775, 2.0304794}, +{1.3511722, 1.7759745, 2.0935109}, +{1.4981122, 1.7449850, 2.0745864}, +{1.4887103, 2.0467927, 2.0331962}, +{1.4610412, 1.9555509, 2.0416610}, +{1.4193860, 2.0881712, 1.9817734}, +{0.0340780, 1.5261482, 1.4595754}, +{0.0309649, 1.4909560, 1.3706140}, +{-0.0559048, 1.5532427, 1.4777769}, +{1.5224903, 0.1661578, 3.1212919}, +{1.5834048, 0.0935368, 3.1079524}, +{1.5457999, 0.2297104, 3.0536158}, +{0.0816482, 1.1037382, 0.4777234}, +{-0.0054210, 1.1374587, 0.4566475}, +{0.0707774, 1.0606782, 0.5625172}, +{3.0662675, 0.0358238, 3.0800355}, +{3.0017874, 0.0950806, 3.0413923}, +{3.0211925, -0.0030174, 3.1550148}, +{2.1593428, 2.3391256, 2.9319861}, +{2.1032333, 2.3909841, 2.8743250}, +{2.2481506, 2.3686316, 2.9118648}, +{0.1281719, 2.4506598, 2.5111132}, +{0.1391695, 2.3602154, 2.4817667}, +{0.0356916, 2.4570215, 2.5349717}, +{3.1226239, 1.6242535, 0.7353630}, +{3.0995426, 1.5518680, 0.6771402}, +{3.1099918, 1.5890747, 0.8234834}, +{1.4125627, 0.7544834, 1.5066402}, +{1.5054874, 0.7357658, 1.4933374}, +{1.3671398, 0.6900312, 1.4523724}, +{2.2307046, 0.1334562, 2.9098568}, +{2.2352242, 0.2284277, 2.8987977}, +{2.3199360, 0.1077771, 2.9331083}, +{2.4147241, 0.9624926, 1.2014419}, +{2.4173338, 0.9862739, 1.1087599}, +{2.3298683, 0.9196822, 1.2128040}, +{0.3278056, 0.3497300, 0.2765122}, +{0.3238836, 0.3216062, 0.1851011}, +{0.3548987, 0.4414351, 0.2722157}, +{1.6943099, 1.1554253, 0.1044712}, +{1.7826068, 1.1421489, 0.0699791}, +{1.6406220, 1.1722406, 0.0270299}, +{2.6309984, 2.7838564, 1.0509003}, +{2.6917503, 2.7881265, 0.9770539}, +{2.6740856, 2.7262693, 1.1140630}, +{1.0080870, 2.7048438, 3.0472586}, +{0.9533328, 2.6638126, 2.9803202}, +{1.0383178, 2.7862079, 3.0069065}, +{0.2450570, 2.9102933, 1.0437293}, +{0.1624881, 2.9273899, 0.9984260}, +{0.2892744, 2.8452327, 0.9891927}, +{2.9494078, 1.6749190, 2.9821687}, +{2.9955168, 1.6447038, 3.0604203}, +{2.9854581, 1.7619594, 2.9652374}, +{0.1694400, 1.8712778, 2.9085426}, +{0.1554771, 1.8561226, 3.0020182}, +{0.2422809, 1.8135924, 2.8855443}, +{1.5720148, 1.0467206, 2.0218225}, +{1.4992840, 0.9845018, 2.0229926}, +{1.6468091, 0.9967527, 2.0545540}, +{0.5403146, 2.4046991, 0.2466223}, +{0.4461326, 2.4044735, 0.2637111}, +{0.5476781, 2.3871424, 0.1528147}, +{2.0995874, 0.3659303, 1.8802744}, +{2.1237929, 0.4139685, 1.9594499}, +{2.1661038, 0.2975409, 1.8724772}, +{1.0650973, 2.2499113, 2.9354756}, +{1.0726751, 2.2797766, 3.0261009}, +{1.0327522, 2.1600947, 2.9424810}, +{1.2984168, 2.7431529, 2.4380839}, +{1.3929604, 2.7498395, 2.4514677}, +{1.2879024, 2.7392263, 2.3430243}, +{1.4565203, 1.7663779, 0.1348543}, +{1.4338349, 1.7116584, 0.0596648}, +{1.5445952, 1.7984421, 0.1154374}, +{3.1399758, -0.0423625, 2.7965226}, +{3.2185967, 0.0122339, 2.7970965}, +{3.0827310, -0.0026095, 2.8621354}, +{2.5306594, 0.5720270, 2.5160491}, +{2.5384653, 0.6671901, 2.5227857}, +{2.5802088, 0.5385793, 2.5908048}, +{2.6899960, 0.3582295, 0.9507697}, +{2.7641399, 0.3175577, 0.9956119}, +{2.6363668, 0.3945415, 1.0212512}, +{0.6902657, 2.3005016, 2.2870040}, +{0.6894908, 2.3943555, 2.2682106}, +{0.6131379, 2.2663736, 2.2417393}, +{2.5247357, 0.5532851, 2.9779058}, +{2.6188681, 0.5666595, 2.9668372}, +{2.4915044, 0.6386741, 3.0055954}, +{0.1179873, 2.0958440, 1.1574721}, +{0.1355803, 2.0228438, 1.2168335}, +{0.0511194, 2.1476064, 1.2023237}, +{1.5558029, 0.2133368, 2.8050687}, +{1.6320791, 0.2615435, 2.7731256}, +{1.5888454, 0.1252776, 2.8228476}, +{2.2854686, 0.6192090, 0.9841476}, +{2.2769921, 0.5244450, 0.9736479}, +{2.2989523, 0.6520451, 0.8952528}, +{2.3667128, 0.9250924, 2.3055813}, +{2.4424987, 0.9140886, 2.2481554}, +{2.3200226, 1.0004370, 2.2694492}, +{1.9677237, 1.0523200, 1.0342212}, +{2.0233085, 1.0823415, 0.9623089}, +{1.9137887, 0.9833126, 0.9956038}, +{2.3559983, 1.4335123, 1.9380755}, +{2.3143001, 1.3761598, 1.8737774}, +{2.3997135, 1.5005588, 1.8855774}, +{0.4134667, 0.9046849, 2.3572011}, +{0.4558387, 0.9416404, 2.2797334}, +{0.4836853, 0.8977156, 2.4218779}, +{2.6924975, 2.1439743, 2.0269926}, +{2.7326546, 2.0818164, 1.9662790}, +{2.6759059, 2.2219243, 1.9739755}, +{2.6284773, 0.3836095, 2.3307583}, +{2.5941298, 0.4711865, 2.3484461}, +{2.5716243, 0.3250368, 2.3807514}, +{1.8803731, 2.3842695, 0.4355615}, +{1.8798169, 2.4318342, 0.3524976}, +{1.8605776, 2.2937701, 0.4114720}, +{2.6924810, 1.8923845, 2.3447378}, +{2.7598052, 1.9572178, 2.3653877}, +{2.6542296, 1.8697431, 2.4295111}, +{2.6249464, 1.9061662, 0.5953382}, +{2.6323190, 1.8429006, 0.5238859}, +{2.7128584, 1.9101166, 0.6329973}, +{2.6076162, 2.5701380, 3.0335496}, +{2.6677387, 2.5419466, 3.1024904}, +{2.6125462, 2.6657186, 3.0350802}, +{1.5122189, 3.1265650, 1.8181751}, +{1.4799637, 3.1000898, 1.9043202}, +{1.6075225, 3.1220202, 1.8258495}, +{1.8299207, 1.3329990, 0.2640091}, +{1.8301125, 1.4149491, 0.2145474}, +{1.7451856, 1.2931889, 0.2440728}, +{0.5316945, 1.5592256, 2.2813120}, +{0.4518418, 1.5885963, 2.3251665}, +{0.6027361, 1.5979660, 2.3324451}, +{2.9166615, 2.7822528, 0.3998055}, +{2.8848722, 2.7744152, 0.3098592}, +{2.8474503, 2.7431941, 0.4531586}, +{2.5691409, 0.4548870, 0.5015772}, +{2.6536095, 0.4764507, 0.5411038}, +{2.5312700, 0.5396491, 0.4782638}, +{2.6013222, 2.1316431, 1.6272650}, +{2.5512021, 2.1818557, 1.6915221}, +{2.6112919, 2.0451207, 1.6669741}, +{2.7762497, 2.5853784, 1.5046865}, +{2.8082089, 2.5061338, 1.5478282}, +{2.6887524, 2.5988407, 1.5410913}, +{1.7334777, 2.9228179, 2.6780596}, +{1.7071803, 2.8325360, 2.6959462}, +{1.8275672, 2.9174840, 2.6612954}, +{2.1924148, 0.8201565, 1.1411474}, +{2.1310017, 0.8714425, 1.0886067}, +{2.2162249, 0.7464081, 1.0849640}, +{1.3730979, 2.0394664, 2.5198331}, +{1.3042439, 2.0504677, 2.5854106}, +{1.4379100, 2.1064291, 2.5416892}, +{2.5736449, 2.9831073, 0.0836388}, +{2.5608346, 2.9276924, 0.0066490}, +{2.4965141, 3.0397620, 0.0854724}, +{1.4419829, 0.9275831, 0.4852401}, +{1.3516345, 0.9527029, 0.4660442}, +{1.4950252, 0.9844165, 0.4293939}, +{2.7263858, 0.0255740, 0.2659463}, +{2.6674101, -0.0366571, 0.2233850}, +{2.6833131, 0.0465600, 0.3488117}, +{2.4774864, 2.4371593, 2.8288701}, +{2.4705143, 2.4932880, 2.7516477}, +{2.5212538, 2.4916883, 2.8942406}, +{0.8026680, 1.9471198, 2.2784607}, +{0.8066015, 2.0375145, 2.3096964}, +{0.7294235, 1.9462367, 2.2168429}, +{2.5729823, 1.1345458, 2.4081481}, +{2.5286508, 1.0644181, 2.3604078}, +{2.5020039, 1.1896266, 2.4411704}, +{1.9751326, 0.5175521, 2.5637033}, +{1.9343443, 0.5366905, 2.4792502}, +{2.0661366, 0.4970486, 2.5422513}, +{0.1967940, 1.4434991, 1.6574012}, +{0.1624022, 1.3597503, 1.6884766}, +{0.1463652, 1.4622028, 1.5782216}, +{2.7913561, 2.3253985, 1.1589936}, +{2.7053022, 2.3509755, 1.1257839}, +{2.8461013, 2.4027979, 1.1457810}, +{1.6231042, 2.0624797, 2.6664689}, +{1.7179431, 2.0626185, 2.6794262}, +{1.5868346, 2.0665226, 2.7549589}, +{0.3104896, 0.1964314, 2.4028001}, +{0.4005939, 0.1641288, 2.4025290}, +{0.2613456, 0.1307365, 2.3534913}, +{0.4801207, 1.8029326, 0.3165997}, +{0.4853454, 1.8542775, 0.2359850}, +{0.4884645, 1.7120612, 0.2877019}, +{1.4978380, 2.2259724, 0.3303875}, +{1.4651126, 2.2369201, 0.4196709}, +{1.4411120, 2.2816815, 0.2770867}, +{0.8192873, 0.3351430, 1.0569626}, +{0.7311190, 0.3205921, 1.0912691}, +{0.8329266, 0.4295257, 1.0652204}, +{1.4837136, 3.1090648, 0.5654399}, +{1.4706005, 3.1891510, 0.5146800}, +{1.4706029, 3.0382953, 0.5023361}, +{0.1713183, 0.1698114, 1.0012348}, +{0.2421246, 0.1070507, 1.0157218}, +{0.1687364, 0.1815066, 0.9062670}, +{2.1886995, 0.2739622, 0.3003096}, +{2.2397885, 0.2403584, 0.3739507}, +{2.1196077, 0.2089744, 0.2874551}, +{0.0977938, 2.5101287, 0.3073728}, +{0.0273581, 2.4458516, 0.3157142}, +{0.1034575, 2.5273938, 0.2133932}, +{0.5691461, 0.6407880, 1.3655373}, +{0.6211444, 0.6348892, 1.4456853}, +{0.5336394, 0.5527176, 1.3534868}, +{2.6818466, 2.6728892, 1.8471429}, +{2.6471665, 2.7598612, 1.8670294}, +{2.7552669, 2.6619856, 1.9075823}, +{1.7084965, 0.6117907, 2.9007463}, +{1.7354469, 0.5206087, 2.8897078}, +{1.6763160, 0.6165242, 2.9907703}, +{1.5665411, 2.7092948, 0.3919005}, +{1.5883380, 2.6926634, 0.3001911}, +{1.6357704, 2.6653881, 0.4413155}, +{0.1412743, 3.0210686, 0.4142155}, +{0.1689279, 3.1115446, 0.3996656}, +{0.2154174, 2.9682965, 0.3845469}, +{1.0791244, 2.5914304, 0.8701317}, +{1.1134054, 2.5423033, 0.9447886}, +{1.0689853, 2.5259895, 0.8010160}, +{2.8018105, 0.0911528, 2.7258992}, +{2.8065507, 0.1580159, 2.6575677}, +{2.8675892, 0.0263713, 2.7006245}, +{1.9499904, 2.0575554, 1.7958398}, +{1.9517512, 2.1506608, 1.7736896}, +{1.9109522, 2.0544491, 1.8831822}, +{2.6255288, 0.8416124, 0.2570413}, +{2.6402500, 0.7578790, 0.2130604}, +{2.7131407, 0.8717937, 0.2810326}, +{0.1816655, 0.6137471, 2.6060712}, +{0.2347539, 0.6630254, 2.6686459}, +{0.1215705, 0.6785799, 2.5693612}, +{2.3025656, 2.7687774, 2.8959382}, +{2.2255301, 2.7542970, 2.8410001}, +{2.2669506, 2.7855468, 2.9831889}, +{1.0463766, 0.5807963, 1.8975348}, +{1.0510879, 0.6245729, 1.8125423}, +{1.1096504, 0.6275216, 1.9520830}, +{0.5656075, 0.5001264, 1.8929697}, +{0.5104013, 0.4459974, 1.9494022}, +{0.6279483, 0.5412912, 1.9528146}, +{2.9750881, 0.8177684, 1.3271333}, +{2.8869309, 0.8470758, 1.3040743}, +{3.0097799, 0.7802228, 1.2462066}, +{2.4705625, 2.7679639, 2.1987462}, +{2.4445944, 2.8151028, 2.1195888}, +{2.4760032, 2.6763964, 2.1713946}, +{1.3880258, 2.6865900, 3.0969064}, +{1.3163033, 2.7464504, 3.1177607}, +{1.4512186, 2.6993568, 3.1676595}, +{0.3509495, 2.8923845, 3.0801346}, +{0.3434520, 2.7996082, 3.1024659}, +{0.4399460, 2.9017243, 3.0461538}, +{0.4903889, 2.7930729, 2.0505636}, +{0.5479558, 2.8565421, 2.0932252}, +{0.4075779, 2.8397112, 2.0391827}, +{1.7699884, 2.4431291, 1.2271723}, +{1.8505506, 2.3998263, 1.1989429}, +{1.7020149, 2.4064844, 1.1706119}, +{2.9029887, 1.3710126, 3.1286442}, +{2.8246801, 1.4119716, 3.0918689}, +{2.9221394, 1.2983812, 3.0693126}, +{1.6130558, 1.4725082, 1.7352284}, +{1.5518103, 1.5419221, 1.7108767}, +{1.6065126, 1.4671561, 1.8305744}, +{3.1397207, 1.9945855, 2.3015561}, +{3.1353478, 1.9384363, 2.3789542}, +{3.0798821, 1.9537962, 2.2389631}, +{0.3949067, 2.9258466, 0.6705651}, +{0.4709734, 2.9140766, 0.7274653}, +{0.4127097, 3.0071521, 0.6232918}, +{3.0299635, 1.2020303, 1.1165897}, +{3.1127799, 1.1939232, 1.1638975}, +{3.0056479, 1.1119417, 1.0952561}, +{2.0978274, 2.7156467, 0.3127277}, +{2.1271322, 2.6584606, 0.3836735}, +{2.1040201, 2.8039861, 0.3490612}, +{2.1807039, 2.3496640, 0.0716857}, +{2.1377301, 2.3515029, -0.0138256}, +{2.2676618, 2.3137658, 0.0540234}, +{1.7215401, 1.4077606, 2.7046404}, +{1.6620761, 1.3894458, 2.7773793}, +{1.8029150, 1.3633423, 2.7284620}, +{1.7330210, 1.1147840, 1.5747122}, +{1.8217411, 1.1369550, 1.5464362}, +{1.6968881, 1.0636398, 1.5023174}, +{2.6346588, 0.3984129, 1.6939337}, +{2.6315162, 0.3995763, 1.7895950}, +{2.7146292, 0.4462310, 1.6720135}, +{1.5191864, 0.2961522, 0.6581619}, +{1.5537578, 0.3702723, 0.7078948}, +{1.4680111, 0.3362350, 0.5878997}, +{0.2004574, 3.0660729, 2.5926342}, +{0.2477710, 3.0287805, 2.6670184}, +{0.1896886, 3.1585159, 2.6150091}, +{0.1795199, -0.0038878, 0.0987707}, +{0.2450917, -0.0282750, 0.1641000}, +{0.2305372, 0.0288638, 0.0246971}, +{1.3248554, 0.8683960, 1.7367622}, +{1.3846464, 0.9389083, 1.7615688}, +{1.3728558, 0.8184092, 1.6707349}, +{1.7504369, 0.1422913, 0.6147918}, +{1.7431371, 0.1821367, 0.7015177}, +{1.6714638, 0.0888817, 0.6062480}, +{2.7387052, 0.3553921, 3.1785345}, +{2.7845435, 0.2997507, 3.1155646}, +{2.6482046, 0.3242791, 3.1765554}, +{2.6148498, 0.7964693, 1.4880434}, +{2.5736783, 0.7127299, 1.4667144}, +{2.6450012, 0.8304797, 1.4038026}, +{2.3495355, 1.1754516, 1.3497258}, +{2.3607902, 1.0921180, 1.3039966}, +{2.3553238, 1.2415850, 1.2807680}, +{0.4353878, 0.3820456, 1.5257384}, +{0.3938323, 0.3502594, 1.6058950}, +{0.4056132, 0.4726551, 1.5176320}, +{0.9295611, 0.8956001, 0.2000573}, +{0.8350658, 0.8902312, 0.2143448}, +{0.9386707, 0.9129547, 0.1063655}, +{1.4049870, 0.7978808, 2.0359037}, +{1.4295891, 0.7698684, 1.9477428}, +{1.3092798, 0.7990299, 2.0348353}, +{2.5306070, 0.5991201, 1.1398703}, +{2.4381361, 0.5974384, 1.1151997}, +{2.5466666, 0.5130143, 1.1784733}, +{0.9687269, 2.7747042, 1.8995974}, +{0.9627817, 2.8394580, 1.9698393}, +{0.9071020, 2.8056521, 1.8332127}, +{1.3227631, 1.2302064, 2.2660830}, +{1.4163550, 1.2308165, 2.2460206}, +{1.2881211, 1.1560227, 2.2164946}, +{1.7512839, 0.2250929, 2.1313398}, +{1.8272624, 0.2777204, 2.1562383}, +{1.7039401, 0.2110837, 2.2133439}, +{1.0839202, 1.1653127, 0.6037248}, +{1.0919524, 1.2424824, 0.5476655}, +{1.1531528, 1.1758065, 0.6689861}, +{2.3581777, 0.0260032, 0.1423269}, +{2.2657423, 0.0306057, 0.1178970}, +{2.3573680, -0.0010692, 0.2341351}, +{1.8426915, 1.6059464, 1.4092997}, +{1.7590424, 1.5708569, 1.4398591}, +{1.8606557, 1.5580159, 1.3284154}, +{0.8064958, 0.5554397, 1.2307745}, +{0.7289842, 0.5052969, 1.2560725}, +{0.8047711, 0.6324768, 1.2875603}, +{1.2599907, 0.5939665, 3.0980814}, +{1.2691231, 0.5925769, 3.1933546}, +{1.2851076, 0.6828355, 3.0729065}, +{0.4800295, 1.5222170, 1.6447350}, +{0.3873410, 1.5014110, 1.6564944}, +{0.5252059, 1.4389705, 1.6585704}, +{2.4475930, 2.3083363, 1.2044363}, +{2.4966061, 2.3420968, 1.1294681}, +{2.4725156, 2.2160714, 1.2097616}, +{2.6589081, 2.1279862, 0.1576333}, +{2.6110067, 2.0990782, 0.2353000}, +{2.7446806, 2.1544590, 0.1908686}, +{1.0363584, 2.8064733, 1.5268457}, +{1.0586085, 2.8891451, 1.5696547}, +{1.1099524, 2.7893653, 1.4680787}, +{0.5510727, 2.3512003, 2.8521211}, +{0.6332073, 2.3547084, 2.8030913}, +{0.4830378, 2.3497522, 2.7848048}, +{0.4952797, 1.2100240, 2.0142486}, +{0.5275091, 1.2906578, 2.0545201}, +{0.5217193, 1.1407759, 2.0748122}, +{2.5178335, 0.1176064, 2.9165335}, +{2.5412207, 0.1753540, 2.8438659}, +{2.5792062, 0.0444683, 2.9097133}, +{0.8187293, 1.9986755, 1.4016023}, +{0.7710190, 2.0610754, 1.3469005}, +{0.7589167, 1.9245538, 1.4111280}, +{1.4728122, 1.3859321, 2.8991032}, +{1.4587699, 1.3140646, 2.9607489}, +{1.3986496, 1.3806151, 2.8388209}, +{1.3014560, 0.8436833, 3.0745077}, +{1.3074479, 0.9006813, 2.9978418}, +{1.3503966, 0.8898742, 3.1425777}, +{1.9087021, 2.6298242, 2.1058505}, +{1.9201282, 2.6603231, 2.0158417}, +{1.8563963, 2.5500786, 2.0976601}, +{0.9054506, 2.4282083, 2.6327283}, +{0.8863584, 2.4634962, 2.7196338}, +{0.9664054, 2.4911458, 2.5941834}, +{1.2586957, 2.0744982, 0.5610318}, +{1.3342080, 2.0275252, 0.5256233}, +{1.2827300, 2.1669164, 0.5544323}, +{1.2518879, 0.5671206, 0.2365493}, +{1.3274175, 0.6047231, 0.2817560}, +{1.2761087, 0.4757713, 0.2213517}, +{3.0219123, 2.7466364, 2.2767417}, +{3.0711491, 2.8272052, 2.2924499}, +{2.9777675, 2.7289622, 2.3598151}, +{0.8582447, 3.1670966, 1.1694672}, +{0.8875280, 3.2143433, 1.0915407}, +{0.9240960, 3.1873560, 1.2359163}, +{0.0038469, 0.7847276, 0.6169617}, +{0.0779865, 0.7733558, 0.5574947}, +{0.0044736, 0.7059679, 0.6713568}, +{3.1170006, 0.8190389, 2.5153515}, +{3.0575826, 0.8864714, 2.5482860}, +{3.2031174, 0.8608262, 2.5155480}, +{1.9652737, 1.4425920, 2.9377396}, +{2.0151646, 1.4219960, 3.0167904}, +{1.9103730, 1.5169072, 2.9627492}, +{1.3188924, 0.4760696, 2.1924744}, +{1.3996352, 0.4896055, 2.1428790}, +{1.3237176, 0.5396119, 2.2638986}, +{1.4347501, 0.6146016, 1.8483202}, +{1.5193791, 0.6154105, 1.8036034}, +{1.3708142, 0.6304707, 1.7788747}, +{0.4456893, 3.1379304, 1.4651777}, +{0.5092069, 3.1217446, 1.3954221}, +{0.4419083, 3.0555208, 1.5137231}, +{2.1169109, 0.7536042, 2.7579327}, +{2.0910583, 0.6635768, 2.7382090}, +{2.0341971, 0.8012184, 2.7652543}, +{1.5652953, 1.6619564, 2.2565403}, +{1.5854269, 1.5880219, 2.3139048}, +{1.6419784, 1.7188772, 2.2630260}, +{0.1761453, 0.2433042, 0.7191616}, +{0.2574431, 0.2011135, 0.6913600}, +{0.1585464, 0.3084597, 0.6512841}, +{0.9435512, 1.5972958, 1.0838647}, +{0.8891071, 1.5937151, 1.0052179}, +{0.8847567, 1.6293589, 1.1522567}, +{0.3819503, 0.6129280, 2.3973424}, +{0.3762604, 0.6921765, 2.3439605}, +{0.3157636, 0.6250986, 2.4654124}, +{2.6811609, 2.4277942, 0.4119397}, +{2.7416344, 2.4658539, 0.3482472}, +{2.6527293, 2.5020096, 0.4652877}, +{0.4030445, 1.3460102, 3.0967066}, +{0.4591890, 1.3985289, 3.0396812}, +{0.4576855, 1.3266494, 3.1728764}, +{1.3702827, 2.0878034, 1.6741318}, +{1.3038356, 2.0485530, 1.7307579}, +{1.3277836, 2.0948401, 1.5886529}, +{2.3918698, 2.0607550, 3.0298843}, +{2.4516749, 1.9956182, 3.0665295}, +{2.3921282, 2.1320937, 3.0937049}, +{1.3311570, 1.1889328, 1.5413749}, +{1.3171700, 1.2666187, 1.5955188}, +{1.3851117, 1.1313642, 1.5955697}, +{1.3754525, 3.0503197, 2.4060762}, +{1.4039202, 2.9625347, 2.3806653}, +{1.4280932, 3.0711653, 2.4832561}, +{1.9567870, 1.4318113, 0.6819604}, +{1.8700578, 1.4693604, 0.6971409}, +{2.0112586, 1.4683965, 0.7516503}, +{2.9423621, 1.3357537, 2.5515339}, +{2.9779451, 1.2560376, 2.5122719}, +{2.9733512, 1.4063106, 2.4947562}, +{2.4080093, 2.0804567, 1.4177169}, +{2.3948739, 2.0749922, 1.5123738}, +{2.5001240, 2.1044598, 1.4076649}, +{2.3567281, 3.0459533, 0.3781683}, +{2.4243994, 3.0325921, 0.4445338}, +{2.2803476, 2.9993062, 0.4121153}, +{2.3118653, 2.9657631, 2.6277521}, +{2.3387802, 2.8857317, 2.6728396}, +{2.3793721, 3.0297866, 2.6502492}, +{0.0577515, 0.5731999, 0.7641753}, +{0.0976642, 0.5208078, 0.6947177}, +{0.1247690, 0.5775940, 0.8323784}, +{1.8601680, 0.4999086, 1.4532056}, +{1.9040521, 0.5073493, 1.5379472}, +{1.9315184, 0.4968365, 1.3894718}, +{1.5070741, 0.8040556, 0.1836065}, +{1.4712406, 0.8918966, 0.1963444}, +{1.5374415, 0.7777457, 0.2704853}, +{1.7712666, 0.1931646, 0.8888435}, +{1.7156495, 0.2065247, 0.9655935}, +{1.8165898, 0.2766773, 0.8772786}, +{2.0003176, 1.8135760, 1.5097251}, +{2.0644631, 1.7550149, 1.5499529}, +{1.9522568, 1.7579616, 1.4484100}, +{3.0066166, 1.9350818, 1.7294935}, +{3.0548406, 1.9888599, 1.6666868}, +{3.0745792, 1.8895013, 1.7791506}, +{1.9339449, 3.0864971, 2.2927847}, +{2.0113969, 3.1336472, 2.3234501}, +{1.8930785, 3.1459305, 2.2298567}, +{0.5246730, 1.1523991, 1.2730669}, +{0.5607160, 1.0816915, 1.2195537}, +{0.4345460, 1.1621406, 1.2423333}, +{1.4752135, 2.9869986, 0.1199273}, +{1.5301914, 3.0653548, 0.1201423}, +{1.4334352, 2.9868169, 0.2060485}, +{0.4807925, 2.8096166, 2.3832920}, +{0.5242536, 2.7251828, 2.3712761}, +{0.4791700, 2.8224371, 2.4781356}, +{2.7278583, 0.1479281, 1.9331664}, +{2.7807584, 0.1422473, 2.0127380}, +{2.7512717, 0.0697106, 1.8832049}, +{1.9597518, 2.5236468, 0.1941712}, +{2.0087907, 2.5931265, 0.2381040}, +{2.0269435, 2.4689927, 0.1534216}, +{3.0577097, 0.0104346, 2.3951399}, +{3.0696013, -0.0568313, 2.4621937}, +{3.1235120, -0.0100642, 2.3287158}, +{0.0503257, 2.6132927, 0.0179723}, +{0.1175449, 2.6292272, -0.0482846}, +{0.0542255, 2.6900740, 0.0749962}, +{2.1274817, 1.2711593, 1.1985012}, +{2.2122004, 1.2968286, 1.1620851}, +{2.0910788, 1.2105064, 1.1340158}, +{1.8364943, 1.3688014, 2.0995231}, +{1.9092083, 1.4086003, 2.0516584}, +{1.8777823, 1.3258936, 2.1744668}, +{0.0739148, 2.3967023, 2.1931899}, +{-0.0174703, 2.3725951, 2.1780264}, +{0.0795781, 2.4108989, 2.2876818}, +{2.2549210, 0.3471862, 2.1506524}, +{2.3138540, 0.4170884, 2.1223166}, +{2.3026340, 0.2664289, 2.1315727}, +{2.3484154, 3.0481751, 0.9806470}, +{2.3261731, 3.0955923, 1.0607670}, +{2.3965256, 2.9711757, 1.0109587}, +{2.2179503, 0.7006577, 0.1023799}, +{2.2622323, 0.6163726, 0.1122502}, +{2.1391966, 0.6805616, 0.0518196}, +{0.7009133, 0.5118978, 1.5750181}, +{0.6857030, 0.5407835, 1.6649991}, +{0.6412537, 0.4379861, 1.5631816}, +{1.0599874, 1.0254687, 1.8140311}, +{1.1344073, 0.9654043, 1.8099986}, +{1.0232608, 1.0240673, 1.7256483}, +{2.7995517, 1.6421175, 2.2849586}, +{2.7594092, 1.7279366, 2.2713220}, +{2.8072653, 1.6341182, 2.3800316}, +{1.1964225, 1.2442608, 3.0020304}, +{1.1488432, 1.2846853, 3.0745864}, +{1.1391861, 1.2562066, 2.9262438}, +{1.2582548, 1.3975308, 2.7385454}, +{1.2849500, 1.3442296, 2.6636546}, +{1.1628805, 1.3897024, 2.7407332}, +{1.3727419, 2.3292923, 0.6072516}, +{1.3637116, 2.4215243, 0.5832930}, +{1.4349844, 2.3294196, 0.6799715}, +{0.4720281, 1.4438807, 2.6037078}, +{0.4348327, 1.5000658, 2.5357220}, +{0.4271033, 1.3600718, 2.5927465}, +{2.7598340, 1.0835303, 2.2218809}, +{2.7208519, 1.1385658, 2.2898059}, +{2.6850328, 1.0492729, 2.1729572}, +{3.1069696, 2.1410177, 1.5432065}, +{3.1697423, 2.1978660, 1.5878179}, +{3.0695818, 2.1960058, 1.4743533}, +{0.0976564, 0.2636926, 1.4859658}, +{0.1858591, 0.2388001, 1.4583439}, +{0.0396137, 0.2100778, 1.4319397}, +{2.4487021, 0.8086901, 3.0926871}, +{2.4476974, 0.7773923, 3.1831403}, +{2.3590052, 0.8378996, 3.0764518}, +{0.5438285, 0.5230525, 0.9622471}, +{0.5553451, 0.5409409, 1.0555729}, +{0.5467362, 0.4276066, 0.9556175}, +{0.0781672, 0.6923328, 0.1082874}, +{0.0821160, 0.7836114, 0.1368345}, +{0.0292727, 0.6477082, 0.1774271}, +{0.2624735, 1.1551951, 1.1807169}, +{0.2004147, 1.0899185, 1.2131202}, +{0.2521836, 1.1528730, 1.0855799}, +{1.6744248, 1.8008915, 1.1667128}, +{1.6285946, 1.8511794, 1.2340407}, +{1.6339184, 1.7142205, 1.1698241}, +{2.6040447, 1.4496174, 0.8913774}, +{2.6449902, 1.4965341, 0.8186822}, +{2.6560528, 1.3698009, 0.9006956}, +{0.2601544, 0.4503772, 2.0475431}, +{0.2023901, 0.4335500, 1.9730953}, +{0.2137979, 0.5160950, 2.0994520}, +{2.6007965, 0.8975061, 2.8955967}, +{2.6848202, 0.9324279, 2.9253087}, +{2.5612082, 0.8601260, 2.9743230}, +{1.3620640, 2.2744751, 2.7047627}, +{1.3148892, 2.1926513, 2.7203107}, +{1.3390578, 2.3299248, 2.7793171}, +{2.6262171, 2.0707726, 1.1897259}, +{2.7108147, 2.0366647, 1.2187467}, +{2.5695157, 1.9937692, 1.1855137}, +{1.4359728, 2.6843631, 1.8278337}, +{1.5264907, 2.6716165, 1.7994372}, +{1.4008222, 2.7495949, 1.7672400}, +{2.9826963, 2.1665154, 1.9968896}, +{2.9739537, 2.0764747, 2.0281711}, +{3.0637021, 2.1663959, 1.9458959}, +{1.2973957, 2.7848566, 1.3854614}, +{1.3706677, 2.7834625, 1.4470373}, +{1.3384026, 2.7959476, 1.2996842}, +{0.7103327, 0.2266322, 2.0201559}, +{0.6624266, 0.1512562, 1.9857209}, +{0.6460723, 0.2735989, 2.0733259}, +{2.3740916, 0.2641172, 1.7183168}, +{2.4665785, 0.2874096, 1.7264402}, +{2.3553259, 0.2727974, 1.6248565}, +{0.6539319, 1.1159453, 3.0130606}, +{0.6151905, 1.1306308, 2.9267716}, +{0.7419660, 1.1529309, 3.0063992}, +{0.2868564, 2.8157725, 0.3000911}, +{0.2439032, 2.7639899, 0.3681786}, +{0.3318088, 2.7511518, 0.2456321}, +{0.4422254, 1.0178227, 0.8603603}, +{0.4619318, 1.1114790, 0.8619307}, +{0.5276843, 0.9755004, 0.8521207}, +{2.3265414, 0.3939086, 0.8564739}, +{2.2616093, 0.3673321, 0.7913599}, +{2.3417661, 0.3151219, 0.9086580}, +{0.6676589, 0.1705779, 2.3975029}, +{0.6756334, 0.2589285, 2.4334600}, +{0.7521413, 0.1295132, 2.4159074}, +{2.5975468, 1.3132386, 1.6276039}, +{2.6059191, 1.3249506, 1.7222350}, +{2.5306058, 1.2455432, 1.6176777}, +{1.1880066, 2.2661233, 0.3135817}, +{1.0981436, 2.2987962, 0.3179903}, +{1.1792206, 2.1709912, 0.3194985}, +{2.5755207, 1.8249500, 0.1387399}, +{2.5933015, 1.7689778, 0.0631538}, +{2.6594393, 1.8668801, 0.1577623}, +{2.4734707, 1.4066199, 0.5109627}, +{2.4204309, 1.4825447, 0.4867853}, +{2.4225731, 1.3313121, 0.4809547}, +{1.8371361, 0.8486981, 2.8048358}, +{1.7684393, 0.9136233, 2.8199282}, +{1.7997704, 0.7664775, 2.8365517}, +{1.1105298, 1.4330255, 1.3863200}, +{1.0649740, 1.3588778, 1.4261836}, +{1.1162125, 1.4980797, 1.4563055}, +{0.3099379, 1.6383111, 2.4074712}, +{0.2802282, 1.7226297, 2.4416771}, +{0.2618147, 1.6274409, 2.3254449}, +{0.9264202, 0.3238065, 1.6520529}, +{0.8655177, 0.3955691, 1.6346366}, +{0.9294491, 0.3176000, 1.7475234}, +{1.0116186, 0.7359772, 0.4288653}, +{0.9709528, 0.7825761, 0.5019210}, +{0.9714028, 0.7740688, 0.3508009}, +{1.3361373, 1.2554296, 2.5386562}, +{1.3058383, 1.2246275, 2.4532423}, +{1.4316098, 1.2549831, 2.5317912}, +{2.2425704, 0.7408230, 1.4632007}, +{2.3160536, 0.7044901, 1.4137796}, +{2.1860182, 0.7800411, 1.3966717}, +{3.0553842, 0.2649164, 2.8699794}, +{3.1485467, 0.2807303, 2.8852439}, +{3.0406914, 0.2935229, 2.7798235}, +{2.1372261, 1.3440614, 0.2905213}, +{2.0962160, 1.4247363, 0.3216988}, +{2.0655325, 1.2807698, 0.2864563}, +{2.3307381, 0.1866001, 2.5753818}, +{2.2855699, 0.2709188, 2.5718441}, +{2.4017496, 0.2000829, 2.6381342}, +{1.0833068, 2.8470178, 0.7615794}, +{1.0690833, 2.7606366, 0.8002871}, +{1.0864471, 2.9065862, 0.8364397}, +{0.3623251, 3.0435689, 2.2972844}, +{0.2785820, 3.0354805, 2.3429353}, +{0.4105097, 2.9644671, 2.3214397}, +{0.8857377, 2.4947703, 0.2944232}, +{0.8894923, 2.4367588, 0.3704684}, +{0.8452512, 2.4417186, 0.2258034}, +{1.9779747, 1.8063639, 3.1499050}, +{2.0411582, 1.8456892, 3.0897078}, +{1.9862815, 1.8577158, 3.2302561}, +{1.1908220, 2.9183037, 3.1372163}, +{1.2753683, 2.9535663, 3.1649795}, +{1.1789423, 2.9517586, 3.0483234}, +{0.4952239, 1.0498067, 1.5249703}, +{0.4568027, 1.1238357, 1.5719367}, +{0.5144137, 1.0841572, 1.4377114}, +{2.2359345, 1.0170424, 2.0071890}, +{2.3280659, 1.0340203, 2.0268326}, +{2.2155819, 1.0762365, 1.9347725}, +{1.3782040, 0.0759693, 0.8097746}, +{1.4345443, 0.1532422, 0.8056536}, +{1.4126267, 0.0175972, 0.7421722}, +{1.2422931, 1.5133779, 1.9214456}, +{1.1505818, 1.5370141, 1.9075642}, +{1.2565678, 1.5267962, 2.0151393}, +{1.8389672, 0.8415399, 0.9280325}, +{1.8681381, 0.8907551, 0.8512911}, +{1.7454374, 0.8607788, 0.9346927}, +{0.8927226, 1.7675180, 1.6565161}, +{0.8976919, 1.8571439, 1.6897550}, +{0.7989829, 1.7485004, 1.6528364}, +{2.2228556, 0.8379528, 1.7164080}, +{2.1699178, 0.9167445, 1.7040881}, +{2.2229228, 0.7954876, 1.6306233}, +{0.2698026, 1.2140538, 2.1767108}, +{0.2529713, 1.1207079, 2.1895788}, +{0.3419849, 1.2169420, 2.1139121}, +{2.7391052, 1.9126713, 1.7649392}, +{2.8299744, 1.9422660, 1.7595310}, +{2.7266493, 1.8591301, 1.6865778}, +{2.3747113, 2.7061195, 1.5247794}, +{2.4392781, 2.7766004, 1.5196891}, +{2.3925593, 2.6517019, 1.4480821}, +{0.3006252, 1.6412710, 0.8356324}, +{0.3723614, 1.5839050, 0.8625652}, +{0.2214249, 1.5905367, 0.8533990}, +{1.7957482, 2.5739479, 2.9876835}, +{1.8338466, 2.5923607, 3.0735426}, +{1.7145841, 2.5270491, 3.0070541}, +{1.4368535, 0.3352306, 1.9036559}, +{1.3937789, 0.4206726, 1.9010942}, +{1.5006974, 0.3427109, 1.9745807}, +{1.7035219, 0.7274143, 1.4574734}, +{1.7704358, 0.7906924, 1.4313828}, +{1.7510592, 0.6448955, 1.4671272}, +{0.5750977, 1.0059313, 0.0932132}, +{0.5710027, 0.9150814, 0.0633492}, +{0.5800413, 1.0574189, 0.0126719}, +{0.5564135, 0.2605693, 0.3781363}, +{0.4826293, 0.3137148, 0.3482405}, +{0.6268649, 0.3236294, 0.3930473}, +{0.8879394, 0.3189079, 0.5408441}, +{0.8022988, 0.3447097, 0.5749363}, +{0.8918928, 0.3583165, 0.4537025}, +{0.6368139, 1.4299282, 1.3409469}, +{0.6185046, 1.3408658, 1.3110306}, +{0.5596210, 1.4543949, 1.3919855}, +{2.6125345, 0.5573406, 0.1715766}, +{2.5268982, 0.5257256, 0.1427805}, +{2.6753173, 0.5010124, 0.1263246}, +{2.3316493, 1.3659341, 0.8266759}, +{2.4169753, 1.3907931, 0.8622266}, +{2.3076239, 1.4385241, 0.7690930}, +{0.0964187, 0.5227888, 1.3446517}, +{0.0710482, 0.4827441, 1.2614948}, +{0.0902909, 0.4516167, 1.4083643}, +{0.0829173, 0.4389164, 1.8617699}, +{0.0188174, 0.3683772, 1.8529531}, +{0.0361945, 0.5080044, 1.9087396}, +{2.0621390, 1.9826493, 0.1898954}, +{2.0276511, 2.0133421, 0.2737456}, +{2.1536107, 2.0108488, 0.1898540}, +{3.1369369, 1.9597030, 0.3665094}, +{3.2322447, 1.9516017, 0.3701272}, +{3.1104913, 1.9722722, 0.4576409}, +{1.5008806, 1.7127411, 1.6635536}, +{1.4334896, 1.6991546, 1.5969490}, +{1.4593754, 1.7696612, 1.7283590}, +{1.1440319, 1.3541757, 0.4041499}, +{1.1229982, 1.4433519, 0.3764460}, +{1.2378782, 1.3454177, 0.3874619}, +{1.7399809, 1.9273679, 0.9332316}, +{1.6646295, 1.9334503, 0.8745163}, +{1.7038747, 1.8933383, 1.0150890}, +{2.2254562, 2.2585287, 1.6134764}, +{2.2474477, 2.2960548, 1.5282092}, +{2.3049419, 2.2694616, 1.6656758}, +{1.1171644, 2.3445690, 0.0248279}, +{1.1218464, 2.4401436, 0.0224015}, +{1.1611505, 2.3204968, 0.1063637}, +{1.0162044, 2.3311110, 0.6762432}, +{0.9330834, 2.3219445, 0.7228178}, +{0.9997697, 2.2926910, 0.5901263}, +{0.4555077, 1.8146687, 2.6084244}, +{0.4706315, 1.7307880, 2.6519861}, +{0.3608442, 1.8277624, 2.6138740}, +{2.7968543, 1.3698206, 2.1103325}, +{2.8219607, 1.2975224, 2.1678214}, +{2.8092198, 1.4482900, 2.1637363}, +{2.0857346, 2.7811117, 1.5528104}, +{2.0467968, 2.6951411, 1.5687845}, +{2.0314517, 2.8417313, 1.6032183}, +{2.2890308, 1.2212012, 2.5729568}, +{2.3274086, 1.2643889, 2.6492739}, +{2.2632935, 1.1346865, 2.6048174}, +{1.0787848, 3.0672052, 1.6855893}, +{1.0602504, 3.1045113, 1.7717696}, +{1.0153041, 3.1088605, 1.6273025}, +{0.0535477, 0.4156323, 1.0987432}, +{0.0748139, 0.3227319, 1.0898223}, +{0.1044763, 0.4585694, 1.0300046}, +{2.8151472, 1.6627674, 2.5566719}, +{2.7366560, 1.6217108, 2.5929456}, +{2.7955837, 1.7564654, 2.5571885}, +{1.6388582, 1.0072900, 0.9860554}, +{1.5651438, 1.0174197, 1.0462708}, +{1.6428514, 1.0904793, 0.9388758}, +{1.7404536, 1.8222985, 1.6672299}, +{1.6546537, 1.7806705, 1.6589956}, +{1.8021894, 1.7492751, 1.6715417}, +{1.2139546, 2.0177982, 2.2813234}, +{1.1976271, 2.1117938, 2.2735426}, +{1.2865386, 2.0111518, 2.3433695}, +{3.1049421, 0.5888794, 2.3621013}, +{3.0881836, 0.6780815, 2.3925061}, +{3.1371839, 0.5428284, 2.4395745}, +{2.6799493, 2.9230719, 2.7866848}, +{2.7730765, 2.9370987, 2.7695713}, +{2.6364253, 2.9971824, 2.7445466}, +{0.3641657, 2.3802168, 1.0677546}, +{0.4211076, 2.4445310, 1.0255213}, +{0.4105327, 2.3561969, 1.1479759}, +{0.7618315, 1.5794432, 0.9042917}, +{0.6704191, 1.5690969, 0.9307314}, +{0.7707439, 1.5240682, 0.8267256}, +{0.6359447, 1.1848352, 2.4018316}, +{0.6313067, 1.2017098, 2.3077249}, +{0.6463569, 1.2714553, 2.4412124}, +{1.2351048, 2.0271101, 2.7447839}, +{1.1568714, 2.0312133, 2.7997842}, +{1.2846923, 1.9528102, 2.7791774}, +{1.2456524, 0.3256645, 0.4525646}, +{1.1809156, 0.3748535, 0.5030811}, +{1.2992094, 0.3928582, 0.4103865}, +{0.7556862, 2.4661913, 1.6265892}, +{0.7395440, 2.5605266, 1.6249799}, +{0.8466276, 2.4579396, 1.6552926}, +{0.8260964, 2.3254483, 0.0911579}, +{0.7558832, 2.2626174, 0.0742848}, +{0.9023297, 2.2887738, 0.0463718}, +{1.6331737, 1.1024398, 2.7435186}, +{1.6455392, 1.1294059, 2.6525118}, +{1.7105902, 1.1355556, 2.7890415}, +{0.9677421, 1.6113858, 2.5636478}, +{0.9663517, 1.7024894, 2.5343132}, +{1.0395074, 1.5714781, 2.5144599}, +{2.5660224, 3.0803170, 2.6024702}, +{2.5950162, 3.1606805, 2.5593033}, +{2.5933573, 3.0101724, 2.5433528}, +{0.8869738, 1.1518859, 0.8700740}, +{0.9517918, 1.0839946, 0.8513190}, +{0.9115184, 1.1852493, 0.9563685}, +{3.0257902, 2.2964959, 2.3496864}, +{3.0502350, 2.2041738, 2.3432519}, +{2.9420462, 2.2959244, 2.3960426}, +{1.2517210, 2.1214638, 1.4384080}, +{1.1679274, 2.0988321, 1.4787658}, +{1.2526510, 2.0725784, 1.3561178}, +{0.4305718, 3.1419902, 1.0083237}, +{0.3873617, 3.0568168, 1.0019433}, +{0.4812676, 3.1371171, 1.0893699}, +{1.3644257, 3.0883822, 2.1330495}, +{1.3914908, 3.1004667, 2.2240648}, +{1.3120431, 3.1659822, 2.1131339}, +{1.4146036, 2.1177473, 0.0039168}, +{1.3980973, 2.0818999, 0.0911224}, +{1.3498402, 2.1875386, -0.0059423}, +{0.7094560, 0.8785826, 1.5792762}, +{0.6292105, 0.9302812, 1.5863635}, +{0.7025702, 0.8139197, 1.6495159}, +{0.6496355, 0.9312085, 2.5145013}, +{0.6513420, 1.0163022, 2.4707010}, +{0.7254618, 0.8846105, 2.4792688}, +{3.0273600, 1.8817427, 2.8184712}, +{3.1139193, 1.9062132, 2.8511972}, +{2.9824645, 1.9651657, 2.8047850}, +{2.6148128, 1.6985336, 1.0512211}, +{2.6165502, 1.6157194, 1.0032514}, +{2.7035181, 1.7079744, 1.0859280}, +{1.7024044, 2.7548120, 1.7533125}, +{1.7879469, 2.7141705, 1.7394183}, +{1.7223430, 2.8396683, 1.7928622}, +{3.0269184, 2.4696856, 2.5985360}, +{2.9889321, 2.5568366, 2.5873976}, +{2.9718726, 2.4125433, 2.5449912}, +{0.4982267, 0.3756398, 2.1689804}, +{0.4044140, 0.3926267, 2.1775212}, +{0.5392890, 0.4366362, 2.2302637}, +{0.5869789, 0.3682275, 2.8731203}, +{0.5101604, 0.3934593, 2.8218896}, +{0.5657214, 0.2812235, 2.9068952}, +{0.2635264, 2.6120842, 3.0212820}, +{0.2189270, 2.5792561, 2.9432080}, +{0.3559363, 2.6152456, 2.9965284}, +{0.7083868, 0.7354725, 0.9857749}, +{0.7022269, 0.7913483, 0.9083006}, +{0.6678842, 0.6529561, 0.9590748}, +{2.2197351, 0.9254321, 2.9582534}, +{2.2167702, 0.8876944, 2.8703363}, +{2.2101679, 1.0196329, 2.9442179}, +{3.1491475, 0.6527516, 0.3592111}, +{3.0721505, 0.6566145, 0.4159459}, +{3.1543481, 0.5610986, 0.3321004}, +{3.0621328, 2.0667563, 0.6148865}, +{3.0438485, 2.1602972, 0.6237245}, +{3.1508319, 2.0563309, 0.6493258}, +{1.6317766, 0.6407083, -0.0126553}, +{1.6419039, 0.5632601, 0.0426759}, +{1.5978800, 0.7080299, 0.0463460}, +{1.0009934, 0.3013750, 0.0922772}, +{1.0016964, 0.2214704, 0.1449751}, +{0.9929279, 0.3721582, 0.1562069}, +{0.5605082, 2.7414403, 1.7774074}, +{0.5253539, 2.6554658, 1.8005347}, +{0.6414300, 2.7486346, 1.8280258}, +{0.6947666, 0.2842861, 1.3978655}, +{0.6694402, 0.2302165, 1.4726812}, +{0.7901115, 0.2902881, 1.4038358}, +{0.6101878, 0.9154677, 1.1724261}, +{0.6143345, 0.8522128, 1.1007048}, +{0.6894419, 0.8989867, 1.2235092}, +{2.9753797, 1.0134596, 2.6172900}, +{2.8986087, 1.0690041, 2.6308303}, +{3.0465896, 1.0598793, 2.6612978}, +{2.2822680, 3.1030238, 1.2549940}, +{2.3274419, 3.1165273, 1.3382964}, +{2.2011447, 3.0581105, 1.2787452}, +{1.7701722, 1.8111771, 1.9753196}, +{1.7733066, 1.8262787, 1.8808504}, +{1.7566202, 1.7168249, 1.9840554}, +{2.5437789, 0.3618323, 1.2548538}, +{2.4593298, 0.3213837, 1.2349905}, +{2.5805809, 0.3074680, 1.3245134}, +{0.4782381, 1.9667033, 2.8840842}, +{0.5435075, 2.0284605, 2.8510950}, +{0.4291491, 1.9399562, 2.8063850}, +{0.9045134, 0.9518442, 0.5894940}, +{0.9540883, 1.0329684, 0.6006073}, +{0.8311698, 0.9761444, 0.5329913}, +{2.3662844, 1.3024414, 1.0765351}, +{2.4259174, 1.2434769, 1.0303897}, +{2.3390732, 1.3657765, 1.0101234}, +{0.6106168, 0.7484567, 3.1370072}, +{0.6820384, 0.6880419, 3.1572881}, +{0.5833516, 0.7244438, 3.0484502}, +{1.3046842, 1.0524570, 0.1149894}, +{1.2792888, 1.0308271, 0.2047086}, +{1.2305200, 1.1021237, 0.0804176}, +{1.6493477, 1.2685547, 0.9073321}, +{1.5963700, 1.3482119, 0.9041045}, +{1.6724747, 1.2514557, 0.8160354}, +{3.1584666, 2.7831345, 0.5297047}, +{3.1878276, 2.8540163, 0.4724683}, +{3.0670056, 2.7689581, 0.5052860}, +{0.0373426, 2.1799271, 1.8313292}, +{0.1262948, 2.2127793, 1.8182691}, +{0.0462098, 2.0846880, 1.8276973}, +{0.9614489, 0.4020632, 2.7232616}, +{1.0090766, 0.3706807, 2.8001320}, +{1.0299172, 0.4280324, 2.6616173}, +{3.0225883, 1.9557900, 3.1486316}, +{3.0347302, 2.0360739, 3.0979423}, +{2.9382289, 1.9675652, 3.1923029}, +{2.8241189, 0.2119172, 2.9815228}, +{2.7983382, 0.1453756, 2.9177270}, +{2.9085684, 0.2439946, 2.9498742}, +{0.6039022, 0.0043588, 0.2745881}, +{0.5724478, 0.0816901, 0.3214156}, +{0.5286028, -0.0247847, 0.2231781}, +{1.2187631, 0.1436504, 1.4614822}, +{1.2740831, 0.1819976, 1.5295373}, +{1.1568975, 0.2131247, 1.4389366}, +{1.0051129, 1.2612547, 1.5662069}, +{1.0915146, 1.2880193, 1.5975234}, +{1.0010662, 1.1673676, 1.5844046}, +{0.2042321, 1.5368656, 0.0582412}, +{0.1303654, 1.4786365, 0.0760013}, +{0.2607277, 1.4866562, -0.0004919}, +{2.4575563, 1.4216624, 2.4120052}, +{2.5123312, 1.3890325, 2.3406098}, +{2.4763966, 1.5154368, 2.4157133}, +{1.4432062, 2.5901921, 2.8509750}, +{1.4324530, 2.6228037, 2.9403236}, +{1.3556067, 2.5614119, 2.8252780}, +{2.2973249, 0.4159571, 0.0844466}, +{2.2322936, 0.3708718, 0.1383034}, +{2.3643932, 0.3498030, 0.0674820}, +{2.7554412, 2.5295804, 0.1667269}, +{2.8079121, 2.6085231, 0.1534155}, +{2.8152144, 2.4574771, 0.1469638}, +{0.4160990, 2.8594222, 1.3304537}, +{0.4418439, 2.8681152, 1.4222359}, +{0.3297206, 2.9004057, 1.3258225}, +{1.4411770, 3.1191816, 1.4182117}, +{1.3676486, 3.1798580, 1.4268303}, +{1.4224942, 3.0497778, 1.4814286}, +{1.2647716, 2.2072051, 1.9244591}, +{1.2094479, 2.2287891, 1.8493876}, +{1.2818084, 2.2914164, 1.9666549}, +{1.1737952, 0.6458455, 0.6616418}, +{1.1026356, 0.5847244, 0.6806897}, +{1.1506348, 0.6839190, 0.5769286}, +{2.6655991, 0.0104607, 0.6621353}, +{2.5722485, -0.0103464, 0.6660158}, +{2.6746926, 0.0653163, 0.5842220}, +{3.0565600, 0.1322491, 1.0274438}, +{3.0386632, 0.1682179, 0.9405630}, +{3.1520410, 0.1323506, 1.0342053}, +{1.3714759, 2.3501286, 1.4318610}, +{1.3286681, 2.2670243, 1.4524394}, +{1.2993164, 2.4116318, 1.4187200}, +{2.7049947, 3.0241776, 1.1863878}, +{2.7435629, 3.0765183, 1.1161363}, +{2.6612117, 2.9520252, 1.1412281}, +{0.8444524, 2.9721177, 2.0767226}, +{0.7639600, 3.0236494, 2.0819929}, +{0.9123399, 3.0359168, 2.0547390}, +{2.9652443, 0.3185920, 1.8087306}, +{2.9686358, 0.3986419, 1.8611026}, +{2.8774993, 0.2835847, 1.8241456}, +{2.8914852, 0.2340791, 0.5198098}, +{2.8445039, 0.2390226, 0.4365594}, +{2.9813170, 0.2118646, 0.4953339}, +{2.7703333, 1.2493916, 1.0068625}, +{2.7507780, 1.1626571, 0.9714078}, +{2.8630848, 1.2453831, 1.0301739}, +{0.1431016, 1.8039907, 0.0255609}, +{0.1469479, 1.7093764, 0.0395487}, +{0.0495395, 1.8239355, 0.0222948}, +{2.3800447, 2.8291817, 1.8892094}, +{2.4514453, 2.8870721, 1.8625081}, +{2.3031325, 2.8634391, 1.8436762}, +{0.8811609, 1.5040027, 1.8720562}, +{0.7942673, 1.5419599, 1.8851362}, +{0.9416233, 1.5710795, 1.9037944}, +{0.5695389, 2.1242199, 1.2213295}, +{0.5434146, 2.2137878, 1.2427169}, +{0.5677768, 2.1209488, 1.1256815}, +{0.4053916, 3.0292370, 0.1664358}, +{0.3900151, 2.9690521, 0.2392620}, +{0.3914557, 2.9760663, 0.0880714}, +{1.1927717, 0.4109417, 1.6167749}, +{1.1715277, 0.5040579, 1.6104204}, +{1.1161733, 0.3717045, 1.6586731}, +{1.5763763, 2.2710221, 1.8324944}, +{1.5159253, 2.2181172, 1.8845433}, +{1.5599326, 2.2442050, 1.7420911}, +{0.4093866, 0.7332158, 2.0414753}, +{0.3199112, 0.7018553, 2.0546281}, +{0.4299661, 0.7096633, 1.9510095}, +{1.7330390, 1.4889997, 2.4308240}, +{1.7038001, 1.4806265, 2.5215836}, +{1.8252559, 1.4634261, 2.4329128}, +{1.3913872, 2.3206732, 0.9283059}, +{1.3793780, 2.4088647, 0.8930874}, +{1.4671086, 2.3281789, 0.9863771}, +{1.2089198, 2.6746218, 1.9751054}, +{1.1329070, 2.6939475, 1.9202337}, +{1.2837166, 2.7061605, 1.9243799}, +{0.5890986, 3.0790772, 2.1627178}, +{0.4988248, 3.0729468, 2.1939487}, +{0.6232688, 3.1585555, 2.2036805}, +{1.2166541, 1.4912672, 0.8850375}, +{1.2144715, 1.5208808, 0.9760353}, +{1.2190043, 1.5719792, 0.8336335}, +{0.3929374, 2.4166908, 2.6296842}, +{0.3123853, 2.4540238, 2.5939081}, +{0.4532323, 2.4908166, 2.6353600}, +{0.3114639, 0.3101141, 1.7569084}, +{0.2428187, 0.3767878, 1.7547219}, +{0.3005972, 0.2673259, 1.8418402}, +{2.9132736, 0.1175474, 2.1263003}, +{2.9270849, 0.2017349, 2.1697059}, +{2.8611581, 0.0667908, 2.1885102}, +{1.9376403, 0.0624538, 1.1536620}, +{1.8661312, 0.1148099, 1.1898228}, +{1.9608933, 0.0018421, 1.2240030}, +{0.3572373, 2.3461428, 2.1686046}, +{0.2641458, 2.3638611, 2.1551011}, +{0.3880852, 2.4194338, 2.2218883}, +{2.8058197, 2.8201935, 0.1379955}, +{2.8558288, 2.8700640, 0.0733865}, +{2.7200096, 2.8625703, 0.1397703}, +{0.0032191, 1.3178412, 0.0583843}, +{-0.0870978, 1.3429438, 0.0390181}, +{-0.0045278, 1.2345899, 0.1049840}, +{1.4019784, 2.8491273, 1.0312332}, +{1.3509171, 2.9135497, 1.0802722}, +{1.4098608, 2.7745283, 1.0906905}, +{3.1384165, 2.2356179, 0.2998803}, +{3.1539919, 2.1424508, 0.2844008}, +{3.1248205, 2.2422488, 0.3943975}, +{0.1766917, 1.2759365, 2.4302580}, +{0.0926461, 1.2367078, 2.4065988}, +{0.2310107, 1.2650838, 2.3521941}, +{2.7852686, 2.3465152, 2.7968276}, +{2.8202999, 2.4299998, 2.7657561}, +{2.7227402, 2.3707168, 2.8651416}, +{1.3052348, 0.9984819, 1.3300224}, +{1.3659059, 0.9256989, 1.3435867}, +{1.3118399, 1.0504208, 1.4101539}, +{0.5665875, 2.5657904, 0.9616940}, +{0.6406052, 2.5906358, 0.9063188}, +{0.5641475, 2.6328723, 1.0299317}, +{1.3789604, 2.6117959, 0.8826749}, +{1.4035150, 2.6849251, 0.9393452}, +{1.3072896, 2.6459482, 0.8292029}, +{1.1231798, 1.2684706, 0.1009370}, +{1.0395811, 1.3081253, 0.1254540}, +{1.1890062, 1.3221244, 0.1451012}, +{1.3146839, 1.7803098, 1.4397310}, +{1.3783042, 1.8518236, 1.4404731}, +{1.2644501, 1.7937746, 1.3593719}, +{0.6181195, 2.8710861, 2.7558751}, +{0.6334758, 2.9515848, 2.7064135}, +{0.5837644, 2.9009070, 2.8400936}, +{3.0433786, 0.6095236, 1.9042455}, +{3.0348730, 0.6262254, 1.8103784}, +{3.0194321, 0.6924630, 1.9455968}, +{0.5922686, 3.0903454, 1.2564812}, +{0.6017589, 2.9993296, 1.2284031}, +{0.6819376, 3.1235635, 1.2607625}, +{0.5298051, 2.6297219, 2.9687405}, +{0.5872862, 2.6192214, 2.8929250}, +{0.5883953, 2.6238899, 3.0442090}, +{2.1229208, 1.3933673, 1.4613689}, +{2.1419914, 1.4868130, 1.4532112}, +{2.1617556, 1.3540833, 1.3831963}, +{1.6378314, 2.1083882, 1.5303661}, +{1.5590011, 2.1169774, 1.5839787}, +{1.6549770, 2.1970444, 1.4986101}, +{0.0548068, 2.4056787, 1.5874181}, +{0.0379649, 2.4017434, 1.6815627}, +{0.1311119, 2.3493812, 1.5743634}, +{2.0513301, 2.2948194, 1.1478559}, +{2.0418756, 2.3710799, 1.0907834}, +{2.0595169, 2.2207823, 1.0877410}, +{3.1074679, 3.1528280, 1.9838440}, +{3.1186411, 3.1784902, 1.8923076}, +{3.0371504, 3.2091913, 2.0161080}, +{2.0026777, 1.5648769, 0.3575563}, +{1.9471527, 1.5215871, 0.4224044}, +{1.9863432, 1.6582900, 0.3705752}, +{1.4013414, 2.4371281, 0.1836060}, +{1.3123887, 2.4201729, 0.2146258}, +{1.4299861, 2.5135546, 0.2336139}, +{1.9036753, 1.1610706, 2.8527877}, +{1.9788580, 1.1120363, 2.8860374}, +{1.9114486, 1.2473512, 2.8935008}, +{1.7981428, 0.9360223, 1.8231894}, +{1.8202807, 0.9817236, 1.7420498}, +{1.8813568, 0.9284521, 1.8698845}, +{0.8310211, 1.4211509, 0.4774362}, +{0.8531735, 1.5132346, 0.4635730}, +{0.8909097, 1.3922095, 0.5462699}, +{1.9773309, 2.8987200, 2.5548930}, +{2.0199487, 2.9813850, 2.5322545}, +{1.9870089, 2.8445482, 2.4765727}, +{1.7714078, 2.9690788, 1.8952646}, +{1.8290691, 3.0413752, 1.9199778}, +{1.7443531, 2.9304695, 1.9785693}, +{1.1576182, 2.2739072, 2.2139947}, +{1.0659511, 2.2577624, 2.1916602}, +{1.1612816, 2.3674429, 2.2339940}, +{0.1692386, 2.3199816, 0.6361234}, +{0.2083765, 2.3162665, 0.7233973}, +{0.2368806, 2.2851541, 0.5780378}, +{1.7325711, 1.2802182, 1.1576484}, +{1.7153682, 1.2263449, 1.0804211}, +{1.6458421, 1.2991191, 1.1934694}, +{1.5517442, 0.1593315, 2.3385732}, +{1.4970188, 0.1945993, 2.4087420}, +{1.5940538, 0.0827458, 2.3773913}, +{3.1173022, 0.7253851, 1.6355147}, +{3.0367050, 0.7665376, 1.6043234}, +{3.1262453, 0.6465754, 1.5819297}, +{0.4227195, 0.8869654, 0.5421873}, +{0.3435740, 0.9263561, 0.5054901}, +{0.4129204, 0.8972611, 0.6368461}, +{0.8747801, 2.7889309, 0.5650900}, +{0.8024612, 2.8513725, 0.5593132}, +{0.9395840, 2.8323987, 0.6205276}, +{2.6194429, 1.6346452, 2.8110599}, +{2.6785974, 1.5594525, 2.8140764}, +{2.6389561, 1.6836895, 2.8909111}, +{1.2411548, 1.5650493, 2.4847836}, +{1.2860081, 1.5052148, 2.5445359}, +{1.2874902, 1.6481947, 2.4948928}, +{1.2991892, 3.0846007, 2.6954081}, +{1.3083119, 3.1420801, 2.6194134}, +{1.2610611, 3.0041823, 2.6601741}, +{0.2147928, 2.6448722, 0.4935245}, +{0.1477649, 2.6989579, 0.5352894}, +{0.1669554, 2.5933731, 0.4285495}, +{0.1807212, 1.4711146, 2.0624981}, +{0.1996624, 1.3838311, 2.0969241}, +{0.1004509, 1.4598783, 2.0115793}, +{0.8235514, 2.7261529, 2.5010455}, +{0.7985476, 2.8084054, 2.5431366}, +{0.9074425, 2.7032983, 2.5410738}, +{0.1462753, 2.1703548, 2.4059911}, +{0.0925189, 2.1098361, 2.3549023}, +{0.2221738, 2.1184173, 2.4325285}, +{1.2438588, 0.1641193, 2.0756547}, +{1.2992885, 0.2133559, 2.0151103}, +{1.2083662, 0.2303828, 2.1349144}, +{-0.0114480, 3.0997064, 0.6763304}, +{0.0750117, 3.0791123, 0.6407929}, +{-0.0465917, 3.0151856, 0.7043211}, +{2.7170119, 3.1574018, 2.2839265}, +{2.6215694, 3.1514716, 2.2796988}, +{2.7443438, 3.0751519, 2.3245499}, +{0.6330915, 1.9843358, 1.8078895}, +{0.6253412, 1.8905246, 1.8252592}, +{0.5511634, 2.0074372, 1.7641123}, +{2.0534453, 2.9919622, 1.3376404}, +{2.0972829, 2.9280908, 1.3938632}, +{1.9891379, 3.0339858, 1.3947448}, +{2.5595756, 0.1709327, 0.4758185}, +{2.4666584, 0.1480486, 0.4780633}, +{2.5609996, 0.2662174, 0.4848249}, +{0.0548360, 0.8625047, 0.9712372}, +{0.0126623, 0.8162499, 1.0436540}, +{0.1467003, 0.8691212, 0.9973043}, +{2.0341542, 2.4806106, 1.5604465}, +{1.9761295, 2.5296988, 1.5022588}, +{2.1108520, 2.4608510, 1.5066942}, +{1.0047096, 1.9007962, 1.0972116}, +{1.0000507, 1.8166556, 1.0518136}, +{1.0021937, 1.8780367, 1.1901524}, +{1.2617978, 1.1951837, 1.0913249}, +{1.3421923, 1.2399727, 1.1176497}, +{1.2454977, 1.1320611, 1.1614118}, +{0.7996933, 0.6517515, 2.0310485}, +{0.7762187, 0.6758864, 2.1206517}, +{0.8901224, 0.6210238, 2.0374298}, +{1.4593360, 1.7534411, 0.7454903}, +{1.5247875, 1.8225824, 0.7553853}, +{1.3933765, 1.7732067, 0.8119807}, +{1.1051767, 1.6330658, 1.5852716}, +{1.0175937, 1.6681831, 1.6013439}, +{1.1637462, 1.7074854, 1.5991877}, +{0.2079048, 2.9066741, 2.8539057}, +{0.1214557, 2.9459078, 2.8661365}, +{0.2533523, 2.9225912, 2.9366310}, +{2.1865406, 0.9325101, 0.2444057}, +{2.2764936, 0.9637669, 0.2540906}, +{2.1949701, 0.8493636, 0.1977375}, +{0.6729921, 1.0627122, 0.4464383}, +{0.6852199, 1.1570420, 0.4357299}, +{0.5797288, 1.0526611, 0.4654973}, +{0.7959678, 2.5415034, 1.3142992}, +{0.8250527, 2.4539328, 1.3397503}, +{0.8019554, 2.5930488, 1.3947327}, +{3.0055635, 0.3503016, 2.6268432}, +{2.9678719, 0.2925328, 2.5604773}, +{3.0900195, 0.3767663, 2.5903862}, +{2.4326243, 1.5049781, 1.4991169}, +{2.4792805, 1.4943874, 1.4162111}, +{2.4823234, 1.4520557, 1.5614991}, +{1.4261579, 0.5553307, 0.4757133}, +{1.5077444, 0.6050994, 0.4703242}, +{1.3696491, 0.6080198, 0.5322192}, +{2.7218502, 2.5943851, 0.8363311}, +{2.7340646, 2.5221584, 0.7747159}, +{2.8107097, 2.6211266, 0.8598078}, +{1.0416488, 2.5242288, 1.5851345}, +{1.0038087, 2.6118450, 1.5777966}, +{1.0884750, 2.5113771, 1.5026455}, +{2.0134747, 2.3873849, 2.3839467}, +{2.0232134, 2.3633554, 2.2918053}, +{2.0721650, 2.3278441, 2.4305587}, +{2.8217449, 0.2776686, 0.2574855}, +{2.8106289, 0.3073173, 0.1671544}, +{2.7752514, 0.1940790, 0.2611510}, +{0.8787520, 2.3601768, 1.9094853}, +{0.9504912, 2.3195858, 1.8608213}, +{0.9217461, 2.4063137, 1.9814937}, +{2.3661065, 2.0172884, 0.2111986}, +{2.4206848, 2.0699897, 0.2695605}, +{2.4251144, 1.9497740, 0.1776995}, +{0.3128650, 0.8508489, 1.0299500}, +{0.3612798, 0.8952302, 0.9603179}, +{0.3683545, 0.8601558, 1.1073878}, +{3.2687302, 0.6668844, 2.1616092}, +{3.2372091, 0.6135276, 2.2345598}, +{3.1936915, 0.7211916, 2.1374800}, +{3.0712218, 2.9063923, 3.0557213}, +{3.0603147, 3.0011432, 3.0638208}, +{3.1379335, 2.8843198, 3.1207190}, +{0.4015963, 1.2436870, 2.7785566}, +{0.4394538, 1.3002465, 2.8458631}, +{0.3104078, 1.2720333, 2.7719645}, +{1.7099200, 3.0845571, 0.2950869}, +{1.6771821, 2.9974043, 0.3173337}, +{1.6327249, 3.1409829, 0.2994852}, +{1.8933726, 2.8122535, 1.1608722}, +{1.8259989, 2.8493307, 1.1038777}, +{1.9202006, 2.8851507, 1.2168060}, +{1.8764712, 3.0338345, 0.5885882}, +{1.8749711, 3.0441291, 0.6837412}, +{1.8259276, 3.1081526, 0.5556570}, +{3.0098042, 1.4475008, 1.2419705}, +{2.9584754, 1.4286509, 1.3205347}, +{3.0155330, 1.3635283, 1.1963844}, +{2.6959419, 1.1972355, 1.2646970}, +{2.7069669, 1.1037581, 1.2820961}, +{2.7152138, 1.2066711, 1.1714131}, +{2.1227133, 2.5236011, 1.0088490}, +{2.2078486, 2.5662785, 0.9992088}, +{2.0977602, 2.5401940, 1.0997574}, +{1.3572713, 2.9221723, 1.6777587}, +{1.4286047, 2.9761715, 1.7117875}, +{1.2784710, 2.9744353, 1.6926379}, +{1.1480206, 1.5168741, 3.0389962}, +{1.1847718, 1.5075214, 3.1268838}, +{1.2044740, 1.4629923, 2.9835699}, +{2.3853214, 1.1214042, 1.6141469}, +{2.3935120, 1.0271659, 1.6287885}, +{2.3611999, 1.1292961, 1.5218530}, +{0.6311027, 0.1016174, 1.6243318}, +{0.5470228, 0.0855912, 1.5814829}, +{0.6106121, 0.1021853, 1.7178313}, +{2.7464151, 0.0516883, 0.9582975}, +{2.7487745, 0.0281757, 0.8655403}, +{2.8382161, 0.0514651, 0.9854056}, +{1.7304622, 3.1443882, 3.0445254}, +{1.7831426, 3.0679910, 3.0679896}, +{1.6914004, 3.1215546, 2.9601741}, +{0.7906733, 2.6265807, 0.8248448}, +{0.8177398, 2.6642723, 0.7411246}, +{0.8717912, 2.6191671, 0.8751165}, +{2.2210987, 1.6855260, 1.5843459}, +{2.2454548, 1.7748140, 1.6087747}, +{2.3038921, 1.6437551, 1.5606239}, +{1.3751395, 0.1810687, 2.5738945}, +{1.4360177, 0.1949804, 2.6464384}, +{1.3102928, 0.2508413, 2.5833299}, +{0.5880298, 0.0840732, 2.8679204}, +{0.6656166, 0.0619070, 2.9194109}, +{0.5998398, 0.0370806, 2.7853703}, +{0.3778510, 0.8465574, 1.3659148}, +{0.4621186, 0.8020369, 1.3570145}, +{0.3965478, 0.9223754, 1.4212717}, +{1.8169478, 2.4084704, 2.6322603}, +{1.8763278, 2.3982539, 2.5578833}, +{1.7327039, 2.4309149, 2.5927443}, +{1.5286326, 0.6991237, 0.9306894}, +{1.4654825, 0.6483302, 0.9816247}, +{1.4761937, 0.7672477, 0.8885992}, +{2.1650550, 2.2553799, 2.5896070}, +{2.2285602, 2.2476246, 2.5184083}, +{2.2146561, 2.2333372, 2.6684496}, +{2.2807362, 0.2346284, 1.2236534}, +{2.2768052, 0.1389937, 1.2245854}, +{2.2373331, 0.2595900, 1.1420728}, +{2.8195858, 0.9742986, 0.5854561}, +{2.8545740, 0.9761347, 0.4963787}, +{2.7532520, 0.9053121, 0.5837166}, +{0.3833745, 1.5915126, 0.5271609}, +{0.3588574, 1.6840245, 0.5288239}, +{0.4238288, 1.5789949, 0.4413176}, +{1.5773510, 2.7054133, 2.4832747}, +{1.6160283, 2.7219584, 2.5692553}, +{1.5794832, 2.6101697, 2.4739790}, +{1.9801409, 2.0747538, 0.9456382}, +{2.0582950, 2.0198128, 0.9516192}, +{1.9082919, 2.0171092, 0.9716601}, +{1.9932305, 2.0158625, 2.5114071}, +{2.0551198, 1.9690993, 2.4553247}, +{1.9353523, 2.0615161, 2.4503484}, +{3.1968195, 2.9231851, 1.6820378}, +{3.1059105, 2.9434977, 1.7040669}, +{3.1981800, 2.8280821, 1.6712724}, +{0.7788540, 0.7438078, 2.2681112}, +{0.8656738, 0.7805763, 2.2846253}, +{0.7445127, 0.7234683, 2.3551130}, +{0.3270538, 0.2149194, 1.3401216}, +{0.3678668, 0.2812125, 1.3958158}, +{0.3846343, 0.1387992, 1.3473684}, +{0.6344126, 3.1155276, 0.6873341}, +{0.6744579, 3.0585084, 0.7529656}, +{0.6638072, 3.0798850, 0.6035017}, +{1.7117327, 1.6924006, 0.5228162}, +{1.6474893, 1.7582760, 0.4964434}, +{1.7961580, 1.7298888, 0.4977297}, +{1.8567181, 0.0392962, 1.4579177}, +{1.9301559, 0.0872095, 1.4963043}, +{1.7790179, 0.0790635, 1.4972058}, +{1.9086214, 0.6294294, 1.1288141}, +{1.9087464, 0.7080273, 1.0741819}, +{1.8361641, 0.5768396, 1.0949532}, +{2.9234691, 1.3960860, 1.7451727}, +{2.9271364, 1.3906947, 1.6496750}, +{2.9322729, 1.3054395, 1.7746350}, +{2.5961757, 1.2563353, 2.8420835}, +{2.6273327, 1.1874938, 2.9008408}, +{2.6523974, 1.2492404, 2.7649403}, +{1.6142764, 2.0226736, 0.6866920}, +{1.6081376, 2.0269959, 0.5912669}, +{1.7064383, 2.0403221, 0.7055877}, +{3.0252733, 0.9035360, 2.1366932}, +{3.0901032, 0.9705459, 2.1150351}, +{2.9422460, 0.9509875, 2.1408343}, +{0.3319494, 2.7116714, 0.8738325}, +{0.3984171, 2.6437242, 0.8851265}, +{0.3495027, 2.7481673, 0.7871016}, +{1.0411624, 1.9672332, 2.8940678}, +{1.0226711, 1.9455589, 2.9854495}, +{1.0067858, 1.8929725, 2.8444099}, +{1.7266785, 1.2201580, 0.6559714}, +{1.7772967, 1.1410348, 0.6375423}, +{1.7925657, 1.2887030, 0.6670520}, +{1.6122648, 1.4786710, 1.4660317}, +{1.5936929, 1.4748776, 1.5598561}, +{1.6282101, 1.3876483, 1.4410727}, +{1.3454726, 0.4086000, 2.8940857}, +{1.3438760, 0.4810199, 2.9566567}, +{1.4329889, 0.4122240, 2.8554842}, +{1.4343236, 0.1044375, 1.1542399}, +{1.4511993, 0.0542683, 1.2339931}, +{1.3702918, 0.0520548, 1.1060910}, +{0.8520996, 1.4602600, 3.0048344}, +{0.9402733, 1.4945160, 3.0194719}, +{0.8466719, 1.3831707, 3.0613153}, +{0.6967915, 1.3418691, 2.1728470}, +{0.7880154, 1.3524149, 2.1458414}, +{0.6680800, 1.4303742, 2.1953154}, +{1.0052803, 1.2998366, 1.0771683}, +{1.0993463, 1.2829878, 1.0716901}, +{0.9988962, 1.3907951, 1.1062909}, +{1.0115093, 0.9496256, 3.0949585}, +{0.9555437, 0.8916498, 3.0432966}, +{1.0977333, 0.9081325, 3.0924931}, +{1.3767744, 2.0419605, 0.9587992}, +{1.4278080, 2.1229284, 0.9602434}, +{1.3064364, 2.0590961, 0.8961793}, +{1.4703686, 1.6017699, 1.2091622}, +{1.4902636, 1.5690289, 1.2968807}, +{1.3759071, 1.5894221, 1.1998417}, +{2.7590122, 1.1621137, 2.6325266}, +{2.6903048, 1.1850734, 2.5699611}, +{2.8235521, 1.2322922, 2.6240475}, +{2.2294898, 1.9993744, 0.9583678}, +{2.2312427, 2.0027003, 1.0540140}, +{2.3051903, 1.9457094, 0.9348770}, +{2.8789351, 2.0091159, 2.5091674}, +{2.9500446, 2.0648346, 2.5408087}, +{2.8025765, 2.0365949, 2.5599277}, +{0.5827035, 1.7015691, 1.8197843}, +{0.5567152, 1.6421258, 1.7494037}, +{0.5377286, 1.6679941, 1.8973233}, +{1.0069047, 2.5266273, 2.1008394}, +{0.9363064, 2.5817082, 2.1346667}, +{1.0701628, 2.5885010, 2.0643375}, +{3.1180861, 0.1087189, 0.3535311}, +{3.0665042, 0.0533218, 0.2949410}, +{3.1946742, 0.0556394, 0.3754203}, +{0.5493382, 1.4513609, 2.8746886}, +{0.6443306, 1.4460784, 2.8852177}, +{0.5364450, 1.4670707, 2.7811511}, +{1.4356462, 0.3477229, 0.1550310}, +{1.4349927, 0.2701838, 0.0989098}, +{1.5238546, 0.3835943, 0.1452937}, +{1.1569337, 2.1085799, 0.8135269}, +{1.1715567, 2.0675759, 0.7282792}, +{1.1338508, 2.1991546, 0.7928945}, +{0.0195547, 3.0829549, 1.4680568}, +{0.0578572, 3.0378070, 1.3928443}, +{0.0453315, 3.0299537, 1.5434806}, +{1.8353071, 0.3216239, 1.8446139}, +{1.8179893, 0.2730236, 1.9252391}, +{1.9288611, 0.3415372, 1.8482770}, +{1.6484077, 0.6708111, 2.4929168}, +{1.6130813, 0.6675719, 2.5818205}, +{1.6716806, 0.5801089, 2.4730723}, +{2.8151016, 1.8968704, 1.3717885}, +{2.9079685, 1.8750560, 1.3639020}, +{2.7726941, 1.8137376, 1.3930688}, +{0.2040334, 2.0451298, 0.1868566}, +{0.1912639, 1.9994447, 0.2699957}, +{0.1594761, 1.9902769, 0.1222956}, +{0.0877642, 2.6547077, 1.3253226}, +{0.0135259, 2.5946047, 1.3315399}, +{0.1619498, 2.6047463, 1.3594205}, +{2.0650411, 1.0560287, 1.6615973}, +{2.0590000, 1.1335702, 1.7173928}, +{2.0403416, 1.0871904, 1.5745270}, +{0.3421816, 1.6829609, 1.2657359}, +{0.3397636, 1.5993085, 1.2192736}, +{0.3218082, 1.7481857, 1.1987064}, +{1.6759671, 2.6849034, 2.7521308}, +{1.7246289, 2.6391742, 2.8207104}, +{1.5846269, 2.6606596, 2.7673466}, +{1.4172475, 1.7850177, 2.4779270}, +{1.5017433, 1.7889298, 2.4331222}, +{1.4027654, 1.8741878, 2.5095701}, +{2.8529930, 0.7123784, 1.6128566}, +{2.8733006, 0.6209643, 1.5930231}, +{2.7597127, 0.7210023, 1.5931913}, +{2.4085989, 2.2848930, 1.7963345}, +{2.4077091, 2.2641983, 1.8897864}, +{2.4073508, 2.3805458, 1.7929723}, +{0.1691906, 1.2075392, 3.0270104}, +{0.1131272, 1.2801927, 3.0542257}, +{0.2401168, 1.2066383, 3.0912831}, +{1.9907514, 2.5226767, 2.8208237}, +{1.9473301, 2.4663346, 2.7567730}, +{1.9210324, 2.5486188, 2.8810613}, +{1.1102935, 0.8198916, 1.3983347}, +{1.0749289, 0.7895742, 1.3147135}, +{1.1656434, 0.8945083, 1.3752903}, +{1.7714801, 1.8464882, 2.4046018}, +{1.7744614, 1.9392034, 2.4282095}, +{1.8565464, 1.8293086, 2.3642173}, +{0.5937610, 2.2037556, 0.4178426}, +{0.5713465, 2.2714210, 0.3539575}, +{0.5372356, 2.2220151, 0.4929012}, +{2.4509909, 2.2759018, 0.0596903}, +{2.4833527, 2.3638136, 0.0793514}, +{2.5104091, 2.2174301, 0.1067315}, +{2.4632604, 1.6853720, 1.8060201}, +{2.4957321, 1.6907532, 1.8959032}, +{2.4611321, 1.7761866, 1.7758455}, +{1.0052195, 0.8856758, 2.3673074}, +{1.0746095, 0.9312521, 2.3196614}, +{1.0404482, 0.8739728, 2.4555361}, +{1.1241881, 2.6061280, 0.0940612}, +{1.1125401, 2.6648810, 0.0193971}, +{1.0731555, 2.6463270, 0.1643607}, +{2.8064442, 2.3263919, 1.5736471}, +{2.7479289, 2.2527969, 1.5915937}, +{2.8653142, 2.2941003, 1.5054277}, +{2.8880889, 2.1751945, 1.3495091}, +{2.8279512, 2.2157385, 1.2870438}, +{2.8373785, 2.1042574, 1.3889893}, +{3.0745859, 1.5778222, 2.2226985}, +{2.9883964, 1.6001749, 2.2578270}, +{3.0654528, 1.5887885, 2.1280484}, +{1.0401490, 3.0955343, 1.3439633}, +{1.1133231, 3.1363659, 1.3902305}, +{0.9675715, 3.0988345, 1.4062847}, +{1.4736553, 0.8086180, 1.2154341}, +{1.5341075, 0.7913892, 1.1432465}, +{1.3930255, 0.7634901, 1.1904417}, +{1.0647640, 0.3411834, 0.7416006}, +{1.0111769, 0.3909458, 0.8033618}, +{1.0148275, 0.3426734, 0.6599523}, +{1.9401685, 0.6938528, 0.0066064}, +{1.9616201, 0.7865027, -0.0042626}, +{1.8606277, 0.6814493, -0.0451789}, +{2.1122453, 1.7291778, 1.8367143}, +{2.0371990, 1.6859997, 1.7958971}, +{2.1870558, 1.7029707, 1.7830590}, +{0.6342242, 0.8106606, 0.3574771}, +{0.6651949, 0.9012294, 0.3568276}, +{0.5559902, 0.8124952, 0.4125988}, +{0.3853418, 0.4006839, 2.7118683}, +{0.2933022, 0.4231032, 2.7255940}, +{0.3946557, 0.3948757, 2.6167798}, +{2.1416111, 2.7216964, 2.6807227}, +{2.0832665, 2.7863660, 2.6410227}, +{2.0837512, 2.6660483, 2.7328556}, +{0.8238381, 0.8551059, 1.3287103}, +{0.8435801, 0.9477627, 1.3150253}, +{0.7827186, 0.8518817, 1.4150881}, +{2.7235484, 1.3001494, 0.1851126}, +{2.6506553, 1.2466738, 0.1536602}, +{2.7747400, 1.3194400, 0.1065657}, +{0.2224002, 0.4548645, 0.5684708}, +{0.1832067, 0.4332103, 0.4838701}, +{0.3102792, 0.4860598, 0.5468731}, +{0.1678381, 1.3936555, 2.6686006}, +{0.1883233, 1.3333976, 2.5971048}, +{0.1705749, 1.4804389, 2.6283085}, +{2.9617453, 1.8685772, 2.0764592}, +{2.8807852, 1.8229932, 2.0534396}, +{3.0307336, 1.8180844, 2.0334082}, +{1.9212809, 1.2865047, 2.3329756}, +{1.9000707, 1.2352325, 2.4109731}, +{2.0166340, 1.2815305, 2.3262422}, +{2.3672991, 1.9698034, 2.4855709}, +{2.3004782, 1.9742545, 2.5539629}, +{2.3981352, 2.0599461, 2.4763103}, +{1.8650005, 2.9426861, 1.6273446}, +{1.8590415, 3.0276165, 1.5835993}, +{1.8415294, 2.9609120, 1.7183350}, +{0.7784527, 2.2812283, 0.7951221}, +{0.8010033, 2.1884971, 0.8025208}, +{0.7789437, 2.3132672, 0.8853195}, +{0.7716025, 1.4065443, 2.6228643}, +{0.8182636, 1.4625220, 2.5608032}, +{0.6825707, 1.4416565, 2.6245365}, +{2.4861620, 0.5523419, 1.5188867}, +{2.5047450, 0.5098403, 1.6026159}, +{2.4733019, 0.4799409, 1.4576083}, +{2.6230867, 0.7726538, 0.6503510}, +{2.5630689, 0.8467495, 0.6587193}, +{2.5897546, 0.7077196, 0.7122770}, +{1.6573763, 1.5258136, 2.0180345}, +{1.6187967, 1.5473584, 2.1029446}, +{1.7272662, 1.4637092, 2.0385470}, +{0.8124207, 0.9129960, 2.8729720}, +{0.7659423, 0.8308271, 2.8887944}, +{0.7509397, 0.9809828, 2.9005434}, +{3.1470082, 1.1630429, 2.0729537}, +{3.1972566, 1.1060173, 2.0147684}, +{3.1135051, 1.2320911, 2.0157504}, +{-0.0113219, 0.1338957, 1.7308491}, +{0.0405767, 0.1928974, 1.6761897}, +{-0.0879223, 0.1855693, 1.7558399}, +{2.5465775, 0.5641143, 0.8054407}, +{2.4594133, 0.5257691, 0.7957263}, +{2.6034977, 0.4896210, 0.8247582}, +{0.1363115, 2.9111912, 1.2885181}, +{0.1627293, 2.9066296, 1.1966289}, +{0.1138221, 2.8210280, 1.3114780}, +{1.4033453, 2.9274018, 0.3716766}, +{1.3240182, 2.9151552, 0.4238260}, +{1.4427241, 2.8402743, 0.3671547}, +{0.9571599, 2.9728811, 2.3470871}, +{0.8974989, 2.9911551, 2.2744997}, +{1.0015987, 3.0561333, 2.3631051}, +{0.1368403, 2.0247195, 0.7244007}, +{0.2027807, 1.9570136, 0.7092317}, +{0.1707193, 2.0749781, 0.7984858}, +{0.1545013, 0.9651616, 1.9842064}, +{0.2061592, 1.0056378, 1.9145253}, +{0.1423651, 0.8746471, 1.9555329}, +{0.9423909, 1.4345020, 0.7427008}, +{1.0276569, 1.4706254, 0.7669313}, +{0.9361935, 1.3526446, 0.7919275}, +{0.0657699, 0.9486246, 0.2080219}, +{0.1368574, 1.0125556, 0.2033620}, +{0.0344767, 0.9541414, 0.2983138}, +{0.8916632, 1.2025680, 1.9229212}, +{0.9767700, 1.1824419, 1.8840100}, +{0.8843075, 1.2977889, 1.9165003}, +{2.7458506, 2.6529832, 2.7430913}, +{2.7756460, 2.6425157, 2.8334518}, +{2.7145476, 2.7433238, 2.7385068}, +{1.3121479, 0.6154935, 1.1112006}, +{1.3026097, 0.5302228, 1.1536298}, +{1.2223692, 0.6464320, 1.0991621}, +{2.8303406, 2.5877242, 1.2390387}, +{2.9257166, 2.5829055, 1.2455583}, +{2.8017883, 2.6159337, 1.3259370}, +{0.6000233, 1.8206260, 1.4252410}, +{0.5373207, 1.7486693, 1.4179652}, +{0.5462019, 1.8997148, 1.4219928}, +{1.2275105, 1.2209017, 0.8219629}, +{1.2165964, 1.3150317, 0.8084446}, +{1.2387114, 1.2114289, 0.9165521}, +{1.9253128, 0.4222677, 0.8271068}, +{1.9651443, 0.4682186, 0.7531860}, +{1.8692843, 0.4878075, 0.8686720}, +{1.6786568, 0.4025358, 2.4040346}, +{1.7537798, 0.3906794, 2.3459117}, +{1.6192174, 0.3310552, 2.3812354}, +{1.8612810, 0.2029788, 0.0012669}, +{1.8265940, 0.1380947, -0.0599637}, +{1.7840691, 0.2502298, 0.0323791}, +{2.9324153, 0.1620452, 1.4484571}, +{3.0147612, 0.1424477, 1.4931493}, +{2.9067509, 0.0791346, 1.4080901}, +{-0.0635180, 1.9188501, 1.3861413}, +{0.0025801, 1.8640891, 1.4285041}, +{-0.0577561, 2.0028679, 1.4316397}, +{0.2611843, 0.1074089, 0.4061440}, +{0.2940608, 0.1703344, 0.3419425}, +{0.3167955, 0.1203108, 0.4829767}, +{1.6337602, 1.1785666, 2.4895229}, +{1.6433702, 1.0909433, 2.4522114}, +{1.6154366, 1.2347765, 2.4142435}, +{1.1488066, 0.7782422, 2.0664234}, +{1.1031840, 0.8595939, 2.0449107}, +{1.1662766, 0.7846867, 2.1603148}, +{0.2427065, 1.3996728, 0.6616291}, +{0.1606280, 1.4115552, 0.6138353}, +{0.2976444, 1.4728110, 0.6334342}, +{1.9056511, 0.9819774, 0.7092524}, +{1.9774923, 1.0338727, 0.7454190}, +{1.9233923, 0.9787543, 0.6152461}, +{0.8114303, 0.9693785, 2.0592899}, +{0.8158681, 0.9011946, 1.9922558}, +{0.8417076, 1.0486016, 2.0149128}, +{-0.0095149, 1.0161350, 1.6050442}, +{0.0370743, 1.0306236, 1.5226922}, +{-0.0216685, 0.9212861, 1.6093205}, +{3.0591121, 2.1600492, 2.6506753}, +{3.0964267, 2.1413894, 2.7368250}, +{3.1304429, 2.2015145, 2.6021485}, +{1.0368833, 0.9855292, 2.7150295}, +{0.9546423, 0.9458805, 2.7437818}, +{1.0255550, 1.0790707, 2.7318811}, +{0.7766560, 2.9270952, 1.0572725}, +{0.8344874, 2.8631244, 1.0988127}, +{0.8057033, 3.0115523, 1.0917051}, +{1.9196419, 1.4821545, 1.1717540}, +{1.9718955, 1.4070935, 1.1999983}, +{1.8530268, 1.4446487, 1.1141514}, +{2.8695648, 2.6644447, 2.0374599}, +{2.8968818, 2.5760641, 2.0620563}, +{2.9169180, 2.7217915, 2.0977204}, +{2.7697909, 0.7054818, 1.9846574}, +{2.8278015, 0.6905421, 2.0593159}, +{2.7346494, 0.6188927, 1.9639279}, +{2.9882205, 1.6046449, 1.9461987}, +{3.0634844, 1.5522277, 1.9188106}, +{2.9244194, 1.5936081, 1.8757009}, +{0.4467179, 1.8339388, 3.1407397}, +{0.4521850, 1.8137131, 3.0473409}, +{0.3543213, 1.8216805, 3.1625323}, +{0.7677504, 1.6703570, 1.2745169}, +{0.7076899, 1.7230421, 1.3272364}, +{0.7388923, 1.5801394, 1.2883123}, +{2.7283170, 0.4669456, 2.7140481}, +{2.8201253, 0.4778503, 2.6892562}, +{2.7210655, 0.5106573, 2.7988951}, +{0.8607193, 2.7214639, 2.2498615}, +{0.8865188, 2.8093708, 2.2221284}, +{0.8447740, 2.7297256, 2.3438818}, +{1.9233046, 2.1076286, 0.6769425}, +{1.9993286, 2.0742846, 0.6292890}, +{1.9505978, 2.1074941, 0.7686888}, +{1.8795335, 1.5941333, 1.7022258}, +{1.8030465, 1.5479206, 1.7365251}, +{1.8755367, 1.5801402, 1.6076184}, +{1.9874325, 0.5273531, 1.6761723}, +{1.9814804, 0.6103491, 1.7234856}, +{2.0235782, 0.4659078, 1.7400494}, +{2.5604455, 1.7279090, 0.3944272}, +{2.4833403, 1.6712996, 0.3908980}, +{2.5671341, 1.7647883, 0.3063505}, +{1.2008839, 1.7612042, 2.1921813}, +{1.2187626, 1.8362577, 2.2488351}, +{1.2044465, 1.6855886, 2.2507639}, +{1.7749706, 2.1513369, 0.3021400}, +{1.6888816, 2.1884839, 0.2828760}, +{1.7560900, 2.0710893, 0.3507832}, +{0.0100695, 1.5538683, 1.0180876}, +{0.0330222, 1.6369233, 1.0597693}, +{-0.0685642, 1.5248090, 1.0642894}, +{0.8448004, 1.6865317, 2.8273821}, +{0.8519493, 1.6118132, 2.8867822}, +{0.8981603, 1.6621836, 2.7517369}, +{0.3982638, 0.6717119, 1.7753555}, +{0.3508439, 0.6356474, 1.7004353}, +{0.4607366, 0.6032767, 1.7993574}, +{1.0701768, 3.1833744, 2.8914468}, +{1.1120536, 3.1903751, 2.8056586}, +{1.1380969, 3.2098401, 2.9534852}, +{0.7225079, 0.6344430, 2.8513114}, +{0.7014872, 0.5462061, 2.8818843}, +{0.8162239, 0.6314297, 2.8320615}, +{0.0430516, 1.1721973, 2.7855878}, +{0.0843243, 1.2476416, 2.7435513}, +{0.0912546, 1.1611001, 2.8675368}, +{0.1643637, 1.1773787, 0.9241777}, +{0.1358725, 1.2487305, 0.8670858}, +{0.1844909, 1.1054175, 0.8643546}, +{0.2421942, 2.2270110, 1.6116085}, +{0.2600811, 2.1345279, 1.5946015}, +{0.3203130, 2.2585530, 1.6570495}, +{3.0569668, 2.4979150, 1.3805816}, +{2.9852016, 2.5234590, 1.4385436}, +{3.1149578, 2.4455733, 1.4358962}, +{2.2990107, 0.4131403, 2.9083548}, +{2.2151895, 0.4442775, 2.9425130}, +{2.3646326, 0.4645110, 2.9554410}, +{0.5438548, 0.9492766, 2.1264880}, +{0.6382870, 0.9382914, 2.1153436}, +{0.5057713, 0.8710152, 2.0866494}, +{2.5000832, 2.5158784, 0.1953517}, +{2.4683127, 2.6040337, 0.2148860}, +{2.5952880, 2.5250301, 0.1915289}, +{3.1166093, 1.7730014, 2.5394711}, +{3.0660226, 1.7766295, 2.6206508}, +{3.1246512, 1.6795423, 2.5204179}, +{0.6419087, 3.1287403, 2.6241665}, +{0.6084338, 3.1440952, 2.5358152}, +{0.7303003, 3.1654539, 2.6230059}, +{1.9597113, 1.8166590, 0.7783146}, +{1.9125922, 1.7423058, 0.8159140}, +{1.9371998, 1.8904268, 0.8350056}, +{0.2565176, 1.9606136, 2.0379341}, +{0.2441518, 1.8879259, 2.0989742}, +{0.3304879, 2.0096669, 2.0737739}, +{2.9051578, 0.4356207, 1.5685185}, +{2.9412236, 0.4062150, 1.4848713}, +{2.9518826, 0.3840150, 1.6342144}, +{2.6765954, 0.9000398, 1.2174791}, +{2.5811477, 0.8940651, 1.2215232}, +{2.6997609, 0.8577231, 1.1348052}, +{2.5382242, 2.1180766, 0.4009356}, +{2.5484979, 2.0859706, 0.4905233}, +{2.5327988, 2.2132061, 0.4100592}, +{0.7197660, 1.9922315, 0.7275286}, +{0.7088963, 1.9742284, 0.6341474}, +{0.6308909, 2.0080035, 0.7593842}, +{1.9609220, 3.2160480, 0.3154204}, +{1.8752587, 3.1806912, 0.2914618}, +{1.9763113, 3.1835041, 0.4041130}, +{2.6568368, 2.0510352, 3.0470574}, +{2.6461923, 2.1267643, 2.9894893}, +{2.6595795, 2.0881777, 3.1352346}, +{0.3112301, 2.2767274, 0.2865615}, +{0.2872103, 2.1935148, 0.2458058}, +{0.2329145, 2.3310900, 0.2779759}, +{1.8349693, 2.1348836, 2.3291638}, +{1.8336599, 2.1020980, 2.2392430}, +{1.7523602, 2.1823134, 2.3385694}, +{1.0871907, 2.2986407, 1.7408888}, +{1.0759281, 2.2480645, 1.6604059}, +{1.0899495, 2.3897677, 1.7117236}, +{2.1745789, 1.9545420, 2.0102098}, +{2.1424465, 1.9636211, 1.9205025}, +{2.1875739, 1.8603928, 2.0215833}, +{1.0341231, 0.0361474, 1.9128816}, +{0.9838279, 0.1172760, 1.9057497}, +{1.1186494, 0.0634270, 1.9485670}, +{1.7447501, 2.5821242, 0.5457462}, +{1.7939770, 2.5058930, 0.5152858}, +{1.7929615, 2.6126182, 0.6226105}, +{2.2543948, 0.9484131, 2.5884135}, +{2.2959268, 0.9240012, 2.5057004}, +{2.2145505, 0.8673350, 2.6200538}, +{2.9911334, 0.1536013, 0.7670333}, +{3.0556231, 0.0880508, 0.7404527}, +{2.9474194, 0.1785806, 0.6856242}, +{0.9890648, 0.1425652, 0.9406300}, +{1.0179802, 0.1835793, 0.8591189}, +{0.9537708, 0.2147985, 0.9925819}, +{1.4208969, 0.7138847, 2.3057656}, +{1.5102980, 0.7041913, 2.3385649}, +{1.4316294, 0.7431352, 2.2152586}, +{2.6808448, 2.9019826, 2.3981082}, +{2.6196704, 2.8394527, 2.3592489}, +{2.7663434, 2.8595791, 2.3907421}, +{2.9331214, 2.6559207, 2.9693475}, +{2.9813564, 2.7345364, 2.9949460}, +{3.0010905, 2.5922973, 2.9471080}, +{0.6846479, 2.8282986, 0.0989395}, +{0.7656561, 2.8722341, 0.1248174}, +{0.7125992, 2.7412167, 0.0706949}, +{0.6471792, 2.0636654, 0.1676496}, +{0.6151719, 2.1379831, 0.2187839}, +{0.5975092, 2.0676570, 0.0859227}, +{2.8259048, 1.3420453, 1.4605020}, +{2.7576725, 1.3411431, 1.5276277}, +{2.7991333, 1.2744625, 1.3982271}, +{1.1507398, 0.3174069, 2.3144486}, +{1.0659384, 0.3593313, 2.2998414}, +{1.2148813, 0.3859702, 2.2958133}, +{2.2242482, 2.8197093, 0.7125854}, +{2.1659050, 2.8254282, 0.7882538}, +{2.2842941, 2.7483022, 0.7339818}, +{0.9564861, 0.9928752, 1.5636003}, +{0.9705215, 0.9455887, 1.4815679}, +{0.8613610, 0.9950163, 1.5740383}, +{1.3359084, 2.8160994, 2.1822035}, +{1.3190620, 2.9102933, 2.1797481}, +{1.2988122, 2.7829933, 2.1004100}, +{1.9299790, 0.8758406, 1.3003237}, +{1.9262279, 0.7861898, 1.2669921}, +{1.9727029, 0.9255584, 1.2305733}, +{0.2684532, 1.4222771, 1.1195776}, +{0.1966105, 1.4209894, 1.0563376}, +{0.2588698, 1.3404933, 1.1683824}, +{0.2834614, 0.6675173, 1.5270826}, +{0.3294488, 0.7511750, 1.5200925}, +{0.2082182, 0.6765892, 1.4686148}, +{2.9735742, 1.1288265, 1.7898805}, +{3.0344226, 1.0964963, 1.7234384}, +{2.9486508, 1.0508579, 1.8394995}, +{0.9484476, 0.2976201, 1.9149556}, +{0.8746589, 0.2757144, 1.9718564}, +{1.0048378, 0.3528865, 1.9690675}, +{2.1331367, 1.9692905, 2.9734707}, +{2.0968676, 2.0446785, 3.0199842}, +{2.2278235, 1.9831640, 2.9755282}, +{1.1016358, 2.5934031, 2.5717747}, +{1.1602401, 2.6249468, 2.5029788}, +{1.1602087, 2.5645919, 2.6417851}, +{2.9011049, 1.9036500, 0.2222261}, +{2.8885000, 1.8895800, 0.3160636}, +{2.9954231, 1.9166975, 0.2124202}, +{3.0120790, 1.1917392, 0.2806238}, +{3.0653565, 1.2567348, 0.3264431}, +{2.9222972, 1.2236644, 0.2896970}, +{0.4867600, 0.2719674, 0.8842224}, +{0.4731141, 0.1839026, 0.9191610}, +{0.4080592, 0.2897656, 0.8327276}, +{2.3435404, 1.3587844, 2.7926073}, +{2.3379145, 1.4473159, 2.8285634}, +{2.4357238, 1.3348538, 2.8021920}, +{2.6365898, 2.9609728, 1.8114139}, +{2.5982826, 2.9320746, 1.7285902}, +{2.7090270, 3.0180116, 1.7856894}, +{2.1150622, 1.1271752, 0.8136538}, +{2.1540286, 1.2055047, 0.8524922}, +{2.1806004, 1.0963301, 0.7510787}, +{2.9630063, 0.5666408, 0.8626033}, +{3.0525203, 0.5745736, 0.8296390}, +{2.9171021, 0.5162801, 0.7953804}, +{2.2379093, 1.6405119, 2.8651214}, +{2.2198973, 1.7342871, 2.8717609}, +{2.1844885, 1.6110246, 2.7913716}, +{1.9171563, 0.9405604, 0.4047319}, +{1.9082389, 0.8588795, 0.3556298}, +{2.0040133, 0.9732437, 0.3812800}, +{1.9397354, 1.7530928, 1.1208880}, +{1.9113368, 1.6674386, 1.1528130}, +{1.8701869, 1.8130176, 1.1479865}, +{0.6317668, 2.5982196, 2.7025659}, +{0.6780862, 2.5718210, 2.6230679}, +{0.6269335, 2.6936495, 2.6968992}, +{2.7763722, 0.9181970, 1.7990961}, +{2.7674873, 0.8585699, 1.8734465}, +{2.7713945, 0.8614601, 1.7221645}, +{0.0102136, 2.6898615, 2.0399170}, +{0.0033672, 2.5998058, 2.0082088}, +{-0.0536600, 2.6951428, 2.1110127}, +{2.4561839, 0.7099834, 1.8010200}, +{2.3737435, 0.7574791, 1.7905283}, +{2.4987013, 0.7166258, 1.7155187}, +{1.3939223, 2.4582560, 2.2867839}, +{1.3996152, 2.4493568, 2.1916487}, +{1.3508067, 2.5426223, 2.3004108}, +{1.9135660, 1.1220603, 2.5315902}, +{1.8369777, 1.0646460, 2.5312040}, +{1.9465116, 1.1174393, 2.6213429}, +{0.9004487, 0.4625946, 2.3155406}, +{0.9044201, 0.5247172, 2.3882544}, +{0.8068696, 0.4485231, 2.3011444}, +{0.0886837, 2.8912289, 0.1200376}, +{0.0767506, 2.9822719, 0.0929988}, +{0.1769977, 2.8885584, 0.1568592}, +{1.5250142, 2.0289693, 2.9174082}, +{1.6196091, 2.0254824, 2.9316194}, +{1.4925609, 2.0869300, 2.9863260}, +{0.8958684, 0.1152854, 2.5216181}, +{0.9096281, 0.1682966, 2.6001217}, +{0.9839574, 0.0897638, 2.4942086}, +{2.0336621, 2.8774958, 0.8959895}, +{2.0060561, 2.8305523, 0.9747076}, +{1.9766207, 2.9542909, 0.8926578}, +{1.3289750, 0.8581318, 0.7911605}, +{1.3037727, 0.7865198, 0.7328606}, +{1.3678304, 0.9236560, 0.7332023}, +{2.1629212, 1.2174341, 2.9565094}, +{2.1748023, 1.2729852, 3.0335496}, +{2.2153056, 1.2595085, 2.8883336}, +{2.6981475, 1.7715750, 3.0479758}, +{2.7040033, 1.8670747, 3.0507703}, +{2.7880843, 1.7424959, 3.0328715}, +{1.6458204, 2.3960319, 3.1221371}, +{1.6413189, 2.3019559, 3.1050560}, +{1.5613037, 2.4172542, 3.1617460}, +{2.1971915, 0.7671505, 2.1049788}, +{2.1845357, 0.8001442, 2.1939371}, +{2.2187593, 0.8448783, 2.0534470}, +{0.6224402, 2.9699037, 3.0241976}, +{0.6899034, 3.0369391, 3.0133688}, +{0.6394674, 2.9325347, 3.1106610}, +{0.2299824, 1.8719134, 0.3997822}, +{0.1869170, 1.8361518, 0.4774274}, +{0.3218177, 1.8807822, 0.4252762}, +{2.7698395, 0.6161367, 2.9537625}, +{2.7889094, 0.6993777, 2.9105237}, +{2.8367851, 0.6085784, 3.0217588}, +{2.4963174, 1.0814774, 2.0948665}, +{2.5545115, 1.1072582, 2.0233746}, +{2.4824255, 1.1620288, 2.1446743}, +{2.5285950, 1.4406851, 1.2590463}, +{2.5800872, 1.3600342, 1.2615598}, +{2.4551868, 1.4204360, 1.2010503}, +{1.5000346, 1.2697160, 1.3019290}, +{1.4249097, 1.2747705, 1.3610308}, +{1.5352316, 1.1817277, 1.3154023}, +{0.5901845, 2.6962342, 0.3508977}, +{0.5550343, 2.7098212, 0.2629081}, +{0.6281224, 2.6083939, 0.3482337}, +{0.0498685, 1.6067076, 0.2915846}, +{-0.0169917, 1.6683018, 0.2616148}, +{0.1047645, 1.5916337, 0.2146333}, +{0.6201953, 0.4945866, 2.3696377}, +{0.6448801, 0.4784647, 2.4607041}, +{0.5364241, 0.5405491, 2.3753068}, +{0.7168736, 0.9394868, 0.8006921}, +{0.7721955, 1.0065970, 0.8406674}, +{0.7445601, 0.9370626, 0.7090958}, +{2.6671295, 2.7020864, 0.5348983}, +{2.6698348, 2.7215958, 0.6285701}, +{2.5741301, 2.7052181, 0.5124570}, +{2.0432017, 1.5345289, 2.6939590}, +{1.9726073, 1.5970825, 2.6776555}, +{2.0140536, 1.4849213, 2.7704561}, +{2.8526125, 3.1461883, 1.7159655}, +{2.8555989, 3.1337929, 1.6210984}, +{2.9312882, 3.1023211, 1.7483403}, +{2.0595810, 0.6922218, 1.8977623}, +{2.1128202, 0.7533019, 1.8468001}, +{2.1089294, 0.6792440, 1.9787476}, +{2.9648604, 0.5567046, -0.0060417}, +{2.9122286, 0.4795727, 0.0150031}, +{3.0454047, 0.5212051, -0.0436545}, +{0.2892040, 2.1940012, 2.6874871}, +{0.3408917, 2.1275043, 2.6420023}, +{0.3286449, 2.2771475, 2.6611538}, +{1.3549655, 1.8224040, 2.9402862}, +{1.4266188, 1.7592852, 2.9469306}, +{1.3981899, 1.9078085, 2.9404142}, +{0.2691354, 1.8271025, 1.0264000}, +{0.1927256, 1.8609899, 0.9797577}, +{0.3227967, 1.7866358, 0.9582441}, +{1.5400959, 2.3967710, 2.5084748}, +{1.4878405, 2.4114141, 2.4296250}, +{1.4755367, 2.3854625, 2.5782354}, +{0.5326626, 2.3845942, 3.1297238}, +{0.4971890, 2.2957733, 3.1258831}, +{0.5338061, 2.4138892, 3.0386040}, +{1.8223233, 0.5574270, 2.0022380}, +{1.9045489, 0.5924630, 1.9679779}, +{1.7841523, 0.5095990, 1.9286324}, +{1.4984720, 1.5061412, 0.9402193}, +{1.4155788, 1.4745740, 0.9042395}, +{1.4803245, 1.5205697, 1.0330892}, +{2.7332656, 0.7312201, 1.0079825}, +{2.7916124, 0.6726646, 0.9597204}, +{2.6755517, 0.6725637, 1.0568788}, +{2.4424791, 0.1526094, 0.9303625}, +{2.3879998, 0.0911552, 0.8811925}, +{2.5098915, 0.0979013, 0.9706727}, +{0.4960604, 1.5185516, 0.9822090}, +{0.5092490, 1.4334679, 0.9403864}, +{0.4160278, 1.5078251, 1.0336100}, +{2.7628097, 2.3348615, 2.4432676}, +{2.7008138, 2.3951042, 2.4021623}, +{2.7090862, 2.2814241, 2.5017528}, +{1.5446522, 1.6085464, 3.0500593}, +{1.5414374, 1.5329128, 2.9914799}, +{1.6200292, 1.6591480, 3.0197263}, +{2.9932613, 0.8973161, 3.1656961}, +{2.9757838, 0.8035431, 3.1736639}, +{3.0881090, 0.9031082, 3.1541777}, +{1.4010988, 0.4136273, 1.4124979}, +{1.4918234, 0.3873245, 1.3970212}, +{1.3828571, 0.3851750, 1.5020524}, +{0.4023689, 2.0282826, 1.4072916}, +{0.3681280, 2.0982084, 1.4629717}, +{0.4413290, 2.0739450, 1.3327305}, +{0.8990337, 0.0518757, 1.5698578}, +{0.9353620, 0.1321738, 1.6072047}, +{0.8083336, 0.0501535, 1.6004003}, +{3.1075847, 2.2488401, 1.2512697}, +{3.0253933, 2.2144067, 1.2862159}, +{3.0956528, 2.3438134, 1.2511828}, +{0.0557172, 1.8632007, 1.8999640}, +{0.1107633, 1.9053519, 1.9659604}, +{0.1176033, 1.8290632, 1.8354112}, +{3.0890746, 2.3306186, 0.5492309}, +{3.1831112, 2.3327463, 0.5669764}, +{3.0496125, 2.3759732, 0.6237159}, +{2.7296615, 0.9997886, 0.8558961}, +{2.7213280, 0.9053426, 0.8690420}, +{2.7973664, 1.0087538, 0.7888290}, +{1.0974518, 0.8433317, 0.9172019}, +{1.1853055, 0.8660080, 0.8867087}, +{1.0478573, 0.8266026, 0.8370593}, +{0.9604354, 1.2627037, 2.7982440}, +{0.8923366, 1.3030043, 2.7443855}, +{0.9133513, 1.2007528, 2.8539889}, +{2.1899431, 1.9201032, 2.2926776}, +{2.2687562, 1.9190143, 2.3469882}, +{2.2210064, 1.9459480, 2.2059052}, +{2.8820908, 3.0447397, 1.4389324}, +{2.8172474, 3.0341754, 1.3693190}, +{2.9631038, 3.0099263, 1.4016868}, +{0.1538719, 1.7705958, 0.6214464}, +{0.0639039, 1.7650935, 0.6536615}, +{0.2019075, 1.7061505, 0.6734244}, +{0.0391853, 0.9687190, 1.3186412}, +{0.0822218, 0.8836136, 1.3104405}, +{-0.0543289, 0.9483005, 1.3193494}, +{2.8203828, 1.0515431, 3.0258067}, +{2.8715956, 1.0886682, 2.9539645}, +{2.8766954, 0.9834964, 3.0626969}, +{2.0838254, 1.4474046, 1.9963507}, +{2.0867698, 1.5430481, 1.9939114}, +{2.1731501, 1.4201491, 1.9753615}, +{0.6114916, 2.2305501, 1.9186871}, +{0.6924189, 2.2738998, 1.8915964}, +{0.6265373, 2.1378884, 1.8999858}, +{0.6912583, 0.3887711, 2.6120997}, +{0.7765276, 0.4001686, 2.6540706}, +{0.6278685, 0.4030060, 2.6823950}, +{2.3112164, 2.3770421, 0.3152490}, +{2.3938129, 2.4132743, 0.2831964}, +{2.2569349, 2.3682025, 0.2369055}, +{0.9653467, 0.3204466, 1.3443677}, +{0.9325471, 0.3793331, 1.2764053}, +{1.0573641, 0.3067601, 1.3218335}, +{2.4298737, -0.0653387, 2.2467003}, +{2.3855753, -0.0664993, 2.3315449}, +{2.4447195, -0.1576444, 2.2261674}, +{0.3330666, 1.9756161, 1.7666504}, +{0.2981088, 1.9885229, 1.8548189}, +{0.3068178, 1.8865833, 1.7432737}, +{1.2224982, 0.3931379, 2.6188960}, +{1.2696162, 0.4648877, 2.5765386}, +{1.2575655, 0.3907166, 2.7079282}, +{0.1221577, 0.3488992, 2.5562828}, +{0.1666659, 0.3177385, 2.4774771}, +{0.1600637, 0.4352590, 2.5726357}, +{0.1370677, 0.3940715, 2.9506955}, +{0.1213950, 0.4857848, 2.9731758}, +{0.1462143, 0.3499384, 3.0351403}, +{2.9936411, 2.4298966, 0.1545147}, +{3.0637307, 2.4596384, 0.0965042}, +{3.0358431, 2.3665385, 0.2125411}, +{1.1097623, 2.8952229, 2.5843840}, +{1.1726384, 2.8408015, 2.5369790}, +{1.0356706, 2.9039829, 2.5244172}, +{2.2861288, 0.1613493, 0.5273755}, +{2.2930152, 0.0899590, 0.5907657}, +{2.2669575, 0.2386985, 0.5804027}, +{3.0232577, 3.0092733, 1.1222072}, +{3.0991778, 2.9950588, 1.1787440}, +{3.0278275, 3.1019819, 1.0988289}, +{1.6569895, 2.8618333, 2.1561284}, +{1.5619893, 2.8568413, 2.1455276}, +{1.6816905, 2.7763085, 2.1913092}, +{0.9384512, 2.9352140, 0.1355221}, +{1.0034959, 2.9126794, 0.0690111}, +{0.9480820, 2.8673999, 0.2023862}, +{2.9521964, 0.3785538, 2.2238338}, +{3.0048425, 0.4566935, 2.2407119}, +{2.8901725, 0.3752703, 2.2966662}, +{2.4926538, 1.0239352, 0.6558312}, +{2.5726750, 1.0749843, 0.6681965}, +{2.4501441, 1.0640253, 0.5800155}, +{1.1752639, 3.0708451, 0.9287288}, +{1.1221246, 3.1504412, 0.9304650}, +{1.2445648, 3.0896888, 0.8654468}, +{0.7207608, 0.3416515, 0.0138317}, +{0.7764910, 0.2639305, 0.0178195}, +{0.7814180, 0.4151187, 0.0230829}, +{0.0851030, 0.2332970, 0.0435002}, +{0.1223862, 0.1473273, 0.0630318}, +{0.0045395, 0.2141206, -0.0045009}, +{0.4287913, 0.1142516, 0.6276417}, +{0.4935105, 0.0554844, 0.6666309}, +{0.4808621, 0.1800374, 0.5815638}, +{0.9779723, 1.9098200, 2.5051026}, +{1.0436462, 1.9792796, 2.5100632}, +{0.9404826, 1.9185191, 2.4174604}, +{1.3789229, 1.6226406, 0.4962055}, +{1.3935698, 1.6309760, 0.5904303}, +{1.4666483, 1.6253028, 0.4580022}, +{2.0937119, -0.0106692, 0.0739963}, +{2.0536013, 0.0656805, 0.0324732}, +{2.0497866, -0.0176778, 0.1587534}, +{1.2012807, 2.9428875, 0.5265773}, +{1.1624990, 2.9133654, 0.6089590}, +{1.1908652, 3.0380294, 0.5279399}, +{2.2791674, 0.8963562, 0.7781890}, +{2.3401039, 0.9454984, 0.7231063}, +{2.2278645, 0.8441652, 0.7164928}, +{0.1630015, 2.5044470, 2.7893100}, +{0.1709897, 2.4179647, 2.7490694}, +{0.2294918, 2.5575144, 2.7454328}, +{0.7060483, 1.7318893, 0.0501555}, +{0.7625076, 1.7944364, 0.0955704}, +{0.6291210, 1.7829723, 0.0249558}, +{1.1033484, 1.0437927, 2.1403103}, +{1.0219363, 0.9946458, 2.1512179}, +{1.0911753, 1.0925208, 2.0588257}, +{1.9177777, 0.5504727, 0.5690043}, +{1.8460517, 0.5927682, 0.5217941}, +{1.9234505, 0.4629906, 0.5305724}, +{1.4972737, 1.9489530, 1.3204033}, +{1.4237723, 1.9750997, 1.2649396}, +{1.5424597, 2.0309098, 1.3404934}, +{0.8835701, 1.4280628, 0.1674865}, +{0.8531773, 1.4165682, 0.2575225}, +{0.8745712, 1.5219163, 0.1509677}, +{0.1678406, 1.7229354, 2.1899519}, +{0.2111494, 1.6641072, 2.1280980}, +{0.0743808, 1.7103669, 2.1735318}, +{2.0397434, 2.1219344, 1.4409180}, +{2.0295677, 2.1699316, 1.3587289}, +{2.1087670, 2.1689291, 1.4877107}, +{1.2581902, 1.4289570, 1.6551967}, +{1.2654010, 1.4368232, 1.7503201}, +{1.1978847, 1.4988495, 1.6298869}, +{2.9910946, 3.0806005, 0.1484258}, +{2.9137793, 3.0751080, 0.2045908}, +{3.0470388, 3.0086098, 0.1775783}, +{1.0610830, 0.7047814, 1.1418353}, +{0.9734507, 0.6746404, 1.1658028}, +{1.0458002, 0.7749794, 1.0785819}, +{1.6532741, 2.9580233, 1.0485057}, +{1.5689507, 2.9165225, 1.0303516}, +{1.6545630, 2.9690583, 1.1435788}, +{0.8091365, 0.0285435, 3.0111480}, +{0.8982949, 0.0388860, 2.9778893}, +{0.8186450, 0.0310841, 3.1063607}, +{0.5036963, 2.0880661, 2.5342636}, +{0.5332928, 1.9970473, 2.5328660}, +{0.5832631, 2.1388848, 2.5500402}, +{2.2328618, 1.9671422, 1.2397304}, +{2.3016095, 2.0160425, 1.2849501}, +{2.1618116, 1.9610965, 1.3035868}, +{0.2239179, 2.1884501, 0.9155824}, +{0.2009252, 2.1424413, 0.9963093}, +{0.2424263, 2.2781026, 0.9435503}, +{0.8877732, 0.5404216, 0.8066940}, +{0.8117438, 0.4826351, 0.8001699}, +{0.8577675, 0.6134664, 0.8607905}, +{2.9464774, 2.8448186, 0.8989243}, +{3.0209310, 2.7910399, 0.8719642}, +{2.9804733, 2.8987021, 0.9703608}, +{2.1073101, 2.4336813, 0.7530645}, +{2.1230614, 2.4845641, 0.8325954}, +{2.0143700, 2.4467690, 0.7342715}, +{0.4704227, 1.2409600, 1.7399371}, +{0.5620813, 1.2400131, 1.7123669}, +{0.4735311, 1.2236216, 1.8340223}, +{0.2758942, 0.8356323, 2.8198159}, +{0.3543517, 0.8435117, 2.7655511}, +{0.3035489, 0.7822455, 2.8942967}, +{2.8781021, 0.7768593, 2.7527759}, +{2.9437192, 0.8390787, 2.7213841}, +{2.8006170, 0.7948696, 2.6995406}, +{1.8004808, 2.0260513, 3.0032859}, +{1.8451598, 2.0846167, 3.0644105}, +{1.8136942, 2.0663745, 2.9174852}, +{2.5159631, 1.3368416, 2.1436698}, +{2.6018269, 1.3573978, 2.1066947}, +{2.4535270, 1.3737060, 2.0811794}, +{2.8697185, 0.1857669, 2.4604704}, +{2.7906508, 0.1627211, 2.4116902}, +{2.9394827, 0.1358934, 2.4179509}, +{1.1319151, 0.6919709, 1.6536973}, +{1.1910840, 0.7571264, 1.6913286}, +{1.1123677, 0.7251487, 1.5660647}, +{2.0596511, 0.1310353, 1.6251073}, +{2.1053870, 0.2043649, 1.5839574}, +{2.1293004, 0.0782273, 1.6641278}, +{0.9130408, 2.0109093, 0.2851326}, +{0.9477964, 1.9251004, 0.2608174}, +{0.8233567, 2.0107808, 0.2516800}, +{2.2523642, 0.3065261, 1.4769527}, +{2.1838825, 0.3723898, 1.4653536}, +{2.2738736, 0.2784200, 1.3880161}, +{2.9289901, 1.1891373, 0.7054088}, +{2.8951311, 1.1213962, 0.6468679}, +{3.0086887, 1.1511707, 0.7424086}, +{1.6172851, 2.7285078, 1.4677424}, +{1.6248428, 2.7082646, 1.5609916}, +{1.7015549, 2.7023394, 1.4306459}, +{0.9118999, 1.5540966, 2.1797655}, +{0.9988176, 1.5226667, 2.2046609}, +{0.9286639, 1.6201829, 2.1125798}, +{1.8577038, 0.3123721, 0.4259824}, +{1.7935623, 0.2699088, 0.4829479}, +{1.9066210, 0.2399911, 0.3868619}, +{1.6782736, 2.6685839, 0.1501557}, +{1.7692950, 2.6398253, 0.1572518}, +{1.6737049, 2.7129440, 0.0654584}, +{2.8969524, 0.6093825, 0.5232357}, +{2.8875206, 0.5253476, 0.5680855}, +{2.8324332, 0.6662974, 0.5651913}, +{0.5251588, 0.7402523, 2.6969964}, +{0.5936854, 0.7999436, 2.6669402}, +{0.5720883, 0.6724310, 2.7455785}, +{1.7043184, 0.9188465, 2.3983524}, +{1.6931951, 0.8330535, 2.4393177}, +{1.7188920, 0.8994651, 2.3057549}, +{0.3658168, 2.3391819, 1.8964130}, +{0.3424776, 2.3354075, 1.9891672}, +{0.4530553, 2.3000312, 1.8920542}, +{0.2003765, 1.8361878, 1.4404087}, +{0.2785301, 1.8909607, 1.4477754}, +{0.2268270, 1.7643120, 1.3829929}, +{0.8779035, 1.1430768, 1.2612486}, +{0.8973404, 1.1811655, 1.1756111}, +{0.9162037, 1.2043930, 1.3239839}, +{2.1880777, 2.8796663, -0.0180342}, +{2.1398976, 2.8393123, 0.0541638}, +{2.1717946, 2.9734793, -0.0082194}, +{1.8784320, 2.6354129, 0.7891080}, +{1.9437256, 2.6465924, 0.8582029}, +{1.8214574, 2.7118821, 0.7973951}, +{1.2414686, 0.3467959, 1.1827204}, +{1.2969465, 0.2716064, 1.1619582}, +{1.2684450, 0.3728753, 1.2707799}, +{0.4696910, 2.0991523, 0.7883172}, +{0.4123033, 2.1233404, 0.8610077}, +{0.4795347, 2.1798031, 0.7377124}, +{0.8305964, 0.6751534, 2.5289936}, +{0.8204279, 0.6027634, 2.5907884}, +{0.9156948, 0.7132943, 2.5505769}, +{1.0174899, 1.7911044, 1.3506598}, +{1.0601589, 1.7646310, 1.4321512}, +{0.9299651, 1.7527054, 1.3558805}, +{0.6316745, 0.3783214, 0.6611996}, +{0.5958663, 0.3291134, 0.7350823}, +{0.5647446, 0.4438088, 0.6413473}, +{1.6425643, 0.7000317, 0.4213622}, +{1.7280147, 0.7141162, 0.3805923}, +{1.6527015, 0.7335858, 0.5104334}, +{1.1330942, 0.0406595, 2.4146397}, +{1.2183986, -0.0027429, 2.4133332}, +{1.1478934, 0.1239188, 2.3697934}, +{2.8466637, 2.6961110, 2.5011537}, +{2.8191767, 2.7140822, 2.5910635}, +{2.7833884, 2.6318057, 2.4691637}, +{1.0341512, 2.1846373, 1.0978242}, +{1.0069698, 2.0939112, 1.1116887}, +{1.0853837, 2.1822073, 1.0170057}, +{0.1365953, 0.1719048, 2.7987103}, +{0.1584627, 0.2343351, 2.8678954}, +{0.1328731, 0.2247992, 2.7190194}, +{0.7168369, 1.2508167, 1.6494938}, +{0.7857752, 1.2773249, 1.5886076}, +{0.7638478, 1.2148193, 1.7247035}, +{2.8681543, 1.6885868, 1.1241422}, +{2.8835134, 1.6332468, 1.2007183}, +{2.9374192, 1.7545414, 1.1279746}, +{1.1623275, 1.6367633, 0.3493694}, +{1.2317469, 1.6440940, 0.4148639}, +{1.0871481, 1.6806860, 0.3891334}, +{1.4521078, 0.1351103, 0.3432480}, +{1.3832349, 0.0933540, 0.2915252}, +{1.4236991, 0.2261031, 0.3519418}, +{0.8650972, 2.4736595, 2.9118011}, +{0.9075109, 2.3880019, 2.9169161}, +{0.7795016, 2.4604759, 2.9525673}, +{1.9729780, 1.2322768, 1.8556480}, +{1.9931359, 1.3186145, 1.8917284}, +{1.9017249, 1.1994421, 1.9104861}, +{0.9686258, 0.4839060, 0.3089988}, +{1.0579994, 0.5075947, 0.2842288}, +{0.9380490, 0.5576745, 0.3617775}, +{1.1664323, 2.4949052, 1.3470272}, +{1.1619846, 2.4332762, 1.2739219}, +{1.2154081, 2.5695422, 1.3124876}, +{1.8956073, 1.5583949, 0.0690517}, +{1.9310175, 1.6302878, 0.0167083}, +{1.9627470, 1.5415760, 0.1351706}, +{1.5064046, 1.0762715, 1.7345712}, +{1.5842536, 1.0842133, 1.6794459}, +{1.5339825, 1.1096946, 1.8199215}, +{1.5876601, 1.9028364, 0.3956352}, +{1.6268866, 1.8814853, 0.3109727}, +{1.4971380, 1.9260508, 0.3749187}, +{0.8584031, 0.5936577, 0.0163770}, +{0.9082285, 0.6110443, -0.0634820}, +{0.9223219, 0.6030391, 0.0870077} +}; + +const std::vector vel_rst7_ion = { +{0.1463685, 0.3065207, 0.3287848}, +{0.7371281, 0.5779085, -1.0004199}, +{0.5550961, 1.1852636, -1.8387126}, +{1.9295115, 2.4173758, 1.1612775}, +{0.1902543, 0.6539089, -0.0383688}, +{-1.5028324, 1.6359708, 1.3793683}, +{1.9993781, -1.3913143, -2.2550328}, +{-0.3714653, -1.4523178, 0.4398792}, +{-2.4598849, -1.4385419, 1.3378714}, +{0.3383568, 0.7856591, 0.9813646}, +{-0.2263594, -0.1698561, -0.1705628}, +{-0.3753851, -0.0276462, -0.6656810}, +{0.8879443, -0.1145656, 1.7698814}, +{-0.5375338, 0.8311055, 0.0003367}, +{0.6233839, 2.9981489, 0.7811897}, +{2.8068020, 1.5577713, -1.2673179}, +{0.4908920, -0.1016197, 0.2136895}, +{-0.4164982, -0.3558269, 0.7050512}, +{-1.4413939, -0.2053909, -1.1536202}, +{0.1910874, -0.4855185, -0.2668713}, +{1.2523756, 1.4426663, 1.7331120}, +{-0.2925380, 1.4046954, 0.4895649}, +{-0.1838700, -0.7461997, 0.0751644}, +{-0.8027396, 1.4148548, -0.1457542}, +{2.7184405, 0.1154586, -1.8597050}, +{0.2690345, 0.4976957, 0.1210623}, +{0.2330270, 1.5617906, 1.5034759}, +{-0.5834623, 1.4057117, -0.8899866}, +{0.0163682, -0.2517941, 0.2510431}, +{-0.8889926, -0.0683436, -0.1141858}, +{-0.1489247, -0.5309870, 0.3066758}, +{0.5441253, -0.1158325, -0.1782701}, +{0.2506767, -0.9799866, 0.2347035}, +{0.4672806, -0.7008654, -0.4286981}, +{-0.2995699, 0.0365136, -0.1786350}, +{-1.1487139, 1.2540857, 1.8533340}, +{-1.7168502, -1.9573603, -0.3638210}, +{-0.2423436, 0.1349948, -0.4697222}, +{-1.9565589, -0.7184421, 2.8537061}, +{0.8596629, -0.5336328, 1.0651920}, +{0.3273928, -0.0453199, -0.3502595}, +{0.3189336, -0.0455603, -0.7143221}, +{0.2910797, -0.5063261, -0.5824001}, +{0.4780722, 0.2395895, -0.2683057}, +{-0.0853229, 0.7292104, 0.1628780}, +{0.1558332, 0.5232158, -1.0917240}, +{0.2999692, -0.0982003, -0.4960083}, +{1.8894519, 1.4626353, -0.6804298}, +{2.4061074, 1.2960715, -0.1970334}, +{0.1257670, 0.3494972, 0.2631694}, +{-1.5875477, 1.5959592, 0.5363353}, +{0.4914568, -2.1938405, 2.1225259}, +{-0.0307748, -0.5625980, -0.0021340}, +{-0.1677499, 0.2009291, -0.0115671}, +{0.3787732, -1.2403874, -0.1354211}, +{-0.0788009, -0.0443135, 0.5921396}, +{-0.7452830, -0.0596749, -0.9905685}, +{1.6973567, 2.2585990, -0.3537931}, +{0.5157012, 0.0667297, -0.3583508}, +{-0.2514844, 0.3777169, -1.7781777}, +{-0.1449715, 0.1046431, -1.0421330}, +{0.4883428, -0.0447277, -0.4162643}, +{0.1407105, 0.0701114, 0.0320429}, +{-0.0063489, -3.0579305, -0.8119215}, +{-0.2687715, -0.1601332, 0.0214399}, +{-0.2032076, 1.1673429, -1.0753449}, +{0.2939929, 0.7388926, 0.1571736}, +{-0.3771812, 0.2392884, -0.3747415}, +{0.0225571, 0.4657770, 1.0899161}, +{-0.2923067, 0.5687450, 1.3903265}, +{0.1170864, 0.0385553, -0.1568191}, +{0.0010100, 0.2176969, -0.1234210}, +{1.9490565, -0.4967891, -0.6301463}, +{-0.0859401, 0.1133912, 0.8298548}, +{-0.1202616, 0.5685778, 0.6898854}, +{-0.3881985, 0.4002085, 0.9764838}, +{-0.1507751, 0.2457515, -0.7290401}, +{-0.5772744, 1.4680581, 1.6817755}, +{1.0109506, 0.6715226, -1.2050654}, +{0.4536923, -0.7803533, 0.6021280}, +{0.9260955, 2.3135042, 0.9460802}, +{-0.9477729, -0.6069506, -1.0168848}, +{-0.2383449, 0.4078479, 0.1112495}, +{0.1125705, 0.3929870, -0.2907176}, +{-1.3702412, 0.9092309, -1.8898387}, +{-0.3272168, -0.1913895, -0.5143399}, +{0.4256406, 0.3591474, -0.3412583}, +{-0.6632770, 0.1610496, -1.5580477}, +{0.3964951, 0.1072337, -0.3882289}, +{0.7646788, -0.5012527, 1.0678464}, +{0.6020142, 2.1914575, -0.2719928}, +{0.1644063, 0.1263480, -0.2869909}, +{0.9220442, -0.5001076, 0.9623897}, +{1.0921648, -3.4606965, 0.3144048}, +{0.6120083, 0.1973298, -0.2805130}, +{1.3155607, -0.1937509, -0.6840057}, +{0.6153530, 0.4152285, 1.0085553}, +{0.2301100, -0.1650680, -0.0686902}, +{0.4512722, -1.0075990, 0.4520470}, +{-0.2611319, 2.2028799, -3.3089883}, +{-0.5119643, 0.5145530, 0.0098749}, +{0.0152831, 1.6550369, -0.1497427}, +{-0.4481210, -1.3859713, 0.9077368}, +{-0.2020931, -0.0773476, 0.4367960}, +{1.6142554, -0.7840701, 0.4810923}, +{0.0643875, 1.3944364, 1.6292443}, +{0.0597737, -0.3002678, -0.3816536}, +{-1.0448049, -0.4816298, 0.3494129}, +{1.0587531, -0.0821829, -1.3195734}, +{0.0280838, 0.0893796, 0.3241968}, +{-0.2812809, -0.0044406, 0.2781212}, +{-1.3846875, 0.9941797, 0.0024104}, +{0.5937585, 0.1984814, 0.3690110}, +{-0.1365554, -1.2706884, 1.2370665}, +{-0.2694786, -0.3533167, -1.3227085}, +{-0.4383570, -0.9224468, -0.4340020}, +{-0.7551824, -1.4043826, -0.4668837}, +{-0.8223447, 0.3034808, -0.2149989}, +{-0.1082864, 0.0745128, 0.1312838}, +{-0.1487938, 0.1547110, -0.1178106}, +{-2.2985251, -0.9117764, -0.2153925}, +{0.0990336, -0.7630978, 0.3328875}, +{-0.8767101, -1.1642810, -1.9598871}, +{0.1997163, 2.5703723, 1.3570105}, +{0.3229017, 0.1493778, 0.2412831}, +{1.5442365, -1.3333116, 1.9242618}, +{-1.1031361, 0.8563766, -1.6298008}, +{-0.0255275, -0.3312931, -0.2943460}, +{-0.1994761, -1.1005089, -1.0633765}, +{0.5494161, -2.7048810, -1.8622029}, +{-0.4401251, -0.2993797, -0.0643224}, +{0.1242682, -1.6107864, -1.0645754}, +{2.5068457, -0.6040909, -0.5811095}, +{-0.1375492, 0.2089872, -0.4277659}, +{-1.5198183, 1.1994056, -1.2697433}, +{-0.1255727, 0.8947816, 1.1931859}, +{0.3675741, -0.2461770, -0.5340475}, +{-1.4963267, -1.2458730, 0.5039476}, +{-1.0796977, -1.5002230, -0.3408699}, +{0.5704201, -0.3208803, 0.5936826}, +{-0.0645790, 0.7497386, -0.7542320}, +{0.2708243, 0.4285077, -0.4548926}, +{0.3694951, -0.5429232, 0.7394574}, +{0.4029164, 0.8574382, 0.0679616}, +{-0.2772374, -3.0572729, -1.1541784}, +{0.2747530, -0.3619337, 0.3421585}, +{0.8771745, -0.7368845, 3.2058256}, +{1.3855928, -2.1130569, -0.9536069}, +{-0.4836731, -0.1780420, 0.5947607}, +{0.2505015, -0.3182768, -0.3001915}, +{-1.1785871, 0.9712771, 0.1857460}, +{0.1791360, 0.4256015, 0.2411605}, +{0.0949873, -1.9160255, 1.9706528}, +{0.6721850, -0.2948928, -0.4824503}, +{-0.0978403, 0.6559012, 0.3559941}, +{1.7525223, 0.8271949, 0.1785358}, +{-0.4757381, 0.3561969, -1.3458381}, +{0.4658725, 0.2744318, -0.3452308}, +{0.8478040, 1.4294609, -0.8133759}, +{-0.5885894, 0.1219341, -0.6724163}, +{0.1305106, 0.2857761, -0.5160971}, +{0.0919217, -0.7459833, -0.5063521}, +{0.2242723, -0.5813210, -0.3394017}, +{0.1403195, 0.3404832, 0.4354262}, +{0.5582833, 3.7375681, -3.2719817}, +{2.3144352, -0.7304362, -1.0354159}, +{0.0564519, -0.1415871, -0.1578124}, +{1.8414284, -1.9642483, 0.0464570}, +{-2.8368704, 1.5143878, -0.6798729}, +{-0.3573252, -0.6014078, -0.5150779}, +{-1.7724653, -2.6391764, 0.2415990}, +{-0.7749498, 0.4440289, 0.6428634}, +{-0.0909959, 0.6293582, 0.8031600}, +{-1.8792617, -0.5474257, -0.5913790}, +{0.8747709, 1.8465655, 0.5552957}, +{-0.1791926, 0.2169411, 0.5043762}, +{0.4750830, 0.2194068, 1.8890547}, +{1.3510096, -0.4896438, -0.2842244}, +{0.2964395, 0.2451214, -0.3959046}, +{0.4008227, -0.1559107, -0.4080295}, +{2.4716084, 1.3746006, 1.2460773}, +{-0.2873621, -0.0548715, -0.3045356}, +{-1.0872899, -0.9724135, -0.6489921}, +{0.4869141, -0.2083705, -1.0554188}, +{0.1693709, 0.0004103, 0.0232621}, +{-0.7277920, 0.5750959, -0.2825442}, +{0.9503970, 0.5802715, -0.4494333}, +{-0.3158120, -0.1988707, 0.2011052}, +{-0.0509036, 0.4959302, 1.2131239}, +{-1.0217791, -0.0612856, -1.0136371}, +{-0.1174749, -0.7295172, 0.2806762}, +{0.3812415, -0.3918555, -1.0103766}, +{1.0120203, 0.4253646, 0.0034888}, +{-0.6076309, 0.3837580, 0.4137383}, +{-1.3120896, 0.3274231, 0.5356969}, +{-1.3723847, -1.0041860, -0.5755426}, +{0.2854691, -0.0545563, -0.1344180}, +{0.5715818, -0.0401829, 0.6594520}, +{-0.0859181, -0.4678149, -0.2037510}, +{-0.1389900, 0.4522794, 0.0672570}, +{0.6666835, 0.3444074, 2.9537859}, +{-0.3528512, 1.2960987, -1.6589533}, +{-0.2094915, 0.6504480, -0.0413949}, +{0.5830479, 1.4213958, 2.7095990}, +{-0.3488207, -2.7650273, 0.6529962}, +{0.5683576, 0.0420401, -0.3145432}, +{0.5255090, 0.5160358, -1.0943756}, +{-0.2616756, 0.5381373, 0.0909482}, +{0.1585326, 0.0909941, 0.4472848}, +{-1.4557503, 0.0540859, -1.2026528}, +{-0.8199168, -0.1020053, 1.7692349}, +{0.6539758, 0.2987118, -0.1798107}, +{2.6815250, -0.2173550, -0.4194057}, +{-0.7916324, -1.8644089, -0.4823986}, +{-0.1490412, 0.6295601, -0.0197517}, +{-0.3245004, 2.0755067, 0.9418771}, +{-3.4721551, 0.3380259, -0.7584451}, +{0.3041831, 0.4033696, -0.3527086}, +{1.1359482, 1.0477014, -0.9718602}, +{-0.2023261, 1.2709041, -2.7235115}, +{0.3146465, 0.2191468, -0.0607031}, +{-0.0037861, 0.9604566, 0.7284797}, +{-0.4148546, 2.0286467, 1.8806714}, +{-0.1704783, -0.8613182, -0.5558572}, +{0.0045281, -0.8705695, -0.4988864}, +{-0.9933478, -0.0220226, 1.8110865}, +{0.0000631, -0.1630390, 0.5633530}, +{1.2073320, -2.5777371, -0.0320323}, +{3.5872779, 1.2186457, -0.0907143}, +{0.1070623, 0.3744718, -0.0653850}, +{1.0001283, 0.3059500, -0.9486852}, +{-0.0936398, 1.9388126, 1.4607439}, +{0.0648986, 0.5466510, 0.3763338}, +{0.4360310, -0.4910959, 1.4234331}, +{-0.8414136, -0.3405721, -1.0278348}, +{0.1501031, 0.3637626, -0.4662275}, +{-0.9113928, 0.2985925, -0.2424654}, +{-0.1585872, -0.9677805, 0.2978905}, +{-0.2356514, 0.1680351, 0.3305846}, +{1.3894721, -0.7831209, 0.2185763}, +{-1.6058164, -0.7840036, 0.1217850}, +{-0.5304492, -0.0053840, -0.0397147}, +{-0.6891729, -0.8453297, -0.6892318}, +{-2.1590698, 0.1574314, 0.1773291}, +{0.3795578, 0.0669959, -0.1586484}, +{-0.4403888, -1.7437466, -1.3736960}, +{0.1112398, 0.0629726, 0.7357940}, +{-0.4289644, -0.7219931, 0.0410823}, +{-1.9703021, -0.1922213, 0.7319959}, +{-2.3396277, -1.8430122, 0.8207880}, +{-0.1674556, 0.4215150, -0.4904200}, +{1.4351790, 0.7337474, -1.5944686}, +{-1.5970559, -0.1244278, 0.1271944}, +{0.3355792, -0.4455394, 0.3222982}, +{0.6912493, -0.1259308, -0.4989391}, +{0.2912660, -1.3756368, 1.7640721}, +{-0.2381211, 0.0730320, -0.1056523}, +{1.5741251, 0.1920993, -0.7603070}, +{-0.0313910, 0.1369859, 1.7348821}, +{-0.2873937, 0.0185019, -0.1707978}, +{-2.3053272, -0.7575927, 3.0161331}, +{-1.3043399, -0.9400668, -0.4116636}, +{0.2422298, 0.2171435, -0.1978996}, +{1.5715605, 0.5110898, -0.3433310}, +{-0.2560965, -0.7728164, -0.4483792}, +{0.3465971, 0.1829943, -0.1122128}, +{-3.6038086, -2.2948482, 3.7347813}, +{0.3920422, 0.3339850, -0.1741748}, +{-0.1183182, 0.2837026, 0.1333865}, +{0.2041813, -0.1373797, 0.2821882}, +{-0.0557131, 0.8464879, 0.3983997}, +{0.3713892, 0.1857527, 0.4548483}, +{0.2865518, 0.8104321, -0.8182375}, +{0.9838055, 2.3792036, 1.1808696}, +{0.1367386, 0.2520233, -0.0759792}, +{0.8400723, -0.8654693, 0.4758402}, +{-0.1864849, 0.2790168, -0.5767189}, +{-0.4632595, -0.4361226, -0.0872157}, +{-1.2937758, -0.9207199, 1.7568275}, +{1.0593350, 0.9945173, 0.3722779}, +{-0.0093096, -0.1536174, 0.3646809}, +{-1.8179445, 1.0808601, -2.6092598}, +{4.5445037, -1.4661922, 2.1868107}, +{-0.6109890, 0.1912777, -0.1957564}, +{0.5192731, 1.2783483, -1.0224750}, +{-0.7259687, -2.0022244, 0.9973031}, +{0.1851406, 0.2087096, 0.2367882}, +{2.4313464, 1.5950943, 2.5163505}, +{0.7359058, -1.8946112, -0.9255536}, +{-0.3909338, 0.2707847, -0.1451767}, +{-0.5690331, -0.8336113, -0.7156954}, +{-0.4062643, 0.3687503, -0.5611530}, +{-0.2398030, -0.0119397, 0.9459276}, +{-0.5081778, -1.7486039, 1.5324827}, +{-1.2418389, 1.3765274, 1.8904744}, +{-0.4419993, 0.3387884, -0.6306401}, +{1.1215024, -0.0648428, -0.2971100}, +{-0.0637442, -1.7081922, 2.4175911}, +{-0.2256767, -0.5690064, -0.1422491}, +{-1.2355829, -0.1615474, 0.3237036}, +{0.4588714, -0.9437417, 0.2973320}, +{-0.4250144, 0.0096513, -0.0124992}, +{0.0899091, 1.6973963, 0.3672677}, +{-0.9629631, -2.1347768, -0.1570699}, +{-0.3425599, -0.4490806, 0.0283966}, +{-1.3060976, -0.6033320, -1.8992586}, +{-0.7450263, -0.5891393, -0.3961650}, +{-0.2645380, -0.4007787, -0.0335750}, +{0.1301489, -0.4958779, 0.2286615}, +{-0.5132384, -1.2561976, -0.0443789}, +{0.1204955, -0.3752933, -0.1110379}, +{0.3614887, -0.4529189, -0.8325626}, +{0.0298213, -1.4107805, -1.7971951}, +{-0.1875802, -0.0735401, -0.2082844}, +{-1.0671041, 0.1263986, 0.4622996}, +{-1.5922501, 0.5552923, 0.4501660}, +{-0.3994837, 0.2728696, -0.1648372}, +{0.5007105, 1.7821091, 1.1414150}, +{-1.1877351, -0.2607154, -1.3311883}, +{-0.1784391, -0.3389329, -0.3607011}, +{-0.2694132, 0.2286964, -0.2709657}, +{0.0138954, -1.5320725, -0.5891992}, +{-0.2294407, -0.1252427, -0.1959939}, +{-0.1857845, -0.8734263, -0.9948279}, +{1.1318990, 0.1178934, 0.9329372}, +{0.3094277, 0.0852543, 0.5415188}, +{-0.9586183, -2.7398086, 0.0353147}, +{0.0695670, 1.2083937, -1.7507937}, +{0.1578899, 0.2668372, 0.1712302}, +{0.7788315, 2.3678105, 0.0833213}, +{-1.2497391, -1.2441902, -1.2230326}, +{-0.1193902, 0.1320118, -0.4264402}, +{-0.0800737, 0.7922408, -0.1864870}, +{0.6491041, -1.5787383, -1.3634958}, +{0.1163738, 0.9949249, -0.1340376}, +{0.1656355, 0.9392821, 1.3841002}, +{-0.3156284, 1.2276682, 2.3234246}, +{0.0048379, 0.4775075, -0.2608450}, +{-1.3494797, -1.3089492, -0.8398163}, +{-1.4926242, 1.3765566, 0.2010730}, +{-0.1031815, 0.0690532, -0.0154183}, +{-1.0939105, -1.4593337, -0.9401022}, +{0.4175293, 0.4991472, 0.4809085}, +{-0.0126498, 0.0574988, -0.6334425}, +{1.3409929, 1.1031606, 0.8996344}, +{0.0004584, -0.0016399, -0.5869642}, +{0.5582238, 0.1899975, -0.3661042}, +{0.1883535, 0.3405917, 0.0429381}, +{-1.3838021, 1.5868164, 0.6275247}, +{-0.6289806, -0.6502675, -0.0752719}, +{-2.0805564, 0.2553050, -0.4071317}, +{0.4086489, -0.5034834, -1.0809975}, +{0.0929592, -0.4298325, 0.1247238}, +{1.6627530, 0.4103838, 1.3428448}, +{-2.2899046, 2.1782064, 0.3195259}, +{0.5879145, 0.1834967, -0.1727275}, +{1.5849533, -0.7238598, 0.6030142}, +{0.4655881, -1.1642094, 0.1762342}, +{-0.0035103, 0.6088200, 0.5954229}, +{-1.1432129, -1.0781606, -0.6292996}, +{-0.4284338, -0.3174027, 0.1460112}, +{0.0954719, -0.1586587, 0.0278252}, +{0.6001241, 0.0413552, 1.3833274}, +{-0.9770479, 0.7500701, 0.2264226}, +{0.2777718, 0.5718384, -0.4627188}, +{-0.3243649, 2.1833947, -2.8639286}, +{2.5957587, 1.8150169, 0.6206218}, +{-0.0459444, 0.1569581, -0.4359023}, +{-1.3571407, 0.6057548, 0.8166431}, +{1.7397357, 1.3031981, -0.4895906}, +{0.0732513, -0.0036223, 0.5333118}, +{0.6249190, 1.0907675, 0.9812954}, +{-0.0406285, 0.7902001, 0.1381157}, +{0.2812554, 0.8642562, 0.3073043}, +{0.5443220, 0.8112164, 0.3173150}, +{-1.1794060, 0.4653952, -0.1680422}, +{0.7782542, 0.5632150, -0.2806699}, +{-1.1499072, -1.9457122, 0.0446199}, +{-1.5672810, -2.7434442, -0.0141365}, +{-0.4427074, 0.2354949, 0.0595492}, +{-0.7595055, 0.0840971, 1.0885637}, +{2.1110585, 1.2906569, -0.5080402}, +{0.2412746, -0.4988034, 0.7184574}, +{0.7833550, -0.8475778, 1.9237827}, +{-1.1489927, -0.1466619, 1.0136181}, +{-0.2450144, -0.0381882, 0.5942707}, +{-0.2911897, -0.3144242, 1.2533340}, +{0.2048488, -0.0136309, 1.7100073}, +{-0.5580387, -0.0963491, -0.1555126}, +{-1.3942404, 0.3036195, -0.3265848}, +{-3.1224911, -0.1353183, -0.5867852}, +{0.7456514, 0.3294421, -0.1394125}, +{-1.9573339, 0.3761309, -0.6951956}, +{-0.6764378, 1.5425678, -0.5734640}, +{0.2407591, 0.1268796, 0.2447225}, +{-0.7002614, 0.0122787, -1.3364549}, +{-0.6048329, 0.1318130, -0.1676119}, +{0.4504908, -0.4163981, 0.5158382}, +{-0.4579805, -0.0982734, 2.0436692}, +{-2.5476120, 0.4458331, 1.2213143}, +{0.0319256, 0.1870618, 0.1629280}, +{1.1440634, 1.9053742, 1.4407378}, +{1.3344333, 1.5005298, -1.8995678}, +{0.1748469, 0.1184098, -0.5447508}, +{-1.5102245, 0.8198828, 0.3668833}, +{-2.4686098, 0.5112382, -0.4195992}, +{0.3162807, 0.4162404, -0.6274319}, +{0.0038307, 0.7471834, 1.1736321}, +{-0.0195135, -1.2599784, -0.1978804}, +{0.0297034, 0.4051444, -0.4162357}, +{-1.6291660, -0.3278001, -0.7457288}, +{1.0103220, -2.9933150, -0.3022198}, +{0.1099940, 0.0974567, -0.2178596}, +{-0.0889168, -2.5315740, 0.3288479}, +{2.9029288, 1.4863762, 1.1560531}, +{-0.4358510, -0.7107344, 0.2419842}, +{-0.4557346, -2.5348732, 1.0783981}, +{-0.3256189, -0.1360448, 0.5196061}, +{-0.3118595, 0.2990566, -0.1760474}, +{-0.4942809, 2.0054057, -1.0919424}, +{1.7754995, -0.2373658, -2.1146696}, +{0.0423195, -0.2077326, 0.7382157}, +{0.9029520, 0.3642891, -0.0041569}, +{0.9870696, 0.1679502, -0.0474408}, +{0.0814686, 0.3009713, 0.3983445}, +{1.1830866, 0.9861013, -1.2154138}, +{-0.7662681, 0.1533094, 1.2102867}, +{-0.9308919, -0.5224693, 0.3565955}, +{-1.0852178, -0.8918798, 0.4046309}, +{-0.7697254, -1.1038946, 0.8435305}, +{0.0099849, 0.0634709, 0.3780330}, +{2.3039122, 0.0298482, 0.3320339}, +{-0.6186993, 0.1970709, -1.6236813}, +{0.1296185, 0.3889717, 0.4551529}, +{0.0991211, -0.2524356, 0.0230410}, +{1.2994289, -1.9434847, -0.0762409}, +{0.1977101, 0.7129424, 0.4811994}, +{0.6452574, 0.1142559, -1.2645766}, +{1.4598246, -0.3629984, -0.6474956}, +{-0.1396337, 0.9131825, -0.0279219}, +{-0.7113034, 1.0358872, -1.0749922}, +{0.7230560, 1.6068482, 0.5849475}, +{0.7265717, -0.4277482, 0.4808604}, +{-0.0532368, 1.6218204, -2.0707946}, +{3.1800213, 2.4518912, 3.2820473}, +{0.1931886, 0.1240467, -0.0431288}, +{0.7176692, 1.3145341, 0.9054470}, +{1.6295356, 2.4653149, 0.8787692}, +{0.1966708, -0.2889460, -0.0766378}, +{1.7743597, 2.4096589, 1.2319211}, +{-0.5483743, -1.5472711, -0.1982777}, +{0.1436681, -0.0165277, -0.7655227}, +{-1.0719875, -1.6428086, 0.4593414}, +{-0.2827050, 1.3697498, -1.2367063}, +{-0.4354425, 0.0038599, -0.0425517}, +{-0.1681594, -0.1186207, -0.0813524}, +{1.1474094, 0.1009282, -0.1804746}, +{-0.2146244, -0.0389726, -0.2795366}, +{0.0372856, -1.5560427, 0.4896329}, +{-0.6697565, 0.2894795, -0.1284500}, +{-0.0171387, 0.4277870, 1.2031248}, +{0.8333345, -0.8604418, 0.1716001}, +{-1.6818731, 0.4227462, 0.5164634}, +{0.4516506, -0.4798773, 0.4543502}, +{0.4715748, -0.9500206, -0.4435107}, +{0.6515050, -1.6586150, -2.0808403}, +{0.2408126, -0.4327915, -0.0297934}, +{-0.1811754, 0.3194553, 0.2832988}, +{1.0936099, -1.7763960, -0.5329738}, +{0.6100679, -0.3310814, -0.0421963}, +{-0.7754856, 0.6387573, 1.1746291}, +{1.0334283, -0.1721340, -0.2478880}, +{0.7380448, 0.6572105, 0.0013778}, +{1.8119537, -0.4436382, -0.6038492}, +{0.0162070, -1.3612309, -1.0385182}, +{-0.1698613, -0.3463221, 0.4485960}, +{1.0597748, 0.0413585, -1.3879155}, +{1.2617191, -1.3189732, 0.2284200}, +{0.0205296, 0.1902005, 0.1247101}, +{-1.2843182, 0.7640929, -0.2627146}, +{-1.0009544, 0.3184503, -1.5302374}, +{0.6199213, 0.2490930, 0.0796102}, +{0.1985586, 0.0420452, 0.2123965}, +{0.4315653, 0.0426582, -0.7515965}, +{-0.4958139, 0.0512674, -0.2768683}, +{-0.8806074, -1.4739645, -1.8952284}, +{-0.2685585, 1.2167181, 0.8473479}, +{0.1985426, 0.1894547, -0.3911186}, +{1.8417711, 1.5517883, 0.3303861}, +{-0.6830100, -1.6951859, -1.5997601}, +{0.1419377, 0.3372928, -0.3692672}, +{-0.2712760, -0.0562181, -1.1328750}, +{-0.1590076, 0.0417397, -0.4969699}, +{0.0256213, -0.0660445, -0.1662798}, +{1.1585598, -0.3514498, 1.1304612}, +{-1.8711193, -1.2621781, -1.6427267}, +{-0.2227830, 0.0744338, -0.3502201}, +{-2.6888635, 1.0788891, 1.3289515}, +{2.5953224, 1.2135713, 1.9075688}, +{0.2316983, -0.4524636, -0.0063374}, +{-2.3347785, -0.8000957, -0.1065990}, +{1.9526070, -1.0923216, -1.2838069}, +{-0.2372181, -0.3247179, 0.8479786}, +{0.9403948, 0.1723811, 0.2459076}, +{-1.6623150, -2.1977525, 2.0999742}, +{0.1078532, 0.0672892, 0.0833597}, +{0.5270470, 0.9306274, -0.4761512}, +{-0.7489356, 0.5218527, 0.4708866}, +{0.3630867, 0.2109770, 0.5005177}, +{-0.0714462, 0.1451556, -0.3251097}, +{0.6894497, 0.1573944, -0.5179086}, +{0.3304723, -0.6630867, 0.2033796}, +{-1.6454142, 0.3296446, -0.7160465}, +{0.2209498, -0.6451601, 0.1993150}, +{-0.6143044, 0.1629350, -0.3242975}, +{0.5276386, 1.0065061, -1.2381550}, +{-0.6224092, 0.2296422, -0.3112732}, +{0.0668032, -0.2382753, 0.0800015}, +{0.5153065, 1.0713665, 0.7442328}, +{-0.5793806, 2.3141253, -1.2995306}, +{-0.3513901, -1.0235918, -0.4102322}, +{-1.8673074, -1.0916836, 1.4161215}, +{1.6333680, -0.1470933, 0.7457550}, +{0.5051037, -0.4764686, -0.2480365}, +{0.9144548, 0.0596116, -0.0749028}, +{2.7541027, -1.5974036, 0.7015495}, +{0.0292706, -0.1940958, -0.1112175}, +{-1.1682134, 0.7888774, -1.5811460}, +{0.2625289, 0.0252434, -1.1937791}, +{-0.2323791, 0.1015220, -0.1224154}, +{-1.2001604, 1.1123600, 0.6012703}, +{0.8172260, -0.2639899, 1.1362014}, +{0.3195513, 0.0192807, 0.6141720}, +{1.7978650, -1.5391456, 0.0542428}, +{-0.2397961, 0.1885594, 2.4371984}, +{-0.4344652, -0.2321434, -0.0609679}, +{0.1911214, -1.1111622, 0.4851777}, +{-0.7911862, -0.1472040, -0.6218022}, +{-0.1687428, -0.2282127, -0.2135310}, +{-0.2653959, -1.0971346, -1.3824099}, +{0.1437597, -0.0467571, 0.6256163}, +{0.1026253, -0.0522451, 0.4115557}, +{0.3849103, -0.8058050, 0.5530728}, +{0.5478404, 1.8026639, -0.1438039}, +{-0.3318665, -0.1425077, 0.2269126}, +{0.9569576, 0.1762537, -3.7831697}, +{-0.6461208, 1.6726865, -0.2906004}, +{0.0469429, 0.0932064, -0.0183315}, +{0.4499544, -2.0204656, -1.9110529}, +{0.1828012, -0.0946532, -0.1773460}, +{-0.4425732, -0.6038175, -0.2758141}, +{-0.7297411, -2.2255304, -0.7644421}, +{-0.6245612, -1.8418353, -0.5259128}, +{-0.2482944, -0.2568923, -0.2475323}, +{-3.2902439, -1.8227388, -1.3184711}, +{-0.7895778, -2.1834373, 2.1704717}, +{0.1713545, 0.0833215, 0.0927554}, +{0.4684750, -0.5202142, 0.1633288}, +{-0.2248142, 1.9171182, -0.4785238}, +{-0.7282562, 0.2385765, -0.0863182}, +{-0.6713707, -0.4410611, -0.2741312}, +{-0.6246666, 0.8001646, -1.6645167}, +{0.4771382, -0.1935240, 0.1729348}, +{-1.5437796, 0.7738726, 1.7700567}, +{0.1360729, -0.2149984, 1.1724257}, +{0.3382888, -0.3772547, 0.1578808}, +{1.1463715, -1.4870659, -2.5929749}, +{0.4250661, 0.3625818, 0.6402887}, +{-0.6933657, 0.2452749, -0.0927253}, +{0.1034608, -0.0722048, 0.1624477}, +{-0.9913676, 0.4826180, -0.1433027}, +{-0.0935688, 0.1995428, -0.6547653}, +{1.1608191, 1.9049717, 1.2298814}, +{-0.1774498, -0.8843687, 1.8625182}, +{0.0649060, 0.0229402, -0.1101102}, +{-0.9751568, -0.5010555, -0.3973644}, +{-1.7760991, -0.0383224, 0.3454512}, +{0.1388863, 0.5901043, -0.1988644}, +{1.5061437, -0.2793217, -0.2188860}, +{0.4423154, -0.3261736, -0.6884017}, +{-0.5011950, -0.1937961, -0.3652804}, +{-1.6091956, -0.3768508, -1.2904631}, +{-0.0498179, -1.3552326, 0.4168391}, +{0.4871420, -0.0844197, 0.4141231}, +{1.1967162, -0.1929903, 1.3103484}, +{1.7376711, -0.6814843, 0.8886285}, +{-0.2198787, 0.5574673, 0.2460255}, +{0.2150799, -1.3087343, 0.3559752}, +{-1.2218831, 0.5380657, -1.0159523}, +{0.1443203, 0.5749034, 0.0385715}, +{0.4441847, 0.3773370, 0.2318112}, +{0.6086680, 0.6600190, 0.3307830}, +{-0.6305811, -0.0241498, -0.5585325}, +{-1.2629336, 0.5264137, -0.6838727}, +{-0.2790469, 0.0787013, 0.1279912}, +{0.4515101, 0.4630355, -0.0592275}, +{-2.2082412, -0.1157780, 2.7591558}, +{2.6254377, 0.7721573, -2.3700695}, +{0.5964879, -0.6634024, 0.1005411}, +{0.2230679, -0.0958167, 0.4818807}, +{0.0040714, -1.1369723, 0.2104573}, +{-0.4895777, 0.9856803, 0.3747058}, +{1.0104352, -1.9559741, 3.9424930}, +{1.1784228, 1.4385589, 1.8307393}, +{0.0420803, 0.3727090, -0.0107701}, +{0.8182687, 0.0478058, -1.3432561}, +{-1.1694639, 0.0408328, 2.5417483}, +{-0.6763859, 0.2878444, 0.4942393}, +{0.1243685, 0.1374741, 1.5603660}, +{0.1147208, 0.2810107, 1.3634101}, +{-0.1050683, -0.1473220, -0.2015614}, +{-0.0374588, 2.0923102, 0.0942508}, +{0.0205983, -0.4973688, -0.4818447}, +{0.0901658, -0.3304800, -0.0816921}, +{-0.7159080, 0.5326605, -1.4220891}, +{-0.1653469, 0.3636841, 0.9031263}, +{-0.5461826, 0.4525362, -0.4663099}, +{0.0494562, 0.5247145, -1.0797148}, +{-1.0430075, 0.6022653, -0.0255519}, +{0.3322296, 0.0496783, 0.7028545}, +{0.3383897, 1.1464728, -0.0528484}, +{-0.1388978, -1.0296679, -0.9013984}, +{0.3952397, 0.3032584, 0.3052112}, +{1.2931573, -0.5179526, 0.0129111}, +{0.1963011, -1.8124188, 0.7520064}, +{0.2012262, -0.1583487, -0.0001268}, +{-1.4672185, -1.0233493, 0.2545846}, +{1.5884234, -0.9333519, 1.3715085}, +{0.1188830, -0.1980365, -0.0329322}, +{-1.1231089, -0.5790876, -0.7454041}, +{-0.8376367, -0.0093966, -1.2741454}, +{-0.2342198, 0.0214044, -0.6899423}, +{-0.1818339, 1.2116463, 0.1587005}, +{-0.7155569, 0.4653520, 0.2098883}, +{0.1088703, 0.2968089, -0.6740763}, +{-0.6073536, -1.4580518, -2.2816110}, +{-0.0837315, 0.7664710, 1.2745030}, +{0.1859004, -0.3899764, 0.1142633}, +{-1.2068350, 1.4926564, -1.3185608}, +{2.1617467, -2.8792753, 2.0201926}, +{0.2498687, -0.3394863, 0.2944191}, +{-0.7181227, -0.1961430, 1.6538742}, +{-1.2979679, -0.9230468, 0.4094451}, +{0.6271785, 0.1229693, 0.1626972}, +{0.6945609, -0.1687448, -0.1565588}, +{0.9486411, 0.4357619, 0.2690426}, +{-0.2849867, -0.6687477, -0.3323660}, +{1.1012446, -1.9448905, -0.5869515}, +{1.9859772, -1.0816211, 0.5414605}, +{0.3309411, -0.2962353, -0.1247496}, +{-0.4865729, 1.7036346, 0.1238249}, +{-0.0071697, 0.5255533, 1.3408386}, +{0.2602957, -0.2987188, 0.5438851}, +{-1.0732430, -1.8404038, 1.3670008}, +{-0.9691575, 1.2968466, 1.8893991}, +{-0.2919253, 0.0596705, -0.2334005}, +{0.4998415, -0.5654499, -0.1635130}, +{-0.6991338, -0.2797665, 0.4048735}, +{-0.0417730, -0.0829125, 0.2179081}, +{-0.6631536, 2.0286617, -0.5463392}, +{0.1493269, 0.1373899, 2.0563958}, +{0.8031858, -0.2848160, -0.1938312}, +{-0.1967443, 1.9868751, -0.2113771}, +{1.6077106, 0.7962940, 1.3271849}, +{0.3491576, -0.4481419, -0.0900661}, +{-2.9178627, 1.7464836, -0.6685467}, +{1.6453142, -1.0443556, -0.4234403}, +{-0.2318110, 0.0447238, 0.1414759}, +{-0.5539651, 1.9298512, -1.2020015}, +{1.0433639, -2.3831403, -2.9409750}, +{0.0805327, -0.1738526, -0.1206513}, +{0.4744514, -1.1034139, -0.1170066}, +{1.8914403, 0.1751100, 1.5737721}, +{-0.1866357, -0.1965747, 0.0013580}, +{1.3352191, 0.2418026, -0.7325017}, +{-0.2074482, 0.9436374, 1.0509238}, +{-0.0441731, -0.2374072, 0.2654554}, +{-1.4433999, -0.0894649, 0.1726760}, +{-0.1908691, -0.1410689, 0.3854937}, +{0.4591390, 0.1630107, 0.2377752}, +{0.5573815, 0.1490560, 0.1248941}, +{0.6424958, -0.1623725, 0.8088378}, +{-0.6994920, -0.1504917, 0.0586263}, +{0.2837780, -1.2025059, 0.4124582}, +{-0.0899596, 0.8424039, -0.7575055}, +{0.0789143, 0.2707123, 0.0833020}, +{0.8126181, 1.1311893, -1.0460445}, +{-1.4918461, -1.3108680, -0.5690937}, +{0.4302622, -0.4091178, 0.2001499}, +{1.2112682, 0.2046875, 0.4236912}, +{0.0414143, -1.5320696, -0.1577607}, +{-0.1012601, -0.1323000, 0.0981359}, +{0.2046574, -1.2747016, -1.2746091}, +{-2.0603578, -0.3276038, 0.4406177}, +{-0.1841328, -0.0156229, 0.3134860}, +{1.0871761, -0.4058494, -1.3040427}, +{-0.6356373, -0.1624665, -1.7245725}, +{0.3627914, -0.0476817, 0.0575114}, +{-0.1324069, 0.1415620, 1.3400656}, +{0.1827174, 0.2003521, 0.5523353}, +{0.4810228, 0.1076838, 0.2522830}, +{2.9370706, -0.0954038, 0.6264281}, +{0.6254615, -0.5256260, 0.5936072}, +{0.0316204, -0.6257699, -0.4519276}, +{-2.0695536, 0.9822586, 0.1439757}, +{2.7216027, 1.6831150, 0.1612642}, +{0.0445529, -0.0587114, -0.1491662}, +{0.2308819, 0.3221707, 0.2789941}, +{-0.7229702, 0.0310881, 0.5714904}, +{-0.3543544, -0.4229161, -0.3544444}, +{-2.4002826, -0.8784989, -1.9358451}, +{-0.5860401, -1.6998978, -1.1202660}, +{-0.3376758, -0.1529908, -0.0973470}, +{0.8566210, 4.4951420, 2.8346822}, +{0.0436772, -0.0463138, 0.0772055}, +{0.3142985, 0.3843620, 0.3288855}, +{-0.0282029, -0.1860206, -0.7393309}, +{-0.7438108, 1.9849600, 0.7028209}, +{-0.2984794, 0.2821260, -0.0039806}, +{-0.9204457, 1.6704372, -0.8977507}, +{-0.7407014, -1.1821867, 1.7877913}, +{0.2195212, 0.6775700, 0.5270379}, +{1.6921985, 2.8719716, -0.1105642}, +{-0.9518794, 1.5843399, -0.4057731}, +{0.3007457, 0.0797739, -0.6140963}, +{-1.0546741, 3.2550197, -0.0514586}, +{-1.3599000, -0.4638538, -0.5689326}, +{0.2676970, 0.0099802, -0.2383103}, +{0.2229907, -0.2187119, -0.7713270}, +{0.1245931, -0.1537386, -1.1022911}, +{-0.0969429, 0.1980785, -0.1258376}, +{-0.3559177, -1.2704024, 0.1400192}, +{1.3204447, -0.3154615, 0.9846767}, +{-0.5822343, 0.3282806, -0.3363256}, +{0.2881370, 0.8619899, -0.7246667}, +{-0.8985610, -1.9429673, 0.4994654}, +{0.2642694, 0.0123944, 0.0454716}, +{-0.3724296, -3.0207868, -1.8849831}, +{2.8390129, 0.7341321, -0.5308905}, +{-0.1534186, 0.4427960, 0.8403004}, +{0.3607836, -1.3535297, 0.8387313}, +{-2.1323020, 0.7994025, 0.5441847}, +{-0.3715549, -0.1039985, 0.2071384}, +{-0.0269172, -0.7558493, 0.7305308}, +{0.8369414, 2.4781291, 0.6691754}, +{0.4176355, -0.5714498, 0.5489961}, +{1.5257384, -0.9230545, 0.1566381}, +{1.3391705, -2.1163802, -2.3188524}, +{-0.4110014, -0.1204128, 0.1673175}, +{0.8397112, 0.1425286, -0.1012473}, +{-0.7522697, -0.5696055, -0.7970169}, +{-0.5427265, 0.4417031, 0.3231464}, +{0.1184500, 0.7918240, 1.3904865}, +{0.8055788, 0.8408670, 1.0637318}, +{-0.5646585, 0.0173484, 0.0293131}, +{-0.9038788, -1.2464575, -0.7960548}, +{0.1062765, 1.9602034, 1.3337764}, +{0.1391939, 0.0422934, 0.0713286}, +{-0.0666521, -0.2542742, -0.0366458}, +{-0.6944364, -1.8178403, -1.2174358}, +{-0.0608818, -0.3761815, 0.4698532}, +{-0.5657020, -1.8425335, -0.6546760}, +{-0.2814495, 0.0367416, 0.0802845}, +{-0.6730975, -0.4910397, 0.2907047}, +{-0.0325192, -0.4107760, -0.0242306}, +{-1.3324134, -0.6451029, -1.8471091}, +{0.0912769, 0.5089654, 0.1652610}, +{-0.7731411, 1.2183405, -0.3799656}, +{-1.1314965, 0.1250667, -0.1002823}, +{-0.4562131, 0.1235238, -0.1567994}, +{-0.0909345, 0.2590376, 1.2533803}, +{0.5105567, -2.2766349, 1.5168715}, +{0.3537846, -0.5404130, 0.8426592}, +{1.9967562, -0.7133290, -3.4267285}, +{-0.2800933, -1.2731930, 3.2459073}, +{1.0584812, -0.2816274, 0.5952811}, +{0.0896634, -0.1932745, 0.4783768}, +{-0.2539656, 2.2155697, 2.1154668}, +{0.5293364, 0.8424042, -0.5720060}, +{0.9352719, 1.1218857, -0.6451174}, +{0.7291377, 0.8154290, -0.2816033}, +{-0.4218264, 0.0210873, -0.3800801}, +{-0.1526775, 0.9724866, -0.1957258}, +{-0.0597535, 1.2922356, -0.4251021}, +{-0.3818575, 0.7014705, 0.0247835}, +{-0.7392194, -0.5444721, -0.4205907}, +{-1.4152304, -0.8065771, -0.5260974}, +{1.1256009, 0.4991480, 0.1149021}, +{1.7105012, 0.5606990, -0.4032411}, +{0.4516316, 1.2219281, 0.9895386}, +{-0.1806890, 0.2285242, -0.4587750}, +{-0.8645759, -0.4874772, 0.3246976}, +{-0.1050305, 0.6367562, -0.6826100}, +{0.4090428, -0.1910766, 0.1086531}, +{1.0989276, -1.3616424, -0.6030692}, +{2.1074481, -0.8544232, -0.3117257}, +{-0.3725802, 0.0860330, 0.1150405}, +{-0.5086529, -1.6774005, -0.1062901}, +{-0.1353993, 0.7255187, -0.8362586}, +{0.1298556, -0.4293651, 0.3395422}, +{0.2269838, -0.6705311, 1.6363398}, +{0.3243878, 0.3028928, 0.9097213}, +{0.4288998, 0.2681254, -0.3544388}, +{0.4873610, 1.7590406, 0.5235385}, +{-0.5606039, -1.4191737, -0.2097450}, +{0.3870388, -0.1399861, 0.0797949}, +{-1.1184598, 0.9804789, -0.1342112}, +{2.5178926, 1.6618083, 0.3534633}, +{0.0756225, 0.3840773, -0.3764325}, +{-0.8271329, 1.8292952, -0.6255151}, +{-0.1168207, 0.3455733, 0.6372470}, +{0.1194294, 0.4205639, 0.1363528}, +{0.3654031, 1.5376556, -1.3719656}, +{-1.3993702, -3.2567592, 0.0692848}, +{-0.0606605, -0.3240614, 0.1275159}, +{1.6384506, -1.9960431, 0.7017054}, +{-0.8291278, 2.3747303, 0.0281784}, +{-0.0253615, -0.3758703, -0.2675837}, +{1.9031972, -2.6440711, 1.0290570}, +{0.4423905, 0.9294944, -0.6929308}, +{-0.1843192, 0.1737868, 0.2763541}, +{0.1109865, 0.1042268, -0.4985347}, +{-0.0179985, 0.5978048, 0.4580854}, +{0.2362465, -0.7950776, -0.4597905}, +{0.5376987, 0.1708956, -0.4879997}, +{1.7962449, 2.1350670, -0.5359567}, +{-0.8615303, 0.6115624, 0.5579742}, +{-1.1248866, 0.3180189, -0.8759377}, +{0.1928000, -0.5279638, -0.7078079}, +{0.1483086, -0.4060442, 0.1213455}, +{0.0046544, -0.1681650, -0.5256475}, +{0.0959436, -0.3405052, -0.1286223}, +{-0.1120882, -0.4962125, -0.0671635}, +{2.0156083, 0.6606585, 1.1232967}, +{-2.1377892, -1.7454376, -1.2312545}, +{-0.1151508, -0.3292519, 0.4903660}, +{-1.6555532, 0.9710532, -1.5222989}, +{1.6080265, 0.0912841, -0.5777804}, +{0.0786679, -0.0610863, -0.3810616}, +{-1.0303075, -0.1595926, 1.0494283}, +{-1.4975801, -1.3398944, -1.0533723}, +{-0.0479056, -0.2696638, -0.3301456}, +{1.6000353, 1.2549686, 1.3918270}, +{2.0823977, 1.9825615, 0.9892039}, +{-0.2380555, -0.3068946, 0.2657515}, +{0.1277418, 0.4347970, 0.6462319}, +{0.2540981, -0.1985672, -0.4360157}, +{-0.2746695, -0.1064759, -0.1104326}, +{1.7218870, -3.6415401, 1.1294148}, +{-1.6716542, -0.5351039, -1.9838389}, +{0.2873380, -0.2859172, 0.2119091}, +{-0.6798285, -1.7854609, -1.1579233}, +{1.3482976, 0.4627154, -0.8927142}, +{-0.0293049, -0.2728602, -0.3965062}, +{-2.4939141, -1.5540693, -0.8010911}, +{-0.6650036, -0.7372102, -0.9759117}, +{-0.0288995, -0.0730811, 0.0533930}, +{-0.0279839, -0.2011407, 0.6131526}, +{0.1886857, -0.3934399, -0.1063639}, +{-0.0120492, -0.5841720, 0.2398524}, +{-1.5828956, 0.3363243, 0.6882188}, +{-1.5861883, -0.2448012, -0.5048170}, +{0.4475064, 0.3646876, 0.3768864}, +{-0.6642146, 1.9723341, -1.1317384}, +{1.1643288, 1.3168014, 0.9964255}, +{0.1790287, -0.8319654, -0.3038422}, +{0.9809780, -0.9111070, -0.1117166}, +{0.8396344, 1.8756160, -1.6214850}, +{-0.4185068, -0.3354447, 0.0903963}, +{-0.2712748, 0.8100449, 0.4338563}, +{0.2863870, -0.2358233, -2.1097579}, +{-0.0115738, -0.0729377, 0.0846855}, +{-0.8700219, -2.4752393, -0.9674845}, +{0.0147204, 1.7888113, 1.3143852}, +{-0.0648608, -0.8295162, -0.7044052}, +{-1.1154621, -0.7724135, -0.6190951}, +{-0.9071154, -0.3540584, 1.8775876}, +{0.0021851, 0.6646261, 0.1571136}, +{0.3694316, -0.6876050, 2.0709667}, +{0.5496082, 1.4114635, -1.2418826}, +{-0.5012478, -0.3136389, -0.1313355}, +{0.3207036, -1.7452430, -0.4021553}, +{-0.9706793, 0.2772669, -0.0749163}, +{0.5276163, 0.1214517, -0.0447900}, +{0.6571423, 0.6483775, -0.2068788}, +{-0.6240408, -0.1099259, 1.4956752}, +{-0.3873582, -0.3227497, -0.2206017}, +{-1.0148128, 0.4047237, -1.1379207}, +{-0.5705405, 0.0184507, 0.7097415}, +{-0.1302813, -0.1808048, -0.2646863}, +{-1.0176399, -0.5757372, -0.2421686}, +{-0.3831736, 0.3707388, -1.1857501}, +{-0.0120249, 0.6274156, -0.3655988}, +{-1.7755460, 1.5170465, 0.9598688}, +{0.1083452, -1.3240900, -0.1684455}, +{0.2769104, 0.1550207, -0.1194407}, +{-1.9779207, -0.7400711, 1.1979021}, +{-0.3752154, 0.1354124, -0.3368089}, +{0.0770292, 0.2770732, 0.2806656}, +{-0.8199117, 2.3035879, -0.7413441}, +{-0.3167888, 0.9953279, -0.5583706}, +{0.1445103, -0.0531334, -0.0914499}, +{1.6064482, 0.8951194, -1.3239285}, +{0.7803992, 0.9423867, -1.9807590}, +{-0.4677485, 0.2416982, -0.4555058}, +{-0.3647484, 1.0247960, -0.0619486}, +{-0.1804494, -1.4674087, -1.9275825}, +{0.2387173, -0.5706677, 0.7144648}, +{-0.6439866, 0.5459545, -0.0835785}, +{-0.5322099, 0.3797651, 0.1304102}, +{-0.2134842, 0.4595691, 0.0916073}, +{0.1361900, 0.0548453, -0.2702972}, +{0.0759168, 0.6819580, -0.2381646}, +{-0.7477380, 0.2167950, -0.0361219}, +{-0.1997234, 0.0843940, 0.6742962}, +{-1.0638267, 1.0126488, 0.3251344}, +{-0.0287161, 0.3685032, 0.6627153}, +{0.2927418, 1.9055200, -2.0334110}, +{-0.1169094, -0.1142073, 1.3445948}, +{-0.4206590, -1.0892667, -0.1863347}, +{0.7595442, 0.1025411, -0.6347377}, +{0.1907749, 0.2210244, 0.7928779}, +{0.1143080, -0.4586751, -0.5704268}, +{1.0245123, -1.7858685, -2.6408331}, +{0.4836851, 0.5746071, -0.4565241}, +{-0.4827699, 0.4456111, 0.3430980}, +{0.0931147, 0.1592496, -1.3985071}, +{-0.0072752, -0.0220023, -0.4194836}, +{-0.5796382, -0.0475154, -0.1855450}, +{-0.3872371, -1.7428253, -0.7551222}, +{0.0315826, -0.6480781, 0.2688148}, +{-0.5874282, -0.0875469, 0.0463187}, +{-0.5923957, -0.1947587, 1.7799063}, +{0.2312946, 0.2475319, -1.2706620}, +{0.5641048, -0.2481861, 0.5240186}, +{0.0261816, -2.4947145, -1.1587911}, +{1.7608348, -1.2693007, 3.2263803}, +{-0.5083733, 0.2032893, -0.1613234}, +{0.7333117, 0.3023056, 0.2562569}, +{1.1723027, 3.9025340, 1.0625470}, +{0.1622269, -0.6884331, 0.8413754}, +{-0.7375718, -0.9083493, -1.0785823}, +{-1.7185649, 0.0896170, -1.7592167}, +{-0.2075505, -0.0748785, -0.1915358}, +{-0.0241743, 0.7003452, 0.8666585}, +{-2.4531255, 0.7417660, -0.9386693}, +{0.4501871, 0.5413329, -0.0072091}, +{1.8110631, 2.0477555, 0.3398954}, +{-2.2759910, -2.3665044, -0.5387013}, +{0.0733779, -0.1371206, 0.3853897}, +{1.0420384, -0.6176485, -0.4857108}, +{0.0509050, -0.2244190, 0.6014292}, +{0.0287327, -0.9357738, 0.1167291}, +{0.3814189, -1.2490888, 1.3466126}, +{0.0104009, -2.4812217, -0.2612014}, +{0.5770580, -0.3609296, -0.0323963}, +{0.4014660, -0.1011707, 0.0880173}, +{0.2136498, -0.3552507, 0.5978501}, +{0.1839118, -0.0506377, -0.2578527}, +{-0.7818285, -0.1656429, -0.7048721}, +{0.8239673, 1.4180502, -0.6775231}, +{-0.2911166, 0.2764204, -0.3457874}, +{-1.7180716, -0.3311240, 0.5362022}, +{1.3176218, 2.0183010, 0.4486347}, +{0.4689183, 0.1457495, -0.0206104}, +{-0.4776118, -1.6178166, 0.0380418}, +{-0.1496455, -0.5695428, -0.1371751}, +{0.5024773, 0.6058019, -0.1998769}, +{0.6603820, 0.6930051, 0.6372589}, +{0.9063758, 0.8917979, 0.5760033}, +{0.6421225, 0.6355802, 0.2973920}, +{-1.0687649, -0.9829665, 0.1538063}, +{-0.8526824, 1.4587477, -0.2966757}, +{0.0223462, 0.3008253, -0.2545978}, +{-1.4571317, 0.3766635, -0.3238012}, +{1.5459518, 1.5656438, -0.2944209}, +{-0.5556840, 0.0515023, -0.2577583}, +{1.3412727, 0.5881845, 1.7111564}, +{-1.4108151, -1.1496933, -0.5554047}, +{0.0045956, 0.2395171, 0.5065791}, +{0.4999195, 0.0637357, 0.9717458}, +{-0.0726863, 0.6653396, 0.1922251}, +{-0.1311285, -0.3149459, -0.1719224}, +{1.3888628, 1.4637512, -2.5333731}, +{-0.1213752, -0.8988352, -1.2517107}, +{0.2472762, 0.3650832, 0.2229694}, +{-0.0416910, -0.9376362, 0.8655400}, +{0.7907557, -0.4510517, 0.6592118}, +{-0.6397190, -0.4813672, -0.2047828}, +{-0.4087202, -1.0854791, -0.5484434}, +{-0.2506976, -0.6711457, -0.5203046}, +{0.2478454, 0.1736772, 0.2481167}, +{0.2287339, -0.7076337, -0.6379371}, +{-0.0392147, -0.4983051, 1.0891336}, +{-0.2133567, 0.2331813, 0.1998139}, +{-0.0792124, 0.5442614, 0.4720795}, +{0.6642052, 3.1903918, -0.9965443}, +{0.0904558, -0.1705763, -0.7270536}, +{0.9900735, 0.2333332, -0.9286861}, +{-1.9781489, -0.4937010, -0.4627864}, +{-0.1216439, 0.2876896, 1.3267334}, +{1.7290910, 2.9619906, 0.5600885}, +{0.5650162, 0.0353873, 0.6903539}, +{0.2920525, -0.3953127, 0.4534266}, +{2.4108098, -0.3961264, 1.7922213}, +{0.5278275, 1.2777495, 1.1654654}, +{-0.9360039, 0.5472942, 0.4653981}, +{-1.0688560, 2.0479159, -1.2617427}, +{-0.0728828, 1.8936592, -3.9346206}, +{-0.1031497, -0.2492748, 0.5487663}, +{0.7925220, 0.7190643, 1.7149022}, +{0.9006867, -1.5110803, -0.1062050}, +{-0.3657721, 0.2027529, -0.2533348}, +{-0.4350386, 1.0778517, 0.9415602}, +{-2.0702777, -0.0731439, -0.6239682}, +{0.3147205, -0.4098002, -0.3409688}, +{-1.5979522, -1.5614549, 0.5054327}, +{-0.1555167, -2.0362530, -0.3715915}, +{-0.2007851, 0.6768172, 0.2985771}, +{0.5494673, 0.1601586, -0.1047192}, +{-0.0960968, 0.7577488, 0.3337031}, +{0.6541576, -1.0118519, -0.2828183}, +{1.1880411, 1.4107165, -0.3248726}, +{-1.7504393, -0.3779505, -0.3790764}, +{0.2675515, -0.0044660, -0.5054805}, +{0.0930980, 0.4952496, 0.0303781}, +{0.0629057, -0.4397722, 1.0745928}, +{-0.4885741, 0.2579194, -0.0778611}, +{0.1632805, 1.3446612, 0.4088346}, +{-2.0047815, 0.6425509, -0.7499821}, +{0.4099120, -0.2162988, 0.3348934}, +{-0.0501539, -0.8605592, 0.5752473}, +{0.0653123, -1.1423181, 0.0200922}, +{-0.0962061, 0.1164308, 0.0176556}, +{-0.7279596, -0.9186597, -0.5732951}, +{-0.0782537, 0.4041039, 0.5243942}, +{-0.6958156, 0.1896553, 0.1482043}, +{-1.2049183, 1.7864807, -0.6340004}, +{-0.1822296, -0.7430115, 0.6273355}, +{0.4621048, 0.5747295, 0.4581633}, +{0.9755961, 2.0120721, 0.5746648}, +{-0.0509419, 1.0090145, -0.5811506}, +{-0.5385144, -0.1793862, -0.1812292}, +{2.5106833, -0.9608070, -0.9450576}, +{-1.4662577, 0.9597332, 1.0850371}, +{0.0384686, 0.6940241, 0.1179197}, +{-0.2129690, 0.6405184, 0.2064315}, +{-1.6216201, 0.3945326, 0.8845551}, +{-0.1326199, -0.2165685, -1.0582020}, +{-1.7355144, -2.6855524, -0.0841889}, +{1.9436344, 0.2477178, 0.4845693}, +{0.0159514, -0.0874918, 0.0755089}, +{-0.6708868, 0.6941916, -0.5396923}, +{-0.2529831, 0.8562879, -0.6597840}, +{-0.3966585, 0.1449992, 0.4314371}, +{-1.4822278, -0.5526297, 0.6686401}, +{0.6631591, -1.5461792, 0.0220727}, +{-0.5075291, 0.2605782, -0.2427005}, +{-0.9278137, -2.1222203, 1.2659264}, +{-0.6702179, 0.5327005, 0.9321823}, +{-0.2936811, 0.4471016, -0.0679108}, +{2.0285032, -0.5747636, -0.9899016}, +{0.6486916, 1.2817971, 0.4961734}, +{0.1220119, 0.2202735, -0.0195380}, +{1.8924577, 0.1806105, 0.2367189}, +{1.0686779, -0.0524534, -0.2435704}, +{0.1246269, 0.0249204, -0.0864869}, +{-2.6346996, -1.5761060, -1.8098959}, +{1.1744313, 0.5186895, 1.0227653}, +{-0.1206008, 0.3020298, -0.0446507}, +{-0.1809819, 0.0069468, -0.0961339}, +{-0.1900747, 0.0687461, -0.1166391}, +{0.4235168, -0.1354770, -0.0378911}, +{0.7577213, -0.5061796, 0.1528046}, +{0.4534358, 0.5500777, -0.7641627}, +{-0.8526109, 0.1675639, 0.6147290}, +{-0.9621929, -0.6056041, 1.0721420}, +{1.0512532, -1.6054955, -3.1321812}, +{-0.0489712, 0.0061946, -0.2572442}, +{-1.0615182, 1.3974590, -1.5627782}, +{-0.0166819, -1.9087529, -1.3830503}, +{0.2878510, 0.0728727, 0.0117204}, +{0.3478831, 0.1542938, 0.6262047}, +{1.3148408, -1.5552021, 1.6187809}, +{-0.4634721, -0.0250706, -0.4853891}, +{-0.5913132, 0.8454204, -1.4767524}, +{-1.0302474, 2.3538275, -0.2006505}, +{-0.0184647, 0.7669418, 1.1072351}, +{1.1901509, 0.0974018, 0.2551078}, +{-1.2220565, 1.4099977, 2.3064020}, +{-0.0062168, -0.1196021, 0.3338327}, +{0.4431188, 0.2678941, -0.9337452}, +{-1.4270200, 0.6710474, 0.5939987}, +{0.0420940, -0.0267296, -0.2268798}, +{-0.0632944, 1.2091922, 1.0222750}, +{-0.6536801, -1.9798430, 0.5617853}, +{0.0998024, -0.6474744, 0.3651051}, +{0.5790746, -0.9678676, 1.6352606}, +{0.5915990, -0.3450723, 0.1313806}, +{-0.7542649, 0.1129151, 0.1000805}, +{-1.8027197, -0.8199614, 0.1729337}, +{1.9305596, -0.2292191, 0.9563832}, +{0.4344710, -0.5465866, -0.0316753}, +{0.3123496, 0.8160999, 0.8936777}, +{-0.4728950, -0.8080313, 1.4018562}, +{0.6276084, -0.0016350, -0.1117846}, +{0.9931358, 1.3879637, 0.8743017}, +{1.0207120, 0.0657278, -1.1743382}, +{0.1619931, -0.1024326, 0.0937419}, +{0.3180248, 0.9032379, 0.5537096}, +{-0.4261253, 2.6898873, -0.0489018}, +{0.5232675, 0.5048167, 0.7344849}, +{1.4210351, 0.5483748, 0.0452680}, +{0.0143798, -0.0691210, 0.0810684}, +{0.4294192, 0.7324024, -0.0082809}, +{0.5578029, 0.0417751, 0.0348604}, +{0.4910645, 1.1223462, 0.0100009}, +{0.0799530, -1.0760900, 0.3549560}, +{-0.0536228, -0.7009214, -0.3362055}, +{-0.5438069, -0.4650533, 1.4558173}, +{0.1051633, 0.3451436, -0.0460200}, +{1.9935627, 0.9394432, 0.9642833}, +{-0.4528536, -0.1786502, 0.3352141}, +{-0.5991598, -0.0838078, 0.0970775}, +{0.1695312, 0.9471599, 0.3543916}, +{-1.6822418, 0.6872265, -0.1857792}, +{0.3858924, 0.2046919, -1.0853095}, +{-0.8596687, 2.3568258, 1.6267102}, +{-0.5045458, -0.0729235, 0.0459361}, +{0.6284422, -1.0192249, 0.0963944}, +{-0.5172116, -1.5094079, -0.4206231}, +{-1.2537881, 1.1635418, 0.0083325}, +{0.3028435, -0.6887947, 0.1333614}, +{-2.0041785, 0.0334768, -0.0201860}, +{-1.9642664, 0.5071329, 0.8378083}, +{-0.2620850, 0.0290688, -0.4039897}, +{2.0317256, -0.3730173, 0.4128231}, +{0.5062681, -0.7662380, -0.8661042}, +{0.3788313, -0.1222697, -0.2975189}, +{-0.3532661, -0.3484318, -1.3523638}, +{0.4544838, -0.1727787, -0.8750522}, +{-0.8397819, 0.7882631, -0.7200504}, +{-0.6082757, 1.1063069, -1.0049216}, +{-0.5397316, 0.8575091, -0.9645947}, +{0.1183377, -0.7251801, 0.4788089}, +{-1.5081551, 1.1400372, -2.5724635}, +{0.0880075, 2.0159881, 1.2291543}, +{-0.0740543, 0.2049074, 0.3368143}, +{0.0768263, 0.5414498, 0.7226129}, +{-1.5296005, 2.0622995, 1.5468980}, +{0.1396170, 0.3841613, 0.2034242}, +{1.4533156, 1.4930223, 1.3633511}, +{-1.8279350, -1.3113228, -1.7624665}, +{0.5484911, 0.1350848, -0.0805405}, +{0.0936660, -0.3812419, -0.3436798}, +{-0.1889361, 1.8312349, -2.9749336}, +{-0.3229899, 0.2515141, -0.5058979}, +{-0.1358183, 0.4249487, -0.3998701}, +{-0.3390605, 0.4336304, -0.6500424}, +{0.1666227, 0.1183850, 0.0625430}, +{0.9783803, 1.8006523, 1.6076189}, +{-1.6294143, -0.9719087, 1.3311400}, +{0.9115926, 0.2928475, 0.1998468}, +{0.7035761, 0.8010129, 0.0275981}, +{0.8571974, 3.4427328, 0.7010845}, +{-0.2997963, -0.4493451, -0.0307683}, +{1.5317101, -0.2873513, 1.4817172}, +{-1.0874724, -0.2871766, 0.0877547}, +{0.4040494, -0.6082664, -1.1973451}, +{-1.6685420, 0.0216910, -1.5668066}, +{0.8361052, 0.6182820, 3.1936123}, +{-0.9287706, 0.1068001, -0.4259240}, +{-0.2355944, 1.1718451, 0.6750979}, +{-1.5557357, 0.9892662, -1.0313249}, +{-0.0979675, 0.2831776, 0.5915201}, +{-0.7153503, -1.4448709, 1.4770329}, +{1.6560863, 0.4368499, 0.2376872}, +{-0.4515944, 0.5441716, -0.1561876}, +{0.1751060, -0.1159138, -0.6489440}, +{-0.8983976, 1.6260513, -1.1078227}, +{0.2689852, -0.3966255, 0.1420892}, +{-1.9064837, -0.5751402, -0.3919129}, +{-2.3102925, -2.5866795, -1.6262082}, +{-0.0172078, 0.3720778, 0.2099063}, +{1.3712870, 0.6646250, 1.8526826}, +{-0.2016302, -0.0983407, 0.8863665}, +{-0.0724852, -0.5409880, -0.1763042}, +{1.0414648, 0.9983483, 2.0752156}, +{-2.1019931, -0.3627156, 1.4446261}, +{0.1769724, 0.4729883, 0.6772742}, +{0.3125473, 0.3620763, 1.0973579}, +{-0.0371385, 0.2322066, 0.8364484}, +{-0.1613040, -0.2620757, -0.2569445}, +{-2.2559087, -1.7747374, 0.5973684}, +{-0.8588541, -1.4293799, 1.2074132}, +{0.0304699, 0.4706365, 0.2924025}, +{0.4877877, -0.4405352, 1.8307768}, +{2.0885613, 0.0379184, -1.8188802}, +{0.0740331, 0.4897541, -0.3967260}, +{-0.8889415, -0.5428897, 1.4722157}, +{-1.3586863, 0.2937176, 0.7478541}, +{-0.2450747, -0.1470140, 0.1792537}, +{-0.6562713, -0.2482109, -1.6881099}, +{-1.2947989, 1.1888698, 0.2909205}, +{-0.4733354, 0.1256735, -0.4475741}, +{-1.1302060, -0.1858992, -0.4109699}, +{0.7272552, -0.0600975, -0.0755262}, +{0.1759815, -0.1152923, 0.4950674}, +{1.4555954, 3.1599369, 1.0980743}, +{0.7639304, -2.2835431, -1.9383806}, +{-0.0151634, -0.1461978, -0.0723898}, +{-0.6230296, 0.2769712, 0.6596333}, +{-0.5590293, 0.6518141, -0.1338007}, +{-0.1701388, -0.0811140, -0.2851782}, +{0.5220708, 0.5652866, 0.6871241}, +{-0.9684417, 0.9273598, -0.6897836}, +{0.0747983, -0.0698491, -0.8042133}, +{1.2378569, -1.5453349, 0.8258891}, +{-1.2840354, 0.3716991, 0.7589560}, +{-0.0003867, -0.3035625, 0.3491605}, +{1.6129618, 1.6912571, -0.5594044}, +{-1.0754962, 0.4910495, -0.8879585}, +{-0.0052262, 0.1463952, -0.2062694}, +{-1.3676133, -0.4533890, 0.7213395}, +{1.5369675, 0.1867791, -0.6485514}, +{-0.7162792, -0.5250033, -0.8768279}, +{-0.1257063, -0.8207173, -0.3108927}, +{0.4422699, -1.0142028, -0.1185792}, +{0.1461655, -0.4889517, -0.7606444}, +{0.1277210, -0.7074326, -1.0483857}, +{-0.4863150, -0.5020490, -0.4203027}, +{-0.2430001, -0.4877402, 0.4610132}, +{1.1148614, -2.1291993, 0.0927693}, +{-1.2554029, -2.3351216, 0.2434097}, +{-0.2053048, -0.0787527, -0.2083896}, +{0.5002351, -0.5466514, -1.0731102}, +{-0.1513285, -0.0905989, -0.2023074}, +{0.6007293, 0.6420060, -0.2315201}, +{1.0522437, 0.1508992, 0.5898951}, +{-0.3144117, -2.0034485, 1.1998167}, +{0.6745151, 0.1231740, 0.6246113}, +{2.4409425, -0.9489883, -0.1815583}, +{1.4819777, 1.3585385, 1.0801462}, +{-0.1538212, 0.0424042, -0.1556802}, +{-1.1998219, -0.5144755, -1.3283106}, +{-0.5603629, -1.6040851, 0.1535652}, +{-0.3893014, -0.2531819, 0.2372292}, +{0.8894876, 1.2872430, -0.4367198}, +{-0.3544282, -0.8271856, 0.9586511}, +{0.0920316, 0.7787223, -0.2435136}, +{0.4973735, 0.4494188, 0.0051523}, +{-0.3510092, 1.9341111, -2.8404565}, +{-0.0558243, -0.5524080, -0.7721931}, +{1.8793273, 0.1912207, -0.3202873}, +{-1.4635324, -1.1236511, -2.0355403}, +{0.0992195, -0.5733134, 0.6257173}, +{0.1489292, -0.4729998, 0.7971892}, +{1.8292041, -1.7319494, 2.2473834}, +{-0.1504988, 0.0895423, -0.0006107}, +{-0.7853769, 2.4470913, -0.0877524}, +{1.4080110, -0.9529006, -0.1259507}, +{0.1119386, 0.3061504, 0.2687672}, +{-0.7954338, 0.2216635, -1.4515017}, +{1.9455783, -0.4829055, -0.9586266}, +{-0.3571868, 0.4605661, -0.2279585}, +{-0.3116943, 0.9259317, -1.8483902}, +{-1.4457235, -1.6434989, 0.2593035}, +{-0.5998355, -0.2388222, 0.6753169}, +{-0.0331422, -0.3642513, 1.4794124}, +{-2.5966220, -0.9495132, -3.9656167}, +{0.1673737, 0.0824089, -0.0308628}, +{-0.0243313, -2.0001829, 1.3771359}, +{-2.2811368, -2.5676489, -1.4988635}, +{-0.4638150, 0.0725238, 0.0422028}, +{-0.8498752, -0.3055201, -1.9383314}, +{-1.1130896, 1.4423227, 0.2800651}, +{-0.7342439, 0.1800840, -0.0865830}, +{-0.3295042, 0.1630732, -0.0841739}, +{-1.9711944, 1.0841630, -0.5017937}, +{-0.1144506, 0.2968848, 0.1121399}, +{0.2263464, 0.7647604, 1.0883456}, +{0.4050767, -0.5867677, -0.1536604}, +{0.0383008, -0.1061127, 0.2620153}, +{-0.7159438, -0.3595225, 0.1906409}, +{1.4953825, 0.7992514, 0.3727340}, +{-0.0865242, 0.4965691, -0.0387025}, +{0.1064324, 2.4653594, -0.6835722}, +{0.7033587, 1.1007611, -0.6717817}, +{0.4946738, 0.3959958, 0.0063729}, +{0.6312544, -3.1784923, 2.0824366}, +{0.5884568, 0.7381170, 0.2175841}, +{-0.3221776, 0.1241037, 0.2152809}, +{-1.8730204, 0.1354688, 0.9102585}, +{-0.7649490, 0.6463721, 0.4496960}, +{-0.0689384, -0.0436685, -0.7261282}, +{2.1674743, -1.0919493, -3.0482585}, +{-1.7260618, 0.3555451, 1.1184113}, +{-0.2787759, 0.0869571, 0.3580036}, +{-0.3879165, 1.0833948, -0.4385405}, +{-0.1459326, 0.0138437, 0.3055888}, +{0.2656147, -0.1721125, -0.1493279}, +{0.1326708, -0.2612583, 0.4299371}, +{2.2340701, -0.5996916, -1.5929811}, +{0.2444561, -0.1169751, 0.3746914}, +{-0.5404827, -5.0598779, -0.0151955}, +{-2.3959954, -1.8315334, 4.0625925}, +{0.0825014, -0.1065096, 0.0518080}, +{1.2566386, -1.0225521, -0.2514191}, +{0.1219118, 1.6772835, 2.0768209}, +{0.0636380, 0.6395640, 0.0070311}, +{-0.8859341, -0.4324053, 0.1775853}, +{-0.6689453, 0.7195464, -0.9794035}, +{0.3811644, -0.2572593, -0.1443813}, +{1.2162232, -0.4877337, 0.5625060}, +{0.0635135, -0.4352696, -0.4769922}, +{-0.4386476, -0.1708216, -0.0274682}, +{-1.3499842, 0.6895011, 0.0753872}, +{-0.5359483, -0.2138547, 0.0809453}, +{0.2740146, -0.4699731, 0.3878778}, +{2.4631681, -0.8505727, 2.3709214}, +{1.0533570, -0.7977022, 2.3490396}, +{-0.1429513, -0.8871351, 0.0085903}, +{-1.7080586, -1.5354165, -1.4467106}, +{-0.2759694, -1.1215115, -0.9392510}, +{-0.1524666, -0.5653043, -0.1113532}, +{-0.0270050, -1.0401520, -0.1179379}, +{-1.1183279, -1.7013677, 0.3438580}, +{0.6442749, -0.1532268, 0.0907051}, +{0.0151216, 0.3167144, 1.2448361}, +{-1.0282609, 1.1287842, 0.0126965}, +{-0.1609591, -0.4670499, -0.1846146}, +{-1.0645536, 0.0150237, 0.6510780}, +{1.4370917, 0.1002747, 0.0813195}, +{-0.0133170, 0.1575730, 0.0310994}, +{-0.4517334, -0.4137699, 0.8565664}, +{-0.2773663, 0.3614351, -1.1792644}, +{-0.0563665, 0.1004595, -0.6348271}, +{0.4699123, 0.2588984, 0.7601516}, +{0.5550365, -0.0424870, -1.3253018}, +{-0.0133301, 0.0092346, -0.0797830}, +{-0.2491377, -0.7505072, -1.9066180}, +{1.0109019, 1.2689916, 1.2987455}, +{0.5091430, -0.1087267, 0.0074857}, +{1.1598519, -2.1482158, -0.6773111}, +{-0.2063361, 1.2358809, -0.1686035}, +{-0.0415009, 0.3571159, -0.8942651}, +{0.6746652, -1.3781649, 1.3304154}, +{0.0150649, -0.2430996, -0.3149388}, +{-0.0746634, 0.5137416, -0.0770948}, +{0.3931600, -0.7831559, -0.4544498}, +{-0.1045937, 0.3412516, 0.0537042}, +{0.4933578, -0.3871075, 0.1791098}, +{2.2799013, -2.4466617, -1.1210489}, +{1.8275158, -3.0976219, -0.2099827}, +{-0.1484346, -0.0077943, 0.5104930}, +{0.2912205, 0.0167001, 0.7964996}, +{-1.0294212, -0.0259235, -0.1916656}, +{-0.3813719, -0.5602254, -0.2028247}, +{-0.1040056, -0.5230039, 1.7021213}, +{-0.5058908, -0.6168824, 0.3263265}, +{0.4841407, -1.0062397, -0.0132921}, +{-1.7313143, 0.8069175, 1.1845553}, +{-2.8063784, -1.1351628, 1.1256739}, +{-0.4032157, 0.1097968, 0.0451004}, +{-1.4811947, -0.0160286, 0.3747717}, +{-0.0302786, 0.8386152, 0.1912695}, +{-0.0078883, -0.1874917, -0.5720541}, +{0.8579852, 0.2250136, -0.6560830}, +{0.1919637, -0.5729259, 0.3951556}, +{-0.0263627, 0.4748738, -0.1150798}, +{-0.3086928, 0.2296063, -2.7179482}, +{-0.1963928, 0.4623427, -1.1539925}, +{0.3414001, -0.2271301, -0.2984318}, +{0.0898680, -1.5341444, 0.5598091}, +{0.7106271, -0.7794825, -0.6217053}, +{-0.1293487, -0.3428493, 0.7448785}, +{0.3917051, -0.6007762, -1.3985732}, +{-0.6083800, -0.9923139, 2.9101422}, +{-0.3410721, 0.7678265, -0.2812357}, +{-0.0530122, 0.9253934, 1.8518695}, +{0.3671373, 0.5389797, 0.4795219}, +{-0.3502986, 0.1309766, -0.0288394}, +{-0.6063095, 0.9062058, 1.1951705}, +{0.7044263, 0.7787728, -0.7305159}, +{-0.7133009, 0.5966861, 0.2712182}, +{-4.2625732, -0.5467063, 1.1796608}, +{1.1217407, 0.2348274, -0.8209032}, +{0.8465682, -0.1397764, -0.1516647}, +{-0.4968221, -1.4188758, -1.4430399}, +{-1.3108801, 0.0790019, 0.2047641}, +{-0.1848867, 0.1353077, 0.1923310}, +{-3.4273348, -0.9886772, -0.5613465}, +{1.7880903, 0.1013947, -0.8688565}, +{0.4259063, 0.2862673, -0.5593183}, +{-0.1032524, -2.5916021, 0.4381824}, +{0.3632469, 1.5316659, -1.3006135}, +{0.5876170, 0.0844997, 0.0357410}, +{1.2548182, 1.0881357, 0.2318727}, +{0.5434791, 0.0047852, -0.1732378}, +{-0.6110012, -0.5113117, -0.4505348}, +{-0.2230034, -2.0063846, -1.1541617}, +{-0.8783473, -0.0970165, -0.3476603}, +{0.1708959, 0.5663093, 0.2468236}, +{-1.5206792, 0.4050083, -1.6414940}, +{1.4326928, -1.1548353, 1.6772214}, +{-0.4678928, -0.1033931, 0.7851334}, +{-1.7098846, -0.6368123, 1.6184266}, +{-0.3384867, 0.4502261, 0.7879426}, +{-0.1872575, -0.0539059, 0.7743368}, +{-0.4571488, -0.5855135, -0.3769014}, +{-0.3204014, -0.8494969, 1.5894504}, +{0.2058301, 0.0447069, 0.1120214}, +{-1.1632720, 1.8394836, -1.6125537}, +{-3.3558908, -2.9813375, -1.0306967}, +{-0.1740287, 0.4310387, -0.3180245}, +{0.9751602, 2.6817889, 1.5377711}, +{-1.6434842, -1.8214968, 1.8242973}, +{0.0184408, -0.0460715, -0.8611053}, +{2.0392048, -2.3329382, -0.5772495}, +{-0.7925140, 1.5643733, -1.5983464}, +{0.5473530, 0.1460869, -0.7072503}, +{0.2449435, -0.2425435, 1.1149036}, +{1.7940990, 1.6485943, -0.4640068}, +{0.3145245, -0.3325312, -0.0544566}, +{0.6621751, -0.0097260, -0.3718347}, +{-0.7395169, -1.1838349, -0.7801086}, +{-0.1700000, -0.9004700, -0.3642338}, +{0.0729174, -1.6716883, -0.3499304}, +{-0.4020687, 0.5866114, 0.8686238}, +{0.0713518, -0.0632844, -0.8587257}, +{-0.6228179, 0.3299691, -1.5073696}, +{0.6360821, -0.1751452, -0.2457427}, +{0.0839259, -1.0554180, -0.1180097}, +{0.1271901, -0.4018731, 0.1420147}, +{-0.2980633, -3.2667911, 0.3643206}, +{-0.0189906, -0.0371089, 0.3131899}, +{1.1690191, 1.9724002, 1.8350645}, +{0.0577194, 0.5326909, -0.2229004}, +{-0.4513277, 0.1538666, 0.0379503}, +{3.2021461, 1.0391836, -1.7942872}, +{-1.5631291, 2.8880899, 3.0492506}, +{-0.4032629, -0.1482417, 0.1465789}, +{-0.7129019, -0.4016533, 0.1859241}, +{-0.4941199, -0.2207631, 0.2180329}, +{-0.3676155, 0.2152157, 0.2450814}, +{-0.3769266, -0.1152559, -1.4715295}, +{-0.8542677, 1.4017730, -0.1509733}, +{-0.1203067, -1.1473116, 0.3920550}, +{0.0564389, -1.5168381, -0.4434991}, +{-0.8228979, -1.4596673, 0.7058583}, +{-0.2377279, -0.1048840, -0.2946626}, +{-0.2220450, -0.0794847, 0.3374262}, +{-0.4204332, 0.8833821, -1.0572069}, +{-0.0487189, -0.7390435, 0.3023879}, +{-0.3313715, -2.5645354, -2.2282236}, +{-0.7539145, 0.7703640, 2.0438766}, +{-0.6950908, -0.3384748, -0.3613007}, +{0.1107293, -0.7629854, -0.5249125}, +{-0.0600292, -1.3284693, 0.0801795}, +{0.1905475, 0.0046461, 0.1924166}, +{0.6823577, 0.4777435, 0.5921394}, +{1.9389360, 0.1581619, -1.2203281}, +{-0.6990853, 0.2534345, 0.2217397}, +{-0.1883084, -0.2376204, 0.3465250}, +{-0.7751147, 0.3180009, 2.6626630}, +{0.4587756, 0.7875891, 0.0102887}, +{-0.7369061, 0.5090522, 0.9599596}, +{1.4701849, 0.1600342, -0.4502756}, +{0.0120958, 0.3879089, -0.1357136}, +{0.4152449, 0.8797461, -0.3672922}, +{1.2002404, -0.2363263, -2.2390356}, +{0.1199916, -0.4148001, -0.0900153}, +{1.1006804, 0.2439329, 2.3812737}, +{-1.1427305, 1.4711945, 0.6475029}, +{-0.4776305, 0.6956913, -0.1026070}, +{0.2500608, 0.2645063, 0.9939335}, +{-0.6994237, 0.6256498, -0.6092173}, +{0.1301987, 0.2909241, -0.1079872}, +{-0.3818280, -2.3859499, 3.1221461}, +{-0.0518047, 0.6728105, -0.8193471}, +{0.2231384, -0.1945435, 0.1111792}, +{-0.0854907, -0.2164667, 0.6216857}, +{1.7537568, -1.4216133, -2.3689878}, +{-0.5997742, 0.4938809, 0.1665092}, +{-0.7617159, 2.4203801, -0.9018137}, +{-0.3631326, -1.1541814, -1.4236598}, +{0.2678425, 0.3168043, -0.4739983}, +{1.2442085, -0.8961097, 0.6770021}, +{0.2344146, -1.1424094, 1.8335809}, +{-0.6105536, -0.3913930, 0.7418756}, +{-1.6189715, 1.4696223, -0.2810023}, +{-1.0635419, 1.1223671, 0.4774674}, +{0.3516184, 0.1482810, -0.2753026}, +{0.4220593, -1.8060484, -0.7805796}, +{1.2127202, 2.8069582, -0.2621439}, +{-0.2024512, 0.9022920, -0.2841470}, +{-0.4734941, 0.0518528, 0.1670933}, +{-0.3072743, 1.0121731, -0.4040352}, +{0.1021592, -0.2732935, -0.6369759}, +{-0.7359254, -0.9807759, -2.5877972}, +{0.2917910, 0.3166210, -0.4470776}, +{-0.3982046, 0.3167405, -0.3659052}, +{-1.7700021, -1.0588946, 0.9186609}, +{1.2472603, 2.7536688, 1.7957426}, +{0.2890026, 0.5810522, 0.7444463}, +{-1.7980118, -0.8011103, -0.5469471}, +{2.2319002, 0.2486596, -1.7051699}, +{0.5398598, 0.3704197, -0.1567266}, +{0.3083899, 0.3977441, 0.1351819}, +{-2.3275244, 0.4027269, 1.6086690}, +{-0.4400217, 0.6981303, -0.0670329}, +{-0.4776775, 1.5788492, 0.0825036}, +{0.1802054, -2.7425990, 1.0835762}, +{-0.3854387, 0.5364287, 0.0898802}, +{1.2136480, -0.0264963, -1.2469928}, +{-0.4976297, -0.8366488, 1.3644434}, +{-0.3578638, -0.2157005, 0.0419456}, +{0.5271105, 0.3382364, 0.4409994}, +{0.8272406, 0.3293103, -0.9168450}, +{0.1875479, -0.6164141, 0.4342974}, +{2.6333239, -2.2381706, -0.8084950}, +{-3.3412673, -2.2538083, -0.5426984}, +{-0.4978231, 0.2974142, 0.4479316}, +{2.7768898, 0.8187923, -1.0874169}, +{-0.6501362, 0.8644630, 2.2513499}, +{0.0068109, -0.4241377, 0.0572952}, +{-1.0888188, -1.5376682, 0.3783700}, +{0.0441744, -0.2746004, 0.1413431}, +{-0.2805978, -0.1189067, -0.7802793}, +{-0.7422571, -0.2942031, -1.1071647}, +{1.1433485, 0.0372024, 0.3120470}, +{0.3415855, -0.0064405, -0.1943550}, +{0.4760248, -2.1790509, -1.8576199}, +{-2.0753047, -0.3323979, 0.0106101}, +{0.5810882, -0.3080234, 0.0218148}, +{-2.0533283, -1.9948022, -2.3189771}, +{-2.0977261, -0.8635808, -1.7658339}, +{-0.0556006, -0.4028431, -0.1145035}, +{-0.8196300, 0.6013172, 2.6801827}, +{-0.9448756, -1.1554872, -0.3737134}, +{0.2439993, -0.4447089, -0.4141581}, +{-1.9118127, -0.5428226, 1.5469441}, +{1.7553388, -0.1835105, -1.9875926}, +{0.3570541, -0.1213805, -0.1528078}, +{0.8007840, -0.0774982, 0.0260091}, +{-0.7856640, -0.7738584, 0.0220996}, +{-0.4243975, -0.4362427, -0.4819456}, +{-0.3275354, -1.0943309, -0.3285370}, +{0.1281350, 0.9064230, 0.7942848}, +{-0.1312412, 0.0147964, 0.1793573}, +{0.1348493, -0.9020844, -1.0268060}, +{2.1472769, -1.8806421, -1.6308359}, +{0.3907004, 0.5219548, 0.1135313}, +{0.4094561, -0.8007862, -0.2260797}, +{1.3640114, 1.5880396, -0.6807774}, +{0.1533283, 0.0558160, 0.3574280}, +{-1.3384002, -0.0287019, 0.3729821}, +{-1.2631186, 0.3254875, 0.2334508}, +{-0.7660232, 0.3684974, 0.4343930}, +{0.0382941, 2.4209304, 1.6565881}, +{0.7406048, 2.3176501, 4.0104694}, +{0.0245845, 0.2596716, 0.0423425}, +{-0.5429582, 0.7078307, -1.1095539}, +{-0.1383518, -0.0030851, -0.4794541}, +{-0.2721680, 0.1152263, 0.6742490}, +{-0.5714346, 0.1459546, 0.5207702}, +{-0.1874640, 0.4117512, 0.8160056}, +{-0.1587321, -0.0874138, -0.2391952}, +{-1.1620744, 0.7692071, -0.3806753}, +{1.0157037, -3.6637421, 3.4502811}, +{-0.1196860, -0.2237165, 0.3665499}, +{-0.7513081, -0.1349108, 0.2548151}, +{-0.0633997, 0.0288818, -0.0566376}, +{-0.0627513, 0.1879723, 0.5904409}, +{0.7064983, -0.7528642, -3.1902597}, +{1.6425140, -2.2264388, 4.1384745}, +{-0.3593427, 0.1635942, -0.2373783}, +{3.6533060, 0.3166709, 1.8474677}, +{-1.0562822, 0.2059910, -0.6404226}, +{-0.0371597, -0.5301757, -0.5653467}, +{0.4176633, -0.6298450, 1.4439236}, +{-1.9420477, -0.0028861, 0.0016794}, +{-0.0506380, 0.1778404, 0.1182914}, +{1.1812309, 0.6636416, -1.7413652}, +{0.4317467, -1.7363037, 0.9821585}, +{0.4157717, -0.0973491, 0.7737355}, +{0.9667376, -0.7467870, 1.6470776}, +{-0.2312093, 0.3063082, 0.5885255}, +{0.2032058, -0.2090829, -0.7738289}, +{-1.0672023, 0.2221961, 0.1279255}, +{-2.3424938, 0.7373233, 1.1348020}, +{0.1563354, -0.6882868, 0.0944632}, +{0.8974662, -1.0004556, -0.1425355}, +{0.3872702, -0.3908966, 0.6433260}, +{-0.3463271, -0.9821521, 0.0837723}, +{0.2895809, 0.0479703, 0.5959830}, +{0.6009442, -0.0287300, 0.3036390}, +{-0.2491309, -0.5438557, 0.0989290}, +{0.3709829, 0.3903061, 0.6213317}, +{-0.1872187, 0.0032794, 0.6448994}, +{-0.8998904, -0.1364890, 0.1521988}, +{-0.1800091, -0.2726554, 0.1494425}, +{-0.1091765, -0.0552239, 1.6042306}, +{-0.3440371, -0.5156183, 0.1163286}, +{0.6025530, -1.1732348, -1.5259087}, +{1.4980414, 0.3643446, -1.9639074}, +{0.2759429, 0.4996029, -0.0324515}, +{2.4050198, 1.4279604, -1.8568753}, +{-0.5302331, 1.1730554, 2.1377094}, +{0.3421816, -0.3518693, -0.0314411}, +{0.1916398, -0.7870270, 0.6647825}, +{0.6205716, -0.1330806, -0.3989946}, +{-0.0510469, -0.5664006, -0.2355356}, +{0.9262422, 0.0148920, 0.2294604}, +{-0.0941510, 0.2016340, -1.2667550}, +{0.6142751, -0.5574608, 0.3193811}, +{0.7308315, 0.3569059, -0.7149442}, +{0.6629853, -0.9520937, 0.8644818}, +{0.1182025, 0.8480482, 0.1017217}, +{0.2840835, 0.4454370, -0.2867168}, +{0.4373770, 0.5253168, -0.3530358}, +{0.2717801, 0.1333019, -0.1423618}, +{0.4154798, 3.7872181, -2.3996720}, +{0.7113321, -0.6560245, 1.4016660}, +{0.0168744, 0.1951629, 0.5904348}, +{-0.9644542, 0.2795021, 0.8562603}, +{0.9377880, -0.2514898, 0.4886467}, +{0.5786381, -0.6934816, -0.5291545}, +{0.5936957, -0.0554908, -0.8634326}, +{-0.4030852, -0.6602322, 0.3438745}, +{0.6681280, 0.0890988, 0.6817686}, +{0.3228040, -0.5394368, 0.1853952}, +{0.3294195, 0.4833917, -0.4827967}, +{-0.8411542, 0.3887134, -0.2942885}, +{-1.3839781, 0.1559289, 0.6936475}, +{-0.8722745, 0.4453044, -0.1846442}, +{0.2595424, -0.2273151, -0.4224686}, +{0.7435429, -0.1735912, -0.6712920}, +{-0.4932189, -0.8413441, -0.3479279}, +{-0.4780951, -0.2250446, 0.1966438}, +{1.8812586, -0.1911945, 0.7712546}, +{2.0451264, -0.0402783, 0.6745865}, +{-0.0442027, 0.1181606, 0.4837865}, +{0.1920580, 0.0604084, 0.2026134}, +{1.6006159, -1.1215152, -1.5534602}, +{0.0692689, -0.1826816, -0.2866292}, +{-1.1345532, 1.0507127, 0.2796448}, +{0.2031618, -1.0734081, 0.4477162}, +{-0.2387525, 0.3258785, -0.1801330}, +{-1.0080117, 0.0509810, -0.1112533}, +{-0.5313817, -0.6460146, 0.0252182}, +{0.3582509, -0.4871479, 0.5314789}, +{1.6799759, 2.1133895, -0.2888947}, +{2.1729989, -0.6036581, -1.9733566}, +{-0.3004933, -0.6192850, -0.0977555}, +{0.7441714, 0.3551746, -0.6382928}, +{0.5200073, -1.6211821, 1.3306246}, +{0.7364481, -0.1975859, -0.3545864}, +{-2.1162448, -1.2637193, -0.7795659}, +{2.6541317, -0.5193951, 1.3839730}, +{-0.1748211, -0.2261724, -0.1901229}, +{-0.7249187, 0.7223470, -0.2642375}, +{-0.6246834, -0.8450777, -0.5405050}, +{0.3605323, -0.1513158, -0.5680587}, +{-0.4357119, 0.3065616, -1.1552588}, +{-1.7072265, 1.3984698, 0.1476204}, +{-0.2294563, -0.0091770, -0.1610713}, +{0.3579019, -0.3691164, 0.7523987}, +{-0.0163182, 1.1958232, 0.0521834}, +{-0.4384914, 0.5273021, -0.0123470}, +{0.4692914, 0.8139228, 0.7075624}, +{-0.1679040, 0.3155763, -0.3359617}, +{-0.0896173, -0.3219143, 0.7847161}, +{0.8058300, 0.1632682, -1.0028859}, +{-2.7548099, -0.7580983, 1.3985016}, +{0.0972656, 0.3919869, 0.5597391}, +{-1.2414438, -0.4580376, 0.0334731}, +{-0.3448749, -0.7417067, -0.5420272}, +{0.5749071, -0.1525669, -0.2357883}, +{0.3273345, -0.2371908, 0.8639200}, +{-0.2095269, 0.5303763, -0.5927044}, +{-0.1296105, 0.1661486, -0.3852164}, +{-0.6788524, -0.0204953, -0.9343838}, +{-0.4126484, -0.1630900, 0.2250159}, +{-0.2357466, 0.6307923, 0.2555752}, +{0.0274334, 0.6275464, 2.0884488}, +{-0.5352890, 0.6010394, -1.9038634}, +{-0.4514222, -0.4261167, -0.5078690}, +{-1.2128975, 2.1964221, 1.3734676}, +{0.4431154, 1.2899444, 1.1118586}, +{-0.4883441, -0.1128901, 0.0203836}, +{-0.8497961, -0.1225853, 0.0607837}, +{0.1362193, 0.0405841, 1.2470638}, +{0.4893224, 0.7248669, 0.3239012}, +{1.2899773, 0.1356311, 0.5850822}, +{2.2893920, -1.2893449, 2.1449039}, +{-0.3549580, 0.2644968, 0.3723411}, +{-0.4521193, 0.5915522, -0.1053825}, +{-0.0086991, 0.5536138, -0.2823060}, +{-0.1000892, -0.3347980, -0.3674718}, +{0.7842045, 0.5970681, -1.4960352}, +{-0.2731287, -0.5779129, -0.5733032}, +{-0.3961816, -0.3217533, 0.3324812}, +{-1.1351290, 0.9933941, 1.5259933}, +{0.6274726, -0.3059130, 0.1070309}, +{-0.4360017, 0.7246332, -0.5858814}, +{-2.2871857, 3.0608087, -0.0562859}, +{-4.0818558, -0.4507090, -4.1741114}, +{0.0627052, 0.4033369, 0.5509209}, +{-0.1103704, 0.3989414, 0.4269076}, +{-1.1213902, 0.8782804, -0.6850675}, +{-0.0679575, -0.0076416, -0.0573076}, +{-1.0927737, 0.2530447, -0.1376902}, +{0.7383588, -2.6247761, -0.1154000}, +{-0.1262005, -0.1137620, 0.2595871}, +{-1.0235318, 2.6827471, 2.2345688}, +{-0.5479641, -1.9206433, 3.7044554}, +{-0.0303097, 0.1440448, 0.4129463}, +{0.6370428, -0.5602659, -2.0050545}, +{-1.1643310, -0.7642316, -0.1530697}, +{-0.4311934, -0.0231765, 0.8014200}, +{-0.3114536, 2.4366505, 0.5797027}, +{-0.4537353, 0.0098081, -0.0687666}, +{-0.0572519, 0.0331194, -0.0517754}, +{0.4196659, 0.6226501, 0.8554487}, +{1.5661806, 1.6387630, 2.5814769}, +{0.0710004, -0.0847330, 0.0145214}, +{2.1129107, 0.4782183, -1.6182104}, +{0.3737516, -0.1412943, -0.1726008}, +{0.1866038, -0.5545984, 0.2746769}, +{0.4793301, -2.0658944, -2.2217510}, +{0.0917216, 2.4177425, 1.2487743}, +{-0.2270329, -0.2661358, 0.5101132}, +{-0.9177775, 2.2058952, -0.9739263}, +{2.1659017, 0.4901278, 1.2518866}, +{-0.1195526, -0.0741382, -0.1627362}, +{0.1170786, 1.4434015, 0.5179232}, +{0.1802484, -3.3042409, -1.0919195}, +{-0.0893703, 0.6249897, -0.5513315}, +{-0.4485382, 0.7706915, -0.7151492}, +{0.1670530, 0.9862249, -0.5032697}, +{-1.0164686, -0.5525413, 0.1687456}, +{-1.1321454, 0.8635002, 1.0641320}, +{-2.9168634, 1.3312420, -1.3367140}, +{-0.1507375, -0.0774953, 0.5743401}, +{0.8819472, 1.7993455, -0.8815492}, +{1.3653853, -1.9692968, -0.8795761}, +{-0.1041668, 0.0373641, -0.3172985}, +{2.5753212, 0.8393606, -1.3855975}, +{-1.1412653, 2.8130586, 0.8077401}, +{0.3533235, -0.5816089, 0.2306671}, +{0.4695485, -0.4775097, 0.3115844}, +{0.4839710, -0.0112274, 0.3021452}, +{0.2047626, 0.0314284, 0.3908203}, +{0.2209693, 0.3958321, -0.7521653}, +{0.0445392, -0.3697540, 1.2334243}, +{-0.7124705, -0.3803739, -0.3235969}, +{-1.6194319, -0.2673967, 1.4292493}, +{-0.5189626, 0.5498879, -0.6958437}, +{0.0032987, 0.1827678, 0.3436147}, +{0.7189997, 0.0811417, 1.6098613}, +{0.4940561, 1.6604526, 0.5569678}, +{0.0583177, 0.6441220, 0.2473282}, +{-0.1052075, 0.6965765, -0.9228516}, +{-0.3893517, 0.3636782, 1.5677528}, +{-0.0735424, 0.2490027, 0.0288087}, +{0.5285566, 0.7237518, -1.2193576}, +{-1.5589927, -1.6174526, -0.0730753}, +{-0.1198490, -0.0050535, 0.4878283}, +{1.4869720, 0.4660648, 1.5726637}, +{-0.4444906, -1.1519502, 1.3471843}, +{0.0814213, 0.2888644, 0.2755355}, +{0.5962121, 0.4989004, -0.3131641}, +{-0.3329013, 0.8033561, -0.1293886}, +{0.3487623, 0.3183354, -0.5297775}, +{1.5599778, -2.0423324, -1.2194607}, +{1.4357452, 0.4740760, -0.8102891}, +{-0.3307560, 0.3375154, -0.8307651}, +{-1.6739295, 2.9080174, -2.0655193}, +{1.1020480, -1.9221469, -0.0409163}, +{0.4473487, 0.0053117, 0.3344325}, +{-1.2907692, 1.3773921, -0.1468267}, +{0.7650314, 0.6300880, 2.7445872}, +{-0.1089692, -0.0742173, -0.0790824}, +{-0.6623679, 0.6466699, 1.8602387}, +{-0.9913586, -0.3368916, 1.2924396}, +{0.0093807, 1.2050279, 0.3249463}, +{-0.5091825, 0.5832558, 0.4913388}, +{-0.4030761, 1.2386496, -0.2504460}, +{0.2911742, 0.3089939, -0.1655284}, +{0.7476227, -0.5371472, 0.6945825}, +{0.5327035, -0.3258407, 0.9163901}, +{0.3546589, -0.2097289, 0.0548301}, +{-1.0350003, 2.7322059, -0.6735828}, +{0.2820315, -1.5894954, -2.5396242}, +{-0.6875293, 0.0836749, -0.1654437}, +{-0.6049310, 1.0045116, 0.4098287}, +{0.3567354, -0.6193478, -0.8521336}, +{-0.3223201, 0.0608509, -0.7501532}, +{-0.7631469, -0.3855076, -1.2581416}, +{0.6600886, 1.4587393, 0.1120742}, +{-0.2488446, 0.0698634, 0.0232714}, +{1.1426162, -0.3494356, 0.4244094}, +{1.2640941, -0.2035670, 1.0527965}, +{0.1735843, 0.4125794, -0.0978521}, +{1.3707356, 1.3783165, 1.1705633}, +{0.5201068, 0.0823810, -0.4084900}, +{-0.2782494, 0.0958790, -0.5514543}, +{-0.0922927, 2.1167324, -0.0220724}, +{1.2254411, -1.5741873, 1.1417360}, +{-0.0981854, -0.7169915, 0.2157694}, +{-1.7439561, 0.1273930, -0.4808360}, +{-0.9851225, -2.3312554, 0.9322094}, +{-0.0668305, -0.5789779, -0.8874201}, +{-0.1252635, -0.8354474, -1.1846999}, +{0.1289192, -0.4097832, -0.6323268}, +{-0.5566838, -0.1708238, 0.0562626}, +{-0.1083918, 0.4096735, 0.0141297}, +{-0.8558725, 0.0099966, 0.2020880}, +{-0.6198559, 0.0917062, -0.1029317}, +{1.6667012, 0.4675438, -0.9135117}, +{1.0477293, -0.9818330, 0.1843526}, +{-1.3755667, 0.0018323, -0.0608455}, +{-2.8249054, 2.9412072, -0.3492000}, +{-2.4000528, 0.1963841, -0.9263573}, +{0.1939051, 0.1492332, 0.1896634}, +{-0.1058462, 0.6438243, 1.1288618}, +{0.3803149, -0.8197573, 0.7432756}, +{-0.9462239, 0.6146897, -0.2389207}, +{-2.2333233, -0.8218598, -0.9886503}, +{-0.7449172, -1.1077415, 0.8897634}, +{0.5061580, -0.2111400, 0.1320356}, +{-1.1841079, 2.1344013, -1.5753845}, +{-1.6306229, 1.9418337, -1.6753001}, +{-0.3682971, 0.4286453, 0.0395469}, +{-0.6870681, -0.2461792, 1.4336015}, +{0.3520807, 1.2169930, -0.2135044}, +{-0.2190091, -0.5951402, 0.5116855}, +{-0.0654591, -0.6448689, 1.0407742}, +{0.1762349, -0.1813840, -0.3313138}, +{-0.1673192, -0.2274300, -0.1776863}, +{-1.9527262, 1.5542111, 1.3724641}, +{0.2503157, -0.4764131, -0.4022397}, +{-0.3847947, -0.4229047, -0.2962437}, +{0.3295841, -0.7521876, -0.6121954}, +{-1.7229941, 0.1334567, -0.9144082}, +{-0.1360444, 0.1894230, 0.1974138}, +{-1.9719614, 0.4719328, 0.3030434}, +{-0.8810191, -0.2908231, 0.9121325}, +{-0.0545961, -0.0246815, 0.3784347}, +{-0.0945213, 0.5767026, -1.6845475}, +{0.0131591, -0.1876959, 1.5493695}, +{0.6269782, -0.1020608, -0.2632858}, +{0.6475096, 0.3304349, -0.2082203}, +{0.5751937, -0.4795052, -0.2502715}, +{0.2252285, 0.1792377, 0.2200207}, +{0.8606573, -0.1518486, -1.4720247}, +{-1.6392212, -1.2011877, -0.1555174}, +{0.5065072, 0.1526759, -0.6774525}, +{1.5896205, -1.9377675, 1.6729956}, +{-1.9164665, 0.8515097, -0.1019328}, +{0.7238614, 0.2174024, 0.0306613}, +{0.1310557, -1.8025273, -0.0645351}, +{-0.0511274, -0.8095074, -0.4928608}, +{-0.3863026, -0.8850787, 0.1354395}, +{-1.0264128, 1.0789131, 2.5079818}, +{-1.0323224, 0.7449657, -2.4614830}, +{-0.1483398, 1.0946008, 0.0778749}, +{-0.1835067, 0.0036281, -0.2629800}, +{-2.1511543, -0.2486482, -1.2995833}, +{-0.6557078, 0.0835366, 0.5069263}, +{-1.9046589, -0.0923909, -0.6092895}, +{-1.6435487, -0.0911415, 0.0130568}, +{-0.2981251, -0.2625151, 0.4238530}, +{-2.4752314, 2.7013135, -2.6626828}, +{-0.3979553, -0.0594405, 0.0987685}, +{0.4777275, -0.4801643, -0.0181768}, +{2.0189075, 1.4931756, 0.1373355}, +{-1.1065471, 0.2504388, -1.3024805}, +{-0.2004947, -0.2065579, 0.1712029}, +{-1.2558006, -0.3847128, -0.3422967}, +{0.2889727, 0.2435948, -0.6990579}, +{0.5787117, 0.3012840, 0.1733864}, +{-0.5418677, 0.6024482, -0.3757900}, +{1.4026364, 1.1813141, -0.2962830}, +{-0.4164277, 0.4739503, 0.7848389}, +{-0.7863477, 0.0924473, -2.5495925}, +{-1.5563153, -2.1041660, 2.2163670}, +{0.2629612, 0.1990956, -0.4032089}, +{2.3525214, -1.0064338, -0.9869704}, +{2.3329594, -0.5407552, 0.0367814}, +{0.1719331, -0.1701401, -0.2958076}, +{0.5440997, -0.7198556, -0.5997350}, +{-0.8281244, -0.3719698, 1.6316886}, +{-0.3548495, -0.8581398, 0.8994423}, +{0.0840301, 0.5310095, 0.6402696}, +{0.1682336, 0.3114828, 0.8562248}, +{-0.6658417, 0.7772980, 0.0175189}, +{-0.5561884, -2.6507237, 1.9436270}, +{-0.7275199, 1.9150484, -0.4857978}, +{0.3220056, 0.3266688, -0.5139164}, +{3.3188691, 2.3036027, 1.2381084}, +{1.7620602, 1.3269072, -0.0774082}, +{-0.0483466, -0.4526103, -0.4721266}, +{0.6425436, 0.1625141, -1.6063076}, +{-0.4198503, -0.9936453, 0.2566823}, +{0.3939855, 0.2935821, 0.8637671}, +{0.8879821, -0.0044060, -0.3550934}, +{0.4282663, 2.9976709, 0.7370121}, +{0.0785574, -0.3806290, 0.0714357}, +{-0.6367553, -1.1548775, 0.9784884}, +{-0.8161538, -0.3885276, 1.2059988}, +{-0.2422301, 0.0655781, 0.0837284}, +{-0.4875989, -0.1584630, 0.7434573}, +{-1.0045851, -0.1156982, 0.4470817}, +{-0.2243544, 0.0507072, -0.0728062}, +{-0.7602751, -0.0035584, 0.3456935}, +{1.5331804, -0.6747557, -1.7172214}, +{0.1556827, 0.2922058, 0.1131539}, +{-0.3785167, 1.6495392, 0.7849973}, +{-1.6629658, 1.3108834, -0.6673427}, +{-0.1649445, -0.0653562, -0.3448776}, +{0.1663657, 1.1941626, -1.4748487}, +{-0.0054579, 0.5279569, -0.8017057}, +{0.2945591, -0.4493866, 0.1082060}, +{-0.0122872, -0.6561130, -0.2850957}, +{-0.3162680, 0.3074164, 0.9603844}, +{-0.0922183, -0.4722785, -0.2311053}, +{1.1354734, -1.0711859, 2.2003136}, +{-0.5091634, -3.0467873, -0.3230970}, +{0.0537527, -0.1225510, 0.1244960}, +{-2.1251440, 0.0446379, 1.9982712}, +{-0.1563031, -1.0263320, -0.8380143}, +{0.0584451, -0.5473534, -0.1342737}, +{-0.2941020, -1.4621412, -1.4217238}, +{-0.4155475, 0.6788667, -1.6569883}, +{-0.2005970, -0.1607690, 0.2635447}, +{0.3808092, 0.5951332, 1.0655397}, +{-0.0931154, -0.4957404, -0.8440910}, +{0.4759851, -0.0289169, -0.1828000}, +{0.3285887, -0.0533843, 0.8533910}, +{0.5400599, 1.1310588, 2.6066661}, +{-0.5212016, 0.1885619, 0.2130472}, +{0.5369341, 0.2852291, 1.6491719}, +{-0.9909765, -1.2667705, 0.1817674}, +{-0.5226406, -0.2810830, -0.2720946}, +{1.7265009, 0.4774947, -0.9708130}, +{1.1130545, -0.0037227, 1.6525193}, +{-0.2515455, -0.4028381, 0.5953164}, +{-0.4996608, 0.3231870, -0.4332215}, +{0.2909288, -0.0877334, -1.2423234}, +{0.3398647, -0.6930928, 0.0171872}, +{0.3794363, -1.1876326, -0.2219684}, +{0.2932744, -0.9216890, -0.0584995}, +{-0.0438074, -0.0045129, -0.1837292}, +{-1.2657819, -0.9869331, 0.0875366}, +{-0.1601799, 0.9392769, -0.7220142}, +{-0.0935264, -0.5361128, -0.4941647}, +{0.9496914, -0.8230011, -0.2284879}, +{-0.8197121, -0.0162203, -0.3750729}, +{0.3620983, -0.0738739, 0.1137382}, +{-0.7467386, 1.4384829, 1.9973658}, +{-0.3593641, -0.0215351, -0.0986081}, +{-0.2046718, 0.0782486, 0.3323226}, +{-0.8221127, -0.4623158, 0.2196519}, +{-0.1531385, 0.3084964, 0.7189144}, +{-0.1384810, 0.2949565, 0.0963963}, +{1.1938125, -1.0738897, 3.8416522}, +{-1.0592971, -0.7643908, -0.4564365}, +{0.3281612, 0.2959066, -0.0318168}, +{0.4113854, 0.7018896, 0.0618027}, +{0.5398616, 0.1590680, -0.2173775}, +{-0.4516699, 0.3592610, 0.1964737}, +{-0.2309006, 0.8867376, 0.8668255}, +{0.3821997, 0.3455814, -0.1695921}, +{0.0089978, -0.2528936, 0.1289878}, +{0.0244208, -0.1454540, -0.9458201}, +{-0.4923910, 0.7517837, -1.6089863}, +{-0.0111535, 0.2233160, -0.2897389}, +{2.7592230, -0.0555178, -0.5207153}, +{-0.8143219, 2.7415404, -2.0592263}, +{0.0459352, 0.7029912, -0.6715726}, +{-0.4351796, 0.3012296, -1.7354831}, +{-0.6628633, -0.5938826, 0.2399949}, +{0.0488428, 0.1918764, 0.0030201}, +{0.1833729, -0.1258096, 0.1801142}, +{-0.6484034, 1.3684894, -0.5258607}, +{-0.3750422, -0.1755417, -0.5750371}, +{0.0840667, 0.7894509, -0.5659788}, +{0.6961635, 0.8040238, -0.4928954}, +{-0.6998194, 0.0615033, -0.7229111}, +{-0.6301228, -0.0089051, -0.6203941}, +{-1.4770467, 1.3135509, -2.4174619}, +{0.9362930, -0.0280945, -0.0419318}, +{-0.3086141, 0.6694016, -1.2287109}, +{1.6757560, -2.6486042, 1.1468122}, +{-0.3388485, -0.0535804, -0.7318301}, +{-0.3145966, 0.1952736, 0.6628577}, +{-0.2768937, 1.2260059, -0.8663012}, +{0.0164021, -0.1422369, 0.3707718}, +{0.6028304, 0.2945823, 0.3645209}, +{-0.6663460, -0.7798146, 0.5352147}, +{-0.2448439, -0.5305834, 0.4687619}, +{-0.3616132, 0.0644210, 0.5403722}, +{-0.0133978, -0.6893759, 0.0022555}, +{-0.2795456, 0.2388185, 0.3066027}, +{-0.3435858, -1.0622294, 1.3839525}, +{-0.4606309, 0.8689625, -0.1808404}, +{0.0436728, 0.0309941, 0.0779769}, +{-1.2144212, 0.3280368, 1.1422435}, +{1.4425974, 1.2029767, -0.0368267}, +{0.1306524, 0.2390520, -0.0081509}, +{2.1217620, -1.0924654, 0.4345268}, +{-0.6106355, -0.7143250, 0.6539160}, +{-0.4319612, 0.0352604, -0.4342513}, +{0.7439396, -0.0795071, 0.0400865}, +{-1.0824246, -0.1299960, 0.6072925}, +{0.5223889, 0.5372722, 0.0671507}, +{0.8613309, 0.3914070, 1.0842696}, +{0.0697017, -0.4788875, 0.0863608}, +{0.3296230, -0.7277058, 0.0446747}, +{0.8332514, -0.6667767, -0.2415466}, +{0.7945235, 0.5439896, -0.6912783}, +{-0.0018718, -0.2746545, -0.7963305}, +{-0.4212657, -0.0741344, -0.6921852}, +{-0.2297236, -0.0449116, -2.4444411}, +{-0.1546410, -0.2619480, -0.4458716}, +{0.9769508, 0.2324532, -1.4755056}, +{0.0603324, -0.2235228, -0.4749199}, +{-0.2261342, 0.1583202, -0.0890588}, +{1.1347500, 0.5231912, -0.0783576}, +{1.2835879, 1.5989308, 0.2675309}, +{-0.1563951, -0.0877257, 0.0056583}, +{-0.4353131, -0.2275659, -0.1538261}, +{1.5696293, -0.5990186, 0.8605889}, +{0.2011114, 0.2541572, 0.2179711}, +{1.4144413, 0.3084099, -0.0707369}, +{-1.4188868, 0.5855426, -0.2045327}, +{-0.0951070, -0.2150468, 0.4492942}, +{-0.4150939, 1.0124195, 1.7362443}, +{-1.6240791, -0.8737992, 0.1607043}, +{0.0286951, -0.2929608, 0.2924671}, +{0.8041289, -2.1361256, 1.8789718}, +{0.9384006, 1.3188051, -0.7108405}, +{0.0588037, 0.2486502, 0.1590979}, +{-1.1750753, -1.2137033, 0.5708227}, +{-0.1466718, -0.3109528, 0.5655375}, +{0.5360453, -0.5760319, -0.9462004}, +{0.0339591, -0.7289788, -2.3281207}, +{-0.6125847, 0.7640702, -0.6292368}, +{-0.0606963, 0.1589563, -0.1900295}, +{0.3024064, 0.0920928, -1.0615352}, +{-0.9067103, -1.0652633, -0.4528189}, +{-0.3342672, 0.0948349, -0.2582483}, +{0.4328010, 1.3181278, -0.4744631}, +{-0.4539895, 0.9821225, 0.0208663}, +{-0.5160073, 0.0583511, -0.1113255}, +{3.1874425, 1.0600907, -3.2202568}, +{0.2045040, 1.1823189, -0.9022408}, +{0.2263491, 0.1163727, 0.5391917}, +{1.2766294, 0.6517097, 1.0558430}, +{-0.1744633, -1.7860831, 0.9612696}, +{1.0932646, -0.2364822, 0.4536990}, +{-0.6022773, 0.2607149, 0.0278037}, +{2.0080938, 1.3418733, 0.1140860}, +{0.1388996, 0.1659812, -0.1547923}, +{-0.3483557, 1.0403330, 0.1808880}, +{-1.5871731, -1.4050128, 0.1111639}, +{0.0513101, 0.9246361, 0.1777123}, +{-0.8135710, 0.7514899, 1.4888937}, +{0.1868052, -1.0575619, 1.3166194}, +{0.4243813, -0.1433290, -0.5605025}, +{0.2122696, -0.8574135, 0.7580556}, +{0.3622668, 0.0998559, -1.0363106}, +{-0.9942097, -0.0725464, -0.1208294}, +{-0.5421924, -2.9266388, 0.2075399}, +{-0.4544846, 0.5861464, -1.0951717}, +{0.2986474, -0.1758485, 0.5562159}, +{0.7042826, 0.2486936, 1.6898185}, +{0.1601723, 1.8819710, 3.3904181}, +{-0.7885876, 0.0685952, -0.0512156}, +{-2.2584867, -0.9708675, -1.3621267}, +{0.4784492, -0.4440466, -0.8422213}, +{-0.4547810, -0.2526099, -0.3042130}, +{-1.7466832, -0.2775930, -0.8734662}, +{0.5982465, 0.9265888, -0.5664800}, +{-0.2812441, -0.4340431, -0.3027408}, +{-0.0099332, -0.2350193, -0.2031857}, +{0.9657702, -1.7529747, -0.0755040}, +{0.8557581, 0.0344044, -0.5119299}, +{-0.4265734, -0.2481560, 1.0991817}, +{-0.9611034, 1.8810757, -1.6863877}, +{0.0680340, -0.2499276, 0.2103311}, +{-0.9813464, 0.7574427, 0.6334512}, +{1.9816474, -0.3008255, 0.5659413}, +{0.0743926, 0.1991030, 0.1739688}, +{-1.2545652, -1.8440899, -0.9652572}, +{-1.2315587, 1.7165680, 0.3927878}, +{0.4524940, 0.6373256, 0.6192719}, +{-1.0007663, -1.4420122, 0.5547880}, +{0.7061728, 0.9638134, 0.6067114}, +{0.1248113, 0.3663825, 0.4235675}, +{0.0890168, 0.2036207, 0.5182387}, +{0.6865680, -0.0064653, 2.6458580}, +{0.7280783, 0.1811616, -0.0053050}, +{2.5963855, -3.6140480, 0.6141892}, +{1.0749336, -1.6271942, -0.1931566}, +{0.6400931, 0.8303810, -0.0525217}, +{0.6228190, 1.3478081, -0.5956874}, +{0.6581643, 0.9540196, 0.8467883}, +{0.2937865, 0.5670866, 0.0420283}, +{1.2441798, 1.1429937, -0.0008812}, +{-1.8047795, -0.9819098, -0.3326008}, +{0.2592802, -0.3606196, 0.3500480}, +{0.7513626, -0.7237280, -2.1067259}, +{0.8302072, -1.2852298, 0.1934827}, +{0.0657602, 0.1933138, 0.1652633}, +{-0.3394072, 0.9632767, -0.0345765}, +{-0.2708515, -0.7377703, 0.5247406}, +{0.5324025, -0.0338855, -0.2557825}, +{-0.0332083, 2.3715754, 2.6812580}, +{0.2106650, 1.2982793, -1.9198284}, +{-0.3882978, 0.2773162, -0.1566467}, +{0.6842939, 0.2363236, -0.0927603}, +{-0.4975215, 0.3493944, -0.0361282}, +{-0.0785213, -0.6406282, 0.1505781}, +{1.3432631, 0.3366086, 0.6945970}, +{0.2470809, -0.0756031, 0.2555925}, +{0.0853592, -0.0652942, -0.5889140}, +{0.7638033, 3.1229467, -0.6648214}, +{-0.4763352, 2.4959598, 0.5056210}, +{-0.1806993, -0.5432213, 0.2843736}, +{-0.2851862, -1.2223417, -2.3436835}, +{0.0488849, -0.1425444, -0.6422551}, +{-0.2694544, -0.4383469, -0.4233050}, +{1.1562103, 0.9095083, -0.4348487}, +{0.2227415, 1.1239938, 0.3942123}, +{0.7497494, 0.0162871, -0.2495404}, +{-0.8118009, 1.4446896, -0.1192937}, +{0.8743648, -0.5178355, 0.3918512}, +{0.5102125, 0.2096758, -0.0837898}, +{-0.3812311, 0.1009151, -2.8909907}, +{1.3811345, -0.7022987, 1.6551329}, +{0.3635255, 0.6113850, 0.1289049}, +{-1.5010520, 2.3515971, -0.1179833}, +{0.8911003, 0.0458043, 2.1255031}, +{0.3383859, -0.5216249, -0.3670131}, +{-0.0222431, -0.4195570, -0.3683732}, +{0.1035808, 0.5594608, -1.0870854}, +{-0.4575243, -0.1457765, 0.2333346}, +{0.9333634, -2.2853220, -0.9771534}, +{1.0375823, -0.7634330, -1.1223359}, +{-0.1559228, 0.1043360, 0.0821770}, +{-0.7102571, 1.1715165, 1.7390429}, +{-0.3811435, 0.1892812, 0.1846211}, +{0.0664489, 0.2080631, 0.6648822}, +{-0.2100766, 0.3373742, -0.5602056}, +{-0.6065773, 0.9566219, -2.3069391}, +{-0.1001610, -0.4580465, 0.2141227}, +{0.1262279, 0.3539358, -3.0745261}, +{0.1043043, -0.3671958, 0.3719296}, +{-0.2817933, -0.2571922, -0.0996102}, +{0.3463142, -0.1981713, -1.0207673}, +{-0.2327146, 0.0020525, 0.7985563}, +{-0.2689331, 0.3785664, 0.0798595}, +{-0.5162449, 0.8201548, -3.1564975}, +{-1.5903827, -1.7621437, 0.6881874}, +{0.0048246, -0.4759708, -0.0738936}, +{1.0543069, 0.2924356, -0.1066342}, +{0.0364947, -0.8517160, 1.0451261}, +{-0.3612126, -0.1745372, 0.3256247}, +{-0.9182695, 0.1880198, 1.1307583}, +{0.1676093, -0.7128160, -0.5507276}, +{0.0711024, 0.5620128, -0.0074725}, +{-0.5144805, 2.1171145, -0.0592497}, +{0.3860890, 0.2278595, 1.4619155}, +{-0.0760329, 0.5528181, -0.6329138}, +{-0.0874852, 0.8025664, -1.2379004}, +{0.1175832, 0.2772044, -0.0147253}, +{0.1065130, 0.5501590, 0.0184569}, +{0.8714615, 0.2682802, -0.1892951}, +{0.3843272, -0.2079395, -0.1060220}, +{0.2366555, -0.6261734, 0.6541875}, +{-1.1383044, -1.3284452, -0.9045585}, +{-0.9462357, 0.2739009, -0.1071676}, +{-0.0149826, 0.4667172, 0.7682894}, +{-0.0803631, -1.0632856, 2.0736759}, +{1.6758080, 2.3316565, -0.6084354}, +{-0.3280069, -0.6008183, -0.3874582}, +{-0.2193978, -0.7154838, -0.3603603}, +{-0.2541980, -0.1756253, -0.3254856}, +{-0.3995382, 0.2999764, 0.4474368}, +{-2.1671083, -1.2442071, 2.2970946}, +{0.3842055, -1.5038354, -1.1651783}, +{0.1253111, -0.3916615, 0.0990714}, +{-0.6258905, -0.3115948, -0.0609327}, +{-0.2318305, -0.3654129, 0.5379831}, +{0.0248208, 0.2172277, -0.2154812}, +{0.5461804, 1.3661685, -0.7178068}, +{0.7874064, -0.1713565, -0.7170748}, +{-0.0668144, 0.4643478, 0.7407570}, +{-0.2472431, 1.1257744, 1.0743895}, +{0.4754061, -1.3696481, -0.1107416}, +{0.0332486, -0.2161750, -0.7318135}, +{0.4546133, 2.6417387, -0.1771612}, +{-0.9954500, -1.1070106, 1.7166064}, +{0.6684822, 0.0389398, -0.5103916}, +{0.7106223, -0.5984623, 1.4676100}, +{-0.0180548, 0.6186212, 0.7124271}, +{0.3684176, 0.1915117, 0.4574291}, +{-0.6605723, -0.4776009, -0.1714699}, +{0.6230213, 0.8811471, -0.5237863}, +{-0.4639271, -0.0289711, -0.1107749}, +{0.0810988, -0.8342401, 1.1062237}, +{-0.0043185, 1.5453044, 1.8495306}, +{0.3252796, 0.5535001, -0.0210690}, +{0.7039585, 0.0304528, 0.7488002}, +{-3.1266320, 0.8982795, 0.7932382}, +{-0.3040464, -0.0956764, 0.1787673}, +{1.5714536, -0.2443707, 0.2651815}, +{1.6010883, -0.3409451, -0.7286844}, +{-0.2446991, 0.3281004, 0.4191608}, +{0.2511722, 1.5679746, 0.7382987}, +{0.1747750, -2.0016353, -0.6139721}, +{-0.1808464, -0.2324242, 0.1796414}, +{-1.3749504, -0.4150036, -2.2158248}, +{-0.7579169, 0.8251844, -2.5272484}, +{0.3365933, 0.0655660, 0.2658690}, +{1.3894050, -0.1512876, 1.5279932}, +{0.2145588, -1.4648892, 0.2948973}, +{-0.0487690, 0.4385817, -0.1938620}, +{0.4509403, -1.5200739, -0.4747092}, +{-0.2927358, 0.6016082, 1.8909622}, +{-0.6322096, -0.2535308, -0.2843190}, +{1.2373637, 2.3364511, -2.3392823}, +{-1.0114760, -1.0720674, 0.0711724}, +{-0.1732398, -0.0261945, -0.6678236}, +{0.8655713, -2.0310826, 0.2035973}, +{-0.3951114, -3.2660396, 0.9068025}, +{0.4633079, -0.4011953, 0.1509482}, +{-1.1632513, -0.2686191, 0.7479566}, +{-1.1288460, 0.5224013, -0.7071405}, +{0.2753272, -0.1049730, 0.4954640}, +{0.2280669, 0.2922401, -0.9084337}, +{-0.4034806, 0.0632414, -1.2777942}, +{0.9172549, 0.0381378, -0.0020629}, +{-1.2033563, 0.0080304, 0.6273499}, +{1.1239382, -1.5385803, 0.7743198}, +{-0.2292927, -0.0302441, 0.2960904}, +{-1.1285660, 0.4411039, -0.1940200}, +{-0.2111314, 0.7835525, 1.5255970}, +{0.5109436, -0.5191429, -0.5383697}, +{0.8612888, 1.2402579, -0.7108637}, +{-2.2914145, -0.6560324, -1.4838983}, +{-0.0423224, 0.6251078, 0.5791327}, +{0.9559423, -1.2503113, -0.2148864}, +{0.2743281, 0.2480550, 0.5128396}, +{-0.6473759, -0.0634553, -0.1410885}, +{-1.2001119, 0.7783778, 0.6844893}, +{0.1962320, -0.8177443, 0.9078065}, +{-0.7795309, -0.1459623, 0.4616510}, +{-0.2013292, -1.7937678, -2.7544332}, +{0.3951344, 2.8615417, -0.3757853}, +{-0.1747396, 0.0131728, -0.4296161}, +{-1.0168656, 0.8491535, 1.0783796}, +{-1.7667279, 2.5400186, 2.9606388}, +{-0.1650680, -0.2646386, -0.5213848}, +{-0.0222441, 1.8407776, -1.1231588}, +{0.8195877, 0.7836348, -0.4222779}, +{0.0756311, -0.6076029, -0.0214414}, +{-0.4997029, 2.1816645, -1.1829225}, +{0.5428643, -1.3364594, 0.4281762}, +{0.2795046, -0.0568897, 0.5771241}, +{-0.6909153, 0.3522191, -0.1823404}, +{-0.7245165, 1.5655990, 0.4610687}, +{-0.2262031, -0.2609998, -0.2442952}, +{-1.1189588, 0.4458430, -1.3053010}, +{2.3245552, 2.1020088, -2.1802189}, +{0.4141465, -0.1931222, -0.1940308}, +{1.5178657, -0.5221220, -1.2199500}, +{0.6123936, -0.1649587, -0.4476845}, +{0.4898485, 0.5140274, -0.4363274}, +{-0.1475200, 1.6245583, -0.6914984}, +{0.5409344, -0.8558110, -0.0906438}, +{-0.4149029, -0.0973401, 0.2261453}, +{1.2430096, -0.5414080, 1.0359372}, +{-1.4536083, 1.1314714, -0.8227271}, +{-0.0739528, 0.3550161, -0.2813268}, +{0.0728111, 1.0232264, 0.2419352}, +{-0.6875274, -0.5136456, -0.3851624}, +{0.2719647, 0.1005786, -0.0421788}, +{0.0329587, 1.7026182, 2.2875586}, +{0.6616063, 0.6036244, 1.0885552}, +{-0.3212471, 0.4800737, -0.0186967}, +{2.5871515, 0.1145867, -0.1377340}, +{-0.3430902, 1.6900281, -0.0151148}, +{0.5332945, 0.7661790, 0.6845329}, +{2.2581165, -2.2959800, 1.0272455}, +{-0.7071382, 3.4413819, 0.3576091}, +{0.1060316, 0.3053801, -0.1398560}, +{-0.8212290, 0.1110008, 0.3181683}, +{0.0409975, -0.1065134, -1.2176194}, +{0.3714863, 0.3128957, 0.1250173}, +{-0.1359615, 1.6703734, -1.1533105}, +{-0.9583793, 1.2406772, 1.5374537}, +{0.5514312, -0.2751155, -0.0967078}, +{1.4590201, -1.4057349, -1.1647836}, +{1.7223262, 1.1741972, 0.1305296}, +{0.2369588, 0.0977347, 0.2035000}, +{-0.5651605, -1.1933389, -0.7634996}, +{0.3525024, 0.7151349, 1.3669395}, +{0.1494075, 0.0546159, -0.1346167}, +{0.6174384, -2.2808917, 0.5443513}, +{-0.0253756, 0.5467376, 2.5576780}, +{0.0870596, -0.4208933, -0.3515500}, +{-0.0521946, -1.2504283, -2.3431804}, +{0.1326849, 1.5246128, -0.7345757}, +{-0.0729481, 0.0055636, 0.5246770}, +{0.3851186, 0.1467380, 1.3317426}, +{1.3889802, 0.9790010, 0.2114205}, +{0.8874863, 0.1094970, -0.4470561}, +{1.0893173, -0.9360121, -1.1712661}, +{1.2030444, 1.3442061, 0.0820334}, +{-0.3377520, -0.2605527, 0.1224524}, +{2.2476363, 0.5014247, 0.1100320}, +{-1.1900799, -0.9660457, 0.9357408}, +{0.6751202, 0.8709425, -0.4217593}, +{-0.3844710, 0.1591683, 0.5398039}, +{1.3850998, -0.4400775, -1.1595434}, +{0.2331452, 0.4941926, -0.4111556}, +{2.1051412, -0.1981188, 0.6622845}, +{0.5621961, -0.0153541, -2.5061831}, +{0.2710508, -0.0332247, 0.0466747}, +{-0.4380794, 0.0377458, -0.3879628}, +{0.6304389, 0.1697129, 0.0387581}, +{0.1869036, -0.1646213, -0.0040420}, +{-2.9431393, -0.8826652, -2.4652698}, +{-2.4716263, -0.4598258, 0.9287906}, +{0.2538436, 0.3020846, 0.7762181}, +{-0.2919392, 0.3549357, 0.3479130}, +{-1.9860728, -0.8739800, -2.1916211}, +{0.0718299, -0.2183405, 0.0526539}, +{0.8886699, -1.7341677, -2.3292537}, +{1.1824337, 0.4483269, -0.6684165}, +{0.2444049, 0.4654630, 0.1074933}, +{-1.8459442, -0.5480993, -0.6839509}, +{-0.8411992, 0.9080196, 1.0119698}, +{-0.7822326, 0.2243735, 0.4362777}, +{-0.3760080, 0.4634489, 1.2608665}, +{-0.9150872, 0.0946041, 0.3221638}, +{-0.1206276, -0.6073695, -0.5531824}, +{-0.3791826, -0.0968147, -0.2610960}, +{-0.3311057, -0.6679179, 0.3981678}, +{-0.0095479, -0.5737157, 0.0870669}, +{-0.3695840, -0.5543298, -1.2533088}, +{0.7445883, -1.8487699, 0.7753882}, +{-0.2136426, -0.3134682, 0.2693648}, +{0.5548847, -1.3195339, 0.2302717}, +{-0.7647904, -0.3060101, 0.7871435}, +{0.0333131, 0.7000988, 0.3295616}, +{0.7506181, 0.3002109, -1.5722436}, +{0.7997450, 0.5823374, 0.3900973}, +{-0.1578774, -0.0265839, 0.2702753}, +{1.1937959, -1.2557060, 0.3684081}, +{0.9932565, -0.5843939, 0.7774101}, +{-0.0788409, -0.1011954, 0.6223034}, +{-0.0284122, 0.2541364, 0.1689752}, +{-1.5475578, -0.2326246, -1.7748033}, +{-0.4183896, 0.4030563, -0.7385012}, +{-1.4740523, 0.5550991, -0.2141495}, +{-0.5519641, 0.4148456, -1.3050870}, +{-0.0502150, -0.6106843, -0.3348640}, +{-2.1921139, -0.5020902, -0.1717405}, +{0.3945543, 0.0663796, -3.2730620}, +{-0.2018403, 0.0678087, 0.3422906}, +{-0.1123440, -0.1664633, 0.0468393}, +{0.1686210, -0.0475791, 0.5621452}, +{-0.1679789, -0.1245326, -0.5708570}, +{-2.3219974, 1.5279332, -0.5255268}, +{1.8733239, 1.6172699, -0.1331223}, +{-0.1847003, 0.1981145, 0.4501662}, +{-1.9631660, 0.0846889, 0.1142958}, +{-0.4951121, 0.5100477, 0.5506064}, +{-0.3028322, 0.1818124, -0.1747748}, +{2.9946721, 1.5612638, 2.0427296}, +{0.2516814, 0.5605670, 0.1005344}, +{-0.4528318, -0.0433427, 0.3809957}, +{-1.1957211, 0.2300788, -0.6495776}, +{-0.3508146, -0.6458142, 1.5076011}, +{-0.2025355, -0.2468513, 0.4147938}, +{-1.0257332, 2.7190862, -2.9409275}, +{0.4485800, -0.0428527, 1.6062663}, +{0.1880595, -0.0823561, -0.6946436}, +{-0.1032507, 1.2205203, 0.7530265}, +{0.7883430, -1.3692307, 1.3779318}, +{0.0741224, -0.6160498, 0.5319684}, +{0.5968047, -0.7766421, -0.3892636}, +{0.9095093, -0.7126544, 0.5339088}, +{-0.0804346, 0.1129407, -0.1689872}, +{-0.5798643, 0.6110374, -0.0314167}, +{-0.7950493, 0.7874534, 0.1465069}, +{0.8130277, 0.0035119, 0.4362926}, +{-2.0421975, -0.0897226, -0.4865768}, +{-0.5780741, 0.5385581, 1.2131044}, +{-0.0285086, -0.2417564, 0.6944125}, +{0.5191757, -0.2664703, -1.1074744}, +{-0.1830286, 1.7174866, 0.7125751}, +{-0.1684143, -0.0974395, -0.1063207}, +{0.4360677, -1.9195026, -1.8097597}, +{-0.2612115, -0.3045791, -1.0861151}, +{-0.0706915, -0.0059983, 0.0716696}, +{0.6907970, -0.9097346, -0.0772231}, +{-1.0820535, 0.8814815, -0.2220984}, +{-0.4010280, 0.0277108, -0.0530600}, +{0.8424790, 0.7044147, -0.6721722}, +{1.1460623, 0.2719930, 1.3990902}, +{-0.5665182, 0.1469257, 0.0218538}, +{-0.0851942, 1.4517957, 0.4060135}, +{1.1463039, -0.1761454, -0.6773041}, +{0.0357431, -0.4357459, 0.1937613}, +{-0.9913079, 2.2639842, 1.4065881}, +{0.1428457, -1.1586103, 0.0109180}, +{0.6074266, 0.2727721, -0.1382518}, +{-0.4322366, 0.7369309, -2.2064323}, +{1.1483483, 0.1411776, 0.3180246}, +{-0.2594711, 0.6325002, 0.1287930}, +{-1.9607490, -1.8322183, -0.7937443}, +{1.7338630, -0.5794216, 2.2493713}, +{0.2673426, -0.1597674, -0.5226926}, +{0.1080047, -0.1557170, -0.4686148}, +{0.4015809, 0.1332406, -0.9526657}, +{0.0936265, 0.0743585, 0.2335869}, +{-1.0205194, 0.0692118, 1.3590918}, +{1.1881797, 0.3579656, -0.9436999}, +{0.6904192, -0.0019986, 0.3392285}, +{0.3912680, -2.1206980, 0.3364756}, +{-0.6591944, 0.7831136, -1.0224345}, +{0.1720738, -0.0842649, 0.2511529}, +{1.2886822, 1.1883541, 0.4512889}, +{0.6559697, -1.2316865, 0.0939906}, +{-0.6291719, 0.0987552, -0.7535119}, +{-0.2204676, -0.2726866, -0.5871083}, +{-1.0658157, 1.9406302, -1.5409926}, +{-0.0554852, 0.0184100, 0.7208944}, +{0.5691118, 0.4146146, 0.9038186}, +{1.2543690, -0.1573769, 3.8439217}, +{-0.5332232, 0.3123770, -0.2655576}, +{-0.2752865, 0.8534500, 0.9998737}, +{-1.9741675, 0.4666367, -0.3780151}, +{0.2007645, 0.1135765, 0.9117863}, +{0.0398454, 0.1548842, 0.5897847}, +{-2.6355815, 1.1258231, 0.5080641}, +{0.0914914, -0.3113448, 0.2668859}, +{0.9919775, 0.5456223, 0.8703047}, +{-0.3051947, 0.8162928, 0.4344322}, +{0.0683383, 0.1031249, -0.5070200}, +{0.3259829, -0.0975287, -0.2761288}, +{-0.9550345, 1.4984384, -0.8833745}, +{0.3639604, -0.2223184, 0.0702380}, +{-0.7582729, -0.8033005, 0.8367257}, +{2.8126307, -0.1317658, -1.0419916}, +{0.3297430, 0.3625096, -0.2009601}, +{0.2007120, 0.4205164, 0.2449099}, +{-1.1571105, 1.6408093, 0.0635439}, +{-0.9417689, 0.9980576, -0.1540141}, +{0.8092425, 0.0306801, 0.6645252}, +{1.4946065, -0.2553121, -1.4854876}, +{-0.2821849, 0.9171243, 0.0803657}, +{-0.5010048, -0.5144395, -2.9023211}, +{-0.7419951, 0.0443254, -1.4067882}, +{-0.3731175, -0.2321450, 0.2605013}, +{-1.0260322, -0.8049412, 1.9138852}, +{0.2387373, -2.2399294, 0.2145263}, +{0.0146068, -0.5217500, -0.0928021}, +{-0.5165490, 0.0473421, 0.4899678}, +{-0.0588376, -1.5287520, 0.2664182}, +{-0.1583689, -1.2201079, 0.1286481}, +{0.1015012, -1.5666679, 0.1225969}, +{1.7676047, -0.1250552, -1.0923731}, +{-0.0884068, 0.3550341, 0.3517229}, +{1.0522006, 1.6226590, 0.9756668}, +{-1.1522766, 0.7175042, 1.4295297}, +{0.1033235, -0.1532708, -0.0285741}, +{1.9980594, -0.4767149, 0.3030482}, +{-0.2539494, 0.8780801, -3.0760355}, +{-0.0697192, 0.2145880, 0.1386372}, +{0.7043540, 0.1936789, 0.9466585}, +{0.7823062, -2.1523302, -0.5020938}, +{-0.0574027, 0.1423455, 0.5135712}, +{-0.7774902, 0.0330973, 0.6058371}, +{-0.2667536, 0.1220984, 0.3016899}, +{-0.2348238, 0.3927772, -0.2601168}, +{0.5806867, 0.0592215, 1.1926886}, +{-1.4486833, 1.1966019, 1.3879683}, +{-0.1275574, -0.1593172, -0.3171982}, +{1.6229414, 1.7786614, 1.1632363}, +{0.4193570, -0.2496879, -0.9531791}, +{0.1785847, -0.8162258, -0.5761198}, +{0.6370699, 0.6642181, -0.5160198}, +{1.1117023, -1.2940826, -1.5034223}, +{-0.2192285, -0.1101295, 0.2561440}, +{-0.0106426, 0.1904371, 1.2885914}, +{0.6077187, -0.6442351, 0.4569452}, +{-0.3446608, 0.2477424, 0.3465205}, +{0.1966575, 0.3548093, 0.4743665}, +{-0.2865349, -0.3678663, 0.4601056}, +{0.3918188, 0.0643876, 0.1034784}, +{3.9110799, -2.1930604, 2.8604395}, +{2.4029074, 0.3370222, -0.7531694}, +{0.3196436, 0.8067563, 0.1359811}, +{0.3144977, 1.1365383, 0.1749476}, +{0.6672608, -0.1306082, -0.0374105}, +{0.3660787, -0.0129517, -0.1434708}, +{0.5302131, -1.0710094, -1.6953470}, +{-3.0996675, -0.1991017, -0.6331081}, +{0.2270696, -0.6395828, 0.0939506}, +{-0.2028331, 0.6810054, 1.6606349}, +{-1.1375883, 1.1953206, 0.8480914}, +{-0.2145544, 0.0446063, -0.1258891}, +{1.7118497, 2.6503046, -0.4642426}, +{-0.1909427, -0.5168851, -0.6455520}, +{0.6685079, 0.7275302, -0.1457919}, +{0.7726604, -0.0904229, -0.3671038}, +{1.2108988, 2.2489240, -0.7640979}, +{-0.0537513, -0.3229373, 0.5962414}, +{-1.6526722, 0.1892129, 1.0147537}, +{2.0532992, -0.0067418, -0.2755892}, +{0.3863001, 0.1848747, -0.0086033}, +{2.1328139, 1.5326600, -0.5981897}, +{-0.2671626, 3.3582578, -2.4123821}, +{1.0211469, 0.3527845, 0.0910533}, +{-0.4963009, 3.5257967, 0.0394728}, +{-0.3179801, -0.0514200, 0.2587981}, +{-0.6233700, 0.2616705, -0.2835513}, +{1.8534980, 1.1764400, 0.3797418}, +{-1.2030880, -0.7938480, 0.2828699}, +{0.1359778, -0.4647487, 0.6558750}, +{1.2983428, -0.4135988, 0.0156575}, +{0.5066807, -0.0752325, -2.8942995}, +{0.4701657, 0.5376399, -0.1334778}, +{0.2813871, -1.8618318, 0.5929232}, +{-0.0956991, -0.1122485, -1.0591098}, +{-0.1220059, 0.0137590, 0.4294175}, +{2.0208197, -1.2264850, 0.7505284}, +{2.1963711, -0.4620777, -1.4420916}, +{-0.1589621, -0.1424045, -1.1627051}, +{1.5759472, 0.6422336, -1.8273895}, +{-1.5266118, -0.4572094, -1.2595973}, +{0.2317313, -0.3245305, 0.4702481}, +{0.1740259, -0.3300968, -0.8634441}, +{0.4384616, 0.2849818, -0.4180621}, +{0.5383259, 0.0227820, -0.4770480}, +{-0.3574426, -0.1600805, -1.6900026}, +{1.1444541, -1.8931904, 0.1823831}, +{-0.2963827, 0.6547326, 0.0524469}, +{0.4766048, 1.1353862, 0.3695239}, +{0.8964642, 0.0092930, -0.0221161}, +{-0.1658179, 0.2722859, -0.2497851}, +{0.5990334, 0.1842503, 1.5463277}, +{1.7770616, -0.0702329, -1.5356592}, +{0.5722326, -0.0361564, 0.2246031}, +{-0.4416194, -1.5883330, -1.0111673}, +{-0.9885341, 0.9255606, -1.9045055}, +{-0.1824374, 0.0269213, 0.2286639}, +{0.6313763, -0.7452465, -1.9685919}, +{-2.1414912, 1.0299960, 0.3344697}, +{-0.2090014, 0.0548566, -0.3919711}, +{0.4107269, -0.6021173, -0.1356743}, +{0.2956126, 1.2751666, -1.3086487}, +{-0.3627963, -0.0879567, -0.4310247}, +{0.3563787, -0.9919942, 1.2132691}, +{-0.6370059, -1.1982492, 1.5301647}, +{-0.3120021, 0.3356211, -0.6419587}, +{-0.5405554, 0.1122788, 1.4597992}, +{-0.0433941, -1.4200183, 3.5880423}, +{0.3868426, 0.1268371, 0.4259449}, +{0.8275454, 0.3298776, 0.5812069}, +{-0.6240539, -0.0175077, 0.9668505}, +{-0.1463688, -0.6979248, -0.5676000}, +{-1.5020248, 0.9482570, -1.7663740}, +{-1.0598823, 0.2743153, -1.2381145}, +{0.3219805, 0.0832126, -0.3169729}, +{0.6270071, 0.7850292, -0.3955949}, +{0.9385762, -0.4952129, -0.9076512}, +{0.1900787, 0.6720265, -0.1446555}, +{-1.7723001, -1.1502981, -1.1688106}, +{-0.5658141, 0.0370063, -0.3974012}, +{0.0924157, -0.7659582, 0.2837994}, +{-0.2101512, 1.9625436, -1.4274324}, +{-0.2243468, 1.5177820, -1.2479485}, +{-0.7112671, -0.1598022, -0.3567881}, +{-1.2621156, -0.2679341, 0.3995107}, +{-0.6821368, 0.4237337, -0.6507512}, +{-0.1011014, 0.1921293, -0.1153116}, +{-0.6209096, 0.3092612, -0.0884591}, +{1.5190843, -0.3775480, 0.2195322}, +{0.0196044, 0.0860823, 0.2973800}, +{-0.3387913, 1.5387986, 0.5497510}, +{-0.6603910, -0.4352000, -0.6664391}, +{0.3120975, 0.5528405, -0.2274425}, +{-1.1137364, 1.8695363, 2.7239711}, +{1.1564933, 0.4023444, -1.3802921}, +{-0.0743923, -0.0733330, 0.3583429}, +{-0.8186594, -1.7662607, 0.1534434}, +{-2.1364610, 0.2043771, 0.1883618}, +{-0.1740492, 0.1797984, -0.2892924}, +{2.0078225, -2.1446202, 2.0730276}, +{1.1344044, -0.3644475, -0.7590541}, +{0.0854935, 0.0270803, 0.4509822}, +{0.1837166, -1.3012282, 2.9484854}, +{0.0004204, 0.2278706, 0.0147970}, +{-0.0552170, -0.3517761, -0.2091179}, +{-0.7003056, 1.7923379, 0.0188573}, +{0.7175202, -0.4975690, -0.8741381}, +{0.2428824, 0.1524490, -0.8271532}, +{-0.7403136, 1.5520018, -0.6560709}, +{0.3560133, 0.0181020, 0.0573789}, +{-0.7088351, -0.5266527, -0.0623918}, +{-0.6774435, -0.2173230, -0.6340031}, +{-0.8446214, -0.2742446, -0.4378030}, +{0.2340351, 0.0017753, -0.1101530}, +{0.3561848, -0.6642830, -1.7600967}, +{0.1073545, 0.7226250, 0.1867609}, +{-0.1520944, -0.0409526, 0.0724849}, +{-2.3091717, -0.1119149, 0.1751748}, +{0.1415150, 1.5004507, 1.4573934}, +{0.2246373, -0.7106193, -0.3996265}, +{0.7687288, 0.6036479, -1.3184373}, +{-0.5265087, 1.0463331, 1.0482836}, +{-0.3498624, 0.2581154, 0.5188651}, +{2.2946980, -0.5753409, -0.2251089}, +{-2.4343500, -1.1803403, -1.0390882}, +{-0.0420544, -0.0912205, 0.1183695}, +{0.2125504, 0.4044687, 0.8048229}, +{0.3298763, 0.9782372, -1.0471267}, +{0.5841959, 0.0842409, 0.2081068}, +{0.3496853, 0.1177010, 0.6513656}, +{0.5201629, 0.2740540, 0.2508169}, +{0.1798604, -0.2892801, 0.5653869}, +{-0.3199445, -0.6915660, 1.2055200}, +{-0.3311461, 0.0260270, -1.2230072}, +{0.5410323, 0.0047646, 0.0064614}, +{0.3915576, -0.4731174, -0.9129841}, +{2.6600547, 0.9133549, 5.2014017}, +{-0.4977411, 0.4708571, -0.5003035}, +{-0.8105456, -1.0926651, -0.1236163}, +{1.8522243, 0.5612028, -1.1810312}, +{-0.1053167, 0.6057392, -0.3428728}, +{-1.0538895, 0.3794276, -0.4498492}, +{-0.8366367, 0.9600160, -0.5135319}, +{-0.1797072, 0.0975158, -0.0620564}, +{1.7915609, -1.8351694, 3.9484658}, +{-0.7902451, 2.3364801, -0.5674584}, +{-0.1480844, 0.2718256, 0.3480698}, +{-1.5157764, -1.9246758, -0.6663021}, +{-0.3502777, -0.0334997, 0.2304987}, +{0.3150263, -0.1954090, 0.0230561}, +{1.4908941, 0.5816092, -0.0367951}, +{-2.0410471, -1.3067585, 0.2442299}, +{0.2270925, -0.0587633, -0.1868389}, +{-0.0896880, 0.1807815, 0.4304860}, +{-1.2500017, 2.8124261, 0.7810630}, +{0.2250600, -0.2852002, -0.2544924}, +{-0.1544874, -0.9561267, 0.4643451}, +{0.3821835, -0.2090691, -0.9224794}, +{-0.0841490, -0.2448371, 0.0123721}, +{-3.2711694, 0.4130130, 2.2697542}, +{0.7381184, 1.4675046, -1.4138809}, +{-0.2309129, 0.1334297, -0.5507937}, +{-0.3781918, 0.4875311, 1.4868340}, +{-1.9950997, 1.2088904, -2.2154684}, +{0.0753145, 0.1323792, -0.5294404}, +{-1.6599053, -1.1509786, 0.7889889}, +{0.8572137, 0.3763480, 1.1621208}, +{0.5563838, 0.1153576, -0.0271555}, +{-0.3684671, 0.0219985, -0.3995056}, +{1.3066648, 0.7430841, 0.0171679}, +{0.4138333, -0.0423945, -0.1950621}, +{-3.0832880, 0.7055725, -0.1394205}, +{0.7865282, -0.7032972, -0.7492079}, +{0.3730027, -0.2462053, -0.1843648}, +{-0.9904535, 0.2853409, -0.0957325}, +{0.0995947, 0.3689333, 0.1442961}, +{-0.0727069, -0.5527809, -0.0586388}, +{0.1626593, -0.4746469, 0.4775504}, +{-0.1508746, -0.7287767, -0.8511173}, +{0.0672912, -0.3608705, 0.2575250}, +{0.5449254, -0.3445344, 0.2704121}, +{-0.5439202, -0.6435033, -0.8591672}, +{0.4488284, 0.3316808, 0.7533852}, +{-1.9470593, 3.7639956, -0.5129005}, +{-0.6385725, -1.0070664, -2.0543072}, +{-0.4107278, 0.0005204, -0.5987951}, +{-1.3172512, 0.8079382, -2.3034844}, +{2.3986535, -0.1548067, -1.0269145}, +{-0.3918560, -0.3249387, 0.6937745}, +{0.0871469, -0.7324569, 0.7717754}, +{-0.4687026, 0.8964357, 0.5454189}, +{-0.0763474, -0.0195979, -0.2843160}, +{-0.9732656, 1.3373082, 1.5794865}, +{-1.1804993, 0.4382990, 0.7195058}, +{-0.0091989, 0.1671064, -0.7479311}, +{0.2783962, 1.7838250, -0.1778455}, +{0.6078019, -0.8949001, 1.2569758}, +{0.1096788, -0.5518859, -0.4744784}, +{0.7819977, -0.2198442, -1.1711152}, +{0.0608847, -0.9257585, -0.3354142}, +{-0.1238085, -0.2633382, 0.2053835}, +{0.0081768, -0.0029068, 0.4442386}, +{0.5097581, 0.0604296, 1.2095935}, +{0.7611731, -0.5562501, -0.6874958}, +{-0.0039368, 0.8525688, -0.2588333}, +{-0.1680904, -1.0188329, -1.9486998}, +{-0.0882039, 0.5803663, -0.0416845}, +{1.6542871, 3.0614572, 0.6032845}, +{-1.2981867, -1.4436511, -0.5161183}, +{-0.0224709, -0.5000301, 0.7719707}, +{-0.8648980, 2.4311323, 1.8762631}, +{0.4183536, 1.0172172, -1.4858289}, +{0.2040381, -0.1198477, -0.2146469}, +{0.7342027, -1.1127731, 0.9749743}, +{0.4669384, 0.8732132, -0.0761847}, +{0.4349642, -0.5918078, 0.1747871}, +{0.4832168, -1.4230698, 0.3752550}, +{0.5239087, 1.3984516, -0.1885493}, +{-0.1276229, -0.4617692, 0.5400417}, +{0.5906874, 0.2008977, -0.8847906}, +{-2.2619503, -0.3376203, -0.0827895}, +{-0.2490359, -0.0096206, -0.6939417}, +{0.9771618, 0.8436343, -0.7519156}, +{0.8550339, 1.9923643, -0.4752832}, +{-0.2576922, 0.3191662, 0.0823885}, +{0.2153384, 1.0574030, 1.3205327}, +{-1.3408494, -0.0754505, 0.7083285}, +{0.1473799, 0.1162142, 0.6459522}, +{-0.9384412, 0.5154702, 0.0736638}, +{-1.4143867, -0.9784397, -2.2815325}, +{-0.3448535, 0.0941069, 0.1597455}, +{1.8150656, 1.5128734, 0.3585925}, +{-1.3304186, 1.1480422, 1.7970989}, +{0.3544706, 0.0666241, -0.0160328}, +{1.2672811, 1.0309504, 0.9032988}, +{-0.9101483, 0.7024614, -0.5353448}, +{-0.0658098, 0.5021660, -0.2418520}, +{-0.2573677, -0.3536445, -0.6290275}, +{0.2786247, 0.4970271, 0.0826009}, +{0.1084428, -0.2811415, 0.7457543}, +{1.3460747, 1.1374136, -0.0860377}, +{-1.2410277, 2.4784880, 0.1839910}, +{0.0249650, -0.2588879, 0.0697544}, +{-0.4928717, 0.0003062, 0.3508443}, +{-0.8587130, -0.2909271, 0.0035082}, +{-0.5618606, 0.1873441, -0.5341417}, +{-1.2169414, 0.1206937, -2.5025930}, +{-1.7895788, -0.6976333, 0.6339008}, +{0.5397766, 0.0050049, 0.4334220}, +{1.0274590, 1.1073549, -1.8176671}, +{-1.4525179, -1.2487983, 0.3598966}, +{-0.2722475, 0.4382981, -0.1663276}, +{1.4440126, 1.6699879, 0.3453755}, +{1.7331709, -0.9411019, 0.7492484}, +{0.3380721, 0.2873397, -0.3249937}, +{0.4294828, -1.0953101, 1.1471711}, +{-0.2262238, 1.1458008, 2.0756519}, +{0.0561207, -0.4521647, 0.2512634}, +{3.4772489, -1.5042380, 2.6120212}, +{-0.9934180, -1.4533414, -1.2454156}, +{0.3016475, -0.0573869, -0.0732524}, +{0.2874741, -1.4768513, -2.4165094}, +{-0.4094175, 0.1081606, -0.6735604}, +{-0.6349090, 0.0747228, -0.9409584}, +{0.8994194, 0.8142163, -2.0331502}, +{0.6012303, 0.2917452, 1.8704175}, +{-0.1960032, -0.7715361, 0.6562485}, +{0.5379429, -0.8896164, 0.6886985}, +{-0.0455518, 0.1723307, 1.8003830}, +{-0.0640825, 0.4523121, -0.0855005}, +{0.9607145, 3.5865724, -0.4398001}, +{-0.5160860, -3.3554018, -0.9243845}, +{0.8192768, 0.5932611, 0.6510293}, +{-0.6469444, 0.7199324, -0.1530534}, +{0.1459192, 0.5902175, 0.2657698}, +{-0.1015517, 0.1540838, 0.2384614}, +{0.8414450, -0.5550307, 1.1410275}, +{-0.0537884, 0.6413527, 0.2257701}, +{0.4710964, 0.5098178, -0.0593317}, +{0.9465701, 0.7356147, 1.5549394}, +{0.5513063, 0.6685256, -0.0500042}, +{-0.0833613, -0.3030859, 0.0659485}, +{1.7019023, 2.4069221, -2.5039151}, +{-1.5266738, -0.1283427, -1.5275842}, +{0.6539321, 0.7518348, -0.1989176}, +{0.6906852, 0.6463949, 0.4515626}, +{0.1533164, 1.6890860, -0.9568561}, +{-0.0688325, 0.1627806, 0.1546466}, +{1.0651517, 0.2124171, 1.9008875}, +{-0.5433175, -0.2787330, -0.4279428}, +{0.4062927, -0.6656478, -0.3035466}, +{0.7288890, -1.5553913, -0.2263021}, +{0.2082396, -0.1094010, -0.3257836}, +{0.2137125, 0.1086558, 0.3555781}, +{0.3459284, -0.2445320, -0.1789996}, +{0.1353031, -0.8651410, -0.6532210}, +{-0.1454497, 0.1734143, 0.1463475}, +{0.1716206, -0.9870976, -0.0461260}, +{0.2334210, -1.3652763, -0.2757375}, +{0.5243182, 0.2594459, -0.1280432}, +{0.2258225, -1.1423697, 0.3634787}, +{1.2530982, 2.2250724, -0.7813466}, +{-0.3481497, 0.5006183, -0.2100560}, +{-0.5647894, 1.1127058, -0.9872646}, +{-1.8693478, -2.4195170, -1.9227022}, +{0.3887536, 0.2825685, 0.5722139}, +{0.0389663, 0.1362318, -0.9134513}, +{0.2218809, 0.5816891, -1.9656017}, +{0.0182663, -0.7612534, 0.6911052}, +{-0.4634917, -0.4267094, 0.4215980}, +{1.1969125, 0.5636480, 1.2777973}, +{0.4553687, -0.6552415, -0.1948107}, +{-1.0294484, -0.3919659, -3.6920843}, +{0.3492595, 0.3691270, -3.4864273}, +{-0.2267344, -0.1671958, 0.2387004}, +{-0.7226841, 0.6724289, -0.0473232}, +{0.3409331, 0.0361212, -1.1534288}, +{-0.1529247, 0.4523427, -0.3651458}, +{-0.1092331, 0.1253513, -0.3916814}, +{-0.3644117, 2.6290045, -0.8258311}, +{-0.3511171, 0.4697167, -0.5182003}, +{0.5479014, 0.0746550, 1.1220559}, +{1.3251113, 0.0840344, -1.7808622}, +{-0.1350763, -0.4736007, -0.1680565}, +{0.0800003, 1.3332638, 1.3467768}, +{-0.7834795, -2.5770895, -1.9924150}, +{-0.5963185, -0.0408362, -0.0924476}, +{-0.0337971, -0.3395993, 0.3716938}, +{0.4661427, 0.0121882, 0.3824299}, +{0.4309115, -0.4509071, 0.4288987}, +{-0.3831378, -1.8938913, 0.3706663}, +{0.9654326, -0.3011430, -1.3204855}, +{0.0691856, -0.0942582, -0.0495481}, +{-0.0398439, 0.2837080, 0.3215376}, +{-1.0192753, 0.6946195, 0.4262432}, +{-0.3629702, -0.0243083, -0.1675541}, +{-0.8095111, 2.6831703, -1.5470415}, +{-2.7248163, 1.0304692, 0.2239088}, +{-0.3627642, 0.1097892, -0.2494321}, +{-0.4320222, 0.1963417, -0.7892334}, +{0.8890470, 0.7900113, 0.0408320}, +{-0.1130301, 0.5669448, 0.1387720}, +{-0.0915618, 0.7410914, 0.3202724}, +{-0.3344726, -0.1646619, -0.3469692}, +{0.0659482, -0.0911694, 0.4364440}, +{-0.9877858, 0.5657336, -1.9585155}, +{-1.7361768, 0.4485280, 2.5608842}, +{0.2031167, -0.5699490, 0.3636538}, +{-0.7144371, 0.0008824, 1.3509007}, +{0.6091772, 0.2562762, -0.5784369}, +{-0.3276436, 0.7317288, 0.3788413}, +{-0.3214622, -1.7530751, 0.0691260}, +{1.8124120, 1.0120775, 1.3165660}, +{-0.1668981, 0.2575147, -0.1877203}, +{-0.1895127, 1.3016299, -0.5970626}, +{-1.0429136, -0.3896537, -1.0129049}, +{-0.4501895, -0.1184276, 0.2295866}, +{-0.4939230, -2.1808956, 0.7280374}, +{0.1189931, 2.1533477, 2.6575902}, +{0.0925906, 0.0766216, -0.3554001}, +{-0.9312062, 1.0662359, -1.3801832}, +{2.5177770, -2.4244611, 2.2008152}, +{0.6492884, -0.3243286, -0.1295348}, +{-0.6173241, 1.5420395, 0.5746314}, +{-0.1021385, -0.3612273, 0.3674847}, +{0.3356473, -0.5923102, -0.3326727}, +{-0.7646415, -1.1361380, 0.6917490}, +{0.4785691, 1.2140300, 0.1097926}, +{-0.3912964, -0.0855925, 0.5627546}, +{-0.9614040, -0.5266327, 0.4802535}, +{-0.0359453, -0.4920498, 2.6995592}, +{-0.2424167, -0.5811092, 0.3715576}, +{2.0336010, -0.4604709, -2.3148305}, +{-0.9361116, -1.0506213, 1.6778309}, +{-0.1443606, 0.0798728, 0.1893478}, +{-0.4597309, -0.7833479, -0.5094951}, +{0.2654067, -0.5923091, -0.3348869}, +{0.4674697, 0.0778034, -0.3657756}, +{0.6166626, 0.1596657, 0.1670346}, +{1.2982385, -0.0440956, -0.9131714}, +{-0.6053553, -0.7692646, -0.1896511}, +{-1.5793655, -1.9473196, 0.0921175}, +{-0.0790121, 0.9685358, 0.4756566}, +{0.2350249, -0.0468491, -0.7311363}, +{-0.5087016, 0.0699998, 0.2206540}, +{2.2148252, -0.1500365, 0.2088574}, +{-0.0043059, -0.6256838, -0.2831102}, +{1.0417457, -1.7080154, -0.1745928}, +{1.4621569, -0.3884174, 2.0751650}, +{-0.0302169, 0.5882015, 0.4287615}, +{1.8859391, -0.5537729, 1.3762642}, +{-1.6265494, 3.0116100, -0.5493395}, +{0.2331057, -0.2556915, 0.1090182}, +{-0.8660760, 0.3077650, -1.5646113}, +{-0.4102871, 0.2212554, -0.5677160}, +{0.4642053, -0.5815051, -0.3633591}, +{-1.8386304, 1.3869263, 0.2780222}, +{-1.0453594, -2.9217319, -1.1768422}, +{-0.0544233, 0.4587353, -0.2696949}, +{0.5549155, -0.3994481, 0.6202176}, +{-0.7764343, -1.0913738, -1.2938977}, +{0.4520560, 0.3101609, 0.0246172}, +{1.1459858, 0.0789252, -1.4473275}, +{2.8826160, 1.0362169, -1.5757072}, +{0.1950696, -0.0617684, 0.0244832}, +{-0.3874945, 2.8472085, 1.9553250}, +{3.0649655, -1.5314090, 0.3003876}, +{0.0930745, 0.1602249, -0.1719821}, +{-1.2194415, -3.8809578, -0.7395230}, +{-1.1115692, 0.9907128, 3.2363007}, +{-0.2745497, 0.8498743, 0.0673484}, +{-0.8782723, -0.9067239, 1.2525970}, +{-0.5084704, 2.8856151, -0.8540258}, +{-0.0988160, 0.1995385, -0.0009457}, +{1.3680693, 1.0791593, 0.2912115}, +{0.4738972, -1.4858443, 0.8924816}, +{-0.1306914, -0.2564970, -0.4436179}, +{-0.4520518, 0.2270908, -0.4645155}, +{0.2844065, 0.1941214, -0.8816218}, +{0.0863048, 0.1430017, 0.1797525}, +{1.1644093, -0.8917708, 1.8344322}, +{1.4035509, 0.2816571, -1.7015198}, +{-0.4342643, -0.0008572, -0.5074114}, +{-0.9106628, 1.4456736, 0.1283984}, +{0.4687289, -0.2044256, -1.1792502}, +{-0.0408045, -0.4291363, 0.3876804}, +{-0.3923119, 0.1261225, 0.8773128}, +{-1.0850151, 2.8279836, 0.3617758}, +{0.1528850, -0.0976621, 0.2615215}, +{-0.1184761, 1.7489783, -0.3879750}, +{0.7683228, 0.8131977, 0.1280721}, +{-0.0712774, 0.2184171, -0.2841342}, +{-0.7690090, -0.1304596, 1.8995746}, +{0.1980280, -0.0320436, -0.5340676}, +{0.0459253, -0.3903672, 0.0966308}, +{0.7122316, 1.2306657, -2.0154083}, +{1.0826155, 0.5206999, 1.3258961}, +{0.1874662, -0.1674248, -0.2266619}, +{-0.6809043, -0.9111043, -0.9662595}, +{-1.1619743, -0.0881198, 0.7962888}, +{0.1415826, -0.5771257, 0.3549959}, +{-0.5149600, 0.5041939, 0.3577995}, +{0.5584505, 0.4092163, -0.6352714}, +{0.2190954, -0.0404649, 0.1866136}, +{-0.6563748, -2.1792681, 1.2619953}, +{1.3069395, 0.7205825, -0.7408518}, +{0.2277157, -0.4160430, -0.2705389}, +{-1.7670697, -0.2802293, 0.0434262}, +{0.4303937, -1.0549341, -2.1575847}, +{-0.5799810, 0.0636395, -0.3780760}, +{-0.8476939, -0.2495265, -1.1969483}, +{0.1549697, 0.2587599, -0.3469005}, +{-0.4648575, -0.9830749, 0.2260747}, +{-1.3217973, -0.6573109, -1.0000709}, +{1.5517104, 0.9700270, 1.0828738}, +{0.4662367, -0.2977712, 0.0329859}, +{1.0277424, -1.2137572, -0.4007829}, +{-0.1694970, 1.6183819, 1.4088627}, +{0.3556900, 0.0728072, 0.8011025}, +{0.6566421, 0.6695959, 0.0635623}, +{-0.4677703, -0.3805525, 0.4565152}, +{-0.2470707, -0.0299033, 0.8534603}, +{0.2174278, -4.2554460, -1.7126447}, +{0.2335066, -1.2625257, -0.5211669}, +{-0.4506806, 0.5702285, -0.0723186}, +{-0.8613529, -0.6360591, 1.0450517}, +{-0.6316258, 0.0042910, 0.1344860}, +{0.1594746, 0.2350933, 0.0386571}, +{2.3657365, -0.7328835, -1.3477842}, +{0.8324553, -0.6989261, -0.4687403}, +{-0.4536468, 0.0671110, 0.4089321}, +{-1.2469934, 0.0808527, -0.7087238}, +{0.3834743, 0.5402464, -0.2490568}, +{0.0465880, 0.1906842, -0.5050662}, +{-0.3145027, -0.4245524, 1.1394728}, +{0.0636200, 0.1814519, -0.7610149}, +{0.0355678, 0.4493580, -0.0116866}, +{-1.6383457, -1.2609742, -0.1881136}, +{1.2866765, 0.8119044, 0.1299509}, +{0.5006986, -0.1953869, 0.1468565}, +{0.9360201, 0.7593806, -0.9745607}, +{0.1997306, -0.8256070, 0.2046241}, +{0.1165280, 0.1819563, -0.3335957}, +{-0.1498930, -4.0531664, -0.8168744}, +{-0.7980457, -1.8356909, -1.5085995}, +{-0.0694953, 0.7460342, -0.2419973}, +{-0.6679947, 0.2092593, 1.2473831}, +{1.5172833, 1.1821281, 0.5524324}, +{-0.0469138, -0.4237493, 0.4833672}, +{-2.5064936, 0.0946723, -1.5600290}, +{-0.8815773, -0.9032957, 0.5700961}, +{0.1290586, -0.4307001, -0.5327262}, +{0.6995362, 1.0346541, 0.4234308}, +{0.9368824, 0.9892706, 0.1361702}, +{-0.2657675, 0.2248059, -0.0519017}, +{0.7496653, 0.1691688, 0.0484315}, +{-0.7640690, -0.4733433, -0.1021922}, +{0.6660147, 0.0135897, -0.2247631}, +{2.0375342, -1.5280222, -0.8443654}, +{-0.4228482, -1.4986917, -1.2030963}, +{-0.1376247, 0.0419212, -0.3619925}, +{-0.1980927, -0.4199083, -1.2895747}, +{1.4239345, 1.0790405, -0.4177651}, +{0.0967801, 0.1652060, 0.1868118}, +{-0.2743653, 1.3516721, 0.1703487}, +{-1.1124676, -2.9112866, 0.4605837}, +{-0.1019230, -0.3345412, -0.5002841}, +{0.0924527, -0.5690290, -0.2706624}, +{0.0988404, -0.7390521, 0.1920539}, +{-0.0973991, 0.2173977, -0.0412308}, +{1.1861721, 1.2512535, 0.5770214}, +{-0.2925737, -0.9498628, 1.1035625}, +{0.0650130, -0.5317082, 0.0869889}, +{1.5382264, -0.2533752, 1.1475521}, +{-0.2129255, -0.5030677, -0.3643261}, +{-0.1545842, 0.0240418, -0.5093538}, +{0.9645492, -0.9970759, -1.3071234}, +{0.7960411, 0.6361202, 0.5951841}, +{0.0196821, -0.2035724, 0.2518326}, +{1.8255240, 1.3117342, -1.0592895}, +{0.1038857, -0.9001826, 0.3633009}, +{0.5928358, 0.3432412, -0.2189609}, +{0.3511599, -0.0435627, -0.1778469}, +{-0.0430759, 0.4796642, -0.2207087}, +{-0.0638916, 0.0332083, 0.1442695}, +{-1.2440709, 0.9524733, 1.2096698}, +{0.5033259, -0.9700074, -0.2244985}, +{0.2980868, 0.2067008, -0.5602028}, +{1.4244348, -1.7092429, -1.6729723}, +{0.4223059, -0.0749001, -0.3316498}, +{-0.1978276, 0.6987300, -0.0038049}, +{-1.9872353, -1.7847530, -2.2861674}, +{-1.7191769, -1.2037894, -1.3971983}, +{-0.0986813, 0.1623161, -0.4471042}, +{0.2016876, 3.4718263, 0.5991595}, +{-2.6355481, 1.9461446, -0.5163711}, +{0.2977748, -0.0613753, 0.2726742}, +{-0.2880998, -1.3256470, -1.2797643}, +{0.6168802, -0.9403800, -1.5590556}, +{0.0454932, -0.4672041, 0.1841905}, +{0.4032496, 1.4282758, -0.1782223}, +{-1.2343112, 0.1043059, 1.3402308}, +{0.2951259, -0.4018296, 0.2071399}, +{1.6251297, -0.5768241, 2.6406765}, +{2.1114595, -2.3178022, 1.1979437}, +{-0.5508848, -0.4513485, 0.1587579}, +{3.1849868, -0.9688381, -0.2506410}, +{3.8478677, -0.1208772, -0.3343852}, +{0.3394571, 0.3288479, 0.2121731}, +{-0.0219260, 0.8145862, -0.0607387}, +{1.0252570, -1.6948912, -0.9305259}, +{0.4016863, -0.5711923, 0.1049533}, +{0.7871976, 0.9286956, 1.3544486}, +{-0.7587793, 0.9012746, -0.1920989}, +{-0.0466974, 0.0644121, 0.3149738}, +{-0.0320310, -0.7426583, 0.3798445}, +{0.4964424, 1.5345387, -0.0322865}, +{0.4873657, 0.2819966, -1.4279664}, +{-3.4429936, 1.1513064, 1.9244943}, +{1.6145058, 0.4685136, 0.8944612}, +{-0.3958128, 0.3423222, 0.0822672}, +{-1.8426415, -0.3842394, 0.7226458}, +{-0.7653251, 2.1658311, 0.0662310}, +{0.3330501, -0.0370922, -0.4391402}, +{2.2461066, -0.7608532, 0.8254874}, +{-0.3921336, 0.7230959, -0.8614879}, +{0.1620374, 0.5327396, -0.2320358}, +{-0.0375869, 0.6868178, -0.7222784}, +{0.2996042, 0.4975377, -0.0511463}, +{0.0233641, -0.0168409, -0.5032887}, +{-0.4454360, -0.2286583, -0.5009743}, +{0.0455388, -0.1465159, -0.7786998}, +{0.0930586, 0.1009375, -0.5629689}, +{0.3923812, -0.0058704, -0.5335502}, +{-0.6625926, 0.5610203, 0.2055977}, +{0.4666490, -0.1677387, -0.0591405}, +{0.7508925, 0.2970353, 0.3906536}, +{-0.1290875, -0.4482655, 0.2588366}, +{0.1830362, 0.6442631, 0.4032815}, +{0.2886492, 1.2192619, 0.3750167}, +{-0.1925070, -0.6002199, 0.5222709}, +{-0.3266450, -0.8703485, 0.0852678}, +{-1.5905187, -0.4142166, -0.7303457}, +{0.9161773, -1.3163726, -1.0235921} +}; diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp index 57e81191a..59a484951 100644 --- a/wrapper/Move/OpenMMPMEFEP.pypp.cpp +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -507,6 +507,17 @@ void register_OpenMMPMEFEP_class(){ , getTimetoSkip_function_value , "" ); + } + { //::SireMove::OpenMMPMEFEP::initialise_ion + + typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_ion_function_type)( ) ; + initialise_ion_function_type initialise_ion_function_value( &::SireMove::OpenMMPMEFEP::initialise_ion ); + + OpenMMPMEFEP_exposer.def( + "initialise_ion" + , initialise_ion_function_value + , "" ); + } { //::SireMove::OpenMMPMEFEP::initialise From b82b96acb3ae6574501fd1f9b927a3523149348b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 18 May 2022 08:44:00 +0100 Subject: [PATCH 115/148] make sure all lambdas are updated; removed unnecessary code --- corelib/src/libs/SireMove/openmmpmefep.cpp | 72 ++++------------------ corelib/src/libs/SireMove/posvel.h | 2 +- 2 files changed, 14 insertions(+), 60 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 6307161f6..0873553c6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -615,7 +615,7 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { // NOTE: only for debugging with simple non-dummy systems like ions -const bool fullPME = true; // use false for production +const bool fullPME = false; // use false for production const bool useOffset = true; // use true for production const bool doCharge = true; @@ -644,14 +644,10 @@ void OpenMMPMEFEP::initialise_ion() if (moleculegroup.isEmpty()) throw SireError::program_bug( - QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup has not been defined"), + QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup " + "has not been defined"), CODELOC); - const MoleculeGroup solute = this->solute.read(); - const MoleculeGroup solutehard = this->solutehard.read(); - const MoleculeGroup solutetodummy = this->solutetodummy.read(); - const MoleculeGroup solutefromdummy = this->solutefromdummy.read(); - AtomicVelocityWorkspace ws = this->createWorkspace(moleculegroup).read().asA(); @@ -667,66 +663,17 @@ void OpenMMPMEFEP::initialise_ion() qDebug() << "There are" << nats << "atoms. " << "There are" << nmols << "molecules"; - int flag_combRules; - - if (combiningRules == "arithmetic") - flag_combRules = ARITHMETIC; - else if (combiningRules == "geometric") - flag_combRules = GEOMETRIC; - else - throw SireError::program_bug( - QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), - CODELOC); - - if (Debug) - qDebug() << "combiningRules =" << combiningRules; - - bool flag_noperturbedconstraints = false; - int flag_constraint; - bool flag_constraint_water = false; - - if (ConstraintType == "none") - flag_constraint = NONE; - else if (ConstraintType == "hbonds") - flag_constraint = HBONDS; - else if (ConstraintType == "allbonds") - flag_constraint = ALLBONDS; - else if (ConstraintType == "hangles") - flag_constraint = HANGLES; - else if (ConstraintType == "hbonds-notperturbed") { - flag_constraint = HBONDS; - flag_noperturbedconstraints = true; - } - else if (ConstraintType == "none-notwater") { - flag_constraint = NONE; - flag_constraint_water = true; - } - else - throw SireError::program_bug( - QObject::tr("The Constraints method has not been specified." - "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), - CODELOC); - - if (Debug) - qDebug() << "Constraint Type =" << ConstraintType; - - // Load Plugins from the OpenMM standard Plugin Directory - OpenMM::Platform::loadPluginsFromDirectory( - OpenMM::Platform::getDefaultPluginsDirectory()); - - // the system will hold all auto system = new OpenMM::System(); - // Andersen thermostat if (Andersen_flag) addAndersenThermostat(*system); - // Monte Carlo Barostat if (MCBarostat_flag) addMCBarostat(*system); if (CMMremoval_frequency > 0) { - auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); + auto cmmotionremover = + new OpenMM::CMMotionRemover(CMMremoval_frequency); system->addForce(cmmotionremover); @@ -738,6 +685,7 @@ void OpenMMPMEFEP::initialise_ion() auto recip_space = new OpenMM::NonbondedForce(); std::vector > pairs; + const double cutoff = convertTo(cutoff_distance.value(), nanometer); system->addForce(recip_space); @@ -782,6 +730,8 @@ void OpenMMPMEFEP::initialise_ion() auto direct_space = new OpenMM::CustomNonbondedForce(GENERAL_ION); std::vector params(10); auto corr_recip = new OpenMM::CustomBondForce(CORR_ION); + QVector perturbed_energies_tmp{false, false, false, false, false, + false, false, false, false}; /* * Direct space and reciprocal correction setup through explict energy @@ -794,6 +744,7 @@ void OpenMMPMEFEP::initialise_ion() * std::sqrt(-log(2.0 * tolerance_PME)); system->addForce(direct_space); + perturbed_energies_tmp[0] = true; direct_space->setForceGroup(DIRECT_FCG); direct_space->setNonbondedMethod @@ -802,6 +753,7 @@ void OpenMMPMEFEP::initialise_ion() direct_space->addGlobalParameter("lam", current_lambda); direct_space->addGlobalParameter("alpha_pme", alpha_PME); + direct_space->addGlobalParameter("SPOnOff", 0.0); // not needed direct_space->addPerParticleParameter("qstart"); direct_space->addPerParticleParameter("qend"); @@ -834,8 +786,9 @@ void OpenMMPMEFEP::initialise_ion() system->addForce(corr_recip); corr_recip->setForceGroup(CORR_FCG); + perturbed_energies_tmp[8] = true; - corr_recip->addGlobalParameter("lambda_corr", current_lambda); + corr_recip->addGlobalParameter("lam_corr", current_lambda); corr_recip->addGlobalParameter("alpha_pme", alpha_PME); corr_recip->addPerBondParameter("qcstart"); @@ -916,6 +869,7 @@ void OpenMMPMEFEP::initialise_ion() } } + perturbed_energies = perturbed_energies_tmp; this->openmm_system = system; this->isSystemInitialised = true; } // OpenMMPMEFEP::initialise_ion END diff --git a/corelib/src/libs/SireMove/posvel.h b/corelib/src/libs/SireMove/posvel.h index 4a0d02f56..9b3528e20 100644 --- a/corelib/src/libs/SireMove/posvel.h +++ b/corelib/src/libs/SireMove/posvel.h @@ -86,7 +86,7 @@ const std::string GENERAL_ION = const std::string CORR_ION = "-U_corr;" "U_corr = 138.935456 * q_prod * erf(alpha_pme*r) / r;" - "q_prod = lambda_corr*qcend + (1-lambda_corr)*qcstart;"; + "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;"; // converted from XML state file const std::vector pos_ion = { From 1fbe68f1712210862135100921909d9dd0cb5112 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 18 May 2022 11:03:15 +0100 Subject: [PATCH 116/148] add parameters with function --- corelib/src/libs/SireMove/openmmpmefep.cpp | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 0873553c6..83d45cddf 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -685,7 +685,6 @@ void OpenMMPMEFEP::initialise_ion() auto recip_space = new OpenMM::NonbondedForce(); std::vector > pairs; - const double cutoff = convertTo(cutoff_distance.value(), nanometer); system->addForce(recip_space); @@ -755,16 +754,10 @@ void OpenMMPMEFEP::initialise_ion() direct_space->addGlobalParameter("alpha_pme", alpha_PME); direct_space->addGlobalParameter("SPOnOff", 0.0); // not needed - direct_space->addPerParticleParameter("qstart"); - direct_space->addPerParticleParameter("qend"); - direct_space->addPerParticleParameter("sigmastart"); - direct_space->addPerParticleParameter("sigmaend"); - direct_space->addPerParticleParameter("epstart"); - direct_space->addPerParticleParameter("epend"); - direct_space->addPerParticleParameter("isHD"); - direct_space->addPerParticleParameter("isTD"); - direct_space->addPerParticleParameter("isFD"); - direct_space->addPerParticleParameter("isSolvent"); + addPerParticleParameters(*direct_space, + {"qstart", "qend", "sigmastart", "sigmaend", + "epstart", "epend", "isHD", "isTD", + "isFD", "isSolvent"}); if (doCharge) { params = { @@ -791,8 +784,7 @@ void OpenMMPMEFEP::initialise_ion() corr_recip->addGlobalParameter("lam_corr", current_lambda); corr_recip->addGlobalParameter("alpha_pme", alpha_PME); - corr_recip->addPerBondParameter("qcstart"); - corr_recip->addPerBondParameter("qcend"); + addPerBondParameters(*corr_recip, {"qcstart", "qcend"}); } for (int i = 0; i < nwater_ion; i++) { @@ -964,7 +956,7 @@ void OpenMMPMEFEP::initialise() OpenMM::Platform::loadPluginsFromDirectory( OpenMM::Platform::getDefaultPluginsDirectory()); - // the system will hold all + // the system will hold all atoms auto system_openmm = new OpenMM::System(); // Andersen thermostat From a3b00d81eb6a7eabdd96adda0c5ac180a8b93b1f Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 18 May 2022 20:13:48 +0100 Subject: [PATCH 117/148] optionally switch off offsets on ion debug system; fix: record H-H distances for exception calculations --- corelib/src/libs/SireMove/openmmpmefep.cpp | 190 +++++++++++---------- 1 file changed, 98 insertions(+), 92 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 83d45cddf..7fec85bb9 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -617,7 +617,7 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { // NOTE: only for debugging with simple non-dummy systems like ions const bool fullPME = false; // use false for production const bool useOffset = true; // use true for production -const bool doCharge = true; +const bool doCharge = true; // for the ion debug system only /* @@ -637,6 +637,7 @@ void OpenMMPMEFEP::initialise_ion() qDebug() << "Running single ion debug system"; qDebug() << "fullPME =" << fullPME; qDebug() << "doCharge =" << doCharge; + qDebug() << "useOffset =" << useOffset; } // Create a workspace using the stored molgroup @@ -689,8 +690,8 @@ void OpenMMPMEFEP::initialise_ion() system->addForce(recip_space); system->setDefaultPeriodicBoxVectors(OpenMM::Vec3(boxl_ion, 0.0, 0.0), - OpenMM::Vec3(0.0, boxl_ion, 0.0), - OpenMM::Vec3(0.0, 0.0, boxl_ion)); + OpenMM::Vec3(0.0, boxl_ion, 0.0), + OpenMM::Vec3(0.0, 0.0, boxl_ion)); recip_space->setForceGroup(RECIP_FCG); recip_space->setNonbondedMethod(OpenMM::NonbondedForce::PME); @@ -720,10 +721,12 @@ void OpenMMPMEFEP::initialise_ion() } // linear scaling of the charges - recip_space->addGlobalParameter("lambda_offset", current_lambda); - recip_space->addParticleParameterOffset("lambda_offset", idx, - charge_scale, - sigma_scale, epsilon_scale); + if (useOffset) { + recip_space->addGlobalParameter("lambda_offset", current_lambda); + recip_space->addParticleParameterOffset("lambda_offset", idx, + charge_scale, + sigma_scale, epsilon_scale); + } // NOTE: can't be *new for some reason auto direct_space = new OpenMM::CustomNonbondedForce(GENERAL_ION); @@ -816,6 +819,7 @@ void OpenMMPMEFEP::initialise_ion() pairs.push_back(std::make_pair(idx_O, idx_H1)); pairs.push_back(std::make_pair(idx_O, idx_H2)); + pairs.push_back(std::make_pair(idx_H1, idx_H2)); system->addConstraint(idx_O, idx_H1, r_OH); system->addConstraint(idx_O, idx_H2, r_OH); @@ -839,7 +843,12 @@ void OpenMMPMEFEP::initialise_ion() double qprod_start, qprod_end; double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; - for (unsigned int i = 0; i < recip_space->getNumExceptions(); i++) { + unsigned int num_exceptions = recip_space->getNumExceptions(); + + if (Debug) + qDebug() << "Number of exceptions =" << num_exceptions; + + for (unsigned int i = 0; i < num_exceptions; i++) { recip_space->getExceptionParameters (i, p1, p2, charge_prod, sigma_avg, epsilon_avg); @@ -1225,15 +1234,17 @@ void OpenMMPMEFEP::initialise() for (int j = 0; j < nats_mol; ++j) { // This adds each atom to the system via its mass - // JM 10/16 make sure that perturbed atoms have mass of heaviest end-state + // JM 10/16 make sure that perturbed atoms have mass of heaviest + // end-state system_openmm->addParticle(m[j]); Atom at = molatoms(j); AtomNum atnum = at.number(); if (Debug) - qDebug() << " openMM_index " << system_index << " Sire Atom Number " - << atnum.toString() << " Mass particle = " << m[j]; + qDebug() << "openMM_index" << system_index + << "Sire Atom Number" << atnum.toString() + << "Mass particle =" << m[j]; AtomNumToOpenMMIndex[atnum.value()] = system_index; @@ -1243,83 +1254,82 @@ void OpenMMPMEFEP::initialise() // This is very AMBER specific. AtomName atname = at.name(); + ResName resname = at.residue().name(); if (Debug) qDebug() << " atname " << atname.value() << " mol " << i; - if (atname == AtomName("EPW")) { - ResName resname = at.residue().name(); - - if (resname == ResName("WAT")) { - Atom oatom = molatoms.select(AtomName("O")); - Atom h1atom = molatoms.select(AtomName("H1")); - Atom h2atom = molatoms.select(AtomName("H2")); - - AmberParameters amber_params = - mol.property("amberparameters").asA(); - QList bonds_ff = amber_params.getAllBonds(); - - double distoh = -1.0; - double disthh = -1.0; - double distoe = -1.0; - - for (int k = 0; k < bonds_ff.length(); k++) { - BondID bond_ff = bonds_ff[k]; - QList bond_params = amber_params.getParams(bond_ff); - - double r0 = bond_params[1]; - - AtomName at0name = mol.select(bond_ff.atom0()).name(); - AtomName at1name = mol.select(bond_ff.atom1()).name(); - - if ((at0name == AtomName("O") and at1name == AtomName("H1")) - or ( at0name == AtomName("H1") and at1name == AtomName("O"))) { - distoh = r0; - } - else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) - or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) { - disthh = r0; - } - else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) - or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) { - distoe = r0; - } - } - - if (distoh < 0.0 or disthh < 0.0 or distoe < 0.0) - throw SireError::program_bug( - QObject::tr("Could not find expected atoms in TIP4P water molecule."), CODELOC); - - double weightH = distoe / sqrt((distoh * distoh) - (0.25 * disthh * disthh)); - - int o_index = AtomNumToOpenMMIndex[oatom.number().value()]; - int h1_index = AtomNumToOpenMMIndex[h1atom.number().value()]; - int h2_index = AtomNumToOpenMMIndex[h2atom.number().value()]; - - if (Debug) - qDebug() << "virtual site " << system_index << " o " - << o_index << " h1 " << h1_index << " h2 " - << h2_index << " 1 - weightH " << 1 - weightH - << " weightH/2 " << weightH / 2; - - auto vsite = - new OpenMM::ThreeParticleAverageSite(o_index, h1_index, - h2_index, 1 - weightH, - weightH / 2, weightH / 2); - - system_openmm->setVirtualSite(system_index, vsite); - } - } + if (atname == AtomName("EPW") && resname == ResName("WAT")) { + Atom oatom = molatoms.select(AtomName("O")); + Atom h1atom = molatoms.select(AtomName("H1")); + Atom h2atom = molatoms.select(AtomName("H2")); + + AmberParameters amber_params = + mol.property("amberparameters").asA(); + QList bonds_ff = amber_params.getAllBonds(); + + double distoh = -1.0; + double disthh = -1.0; + double distoe = -1.0; + + for (int k = 0; k < bonds_ff.length(); k++) { + BondID bond_ff = bonds_ff[k]; + QList bond_params = amber_params.getParams(bond_ff); + + double r0 = bond_params[1]; + + AtomName at0name = mol.select(bond_ff.atom0()).name(); + AtomName at1name = mol.select(bond_ff.atom1()).name(); + + if ((at0name == AtomName("O") and at1name == AtomName("H1")) + or ( at0name == AtomName("H1") and at1name == AtomName("O"))) { + distoh = r0; + } + else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) + or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) { + disthh = r0; + } + else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) + or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) { + distoe = r0; + } + } + + if (distoh < 0.0 or disthh < 0.0 or distoe < 0.0) + throw SireError::program_bug + (QObject::tr("Could not find expected atoms in " + "TIP4P water molecule."), CODELOC); + + double weightH = distoe / sqrt((distoh * distoh) - + (0.25 * disthh * disthh)); + + int o_index = AtomNumToOpenMMIndex[oatom.number().value()]; + int h1_index = AtomNumToOpenMMIndex[h1atom.number().value()]; + int h2_index = AtomNumToOpenMMIndex[h2atom.number().value()]; + + if (Debug) + qDebug() << "virtual site " << system_index << " o " + << o_index << " h1 " << h1_index << " h2 " + << h2_index << " 1 - weightH " << 1 - weightH + << " weightH/2 " << weightH / 2; + + auto vsite = + new OpenMM::ThreeParticleAverageSite + (o_index, h1_index, h2_index, 1 - weightH, + weightH / 2, weightH / 2); + + system_openmm->setVirtualSite(system_index, vsite); + } // EPW system_index = system_index + 1; } // end of loop on atoms in molecule - } // end of loop on molecules in workspace int num_atoms_till_i = 0; - // JM July 13. This also needs to be changed because there could be more than one perturbed molecule + // JM July 13. This also needs to be changed because there could be more + // than one perturbed molecule // Molecule solutemol = solute.moleculeAt(0).molecule(); int nions = 0; @@ -1333,7 +1343,8 @@ void OpenMMPMEFEP::initialise() std::vector > bondPairs; // A list of 1,4 atom pairs with non default scale factors - // for each entry, first pair has pair of indices, second has pair of scale factors + // for each entry, first pair has pair of indices, second has pair of + // scale factors QHash< QPair, QPair > custom14pairs; bool special_14 = false; @@ -1627,17 +1638,15 @@ void OpenMMPMEFEP::initialise() } // end of restraint flag // single atoms like ions - bool hasConnectivity = molecule.hasProperty("connectivity"); if (!hasConnectivity) { num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; if (Debug) { - qDebug() << "\nAtoms = " << num_atoms_molecule << " Num atoms till i =" << - num_atoms_till_i; - qDebug() << - "*********************MONOATOMIC MOLECULE DETECTED**************************\n"; + qDebug() << "Number of atoms = " << num_atoms_molecule + << "Number of atoms till i =" << num_atoms_till_i; + qDebug() << "***** MONOATOMIC MOLECULE DETECTED *****\n"; } nions = nions + 1; @@ -1645,7 +1654,6 @@ void OpenMMPMEFEP::initialise() } // bonded terms - QList< BondID > bond_pert_list; QList< BondID > bond_pert_swap_list; QList< AngleID > angle_pert_list; @@ -1812,6 +1820,7 @@ void OpenMMPMEFEP::initialise() "bend = " << bend << " kcal/A A" << "\n"; } } + if (str == "SireMM::ThreeAtomPerturbation") { const ThreeAtomPerturbation &three = pert.asA(); int idx0 = three.atom0().asA().value() + num_atoms_till_i; @@ -2151,7 +2160,7 @@ void OpenMMPMEFEP::initialise() } } - } + } // end if (pert.isA()) } // end for perturbations } // end solute molecule perturbation @@ -2164,7 +2173,6 @@ void OpenMMPMEFEP::initialise() ResName molfirstresname = molecule.residues()(0).name(); // Bonds - for (int j = 0; j < bonds_ff.length(); j++) { BondID bond_ff = bonds_ff[j]; QList bond_params = amber_params.getParams(bond_ff); @@ -2207,13 +2215,13 @@ void OpenMMPMEFEP::initialise() system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); } else if (flag_constraint == HBONDS) { - if ((atom0[6] == 'H') || (atom1[6] == 'H')) { + if ((atom0[6] == 'H') || (atom1[6] == 'H')) { // will add constraint between all TIP3P atoms system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); } else { bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); - } + } } // Bond exclusion List @@ -2221,7 +2229,6 @@ void OpenMMPMEFEP::initialise() } // Angles - QList angles_ff = amber_params.getAllAngles(); QVector angles = angles_ff.toVector(); @@ -2257,6 +2264,7 @@ void OpenMMPMEFEP::initialise() continue; } } + if (Debug) qDebug() << "Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << idx2 << "\n"; @@ -2291,7 +2299,6 @@ void OpenMMPMEFEP::initialise() } // end of angles // Dihedrals - QList dihedrals_ff = amber_params.getAllDihedrals(); QVector dihedrals = dihedrals_ff.toVector(); @@ -2341,7 +2348,6 @@ void OpenMMPMEFEP::initialise() } // end of dihedrals // Improper Dihedrals - QList impropers_ff = amber_params.getAllImpropers(); QVector impropers = impropers_ff.toVector(); @@ -2429,7 +2435,7 @@ void OpenMMPMEFEP::initialise() if (Debug) { if (nions != 0) - qDebug() << "\nNumber of ions = " << nions << "\n"; + qDebug() << "\nNumber of ions = " << nions; } @@ -2443,7 +2449,7 @@ void OpenMMPMEFEP::initialise() int num_exceptions = recip_space->getNumExceptions(); if (Debug) - qDebug() << "num exceptions =" << num_exceptions << "\n"; + qDebug() << "Number of exceptions =" << num_exceptions; for (int i = 0; i < num_exceptions; i++) { int p1, p2; From 1a6a847dbe2d4fd06b4f26dd1696170afb5f90da Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 19 May 2022 07:55:40 +0100 Subject: [PATCH 118/148] optional arguments for initialise functions; wrapper updated --- corelib/src/libs/SireMove/openmmpmefep.cpp | 8 +- corelib/src/libs/SireMove/openmmpmefep.h | 5 +- wrapper/Analysis/CMakeAutogenFile.txt | 14 +- wrapper/Analysis/SireAnalysis_registrars.cpp | 14 +- wrapper/AutoGenerate/create_wrappers.py | 8 +- wrapper/Base/CMakeAutogenFile.txt | 96 +++++----- wrapper/Base/SireBase_properties.cpp | 10 +- wrapper/Base/SireBase_registrars.cpp | 36 ++-- wrapper/CAS/CMakeAutogenFile.txt | 100 +++++----- wrapper/CAS/SireCAS_registrars.cpp | 84 ++++---- wrapper/CAS/_CAS_free_functions.pypp.cpp | 40 ++-- wrapper/Cluster/CMakeAutogenFile.txt | 10 +- wrapper/FF/CMakeAutogenFile.txt | 50 ++--- wrapper/FF/SireFF_properties.cpp | 10 +- wrapper/FF/SireFF_registrars.cpp | 56 +++--- wrapper/ID/CMakeAutogenFile.txt | 6 +- wrapper/IO/CMakeAutogenFile.txt | 52 ++--- wrapper/IO/GroMolType.pypp.cpp | 12 ++ wrapper/IO/SDF.pypp.cpp | 4 + wrapper/IO/SireIO_properties.cpp | 22 +-- wrapper/IO/SireIO_registrars.cpp | 70 +++---- wrapper/Move/CMakeAutogenFile.txt | 125 ++++++------ wrapper/Move/OpenMMFrEnergyST.pypp.cpp | 4 +- wrapper/Move/OpenMMPMEFEP.pypp.cpp | 35 ++-- wrapper/Move/Simulation.pypp.cpp | 8 +- wrapper/Move/SireMove_properties.cpp | 92 ++++----- wrapper/Move/SireMove_registrars.cpp | 179 +++++++++--------- wrapper/Squire/CMakeAutogenFile.txt | 46 ++--- wrapper/Squire/Squire_properties.cpp | 24 +-- wrapper/Squire/Squire_registrars.cpp | 38 ++-- .../Squire/_Squire_free_functions.pypp.cpp | 36 ++-- wrapper/Stream/CMakeAutogenFile.txt | 2 +- wrapper/Stream/SireStream_registrars.cpp | 4 +- wrapper/System/CMakeAutogenFile.txt | 74 ++++---- wrapper/System/SireSystem_registrars.cpp | 98 +++++----- wrapper/Units/CMakeAutogenFile.txt | 4 +- wrapper/Vol/CMakeAutogenFile.txt | 24 +-- wrapper/Vol/SireVol_properties.cpp | 16 +- wrapper/Vol/SireVol_registrars.cpp | 34 ++-- 39 files changed, 785 insertions(+), 765 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 7fec85bb9..27d19916d 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -615,9 +615,7 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { // NOTE: only for debugging with simple non-dummy systems like ions -const bool fullPME = false; // use false for production const bool useOffset = true; // use true for production -const bool doCharge = true; // for the ion debug system only /* @@ -627,7 +625,7 @@ const bool doCharge = true; // for the ion debug system only */ #include "posvel.h" -void OpenMMPMEFEP::initialise_ion() +void OpenMMPMEFEP::initialise_ion(bool fullPME, bool doCharge) { if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; @@ -636,8 +634,8 @@ void OpenMMPMEFEP::initialise_ion() version.size()); qDebug() << "Running single ion debug system"; qDebug() << "fullPME =" << fullPME; - qDebug() << "doCharge =" << doCharge; qDebug() << "useOffset =" << useOffset; + qDebug() << "doCharge =" << doCharge; } // Create a workspace using the stored molgroup @@ -879,7 +877,7 @@ void OpenMMPMEFEP::initialise_ion() * initialises the openMM Free energy single topology calculation * Initialise must be called before anything else happens. */ -void OpenMMPMEFEP::initialise() +void OpenMMPMEFEP::initialise(bool fullPME) { if (Debug) { qDebug() << "Initialising OpenMMPMEFEP"; diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index 4b35e5729..a6ae82491 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -94,9 +94,8 @@ namespace SireMove { bool isTimeReversible() const; - void initialise(); - void initialise_ion(); - + void initialise(bool fullPME = false); + void initialise_ion(bool fullPME = false, bool doCharge = true); SireUnits::Dimension::MolarEnergy getPotentialEnergy(const System &system); diff --git a/wrapper/Analysis/CMakeAutogenFile.txt b/wrapper/Analysis/CMakeAutogenFile.txt index fa020d86c..a640ff263 100644 --- a/wrapper/Analysis/CMakeAutogenFile.txt +++ b/wrapper/Analysis/CMakeAutogenFile.txt @@ -1,16 +1,16 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - FEPDeltas.pypp.cpp - TI.pypp.cpp - TIComponents.pypp.cpp - PMF.pypp.cpp - FEP.pypp.cpp + TIPMF.pypp.cpp BennettsRatios.pypp.cpp - Bennetts.pypp.cpp + FEP.pypp.cpp DataPoint.pypp.cpp Gradients.pypp.cpp ComponentGradients.pypp.cpp - TIPMF.pypp.cpp + PMF.pypp.cpp + Bennetts.pypp.cpp + FEPDeltas.pypp.cpp + TI.pypp.cpp + TIComponents.pypp.cpp SireAnalysis_containers.cpp SireAnalysis_registrars.cpp ) diff --git a/wrapper/Analysis/SireAnalysis_registrars.cpp b/wrapper/Analysis/SireAnalysis_registrars.cpp index 62b6fe9b3..198a79f49 100644 --- a/wrapper/Analysis/SireAnalysis_registrars.cpp +++ b/wrapper/Analysis/SireAnalysis_registrars.cpp @@ -5,27 +5,27 @@ #include "Helpers/version_error_impl.h" -#include "fep.h" +#include "ti.h" #include "ticomponents.h" +#include "fep.h" #include "bennetts.h" -#include "ti.h" #include "Helpers/objectregistry.hpp" void register_SireAnalysis_objects() { + ObjectRegistry::registerConverterFor< SireAnalysis::Gradients >(); + ObjectRegistry::registerConverterFor< SireAnalysis::TI >(); + ObjectRegistry::registerConverterFor< SireAnalysis::TIPMF >(); + ObjectRegistry::registerConverterFor< SireAnalysis::TIComponents >(); + ObjectRegistry::registerConverterFor< SireAnalysis::ComponentGradients >(); ObjectRegistry::registerConverterFor< SireAnalysis::FEP >(); ObjectRegistry::registerConverterFor< SireAnalysis::FEPDeltas >(); ObjectRegistry::registerConverterFor< SireAnalysis::DataPoint >(); ObjectRegistry::registerConverterFor< SireAnalysis::PMF >(); - ObjectRegistry::registerConverterFor< SireAnalysis::TIComponents >(); - ObjectRegistry::registerConverterFor< SireAnalysis::ComponentGradients >(); ObjectRegistry::registerConverterFor< SireAnalysis::BennettsRatios >(); ObjectRegistry::registerConverterFor< SireAnalysis::Bennetts >(); - ObjectRegistry::registerConverterFor< SireAnalysis::Gradients >(); - ObjectRegistry::registerConverterFor< SireAnalysis::TI >(); - ObjectRegistry::registerConverterFor< SireAnalysis::TIPMF >(); } diff --git a/wrapper/AutoGenerate/create_wrappers.py b/wrapper/AutoGenerate/create_wrappers.py index c324e5b29..55dacb3d8 100644 --- a/wrapper/AutoGenerate/create_wrappers.py +++ b/wrapper/AutoGenerate/create_wrappers.py @@ -613,10 +613,10 @@ def fixMB(mb): # All of the headers must be installed in the sire.app/include directory dir = os.path.dirname(sys.executable) - qtdir = "%s/../include/qt" % os.path.abspath(dir) + qtdir = "/usr/include/x86_64-linux-gnu/qt5" #"%s/../include/qt" % os.path.abspath(dir) boostdir = "%s/../include" % os.path.abspath(dir) gsldir = boostdir - openmm_include_dir = boostdir + openmm_include_dir = "/usr/local/openmm/include" need_input = False @@ -669,7 +669,7 @@ def fixMB(mb): cflags = "-m64 -fPIC -std=c++14", include_paths = sire_include_dirs + qt_include_dirs + boost_include_dirs + gsl_include_dirs, - define_symbols = ["GCCXML_PARSE", "__PIC__", + define_symbols = ["GCCXML_PARSE", "SIRE_ALWAYS_INLINE=inline", "SIRE_SKIP_INLINE_FUNCTIONS", "SIREN_SKIP_INLINE_FUNCTIONS", @@ -689,7 +689,7 @@ def fixMB(mb): include_paths = sire_include_dirs + qt_include_dirs + boost_include_dirs + gsl_include_dirs + openmm_include_dirs, - define_symbols = ["GCCXML_PARSE", "__PIC__", + define_symbols = ["GCCXML_PARSE", "SIRE_USE_OPENMM", "SIRE_ALWAYS_INLINE=inline", "SIRE_SKIP_INLINE_FUNCTIONS", diff --git a/wrapper/Base/CMakeAutogenFile.txt b/wrapper/Base/CMakeAutogenFile.txt index 589cb47f7..2acaabd2c 100644 --- a/wrapper/Base/CMakeAutogenFile.txt +++ b/wrapper/Base/CMakeAutogenFile.txt @@ -1,64 +1,64 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - Array2D_double_.pypp.cpp - ChunkedVector_double_.pypp.cpp - vector_less__double__greater_.pypp.cpp - ArrayProperty_QString_.pypp.cpp - _Base_free_functions.pypp.cpp - FlopsMark.pypp.cpp - CombineProperties.pypp.cpp - PackedArray2D_IntegerArrayProperty_Array.pypp.cpp - PackedArray2D_StringArrayProperty.pypp.cpp - IntegerArrayProperty.pypp.cpp - SimpleRange.pypp.cpp - Incremint.pypp.cpp - PackedArray2D_QString_Array.pypp.cpp - LinkToProperty.pypp.cpp - PackedArray2D_double_.pypp.cpp - StringProperty.pypp.cpp - BooleanProperty.pypp.cpp - PropertyMap.pypp.cpp - PackedArray2D_QString_.pypp.cpp - PackedArray2D_IntegerArrayProperty.pypp.cpp - TrigArray2DBase.pypp.cpp - Process.pypp.cpp - ArrayProperty_double_.pypp.cpp - PackedArray2D_PropertyList.pypp.cpp Property.pypp.cpp - Range.pypp.cpp - PackedArray2D_QVariant_.pypp.cpp - TrigArray2D_double_.pypp.cpp - UpperCaseString.pypp.cpp - PackedArray2D_int_Array.pypp.cpp - VariantProperty.pypp.cpp - PackedArray2D_PropertyList_Array.pypp.cpp + PackedArray2D_QString_.pypp.cpp + PackedArray2D_QVariant_Array.pypp.cpp LowerCaseString.pypp.cpp - MemInfo.pypp.cpp + PackedArray2D_IntegerArrayProperty_Array.pypp.cpp + PackedArray2D_StringArrayProperty_Array.pypp.cpp + CombineProperties.pypp.cpp PropertyName.pypp.cpp - DoubleArrayProperty.pypp.cpp - StringMangler.pypp.cpp - PropertyList.pypp.cpp - MajorMinorVersion.pypp.cpp - UnitTest.pypp.cpp + PackedArray2D_int_.pypp.cpp + TrigArray2DBase.pypp.cpp TimeProperty.pypp.cpp + Array2DBase.pypp.cpp + TrimString.pypp.cpp ArrayProperty_int_.pypp.cpp - CPUID.pypp.cpp + ChunkedVector_double_.pypp.cpp + NoMangling.pypp.cpp + DoubleArrayProperty.pypp.cpp + VariantProperty.pypp.cpp + Array2D_double_.pypp.cpp + StringProperty.pypp.cpp TempDir.pypp.cpp - NullProperty.pypp.cpp + MemInfo.pypp.cpp + ArrayProperty_QString_.pypp.cpp + PackedArray2D_QVariant_.pypp.cpp + Incremint.pypp.cpp + PackedArray2D_IntegerArrayProperty.pypp.cpp NumberProperty.pypp.cpp - LengthProperty.pypp.cpp - TrimString.pypp.cpp - PackedArray2D_StringArrayProperty_Array.pypp.cpp - StringArrayProperty.pypp.cpp + NullProperty.pypp.cpp + ArrayProperty_double_.pypp.cpp + LinkToProperty.pypp.cpp + PropertyList.pypp.cpp + UpperCaseString.pypp.cpp + UnitTest.pypp.cpp + PackedArray2D_double_.pypp.cpp + SimpleRange.pypp.cpp + PackedArray2D_QString_Array.pypp.cpp + PackedArray2D_PropertyList_Array.pypp.cpp + _Base_free_functions.pypp.cpp PackedArray2D_DoubleArrayProperty_Array.pypp.cpp - Array2DBase.pypp.cpp - Version.pypp.cpp + LengthProperty.pypp.cpp + vector_less__double__greater_.pypp.cpp + FlopsMark.pypp.cpp + CPUID.pypp.cpp + Range.pypp.cpp + PropertyMap.pypp.cpp Properties.pypp.cpp - PackedArray2D_int_.pypp.cpp + TrigArray2D_double_.pypp.cpp + Process.pypp.cpp PackedArray2D_DoubleArrayProperty.pypp.cpp - PackedArray2D_QVariant_Array.pypp.cpp + StringArrayProperty.pypp.cpp + PackedArray2D_StringArrayProperty.pypp.cpp + PackedArray2D_PropertyList.pypp.cpp + StringMangler.pypp.cpp + MajorMinorVersion.pypp.cpp PackedArray2D_double_Array.pypp.cpp - NoMangling.pypp.cpp + IntegerArrayProperty.pypp.cpp + BooleanProperty.pypp.cpp + PackedArray2D_int_Array.pypp.cpp + Version.pypp.cpp SireBase_containers.cpp SireBase_properties.cpp SireBase_registrars.cpp diff --git a/wrapper/Base/SireBase_properties.cpp b/wrapper/Base/SireBase_properties.cpp index da472bef6..6a7e58bd5 100644 --- a/wrapper/Base/SireBase_properties.cpp +++ b/wrapper/Base/SireBase_properties.cpp @@ -4,6 +4,10 @@ #include "Base/convertproperty.hpp" #include "SireBase_properties.h" +#include "SireStream/datastream.h" +#include "range.h" +#include "ranges.h" +#include "range.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" #include "stringmangler.h" @@ -18,13 +22,9 @@ #include #include #include "property.h" -#include "SireStream/datastream.h" -#include "range.h" -#include "ranges.h" -#include "range.h" void register_SireBase_properties() { + register_property_container< SireBase::RangePtr, SireBase::Range >(); register_property_container< SireBase::StringManglerPtr, SireBase::StringMangler >(); register_property_container< SireBase::PropertyPtr, SireBase::Property >(); - register_property_container< SireBase::RangePtr, SireBase::Range >(); } diff --git a/wrapper/Base/SireBase_registrars.cpp b/wrapper/Base/SireBase_registrars.cpp index 948e8d26b..52f68a96b 100644 --- a/wrapper/Base/SireBase_registrars.cpp +++ b/wrapper/Base/SireBase_registrars.cpp @@ -7,19 +7,19 @@ #include "cpuid.h" #include "propertylist.h" +#include "majorminorversion.h" +#include "lengthproperty.h" #include "stringproperty.h" -#include "linktoproperty.h" +#include "ranges.h" #include "stringmangler.h" -#include "lengthproperty.h" +#include "properties.h" +#include "propertymap.h" +#include "property.h" #include "booleanproperty.h" #include "timeproperty.h" -#include "property.h" -#include "variantproperty.h" +#include "linktoproperty.h" #include "numberproperty.h" -#include "majorminorversion.h" -#include "propertymap.h" -#include "ranges.h" -#include "properties.h" +#include "variantproperty.h" #include "Helpers/objectregistry.hpp" @@ -31,24 +31,24 @@ void register_SireBase_objects() ObjectRegistry::registerConverterFor< SireBase::IntegerArrayProperty >(); ObjectRegistry::registerConverterFor< SireBase::StringArrayProperty >(); ObjectRegistry::registerConverterFor< SireBase::PropertyList >(); + ObjectRegistry::registerConverterFor< SireBase::MajorMinorVersion >(); + ObjectRegistry::registerConverterFor< SireBase::Version >(); + ObjectRegistry::registerConverterFor< SireBase::LengthProperty >(); ObjectRegistry::registerConverterFor< SireBase::StringProperty >(); - ObjectRegistry::registerConverterFor< SireBase::LinkToProperty >(); + ObjectRegistry::registerConverterFor< SireBase::SimpleRange >(); ObjectRegistry::registerConverterFor< SireBase::NoMangling >(); ObjectRegistry::registerConverterFor< SireBase::TrimString >(); ObjectRegistry::registerConverterFor< SireBase::UpperCaseString >(); ObjectRegistry::registerConverterFor< SireBase::LowerCaseString >(); - ObjectRegistry::registerConverterFor< SireBase::LengthProperty >(); + ObjectRegistry::registerConverterFor< SireBase::Properties >(); + ObjectRegistry::registerConverterFor< SireBase::PropertyName >(); + ObjectRegistry::registerConverterFor< SireBase::PropertyMap >(); + ObjectRegistry::registerConverterFor< SireBase::NullProperty >(); ObjectRegistry::registerConverterFor< SireBase::BooleanProperty >(); ObjectRegistry::registerConverterFor< SireBase::TimeProperty >(); - ObjectRegistry::registerConverterFor< SireBase::NullProperty >(); - ObjectRegistry::registerConverterFor< SireBase::VariantProperty >(); + ObjectRegistry::registerConverterFor< SireBase::LinkToProperty >(); ObjectRegistry::registerConverterFor< SireBase::NumberProperty >(); - ObjectRegistry::registerConverterFor< SireBase::MajorMinorVersion >(); - ObjectRegistry::registerConverterFor< SireBase::Version >(); - ObjectRegistry::registerConverterFor< SireBase::PropertyName >(); - ObjectRegistry::registerConverterFor< SireBase::PropertyMap >(); - ObjectRegistry::registerConverterFor< SireBase::SimpleRange >(); - ObjectRegistry::registerConverterFor< SireBase::Properties >(); + ObjectRegistry::registerConverterFor< SireBase::VariantProperty >(); } diff --git a/wrapper/CAS/CMakeAutogenFile.txt b/wrapper/CAS/CMakeAutogenFile.txt index 40ff78cd6..206de3212 100644 --- a/wrapper/CAS/CMakeAutogenFile.txt +++ b/wrapper/CAS/CMakeAutogenFile.txt @@ -1,71 +1,71 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - Expression.pypp.cpp - EqualTo.pypp.cpp Conditional.pypp.cpp LessThan.pypp.cpp - Cot.pypp.cpp - Sec.pypp.cpp + Tan.pypp.cpp + AlwaysTrue.pypp.cpp + IntegrationConstant.pypp.cpp + Condition.pypp.cpp AlwaysFalse.pypp.cpp - Csc.pypp.cpp - Min.pypp.cpp - ArcTan.pypp.cpp - ArcCoth.pypp.cpp + ArcCosh.pypp.cpp + Ln.pypp.cpp + Product.pypp.cpp + PowerFunction.pypp.cpp + RealPower.pypp.cpp Tanh.pypp.cpp + Max.pypp.cpp + ArcCsch.pypp.cpp + Exp.pypp.cpp + ArcSec.pypp.cpp + ArcCsc.pypp.cpp + EqualTo.pypp.cpp + ExpressionProperty.pypp.cpp + IntegerPower.pypp.cpp + ArcSinh.pypp.cpp + Cot.pypp.cpp ArcSech.pypp.cpp - Tan.pypp.cpp - Cos.pypp.cpp - ArcCosh.pypp.cpp + LessOrEqualThan.pypp.cpp + SymbolComplex.pypp.cpp + ComplexPower.pypp.cpp + SymbolExpression.pypp.cpp + Values.pypp.cpp + Csc.pypp.cpp Coth.pypp.cpp PowerConstant.pypp.cpp - Power.pypp.cpp - Ln.pypp.cpp - Factor.pypp.cpp - AlwaysTrue.pypp.cpp - Sech.pypp.cpp - Identities.pypp.cpp + Cos.pypp.cpp + Symbol.pypp.cpp + Sum.pypp.cpp + DoubleFunc.pypp.cpp ArcCos.pypp.cpp - SymbolValue.pypp.cpp - Exp.pypp.cpp - I.pypp.cpp - NotEqualTo.pypp.cpp - _CAS_free_functions.pypp.cpp - ArcCsch.pypp.cpp - GreaterOrEqualThan.pypp.cpp - IntegrationConstant.pypp.cpp - SingleFunc.pypp.cpp Cosh.pypp.cpp - RealPower.pypp.cpp - Sin.pypp.cpp + Identities.pypp.cpp + Power.pypp.cpp Sinh.pypp.cpp - Constant.pypp.cpp - SymbolExpression.pypp.cpp - ArcCot.pypp.cpp - ArcSec.pypp.cpp - ExpressionProperty.pypp.cpp - DoubleFunc.pypp.cpp - ArcCsc.pypp.cpp + ComplexValues.pypp.cpp Csch.pypp.cpp - ComplexPower.pypp.cpp - Sum.pypp.cpp - GreaterThan.pypp.cpp + Constant.pypp.cpp ArcSin.pypp.cpp + ArcCot.pypp.cpp + Sech.pypp.cpp + I.pypp.cpp + Factor.pypp.cpp Abs.pypp.cpp - ExBase.pypp.cpp + Expression.pypp.cpp + Min.pypp.cpp RationalPower.pypp.cpp - ArcSinh.pypp.cpp - SymbolComplex.pypp.cpp ExpressionBase.pypp.cpp - Max.pypp.cpp - PowerFunction.pypp.cpp - ComplexValues.pypp.cpp - Product.pypp.cpp - Values.pypp.cpp - Condition.pypp.cpp - Symbol.pypp.cpp - LessOrEqualThan.pypp.cpp - IntegerPower.pypp.cpp + NotEqualTo.pypp.cpp + GreaterOrEqualThan.pypp.cpp + _CAS_free_functions.pypp.cpp + Sin.pypp.cpp + ArcTan.pypp.cpp + SingleFunc.pypp.cpp + SymbolValue.pypp.cpp ArcTanh.pypp.cpp + ExBase.pypp.cpp + Sec.pypp.cpp + GreaterThan.pypp.cpp + ArcCoth.pypp.cpp SireCAS_containers.cpp SireCAS_registrars.cpp ) diff --git a/wrapper/CAS/SireCAS_registrars.cpp b/wrapper/CAS/SireCAS_registrars.cpp index d06f3f5f7..c6fd4037b 100644 --- a/wrapper/CAS/SireCAS_registrars.cpp +++ b/wrapper/CAS/SireCAS_registrars.cpp @@ -5,46 +5,65 @@ #include "Helpers/version_error_impl.h" -#include "product.h" -#include "functionsignature.h" -#include "identities.h" +#include "sum.h" +#include "power.h" +#include "minmax.h" +#include "hyperbolicfuncs.h" +#include "invhyperbolicfuncs.h" #include "invtrigfuncs.h" +#include "product.h" #include "complexvalues.h" +#include "exp.h" +#include "expressionproperty.h" #include "i.h" -#include "conditional.h" +#include "expression.h" #include "symbol.h" -#include "sum.h" +#include "conditional.h" +#include "identities.h" +#include "values.h" +#include "constant.h" #include "integrationconstant.h" -#include "hyperbolicfuncs.h" -#include "invhyperbolicfuncs.h" +#include "abs.h" +#include "functionsignature.h" #include "function.h" #include "powerconstant.h" -#include "power.h" -#include "abs.h" -#include "values.h" -#include "minmax.h" #include "trigfuncs.h" -#include "expression.h" -#include "exp.h" -#include "constant.h" -#include "expressionproperty.h" #include "Helpers/objectregistry.hpp" void register_SireCAS_objects() { - ObjectRegistry::registerConverterFor< SireCAS::Product >(); - ObjectRegistry::registerConverterFor< SireCAS::FunctionSignature >(); - ObjectRegistry::registerConverterFor< SireCAS::Identities >(); + ObjectRegistry::registerConverterFor< SireCAS::Sum >(); + ObjectRegistry::registerConverterFor< SireCAS::Power >(); + ObjectRegistry::registerConverterFor< SireCAS::Min >(); + ObjectRegistry::registerConverterFor< SireCAS::Max >(); + ObjectRegistry::registerConverterFor< SireCAS::Cosh >(); + ObjectRegistry::registerConverterFor< SireCAS::Sinh >(); + ObjectRegistry::registerConverterFor< SireCAS::Tanh >(); + ObjectRegistry::registerConverterFor< SireCAS::Csch >(); + ObjectRegistry::registerConverterFor< SireCAS::Sech >(); + ObjectRegistry::registerConverterFor< SireCAS::Coth >(); + ObjectRegistry::registerConverterFor< SireCAS::ArcCosh >(); + ObjectRegistry::registerConverterFor< SireCAS::ArcSinh >(); + ObjectRegistry::registerConverterFor< SireCAS::ArcTanh >(); + ObjectRegistry::registerConverterFor< SireCAS::ArcCsch >(); + ObjectRegistry::registerConverterFor< SireCAS::ArcSech >(); + ObjectRegistry::registerConverterFor< SireCAS::ArcCoth >(); ObjectRegistry::registerConverterFor< SireCAS::ArcCos >(); ObjectRegistry::registerConverterFor< SireCAS::ArcSin >(); ObjectRegistry::registerConverterFor< SireCAS::ArcTan >(); ObjectRegistry::registerConverterFor< SireCAS::ArcCsc >(); ObjectRegistry::registerConverterFor< SireCAS::ArcSec >(); ObjectRegistry::registerConverterFor< SireCAS::ArcCot >(); + ObjectRegistry::registerConverterFor< SireCAS::Product >(); ObjectRegistry::registerConverterFor< SireCAS::ComplexValues >(); + ObjectRegistry::registerConverterFor< SireCAS::Exp >(); + ObjectRegistry::registerConverterFor< SireCAS::Ln >(); + ObjectRegistry::registerConverterFor< SireCAS::ExpressionProperty >(); ObjectRegistry::registerConverterFor< SireCAS::I >(); + ObjectRegistry::registerConverterFor< SireCAS::Expression >(); + ObjectRegistry::registerConverterFor< SireCAS::Symbol >(); ObjectRegistry::registerConverterFor< SireCAS::Conditional >(); ObjectRegistry::registerConverterFor< SireCAS::GreaterThan >(); ObjectRegistry::registerConverterFor< SireCAS::LessThan >(); @@ -54,43 +73,24 @@ void register_SireCAS_objects() ObjectRegistry::registerConverterFor< SireCAS::NotEqualTo >(); ObjectRegistry::registerConverterFor< SireCAS::AlwaysTrue >(); ObjectRegistry::registerConverterFor< SireCAS::AlwaysFalse >(); - ObjectRegistry::registerConverterFor< SireCAS::Symbol >(); - ObjectRegistry::registerConverterFor< SireCAS::Sum >(); + ObjectRegistry::registerConverterFor< SireCAS::Identities >(); + ObjectRegistry::registerConverterFor< SireCAS::Values >(); + ObjectRegistry::registerConverterFor< SireCAS::Constant >(); ObjectRegistry::registerConverterFor< SireCAS::IntegrationConstant >(); - ObjectRegistry::registerConverterFor< SireCAS::Cosh >(); - ObjectRegistry::registerConverterFor< SireCAS::Sinh >(); - ObjectRegistry::registerConverterFor< SireCAS::Tanh >(); - ObjectRegistry::registerConverterFor< SireCAS::Csch >(); - ObjectRegistry::registerConverterFor< SireCAS::Sech >(); - ObjectRegistry::registerConverterFor< SireCAS::Coth >(); - ObjectRegistry::registerConverterFor< SireCAS::ArcCosh >(); - ObjectRegistry::registerConverterFor< SireCAS::ArcSinh >(); - ObjectRegistry::registerConverterFor< SireCAS::ArcTanh >(); - ObjectRegistry::registerConverterFor< SireCAS::ArcCsch >(); - ObjectRegistry::registerConverterFor< SireCAS::ArcSech >(); - ObjectRegistry::registerConverterFor< SireCAS::ArcCoth >(); + ObjectRegistry::registerConverterFor< SireCAS::Abs >(); + ObjectRegistry::registerConverterFor< SireCAS::FunctionSignature >(); ObjectRegistry::registerConverterFor< SireCAS::Function >(); ObjectRegistry::registerConverterFor< SireCAS::PowerConstant >(); ObjectRegistry::registerConverterFor< SireCAS::IntegerPower >(); ObjectRegistry::registerConverterFor< SireCAS::RationalPower >(); ObjectRegistry::registerConverterFor< SireCAS::RealPower >(); ObjectRegistry::registerConverterFor< SireCAS::ComplexPower >(); - ObjectRegistry::registerConverterFor< SireCAS::Power >(); - ObjectRegistry::registerConverterFor< SireCAS::Abs >(); - ObjectRegistry::registerConverterFor< SireCAS::Values >(); - ObjectRegistry::registerConverterFor< SireCAS::Min >(); - ObjectRegistry::registerConverterFor< SireCAS::Max >(); ObjectRegistry::registerConverterFor< SireCAS::Cos >(); ObjectRegistry::registerConverterFor< SireCAS::Sin >(); ObjectRegistry::registerConverterFor< SireCAS::Tan >(); ObjectRegistry::registerConverterFor< SireCAS::Csc >(); ObjectRegistry::registerConverterFor< SireCAS::Sec >(); ObjectRegistry::registerConverterFor< SireCAS::Cot >(); - ObjectRegistry::registerConverterFor< SireCAS::Expression >(); - ObjectRegistry::registerConverterFor< SireCAS::Exp >(); - ObjectRegistry::registerConverterFor< SireCAS::Ln >(); - ObjectRegistry::registerConverterFor< SireCAS::Constant >(); - ObjectRegistry::registerConverterFor< SireCAS::ExpressionProperty >(); } diff --git a/wrapper/CAS/_CAS_free_functions.pypp.cpp b/wrapper/CAS/_CAS_free_functions.pypp.cpp index 52958cd84..c3a8bab0d 100644 --- a/wrapper/CAS/_CAS_free_functions.pypp.cpp +++ b/wrapper/CAS/_CAS_free_functions.pypp.cpp @@ -79,26 +79,6 @@ namespace bp = boost::python; #include "expression.h" -#include "SireCAS/errors.h" - -#include "SireStream/datastream.h" - -#include "complexvalues.h" - -#include "exbase.h" - -#include "expression.h" - -#include "expressionbase.h" - -#include "functions.h" - -#include "identities.h" - -#include "values.h" - -#include "exbase.h" - #include "SireMaths/complex.h" #include "SireMaths/maths.h" @@ -751,6 +731,26 @@ namespace bp = boost::python; #include "expression.h" +#include "SireCAS/errors.h" + +#include "SireStream/datastream.h" + +#include "complexvalues.h" + +#include "exbase.h" + +#include "expression.h" + +#include "expressionbase.h" + +#include "functions.h" + +#include "identities.h" + +#include "values.h" + +#include "exbase.h" + #include "SireMaths/complex.h" #include "SireMaths/maths.h" diff --git a/wrapper/Cluster/CMakeAutogenFile.txt b/wrapper/Cluster/CMakeAutogenFile.txt index 75d40f973..a7aff5cc8 100644 --- a/wrapper/Cluster/CMakeAutogenFile.txt +++ b/wrapper/Cluster/CMakeAutogenFile.txt @@ -1,15 +1,15 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - ErrorPacket.pypp.cpp - Node.pypp.cpp WorkTest.pypp.cpp - ThisThread.pypp.cpp + Nodes.pypp.cpp Cluster.pypp.cpp Promise.pypp.cpp - WorkPacket.pypp.cpp - Nodes.pypp.cpp + Node.pypp.cpp WorkPacketBase.pypp.cpp AbortPacket.pypp.cpp + ThisThread.pypp.cpp + ErrorPacket.pypp.cpp + WorkPacket.pypp.cpp SireCluster_containers.cpp SireCluster_registrars.cpp ) diff --git a/wrapper/FF/CMakeAutogenFile.txt b/wrapper/FF/CMakeAutogenFile.txt index 7e9f1740d..5ec74c227 100644 --- a/wrapper/FF/CMakeAutogenFile.txt +++ b/wrapper/FF/CMakeAutogenFile.txt @@ -1,40 +1,40 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - SingleComponent.pypp.cpp - CenterOfGeometry.pypp.cpp PotentialTable.pypp.cpp - IDAndSet_FFID_.pypp.cpp - Specify_FFID_.pypp.cpp - ForceTable.pypp.cpp - IDOrSet_FFID_.pypp.cpp + EnergyTable.pypp.cpp + FFMolGroup.pypp.cpp + G2FF.pypp.cpp FFID.pypp.cpp + CenterOfGeometry.pypp.cpp MolPotentialTable.pypp.cpp - Point.pypp.cpp - EnergyTable.pypp.cpp - G1FF.pypp.cpp + PointRef.pypp.cpp + FieldTable.pypp.cpp + Center.pypp.cpp MolForceTable.pypp.cpp - CenterOfMass.pypp.cpp - AtomPoint.pypp.cpp - GridFieldTable.pypp.cpp - NullFF.pypp.cpp - FF.pypp.cpp - VectorPoint.pypp.cpp - ForceFields.pypp.cpp - FF3D.pypp.cpp - FFIdx.pypp.cpp - MolEnergyTable.pypp.cpp Probe.pypp.cpp - FFMolGroup.pypp.cpp - G2FF.pypp.cpp + IDOrSet_FFID_.pypp.cpp FFDetail.pypp.cpp + GridPotentialTable.pypp.cpp NullProbe.pypp.cpp + AtomPoint.pypp.cpp MolFieldTable.pypp.cpp - Center.pypp.cpp + SingleComponent.pypp.cpp + Point.pypp.cpp + ForceFields.pypp.cpp + NullFF.pypp.cpp + CenterOfMass.pypp.cpp FFName.pypp.cpp - PointRef.pypp.cpp - GridPotentialTable.pypp.cpp - FieldTable.pypp.cpp + ForceTable.pypp.cpp FFComponent.pypp.cpp + Specify_FFID_.pypp.cpp + IDAndSet_FFID_.pypp.cpp + VectorPoint.pypp.cpp + FFIdx.pypp.cpp + FF3D.pypp.cpp + G1FF.pypp.cpp + GridFieldTable.pypp.cpp + FF.pypp.cpp + MolEnergyTable.pypp.cpp SireFF_containers.cpp SireFF_properties.cpp SireFF_registrars.cpp diff --git a/wrapper/FF/SireFF_properties.cpp b/wrapper/FF/SireFF_properties.cpp index ff2830a24..8b366fcb0 100644 --- a/wrapper/FF/SireFF_properties.cpp +++ b/wrapper/FF/SireFF_properties.cpp @@ -18,6 +18,10 @@ #include #include #include "forcefield.h" +#include "SireError/errors.h" +#include "SireStream/datastream.h" +#include "probe.h" +#include "probe.h" #include "SireMol/evaluator.h" #include "SireMol/mgidx.h" #include "SireMol/molecule.h" @@ -31,13 +35,9 @@ #include "point.h" #include #include "point.h" -#include "SireError/errors.h" -#include "SireStream/datastream.h" -#include "probe.h" -#include "probe.h" void register_SireFF_properties() { register_property_container< SireFF::FFPtr, SireFF::FF >(); - register_property_container< SireFF::PointPtr, SireFF::Point >(); register_property_container< SireFF::ProbePtr, SireFF::Probe >(); + register_property_container< SireFF::PointPtr, SireFF::Point >(); } diff --git a/wrapper/FF/SireFF_registrars.cpp b/wrapper/FF/SireFF_registrars.cpp index 53abacc0b..901c5b20d 100644 --- a/wrapper/FF/SireFF_registrars.cpp +++ b/wrapper/FF/SireFF_registrars.cpp @@ -5,60 +5,60 @@ #include "Helpers/version_error_impl.h" +#include "ffidx.h" +#include "energytable.h" #include "ffmolgroup.h" -#include "forcefields.h" #include "ffname.h" -#include "patches.h" #include "forcetable.h" -#include "potentialtable.h" #include "ffcomponent.h" +#include "ffidentifier.h" +#include "ffparameters.h" #include "forcefield.h" -#include "point.h" -#include "ffidx.h" -#include "energytable.h" -#include "patch.h" #include "fieldtable.h" -#include "ffparameters.h" -#include "ffidentifier.h" #include "probe.h" +#include "potentialtable.h" +#include "point.h" +#include "patches.h" +#include "forcefields.h" +#include "patch.h" #include "Helpers/objectregistry.hpp" void register_SireFF_objects() { + ObjectRegistry::registerConverterFor< SireFF::FFIdx >(); + ObjectRegistry::registerConverterFor< SireFF::EnergyTable >(); + ObjectRegistry::registerConverterFor< SireFF::MolEnergyTable >(); ObjectRegistry::registerConverterFor< SireFF::FFMolGroup >(); - ObjectRegistry::registerConverterFor< SireFF::ForceFields >(); ObjectRegistry::registerConverterFor< SireFF::FFName >(); - ObjectRegistry::registerConverterFor< SireFF::FFBead >(); - ObjectRegistry::registerConverterFor< SireFF::FFBeadChange >(); - ObjectRegistry::registerConverterFor< SireFF::Patches >(); ObjectRegistry::registerConverterFor< SireFF::ForceTable >(); ObjectRegistry::registerConverterFor< SireFF::MolForceTable >(); + ObjectRegistry::registerConverterFor< SireFF::SingleComponent >(); + ObjectRegistry::registerConverterFor< SireID::Specify >(); + ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); + ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); + ObjectRegistry::registerConverterFor< SireFF::FFIdentifier >(); + ObjectRegistry::registerConverterFor< SireFF::NullFFParameters >(); + ObjectRegistry::registerConverterFor< SireFF::NullFFParametersArray >(); + ObjectRegistry::registerConverterFor< SireFF::NullFF >(); + ObjectRegistry::registerConverterFor< SireFF::FieldTable >(); + ObjectRegistry::registerConverterFor< SireFF::GridFieldTable >(); + ObjectRegistry::registerConverterFor< SireFF::MolFieldTable >(); + ObjectRegistry::registerConverterFor< SireFF::NullProbe >(); ObjectRegistry::registerConverterFor< SireFF::PotentialTable >(); ObjectRegistry::registerConverterFor< SireFF::GridPotentialTable >(); ObjectRegistry::registerConverterFor< SireFF::MolPotentialTable >(); - ObjectRegistry::registerConverterFor< SireFF::SingleComponent >(); - ObjectRegistry::registerConverterFor< SireFF::NullFF >(); ObjectRegistry::registerConverterFor< SireFF::AtomPoint >(); ObjectRegistry::registerConverterFor< SireFF::VectorPoint >(); ObjectRegistry::registerConverterFor< SireFF::Center >(); ObjectRegistry::registerConverterFor< SireFF::CenterOfGeometry >(); ObjectRegistry::registerConverterFor< SireFF::CenterOfMass >(); - ObjectRegistry::registerConverterFor< SireFF::FFIdx >(); - ObjectRegistry::registerConverterFor< SireFF::EnergyTable >(); - ObjectRegistry::registerConverterFor< SireFF::MolEnergyTable >(); + ObjectRegistry::registerConverterFor< SireFF::FFBead >(); + ObjectRegistry::registerConverterFor< SireFF::FFBeadChange >(); + ObjectRegistry::registerConverterFor< SireFF::Patches >(); + ObjectRegistry::registerConverterFor< SireFF::ForceFields >(); ObjectRegistry::registerConverterFor< SireFF::Patch >(); - ObjectRegistry::registerConverterFor< SireFF::FieldTable >(); - ObjectRegistry::registerConverterFor< SireFF::GridFieldTable >(); - ObjectRegistry::registerConverterFor< SireFF::MolFieldTable >(); - ObjectRegistry::registerConverterFor< SireFF::NullFFParameters >(); - ObjectRegistry::registerConverterFor< SireFF::NullFFParametersArray >(); - ObjectRegistry::registerConverterFor< SireID::Specify >(); - ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); - ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); - ObjectRegistry::registerConverterFor< SireFF::FFIdentifier >(); - ObjectRegistry::registerConverterFor< SireFF::NullProbe >(); } diff --git a/wrapper/ID/CMakeAutogenFile.txt b/wrapper/ID/CMakeAutogenFile.txt index b5b848d12..70e344b38 100644 --- a/wrapper/ID/CMakeAutogenFile.txt +++ b/wrapper/ID/CMakeAutogenFile.txt @@ -1,10 +1,10 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - _ID_enumerations.pypp.cpp ID.pypp.cpp - Number.pypp.cpp - Index.pypp.cpp Name.pypp.cpp + Number.pypp.cpp IndexBase.pypp.cpp + Index.pypp.cpp + _ID_enumerations.pypp.cpp SireID_registrars.cpp ) diff --git a/wrapper/IO/CMakeAutogenFile.txt b/wrapper/IO/CMakeAutogenFile.txt index 6fbf5244c..424d20bdb 100644 --- a/wrapper/IO/CMakeAutogenFile.txt +++ b/wrapper/IO/CMakeAutogenFile.txt @@ -1,38 +1,38 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - ProtoMS.pypp.cpp - GroTop.pypp.cpp - CharmmPSF.pypp.cpp - Supplementary.pypp.cpp - AmberRst7.pypp.cpp - Gro87.pypp.cpp + TinkerParameters.pypp.cpp + GroSystem.pypp.cpp + NullIO.pypp.cpp + PDB.pypp.cpp PerturbationsTemplate.pypp.cpp - AmberRst.pypp.cpp PDBParameters.pypp.cpp - GroSystem.pypp.cpp - SDF.pypp.cpp + TrajectoryMonitor.pypp.cpp + GroTop.pypp.cpp Tinker.pypp.cpp - _IO_free_functions.pypp.cpp - AmberPrm.pypp.cpp - NullIO.pypp.cpp - FlexibilityLibrary.pypp.cpp - NullParser.pypp.cpp + Cube.pypp.cpp + ProtoMS.pypp.cpp + Gro87.pypp.cpp + CharmmPSF.pypp.cpp + PDB2.pypp.cpp + PerturbationsLibrary.pypp.cpp + Mol2.pypp.cpp GroAtom.pypp.cpp - IOParametersBase.pypp.cpp + AmberRst7.pypp.cpp + IOBase.pypp.cpp MoleculeParser.pypp.cpp - Mol2.pypp.cpp - PDB.pypp.cpp - PerturbationsLibrary.pypp.cpp - Amber.pypp.cpp + Supplementary.pypp.cpp + _IO_free_functions.pypp.cpp + IOParametersBase.pypp.cpp FlexibilityTemplate.pypp.cpp - ProtoMSParameters.pypp.cpp - TinkerParameters.pypp.cpp - Cube.pypp.cpp - PDB2.pypp.cpp - ZmatrixMaker.pypp.cpp + AmberPrm.pypp.cpp + AmberRst.pypp.cpp + SDF.pypp.cpp GroMolType.pypp.cpp - TrajectoryMonitor.pypp.cpp - IOBase.pypp.cpp + ZmatrixMaker.pypp.cpp + ProtoMSParameters.pypp.cpp + NullParser.pypp.cpp + Amber.pypp.cpp + FlexibilityLibrary.pypp.cpp SireIO_containers.cpp SireIO_properties.cpp SireIO_registrars.cpp diff --git a/wrapper/IO/GroMolType.pypp.cpp b/wrapper/IO/GroMolType.pypp.cpp index aa355b8ea..7163de808 100644 --- a/wrapper/IO/GroMolType.pypp.cpp +++ b/wrapper/IO/GroMolType.pypp.cpp @@ -444,6 +444,18 @@ void register_GroMolType_class(){ , ( bp::arg("elecstyle"), bp::arg("vdwstyle"), bp::arg("combrule"), bp::arg("elec14"), bp::arg("vdw14"), bp::arg("is_lambda1")=(bool)(false) ) , "Sanitise this moleculetype. This assumes that the moleculetype has\nbeen fully specified, so it collects everything together and checks that the\nmolecule makes sense. Any warnings generated can be retrieved using the\nwarnings function. It also uses the passed defaults from the top file,\ntogether with the information in the molecule to guess the forcefield for\nthe molecule" ); + } + { //::SireIO::GroMolType::setAtoms + + typedef void ( ::SireIO::GroMolType::*setAtoms_function_type)( ::QVector< SireIO::GroAtom > const &,bool ) ; + setAtoms_function_type setAtoms_function_value( &::SireIO::GroMolType::setAtoms ); + + GroMolType_exposer.def( + "setAtoms" + , setAtoms_function_value + , ( bp::arg("atoms"), bp::arg("is_lambda1")=(bool)(false) ) + , "Set the atoms to the passed vector" ); + } { //::SireIO::GroMolType::setNExcludedAtoms diff --git a/wrapper/IO/SDF.pypp.cpp b/wrapper/IO/SDF.pypp.cpp index 2a6bd2b63..75f0205ee 100644 --- a/wrapper/IO/SDF.pypp.cpp +++ b/wrapper/IO/SDF.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; #include "SireMol/atompropertylist.h" +#include "SireMol/atomradicals.h" + #include "SireMol/bondid.h" #include "SireMol/bondtype.h" @@ -41,6 +43,8 @@ namespace bp = boost::python; #include "SireMol/moleditor.h" +#include "SireMol/radical.h" + #include "SireMol/stereoscopy.h" #include "SireStream/datastream.h" diff --git a/wrapper/IO/SireIO_properties.cpp b/wrapper/IO/SireIO_properties.cpp index b347580b2..e7d022ea5 100644 --- a/wrapper/IO/SireIO_properties.cpp +++ b/wrapper/IO/SireIO_properties.cpp @@ -4,16 +4,6 @@ #include "Base/convertproperty.hpp" #include "SireIO_properties.h" -#include "SireError/errors.h" -#include "SireMol/cuttingfunction.h" -#include "SireMol/molecule.h" -#include "SireMol/molidx.h" -#include "SireMol/mover.hpp" -#include "SireStream/datastream.h" -#include "iobase.h" -#include -#include -#include "iobase.h" #include "SireBase/booleanproperty.h" #include "SireBase/parallel.h" #include "SireBase/stringproperty.h" @@ -33,8 +23,18 @@ #include #include #include "moleculeparser.h" +#include "SireError/errors.h" +#include "SireMol/cuttingfunction.h" +#include "SireMol/molecule.h" +#include "SireMol/molidx.h" +#include "SireMol/mover.hpp" +#include "SireStream/datastream.h" +#include "iobase.h" +#include +#include +#include "iobase.h" void register_SireIO_properties() { - register_property_container< SireIO::IOPtr, SireIO::IOBase >(); register_property_container< SireIO::MoleculeParserPtr, SireIO::MoleculeParser >(); + register_property_container< SireIO::IOPtr, SireIO::IOBase >(); } diff --git a/wrapper/IO/SireIO_registrars.cpp b/wrapper/IO/SireIO_registrars.cpp index 09c2e6eff..af9226a19 100644 --- a/wrapper/IO/SireIO_registrars.cpp +++ b/wrapper/IO/SireIO_registrars.cpp @@ -5,64 +5,64 @@ #include "Helpers/version_error_impl.h" -#include "amberrst.h" -#include "perturbationslibrary.h" +#include "charmmpsf.h" +#include "pdb.h" +#include "amber.h" +#include "moleculeparser.h" +#include "mol2.h" #include "pdb2.h" +#include "tinker.h" #include "protoms.h" -#include "zmatrixmaker.h" -#include "amberprm.h" -#include "amberrst7.h" -#include "gro87.h" +#include "perturbationslibrary.h" +#include "amberrst.h" #include "flexibilitylibrary.h" +#include "gro87.h" +#include "grotop.h" +#include "amberrst7.h" +#include "sdf.h" #include "iobase.h" #include "trajectorymonitor.h" -#include "amber.h" -#include "pdb.h" #include "supplementary.h" -#include "moleculeparser.h" -#include "sdf.h" -#include "mol2.h" -#include "grotop.h" -#include "tinker.h" -#include "charmmpsf.h" +#include "amberprm.h" +#include "zmatrixmaker.h" #include "Helpers/objectregistry.hpp" void register_SireIO_objects() { - ObjectRegistry::registerConverterFor< SireIO::AmberRst >(); - ObjectRegistry::registerConverterFor< SireIO::PerturbationsLibrary >(); - ObjectRegistry::registerConverterFor< SireIO::PerturbationsTemplate >(); - ObjectRegistry::registerConverterFor< SireIO::PDBAtom >(); - ObjectRegistry::registerConverterFor< SireIO::PDB2 >(); - ObjectRegistry::registerConverterFor< SireIO::ProtoMS >(); - ObjectRegistry::registerConverterFor< SireIO::ZmatrixMaker >(); - ObjectRegistry::registerConverterFor< SireIO::AmberPrm >(); - ObjectRegistry::registerConverterFor< SireIO::AmberRst7 >(); - ObjectRegistry::registerConverterFor< SireIO::Gro87 >(); - ObjectRegistry::registerConverterFor< SireIO::FlexibilityLibrary >(); - ObjectRegistry::registerConverterFor< SireIO::FlexibilityTemplate >(); - ObjectRegistry::registerConverterFor< SireIO::NullIO >(); - ObjectRegistry::registerConverterFor< SireIO::TrajectoryMonitor >(); - ObjectRegistry::registerConverterFor< SireIO::Amber >(); + ObjectRegistry::registerConverterFor< SireIO::PSFAtom >(); + ObjectRegistry::registerConverterFor< SireIO::CharmmParam >(); + ObjectRegistry::registerConverterFor< SireIO::CharmmPSF >(); ObjectRegistry::registerConverterFor< SireIO::PDB >(); - ObjectRegistry::registerConverterFor< SireIO::Supplementary >(); + ObjectRegistry::registerConverterFor< SireIO::Amber >(); ObjectRegistry::registerConverterFor< SireIO::NullParser >(); - ObjectRegistry::registerConverterFor< SireIO::SDF >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Atom >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Bond >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Molecule >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Substructure >(); ObjectRegistry::registerConverterFor< SireIO::Mol2 >(); + ObjectRegistry::registerConverterFor< SireIO::PDBAtom >(); + ObjectRegistry::registerConverterFor< SireIO::PDB2 >(); + ObjectRegistry::registerConverterFor< SireIO::Tinker >(); + ObjectRegistry::registerConverterFor< SireIO::ProtoMS >(); + ObjectRegistry::registerConverterFor< SireIO::PerturbationsLibrary >(); + ObjectRegistry::registerConverterFor< SireIO::PerturbationsTemplate >(); + ObjectRegistry::registerConverterFor< SireIO::AmberRst >(); + ObjectRegistry::registerConverterFor< SireIO::FlexibilityLibrary >(); + ObjectRegistry::registerConverterFor< SireIO::FlexibilityTemplate >(); + ObjectRegistry::registerConverterFor< SireIO::Gro87 >(); ObjectRegistry::registerConverterFor< SireIO::GroTop >(); ObjectRegistry::registerConverterFor< SireIO::GroMolType >(); ObjectRegistry::registerConverterFor< SireIO::GroAtom >(); ObjectRegistry::registerConverterFor< SireIO::GroSystem >(); - ObjectRegistry::registerConverterFor< SireIO::Tinker >(); - ObjectRegistry::registerConverterFor< SireIO::PSFAtom >(); - ObjectRegistry::registerConverterFor< SireIO::CharmmParam >(); - ObjectRegistry::registerConverterFor< SireIO::CharmmPSF >(); + ObjectRegistry::registerConverterFor< SireIO::AmberRst7 >(); + ObjectRegistry::registerConverterFor< SireIO::SDF >(); + ObjectRegistry::registerConverterFor< SireIO::NullIO >(); + ObjectRegistry::registerConverterFor< SireIO::TrajectoryMonitor >(); + ObjectRegistry::registerConverterFor< SireIO::Supplementary >(); + ObjectRegistry::registerConverterFor< SireIO::AmberPrm >(); + ObjectRegistry::registerConverterFor< SireIO::ZmatrixMaker >(); } diff --git a/wrapper/Move/CMakeAutogenFile.txt b/wrapper/Move/CMakeAutogenFile.txt index a3a3307f4..a340e98fa 100644 --- a/wrapper/Move/CMakeAutogenFile.txt +++ b/wrapper/Move/CMakeAutogenFile.txt @@ -1,83 +1,84 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES + Replicas.pypp.cpp + NullInserter.pypp.cpp + Replica.pypp.cpp + MaxwellBoltzmann.pypp.cpp + TitrationMove.pypp.cpp + VelocityVerlet.pypp.cpp + RepExMove2.pypp.cpp + MonteCarlo.pypp.cpp + SupraSubMoves.pypp.cpp + UniformInserter.pypp.cpp PrefSampler.pypp.cpp - OpenMMMDIntegrator.pypp.cpp - Dynamics.pypp.cpp - DLMRigidBody.pypp.cpp - NullIntegrator.pypp.cpp + Titrator.pypp.cpp + RigidBodyMC.pypp.cpp MTSMC.pypp.cpp - Moves.pypp.cpp + Simulation.pypp.cpp + NullSupraSubMove.pypp.cpp SameMoves.pypp.cpp - TitrationMove.pypp.cpp - OpenMMFrEnergyST.pypp.cpp - ZMatrixCoordsLine.pypp.cpp - GetCOGPoint.pypp.cpp - SupraSubMoves.pypp.cpp - InternalMove.pypp.cpp - HMCGenerator.pypp.cpp - VolumeChanger.pypp.cpp + UniformSampler.pypp.cpp + SupraMoves.pypp.cpp + MolDeleter.pypp.cpp Integrator.pypp.cpp - SupraSystem.pypp.cpp - SupraSubMove.pypp.cpp - MonteCarlo.pypp.cpp + SimStore.pypp.cpp + Flexibility.pypp.cpp + SpecifiedGroupsDeleter.pypp.cpp SupraSim.pypp.cpp SupraMove.pypp.cpp - MaxwellBoltzmann.pypp.cpp - Flexibility.pypp.cpp - DofID.pypp.cpp - RigidBodyMC.pypp.cpp + NullSupraMove.pypp.cpp + HMCVelGen.pypp.cpp + VelocitiesFromProperty.pypp.cpp + SystemWideDeleter.pypp.cpp + GetPoint.pypp.cpp MolecularDynamics.pypp.cpp - ZMatrix.pypp.cpp - SupraMoves.pypp.cpp + SameSupraSubMoves.pypp.cpp + ZMatMove.pypp.cpp + ScaleVolumeFromCenter.pypp.cpp + SupraSubSimPacket.pypp.cpp + OpenMMPMEFEP.pypp.cpp NullVolumeChanger.pypp.cpp - SupraSubSystem.pypp.cpp - VelocityGenerator.pypp.cpp - SimPacket.pypp.cpp SupraSubSim.pypp.cpp - VolumeMove.pypp.cpp - VelocityVerlet.pypp.cpp - SpecifiedGroupsDeleter.pypp.cpp - HybridMC.pypp.cpp - SupraSubSimPacket.pypp.cpp + InternalMoveSingle.pypp.cpp Move.pypp.cpp - GetPoint.pypp.cpp - UniformSampler.pypp.cpp - HMCVelGen.pypp.cpp + SimPacket.pypp.cpp GetCentroidPoint.pypp.cpp - RepExMove2.pypp.cpp - SystemWideDeleter.pypp.cpp - Ensemble.pypp.cpp - ScaleVolumeFromCenter.pypp.cpp - Replicas.pypp.cpp - SupraSimPacket.pypp.cpp - OpenMMFrEnergyDT.pypp.cpp - ZMatrixLine.pypp.cpp - Titrator.pypp.cpp - NullVelocityGenerator.pypp.cpp + SupraSystem.pypp.cpp + NullGetPoint.pypp.cpp + Moves.pypp.cpp + VolumeChanger.pypp.cpp + DofID.pypp.cpp + OpenMMFrEnergyST.pypp.cpp + HMCGenerator.pypp.cpp + NullMove.pypp.cpp + InternalMove.pypp.cpp + NullIntegrator.pypp.cpp + Dynamics.pypp.cpp RepExSubMove.pypp.cpp + ZMatrixLine.pypp.cpp + VolumeMove.pypp.cpp + GetCOMPoint.pypp.cpp + OpenMMMDIntegrator.pypp.cpp + ZMatrixCoordsLine.pypp.cpp + SupraSubMove.pypp.cpp + SupraSubSystem.pypp.cpp + ZMatrixCoords.pypp.cpp + OpenMMFrEnergyDT.pypp.cpp WeightedMoves.pypp.cpp - ZMatMove.pypp.cpp - NullSupraSubMove.pypp.cpp - NullSupraMove.pypp.cpp - MolDeleter.pypp.cpp + Sampler.pypp.cpp + MolInserter.pypp.cpp + GetCOGPoint.pypp.cpp + VelocityGenerator.pypp.cpp + DLMRigidBody.pypp.cpp + RBWorkspaceJM.pypp.cpp SameSupraMoves.pypp.cpp + NullVelocityGenerator.pypp.cpp RepExMove.pypp.cpp - RBWorkspaceJM.pypp.cpp - MolInserter.pypp.cpp - ZMatrixCoords.pypp.cpp - SameSupraSubMoves.pypp.cpp - SimStore.pypp.cpp - Simulation.pypp.cpp - Sampler.pypp.cpp - UniformInserter.pypp.cpp - InternalMoveSingle.pypp.cpp - Replica.pypp.cpp - NullMove.pypp.cpp - NullGetPoint.pypp.cpp NullDeleter.pypp.cpp - NullInserter.pypp.cpp - GetCOMPoint.pypp.cpp - VelocitiesFromProperty.pypp.cpp + SupraSimPacket.pypp.cpp + HybridMC.pypp.cpp + ZMatrix.pypp.cpp + Ensemble.pypp.cpp SireMove_containers.cpp SireMove_properties.cpp SireMove_registrars.cpp diff --git a/wrapper/Move/OpenMMFrEnergyST.pypp.cpp b/wrapper/Move/OpenMMFrEnergyST.pypp.cpp index 8f9c881c7..456070875 100644 --- a/wrapper/Move/OpenMMFrEnergyST.pypp.cpp +++ b/wrapper/Move/OpenMMFrEnergyST.pypp.cpp @@ -115,7 +115,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("map")=(SireBase::PropertyMap()) ) + , ( bp::arg("map")=SireBase::PropertyMap() ) , "Create an empty workspace" ); } @@ -127,7 +127,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("molgroup"), bp::arg("map")=(SireBase::PropertyMap()) ) + , ( bp::arg("molgroup"), bp::arg("map")=SireBase::PropertyMap() ) , "Create a workspace for this integrator for the molecule group molgroup" ); } diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp index 59a484951..f3bbc21af 100644 --- a/wrapper/Move/OpenMMPMEFEP.pypp.cpp +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -71,14 +71,15 @@ namespace bp = boost::python; #include "openmmpmefep.h" + #include #include -#include - #include +#include + #include #include "openmmpmefep.h" @@ -117,7 +118,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("map")=(SireBase::PropertyMap()) ) + , ( bp::arg("map")=SireBase::PropertyMap() ) , "Create an empty workspace" ); } @@ -129,7 +130,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "createWorkspace" , createWorkspace_function_value - , ( bp::arg("molgroup"), bp::arg("map")=(SireBase::PropertyMap()) ) + , ( bp::arg("molgroup"), bp::arg("map")=SireBase::PropertyMap() ) , "Create a workspace for this integrator for the molecule group molgroup" ); } @@ -508,26 +509,28 @@ void register_OpenMMPMEFEP_class(){ , "" ); } - { //::SireMove::OpenMMPMEFEP::initialise_ion + { //::SireMove::OpenMMPMEFEP::initialise - typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_ion_function_type)( ) ; - initialise_ion_function_type initialise_ion_function_value( &::SireMove::OpenMMPMEFEP::initialise_ion ); + typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_function_type)( bool ) ; + initialise_function_type initialise_function_value( &::SireMove::OpenMMPMEFEP::initialise ); OpenMMPMEFEP_exposer.def( - "initialise_ion" - , initialise_ion_function_value - , "" ); + "initialise" + , initialise_function_value + , ( bp::arg("fullPME")=(bool)(false) ) + , "\n initialises the openMM Free energy single topology calculation\n Initialise must be called before anything else happens.\n" ); } - { //::SireMove::OpenMMPMEFEP::initialise + { //::SireMove::OpenMMPMEFEP::initialise_ion - typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_function_type)( ) ; - initialise_function_type initialise_function_value( &::SireMove::OpenMMPMEFEP::initialise ); + typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_ion_function_type)( bool,bool ) ; + initialise_ion_function_type initialise_ion_function_value( &::SireMove::OpenMMPMEFEP::initialise_ion ); OpenMMPMEFEP_exposer.def( - "initialise" - , initialise_function_value - , "" ); + "initialise_ion" + , initialise_ion_function_value + , ( bp::arg("fullPME")=(bool)(false), bp::arg("doCharge")=(bool)(true) ) + , "\nA simple system of an ion in a water box. This is really for debugging\npurposes only and assumes that the parm7 and rst7 file are describing\nsuch a system exactly as in the code below.\n" ); } { //::SireMove::OpenMMPMEFEP::integrate diff --git a/wrapper/Move/Simulation.pypp.cpp b/wrapper/Move/Simulation.pypp.cpp index 29d59548b..7aa4a26ad 100644 --- a/wrapper/Move/Simulation.pypp.cpp +++ b/wrapper/Move/Simulation.pypp.cpp @@ -217,7 +217,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread" ); + , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread" ); } { //::SireMove::Simulation::run @@ -229,7 +229,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("nmoves_per_chunk"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); + , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation in the current thread. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); } { //::SireMove::Simulation::run @@ -301,7 +301,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("node"), bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); + , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); } { //::SireMove::Simulation::run @@ -313,7 +313,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("node"), bp::arg("system"), bp::arg("move"), bp::arg("nmoves"), bp::arg("nmoves_per_chunk"), bp::arg("record_stats")=(bool)(true) ) - , "Run a simulation consisting of nmoves moves (in move)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); + , "Run a simulation consisting of nmoves moves (in moves)\nof the System system, optionally recording simulation\nstatistics if record_stats is true. This runs the\nsimulation on the node node. This runs nmoves_per_chunk\nmoves in every chunk of the simulation." ); } { //::SireMove::Simulation::run diff --git a/wrapper/Move/SireMove_properties.cpp b/wrapper/Move/SireMove_properties.cpp index 9feaa1cdf..9480f90a5 100644 --- a/wrapper/Move/SireMove_properties.cpp +++ b/wrapper/Move/SireMove_properties.cpp @@ -6,9 +6,27 @@ #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "supramove.h" -#include "suprasystem.h" -#include "supramove.h" +#include "suprasubsystem.h" +#include "suprasubsystem.h" +#include "SireMaths/quaternion.h" +#include "SireMol/molecule.h" +#include "SireMol/partialmolecule.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireSystem/system.h" +#include "SireUnits/dimensions.h" +#include "SireUnits/units.h" +#include "SireVol/space.h" +#include "molinserter.h" +#include "molinserter.h" +#include "SireMol/molecule.h" +#include "SireMol/moleculegroup.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireSystem/system.h" +#include "moldeleter.h" +#include "uniformsampler.h" +#include "moldeleter.h" #include "SireError/errors.h" #include "SireID/index.h" #include "SireStream/datastream.h" @@ -16,12 +34,6 @@ #include "supramoves.h" #include "suprasystem.h" #include "supramoves.h" -#include "SireError/errors.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "suprasubmoves.h" -#include "suprasubsystem.h" -#include "suprasubmoves.h" #include "SireCAS/symbol.h" #include "SireMol/atomelements.h" #include "SireMol/atommasses.h" @@ -36,10 +48,6 @@ #include "SireUnits/units.h" #include "velocitygenerator.h" #include "velocitygenerator.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "suprasubsystem.h" -#include "suprasubsystem.h" #include "SireError/errors.h" #include "SireMaths/vector.h" #include "SireMol/atom.h" @@ -70,6 +78,16 @@ #include #include #include "moves.h" +#include "SireError/errors.h" +#include "SireID/index.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireSystem/system.h" +#include "SireSystem/systemmonitor.h" +#include "moves.h" +#include "simstore.h" +#include "suprasystem.h" +#include "suprasystem.h" #include "SireMol/molecule.h" #include "SireMol/partialmolecule.h" #include "SireStream/datastream.h" @@ -78,6 +96,11 @@ #include "sampler.h" #include "uniformsampler.h" #include "sampler.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "supramove.h" +#include "suprasystem.h" +#include "supramove.h" #include "SireCAS/symbol.h" #include "SireFF/forcefields.h" #include "SireFF/forcetable.h" @@ -90,33 +113,18 @@ #include "integrator.h" #include "integratorworkspace.h" #include "integrator.h" -#include "SireMaths/quaternion.h" -#include "SireMol/molecule.h" -#include "SireMol/partialmolecule.h" +#include "SireError/errors.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "SireSystem/system.h" -#include "SireUnits/dimensions.h" -#include "SireUnits/units.h" -#include "SireVol/space.h" -#include "molinserter.h" -#include "molinserter.h" +#include "suprasubmoves.h" +#include "suprasubsystem.h" +#include "suprasubmoves.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" #include "suprasubmove.h" #include "suprasubsystem.h" #include "suprasubmove.h" #include "SireError/errors.h" -#include "SireID/index.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireSystem/system.h" -#include "SireSystem/systemmonitor.h" -#include "moves.h" -#include "simstore.h" -#include "suprasystem.h" -#include "suprasystem.h" -#include "SireError/errors.h" #include "SireMaths/rangenerator.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -127,28 +135,20 @@ #include "move.h" #include #include "move.h" -#include "SireMol/molecule.h" -#include "SireMol/moleculegroup.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireSystem/system.h" -#include "moldeleter.h" -#include "uniformsampler.h" -#include "moldeleter.h" void register_SireMove_properties() { - register_property_container< SireMove::SupraMovePtr, SireMove::SupraMove >(); + register_property_container< SireMove::SupraSubSystemPtr, SireMove::SupraSubSystem >(); + register_property_container< SireMove::MolInserterPtr, SireMove::MolInserter >(); + register_property_container< SireMove::MolDeleterPtr, SireMove::MolDeleter >(); register_property_container< SireMove::SupraMovesPtr, SireMove::SupraMoves >(); - register_property_container< SireMove::SupraSubMovesPtr, SireMove::SupraSubMoves >(); register_property_container< SireMove::VelGenPtr, SireMove::VelocityGenerator >(); - register_property_container< SireMove::SupraSubSystemPtr, SireMove::SupraSubSystem >(); register_property_container< SireMove::GetPointPtr, SireMove::GetPoint >(); register_property_container< SireMove::MovesPtr, SireMove::Moves >(); + register_property_container< SireMove::SupraSystemPtr, SireMove::SupraSystem >(); register_property_container< SireMove::SamplerPtr, SireMove::Sampler >(); + register_property_container< SireMove::SupraMovePtr, SireMove::SupraMove >(); register_property_container< SireMove::IntegratorPtr, SireMove::Integrator >(); - register_property_container< SireMove::MolInserterPtr, SireMove::MolInserter >(); + register_property_container< SireMove::SupraSubMovesPtr, SireMove::SupraSubMoves >(); register_property_container< SireMove::SupraSubMovePtr, SireMove::SupraSubMove >(); - register_property_container< SireMove::SupraSystemPtr, SireMove::SupraSystem >(); register_property_container< SireMove::MovePtr, SireMove::Move >(); - register_property_container< SireMove::MolDeleterPtr, SireMove::MolDeleter >(); } diff --git a/wrapper/Move/SireMove_registrars.cpp b/wrapper/Move/SireMove_registrars.cpp index 09e8ec15d..a71748a3e 100644 --- a/wrapper/Move/SireMove_registrars.cpp +++ b/wrapper/Move/SireMove_registrars.cpp @@ -5,126 +5,129 @@ #include "Helpers/version_error_impl.h" -#include "supramove.h" -#include "rigidbodymc.h" -#include "moleculardynamics.h" -#include "suprasimpacket.h" -#include "flexibility.h" -#include "supramoves.h" -#include "zmatrix.h" -#include "suprasubmoves.h" -#include "openmmfrenergydt.h" -#include "velocitygenerator.h" -#include "internalmove.h" +#include "openmmfrenergyst.h" #include "volumechanger.h" -#include "weightedmoves.h" -#include "uniformsampler.h" -#include "rbworkspace.h" #include "suprasubsystem.h" -#include "getpoint.h" -#include "repexmove.h" -#include "moves.h" -#include "titrationmove.h" -#include "prefsampler.h" -#include "hybridmc.h" -#include "integratorworkspace.h" -#include "ensemble.h" -#include "mtsmc.h" -#include "dlmrigidbody.h" -#include "volumemove.h" -#include "replica.h" -#include "integratorworkspacejm.h" #include "zmatmove.h" #include "velocityverlet.h" -#include "integrator.h" -#include "openmmmdintegrator.h" #include "molinserter.h" -#include "openmmfrenergyst.h" -#include "suprasubsimpacket.h" -#include "suprasubmove.h" -#include "suprasystem.h" -#include "repexmove2.h" +#include "moldeleter.h" +#include "supramoves.h" +#include "integratorworkspacejm.h" +#include "velocitygenerator.h" +#include "getpoint.h" +#include "internalmove.h" +#include "ensemble.h" +#include "openmmpmefep.h" +#include "weightedmoves.h" +#include "hybridmc.h" +#include "internalmovesingle.h" +#include "moves.h" #include "simpacket.h" +#include "suprasystem.h" #include "titrator.h" -#include "move.h" -#include "internalmovesingle.h" +#include "suprasubsimpacket.h" +#include "rbworkspace.h" #include "rbworkspacejm.h" #include "replicas.h" +#include "openmmmdintegrator.h" +#include "integratorworkspace.h" #include "simstore.h" -#include "moldeleter.h" +#include "repexmove2.h" +#include "titrationmove.h" +#include "volumemove.h" +#include "supramove.h" +#include "zmatrix.h" +#include "flexibility.h" +#include "repexmove.h" +#include "dlmrigidbody.h" +#include "uniformsampler.h" +#include "mtsmc.h" +#include "prefsampler.h" +#include "integrator.h" +#include "suprasubmoves.h" +#include "moleculardynamics.h" +#include "openmmfrenergydt.h" +#include "suprasubmove.h" +#include "move.h" +#include "replica.h" +#include "rigidbodymc.h" +#include "suprasimpacket.h" #include "Helpers/objectregistry.hpp" void register_SireMove_objects() { - ObjectRegistry::registerConverterFor< SireMove::NullSupraMove >(); - ObjectRegistry::registerConverterFor< SireMove::RigidBodyMC >(); - ObjectRegistry::registerConverterFor< SireMove::MolecularDynamics >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSimPacket >(); - ObjectRegistry::registerConverterFor< SireMove::DofID >(); - ObjectRegistry::registerConverterFor< SireMove::Flexibility >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); + ObjectRegistry::registerConverterFor< SireMove::NullVolumeChanger >(); + ObjectRegistry::registerConverterFor< SireMove::ScaleVolumeFromCenter >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSubSystem >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatMove >(); + ObjectRegistry::registerConverterFor< SireMove::VelocityVerlet >(); + ObjectRegistry::registerConverterFor< SireMove::NullInserter >(); + ObjectRegistry::registerConverterFor< SireMove::UniformInserter >(); + ObjectRegistry::registerConverterFor< SireMove::NullDeleter >(); + ObjectRegistry::registerConverterFor< SireMove::SpecifiedGroupsDeleter >(); + ObjectRegistry::registerConverterFor< SireMove::SystemWideDeleter >(); ObjectRegistry::registerConverterFor< SireMove::SameSupraMoves >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrix >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrixLine >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoords >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoordsLine >(); - ObjectRegistry::registerConverterFor< SireMove::SameSupraSubMoves >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); + ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspaceJM >(); ObjectRegistry::registerConverterFor< SireMove::NullVelocityGenerator >(); ObjectRegistry::registerConverterFor< SireMove::VelocitiesFromProperty >(); ObjectRegistry::registerConverterFor< SireMove::MaxwellBoltzmann >(); - ObjectRegistry::registerConverterFor< SireMove::InternalMove >(); - ObjectRegistry::registerConverterFor< SireMove::NullVolumeChanger >(); - ObjectRegistry::registerConverterFor< SireMove::ScaleVolumeFromCenter >(); - ObjectRegistry::registerConverterFor< SireMove::WeightedMoves >(); - ObjectRegistry::registerConverterFor< SireMove::UniformSampler >(); - ObjectRegistry::registerConverterFor< SireMove::RBWorkspace >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSubSystem >(); ObjectRegistry::registerConverterFor< SireMove::NullGetPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCOMPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCOGPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCentroidPoint >(); - ObjectRegistry::registerConverterFor< SireMove::RepExMove >(); - ObjectRegistry::registerConverterFor< SireMove::RepExSubMove >(); - ObjectRegistry::registerConverterFor< SireMove::SameMoves >(); - ObjectRegistry::registerConverterFor< SireMove::TitrationMove >(); - ObjectRegistry::registerConverterFor< SireMove::PrefSampler >(); + ObjectRegistry::registerConverterFor< SireMove::InternalMove >(); + ObjectRegistry::registerConverterFor< SireMove::Ensemble >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); + ObjectRegistry::registerConverterFor< SireMove::WeightedMoves >(); ObjectRegistry::registerConverterFor< SireMove::HybridMC >(); ObjectRegistry::registerConverterFor< SireMove::HMCGenerator >(); + ObjectRegistry::registerConverterFor< SireMove::InternalMoveSingle >(); + ObjectRegistry::registerConverterFor< SireMove::SameMoves >(); + ObjectRegistry::registerConverterFor< SireMove::SimPacket >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSystem >(); + ObjectRegistry::registerConverterFor< SireMove::Titrator >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSubSimPacket >(); + ObjectRegistry::registerConverterFor< SireMove::RBWorkspace >(); + ObjectRegistry::registerConverterFor< SireMove::RBWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::Replicas >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspace >(); ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspace >(); - ObjectRegistry::registerConverterFor< SireMove::Ensemble >(); - ObjectRegistry::registerConverterFor< SireMove::MTSMC >(); - ObjectRegistry::registerConverterFor< SireMove::DLMRigidBody >(); + ObjectRegistry::registerConverterFor< SireMove::SimStore >(); + ObjectRegistry::registerConverterFor< SireMove::RepExMove2 >(); + ObjectRegistry::registerConverterFor< SireMove::TitrationMove >(); ObjectRegistry::registerConverterFor< SireMove::VolumeMove >(); - ObjectRegistry::registerConverterFor< SireMove::Replica >(); - ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspaceJM >(); - ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspaceJM >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatMove >(); - ObjectRegistry::registerConverterFor< SireMove::VelocityVerlet >(); + ObjectRegistry::registerConverterFor< SireMove::NullSupraMove >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrix >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrixLine >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoords >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoordsLine >(); + ObjectRegistry::registerConverterFor< SireMove::DofID >(); + ObjectRegistry::registerConverterFor< SireMove::Flexibility >(); + ObjectRegistry::registerConverterFor< SireMove::RepExMove >(); + ObjectRegistry::registerConverterFor< SireMove::RepExSubMove >(); + ObjectRegistry::registerConverterFor< SireMove::DLMRigidBody >(); + ObjectRegistry::registerConverterFor< SireMove::UniformSampler >(); + ObjectRegistry::registerConverterFor< SireMove::MTSMC >(); + ObjectRegistry::registerConverterFor< SireMove::PrefSampler >(); ObjectRegistry::registerConverterFor< SireMove::NullIntegrator >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); - ObjectRegistry::registerConverterFor< SireMove::NullInserter >(); - ObjectRegistry::registerConverterFor< SireMove::UniformInserter >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSubSimPacket >(); + ObjectRegistry::registerConverterFor< SireMove::SameSupraSubMoves >(); + ObjectRegistry::registerConverterFor< SireMove::MolecularDynamics >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); ObjectRegistry::registerConverterFor< SireMove::NullSupraSubMove >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSystem >(); - ObjectRegistry::registerConverterFor< SireMove::RepExMove2 >(); - ObjectRegistry::registerConverterFor< SireMove::SimPacket >(); - ObjectRegistry::registerConverterFor< SireMove::Titrator >(); ObjectRegistry::registerConverterFor< SireMove::NullMove >(); - ObjectRegistry::registerConverterFor< SireMove::InternalMoveSingle >(); - ObjectRegistry::registerConverterFor< SireMove::RBWorkspaceJM >(); - ObjectRegistry::registerConverterFor< SireMove::Replicas >(); - ObjectRegistry::registerConverterFor< SireMove::SimStore >(); - ObjectRegistry::registerConverterFor< SireMove::NullDeleter >(); - ObjectRegistry::registerConverterFor< SireMove::SpecifiedGroupsDeleter >(); - ObjectRegistry::registerConverterFor< SireMove::SystemWideDeleter >(); + ObjectRegistry::registerConverterFor< SireMove::Replica >(); + ObjectRegistry::registerConverterFor< SireMove::RigidBodyMC >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSimPacket >(); } diff --git a/wrapper/Squire/CMakeAutogenFile.txt b/wrapper/Squire/CMakeAutogenFile.txt index cfc1f5f01..2948884e1 100644 --- a/wrapper/Squire/CMakeAutogenFile.txt +++ b/wrapper/Squire/CMakeAutogenFile.txt @@ -1,37 +1,37 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - SS_GTO.pypp.cpp - AM1BCC.pypp.cpp - SS_GTOs.pypp.cpp - GTOPair.pypp.cpp - QMComponent.pypp.cpp - PointDipole.pypp.cpp - PS_GTOs.pypp.cpp - ElementParameterName3D.pypp.cpp - _Squire_free_functions.pypp.cpp - QMProgram.pypp.cpp - QMFF.pypp.cpp - QMChargeConstraint.pypp.cpp - ElementParameterName.pypp.cpp - GTO.pypp.cpp - Orbital.pypp.cpp PS_GTO.pypp.cpp - PP_GTO.pypp.cpp - OrbitalShell.pypp.cpp - PP_GTOs.pypp.cpp S_GTO.pypp.cpp + NullQM.pypp.cpp + Orbital.pypp.cpp + PP_GTO.pypp.cpp + QMChargeCalculator.pypp.cpp + ElementParameterName3D.pypp.cpp + ShellPair.pypp.cpp + GTOPair.pypp.cpp QMMMFF.pypp.cpp + QMComponent.pypp.cpp + P_GTO.pypp.cpp Mopac.pypp.cpp ChargeElementParameterNames3D.pypp.cpp NullQMChargeCalculator.pypp.cpp - NullQM.pypp.cpp - PointCharge.pypp.cpp - QMChargeCalculator.pypp.cpp - ShellPair.pypp.cpp + AM1BCC.pypp.cpp Molpro.pypp.cpp + PointDipole.pypp.cpp + PointCharge.pypp.cpp + PS_GTOs.pypp.cpp + SS_GTOs.pypp.cpp SQM.pypp.cpp - P_GTO.pypp.cpp HF.pypp.cpp + GTO.pypp.cpp + SS_GTO.pypp.cpp + OrbitalShell.pypp.cpp + PP_GTOs.pypp.cpp + QMChargeConstraint.pypp.cpp + ElementParameterName.pypp.cpp + QMProgram.pypp.cpp + QMFF.pypp.cpp + _Squire_free_functions.pypp.cpp Squire_containers.cpp Squire_properties.cpp Squire_registrars.cpp diff --git a/wrapper/Squire/Squire_properties.cpp b/wrapper/Squire/Squire_properties.cpp index f86a5cf04..aa111417a 100644 --- a/wrapper/Squire/Squire_properties.cpp +++ b/wrapper/Squire/Squire_properties.cpp @@ -4,14 +4,14 @@ #include "Base/convertproperty.hpp" #include "Squire_properties.h" +#include "SireError/errors.h" #include "SireMol/molecule.h" -#include "SireMol/molecules.h" -#include "SireMol/molnum.h" -#include "SireMol/partialmolecule.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "qmchargecalculator.h" -#include "qmchargecalculator.h" +#include "latticecharges.h" +#include "qmprogram.h" +#include +#include "qmprogram.h" #include "SireError/errors.h" #include "SireID/index.h" #include "SireMaths/maths.h" @@ -20,17 +20,17 @@ #include "gto.h" #include "sgto.h" #include "gto.h" -#include "SireError/errors.h" #include "SireMol/molecule.h" +#include "SireMol/molecules.h" +#include "SireMol/molnum.h" +#include "SireMol/partialmolecule.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "latticecharges.h" -#include "qmprogram.h" -#include -#include "qmprogram.h" +#include "qmchargecalculator.h" +#include "qmchargecalculator.h" void register_Squire_properties() { - register_property_container< Squire::QMChargeCalculatorPtr, Squire::QMChargeCalculator >(); - register_property_container< Squire::GTOPtr, Squire::GTO >(); register_property_container< Squire::QMProgPtr, Squire::QMProgram >(); + register_property_container< Squire::GTOPtr, Squire::GTO >(); + register_property_container< Squire::QMChargeCalculatorPtr, Squire::QMChargeCalculator >(); } diff --git a/wrapper/Squire/Squire_registrars.cpp b/wrapper/Squire/Squire_registrars.cpp index a2ee4d68f..be4d661eb 100644 --- a/wrapper/Squire/Squire_registrars.cpp +++ b/wrapper/Squire/Squire_registrars.cpp @@ -5,43 +5,43 @@ #include "Helpers/version_error_impl.h" -#include "qmmmff.h" -#include "sqm.h" -#include "qmchargecalculator.h" +#include "pointcharge.h" #include "qmchargeconstraint.h" -#include "sgto.h" -#include "qmff.h" #include "qmprogram.h" -#include "pointcharge.h" -#include "molpro.h" -#include "am1bcc.h" #include "qmpotential.h" +#include "molpro.h" +#include "qmchargecalculator.h" +#include "qmmmff.h" +#include "sqm.h" +#include "mopac.h" #include "pgto.h" +#include "am1bcc.h" +#include "sgto.h" +#include "qmff.h" #include "pointdipole.h" -#include "mopac.h" #include "Helpers/objectregistry.hpp" void register_Squire_objects() { - ObjectRegistry::registerConverterFor< Squire::QMMMFF >(); - ObjectRegistry::registerConverterFor< Squire::SQM >(); - ObjectRegistry::registerConverterFor< Squire::NullQMChargeCalculator >(); + ObjectRegistry::registerConverterFor< Squire::PointCharge >(); ObjectRegistry::registerConverterFor< Squire::QMChargeConstraint >(); - ObjectRegistry::registerConverterFor< Squire::S_GTO >(); - ObjectRegistry::registerConverterFor< Squire::SS_GTO >(); - ObjectRegistry::registerConverterFor< Squire::QMFF >(); ObjectRegistry::registerConverterFor< Squire::NullQM >(); - ObjectRegistry::registerConverterFor< Squire::PointCharge >(); - ObjectRegistry::registerConverterFor< Squire::Molpro >(); - ObjectRegistry::registerConverterFor< Squire::AM1BCC >(); ObjectRegistry::registerConverterFor< Squire::QMComponent >(); + ObjectRegistry::registerConverterFor< Squire::Molpro >(); + ObjectRegistry::registerConverterFor< Squire::NullQMChargeCalculator >(); + ObjectRegistry::registerConverterFor< Squire::QMMMFF >(); + ObjectRegistry::registerConverterFor< Squire::SQM >(); + ObjectRegistry::registerConverterFor< Squire::Mopac >(); ObjectRegistry::registerConverterFor< Squire::P_GTO >(); ObjectRegistry::registerConverterFor< Squire::PS_GTO >(); ObjectRegistry::registerConverterFor< Squire::PP_GTO >(); + ObjectRegistry::registerConverterFor< Squire::AM1BCC >(); + ObjectRegistry::registerConverterFor< Squire::S_GTO >(); + ObjectRegistry::registerConverterFor< Squire::SS_GTO >(); + ObjectRegistry::registerConverterFor< Squire::QMFF >(); ObjectRegistry::registerConverterFor< Squire::PointDipole >(); - ObjectRegistry::registerConverterFor< Squire::Mopac >(); } diff --git a/wrapper/Squire/_Squire_free_functions.pypp.cpp b/wrapper/Squire/_Squire_free_functions.pypp.cpp index f3edc0802..b1e7bbaa3 100644 --- a/wrapper/Squire/_Squire_free_functions.pypp.cpp +++ b/wrapper/Squire/_Squire_free_functions.pypp.cpp @@ -7,6 +7,24 @@ namespace bp = boost::python; +#include "SireBase/array2d.hpp" + +#include "SireError/errors.h" + +#include "SireMaths/boys.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "pgto.h" + +#include "pointcharge.h" + +#include "pointdipole.h" + +#include "pgto.h" + #include "SireBase/trigarray2d.h" #include "SireError/errors.h" @@ -2041,24 +2059,6 @@ namespace bp = boost::python; #include "sgto.h" -#include "SireBase/array2d.hpp" - -#include "SireError/errors.h" - -#include "SireMaths/boys.h" - -#include "SireStream/datastream.h" - -#include "SireStream/shareddatastream.h" - -#include "pgto.h" - -#include "pointcharge.h" - -#include "pointdipole.h" - -#include "pgto.h" - void register_free_functions(){ { //::Squire::electron_integral diff --git a/wrapper/Stream/CMakeAutogenFile.txt b/wrapper/Stream/CMakeAutogenFile.txt index fe75a1057..de9628c0e 100644 --- a/wrapper/Stream/CMakeAutogenFile.txt +++ b/wrapper/Stream/CMakeAutogenFile.txt @@ -1,7 +1,7 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - _Stream_free_functions.pypp.cpp FileHeader.pypp.cpp MD5Sum.pypp.cpp + _Stream_free_functions.pypp.cpp SireStream_registrars.cpp ) diff --git a/wrapper/Stream/SireStream_registrars.cpp b/wrapper/Stream/SireStream_registrars.cpp index b6e9f34f9..c4afb78e3 100644 --- a/wrapper/Stream/SireStream_registrars.cpp +++ b/wrapper/Stream/SireStream_registrars.cpp @@ -5,16 +5,16 @@ #include "Helpers/version_error_impl.h" -#include "version_error.h" #include "magic_error.h" +#include "version_error.h" #include "Helpers/objectregistry.hpp" void register_SireStream_objects() { - ObjectRegistry::registerConverterFor< SireStream::version_error >(); ObjectRegistry::registerConverterFor< SireStream::magic_error >(); + ObjectRegistry::registerConverterFor< SireStream::version_error >(); } diff --git a/wrapper/System/CMakeAutogenFile.txt b/wrapper/System/CMakeAutogenFile.txt index 17e326a1d..650ca8b68 100644 --- a/wrapper/System/CMakeAutogenFile.txt +++ b/wrapper/System/CMakeAutogenFile.txt @@ -1,52 +1,52 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - SysIdx.pypp.cpp - TripleDistanceComponent.pypp.cpp + FreeEnergyMonitor.pypp.cpp + SysID.pypp.cpp + MonitorID.pypp.cpp + IDAssigner.pypp.cpp + GeometryComponent.pypp.cpp + MoleculeConstraint.pypp.cpp + AngleComponent.pypp.cpp + Constraints.pypp.cpp + MonitorComponent.pypp.cpp + IDAndSet_SysID_.pypp.cpp + VolMapMonitor.pypp.cpp + PolariseCharges.pypp.cpp + ComponentConstraint.pypp.cpp CloseMols.pypp.cpp - _System_free_functions.pypp.cpp - DoubleDistanceComponent.pypp.cpp - DistanceComponent.pypp.cpp PerturbationConstraint.pypp.cpp + ChargeConstraint.pypp.cpp + SysName.pypp.cpp + IDAndSet_MonitorID_.pypp.cpp + WindowedComponent.pypp.cpp SpaceWrapper.pypp.cpp - PropertyConstraint.pypp.cpp + _System_free_functions.pypp.cpp CheckPoint.pypp.cpp + EnergyMonitor.pypp.cpp + SystemMonitors.pypp.cpp + Constraint.pypp.cpp + IdentityConstraint.pypp.cpp MonitorName.pypp.cpp - System.pypp.cpp - SysName.pypp.cpp - MonitorMonitor.pypp.cpp NullMonitor.pypp.cpp - GeometryComponent.pypp.cpp + NullConstraint.pypp.cpp + MonitorProperty.pypp.cpp + IDOrSet_SysID_.pypp.cpp + IDOrSet_MonitorID_.pypp.cpp + MonitorMonitor.pypp.cpp + DistanceComponent.pypp.cpp + Specify_MonitorID_.pypp.cpp DihedralComponent.pypp.cpp + MonitorComponents.pypp.cpp + TripleDistanceComponent.pypp.cpp + DoubleDistanceComponent.pypp.cpp + PolariseChargesFF.pypp.cpp + MonitorIdx.pypp.cpp + PropertyConstraint.pypp.cpp Specify_SysID_.pypp.cpp - IDOrSet_MonitorID_.pypp.cpp - IDAndSet_MonitorID_.pypp.cpp + System.pypp.cpp AssignerGroup.pypp.cpp - IDOrSet_SysID_.pypp.cpp - MonitorComponent.pypp.cpp - MonitorProperty.pypp.cpp - FreeEnergyMonitor.pypp.cpp - SystemMonitors.pypp.cpp - NullConstraint.pypp.cpp - PolariseChargesFF.pypp.cpp - EnergyMonitor.pypp.cpp - ChargeConstraint.pypp.cpp - Constraint.pypp.cpp - MonitorID.pypp.cpp - SysID.pypp.cpp - WindowedComponent.pypp.cpp SystemMonitor.pypp.cpp - IDAndSet_SysID_.pypp.cpp - ComponentConstraint.pypp.cpp - VolMapMonitor.pypp.cpp - Specify_MonitorID_.pypp.cpp - MonitorIdx.pypp.cpp - MoleculeConstraint.pypp.cpp - Constraints.pypp.cpp - IDAssigner.pypp.cpp - MonitorComponents.pypp.cpp - PolariseCharges.pypp.cpp - IdentityConstraint.pypp.cpp - AngleComponent.pypp.cpp + SysIdx.pypp.cpp SireSystem_containers.cpp SireSystem_properties.cpp SireSystem_registrars.cpp diff --git a/wrapper/System/SireSystem_registrars.cpp b/wrapper/System/SireSystem_registrars.cpp index 042337079..445405a20 100644 --- a/wrapper/System/SireSystem_registrars.cpp +++ b/wrapper/System/SireSystem_registrars.cpp @@ -5,81 +5,81 @@ #include "Helpers/version_error_impl.h" -#include "system.h" -#include "monitorcomponent.h" -#include "monitoridentifier.h" -#include "systemmonitor.h" -#include "spacewrapper.h" -#include "monitoridx.h" -#include "checkpoint.h" -#include "constraint.h" -#include "distancecomponent.h" #include "sysidx.h" -#include "polarisecharges.h" -#include "monitorcomponents.h" -#include "dihedralcomponent.h" -#include "monitormonitor.h" -#include "sysidentifier.h" +#include "monitorcomponent.h" #include "monitorname.h" -#include "systemmonitors.h" -#include "volmapmonitor.h" -#include "anglecomponent.h" -#include "perturbationconstraint.h" #include "identityconstraint.h" +#include "anglecomponent.h" #include "idassigner.h" -#include "constraints.h" -#include "sysname.h" -#include "closemols.h" -#include "monitorproperty.h" #include "freeenergymonitor.h" #include "energymonitor.h" +#include "checkpoint.h" +#include "monitorproperty.h" +#include "perturbationconstraint.h" +#include "monitorcomponents.h" +#include "monitoridentifier.h" +#include "polarisecharges.h" +#include "closemols.h" +#include "spacewrapper.h" +#include "monitormonitor.h" +#include "sysname.h" +#include "distancecomponent.h" +#include "sysidentifier.h" +#include "constraints.h" +#include "systemmonitor.h" +#include "dihedralcomponent.h" +#include "volmapmonitor.h" +#include "system.h" +#include "monitoridx.h" +#include "systemmonitors.h" +#include "constraint.h" #include "Helpers/objectregistry.hpp" void register_SireSystem_objects() { - ObjectRegistry::registerConverterFor< SireSystem::System >(); + ObjectRegistry::registerConverterFor< SireSystem::SysIdx >(); ObjectRegistry::registerConverterFor< SireSystem::MonitorComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorName >(); + ObjectRegistry::registerConverterFor< SireSystem::IdentityConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::AngleComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::IDAssigner >(); + ObjectRegistry::registerConverterFor< SireSystem::FreeEnergyMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::AssignerGroup >(); + ObjectRegistry::registerConverterFor< SireSystem::EnergyMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::CheckPoint >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorProperty >(); + ObjectRegistry::registerConverterFor< SireSystem::PerturbationConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorComponents >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); ObjectRegistry::registerConverterFor< SireSystem::MonitorIdentifier >(); - ObjectRegistry::registerConverterFor< SireSystem::NullMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::PolariseCharges >(); + ObjectRegistry::registerConverterFor< SireSystem::PolariseChargesFF >(); + ObjectRegistry::registerConverterFor< SireSystem::CloseMols >(); ObjectRegistry::registerConverterFor< SireSystem::SpaceWrapper >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorIdx >(); - ObjectRegistry::registerConverterFor< SireSystem::CheckPoint >(); - ObjectRegistry::registerConverterFor< SireSystem::NullConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::PropertyConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::ComponentConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::WindowedComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::SysName >(); ObjectRegistry::registerConverterFor< SireSystem::DistanceComponent >(); ObjectRegistry::registerConverterFor< SireSystem::DoubleDistanceComponent >(); ObjectRegistry::registerConverterFor< SireSystem::TripleDistanceComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::SysIdx >(); - ObjectRegistry::registerConverterFor< SireSystem::PolariseCharges >(); - ObjectRegistry::registerConverterFor< SireSystem::PolariseChargesFF >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorComponents >(); - ObjectRegistry::registerConverterFor< SireSystem::DihedralComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorMonitor >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); ObjectRegistry::registerConverterFor< SireSystem::SysIdentifier >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorName >(); - ObjectRegistry::registerConverterFor< SireSystem::SystemMonitors >(); - ObjectRegistry::registerConverterFor< SireSystem::VolMapMonitor >(); - ObjectRegistry::registerConverterFor< SireSystem::AngleComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::PerturbationConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::IdentityConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::IDAssigner >(); ObjectRegistry::registerConverterFor< SireSystem::Constraints >(); - ObjectRegistry::registerConverterFor< SireSystem::SysName >(); - ObjectRegistry::registerConverterFor< SireSystem::CloseMols >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorProperty >(); - ObjectRegistry::registerConverterFor< SireSystem::FreeEnergyMonitor >(); - ObjectRegistry::registerConverterFor< SireSystem::AssignerGroup >(); - ObjectRegistry::registerConverterFor< SireSystem::EnergyMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::NullMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::DihedralComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::VolMapMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::System >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorIdx >(); + ObjectRegistry::registerConverterFor< SireSystem::SystemMonitors >(); + ObjectRegistry::registerConverterFor< SireSystem::NullConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::PropertyConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::ComponentConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::WindowedComponent >(); } diff --git a/wrapper/Units/CMakeAutogenFile.txt b/wrapper/Units/CMakeAutogenFile.txt index c52d2f568..0fce560ea 100644 --- a/wrapper/Units/CMakeAutogenFile.txt +++ b/wrapper/Units/CMakeAutogenFile.txt @@ -1,11 +1,11 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES Unit.pypp.cpp - _Units_free_functions.pypp.cpp GeneralUnit.pypp.cpp + Fahrenheit.pypp.cpp TempBase.pypp.cpp Celsius.pypp.cpp - Fahrenheit.pypp.cpp + _Units_free_functions.pypp.cpp SireUnits_containers.cpp SireUnits_registrars.cpp ) diff --git a/wrapper/Vol/CMakeAutogenFile.txt b/wrapper/Vol/CMakeAutogenFile.txt index ef8ce640e..02c76dd04 100644 --- a/wrapper/Vol/CMakeAutogenFile.txt +++ b/wrapper/Vol/CMakeAutogenFile.txt @@ -1,25 +1,25 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - NullPatching.pypp.cpp - Grid.pypp.cpp + CoordGroupEditor.pypp.cpp + BoxPatching.pypp.cpp + TriclinicBox.pypp.cpp Patching.pypp.cpp + Space.pypp.cpp CoordGroupBase.pypp.cpp + NullPatching.pypp.cpp + CombineSpaces.pypp.cpp + Grid.pypp.cpp + GridIndex.pypp.cpp + CoordGroupArrayArray.pypp.cpp + RegularGrid.pypp.cpp CoordGroup.pypp.cpp - GridInfo.pypp.cpp + CombinedSpace.pypp.cpp Cartesian.pypp.cpp NullGrid.pypp.cpp - RegularGrid.pypp.cpp + GridInfo.pypp.cpp PeriodicBox.pypp.cpp - TriclinicBox.pypp.cpp AABox.pypp.cpp - CombinedSpace.pypp.cpp - Space.pypp.cpp CoordGroupArray.pypp.cpp - CoordGroupArrayArray.pypp.cpp - BoxPatching.pypp.cpp - CombineSpaces.pypp.cpp - GridIndex.pypp.cpp - CoordGroupEditor.pypp.cpp SireVol_containers.cpp SireVol_properties.cpp SireVol_registrars.cpp diff --git a/wrapper/Vol/SireVol_properties.cpp b/wrapper/Vol/SireVol_properties.cpp index 406a06910..e8f84e368 100644 --- a/wrapper/Vol/SireVol_properties.cpp +++ b/wrapper/Vol/SireVol_properties.cpp @@ -5,12 +5,12 @@ #include "SireVol_properties.h" #include "SireError/errors.h" +#include "SireMaths/rotate.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" #include "SireUnits/units.h" -#include "SireVol/periodicbox.h" -#include "patching.h" -#include "patching.h" +#include "grid.h" +#include "grid.h" #include "SireError/errors.h" #include "SireMaths/rangenerator.h" #include "SireStream/datastream.h" @@ -20,15 +20,15 @@ #include #include "space.h" #include "SireError/errors.h" -#include "SireMaths/rotate.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" #include "SireUnits/units.h" -#include "grid.h" -#include "grid.h" +#include "SireVol/periodicbox.h" +#include "patching.h" +#include "patching.h" void register_SireVol_properties() { - register_property_container< SireVol::PatchingPtr, SireVol::Patching >(); - register_property_container< SireVol::SpacePtr, SireVol::Space >(); register_property_container< SireVol::GridPtr, SireVol::Grid >(); + register_property_container< SireVol::SpacePtr, SireVol::Space >(); + register_property_container< SireVol::PatchingPtr, SireVol::Patching >(); } diff --git a/wrapper/Vol/SireVol_registrars.cpp b/wrapper/Vol/SireVol_registrars.cpp index b6f1189f0..879c48545 100644 --- a/wrapper/Vol/SireVol_registrars.cpp +++ b/wrapper/Vol/SireVol_registrars.cpp @@ -5,38 +5,38 @@ #include "Helpers/version_error_impl.h" -#include "combinedspace.h" -#include "patching.h" -#include "cartesian.h" -#include "combinespaces.h" -#include "triclinicbox.h" #include "periodicbox.h" -#include "coordgroup.h" +#include "gridinfo.h" #include "grid.h" +#include "cartesian.h" +#include "coordgroup.h" #include "aabox.h" -#include "gridinfo.h" +#include "triclinicbox.h" +#include "combinedspace.h" +#include "patching.h" +#include "combinespaces.h" #include "Helpers/objectregistry.hpp" void register_SireVol_objects() { - ObjectRegistry::registerConverterFor< SireVol::CombinedSpace >(); - ObjectRegistry::registerConverterFor< SireVol::NullPatching >(); - ObjectRegistry::registerConverterFor< SireVol::BoxPatching >(); - ObjectRegistry::registerConverterFor< SireVol::Cartesian >(); - ObjectRegistry::registerConverterFor< SireVol::CombineSpaces >(); - ObjectRegistry::registerConverterFor< SireVol::TriclinicBox >(); ObjectRegistry::registerConverterFor< SireVol::PeriodicBox >(); + ObjectRegistry::registerConverterFor< SireVol::GridIndex >(); + ObjectRegistry::registerConverterFor< SireVol::GridInfo >(); + ObjectRegistry::registerConverterFor< SireVol::NullGrid >(); + ObjectRegistry::registerConverterFor< SireVol::RegularGrid >(); + ObjectRegistry::registerConverterFor< SireVol::Cartesian >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroup >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroupEditor >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroupArray >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroupArrayArray >(); - ObjectRegistry::registerConverterFor< SireVol::NullGrid >(); - ObjectRegistry::registerConverterFor< SireVol::RegularGrid >(); ObjectRegistry::registerConverterFor< SireVol::AABox >(); - ObjectRegistry::registerConverterFor< SireVol::GridIndex >(); - ObjectRegistry::registerConverterFor< SireVol::GridInfo >(); + ObjectRegistry::registerConverterFor< SireVol::TriclinicBox >(); + ObjectRegistry::registerConverterFor< SireVol::CombinedSpace >(); + ObjectRegistry::registerConverterFor< SireVol::NullPatching >(); + ObjectRegistry::registerConverterFor< SireVol::BoxPatching >(); + ObjectRegistry::registerConverterFor< SireVol::CombineSpaces >(); } From 39271522140d6b777175316389a2cbeb62d45757 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 19 May 2022 15:25:34 +0100 Subject: [PATCH 119/148] cut down initialsation code to bare essentials --- corelib/src/libs/SireMove/openmmpmefep.cpp | 1630 +------------------- 1 file changed, 41 insertions(+), 1589 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 27d19916d..648a77fda 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -470,154 +470,9 @@ void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) } -// General force field -// HHL -// FIXME: disable SPOnOff and see if it works with PME -// -// NOTE: There is one single namespace for global parameters but each parameter -// must added to the force it is used in. This is relevant for all -// global lambdas below because they need to be changed during MD. -// Cutoff, delta and n could use a single name each as they are constant -// throughout the simulation. - -#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? -//#define COULOMB_SHIFT "rCoul = r;" - -// Direct space PME and LJ -tmpl_str OpenMMPMEFEP::GENERAL = - "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" - - // need to subtract scaled 1-4 interactions with erf() because those are - // computed in reciprocal space, the same for 1-2 and 1-3 - "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - COULOMB_SHIFT - - "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" - "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" - "rLJ = delta*sigma_avg*lam_diff + r*r;" - - "lam_diff = (1.0 - lambda) * 0.1;" // 0.1 to convert to nm - "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_hard;" - - "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" - "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" - "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" - "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2), D_om_lam);" - "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" - "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" - "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" - "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" - "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2, D_lam);" - "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" - "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" - "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" - "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2), D_mix);" - "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" - - "q_prod = (qend1*lam + (1.0-lam)*qstart1) * (qend2*lam + (1.0-lam)*qstart2);" - "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));" - "sigma_avg="; -tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { - "0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));", - "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" -}; - -// subtract 1-2, 1-3 and 1-4 interactions that have been calculated in reciprocal space -tmpl_str OpenMMPMEFEP::CORR_RECIP = - // cutoff shouldn't be needed because 1-4 should be shorter than cutoff - "-U_corr * withinCutoff;" - "withinCutoff = step(cutoff - r);" - - // erf() instead of erfc(), see PME implementation in OpenMM - "U_corr = 138.935456 * q_prod * erf(alpha_pme*r) / r;" - - "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;"; // this is symmetrical - -// 1-4 term for shrinking atoms -// NOTE: passed-in lambda (lamtd) is 1-lambda -tmpl_str OpenMMPMEFEP::TODUMMY = - "withinCutoff*(U_direct + U_LJ);" - "withinCutoff = step(cutofftd - r);" - - "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - COULOMB_SHIFT - - "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" - "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" - "rLJ = deltatd*sigma_avg*lam_diff + r*r;" - - "lam_diff = (1.0 - lamtd) * 0.1;" - "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" - "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;" - "sigma_avg="; -tmpl_str OpenMMPMEFEP::TODUMMY_SIGMA[2] = { - "(1-lamtd)*saend + lamtd*sastart;", - "sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);" -}; - -// 1-4 term for growing atoms -tmpl_str OpenMMPMEFEP::FROMDUMMY = - "withinCutoff*(U_direct + U_LJ);" - "withinCutoff=step(cutofffd - r);" - - "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - COULOMB_SHIFT - - "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" - "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" - "rLJ = deltafd*sigma_avg*lam_diff + r*r;" - - "lam_diff = (1.0 - lamfd) * 0.1;" - "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" - "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;" - "sigma_avg="; -tmpl_str OpenMMPMEFEP::FROMDUMMY_SIGMA[2] = { - "lamfd*saend + (1-lamfd)*sastart;", - "sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);" -}; - -// 1-4 term between shrinking and growing atoms -tmpl_str OpenMMPMEFEP::FROMTODUMMY = - "withinCutoff*(U_direct + U_LJ);" - "withinCutoff = step(cutoffftd - r);" - - "U_direct = 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" - COULOMB_SHIFT - - "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" - "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" - "rLJ = deltaftd*sigma_avg*0.1 + r*r;" - - "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" - "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" - "sigma_avg="; -tmpl_str OpenMMPMEFEP::FROMTODUMMY_SIGMA[2] = { - "lamftd*saend + (1-lamftd)*sastart;", - "sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);" -}; - -// standard 1-4 Coulomb and LJ terms, scaling is done per each exception below -tmpl_str OpenMMPMEFEP::INTRA_14_CLJ = - "withinCutoff*(U_direct + U_LJ);" - "withinCutoff = step(cutoffhd - r);" - - "U_direct = 138.935456 * q_prod * erfc(alpha_pme*r) / r;" // no lambda^n, no shift - - "U_LJ = 4.0 * eps_avg * ((sigma_avg/r)^12 - (sigma_avg/r)^6);" // no shift - - "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" - "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;" - "sigma_avg="; -tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { - "lamhd*saend + (1-lamhd)*sastart;", - "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" -}; - - // NOTE: only for debugging with simple non-dummy systems like ions const bool useOffset = true; // use true for production - /* A simple system of an ion in a water box. This is really for debugging purposes only and assumes that the parm7 and rst7 file are describing @@ -662,6 +517,9 @@ void OpenMMPMEFEP::initialise_ion(bool fullPME, bool doCharge) qDebug() << "There are" << nats << "atoms. " << "There are" << nmols << "molecules"; + OpenMM::Platform::loadPluginsFromDirectory( + OpenMM::Platform::getDefaultPluginsDirectory()); + auto system = new OpenMM::System(); if (Andersen_flag) @@ -834,8 +692,8 @@ void OpenMMPMEFEP::initialise_ion(bool fullPME, bool doCharge) if (!fullPME) { int p1, p2; - std::vector p1_params(6); - std::vector p2_params(6); + std::vector p1_params(10); + std::vector p2_params(10); double charge_prod, sigma_avg, epsilon_avg; double qprod_start, qprod_end; @@ -927,9 +785,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), CODELOC); - if (Debug) - qDebug() << "combiningRules =" << combiningRules; - bool flag_noperturbedconstraints = false; int flag_constraint; bool flag_constraint_water = false; @@ -956,9 +811,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), CODELOC); - if (Debug) - qDebug() << "Constraint Type =" << ConstraintType; - // Load Plugins from the OpenMM standard Plugin Directory OpenMM::Platform::loadPluginsFromDirectory( OpenMM::Platform::getDefaultPluginsDirectory()); @@ -978,10 +830,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); system_openmm->addForce(cmmotionremover); - - if (Debug) - qDebug() << "\nWill remove Center of Mass motion every" << - CMMremoval_frequency << "steps\n"; } system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), @@ -1016,321 +864,55 @@ void OpenMMPMEFEP::initialise(bool fullPME) double alpha_PME = (1.0 / converted_cutoff_distance) * std::sqrt(-log(2.0 * tolerance_PME)); - if (Debug) { - qDebug() << "PME alpha =" << alpha_PME - << "computed from PME error tolerance =" << tolerance_PME; - } /*** NON-BONDED FORCE FIELDS ***/ - QString lam_pre = ""; - /* general force field: direct space Coulomb and LJ */ - - // This check is necessary to avoid nan errors on the GPU platform caused - // by the calculation of 0^0 - if (coulomb_power > 0) - lam_pre = "(lambda^n) *"; - - QString general_ff = GENERAL.arg(lam_pre); - general_ff.append(GENERAL_SIGMA[flag_combRules]); - auto direct_space = - new OpenMM::CustomNonbondedForce(general_ff.toStdString()); + new OpenMM::CustomNonbondedForce(GENERAL_ION); /* correction term for 1-2, 1-3, 1-4 exceptions in reciprocal space */ auto custom_corr_recip = - new OpenMM::CustomBondForce(CORR_RECIP.toStdString()); + new OpenMM::CustomBondForce(CORR_ION); if (!fullPME) { - // This ensures that also the direct space is subject to PBC - direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - direct_space->setCutoffDistance(converted_cutoff_distance); - - direct_space->addGlobalParameter("lam", current_lambda); - direct_space->addGlobalParameter("delta", shift_delta); - direct_space->addGlobalParameter("n", coulomb_power); - direct_space->addGlobalParameter("SPOnOff", 0.0); - direct_space->addGlobalParameter("alpha_pme", alpha_PME); - - addPerParticleParameters(*direct_space, - {"qstart", "qend", "epstart", "epend", - "sigmastart", "sigmaend", "isHD", "isTD", - "isFD", "isSolvent"}); - - custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); - custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); - custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); - custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); - - addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); - } - - if (coulomb_power > 0) - lam_pre = "(lamtd^ntd) *"; - - /* to dummy force field */ - - QString intra_14_todummy = TODUMMY.arg(lam_pre); - intra_14_todummy.append(TODUMMY_SIGMA[flag_combRules]); - - auto custom_intra_14_todummy = - new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); - custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0-current_lambda); - custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); - custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); - custom_intra_14_todummy->addGlobalParameter("cutofftd", - converted_cutoff_distance); - custom_intra_14_todummy->addGlobalParameter("alpha_pme", alpha_PME); - - if (coulomb_power > 0) - lam_pre = "(lamfd^nfd) *"; - - /* from dummy force field */ - - QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); - intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); + // This ensures that also the direct space is subject to PBC + direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + direct_space->setCutoffDistance(converted_cutoff_distance); - auto custom_intra_14_fromdummy = - new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); - custom_intra_14_fromdummy->addGlobalParameter("lamfd", current_lambda); - custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); - custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); - custom_intra_14_fromdummy->addGlobalParameter("cutofffd", - converted_cutoff_distance); - custom_intra_14_fromdummy->addGlobalParameter("alpha_pme", alpha_PME); + direct_space->addGlobalParameter("lam", current_lambda); + direct_space->addGlobalParameter("delta", shift_delta); + direct_space->addGlobalParameter("n", coulomb_power); + direct_space->addGlobalParameter("SPOnOff", 0.0); + direct_space->addGlobalParameter("alpha_pme", alpha_PME); - /* from and to dummy force field */ - - auto intra_14_fromdummy_todummy = QString(FROMTODUMMY); - intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); - - auto custom_intra_14_fromdummy_todummy = - new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); - - custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", - current_lambda); - custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); - custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); - custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", - converted_cutoff_distance); - custom_intra_14_fromdummy_todummy->addGlobalParameter("alpha_pme", alpha_PME); - - /* hard, perturbed atom force field */ - - QString intra_14_clj(INTRA_14_CLJ); - intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); - - auto custom_intra_14_clj = - new OpenMM::CustomBondForce(intra_14_clj.toStdString()); - - custom_intra_14_clj->addGlobalParameter("lamhd", current_lambda); - custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); - custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); - - std::vector paramList = { - "qpstart", "qpend", "qmix", "eastart", "eaend", "emix", - "sastart", "saend", "samix" - }; - addPerBondParameters(*custom_intra_14_todummy, paramList); - addPerBondParameters(*custom_intra_14_fromdummy, paramList); - addPerBondParameters(*custom_intra_14_fromdummy_todummy, paramList); - addPerBondParameters(*custom_intra_14_clj, paramList); - - if (Debug) { - qDebug() << "\nCutoff type = " << CutoffType; - qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; - qDebug() << "Dielectric constant = " << field_dielectric; - qDebug() << "Lambda = " << current_lambda << " Coulomb Power = " << - coulomb_power << " Delta Shift = " << shift_delta; - } - - - /*** BONDED FORCE FIELDS ***/ - - auto bondStretch_openmm = new OpenMM::HarmonicBondForce(); - auto bondBend_openmm = new OpenMM::HarmonicAngleForce(); - auto bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); - - auto solute_bond_perturbation = new OpenMM::CustomBondForce( - "0.5*B*(r-req)^2;" - "B=bend*lambond+(1.0-lambond)*bstart;" - "req=rend*lambond+(1.0-lambond)*rstart"); - - solute_bond_perturbation->addGlobalParameter("lambond", current_lambda); - addPerBondParameters(*solute_bond_perturbation, - {"bstart", "bend", "rstart", "rend"}); - - - auto solute_angle_perturbation = new OpenMM::CustomAngleForce( - "0.5*A*(theta-thetaeq)^2;" - "A=aend*lamangle+(1.0-lamangle)*astart;" - "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); - - solute_angle_perturbation->addGlobalParameter("lamangle", current_lambda); - addPerAngleParameters(*solute_angle_perturbation, - {"astart", "aend", "thetastart", "thetaend"}); - - - /*** RESTRAINTS ***/ - - OpenMM::CustomExternalForce *positionalRestraints_openmm = NULL; - - if (Restraint_flag) { - positionalRestraints_openmm = new OpenMM::CustomExternalForce - ( - "k*d2;" - "d2 = max(0.0, d1 - d^2);" - "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2" - ); - positionalRestraints_openmm->addPerParticleParameter("xref"); - positionalRestraints_openmm->addPerParticleParameter("yref"); - positionalRestraints_openmm->addPerParticleParameter("zref"); - positionalRestraints_openmm->addPerParticleParameter("k"); - positionalRestraints_openmm->addPerParticleParameter("d"); + addPerParticleParameters(*direct_space, + {"qstart", "qend", "epstart", "epend", + "sigmastart", "sigmaend", "isHD", "isTD", + "isFD", "isSolvent"}); - system_openmm->addForce(positionalRestraints_openmm); + custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); + custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); + custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); + custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); - if (Debug) - qDebug() << "\n\nRestraint is ON\n\n"; + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); } - /*** BOND LINK FORCE FIELD ***/ - /* NOTE: CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy if - restraints involve one atom that diffuses out of the box. */ - - auto custom_link_bond = - new OpenMM::CustomBondForce("kl * max(0, d - dl*dl);" - "d = (r-reql) * (r-reql)"); - custom_link_bond->addPerBondParameter("reql"); - custom_link_bond->addPerBondParameter("kl"); - custom_link_bond->addPerBondParameter("dl"); - - /*** BUILD OpenMM SYSTEM ***/ - int system_index = 0; - - // To avoid possible mismatch between the index in which atoms are added to the openmm system arrays and - // their atomic numbers in sire, one array is populated while filling up the openmm global arrays - QHash AtomNumToOpenMMIndex; - /* add all atoms to the system */ - for (int i = 0; i < nmols; ++i) { const int nats_mol = ws.nAtoms(i); - const double *m = ws.massArray(i); - MolNum molnum = moleculegroup.molNumAt(i); - - const ViewsOfMol &molview = moleculegroup[molnum].data(); - - const Molecule &mol = molview.molecule(); - - Selector molatoms = mol.atoms(); - for (int j = 0; j < nats_mol; ++j) { - // This adds each atom to the system via its mass - // JM 10/16 make sure that perturbed atoms have mass of heaviest - // end-state system_openmm->addParticle(m[j]); - - Atom at = molatoms(j); - AtomNum atnum = at.number(); - - if (Debug) - qDebug() << "openMM_index" << system_index - << "Sire Atom Number" << atnum.toString() - << "Mass particle =" << m[j]; - - AtomNumToOpenMMIndex[atnum.value()] = system_index; - - // JM Nov 12 - // The code below implements a ThreeParticleAverageSite for virtual - // sites for EPW atoms present in a WAT residue - // This is very AMBER specific. - - AtomName atname = at.name(); - ResName resname = at.residue().name(); - - if (Debug) - qDebug() << " atname " << atname.value() << " mol " << i; - - if (atname == AtomName("EPW") && resname == ResName("WAT")) { - Atom oatom = molatoms.select(AtomName("O")); - Atom h1atom = molatoms.select(AtomName("H1")); - Atom h2atom = molatoms.select(AtomName("H2")); - - AmberParameters amber_params = - mol.property("amberparameters").asA(); - QList bonds_ff = amber_params.getAllBonds(); - - double distoh = -1.0; - double disthh = -1.0; - double distoe = -1.0; - - for (int k = 0; k < bonds_ff.length(); k++) { - BondID bond_ff = bonds_ff[k]; - QList bond_params = amber_params.getParams(bond_ff); - - double r0 = bond_params[1]; - - AtomName at0name = mol.select(bond_ff.atom0()).name(); - AtomName at1name = mol.select(bond_ff.atom1()).name(); - - if ((at0name == AtomName("O") and at1name == AtomName("H1")) - or ( at0name == AtomName("H1") and at1name == AtomName("O"))) { - distoh = r0; - } - else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) - or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) { - disthh = r0; - } - else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) - or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) { - distoe = r0; - } - } - - if (distoh < 0.0 or disthh < 0.0 or distoe < 0.0) - throw SireError::program_bug - (QObject::tr("Could not find expected atoms in " - "TIP4P water molecule."), CODELOC); - - double weightH = distoe / sqrt((distoh * distoh) - - (0.25 * disthh * disthh)); - - int o_index = AtomNumToOpenMMIndex[oatom.number().value()]; - int h1_index = AtomNumToOpenMMIndex[h1atom.number().value()]; - int h2_index = AtomNumToOpenMMIndex[h2atom.number().value()]; - - if (Debug) - qDebug() << "virtual site " << system_index << " o " - << o_index << " h1 " << h1_index << " h2 " - << h2_index << " 1 - weightH " << 1 - weightH - << " weightH/2 " << weightH / 2; - - auto vsite = - new OpenMM::ThreeParticleAverageSite - (o_index, h1_index, h2_index, 1 - weightH, - weightH / 2, weightH / 2); - - system_openmm->setVirtualSite(system_index, vsite); - } // EPW - - system_index = system_index + 1; - - } // end of loop on atoms in molecule - } // end of loop on molecules in workspace + } + } int num_atoms_till_i = 0; - // JM July 13. This also needs to be changed because there could be more - // than one perturbed molecule - // Molecule solutemol = solute.moleculeAt(0).molecule(); - int nions = 0; - QVector perturbed_energies_tmp{false, false, false, false, false, false, false, false, false}; @@ -1345,8 +927,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) // scale factors QHash< QPair, QPair > custom14pairs; - bool special_14 = false; - for (int i = 0; i < nmols; i++) { const Vector *c = ws.coordsArray(i); @@ -1357,7 +937,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) std::vector custom_non_bonded_params(10); if (Debug) - qDebug() << "Molecule number = " << i; + qDebug() << "Molecule number = " << i << "name =" << molecule.name(); // NON BONDED TERMS @@ -1374,7 +954,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) if (molecule.hasProperty("perturbations")) { if (Debug) - qDebug() << "Molecule Perturbed number = " << i; + qDebug() << " ... molecule is perturbed"; AtomCharges atomcharges_start = molecule.property("initial_charge").asA(); @@ -1405,9 +985,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; double charge_diff = 0.0; - // This really only adds the nonbonded parameters - // The parameters need to be added in the same order as they - // appear in the System nonbond_idx = recip_space->addParticle(charge, sigma, epsilon); Atom atom = molecule.molecule().atoms()(j); @@ -1421,14 +998,8 @@ void OpenMMPMEFEP::initialise(bool fullPME) charge_start = start_charges[j].value(); charge_final = final_charges[j].value(); - // HHL - // Lambda scaling for 1-5+ (see exceptions below) in reciprocal - // space complimentary to scaling in direct space - // need to provide the parameter (lambda) and the chargeScale for - // reciprocal PME charge_diff = charge_final - charge_start; - // FIXME: really needed? const for small value if (abs(charge_diff) < 0.00001) charge_diff = 0.0; @@ -1586,583 +1157,12 @@ void OpenMMPMEFEP::initialise(bool fullPME) direct_space->addParticle(custom_non_bonded_params); } - if (Restraint_flag) { - bool hasRestrainedAtoms = molecule.hasProperty("restrainedatoms"); - - if (hasRestrainedAtoms) { - Properties restrainedAtoms = - molecule.property("restrainedatoms").asA(); - - int nrestrainedatoms = restrainedAtoms.property( - QString("nrestrainedatoms")).asA().toInt(); - - if (Debug) - qDebug() << "nrestrainedatoms = " << nrestrainedatoms; - - for (int i = 0; i < nrestrainedatoms; i++) { - int atomnum = restrainedAtoms.property(QString("AtomNum(%1)").arg( - i)).asA().toInt(); - double xref = restrainedAtoms.property(QString("x(%1)").arg( - i)).asA().toDouble(); - double yref = restrainedAtoms.property(QString("y(%1)").arg( - i)).asA().toDouble(); - double zref = restrainedAtoms.property(QString("z(%1)").arg( - i)).asA().toDouble(); - double k = restrainedAtoms.property(QString("k(%1)").arg( - i)).asA().toDouble(); - double d = restrainedAtoms.property(QString("d(%1)").arg( - i)).asA().toDouble(); - - int openmmindex = AtomNumToOpenMMIndex[atomnum]; - - if (Debug) { - qDebug() << "atomnum " << atomnum << " openmmindex " << openmmindex << " x " << - xref << " y " << yref << " z " << zref << " k " << k << " d " << d; - } - - int posrestrdim = 5; - std::vector params(posrestrdim); - - params[0] = xref * OpenMM::NmPerAngstrom; - params[1] = yref * OpenMM::NmPerAngstrom; - params[2] = zref * OpenMM::NmPerAngstrom; - params[3] = k * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * - OpenMM::AngstromsPerNm); - params[4] = d * OpenMM::NmPerAngstrom; - - positionalRestraints_openmm->addParticle(openmmindex, params); - } - } - } // end of restraint flag - // single atoms like ions - bool hasConnectivity = molecule.hasProperty("connectivity"); - - if (!hasConnectivity) { + if (!molecule.hasProperty("connectivity")) { num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; - - if (Debug) { - qDebug() << "Number of atoms = " << num_atoms_molecule - << "Number of atoms till i =" << num_atoms_till_i; - qDebug() << "***** MONOATOMIC MOLECULE DETECTED *****\n"; - } - - nions = nions + 1; continue; } - // bonded terms - QList< BondID > bond_pert_list; - QList< BondID > bond_pert_swap_list; - QList< AngleID > angle_pert_list; - QList< AngleID > angle_pert_swap_list; - QList< DihedralID > dihedral_pert_list; - QList< DihedralID > dihedral_pert_swap_list; - QList< ImproperID > improper_pert_list; - QList< ImproperID > improper_pert_swap_list; - - if (solute.contains(molecule)) { - Perturbations pert_params = - molecule.property("perturbations").asA(); - - QList< PropPtr > perturbation_list = pert_params.perturbations(); - - std::vector solute_bond_perturbation_params(4); - std::vector solute_angle_perturbation_params(4); - std::vector solute_torsion_perturbation_params(1); - - QHash bond_pert_eq_list; - - for (QList< PropPtr >::const_iterator it = - perturbation_list.constBegin(); it != perturbation_list.constEnd(); ++it) { - const Perturbation &pert = *it; - - if (pert.isA()) { - QString str = pert.what(); - - if (str == "SireMM::TwoAtomPerturbation") { - const TwoAtomPerturbation &two = pert.asA(); - int idx0 = two.atom0().asA().value() + num_atoms_till_i; - int idx1 = two.atom1().asA().value() + num_atoms_till_i; - double rstart = two.initialForms()[Symbol("r0")].toString().toDouble(); - double bstart = two.initialForms()[Symbol("k")].toString().toDouble(); - double rend = two.finalForms()[Symbol("r0")].toString().toDouble(); - double bend = two.finalForms()[Symbol("k")].toString().toDouble(); - - solute_bond_perturbation_params[0] = bstart * 2.0 * OpenMM::KJPerKcal * - OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; - solute_bond_perturbation_params[1] = bend * 2.0 * OpenMM::KJPerKcal * - OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; - solute_bond_perturbation_params[2] = rstart * OpenMM::NmPerAngstrom; - solute_bond_perturbation_params[3] = rend * OpenMM::NmPerAngstrom; - - /* JM 10/16 Also apply this if 'no solute constraints' flag is on*/ - if (flag_constraint == NONE) { - solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); - } - else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { - /* JM 10/16 ALLBONDS and HANGLES may be unwise with current free energy implementation !*/ - double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda - + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; - system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - bond_pert_eq_list.insert(BondID(two.atom0(), two.atom1()), - pert_eq_distance * OpenMM::AngstromsPerNm); - if (Debug) { - qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << - " Nm"; - qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << - " Nm"; - qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << - " Nm"; - } - } - /* JM 10/16 */ - /* Here add code to constraint hbonds only if initial and final parameters are unperturbed*/ - /* check also what is the mass of the atoms in that case */ - else if (flag_constraint == HBONDS and flag_noperturbedconstraints) { - const SireMol::Atom atom0 = molecule.select(two.atom0()); - //double m0 = atom0.property("mass").value(); - double m0 = system_openmm->getParticleMass(idx0); - const SireMol::Atom atom1 = molecule.select(two.atom1()); - //double m1 = atom1.property("mass").value(); - double m1 = system_openmm->getParticleMass(idx1); - double deltar = abs(rend-rstart); - double deltak = abs(bend-bstart); - // only constraint if m0 < 1.1 g.mol-1 or m1 < 1.1 g.mol-1 - // AND the initial and final parameters differ - if (Debug) { - qDebug() << " m0 " << m0 << " m1 " << m1 << "\n"; - qDebug() << " deltar " << deltar << " " << " deltak " << deltak; - } - /* bonds that do not change parameters are constrained*/ - double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda - + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; - if (deltar < SMALL and deltak < SMALL) { - system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - if (Debug) { - qDebug() << "perturbed bond but no parameter changes so constrained " << - atom0.name().toString() - << "-" << atom1.name().toString() << "\n"; - } - } - /* bonds that change parameters and have one of the atoms with a mass < HMASS are constrained*/ - else if (m0 < HMASS or m1 < HMASS) { - system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - if (Debug) { - qDebug() << "perturbed bond parameter changes but involving " - << " light mass so constrained " << atom0.name().toString() - << "- " << atom1.name().toString() << "\n"; - } - } - /* other bonds are flexible */ - else { - solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); - if (Debug) { - qDebug() << "perturbed bond flexible " << atom0.name().toString() - << "- " << atom1.name().toString() << "\n"; - } - } - } - else if (flag_constraint == HBONDS) { - const SireMol::Atom atom0 = molecule.select(two.atom0()); - QString initial_type_atom0 = atom0.property("initial_ambertype"); - QString final_type_atom0 = atom0.property("final_ambertype"); - - const SireMol::Atom atom1 = molecule.select(two.atom1()); - QString initial_type_atom1 = atom1.property("initial_ambertype"); - QString final_type_atom1 = atom1.property("final_ambertype"); - - if (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) - || final_type_atom0.startsWith("h", Qt::CaseInsensitive) || - initial_type_atom1.startsWith("h", Qt::CaseInsensitive) - || final_type_atom1.startsWith("h", Qt::CaseInsensitive)) { - double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda - + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; - system_openmm->addConstraint(idx0, idx1, pert_eq_distance); - - if (Debug) { - qDebug() << "Two/one bond atom(s) start(s) or end(s) with h/H"; - qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << - " Nm"; - qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << - " Nm"; - qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << - " Nm"; - } - } - else { - solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); - } - - if (Debug) { - qDebug() << "Atom0 initil type = " << initial_type_atom0; - qDebug() << "Atom0 final type = " << final_type_atom0; - qDebug() << "Atom1 initil type = " << initial_type_atom1; - qDebug() << "Atom1 final type = " << final_type_atom1; - } - - } - - bond_pert_list.append(BondID(two.atom0(), two.atom1())); - bond_pert_swap_list.append(BondID(two.atom1(), two.atom0())); - - bondPairs.push_back(std::make_pair(idx0, idx1)); - - if (Debug) { - qDebug() << "Atom0 = " << two.atom0().asA().value() << - "Atom1 = " << two.atom1().asA().value(); - qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "\n"; - qDebug() << "rstart = " << rstart << " A" << - "rend = " << rend << " A"; - qDebug() << "bstart = " << bstart << " kcal/A A" << - "bend = " << bend << " kcal/A A" << "\n"; - } - } - - if (str == "SireMM::ThreeAtomPerturbation") { - const ThreeAtomPerturbation &three = pert.asA(); - int idx0 = three.atom0().asA().value() + num_atoms_till_i; - int idx1 = three.atom1().asA().value() + num_atoms_till_i; - int idx2 = three.atom2().asA().value() + num_atoms_till_i; - double astart = three.initialForms()[Symbol("k")].toString().toDouble(); - double thetastart = - three.initialForms()[Symbol("theta0")].toString().toDouble(); - double aend = three.finalForms()[Symbol("k")].toString().toDouble(); - double thetaend = three.finalForms()[Symbol("theta0")].toString().toDouble(); - - solute_angle_perturbation_params[0] = astart * 2.0 * OpenMM::KJPerKcal; - solute_angle_perturbation_params[1] = aend * 2.0 * OpenMM::KJPerKcal; - solute_angle_perturbation_params[2] = thetastart; - solute_angle_perturbation_params[3] = thetaend; - - if (Debug) { - qDebug() << "astart = " << solute_angle_perturbation_params[0] << " kJ/rad rad" - << - " aend = " << solute_angle_perturbation_params[1] << " kJ/rad rad"; - qDebug() << "thetastart = " << solute_angle_perturbation_params[2] << " rad" << - "thetaend = " << solute_angle_perturbation_params[3] << " rad"; - } - - if (flag_constraint == HANGLES) { - const SireMol::Atom atom0 = molecule.select(three.atom0()); - QString initial_type_atom0 = atom0.property("initial_ambertype"); - QString final_type_atom0 = atom0.property("final_ambertype"); - - const SireMol::Atom atom1 = molecule.select(three.atom1()); - QString initial_type_atom1 = atom1.property("initial_ambertype"); - QString final_type_atom1 = atom1.property("final_ambertype"); - - const SireMol::Atom atom2 = molecule.select(three.atom2()); - QString initial_type_atom2 = atom2.property("initial_ambertype"); - QString final_type_atom2 = atom2.property("final_ambertype"); - - bool H_X_H = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) - || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && - (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) - || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); - - bool H_O_X = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) - || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && - (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) - || final_type_atom1.startsWith("o", Qt::CaseInsensitive)); - - bool X_O_H = (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) - || final_type_atom1.startsWith("o", Qt::CaseInsensitive)) && - (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) - || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); - - if (Debug) { - if (H_X_H) - qDebug() << "type = H_X_H"; - if (H_O_X) - qDebug() << "type = H_O_X"; - if (X_O_H) - qDebug() << "type = X_O_H"; - } - - if (H_X_H || H_O_X || X_O_H) { - const BondID * first_alchemical_bond = NULL; - const BondID * second_alchemical_bond = NULL; - - double first_alchemical_distance = -1.0; - double second_alchemical_distance = -1.0; - - if (bond_pert_eq_list.contains(BondID(three.atom0(), three.atom1()))) { - first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom0(), - three.atom1()))).key()); - first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); - if (Debug) - qDebug() << "Atom0 - Atom1"; - } - else if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom0()))) { - first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), - three.atom0()))).key()); - first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); - if (Debug) - qDebug() << "Atom1 - Atom0"; - } - else { - if (Debug) - qDebug() << "First perturbed bond was not foud in the perturned list"; - first_alchemical_bond = new BondID(three.atom0(), three.atom1()); - } - - - if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom2()))) { - second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), - three.atom2()))).key()); - second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); - if (Debug) - qDebug() << "Atom1 - Atom2"; - } - else if (bond_pert_eq_list.contains(BondID(three.atom2(), three.atom1()))) { - second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom2(), - three.atom1()))).key()); - second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); - if (Debug) - qDebug() << "Atom2 - Atom1"; - } - else { - if (Debug) - qDebug() << "Second perturbed bond was not foud in the perturned list"; - } - - - if (Debug) - qDebug() << "First Alchemical distance = " << first_alchemical_distance - << "Second Alchemical distance = " << second_alchemical_distance; - - SireMaths::Vector bond1_vec; - SireMaths::Vector bond2_vec; - - if (first_alchemical_bond->atom0() == second_alchemical_bond->atom0()) { - SireMaths::Vector tmp1 = (molecule.atom( - first_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom( - second_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom( - first_alchemical_bond->atom0())).property("coordinates"); - bond1_vec = tmp1 - tmpc; - bond2_vec = tmp2 - tmpc; - if (Debug) - qDebug() << "Bond1 Atom0 = Bond2 Atom0"; - } - else if (first_alchemical_bond->atom0() == second_alchemical_bond->atom1()) { - SireMaths::Vector tmp1 = (molecule.atom( - first_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom( - second_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom( - first_alchemical_bond->atom0())).property("coordinates"); - bond1_vec = tmp1 - tmpc; - bond2_vec = tmp2 - tmpc; - if (Debug) - qDebug() << "Bond1 Atom0 = Bond2 Atom1"; - } - else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom0()) { - SireMaths::Vector tmp1 = (molecule.atom( - first_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom( - second_alchemical_bond->atom1())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom( - first_alchemical_bond->atom1())).property("coordinates"); - bond1_vec = tmp1 - tmpc; - bond2_vec = tmp2 - tmpc; - if (Debug) - qDebug() << "Bond1 Atom1 = Bond2 Atom0"; - } - else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom1()) { - SireMaths::Vector tmp1 = (molecule.atom( - first_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmp2 = (molecule.atom( - second_alchemical_bond->atom0())).property("coordinates"); - SireMaths::Vector tmpc = (molecule.atom( - first_alchemical_bond->atom1())).property("coordinates"); - bond1_vec = tmp1 - tmpc; - bond2_vec = tmp2 - tmpc; - if (Debug) - qDebug() << "Bond1 Atom1 = Bond2 Atom1"; - } - else - throw SireError::program_bug(QObject::tr("No coorner bond"), CODELOC); - - if (Debug) { - if (first_alchemical_distance != -1.0) { - qDebug() << "First vector X = " << (bond1_vec.normalise() * - first_alchemical_distance).x(); - qDebug() << "First vector Y = " << (bond1_vec.normalise() * - first_alchemical_distance).y(); - qDebug() << "First vector Z = " << (bond1_vec.normalise() * - first_alchemical_distance).z(); - } - else { - qDebug() << "First vector X = " << (bond1_vec).x(); - qDebug() << "First vector Y = " << (bond1_vec).y(); - qDebug() << "First vector Z = " << (bond1_vec).z(); - } - - if (second_alchemical_distance != -1.0) { - qDebug() << "Second vector X = " << (bond2_vec.normalise() * - second_alchemical_distance).x(); - qDebug() << "Second vector Y = " << (bond2_vec.normalise() * - second_alchemical_distance).y(); - qDebug() << "Second vector Z = " << (bond2_vec.normalise() * - second_alchemical_distance).z(); - } - else { - qDebug() << "Second vector X = " << (bond2_vec).x(); - qDebug() << "Second vector Y = " << (bond2_vec).y(); - qDebug() << "Second vector Z = " << (bond2_vec).z(); - } - } - - double constraint_distance; - - double eq_angle = solute_angle_perturbation_params[3] * current_lambda + - (1.0 - current_lambda) * solute_angle_perturbation_params[2]; - - if (first_alchemical_distance == -1.0 && second_alchemical_distance != -1.0) { - //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) - double sq = bond1_vec.length() * bond1_vec.length() + - (bond2_vec.normalise() * second_alchemical_distance).length() * - (bond2_vec.normalise() * second_alchemical_distance).length(); - - double dp = 2.0 * bond1_vec.length() * (bond2_vec.normalise() * - second_alchemical_distance).length() * cos(eq_angle); - - constraint_distance = sqrt(sq - dp); - - //constraint_distance = (bond1_vec - bond2_vec.normalise() * second_alchemical_distance).length(); - } - else if (first_alchemical_distance != -1.0 - && second_alchemical_distance == -1.0) { - //Carnot theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) - double sq = bond2_vec.length() * bond2_vec.length() + - (bond1_vec.normalise() * first_alchemical_distance).length() * - (bond1_vec.normalise() * first_alchemical_distance).length(); - - double dp = 2.0 * bond2_vec.length() * (bond2_vec.normalise() * - first_alchemical_distance).length() * cos(eq_angle); - - constraint_distance = sqrt(sq - dp); - - //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec).length(); - } - else if (first_alchemical_distance != -1.0 - && second_alchemical_distance != -1.0) { - //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) - double sq = (bond1_vec.normalise() * first_alchemical_distance).length() * - (bond1_vec.normalise() * first_alchemical_distance).length() + - (bond2_vec.normalise() * second_alchemical_distance).length() * - (bond2_vec.normalise() * second_alchemical_distance).length(); - - double dp = 2.0 * (bond1_vec.normalise() * first_alchemical_distance).length() - * (bond2_vec.normalise() * second_alchemical_distance).length() * cos(eq_angle); - - constraint_distance = sqrt(sq - dp); - - //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec.normalise() * second_alchemical_distance).length(); - } - else - throw SireError::program_bug( - QObject::tr("The angle does not contain perturbed bond"), CODELOC); - - - system_openmm->addConstraint(idx0, idx2, - constraint_distance * OpenMM::NmPerAngstrom); - - if (Debug) - qDebug() << "CONSTRAINT DISTANCE = " << constraint_distance << " A"; - } - - }//end if HANGLES - else { - solute_angle_perturbation->addAngle(idx0, idx1, idx2, - solute_angle_perturbation_params); - if (Debug) - qDebug() << "Added perturbed angle"; - } - - angle_pert_list.append(AngleID(three.atom0(), three.atom1(), three.atom2())); - angle_pert_swap_list.append(AngleID(three.atom2(), three.atom1(), - three.atom0())); - - if (Debug) { - qDebug() << "Atom0 = " << three.atom0().asA().value() << - "Atom1 = " << three.atom1().asA().value() << - "Atom2 = " << three.atom2().asA().value(); - - qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << "\n"; - - qDebug() << "astart = " << astart << " kcal/rad rad" << - "aend = " << " kcal/rad rad" << aend; - - qDebug() << "thetastart = " << thetastart << " rad" << - "thetaend = " << thetaend << " rad" << "\n"; - } - } - if (str == "SireMM::FourAtomPerturbation") { - - const FourAtomPerturbation &four = pert.asA(); - int idx0 = four.atom0().asA().value() + num_atoms_till_i; - int idx1 = four.atom1().asA().value() + num_atoms_till_i; - int idx2 = four.atom2().asA().value() + num_atoms_till_i; - int idx3 = four.atom3().asA().value() + num_atoms_till_i; - - QString tmp = four.perturbExpression().toOpenMMString(); - tmp.replace(QString("phi"), QString("theta")); - tmp.replace(QString("lambda"), QString("lamdih")); - tmp = "( " + tmp + " ) * " + "KJPerKcal"; - - std::string openmm_str = tmp.toStdString(); - - if (Debug) { - qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << - "IDX3 = " << idx3; - qDebug() << "Dihedral String = " << openmm_str.c_str(); - qDebug() << "Dihedral Normal String = " << four.perturbExpression().toString() - << "\n"; - } - - auto solute_torsion_perturbation = new OpenMM::CustomTorsionForce(openmm_str); - solute_torsion_perturbation->addPerTorsionParameter("KJPerKcal"); - solute_torsion_perturbation_params[0] = 4.184; - solute_torsion_perturbation->addGlobalParameter("lamdih", current_lambda); - solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, - solute_torsion_perturbation_params); - - //********************************BONDED ENERGY TORSIONS ARE ADDED TO THE SYSTEM***************************** - solute_torsion_perturbation->setForceGroup( - NONBONDED_FCG); // FIXME: why in this force group? - - if (!fullPME) - system_openmm->addForce(solute_torsion_perturbation); - - perturbed_energies_tmp[7] = true; //Torsions are added to the system - - dihedral_pert_list.append(DihedralID(four.atom0(), four.atom1(), four.atom2(), - four.atom3())); - dihedral_pert_swap_list.append(DihedralID(four.atom3(), four.atom1(), - four.atom2(), four.atom0())); - - improper_pert_list.append(ImproperID(four.atom0(), four.atom1(), four.atom2(), - four.atom3())); - improper_pert_swap_list.append(ImproperID(four.atom0(), four.atom1(), - four.atom3(), four.atom2())); - - if (Debug) { - qDebug() << "Atom0 = " << four.atom0().asA().value() << - "Atom1 = " << four.atom1().asA().value() << - "Atom2 = " << four.atom2().asA().value() << - "Atom3 = " << four.atom3().asA().value() << "\n"; - } - } - - } // end if (pert.isA()) - } // end for perturbations - - } // end solute molecule perturbation - // The bonded parameters are stored in "amberparameters" AmberParameters amber_params = molecule.property("amberparameters").asA(); @@ -2174,23 +1174,11 @@ void OpenMMPMEFEP::initialise(bool fullPME) for (int j = 0; j < bonds_ff.length(); j++) { BondID bond_ff = bonds_ff[j]; QList bond_params = amber_params.getParams(bond_ff); - double k = bond_params[0]; double r0 = bond_params[1]; int idx0 = bonds[j].atom0().asA().value(); int idx1 = bonds[j].atom1().asA().value(); - if (solute.contains(molecule)) { - if (bond_pert_list.indexOf(bond_ff) != -1 - || bond_pert_swap_list.indexOf(bond_ff) != -1) { - //Solute molecule. Check if the current solute bond is in the perturbed bond list - // JM July 13 --> Note, we should still have the ability to constrain the bond to its r(lambda) equilibrium distance - if (Debug) - qDebug() << "Found Perturbed Bond\n"; - continue; - } - } - //Select the atom type QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); @@ -2198,245 +1186,19 @@ void OpenMMPMEFEP::initialise(bool fullPME) idx0 = idx0 + num_atoms_till_i; idx1 = idx1 + num_atoms_till_i; - // JM July 13. The constraint code has to be revised to handle massless particles so TIP4P can be dealt with. - // Should check if a constraint involves an atom with a null mass, and if so skip constraint. + system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); - if (flag_constraint == NONE) { - //JM 10/16 If constraint water flag is on and if molecule is a water molecule then apply constraint - if (flag_constraint_water and molfirstresname == ResName("WAT")) - system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); - else - bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, - k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); - } - else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { - system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); - } - else if (flag_constraint == HBONDS) { - if ((atom0[6] == 'H') || (atom1[6] == 'H')) { // will add constraint between all TIP3P atoms - system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); - } - else { - bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, - k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); - } - } + if (Debug) + qDebug() << "Adding constraint to atoms" << idx0 << "and" + << idx1 << "with distance" << r0; // Bond exclusion List bondPairs.push_back(std::make_pair(idx0, idx1)); } - // Angles - QList angles_ff = amber_params.getAllAngles(); - QVector angles = angles_ff.toVector(); - - for (int j = 0; j < angles_ff.length(); j++) { - AngleID angle_ff = angles_ff[j]; - QList angle_params = amber_params.getParams(angle_ff); - - double k = angle_params[0]; - double theta0 = angle_params[1]; // It is already in radiant - - int idx0 = angles[j].atom0().asA().value(); - int idx1 = angles[j].atom1().asA().value(); - int idx2 = angles[j].atom2().asA().value(); - - if (solute.contains(molecule)) { - if (angle_pert_list.indexOf(angle_ff) != -1 - || angle_pert_swap_list.indexOf(angle_ff) != -1) { - //Solute molecule. Check if the current solute angle is in the perturbed angle list - if (Debug) - qDebug() << "Found Perturbed Angle\n"; - continue; - } - else { - if (Debug) - qDebug() << "Solute normal Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << - "Atom2 = " << idx2 << "theta0 = " << theta0 << " k = " << k << "\n"; - - idx0 = idx0 + num_atoms_till_i; - idx1 = idx1 + num_atoms_till_i; - idx2 = idx2 + num_atoms_till_i; - bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, - k * 2.0 * OpenMM::KJPerKcal); - continue; - } - } - - if (Debug) - qDebug() << "Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << - idx2 << "\n"; - - QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); - QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); - QString atom2 = molecule.atom(AtomIdx(idx2)).toString(); - - Vector diff = c[idx2] - c[idx0]; - - idx0 = idx0 + num_atoms_till_i; - idx1 = idx1 + num_atoms_till_i; - idx2 = idx2 + num_atoms_till_i; - - if (flag_constraint == HANGLES) { - if (((atom0[6] == 'H') && (atom2[6] == 'H'))) { - system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); - } - else if (((atom0[6] == 'H') && (atom1[6] == 'O')) || ((atom1[6] == 'O') - && (atom2[6] == 'H'))) { - system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); - } - else { - bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, - k * 2.0 * OpenMM::KJPerKcal); - } - } - else { - bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, - k * 2.0 * OpenMM::KJPerKcal); - } - } // end of angles - - // Dihedrals - QList dihedrals_ff = amber_params.getAllDihedrals(); - QVector dihedrals = dihedrals_ff.toVector(); - - for (int j = 0; j < dihedrals_ff.length(); j++) { - DihedralID dihedral_ff = dihedrals_ff[j]; - QList dihedral_params = amber_params.getParams(dihedral_ff); - - int idx0 = dihedrals[j].atom0().asA().value() + num_atoms_till_i; - int idx1 = dihedrals[j].atom1().asA().value() + num_atoms_till_i; - int idx2 = dihedrals[j].atom2().asA().value() + num_atoms_till_i; - int idx3 = dihedrals[j].atom3().asA().value() + num_atoms_till_i; - - if (Debug) { - qDebug() << "TOTAL Dihedral between atom global index " << idx0 - - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; - } - - if (solute.contains(molecule)) { - if (dihedral_pert_list.indexOf(dihedral_ff) != -1 - || dihedral_pert_swap_list.indexOf(dihedral_ff) != -1) { - //Solute molecule. Check if the current solute dihedral is in the perturbed dihedral list - if (Debug) - qDebug() << "Found Perturbed Dihedral\n"; - continue; - } - } - - // Variable number of parameters - for (int k = 0; k < dihedral_params.length(); k = k + 3) { - double v = dihedral_params[ k ]; - int periodicity = dihedral_params[ k + 1 ]; - double phase = dihedral_params[ k + 2 ]; - bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, - v * OpenMM::KJPerKcal); - if (Debug) { - qDebug() << "Dihedral between atom global index " << idx0 - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; - qDebug() << "Amplitude_dih = " << v << " periodicity " << periodicity << - " phase " << phase << "\n"; - } - } - } // end of dihedrals - - // Improper Dihedrals - QList impropers_ff = amber_params.getAllImpropers(); - QVector impropers = impropers_ff.toVector(); - - for (int j = 0; j < impropers_ff.length(); j++) { - ImproperID improper_ff = impropers_ff[j]; - QList improper_params = amber_params.getParams(improper_ff); - - int idx0 = impropers[j].atom0().asA().value() + num_atoms_till_i; - int idx1 = impropers[j].atom1().asA().value() + num_atoms_till_i; - int idx2 = impropers[j].atom2().asA().value() + num_atoms_till_i; - int idx3 = impropers[j].atom3().asA().value() + num_atoms_till_i; - - if (Debug) { - qDebug() << "TOTAL Improper between atom global index " << idx0 - - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; - } - - if (solute.contains(molecule)) { - //Solute molecule. Check if the current solute dihedral is in the perturbed improper list - if (improper_pert_list.indexOf(improper_ff) != -1 - || improper_pert_swap_list.indexOf(improper_ff) != -1) { - if (Debug) - qDebug() << "Found Perturbed Improper\n"; - continue; - } - } - - // Variable number of parameters - for (int k = 0; k < improper_params.length(); k = k + 3) { - double v = improper_params[ k ]; - int periodicity = improper_params[ k + 1 ]; - double phase = improper_params[ k + 2 ]; - - bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, - v * OpenMM::KJPerKcal); - if (Debug) { - qDebug() << "Improper between atom global index " << idx0 - num_atoms_till_i << - " and " << idx1 - num_atoms_till_i << - " and " << idx2 - num_atoms_till_i << - " and " << idx3 - num_atoms_till_i << "\n"; - qDebug() << "Amplitude_imp = " << v << " periodicity " << periodicity << - " phase " << phase << "\n"; - } - } - } // end of impropers - - // Variable 1,4 scaling factors - QList pairs14_ff = amber_params.getAll14Pairs(); - QVector pairs14 = pairs14_ff.toVector(); - - for (int j = 0; j < pairs14_ff.length(); j++) { - BondID pair14_ff = pairs14_ff[j]; - - QList pair14_params = amber_params.get14PairParams(pair14_ff); - - double cscl = pair14_params[0]; - double ljscl = pair14_params[1]; - - if (Debug) - qDebug() << " cscl@ " << cscl << " ljscl " << ljscl; - - // Add to custom pairs if scale factor differs from default - if (abs(cscl - Coulomb14Scale) > 0.0001 - or abs(ljscl - LennardJones14Scale) > 0.0001) { - int idx0 = pair14_ff.atom0().asA().value() + num_atoms_till_i; - int idx1 = pair14_ff.atom1().asA().value() + num_atoms_till_i; - - QPair indices_pair(idx0, idx1); - QPair scl_pair(cscl, ljscl); - custom14pairs.insert(indices_pair, scl_pair); - - special_14 = true; - - if (Debug) - qDebug() << "IDX0 = " << idx0 << " IDX1 =" << idx1 << "14 OpenMM Index"; - } - } // end of variable 1,4 scaling factors - num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; - } // end of loop over molecules - if (Debug) { - if (nions != 0) - qDebug() << "\nNumber of ions = " << nions; - } - - /*** EXCEPTION HANDLING ***/ // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale @@ -2452,7 +1214,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) for (int i = 0; i < num_exceptions; i++) { int p1, p2; - double qprod_diff, qprod_start, qprod_end, qprod_mix; + double qprod_start, qprod_end; double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; double charge_prod, sigma_avg, epsilon_avg; @@ -2476,7 +1238,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) qprod_start = Qstart_p1 * Qstart_p2; qprod_end = Qend_p1 * Qend_p2; - qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; if (Debug) qDebug() << "Exception =" << i << ", p1 =" << p1 << ", p2 =" @@ -2484,196 +1245,23 @@ void OpenMMPMEFEP::initialise(bool fullPME) << ", sigma avg =" << sigma_avg << ", epsilon_avg =" << epsilon_avg; - // run over the 1-4 exceptions - if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) { - QVector perturbed_14_tmp(13); - - double Epstart_p1 = p1_params[2]; - double Epend_p1 = p1_params[3]; - double Sigstart_p1 = p1_params[4]; - double Sigend_p1 = p1_params[5]; - double isHard_p1 = p1_params[6]; - double isTodummy_p1 = p1_params[7]; - double isFromdummy_p1 = p1_params[8]; - - double Epstart_p2 = p2_params[2]; - double Epend_p2 = p2_params[3]; - double Sigstart_p2 = p2_params[4]; - double Sigend_p2 = p2_params[5]; - double isHard_p2 = p2_params[6]; - double isTodummy_p2 = p2_params[7]; - double isFromdummy_p2 = p2_params[8]; - - double sigma_avg_start, sigma_avg_end, sigma_avg_mix; - double epsilon_avg_start, epsilon_avg_end, epsilon_avg_mix; - - double Coulomb14Scale_tmp = Coulomb14Scale; - double LennardJones14Scale_tmp = LennardJones14Scale; - - if (special_14) { - QPair sc_factors; - - QPair indices_pair(p1, p2); - QHash< QPair, QPair >::const_iterator i_pair = - custom14pairs.find(indices_pair); - - if (i_pair != custom14pairs.end()) { - sc_factors = i_pair.value(); - Coulomb14Scale_tmp = sc_factors.first; - LennardJones14Scale_tmp = sc_factors.second; - - if (Debug) - qDebug() << "The pair (" << p1 << ", " << p2 - << ") is 1-4 special no swap pair"; - } - else { - QPair indices_swap_pair(p2, p1); - QHash< QPair, QPair >::const_iterator i_swap_pair = - custom14pairs.find(indices_swap_pair); - - if (i_swap_pair != custom14pairs.end()) { - sc_factors = i_swap_pair.value(); - Coulomb14Scale_tmp = sc_factors.first; - LennardJones14Scale_tmp = sc_factors.second; - - if (Debug) - qDebug() << "The pair (" << p2 << ", " << p1 - << ") is 1-4 special swap pair"; - } - } - } - - qprod_start *= Coulomb14Scale_tmp; - qprod_end *= Coulomb14Scale_tmp; - qprod_mix *= Coulomb14Scale_tmp; - - if (flag_combRules == ARITHMETIC) { - sigma_avg_start = (Sigstart_p1 + Sigstart_p2) / 2.0; - sigma_avg_end = (Sigend_p1 + Sigend_p2) / 2.0; - sigma_avg_mix = (Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2) / 2.0; - } - else if (flag_combRules == GEOMETRIC) { - sigma_avg_start = Sigstart_p1 * Sigstart_p2 ; - sigma_avg_end = Sigend_p1 * Sigend_p2 ; - sigma_avg_mix = Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2 ; - } - - epsilon_avg_start = Epstart_p1 * Epstart_p2 * LennardJones14Scale_tmp * - LennardJones14Scale_tmp; - epsilon_avg_end = Epend_p1 * Epend_p2 * LennardJones14Scale_tmp * - LennardJones14Scale_tmp; - epsilon_avg_mix = (Epend_p1 * Epstart_p2 + Epstart_p1 * Epend_p2) * - LennardJones14Scale_tmp * LennardJones14Scale_tmp; - - // ["qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"] - // see setPerParicleParameters and expressions above - std::vector params(9); - - params[0] = qprod_start; - params[1] = qprod_end; - params[2] = qprod_mix; - params[3] = epsilon_avg_start; - params[4] = epsilon_avg_end; - params[5] = epsilon_avg_mix; - params[6] = sigma_avg_start; - params[7] = sigma_avg_end; - params[8] = sigma_avg_mix; - - if (Debug) { - qDebug() << "Particle p1 = " << p1 << "\nQstart = " << Qstart_p1 << "\nQend = " - << Qend_p1 - << "\nEpstart = " << Epstart_p1 << "\nEpend = " << Epend_p1 - << "\nSgstart = " << Sigstart_p1 << "\nSgend = " << Sigend_p1 - << "\nisHard = " << isHard_p1 << "\nisTodummy = " << isTodummy_p1 << - "\nisFromdummy = " << isFromdummy_p1 << "\n"; - qDebug() << "Particle p2 = " << p2 << "\nQstart = " << Qstart_p2 << "\nQend = " - << Qend_p2 - << "\nEpstart = " << Epstart_p2 << "\nEpend = " << Epend_p2 - << "\nSgstart = " << Sigstart_p2 << "\nSgend = " << Sigend_p2 - << "\nisHard = " << isHard_p2 << "\nisTodummy = " << isTodummy_p2 << - "\nisFromdummy = " << isFromdummy_p2 << "\n"; - - qDebug() << "Product Charge start = " << qprod_start << - "\nProduct Charge end = " << qprod_end << "\nProduct Charge mixed = " << - qprod_mix - << "\nEpsilon average start = " << epsilon_avg_start << - "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << - qprod_mix - << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << - sigma_avg_end; - qDebug() << "Coulombic Scale Factor = " << Coulomb14Scale_tmp << - " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; - } - - if ((isHard_p1 == 1.0 && isHard_p2 == 1.0)) { - custom_intra_14_clj->addBond(p1, p2, params); - - if (Debug) - qDebug() << "Added clj Hard 1-4 exception"; - } - else if ((isTodummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p1 == 1.0 - && isTodummy_p2 == 1.0) || (isHard_p2 == 1.0 && isTodummy_p1 == 1.0)) { - custom_intra_14_todummy->addBond(p1, p2, params); - - if (Debug) - qDebug() << "Added soft TO dummy 1-4 exception"; - } - - else if ((isFromdummy_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p1 == 1.0 - && isFromdummy_p2 == 1.0) || (isHard_p2 == 1.0 && isFromdummy_p1 == 1.0)) { - custom_intra_14_fromdummy->addBond(p1, p2, params); - - if (Debug) - qDebug() << "Added soft FROM dummy 1-4 exception"; - } - - else if ((isFromdummy_p1 == 1.0 && isTodummy_p2 == 1.0) - || (isFromdummy_p2 == 1.0 && isTodummy_p1 == 1.0)) { - custom_intra_14_fromdummy_todummy->addBond(p1, p2, params); - - if (Debug) - qDebug() << "Added soft FROM dummy TO dummy 1-4 exception"; - } - } // 1-4 exceptions - - qprod_diff = qprod_end - qprod_start; - - if (useOffset && qprod_diff != 0.0) { - recip_space->addExceptionParameterOffset("lambda_offset", i, - qprod_diff, 0.0, 0.0); - - if (Debug) - qDebug() << "Adding exception offset for atom idx" << i - << "; qprod_diff =" << qprod_diff; - - } - if (!fullPME) custom_corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); if (Debug) - qDebug() << "Adding qprod_start =" << qprod_start - << "and qprod_end =" << qprod_end - << "to correction term for bond" - << p1 << "-" << p2; + qDebug() << "Adding qprod_start =" << qprod_start + << "and qprod_end =" << qprod_end + << "to correction term for bond" + << p1 << "-" << p2; } // end of loop over exceptions - /*** add non-bonded force fields to System ***/ unsigned int nAtoms = recip_space->getNumParticles(); unsigned int npairs = (nAtoms * (nAtoms - 1)) / 2; - if (Debug) { + if (Debug) qDebug() << "Num pairs = " << npairs; - qDebug() << "Num bonds 1-4 Hard = " << custom_intra_14_clj->getNumBonds(); - qDebug() << "Num bonds 1-4 To Dummy = " << - custom_intra_14_todummy->getNumBonds(); - qDebug() << "Num bonds 1-4 From Dummy = " << - custom_intra_14_fromdummy->getNumBonds(); - qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << - custom_intra_14_fromdummy_todummy->getNumBonds(); - } system_openmm->addForce(recip_space); recip_space->setForceGroup(RECIP_FCG); @@ -2684,8 +1272,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) system_openmm->addForce(direct_space); perturbed_energies_tmp[0] = true; - if (Debug) - qDebug() << "Added 1-5 direct space (PME, LJ):" << general_ff; + qDebug() << "Number of atoms in GENERAL" << direct_space->getNumParticles(); } if (custom_corr_recip->getNumBonds() != 0) { @@ -2693,147 +1280,12 @@ void OpenMMPMEFEP::initialise(bool fullPME) system_openmm->addForce(custom_corr_recip); perturbed_energies_tmp[8] = true; - if (Debug) - qDebug() << "Added reciprocal correction term:" << CORR_RECIP; - } - - if (custom_intra_14_clj->getNumBonds() != 0) { - custom_intra_14_clj->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_clj); - perturbed_energies_tmp[1] = true; - - if (Debug) - qDebug() << "Added 1-4 CLJ:" << intra_14_clj; - } - - if (custom_intra_14_todummy->getNumBonds() != 0) { - custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_todummy); - perturbed_energies_tmp[2] = true; - - if (Debug) - qDebug() << "Added 1-4 To Dummy:" << intra_14_todummy; - } - - if (custom_intra_14_fromdummy->getNumBonds() != 0) { - custom_intra_14_fromdummy->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_fromdummy); - perturbed_energies_tmp[3] = true; - - if (Debug) - qDebug() << "Added 1-4 From Dummy:" << intra_14_fromdummy; - } - - if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) { - custom_intra_14_fromdummy_todummy->setForceGroup(NONBONDED_FCG); - system_openmm->addForce(custom_intra_14_fromdummy_todummy); - perturbed_energies_tmp[4] = true; - - if (Debug) - qDebug() << "Added 1-4 From Dummy To Dummy:" - << intra_14_fromdummy_todummy; - } - } // if (!fullPME) - - - /*** add bonded force fields to System ***/ - - if (bondStretch_openmm->getNumBonds() != 0) { - bondStretch_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondStretch_openmm); - if (Debug) - qDebug() << "Added Internal Bond energy term"; - } - - if (bondBend_openmm->getNumAngles() != 0) { - bondBend_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondBend_openmm); - if (Debug) - qDebug() << "Added Internal Angle energy term"; - } - - if (bondTorsion_openmm->getNumTorsions() != 0) { - bondTorsion_openmm->setForceGroup(BOND_FCG); - system_openmm->addForce(bondTorsion_openmm); - if (Debug) - qDebug() << "Added Internal Torsion energy term"; - } - - if (!fullPME) { - if (solute_bond_perturbation->getNumBonds() != 0) { - solute_bond_perturbation->setForceGroup(BOND_FCG); - system_openmm->addForce(solute_bond_perturbation); - perturbed_energies_tmp[5] = true; //Custom bonded is added to the system - if (Debug) - qDebug() << "Added Perturbed Internal Bond energy term"; - } - - if (solute_angle_perturbation->getNumAngles() != 0) { - solute_angle_perturbation->setForceGroup(BOND_FCG); - system_openmm->addForce(solute_angle_perturbation); - perturbed_energies_tmp[6] = true; //Custom bonded is added to the system - if (Debug) - qDebug() << "Added Perturbed Internal Angle energy term"; + qDebug() << "Number of bonds in CORR" << custom_corr_recip->getNumBonds(); } } // if (!fullPME) perturbed_energies = perturbed_energies_tmp; - // IMPORTANT: PERTURBED ENERGY TORSIONS ARE ADDED ABOVE - bool UseLink_flag = true; - - // Distance Restraint. All the information are stored in the first molecule only. - - if (UseLink_flag) { - Molecule molecule = moleculegroup.moleculeAt(0).molecule(); - - bool haslinkinfo = molecule.hasProperty("linkbonds"); - - if (haslinkinfo) { - std::vector custom_bond_link_par(3); - - Properties linkprop = molecule.property("linkbonds").asA(); - - int nlinks = linkprop.property( - QString("nbondlinks")).asA().toInt(); - - if (Debug) - qDebug() << "Number of constraint links = " << nlinks; - - for (int i = 0; i < nlinks; i++) { - int atomnum0 = linkprop.property(QString("AtomNum0(%1)").arg( - i)).asA().toInt(); - int atomnum1 = linkprop.property(QString("AtomNum1(%1)").arg( - i)).asA().toInt(); - double reql = linkprop.property(QString("reql(%1)").arg( - i)).asA().toDouble(); - double kl = linkprop.property(QString("kl(%1)").arg( - i)).asA().toDouble(); - double dl = linkprop.property(QString("dl(%1)").arg( - i)).asA().toDouble(); - - int openmmindex0 = AtomNumToOpenMMIndex[atomnum0]; - int openmmindex1 = AtomNumToOpenMMIndex[atomnum1]; - - custom_bond_link_par[0] = reql * OpenMM::NmPerAngstrom; //req - custom_bond_link_par[1] = kl * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * - OpenMM::AngstromsPerNm); //k - custom_bond_link_par[2] = dl * OpenMM::NmPerAngstrom; //dl - - if (Debug) { - qDebug() << "atomnum0 = " << atomnum0 << " openmmindex0 =" << openmmindex0; - qDebug() << "atomnum1 = " << atomnum1 << " openmmindex1 =" << openmmindex1; - qDebug() << "Req = " << reql << " kl = " << kl << " dl = " << dl; - } - - custom_link_bond->addBond(openmmindex0, openmmindex1, custom_bond_link_par); - } - - system_openmm->addForce(custom_link_bond); - } - - } // end of bond link flag - this->openmm_system = system_openmm; this->isSystemInitialised = true; } // OpenMMPMEFEP::initialise END From ae7389070d156d5e6c0aa420c0293d62223da205 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Fri, 20 May 2022 10:32:01 +0100 Subject: [PATCH 120/148] fixed indexing issue --- corelib/src/libs/SireMove/openmmpmefep.cpp | 478 +++++---------------- 1 file changed, 107 insertions(+), 371 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 648a77fda..e1988f565 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -774,42 +774,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) qDebug() << "There are" << nats << "atoms. " << "There are" << nmols << "molecules"; - int flag_combRules; - - if (combiningRules == "arithmetic") - flag_combRules = ARITHMETIC; - else if (combiningRules == "geometric") - flag_combRules = GEOMETRIC; - else - throw SireError::program_bug( - QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), - CODELOC); - - bool flag_noperturbedconstraints = false; - int flag_constraint; - bool flag_constraint_water = false; - - if (ConstraintType == "none") - flag_constraint = NONE; - else if (ConstraintType == "hbonds") - flag_constraint = HBONDS; - else if (ConstraintType == "allbonds") - flag_constraint = ALLBONDS; - else if (ConstraintType == "hangles") - flag_constraint = HANGLES; - else if (ConstraintType == "hbonds-notperturbed") { - flag_constraint = HBONDS; - flag_noperturbedconstraints = true; - } - else if (ConstraintType == "none-notwater") { - flag_constraint = NONE; - flag_constraint_water = true; - } - else - throw SireError::program_bug( - QObject::tr("The Constraints method has not been specified." - "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), - CODELOC); // Load Plugins from the OpenMM standard Plugin Directory OpenMM::Platform::loadPluginsFromDirectory( @@ -832,24 +796,23 @@ void OpenMMPMEFEP::initialise(bool fullPME) system_openmm->addForce(cmmotionremover); } - system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), - OpenMM::Vec3(0, 6, 0), - OpenMM::Vec3(0, 0, 6)); + auto recip_space = new OpenMM::NonbondedForce(); + std::vector > bondPairs; const double converted_cutoff_distance = convertTo(cutoff_distance.value(), nanometer); - // HHL - // Use NonbondedForce to compute Ewald reciprocal and self terms - // Direct space and LJ need to be implemented via expressions to - // custom forces, see above - auto recip_space = new OpenMM::NonbondedForce(); + system_openmm->addForce(recip_space); + system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), + OpenMM::Vec3(0, 6, 0), + OpenMM::Vec3(0, 0, 6)); + + recip_space->setForceGroup(RECIP_FCG); recip_space->setNonbondedMethod(OpenMM::NonbondedForce::PME); recip_space->setCutoffDistance(converted_cutoff_distance); recip_space->setIncludeDirectSpace(fullPME); recip_space->setUseDispersionCorrection(false); - // scale the charges in the reciprocal space if (useOffset) { recip_space->addGlobalParameter("lambda_offset", current_lambda); @@ -857,310 +820,123 @@ void OpenMMPMEFEP::initialise(bool fullPME) qDebug() << "Adding lambda offset to reciprocal space"; } - // use default tolerance for the moment - double tolerance_PME = recip_space->getEwaldErrorTolerance(); - - // from NonbondedForceImpl.cpp - double alpha_PME = (1.0 / converted_cutoff_distance) - * std::sqrt(-log(2.0 * tolerance_PME)); - - - /*** NON-BONDED FORCE FIELDS ***/ + auto direct_space = new OpenMM::CustomNonbondedForce(GENERAL_ION); + auto custom_corr_recip = new OpenMM::CustomBondForce(CORR_ION); + QVector perturbed_energies_tmp{false, false, false, false, false, + false, false, false, false}; - /* general force field: direct space Coulomb and LJ */ - auto direct_space = - new OpenMM::CustomNonbondedForce(GENERAL_ION); + if (!fullPME) { + double tolerance_PME = recip_space->getEwaldErrorTolerance(); + double alpha_PME = (1.0 / converted_cutoff_distance) + * std::sqrt(-log(2.0 * tolerance_PME)); - /* correction term for 1-2, 1-3, 1-4 exceptions in reciprocal space */ - auto custom_corr_recip = - new OpenMM::CustomBondForce(CORR_ION); + system_openmm->addForce(direct_space); + perturbed_energies_tmp[0] = true; - if (!fullPME) { - // This ensures that also the direct space is subject to PBC + direct_space->setForceGroup(DIRECT_FCG); direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); direct_space->setCutoffDistance(converted_cutoff_distance); direct_space->addGlobalParameter("lam", current_lambda); - direct_space->addGlobalParameter("delta", shift_delta); - direct_space->addGlobalParameter("n", coulomb_power); direct_space->addGlobalParameter("SPOnOff", 0.0); direct_space->addGlobalParameter("alpha_pme", alpha_PME); addPerParticleParameters(*direct_space, - {"qstart", "qend", "epstart", "epend", - "sigmastart", "sigmaend", "isHD", "isTD", + {"qstart", "qend", "sigmastart", "sigmaend", + "epstart", "epend", "isHD", "isTD", "isFD", "isSolvent"}); + system_openmm->addForce(custom_corr_recip); + custom_corr_recip->setForceGroup(CORR_FCG); + perturbed_energies_tmp[8] = true; + custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); - custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); - custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); } - /*** BUILD OpenMM SYSTEM ***/ - - /* add all atoms to the system */ - for (int i = 0; i < nmols; ++i) { - const int nats_mol = ws.nAtoms(i); - const double *m = ws.massArray(i); - - for (int j = 0; j < nats_mol; ++j) { - system_openmm->addParticle(m[j]); - } - } - int num_atoms_till_i = 0; - QVector perturbed_energies_tmp{false, false, false, false, false, - false, false, false, false}; - - // the default AMBER 1-4 scaling factors - double const Coulomb14Scale = 1.0 / 1.2; - double const LennardJones14Scale = 1.0 / 2.0; - - std::vector > bondPairs; - - // A list of 1,4 atom pairs with non default scale factors - // for each entry, first pair has pair of indices, second has pair of - // scale factors - QHash< QPair, QPair > custom14pairs; + recip_space->addGlobalParameter("lambda_offset", current_lambda); for (int i = 0; i < nmols; i++) { - const Vector *c = ws.coordsArray(i); + const double *m = ws.massArray(i); Molecule molecule = moleculegroup.moleculeAt(i).molecule(); int num_atoms_molecule = molecule.nAtoms(); - std::vector custom_non_bonded_params(10); - - if (Debug) - qDebug() << "Molecule number = " << i << "name =" << molecule.name(); - - // NON BONDED TERMS - - // The atomic parameters - AtomLJs atomvdws = molecule.property("LJ").asA(); + AtomLJs atomvdws = molecule.property("LJ").asA(); AtomCharges atomcharges = molecule.property("charge").asA(); QVector ljparameters = atomvdws.toVector(); QVector charges = atomcharges.toVector(); - QVector start_charges; - QVector final_charges; - QVector start_LJs; - QVector final_LJs; + if (Debug) + qDebug() << "Molecule number = " << i << "name =" << molecule.name(); - if (molecule.hasProperty("perturbations")) { - if (Debug) - qDebug() << " ... molecule is perturbed"; + if (i == 0) { // ion + recip_space->addParticleParameterOffset("lambda_offset", 0, + -1.0, 0.0, 0.0); AtomCharges atomcharges_start = molecule.property("initial_charge").asA(); - AtomCharges atomcharges_final = + AtomCharges atomcharges_end = molecule.property("final_charge").asA(); - start_charges = atomcharges_start.toVector(); - final_charges = atomcharges_final.toVector(); + QVector start_charges = atomcharges_start.toVector(); + QVector final_charges = atomcharges_end.toVector(); - AtomLJs atomvdws_start = molecule.property("initial_LJ").asA(); - AtomLJs atomvdws_final = molecule.property("final_LJ").asA(); + AtomLJs atomvdws_start = molecule.property("initial_LJ").asA(); + AtomLJs atomvdws_end = molecule.property("final_LJ").asA(); - start_LJs = atomvdws_start.toVector(); - final_LJs = atomvdws_final.toVector(); - } + QVector start_LJs = atomvdws_start.toVector(); + QVector final_LJs = atomvdws_end.toVector(); + + double charge_start = start_charges[0].value(); + double charge_end = final_charges[0].value(); + + double sigma_start = start_LJs[0].sigma() * OpenMM::NmPerAngstrom; + double sigma_end = final_LJs[0].sigma() * OpenMM::NmPerAngstrom; + double epsilon_start = start_LJs[0].epsilon() * OpenMM::KJPerKcal; + double epsilon_end = final_LJs[0].epsilon() * OpenMM::KJPerKcal; - int nonbond_idx = 0; - double charge_start = 0.0, charge_final = 0.0; + double charge = charges[0].value(); + double sigma = ljparameters[0].sigma() * OpenMM::NmPerAngstrom; + double epsilon = ljparameters[0].epsilon() * OpenMM::KJPerKcal; - /* add non-bonded parameters to direct and reciprocal spaces - and restraints if applicable */ + system_openmm->addParticle(m[0]); + recip_space->addParticle(charge, sigma, epsilon); - // Iterate over all atoms in the molecules: - // ljparameters.size() is used here as the number of atoms + if (!fullPME) { + direct_space->addParticle({charge_start, charge_end, + sigma_start, sigma_end, epsilon_start, epsilon_end, + 1.0, 0.0, 0.0, 0.0}); + + qDebug() << charge << sigma << epsilon << charge_start + << charge_end << sigma_start << sigma_end + << epsilon_start << epsilon_end; + } + + num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; + + continue; + } + + // TIP3P water atoms for (int j = 0; j < ljparameters.size(); j++) { double charge = charges[j].value(); double sigma = ljparameters[j].sigma() * OpenMM::NmPerAngstrom; double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; - double charge_diff = 0.0; - - nonbond_idx = recip_space->addParticle(charge, sigma, epsilon); - - Atom atom = molecule.molecule().atoms()(j); - - if (molecule.hasProperty("perturbations")) { - // Is atom a hard (changing charge and LJ), from dummy or to dummy type? - bool ishard = false; - bool istodummy = false; - bool isfromdummy = false; - - charge_start = start_charges[j].value(); - charge_final = final_charges[j].value(); - - charge_diff = charge_final - charge_start; - - if (abs(charge_diff) < 0.00001) - charge_diff = 0.0; - - if (useOffset && charge_diff != 0.0) { - // charge = charge_start + lambda_offset * charge_diff - recip_space->addParticleParameterOffset("lambda_offset", - nonbond_idx, - charge_diff, - 0.0, 0.0); // sigma, epsilon not needed - - if (Debug) - qDebug() << "Adding offset to atom idx" << nonbond_idx - << "; charge_diff =" << charge_diff; - } - - double sigma_start = start_LJs[j].sigma() * OpenMM::NmPerAngstrom; - double sigma_final = final_LJs[j].sigma() * OpenMM::NmPerAngstrom; - double epsilon_start = start_LJs[j].epsilon() * OpenMM::KJPerKcal; - double epsilon_final = final_LJs[j].epsilon() * OpenMM::KJPerKcal; - - for (int l = 0; l < solutehard.nViews(); l++) { - Selector view_atoms = solutehard.viewAt(l).atoms(); - - for (int m = 0; m < view_atoms.count(); m++) { - Atom view_atom = view_atoms(m); - - if (atom == view_atom) { - ishard = true; - break; - } - } - - if (ishard) - break; - } - - // if not hard check if to_dummy - if (!ishard) { - for (int l = 0; l < solutetodummy.nViews(); l++) { - Selector view_atoms = solutetodummy.viewAt(l).atoms(); - - for (int m = 0; m < view_atoms.count(); m++) { - Atom view_atom = view_atoms(m); - - if (atom == view_atom) { - istodummy = true; - break; - } - }//end for - if (istodummy) - break; - }//end for - } - - // if not todummy, check if fromdummy - if (!istodummy && !ishard) { - for (int l = 0; l < solutefromdummy.nViews(); l++) { - Selector view_atoms = solutefromdummy.viewAt(l).atoms(); - - for (int m = 0; m < view_atoms.count(); m++) { - Atom view_atom = view_atoms(m); - - if (atom == view_atom) { - isfromdummy = true; - break; - } - }//end for - if (isfromdummy) - break; - }//end for - } - - if (ishard || istodummy || isfromdummy) { - custom_non_bonded_params[0] = charge_start; - custom_non_bonded_params[1] = charge_final; - custom_non_bonded_params[2] = epsilon_start; - custom_non_bonded_params[3] = epsilon_final; - custom_non_bonded_params[4] = sigma_start; - custom_non_bonded_params[5] = sigma_final; - } - else { - // unperturbed atoms - custom_non_bonded_params[0] = charge; - custom_non_bonded_params[1] = charge; - custom_non_bonded_params[2] = epsilon; - custom_non_bonded_params[3] = epsilon; - custom_non_bonded_params[4] = sigma; - custom_non_bonded_params[5] = sigma; - } - - custom_non_bonded_params[6] = 0.0; // isHard - custom_non_bonded_params[7] = 0.0; // isTodummy - custom_non_bonded_params[8] = 0.0; // isFromdummy - custom_non_bonded_params[9] = 0.0; // isSolventProtein - - if (ishard) { - custom_non_bonded_params[6] = 1.0; - - if (Debug) - qDebug() << "hard solute = " << atom.index(); - } - // JM July 13 THIS NEEDS FIXING TO DEAL WITH GROUPS THAT CONTAIN MORE THAN ONE MOLECULE - else if (istodummy) { - custom_non_bonded_params[7] = 1.0; - - if (Debug) - qDebug() << "to dummy solute = " << atom.index(); - } - else if (isfromdummy) { - custom_non_bonded_params[8] = 1.0; - - if (Debug) - qDebug() << "from dummy solute = " << atom.index(); - } - else { - custom_non_bonded_params[6] = 1.0; // isHard - - if (Debug) - qDebug() << " unperturbed solute atom " << atom.index(); - } - } - else { - // solvent atom like hard - custom_non_bonded_params[0] = charge; - custom_non_bonded_params[1] = charge; - custom_non_bonded_params[2] = epsilon; - custom_non_bonded_params[3] = epsilon; - custom_non_bonded_params[4] = sigma; - custom_non_bonded_params[5] = sigma; - custom_non_bonded_params[6] = 1.0; // isHard - custom_non_bonded_params[7] = 0.0; // isTodummy - custom_non_bonded_params[8] = 0.0; // isFromdummy - custom_non_bonded_params[9] = 1.0; // isSolventProtein - - if (Debug) - qDebug() << "Solvent = " << atom.index(); - } // end if perturbations - if (Debug) { - qDebug() << "Charge start = " << custom_non_bonded_params[0]; - qDebug() << "Charge end = " << custom_non_bonded_params[1]; - qDebug() << "Eps start = " << custom_non_bonded_params[2]; - qDebug() << "Eps end = " << custom_non_bonded_params[3]; - qDebug() << "Sig start = " << custom_non_bonded_params[4]; - qDebug() << "Sig end = " << custom_non_bonded_params[5]; - qDebug() << "is Hard = " << custom_non_bonded_params[6]; - qDebug() << "is To dummy = " << custom_non_bonded_params[7]; - qDebug() << "is From dummy = " << custom_non_bonded_params[8]; - qDebug() << "is Solvent = " << custom_non_bonded_params[9] << "\n"; - } - - // Adds the custom parmaters to _all_ atoms - // Must be in the same order as in the System - if (!fullPME) - direct_space->addParticle(custom_non_bonded_params); - } + system_openmm->addParticle(m[j]); + recip_space->addParticle(charge, sigma, epsilon); - // single atoms like ions - if (!molecule.hasProperty("connectivity")) { - num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; - continue; + if (!fullPME) { + direct_space->addParticle({charge, charge, sigma, sigma, + epsilon, epsilon, 1.0, 0.0, 0.0, 1.0}); + qDebug() << charge << sigma << epsilon; + } } // The bonded parameters are stored in "amberparameters" @@ -1168,9 +944,8 @@ void OpenMMPMEFEP::initialise(bool fullPME) molecule.property("amberparameters").asA(); QList bonds_ff = amber_params.getAllBonds(); QVector bonds = bonds_ff.toVector(); - ResName molfirstresname = molecule.residues()(0).name(); - // Bonds + // TIP3P water bonds for (int j = 0; j < bonds_ff.length(); j++) { BondID bond_ff = bonds_ff[j]; QList bond_params = amber_params.getParams(bond_ff); @@ -1179,7 +954,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) int idx0 = bonds[j].atom0().asA().value(); int idx1 = bonds[j].atom1().asA().value(); - //Select the atom type QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); @@ -1192,100 +966,62 @@ void OpenMMPMEFEP::initialise(bool fullPME) qDebug() << "Adding constraint to atoms" << idx0 << "and" << idx1 << "with distance" << r0; - // Bond exclusion List bondPairs.push_back(std::make_pair(idx0, idx1)); } num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; } // end of loop over molecules - /*** EXCEPTION HANDLING ***/ - - // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale - // down 1-4 bonded atoms - recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, - LennardJones14Scale); - - int num_exceptions = recip_space->getNumExceptions(); + recip_space->createExceptionsFromBonds(bondPairs, 1.0 / 1.2, 0.5); - if (Debug) - qDebug() << "Number of exceptions =" << num_exceptions; - - for (int i = 0; i < num_exceptions; i++) { - int p1, p2; + if (!fullPME) { + int p1, p2; + std::vector p1_params(10); + std::vector p2_params(10); + double charge_prod, sigma_avg, epsilon_avg; double qprod_start, qprod_end; double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; - double charge_prod, sigma_avg, epsilon_avg; - std::vector p1_params(10); - std::vector p2_params(10); + int num_exceptions = recip_space->getNumExceptions(); - recip_space->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, - epsilon_avg); + if (Debug) + qDebug() << "Number of exceptions =" << num_exceptions; + + for (int i = 0; i < num_exceptions; i++) { + recip_space->getExceptionParameters(i, p1, p2, charge_prod, sigma_avg, + epsilon_avg); - if (!fullPME) { direct_space->addExclusion(p1, p2); direct_space->getParticleParameters(p1, p1_params); direct_space->getParticleParameters(p2, p2_params); - } - Qstart_p1 = p1_params[0]; - Qend_p1 = p1_params[1]; - Qstart_p2 = p2_params[0]; - Qend_p2 = p2_params[1]; + Qstart_p1 = p1_params[0]; + Qend_p1 = p1_params[1]; + Qstart_p2 = p2_params[0]; + Qend_p2 = p2_params[1]; - qprod_start = Qstart_p1 * Qstart_p2; - qprod_end = Qend_p1 * Qend_p2; + qprod_start = Qstart_p1 * Qstart_p2; + qprod_end = Qend_p1 * Qend_p2; - if (Debug) - qDebug() << "Exception =" << i << ", p1 =" << p1 << ", p2 =" - << p2 << ", charge prod =" << charge_prod - << ", sigma avg =" << sigma_avg << ", epsilon_avg =" - << epsilon_avg; + if (Debug) + qDebug() << "Exception =" << i << ", p1 =" << p1 << ", p2 =" + << p2 << ", charge prod =" << charge_prod + << ", sigma avg =" << sigma_avg << ", epsilon_avg =" + << epsilon_avg; - if (!fullPME) custom_corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); - if (Debug) - qDebug() << "Adding qprod_start =" << qprod_start - << "and qprod_end =" << qprod_end - << "to correction term for bond" - << p1 << "-" << p2; + if (Debug) + qDebug() << "Adding qprod_start =" << qprod_start + << "and qprod_end =" << qprod_end + << "to correction term for bond" + << p1 << "-" << p2; + } } // end of loop over exceptions - /*** add non-bonded force fields to System ***/ - - unsigned int nAtoms = recip_space->getNumParticles(); - unsigned int npairs = (nAtoms * (nAtoms - 1)) / 2; - - if (Debug) - qDebug() << "Num pairs = " << npairs; - - system_openmm->addForce(recip_space); - recip_space->setForceGroup(RECIP_FCG); - - if (!fullPME) { - if (npairs != num_exceptions) { - direct_space->setForceGroup(DIRECT_FCG); - system_openmm->addForce(direct_space); - perturbed_energies_tmp[0] = true; - - qDebug() << "Number of atoms in GENERAL" << direct_space->getNumParticles(); - } - - if (custom_corr_recip->getNumBonds() != 0) { - custom_corr_recip->setForceGroup(CORR_FCG); - system_openmm->addForce(custom_corr_recip); - perturbed_energies_tmp[8] = true; - - qDebug() << "Number of bonds in CORR" << custom_corr_recip->getNumBonds(); - } - } // if (!fullPME) - perturbed_energies = perturbed_energies_tmp; - this->openmm_system = system_openmm; this->isSystemInitialised = true; } // OpenMMPMEFEP::initialise END From 842787af6ee7ac275d3425fb1d240920f6498192 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sat, 21 May 2022 08:49:25 +0100 Subject: [PATCH 121/148] code rearrangement --- corelib/src/libs/SireMove/openmmpmefep.cpp | 26 ++++++++++------------ 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e1988f565..888926c85 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -814,7 +814,11 @@ void OpenMMPMEFEP::initialise(bool fullPME) recip_space->setUseDispersionCorrection(false); if (useOffset) { + // NOTE: without offset and if lambda_offset is set to 0.0 here then + // the same starting energies as in initialise_ion result recip_space->addGlobalParameter("lambda_offset", current_lambda); + recip_space->addParticleParameterOffset("lambda_offset", 0, + -1.0, 0.0, 0.0); if (Debug) qDebug() << "Adding lambda offset to reciprocal space"; @@ -858,8 +862,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) int num_atoms_till_i = 0; - recip_space->addGlobalParameter("lambda_offset", current_lambda); - for (int i = 0; i < nmols; i++) { const double *m = ws.massArray(i); @@ -876,9 +878,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) qDebug() << "Molecule number = " << i << "name =" << molecule.name(); if (i == 0) { // ion - recip_space->addParticleParameterOffset("lambda_offset", 0, - -1.0, 0.0, 0.0); - AtomCharges atomcharges_start = molecule.property("initial_charge").asA(); AtomCharges atomcharges_end = @@ -912,10 +911,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) direct_space->addParticle({charge_start, charge_end, sigma_start, sigma_end, epsilon_start, epsilon_end, 1.0, 0.0, 0.0, 0.0}); - - qDebug() << charge << sigma << epsilon << charge_start - << charge_end << sigma_start << sigma_end - << epsilon_start << epsilon_end; } num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; @@ -935,7 +930,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) if (!fullPME) { direct_space->addParticle({charge, charge, sigma, sigma, epsilon, epsilon, 1.0, 0.0, 0.0, 1.0}); - qDebug() << charge << sigma << epsilon; } } @@ -1356,7 +1350,8 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; qDebug() << "Total energy before minimisation:" << Epot - << "kcal/mol at lambda =" << current_lambda; + << "kcal/mol at lambda =" + << openmm_context->getParameter("lambda_offset"); const OpenMM::State state1 = openmm_context->getState (OpenMM::State::Energy, false, 1 << RECIP_FCG); @@ -1415,7 +1410,8 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, MolarEnergy Epot = state_openmm.getPotentialEnergy() * kJ_per_mol; qDebug() << "Total energy after minimisation:" << Epot - << "kcal/mol at lambda =" << current_lambda; + << "kcal/mol at lambda =" + << openmm_context->getParameter("lambda_offset"); } // Step 4 delete the context @@ -1838,7 +1834,8 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) if (perturbed_energies[0]) { openmm_context->setParameter("lam", lambda); // 1-5 HD - if (Debug) qDebug() << "Updating direct space lambda tp" << lambda; + if (Debug) + qDebug() << "Updating direct space lambda tp" << lambda; } // reciprocal space corrections for 1-2, 1-3 and scaled 1-4 @@ -1873,7 +1870,8 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) openmm_context->setParameter("lambda_offset", lambda); if (Debug) - qDebug() << "Updating lambda_offset to" << lambda; + qDebug() << "Updating lambda_offset to" << lambda + << openmm_context->getParameter("lambda_offset"); } } From 2d0170fc252557bb15c9f7ae7c4ddbd4d424f71a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sat, 21 May 2022 09:52:53 +0100 Subject: [PATCH 122/148] found the offending code on line 905! --- corelib/src/libs/SireMove/openmmpmefep.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 888926c85..74c95d5f8 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -900,7 +900,12 @@ void OpenMMPMEFEP::initialise(bool fullPME) double epsilon_start = start_LJs[0].epsilon() * OpenMM::KJPerKcal; double epsilon_end = final_LJs[0].epsilon() * OpenMM::KJPerKcal; - double charge = charges[0].value(); + // FIXME: this is the offending line + // for some reason we cannot use charges[0].value() directly + double charge = 1.0; //charges[0].value(); + qDebug() << "Ion charge: hardcoded =" << charge + << "Sire =" << charges[0].value(); + double sigma = ljparameters[0].sigma() * OpenMM::NmPerAngstrom; double epsilon = ljparameters[0].epsilon() * OpenMM::KJPerKcal; From c40200c01f8fe27e0afe1d63eb952c64ab8b7a5f Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sat, 21 May 2022 10:35:42 +0100 Subject: [PATCH 123/148] output type of charges[0].value() --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 74c95d5f8..4423cf3df 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -905,6 +905,8 @@ void OpenMMPMEFEP::initialise(bool fullPME) double charge = 1.0; //charges[0].value(); qDebug() << "Ion charge: hardcoded =" << charge << "Sire =" << charges[0].value(); + qDebug() << "'charges[0].value()' is of type" + << typeid(charges[0].value()).name(); double sigma = ljparameters[0].sigma() * OpenMM::NmPerAngstrom; double epsilon = ljparameters[0].epsilon() * OpenMM::KJPerKcal; From e1ec381ac8b53c46cd226bf7f2feff843597179b Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sun, 22 May 2022 09:51:58 +0100 Subject: [PATCH 124/148] use initial charge --- corelib/src/libs/SireMove/openmmpmefep.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4423cf3df..a561a1bf3 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -902,17 +902,11 @@ void OpenMMPMEFEP::initialise(bool fullPME) // FIXME: this is the offending line // for some reason we cannot use charges[0].value() directly - double charge = 1.0; //charges[0].value(); - qDebug() << "Ion charge: hardcoded =" << charge - << "Sire =" << charges[0].value(); - qDebug() << "'charges[0].value()' is of type" - << typeid(charges[0].value()).name(); - double sigma = ljparameters[0].sigma() * OpenMM::NmPerAngstrom; double epsilon = ljparameters[0].epsilon() * OpenMM::KJPerKcal; system_openmm->addParticle(m[0]); - recip_space->addParticle(charge, sigma, epsilon); + recip_space->addParticle(charge_start, sigma, epsilon); if (!fullPME) { direct_space->addParticle({charge_start, charge_end, From 401edf17b1dc76ef1be42a79f4046d34559d04d0 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sun, 22 May 2022 09:53:38 +0100 Subject: [PATCH 125/148] Revert "cut down initialsation code to bare essentials" This reverts commit 39271522140d6b777175316389a2cbeb62d45757. --- corelib/src/libs/SireMove/openmmpmefep.cpp | 1630 +++++++++++++++++++- 1 file changed, 1589 insertions(+), 41 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 648a77fda..27d19916d 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -470,9 +470,154 @@ void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) } +// General force field +// HHL +// FIXME: disable SPOnOff and see if it works with PME +// +// NOTE: There is one single namespace for global parameters but each parameter +// must added to the force it is used in. This is relevant for all +// global lambdas below because they need to be changed during MD. +// Cutoff, delta and n could use a single name each as they are constant +// throughout the simulation. + +#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? +//#define COULOMB_SHIFT "rCoul = r;" + +// Direct space PME and LJ +tmpl_str OpenMMPMEFEP::GENERAL = + "(1.0 - isSolvent1 * isSolvent2 * SPOnOff) * (U_direct + U_LJ);" + + // need to subtract scaled 1-4 interactions with erf() because those are + // computed in reciprocal space, the same for 1-2 and 1-3 + "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + COULOMB_SHIFT + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = delta*sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lambda) * 0.1;" // 0.1 to convert to nm + "lambda = Logic_lam * lam + Logic_om_lam * (1.0-lam) + Logic_hard;" + + "Logic_hard = isHD1 * isHD2 * (1.0-isTD1) * (1.0-isTD2) * (1.0-isFD1) * (1.0-isFD2);" + "Logic_om_lam = max((1.0-isHD1)*(1.0-isHD2)*isTD1*isTD2*(1.0-isFD1)*(1.0-isFD2), B_om_lam);" + "B_om_lam = max(isHD1*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), C_om_lam);" + "C_om_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2), D_om_lam);" + "D_om_lam = max((1.0-isHD1)*isHD2*isTD1*(1.0-isTD2)*(1.0-isFD1)*(1.0-isFD2), E_om_lam);" + "E_om_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*isTD2*(1.0-isFD1)*(1.0-isFD2);" + "Logic_lam = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*isFD2, B_lam);" + "B_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), C_lam);" + "C_lam = max(isHD1*(1.0-isHD2)*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2, D_lam);" + "D_lam = max((1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*isFD1*(1.0-isFD2), E_lam);" + "E_lam = (1.0-isHD1)*isHD2*(1.0-isTD1)*(1.0-isTD2)*(1.0-isFD1)*isFD2;" + "B_mix = max((1.0-isHD1)*(1.0-isHD2)*isTD1*(1.0-isTD2)*(1.0-isFD1)*isFD2, C_mix);" + "C_mix = max((1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*isFD1*(1.0-isFD2), D_mix);" + "D_mix= (1.0-isHD1)*(1.0-isHD2)*(1.0-isTD1)*isTD2*(1.0-isFD1)*isFD2;" + + "q_prod = (qend1*lam + (1.0-lam)*qstart1) * (qend2*lam + (1.0-lam)*qstart2);" + "eps_avg = sqrt((epend1*lam+(1.0-lam)*epstart1)*(epend2*lam+(1.0-lam)*epstart2));" + "sigma_avg="; +tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { + "0.5*((sigmaend1*lam+(1.0-lam)*sigmastart1)+(sigmaend2*lam+(1.0-lam)*sigmastart2));", + "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" +}; + +// subtract 1-2, 1-3 and 1-4 interactions that have been calculated in reciprocal space +tmpl_str OpenMMPMEFEP::CORR_RECIP = + // cutoff shouldn't be needed because 1-4 should be shorter than cutoff + "-U_corr * withinCutoff;" + "withinCutoff = step(cutoff - r);" + + // erf() instead of erfc(), see PME implementation in OpenMM + "U_corr = 138.935456 * q_prod * erf(alpha_pme*r) / r;" + + "q_prod = lam_corr*qcend + (1-lam_corr)*qcstart;"; // this is symmetrical + +// 1-4 term for shrinking atoms +// NOTE: passed-in lambda (lamtd) is 1-lambda +tmpl_str OpenMMPMEFEP::TODUMMY = + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff = step(cutofftd - r);" + + "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + COULOMB_SHIFT + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = deltatd*sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lamtd) * 0.1;" + "eps_avg = sqrt((1-lamtd)*(1-lamtd)*eaend + lamtd*lamtd*eastart + lamtd*(1-lamtd)*emix);" + "q_prod = (1-lamtd)*(1-lamtd)*qpend + lamtd*lamtd*qpstart + lamtd*(1-lamtd)*qmix;" + "sigma_avg="; +tmpl_str OpenMMPMEFEP::TODUMMY_SIGMA[2] = { + "(1-lamtd)*saend + lamtd*sastart;", + "sqrt((1-lamtd)*(1-lamtd)*saend + lamtd*lamtd*sastart + lamtd*(1-lamtd)*samix);" +}; + +// 1-4 term for growing atoms +tmpl_str OpenMMPMEFEP::FROMDUMMY = + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff=step(cutofffd - r);" + + "U_direct = %1 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + COULOMB_SHIFT + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = deltafd*sigma_avg*lam_diff + r*r;" + + "lam_diff = (1.0 - lamfd) * 0.1;" + "eps_avg = sqrt(lamfd*lamfd*eaend + (1-lamfd)*(1-lamfd)*eastart + lamfd*(1-lamfd)*emix);" + "q_prod = lamfd*lamfd*qpend + (1-lamfd)*(1-lamfd)*qpstart + lamfd*(1-lamfd)*qmix;" + "sigma_avg="; +tmpl_str OpenMMPMEFEP::FROMDUMMY_SIGMA[2] = { + "lamfd*saend + (1-lamfd)*sastart;", + "sqrt(lamfd*lamfd*saend + (1-lamfd)*(1-lamfd)*sastart + lamfd*(1-lamfd)*samix);" +}; + +// 1-4 term between shrinking and growing atoms +tmpl_str OpenMMPMEFEP::FROMTODUMMY = + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff = step(cutoffftd - r);" + + "U_direct = 138.935456 * q_prod * erfc(alpha_pme*rCoul) / rCoul;" + COULOMB_SHIFT + + "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" + "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" + "rLJ = deltaftd*sigma_avg*0.1 + r*r;" + + "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" + "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" + "sigma_avg="; +tmpl_str OpenMMPMEFEP::FROMTODUMMY_SIGMA[2] = { + "lamftd*saend + (1-lamftd)*sastart;", + "sqrt(lamftd*lamftd*saend + (1-lamftd)*(1-lamftd)*sastart + lamftd*(1-lamftd)*samix);" +}; + +// standard 1-4 Coulomb and LJ terms, scaling is done per each exception below +tmpl_str OpenMMPMEFEP::INTRA_14_CLJ = + "withinCutoff*(U_direct + U_LJ);" + "withinCutoff = step(cutoffhd - r);" + + "U_direct = 138.935456 * q_prod * erfc(alpha_pme*r) / r;" // no lambda^n, no shift + + "U_LJ = 4.0 * eps_avg * ((sigma_avg/r)^12 - (sigma_avg/r)^6);" // no shift + + "eps_avg = sqrt(lamhd*lamhd*eaend + (1-lamhd)*(1-lamhd)*eastart + lamhd*(1-lamhd)*emix);" + "q_prod = lamhd*lamhd*qpend + (1-lamhd)*(1-lamhd)*qpstart + lamhd*(1-lamhd)*qmix;" + "sigma_avg="; +tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { + "lamhd*saend + (1-lamhd)*sastart;", + "sqrt(lamhd*lamhd*saend + (1-lamhd)*(1-lamhd)*sastart + lamhd*(1-lamhd)*samix);" +}; + + // NOTE: only for debugging with simple non-dummy systems like ions const bool useOffset = true; // use true for production + /* A simple system of an ion in a water box. This is really for debugging purposes only and assumes that the parm7 and rst7 file are describing @@ -517,9 +662,6 @@ void OpenMMPMEFEP::initialise_ion(bool fullPME, bool doCharge) qDebug() << "There are" << nats << "atoms. " << "There are" << nmols << "molecules"; - OpenMM::Platform::loadPluginsFromDirectory( - OpenMM::Platform::getDefaultPluginsDirectory()); - auto system = new OpenMM::System(); if (Andersen_flag) @@ -692,8 +834,8 @@ void OpenMMPMEFEP::initialise_ion(bool fullPME, bool doCharge) if (!fullPME) { int p1, p2; - std::vector p1_params(10); - std::vector p2_params(10); + std::vector p1_params(6); + std::vector p2_params(6); double charge_prod, sigma_avg, epsilon_avg; double qprod_start, qprod_end; @@ -785,6 +927,9 @@ void OpenMMPMEFEP::initialise(bool fullPME) QObject::tr("The combining rules have not been specified. Possible choises: arithmetic, geometric"), CODELOC); + if (Debug) + qDebug() << "combiningRules =" << combiningRules; + bool flag_noperturbedconstraints = false; int flag_constraint; bool flag_constraint_water = false; @@ -811,6 +956,9 @@ void OpenMMPMEFEP::initialise(bool fullPME) "Possible choises: none, hbonds, allbonds, hangles, hbonds-notperturbed, none-notwater"), CODELOC); + if (Debug) + qDebug() << "Constraint Type =" << ConstraintType; + // Load Plugins from the OpenMM standard Plugin Directory OpenMM::Platform::loadPluginsFromDirectory( OpenMM::Platform::getDefaultPluginsDirectory()); @@ -830,6 +978,10 @@ void OpenMMPMEFEP::initialise(bool fullPME) auto cmmotionremover = new OpenMM::CMMotionRemover(CMMremoval_frequency); system_openmm->addForce(cmmotionremover); + + if (Debug) + qDebug() << "\nWill remove Center of Mass motion every" << + CMMremoval_frequency << "steps\n"; } system_openmm->setDefaultPeriodicBoxVectors(OpenMM::Vec3(6, 0, 0), @@ -864,55 +1016,321 @@ void OpenMMPMEFEP::initialise(bool fullPME) double alpha_PME = (1.0 / converted_cutoff_distance) * std::sqrt(-log(2.0 * tolerance_PME)); + if (Debug) { + qDebug() << "PME alpha =" << alpha_PME + << "computed from PME error tolerance =" << tolerance_PME; + } /*** NON-BONDED FORCE FIELDS ***/ + QString lam_pre = ""; + /* general force field: direct space Coulomb and LJ */ + + // This check is necessary to avoid nan errors on the GPU platform caused + // by the calculation of 0^0 + if (coulomb_power > 0) + lam_pre = "(lambda^n) *"; + + QString general_ff = GENERAL.arg(lam_pre); + general_ff.append(GENERAL_SIGMA[flag_combRules]); + auto direct_space = - new OpenMM::CustomNonbondedForce(GENERAL_ION); + new OpenMM::CustomNonbondedForce(general_ff.toStdString()); /* correction term for 1-2, 1-3, 1-4 exceptions in reciprocal space */ auto custom_corr_recip = - new OpenMM::CustomBondForce(CORR_ION); + new OpenMM::CustomBondForce(CORR_RECIP.toStdString()); if (!fullPME) { - // This ensures that also the direct space is subject to PBC - direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - direct_space->setCutoffDistance(converted_cutoff_distance); + // This ensures that also the direct space is subject to PBC + direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); + direct_space->setCutoffDistance(converted_cutoff_distance); + + direct_space->addGlobalParameter("lam", current_lambda); + direct_space->addGlobalParameter("delta", shift_delta); + direct_space->addGlobalParameter("n", coulomb_power); + direct_space->addGlobalParameter("SPOnOff", 0.0); + direct_space->addGlobalParameter("alpha_pme", alpha_PME); + + addPerParticleParameters(*direct_space, + {"qstart", "qend", "epstart", "epend", + "sigmastart", "sigmaend", "isHD", "isTD", + "isFD", "isSolvent"}); + + custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); + custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); + custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); + custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); + + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); + } - direct_space->addGlobalParameter("lam", current_lambda); - direct_space->addGlobalParameter("delta", shift_delta); - direct_space->addGlobalParameter("n", coulomb_power); - direct_space->addGlobalParameter("SPOnOff", 0.0); - direct_space->addGlobalParameter("alpha_pme", alpha_PME); + if (coulomb_power > 0) + lam_pre = "(lamtd^ntd) *"; - addPerParticleParameters(*direct_space, - {"qstart", "qend", "epstart", "epend", - "sigmastart", "sigmaend", "isHD", "isTD", - "isFD", "isSolvent"}); + /* to dummy force field */ + + QString intra_14_todummy = TODUMMY.arg(lam_pre); + intra_14_todummy.append(TODUMMY_SIGMA[flag_combRules]); + + auto custom_intra_14_todummy = + new OpenMM::CustomBondForce(intra_14_todummy.toStdString()); + custom_intra_14_todummy->addGlobalParameter("lamtd", 1.0-current_lambda); + custom_intra_14_todummy->addGlobalParameter("deltatd", shift_delta); + custom_intra_14_todummy->addGlobalParameter("ntd", coulomb_power); + custom_intra_14_todummy->addGlobalParameter("cutofftd", + converted_cutoff_distance); + custom_intra_14_todummy->addGlobalParameter("alpha_pme", alpha_PME); + + if (coulomb_power > 0) + lam_pre = "(lamfd^nfd) *"; + + /* from dummy force field */ + + QString intra_14_fromdummy = FROMDUMMY.arg(lam_pre); + intra_14_fromdummy.append(FROMDUMMY_SIGMA[flag_combRules]); + + auto custom_intra_14_fromdummy = + new OpenMM::CustomBondForce(intra_14_fromdummy.toStdString()); + custom_intra_14_fromdummy->addGlobalParameter("lamfd", current_lambda); + custom_intra_14_fromdummy->addGlobalParameter("deltafd", shift_delta); + custom_intra_14_fromdummy->addGlobalParameter("nfd", coulomb_power); + custom_intra_14_fromdummy->addGlobalParameter("cutofffd", + converted_cutoff_distance); + custom_intra_14_fromdummy->addGlobalParameter("alpha_pme", alpha_PME); - custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); - custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); - custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); - custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); + /* from and to dummy force field */ - addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); + auto intra_14_fromdummy_todummy = QString(FROMTODUMMY); + intra_14_fromdummy_todummy.append(FROMTODUMMY_SIGMA[flag_combRules]); + + auto custom_intra_14_fromdummy_todummy = + new OpenMM::CustomBondForce(intra_14_fromdummy_todummy.toStdString()); + + custom_intra_14_fromdummy_todummy->addGlobalParameter("lamftd", + current_lambda); + custom_intra_14_fromdummy_todummy->addGlobalParameter("deltaftd", shift_delta); + custom_intra_14_fromdummy_todummy->addGlobalParameter("nftd", coulomb_power); + custom_intra_14_fromdummy_todummy->addGlobalParameter("cutoffftd", + converted_cutoff_distance); + custom_intra_14_fromdummy_todummy->addGlobalParameter("alpha_pme", alpha_PME); + + /* hard, perturbed atom force field */ + + QString intra_14_clj(INTRA_14_CLJ); + intra_14_clj.append(INTRA_14_CLJ_SIGMA[flag_combRules]); + + auto custom_intra_14_clj = + new OpenMM::CustomBondForce(intra_14_clj.toStdString()); + + custom_intra_14_clj->addGlobalParameter("lamhd", current_lambda); + custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); + custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); + + std::vector paramList = { + "qpstart", "qpend", "qmix", "eastart", "eaend", "emix", + "sastart", "saend", "samix" + }; + addPerBondParameters(*custom_intra_14_todummy, paramList); + addPerBondParameters(*custom_intra_14_fromdummy, paramList); + addPerBondParameters(*custom_intra_14_fromdummy_todummy, paramList); + addPerBondParameters(*custom_intra_14_clj, paramList); + + if (Debug) { + qDebug() << "\nCutoff type = " << CutoffType; + qDebug() << "CutOff distance = " << converted_cutoff_distance << " Nm"; + qDebug() << "Dielectric constant = " << field_dielectric; + qDebug() << "Lambda = " << current_lambda << " Coulomb Power = " << + coulomb_power << " Delta Shift = " << shift_delta; } + + /*** BONDED FORCE FIELDS ***/ + + auto bondStretch_openmm = new OpenMM::HarmonicBondForce(); + auto bondBend_openmm = new OpenMM::HarmonicAngleForce(); + auto bondTorsion_openmm = new OpenMM::PeriodicTorsionForce(); + + auto solute_bond_perturbation = new OpenMM::CustomBondForce( + "0.5*B*(r-req)^2;" + "B=bend*lambond+(1.0-lambond)*bstart;" + "req=rend*lambond+(1.0-lambond)*rstart"); + + solute_bond_perturbation->addGlobalParameter("lambond", current_lambda); + addPerBondParameters(*solute_bond_perturbation, + {"bstart", "bend", "rstart", "rend"}); + + + auto solute_angle_perturbation = new OpenMM::CustomAngleForce( + "0.5*A*(theta-thetaeq)^2;" + "A=aend*lamangle+(1.0-lamangle)*astart;" + "thetaeq=thetaend*lamangle+(1.0-lamangle)*thetastart"); + + solute_angle_perturbation->addGlobalParameter("lamangle", current_lambda); + addPerAngleParameters(*solute_angle_perturbation, + {"astart", "aend", "thetastart", "thetaend"}); + + + /*** RESTRAINTS ***/ + + OpenMM::CustomExternalForce *positionalRestraints_openmm = NULL; + + if (Restraint_flag) { + positionalRestraints_openmm = new OpenMM::CustomExternalForce + ( + "k*d2;" + "d2 = max(0.0, d1 - d^2);" + "d1 = (x-xref)^2 + (y-yref)^2 + (z-zref)^2" + ); + positionalRestraints_openmm->addPerParticleParameter("xref"); + positionalRestraints_openmm->addPerParticleParameter("yref"); + positionalRestraints_openmm->addPerParticleParameter("zref"); + positionalRestraints_openmm->addPerParticleParameter("k"); + positionalRestraints_openmm->addPerParticleParameter("d"); + + system_openmm->addForce(positionalRestraints_openmm); + + if (Debug) + qDebug() << "\n\nRestraint is ON\n\n"; + } + + /*** BOND LINK FORCE FIELD ***/ + /* NOTE: CustomBondForce does not (OpenMM 6.2) apply PBC checks so code will be buggy if + restraints involve one atom that diffuses out of the box. */ + + auto custom_link_bond = + new OpenMM::CustomBondForce("kl * max(0, d - dl*dl);" + "d = (r-reql) * (r-reql)"); + custom_link_bond->addPerBondParameter("reql"); + custom_link_bond->addPerBondParameter("kl"); + custom_link_bond->addPerBondParameter("dl"); + + /*** BUILD OpenMM SYSTEM ***/ + int system_index = 0; + + // To avoid possible mismatch between the index in which atoms are added to the openmm system arrays and + // their atomic numbers in sire, one array is populated while filling up the openmm global arrays + QHash AtomNumToOpenMMIndex; + /* add all atoms to the system */ + for (int i = 0; i < nmols; ++i) { const int nats_mol = ws.nAtoms(i); + const double *m = ws.massArray(i); + MolNum molnum = moleculegroup.molNumAt(i); + + const ViewsOfMol &molview = moleculegroup[molnum].data(); + + const Molecule &mol = molview.molecule(); + + Selector molatoms = mol.atoms(); + for (int j = 0; j < nats_mol; ++j) { + // This adds each atom to the system via its mass + // JM 10/16 make sure that perturbed atoms have mass of heaviest + // end-state system_openmm->addParticle(m[j]); - } - } + + Atom at = molatoms(j); + AtomNum atnum = at.number(); + + if (Debug) + qDebug() << "openMM_index" << system_index + << "Sire Atom Number" << atnum.toString() + << "Mass particle =" << m[j]; + + AtomNumToOpenMMIndex[atnum.value()] = system_index; + + // JM Nov 12 + // The code below implements a ThreeParticleAverageSite for virtual + // sites for EPW atoms present in a WAT residue + // This is very AMBER specific. + + AtomName atname = at.name(); + ResName resname = at.residue().name(); + + if (Debug) + qDebug() << " atname " << atname.value() << " mol " << i; + + if (atname == AtomName("EPW") && resname == ResName("WAT")) { + Atom oatom = molatoms.select(AtomName("O")); + Atom h1atom = molatoms.select(AtomName("H1")); + Atom h2atom = molatoms.select(AtomName("H2")); + + AmberParameters amber_params = + mol.property("amberparameters").asA(); + QList bonds_ff = amber_params.getAllBonds(); + + double distoh = -1.0; + double disthh = -1.0; + double distoe = -1.0; + + for (int k = 0; k < bonds_ff.length(); k++) { + BondID bond_ff = bonds_ff[k]; + QList bond_params = amber_params.getParams(bond_ff); + + double r0 = bond_params[1]; + + AtomName at0name = mol.select(bond_ff.atom0()).name(); + AtomName at1name = mol.select(bond_ff.atom1()).name(); + + if ((at0name == AtomName("O") and at1name == AtomName("H1")) + or ( at0name == AtomName("H1") and at1name == AtomName("O"))) { + distoh = r0; + } + else if ((at0name == AtomName("H1") and at1name == AtomName("H2")) + or ( at0name == AtomName("H2") and at1name == AtomName("H1"))) { + disthh = r0; + } + else if ((at0name == AtomName("EPW") and at1name == AtomName("O")) + or ( at0name == AtomName("O") and at1name == AtomName("EPW"))) { + distoe = r0; + } + } + + if (distoh < 0.0 or disthh < 0.0 or distoe < 0.0) + throw SireError::program_bug + (QObject::tr("Could not find expected atoms in " + "TIP4P water molecule."), CODELOC); + + double weightH = distoe / sqrt((distoh * distoh) - + (0.25 * disthh * disthh)); + + int o_index = AtomNumToOpenMMIndex[oatom.number().value()]; + int h1_index = AtomNumToOpenMMIndex[h1atom.number().value()]; + int h2_index = AtomNumToOpenMMIndex[h2atom.number().value()]; + + if (Debug) + qDebug() << "virtual site " << system_index << " o " + << o_index << " h1 " << h1_index << " h2 " + << h2_index << " 1 - weightH " << 1 - weightH + << " weightH/2 " << weightH / 2; + + auto vsite = + new OpenMM::ThreeParticleAverageSite + (o_index, h1_index, h2_index, 1 - weightH, + weightH / 2, weightH / 2); + + system_openmm->setVirtualSite(system_index, vsite); + } // EPW + + system_index = system_index + 1; + + } // end of loop on atoms in molecule + } // end of loop on molecules in workspace int num_atoms_till_i = 0; + // JM July 13. This also needs to be changed because there could be more + // than one perturbed molecule + // Molecule solutemol = solute.moleculeAt(0).molecule(); + int nions = 0; + QVector perturbed_energies_tmp{false, false, false, false, false, false, false, false, false}; @@ -927,6 +1345,8 @@ void OpenMMPMEFEP::initialise(bool fullPME) // scale factors QHash< QPair, QPair > custom14pairs; + bool special_14 = false; + for (int i = 0; i < nmols; i++) { const Vector *c = ws.coordsArray(i); @@ -937,7 +1357,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) std::vector custom_non_bonded_params(10); if (Debug) - qDebug() << "Molecule number = " << i << "name =" << molecule.name(); + qDebug() << "Molecule number = " << i; // NON BONDED TERMS @@ -954,7 +1374,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) if (molecule.hasProperty("perturbations")) { if (Debug) - qDebug() << " ... molecule is perturbed"; + qDebug() << "Molecule Perturbed number = " << i; AtomCharges atomcharges_start = molecule.property("initial_charge").asA(); @@ -985,6 +1405,9 @@ void OpenMMPMEFEP::initialise(bool fullPME) double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; double charge_diff = 0.0; + // This really only adds the nonbonded parameters + // The parameters need to be added in the same order as they + // appear in the System nonbond_idx = recip_space->addParticle(charge, sigma, epsilon); Atom atom = molecule.molecule().atoms()(j); @@ -998,8 +1421,14 @@ void OpenMMPMEFEP::initialise(bool fullPME) charge_start = start_charges[j].value(); charge_final = final_charges[j].value(); + // HHL + // Lambda scaling for 1-5+ (see exceptions below) in reciprocal + // space complimentary to scaling in direct space + // need to provide the parameter (lambda) and the chargeScale for + // reciprocal PME charge_diff = charge_final - charge_start; + // FIXME: really needed? const for small value if (abs(charge_diff) < 0.00001) charge_diff = 0.0; @@ -1157,12 +1586,583 @@ void OpenMMPMEFEP::initialise(bool fullPME) direct_space->addParticle(custom_non_bonded_params); } + if (Restraint_flag) { + bool hasRestrainedAtoms = molecule.hasProperty("restrainedatoms"); + + if (hasRestrainedAtoms) { + Properties restrainedAtoms = + molecule.property("restrainedatoms").asA(); + + int nrestrainedatoms = restrainedAtoms.property( + QString("nrestrainedatoms")).asA().toInt(); + + if (Debug) + qDebug() << "nrestrainedatoms = " << nrestrainedatoms; + + for (int i = 0; i < nrestrainedatoms; i++) { + int atomnum = restrainedAtoms.property(QString("AtomNum(%1)").arg( + i)).asA().toInt(); + double xref = restrainedAtoms.property(QString("x(%1)").arg( + i)).asA().toDouble(); + double yref = restrainedAtoms.property(QString("y(%1)").arg( + i)).asA().toDouble(); + double zref = restrainedAtoms.property(QString("z(%1)").arg( + i)).asA().toDouble(); + double k = restrainedAtoms.property(QString("k(%1)").arg( + i)).asA().toDouble(); + double d = restrainedAtoms.property(QString("d(%1)").arg( + i)).asA().toDouble(); + + int openmmindex = AtomNumToOpenMMIndex[atomnum]; + + if (Debug) { + qDebug() << "atomnum " << atomnum << " openmmindex " << openmmindex << " x " << + xref << " y " << yref << " z " << zref << " k " << k << " d " << d; + } + + int posrestrdim = 5; + std::vector params(posrestrdim); + + params[0] = xref * OpenMM::NmPerAngstrom; + params[1] = yref * OpenMM::NmPerAngstrom; + params[2] = zref * OpenMM::NmPerAngstrom; + params[3] = k * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * + OpenMM::AngstromsPerNm); + params[4] = d * OpenMM::NmPerAngstrom; + + positionalRestraints_openmm->addParticle(openmmindex, params); + } + } + } // end of restraint flag + // single atoms like ions - if (!molecule.hasProperty("connectivity")) { + bool hasConnectivity = molecule.hasProperty("connectivity"); + + if (!hasConnectivity) { num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; + + if (Debug) { + qDebug() << "Number of atoms = " << num_atoms_molecule + << "Number of atoms till i =" << num_atoms_till_i; + qDebug() << "***** MONOATOMIC MOLECULE DETECTED *****\n"; + } + + nions = nions + 1; continue; } + // bonded terms + QList< BondID > bond_pert_list; + QList< BondID > bond_pert_swap_list; + QList< AngleID > angle_pert_list; + QList< AngleID > angle_pert_swap_list; + QList< DihedralID > dihedral_pert_list; + QList< DihedralID > dihedral_pert_swap_list; + QList< ImproperID > improper_pert_list; + QList< ImproperID > improper_pert_swap_list; + + if (solute.contains(molecule)) { + Perturbations pert_params = + molecule.property("perturbations").asA(); + + QList< PropPtr > perturbation_list = pert_params.perturbations(); + + std::vector solute_bond_perturbation_params(4); + std::vector solute_angle_perturbation_params(4); + std::vector solute_torsion_perturbation_params(1); + + QHash bond_pert_eq_list; + + for (QList< PropPtr >::const_iterator it = + perturbation_list.constBegin(); it != perturbation_list.constEnd(); ++it) { + const Perturbation &pert = *it; + + if (pert.isA()) { + QString str = pert.what(); + + if (str == "SireMM::TwoAtomPerturbation") { + const TwoAtomPerturbation &two = pert.asA(); + int idx0 = two.atom0().asA().value() + num_atoms_till_i; + int idx1 = two.atom1().asA().value() + num_atoms_till_i; + double rstart = two.initialForms()[Symbol("r0")].toString().toDouble(); + double bstart = two.initialForms()[Symbol("k")].toString().toDouble(); + double rend = two.finalForms()[Symbol("r0")].toString().toDouble(); + double bend = two.finalForms()[Symbol("k")].toString().toDouble(); + + solute_bond_perturbation_params[0] = bstart * 2.0 * OpenMM::KJPerKcal * + OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; + solute_bond_perturbation_params[1] = bend * 2.0 * OpenMM::KJPerKcal * + OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm; + solute_bond_perturbation_params[2] = rstart * OpenMM::NmPerAngstrom; + solute_bond_perturbation_params[3] = rend * OpenMM::NmPerAngstrom; + + /* JM 10/16 Also apply this if 'no solute constraints' flag is on*/ + if (flag_constraint == NONE) { + solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); + } + else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { + /* JM 10/16 ALLBONDS and HANGLES may be unwise with current free energy implementation !*/ + double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + bond_pert_eq_list.insert(BondID(two.atom0(), two.atom1()), + pert_eq_distance * OpenMM::AngstromsPerNm); + if (Debug) { + qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << + " Nm"; + qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << + " Nm"; + qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << + " Nm"; + } + } + /* JM 10/16 */ + /* Here add code to constraint hbonds only if initial and final parameters are unperturbed*/ + /* check also what is the mass of the atoms in that case */ + else if (flag_constraint == HBONDS and flag_noperturbedconstraints) { + const SireMol::Atom atom0 = molecule.select(two.atom0()); + //double m0 = atom0.property("mass").value(); + double m0 = system_openmm->getParticleMass(idx0); + const SireMol::Atom atom1 = molecule.select(two.atom1()); + //double m1 = atom1.property("mass").value(); + double m1 = system_openmm->getParticleMass(idx1); + double deltar = abs(rend-rstart); + double deltak = abs(bend-bstart); + // only constraint if m0 < 1.1 g.mol-1 or m1 < 1.1 g.mol-1 + // AND the initial and final parameters differ + if (Debug) { + qDebug() << " m0 " << m0 << " m1 " << m1 << "\n"; + qDebug() << " deltar " << deltar << " " << " deltak " << deltak; + } + /* bonds that do not change parameters are constrained*/ + double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; + if (deltar < SMALL and deltak < SMALL) { + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + if (Debug) { + qDebug() << "perturbed bond but no parameter changes so constrained " << + atom0.name().toString() + << "-" << atom1.name().toString() << "\n"; + } + } + /* bonds that change parameters and have one of the atoms with a mass < HMASS are constrained*/ + else if (m0 < HMASS or m1 < HMASS) { + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + if (Debug) { + qDebug() << "perturbed bond parameter changes but involving " + << " light mass so constrained " << atom0.name().toString() + << "- " << atom1.name().toString() << "\n"; + } + } + /* other bonds are flexible */ + else { + solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); + if (Debug) { + qDebug() << "perturbed bond flexible " << atom0.name().toString() + << "- " << atom1.name().toString() << "\n"; + } + } + } + else if (flag_constraint == HBONDS) { + const SireMol::Atom atom0 = molecule.select(two.atom0()); + QString initial_type_atom0 = atom0.property("initial_ambertype"); + QString final_type_atom0 = atom0.property("final_ambertype"); + + const SireMol::Atom atom1 = molecule.select(two.atom1()); + QString initial_type_atom1 = atom1.property("initial_ambertype"); + QString final_type_atom1 = atom1.property("final_ambertype"); + + if (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) + || final_type_atom0.startsWith("h", Qt::CaseInsensitive) || + initial_type_atom1.startsWith("h", Qt::CaseInsensitive) + || final_type_atom1.startsWith("h", Qt::CaseInsensitive)) { + double pert_eq_distance = solute_bond_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_bond_perturbation_params[2]; + system_openmm->addConstraint(idx0, idx1, pert_eq_distance); + + if (Debug) { + qDebug() << "Two/one bond atom(s) start(s) or end(s) with h/H"; + qDebug() << "bond start distance = " << solute_bond_perturbation_params[2] << + " Nm"; + qDebug() << "bond end distance = " << solute_bond_perturbation_params[3] << + " Nm"; + qDebug() << "Perturbation bond equilibrium distance = " << pert_eq_distance << + " Nm"; + } + } + else { + solute_bond_perturbation->addBond(idx0, idx1, solute_bond_perturbation_params); + } + + if (Debug) { + qDebug() << "Atom0 initil type = " << initial_type_atom0; + qDebug() << "Atom0 final type = " << final_type_atom0; + qDebug() << "Atom1 initil type = " << initial_type_atom1; + qDebug() << "Atom1 final type = " << final_type_atom1; + } + + } + + bond_pert_list.append(BondID(two.atom0(), two.atom1())); + bond_pert_swap_list.append(BondID(two.atom1(), two.atom0())); + + bondPairs.push_back(std::make_pair(idx0, idx1)); + + if (Debug) { + qDebug() << "Atom0 = " << two.atom0().asA().value() << + "Atom1 = " << two.atom1().asA().value(); + qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "\n"; + qDebug() << "rstart = " << rstart << " A" << + "rend = " << rend << " A"; + qDebug() << "bstart = " << bstart << " kcal/A A" << + "bend = " << bend << " kcal/A A" << "\n"; + } + } + + if (str == "SireMM::ThreeAtomPerturbation") { + const ThreeAtomPerturbation &three = pert.asA(); + int idx0 = three.atom0().asA().value() + num_atoms_till_i; + int idx1 = three.atom1().asA().value() + num_atoms_till_i; + int idx2 = three.atom2().asA().value() + num_atoms_till_i; + double astart = three.initialForms()[Symbol("k")].toString().toDouble(); + double thetastart = + three.initialForms()[Symbol("theta0")].toString().toDouble(); + double aend = three.finalForms()[Symbol("k")].toString().toDouble(); + double thetaend = three.finalForms()[Symbol("theta0")].toString().toDouble(); + + solute_angle_perturbation_params[0] = astart * 2.0 * OpenMM::KJPerKcal; + solute_angle_perturbation_params[1] = aend * 2.0 * OpenMM::KJPerKcal; + solute_angle_perturbation_params[2] = thetastart; + solute_angle_perturbation_params[3] = thetaend; + + if (Debug) { + qDebug() << "astart = " << solute_angle_perturbation_params[0] << " kJ/rad rad" + << + " aend = " << solute_angle_perturbation_params[1] << " kJ/rad rad"; + qDebug() << "thetastart = " << solute_angle_perturbation_params[2] << " rad" << + "thetaend = " << solute_angle_perturbation_params[3] << " rad"; + } + + if (flag_constraint == HANGLES) { + const SireMol::Atom atom0 = molecule.select(three.atom0()); + QString initial_type_atom0 = atom0.property("initial_ambertype"); + QString final_type_atom0 = atom0.property("final_ambertype"); + + const SireMol::Atom atom1 = molecule.select(three.atom1()); + QString initial_type_atom1 = atom1.property("initial_ambertype"); + QString final_type_atom1 = atom1.property("final_ambertype"); + + const SireMol::Atom atom2 = molecule.select(three.atom2()); + QString initial_type_atom2 = atom2.property("initial_ambertype"); + QString final_type_atom2 = atom2.property("final_ambertype"); + + bool H_X_H = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) + || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && + (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) + || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); + + bool H_O_X = (initial_type_atom0.startsWith("h", Qt::CaseInsensitive) + || final_type_atom0.startsWith("h", Qt::CaseInsensitive)) && + (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) + || final_type_atom1.startsWith("o", Qt::CaseInsensitive)); + + bool X_O_H = (initial_type_atom1.startsWith("o", Qt::CaseInsensitive) + || final_type_atom1.startsWith("o", Qt::CaseInsensitive)) && + (initial_type_atom2.startsWith("h", Qt::CaseInsensitive) + || final_type_atom2.startsWith("h", Qt::CaseInsensitive)); + + if (Debug) { + if (H_X_H) + qDebug() << "type = H_X_H"; + if (H_O_X) + qDebug() << "type = H_O_X"; + if (X_O_H) + qDebug() << "type = X_O_H"; + } + + if (H_X_H || H_O_X || X_O_H) { + const BondID * first_alchemical_bond = NULL; + const BondID * second_alchemical_bond = NULL; + + double first_alchemical_distance = -1.0; + double second_alchemical_distance = -1.0; + + if (bond_pert_eq_list.contains(BondID(three.atom0(), three.atom1()))) { + first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom0(), + three.atom1()))).key()); + first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); + if (Debug) + qDebug() << "Atom0 - Atom1"; + } + else if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom0()))) { + first_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), + three.atom0()))).key()); + first_alchemical_distance = bond_pert_eq_list.value(*first_alchemical_bond); + if (Debug) + qDebug() << "Atom1 - Atom0"; + } + else { + if (Debug) + qDebug() << "First perturbed bond was not foud in the perturned list"; + first_alchemical_bond = new BondID(three.atom0(), three.atom1()); + } + + + if (bond_pert_eq_list.contains(BondID(three.atom1(), three.atom2()))) { + second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom1(), + three.atom2()))).key()); + second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); + if (Debug) + qDebug() << "Atom1 - Atom2"; + } + else if (bond_pert_eq_list.contains(BondID(three.atom2(), three.atom1()))) { + second_alchemical_bond = &((bond_pert_eq_list.find(BondID(three.atom2(), + three.atom1()))).key()); + second_alchemical_distance = bond_pert_eq_list.value(*second_alchemical_bond); + if (Debug) + qDebug() << "Atom2 - Atom1"; + } + else { + if (Debug) + qDebug() << "Second perturbed bond was not foud in the perturned list"; + } + + + if (Debug) + qDebug() << "First Alchemical distance = " << first_alchemical_distance + << "Second Alchemical distance = " << second_alchemical_distance; + + SireMaths::Vector bond1_vec; + SireMaths::Vector bond2_vec; + + if (first_alchemical_bond->atom0() == second_alchemical_bond->atom0()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom0 = Bond2 Atom0"; + } + else if (first_alchemical_bond->atom0() == second_alchemical_bond->atom1()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom0 = Bond2 Atom1"; + } + else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom0()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom1())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom1 = Bond2 Atom0"; + } + else if (first_alchemical_bond->atom1() == second_alchemical_bond->atom1()) { + SireMaths::Vector tmp1 = (molecule.atom( + first_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmp2 = (molecule.atom( + second_alchemical_bond->atom0())).property("coordinates"); + SireMaths::Vector tmpc = (molecule.atom( + first_alchemical_bond->atom1())).property("coordinates"); + bond1_vec = tmp1 - tmpc; + bond2_vec = tmp2 - tmpc; + if (Debug) + qDebug() << "Bond1 Atom1 = Bond2 Atom1"; + } + else + throw SireError::program_bug(QObject::tr("No coorner bond"), CODELOC); + + if (Debug) { + if (first_alchemical_distance != -1.0) { + qDebug() << "First vector X = " << (bond1_vec.normalise() * + first_alchemical_distance).x(); + qDebug() << "First vector Y = " << (bond1_vec.normalise() * + first_alchemical_distance).y(); + qDebug() << "First vector Z = " << (bond1_vec.normalise() * + first_alchemical_distance).z(); + } + else { + qDebug() << "First vector X = " << (bond1_vec).x(); + qDebug() << "First vector Y = " << (bond1_vec).y(); + qDebug() << "First vector Z = " << (bond1_vec).z(); + } + + if (second_alchemical_distance != -1.0) { + qDebug() << "Second vector X = " << (bond2_vec.normalise() * + second_alchemical_distance).x(); + qDebug() << "Second vector Y = " << (bond2_vec.normalise() * + second_alchemical_distance).y(); + qDebug() << "Second vector Z = " << (bond2_vec.normalise() * + second_alchemical_distance).z(); + } + else { + qDebug() << "Second vector X = " << (bond2_vec).x(); + qDebug() << "Second vector Y = " << (bond2_vec).y(); + qDebug() << "Second vector Z = " << (bond2_vec).z(); + } + } + + double constraint_distance; + + double eq_angle = solute_angle_perturbation_params[3] * current_lambda + + (1.0 - current_lambda) * solute_angle_perturbation_params[2]; + + if (first_alchemical_distance == -1.0 && second_alchemical_distance != -1.0) { + //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) + double sq = bond1_vec.length() * bond1_vec.length() + + (bond2_vec.normalise() * second_alchemical_distance).length() * + (bond2_vec.normalise() * second_alchemical_distance).length(); + + double dp = 2.0 * bond1_vec.length() * (bond2_vec.normalise() * + second_alchemical_distance).length() * cos(eq_angle); + + constraint_distance = sqrt(sq - dp); + + //constraint_distance = (bond1_vec - bond2_vec.normalise() * second_alchemical_distance).length(); + } + else if (first_alchemical_distance != -1.0 + && second_alchemical_distance == -1.0) { + //Carnot theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) + double sq = bond2_vec.length() * bond2_vec.length() + + (bond1_vec.normalise() * first_alchemical_distance).length() * + (bond1_vec.normalise() * first_alchemical_distance).length(); + + double dp = 2.0 * bond2_vec.length() * (bond2_vec.normalise() * + first_alchemical_distance).length() * cos(eq_angle); + + constraint_distance = sqrt(sq - dp); + + //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec).length(); + } + else if (first_alchemical_distance != -1.0 + && second_alchemical_distance != -1.0) { + //Carnot's theorem a^2 = c^2 + b^2 - a*b*c*cos(bc) + double sq = (bond1_vec.normalise() * first_alchemical_distance).length() * + (bond1_vec.normalise() * first_alchemical_distance).length() + + (bond2_vec.normalise() * second_alchemical_distance).length() * + (bond2_vec.normalise() * second_alchemical_distance).length(); + + double dp = 2.0 * (bond1_vec.normalise() * first_alchemical_distance).length() + * (bond2_vec.normalise() * second_alchemical_distance).length() * cos(eq_angle); + + constraint_distance = sqrt(sq - dp); + + //constraint_distance = (bond1_vec.normalise() * first_alchemical_distance - bond2_vec.normalise() * second_alchemical_distance).length(); + } + else + throw SireError::program_bug( + QObject::tr("The angle does not contain perturbed bond"), CODELOC); + + + system_openmm->addConstraint(idx0, idx2, + constraint_distance * OpenMM::NmPerAngstrom); + + if (Debug) + qDebug() << "CONSTRAINT DISTANCE = " << constraint_distance << " A"; + } + + }//end if HANGLES + else { + solute_angle_perturbation->addAngle(idx0, idx1, idx2, + solute_angle_perturbation_params); + if (Debug) + qDebug() << "Added perturbed angle"; + } + + angle_pert_list.append(AngleID(three.atom0(), three.atom1(), three.atom2())); + angle_pert_swap_list.append(AngleID(three.atom2(), three.atom1(), + three.atom0())); + + if (Debug) { + qDebug() << "Atom0 = " << three.atom0().asA().value() << + "Atom1 = " << three.atom1().asA().value() << + "Atom2 = " << three.atom2().asA().value(); + + qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << "\n"; + + qDebug() << "astart = " << astart << " kcal/rad rad" << + "aend = " << " kcal/rad rad" << aend; + + qDebug() << "thetastart = " << thetastart << " rad" << + "thetaend = " << thetaend << " rad" << "\n"; + } + } + if (str == "SireMM::FourAtomPerturbation") { + + const FourAtomPerturbation &four = pert.asA(); + int idx0 = four.atom0().asA().value() + num_atoms_till_i; + int idx1 = four.atom1().asA().value() + num_atoms_till_i; + int idx2 = four.atom2().asA().value() + num_atoms_till_i; + int idx3 = four.atom3().asA().value() + num_atoms_till_i; + + QString tmp = four.perturbExpression().toOpenMMString(); + tmp.replace(QString("phi"), QString("theta")); + tmp.replace(QString("lambda"), QString("lamdih")); + tmp = "( " + tmp + " ) * " + "KJPerKcal"; + + std::string openmm_str = tmp.toStdString(); + + if (Debug) { + qDebug() << "IDX0 = " << idx0 << "IDX1 = " << idx1 << "IDX2 = " << idx2 << + "IDX3 = " << idx3; + qDebug() << "Dihedral String = " << openmm_str.c_str(); + qDebug() << "Dihedral Normal String = " << four.perturbExpression().toString() + << "\n"; + } + + auto solute_torsion_perturbation = new OpenMM::CustomTorsionForce(openmm_str); + solute_torsion_perturbation->addPerTorsionParameter("KJPerKcal"); + solute_torsion_perturbation_params[0] = 4.184; + solute_torsion_perturbation->addGlobalParameter("lamdih", current_lambda); + solute_torsion_perturbation->addTorsion(idx0, idx1, idx2, idx3, + solute_torsion_perturbation_params); + + //********************************BONDED ENERGY TORSIONS ARE ADDED TO THE SYSTEM***************************** + solute_torsion_perturbation->setForceGroup( + NONBONDED_FCG); // FIXME: why in this force group? + + if (!fullPME) + system_openmm->addForce(solute_torsion_perturbation); + + perturbed_energies_tmp[7] = true; //Torsions are added to the system + + dihedral_pert_list.append(DihedralID(four.atom0(), four.atom1(), four.atom2(), + four.atom3())); + dihedral_pert_swap_list.append(DihedralID(four.atom3(), four.atom1(), + four.atom2(), four.atom0())); + + improper_pert_list.append(ImproperID(four.atom0(), four.atom1(), four.atom2(), + four.atom3())); + improper_pert_swap_list.append(ImproperID(four.atom0(), four.atom1(), + four.atom3(), four.atom2())); + + if (Debug) { + qDebug() << "Atom0 = " << four.atom0().asA().value() << + "Atom1 = " << four.atom1().asA().value() << + "Atom2 = " << four.atom2().asA().value() << + "Atom3 = " << four.atom3().asA().value() << "\n"; + } + } + + } // end if (pert.isA()) + } // end for perturbations + + } // end solute molecule perturbation + // The bonded parameters are stored in "amberparameters" AmberParameters amber_params = molecule.property("amberparameters").asA(); @@ -1174,11 +2174,23 @@ void OpenMMPMEFEP::initialise(bool fullPME) for (int j = 0; j < bonds_ff.length(); j++) { BondID bond_ff = bonds_ff[j]; QList bond_params = amber_params.getParams(bond_ff); + double k = bond_params[0]; double r0 = bond_params[1]; int idx0 = bonds[j].atom0().asA().value(); int idx1 = bonds[j].atom1().asA().value(); + if (solute.contains(molecule)) { + if (bond_pert_list.indexOf(bond_ff) != -1 + || bond_pert_swap_list.indexOf(bond_ff) != -1) { + //Solute molecule. Check if the current solute bond is in the perturbed bond list + // JM July 13 --> Note, we should still have the ability to constrain the bond to its r(lambda) equilibrium distance + if (Debug) + qDebug() << "Found Perturbed Bond\n"; + continue; + } + } + //Select the atom type QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); @@ -1186,19 +2198,245 @@ void OpenMMPMEFEP::initialise(bool fullPME) idx0 = idx0 + num_atoms_till_i; idx1 = idx1 + num_atoms_till_i; - system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); + // JM July 13. The constraint code has to be revised to handle massless particles so TIP4P can be dealt with. + // Should check if a constraint involves an atom with a null mass, and if so skip constraint. - if (Debug) - qDebug() << "Adding constraint to atoms" << idx0 << "and" - << idx1 << "with distance" << r0; + if (flag_constraint == NONE) { + //JM 10/16 If constraint water flag is on and if molecule is a water molecule then apply constraint + if (flag_constraint_water and molfirstresname == ResName("WAT")) + system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); + else + bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, + k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + } + else if (flag_constraint == ALLBONDS || flag_constraint == HANGLES) { + system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); + } + else if (flag_constraint == HBONDS) { + if ((atom0[6] == 'H') || (atom1[6] == 'H')) { // will add constraint between all TIP3P atoms + system_openmm->addConstraint(idx0, idx1, r0 * OpenMM::NmPerAngstrom); + } + else { + bondStretch_openmm->addBond(idx0, idx1, r0 * OpenMM::NmPerAngstrom, + k * 2.0 * OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * OpenMM::AngstromsPerNm); + } + } // Bond exclusion List bondPairs.push_back(std::make_pair(idx0, idx1)); } + // Angles + QList angles_ff = amber_params.getAllAngles(); + QVector angles = angles_ff.toVector(); + + for (int j = 0; j < angles_ff.length(); j++) { + AngleID angle_ff = angles_ff[j]; + QList angle_params = amber_params.getParams(angle_ff); + + double k = angle_params[0]; + double theta0 = angle_params[1]; // It is already in radiant + + int idx0 = angles[j].atom0().asA().value(); + int idx1 = angles[j].atom1().asA().value(); + int idx2 = angles[j].atom2().asA().value(); + + if (solute.contains(molecule)) { + if (angle_pert_list.indexOf(angle_ff) != -1 + || angle_pert_swap_list.indexOf(angle_ff) != -1) { + //Solute molecule. Check if the current solute angle is in the perturbed angle list + if (Debug) + qDebug() << "Found Perturbed Angle\n"; + continue; + } + else { + if (Debug) + qDebug() << "Solute normal Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << + "Atom2 = " << idx2 << "theta0 = " << theta0 << " k = " << k << "\n"; + + idx0 = idx0 + num_atoms_till_i; + idx1 = idx1 + num_atoms_till_i; + idx2 = idx2 + num_atoms_till_i; + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, + k * 2.0 * OpenMM::KJPerKcal); + continue; + } + } + + if (Debug) + qDebug() << "Angle - Atom0 = " << idx0 << "Atom1 = " << idx1 << "Atom2 = " << + idx2 << "\n"; + + QString atom0 = molecule.atom(AtomIdx(idx0)).toString(); + QString atom1 = molecule.atom(AtomIdx(idx1)).toString(); + QString atom2 = molecule.atom(AtomIdx(idx2)).toString(); + + Vector diff = c[idx2] - c[idx0]; + + idx0 = idx0 + num_atoms_till_i; + idx1 = idx1 + num_atoms_till_i; + idx2 = idx2 + num_atoms_till_i; + + if (flag_constraint == HANGLES) { + if (((atom0[6] == 'H') && (atom2[6] == 'H'))) { + system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); + } + else if (((atom0[6] == 'H') && (atom1[6] == 'O')) || ((atom1[6] == 'O') + && (atom2[6] == 'H'))) { + system_openmm->addConstraint(idx0, idx2, diff.length() * OpenMM::NmPerAngstrom); + } + else { + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, + k * 2.0 * OpenMM::KJPerKcal); + } + } + else { + bondBend_openmm->addAngle(idx0, idx1, idx2, theta0, + k * 2.0 * OpenMM::KJPerKcal); + } + } // end of angles + + // Dihedrals + QList dihedrals_ff = amber_params.getAllDihedrals(); + QVector dihedrals = dihedrals_ff.toVector(); + + for (int j = 0; j < dihedrals_ff.length(); j++) { + DihedralID dihedral_ff = dihedrals_ff[j]; + QList dihedral_params = amber_params.getParams(dihedral_ff); + + int idx0 = dihedrals[j].atom0().asA().value() + num_atoms_till_i; + int idx1 = dihedrals[j].atom1().asA().value() + num_atoms_till_i; + int idx2 = dihedrals[j].atom2().asA().value() + num_atoms_till_i; + int idx3 = dihedrals[j].atom3().asA().value() + num_atoms_till_i; + + if (Debug) { + qDebug() << "TOTAL Dihedral between atom global index " << idx0 - + num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + } + + if (solute.contains(molecule)) { + if (dihedral_pert_list.indexOf(dihedral_ff) != -1 + || dihedral_pert_swap_list.indexOf(dihedral_ff) != -1) { + //Solute molecule. Check if the current solute dihedral is in the perturbed dihedral list + if (Debug) + qDebug() << "Found Perturbed Dihedral\n"; + continue; + } + } + + // Variable number of parameters + for (int k = 0; k < dihedral_params.length(); k = k + 3) { + double v = dihedral_params[ k ]; + int periodicity = dihedral_params[ k + 1 ]; + double phase = dihedral_params[ k + 2 ]; + bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, + v * OpenMM::KJPerKcal); + if (Debug) { + qDebug() << "Dihedral between atom global index " << idx0 - num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + qDebug() << "Amplitude_dih = " << v << " periodicity " << periodicity << + " phase " << phase << "\n"; + } + } + } // end of dihedrals + + // Improper Dihedrals + QList impropers_ff = amber_params.getAllImpropers(); + QVector impropers = impropers_ff.toVector(); + + for (int j = 0; j < impropers_ff.length(); j++) { + ImproperID improper_ff = impropers_ff[j]; + QList improper_params = amber_params.getParams(improper_ff); + + int idx0 = impropers[j].atom0().asA().value() + num_atoms_till_i; + int idx1 = impropers[j].atom1().asA().value() + num_atoms_till_i; + int idx2 = impropers[j].atom2().asA().value() + num_atoms_till_i; + int idx3 = impropers[j].atom3().asA().value() + num_atoms_till_i; + + if (Debug) { + qDebug() << "TOTAL Improper between atom global index " << idx0 - + num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + } + + if (solute.contains(molecule)) { + //Solute molecule. Check if the current solute dihedral is in the perturbed improper list + if (improper_pert_list.indexOf(improper_ff) != -1 + || improper_pert_swap_list.indexOf(improper_ff) != -1) { + if (Debug) + qDebug() << "Found Perturbed Improper\n"; + continue; + } + } + + // Variable number of parameters + for (int k = 0; k < improper_params.length(); k = k + 3) { + double v = improper_params[ k ]; + int periodicity = improper_params[ k + 1 ]; + double phase = improper_params[ k + 2 ]; + + bondTorsion_openmm->addTorsion(idx0, idx1, idx2, idx3, periodicity, phase, + v * OpenMM::KJPerKcal); + if (Debug) { + qDebug() << "Improper between atom global index " << idx0 - num_atoms_till_i << + " and " << idx1 - num_atoms_till_i << + " and " << idx2 - num_atoms_till_i << + " and " << idx3 - num_atoms_till_i << "\n"; + qDebug() << "Amplitude_imp = " << v << " periodicity " << periodicity << + " phase " << phase << "\n"; + } + } + } // end of impropers + + // Variable 1,4 scaling factors + QList pairs14_ff = amber_params.getAll14Pairs(); + QVector pairs14 = pairs14_ff.toVector(); + + for (int j = 0; j < pairs14_ff.length(); j++) { + BondID pair14_ff = pairs14_ff[j]; + + QList pair14_params = amber_params.get14PairParams(pair14_ff); + + double cscl = pair14_params[0]; + double ljscl = pair14_params[1]; + + if (Debug) + qDebug() << " cscl@ " << cscl << " ljscl " << ljscl; + + // Add to custom pairs if scale factor differs from default + if (abs(cscl - Coulomb14Scale) > 0.0001 + or abs(ljscl - LennardJones14Scale) > 0.0001) { + int idx0 = pair14_ff.atom0().asA().value() + num_atoms_till_i; + int idx1 = pair14_ff.atom1().asA().value() + num_atoms_till_i; + + QPair indices_pair(idx0, idx1); + QPair scl_pair(cscl, ljscl); + custom14pairs.insert(indices_pair, scl_pair); + + special_14 = true; + + if (Debug) + qDebug() << "IDX0 = " << idx0 << " IDX1 =" << idx1 << "14 OpenMM Index"; + } + } // end of variable 1,4 scaling factors + num_atoms_till_i = num_atoms_till_i + num_atoms_molecule; + } // end of loop over molecules + if (Debug) { + if (nions != 0) + qDebug() << "\nNumber of ions = " << nions; + } + + /*** EXCEPTION HANDLING ***/ // Exclude the 1-2, 1-3 bonded atoms from nonbonded forces, and scale @@ -1214,7 +2452,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) for (int i = 0; i < num_exceptions; i++) { int p1, p2; - double qprod_start, qprod_end; + double qprod_diff, qprod_start, qprod_end, qprod_mix; double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; double charge_prod, sigma_avg, epsilon_avg; @@ -1238,6 +2476,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) qprod_start = Qstart_p1 * Qstart_p2; qprod_end = Qend_p1 * Qend_p2; + qprod_mix = Qend_p1 * Qstart_p2 + Qstart_p1 * Qend_p2; if (Debug) qDebug() << "Exception =" << i << ", p1 =" << p1 << ", p2 =" @@ -1245,23 +2484,196 @@ void OpenMMPMEFEP::initialise(bool fullPME) << ", sigma avg =" << sigma_avg << ", epsilon_avg =" << epsilon_avg; + // run over the 1-4 exceptions + if (!(charge_prod == 0 && sigma_avg == 1 && epsilon_avg == 0)) { + QVector perturbed_14_tmp(13); + + double Epstart_p1 = p1_params[2]; + double Epend_p1 = p1_params[3]; + double Sigstart_p1 = p1_params[4]; + double Sigend_p1 = p1_params[5]; + double isHard_p1 = p1_params[6]; + double isTodummy_p1 = p1_params[7]; + double isFromdummy_p1 = p1_params[8]; + + double Epstart_p2 = p2_params[2]; + double Epend_p2 = p2_params[3]; + double Sigstart_p2 = p2_params[4]; + double Sigend_p2 = p2_params[5]; + double isHard_p2 = p2_params[6]; + double isTodummy_p2 = p2_params[7]; + double isFromdummy_p2 = p2_params[8]; + + double sigma_avg_start, sigma_avg_end, sigma_avg_mix; + double epsilon_avg_start, epsilon_avg_end, epsilon_avg_mix; + + double Coulomb14Scale_tmp = Coulomb14Scale; + double LennardJones14Scale_tmp = LennardJones14Scale; + + if (special_14) { + QPair sc_factors; + + QPair indices_pair(p1, p2); + QHash< QPair, QPair >::const_iterator i_pair = + custom14pairs.find(indices_pair); + + if (i_pair != custom14pairs.end()) { + sc_factors = i_pair.value(); + Coulomb14Scale_tmp = sc_factors.first; + LennardJones14Scale_tmp = sc_factors.second; + + if (Debug) + qDebug() << "The pair (" << p1 << ", " << p2 + << ") is 1-4 special no swap pair"; + } + else { + QPair indices_swap_pair(p2, p1); + QHash< QPair, QPair >::const_iterator i_swap_pair = + custom14pairs.find(indices_swap_pair); + + if (i_swap_pair != custom14pairs.end()) { + sc_factors = i_swap_pair.value(); + Coulomb14Scale_tmp = sc_factors.first; + LennardJones14Scale_tmp = sc_factors.second; + + if (Debug) + qDebug() << "The pair (" << p2 << ", " << p1 + << ") is 1-4 special swap pair"; + } + } + } + + qprod_start *= Coulomb14Scale_tmp; + qprod_end *= Coulomb14Scale_tmp; + qprod_mix *= Coulomb14Scale_tmp; + + if (flag_combRules == ARITHMETIC) { + sigma_avg_start = (Sigstart_p1 + Sigstart_p2) / 2.0; + sigma_avg_end = (Sigend_p1 + Sigend_p2) / 2.0; + sigma_avg_mix = (Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2) / 2.0; + } + else if (flag_combRules == GEOMETRIC) { + sigma_avg_start = Sigstart_p1 * Sigstart_p2 ; + sigma_avg_end = Sigend_p1 * Sigend_p2 ; + sigma_avg_mix = Sigend_p1 * Sigstart_p2 + Sigstart_p1 * Sigend_p2 ; + } + + epsilon_avg_start = Epstart_p1 * Epstart_p2 * LennardJones14Scale_tmp * + LennardJones14Scale_tmp; + epsilon_avg_end = Epend_p1 * Epend_p2 * LennardJones14Scale_tmp * + LennardJones14Scale_tmp; + epsilon_avg_mix = (Epend_p1 * Epstart_p2 + Epstart_p1 * Epend_p2) * + LennardJones14Scale_tmp * LennardJones14Scale_tmp; + + // ["qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix"] + // see setPerParicleParameters and expressions above + std::vector params(9); + + params[0] = qprod_start; + params[1] = qprod_end; + params[2] = qprod_mix; + params[3] = epsilon_avg_start; + params[4] = epsilon_avg_end; + params[5] = epsilon_avg_mix; + params[6] = sigma_avg_start; + params[7] = sigma_avg_end; + params[8] = sigma_avg_mix; + + if (Debug) { + qDebug() << "Particle p1 = " << p1 << "\nQstart = " << Qstart_p1 << "\nQend = " + << Qend_p1 + << "\nEpstart = " << Epstart_p1 << "\nEpend = " << Epend_p1 + << "\nSgstart = " << Sigstart_p1 << "\nSgend = " << Sigend_p1 + << "\nisHard = " << isHard_p1 << "\nisTodummy = " << isTodummy_p1 << + "\nisFromdummy = " << isFromdummy_p1 << "\n"; + qDebug() << "Particle p2 = " << p2 << "\nQstart = " << Qstart_p2 << "\nQend = " + << Qend_p2 + << "\nEpstart = " << Epstart_p2 << "\nEpend = " << Epend_p2 + << "\nSgstart = " << Sigstart_p2 << "\nSgend = " << Sigend_p2 + << "\nisHard = " << isHard_p2 << "\nisTodummy = " << isTodummy_p2 << + "\nisFromdummy = " << isFromdummy_p2 << "\n"; + + qDebug() << "Product Charge start = " << qprod_start << + "\nProduct Charge end = " << qprod_end << "\nProduct Charge mixed = " << + qprod_mix + << "\nEpsilon average start = " << epsilon_avg_start << + "\nEpsilon average end = " << epsilon_avg_end << "\nEpsilon average mixed = " << + qprod_mix + << "\nSigma average start = " << sigma_avg_start << "\nSigma average end = " << + sigma_avg_end; + qDebug() << "Coulombic Scale Factor = " << Coulomb14Scale_tmp << + " Lennard-Jones Scale Factor = " << LennardJones14Scale_tmp << "\n"; + } + + if ((isHard_p1 == 1.0 && isHard_p2 == 1.0)) { + custom_intra_14_clj->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added clj Hard 1-4 exception"; + } + else if ((isTodummy_p1 == 1.0 && isTodummy_p2 == 1.0) || (isHard_p1 == 1.0 + && isTodummy_p2 == 1.0) || (isHard_p2 == 1.0 && isTodummy_p1 == 1.0)) { + custom_intra_14_todummy->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added soft TO dummy 1-4 exception"; + } + + else if ((isFromdummy_p1 == 1.0 && isFromdummy_p2 == 1.0) || (isHard_p1 == 1.0 + && isFromdummy_p2 == 1.0) || (isHard_p2 == 1.0 && isFromdummy_p1 == 1.0)) { + custom_intra_14_fromdummy->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added soft FROM dummy 1-4 exception"; + } + + else if ((isFromdummy_p1 == 1.0 && isTodummy_p2 == 1.0) + || (isFromdummy_p2 == 1.0 && isTodummy_p1 == 1.0)) { + custom_intra_14_fromdummy_todummy->addBond(p1, p2, params); + + if (Debug) + qDebug() << "Added soft FROM dummy TO dummy 1-4 exception"; + } + } // 1-4 exceptions + + qprod_diff = qprod_end - qprod_start; + + if (useOffset && qprod_diff != 0.0) { + recip_space->addExceptionParameterOffset("lambda_offset", i, + qprod_diff, 0.0, 0.0); + + if (Debug) + qDebug() << "Adding exception offset for atom idx" << i + << "; qprod_diff =" << qprod_diff; + + } + if (!fullPME) custom_corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); if (Debug) - qDebug() << "Adding qprod_start =" << qprod_start - << "and qprod_end =" << qprod_end - << "to correction term for bond" - << p1 << "-" << p2; + qDebug() << "Adding qprod_start =" << qprod_start + << "and qprod_end =" << qprod_end + << "to correction term for bond" + << p1 << "-" << p2; } // end of loop over exceptions + /*** add non-bonded force fields to System ***/ unsigned int nAtoms = recip_space->getNumParticles(); unsigned int npairs = (nAtoms * (nAtoms - 1)) / 2; - if (Debug) + if (Debug) { qDebug() << "Num pairs = " << npairs; + qDebug() << "Num bonds 1-4 Hard = " << custom_intra_14_clj->getNumBonds(); + qDebug() << "Num bonds 1-4 To Dummy = " << + custom_intra_14_todummy->getNumBonds(); + qDebug() << "Num bonds 1-4 From Dummy = " << + custom_intra_14_fromdummy->getNumBonds(); + qDebug() << "Num bonds 1-4 From Dummy To Dummy = " << + custom_intra_14_fromdummy_todummy->getNumBonds(); + } system_openmm->addForce(recip_space); recip_space->setForceGroup(RECIP_FCG); @@ -1272,7 +2684,8 @@ void OpenMMPMEFEP::initialise(bool fullPME) system_openmm->addForce(direct_space); perturbed_energies_tmp[0] = true; - qDebug() << "Number of atoms in GENERAL" << direct_space->getNumParticles(); + if (Debug) + qDebug() << "Added 1-5 direct space (PME, LJ):" << general_ff; } if (custom_corr_recip->getNumBonds() != 0) { @@ -1280,12 +2693,147 @@ void OpenMMPMEFEP::initialise(bool fullPME) system_openmm->addForce(custom_corr_recip); perturbed_energies_tmp[8] = true; - qDebug() << "Number of bonds in CORR" << custom_corr_recip->getNumBonds(); + if (Debug) + qDebug() << "Added reciprocal correction term:" << CORR_RECIP; + } + + if (custom_intra_14_clj->getNumBonds() != 0) { + custom_intra_14_clj->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_clj); + perturbed_energies_tmp[1] = true; + + if (Debug) + qDebug() << "Added 1-4 CLJ:" << intra_14_clj; + } + + if (custom_intra_14_todummy->getNumBonds() != 0) { + custom_intra_14_todummy->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_todummy); + perturbed_energies_tmp[2] = true; + + if (Debug) + qDebug() << "Added 1-4 To Dummy:" << intra_14_todummy; + } + + if (custom_intra_14_fromdummy->getNumBonds() != 0) { + custom_intra_14_fromdummy->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_fromdummy); + perturbed_energies_tmp[3] = true; + + if (Debug) + qDebug() << "Added 1-4 From Dummy:" << intra_14_fromdummy; + } + + if (custom_intra_14_fromdummy_todummy->getNumBonds() != 0) { + custom_intra_14_fromdummy_todummy->setForceGroup(NONBONDED_FCG); + system_openmm->addForce(custom_intra_14_fromdummy_todummy); + perturbed_energies_tmp[4] = true; + + if (Debug) + qDebug() << "Added 1-4 From Dummy To Dummy:" + << intra_14_fromdummy_todummy; + } + } // if (!fullPME) + + + /*** add bonded force fields to System ***/ + + if (bondStretch_openmm->getNumBonds() != 0) { + bondStretch_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondStretch_openmm); + if (Debug) + qDebug() << "Added Internal Bond energy term"; + } + + if (bondBend_openmm->getNumAngles() != 0) { + bondBend_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondBend_openmm); + if (Debug) + qDebug() << "Added Internal Angle energy term"; + } + + if (bondTorsion_openmm->getNumTorsions() != 0) { + bondTorsion_openmm->setForceGroup(BOND_FCG); + system_openmm->addForce(bondTorsion_openmm); + if (Debug) + qDebug() << "Added Internal Torsion energy term"; + } + + if (!fullPME) { + if (solute_bond_perturbation->getNumBonds() != 0) { + solute_bond_perturbation->setForceGroup(BOND_FCG); + system_openmm->addForce(solute_bond_perturbation); + perturbed_energies_tmp[5] = true; //Custom bonded is added to the system + if (Debug) + qDebug() << "Added Perturbed Internal Bond energy term"; + } + + if (solute_angle_perturbation->getNumAngles() != 0) { + solute_angle_perturbation->setForceGroup(BOND_FCG); + system_openmm->addForce(solute_angle_perturbation); + perturbed_energies_tmp[6] = true; //Custom bonded is added to the system + if (Debug) + qDebug() << "Added Perturbed Internal Angle energy term"; } } // if (!fullPME) perturbed_energies = perturbed_energies_tmp; + // IMPORTANT: PERTURBED ENERGY TORSIONS ARE ADDED ABOVE + bool UseLink_flag = true; + + // Distance Restraint. All the information are stored in the first molecule only. + + if (UseLink_flag) { + Molecule molecule = moleculegroup.moleculeAt(0).molecule(); + + bool haslinkinfo = molecule.hasProperty("linkbonds"); + + if (haslinkinfo) { + std::vector custom_bond_link_par(3); + + Properties linkprop = molecule.property("linkbonds").asA(); + + int nlinks = linkprop.property( + QString("nbondlinks")).asA().toInt(); + + if (Debug) + qDebug() << "Number of constraint links = " << nlinks; + + for (int i = 0; i < nlinks; i++) { + int atomnum0 = linkprop.property(QString("AtomNum0(%1)").arg( + i)).asA().toInt(); + int atomnum1 = linkprop.property(QString("AtomNum1(%1)").arg( + i)).asA().toInt(); + double reql = linkprop.property(QString("reql(%1)").arg( + i)).asA().toDouble(); + double kl = linkprop.property(QString("kl(%1)").arg( + i)).asA().toDouble(); + double dl = linkprop.property(QString("dl(%1)").arg( + i)).asA().toDouble(); + + int openmmindex0 = AtomNumToOpenMMIndex[atomnum0]; + int openmmindex1 = AtomNumToOpenMMIndex[atomnum1]; + + custom_bond_link_par[0] = reql * OpenMM::NmPerAngstrom; //req + custom_bond_link_par[1] = kl * (OpenMM::KJPerKcal * OpenMM::AngstromsPerNm * + OpenMM::AngstromsPerNm); //k + custom_bond_link_par[2] = dl * OpenMM::NmPerAngstrom; //dl + + if (Debug) { + qDebug() << "atomnum0 = " << atomnum0 << " openmmindex0 =" << openmmindex0; + qDebug() << "atomnum1 = " << atomnum1 << " openmmindex1 =" << openmmindex1; + qDebug() << "Req = " << reql << " kl = " << kl << " dl = " << dl; + } + + custom_link_bond->addBond(openmmindex0, openmmindex1, custom_bond_link_par); + } + + system_openmm->addForce(custom_link_bond); + } + + } // end of bond link flag + this->openmm_system = system_openmm; this->isSystemInitialised = true; } // OpenMMPMEFEP::initialise END From 7d02e8f8a9a11fb94fd7d6e104ed640f04c81d2d Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sun, 22 May 2022 10:26:09 +0100 Subject: [PATCH 126/148] bug fix: use initial charge instead of scaled charge for offset --- corelib/src/libs/SireMove/openmmpmefep.cpp | 48 ++++++++++++---------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 27d19916d..a0e4ba5c8 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1389,10 +1389,11 @@ void OpenMMPMEFEP::initialise(bool fullPME) start_LJs = atomvdws_start.toVector(); final_LJs = atomvdws_final.toVector(); + + // make sure we have the unscaled charge to be used in the offset } - int nonbond_idx = 0; - double charge_start = 0.0, charge_final = 0.0; + double charge = 0.0; // depends if perturbed atom or not /* add non-bonded parameters to direct and reciprocal spaces and restraints if applicable */ @@ -1400,33 +1401,33 @@ void OpenMMPMEFEP::initialise(bool fullPME) // Iterate over all atoms in the molecules: // ljparameters.size() is used here as the number of atoms for (int j = 0; j < ljparameters.size(); j++) { - double charge = charges[j].value(); - double sigma = ljparameters[j].sigma() * OpenMM::NmPerAngstrom; - double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; - double charge_diff = 0.0; - - // This really only adds the nonbonded parameters - // The parameters need to be added in the same order as they - // appear in the System - nonbond_idx = recip_space->addParticle(charge, sigma, epsilon); - Atom atom = molecule.molecule().atoms()(j); + double sigma = ljparameters[j].sigma() * OpenMM::NmPerAngstrom; + double epsilon = ljparameters[j].epsilon() * OpenMM::KJPerKcal; + if (molecule.hasProperty("perturbations")) { + charge = start_charges[j].value(); + + // This really only adds the nonbonded parameters + // The parameters need to be added in the same order as they + // appear in the System + int nonbond_idx = recip_space->addParticle(charge, sigma, epsilon); + // Is atom a hard (changing charge and LJ), from dummy or to dummy type? bool ishard = false; bool istodummy = false; bool isfromdummy = false; - charge_start = start_charges[j].value(); - charge_final = final_charges[j].value(); + double charge_start = start_charges[j].value(); + double charge_final = final_charges[j].value(); // HHL // Lambda scaling for 1-5+ (see exceptions below) in reciprocal // space complimentary to scaling in direct space // need to provide the parameter (lambda) and the chargeScale for // reciprocal PME - charge_diff = charge_final - charge_start; + double charge_diff = charge_final - charge_start; // FIXME: really needed? const for small value if (abs(charge_diff) < 0.00001) @@ -1550,7 +1551,10 @@ void OpenMMPMEFEP::initialise(bool fullPME) qDebug() << " unperturbed solute atom " << atom.index(); } } - else { + else { // unperturbed atom + charge = charges[j].value(); + recip_space->addParticle(charge, sigma, epsilon); + // solvent atom like hard custom_non_bonded_params[0] = charge; custom_non_bonded_params[1] = charge; @@ -2151,10 +2155,10 @@ void OpenMMPMEFEP::initialise(bool fullPME) four.atom3(), four.atom2())); if (Debug) { - qDebug() << "Atom0 = " << four.atom0().asA().value() << - "Atom1 = " << four.atom1().asA().value() << - "Atom2 = " << four.atom2().asA().value() << - "Atom3 = " << four.atom3().asA().value() << "\n"; + qDebug() << "Atom0 = " << four.atom0().asA().value() + << "Atom1 = " << four.atom1().asA().value() + << "Atom2 = " << four.atom2().asA().value() + << "Atom3 = " << four.atom3().asA().value(); } } @@ -2444,12 +2448,12 @@ void OpenMMPMEFEP::initialise(bool fullPME) recip_space->createExceptionsFromBonds(bondPairs, Coulomb14Scale, LennardJones14Scale); - int num_exceptions = recip_space->getNumExceptions(); + unsigned int num_exceptions = recip_space->getNumExceptions(); if (Debug) qDebug() << "Number of exceptions =" << num_exceptions; - for (int i = 0; i < num_exceptions; i++) { + for (unsigned int i = 0; i < num_exceptions; i++) { int p1, p2; double qprod_diff, qprod_start, qprod_end, qprod_mix; From cb3c347b0c4a901d75a680ebdd0132b1563b4a9c Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sun, 22 May 2022 10:37:01 +0100 Subject: [PATCH 127/148] removed debugging code: initialise_ion() and useOffset --- corelib/src/libs/SireMove/openmmpmefep.cpp | 329 +++------------------ wrapper/Move/OpenMMPMEFEP.pypp.cpp | 12 - 2 files changed, 33 insertions(+), 308 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index a0e4ba5c8..ce8da2f33 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -614,268 +614,10 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { }; -// NOTE: only for debugging with simple non-dummy systems like ions -const bool useOffset = true; // use true for production - - /* - A simple system of an ion in a water box. This is really for debugging - purposes only and assumes that the parm7 and rst7 file are describing - such a system exactly as in the code below. - */ - -#include "posvel.h" -void OpenMMPMEFEP::initialise_ion(bool fullPME, bool doCharge) -{ - if (Debug) { - qDebug() << "Initialising OpenMMPMEFEP"; - const std::string version = OpenMM::Platform::getOpenMMVersion(); - qDebug() << "OpenMM Version:" << QString::fromUtf8(version.data(), - version.size()); - qDebug() << "Running single ion debug system"; - qDebug() << "fullPME =" << fullPME; - qDebug() << "useOffset =" << useOffset; - qDebug() << "doCharge =" << doCharge; - } - - // Create a workspace using the stored molgroup - const MoleculeGroup moleculegroup = this->molgroup.read(); - - if (moleculegroup.isEmpty()) - throw SireError::program_bug( - QObject::tr("Cannot initialise OpenMMPMEFEP because molgroup " - "has not been defined"), - CODELOC); - - AtomicVelocityWorkspace ws = - this->createWorkspace(moleculegroup).read().asA(); - - const int nmols = ws.nMolecules(); - - int nats = 0; - - for (int i = 0; i < nmols; ++i) { - nats = nats + ws.nAtoms(i); - } - - if (Debug) - qDebug() << "There are" << nats << "atoms. " << "There are" << nmols - << "molecules"; - - auto system = new OpenMM::System(); - - if (Andersen_flag) - addAndersenThermostat(*system); - - if (MCBarostat_flag) - addMCBarostat(*system); - - if (CMMremoval_frequency > 0) { - auto cmmotionremover = - new OpenMM::CMMotionRemover(CMMremoval_frequency); - - system->addForce(cmmotionremover); - - if (Debug) - qDebug() << "\nWill remove Center of Mass motion every" << - CMMremoval_frequency << "steps\n"; - } - - auto recip_space = new OpenMM::NonbondedForce(); - std::vector > pairs; - - const double cutoff = convertTo(cutoff_distance.value(), nanometer); - - system->addForce(recip_space); - system->setDefaultPeriodicBoxVectors(OpenMM::Vec3(boxl_ion, 0.0, 0.0), - OpenMM::Vec3(0.0, boxl_ion, 0.0), - OpenMM::Vec3(0.0, 0.0, boxl_ion)); - - recip_space->setForceGroup(RECIP_FCG); - recip_space->setNonbondedMethod(OpenMM::NonbondedForce::PME); - recip_space->setCutoffDistance(cutoff); - recip_space->setIncludeDirectSpace(fullPME); - recip_space->setUseDispersionCorrection(false); - - // sodium assumed to come first - system->addParticle(atom_Na.mass); - const unsigned int idx = - recip_space->addParticle(atom_Na.charge, atom_Na.sigma, - atom_Na.epsilon); - - double charge_scale = 0.0; - double sigma_scale = 0.0; - double epsilon_scale = 0.0; - - if (doCharge) { // discharge - charge_scale = -atom_Na.charge; - } else { // shrink - sigma_scale = -atom_Na.sigma; - epsilon_scale = -atom_Na.epsilon; - - // make sure the charge is zero before attempting to shrink - recip_space->setParticleParameters(idx, 0.0, - atom_Na.sigma, atom_Na.epsilon); - } - - // linear scaling of the charges - if (useOffset) { - recip_space->addGlobalParameter("lambda_offset", current_lambda); - recip_space->addParticleParameterOffset("lambda_offset", idx, - charge_scale, - sigma_scale, epsilon_scale); - } - - // NOTE: can't be *new for some reason - auto direct_space = new OpenMM::CustomNonbondedForce(GENERAL_ION); - std::vector params(10); - auto corr_recip = new OpenMM::CustomBondForce(CORR_ION); - QVector perturbed_energies_tmp{false, false, false, false, false, - false, false, false, false}; - - /* - * Direct space and reciprocal correction setup through explict energy - * expressions - */ - - if (!fullPME) { - double tolerance_PME = recip_space->getEwaldErrorTolerance(); - double alpha_PME = (1.0 / cutoff) - * std::sqrt(-log(2.0 * tolerance_PME)); - - system->addForce(direct_space); - perturbed_energies_tmp[0] = true; - - direct_space->setForceGroup(DIRECT_FCG); - direct_space->setNonbondedMethod - (OpenMM::CustomNonbondedForce::CutoffPeriodic); - direct_space->setCutoffDistance(cutoff); - - direct_space->addGlobalParameter("lam", current_lambda); - direct_space->addGlobalParameter("alpha_pme", alpha_PME); - direct_space->addGlobalParameter("SPOnOff", 0.0); // not needed - - addPerParticleParameters(*direct_space, - {"qstart", "qend", "sigmastart", "sigmaend", - "epstart", "epend", "isHD", "isTD", - "isFD", "isSolvent"}); - - if (doCharge) { - params = { - atom_Na.charge, 0.0, - atom_Na.sigma, atom_Na.sigma, - atom_Na.epsilon, atom_Na.epsilon, - 1.0, 0.0, 0.0, 0.0 - }; - } else { - params = { - 0.0, 0.0, - atom_Na.sigma, 0.0, - atom_Na.epsilon, 0.0, - 1.0, 0.0, 0.0, 0.0 - }; - } - - direct_space->addParticle(params); - - system->addForce(corr_recip); - corr_recip->setForceGroup(CORR_FCG); - perturbed_energies_tmp[8] = true; - - corr_recip->addGlobalParameter("lam_corr", current_lambda); - corr_recip->addGlobalParameter("alpha_pme", alpha_PME); - - addPerBondParameters(*corr_recip, {"qcstart", "qcend"}); - } - - for (int i = 0; i < nwater_ion; i++) { - int idx_O = system->addParticle(water[0].mass); - int idx_H1 = system->addParticle(water[1].mass); - int idx_H2 = system->addParticle(water[2].mass); - - recip_space->addParticle(water[0].charge, water[0].sigma, - water[0].epsilon); - recip_space->addParticle(water[1].charge, water[1].sigma, - water[1].epsilon); - recip_space->addParticle(water[2].charge, water[2].sigma, - water[2].epsilon); - - if (!fullPME) { - direct_space->addParticle({water[0].charge, water[0].charge, - water[0].sigma, water[0].sigma, - water[0].epsilon, water[0].epsilon, - 1.0, 0.0, 0.0, 1.0}); - direct_space->addParticle({water[1].charge, water[1].charge, - water[1].sigma, water[1].sigma, - water[1].epsilon, water[1].epsilon, - 1.0, 0.0, 0.0, 1.0}); - direct_space->addParticle({water[2].charge, water[2].charge, - water[2].sigma, water[2].sigma, - water[2].epsilon, water[2].epsilon, - 1.0, 0.0, 0.0, 1.0}); - } - - pairs.push_back(std::make_pair(idx_O, idx_H1)); - pairs.push_back(std::make_pair(idx_O, idx_H2)); - pairs.push_back(std::make_pair(idx_H1, idx_H2)); - - system->addConstraint(idx_O, idx_H1, r_OH); - system->addConstraint(idx_O, idx_H2, r_OH); - system->addConstraint(idx_H1, idx_H2, r_HH); - } - - recip_space->createExceptionsFromBonds(pairs, Coul14_scale_ion, - LJ14_scale_ion); - - /* - * Setup of exclusions for direct space and reciprocal space corrections - * which are custom bond forces - */ - - if (!fullPME) { - int p1, p2; - std::vector p1_params(6); - std::vector p2_params(6); - - double charge_prod, sigma_avg, epsilon_avg; - double qprod_start, qprod_end; - double Qstart_p1, Qend_p1, Qstart_p2, Qend_p2; - - unsigned int num_exceptions = recip_space->getNumExceptions(); - - if (Debug) - qDebug() << "Number of exceptions =" << num_exceptions; - - for (unsigned int i = 0; i < num_exceptions; i++) { - recip_space->getExceptionParameters - (i, p1, p2, charge_prod, sigma_avg, epsilon_avg); - - direct_space->addExclusion(p1, p2); - - direct_space->getParticleParameters(p1, p1_params); - direct_space->getParticleParameters(p2, p2_params); - - // NOTE: these are just the TIP3P atom charges - Qstart_p1 = p1_params[0]; - Qend_p1 = p1_params[1]; - Qstart_p2 = p2_params[0]; - Qend_p2 = p2_params[1]; - - qprod_start = Qstart_p1 * Qstart_p2; - qprod_end = Qend_p1 * Qend_p2; - - corr_recip->addBond(p1, p2, {qprod_start, qprod_end}); - } - } - - perturbed_energies = perturbed_energies_tmp; - this->openmm_system = system; - this->isSystemInitialised = true; -} // OpenMMPMEFEP::initialise_ion END - -/** - * initialises the openMM Free energy single topology calculation - * Initialise must be called before anything else happens. + * Initialise the OpenMM Free energy single topology calculation. + * Parameter fullPME is only useful for debugging of e.g. single ion systems. + * Initialise() must be called before anything else happens. */ void OpenMMPMEFEP::initialise(bool fullPME) { @@ -885,7 +627,6 @@ void OpenMMPMEFEP::initialise(bool fullPME) qDebug() << "OpenMM Version:" << QString::fromUtf8(version.data(), version.size()); qDebug() << "fullPME =" << fullPME; - qDebug() << "useOffset =" << useOffset; } // Create a workspace using the stored molgroup @@ -1002,12 +743,10 @@ void OpenMMPMEFEP::initialise(bool fullPME) recip_space->setUseDispersionCorrection(false); // scale the charges in the reciprocal space - if (useOffset) { - recip_space->addGlobalParameter("lambda_offset", current_lambda); + recip_space->addGlobalParameter("lambda_offset", current_lambda); - if (Debug) - qDebug() << "Adding lambda offset to reciprocal space"; - } + if (Debug) + qDebug() << "Adding lambda offset to reciprocal space"; // use default tolerance for the moment double tolerance_PME = recip_space->getEwaldErrorTolerance(); @@ -1043,27 +782,29 @@ void OpenMMPMEFEP::initialise(bool fullPME) new OpenMM::CustomBondForce(CORR_RECIP.toStdString()); if (!fullPME) { - // This ensures that also the direct space is subject to PBC - direct_space->setNonbondedMethod(OpenMM::CustomNonbondedForce::CutoffPeriodic); - direct_space->setCutoffDistance(converted_cutoff_distance); - - direct_space->addGlobalParameter("lam", current_lambda); - direct_space->addGlobalParameter("delta", shift_delta); - direct_space->addGlobalParameter("n", coulomb_power); - direct_space->addGlobalParameter("SPOnOff", 0.0); - direct_space->addGlobalParameter("alpha_pme", alpha_PME); - - addPerParticleParameters(*direct_space, - {"qstart", "qend", "epstart", "epend", - "sigmastart", "sigmaend", "isHD", "isTD", - "isFD", "isSolvent"}); - - custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); - custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); - custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); - custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); - - addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); + // This ensures that also the direct space is subject to PBC + direct_space->setNonbondedMethod + (OpenMM::CustomNonbondedForce::CutoffPeriodic); + direct_space->setCutoffDistance(converted_cutoff_distance); + + direct_space->addGlobalParameter("lam", current_lambda); + direct_space->addGlobalParameter("delta", shift_delta); + direct_space->addGlobalParameter("n", coulomb_power); + direct_space->addGlobalParameter("SPOnOff", 0.0); + direct_space->addGlobalParameter("alpha_pme", alpha_PME); + + addPerParticleParameters(*direct_space, + {"qstart", "qend", "epstart", "epend", + "sigmastart", "sigmaend", "isHD", "isTD", + "isFD", "isSolvent"}); + + custom_corr_recip->addGlobalParameter("lam_corr", current_lambda); + custom_corr_recip->addGlobalParameter("n_corr", coulomb_power); + custom_corr_recip->addGlobalParameter("alpha_pme", alpha_PME); + custom_corr_recip->addGlobalParameter("cutoff", + converted_cutoff_distance); + + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); } if (coulomb_power > 0) @@ -1132,6 +873,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) "qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix" }; + addPerBondParameters(*custom_intra_14_todummy, paramList); addPerBondParameters(*custom_intra_14_fromdummy, paramList); addPerBondParameters(*custom_intra_14_fromdummy_todummy, paramList); @@ -1433,7 +1175,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) if (abs(charge_diff) < 0.00001) charge_diff = 0.0; - if (useOffset && charge_diff != 0.0) { + if (charge_diff != 0.0) { // charge = charge_start + lambda_offset * charge_diff recip_space->addParticleParameterOffset("lambda_offset", nonbond_idx, @@ -2642,7 +2384,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) qprod_diff = qprod_end - qprod_start; - if (useOffset && qprod_diff != 0.0) { + if (qprod_diff != 0.0) { recip_space->addExceptionParameterOffset("lambda_offset", i, qprod_diff, 0.0, 0.0); @@ -3685,12 +3427,7 @@ void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) // lambda for the offsets (linear scaling) of the charges in // reciprocal space - if (useOffset) { - openmm_context->setParameter("lambda_offset", lambda); - - if (Debug) - qDebug() << "Updating lambda_offset to" << lambda; - } + openmm_context->setParameter("lambda_offset", lambda); } boost::tuples::tuple OpenMMPMEFEP::calculateGradient( diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp index f3bbc21af..2225909ef 100644 --- a/wrapper/Move/OpenMMPMEFEP.pypp.cpp +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -520,18 +520,6 @@ void register_OpenMMPMEFEP_class(){ , ( bp::arg("fullPME")=(bool)(false) ) , "\n initialises the openMM Free energy single topology calculation\n Initialise must be called before anything else happens.\n" ); - } - { //::SireMove::OpenMMPMEFEP::initialise_ion - - typedef void ( ::SireMove::OpenMMPMEFEP::*initialise_ion_function_type)( bool,bool ) ; - initialise_ion_function_type initialise_ion_function_value( &::SireMove::OpenMMPMEFEP::initialise_ion ); - - OpenMMPMEFEP_exposer.def( - "initialise_ion" - , initialise_ion_function_value - , ( bp::arg("fullPME")=(bool)(false), bp::arg("doCharge")=(bool)(true) ) - , "\nA simple system of an ion in a water box. This is really for debugging\npurposes only and assumes that the parm7 and rst7 file are describing\nsuch a system exactly as in the code below.\n" ); - } { //::SireMove::OpenMMPMEFEP::integrate From 78b650a41e1e4573b1dd765f3ffe23891f783f00 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sun, 22 May 2022 11:11:24 +0100 Subject: [PATCH 128/148] fixed reorder issues --- corelib/src/libs/SireMove/openmmpmefep.cpp | 42 +++++++++++++--------- 1 file changed, 25 insertions(+), 17 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index ce8da2f33..e4c09691e 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -203,22 +203,26 @@ QDataStream &operator>>(QDataStream &ds, OpenMMPMEFEP &velver) OpenMMPMEFEP::OpenMMPMEFEP(bool frequent_save) : ConcreteProperty(), frequent_save_velocities(frequent_save), - molgroup(MoleculeGroup()), solute(MoleculeGroup()), solutehard(MoleculeGroup()), - solutetodummy(MoleculeGroup()), solutefromdummy(MoleculeGroup()), + molgroup(MoleculeGroup()), solute(MoleculeGroup()), + solutehard(MoleculeGroup()), solutetodummy(MoleculeGroup()), + solutefromdummy(MoleculeGroup()), openmm_system(0), openmm_context(0), isSystemInitialised(false), isContextInitialised(false), combiningRules("arithmetic"), - CutoffType("PME"), cutoff_distance(1.0 * nanometer), field_dielectric(78.3), + CutoffType("PME"), cutoff_distance(1.0 * nanometer), + field_dielectric(78.3), Andersen_flag(false), Andersen_frequency(90.0), MCBarostat_flag(false), MCBarostat_frequency(25), ConstraintType("none"), - Pressure(1.0 * bar), Temperature(300.0 * kelvin), platform_type("Reference"), + Pressure(1.0 * bar), Temperature(300.0 * kelvin), + platform_type("Reference"), Restraint_flag(false), CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), - device_index("0"), precision("single"), current_lambda(0.5), coulomb_power(0), + device_index("0"), precision("single"), current_lambda(0.5), + coulomb_power(0), shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), - finite_diff_gradients(), pot_energies(), perturbed_energies(), - reduced_perturbed_energies(), + finite_diff_gradients(), pot_energies(), forward_Metropolis(), backward_Metropolis(), + reduced_perturbed_energies(), perturbed_energies(), Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), integration_tol(0.001), timeskip(0.0 * picosecond), reinitialise_context(false), Debug(false) @@ -245,8 +249,9 @@ OpenMMPMEFEP::OpenMMPMEFEP(const MoleculeGroup &molecule_group, CMMremoval_frequency(0), buffer_frequency(0), energy_frequency(100), device_index("0"), precision("single"), current_lambda(0.5), coulomb_power(0), shift_delta(2.0), delta_alchemical(0.001), alchemical_array(), - finite_diff_gradients(), pot_energies(), perturbed_energies(), - reduced_perturbed_energies(), forward_Metropolis(), backward_Metropolis(), + finite_diff_gradients(), pot_energies(), + forward_Metropolis(), backward_Metropolis(), + reduced_perturbed_energies(), perturbed_energies(), Integrator_type("leapfrogverlet"), friction(1.0 / picosecond), integration_tol(0.001), timeskip(0.0 * picosecond), reinitialise_context(false), Debug(false) @@ -257,14 +262,16 @@ OpenMMPMEFEP::OpenMMPMEFEP(const MoleculeGroup &molecule_group, OpenMMPMEFEP::OpenMMPMEFEP(const OpenMMPMEFEP &other) : ConcreteProperty(other), frequent_save_velocities(other.frequent_save_velocities), - molgroup(other.molgroup), solute(other.solute), solutehard(other.solutehard), - solutetodummy(other.solutetodummy), solutefromdummy(other.solutefromdummy), + molgroup(other.molgroup), solute(other.solute), + solutehard(other.solutehard), solutetodummy(other.solutetodummy), + solutefromdummy(other.solutefromdummy), openmm_system(other.openmm_system), openmm_context(other.openmm_context), isSystemInitialised(other.isSystemInitialised), isContextInitialised(other.isContextInitialised), combiningRules(other.combiningRules), CutoffType(other.CutoffType), cutoff_distance(other.cutoff_distance), - field_dielectric(other.field_dielectric), Andersen_flag(other.Andersen_flag), + field_dielectric(other.field_dielectric), + Andersen_flag(other.Andersen_flag), Andersen_frequency(other.Andersen_frequency), MCBarostat_flag(other.MCBarostat_flag), MCBarostat_frequency(other.MCBarostat_frequency), @@ -274,17 +281,18 @@ OpenMMPMEFEP::OpenMMPMEFEP(const OpenMMPMEFEP &other) Restraint_flag(other.Restraint_flag), CMMremoval_frequency(other.CMMremoval_frequency), buffer_frequency(other.buffer_frequency), - energy_frequency(other.energy_frequency), device_index(other.device_index), + energy_frequency(other.energy_frequency), + device_index(other.device_index), precision(other.precision), current_lambda(other.current_lambda), coulomb_power(other.coulomb_power), shift_delta(other.shift_delta), delta_alchemical(other.delta_alchemical), alchemical_array(other.alchemical_array), finite_diff_gradients(other.finite_diff_gradients), pot_energies(other.pot_energies), - perturbed_energies(other.perturbed_energies), - reduced_perturbed_energies(other.reduced_perturbed_energies), forward_Metropolis(other.forward_Metropolis), backward_Metropolis(other.backward_Metropolis), + reduced_perturbed_energies(other.reduced_perturbed_energies), + perturbed_energies(other.perturbed_energies), Integrator_type(other.Integrator_type), friction(other.friction), integration_tol(other.integration_tol), timeskip(other.timeskip), reinitialise_context(other.reinitialise_context), Debug(other.Debug) @@ -336,9 +344,9 @@ OpenMMPMEFEP& OpenMMPMEFEP::operator=(const OpenMMPMEFEP &other) alchemical_array = other.alchemical_array; finite_diff_gradients = other.finite_diff_gradients; pot_energies = other.pot_energies; - reduced_perturbed_energies = other. reduced_perturbed_energies; forward_Metropolis = other.forward_Metropolis; backward_Metropolis = other.backward_Metropolis; + reduced_perturbed_energies = other. reduced_perturbed_energies; perturbed_energies = other.perturbed_energies; Integrator_type = other.Integrator_type; friction = other.friction; @@ -384,9 +392,9 @@ bool OpenMMPMEFEP::operator==(const OpenMMPMEFEP &other) const and alchemical_array == other.alchemical_array and finite_diff_gradients == other.finite_diff_gradients and pot_energies == other.pot_energies - and reduced_perturbed_energies == other.reduced_perturbed_energies and forward_Metropolis == other.forward_Metropolis and backward_Metropolis == other. backward_Metropolis + and reduced_perturbed_energies == other.reduced_perturbed_energies and perturbed_energies == other.perturbed_energies and Integrator_type == other.Integrator_type and friction == other.friction From bb0bb7269c4b48825c64a8828dce3ac01b7a05c8 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sun, 22 May 2022 11:13:45 +0100 Subject: [PATCH 129/148] removed ion positions and velocities from header --- corelib/src/libs/SireMove/openmmpmefep.h | 6191 ---------------------- 1 file changed, 6191 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index a6ae82491..ed7f88f0c 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -350,6197 +350,6 @@ SIRE_EXPOSE_CLASS(SireMove::OpenMMPMEFEP) SIRE_END_HEADER -/* NOTE: this is for debugging only - sodium ion in a box - converted from rst7 */ -const std::vector pos = { -{1.8714733, 2.0093072, 1.5697786}, -{2.3410058, 2.2534769, 2.3912187}, -{2.4123218, 2.2097239, 2.3447208}, -{2.3236573, 2.3322954, 2.3397508}, -{2.9121613, 2.3492215, 0.7791028}, -{2.9701569, 2.3562055, 0.8549319}, -{2.8585203, 2.2719922, 0.7970076}, -{1.9955003, 0.3149785, 2.2423062}, -{1.9926479, 0.4095558, 2.2567744}, -{2.0791612, 0.2999967, 2.1982753}, -{2.6928813, 2.3925345, 1.8233089}, -{2.7714777, 2.3687406, 1.7741277}, -{2.6953061, 2.4881298, 1.8275503}, -{1.8859747, 2.2279131, 0.0221965}, -{1.8729649, 2.2019708, 0.1134108}, -{1.8752797, 2.3230329, 0.0225898}, -{2.1873992, 1.4944423, 2.4686804}, -{2.2203777, 1.4077752, 2.4924192}, -{2.1322699, 1.5201602, 2.5425837}, -{2.4244375, 2.7740912, 0.4115550}, -{2.4114471, 2.8517580, 0.3571359}, -{2.3360179, 2.7473867, 0.4366779}, -{0.3192323, 0.9373813, 1.7654681}, -{0.4027351, 0.9709340, 1.7980841}, -{0.3378116, 0.8467744, 1.7408200}, -{2.0770912, 0.4757980, 1.2649555}, -{2.0189149, 0.5414219, 1.2265975}, -{2.0861096, 0.4090838, 1.1969099}, -{3.1420124, 1.3793559, 0.4262370}, -{3.1675544, 1.4544941, 0.3727191}, -{3.0823748, 1.4157288, 0.4916794}, -{0.9195626, 2.0205722, 1.8073353}, -{0.9727501, 2.0297411, 1.8863881}, -{0.8292211, 2.0262151, 1.8384625}, -{2.1914213, 2.6253052, 2.0008349}, -{2.2693207, 2.6805322, 2.0074661}, -{2.1387553, 2.6489110, 2.0771985}, -{1.1613787, 1.8075274, 0.8593214}, -{1.0769869, 1.7837379, 0.8209235}, -{1.1426912, 1.8852817, 0.9119271}, -{2.3656797, 2.2463682, 2.0618634}, -{2.2734664, 2.2209744, 2.0656245}, -{2.4063559, 2.1997600, 2.1349077}, -{1.2495650, 1.8392531, 1.8042736}, -{1.3023792, 1.8273976, 1.8832192}, -{1.1594846, 1.8442798, 1.8362514}, -{0.8948215, 1.2272468, 3.1108265}, -{0.8930716, 1.2464726, 3.2045794}, -{0.9516804, 1.1506281, 3.1031461}, -{1.1058699, 0.0954337, 0.4634076}, -{1.1560405, 0.1769220, 0.4611994}, -{1.0302193, 0.1153705, 0.5185604}, -{2.5649617, 2.8403142, 3.0171099}, -{2.4742958, 2.8230186, 2.9917543}, -{2.6057146, 2.8753543, 2.9379029}, -{1.0460893, 2.1729279, 2.5710580}, -{1.0186667, 2.2646270, 2.5698025}, -{1.1079191, 2.1674142, 2.6439209}, -{1.1829147, 2.4895406, 2.8285499}, -{1.1264546, 2.4143443, 2.8464406}, -{1.1447422, 2.5608640, 2.8797178}, -{1.2281252, 2.9957016, 1.1784958}, -{1.1675032, 3.0287065, 1.1121787}, -{1.1757400, 2.9906747, 1.2584510}, -{2.5857217, 2.2437053, 0.8117682}, -{2.4932706, 2.2281385, 0.7924598}, -{2.6306846, 2.2265863, 0.7290180}, -{2.3980131, 1.6851198, 2.4044547}, -{2.3557160, 1.7708534, 2.4092503}, -{2.3272383, 1.6225894, 2.4200501}, -{0.6590213, 2.9510722, 0.4513275}, -{0.6595361, 3.0106947, 0.3764462}, -{0.6242970, 2.8690102, 0.4163654}, -{0.5970418, 1.4204073, 0.6097964}, -{0.6892765, 1.4127195, 0.5853837}, -{0.5534034, 1.4494249, 0.5296966}, -{0.6092885, 2.5839977, 2.2295759}, -{0.6968071, 2.6227508, 2.2305791}, -{0.5664251, 2.6236041, 2.1537051}, -{1.5213833, 0.7167559, 2.7362700}, -{1.5974512, 0.6993903, 2.7917173}, -{1.4696180, 0.7802213, 2.7858157}, -{2.1873622, 1.6386300, 1.1216463}, -{2.1768334, 1.7335248, 1.1284618}, -{2.1063142, 1.6028736, 1.1579093}, -{2.2214379, 1.3773025, 0.0095251}, -{2.2207689, 1.3624631, 0.1040854}, -{2.2945559, 1.4373997, -0.0047714}, -{1.3882475, 0.9674677, 2.8324666}, -{1.4603108, 1.0266367, 2.8541055}, -{1.3723517, 0.9821788, 2.7392292}, -{2.5977867, 1.0969528, 3.1560195}, -{2.6764765, 1.0787903, 3.1046352}, -{2.5260529, 1.0620470, 3.1031218}, -{1.2085752, 1.5594130, 1.1461924}, -{1.1932180, 1.4868326, 1.2066786}, -{1.1246671, 1.6052868, 1.1420319}, -{1.9753081, 1.0345433, 2.1106830}, -{2.0689545, 1.0363116, 2.0909464}, -{1.9595129, 1.1155562, 2.1591573}, -{0.3609825, 0.1267603, 2.9894757}, -{0.4453993, 0.0903916, 2.9627655}, -{0.2995421, 0.0961978, 2.9227424}, -{0.1541942, 1.1946498, 1.7445748}, -{0.1262022, 1.1143812, 1.7005780}, -{0.2494011, 1.1954185, 1.7347075}, -{2.2937961, 1.6019148, 0.4483269}, -{2.3086050, 1.6843218, 0.4947178}, -{2.2288742, 1.6234553, 0.3813682}, -{0.9990262, 2.1062458, 1.5736318}, -{0.9791179, 2.0896840, 1.6657821}, -{0.9535244, 2.0365295, 1.5263926}, -{1.4188724, 0.2104137, 1.6748135}, -{1.4207870, 0.2584441, 1.7575887}, -{1.4114487, 0.1185326, 1.7006026}, -{0.5409242, 0.3533280, 1.2072754}, -{0.5819036, 0.3184477, 1.2864357}, -{0.4502869, 0.3228892, 1.2118223}, -{1.0826149, 2.9036253, 2.8625534}, -{1.0481732, 2.9920867, 2.8748272}, -{1.0944285, 2.8954387, 2.7679186}, -{2.5876117, 1.7993220, 1.5380435}, -{2.5330219, 1.7260041, 1.5664471}, -{2.5430062, 1.8338423, 1.4607064}, -{2.5861979, 2.4211278, 0.9988453}, -{2.5930321, 2.3488498, 0.9364632}, -{2.6507537, 2.4850216, 0.9686393}, -{3.0959153, 2.3726160, 0.9809340}, -{3.1003559, 2.3088334, 1.0521685}, -{3.1869769, 2.3978636, 0.9656800}, -{1.7283366, 2.4462767, 1.9940965}, -{1.6934389, 2.3852124, 2.0590246}, -{1.7179629, 2.4008474, 1.9104850}, -{2.3323550, 1.1669875, 0.4516330}, -{2.3621090, 1.1482339, 0.3626086}, -{2.2441990, 1.2025584, 0.4404286}, -{0.0220412, 1.5049345, 2.4448464}, -{0.0562837, 1.4157783, 2.4384482}, -{-0.0137405, 1.5231419, 2.3579528}, -{2.1041064, 2.3880076, 1.8606795}, -{2.1704447, 2.4556901, 1.8741194}, -{2.1462138, 2.3243299, 1.8029352}, -{1.6852874, 1.5090879, 0.7188575}, -{1.6166258, 1.5389485, 0.7784917}, -{1.6740550, 1.5629323, 0.6405188}, -{0.0060239, 1.3918827, 1.8736285}, -{0.0560312, 1.3119745, 1.8570069}, -{-0.0685961, 1.3862913, 1.8139384}, -{2.6419570, 0.8376300, 2.5770764}, -{2.6550355, 0.9314166, 2.5630999}, -{2.5884690, 0.8324484, 2.6562881}, -{1.6914840, 0.1915934, 1.1744342}, -{1.6792045, 0.2416639, 1.2550846}, -{1.6077733, 0.1472166, 1.1608130}, -{2.6618481, 0.2082174, 1.4834031}, -{2.6705999, 0.2574298, 1.5650356}, -{2.7497678, 0.1744933, 1.4662235}, -{2.7661414, 1.5829711, 1.3602623}, -{2.6835599, 1.5890517, 1.3122450}, -{2.7775269, 1.4893402, 1.3765699}, -{2.0119326, 0.9692406, -0.0054603}, -{2.0839298, 0.9610233, -0.0679999}, -{2.0548046, 0.9874631, 0.0781594}, -{1.4812555, 1.2569597, 0.4099494}, -{1.5267164, 1.1993010, 0.3485400}, -{1.5392387, 1.2614664, 0.4859754}, -{1.8889096, 2.6428440, 1.3883883}, -{1.9534597, 2.6980693, 1.3442775}, -{1.8585960, 2.5825450, 1.3205102}, -{2.4501414, 2.4929545, 2.1629026}, -{2.4999258, 2.4287300, 2.1123157}, -{2.3586922, 2.4749024, 2.1411431}, -{0.9516214, 2.3035397, 1.3313228}, -{0.9546950, 2.2283449, 1.3904719}, -{0.9872548, 2.2705872, 1.2488200}, -{2.2577932, 1.3315544, 1.7362471}, -{2.2906978, 1.2428913, 1.7214671}, -{2.2378077, 1.3645953, 1.6486616}, -{0.7421976, 1.9652969, 2.7830887}, -{0.7927862, 1.9580919, 2.7021491}, -{0.7579489, 1.8825864, 2.8286209}, -{2.5942872, 2.5944612, 2.4166331}, -{2.5317798, 2.6054306, 2.4882908}, -{2.5397544, 2.5808175, 2.3391583}, -{2.0283597, 1.7133380, 2.3352683}, -{2.0777192, 1.7841151, 2.2938371}, -{2.0944724, 1.6620537, 2.3817587}, -{0.2643212, 0.5706549, 0.9581341}, -{0.3569053, 0.5463682, 0.9573163}, -{0.2646451, 0.6663539, 0.9561551}, -{1.5737172, 3.0730326, 2.8318465}, -{1.4868236, 3.0765395, 2.7918529}, -{1.6232270, 3.0128007, 2.7763197}, -{2.6463740, 0.4374348, 2.0323663}, -{2.6767571, 0.4000641, 2.1150863}, -{2.5579584, 0.4688361, 2.0513125}, -{-0.0005820, 0.3898373, 0.2903230}, -{-0.0561905, 0.3169974, 0.3179702}, -{0.0401707, 0.3594197, 0.2092286}, -{2.9891846, 1.6474910, 1.5328140}, -{2.9821630, 1.7425284, 1.5418094}, -{2.8985991, 1.6173189, 1.5260137}, -{2.2843482, 1.1963381, 2.2855990}, -{2.3410571, 1.2672596, 2.2553244}, -{2.2799192, 1.2080623, 2.3804951}, -{2.2655401, 0.4148379, 0.6052363}, -{2.3611197, 0.4193121, 0.6078526}, -{2.2418106, 0.4574989, 0.5229000}, -{1.3695780, 2.4555309, 1.9906495}, -{1.4333409, 2.4491723, 1.9195427}, -{1.3099644, 2.5252106, 1.9632034}, -{0.5215120, 0.0725599, 1.8818469}, -{0.5060484, -0.0077827, 1.9315285}, -{0.4420247, 0.1243249, 1.8946722}, -{1.3398832, 1.5050503, 0.1413307}, -{1.3979007, 1.5556989, 0.0844888}, -{1.3098774, 1.5678766, 0.2070182}, -{0.4758237, 2.1216948, 3.1157629}, -{0.4834872, 2.0485101, 3.0545456}, -{0.3819239, 2.1288455, 3.1329100}, -{0.1121096, 2.4833777, 1.8929650}, -{0.0805746, 2.4144707, 1.9514430}, -{0.2018757, 2.4999924, 1.9217454}, -{-0.0230301, 2.9027212, 2.5394030}, -{-0.0000686, 2.8170190, 2.5753229}, -{0.0531463, 2.9576435, 2.5579228}, -{2.0543988, 0.3448725, 3.0178018}, -{2.0161560, 0.3051702, 3.0960548}, -{2.0827470, 0.2705017, 2.9646256}, -{0.7532561, 2.5765328, 0.0007234}, -{0.7797561, 2.4889612, 0.0288527}, -{0.8350058, 2.6192129, -0.0249229}, -{2.6915286, 1.5213466, 0.5846333}, -{2.6122558, 1.4687427, 0.5740991}, -{2.6716106, 1.6038194, 0.5403182}, -{1.9728063, 2.6637034, 1.8147571}, -{1.9580905, 2.5805175, 1.7697475}, -{2.0609922, 2.6559629, 1.8511666}, -{1.7066898, 1.8547826, 0.1471348}, -{1.7573370, 1.9352055, 0.1357625}, -{1.7496407, 1.7911437, 0.0899717}, -{0.5658315, 1.5258391, 0.2610209}, -{0.6092113, 1.5584588, 0.1821763}, -{0.5485848, 1.4335406, 0.2424235}, -{2.4318130, 1.0374688, 0.2389770}, -{2.4746926, 1.0667633, 0.1585687}, -{2.4794953, 0.9583632, 0.2640970}, -{2.3650434, 2.5692599, 1.7612191}, -{2.3511376, 2.6254137, 1.6849585}, -{2.3557591, 2.6279974, 1.8362259}, -{1.8930471, 0.6180154, 2.2579937}, -{1.8850559, 0.7129375, 2.2673881}, -{1.8557535, 0.5992481, 2.1718583}, -{0.8676053, 2.2363732, 0.4351578}, -{0.8953149, 2.1514175, 0.4008502}, -{0.7720591, 2.2311814, 0.4376682}, -{2.0940671, 2.9197986, 0.4874092}, -{2.1292098, 2.8985815, 0.5738796}, -{1.9995917, 2.9269311, 0.5010420}, -{2.1916382, 3.1198616, 2.4406855}, -{2.2147779, 3.2012827, 2.4853787}, -{2.2357416, 3.0514913, 2.4911103}, -{0.4691071, 0.5663696, 0.5270882}, -{0.4525084, 0.6603482, 0.5344919}, -{0.5250099, 0.5579332, 0.4498482}, -{0.4161572, 2.6283128, 0.1017281}, -{0.4712690, 2.5568910, 0.1337269}, -{0.3663519, 2.5897014, 0.0296801}, -{2.2261381, 3.1628003, 0.7525169}, -{2.1510873, 3.1064224, 0.7337754}, -{2.2644422, 3.1260028, 0.8321477}, -{1.7423459, 2.3331251, 0.7393015}, -{1.8010900, 2.2706535, 0.6967722}, -{1.6965648, 2.3759987, 0.6669947}, -{2.9650052, 2.9106493, 1.8666363}, -{2.9880989, 2.9578836, 1.9466232}, -{2.8949318, 2.8511584, 1.8933365}, -{2.0993907, 2.8824348, 2.1586714}, -{2.0258322, 2.8352075, 2.1196709}, -{2.0737469, 2.8955362, 2.2499571}, -{3.0903430, 1.1845149, 2.3457496}, -{3.0222211, 1.1173600, 2.3492107}, -{3.1313045, 1.1726857, 2.2600493}, -{0.5575735, 2.6423945, 1.2428064}, -{0.5241982, 2.7191076, 1.2893200}, -{0.6513630, 2.6417232, 1.2619221}, -{0.7655202, 2.7303152, 1.5237868}, -{0.7157991, 2.8115053, 1.5337009}, -{0.8552235, 2.7590845, 1.5068171}, -{1.6539570, 2.8571241, 3.1058025}, -{1.6745796, 2.8963537, 3.0209613}, -{1.5677329, 2.8922098, 3.1280894}, -{2.1644347, 0.7679061, 0.5410000}, -{2.1929455, 0.7347377, 0.4558572}, -{2.1026931, 0.7020806, 0.5728950}, -{1.5911506, 1.2584882, 2.2015827}, -{1.5928532, 1.2019148, 2.1243892}, -{1.6826020, 1.2833070, 2.2151101}, -{2.9239876, 2.4235945, 2.1005917}, -{2.9292433, 2.3765335, 2.1837780}, -{2.9328282, 2.3554709, 2.0339336}, -{1.8971509, 0.6944004, 0.2738664}, -{1.9796025, 0.6616040, 0.3097614}, -{1.9097196, 0.6920776, 0.1790036}, -{2.8964486, 0.9102153, 0.3082056}, -{2.9436123, 0.9860346, 0.2737191}, -{2.9504971, 0.8351527, 0.2835742}, -{0.7412165, 2.1810153, 2.9806244}, -{0.7570237, 2.1053522, 2.9241662}, -{0.6490657, 2.2026649, 2.9664176}, -{2.9512155, 1.4367526, 0.6172913}, -{2.8677461, 1.4722706, 0.5867359}, -{2.9279220, 1.3544866, 0.6603268}, -{2.4157205, 1.5753697, 3.0732467}, -{2.3567586, 1.5695081, 2.9980705}, -{2.4496496, 1.6648213, 3.0701570}, -{1.9269323, 2.9633610, 2.9636562}, -{1.9953382, 2.9022303, 2.9909689}, -{1.9691856, 3.0188584, 2.8981044}, -{1.0674497, 0.3315379, 2.9574826}, -{1.1624920, 0.3336736, 2.9686496}, -{1.0336113, 0.3097880, 3.0443401}, -{2.7274344, 2.2233546, 0.5808761}, -{2.7165220, 2.2875655, 0.5107322}, -{2.7745123, 2.1508176, 0.5398348}, -{0.0197255, 2.6463973, 1.6904681}, -{0.0143753, 2.6206718, 1.7825109}, -{0.0342286, 2.5642898, 1.6434542}, -{0.9279701, 1.7203976, 0.4752721}, -{0.9237586, 1.7280611, 0.5705918}, -{0.8759444, 1.7939811, 0.4430058}, -{2.4401717, 2.9929092, 0.6649299}, -{2.4900198, 2.9588854, 0.7392259}, -{2.3562014, 2.9471855, 0.6694720}, -{1.7161725, 0.5126162, 0.9947148}, -{1.6449056, 0.4496341, 1.0055137}, -{1.6721382, 0.5964975, 0.9810316}, -{0.7240379, 2.3807077, 1.0731586}, -{0.6435918, 2.4325619, 1.0717738}, -{0.7696083, 2.4093072, 1.1523277}, -{0.4328994, 2.9244270, 1.6131009}, -{0.4770735, 2.8569841, 1.6646998}, -{0.3630996, 2.9564276, 1.6702522}, -{0.2357902, 1.2145060, 0.2655490}, -{0.1854626, 1.2957638, 0.2603897}, -{0.1978721, 1.1675233, 0.3398266}, -{2.4134474, 1.6720803, 2.1030695}, -{2.3559372, 1.6001677, 2.0769260}, -{2.4348714, 1.6535847, 2.1945095}, -{1.8235912, 0.3928108, 2.8125515}, -{1.8649511, 0.4347727, 2.7371135}, -{1.8953170, 0.3784821, 2.8742964}, -{0.1954663, 3.0615437, 1.8188611}, -{0.1975980, 3.1410482, 1.7655994}, -{0.1225677, 3.0107784, 1.7832099}, -{0.2003201, 0.9331254, 2.5174694}, -{0.2729960, 0.9595453, 2.4610555}, -{0.2289434, 0.9562793, 2.6058261}, -{1.6736779, 3.0784504, 2.4393055}, -{1.6866149, 3.0111013, 2.5060818}, -{1.7519307, 3.0731218, 2.3844383}, -{2.6498284, 1.4220648, 3.0637672}, -{2.5899897, 1.4927036, 3.0880945}, -{2.6164446, 1.3902113, 2.9799032}, -{1.8238467, 1.7083244, 2.6639714}, -{1.7653881, 1.6410483, 2.6290598}, -{1.8206924, 1.7787460, 2.5992167}, -{0.6357475, 0.5198504, 0.2669439}, -{0.6590760, 0.6125314, 0.2616211}, -{0.6717437, 0.4814615, 0.1869883}, -{2.1645093, 2.6710515, 1.2976561}, -{2.2512760, 2.6309032, 1.3023452}, -{2.1498890, 2.7067878, 1.3852431}, -{1.9094465, 2.1285896, 2.7445493}, -{1.9423703, 2.1002295, 2.6592612}, -{1.8876108, 2.2209747, 2.7322807}, -{1.0030845, 0.6577297, 2.9544363}, -{1.0656595, 0.6050904, 3.0041935}, -{1.0158614, 0.6305588, 2.8635473}, -{2.9123678, 1.7329363, 0.4687765}, -{2.9046371, 1.6393651, 0.4501488}, -{2.9385073, 1.7369642, 0.5607701}, -{1.0824014, 2.0025227, 2.0471020}, -{1.1712251, 1.9997723, 2.0115335}, -{1.0928181, 1.9792726, 2.1393693}, -{1.3376243, 1.9620665, 0.2940955}, -{1.3901855, 1.8975013, 0.2468623}, -{1.2648521, 1.9116781, 0.3305306}, -{0.0930919, 0.6503953, 2.9970949}, -{0.0939617, 0.6647339, 3.0917308}, -{0.0918871, 0.7384329, 2.9595416}, -{2.8074789, 0.4225415, 0.6820116}, -{2.8124750, 0.3539194, 0.6154656}, -{2.7544007, 0.3843162, 0.7518961}, -{1.1339157, 1.7744818, 3.0830243}, -{1.2068850, 1.8184739, 3.0394065}, -{1.1452906, 1.6819571, 3.0612962}, -{1.6970062, 0.4446053, 0.1751104}, -{1.7529389, 0.5173151, 0.2024445}, -{1.6916878, 0.3881698, 0.2522405}, -{2.2371857, 2.3719399, 1.3476613}, -{2.3163056, 2.3615294, 1.2948033}, -{2.1652541, 2.3569093, 1.2863243}, -{1.9754658, 1.7986997, 0.5031732}, -{2.0018821, 1.8890376, 0.4857503}, -{1.9776397, 1.7910836, 0.5985650}, -{1.1827523, 2.4277849, 1.0796869}, -{1.1264278, 2.3505132, 1.0840435}, -{1.2580794, 2.3996203, 1.0277746}, -{2.9174871, 2.9954517, 2.6693654}, -{2.9434962, 2.9541180, 2.5870404}, -{3.0000622, 3.0130577, 2.7144620}, -{2.1268244, 1.5973812, 0.8367526}, -{2.1639965, 1.6093577, 0.9241432}, -{2.1104193, 1.6862896, 0.8053121}, -{2.8241251, 2.1166360, 0.9319483}, -{2.8400149, 2.1519609, 1.0194811}, -{2.7334909, 2.1405492, 0.9125593}, -{2.1044021, 1.8628262, 2.7146611}, -{2.1111798, 1.9124326, 2.7962429}, -{2.0665724, 1.9246318, 2.6521206}, -{0.3225958, 1.6343441, 2.9514580}, -{0.3879036, 1.5704181, 2.9799304}, -{0.2793887, 1.5928215, 2.8768165}, -{1.0221599, 1.7334803, 2.0014744}, -{0.9862989, 1.8222070, 2.0034456}, -{1.0920019, 1.7344157, 2.0669231}, -{2.0946009, 3.0818512, 2.7764700}, -{2.1512353, 3.0229399, 2.7266271}, -{2.1551130, 3.1401174, 2.8223574}, -{2.3593314, 1.8879915, 0.6143693}, -{2.3648212, 1.8882451, 0.7099314}, -{2.4500351, 1.8969924, 0.5851439}, -{2.2702684, 0.4653515, 2.6305857}, -{2.3406951, 0.4956426, 2.5732720}, -{2.3105071, 0.4601467, 2.7172809}, -{0.6625214, 1.9358430, 0.4474536}, -{0.6503104, 2.0242851, 0.4129398}, -{0.5918860, 1.8847452, 0.4079317}, -{2.4419846, 2.6034036, 1.2903799}, -{2.4524515, 2.5096142, 1.2743695}, -{2.4683018, 2.6448147, 1.2081921}, -{0.2388505, 2.8861618, 2.0316002}, -{0.1470522, 2.8600147, 2.0244093}, -{0.2489594, 2.9561069, 1.9670416}, -{2.5481868, 2.9444427, 1.5663530}, -{2.5004070, 3.0124109, 1.5188162}, -{2.6257753, 2.9278135, 1.5128196}, -{2.4184921, 0.5802947, 2.0611312}, -{2.4392235, 0.6186362, 1.9759113}, -{2.3403399, 0.6273153, 2.0901766}, -{0.3910323, 0.5905544, 2.9814229}, -{0.4570149, 0.5219214, 2.9715159}, -{0.3110933, 0.5523331, 2.9452121}, -{-0.0182588, 1.0194688, 0.7585768}, -{-0.0118893, 0.9788160, 0.8450007}, -{-0.0188073, 0.9458155, 0.6974440}, -{2.6328211, 2.1879127, 2.6426773}, -{2.5524304, 2.1943970, 2.6942291}, -{2.6933763, 2.2487893, 2.6849790}, -{1.1729031, 0.9964514, 0.3787578}, -{1.0920544, 0.9532434, 0.3512097}, -{1.1452578, 1.0578854, 0.4467571}, -{2.1395352, 2.0460222, 0.5045939}, -{2.1883287, 2.1201673, 0.4687612}, -{2.2070503, 1.9854224, 0.5351176}, -{0.4402409, 1.5850054, 2.0197873}, -{0.4712560, 1.5680047, 2.1087329}, -{0.3582837, 1.5359930, 2.0132220}, -{1.6543146, 0.3199280, 1.3946537}, -{1.7067885, 0.3994293, 1.4040531}, -{1.6927384, 0.2583514, 1.4570575}, -{1.4972435, 0.3155436, 0.9871106}, -{1.4596480, 0.2424876, 1.0362197}, -{1.4214578, 0.3625466, 0.9523317}, -{0.6701496, 2.8699224, 0.8155157}, -{0.6892066, 2.7763424, 0.8090401}, -{0.7043943, 2.8954678, 0.9011722}, -{0.2769080, 0.1755955, 1.9831259}, -{0.2970012, 0.2597972, 2.0239754}, -{0.1954684, 0.1475468, 2.0248773}, -{2.9895637, 1.6483345, 0.1066921}, -{2.9565566, 1.7248058, 0.1538617}, -{2.9358170, 1.5756881, 0.1382533}, -{1.5607988, 0.5254035, 2.0633485}, -{1.5195649, 0.5862818, 2.0020630}, -{1.6538327, 0.5282760, 2.0410159}, -{0.8412059, 0.0331898, 0.1249932}, -{0.8978999, -0.0420894, 0.1417604}, -{0.7691841, 0.0232719, 0.1872572}, -{1.6913196, 2.9723914, 1.3210536}, -{1.6528621, 2.9063368, 1.3786741}, -{1.6364878, 3.0498602, 1.3334777}, -{2.5328731, 2.1246798, 2.2569039}, -{2.6020193, 2.1626747, 2.2027051}, -{2.5629320, 2.0356505, 2.2751403}, -{2.3643424, 2.5766487, 2.5906930}, -{2.3065753, 2.5032980, 2.5695987}, -{2.3092392, 2.6369517, 2.6405878}, -{0.9836999, 2.7414150, 0.3170417}, -{0.9735875, 2.7602842, 0.4103370}, -{0.9428052, 2.6556599, 0.3053795}, -{0.3599092, 2.7081237, 2.7204304}, -{0.4149048, 2.6824727, 2.7944562}, -{0.2990420, 2.7723491, 2.7569351}, -{2.4164088, 0.6443670, 0.3540697}, -{2.4854667, 0.5890868, 0.3174989}, -{2.4545255, 0.7321482, 0.3560468}, -{2.3994186, 2.6241496, 0.9728600}, -{2.4524238, 2.5452232, 0.9617502}, -{2.4631503, 2.6954691, 0.9766145}, -{1.7376107, 1.7412398, 2.9520926}, -{1.7656901, 1.8293871, 2.9766674}, -{1.7717859, 1.7290385, 2.8635178}, -{1.6300310, 0.8114660, 0.6524494}, -{1.5638367, 0.8580234, 0.6013314}, -{1.6484904, 0.8695275, 0.7262764}, -{1.2669666, 1.9886229, 1.1955822}, -{1.3203849, 2.0087943, 1.1187582}, -{1.1852429, 1.9541877, 1.1595577}, -{1.3154730, 0.6569121, 2.5581789}, -{1.3863324, 0.6698116, 2.6212254}, -{1.3520533, 0.6861918, 2.4747109}, -{1.6831036, 0.6864319, 1.7295200}, -{1.6993969, 0.6900799, 1.6352675}, -{1.7175722, 0.7692140, 1.7630067}, -{1.8289160, 3.0614631, 0.8600294}, -{1.7482997, 3.0307453, 0.9014993}, -{1.8274205, 3.1563995, 0.8721608}, -{2.6750693, 1.1605911, 1.8848736}, -{2.7443922, 1.1827424, 1.9470508}, -{2.7081869, 1.0836994, 1.8384713}, -{1.9724337, 3.1950347, 1.8865892}, -{1.9900658, 3.2337449, 1.8008398}, -{2.0590019, 3.1742044, 1.9217223}, -{1.5872844, 2.2576742, 2.1886542}, -{1.5574524, 2.1916709, 2.1260769}, -{1.5096614, 2.2780178, 2.2408380}, -{2.9956219, 2.1640286, 2.9461095}, -{2.9492075, 2.2347262, 2.9012775}, -{3.0850956, 2.1690061, 2.9124644}, -{1.7096837, 0.1986772, 1.6432632}, -{1.7577829, 0.2314066, 1.7192736}, -{1.6195177, 0.2273192, 1.6578255}, -{2.1386294, 0.5438677, 0.3314573}, -{2.1290076, 0.4511681, 0.3096279}, -{2.2318320, 0.5618356, 0.3190979}, -{0.7650658, 2.1376100, 2.5213192}, -{0.7453382, 2.1935925, 2.4462252}, -{0.8592409, 2.1480541, 2.5348947}, -{0.9856669, 1.7171329, 0.1437816}, -{1.0476937, 1.6825552, 0.2079640}, -{1.0381499, 1.7313635, 0.0650076}, -{1.6421061, 2.3907270, 1.4804719}, -{1.6646216, 2.3975062, 1.3876849}, -{1.5484291, 2.4101036, 1.4838643}, -{2.4316094, 1.0387940, 0.9552670}, -{2.3654730, 0.9945975, 0.9020224}, -{2.5094423, 1.0412549, 0.8996045}, -{0.5132794, 1.2429434, 0.2308677}, -{0.4291947, 1.2120869, 0.2646311}, -{0.5579326, 1.1635065, 0.2015728}, -{1.6820676, 2.8520205, 0.7613563}, -{1.6945373, 2.9387486, 0.7228199}, -{1.6015561, 2.8193259, 0.7212157}, -{2.0702898, 0.2868189, 1.0423578}, -{2.0247016, 0.2033347, 1.0530548}, -{2.0126762, 0.3385284, 0.9860631}, -{1.9843912, 1.1566390, 1.4450015}, -{1.9972804, 1.1227024, 1.3564323}, -{2.0231953, 1.2441182, 1.4430146}, -{2.2182362, 2.5653105, 0.5130404}, -{2.1488578, 2.5471571, 0.5764393}, -{2.2462270, 2.4789231, 0.4827738}, -{2.3975186, 2.1903710, 2.7691264}, -{2.3945692, 2.1455278, 2.8536408}, -{2.3894451, 2.2832127, 2.7909794}, -{2.0788777, 2.2758670, 2.0997748}, -{2.0342002, 2.1918125, 2.1098297}, -{2.0531607, 2.3064048, 2.0127783}, -{0.1783671, 1.8784395, 2.5981960}, -{0.1578446, 1.9712187, 2.5866559}, -{0.0981172, 1.8328270, 2.5728629}, -{1.6632726, 2.3131890, 1.0135151}, -{1.6594592, 2.2180502, 1.0036955}, -{1.7045476, 2.3439610, 0.9328195}, -{1.4803901, 2.6592510, 1.2223798}, -{1.5306160, 2.6779396, 1.3016919}, -{1.5277244, 2.5874052, 1.1804275}, -{0.6837543, 1.7004693, 2.4274294}, -{0.7508138, 1.7466190, 2.3770754}, -{0.6404389, 1.7691039, 2.4781775}, -{1.1411927, 1.4649131, 2.2682679}, -{1.1664184, 1.5003501, 2.3535333}, -{1.1898483, 1.3827926, 2.2611153}, -{3.0779069, 0.6804932, 1.1097274}, -{3.0244229, 0.6217276, 1.0563568}, -{3.1430690, 0.6233280, 1.1503271}, -{0.1969125, 0.7999193, 0.4099044}, -{0.1111407, 0.7587862, 0.3992464}, -{0.2579998, 0.7390308, 0.3683924}, -{2.8264813, 1.4989989, 0.3259530}, -{2.8100045, 1.4170247, 0.2793585}, -{2.7631485, 1.4989008, 0.3977252}, -{0.5845742, 2.2724712, 1.5652804}, -{0.6492001, 2.3415713, 1.5798061}, -{0.6321878, 2.1911905, 1.5822725}, -{1.3550177, 2.5894437, 0.5522795}, -{1.4319309, 2.6198018, 0.5040606}, -{1.3148459, 2.6694622, 0.5861265}, -{0.3492166, 0.6444935, 0.2208706}, -{0.4288977, 0.6562431, 0.1691484}, -{0.2789139, 0.6406725, 0.1560226}, -{2.4670827, 1.8028463, 1.2799479}, -{2.5121534, 1.7487937, 1.2150692}, -{2.3769743, 1.8083243, 1.2481233}, -{1.3075612, 0.4356000, 0.8103200}, -{1.2694739, 0.5167696, 0.7768060}, -{1.2515557, 0.3664850, 0.7749812}, -{0.4910012, 2.0979931, 2.1243012}, -{0.4323250, 2.1473954, 2.1815627}, -{0.5286052, 2.1638915, 2.0659432}, -{0.0578629, 2.7593703, 0.8114767}, -{0.0531583, 2.7730706, 0.7168590}, -{0.1514677, 2.7516351, 0.8299326}, -{2.2404411, 0.0327961, 1.8300445}, -{2.2604232, 0.0136552, 1.9216778}, -{2.3100979, 0.0922798, 1.8022606}, -{0.0974365, 0.9283392, 3.0126777}, -{0.1524632, 0.9092092, 2.9367275}, -{0.0957323, 1.0239197, 3.0175543}, -{2.6784375, 2.9037516, 0.7836549}, -{2.6834912, 2.9627857, 0.7084768}, -{2.7663460, 2.9055664, 0.8214850}, -{0.0836577, 2.1209667, 2.8446317}, -{0.1585192, 2.1382492, 2.7875404}, -{0.0965081, 2.0308964, 2.8743730}, -{2.5167794, 0.3068167, 2.7316771}, -{2.4714971, 0.3364888, 2.8106162}, -{2.5992029, 0.3554861, 2.7316215}, -{0.5038749, 2.3738491, 1.3183770}, -{0.5218666, 2.4678626, 1.3180954}, -{0.5158341, 2.3474476, 1.4096035}, -{1.2454827, 0.0940776, 3.0993612}, -{1.3358598, 0.1254011, 3.1029875}, -{1.2016215, 0.1390790, 3.1715651}, -{0.1842959, 1.7456124, 1.6979568}, -{0.1849337, 1.7568830, 1.6029048}, -{0.1703129, 1.6518023, 1.7108592}, -{0.4536920, 2.5917311, 0.5849202}, -{0.5092427, 2.6263988, 0.5151020}, -{0.3643268, 2.6058743, 0.5536767}, -{2.4967804, 0.2426428, 3.1782391}, -{2.4980402, 0.1970108, 3.0941055}, -{2.4711294, 0.1755416, 3.2414987}, -{0.9008789, 1.7600172, 0.7647498}, -{0.8557037, 1.6999091, 0.8239828}, -{0.8542477, 1.8430156, 0.7747053}, -{2.1795778, 3.1438193, 2.1036255}, -{2.1984453, 3.1826649, 2.1890502}, -{2.1416118, 3.0583544, 2.1240375}, -{0.7482341, 0.7066222, 1.7839291}, -{0.7457371, 0.7127150, 1.8794223}, -{0.8371063, 0.6770926, 1.7641289}, -{2.8649092, 1.4900875, 2.8105652}, -{2.8910971, 1.5242095, 2.7250538}, -{2.9152474, 1.5418168, 2.8734336}, -{2.4295516, 0.1482109, 2.0379190}, -{2.5178802, 0.1531281, 2.0013645}, -{2.4299416, 0.0684588, 2.0908508}, -{2.4314852, 0.0500857, 1.4687470}, -{2.5098026, 0.0887686, 1.4296020}, -{2.3872767, 0.1234905, 1.5114048}, -{0.4156466, 0.3368271, 3.1477161}, -{0.4013515, 0.2740769, 3.0768614}, -{0.5108376, 0.3418472, 3.1564214}, -{3.1115756, 1.8532823, 1.1165141}, -{3.1038578, 1.8718256, 1.2101030}, -{3.1279166, 1.9386638, 1.0764481}, -{1.6271554, 1.0081229, 1.3328984}, -{1.5640870, 0.9454293, 1.2974836}, -{1.7114986, 0.9797754, 1.2976145}, -{1.8857219, 2.2685883, 1.6731218}, -{1.9564896, 2.3233678, 1.6391591}, -{1.8152303, 2.3301859, 1.6930959}, -{1.4594719, 1.1599877, 3.0658443}, -{1.3769027, 1.1850663, 3.0244234}, -{1.4352641, 1.1370650, 3.1555710}, -{0.5770164, 1.2694687, 0.8353566}, -{0.5626905, 1.3266805, 0.7599651}, -{0.6655903, 1.2353351, 0.8230325}, -{1.7655202, 0.8793496, 2.1394968}, -{1.8459513, 0.9261115, 2.1169915}, -{1.7559942, 0.8135606, 2.0706246}, -{2.4673088, 1.8584262, 0.8801485}, -{2.5091872, 1.7842855, 0.9238712}, -{2.5398793, 1.9156744, 0.8552797}, -{0.5073391, 2.3540635, 0.6927225}, -{0.4743643, 2.4407256, 0.6689599}, -{0.5985147, 2.3691397, 0.7176631}, -{1.1869973, 0.0069852, 0.2298261}, -{1.1808685, -0.0878405, 0.2413521}, -{1.1511999, 0.0433212, 0.3108234}, -{2.6046932, 1.8357429, 2.6378818}, -{2.5620329, 1.7680523, 2.6904216}, -{2.5475156, 1.9120628, 2.6461482}, -{1.8136911, 2.0696192, 2.0584218}, -{1.7304506, 2.1157048, 2.0479598}, -{1.7914154, 1.9771662, 2.0475340}, -{0.9730627, 2.7394595, 1.1390134}, -{1.0245099, 2.6876483, 1.0771174}, -{0.9680254, 2.6849234, 1.2175167}, -{1.6381097, 1.0507834, 0.3490207}, -{1.7185095, 1.0168779, 0.3883727}, -{1.6668882, 1.0922463, 0.2676884}, -{2.0200162, 2.6963561, 2.3652277}, -{2.0146904, 2.6140289, 2.4137683}, -{1.9629277, 2.6832588, 2.2895198}, -{2.9405653, 0.9576076, 1.0373093}, -{2.8530388, 0.9189986, 1.0340291}, -{2.9971676, 0.8921455, 0.9964042}, -{0.6476248, 1.1184535, 2.7290316}, -{0.5692672, 1.1727514, 2.7204208}, -{0.6327927, 1.0453197, 2.6690836}, -{2.8419216, 1.9384192, 0.7193613}, -{2.9187410, 1.9840723, 0.6850558}, -{2.8316519, 1.9723067, 0.8082910}, -{2.3169124, 2.2255061, 0.7560075}, -{2.2458146, 2.1635633, 0.7724544}, -{2.2726915, 2.3083384, 0.7374169}, -{1.0748703, 0.6871912, 2.6919115}, -{1.1633543, 0.6619518, 2.6655319}, -{1.0861098, 0.7714646, 2.7358887}, -{0.0774770, 3.0752191, 2.2247641}, -{0.0322728, 3.0844369, 2.1408956}, -{0.1659322, 3.0471282, 2.2013359}, -{2.9438622, 1.2409064, 2.8600609}, -{3.0338154, 1.2337920, 2.8281209}, -{2.9221046, 1.3335679, 2.8499239}, -{2.2378011, 1.9386177, 1.6808851}, -{2.1502020, 1.9167708, 1.7126883}, -{2.2467830, 2.0323760, 1.6979440}, -{1.4227408, 1.7841775, 2.0304794}, -{1.3511722, 1.7759745, 2.0935109}, -{1.4981122, 1.7449850, 2.0745864}, -{1.4887103, 2.0467927, 2.0331962}, -{1.4610412, 1.9555509, 2.0416610}, -{1.4193860, 2.0881712, 1.9817734}, -{0.0340780, 1.5261482, 1.4595754}, -{0.0309649, 1.4909560, 1.3706140}, -{-0.0559048, 1.5532427, 1.4777769}, -{1.5224903, 0.1661578, 3.1212919}, -{1.5834048, 0.0935368, 3.1079524}, -{1.5457999, 0.2297104, 3.0536158}, -{0.0816482, 1.1037382, 0.4777234}, -{-0.0054210, 1.1374587, 0.4566475}, -{0.0707774, 1.0606782, 0.5625172}, -{3.0662675, 0.0358238, 3.0800355}, -{3.0017874, 0.0950806, 3.0413923}, -{3.0211925, -0.0030174, 3.1550148}, -{2.1593428, 2.3391256, 2.9319861}, -{2.1032333, 2.3909841, 2.8743250}, -{2.2481506, 2.3686316, 2.9118648}, -{0.1281719, 2.4506598, 2.5111132}, -{0.1391695, 2.3602154, 2.4817667}, -{0.0356916, 2.4570215, 2.5349717}, -{3.1226239, 1.6242535, 0.7353630}, -{3.0995426, 1.5518680, 0.6771402}, -{3.1099918, 1.5890747, 0.8234834}, -{1.4125627, 0.7544834, 1.5066402}, -{1.5054874, 0.7357658, 1.4933374}, -{1.3671398, 0.6900312, 1.4523724}, -{2.2307046, 0.1334562, 2.9098568}, -{2.2352242, 0.2284277, 2.8987977}, -{2.3199360, 0.1077771, 2.9331083}, -{2.4147241, 0.9624926, 1.2014419}, -{2.4173338, 0.9862739, 1.1087599}, -{2.3298683, 0.9196822, 1.2128040}, -{0.3278056, 0.3497300, 0.2765122}, -{0.3238836, 0.3216062, 0.1851011}, -{0.3548987, 0.4414351, 0.2722157}, -{1.6943099, 1.1554253, 0.1044712}, -{1.7826068, 1.1421489, 0.0699791}, -{1.6406220, 1.1722406, 0.0270299}, -{2.6309984, 2.7838564, 1.0509003}, -{2.6917503, 2.7881265, 0.9770539}, -{2.6740856, 2.7262693, 1.1140630}, -{1.0080870, 2.7048438, 3.0472586}, -{0.9533328, 2.6638126, 2.9803202}, -{1.0383178, 2.7862079, 3.0069065}, -{0.2450570, 2.9102933, 1.0437293}, -{0.1624881, 2.9273899, 0.9984260}, -{0.2892744, 2.8452327, 0.9891927}, -{2.9494078, 1.6749190, 2.9821687}, -{2.9955168, 1.6447038, 3.0604203}, -{2.9854581, 1.7619594, 2.9652374}, -{0.1694400, 1.8712778, 2.9085426}, -{0.1554771, 1.8561226, 3.0020182}, -{0.2422809, 1.8135924, 2.8855443}, -{1.5720148, 1.0467206, 2.0218225}, -{1.4992840, 0.9845018, 2.0229926}, -{1.6468091, 0.9967527, 2.0545540}, -{0.5403146, 2.4046991, 0.2466223}, -{0.4461326, 2.4044735, 0.2637111}, -{0.5476781, 2.3871424, 0.1528147}, -{2.0995874, 0.3659303, 1.8802744}, -{2.1237929, 0.4139685, 1.9594499}, -{2.1661038, 0.2975409, 1.8724772}, -{1.0650973, 2.2499113, 2.9354756}, -{1.0726751, 2.2797766, 3.0261009}, -{1.0327522, 2.1600947, 2.9424810}, -{1.2984168, 2.7431529, 2.4380839}, -{1.3929604, 2.7498395, 2.4514677}, -{1.2879024, 2.7392263, 2.3430243}, -{1.4565203, 1.7663779, 0.1348543}, -{1.4338349, 1.7116584, 0.0596648}, -{1.5445952, 1.7984421, 0.1154374}, -{3.1399758, -0.0423625, 2.7965226}, -{3.2185967, 0.0122339, 2.7970965}, -{3.0827310, -0.0026095, 2.8621354}, -{2.5306594, 0.5720270, 2.5160491}, -{2.5384653, 0.6671901, 2.5227857}, -{2.5802088, 0.5385793, 2.5908048}, -{2.6899960, 0.3582295, 0.9507697}, -{2.7641399, 0.3175577, 0.9956119}, -{2.6363668, 0.3945415, 1.0212512}, -{0.6902657, 2.3005016, 2.2870040}, -{0.6894908, 2.3943555, 2.2682106}, -{0.6131379, 2.2663736, 2.2417393}, -{2.5247357, 0.5532851, 2.9779058}, -{2.6188681, 0.5666595, 2.9668372}, -{2.4915044, 0.6386741, 3.0055954}, -{0.1179873, 2.0958440, 1.1574721}, -{0.1355803, 2.0228438, 1.2168335}, -{0.0511194, 2.1476064, 1.2023237}, -{1.5558029, 0.2133368, 2.8050687}, -{1.6320791, 0.2615435, 2.7731256}, -{1.5888454, 0.1252776, 2.8228476}, -{2.2854686, 0.6192090, 0.9841476}, -{2.2769921, 0.5244450, 0.9736479}, -{2.2989523, 0.6520451, 0.8952528}, -{2.3667128, 0.9250924, 2.3055813}, -{2.4424987, 0.9140886, 2.2481554}, -{2.3200226, 1.0004370, 2.2694492}, -{1.9677237, 1.0523200, 1.0342212}, -{2.0233085, 1.0823415, 0.9623089}, -{1.9137887, 0.9833126, 0.9956038}, -{2.3559983, 1.4335123, 1.9380755}, -{2.3143001, 1.3761598, 1.8737774}, -{2.3997135, 1.5005588, 1.8855774}, -{0.4134667, 0.9046849, 2.3572011}, -{0.4558387, 0.9416404, 2.2797334}, -{0.4836853, 0.8977156, 2.4218779}, -{2.6924975, 2.1439743, 2.0269926}, -{2.7326546, 2.0818164, 1.9662790}, -{2.6759059, 2.2219243, 1.9739755}, -{2.6284773, 0.3836095, 2.3307583}, -{2.5941298, 0.4711865, 2.3484461}, -{2.5716243, 0.3250368, 2.3807514}, -{1.8803731, 2.3842695, 0.4355615}, -{1.8798169, 2.4318342, 0.3524976}, -{1.8605776, 2.2937701, 0.4114720}, -{2.6924810, 1.8923845, 2.3447378}, -{2.7598052, 1.9572178, 2.3653877}, -{2.6542296, 1.8697431, 2.4295111}, -{2.6249464, 1.9061662, 0.5953382}, -{2.6323190, 1.8429006, 0.5238859}, -{2.7128584, 1.9101166, 0.6329973}, -{2.6076162, 2.5701380, 3.0335496}, -{2.6677387, 2.5419466, 3.1024904}, -{2.6125462, 2.6657186, 3.0350802}, -{1.5122189, 3.1265650, 1.8181751}, -{1.4799637, 3.1000898, 1.9043202}, -{1.6075225, 3.1220202, 1.8258495}, -{1.8299207, 1.3329990, 0.2640091}, -{1.8301125, 1.4149491, 0.2145474}, -{1.7451856, 1.2931889, 0.2440728}, -{0.5316945, 1.5592256, 2.2813120}, -{0.4518418, 1.5885963, 2.3251665}, -{0.6027361, 1.5979660, 2.3324451}, -{2.9166615, 2.7822528, 0.3998055}, -{2.8848722, 2.7744152, 0.3098592}, -{2.8474503, 2.7431941, 0.4531586}, -{2.5691409, 0.4548870, 0.5015772}, -{2.6536095, 0.4764507, 0.5411038}, -{2.5312700, 0.5396491, 0.4782638}, -{2.6013222, 2.1316431, 1.6272650}, -{2.5512021, 2.1818557, 1.6915221}, -{2.6112919, 2.0451207, 1.6669741}, -{2.7762497, 2.5853784, 1.5046865}, -{2.8082089, 2.5061338, 1.5478282}, -{2.6887524, 2.5988407, 1.5410913}, -{1.7334777, 2.9228179, 2.6780596}, -{1.7071803, 2.8325360, 2.6959462}, -{1.8275672, 2.9174840, 2.6612954}, -{2.1924148, 0.8201565, 1.1411474}, -{2.1310017, 0.8714425, 1.0886067}, -{2.2162249, 0.7464081, 1.0849640}, -{1.3730979, 2.0394664, 2.5198331}, -{1.3042439, 2.0504677, 2.5854106}, -{1.4379100, 2.1064291, 2.5416892}, -{2.5736449, 2.9831073, 0.0836388}, -{2.5608346, 2.9276924, 0.0066490}, -{2.4965141, 3.0397620, 0.0854724}, -{1.4419829, 0.9275831, 0.4852401}, -{1.3516345, 0.9527029, 0.4660442}, -{1.4950252, 0.9844165, 0.4293939}, -{2.7263858, 0.0255740, 0.2659463}, -{2.6674101, -0.0366571, 0.2233850}, -{2.6833131, 0.0465600, 0.3488117}, -{2.4774864, 2.4371593, 2.8288701}, -{2.4705143, 2.4932880, 2.7516477}, -{2.5212538, 2.4916883, 2.8942406}, -{0.8026680, 1.9471198, 2.2784607}, -{0.8066015, 2.0375145, 2.3096964}, -{0.7294235, 1.9462367, 2.2168429}, -{2.5729823, 1.1345458, 2.4081481}, -{2.5286508, 1.0644181, 2.3604078}, -{2.5020039, 1.1896266, 2.4411704}, -{1.9751326, 0.5175521, 2.5637033}, -{1.9343443, 0.5366905, 2.4792502}, -{2.0661366, 0.4970486, 2.5422513}, -{0.1967940, 1.4434991, 1.6574012}, -{0.1624022, 1.3597503, 1.6884766}, -{0.1463652, 1.4622028, 1.5782216}, -{2.7913561, 2.3253985, 1.1589936}, -{2.7053022, 2.3509755, 1.1257839}, -{2.8461013, 2.4027979, 1.1457810}, -{1.6231042, 2.0624797, 2.6664689}, -{1.7179431, 2.0626185, 2.6794262}, -{1.5868346, 2.0665226, 2.7549589}, -{0.3104896, 0.1964314, 2.4028001}, -{0.4005939, 0.1641288, 2.4025290}, -{0.2613456, 0.1307365, 2.3534913}, -{0.4801207, 1.8029326, 0.3165997}, -{0.4853454, 1.8542775, 0.2359850}, -{0.4884645, 1.7120612, 0.2877019}, -{1.4978380, 2.2259724, 0.3303875}, -{1.4651126, 2.2369201, 0.4196709}, -{1.4411120, 2.2816815, 0.2770867}, -{0.8192873, 0.3351430, 1.0569626}, -{0.7311190, 0.3205921, 1.0912691}, -{0.8329266, 0.4295257, 1.0652204}, -{1.4837136, 3.1090648, 0.5654399}, -{1.4706005, 3.1891510, 0.5146800}, -{1.4706029, 3.0382953, 0.5023361}, -{0.1713183, 0.1698114, 1.0012348}, -{0.2421246, 0.1070507, 1.0157218}, -{0.1687364, 0.1815066, 0.9062670}, -{2.1886995, 0.2739622, 0.3003096}, -{2.2397885, 0.2403584, 0.3739507}, -{2.1196077, 0.2089744, 0.2874551}, -{0.0977938, 2.5101287, 0.3073728}, -{0.0273581, 2.4458516, 0.3157142}, -{0.1034575, 2.5273938, 0.2133932}, -{0.5691461, 0.6407880, 1.3655373}, -{0.6211444, 0.6348892, 1.4456853}, -{0.5336394, 0.5527176, 1.3534868}, -{2.6818466, 2.6728892, 1.8471429}, -{2.6471665, 2.7598612, 1.8670294}, -{2.7552669, 2.6619856, 1.9075823}, -{1.7084965, 0.6117907, 2.9007463}, -{1.7354469, 0.5206087, 2.8897078}, -{1.6763160, 0.6165242, 2.9907703}, -{1.5665411, 2.7092948, 0.3919005}, -{1.5883380, 2.6926634, 0.3001911}, -{1.6357704, 2.6653881, 0.4413155}, -{0.1412743, 3.0210686, 0.4142155}, -{0.1689279, 3.1115446, 0.3996656}, -{0.2154174, 2.9682965, 0.3845469}, -{1.0791244, 2.5914304, 0.8701317}, -{1.1134054, 2.5423033, 0.9447886}, -{1.0689853, 2.5259895, 0.8010160}, -{2.8018105, 0.0911528, 2.7258992}, -{2.8065507, 0.1580159, 2.6575677}, -{2.8675892, 0.0263713, 2.7006245}, -{1.9499904, 2.0575554, 1.7958398}, -{1.9517512, 2.1506608, 1.7736896}, -{1.9109522, 2.0544491, 1.8831822}, -{2.6255288, 0.8416124, 0.2570413}, -{2.6402500, 0.7578790, 0.2130604}, -{2.7131407, 0.8717937, 0.2810326}, -{0.1816655, 0.6137471, 2.6060712}, -{0.2347539, 0.6630254, 2.6686459}, -{0.1215705, 0.6785799, 2.5693612}, -{2.3025656, 2.7687774, 2.8959382}, -{2.2255301, 2.7542970, 2.8410001}, -{2.2669506, 2.7855468, 2.9831889}, -{1.0463766, 0.5807963, 1.8975348}, -{1.0510879, 0.6245729, 1.8125423}, -{1.1096504, 0.6275216, 1.9520830}, -{0.5656075, 0.5001264, 1.8929697}, -{0.5104013, 0.4459974, 1.9494022}, -{0.6279483, 0.5412912, 1.9528146}, -{2.9750881, 0.8177684, 1.3271333}, -{2.8869309, 0.8470758, 1.3040743}, -{3.0097799, 0.7802228, 1.2462066}, -{2.4705625, 2.7679639, 2.1987462}, -{2.4445944, 2.8151028, 2.1195888}, -{2.4760032, 2.6763964, 2.1713946}, -{1.3880258, 2.6865900, 3.0969064}, -{1.3163033, 2.7464504, 3.1177607}, -{1.4512186, 2.6993568, 3.1676595}, -{0.3509495, 2.8923845, 3.0801346}, -{0.3434520, 2.7996082, 3.1024659}, -{0.4399460, 2.9017243, 3.0461538}, -{0.4903889, 2.7930729, 2.0505636}, -{0.5479558, 2.8565421, 2.0932252}, -{0.4075779, 2.8397112, 2.0391827}, -{1.7699884, 2.4431291, 1.2271723}, -{1.8505506, 2.3998263, 1.1989429}, -{1.7020149, 2.4064844, 1.1706119}, -{2.9029887, 1.3710126, 3.1286442}, -{2.8246801, 1.4119716, 3.0918689}, -{2.9221394, 1.2983812, 3.0693126}, -{1.6130558, 1.4725082, 1.7352284}, -{1.5518103, 1.5419221, 1.7108767}, -{1.6065126, 1.4671561, 1.8305744}, -{3.1397207, 1.9945855, 2.3015561}, -{3.1353478, 1.9384363, 2.3789542}, -{3.0798821, 1.9537962, 2.2389631}, -{0.3949067, 2.9258466, 0.6705651}, -{0.4709734, 2.9140766, 0.7274653}, -{0.4127097, 3.0071521, 0.6232918}, -{3.0299635, 1.2020303, 1.1165897}, -{3.1127799, 1.1939232, 1.1638975}, -{3.0056479, 1.1119417, 1.0952561}, -{2.0978274, 2.7156467, 0.3127277}, -{2.1271322, 2.6584606, 0.3836735}, -{2.1040201, 2.8039861, 0.3490612}, -{2.1807039, 2.3496640, 0.0716857}, -{2.1377301, 2.3515029, -0.0138256}, -{2.2676618, 2.3137658, 0.0540234}, -{1.7215401, 1.4077606, 2.7046404}, -{1.6620761, 1.3894458, 2.7773793}, -{1.8029150, 1.3633423, 2.7284620}, -{1.7330210, 1.1147840, 1.5747122}, -{1.8217411, 1.1369550, 1.5464362}, -{1.6968881, 1.0636398, 1.5023174}, -{2.6346588, 0.3984129, 1.6939337}, -{2.6315162, 0.3995763, 1.7895950}, -{2.7146292, 0.4462310, 1.6720135}, -{1.5191864, 0.2961522, 0.6581619}, -{1.5537578, 0.3702723, 0.7078948}, -{1.4680111, 0.3362350, 0.5878997}, -{0.2004574, 3.0660729, 2.5926342}, -{0.2477710, 3.0287805, 2.6670184}, -{0.1896886, 3.1585159, 2.6150091}, -{0.1795199, -0.0038878, 0.0987707}, -{0.2450917, -0.0282750, 0.1641000}, -{0.2305372, 0.0288638, 0.0246971}, -{1.3248554, 0.8683960, 1.7367622}, -{1.3846464, 0.9389083, 1.7615688}, -{1.3728558, 0.8184092, 1.6707349}, -{1.7504369, 0.1422913, 0.6147918}, -{1.7431371, 0.1821367, 0.7015177}, -{1.6714638, 0.0888817, 0.6062480}, -{2.7387052, 0.3553921, 3.1785345}, -{2.7845435, 0.2997507, 3.1155646}, -{2.6482046, 0.3242791, 3.1765554}, -{2.6148498, 0.7964693, 1.4880434}, -{2.5736783, 0.7127299, 1.4667144}, -{2.6450012, 0.8304797, 1.4038026}, -{2.3495355, 1.1754516, 1.3497258}, -{2.3607902, 1.0921180, 1.3039966}, -{2.3553238, 1.2415850, 1.2807680}, -{0.4353878, 0.3820456, 1.5257384}, -{0.3938323, 0.3502594, 1.6058950}, -{0.4056132, 0.4726551, 1.5176320}, -{0.9295611, 0.8956001, 0.2000573}, -{0.8350658, 0.8902312, 0.2143448}, -{0.9386707, 0.9129547, 0.1063655}, -{1.4049870, 0.7978808, 2.0359037}, -{1.4295891, 0.7698684, 1.9477428}, -{1.3092798, 0.7990299, 2.0348353}, -{2.5306070, 0.5991201, 1.1398703}, -{2.4381361, 0.5974384, 1.1151997}, -{2.5466666, 0.5130143, 1.1784733}, -{0.9687269, 2.7747042, 1.8995974}, -{0.9627817, 2.8394580, 1.9698393}, -{0.9071020, 2.8056521, 1.8332127}, -{1.3227631, 1.2302064, 2.2660830}, -{1.4163550, 1.2308165, 2.2460206}, -{1.2881211, 1.1560227, 2.2164946}, -{1.7512839, 0.2250929, 2.1313398}, -{1.8272624, 0.2777204, 2.1562383}, -{1.7039401, 0.2110837, 2.2133439}, -{1.0839202, 1.1653127, 0.6037248}, -{1.0919524, 1.2424824, 0.5476655}, -{1.1531528, 1.1758065, 0.6689861}, -{2.3581777, 0.0260032, 0.1423269}, -{2.2657423, 0.0306057, 0.1178970}, -{2.3573680, -0.0010692, 0.2341351}, -{1.8426915, 1.6059464, 1.4092997}, -{1.7590424, 1.5708569, 1.4398591}, -{1.8606557, 1.5580159, 1.3284154}, -{0.8064958, 0.5554397, 1.2307745}, -{0.7289842, 0.5052969, 1.2560725}, -{0.8047711, 0.6324768, 1.2875603}, -{1.2599907, 0.5939665, 3.0980814}, -{1.2691231, 0.5925769, 3.1933546}, -{1.2851076, 0.6828355, 3.0729065}, -{0.4800295, 1.5222170, 1.6447350}, -{0.3873410, 1.5014110, 1.6564944}, -{0.5252059, 1.4389705, 1.6585704}, -{2.4475930, 2.3083363, 1.2044363}, -{2.4966061, 2.3420968, 1.1294681}, -{2.4725156, 2.2160714, 1.2097616}, -{2.6589081, 2.1279862, 0.1576333}, -{2.6110067, 2.0990782, 0.2353000}, -{2.7446806, 2.1544590, 0.1908686}, -{1.0363584, 2.8064733, 1.5268457}, -{1.0586085, 2.8891451, 1.5696547}, -{1.1099524, 2.7893653, 1.4680787}, -{0.5510727, 2.3512003, 2.8521211}, -{0.6332073, 2.3547084, 2.8030913}, -{0.4830378, 2.3497522, 2.7848048}, -{0.4952797, 1.2100240, 2.0142486}, -{0.5275091, 1.2906578, 2.0545201}, -{0.5217193, 1.1407759, 2.0748122}, -{2.5178335, 0.1176064, 2.9165335}, -{2.5412207, 0.1753540, 2.8438659}, -{2.5792062, 0.0444683, 2.9097133}, -{0.8187293, 1.9986755, 1.4016023}, -{0.7710190, 2.0610754, 1.3469005}, -{0.7589167, 1.9245538, 1.4111280}, -{1.4728122, 1.3859321, 2.8991032}, -{1.4587699, 1.3140646, 2.9607489}, -{1.3986496, 1.3806151, 2.8388209}, -{1.3014560, 0.8436833, 3.0745077}, -{1.3074479, 0.9006813, 2.9978418}, -{1.3503966, 0.8898742, 3.1425777}, -{1.9087021, 2.6298242, 2.1058505}, -{1.9201282, 2.6603231, 2.0158417}, -{1.8563963, 2.5500786, 2.0976601}, -{0.9054506, 2.4282083, 2.6327283}, -{0.8863584, 2.4634962, 2.7196338}, -{0.9664054, 2.4911458, 2.5941834}, -{1.2586957, 2.0744982, 0.5610318}, -{1.3342080, 2.0275252, 0.5256233}, -{1.2827300, 2.1669164, 0.5544323}, -{1.2518879, 0.5671206, 0.2365493}, -{1.3274175, 0.6047231, 0.2817560}, -{1.2761087, 0.4757713, 0.2213517}, -{3.0219123, 2.7466364, 2.2767417}, -{3.0711491, 2.8272052, 2.2924499}, -{2.9777675, 2.7289622, 2.3598151}, -{0.8582447, 3.1670966, 1.1694672}, -{0.8875280, 3.2143433, 1.0915407}, -{0.9240960, 3.1873560, 1.2359163}, -{0.0038469, 0.7847276, 0.6169617}, -{0.0779865, 0.7733558, 0.5574947}, -{0.0044736, 0.7059679, 0.6713568}, -{3.1170006, 0.8190389, 2.5153515}, -{3.0575826, 0.8864714, 2.5482860}, -{3.2031174, 0.8608262, 2.5155480}, -{1.9652737, 1.4425920, 2.9377396}, -{2.0151646, 1.4219960, 3.0167904}, -{1.9103730, 1.5169072, 2.9627492}, -{1.3188924, 0.4760696, 2.1924744}, -{1.3996352, 0.4896055, 2.1428790}, -{1.3237176, 0.5396119, 2.2638986}, -{1.4347501, 0.6146016, 1.8483202}, -{1.5193791, 0.6154105, 1.8036034}, -{1.3708142, 0.6304707, 1.7788747}, -{0.4456893, 3.1379304, 1.4651777}, -{0.5092069, 3.1217446, 1.3954221}, -{0.4419083, 3.0555208, 1.5137231}, -{2.1169109, 0.7536042, 2.7579327}, -{2.0910583, 0.6635768, 2.7382090}, -{2.0341971, 0.8012184, 2.7652543}, -{1.5652953, 1.6619564, 2.2565403}, -{1.5854269, 1.5880219, 2.3139048}, -{1.6419784, 1.7188772, 2.2630260}, -{0.1761453, 0.2433042, 0.7191616}, -{0.2574431, 0.2011135, 0.6913600}, -{0.1585464, 0.3084597, 0.6512841}, -{0.9435512, 1.5972958, 1.0838647}, -{0.8891071, 1.5937151, 1.0052179}, -{0.8847567, 1.6293589, 1.1522567}, -{0.3819503, 0.6129280, 2.3973424}, -{0.3762604, 0.6921765, 2.3439605}, -{0.3157636, 0.6250986, 2.4654124}, -{2.6811609, 2.4277942, 0.4119397}, -{2.7416344, 2.4658539, 0.3482472}, -{2.6527293, 2.5020096, 0.4652877}, -{0.4030445, 1.3460102, 3.0967066}, -{0.4591890, 1.3985289, 3.0396812}, -{0.4576855, 1.3266494, 3.1728764}, -{1.3702827, 2.0878034, 1.6741318}, -{1.3038356, 2.0485530, 1.7307579}, -{1.3277836, 2.0948401, 1.5886529}, -{2.3918698, 2.0607550, 3.0298843}, -{2.4516749, 1.9956182, 3.0665295}, -{2.3921282, 2.1320937, 3.0937049}, -{1.3311570, 1.1889328, 1.5413749}, -{1.3171700, 1.2666187, 1.5955188}, -{1.3851117, 1.1313642, 1.5955697}, -{1.3754525, 3.0503197, 2.4060762}, -{1.4039202, 2.9625347, 2.3806653}, -{1.4280932, 3.0711653, 2.4832561}, -{1.9567870, 1.4318113, 0.6819604}, -{1.8700578, 1.4693604, 0.6971409}, -{2.0112586, 1.4683965, 0.7516503}, -{2.9423621, 1.3357537, 2.5515339}, -{2.9779451, 1.2560376, 2.5122719}, -{2.9733512, 1.4063106, 2.4947562}, -{2.4080093, 2.0804567, 1.4177169}, -{2.3948739, 2.0749922, 1.5123738}, -{2.5001240, 2.1044598, 1.4076649}, -{2.3567281, 3.0459533, 0.3781683}, -{2.4243994, 3.0325921, 0.4445338}, -{2.2803476, 2.9993062, 0.4121153}, -{2.3118653, 2.9657631, 2.6277521}, -{2.3387802, 2.8857317, 2.6728396}, -{2.3793721, 3.0297866, 2.6502492}, -{0.0577515, 0.5731999, 0.7641753}, -{0.0976642, 0.5208078, 0.6947177}, -{0.1247690, 0.5775940, 0.8323784}, -{1.8601680, 0.4999086, 1.4532056}, -{1.9040521, 0.5073493, 1.5379472}, -{1.9315184, 0.4968365, 1.3894718}, -{1.5070741, 0.8040556, 0.1836065}, -{1.4712406, 0.8918966, 0.1963444}, -{1.5374415, 0.7777457, 0.2704853}, -{1.7712666, 0.1931646, 0.8888435}, -{1.7156495, 0.2065247, 0.9655935}, -{1.8165898, 0.2766773, 0.8772786}, -{2.0003176, 1.8135760, 1.5097251}, -{2.0644631, 1.7550149, 1.5499529}, -{1.9522568, 1.7579616, 1.4484100}, -{3.0066166, 1.9350818, 1.7294935}, -{3.0548406, 1.9888599, 1.6666868}, -{3.0745792, 1.8895013, 1.7791506}, -{1.9339449, 3.0864971, 2.2927847}, -{2.0113969, 3.1336472, 2.3234501}, -{1.8930785, 3.1459305, 2.2298567}, -{0.5246730, 1.1523991, 1.2730669}, -{0.5607160, 1.0816915, 1.2195537}, -{0.4345460, 1.1621406, 1.2423333}, -{1.4752135, 2.9869986, 0.1199273}, -{1.5301914, 3.0653548, 0.1201423}, -{1.4334352, 2.9868169, 0.2060485}, -{0.4807925, 2.8096166, 2.3832920}, -{0.5242536, 2.7251828, 2.3712761}, -{0.4791700, 2.8224371, 2.4781356}, -{2.7278583, 0.1479281, 1.9331664}, -{2.7807584, 0.1422473, 2.0127380}, -{2.7512717, 0.0697106, 1.8832049}, -{1.9597518, 2.5236468, 0.1941712}, -{2.0087907, 2.5931265, 0.2381040}, -{2.0269435, 2.4689927, 0.1534216}, -{3.0577097, 0.0104346, 2.3951399}, -{3.0696013, -0.0568313, 2.4621937}, -{3.1235120, -0.0100642, 2.3287158}, -{0.0503257, 2.6132927, 0.0179723}, -{0.1175449, 2.6292272, -0.0482846}, -{0.0542255, 2.6900740, 0.0749962}, -{2.1274817, 1.2711593, 1.1985012}, -{2.2122004, 1.2968286, 1.1620851}, -{2.0910788, 1.2105064, 1.1340158}, -{1.8364943, 1.3688014, 2.0995231}, -{1.9092083, 1.4086003, 2.0516584}, -{1.8777823, 1.3258936, 2.1744668}, -{0.0739148, 2.3967023, 2.1931899}, -{-0.0174703, 2.3725951, 2.1780264}, -{0.0795781, 2.4108989, 2.2876818}, -{2.2549210, 0.3471862, 2.1506524}, -{2.3138540, 0.4170884, 2.1223166}, -{2.3026340, 0.2664289, 2.1315727}, -{2.3484154, 3.0481751, 0.9806470}, -{2.3261731, 3.0955923, 1.0607670}, -{2.3965256, 2.9711757, 1.0109587}, -{2.2179503, 0.7006577, 0.1023799}, -{2.2622323, 0.6163726, 0.1122502}, -{2.1391966, 0.6805616, 0.0518196}, -{0.7009133, 0.5118978, 1.5750181}, -{0.6857030, 0.5407835, 1.6649991}, -{0.6412537, 0.4379861, 1.5631816}, -{1.0599874, 1.0254687, 1.8140311}, -{1.1344073, 0.9654043, 1.8099986}, -{1.0232608, 1.0240673, 1.7256483}, -{2.7995517, 1.6421175, 2.2849586}, -{2.7594092, 1.7279366, 2.2713220}, -{2.8072653, 1.6341182, 2.3800316}, -{1.1964225, 1.2442608, 3.0020304}, -{1.1488432, 1.2846853, 3.0745864}, -{1.1391861, 1.2562066, 2.9262438}, -{1.2582548, 1.3975308, 2.7385454}, -{1.2849500, 1.3442296, 2.6636546}, -{1.1628805, 1.3897024, 2.7407332}, -{1.3727419, 2.3292923, 0.6072516}, -{1.3637116, 2.4215243, 0.5832930}, -{1.4349844, 2.3294196, 0.6799715}, -{0.4720281, 1.4438807, 2.6037078}, -{0.4348327, 1.5000658, 2.5357220}, -{0.4271033, 1.3600718, 2.5927465}, -{2.7598340, 1.0835303, 2.2218809}, -{2.7208519, 1.1385658, 2.2898059}, -{2.6850328, 1.0492729, 2.1729572}, -{3.1069696, 2.1410177, 1.5432065}, -{3.1697423, 2.1978660, 1.5878179}, -{3.0695818, 2.1960058, 1.4743533}, -{0.0976564, 0.2636926, 1.4859658}, -{0.1858591, 0.2388001, 1.4583439}, -{0.0396137, 0.2100778, 1.4319397}, -{2.4487021, 0.8086901, 3.0926871}, -{2.4476974, 0.7773923, 3.1831403}, -{2.3590052, 0.8378996, 3.0764518}, -{0.5438285, 0.5230525, 0.9622471}, -{0.5553451, 0.5409409, 1.0555729}, -{0.5467362, 0.4276066, 0.9556175}, -{0.0781672, 0.6923328, 0.1082874}, -{0.0821160, 0.7836114, 0.1368345}, -{0.0292727, 0.6477082, 0.1774271}, -{0.2624735, 1.1551951, 1.1807169}, -{0.2004147, 1.0899185, 1.2131202}, -{0.2521836, 1.1528730, 1.0855799}, -{1.6744248, 1.8008915, 1.1667128}, -{1.6285946, 1.8511794, 1.2340407}, -{1.6339184, 1.7142205, 1.1698241}, -{2.6040447, 1.4496174, 0.8913774}, -{2.6449902, 1.4965341, 0.8186822}, -{2.6560528, 1.3698009, 0.9006956}, -{0.2601544, 0.4503772, 2.0475431}, -{0.2023901, 0.4335500, 1.9730953}, -{0.2137979, 0.5160950, 2.0994520}, -{2.6007965, 0.8975061, 2.8955967}, -{2.6848202, 0.9324279, 2.9253087}, -{2.5612082, 0.8601260, 2.9743230}, -{1.3620640, 2.2744751, 2.7047627}, -{1.3148892, 2.1926513, 2.7203107}, -{1.3390578, 2.3299248, 2.7793171}, -{2.6262171, 2.0707726, 1.1897259}, -{2.7108147, 2.0366647, 1.2187467}, -{2.5695157, 1.9937692, 1.1855137}, -{1.4359728, 2.6843631, 1.8278337}, -{1.5264907, 2.6716165, 1.7994372}, -{1.4008222, 2.7495949, 1.7672400}, -{2.9826963, 2.1665154, 1.9968896}, -{2.9739537, 2.0764747, 2.0281711}, -{3.0637021, 2.1663959, 1.9458959}, -{1.2973957, 2.7848566, 1.3854614}, -{1.3706677, 2.7834625, 1.4470373}, -{1.3384026, 2.7959476, 1.2996842}, -{0.7103327, 0.2266322, 2.0201559}, -{0.6624266, 0.1512562, 1.9857209}, -{0.6460723, 0.2735989, 2.0733259}, -{2.3740916, 0.2641172, 1.7183168}, -{2.4665785, 0.2874096, 1.7264402}, -{2.3553259, 0.2727974, 1.6248565}, -{0.6539319, 1.1159453, 3.0130606}, -{0.6151905, 1.1306308, 2.9267716}, -{0.7419660, 1.1529309, 3.0063992}, -{0.2868564, 2.8157725, 0.3000911}, -{0.2439032, 2.7639899, 0.3681786}, -{0.3318088, 2.7511518, 0.2456321}, -{0.4422254, 1.0178227, 0.8603603}, -{0.4619318, 1.1114790, 0.8619307}, -{0.5276843, 0.9755004, 0.8521207}, -{2.3265414, 0.3939086, 0.8564739}, -{2.2616093, 0.3673321, 0.7913599}, -{2.3417661, 0.3151219, 0.9086580}, -{0.6676589, 0.1705779, 2.3975029}, -{0.6756334, 0.2589285, 2.4334600}, -{0.7521413, 0.1295132, 2.4159074}, -{2.5975468, 1.3132386, 1.6276039}, -{2.6059191, 1.3249506, 1.7222350}, -{2.5306058, 1.2455432, 1.6176777}, -{1.1880066, 2.2661233, 0.3135817}, -{1.0981436, 2.2987962, 0.3179903}, -{1.1792206, 2.1709912, 0.3194985}, -{2.5755207, 1.8249500, 0.1387399}, -{2.5933015, 1.7689778, 0.0631538}, -{2.6594393, 1.8668801, 0.1577623}, -{2.4734707, 1.4066199, 0.5109627}, -{2.4204309, 1.4825447, 0.4867853}, -{2.4225731, 1.3313121, 0.4809547}, -{1.8371361, 0.8486981, 2.8048358}, -{1.7684393, 0.9136233, 2.8199282}, -{1.7997704, 0.7664775, 2.8365517}, -{1.1105298, 1.4330255, 1.3863200}, -{1.0649740, 1.3588778, 1.4261836}, -{1.1162125, 1.4980797, 1.4563055}, -{0.3099379, 1.6383111, 2.4074712}, -{0.2802282, 1.7226297, 2.4416771}, -{0.2618147, 1.6274409, 2.3254449}, -{0.9264202, 0.3238065, 1.6520529}, -{0.8655177, 0.3955691, 1.6346366}, -{0.9294491, 0.3176000, 1.7475234}, -{1.0116186, 0.7359772, 0.4288653}, -{0.9709528, 0.7825761, 0.5019210}, -{0.9714028, 0.7740688, 0.3508009}, -{1.3361373, 1.2554296, 2.5386562}, -{1.3058383, 1.2246275, 2.4532423}, -{1.4316098, 1.2549831, 2.5317912}, -{2.2425704, 0.7408230, 1.4632007}, -{2.3160536, 0.7044901, 1.4137796}, -{2.1860182, 0.7800411, 1.3966717}, -{3.0553842, 0.2649164, 2.8699794}, -{3.1485467, 0.2807303, 2.8852439}, -{3.0406914, 0.2935229, 2.7798235}, -{2.1372261, 1.3440614, 0.2905213}, -{2.0962160, 1.4247363, 0.3216988}, -{2.0655325, 1.2807698, 0.2864563}, -{2.3307381, 0.1866001, 2.5753818}, -{2.2855699, 0.2709188, 2.5718441}, -{2.4017496, 0.2000829, 2.6381342}, -{1.0833068, 2.8470178, 0.7615794}, -{1.0690833, 2.7606366, 0.8002871}, -{1.0864471, 2.9065862, 0.8364397}, -{0.3623251, 3.0435689, 2.2972844}, -{0.2785820, 3.0354805, 2.3429353}, -{0.4105097, 2.9644671, 2.3214397}, -{0.8857377, 2.4947703, 0.2944232}, -{0.8894923, 2.4367588, 0.3704684}, -{0.8452512, 2.4417186, 0.2258034}, -{1.9779747, 1.8063639, 3.1499050}, -{2.0411582, 1.8456892, 3.0897078}, -{1.9862815, 1.8577158, 3.2302561}, -{1.1908220, 2.9183037, 3.1372163}, -{1.2753683, 2.9535663, 3.1649795}, -{1.1789423, 2.9517586, 3.0483234}, -{0.4952239, 1.0498067, 1.5249703}, -{0.4568027, 1.1238357, 1.5719367}, -{0.5144137, 1.0841572, 1.4377114}, -{2.2359345, 1.0170424, 2.0071890}, -{2.3280659, 1.0340203, 2.0268326}, -{2.2155819, 1.0762365, 1.9347725}, -{1.3782040, 0.0759693, 0.8097746}, -{1.4345443, 0.1532422, 0.8056536}, -{1.4126267, 0.0175972, 0.7421722}, -{1.2422931, 1.5133779, 1.9214456}, -{1.1505818, 1.5370141, 1.9075642}, -{1.2565678, 1.5267962, 2.0151393}, -{1.8389672, 0.8415399, 0.9280325}, -{1.8681381, 0.8907551, 0.8512911}, -{1.7454374, 0.8607788, 0.9346927}, -{0.8927226, 1.7675180, 1.6565161}, -{0.8976919, 1.8571439, 1.6897550}, -{0.7989829, 1.7485004, 1.6528364}, -{2.2228556, 0.8379528, 1.7164080}, -{2.1699178, 0.9167445, 1.7040881}, -{2.2229228, 0.7954876, 1.6306233}, -{0.2698026, 1.2140538, 2.1767108}, -{0.2529713, 1.1207079, 2.1895788}, -{0.3419849, 1.2169420, 2.1139121}, -{2.7391052, 1.9126713, 1.7649392}, -{2.8299744, 1.9422660, 1.7595310}, -{2.7266493, 1.8591301, 1.6865778}, -{2.3747113, 2.7061195, 1.5247794}, -{2.4392781, 2.7766004, 1.5196891}, -{2.3925593, 2.6517019, 1.4480821}, -{0.3006252, 1.6412710, 0.8356324}, -{0.3723614, 1.5839050, 0.8625652}, -{0.2214249, 1.5905367, 0.8533990}, -{1.7957482, 2.5739479, 2.9876835}, -{1.8338466, 2.5923607, 3.0735426}, -{1.7145841, 2.5270491, 3.0070541}, -{1.4368535, 0.3352306, 1.9036559}, -{1.3937789, 0.4206726, 1.9010942}, -{1.5006974, 0.3427109, 1.9745807}, -{1.7035219, 0.7274143, 1.4574734}, -{1.7704358, 0.7906924, 1.4313828}, -{1.7510592, 0.6448955, 1.4671272}, -{0.5750977, 1.0059313, 0.0932132}, -{0.5710027, 0.9150814, 0.0633492}, -{0.5800413, 1.0574189, 0.0126719}, -{0.5564135, 0.2605693, 0.3781363}, -{0.4826293, 0.3137148, 0.3482405}, -{0.6268649, 0.3236294, 0.3930473}, -{0.8879394, 0.3189079, 0.5408441}, -{0.8022988, 0.3447097, 0.5749363}, -{0.8918928, 0.3583165, 0.4537025}, -{0.6368139, 1.4299282, 1.3409469}, -{0.6185046, 1.3408658, 1.3110306}, -{0.5596210, 1.4543949, 1.3919855}, -{2.6125345, 0.5573406, 0.1715766}, -{2.5268982, 0.5257256, 0.1427805}, -{2.6753173, 0.5010124, 0.1263246}, -{2.3316493, 1.3659341, 0.8266759}, -{2.4169753, 1.3907931, 0.8622266}, -{2.3076239, 1.4385241, 0.7690930}, -{0.0964187, 0.5227888, 1.3446517}, -{0.0710482, 0.4827441, 1.2614948}, -{0.0902909, 0.4516167, 1.4083643}, -{0.0829173, 0.4389164, 1.8617699}, -{0.0188174, 0.3683772, 1.8529531}, -{0.0361945, 0.5080044, 1.9087396}, -{2.0621390, 1.9826493, 0.1898954}, -{2.0276511, 2.0133421, 0.2737456}, -{2.1536107, 2.0108488, 0.1898540}, -{3.1369369, 1.9597030, 0.3665094}, -{3.2322447, 1.9516017, 0.3701272}, -{3.1104913, 1.9722722, 0.4576409}, -{1.5008806, 1.7127411, 1.6635536}, -{1.4334896, 1.6991546, 1.5969490}, -{1.4593754, 1.7696612, 1.7283590}, -{1.1440319, 1.3541757, 0.4041499}, -{1.1229982, 1.4433519, 0.3764460}, -{1.2378782, 1.3454177, 0.3874619}, -{1.7399809, 1.9273679, 0.9332316}, -{1.6646295, 1.9334503, 0.8745163}, -{1.7038747, 1.8933383, 1.0150890}, -{2.2254562, 2.2585287, 1.6134764}, -{2.2474477, 2.2960548, 1.5282092}, -{2.3049419, 2.2694616, 1.6656758}, -{1.1171644, 2.3445690, 0.0248279}, -{1.1218464, 2.4401436, 0.0224015}, -{1.1611505, 2.3204968, 0.1063637}, -{1.0162044, 2.3311110, 0.6762432}, -{0.9330834, 2.3219445, 0.7228178}, -{0.9997697, 2.2926910, 0.5901263}, -{0.4555077, 1.8146687, 2.6084244}, -{0.4706315, 1.7307880, 2.6519861}, -{0.3608442, 1.8277624, 2.6138740}, -{2.7968543, 1.3698206, 2.1103325}, -{2.8219607, 1.2975224, 2.1678214}, -{2.8092198, 1.4482900, 2.1637363}, -{2.0857346, 2.7811117, 1.5528104}, -{2.0467968, 2.6951411, 1.5687845}, -{2.0314517, 2.8417313, 1.6032183}, -{2.2890308, 1.2212012, 2.5729568}, -{2.3274086, 1.2643889, 2.6492739}, -{2.2632935, 1.1346865, 2.6048174}, -{1.0787848, 3.0672052, 1.6855893}, -{1.0602504, 3.1045113, 1.7717696}, -{1.0153041, 3.1088605, 1.6273025}, -{0.0535477, 0.4156323, 1.0987432}, -{0.0748139, 0.3227319, 1.0898223}, -{0.1044763, 0.4585694, 1.0300046}, -{2.8151472, 1.6627674, 2.5566719}, -{2.7366560, 1.6217108, 2.5929456}, -{2.7955837, 1.7564654, 2.5571885}, -{1.6388582, 1.0072900, 0.9860554}, -{1.5651438, 1.0174197, 1.0462708}, -{1.6428514, 1.0904793, 0.9388758}, -{1.7404536, 1.8222985, 1.6672299}, -{1.6546537, 1.7806705, 1.6589956}, -{1.8021894, 1.7492751, 1.6715417}, -{1.2139546, 2.0177982, 2.2813234}, -{1.1976271, 2.1117938, 2.2735426}, -{1.2865386, 2.0111518, 2.3433695}, -{3.1049421, 0.5888794, 2.3621013}, -{3.0881836, 0.6780815, 2.3925061}, -{3.1371839, 0.5428284, 2.4395745}, -{2.6799493, 2.9230719, 2.7866848}, -{2.7730765, 2.9370987, 2.7695713}, -{2.6364253, 2.9971824, 2.7445466}, -{0.3641657, 2.3802168, 1.0677546}, -{0.4211076, 2.4445310, 1.0255213}, -{0.4105327, 2.3561969, 1.1479759}, -{0.7618315, 1.5794432, 0.9042917}, -{0.6704191, 1.5690969, 0.9307314}, -{0.7707439, 1.5240682, 0.8267256}, -{0.6359447, 1.1848352, 2.4018316}, -{0.6313067, 1.2017098, 2.3077249}, -{0.6463569, 1.2714553, 2.4412124}, -{1.2351048, 2.0271101, 2.7447839}, -{1.1568714, 2.0312133, 2.7997842}, -{1.2846923, 1.9528102, 2.7791774}, -{1.2456524, 0.3256645, 0.4525646}, -{1.1809156, 0.3748535, 0.5030811}, -{1.2992094, 0.3928582, 0.4103865}, -{0.7556862, 2.4661913, 1.6265892}, -{0.7395440, 2.5605266, 1.6249799}, -{0.8466276, 2.4579396, 1.6552926}, -{0.8260964, 2.3254483, 0.0911579}, -{0.7558832, 2.2626174, 0.0742848}, -{0.9023297, 2.2887738, 0.0463718}, -{1.6331737, 1.1024398, 2.7435186}, -{1.6455392, 1.1294059, 2.6525118}, -{1.7105902, 1.1355556, 2.7890415}, -{0.9677421, 1.6113858, 2.5636478}, -{0.9663517, 1.7024894, 2.5343132}, -{1.0395074, 1.5714781, 2.5144599}, -{2.5660224, 3.0803170, 2.6024702}, -{2.5950162, 3.1606805, 2.5593033}, -{2.5933573, 3.0101724, 2.5433528}, -{0.8869738, 1.1518859, 0.8700740}, -{0.9517918, 1.0839946, 0.8513190}, -{0.9115184, 1.1852493, 0.9563685}, -{3.0257902, 2.2964959, 2.3496864}, -{3.0502350, 2.2041738, 2.3432519}, -{2.9420462, 2.2959244, 2.3960426}, -{1.2517210, 2.1214638, 1.4384080}, -{1.1679274, 2.0988321, 1.4787658}, -{1.2526510, 2.0725784, 1.3561178}, -{0.4305718, 3.1419902, 1.0083237}, -{0.3873617, 3.0568168, 1.0019433}, -{0.4812676, 3.1371171, 1.0893699}, -{1.3644257, 3.0883822, 2.1330495}, -{1.3914908, 3.1004667, 2.2240648}, -{1.3120431, 3.1659822, 2.1131339}, -{1.4146036, 2.1177473, 0.0039168}, -{1.3980973, 2.0818999, 0.0911224}, -{1.3498402, 2.1875386, -0.0059423}, -{0.7094560, 0.8785826, 1.5792762}, -{0.6292105, 0.9302812, 1.5863635}, -{0.7025702, 0.8139197, 1.6495159}, -{0.6496355, 0.9312085, 2.5145013}, -{0.6513420, 1.0163022, 2.4707010}, -{0.7254618, 0.8846105, 2.4792688}, -{3.0273600, 1.8817427, 2.8184712}, -{3.1139193, 1.9062132, 2.8511972}, -{2.9824645, 1.9651657, 2.8047850}, -{2.6148128, 1.6985336, 1.0512211}, -{2.6165502, 1.6157194, 1.0032514}, -{2.7035181, 1.7079744, 1.0859280}, -{1.7024044, 2.7548120, 1.7533125}, -{1.7879469, 2.7141705, 1.7394183}, -{1.7223430, 2.8396683, 1.7928622}, -{3.0269184, 2.4696856, 2.5985360}, -{2.9889321, 2.5568366, 2.5873976}, -{2.9718726, 2.4125433, 2.5449912}, -{0.4982267, 0.3756398, 2.1689804}, -{0.4044140, 0.3926267, 2.1775212}, -{0.5392890, 0.4366362, 2.2302637}, -{0.5869789, 0.3682275, 2.8731203}, -{0.5101604, 0.3934593, 2.8218896}, -{0.5657214, 0.2812235, 2.9068952}, -{0.2635264, 2.6120842, 3.0212820}, -{0.2189270, 2.5792561, 2.9432080}, -{0.3559363, 2.6152456, 2.9965284}, -{0.7083868, 0.7354725, 0.9857749}, -{0.7022269, 0.7913483, 0.9083006}, -{0.6678842, 0.6529561, 0.9590748}, -{2.2197351, 0.9254321, 2.9582534}, -{2.2167702, 0.8876944, 2.8703363}, -{2.2101679, 1.0196329, 2.9442179}, -{3.1491475, 0.6527516, 0.3592111}, -{3.0721505, 0.6566145, 0.4159459}, -{3.1543481, 0.5610986, 0.3321004}, -{3.0621328, 2.0667563, 0.6148865}, -{3.0438485, 2.1602972, 0.6237245}, -{3.1508319, 2.0563309, 0.6493258}, -{1.6317766, 0.6407083, -0.0126553}, -{1.6419039, 0.5632601, 0.0426759}, -{1.5978800, 0.7080299, 0.0463460}, -{1.0009934, 0.3013750, 0.0922772}, -{1.0016964, 0.2214704, 0.1449751}, -{0.9929279, 0.3721582, 0.1562069}, -{0.5605082, 2.7414403, 1.7774074}, -{0.5253539, 2.6554658, 1.8005347}, -{0.6414300, 2.7486346, 1.8280258}, -{0.6947666, 0.2842861, 1.3978655}, -{0.6694402, 0.2302165, 1.4726812}, -{0.7901115, 0.2902881, 1.4038358}, -{0.6101878, 0.9154677, 1.1724261}, -{0.6143345, 0.8522128, 1.1007048}, -{0.6894419, 0.8989867, 1.2235092}, -{2.9753797, 1.0134596, 2.6172900}, -{2.8986087, 1.0690041, 2.6308303}, -{3.0465896, 1.0598793, 2.6612978}, -{2.2822680, 3.1030238, 1.2549940}, -{2.3274419, 3.1165273, 1.3382964}, -{2.2011447, 3.0581105, 1.2787452}, -{1.7701722, 1.8111771, 1.9753196}, -{1.7733066, 1.8262787, 1.8808504}, -{1.7566202, 1.7168249, 1.9840554}, -{2.5437789, 0.3618323, 1.2548538}, -{2.4593298, 0.3213837, 1.2349905}, -{2.5805809, 0.3074680, 1.3245134}, -{0.4782381, 1.9667033, 2.8840842}, -{0.5435075, 2.0284605, 2.8510950}, -{0.4291491, 1.9399562, 2.8063850}, -{0.9045134, 0.9518442, 0.5894940}, -{0.9540883, 1.0329684, 0.6006073}, -{0.8311698, 0.9761444, 0.5329913}, -{2.3662844, 1.3024414, 1.0765351}, -{2.4259174, 1.2434769, 1.0303897}, -{2.3390732, 1.3657765, 1.0101234}, -{0.6106168, 0.7484567, 3.1370072}, -{0.6820384, 0.6880419, 3.1572881}, -{0.5833516, 0.7244438, 3.0484502}, -{1.3046842, 1.0524570, 0.1149894}, -{1.2792888, 1.0308271, 0.2047086}, -{1.2305200, 1.1021237, 0.0804176}, -{1.6493477, 1.2685547, 0.9073321}, -{1.5963700, 1.3482119, 0.9041045}, -{1.6724747, 1.2514557, 0.8160354}, -{3.1584666, 2.7831345, 0.5297047}, -{3.1878276, 2.8540163, 0.4724683}, -{3.0670056, 2.7689581, 0.5052860}, -{0.0373426, 2.1799271, 1.8313292}, -{0.1262948, 2.2127793, 1.8182691}, -{0.0462098, 2.0846880, 1.8276973}, -{0.9614489, 0.4020632, 2.7232616}, -{1.0090766, 0.3706807, 2.8001320}, -{1.0299172, 0.4280324, 2.6616173}, -{3.0225883, 1.9557900, 3.1486316}, -{3.0347302, 2.0360739, 3.0979423}, -{2.9382289, 1.9675652, 3.1923029}, -{2.8241189, 0.2119172, 2.9815228}, -{2.7983382, 0.1453756, 2.9177270}, -{2.9085684, 0.2439946, 2.9498742}, -{0.6039022, 0.0043588, 0.2745881}, -{0.5724478, 0.0816901, 0.3214156}, -{0.5286028, -0.0247847, 0.2231781}, -{1.2187631, 0.1436504, 1.4614822}, -{1.2740831, 0.1819976, 1.5295373}, -{1.1568975, 0.2131247, 1.4389366}, -{1.0051129, 1.2612547, 1.5662069}, -{1.0915146, 1.2880193, 1.5975234}, -{1.0010662, 1.1673676, 1.5844046}, -{0.2042321, 1.5368656, 0.0582412}, -{0.1303654, 1.4786365, 0.0760013}, -{0.2607277, 1.4866562, -0.0004919}, -{2.4575563, 1.4216624, 2.4120052}, -{2.5123312, 1.3890325, 2.3406098}, -{2.4763966, 1.5154368, 2.4157133}, -{1.4432062, 2.5901921, 2.8509750}, -{1.4324530, 2.6228037, 2.9403236}, -{1.3556067, 2.5614119, 2.8252780}, -{2.2973249, 0.4159571, 0.0844466}, -{2.2322936, 0.3708718, 0.1383034}, -{2.3643932, 0.3498030, 0.0674820}, -{2.7554412, 2.5295804, 0.1667269}, -{2.8079121, 2.6085231, 0.1534155}, -{2.8152144, 2.4574771, 0.1469638}, -{0.4160990, 2.8594222, 1.3304537}, -{0.4418439, 2.8681152, 1.4222359}, -{0.3297206, 2.9004057, 1.3258225}, -{1.4411770, 3.1191816, 1.4182117}, -{1.3676486, 3.1798580, 1.4268303}, -{1.4224942, 3.0497778, 1.4814286}, -{1.2647716, 2.2072051, 1.9244591}, -{1.2094479, 2.2287891, 1.8493876}, -{1.2818084, 2.2914164, 1.9666549}, -{1.1737952, 0.6458455, 0.6616418}, -{1.1026356, 0.5847244, 0.6806897}, -{1.1506348, 0.6839190, 0.5769286}, -{2.6655991, 0.0104607, 0.6621353}, -{2.5722485, -0.0103464, 0.6660158}, -{2.6746926, 0.0653163, 0.5842220}, -{3.0565600, 0.1322491, 1.0274438}, -{3.0386632, 0.1682179, 0.9405630}, -{3.1520410, 0.1323506, 1.0342053}, -{1.3714759, 2.3501286, 1.4318610}, -{1.3286681, 2.2670243, 1.4524394}, -{1.2993164, 2.4116318, 1.4187200}, -{2.7049947, 3.0241776, 1.1863878}, -{2.7435629, 3.0765183, 1.1161363}, -{2.6612117, 2.9520252, 1.1412281}, -{0.8444524, 2.9721177, 2.0767226}, -{0.7639600, 3.0236494, 2.0819929}, -{0.9123399, 3.0359168, 2.0547390}, -{2.9652443, 0.3185920, 1.8087306}, -{2.9686358, 0.3986419, 1.8611026}, -{2.8774993, 0.2835847, 1.8241456}, -{2.8914852, 0.2340791, 0.5198098}, -{2.8445039, 0.2390226, 0.4365594}, -{2.9813170, 0.2118646, 0.4953339}, -{2.7703333, 1.2493916, 1.0068625}, -{2.7507780, 1.1626571, 0.9714078}, -{2.8630848, 1.2453831, 1.0301739}, -{0.1431016, 1.8039907, 0.0255609}, -{0.1469479, 1.7093764, 0.0395487}, -{0.0495395, 1.8239355, 0.0222948}, -{2.3800447, 2.8291817, 1.8892094}, -{2.4514453, 2.8870721, 1.8625081}, -{2.3031325, 2.8634391, 1.8436762}, -{0.8811609, 1.5040027, 1.8720562}, -{0.7942673, 1.5419599, 1.8851362}, -{0.9416233, 1.5710795, 1.9037944}, -{0.5695389, 2.1242199, 1.2213295}, -{0.5434146, 2.2137878, 1.2427169}, -{0.5677768, 2.1209488, 1.1256815}, -{0.4053916, 3.0292370, 0.1664358}, -{0.3900151, 2.9690521, 0.2392620}, -{0.3914557, 2.9760663, 0.0880714}, -{1.1927717, 0.4109417, 1.6167749}, -{1.1715277, 0.5040579, 1.6104204}, -{1.1161733, 0.3717045, 1.6586731}, -{1.5763763, 2.2710221, 1.8324944}, -{1.5159253, 2.2181172, 1.8845433}, -{1.5599326, 2.2442050, 1.7420911}, -{0.4093866, 0.7332158, 2.0414753}, -{0.3199112, 0.7018553, 2.0546281}, -{0.4299661, 0.7096633, 1.9510095}, -{1.7330390, 1.4889997, 2.4308240}, -{1.7038001, 1.4806265, 2.5215836}, -{1.8252559, 1.4634261, 2.4329128}, -{1.3913872, 2.3206732, 0.9283059}, -{1.3793780, 2.4088647, 0.8930874}, -{1.4671086, 2.3281789, 0.9863771}, -{1.2089198, 2.6746218, 1.9751054}, -{1.1329070, 2.6939475, 1.9202337}, -{1.2837166, 2.7061605, 1.9243799}, -{0.5890986, 3.0790772, 2.1627178}, -{0.4988248, 3.0729468, 2.1939487}, -{0.6232688, 3.1585555, 2.2036805}, -{1.2166541, 1.4912672, 0.8850375}, -{1.2144715, 1.5208808, 0.9760353}, -{1.2190043, 1.5719792, 0.8336335}, -{0.3929374, 2.4166908, 2.6296842}, -{0.3123853, 2.4540238, 2.5939081}, -{0.4532323, 2.4908166, 2.6353600}, -{0.3114639, 0.3101141, 1.7569084}, -{0.2428187, 0.3767878, 1.7547219}, -{0.3005972, 0.2673259, 1.8418402}, -{2.9132736, 0.1175474, 2.1263003}, -{2.9270849, 0.2017349, 2.1697059}, -{2.8611581, 0.0667908, 2.1885102}, -{1.9376403, 0.0624538, 1.1536620}, -{1.8661312, 0.1148099, 1.1898228}, -{1.9608933, 0.0018421, 1.2240030}, -{0.3572373, 2.3461428, 2.1686046}, -{0.2641458, 2.3638611, 2.1551011}, -{0.3880852, 2.4194338, 2.2218883}, -{2.8058197, 2.8201935, 0.1379955}, -{2.8558288, 2.8700640, 0.0733865}, -{2.7200096, 2.8625703, 0.1397703}, -{0.0032191, 1.3178412, 0.0583843}, -{-0.0870978, 1.3429438, 0.0390181}, -{-0.0045278, 1.2345899, 0.1049840}, -{1.4019784, 2.8491273, 1.0312332}, -{1.3509171, 2.9135497, 1.0802722}, -{1.4098608, 2.7745283, 1.0906905}, -{3.1384165, 2.2356179, 0.2998803}, -{3.1539919, 2.1424508, 0.2844008}, -{3.1248205, 2.2422488, 0.3943975}, -{0.1766917, 1.2759365, 2.4302580}, -{0.0926461, 1.2367078, 2.4065988}, -{0.2310107, 1.2650838, 2.3521941}, -{2.7852686, 2.3465152, 2.7968276}, -{2.8202999, 2.4299998, 2.7657561}, -{2.7227402, 2.3707168, 2.8651416}, -{1.3052348, 0.9984819, 1.3300224}, -{1.3659059, 0.9256989, 1.3435867}, -{1.3118399, 1.0504208, 1.4101539}, -{0.5665875, 2.5657904, 0.9616940}, -{0.6406052, 2.5906358, 0.9063188}, -{0.5641475, 2.6328723, 1.0299317}, -{1.3789604, 2.6117959, 0.8826749}, -{1.4035150, 2.6849251, 0.9393452}, -{1.3072896, 2.6459482, 0.8292029}, -{1.1231798, 1.2684706, 0.1009370}, -{1.0395811, 1.3081253, 0.1254540}, -{1.1890062, 1.3221244, 0.1451012}, -{1.3146839, 1.7803098, 1.4397310}, -{1.3783042, 1.8518236, 1.4404731}, -{1.2644501, 1.7937746, 1.3593719}, -{0.6181195, 2.8710861, 2.7558751}, -{0.6334758, 2.9515848, 2.7064135}, -{0.5837644, 2.9009070, 2.8400936}, -{3.0433786, 0.6095236, 1.9042455}, -{3.0348730, 0.6262254, 1.8103784}, -{3.0194321, 0.6924630, 1.9455968}, -{0.5922686, 3.0903454, 1.2564812}, -{0.6017589, 2.9993296, 1.2284031}, -{0.6819376, 3.1235635, 1.2607625}, -{0.5298051, 2.6297219, 2.9687405}, -{0.5872862, 2.6192214, 2.8929250}, -{0.5883953, 2.6238899, 3.0442090}, -{2.1229208, 1.3933673, 1.4613689}, -{2.1419914, 1.4868130, 1.4532112}, -{2.1617556, 1.3540833, 1.3831963}, -{1.6378314, 2.1083882, 1.5303661}, -{1.5590011, 2.1169774, 1.5839787}, -{1.6549770, 2.1970444, 1.4986101}, -{0.0548068, 2.4056787, 1.5874181}, -{0.0379649, 2.4017434, 1.6815627}, -{0.1311119, 2.3493812, 1.5743634}, -{2.0513301, 2.2948194, 1.1478559}, -{2.0418756, 2.3710799, 1.0907834}, -{2.0595169, 2.2207823, 1.0877410}, -{3.1074679, 3.1528280, 1.9838440}, -{3.1186411, 3.1784902, 1.8923076}, -{3.0371504, 3.2091913, 2.0161080}, -{2.0026777, 1.5648769, 0.3575563}, -{1.9471527, 1.5215871, 0.4224044}, -{1.9863432, 1.6582900, 0.3705752}, -{1.4013414, 2.4371281, 0.1836060}, -{1.3123887, 2.4201729, 0.2146258}, -{1.4299861, 2.5135546, 0.2336139}, -{1.9036753, 1.1610706, 2.8527877}, -{1.9788580, 1.1120363, 2.8860374}, -{1.9114486, 1.2473512, 2.8935008}, -{1.7981428, 0.9360223, 1.8231894}, -{1.8202807, 0.9817236, 1.7420498}, -{1.8813568, 0.9284521, 1.8698845}, -{0.8310211, 1.4211509, 0.4774362}, -{0.8531735, 1.5132346, 0.4635730}, -{0.8909097, 1.3922095, 0.5462699}, -{1.9773309, 2.8987200, 2.5548930}, -{2.0199487, 2.9813850, 2.5322545}, -{1.9870089, 2.8445482, 2.4765727}, -{1.7714078, 2.9690788, 1.8952646}, -{1.8290691, 3.0413752, 1.9199778}, -{1.7443531, 2.9304695, 1.9785693}, -{1.1576182, 2.2739072, 2.2139947}, -{1.0659511, 2.2577624, 2.1916602}, -{1.1612816, 2.3674429, 2.2339940}, -{0.1692386, 2.3199816, 0.6361234}, -{0.2083765, 2.3162665, 0.7233973}, -{0.2368806, 2.2851541, 0.5780378}, -{1.7325711, 1.2802182, 1.1576484}, -{1.7153682, 1.2263449, 1.0804211}, -{1.6458421, 1.2991191, 1.1934694}, -{1.5517442, 0.1593315, 2.3385732}, -{1.4970188, 0.1945993, 2.4087420}, -{1.5940538, 0.0827458, 2.3773913}, -{3.1173022, 0.7253851, 1.6355147}, -{3.0367050, 0.7665376, 1.6043234}, -{3.1262453, 0.6465754, 1.5819297}, -{0.4227195, 0.8869654, 0.5421873}, -{0.3435740, 0.9263561, 0.5054901}, -{0.4129204, 0.8972611, 0.6368461}, -{0.8747801, 2.7889309, 0.5650900}, -{0.8024612, 2.8513725, 0.5593132}, -{0.9395840, 2.8323987, 0.6205276}, -{2.6194429, 1.6346452, 2.8110599}, -{2.6785974, 1.5594525, 2.8140764}, -{2.6389561, 1.6836895, 2.8909111}, -{1.2411548, 1.5650493, 2.4847836}, -{1.2860081, 1.5052148, 2.5445359}, -{1.2874902, 1.6481947, 2.4948928}, -{1.2991892, 3.0846007, 2.6954081}, -{1.3083119, 3.1420801, 2.6194134}, -{1.2610611, 3.0041823, 2.6601741}, -{0.2147928, 2.6448722, 0.4935245}, -{0.1477649, 2.6989579, 0.5352894}, -{0.1669554, 2.5933731, 0.4285495}, -{0.1807212, 1.4711146, 2.0624981}, -{0.1996624, 1.3838311, 2.0969241}, -{0.1004509, 1.4598783, 2.0115793}, -{0.8235514, 2.7261529, 2.5010455}, -{0.7985476, 2.8084054, 2.5431366}, -{0.9074425, 2.7032983, 2.5410738}, -{0.1462753, 2.1703548, 2.4059911}, -{0.0925189, 2.1098361, 2.3549023}, -{0.2221738, 2.1184173, 2.4325285}, -{1.2438588, 0.1641193, 2.0756547}, -{1.2992885, 0.2133559, 2.0151103}, -{1.2083662, 0.2303828, 2.1349144}, -{-0.0114480, 3.0997064, 0.6763304}, -{0.0750117, 3.0791123, 0.6407929}, -{-0.0465917, 3.0151856, 0.7043211}, -{2.7170119, 3.1574018, 2.2839265}, -{2.6215694, 3.1514716, 2.2796988}, -{2.7443438, 3.0751519, 2.3245499}, -{0.6330915, 1.9843358, 1.8078895}, -{0.6253412, 1.8905246, 1.8252592}, -{0.5511634, 2.0074372, 1.7641123}, -{2.0534453, 2.9919622, 1.3376404}, -{2.0972829, 2.9280908, 1.3938632}, -{1.9891379, 3.0339858, 1.3947448}, -{2.5595756, 0.1709327, 0.4758185}, -{2.4666584, 0.1480486, 0.4780633}, -{2.5609996, 0.2662174, 0.4848249}, -{0.0548360, 0.8625047, 0.9712372}, -{0.0126623, 0.8162499, 1.0436540}, -{0.1467003, 0.8691212, 0.9973043}, -{2.0341542, 2.4806106, 1.5604465}, -{1.9761295, 2.5296988, 1.5022588}, -{2.1108520, 2.4608510, 1.5066942}, -{1.0047096, 1.9007962, 1.0972116}, -{1.0000507, 1.8166556, 1.0518136}, -{1.0021937, 1.8780367, 1.1901524}, -{1.2617978, 1.1951837, 1.0913249}, -{1.3421923, 1.2399727, 1.1176497}, -{1.2454977, 1.1320611, 1.1614118}, -{0.7996933, 0.6517515, 2.0310485}, -{0.7762187, 0.6758864, 2.1206517}, -{0.8901224, 0.6210238, 2.0374298}, -{1.4593360, 1.7534411, 0.7454903}, -{1.5247875, 1.8225824, 0.7553853}, -{1.3933765, 1.7732067, 0.8119807}, -{1.1051767, 1.6330658, 1.5852716}, -{1.0175937, 1.6681831, 1.6013439}, -{1.1637462, 1.7074854, 1.5991877}, -{0.2079048, 2.9066741, 2.8539057}, -{0.1214557, 2.9459078, 2.8661365}, -{0.2533523, 2.9225912, 2.9366310}, -{2.1865406, 0.9325101, 0.2444057}, -{2.2764936, 0.9637669, 0.2540906}, -{2.1949701, 0.8493636, 0.1977375}, -{0.6729921, 1.0627122, 0.4464383}, -{0.6852199, 1.1570420, 0.4357299}, -{0.5797288, 1.0526611, 0.4654973}, -{0.7959678, 2.5415034, 1.3142992}, -{0.8250527, 2.4539328, 1.3397503}, -{0.8019554, 2.5930488, 1.3947327}, -{3.0055635, 0.3503016, 2.6268432}, -{2.9678719, 0.2925328, 2.5604773}, -{3.0900195, 0.3767663, 2.5903862}, -{2.4326243, 1.5049781, 1.4991169}, -{2.4792805, 1.4943874, 1.4162111}, -{2.4823234, 1.4520557, 1.5614991}, -{1.4261579, 0.5553307, 0.4757133}, -{1.5077444, 0.6050994, 0.4703242}, -{1.3696491, 0.6080198, 0.5322192}, -{2.7218502, 2.5943851, 0.8363311}, -{2.7340646, 2.5221584, 0.7747159}, -{2.8107097, 2.6211266, 0.8598078}, -{1.0416488, 2.5242288, 1.5851345}, -{1.0038087, 2.6118450, 1.5777966}, -{1.0884750, 2.5113771, 1.5026455}, -{2.0134747, 2.3873849, 2.3839467}, -{2.0232134, 2.3633554, 2.2918053}, -{2.0721650, 2.3278441, 2.4305587}, -{2.8217449, 0.2776686, 0.2574855}, -{2.8106289, 0.3073173, 0.1671544}, -{2.7752514, 0.1940790, 0.2611510}, -{0.8787520, 2.3601768, 1.9094853}, -{0.9504912, 2.3195858, 1.8608213}, -{0.9217461, 2.4063137, 1.9814937}, -{2.3661065, 2.0172884, 0.2111986}, -{2.4206848, 2.0699897, 0.2695605}, -{2.4251144, 1.9497740, 0.1776995}, -{0.3128650, 0.8508489, 1.0299500}, -{0.3612798, 0.8952302, 0.9603179}, -{0.3683545, 0.8601558, 1.1073878}, -{3.2687302, 0.6668844, 2.1616092}, -{3.2372091, 0.6135276, 2.2345598}, -{3.1936915, 0.7211916, 2.1374800}, -{3.0712218, 2.9063923, 3.0557213}, -{3.0603147, 3.0011432, 3.0638208}, -{3.1379335, 2.8843198, 3.1207190}, -{0.4015963, 1.2436870, 2.7785566}, -{0.4394538, 1.3002465, 2.8458631}, -{0.3104078, 1.2720333, 2.7719645}, -{1.7099200, 3.0845571, 0.2950869}, -{1.6771821, 2.9974043, 0.3173337}, -{1.6327249, 3.1409829, 0.2994852}, -{1.8933726, 2.8122535, 1.1608722}, -{1.8259989, 2.8493307, 1.1038777}, -{1.9202006, 2.8851507, 1.2168060}, -{1.8764712, 3.0338345, 0.5885882}, -{1.8749711, 3.0441291, 0.6837412}, -{1.8259276, 3.1081526, 0.5556570}, -{3.0098042, 1.4475008, 1.2419705}, -{2.9584754, 1.4286509, 1.3205347}, -{3.0155330, 1.3635283, 1.1963844}, -{2.6959419, 1.1972355, 1.2646970}, -{2.7069669, 1.1037581, 1.2820961}, -{2.7152138, 1.2066711, 1.1714131}, -{2.1227133, 2.5236011, 1.0088490}, -{2.2078486, 2.5662785, 0.9992088}, -{2.0977602, 2.5401940, 1.0997574}, -{1.3572713, 2.9221723, 1.6777587}, -{1.4286047, 2.9761715, 1.7117875}, -{1.2784710, 2.9744353, 1.6926379}, -{1.1480206, 1.5168741, 3.0389962}, -{1.1847718, 1.5075214, 3.1268838}, -{1.2044740, 1.4629923, 2.9835699}, -{2.3853214, 1.1214042, 1.6141469}, -{2.3935120, 1.0271659, 1.6287885}, -{2.3611999, 1.1292961, 1.5218530}, -{0.6311027, 0.1016174, 1.6243318}, -{0.5470228, 0.0855912, 1.5814829}, -{0.6106121, 0.1021853, 1.7178313}, -{2.7464151, 0.0516883, 0.9582975}, -{2.7487745, 0.0281757, 0.8655403}, -{2.8382161, 0.0514651, 0.9854056}, -{1.7304622, 3.1443882, 3.0445254}, -{1.7831426, 3.0679910, 3.0679896}, -{1.6914004, 3.1215546, 2.9601741}, -{0.7906733, 2.6265807, 0.8248448}, -{0.8177398, 2.6642723, 0.7411246}, -{0.8717912, 2.6191671, 0.8751165}, -{2.2210987, 1.6855260, 1.5843459}, -{2.2454548, 1.7748140, 1.6087747}, -{2.3038921, 1.6437551, 1.5606239}, -{1.3751395, 0.1810687, 2.5738945}, -{1.4360177, 0.1949804, 2.6464384}, -{1.3102928, 0.2508413, 2.5833299}, -{0.5880298, 0.0840732, 2.8679204}, -{0.6656166, 0.0619070, 2.9194109}, -{0.5998398, 0.0370806, 2.7853703}, -{0.3778510, 0.8465574, 1.3659148}, -{0.4621186, 0.8020369, 1.3570145}, -{0.3965478, 0.9223754, 1.4212717}, -{1.8169478, 2.4084704, 2.6322603}, -{1.8763278, 2.3982539, 2.5578833}, -{1.7327039, 2.4309149, 2.5927443}, -{1.5286326, 0.6991237, 0.9306894}, -{1.4654825, 0.6483302, 0.9816247}, -{1.4761937, 0.7672477, 0.8885992}, -{2.1650550, 2.2553799, 2.5896070}, -{2.2285602, 2.2476246, 2.5184083}, -{2.2146561, 2.2333372, 2.6684496}, -{2.2807362, 0.2346284, 1.2236534}, -{2.2768052, 0.1389937, 1.2245854}, -{2.2373331, 0.2595900, 1.1420728}, -{2.8195858, 0.9742986, 0.5854561}, -{2.8545740, 0.9761347, 0.4963787}, -{2.7532520, 0.9053121, 0.5837166}, -{0.3833745, 1.5915126, 0.5271609}, -{0.3588574, 1.6840245, 0.5288239}, -{0.4238288, 1.5789949, 0.4413176}, -{1.5773510, 2.7054133, 2.4832747}, -{1.6160283, 2.7219584, 2.5692553}, -{1.5794832, 2.6101697, 2.4739790}, -{1.9801409, 2.0747538, 0.9456382}, -{2.0582950, 2.0198128, 0.9516192}, -{1.9082919, 2.0171092, 0.9716601}, -{1.9932305, 2.0158625, 2.5114071}, -{2.0551198, 1.9690993, 2.4553247}, -{1.9353523, 2.0615161, 2.4503484}, -{3.1968195, 2.9231851, 1.6820378}, -{3.1059105, 2.9434977, 1.7040669}, -{3.1981800, 2.8280821, 1.6712724}, -{0.7788540, 0.7438078, 2.2681112}, -{0.8656738, 0.7805763, 2.2846253}, -{0.7445127, 0.7234683, 2.3551130}, -{0.3270538, 0.2149194, 1.3401216}, -{0.3678668, 0.2812125, 1.3958158}, -{0.3846343, 0.1387992, 1.3473684}, -{0.6344126, 3.1155276, 0.6873341}, -{0.6744579, 3.0585084, 0.7529656}, -{0.6638072, 3.0798850, 0.6035017}, -{1.7117327, 1.6924006, 0.5228162}, -{1.6474893, 1.7582760, 0.4964434}, -{1.7961580, 1.7298888, 0.4977297}, -{1.8567181, 0.0392962, 1.4579177}, -{1.9301559, 0.0872095, 1.4963043}, -{1.7790179, 0.0790635, 1.4972058}, -{1.9086214, 0.6294294, 1.1288141}, -{1.9087464, 0.7080273, 1.0741819}, -{1.8361641, 0.5768396, 1.0949532}, -{2.9234691, 1.3960860, 1.7451727}, -{2.9271364, 1.3906947, 1.6496750}, -{2.9322729, 1.3054395, 1.7746350}, -{2.5961757, 1.2563353, 2.8420835}, -{2.6273327, 1.1874938, 2.9008408}, -{2.6523974, 1.2492404, 2.7649403}, -{1.6142764, 2.0226736, 0.6866920}, -{1.6081376, 2.0269959, 0.5912669}, -{1.7064383, 2.0403221, 0.7055877}, -{3.0252733, 0.9035360, 2.1366932}, -{3.0901032, 0.9705459, 2.1150351}, -{2.9422460, 0.9509875, 2.1408343}, -{0.3319494, 2.7116714, 0.8738325}, -{0.3984171, 2.6437242, 0.8851265}, -{0.3495027, 2.7481673, 0.7871016}, -{1.0411624, 1.9672332, 2.8940678}, -{1.0226711, 1.9455589, 2.9854495}, -{1.0067858, 1.8929725, 2.8444099}, -{1.7266785, 1.2201580, 0.6559714}, -{1.7772967, 1.1410348, 0.6375423}, -{1.7925657, 1.2887030, 0.6670520}, -{1.6122648, 1.4786710, 1.4660317}, -{1.5936929, 1.4748776, 1.5598561}, -{1.6282101, 1.3876483, 1.4410727}, -{1.3454726, 0.4086000, 2.8940857}, -{1.3438760, 0.4810199, 2.9566567}, -{1.4329889, 0.4122240, 2.8554842}, -{1.4343236, 0.1044375, 1.1542399}, -{1.4511993, 0.0542683, 1.2339931}, -{1.3702918, 0.0520548, 1.1060910}, -{0.8520996, 1.4602600, 3.0048344}, -{0.9402733, 1.4945160, 3.0194719}, -{0.8466719, 1.3831707, 3.0613153}, -{0.6967915, 1.3418691, 2.1728470}, -{0.7880154, 1.3524149, 2.1458414}, -{0.6680800, 1.4303742, 2.1953154}, -{1.0052803, 1.2998366, 1.0771683}, -{1.0993463, 1.2829878, 1.0716901}, -{0.9988962, 1.3907951, 1.1062909}, -{1.0115093, 0.9496256, 3.0949585}, -{0.9555437, 0.8916498, 3.0432966}, -{1.0977333, 0.9081325, 3.0924931}, -{1.3767744, 2.0419605, 0.9587992}, -{1.4278080, 2.1229284, 0.9602434}, -{1.3064364, 2.0590961, 0.8961793}, -{1.4703686, 1.6017699, 1.2091622}, -{1.4902636, 1.5690289, 1.2968807}, -{1.3759071, 1.5894221, 1.1998417}, -{2.7590122, 1.1621137, 2.6325266}, -{2.6903048, 1.1850734, 2.5699611}, -{2.8235521, 1.2322922, 2.6240475}, -{2.2294898, 1.9993744, 0.9583678}, -{2.2312427, 2.0027003, 1.0540140}, -{2.3051903, 1.9457094, 0.9348770}, -{2.8789351, 2.0091159, 2.5091674}, -{2.9500446, 2.0648346, 2.5408087}, -{2.8025765, 2.0365949, 2.5599277}, -{0.5827035, 1.7015691, 1.8197843}, -{0.5567152, 1.6421258, 1.7494037}, -{0.5377286, 1.6679941, 1.8973233}, -{1.0069047, 2.5266273, 2.1008394}, -{0.9363064, 2.5817082, 2.1346667}, -{1.0701628, 2.5885010, 2.0643375}, -{3.1180861, 0.1087189, 0.3535311}, -{3.0665042, 0.0533218, 0.2949410}, -{3.1946742, 0.0556394, 0.3754203}, -{0.5493382, 1.4513609, 2.8746886}, -{0.6443306, 1.4460784, 2.8852177}, -{0.5364450, 1.4670707, 2.7811511}, -{1.4356462, 0.3477229, 0.1550310}, -{1.4349927, 0.2701838, 0.0989098}, -{1.5238546, 0.3835943, 0.1452937}, -{1.1569337, 2.1085799, 0.8135269}, -{1.1715567, 2.0675759, 0.7282792}, -{1.1338508, 2.1991546, 0.7928945}, -{0.0195547, 3.0829549, 1.4680568}, -{0.0578572, 3.0378070, 1.3928443}, -{0.0453315, 3.0299537, 1.5434806}, -{1.8353071, 0.3216239, 1.8446139}, -{1.8179893, 0.2730236, 1.9252391}, -{1.9288611, 0.3415372, 1.8482770}, -{1.6484077, 0.6708111, 2.4929168}, -{1.6130813, 0.6675719, 2.5818205}, -{1.6716806, 0.5801089, 2.4730723}, -{2.8151016, 1.8968704, 1.3717885}, -{2.9079685, 1.8750560, 1.3639020}, -{2.7726941, 1.8137376, 1.3930688}, -{0.2040334, 2.0451298, 0.1868566}, -{0.1912639, 1.9994447, 0.2699957}, -{0.1594761, 1.9902769, 0.1222956}, -{0.0877642, 2.6547077, 1.3253226}, -{0.0135259, 2.5946047, 1.3315399}, -{0.1619498, 2.6047463, 1.3594205}, -{2.0650411, 1.0560287, 1.6615973}, -{2.0590000, 1.1335702, 1.7173928}, -{2.0403416, 1.0871904, 1.5745270}, -{0.3421816, 1.6829609, 1.2657359}, -{0.3397636, 1.5993085, 1.2192736}, -{0.3218082, 1.7481857, 1.1987064}, -{1.6759671, 2.6849034, 2.7521308}, -{1.7246289, 2.6391742, 2.8207104}, -{1.5846269, 2.6606596, 2.7673466}, -{1.4172475, 1.7850177, 2.4779270}, -{1.5017433, 1.7889298, 2.4331222}, -{1.4027654, 1.8741878, 2.5095701}, -{2.8529930, 0.7123784, 1.6128566}, -{2.8733006, 0.6209643, 1.5930231}, -{2.7597127, 0.7210023, 1.5931913}, -{2.4085989, 2.2848930, 1.7963345}, -{2.4077091, 2.2641983, 1.8897864}, -{2.4073508, 2.3805458, 1.7929723}, -{0.1691906, 1.2075392, 3.0270104}, -{0.1131272, 1.2801927, 3.0542257}, -{0.2401168, 1.2066383, 3.0912831}, -{1.9907514, 2.5226767, 2.8208237}, -{1.9473301, 2.4663346, 2.7567730}, -{1.9210324, 2.5486188, 2.8810613}, -{1.1102935, 0.8198916, 1.3983347}, -{1.0749289, 0.7895742, 1.3147135}, -{1.1656434, 0.8945083, 1.3752903}, -{1.7714801, 1.8464882, 2.4046018}, -{1.7744614, 1.9392034, 2.4282095}, -{1.8565464, 1.8293086, 2.3642173}, -{0.5937610, 2.2037556, 0.4178426}, -{0.5713465, 2.2714210, 0.3539575}, -{0.5372356, 2.2220151, 0.4929012}, -{2.4509909, 2.2759018, 0.0596903}, -{2.4833527, 2.3638136, 0.0793514}, -{2.5104091, 2.2174301, 0.1067315}, -{2.4632604, 1.6853720, 1.8060201}, -{2.4957321, 1.6907532, 1.8959032}, -{2.4611321, 1.7761866, 1.7758455}, -{1.0052195, 0.8856758, 2.3673074}, -{1.0746095, 0.9312521, 2.3196614}, -{1.0404482, 0.8739728, 2.4555361}, -{1.1241881, 2.6061280, 0.0940612}, -{1.1125401, 2.6648810, 0.0193971}, -{1.0731555, 2.6463270, 0.1643607}, -{2.8064442, 2.3263919, 1.5736471}, -{2.7479289, 2.2527969, 1.5915937}, -{2.8653142, 2.2941003, 1.5054277}, -{2.8880889, 2.1751945, 1.3495091}, -{2.8279512, 2.2157385, 1.2870438}, -{2.8373785, 2.1042574, 1.3889893}, -{3.0745859, 1.5778222, 2.2226985}, -{2.9883964, 1.6001749, 2.2578270}, -{3.0654528, 1.5887885, 2.1280484}, -{1.0401490, 3.0955343, 1.3439633}, -{1.1133231, 3.1363659, 1.3902305}, -{0.9675715, 3.0988345, 1.4062847}, -{1.4736553, 0.8086180, 1.2154341}, -{1.5341075, 0.7913892, 1.1432465}, -{1.3930255, 0.7634901, 1.1904417}, -{1.0647640, 0.3411834, 0.7416006}, -{1.0111769, 0.3909458, 0.8033618}, -{1.0148275, 0.3426734, 0.6599523}, -{1.9401685, 0.6938528, 0.0066064}, -{1.9616201, 0.7865027, -0.0042626}, -{1.8606277, 0.6814493, -0.0451789}, -{2.1122453, 1.7291778, 1.8367143}, -{2.0371990, 1.6859997, 1.7958971}, -{2.1870558, 1.7029707, 1.7830590}, -{0.6342242, 0.8106606, 0.3574771}, -{0.6651949, 0.9012294, 0.3568276}, -{0.5559902, 0.8124952, 0.4125988}, -{0.3853418, 0.4006839, 2.7118683}, -{0.2933022, 0.4231032, 2.7255940}, -{0.3946557, 0.3948757, 2.6167798}, -{2.1416111, 2.7216964, 2.6807227}, -{2.0832665, 2.7863660, 2.6410227}, -{2.0837512, 2.6660483, 2.7328556}, -{0.8238381, 0.8551059, 1.3287103}, -{0.8435801, 0.9477627, 1.3150253}, -{0.7827186, 0.8518817, 1.4150881}, -{2.7235484, 1.3001494, 0.1851126}, -{2.6506553, 1.2466738, 0.1536602}, -{2.7747400, 1.3194400, 0.1065657}, -{0.2224002, 0.4548645, 0.5684708}, -{0.1832067, 0.4332103, 0.4838701}, -{0.3102792, 0.4860598, 0.5468731}, -{0.1678381, 1.3936555, 2.6686006}, -{0.1883233, 1.3333976, 2.5971048}, -{0.1705749, 1.4804389, 2.6283085}, -{2.9617453, 1.8685772, 2.0764592}, -{2.8807852, 1.8229932, 2.0534396}, -{3.0307336, 1.8180844, 2.0334082}, -{1.9212809, 1.2865047, 2.3329756}, -{1.9000707, 1.2352325, 2.4109731}, -{2.0166340, 1.2815305, 2.3262422}, -{2.3672991, 1.9698034, 2.4855709}, -{2.3004782, 1.9742545, 2.5539629}, -{2.3981352, 2.0599461, 2.4763103}, -{1.8650005, 2.9426861, 1.6273446}, -{1.8590415, 3.0276165, 1.5835993}, -{1.8415294, 2.9609120, 1.7183350}, -{0.7784527, 2.2812283, 0.7951221}, -{0.8010033, 2.1884971, 0.8025208}, -{0.7789437, 2.3132672, 0.8853195}, -{0.7716025, 1.4065443, 2.6228643}, -{0.8182636, 1.4625220, 2.5608032}, -{0.6825707, 1.4416565, 2.6245365}, -{2.4861620, 0.5523419, 1.5188867}, -{2.5047450, 0.5098403, 1.6026159}, -{2.4733019, 0.4799409, 1.4576083}, -{2.6230867, 0.7726538, 0.6503510}, -{2.5630689, 0.8467495, 0.6587193}, -{2.5897546, 0.7077196, 0.7122770}, -{1.6573763, 1.5258136, 2.0180345}, -{1.6187967, 1.5473584, 2.1029446}, -{1.7272662, 1.4637092, 2.0385470}, -{0.8124207, 0.9129960, 2.8729720}, -{0.7659423, 0.8308271, 2.8887944}, -{0.7509397, 0.9809828, 2.9005434}, -{3.1470082, 1.1630429, 2.0729537}, -{3.1972566, 1.1060173, 2.0147684}, -{3.1135051, 1.2320911, 2.0157504}, -{-0.0113219, 0.1338957, 1.7308491}, -{0.0405767, 0.1928974, 1.6761897}, -{-0.0879223, 0.1855693, 1.7558399}, -{2.5465775, 0.5641143, 0.8054407}, -{2.4594133, 0.5257691, 0.7957263}, -{2.6034977, 0.4896210, 0.8247582}, -{0.1363115, 2.9111912, 1.2885181}, -{0.1627293, 2.9066296, 1.1966289}, -{0.1138221, 2.8210280, 1.3114780}, -{1.4033453, 2.9274018, 0.3716766}, -{1.3240182, 2.9151552, 0.4238260}, -{1.4427241, 2.8402743, 0.3671547}, -{0.9571599, 2.9728811, 2.3470871}, -{0.8974989, 2.9911551, 2.2744997}, -{1.0015987, 3.0561333, 2.3631051}, -{0.1368403, 2.0247195, 0.7244007}, -{0.2027807, 1.9570136, 0.7092317}, -{0.1707193, 2.0749781, 0.7984858}, -{0.1545013, 0.9651616, 1.9842064}, -{0.2061592, 1.0056378, 1.9145253}, -{0.1423651, 0.8746471, 1.9555329}, -{0.9423909, 1.4345020, 0.7427008}, -{1.0276569, 1.4706254, 0.7669313}, -{0.9361935, 1.3526446, 0.7919275}, -{0.0657699, 0.9486246, 0.2080219}, -{0.1368574, 1.0125556, 0.2033620}, -{0.0344767, 0.9541414, 0.2983138}, -{0.8916632, 1.2025680, 1.9229212}, -{0.9767700, 1.1824419, 1.8840100}, -{0.8843075, 1.2977889, 1.9165003}, -{2.7458506, 2.6529832, 2.7430913}, -{2.7756460, 2.6425157, 2.8334518}, -{2.7145476, 2.7433238, 2.7385068}, -{1.3121479, 0.6154935, 1.1112006}, -{1.3026097, 0.5302228, 1.1536298}, -{1.2223692, 0.6464320, 1.0991621}, -{2.8303406, 2.5877242, 1.2390387}, -{2.9257166, 2.5829055, 1.2455583}, -{2.8017883, 2.6159337, 1.3259370}, -{0.6000233, 1.8206260, 1.4252410}, -{0.5373207, 1.7486693, 1.4179652}, -{0.5462019, 1.8997148, 1.4219928}, -{1.2275105, 1.2209017, 0.8219629}, -{1.2165964, 1.3150317, 0.8084446}, -{1.2387114, 1.2114289, 0.9165521}, -{1.9253128, 0.4222677, 0.8271068}, -{1.9651443, 0.4682186, 0.7531860}, -{1.8692843, 0.4878075, 0.8686720}, -{1.6786568, 0.4025358, 2.4040346}, -{1.7537798, 0.3906794, 2.3459117}, -{1.6192174, 0.3310552, 2.3812354}, -{1.8612810, 0.2029788, 0.0012669}, -{1.8265940, 0.1380947, -0.0599637}, -{1.7840691, 0.2502298, 0.0323791}, -{2.9324153, 0.1620452, 1.4484571}, -{3.0147612, 0.1424477, 1.4931493}, -{2.9067509, 0.0791346, 1.4080901}, -{-0.0635180, 1.9188501, 1.3861413}, -{0.0025801, 1.8640891, 1.4285041}, -{-0.0577561, 2.0028679, 1.4316397}, -{0.2611843, 0.1074089, 0.4061440}, -{0.2940608, 0.1703344, 0.3419425}, -{0.3167955, 0.1203108, 0.4829767}, -{1.6337602, 1.1785666, 2.4895229}, -{1.6433702, 1.0909433, 2.4522114}, -{1.6154366, 1.2347765, 2.4142435}, -{1.1488066, 0.7782422, 2.0664234}, -{1.1031840, 0.8595939, 2.0449107}, -{1.1662766, 0.7846867, 2.1603148}, -{0.2427065, 1.3996728, 0.6616291}, -{0.1606280, 1.4115552, 0.6138353}, -{0.2976444, 1.4728110, 0.6334342}, -{1.9056511, 0.9819774, 0.7092524}, -{1.9774923, 1.0338727, 0.7454190}, -{1.9233923, 0.9787543, 0.6152461}, -{0.8114303, 0.9693785, 2.0592899}, -{0.8158681, 0.9011946, 1.9922558}, -{0.8417076, 1.0486016, 2.0149128}, -{-0.0095149, 1.0161350, 1.6050442}, -{0.0370743, 1.0306236, 1.5226922}, -{-0.0216685, 0.9212861, 1.6093205}, -{3.0591121, 2.1600492, 2.6506753}, -{3.0964267, 2.1413894, 2.7368250}, -{3.1304429, 2.2015145, 2.6021485}, -{1.0368833, 0.9855292, 2.7150295}, -{0.9546423, 0.9458805, 2.7437818}, -{1.0255550, 1.0790707, 2.7318811}, -{0.7766560, 2.9270952, 1.0572725}, -{0.8344874, 2.8631244, 1.0988127}, -{0.8057033, 3.0115523, 1.0917051}, -{1.9196419, 1.4821545, 1.1717540}, -{1.9718955, 1.4070935, 1.1999983}, -{1.8530268, 1.4446487, 1.1141514}, -{2.8695648, 2.6644447, 2.0374599}, -{2.8968818, 2.5760641, 2.0620563}, -{2.9169180, 2.7217915, 2.0977204}, -{2.7697909, 0.7054818, 1.9846574}, -{2.8278015, 0.6905421, 2.0593159}, -{2.7346494, 0.6188927, 1.9639279}, -{2.9882205, 1.6046449, 1.9461987}, -{3.0634844, 1.5522277, 1.9188106}, -{2.9244194, 1.5936081, 1.8757009}, -{0.4467179, 1.8339388, 3.1407397}, -{0.4521850, 1.8137131, 3.0473409}, -{0.3543213, 1.8216805, 3.1625323}, -{0.7677504, 1.6703570, 1.2745169}, -{0.7076899, 1.7230421, 1.3272364}, -{0.7388923, 1.5801394, 1.2883123}, -{2.7283170, 0.4669456, 2.7140481}, -{2.8201253, 0.4778503, 2.6892562}, -{2.7210655, 0.5106573, 2.7988951}, -{0.8607193, 2.7214639, 2.2498615}, -{0.8865188, 2.8093708, 2.2221284}, -{0.8447740, 2.7297256, 2.3438818}, -{1.9233046, 2.1076286, 0.6769425}, -{1.9993286, 2.0742846, 0.6292890}, -{1.9505978, 2.1074941, 0.7686888}, -{1.8795335, 1.5941333, 1.7022258}, -{1.8030465, 1.5479206, 1.7365251}, -{1.8755367, 1.5801402, 1.6076184}, -{1.9874325, 0.5273531, 1.6761723}, -{1.9814804, 0.6103491, 1.7234856}, -{2.0235782, 0.4659078, 1.7400494}, -{2.5604455, 1.7279090, 0.3944272}, -{2.4833403, 1.6712996, 0.3908980}, -{2.5671341, 1.7647883, 0.3063505}, -{1.2008839, 1.7612042, 2.1921813}, -{1.2187626, 1.8362577, 2.2488351}, -{1.2044465, 1.6855886, 2.2507639}, -{1.7749706, 2.1513369, 0.3021400}, -{1.6888816, 2.1884839, 0.2828760}, -{1.7560900, 2.0710893, 0.3507832}, -{0.0100695, 1.5538683, 1.0180876}, -{0.0330222, 1.6369233, 1.0597693}, -{-0.0685642, 1.5248090, 1.0642894}, -{0.8448004, 1.6865317, 2.8273821}, -{0.8519493, 1.6118132, 2.8867822}, -{0.8981603, 1.6621836, 2.7517369}, -{0.3982638, 0.6717119, 1.7753555}, -{0.3508439, 0.6356474, 1.7004353}, -{0.4607366, 0.6032767, 1.7993574}, -{1.0701768, 3.1833744, 2.8914468}, -{1.1120536, 3.1903751, 2.8056586}, -{1.1380969, 3.2098401, 2.9534852}, -{0.7225079, 0.6344430, 2.8513114}, -{0.7014872, 0.5462061, 2.8818843}, -{0.8162239, 0.6314297, 2.8320615}, -{0.0430516, 1.1721973, 2.7855878}, -{0.0843243, 1.2476416, 2.7435513}, -{0.0912546, 1.1611001, 2.8675368}, -{0.1643637, 1.1773787, 0.9241777}, -{0.1358725, 1.2487305, 0.8670858}, -{0.1844909, 1.1054175, 0.8643546}, -{0.2421942, 2.2270110, 1.6116085}, -{0.2600811, 2.1345279, 1.5946015}, -{0.3203130, 2.2585530, 1.6570495}, -{3.0569668, 2.4979150, 1.3805816}, -{2.9852016, 2.5234590, 1.4385436}, -{3.1149578, 2.4455733, 1.4358962}, -{2.2990107, 0.4131403, 2.9083548}, -{2.2151895, 0.4442775, 2.9425130}, -{2.3646326, 0.4645110, 2.9554410}, -{0.5438548, 0.9492766, 2.1264880}, -{0.6382870, 0.9382914, 2.1153436}, -{0.5057713, 0.8710152, 2.0866494}, -{2.5000832, 2.5158784, 0.1953517}, -{2.4683127, 2.6040337, 0.2148860}, -{2.5952880, 2.5250301, 0.1915289}, -{3.1166093, 1.7730014, 2.5394711}, -{3.0660226, 1.7766295, 2.6206508}, -{3.1246512, 1.6795423, 2.5204179}, -{0.6419087, 3.1287403, 2.6241665}, -{0.6084338, 3.1440952, 2.5358152}, -{0.7303003, 3.1654539, 2.6230059}, -{1.9597113, 1.8166590, 0.7783146}, -{1.9125922, 1.7423058, 0.8159140}, -{1.9371998, 1.8904268, 0.8350056}, -{0.2565176, 1.9606136, 2.0379341}, -{0.2441518, 1.8879259, 2.0989742}, -{0.3304879, 2.0096669, 2.0737739}, -{2.9051578, 0.4356207, 1.5685185}, -{2.9412236, 0.4062150, 1.4848713}, -{2.9518826, 0.3840150, 1.6342144}, -{2.6765954, 0.9000398, 1.2174791}, -{2.5811477, 0.8940651, 1.2215232}, -{2.6997609, 0.8577231, 1.1348052}, -{2.5382242, 2.1180766, 0.4009356}, -{2.5484979, 2.0859706, 0.4905233}, -{2.5327988, 2.2132061, 0.4100592}, -{0.7197660, 1.9922315, 0.7275286}, -{0.7088963, 1.9742284, 0.6341474}, -{0.6308909, 2.0080035, 0.7593842}, -{1.9609220, 3.2160480, 0.3154204}, -{1.8752587, 3.1806912, 0.2914618}, -{1.9763113, 3.1835041, 0.4041130}, -{2.6568368, 2.0510352, 3.0470574}, -{2.6461923, 2.1267643, 2.9894893}, -{2.6595795, 2.0881777, 3.1352346}, -{0.3112301, 2.2767274, 0.2865615}, -{0.2872103, 2.1935148, 0.2458058}, -{0.2329145, 2.3310900, 0.2779759}, -{1.8349693, 2.1348836, 2.3291638}, -{1.8336599, 2.1020980, 2.2392430}, -{1.7523602, 2.1823134, 2.3385694}, -{1.0871907, 2.2986407, 1.7408888}, -{1.0759281, 2.2480645, 1.6604059}, -{1.0899495, 2.3897677, 1.7117236}, -{2.1745789, 1.9545420, 2.0102098}, -{2.1424465, 1.9636211, 1.9205025}, -{2.1875739, 1.8603928, 2.0215833}, -{1.0341231, 0.0361474, 1.9128816}, -{0.9838279, 0.1172760, 1.9057497}, -{1.1186494, 0.0634270, 1.9485670}, -{1.7447501, 2.5821242, 0.5457462}, -{1.7939770, 2.5058930, 0.5152858}, -{1.7929615, 2.6126182, 0.6226105}, -{2.2543948, 0.9484131, 2.5884135}, -{2.2959268, 0.9240012, 2.5057004}, -{2.2145505, 0.8673350, 2.6200538}, -{2.9911334, 0.1536013, 0.7670333}, -{3.0556231, 0.0880508, 0.7404527}, -{2.9474194, 0.1785806, 0.6856242}, -{0.9890648, 0.1425652, 0.9406300}, -{1.0179802, 0.1835793, 0.8591189}, -{0.9537708, 0.2147985, 0.9925819}, -{1.4208969, 0.7138847, 2.3057656}, -{1.5102980, 0.7041913, 2.3385649}, -{1.4316294, 0.7431352, 2.2152586}, -{2.6808448, 2.9019826, 2.3981082}, -{2.6196704, 2.8394527, 2.3592489}, -{2.7663434, 2.8595791, 2.3907421}, -{2.9331214, 2.6559207, 2.9693475}, -{2.9813564, 2.7345364, 2.9949460}, -{3.0010905, 2.5922973, 2.9471080}, -{0.6846479, 2.8282986, 0.0989395}, -{0.7656561, 2.8722341, 0.1248174}, -{0.7125992, 2.7412167, 0.0706949}, -{0.6471792, 2.0636654, 0.1676496}, -{0.6151719, 2.1379831, 0.2187839}, -{0.5975092, 2.0676570, 0.0859227}, -{2.8259048, 1.3420453, 1.4605020}, -{2.7576725, 1.3411431, 1.5276277}, -{2.7991333, 1.2744625, 1.3982271}, -{1.1507398, 0.3174069, 2.3144486}, -{1.0659384, 0.3593313, 2.2998414}, -{1.2148813, 0.3859702, 2.2958133}, -{2.2242482, 2.8197093, 0.7125854}, -{2.1659050, 2.8254282, 0.7882538}, -{2.2842941, 2.7483022, 0.7339818}, -{0.9564861, 0.9928752, 1.5636003}, -{0.9705215, 0.9455887, 1.4815679}, -{0.8613610, 0.9950163, 1.5740383}, -{1.3359084, 2.8160994, 2.1822035}, -{1.3190620, 2.9102933, 2.1797481}, -{1.2988122, 2.7829933, 2.1004100}, -{1.9299790, 0.8758406, 1.3003237}, -{1.9262279, 0.7861898, 1.2669921}, -{1.9727029, 0.9255584, 1.2305733}, -{0.2684532, 1.4222771, 1.1195776}, -{0.1966105, 1.4209894, 1.0563376}, -{0.2588698, 1.3404933, 1.1683824}, -{0.2834614, 0.6675173, 1.5270826}, -{0.3294488, 0.7511750, 1.5200925}, -{0.2082182, 0.6765892, 1.4686148}, -{2.9735742, 1.1288265, 1.7898805}, -{3.0344226, 1.0964963, 1.7234384}, -{2.9486508, 1.0508579, 1.8394995}, -{0.9484476, 0.2976201, 1.9149556}, -{0.8746589, 0.2757144, 1.9718564}, -{1.0048378, 0.3528865, 1.9690675}, -{2.1331367, 1.9692905, 2.9734707}, -{2.0968676, 2.0446785, 3.0199842}, -{2.2278235, 1.9831640, 2.9755282}, -{1.1016358, 2.5934031, 2.5717747}, -{1.1602401, 2.6249468, 2.5029788}, -{1.1602087, 2.5645919, 2.6417851}, -{2.9011049, 1.9036500, 0.2222261}, -{2.8885000, 1.8895800, 0.3160636}, -{2.9954231, 1.9166975, 0.2124202}, -{3.0120790, 1.1917392, 0.2806238}, -{3.0653565, 1.2567348, 0.3264431}, -{2.9222972, 1.2236644, 0.2896970}, -{0.4867600, 0.2719674, 0.8842224}, -{0.4731141, 0.1839026, 0.9191610}, -{0.4080592, 0.2897656, 0.8327276}, -{2.3435404, 1.3587844, 2.7926073}, -{2.3379145, 1.4473159, 2.8285634}, -{2.4357238, 1.3348538, 2.8021920}, -{2.6365898, 2.9609728, 1.8114139}, -{2.5982826, 2.9320746, 1.7285902}, -{2.7090270, 3.0180116, 1.7856894}, -{2.1150622, 1.1271752, 0.8136538}, -{2.1540286, 1.2055047, 0.8524922}, -{2.1806004, 1.0963301, 0.7510787}, -{2.9630063, 0.5666408, 0.8626033}, -{3.0525203, 0.5745736, 0.8296390}, -{2.9171021, 0.5162801, 0.7953804}, -{2.2379093, 1.6405119, 2.8651214}, -{2.2198973, 1.7342871, 2.8717609}, -{2.1844885, 1.6110246, 2.7913716}, -{1.9171563, 0.9405604, 0.4047319}, -{1.9082389, 0.8588795, 0.3556298}, -{2.0040133, 0.9732437, 0.3812800}, -{1.9397354, 1.7530928, 1.1208880}, -{1.9113368, 1.6674386, 1.1528130}, -{1.8701869, 1.8130176, 1.1479865}, -{0.6317668, 2.5982196, 2.7025659}, -{0.6780862, 2.5718210, 2.6230679}, -{0.6269335, 2.6936495, 2.6968992}, -{2.7763722, 0.9181970, 1.7990961}, -{2.7674873, 0.8585699, 1.8734465}, -{2.7713945, 0.8614601, 1.7221645}, -{0.0102136, 2.6898615, 2.0399170}, -{0.0033672, 2.5998058, 2.0082088}, -{-0.0536600, 2.6951428, 2.1110127}, -{2.4561839, 0.7099834, 1.8010200}, -{2.3737435, 0.7574791, 1.7905283}, -{2.4987013, 0.7166258, 1.7155187}, -{1.3939223, 2.4582560, 2.2867839}, -{1.3996152, 2.4493568, 2.1916487}, -{1.3508067, 2.5426223, 2.3004108}, -{1.9135660, 1.1220603, 2.5315902}, -{1.8369777, 1.0646460, 2.5312040}, -{1.9465116, 1.1174393, 2.6213429}, -{0.9004487, 0.4625946, 2.3155406}, -{0.9044201, 0.5247172, 2.3882544}, -{0.8068696, 0.4485231, 2.3011444}, -{0.0886837, 2.8912289, 0.1200376}, -{0.0767506, 2.9822719, 0.0929988}, -{0.1769977, 2.8885584, 0.1568592}, -{1.5250142, 2.0289693, 2.9174082}, -{1.6196091, 2.0254824, 2.9316194}, -{1.4925609, 2.0869300, 2.9863260}, -{0.8958684, 0.1152854, 2.5216181}, -{0.9096281, 0.1682966, 2.6001217}, -{0.9839574, 0.0897638, 2.4942086}, -{2.0336621, 2.8774958, 0.8959895}, -{2.0060561, 2.8305523, 0.9747076}, -{1.9766207, 2.9542909, 0.8926578}, -{1.3289750, 0.8581318, 0.7911605}, -{1.3037727, 0.7865198, 0.7328606}, -{1.3678304, 0.9236560, 0.7332023}, -{2.1629212, 1.2174341, 2.9565094}, -{2.1748023, 1.2729852, 3.0335496}, -{2.2153056, 1.2595085, 2.8883336}, -{2.6981475, 1.7715750, 3.0479758}, -{2.7040033, 1.8670747, 3.0507703}, -{2.7880843, 1.7424959, 3.0328715}, -{1.6458204, 2.3960319, 3.1221371}, -{1.6413189, 2.3019559, 3.1050560}, -{1.5613037, 2.4172542, 3.1617460}, -{2.1971915, 0.7671505, 2.1049788}, -{2.1845357, 0.8001442, 2.1939371}, -{2.2187593, 0.8448783, 2.0534470}, -{0.6224402, 2.9699037, 3.0241976}, -{0.6899034, 3.0369391, 3.0133688}, -{0.6394674, 2.9325347, 3.1106610}, -{0.2299824, 1.8719134, 0.3997822}, -{0.1869170, 1.8361518, 0.4774274}, -{0.3218177, 1.8807822, 0.4252762}, -{2.7698395, 0.6161367, 2.9537625}, -{2.7889094, 0.6993777, 2.9105237}, -{2.8367851, 0.6085784, 3.0217588}, -{2.4963174, 1.0814774, 2.0948665}, -{2.5545115, 1.1072582, 2.0233746}, -{2.4824255, 1.1620288, 2.1446743}, -{2.5285950, 1.4406851, 1.2590463}, -{2.5800872, 1.3600342, 1.2615598}, -{2.4551868, 1.4204360, 1.2010503}, -{1.5000346, 1.2697160, 1.3019290}, -{1.4249097, 1.2747705, 1.3610308}, -{1.5352316, 1.1817277, 1.3154023}, -{0.5901845, 2.6962342, 0.3508977}, -{0.5550343, 2.7098212, 0.2629081}, -{0.6281224, 2.6083939, 0.3482337}, -{0.0498685, 1.6067076, 0.2915846}, -{-0.0169917, 1.6683018, 0.2616148}, -{0.1047645, 1.5916337, 0.2146333}, -{0.6201953, 0.4945866, 2.3696377}, -{0.6448801, 0.4784647, 2.4607041}, -{0.5364241, 0.5405491, 2.3753068}, -{0.7168736, 0.9394868, 0.8006921}, -{0.7721955, 1.0065970, 0.8406674}, -{0.7445601, 0.9370626, 0.7090958}, -{2.6671295, 2.7020864, 0.5348983}, -{2.6698348, 2.7215958, 0.6285701}, -{2.5741301, 2.7052181, 0.5124570}, -{2.0432017, 1.5345289, 2.6939590}, -{1.9726073, 1.5970825, 2.6776555}, -{2.0140536, 1.4849213, 2.7704561}, -{2.8526125, 3.1461883, 1.7159655}, -{2.8555989, 3.1337929, 1.6210984}, -{2.9312882, 3.1023211, 1.7483403}, -{2.0595810, 0.6922218, 1.8977623}, -{2.1128202, 0.7533019, 1.8468001}, -{2.1089294, 0.6792440, 1.9787476}, -{2.9648604, 0.5567046, -0.0060417}, -{2.9122286, 0.4795727, 0.0150031}, -{3.0454047, 0.5212051, -0.0436545}, -{0.2892040, 2.1940012, 2.6874871}, -{0.3408917, 2.1275043, 2.6420023}, -{0.3286449, 2.2771475, 2.6611538}, -{1.3549655, 1.8224040, 2.9402862}, -{1.4266188, 1.7592852, 2.9469306}, -{1.3981899, 1.9078085, 2.9404142}, -{0.2691354, 1.8271025, 1.0264000}, -{0.1927256, 1.8609899, 0.9797577}, -{0.3227967, 1.7866358, 0.9582441}, -{1.5400959, 2.3967710, 2.5084748}, -{1.4878405, 2.4114141, 2.4296250}, -{1.4755367, 2.3854625, 2.5782354}, -{0.5326626, 2.3845942, 3.1297238}, -{0.4971890, 2.2957733, 3.1258831}, -{0.5338061, 2.4138892, 3.0386040}, -{1.8223233, 0.5574270, 2.0022380}, -{1.9045489, 0.5924630, 1.9679779}, -{1.7841523, 0.5095990, 1.9286324}, -{1.4984720, 1.5061412, 0.9402193}, -{1.4155788, 1.4745740, 0.9042395}, -{1.4803245, 1.5205697, 1.0330892}, -{2.7332656, 0.7312201, 1.0079825}, -{2.7916124, 0.6726646, 0.9597204}, -{2.6755517, 0.6725637, 1.0568788}, -{2.4424791, 0.1526094, 0.9303625}, -{2.3879998, 0.0911552, 0.8811925}, -{2.5098915, 0.0979013, 0.9706727}, -{0.4960604, 1.5185516, 0.9822090}, -{0.5092490, 1.4334679, 0.9403864}, -{0.4160278, 1.5078251, 1.0336100}, -{2.7628097, 2.3348615, 2.4432676}, -{2.7008138, 2.3951042, 2.4021623}, -{2.7090862, 2.2814241, 2.5017528}, -{1.5446522, 1.6085464, 3.0500593}, -{1.5414374, 1.5329128, 2.9914799}, -{1.6200292, 1.6591480, 3.0197263}, -{2.9932613, 0.8973161, 3.1656961}, -{2.9757838, 0.8035431, 3.1736639}, -{3.0881090, 0.9031082, 3.1541777}, -{1.4010988, 0.4136273, 1.4124979}, -{1.4918234, 0.3873245, 1.3970212}, -{1.3828571, 0.3851750, 1.5020524}, -{0.4023689, 2.0282826, 1.4072916}, -{0.3681280, 2.0982084, 1.4629717}, -{0.4413290, 2.0739450, 1.3327305}, -{0.8990337, 0.0518757, 1.5698578}, -{0.9353620, 0.1321738, 1.6072047}, -{0.8083336, 0.0501535, 1.6004003}, -{3.1075847, 2.2488401, 1.2512697}, -{3.0253933, 2.2144067, 1.2862159}, -{3.0956528, 2.3438134, 1.2511828}, -{0.0557172, 1.8632007, 1.8999640}, -{0.1107633, 1.9053519, 1.9659604}, -{0.1176033, 1.8290632, 1.8354112}, -{3.0890746, 2.3306186, 0.5492309}, -{3.1831112, 2.3327463, 0.5669764}, -{3.0496125, 2.3759732, 0.6237159}, -{2.7296615, 0.9997886, 0.8558961}, -{2.7213280, 0.9053426, 0.8690420}, -{2.7973664, 1.0087538, 0.7888290}, -{1.0974518, 0.8433317, 0.9172019}, -{1.1853055, 0.8660080, 0.8867087}, -{1.0478573, 0.8266026, 0.8370593}, -{0.9604354, 1.2627037, 2.7982440}, -{0.8923366, 1.3030043, 2.7443855}, -{0.9133513, 1.2007528, 2.8539889}, -{2.1899431, 1.9201032, 2.2926776}, -{2.2687562, 1.9190143, 2.3469882}, -{2.2210064, 1.9459480, 2.2059052}, -{2.8820908, 3.0447397, 1.4389324}, -{2.8172474, 3.0341754, 1.3693190}, -{2.9631038, 3.0099263, 1.4016868}, -{0.1538719, 1.7705958, 0.6214464}, -{0.0639039, 1.7650935, 0.6536615}, -{0.2019075, 1.7061505, 0.6734244}, -{0.0391853, 0.9687190, 1.3186412}, -{0.0822218, 0.8836136, 1.3104405}, -{-0.0543289, 0.9483005, 1.3193494}, -{2.8203828, 1.0515431, 3.0258067}, -{2.8715956, 1.0886682, 2.9539645}, -{2.8766954, 0.9834964, 3.0626969}, -{2.0838254, 1.4474046, 1.9963507}, -{2.0867698, 1.5430481, 1.9939114}, -{2.1731501, 1.4201491, 1.9753615}, -{0.6114916, 2.2305501, 1.9186871}, -{0.6924189, 2.2738998, 1.8915964}, -{0.6265373, 2.1378884, 1.8999858}, -{0.6912583, 0.3887711, 2.6120997}, -{0.7765276, 0.4001686, 2.6540706}, -{0.6278685, 0.4030060, 2.6823950}, -{2.3112164, 2.3770421, 0.3152490}, -{2.3938129, 2.4132743, 0.2831964}, -{2.2569349, 2.3682025, 0.2369055}, -{0.9653467, 0.3204466, 1.3443677}, -{0.9325471, 0.3793331, 1.2764053}, -{1.0573641, 0.3067601, 1.3218335}, -{2.4298737, -0.0653387, 2.2467003}, -{2.3855753, -0.0664993, 2.3315449}, -{2.4447195, -0.1576444, 2.2261674}, -{0.3330666, 1.9756161, 1.7666504}, -{0.2981088, 1.9885229, 1.8548189}, -{0.3068178, 1.8865833, 1.7432737}, -{1.2224982, 0.3931379, 2.6188960}, -{1.2696162, 0.4648877, 2.5765386}, -{1.2575655, 0.3907166, 2.7079282}, -{0.1221577, 0.3488992, 2.5562828}, -{0.1666659, 0.3177385, 2.4774771}, -{0.1600637, 0.4352590, 2.5726357}, -{0.1370677, 0.3940715, 2.9506955}, -{0.1213950, 0.4857848, 2.9731758}, -{0.1462143, 0.3499384, 3.0351403}, -{2.9936411, 2.4298966, 0.1545147}, -{3.0637307, 2.4596384, 0.0965042}, -{3.0358431, 2.3665385, 0.2125411}, -{1.1097623, 2.8952229, 2.5843840}, -{1.1726384, 2.8408015, 2.5369790}, -{1.0356706, 2.9039829, 2.5244172}, -{2.2861288, 0.1613493, 0.5273755}, -{2.2930152, 0.0899590, 0.5907657}, -{2.2669575, 0.2386985, 0.5804027}, -{3.0232577, 3.0092733, 1.1222072}, -{3.0991778, 2.9950588, 1.1787440}, -{3.0278275, 3.1019819, 1.0988289}, -{1.6569895, 2.8618333, 2.1561284}, -{1.5619893, 2.8568413, 2.1455276}, -{1.6816905, 2.7763085, 2.1913092}, -{0.9384512, 2.9352140, 0.1355221}, -{1.0034959, 2.9126794, 0.0690111}, -{0.9480820, 2.8673999, 0.2023862}, -{2.9521964, 0.3785538, 2.2238338}, -{3.0048425, 0.4566935, 2.2407119}, -{2.8901725, 0.3752703, 2.2966662}, -{2.4926538, 1.0239352, 0.6558312}, -{2.5726750, 1.0749843, 0.6681965}, -{2.4501441, 1.0640253, 0.5800155}, -{1.1752639, 3.0708451, 0.9287288}, -{1.1221246, 3.1504412, 0.9304650}, -{1.2445648, 3.0896888, 0.8654468}, -{0.7207608, 0.3416515, 0.0138317}, -{0.7764910, 0.2639305, 0.0178195}, -{0.7814180, 0.4151187, 0.0230829}, -{0.0851030, 0.2332970, 0.0435002}, -{0.1223862, 0.1473273, 0.0630318}, -{0.0045395, 0.2141206, -0.0045009}, -{0.4287913, 0.1142516, 0.6276417}, -{0.4935105, 0.0554844, 0.6666309}, -{0.4808621, 0.1800374, 0.5815638}, -{0.9779723, 1.9098200, 2.5051026}, -{1.0436462, 1.9792796, 2.5100632}, -{0.9404826, 1.9185191, 2.4174604}, -{1.3789229, 1.6226406, 0.4962055}, -{1.3935698, 1.6309760, 0.5904303}, -{1.4666483, 1.6253028, 0.4580022}, -{2.0937119, -0.0106692, 0.0739963}, -{2.0536013, 0.0656805, 0.0324732}, -{2.0497866, -0.0176778, 0.1587534}, -{1.2012807, 2.9428875, 0.5265773}, -{1.1624990, 2.9133654, 0.6089590}, -{1.1908652, 3.0380294, 0.5279399}, -{2.2791674, 0.8963562, 0.7781890}, -{2.3401039, 0.9454984, 0.7231063}, -{2.2278645, 0.8441652, 0.7164928}, -{0.1630015, 2.5044470, 2.7893100}, -{0.1709897, 2.4179647, 2.7490694}, -{0.2294918, 2.5575144, 2.7454328}, -{0.7060483, 1.7318893, 0.0501555}, -{0.7625076, 1.7944364, 0.0955704}, -{0.6291210, 1.7829723, 0.0249558}, -{1.1033484, 1.0437927, 2.1403103}, -{1.0219363, 0.9946458, 2.1512179}, -{1.0911753, 1.0925208, 2.0588257}, -{1.9177777, 0.5504727, 0.5690043}, -{1.8460517, 0.5927682, 0.5217941}, -{1.9234505, 0.4629906, 0.5305724}, -{1.4972737, 1.9489530, 1.3204033}, -{1.4237723, 1.9750997, 1.2649396}, -{1.5424597, 2.0309098, 1.3404934}, -{0.8835701, 1.4280628, 0.1674865}, -{0.8531773, 1.4165682, 0.2575225}, -{0.8745712, 1.5219163, 0.1509677}, -{0.1678406, 1.7229354, 2.1899519}, -{0.2111494, 1.6641072, 2.1280980}, -{0.0743808, 1.7103669, 2.1735318}, -{2.0397434, 2.1219344, 1.4409180}, -{2.0295677, 2.1699316, 1.3587289}, -{2.1087670, 2.1689291, 1.4877107}, -{1.2581902, 1.4289570, 1.6551967}, -{1.2654010, 1.4368232, 1.7503201}, -{1.1978847, 1.4988495, 1.6298869}, -{2.9910946, 3.0806005, 0.1484258}, -{2.9137793, 3.0751080, 0.2045908}, -{3.0470388, 3.0086098, 0.1775783}, -{1.0610830, 0.7047814, 1.1418353}, -{0.9734507, 0.6746404, 1.1658028}, -{1.0458002, 0.7749794, 1.0785819}, -{1.6532741, 2.9580233, 1.0485057}, -{1.5689507, 2.9165225, 1.0303516}, -{1.6545630, 2.9690583, 1.1435788}, -{0.8091365, 0.0285435, 3.0111480}, -{0.8982949, 0.0388860, 2.9778893}, -{0.8186450, 0.0310841, 3.1063607}, -{0.5036963, 2.0880661, 2.5342636}, -{0.5332928, 1.9970473, 2.5328660}, -{0.5832631, 2.1388848, 2.5500402}, -{2.2328618, 1.9671422, 1.2397304}, -{2.3016095, 2.0160425, 1.2849501}, -{2.1618116, 1.9610965, 1.3035868}, -{0.2239179, 2.1884501, 0.9155824}, -{0.2009252, 2.1424413, 0.9963093}, -{0.2424263, 2.2781026, 0.9435503}, -{0.8877732, 0.5404216, 0.8066940}, -{0.8117438, 0.4826351, 0.8001699}, -{0.8577675, 0.6134664, 0.8607905}, -{2.9464774, 2.8448186, 0.8989243}, -{3.0209310, 2.7910399, 0.8719642}, -{2.9804733, 2.8987021, 0.9703608}, -{2.1073101, 2.4336813, 0.7530645}, -{2.1230614, 2.4845641, 0.8325954}, -{2.0143700, 2.4467690, 0.7342715}, -{0.4704227, 1.2409600, 1.7399371}, -{0.5620813, 1.2400131, 1.7123669}, -{0.4735311, 1.2236216, 1.8340223}, -{0.2758942, 0.8356323, 2.8198159}, -{0.3543517, 0.8435117, 2.7655511}, -{0.3035489, 0.7822455, 2.8942967}, -{2.8781021, 0.7768593, 2.7527759}, -{2.9437192, 0.8390787, 2.7213841}, -{2.8006170, 0.7948696, 2.6995406}, -{1.8004808, 2.0260513, 3.0032859}, -{1.8451598, 2.0846167, 3.0644105}, -{1.8136942, 2.0663745, 2.9174852}, -{2.5159631, 1.3368416, 2.1436698}, -{2.6018269, 1.3573978, 2.1066947}, -{2.4535270, 1.3737060, 2.0811794}, -{2.8697185, 0.1857669, 2.4604704}, -{2.7906508, 0.1627211, 2.4116902}, -{2.9394827, 0.1358934, 2.4179509}, -{1.1319151, 0.6919709, 1.6536973}, -{1.1910840, 0.7571264, 1.6913286}, -{1.1123677, 0.7251487, 1.5660647}, -{2.0596511, 0.1310353, 1.6251073}, -{2.1053870, 0.2043649, 1.5839574}, -{2.1293004, 0.0782273, 1.6641278}, -{0.9130408, 2.0109093, 0.2851326}, -{0.9477964, 1.9251004, 0.2608174}, -{0.8233567, 2.0107808, 0.2516800}, -{2.2523642, 0.3065261, 1.4769527}, -{2.1838825, 0.3723898, 1.4653536}, -{2.2738736, 0.2784200, 1.3880161}, -{2.9289901, 1.1891373, 0.7054088}, -{2.8951311, 1.1213962, 0.6468679}, -{3.0086887, 1.1511707, 0.7424086}, -{1.6172851, 2.7285078, 1.4677424}, -{1.6248428, 2.7082646, 1.5609916}, -{1.7015549, 2.7023394, 1.4306459}, -{0.9118999, 1.5540966, 2.1797655}, -{0.9988176, 1.5226667, 2.2046609}, -{0.9286639, 1.6201829, 2.1125798}, -{1.8577038, 0.3123721, 0.4259824}, -{1.7935623, 0.2699088, 0.4829479}, -{1.9066210, 0.2399911, 0.3868619}, -{1.6782736, 2.6685839, 0.1501557}, -{1.7692950, 2.6398253, 0.1572518}, -{1.6737049, 2.7129440, 0.0654584}, -{2.8969524, 0.6093825, 0.5232357}, -{2.8875206, 0.5253476, 0.5680855}, -{2.8324332, 0.6662974, 0.5651913}, -{0.5251588, 0.7402523, 2.6969964}, -{0.5936854, 0.7999436, 2.6669402}, -{0.5720883, 0.6724310, 2.7455785}, -{1.7043184, 0.9188465, 2.3983524}, -{1.6931951, 0.8330535, 2.4393177}, -{1.7188920, 0.8994651, 2.3057549}, -{0.3658168, 2.3391819, 1.8964130}, -{0.3424776, 2.3354075, 1.9891672}, -{0.4530553, 2.3000312, 1.8920542}, -{0.2003765, 1.8361878, 1.4404087}, -{0.2785301, 1.8909607, 1.4477754}, -{0.2268270, 1.7643120, 1.3829929}, -{0.8779035, 1.1430768, 1.2612486}, -{0.8973404, 1.1811655, 1.1756111}, -{0.9162037, 1.2043930, 1.3239839}, -{2.1880777, 2.8796663, -0.0180342}, -{2.1398976, 2.8393123, 0.0541638}, -{2.1717946, 2.9734793, -0.0082194}, -{1.8784320, 2.6354129, 0.7891080}, -{1.9437256, 2.6465924, 0.8582029}, -{1.8214574, 2.7118821, 0.7973951}, -{1.2414686, 0.3467959, 1.1827204}, -{1.2969465, 0.2716064, 1.1619582}, -{1.2684450, 0.3728753, 1.2707799}, -{0.4696910, 2.0991523, 0.7883172}, -{0.4123033, 2.1233404, 0.8610077}, -{0.4795347, 2.1798031, 0.7377124}, -{0.8305964, 0.6751534, 2.5289936}, -{0.8204279, 0.6027634, 2.5907884}, -{0.9156948, 0.7132943, 2.5505769}, -{1.0174899, 1.7911044, 1.3506598}, -{1.0601589, 1.7646310, 1.4321512}, -{0.9299651, 1.7527054, 1.3558805}, -{0.6316745, 0.3783214, 0.6611996}, -{0.5958663, 0.3291134, 0.7350823}, -{0.5647446, 0.4438088, 0.6413473}, -{1.6425643, 0.7000317, 0.4213622}, -{1.7280147, 0.7141162, 0.3805923}, -{1.6527015, 0.7335858, 0.5104334}, -{1.1330942, 0.0406595, 2.4146397}, -{1.2183986, -0.0027429, 2.4133332}, -{1.1478934, 0.1239188, 2.3697934}, -{2.8466637, 2.6961110, 2.5011537}, -{2.8191767, 2.7140822, 2.5910635}, -{2.7833884, 2.6318057, 2.4691637}, -{1.0341512, 2.1846373, 1.0978242}, -{1.0069698, 2.0939112, 1.1116887}, -{1.0853837, 2.1822073, 1.0170057}, -{0.1365953, 0.1719048, 2.7987103}, -{0.1584627, 0.2343351, 2.8678954}, -{0.1328731, 0.2247992, 2.7190194}, -{0.7168369, 1.2508167, 1.6494938}, -{0.7857752, 1.2773249, 1.5886076}, -{0.7638478, 1.2148193, 1.7247035}, -{2.8681543, 1.6885868, 1.1241422}, -{2.8835134, 1.6332468, 1.2007183}, -{2.9374192, 1.7545414, 1.1279746}, -{1.1623275, 1.6367633, 0.3493694}, -{1.2317469, 1.6440940, 0.4148639}, -{1.0871481, 1.6806860, 0.3891334}, -{1.4521078, 0.1351103, 0.3432480}, -{1.3832349, 0.0933540, 0.2915252}, -{1.4236991, 0.2261031, 0.3519418}, -{0.8650972, 2.4736595, 2.9118011}, -{0.9075109, 2.3880019, 2.9169161}, -{0.7795016, 2.4604759, 2.9525673}, -{1.9729780, 1.2322768, 1.8556480}, -{1.9931359, 1.3186145, 1.8917284}, -{1.9017249, 1.1994421, 1.9104861}, -{0.9686258, 0.4839060, 0.3089988}, -{1.0579994, 0.5075947, 0.2842288}, -{0.9380490, 0.5576745, 0.3617775}, -{1.1664323, 2.4949052, 1.3470272}, -{1.1619846, 2.4332762, 1.2739219}, -{1.2154081, 2.5695422, 1.3124876}, -{1.8956073, 1.5583949, 0.0690517}, -{1.9310175, 1.6302878, 0.0167083}, -{1.9627470, 1.5415760, 0.1351706}, -{1.5064046, 1.0762715, 1.7345712}, -{1.5842536, 1.0842133, 1.6794459}, -{1.5339825, 1.1096946, 1.8199215}, -{1.5876601, 1.9028364, 0.3956352}, -{1.6268866, 1.8814853, 0.3109727}, -{1.4971380, 1.9260508, 0.3749187}, -{0.8584031, 0.5936577, 0.0163770}, -{0.9082285, 0.6110443, -0.0634820}, -{0.9223219, 0.6030391, 0.0870077} -}; - -const std::vector vel = { -{0.1463685, 0.3065207, 0.3287848}, -{0.7371281, 0.5779085, -1.0004199}, -{0.5550961, 1.1852636, -1.8387126}, -{1.9295115, 2.4173758, 1.1612775}, -{0.1902543, 0.6539089, -0.0383688}, -{-1.5028324, 1.6359708, 1.3793683}, -{1.9993781, -1.3913143, -2.2550328}, -{-0.3714653, -1.4523178, 0.4398792}, -{-2.4598849, -1.4385419, 1.3378714}, -{0.3383568, 0.7856591, 0.9813646}, -{-0.2263594, -0.1698561, -0.1705628}, -{-0.3753851, -0.0276462, -0.6656810}, -{0.8879443, -0.1145656, 1.7698814}, -{-0.5375338, 0.8311055, 0.0003367}, -{0.6233839, 2.9981489, 0.7811897}, -{2.8068020, 1.5577713, -1.2673179}, -{0.4908920, -0.1016197, 0.2136895}, -{-0.4164982, -0.3558269, 0.7050512}, -{-1.4413939, -0.2053909, -1.1536202}, -{0.1910874, -0.4855185, -0.2668713}, -{1.2523756, 1.4426663, 1.7331120}, -{-0.2925380, 1.4046954, 0.4895649}, -{-0.1838700, -0.7461997, 0.0751644}, -{-0.8027396, 1.4148548, -0.1457542}, -{2.7184405, 0.1154586, -1.8597050}, -{0.2690345, 0.4976957, 0.1210623}, -{0.2330270, 1.5617906, 1.5034759}, -{-0.5834623, 1.4057117, -0.8899866}, -{0.0163682, -0.2517941, 0.2510431}, -{-0.8889926, -0.0683436, -0.1141858}, -{-0.1489247, -0.5309870, 0.3066758}, -{0.5441253, -0.1158325, -0.1782701}, -{0.2506767, -0.9799866, 0.2347035}, -{0.4672806, -0.7008654, -0.4286981}, -{-0.2995699, 0.0365136, -0.1786350}, -{-1.1487139, 1.2540857, 1.8533340}, -{-1.7168502, -1.9573603, -0.3638210}, -{-0.2423436, 0.1349948, -0.4697222}, -{-1.9565589, -0.7184421, 2.8537061}, -{0.8596629, -0.5336328, 1.0651920}, -{0.3273928, -0.0453199, -0.3502595}, -{0.3189336, -0.0455603, -0.7143221}, -{0.2910797, -0.5063261, -0.5824001}, -{0.4780722, 0.2395895, -0.2683057}, -{-0.0853229, 0.7292104, 0.1628780}, -{0.1558332, 0.5232158, -1.0917240}, -{0.2999692, -0.0982003, -0.4960083}, -{1.8894519, 1.4626353, -0.6804298}, -{2.4061074, 1.2960715, -0.1970334}, -{0.1257670, 0.3494972, 0.2631694}, -{-1.5875477, 1.5959592, 0.5363353}, -{0.4914568, -2.1938405, 2.1225259}, -{-0.0307748, -0.5625980, -0.0021340}, -{-0.1677499, 0.2009291, -0.0115671}, -{0.3787732, -1.2403874, -0.1354211}, -{-0.0788009, -0.0443135, 0.5921396}, -{-0.7452830, -0.0596749, -0.9905685}, -{1.6973567, 2.2585990, -0.3537931}, -{0.5157012, 0.0667297, -0.3583508}, -{-0.2514844, 0.3777169, -1.7781777}, -{-0.1449715, 0.1046431, -1.0421330}, -{0.4883428, -0.0447277, -0.4162643}, -{0.1407105, 0.0701114, 0.0320429}, -{-0.0063489, -3.0579305, -0.8119215}, -{-0.2687715, -0.1601332, 0.0214399}, -{-0.2032076, 1.1673429, -1.0753449}, -{0.2939929, 0.7388926, 0.1571736}, -{-0.3771812, 0.2392884, -0.3747415}, -{0.0225571, 0.4657770, 1.0899161}, -{-0.2923067, 0.5687450, 1.3903265}, -{0.1170864, 0.0385553, -0.1568191}, -{0.0010100, 0.2176969, -0.1234210}, -{1.9490565, -0.4967891, -0.6301463}, -{-0.0859401, 0.1133912, 0.8298548}, -{-0.1202616, 0.5685778, 0.6898854}, -{-0.3881985, 0.4002085, 0.9764838}, -{-0.1507751, 0.2457515, -0.7290401}, -{-0.5772744, 1.4680581, 1.6817755}, -{1.0109506, 0.6715226, -1.2050654}, -{0.4536923, -0.7803533, 0.6021280}, -{0.9260955, 2.3135042, 0.9460802}, -{-0.9477729, -0.6069506, -1.0168848}, -{-0.2383449, 0.4078479, 0.1112495}, -{0.1125705, 0.3929870, -0.2907176}, -{-1.3702412, 0.9092309, -1.8898387}, -{-0.3272168, -0.1913895, -0.5143399}, -{0.4256406, 0.3591474, -0.3412583}, -{-0.6632770, 0.1610496, -1.5580477}, -{0.3964951, 0.1072337, -0.3882289}, -{0.7646788, -0.5012527, 1.0678464}, -{0.6020142, 2.1914575, -0.2719928}, -{0.1644063, 0.1263480, -0.2869909}, -{0.9220442, -0.5001076, 0.9623897}, -{1.0921648, -3.4606965, 0.3144048}, -{0.6120083, 0.1973298, -0.2805130}, -{1.3155607, -0.1937509, -0.6840057}, -{0.6153530, 0.4152285, 1.0085553}, -{0.2301100, -0.1650680, -0.0686902}, -{0.4512722, -1.0075990, 0.4520470}, -{-0.2611319, 2.2028799, -3.3089883}, -{-0.5119643, 0.5145530, 0.0098749}, -{0.0152831, 1.6550369, -0.1497427}, -{-0.4481210, -1.3859713, 0.9077368}, -{-0.2020931, -0.0773476, 0.4367960}, -{1.6142554, -0.7840701, 0.4810923}, -{0.0643875, 1.3944364, 1.6292443}, -{0.0597737, -0.3002678, -0.3816536}, -{-1.0448049, -0.4816298, 0.3494129}, -{1.0587531, -0.0821829, -1.3195734}, -{0.0280838, 0.0893796, 0.3241968}, -{-0.2812809, -0.0044406, 0.2781212}, -{-1.3846875, 0.9941797, 0.0024104}, -{0.5937585, 0.1984814, 0.3690110}, -{-0.1365554, -1.2706884, 1.2370665}, -{-0.2694786, -0.3533167, -1.3227085}, -{-0.4383570, -0.9224468, -0.4340020}, -{-0.7551824, -1.4043826, -0.4668837}, -{-0.8223447, 0.3034808, -0.2149989}, -{-0.1082864, 0.0745128, 0.1312838}, -{-0.1487938, 0.1547110, -0.1178106}, -{-2.2985251, -0.9117764, -0.2153925}, -{0.0990336, -0.7630978, 0.3328875}, -{-0.8767101, -1.1642810, -1.9598871}, -{0.1997163, 2.5703723, 1.3570105}, -{0.3229017, 0.1493778, 0.2412831}, -{1.5442365, -1.3333116, 1.9242618}, -{-1.1031361, 0.8563766, -1.6298008}, -{-0.0255275, -0.3312931, -0.2943460}, -{-0.1994761, -1.1005089, -1.0633765}, -{0.5494161, -2.7048810, -1.8622029}, -{-0.4401251, -0.2993797, -0.0643224}, -{0.1242682, -1.6107864, -1.0645754}, -{2.5068457, -0.6040909, -0.5811095}, -{-0.1375492, 0.2089872, -0.4277659}, -{-1.5198183, 1.1994056, -1.2697433}, -{-0.1255727, 0.8947816, 1.1931859}, -{0.3675741, -0.2461770, -0.5340475}, -{-1.4963267, -1.2458730, 0.5039476}, -{-1.0796977, -1.5002230, -0.3408699}, -{0.5704201, -0.3208803, 0.5936826}, -{-0.0645790, 0.7497386, -0.7542320}, -{0.2708243, 0.4285077, -0.4548926}, -{0.3694951, -0.5429232, 0.7394574}, -{0.4029164, 0.8574382, 0.0679616}, -{-0.2772374, -3.0572729, -1.1541784}, -{0.2747530, -0.3619337, 0.3421585}, -{0.8771745, -0.7368845, 3.2058256}, -{1.3855928, -2.1130569, -0.9536069}, -{-0.4836731, -0.1780420, 0.5947607}, -{0.2505015, -0.3182768, -0.3001915}, -{-1.1785871, 0.9712771, 0.1857460}, -{0.1791360, 0.4256015, 0.2411605}, -{0.0949873, -1.9160255, 1.9706528}, -{0.6721850, -0.2948928, -0.4824503}, -{-0.0978403, 0.6559012, 0.3559941}, -{1.7525223, 0.8271949, 0.1785358}, -{-0.4757381, 0.3561969, -1.3458381}, -{0.4658725, 0.2744318, -0.3452308}, -{0.8478040, 1.4294609, -0.8133759}, -{-0.5885894, 0.1219341, -0.6724163}, -{0.1305106, 0.2857761, -0.5160971}, -{0.0919217, -0.7459833, -0.5063521}, -{0.2242723, -0.5813210, -0.3394017}, -{0.1403195, 0.3404832, 0.4354262}, -{0.5582833, 3.7375681, -3.2719817}, -{2.3144352, -0.7304362, -1.0354159}, -{0.0564519, -0.1415871, -0.1578124}, -{1.8414284, -1.9642483, 0.0464570}, -{-2.8368704, 1.5143878, -0.6798729}, -{-0.3573252, -0.6014078, -0.5150779}, -{-1.7724653, -2.6391764, 0.2415990}, -{-0.7749498, 0.4440289, 0.6428634}, -{-0.0909959, 0.6293582, 0.8031600}, -{-1.8792617, -0.5474257, -0.5913790}, -{0.8747709, 1.8465655, 0.5552957}, -{-0.1791926, 0.2169411, 0.5043762}, -{0.4750830, 0.2194068, 1.8890547}, -{1.3510096, -0.4896438, -0.2842244}, -{0.2964395, 0.2451214, -0.3959046}, -{0.4008227, -0.1559107, -0.4080295}, -{2.4716084, 1.3746006, 1.2460773}, -{-0.2873621, -0.0548715, -0.3045356}, -{-1.0872899, -0.9724135, -0.6489921}, -{0.4869141, -0.2083705, -1.0554188}, -{0.1693709, 0.0004103, 0.0232621}, -{-0.7277920, 0.5750959, -0.2825442}, -{0.9503970, 0.5802715, -0.4494333}, -{-0.3158120, -0.1988707, 0.2011052}, -{-0.0509036, 0.4959302, 1.2131239}, -{-1.0217791, -0.0612856, -1.0136371}, -{-0.1174749, -0.7295172, 0.2806762}, -{0.3812415, -0.3918555, -1.0103766}, -{1.0120203, 0.4253646, 0.0034888}, -{-0.6076309, 0.3837580, 0.4137383}, -{-1.3120896, 0.3274231, 0.5356969}, -{-1.3723847, -1.0041860, -0.5755426}, -{0.2854691, -0.0545563, -0.1344180}, -{0.5715818, -0.0401829, 0.6594520}, -{-0.0859181, -0.4678149, -0.2037510}, -{-0.1389900, 0.4522794, 0.0672570}, -{0.6666835, 0.3444074, 2.9537859}, -{-0.3528512, 1.2960987, -1.6589533}, -{-0.2094915, 0.6504480, -0.0413949}, -{0.5830479, 1.4213958, 2.7095990}, -{-0.3488207, -2.7650273, 0.6529962}, -{0.5683576, 0.0420401, -0.3145432}, -{0.5255090, 0.5160358, -1.0943756}, -{-0.2616756, 0.5381373, 0.0909482}, -{0.1585326, 0.0909941, 0.4472848}, -{-1.4557503, 0.0540859, -1.2026528}, -{-0.8199168, -0.1020053, 1.7692349}, -{0.6539758, 0.2987118, -0.1798107}, -{2.6815250, -0.2173550, -0.4194057}, -{-0.7916324, -1.8644089, -0.4823986}, -{-0.1490412, 0.6295601, -0.0197517}, -{-0.3245004, 2.0755067, 0.9418771}, -{-3.4721551, 0.3380259, -0.7584451}, -{0.3041831, 0.4033696, -0.3527086}, -{1.1359482, 1.0477014, -0.9718602}, -{-0.2023261, 1.2709041, -2.7235115}, -{0.3146465, 0.2191468, -0.0607031}, -{-0.0037861, 0.9604566, 0.7284797}, -{-0.4148546, 2.0286467, 1.8806714}, -{-0.1704783, -0.8613182, -0.5558572}, -{0.0045281, -0.8705695, -0.4988864}, -{-0.9933478, -0.0220226, 1.8110865}, -{0.0000631, -0.1630390, 0.5633530}, -{1.2073320, -2.5777371, -0.0320323}, -{3.5872779, 1.2186457, -0.0907143}, -{0.1070623, 0.3744718, -0.0653850}, -{1.0001283, 0.3059500, -0.9486852}, -{-0.0936398, 1.9388126, 1.4607439}, -{0.0648986, 0.5466510, 0.3763338}, -{0.4360310, -0.4910959, 1.4234331}, -{-0.8414136, -0.3405721, -1.0278348}, -{0.1501031, 0.3637626, -0.4662275}, -{-0.9113928, 0.2985925, -0.2424654}, -{-0.1585872, -0.9677805, 0.2978905}, -{-0.2356514, 0.1680351, 0.3305846}, -{1.3894721, -0.7831209, 0.2185763}, -{-1.6058164, -0.7840036, 0.1217850}, -{-0.5304492, -0.0053840, -0.0397147}, -{-0.6891729, -0.8453297, -0.6892318}, -{-2.1590698, 0.1574314, 0.1773291}, -{0.3795578, 0.0669959, -0.1586484}, -{-0.4403888, -1.7437466, -1.3736960}, -{0.1112398, 0.0629726, 0.7357940}, -{-0.4289644, -0.7219931, 0.0410823}, -{-1.9703021, -0.1922213, 0.7319959}, -{-2.3396277, -1.8430122, 0.8207880}, -{-0.1674556, 0.4215150, -0.4904200}, -{1.4351790, 0.7337474, -1.5944686}, -{-1.5970559, -0.1244278, 0.1271944}, -{0.3355792, -0.4455394, 0.3222982}, -{0.6912493, -0.1259308, -0.4989391}, -{0.2912660, -1.3756368, 1.7640721}, -{-0.2381211, 0.0730320, -0.1056523}, -{1.5741251, 0.1920993, -0.7603070}, -{-0.0313910, 0.1369859, 1.7348821}, -{-0.2873937, 0.0185019, -0.1707978}, -{-2.3053272, -0.7575927, 3.0161331}, -{-1.3043399, -0.9400668, -0.4116636}, -{0.2422298, 0.2171435, -0.1978996}, -{1.5715605, 0.5110898, -0.3433310}, -{-0.2560965, -0.7728164, -0.4483792}, -{0.3465971, 0.1829943, -0.1122128}, -{-3.6038086, -2.2948482, 3.7347813}, -{0.3920422, 0.3339850, -0.1741748}, -{-0.1183182, 0.2837026, 0.1333865}, -{0.2041813, -0.1373797, 0.2821882}, -{-0.0557131, 0.8464879, 0.3983997}, -{0.3713892, 0.1857527, 0.4548483}, -{0.2865518, 0.8104321, -0.8182375}, -{0.9838055, 2.3792036, 1.1808696}, -{0.1367386, 0.2520233, -0.0759792}, -{0.8400723, -0.8654693, 0.4758402}, -{-0.1864849, 0.2790168, -0.5767189}, -{-0.4632595, -0.4361226, -0.0872157}, -{-1.2937758, -0.9207199, 1.7568275}, -{1.0593350, 0.9945173, 0.3722779}, -{-0.0093096, -0.1536174, 0.3646809}, -{-1.8179445, 1.0808601, -2.6092598}, -{4.5445037, -1.4661922, 2.1868107}, -{-0.6109890, 0.1912777, -0.1957564}, -{0.5192731, 1.2783483, -1.0224750}, -{-0.7259687, -2.0022244, 0.9973031}, -{0.1851406, 0.2087096, 0.2367882}, -{2.4313464, 1.5950943, 2.5163505}, -{0.7359058, -1.8946112, -0.9255536}, -{-0.3909338, 0.2707847, -0.1451767}, -{-0.5690331, -0.8336113, -0.7156954}, -{-0.4062643, 0.3687503, -0.5611530}, -{-0.2398030, -0.0119397, 0.9459276}, -{-0.5081778, -1.7486039, 1.5324827}, -{-1.2418389, 1.3765274, 1.8904744}, -{-0.4419993, 0.3387884, -0.6306401}, -{1.1215024, -0.0648428, -0.2971100}, -{-0.0637442, -1.7081922, 2.4175911}, -{-0.2256767, -0.5690064, -0.1422491}, -{-1.2355829, -0.1615474, 0.3237036}, -{0.4588714, -0.9437417, 0.2973320}, -{-0.4250144, 0.0096513, -0.0124992}, -{0.0899091, 1.6973963, 0.3672677}, -{-0.9629631, -2.1347768, -0.1570699}, -{-0.3425599, -0.4490806, 0.0283966}, -{-1.3060976, -0.6033320, -1.8992586}, -{-0.7450263, -0.5891393, -0.3961650}, -{-0.2645380, -0.4007787, -0.0335750}, -{0.1301489, -0.4958779, 0.2286615}, -{-0.5132384, -1.2561976, -0.0443789}, -{0.1204955, -0.3752933, -0.1110379}, -{0.3614887, -0.4529189, -0.8325626}, -{0.0298213, -1.4107805, -1.7971951}, -{-0.1875802, -0.0735401, -0.2082844}, -{-1.0671041, 0.1263986, 0.4622996}, -{-1.5922501, 0.5552923, 0.4501660}, -{-0.3994837, 0.2728696, -0.1648372}, -{0.5007105, 1.7821091, 1.1414150}, -{-1.1877351, -0.2607154, -1.3311883}, -{-0.1784391, -0.3389329, -0.3607011}, -{-0.2694132, 0.2286964, -0.2709657}, -{0.0138954, -1.5320725, -0.5891992}, -{-0.2294407, -0.1252427, -0.1959939}, -{-0.1857845, -0.8734263, -0.9948279}, -{1.1318990, 0.1178934, 0.9329372}, -{0.3094277, 0.0852543, 0.5415188}, -{-0.9586183, -2.7398086, 0.0353147}, -{0.0695670, 1.2083937, -1.7507937}, -{0.1578899, 0.2668372, 0.1712302}, -{0.7788315, 2.3678105, 0.0833213}, -{-1.2497391, -1.2441902, -1.2230326}, -{-0.1193902, 0.1320118, -0.4264402}, -{-0.0800737, 0.7922408, -0.1864870}, -{0.6491041, -1.5787383, -1.3634958}, -{0.1163738, 0.9949249, -0.1340376}, -{0.1656355, 0.9392821, 1.3841002}, -{-0.3156284, 1.2276682, 2.3234246}, -{0.0048379, 0.4775075, -0.2608450}, -{-1.3494797, -1.3089492, -0.8398163}, -{-1.4926242, 1.3765566, 0.2010730}, -{-0.1031815, 0.0690532, -0.0154183}, -{-1.0939105, -1.4593337, -0.9401022}, -{0.4175293, 0.4991472, 0.4809085}, -{-0.0126498, 0.0574988, -0.6334425}, -{1.3409929, 1.1031606, 0.8996344}, -{0.0004584, -0.0016399, -0.5869642}, -{0.5582238, 0.1899975, -0.3661042}, -{0.1883535, 0.3405917, 0.0429381}, -{-1.3838021, 1.5868164, 0.6275247}, -{-0.6289806, -0.6502675, -0.0752719}, -{-2.0805564, 0.2553050, -0.4071317}, -{0.4086489, -0.5034834, -1.0809975}, -{0.0929592, -0.4298325, 0.1247238}, -{1.6627530, 0.4103838, 1.3428448}, -{-2.2899046, 2.1782064, 0.3195259}, -{0.5879145, 0.1834967, -0.1727275}, -{1.5849533, -0.7238598, 0.6030142}, -{0.4655881, -1.1642094, 0.1762342}, -{-0.0035103, 0.6088200, 0.5954229}, -{-1.1432129, -1.0781606, -0.6292996}, -{-0.4284338, -0.3174027, 0.1460112}, -{0.0954719, -0.1586587, 0.0278252}, -{0.6001241, 0.0413552, 1.3833274}, -{-0.9770479, 0.7500701, 0.2264226}, -{0.2777718, 0.5718384, -0.4627188}, -{-0.3243649, 2.1833947, -2.8639286}, -{2.5957587, 1.8150169, 0.6206218}, -{-0.0459444, 0.1569581, -0.4359023}, -{-1.3571407, 0.6057548, 0.8166431}, -{1.7397357, 1.3031981, -0.4895906}, -{0.0732513, -0.0036223, 0.5333118}, -{0.6249190, 1.0907675, 0.9812954}, -{-0.0406285, 0.7902001, 0.1381157}, -{0.2812554, 0.8642562, 0.3073043}, -{0.5443220, 0.8112164, 0.3173150}, -{-1.1794060, 0.4653952, -0.1680422}, -{0.7782542, 0.5632150, -0.2806699}, -{-1.1499072, -1.9457122, 0.0446199}, -{-1.5672810, -2.7434442, -0.0141365}, -{-0.4427074, 0.2354949, 0.0595492}, -{-0.7595055, 0.0840971, 1.0885637}, -{2.1110585, 1.2906569, -0.5080402}, -{0.2412746, -0.4988034, 0.7184574}, -{0.7833550, -0.8475778, 1.9237827}, -{-1.1489927, -0.1466619, 1.0136181}, -{-0.2450144, -0.0381882, 0.5942707}, -{-0.2911897, -0.3144242, 1.2533340}, -{0.2048488, -0.0136309, 1.7100073}, -{-0.5580387, -0.0963491, -0.1555126}, -{-1.3942404, 0.3036195, -0.3265848}, -{-3.1224911, -0.1353183, -0.5867852}, -{0.7456514, 0.3294421, -0.1394125}, -{-1.9573339, 0.3761309, -0.6951956}, -{-0.6764378, 1.5425678, -0.5734640}, -{0.2407591, 0.1268796, 0.2447225}, -{-0.7002614, 0.0122787, -1.3364549}, -{-0.6048329, 0.1318130, -0.1676119}, -{0.4504908, -0.4163981, 0.5158382}, -{-0.4579805, -0.0982734, 2.0436692}, -{-2.5476120, 0.4458331, 1.2213143}, -{0.0319256, 0.1870618, 0.1629280}, -{1.1440634, 1.9053742, 1.4407378}, -{1.3344333, 1.5005298, -1.8995678}, -{0.1748469, 0.1184098, -0.5447508}, -{-1.5102245, 0.8198828, 0.3668833}, -{-2.4686098, 0.5112382, -0.4195992}, -{0.3162807, 0.4162404, -0.6274319}, -{0.0038307, 0.7471834, 1.1736321}, -{-0.0195135, -1.2599784, -0.1978804}, -{0.0297034, 0.4051444, -0.4162357}, -{-1.6291660, -0.3278001, -0.7457288}, -{1.0103220, -2.9933150, -0.3022198}, -{0.1099940, 0.0974567, -0.2178596}, -{-0.0889168, -2.5315740, 0.3288479}, -{2.9029288, 1.4863762, 1.1560531}, -{-0.4358510, -0.7107344, 0.2419842}, -{-0.4557346, -2.5348732, 1.0783981}, -{-0.3256189, -0.1360448, 0.5196061}, -{-0.3118595, 0.2990566, -0.1760474}, -{-0.4942809, 2.0054057, -1.0919424}, -{1.7754995, -0.2373658, -2.1146696}, -{0.0423195, -0.2077326, 0.7382157}, -{0.9029520, 0.3642891, -0.0041569}, -{0.9870696, 0.1679502, -0.0474408}, -{0.0814686, 0.3009713, 0.3983445}, -{1.1830866, 0.9861013, -1.2154138}, -{-0.7662681, 0.1533094, 1.2102867}, -{-0.9308919, -0.5224693, 0.3565955}, -{-1.0852178, -0.8918798, 0.4046309}, -{-0.7697254, -1.1038946, 0.8435305}, -{0.0099849, 0.0634709, 0.3780330}, -{2.3039122, 0.0298482, 0.3320339}, -{-0.6186993, 0.1970709, -1.6236813}, -{0.1296185, 0.3889717, 0.4551529}, -{0.0991211, -0.2524356, 0.0230410}, -{1.2994289, -1.9434847, -0.0762409}, -{0.1977101, 0.7129424, 0.4811994}, -{0.6452574, 0.1142559, -1.2645766}, -{1.4598246, -0.3629984, -0.6474956}, -{-0.1396337, 0.9131825, -0.0279219}, -{-0.7113034, 1.0358872, -1.0749922}, -{0.7230560, 1.6068482, 0.5849475}, -{0.7265717, -0.4277482, 0.4808604}, -{-0.0532368, 1.6218204, -2.0707946}, -{3.1800213, 2.4518912, 3.2820473}, -{0.1931886, 0.1240467, -0.0431288}, -{0.7176692, 1.3145341, 0.9054470}, -{1.6295356, 2.4653149, 0.8787692}, -{0.1966708, -0.2889460, -0.0766378}, -{1.7743597, 2.4096589, 1.2319211}, -{-0.5483743, -1.5472711, -0.1982777}, -{0.1436681, -0.0165277, -0.7655227}, -{-1.0719875, -1.6428086, 0.4593414}, -{-0.2827050, 1.3697498, -1.2367063}, -{-0.4354425, 0.0038599, -0.0425517}, -{-0.1681594, -0.1186207, -0.0813524}, -{1.1474094, 0.1009282, -0.1804746}, -{-0.2146244, -0.0389726, -0.2795366}, -{0.0372856, -1.5560427, 0.4896329}, -{-0.6697565, 0.2894795, -0.1284500}, -{-0.0171387, 0.4277870, 1.2031248}, -{0.8333345, -0.8604418, 0.1716001}, -{-1.6818731, 0.4227462, 0.5164634}, -{0.4516506, -0.4798773, 0.4543502}, -{0.4715748, -0.9500206, -0.4435107}, -{0.6515050, -1.6586150, -2.0808403}, -{0.2408126, -0.4327915, -0.0297934}, -{-0.1811754, 0.3194553, 0.2832988}, -{1.0936099, -1.7763960, -0.5329738}, -{0.6100679, -0.3310814, -0.0421963}, -{-0.7754856, 0.6387573, 1.1746291}, -{1.0334283, -0.1721340, -0.2478880}, -{0.7380448, 0.6572105, 0.0013778}, -{1.8119537, -0.4436382, -0.6038492}, -{0.0162070, -1.3612309, -1.0385182}, -{-0.1698613, -0.3463221, 0.4485960}, -{1.0597748, 0.0413585, -1.3879155}, -{1.2617191, -1.3189732, 0.2284200}, -{0.0205296, 0.1902005, 0.1247101}, -{-1.2843182, 0.7640929, -0.2627146}, -{-1.0009544, 0.3184503, -1.5302374}, -{0.6199213, 0.2490930, 0.0796102}, -{0.1985586, 0.0420452, 0.2123965}, -{0.4315653, 0.0426582, -0.7515965}, -{-0.4958139, 0.0512674, -0.2768683}, -{-0.8806074, -1.4739645, -1.8952284}, -{-0.2685585, 1.2167181, 0.8473479}, -{0.1985426, 0.1894547, -0.3911186}, -{1.8417711, 1.5517883, 0.3303861}, -{-0.6830100, -1.6951859, -1.5997601}, -{0.1419377, 0.3372928, -0.3692672}, -{-0.2712760, -0.0562181, -1.1328750}, -{-0.1590076, 0.0417397, -0.4969699}, -{0.0256213, -0.0660445, -0.1662798}, -{1.1585598, -0.3514498, 1.1304612}, -{-1.8711193, -1.2621781, -1.6427267}, -{-0.2227830, 0.0744338, -0.3502201}, -{-2.6888635, 1.0788891, 1.3289515}, -{2.5953224, 1.2135713, 1.9075688}, -{0.2316983, -0.4524636, -0.0063374}, -{-2.3347785, -0.8000957, -0.1065990}, -{1.9526070, -1.0923216, -1.2838069}, -{-0.2372181, -0.3247179, 0.8479786}, -{0.9403948, 0.1723811, 0.2459076}, -{-1.6623150, -2.1977525, 2.0999742}, -{0.1078532, 0.0672892, 0.0833597}, -{0.5270470, 0.9306274, -0.4761512}, -{-0.7489356, 0.5218527, 0.4708866}, -{0.3630867, 0.2109770, 0.5005177}, -{-0.0714462, 0.1451556, -0.3251097}, -{0.6894497, 0.1573944, -0.5179086}, -{0.3304723, -0.6630867, 0.2033796}, -{-1.6454142, 0.3296446, -0.7160465}, -{0.2209498, -0.6451601, 0.1993150}, -{-0.6143044, 0.1629350, -0.3242975}, -{0.5276386, 1.0065061, -1.2381550}, -{-0.6224092, 0.2296422, -0.3112732}, -{0.0668032, -0.2382753, 0.0800015}, -{0.5153065, 1.0713665, 0.7442328}, -{-0.5793806, 2.3141253, -1.2995306}, -{-0.3513901, -1.0235918, -0.4102322}, -{-1.8673074, -1.0916836, 1.4161215}, -{1.6333680, -0.1470933, 0.7457550}, -{0.5051037, -0.4764686, -0.2480365}, -{0.9144548, 0.0596116, -0.0749028}, -{2.7541027, -1.5974036, 0.7015495}, -{0.0292706, -0.1940958, -0.1112175}, -{-1.1682134, 0.7888774, -1.5811460}, -{0.2625289, 0.0252434, -1.1937791}, -{-0.2323791, 0.1015220, -0.1224154}, -{-1.2001604, 1.1123600, 0.6012703}, -{0.8172260, -0.2639899, 1.1362014}, -{0.3195513, 0.0192807, 0.6141720}, -{1.7978650, -1.5391456, 0.0542428}, -{-0.2397961, 0.1885594, 2.4371984}, -{-0.4344652, -0.2321434, -0.0609679}, -{0.1911214, -1.1111622, 0.4851777}, -{-0.7911862, -0.1472040, -0.6218022}, -{-0.1687428, -0.2282127, -0.2135310}, -{-0.2653959, -1.0971346, -1.3824099}, -{0.1437597, -0.0467571, 0.6256163}, -{0.1026253, -0.0522451, 0.4115557}, -{0.3849103, -0.8058050, 0.5530728}, -{0.5478404, 1.8026639, -0.1438039}, -{-0.3318665, -0.1425077, 0.2269126}, -{0.9569576, 0.1762537, -3.7831697}, -{-0.6461208, 1.6726865, -0.2906004}, -{0.0469429, 0.0932064, -0.0183315}, -{0.4499544, -2.0204656, -1.9110529}, -{0.1828012, -0.0946532, -0.1773460}, -{-0.4425732, -0.6038175, -0.2758141}, -{-0.7297411, -2.2255304, -0.7644421}, -{-0.6245612, -1.8418353, -0.5259128}, -{-0.2482944, -0.2568923, -0.2475323}, -{-3.2902439, -1.8227388, -1.3184711}, -{-0.7895778, -2.1834373, 2.1704717}, -{0.1713545, 0.0833215, 0.0927554}, -{0.4684750, -0.5202142, 0.1633288}, -{-0.2248142, 1.9171182, -0.4785238}, -{-0.7282562, 0.2385765, -0.0863182}, -{-0.6713707, -0.4410611, -0.2741312}, -{-0.6246666, 0.8001646, -1.6645167}, -{0.4771382, -0.1935240, 0.1729348}, -{-1.5437796, 0.7738726, 1.7700567}, -{0.1360729, -0.2149984, 1.1724257}, -{0.3382888, -0.3772547, 0.1578808}, -{1.1463715, -1.4870659, -2.5929749}, -{0.4250661, 0.3625818, 0.6402887}, -{-0.6933657, 0.2452749, -0.0927253}, -{0.1034608, -0.0722048, 0.1624477}, -{-0.9913676, 0.4826180, -0.1433027}, -{-0.0935688, 0.1995428, -0.6547653}, -{1.1608191, 1.9049717, 1.2298814}, -{-0.1774498, -0.8843687, 1.8625182}, -{0.0649060, 0.0229402, -0.1101102}, -{-0.9751568, -0.5010555, -0.3973644}, -{-1.7760991, -0.0383224, 0.3454512}, -{0.1388863, 0.5901043, -0.1988644}, -{1.5061437, -0.2793217, -0.2188860}, -{0.4423154, -0.3261736, -0.6884017}, -{-0.5011950, -0.1937961, -0.3652804}, -{-1.6091956, -0.3768508, -1.2904631}, -{-0.0498179, -1.3552326, 0.4168391}, -{0.4871420, -0.0844197, 0.4141231}, -{1.1967162, -0.1929903, 1.3103484}, -{1.7376711, -0.6814843, 0.8886285}, -{-0.2198787, 0.5574673, 0.2460255}, -{0.2150799, -1.3087343, 0.3559752}, -{-1.2218831, 0.5380657, -1.0159523}, -{0.1443203, 0.5749034, 0.0385715}, -{0.4441847, 0.3773370, 0.2318112}, -{0.6086680, 0.6600190, 0.3307830}, -{-0.6305811, -0.0241498, -0.5585325}, -{-1.2629336, 0.5264137, -0.6838727}, -{-0.2790469, 0.0787013, 0.1279912}, -{0.4515101, 0.4630355, -0.0592275}, -{-2.2082412, -0.1157780, 2.7591558}, -{2.6254377, 0.7721573, -2.3700695}, -{0.5964879, -0.6634024, 0.1005411}, -{0.2230679, -0.0958167, 0.4818807}, -{0.0040714, -1.1369723, 0.2104573}, -{-0.4895777, 0.9856803, 0.3747058}, -{1.0104352, -1.9559741, 3.9424930}, -{1.1784228, 1.4385589, 1.8307393}, -{0.0420803, 0.3727090, -0.0107701}, -{0.8182687, 0.0478058, -1.3432561}, -{-1.1694639, 0.0408328, 2.5417483}, -{-0.6763859, 0.2878444, 0.4942393}, -{0.1243685, 0.1374741, 1.5603660}, -{0.1147208, 0.2810107, 1.3634101}, -{-0.1050683, -0.1473220, -0.2015614}, -{-0.0374588, 2.0923102, 0.0942508}, -{0.0205983, -0.4973688, -0.4818447}, -{0.0901658, -0.3304800, -0.0816921}, -{-0.7159080, 0.5326605, -1.4220891}, -{-0.1653469, 0.3636841, 0.9031263}, -{-0.5461826, 0.4525362, -0.4663099}, -{0.0494562, 0.5247145, -1.0797148}, -{-1.0430075, 0.6022653, -0.0255519}, -{0.3322296, 0.0496783, 0.7028545}, -{0.3383897, 1.1464728, -0.0528484}, -{-0.1388978, -1.0296679, -0.9013984}, -{0.3952397, 0.3032584, 0.3052112}, -{1.2931573, -0.5179526, 0.0129111}, -{0.1963011, -1.8124188, 0.7520064}, -{0.2012262, -0.1583487, -0.0001268}, -{-1.4672185, -1.0233493, 0.2545846}, -{1.5884234, -0.9333519, 1.3715085}, -{0.1188830, -0.1980365, -0.0329322}, -{-1.1231089, -0.5790876, -0.7454041}, -{-0.8376367, -0.0093966, -1.2741454}, -{-0.2342198, 0.0214044, -0.6899423}, -{-0.1818339, 1.2116463, 0.1587005}, -{-0.7155569, 0.4653520, 0.2098883}, -{0.1088703, 0.2968089, -0.6740763}, -{-0.6073536, -1.4580518, -2.2816110}, -{-0.0837315, 0.7664710, 1.2745030}, -{0.1859004, -0.3899764, 0.1142633}, -{-1.2068350, 1.4926564, -1.3185608}, -{2.1617467, -2.8792753, 2.0201926}, -{0.2498687, -0.3394863, 0.2944191}, -{-0.7181227, -0.1961430, 1.6538742}, -{-1.2979679, -0.9230468, 0.4094451}, -{0.6271785, 0.1229693, 0.1626972}, -{0.6945609, -0.1687448, -0.1565588}, -{0.9486411, 0.4357619, 0.2690426}, -{-0.2849867, -0.6687477, -0.3323660}, -{1.1012446, -1.9448905, -0.5869515}, -{1.9859772, -1.0816211, 0.5414605}, -{0.3309411, -0.2962353, -0.1247496}, -{-0.4865729, 1.7036346, 0.1238249}, -{-0.0071697, 0.5255533, 1.3408386}, -{0.2602957, -0.2987188, 0.5438851}, -{-1.0732430, -1.8404038, 1.3670008}, -{-0.9691575, 1.2968466, 1.8893991}, -{-0.2919253, 0.0596705, -0.2334005}, -{0.4998415, -0.5654499, -0.1635130}, -{-0.6991338, -0.2797665, 0.4048735}, -{-0.0417730, -0.0829125, 0.2179081}, -{-0.6631536, 2.0286617, -0.5463392}, -{0.1493269, 0.1373899, 2.0563958}, -{0.8031858, -0.2848160, -0.1938312}, -{-0.1967443, 1.9868751, -0.2113771}, -{1.6077106, 0.7962940, 1.3271849}, -{0.3491576, -0.4481419, -0.0900661}, -{-2.9178627, 1.7464836, -0.6685467}, -{1.6453142, -1.0443556, -0.4234403}, -{-0.2318110, 0.0447238, 0.1414759}, -{-0.5539651, 1.9298512, -1.2020015}, -{1.0433639, -2.3831403, -2.9409750}, -{0.0805327, -0.1738526, -0.1206513}, -{0.4744514, -1.1034139, -0.1170066}, -{1.8914403, 0.1751100, 1.5737721}, -{-0.1866357, -0.1965747, 0.0013580}, -{1.3352191, 0.2418026, -0.7325017}, -{-0.2074482, 0.9436374, 1.0509238}, -{-0.0441731, -0.2374072, 0.2654554}, -{-1.4433999, -0.0894649, 0.1726760}, -{-0.1908691, -0.1410689, 0.3854937}, -{0.4591390, 0.1630107, 0.2377752}, -{0.5573815, 0.1490560, 0.1248941}, -{0.6424958, -0.1623725, 0.8088378}, -{-0.6994920, -0.1504917, 0.0586263}, -{0.2837780, -1.2025059, 0.4124582}, -{-0.0899596, 0.8424039, -0.7575055}, -{0.0789143, 0.2707123, 0.0833020}, -{0.8126181, 1.1311893, -1.0460445}, -{-1.4918461, -1.3108680, -0.5690937}, -{0.4302622, -0.4091178, 0.2001499}, -{1.2112682, 0.2046875, 0.4236912}, -{0.0414143, -1.5320696, -0.1577607}, -{-0.1012601, -0.1323000, 0.0981359}, -{0.2046574, -1.2747016, -1.2746091}, -{-2.0603578, -0.3276038, 0.4406177}, -{-0.1841328, -0.0156229, 0.3134860}, -{1.0871761, -0.4058494, -1.3040427}, -{-0.6356373, -0.1624665, -1.7245725}, -{0.3627914, -0.0476817, 0.0575114}, -{-0.1324069, 0.1415620, 1.3400656}, -{0.1827174, 0.2003521, 0.5523353}, -{0.4810228, 0.1076838, 0.2522830}, -{2.9370706, -0.0954038, 0.6264281}, -{0.6254615, -0.5256260, 0.5936072}, -{0.0316204, -0.6257699, -0.4519276}, -{-2.0695536, 0.9822586, 0.1439757}, -{2.7216027, 1.6831150, 0.1612642}, -{0.0445529, -0.0587114, -0.1491662}, -{0.2308819, 0.3221707, 0.2789941}, -{-0.7229702, 0.0310881, 0.5714904}, -{-0.3543544, -0.4229161, -0.3544444}, -{-2.4002826, -0.8784989, -1.9358451}, -{-0.5860401, -1.6998978, -1.1202660}, -{-0.3376758, -0.1529908, -0.0973470}, -{0.8566210, 4.4951420, 2.8346822}, -{0.0436772, -0.0463138, 0.0772055}, -{0.3142985, 0.3843620, 0.3288855}, -{-0.0282029, -0.1860206, -0.7393309}, -{-0.7438108, 1.9849600, 0.7028209}, -{-0.2984794, 0.2821260, -0.0039806}, -{-0.9204457, 1.6704372, -0.8977507}, -{-0.7407014, -1.1821867, 1.7877913}, -{0.2195212, 0.6775700, 0.5270379}, -{1.6921985, 2.8719716, -0.1105642}, -{-0.9518794, 1.5843399, -0.4057731}, -{0.3007457, 0.0797739, -0.6140963}, -{-1.0546741, 3.2550197, -0.0514586}, -{-1.3599000, -0.4638538, -0.5689326}, -{0.2676970, 0.0099802, -0.2383103}, -{0.2229907, -0.2187119, -0.7713270}, -{0.1245931, -0.1537386, -1.1022911}, -{-0.0969429, 0.1980785, -0.1258376}, -{-0.3559177, -1.2704024, 0.1400192}, -{1.3204447, -0.3154615, 0.9846767}, -{-0.5822343, 0.3282806, -0.3363256}, -{0.2881370, 0.8619899, -0.7246667}, -{-0.8985610, -1.9429673, 0.4994654}, -{0.2642694, 0.0123944, 0.0454716}, -{-0.3724296, -3.0207868, -1.8849831}, -{2.8390129, 0.7341321, -0.5308905}, -{-0.1534186, 0.4427960, 0.8403004}, -{0.3607836, -1.3535297, 0.8387313}, -{-2.1323020, 0.7994025, 0.5441847}, -{-0.3715549, -0.1039985, 0.2071384}, -{-0.0269172, -0.7558493, 0.7305308}, -{0.8369414, 2.4781291, 0.6691754}, -{0.4176355, -0.5714498, 0.5489961}, -{1.5257384, -0.9230545, 0.1566381}, -{1.3391705, -2.1163802, -2.3188524}, -{-0.4110014, -0.1204128, 0.1673175}, -{0.8397112, 0.1425286, -0.1012473}, -{-0.7522697, -0.5696055, -0.7970169}, -{-0.5427265, 0.4417031, 0.3231464}, -{0.1184500, 0.7918240, 1.3904865}, -{0.8055788, 0.8408670, 1.0637318}, -{-0.5646585, 0.0173484, 0.0293131}, -{-0.9038788, -1.2464575, -0.7960548}, -{0.1062765, 1.9602034, 1.3337764}, -{0.1391939, 0.0422934, 0.0713286}, -{-0.0666521, -0.2542742, -0.0366458}, -{-0.6944364, -1.8178403, -1.2174358}, -{-0.0608818, -0.3761815, 0.4698532}, -{-0.5657020, -1.8425335, -0.6546760}, -{-0.2814495, 0.0367416, 0.0802845}, -{-0.6730975, -0.4910397, 0.2907047}, -{-0.0325192, -0.4107760, -0.0242306}, -{-1.3324134, -0.6451029, -1.8471091}, -{0.0912769, 0.5089654, 0.1652610}, -{-0.7731411, 1.2183405, -0.3799656}, -{-1.1314965, 0.1250667, -0.1002823}, -{-0.4562131, 0.1235238, -0.1567994}, -{-0.0909345, 0.2590376, 1.2533803}, -{0.5105567, -2.2766349, 1.5168715}, -{0.3537846, -0.5404130, 0.8426592}, -{1.9967562, -0.7133290, -3.4267285}, -{-0.2800933, -1.2731930, 3.2459073}, -{1.0584812, -0.2816274, 0.5952811}, -{0.0896634, -0.1932745, 0.4783768}, -{-0.2539656, 2.2155697, 2.1154668}, -{0.5293364, 0.8424042, -0.5720060}, -{0.9352719, 1.1218857, -0.6451174}, -{0.7291377, 0.8154290, -0.2816033}, -{-0.4218264, 0.0210873, -0.3800801}, -{-0.1526775, 0.9724866, -0.1957258}, -{-0.0597535, 1.2922356, -0.4251021}, -{-0.3818575, 0.7014705, 0.0247835}, -{-0.7392194, -0.5444721, -0.4205907}, -{-1.4152304, -0.8065771, -0.5260974}, -{1.1256009, 0.4991480, 0.1149021}, -{1.7105012, 0.5606990, -0.4032411}, -{0.4516316, 1.2219281, 0.9895386}, -{-0.1806890, 0.2285242, -0.4587750}, -{-0.8645759, -0.4874772, 0.3246976}, -{-0.1050305, 0.6367562, -0.6826100}, -{0.4090428, -0.1910766, 0.1086531}, -{1.0989276, -1.3616424, -0.6030692}, -{2.1074481, -0.8544232, -0.3117257}, -{-0.3725802, 0.0860330, 0.1150405}, -{-0.5086529, -1.6774005, -0.1062901}, -{-0.1353993, 0.7255187, -0.8362586}, -{0.1298556, -0.4293651, 0.3395422}, -{0.2269838, -0.6705311, 1.6363398}, -{0.3243878, 0.3028928, 0.9097213}, -{0.4288998, 0.2681254, -0.3544388}, -{0.4873610, 1.7590406, 0.5235385}, -{-0.5606039, -1.4191737, -0.2097450}, -{0.3870388, -0.1399861, 0.0797949}, -{-1.1184598, 0.9804789, -0.1342112}, -{2.5178926, 1.6618083, 0.3534633}, -{0.0756225, 0.3840773, -0.3764325}, -{-0.8271329, 1.8292952, -0.6255151}, -{-0.1168207, 0.3455733, 0.6372470}, -{0.1194294, 0.4205639, 0.1363528}, -{0.3654031, 1.5376556, -1.3719656}, -{-1.3993702, -3.2567592, 0.0692848}, -{-0.0606605, -0.3240614, 0.1275159}, -{1.6384506, -1.9960431, 0.7017054}, -{-0.8291278, 2.3747303, 0.0281784}, -{-0.0253615, -0.3758703, -0.2675837}, -{1.9031972, -2.6440711, 1.0290570}, -{0.4423905, 0.9294944, -0.6929308}, -{-0.1843192, 0.1737868, 0.2763541}, -{0.1109865, 0.1042268, -0.4985347}, -{-0.0179985, 0.5978048, 0.4580854}, -{0.2362465, -0.7950776, -0.4597905}, -{0.5376987, 0.1708956, -0.4879997}, -{1.7962449, 2.1350670, -0.5359567}, -{-0.8615303, 0.6115624, 0.5579742}, -{-1.1248866, 0.3180189, -0.8759377}, -{0.1928000, -0.5279638, -0.7078079}, -{0.1483086, -0.4060442, 0.1213455}, -{0.0046544, -0.1681650, -0.5256475}, -{0.0959436, -0.3405052, -0.1286223}, -{-0.1120882, -0.4962125, -0.0671635}, -{2.0156083, 0.6606585, 1.1232967}, -{-2.1377892, -1.7454376, -1.2312545}, -{-0.1151508, -0.3292519, 0.4903660}, -{-1.6555532, 0.9710532, -1.5222989}, -{1.6080265, 0.0912841, -0.5777804}, -{0.0786679, -0.0610863, -0.3810616}, -{-1.0303075, -0.1595926, 1.0494283}, -{-1.4975801, -1.3398944, -1.0533723}, -{-0.0479056, -0.2696638, -0.3301456}, -{1.6000353, 1.2549686, 1.3918270}, -{2.0823977, 1.9825615, 0.9892039}, -{-0.2380555, -0.3068946, 0.2657515}, -{0.1277418, 0.4347970, 0.6462319}, -{0.2540981, -0.1985672, -0.4360157}, -{-0.2746695, -0.1064759, -0.1104326}, -{1.7218870, -3.6415401, 1.1294148}, -{-1.6716542, -0.5351039, -1.9838389}, -{0.2873380, -0.2859172, 0.2119091}, -{-0.6798285, -1.7854609, -1.1579233}, -{1.3482976, 0.4627154, -0.8927142}, -{-0.0293049, -0.2728602, -0.3965062}, -{-2.4939141, -1.5540693, -0.8010911}, -{-0.6650036, -0.7372102, -0.9759117}, -{-0.0288995, -0.0730811, 0.0533930}, -{-0.0279839, -0.2011407, 0.6131526}, -{0.1886857, -0.3934399, -0.1063639}, -{-0.0120492, -0.5841720, 0.2398524}, -{-1.5828956, 0.3363243, 0.6882188}, -{-1.5861883, -0.2448012, -0.5048170}, -{0.4475064, 0.3646876, 0.3768864}, -{-0.6642146, 1.9723341, -1.1317384}, -{1.1643288, 1.3168014, 0.9964255}, -{0.1790287, -0.8319654, -0.3038422}, -{0.9809780, -0.9111070, -0.1117166}, -{0.8396344, 1.8756160, -1.6214850}, -{-0.4185068, -0.3354447, 0.0903963}, -{-0.2712748, 0.8100449, 0.4338563}, -{0.2863870, -0.2358233, -2.1097579}, -{-0.0115738, -0.0729377, 0.0846855}, -{-0.8700219, -2.4752393, -0.9674845}, -{0.0147204, 1.7888113, 1.3143852}, -{-0.0648608, -0.8295162, -0.7044052}, -{-1.1154621, -0.7724135, -0.6190951}, -{-0.9071154, -0.3540584, 1.8775876}, -{0.0021851, 0.6646261, 0.1571136}, -{0.3694316, -0.6876050, 2.0709667}, -{0.5496082, 1.4114635, -1.2418826}, -{-0.5012478, -0.3136389, -0.1313355}, -{0.3207036, -1.7452430, -0.4021553}, -{-0.9706793, 0.2772669, -0.0749163}, -{0.5276163, 0.1214517, -0.0447900}, -{0.6571423, 0.6483775, -0.2068788}, -{-0.6240408, -0.1099259, 1.4956752}, -{-0.3873582, -0.3227497, -0.2206017}, -{-1.0148128, 0.4047237, -1.1379207}, -{-0.5705405, 0.0184507, 0.7097415}, -{-0.1302813, -0.1808048, -0.2646863}, -{-1.0176399, -0.5757372, -0.2421686}, -{-0.3831736, 0.3707388, -1.1857501}, -{-0.0120249, 0.6274156, -0.3655988}, -{-1.7755460, 1.5170465, 0.9598688}, -{0.1083452, -1.3240900, -0.1684455}, -{0.2769104, 0.1550207, -0.1194407}, -{-1.9779207, -0.7400711, 1.1979021}, -{-0.3752154, 0.1354124, -0.3368089}, -{0.0770292, 0.2770732, 0.2806656}, -{-0.8199117, 2.3035879, -0.7413441}, -{-0.3167888, 0.9953279, -0.5583706}, -{0.1445103, -0.0531334, -0.0914499}, -{1.6064482, 0.8951194, -1.3239285}, -{0.7803992, 0.9423867, -1.9807590}, -{-0.4677485, 0.2416982, -0.4555058}, -{-0.3647484, 1.0247960, -0.0619486}, -{-0.1804494, -1.4674087, -1.9275825}, -{0.2387173, -0.5706677, 0.7144648}, -{-0.6439866, 0.5459545, -0.0835785}, -{-0.5322099, 0.3797651, 0.1304102}, -{-0.2134842, 0.4595691, 0.0916073}, -{0.1361900, 0.0548453, -0.2702972}, -{0.0759168, 0.6819580, -0.2381646}, -{-0.7477380, 0.2167950, -0.0361219}, -{-0.1997234, 0.0843940, 0.6742962}, -{-1.0638267, 1.0126488, 0.3251344}, -{-0.0287161, 0.3685032, 0.6627153}, -{0.2927418, 1.9055200, -2.0334110}, -{-0.1169094, -0.1142073, 1.3445948}, -{-0.4206590, -1.0892667, -0.1863347}, -{0.7595442, 0.1025411, -0.6347377}, -{0.1907749, 0.2210244, 0.7928779}, -{0.1143080, -0.4586751, -0.5704268}, -{1.0245123, -1.7858685, -2.6408331}, -{0.4836851, 0.5746071, -0.4565241}, -{-0.4827699, 0.4456111, 0.3430980}, -{0.0931147, 0.1592496, -1.3985071}, -{-0.0072752, -0.0220023, -0.4194836}, -{-0.5796382, -0.0475154, -0.1855450}, -{-0.3872371, -1.7428253, -0.7551222}, -{0.0315826, -0.6480781, 0.2688148}, -{-0.5874282, -0.0875469, 0.0463187}, -{-0.5923957, -0.1947587, 1.7799063}, -{0.2312946, 0.2475319, -1.2706620}, -{0.5641048, -0.2481861, 0.5240186}, -{0.0261816, -2.4947145, -1.1587911}, -{1.7608348, -1.2693007, 3.2263803}, -{-0.5083733, 0.2032893, -0.1613234}, -{0.7333117, 0.3023056, 0.2562569}, -{1.1723027, 3.9025340, 1.0625470}, -{0.1622269, -0.6884331, 0.8413754}, -{-0.7375718, -0.9083493, -1.0785823}, -{-1.7185649, 0.0896170, -1.7592167}, -{-0.2075505, -0.0748785, -0.1915358}, -{-0.0241743, 0.7003452, 0.8666585}, -{-2.4531255, 0.7417660, -0.9386693}, -{0.4501871, 0.5413329, -0.0072091}, -{1.8110631, 2.0477555, 0.3398954}, -{-2.2759910, -2.3665044, -0.5387013}, -{0.0733779, -0.1371206, 0.3853897}, -{1.0420384, -0.6176485, -0.4857108}, -{0.0509050, -0.2244190, 0.6014292}, -{0.0287327, -0.9357738, 0.1167291}, -{0.3814189, -1.2490888, 1.3466126}, -{0.0104009, -2.4812217, -0.2612014}, -{0.5770580, -0.3609296, -0.0323963}, -{0.4014660, -0.1011707, 0.0880173}, -{0.2136498, -0.3552507, 0.5978501}, -{0.1839118, -0.0506377, -0.2578527}, -{-0.7818285, -0.1656429, -0.7048721}, -{0.8239673, 1.4180502, -0.6775231}, -{-0.2911166, 0.2764204, -0.3457874}, -{-1.7180716, -0.3311240, 0.5362022}, -{1.3176218, 2.0183010, 0.4486347}, -{0.4689183, 0.1457495, -0.0206104}, -{-0.4776118, -1.6178166, 0.0380418}, -{-0.1496455, -0.5695428, -0.1371751}, -{0.5024773, 0.6058019, -0.1998769}, -{0.6603820, 0.6930051, 0.6372589}, -{0.9063758, 0.8917979, 0.5760033}, -{0.6421225, 0.6355802, 0.2973920}, -{-1.0687649, -0.9829665, 0.1538063}, -{-0.8526824, 1.4587477, -0.2966757}, -{0.0223462, 0.3008253, -0.2545978}, -{-1.4571317, 0.3766635, -0.3238012}, -{1.5459518, 1.5656438, -0.2944209}, -{-0.5556840, 0.0515023, -0.2577583}, -{1.3412727, 0.5881845, 1.7111564}, -{-1.4108151, -1.1496933, -0.5554047}, -{0.0045956, 0.2395171, 0.5065791}, -{0.4999195, 0.0637357, 0.9717458}, -{-0.0726863, 0.6653396, 0.1922251}, -{-0.1311285, -0.3149459, -0.1719224}, -{1.3888628, 1.4637512, -2.5333731}, -{-0.1213752, -0.8988352, -1.2517107}, -{0.2472762, 0.3650832, 0.2229694}, -{-0.0416910, -0.9376362, 0.8655400}, -{0.7907557, -0.4510517, 0.6592118}, -{-0.6397190, -0.4813672, -0.2047828}, -{-0.4087202, -1.0854791, -0.5484434}, -{-0.2506976, -0.6711457, -0.5203046}, -{0.2478454, 0.1736772, 0.2481167}, -{0.2287339, -0.7076337, -0.6379371}, -{-0.0392147, -0.4983051, 1.0891336}, -{-0.2133567, 0.2331813, 0.1998139}, -{-0.0792124, 0.5442614, 0.4720795}, -{0.6642052, 3.1903918, -0.9965443}, -{0.0904558, -0.1705763, -0.7270536}, -{0.9900735, 0.2333332, -0.9286861}, -{-1.9781489, -0.4937010, -0.4627864}, -{-0.1216439, 0.2876896, 1.3267334}, -{1.7290910, 2.9619906, 0.5600885}, -{0.5650162, 0.0353873, 0.6903539}, -{0.2920525, -0.3953127, 0.4534266}, -{2.4108098, -0.3961264, 1.7922213}, -{0.5278275, 1.2777495, 1.1654654}, -{-0.9360039, 0.5472942, 0.4653981}, -{-1.0688560, 2.0479159, -1.2617427}, -{-0.0728828, 1.8936592, -3.9346206}, -{-0.1031497, -0.2492748, 0.5487663}, -{0.7925220, 0.7190643, 1.7149022}, -{0.9006867, -1.5110803, -0.1062050}, -{-0.3657721, 0.2027529, -0.2533348}, -{-0.4350386, 1.0778517, 0.9415602}, -{-2.0702777, -0.0731439, -0.6239682}, -{0.3147205, -0.4098002, -0.3409688}, -{-1.5979522, -1.5614549, 0.5054327}, -{-0.1555167, -2.0362530, -0.3715915}, -{-0.2007851, 0.6768172, 0.2985771}, -{0.5494673, 0.1601586, -0.1047192}, -{-0.0960968, 0.7577488, 0.3337031}, -{0.6541576, -1.0118519, -0.2828183}, -{1.1880411, 1.4107165, -0.3248726}, -{-1.7504393, -0.3779505, -0.3790764}, -{0.2675515, -0.0044660, -0.5054805}, -{0.0930980, 0.4952496, 0.0303781}, -{0.0629057, -0.4397722, 1.0745928}, -{-0.4885741, 0.2579194, -0.0778611}, -{0.1632805, 1.3446612, 0.4088346}, -{-2.0047815, 0.6425509, -0.7499821}, -{0.4099120, -0.2162988, 0.3348934}, -{-0.0501539, -0.8605592, 0.5752473}, -{0.0653123, -1.1423181, 0.0200922}, -{-0.0962061, 0.1164308, 0.0176556}, -{-0.7279596, -0.9186597, -0.5732951}, -{-0.0782537, 0.4041039, 0.5243942}, -{-0.6958156, 0.1896553, 0.1482043}, -{-1.2049183, 1.7864807, -0.6340004}, -{-0.1822296, -0.7430115, 0.6273355}, -{0.4621048, 0.5747295, 0.4581633}, -{0.9755961, 2.0120721, 0.5746648}, -{-0.0509419, 1.0090145, -0.5811506}, -{-0.5385144, -0.1793862, -0.1812292}, -{2.5106833, -0.9608070, -0.9450576}, -{-1.4662577, 0.9597332, 1.0850371}, -{0.0384686, 0.6940241, 0.1179197}, -{-0.2129690, 0.6405184, 0.2064315}, -{-1.6216201, 0.3945326, 0.8845551}, -{-0.1326199, -0.2165685, -1.0582020}, -{-1.7355144, -2.6855524, -0.0841889}, -{1.9436344, 0.2477178, 0.4845693}, -{0.0159514, -0.0874918, 0.0755089}, -{-0.6708868, 0.6941916, -0.5396923}, -{-0.2529831, 0.8562879, -0.6597840}, -{-0.3966585, 0.1449992, 0.4314371}, -{-1.4822278, -0.5526297, 0.6686401}, -{0.6631591, -1.5461792, 0.0220727}, -{-0.5075291, 0.2605782, -0.2427005}, -{-0.9278137, -2.1222203, 1.2659264}, -{-0.6702179, 0.5327005, 0.9321823}, -{-0.2936811, 0.4471016, -0.0679108}, -{2.0285032, -0.5747636, -0.9899016}, -{0.6486916, 1.2817971, 0.4961734}, -{0.1220119, 0.2202735, -0.0195380}, -{1.8924577, 0.1806105, 0.2367189}, -{1.0686779, -0.0524534, -0.2435704}, -{0.1246269, 0.0249204, -0.0864869}, -{-2.6346996, -1.5761060, -1.8098959}, -{1.1744313, 0.5186895, 1.0227653}, -{-0.1206008, 0.3020298, -0.0446507}, -{-0.1809819, 0.0069468, -0.0961339}, -{-0.1900747, 0.0687461, -0.1166391}, -{0.4235168, -0.1354770, -0.0378911}, -{0.7577213, -0.5061796, 0.1528046}, -{0.4534358, 0.5500777, -0.7641627}, -{-0.8526109, 0.1675639, 0.6147290}, -{-0.9621929, -0.6056041, 1.0721420}, -{1.0512532, -1.6054955, -3.1321812}, -{-0.0489712, 0.0061946, -0.2572442}, -{-1.0615182, 1.3974590, -1.5627782}, -{-0.0166819, -1.9087529, -1.3830503}, -{0.2878510, 0.0728727, 0.0117204}, -{0.3478831, 0.1542938, 0.6262047}, -{1.3148408, -1.5552021, 1.6187809}, -{-0.4634721, -0.0250706, -0.4853891}, -{-0.5913132, 0.8454204, -1.4767524}, -{-1.0302474, 2.3538275, -0.2006505}, -{-0.0184647, 0.7669418, 1.1072351}, -{1.1901509, 0.0974018, 0.2551078}, -{-1.2220565, 1.4099977, 2.3064020}, -{-0.0062168, -0.1196021, 0.3338327}, -{0.4431188, 0.2678941, -0.9337452}, -{-1.4270200, 0.6710474, 0.5939987}, -{0.0420940, -0.0267296, -0.2268798}, -{-0.0632944, 1.2091922, 1.0222750}, -{-0.6536801, -1.9798430, 0.5617853}, -{0.0998024, -0.6474744, 0.3651051}, -{0.5790746, -0.9678676, 1.6352606}, -{0.5915990, -0.3450723, 0.1313806}, -{-0.7542649, 0.1129151, 0.1000805}, -{-1.8027197, -0.8199614, 0.1729337}, -{1.9305596, -0.2292191, 0.9563832}, -{0.4344710, -0.5465866, -0.0316753}, -{0.3123496, 0.8160999, 0.8936777}, -{-0.4728950, -0.8080313, 1.4018562}, -{0.6276084, -0.0016350, -0.1117846}, -{0.9931358, 1.3879637, 0.8743017}, -{1.0207120, 0.0657278, -1.1743382}, -{0.1619931, -0.1024326, 0.0937419}, -{0.3180248, 0.9032379, 0.5537096}, -{-0.4261253, 2.6898873, -0.0489018}, -{0.5232675, 0.5048167, 0.7344849}, -{1.4210351, 0.5483748, 0.0452680}, -{0.0143798, -0.0691210, 0.0810684}, -{0.4294192, 0.7324024, -0.0082809}, -{0.5578029, 0.0417751, 0.0348604}, -{0.4910645, 1.1223462, 0.0100009}, -{0.0799530, -1.0760900, 0.3549560}, -{-0.0536228, -0.7009214, -0.3362055}, -{-0.5438069, -0.4650533, 1.4558173}, -{0.1051633, 0.3451436, -0.0460200}, -{1.9935627, 0.9394432, 0.9642833}, -{-0.4528536, -0.1786502, 0.3352141}, -{-0.5991598, -0.0838078, 0.0970775}, -{0.1695312, 0.9471599, 0.3543916}, -{-1.6822418, 0.6872265, -0.1857792}, -{0.3858924, 0.2046919, -1.0853095}, -{-0.8596687, 2.3568258, 1.6267102}, -{-0.5045458, -0.0729235, 0.0459361}, -{0.6284422, -1.0192249, 0.0963944}, -{-0.5172116, -1.5094079, -0.4206231}, -{-1.2537881, 1.1635418, 0.0083325}, -{0.3028435, -0.6887947, 0.1333614}, -{-2.0041785, 0.0334768, -0.0201860}, -{-1.9642664, 0.5071329, 0.8378083}, -{-0.2620850, 0.0290688, -0.4039897}, -{2.0317256, -0.3730173, 0.4128231}, -{0.5062681, -0.7662380, -0.8661042}, -{0.3788313, -0.1222697, -0.2975189}, -{-0.3532661, -0.3484318, -1.3523638}, -{0.4544838, -0.1727787, -0.8750522}, -{-0.8397819, 0.7882631, -0.7200504}, -{-0.6082757, 1.1063069, -1.0049216}, -{-0.5397316, 0.8575091, -0.9645947}, -{0.1183377, -0.7251801, 0.4788089}, -{-1.5081551, 1.1400372, -2.5724635}, -{0.0880075, 2.0159881, 1.2291543}, -{-0.0740543, 0.2049074, 0.3368143}, -{0.0768263, 0.5414498, 0.7226129}, -{-1.5296005, 2.0622995, 1.5468980}, -{0.1396170, 0.3841613, 0.2034242}, -{1.4533156, 1.4930223, 1.3633511}, -{-1.8279350, -1.3113228, -1.7624665}, -{0.5484911, 0.1350848, -0.0805405}, -{0.0936660, -0.3812419, -0.3436798}, -{-0.1889361, 1.8312349, -2.9749336}, -{-0.3229899, 0.2515141, -0.5058979}, -{-0.1358183, 0.4249487, -0.3998701}, -{-0.3390605, 0.4336304, -0.6500424}, -{0.1666227, 0.1183850, 0.0625430}, -{0.9783803, 1.8006523, 1.6076189}, -{-1.6294143, -0.9719087, 1.3311400}, -{0.9115926, 0.2928475, 0.1998468}, -{0.7035761, 0.8010129, 0.0275981}, -{0.8571974, 3.4427328, 0.7010845}, -{-0.2997963, -0.4493451, -0.0307683}, -{1.5317101, -0.2873513, 1.4817172}, -{-1.0874724, -0.2871766, 0.0877547}, -{0.4040494, -0.6082664, -1.1973451}, -{-1.6685420, 0.0216910, -1.5668066}, -{0.8361052, 0.6182820, 3.1936123}, -{-0.9287706, 0.1068001, -0.4259240}, -{-0.2355944, 1.1718451, 0.6750979}, -{-1.5557357, 0.9892662, -1.0313249}, -{-0.0979675, 0.2831776, 0.5915201}, -{-0.7153503, -1.4448709, 1.4770329}, -{1.6560863, 0.4368499, 0.2376872}, -{-0.4515944, 0.5441716, -0.1561876}, -{0.1751060, -0.1159138, -0.6489440}, -{-0.8983976, 1.6260513, -1.1078227}, -{0.2689852, -0.3966255, 0.1420892}, -{-1.9064837, -0.5751402, -0.3919129}, -{-2.3102925, -2.5866795, -1.6262082}, -{-0.0172078, 0.3720778, 0.2099063}, -{1.3712870, 0.6646250, 1.8526826}, -{-0.2016302, -0.0983407, 0.8863665}, -{-0.0724852, -0.5409880, -0.1763042}, -{1.0414648, 0.9983483, 2.0752156}, -{-2.1019931, -0.3627156, 1.4446261}, -{0.1769724, 0.4729883, 0.6772742}, -{0.3125473, 0.3620763, 1.0973579}, -{-0.0371385, 0.2322066, 0.8364484}, -{-0.1613040, -0.2620757, -0.2569445}, -{-2.2559087, -1.7747374, 0.5973684}, -{-0.8588541, -1.4293799, 1.2074132}, -{0.0304699, 0.4706365, 0.2924025}, -{0.4877877, -0.4405352, 1.8307768}, -{2.0885613, 0.0379184, -1.8188802}, -{0.0740331, 0.4897541, -0.3967260}, -{-0.8889415, -0.5428897, 1.4722157}, -{-1.3586863, 0.2937176, 0.7478541}, -{-0.2450747, -0.1470140, 0.1792537}, -{-0.6562713, -0.2482109, -1.6881099}, -{-1.2947989, 1.1888698, 0.2909205}, -{-0.4733354, 0.1256735, -0.4475741}, -{-1.1302060, -0.1858992, -0.4109699}, -{0.7272552, -0.0600975, -0.0755262}, -{0.1759815, -0.1152923, 0.4950674}, -{1.4555954, 3.1599369, 1.0980743}, -{0.7639304, -2.2835431, -1.9383806}, -{-0.0151634, -0.1461978, -0.0723898}, -{-0.6230296, 0.2769712, 0.6596333}, -{-0.5590293, 0.6518141, -0.1338007}, -{-0.1701388, -0.0811140, -0.2851782}, -{0.5220708, 0.5652866, 0.6871241}, -{-0.9684417, 0.9273598, -0.6897836}, -{0.0747983, -0.0698491, -0.8042133}, -{1.2378569, -1.5453349, 0.8258891}, -{-1.2840354, 0.3716991, 0.7589560}, -{-0.0003867, -0.3035625, 0.3491605}, -{1.6129618, 1.6912571, -0.5594044}, -{-1.0754962, 0.4910495, -0.8879585}, -{-0.0052262, 0.1463952, -0.2062694}, -{-1.3676133, -0.4533890, 0.7213395}, -{1.5369675, 0.1867791, -0.6485514}, -{-0.7162792, -0.5250033, -0.8768279}, -{-0.1257063, -0.8207173, -0.3108927}, -{0.4422699, -1.0142028, -0.1185792}, -{0.1461655, -0.4889517, -0.7606444}, -{0.1277210, -0.7074326, -1.0483857}, -{-0.4863150, -0.5020490, -0.4203027}, -{-0.2430001, -0.4877402, 0.4610132}, -{1.1148614, -2.1291993, 0.0927693}, -{-1.2554029, -2.3351216, 0.2434097}, -{-0.2053048, -0.0787527, -0.2083896}, -{0.5002351, -0.5466514, -1.0731102}, -{-0.1513285, -0.0905989, -0.2023074}, -{0.6007293, 0.6420060, -0.2315201}, -{1.0522437, 0.1508992, 0.5898951}, -{-0.3144117, -2.0034485, 1.1998167}, -{0.6745151, 0.1231740, 0.6246113}, -{2.4409425, -0.9489883, -0.1815583}, -{1.4819777, 1.3585385, 1.0801462}, -{-0.1538212, 0.0424042, -0.1556802}, -{-1.1998219, -0.5144755, -1.3283106}, -{-0.5603629, -1.6040851, 0.1535652}, -{-0.3893014, -0.2531819, 0.2372292}, -{0.8894876, 1.2872430, -0.4367198}, -{-0.3544282, -0.8271856, 0.9586511}, -{0.0920316, 0.7787223, -0.2435136}, -{0.4973735, 0.4494188, 0.0051523}, -{-0.3510092, 1.9341111, -2.8404565}, -{-0.0558243, -0.5524080, -0.7721931}, -{1.8793273, 0.1912207, -0.3202873}, -{-1.4635324, -1.1236511, -2.0355403}, -{0.0992195, -0.5733134, 0.6257173}, -{0.1489292, -0.4729998, 0.7971892}, -{1.8292041, -1.7319494, 2.2473834}, -{-0.1504988, 0.0895423, -0.0006107}, -{-0.7853769, 2.4470913, -0.0877524}, -{1.4080110, -0.9529006, -0.1259507}, -{0.1119386, 0.3061504, 0.2687672}, -{-0.7954338, 0.2216635, -1.4515017}, -{1.9455783, -0.4829055, -0.9586266}, -{-0.3571868, 0.4605661, -0.2279585}, -{-0.3116943, 0.9259317, -1.8483902}, -{-1.4457235, -1.6434989, 0.2593035}, -{-0.5998355, -0.2388222, 0.6753169}, -{-0.0331422, -0.3642513, 1.4794124}, -{-2.5966220, -0.9495132, -3.9656167}, -{0.1673737, 0.0824089, -0.0308628}, -{-0.0243313, -2.0001829, 1.3771359}, -{-2.2811368, -2.5676489, -1.4988635}, -{-0.4638150, 0.0725238, 0.0422028}, -{-0.8498752, -0.3055201, -1.9383314}, -{-1.1130896, 1.4423227, 0.2800651}, -{-0.7342439, 0.1800840, -0.0865830}, -{-0.3295042, 0.1630732, -0.0841739}, -{-1.9711944, 1.0841630, -0.5017937}, -{-0.1144506, 0.2968848, 0.1121399}, -{0.2263464, 0.7647604, 1.0883456}, -{0.4050767, -0.5867677, -0.1536604}, -{0.0383008, -0.1061127, 0.2620153}, -{-0.7159438, -0.3595225, 0.1906409}, -{1.4953825, 0.7992514, 0.3727340}, -{-0.0865242, 0.4965691, -0.0387025}, -{0.1064324, 2.4653594, -0.6835722}, -{0.7033587, 1.1007611, -0.6717817}, -{0.4946738, 0.3959958, 0.0063729}, -{0.6312544, -3.1784923, 2.0824366}, -{0.5884568, 0.7381170, 0.2175841}, -{-0.3221776, 0.1241037, 0.2152809}, -{-1.8730204, 0.1354688, 0.9102585}, -{-0.7649490, 0.6463721, 0.4496960}, -{-0.0689384, -0.0436685, -0.7261282}, -{2.1674743, -1.0919493, -3.0482585}, -{-1.7260618, 0.3555451, 1.1184113}, -{-0.2787759, 0.0869571, 0.3580036}, -{-0.3879165, 1.0833948, -0.4385405}, -{-0.1459326, 0.0138437, 0.3055888}, -{0.2656147, -0.1721125, -0.1493279}, -{0.1326708, -0.2612583, 0.4299371}, -{2.2340701, -0.5996916, -1.5929811}, -{0.2444561, -0.1169751, 0.3746914}, -{-0.5404827, -5.0598779, -0.0151955}, -{-2.3959954, -1.8315334, 4.0625925}, -{0.0825014, -0.1065096, 0.0518080}, -{1.2566386, -1.0225521, -0.2514191}, -{0.1219118, 1.6772835, 2.0768209}, -{0.0636380, 0.6395640, 0.0070311}, -{-0.8859341, -0.4324053, 0.1775853}, -{-0.6689453, 0.7195464, -0.9794035}, -{0.3811644, -0.2572593, -0.1443813}, -{1.2162232, -0.4877337, 0.5625060}, -{0.0635135, -0.4352696, -0.4769922}, -{-0.4386476, -0.1708216, -0.0274682}, -{-1.3499842, 0.6895011, 0.0753872}, -{-0.5359483, -0.2138547, 0.0809453}, -{0.2740146, -0.4699731, 0.3878778}, -{2.4631681, -0.8505727, 2.3709214}, -{1.0533570, -0.7977022, 2.3490396}, -{-0.1429513, -0.8871351, 0.0085903}, -{-1.7080586, -1.5354165, -1.4467106}, -{-0.2759694, -1.1215115, -0.9392510}, -{-0.1524666, -0.5653043, -0.1113532}, -{-0.0270050, -1.0401520, -0.1179379}, -{-1.1183279, -1.7013677, 0.3438580}, -{0.6442749, -0.1532268, 0.0907051}, -{0.0151216, 0.3167144, 1.2448361}, -{-1.0282609, 1.1287842, 0.0126965}, -{-0.1609591, -0.4670499, -0.1846146}, -{-1.0645536, 0.0150237, 0.6510780}, -{1.4370917, 0.1002747, 0.0813195}, -{-0.0133170, 0.1575730, 0.0310994}, -{-0.4517334, -0.4137699, 0.8565664}, -{-0.2773663, 0.3614351, -1.1792644}, -{-0.0563665, 0.1004595, -0.6348271}, -{0.4699123, 0.2588984, 0.7601516}, -{0.5550365, -0.0424870, -1.3253018}, -{-0.0133301, 0.0092346, -0.0797830}, -{-0.2491377, -0.7505072, -1.9066180}, -{1.0109019, 1.2689916, 1.2987455}, -{0.5091430, -0.1087267, 0.0074857}, -{1.1598519, -2.1482158, -0.6773111}, -{-0.2063361, 1.2358809, -0.1686035}, -{-0.0415009, 0.3571159, -0.8942651}, -{0.6746652, -1.3781649, 1.3304154}, -{0.0150649, -0.2430996, -0.3149388}, -{-0.0746634, 0.5137416, -0.0770948}, -{0.3931600, -0.7831559, -0.4544498}, -{-0.1045937, 0.3412516, 0.0537042}, -{0.4933578, -0.3871075, 0.1791098}, -{2.2799013, -2.4466617, -1.1210489}, -{1.8275158, -3.0976219, -0.2099827}, -{-0.1484346, -0.0077943, 0.5104930}, -{0.2912205, 0.0167001, 0.7964996}, -{-1.0294212, -0.0259235, -0.1916656}, -{-0.3813719, -0.5602254, -0.2028247}, -{-0.1040056, -0.5230039, 1.7021213}, -{-0.5058908, -0.6168824, 0.3263265}, -{0.4841407, -1.0062397, -0.0132921}, -{-1.7313143, 0.8069175, 1.1845553}, -{-2.8063784, -1.1351628, 1.1256739}, -{-0.4032157, 0.1097968, 0.0451004}, -{-1.4811947, -0.0160286, 0.3747717}, -{-0.0302786, 0.8386152, 0.1912695}, -{-0.0078883, -0.1874917, -0.5720541}, -{0.8579852, 0.2250136, -0.6560830}, -{0.1919637, -0.5729259, 0.3951556}, -{-0.0263627, 0.4748738, -0.1150798}, -{-0.3086928, 0.2296063, -2.7179482}, -{-0.1963928, 0.4623427, -1.1539925}, -{0.3414001, -0.2271301, -0.2984318}, -{0.0898680, -1.5341444, 0.5598091}, -{0.7106271, -0.7794825, -0.6217053}, -{-0.1293487, -0.3428493, 0.7448785}, -{0.3917051, -0.6007762, -1.3985732}, -{-0.6083800, -0.9923139, 2.9101422}, -{-0.3410721, 0.7678265, -0.2812357}, -{-0.0530122, 0.9253934, 1.8518695}, -{0.3671373, 0.5389797, 0.4795219}, -{-0.3502986, 0.1309766, -0.0288394}, -{-0.6063095, 0.9062058, 1.1951705}, -{0.7044263, 0.7787728, -0.7305159}, -{-0.7133009, 0.5966861, 0.2712182}, -{-4.2625732, -0.5467063, 1.1796608}, -{1.1217407, 0.2348274, -0.8209032}, -{0.8465682, -0.1397764, -0.1516647}, -{-0.4968221, -1.4188758, -1.4430399}, -{-1.3108801, 0.0790019, 0.2047641}, -{-0.1848867, 0.1353077, 0.1923310}, -{-3.4273348, -0.9886772, -0.5613465}, -{1.7880903, 0.1013947, -0.8688565}, -{0.4259063, 0.2862673, -0.5593183}, -{-0.1032524, -2.5916021, 0.4381824}, -{0.3632469, 1.5316659, -1.3006135}, -{0.5876170, 0.0844997, 0.0357410}, -{1.2548182, 1.0881357, 0.2318727}, -{0.5434791, 0.0047852, -0.1732378}, -{-0.6110012, -0.5113117, -0.4505348}, -{-0.2230034, -2.0063846, -1.1541617}, -{-0.8783473, -0.0970165, -0.3476603}, -{0.1708959, 0.5663093, 0.2468236}, -{-1.5206792, 0.4050083, -1.6414940}, -{1.4326928, -1.1548353, 1.6772214}, -{-0.4678928, -0.1033931, 0.7851334}, -{-1.7098846, -0.6368123, 1.6184266}, -{-0.3384867, 0.4502261, 0.7879426}, -{-0.1872575, -0.0539059, 0.7743368}, -{-0.4571488, -0.5855135, -0.3769014}, -{-0.3204014, -0.8494969, 1.5894504}, -{0.2058301, 0.0447069, 0.1120214}, -{-1.1632720, 1.8394836, -1.6125537}, -{-3.3558908, -2.9813375, -1.0306967}, -{-0.1740287, 0.4310387, -0.3180245}, -{0.9751602, 2.6817889, 1.5377711}, -{-1.6434842, -1.8214968, 1.8242973}, -{0.0184408, -0.0460715, -0.8611053}, -{2.0392048, -2.3329382, -0.5772495}, -{-0.7925140, 1.5643733, -1.5983464}, -{0.5473530, 0.1460869, -0.7072503}, -{0.2449435, -0.2425435, 1.1149036}, -{1.7940990, 1.6485943, -0.4640068}, -{0.3145245, -0.3325312, -0.0544566}, -{0.6621751, -0.0097260, -0.3718347}, -{-0.7395169, -1.1838349, -0.7801086}, -{-0.1700000, -0.9004700, -0.3642338}, -{0.0729174, -1.6716883, -0.3499304}, -{-0.4020687, 0.5866114, 0.8686238}, -{0.0713518, -0.0632844, -0.8587257}, -{-0.6228179, 0.3299691, -1.5073696}, -{0.6360821, -0.1751452, -0.2457427}, -{0.0839259, -1.0554180, -0.1180097}, -{0.1271901, -0.4018731, 0.1420147}, -{-0.2980633, -3.2667911, 0.3643206}, -{-0.0189906, -0.0371089, 0.3131899}, -{1.1690191, 1.9724002, 1.8350645}, -{0.0577194, 0.5326909, -0.2229004}, -{-0.4513277, 0.1538666, 0.0379503}, -{3.2021461, 1.0391836, -1.7942872}, -{-1.5631291, 2.8880899, 3.0492506}, -{-0.4032629, -0.1482417, 0.1465789}, -{-0.7129019, -0.4016533, 0.1859241}, -{-0.4941199, -0.2207631, 0.2180329}, -{-0.3676155, 0.2152157, 0.2450814}, -{-0.3769266, -0.1152559, -1.4715295}, -{-0.8542677, 1.4017730, -0.1509733}, -{-0.1203067, -1.1473116, 0.3920550}, -{0.0564389, -1.5168381, -0.4434991}, -{-0.8228979, -1.4596673, 0.7058583}, -{-0.2377279, -0.1048840, -0.2946626}, -{-0.2220450, -0.0794847, 0.3374262}, -{-0.4204332, 0.8833821, -1.0572069}, -{-0.0487189, -0.7390435, 0.3023879}, -{-0.3313715, -2.5645354, -2.2282236}, -{-0.7539145, 0.7703640, 2.0438766}, -{-0.6950908, -0.3384748, -0.3613007}, -{0.1107293, -0.7629854, -0.5249125}, -{-0.0600292, -1.3284693, 0.0801795}, -{0.1905475, 0.0046461, 0.1924166}, -{0.6823577, 0.4777435, 0.5921394}, -{1.9389360, 0.1581619, -1.2203281}, -{-0.6990853, 0.2534345, 0.2217397}, -{-0.1883084, -0.2376204, 0.3465250}, -{-0.7751147, 0.3180009, 2.6626630}, -{0.4587756, 0.7875891, 0.0102887}, -{-0.7369061, 0.5090522, 0.9599596}, -{1.4701849, 0.1600342, -0.4502756}, -{0.0120958, 0.3879089, -0.1357136}, -{0.4152449, 0.8797461, -0.3672922}, -{1.2002404, -0.2363263, -2.2390356}, -{0.1199916, -0.4148001, -0.0900153}, -{1.1006804, 0.2439329, 2.3812737}, -{-1.1427305, 1.4711945, 0.6475029}, -{-0.4776305, 0.6956913, -0.1026070}, -{0.2500608, 0.2645063, 0.9939335}, -{-0.6994237, 0.6256498, -0.6092173}, -{0.1301987, 0.2909241, -0.1079872}, -{-0.3818280, -2.3859499, 3.1221461}, -{-0.0518047, 0.6728105, -0.8193471}, -{0.2231384, -0.1945435, 0.1111792}, -{-0.0854907, -0.2164667, 0.6216857}, -{1.7537568, -1.4216133, -2.3689878}, -{-0.5997742, 0.4938809, 0.1665092}, -{-0.7617159, 2.4203801, -0.9018137}, -{-0.3631326, -1.1541814, -1.4236598}, -{0.2678425, 0.3168043, -0.4739983}, -{1.2442085, -0.8961097, 0.6770021}, -{0.2344146, -1.1424094, 1.8335809}, -{-0.6105536, -0.3913930, 0.7418756}, -{-1.6189715, 1.4696223, -0.2810023}, -{-1.0635419, 1.1223671, 0.4774674}, -{0.3516184, 0.1482810, -0.2753026}, -{0.4220593, -1.8060484, -0.7805796}, -{1.2127202, 2.8069582, -0.2621439}, -{-0.2024512, 0.9022920, -0.2841470}, -{-0.4734941, 0.0518528, 0.1670933}, -{-0.3072743, 1.0121731, -0.4040352}, -{0.1021592, -0.2732935, -0.6369759}, -{-0.7359254, -0.9807759, -2.5877972}, -{0.2917910, 0.3166210, -0.4470776}, -{-0.3982046, 0.3167405, -0.3659052}, -{-1.7700021, -1.0588946, 0.9186609}, -{1.2472603, 2.7536688, 1.7957426}, -{0.2890026, 0.5810522, 0.7444463}, -{-1.7980118, -0.8011103, -0.5469471}, -{2.2319002, 0.2486596, -1.7051699}, -{0.5398598, 0.3704197, -0.1567266}, -{0.3083899, 0.3977441, 0.1351819}, -{-2.3275244, 0.4027269, 1.6086690}, -{-0.4400217, 0.6981303, -0.0670329}, -{-0.4776775, 1.5788492, 0.0825036}, -{0.1802054, -2.7425990, 1.0835762}, -{-0.3854387, 0.5364287, 0.0898802}, -{1.2136480, -0.0264963, -1.2469928}, -{-0.4976297, -0.8366488, 1.3644434}, -{-0.3578638, -0.2157005, 0.0419456}, -{0.5271105, 0.3382364, 0.4409994}, -{0.8272406, 0.3293103, -0.9168450}, -{0.1875479, -0.6164141, 0.4342974}, -{2.6333239, -2.2381706, -0.8084950}, -{-3.3412673, -2.2538083, -0.5426984}, -{-0.4978231, 0.2974142, 0.4479316}, -{2.7768898, 0.8187923, -1.0874169}, -{-0.6501362, 0.8644630, 2.2513499}, -{0.0068109, -0.4241377, 0.0572952}, -{-1.0888188, -1.5376682, 0.3783700}, -{0.0441744, -0.2746004, 0.1413431}, -{-0.2805978, -0.1189067, -0.7802793}, -{-0.7422571, -0.2942031, -1.1071647}, -{1.1433485, 0.0372024, 0.3120470}, -{0.3415855, -0.0064405, -0.1943550}, -{0.4760248, -2.1790509, -1.8576199}, -{-2.0753047, -0.3323979, 0.0106101}, -{0.5810882, -0.3080234, 0.0218148}, -{-2.0533283, -1.9948022, -2.3189771}, -{-2.0977261, -0.8635808, -1.7658339}, -{-0.0556006, -0.4028431, -0.1145035}, -{-0.8196300, 0.6013172, 2.6801827}, -{-0.9448756, -1.1554872, -0.3737134}, -{0.2439993, -0.4447089, -0.4141581}, -{-1.9118127, -0.5428226, 1.5469441}, -{1.7553388, -0.1835105, -1.9875926}, -{0.3570541, -0.1213805, -0.1528078}, -{0.8007840, -0.0774982, 0.0260091}, -{-0.7856640, -0.7738584, 0.0220996}, -{-0.4243975, -0.4362427, -0.4819456}, -{-0.3275354, -1.0943309, -0.3285370}, -{0.1281350, 0.9064230, 0.7942848}, -{-0.1312412, 0.0147964, 0.1793573}, -{0.1348493, -0.9020844, -1.0268060}, -{2.1472769, -1.8806421, -1.6308359}, -{0.3907004, 0.5219548, 0.1135313}, -{0.4094561, -0.8007862, -0.2260797}, -{1.3640114, 1.5880396, -0.6807774}, -{0.1533283, 0.0558160, 0.3574280}, -{-1.3384002, -0.0287019, 0.3729821}, -{-1.2631186, 0.3254875, 0.2334508}, -{-0.7660232, 0.3684974, 0.4343930}, -{0.0382941, 2.4209304, 1.6565881}, -{0.7406048, 2.3176501, 4.0104694}, -{0.0245845, 0.2596716, 0.0423425}, -{-0.5429582, 0.7078307, -1.1095539}, -{-0.1383518, -0.0030851, -0.4794541}, -{-0.2721680, 0.1152263, 0.6742490}, -{-0.5714346, 0.1459546, 0.5207702}, -{-0.1874640, 0.4117512, 0.8160056}, -{-0.1587321, -0.0874138, -0.2391952}, -{-1.1620744, 0.7692071, -0.3806753}, -{1.0157037, -3.6637421, 3.4502811}, -{-0.1196860, -0.2237165, 0.3665499}, -{-0.7513081, -0.1349108, 0.2548151}, -{-0.0633997, 0.0288818, -0.0566376}, -{-0.0627513, 0.1879723, 0.5904409}, -{0.7064983, -0.7528642, -3.1902597}, -{1.6425140, -2.2264388, 4.1384745}, -{-0.3593427, 0.1635942, -0.2373783}, -{3.6533060, 0.3166709, 1.8474677}, -{-1.0562822, 0.2059910, -0.6404226}, -{-0.0371597, -0.5301757, -0.5653467}, -{0.4176633, -0.6298450, 1.4439236}, -{-1.9420477, -0.0028861, 0.0016794}, -{-0.0506380, 0.1778404, 0.1182914}, -{1.1812309, 0.6636416, -1.7413652}, -{0.4317467, -1.7363037, 0.9821585}, -{0.4157717, -0.0973491, 0.7737355}, -{0.9667376, -0.7467870, 1.6470776}, -{-0.2312093, 0.3063082, 0.5885255}, -{0.2032058, -0.2090829, -0.7738289}, -{-1.0672023, 0.2221961, 0.1279255}, -{-2.3424938, 0.7373233, 1.1348020}, -{0.1563354, -0.6882868, 0.0944632}, -{0.8974662, -1.0004556, -0.1425355}, -{0.3872702, -0.3908966, 0.6433260}, -{-0.3463271, -0.9821521, 0.0837723}, -{0.2895809, 0.0479703, 0.5959830}, -{0.6009442, -0.0287300, 0.3036390}, -{-0.2491309, -0.5438557, 0.0989290}, -{0.3709829, 0.3903061, 0.6213317}, -{-0.1872187, 0.0032794, 0.6448994}, -{-0.8998904, -0.1364890, 0.1521988}, -{-0.1800091, -0.2726554, 0.1494425}, -{-0.1091765, -0.0552239, 1.6042306}, -{-0.3440371, -0.5156183, 0.1163286}, -{0.6025530, -1.1732348, -1.5259087}, -{1.4980414, 0.3643446, -1.9639074}, -{0.2759429, 0.4996029, -0.0324515}, -{2.4050198, 1.4279604, -1.8568753}, -{-0.5302331, 1.1730554, 2.1377094}, -{0.3421816, -0.3518693, -0.0314411}, -{0.1916398, -0.7870270, 0.6647825}, -{0.6205716, -0.1330806, -0.3989946}, -{-0.0510469, -0.5664006, -0.2355356}, -{0.9262422, 0.0148920, 0.2294604}, -{-0.0941510, 0.2016340, -1.2667550}, -{0.6142751, -0.5574608, 0.3193811}, -{0.7308315, 0.3569059, -0.7149442}, -{0.6629853, -0.9520937, 0.8644818}, -{0.1182025, 0.8480482, 0.1017217}, -{0.2840835, 0.4454370, -0.2867168}, -{0.4373770, 0.5253168, -0.3530358}, -{0.2717801, 0.1333019, -0.1423618}, -{0.4154798, 3.7872181, -2.3996720}, -{0.7113321, -0.6560245, 1.4016660}, -{0.0168744, 0.1951629, 0.5904348}, -{-0.9644542, 0.2795021, 0.8562603}, -{0.9377880, -0.2514898, 0.4886467}, -{0.5786381, -0.6934816, -0.5291545}, -{0.5936957, -0.0554908, -0.8634326}, -{-0.4030852, -0.6602322, 0.3438745}, -{0.6681280, 0.0890988, 0.6817686}, -{0.3228040, -0.5394368, 0.1853952}, -{0.3294195, 0.4833917, -0.4827967}, -{-0.8411542, 0.3887134, -0.2942885}, -{-1.3839781, 0.1559289, 0.6936475}, -{-0.8722745, 0.4453044, -0.1846442}, -{0.2595424, -0.2273151, -0.4224686}, -{0.7435429, -0.1735912, -0.6712920}, -{-0.4932189, -0.8413441, -0.3479279}, -{-0.4780951, -0.2250446, 0.1966438}, -{1.8812586, -0.1911945, 0.7712546}, -{2.0451264, -0.0402783, 0.6745865}, -{-0.0442027, 0.1181606, 0.4837865}, -{0.1920580, 0.0604084, 0.2026134}, -{1.6006159, -1.1215152, -1.5534602}, -{0.0692689, -0.1826816, -0.2866292}, -{-1.1345532, 1.0507127, 0.2796448}, -{0.2031618, -1.0734081, 0.4477162}, -{-0.2387525, 0.3258785, -0.1801330}, -{-1.0080117, 0.0509810, -0.1112533}, -{-0.5313817, -0.6460146, 0.0252182}, -{0.3582509, -0.4871479, 0.5314789}, -{1.6799759, 2.1133895, -0.2888947}, -{2.1729989, -0.6036581, -1.9733566}, -{-0.3004933, -0.6192850, -0.0977555}, -{0.7441714, 0.3551746, -0.6382928}, -{0.5200073, -1.6211821, 1.3306246}, -{0.7364481, -0.1975859, -0.3545864}, -{-2.1162448, -1.2637193, -0.7795659}, -{2.6541317, -0.5193951, 1.3839730}, -{-0.1748211, -0.2261724, -0.1901229}, -{-0.7249187, 0.7223470, -0.2642375}, -{-0.6246834, -0.8450777, -0.5405050}, -{0.3605323, -0.1513158, -0.5680587}, -{-0.4357119, 0.3065616, -1.1552588}, -{-1.7072265, 1.3984698, 0.1476204}, -{-0.2294563, -0.0091770, -0.1610713}, -{0.3579019, -0.3691164, 0.7523987}, -{-0.0163182, 1.1958232, 0.0521834}, -{-0.4384914, 0.5273021, -0.0123470}, -{0.4692914, 0.8139228, 0.7075624}, -{-0.1679040, 0.3155763, -0.3359617}, -{-0.0896173, -0.3219143, 0.7847161}, -{0.8058300, 0.1632682, -1.0028859}, -{-2.7548099, -0.7580983, 1.3985016}, -{0.0972656, 0.3919869, 0.5597391}, -{-1.2414438, -0.4580376, 0.0334731}, -{-0.3448749, -0.7417067, -0.5420272}, -{0.5749071, -0.1525669, -0.2357883}, -{0.3273345, -0.2371908, 0.8639200}, -{-0.2095269, 0.5303763, -0.5927044}, -{-0.1296105, 0.1661486, -0.3852164}, -{-0.6788524, -0.0204953, -0.9343838}, -{-0.4126484, -0.1630900, 0.2250159}, -{-0.2357466, 0.6307923, 0.2555752}, -{0.0274334, 0.6275464, 2.0884488}, -{-0.5352890, 0.6010394, -1.9038634}, -{-0.4514222, -0.4261167, -0.5078690}, -{-1.2128975, 2.1964221, 1.3734676}, -{0.4431154, 1.2899444, 1.1118586}, -{-0.4883441, -0.1128901, 0.0203836}, -{-0.8497961, -0.1225853, 0.0607837}, -{0.1362193, 0.0405841, 1.2470638}, -{0.4893224, 0.7248669, 0.3239012}, -{1.2899773, 0.1356311, 0.5850822}, -{2.2893920, -1.2893449, 2.1449039}, -{-0.3549580, 0.2644968, 0.3723411}, -{-0.4521193, 0.5915522, -0.1053825}, -{-0.0086991, 0.5536138, -0.2823060}, -{-0.1000892, -0.3347980, -0.3674718}, -{0.7842045, 0.5970681, -1.4960352}, -{-0.2731287, -0.5779129, -0.5733032}, -{-0.3961816, -0.3217533, 0.3324812}, -{-1.1351290, 0.9933941, 1.5259933}, -{0.6274726, -0.3059130, 0.1070309}, -{-0.4360017, 0.7246332, -0.5858814}, -{-2.2871857, 3.0608087, -0.0562859}, -{-4.0818558, -0.4507090, -4.1741114}, -{0.0627052, 0.4033369, 0.5509209}, -{-0.1103704, 0.3989414, 0.4269076}, -{-1.1213902, 0.8782804, -0.6850675}, -{-0.0679575, -0.0076416, -0.0573076}, -{-1.0927737, 0.2530447, -0.1376902}, -{0.7383588, -2.6247761, -0.1154000}, -{-0.1262005, -0.1137620, 0.2595871}, -{-1.0235318, 2.6827471, 2.2345688}, -{-0.5479641, -1.9206433, 3.7044554}, -{-0.0303097, 0.1440448, 0.4129463}, -{0.6370428, -0.5602659, -2.0050545}, -{-1.1643310, -0.7642316, -0.1530697}, -{-0.4311934, -0.0231765, 0.8014200}, -{-0.3114536, 2.4366505, 0.5797027}, -{-0.4537353, 0.0098081, -0.0687666}, -{-0.0572519, 0.0331194, -0.0517754}, -{0.4196659, 0.6226501, 0.8554487}, -{1.5661806, 1.6387630, 2.5814769}, -{0.0710004, -0.0847330, 0.0145214}, -{2.1129107, 0.4782183, -1.6182104}, -{0.3737516, -0.1412943, -0.1726008}, -{0.1866038, -0.5545984, 0.2746769}, -{0.4793301, -2.0658944, -2.2217510}, -{0.0917216, 2.4177425, 1.2487743}, -{-0.2270329, -0.2661358, 0.5101132}, -{-0.9177775, 2.2058952, -0.9739263}, -{2.1659017, 0.4901278, 1.2518866}, -{-0.1195526, -0.0741382, -0.1627362}, -{0.1170786, 1.4434015, 0.5179232}, -{0.1802484, -3.3042409, -1.0919195}, -{-0.0893703, 0.6249897, -0.5513315}, -{-0.4485382, 0.7706915, -0.7151492}, -{0.1670530, 0.9862249, -0.5032697}, -{-1.0164686, -0.5525413, 0.1687456}, -{-1.1321454, 0.8635002, 1.0641320}, -{-2.9168634, 1.3312420, -1.3367140}, -{-0.1507375, -0.0774953, 0.5743401}, -{0.8819472, 1.7993455, -0.8815492}, -{1.3653853, -1.9692968, -0.8795761}, -{-0.1041668, 0.0373641, -0.3172985}, -{2.5753212, 0.8393606, -1.3855975}, -{-1.1412653, 2.8130586, 0.8077401}, -{0.3533235, -0.5816089, 0.2306671}, -{0.4695485, -0.4775097, 0.3115844}, -{0.4839710, -0.0112274, 0.3021452}, -{0.2047626, 0.0314284, 0.3908203}, -{0.2209693, 0.3958321, -0.7521653}, -{0.0445392, -0.3697540, 1.2334243}, -{-0.7124705, -0.3803739, -0.3235969}, -{-1.6194319, -0.2673967, 1.4292493}, -{-0.5189626, 0.5498879, -0.6958437}, -{0.0032987, 0.1827678, 0.3436147}, -{0.7189997, 0.0811417, 1.6098613}, -{0.4940561, 1.6604526, 0.5569678}, -{0.0583177, 0.6441220, 0.2473282}, -{-0.1052075, 0.6965765, -0.9228516}, -{-0.3893517, 0.3636782, 1.5677528}, -{-0.0735424, 0.2490027, 0.0288087}, -{0.5285566, 0.7237518, -1.2193576}, -{-1.5589927, -1.6174526, -0.0730753}, -{-0.1198490, -0.0050535, 0.4878283}, -{1.4869720, 0.4660648, 1.5726637}, -{-0.4444906, -1.1519502, 1.3471843}, -{0.0814213, 0.2888644, 0.2755355}, -{0.5962121, 0.4989004, -0.3131641}, -{-0.3329013, 0.8033561, -0.1293886}, -{0.3487623, 0.3183354, -0.5297775}, -{1.5599778, -2.0423324, -1.2194607}, -{1.4357452, 0.4740760, -0.8102891}, -{-0.3307560, 0.3375154, -0.8307651}, -{-1.6739295, 2.9080174, -2.0655193}, -{1.1020480, -1.9221469, -0.0409163}, -{0.4473487, 0.0053117, 0.3344325}, -{-1.2907692, 1.3773921, -0.1468267}, -{0.7650314, 0.6300880, 2.7445872}, -{-0.1089692, -0.0742173, -0.0790824}, -{-0.6623679, 0.6466699, 1.8602387}, -{-0.9913586, -0.3368916, 1.2924396}, -{0.0093807, 1.2050279, 0.3249463}, -{-0.5091825, 0.5832558, 0.4913388}, -{-0.4030761, 1.2386496, -0.2504460}, -{0.2911742, 0.3089939, -0.1655284}, -{0.7476227, -0.5371472, 0.6945825}, -{0.5327035, -0.3258407, 0.9163901}, -{0.3546589, -0.2097289, 0.0548301}, -{-1.0350003, 2.7322059, -0.6735828}, -{0.2820315, -1.5894954, -2.5396242}, -{-0.6875293, 0.0836749, -0.1654437}, -{-0.6049310, 1.0045116, 0.4098287}, -{0.3567354, -0.6193478, -0.8521336}, -{-0.3223201, 0.0608509, -0.7501532}, -{-0.7631469, -0.3855076, -1.2581416}, -{0.6600886, 1.4587393, 0.1120742}, -{-0.2488446, 0.0698634, 0.0232714}, -{1.1426162, -0.3494356, 0.4244094}, -{1.2640941, -0.2035670, 1.0527965}, -{0.1735843, 0.4125794, -0.0978521}, -{1.3707356, 1.3783165, 1.1705633}, -{0.5201068, 0.0823810, -0.4084900}, -{-0.2782494, 0.0958790, -0.5514543}, -{-0.0922927, 2.1167324, -0.0220724}, -{1.2254411, -1.5741873, 1.1417360}, -{-0.0981854, -0.7169915, 0.2157694}, -{-1.7439561, 0.1273930, -0.4808360}, -{-0.9851225, -2.3312554, 0.9322094}, -{-0.0668305, -0.5789779, -0.8874201}, -{-0.1252635, -0.8354474, -1.1846999}, -{0.1289192, -0.4097832, -0.6323268}, -{-0.5566838, -0.1708238, 0.0562626}, -{-0.1083918, 0.4096735, 0.0141297}, -{-0.8558725, 0.0099966, 0.2020880}, -{-0.6198559, 0.0917062, -0.1029317}, -{1.6667012, 0.4675438, -0.9135117}, -{1.0477293, -0.9818330, 0.1843526}, -{-1.3755667, 0.0018323, -0.0608455}, -{-2.8249054, 2.9412072, -0.3492000}, -{-2.4000528, 0.1963841, -0.9263573}, -{0.1939051, 0.1492332, 0.1896634}, -{-0.1058462, 0.6438243, 1.1288618}, -{0.3803149, -0.8197573, 0.7432756}, -{-0.9462239, 0.6146897, -0.2389207}, -{-2.2333233, -0.8218598, -0.9886503}, -{-0.7449172, -1.1077415, 0.8897634}, -{0.5061580, -0.2111400, 0.1320356}, -{-1.1841079, 2.1344013, -1.5753845}, -{-1.6306229, 1.9418337, -1.6753001}, -{-0.3682971, 0.4286453, 0.0395469}, -{-0.6870681, -0.2461792, 1.4336015}, -{0.3520807, 1.2169930, -0.2135044}, -{-0.2190091, -0.5951402, 0.5116855}, -{-0.0654591, -0.6448689, 1.0407742}, -{0.1762349, -0.1813840, -0.3313138}, -{-0.1673192, -0.2274300, -0.1776863}, -{-1.9527262, 1.5542111, 1.3724641}, -{0.2503157, -0.4764131, -0.4022397}, -{-0.3847947, -0.4229047, -0.2962437}, -{0.3295841, -0.7521876, -0.6121954}, -{-1.7229941, 0.1334567, -0.9144082}, -{-0.1360444, 0.1894230, 0.1974138}, -{-1.9719614, 0.4719328, 0.3030434}, -{-0.8810191, -0.2908231, 0.9121325}, -{-0.0545961, -0.0246815, 0.3784347}, -{-0.0945213, 0.5767026, -1.6845475}, -{0.0131591, -0.1876959, 1.5493695}, -{0.6269782, -0.1020608, -0.2632858}, -{0.6475096, 0.3304349, -0.2082203}, -{0.5751937, -0.4795052, -0.2502715}, -{0.2252285, 0.1792377, 0.2200207}, -{0.8606573, -0.1518486, -1.4720247}, -{-1.6392212, -1.2011877, -0.1555174}, -{0.5065072, 0.1526759, -0.6774525}, -{1.5896205, -1.9377675, 1.6729956}, -{-1.9164665, 0.8515097, -0.1019328}, -{0.7238614, 0.2174024, 0.0306613}, -{0.1310557, -1.8025273, -0.0645351}, -{-0.0511274, -0.8095074, -0.4928608}, -{-0.3863026, -0.8850787, 0.1354395}, -{-1.0264128, 1.0789131, 2.5079818}, -{-1.0323224, 0.7449657, -2.4614830}, -{-0.1483398, 1.0946008, 0.0778749}, -{-0.1835067, 0.0036281, -0.2629800}, -{-2.1511543, -0.2486482, -1.2995833}, -{-0.6557078, 0.0835366, 0.5069263}, -{-1.9046589, -0.0923909, -0.6092895}, -{-1.6435487, -0.0911415, 0.0130568}, -{-0.2981251, -0.2625151, 0.4238530}, -{-2.4752314, 2.7013135, -2.6626828}, -{-0.3979553, -0.0594405, 0.0987685}, -{0.4777275, -0.4801643, -0.0181768}, -{2.0189075, 1.4931756, 0.1373355}, -{-1.1065471, 0.2504388, -1.3024805}, -{-0.2004947, -0.2065579, 0.1712029}, -{-1.2558006, -0.3847128, -0.3422967}, -{0.2889727, 0.2435948, -0.6990579}, -{0.5787117, 0.3012840, 0.1733864}, -{-0.5418677, 0.6024482, -0.3757900}, -{1.4026364, 1.1813141, -0.2962830}, -{-0.4164277, 0.4739503, 0.7848389}, -{-0.7863477, 0.0924473, -2.5495925}, -{-1.5563153, -2.1041660, 2.2163670}, -{0.2629612, 0.1990956, -0.4032089}, -{2.3525214, -1.0064338, -0.9869704}, -{2.3329594, -0.5407552, 0.0367814}, -{0.1719331, -0.1701401, -0.2958076}, -{0.5440997, -0.7198556, -0.5997350}, -{-0.8281244, -0.3719698, 1.6316886}, -{-0.3548495, -0.8581398, 0.8994423}, -{0.0840301, 0.5310095, 0.6402696}, -{0.1682336, 0.3114828, 0.8562248}, -{-0.6658417, 0.7772980, 0.0175189}, -{-0.5561884, -2.6507237, 1.9436270}, -{-0.7275199, 1.9150484, -0.4857978}, -{0.3220056, 0.3266688, -0.5139164}, -{3.3188691, 2.3036027, 1.2381084}, -{1.7620602, 1.3269072, -0.0774082}, -{-0.0483466, -0.4526103, -0.4721266}, -{0.6425436, 0.1625141, -1.6063076}, -{-0.4198503, -0.9936453, 0.2566823}, -{0.3939855, 0.2935821, 0.8637671}, -{0.8879821, -0.0044060, -0.3550934}, -{0.4282663, 2.9976709, 0.7370121}, -{0.0785574, -0.3806290, 0.0714357}, -{-0.6367553, -1.1548775, 0.9784884}, -{-0.8161538, -0.3885276, 1.2059988}, -{-0.2422301, 0.0655781, 0.0837284}, -{-0.4875989, -0.1584630, 0.7434573}, -{-1.0045851, -0.1156982, 0.4470817}, -{-0.2243544, 0.0507072, -0.0728062}, -{-0.7602751, -0.0035584, 0.3456935}, -{1.5331804, -0.6747557, -1.7172214}, -{0.1556827, 0.2922058, 0.1131539}, -{-0.3785167, 1.6495392, 0.7849973}, -{-1.6629658, 1.3108834, -0.6673427}, -{-0.1649445, -0.0653562, -0.3448776}, -{0.1663657, 1.1941626, -1.4748487}, -{-0.0054579, 0.5279569, -0.8017057}, -{0.2945591, -0.4493866, 0.1082060}, -{-0.0122872, -0.6561130, -0.2850957}, -{-0.3162680, 0.3074164, 0.9603844}, -{-0.0922183, -0.4722785, -0.2311053}, -{1.1354734, -1.0711859, 2.2003136}, -{-0.5091634, -3.0467873, -0.3230970}, -{0.0537527, -0.1225510, 0.1244960}, -{-2.1251440, 0.0446379, 1.9982712}, -{-0.1563031, -1.0263320, -0.8380143}, -{0.0584451, -0.5473534, -0.1342737}, -{-0.2941020, -1.4621412, -1.4217238}, -{-0.4155475, 0.6788667, -1.6569883}, -{-0.2005970, -0.1607690, 0.2635447}, -{0.3808092, 0.5951332, 1.0655397}, -{-0.0931154, -0.4957404, -0.8440910}, -{0.4759851, -0.0289169, -0.1828000}, -{0.3285887, -0.0533843, 0.8533910}, -{0.5400599, 1.1310588, 2.6066661}, -{-0.5212016, 0.1885619, 0.2130472}, -{0.5369341, 0.2852291, 1.6491719}, -{-0.9909765, -1.2667705, 0.1817674}, -{-0.5226406, -0.2810830, -0.2720946}, -{1.7265009, 0.4774947, -0.9708130}, -{1.1130545, -0.0037227, 1.6525193}, -{-0.2515455, -0.4028381, 0.5953164}, -{-0.4996608, 0.3231870, -0.4332215}, -{0.2909288, -0.0877334, -1.2423234}, -{0.3398647, -0.6930928, 0.0171872}, -{0.3794363, -1.1876326, -0.2219684}, -{0.2932744, -0.9216890, -0.0584995}, -{-0.0438074, -0.0045129, -0.1837292}, -{-1.2657819, -0.9869331, 0.0875366}, -{-0.1601799, 0.9392769, -0.7220142}, -{-0.0935264, -0.5361128, -0.4941647}, -{0.9496914, -0.8230011, -0.2284879}, -{-0.8197121, -0.0162203, -0.3750729}, -{0.3620983, -0.0738739, 0.1137382}, -{-0.7467386, 1.4384829, 1.9973658}, -{-0.3593641, -0.0215351, -0.0986081}, -{-0.2046718, 0.0782486, 0.3323226}, -{-0.8221127, -0.4623158, 0.2196519}, -{-0.1531385, 0.3084964, 0.7189144}, -{-0.1384810, 0.2949565, 0.0963963}, -{1.1938125, -1.0738897, 3.8416522}, -{-1.0592971, -0.7643908, -0.4564365}, -{0.3281612, 0.2959066, -0.0318168}, -{0.4113854, 0.7018896, 0.0618027}, -{0.5398616, 0.1590680, -0.2173775}, -{-0.4516699, 0.3592610, 0.1964737}, -{-0.2309006, 0.8867376, 0.8668255}, -{0.3821997, 0.3455814, -0.1695921}, -{0.0089978, -0.2528936, 0.1289878}, -{0.0244208, -0.1454540, -0.9458201}, -{-0.4923910, 0.7517837, -1.6089863}, -{-0.0111535, 0.2233160, -0.2897389}, -{2.7592230, -0.0555178, -0.5207153}, -{-0.8143219, 2.7415404, -2.0592263}, -{0.0459352, 0.7029912, -0.6715726}, -{-0.4351796, 0.3012296, -1.7354831}, -{-0.6628633, -0.5938826, 0.2399949}, -{0.0488428, 0.1918764, 0.0030201}, -{0.1833729, -0.1258096, 0.1801142}, -{-0.6484034, 1.3684894, -0.5258607}, -{-0.3750422, -0.1755417, -0.5750371}, -{0.0840667, 0.7894509, -0.5659788}, -{0.6961635, 0.8040238, -0.4928954}, -{-0.6998194, 0.0615033, -0.7229111}, -{-0.6301228, -0.0089051, -0.6203941}, -{-1.4770467, 1.3135509, -2.4174619}, -{0.9362930, -0.0280945, -0.0419318}, -{-0.3086141, 0.6694016, -1.2287109}, -{1.6757560, -2.6486042, 1.1468122}, -{-0.3388485, -0.0535804, -0.7318301}, -{-0.3145966, 0.1952736, 0.6628577}, -{-0.2768937, 1.2260059, -0.8663012}, -{0.0164021, -0.1422369, 0.3707718}, -{0.6028304, 0.2945823, 0.3645209}, -{-0.6663460, -0.7798146, 0.5352147}, -{-0.2448439, -0.5305834, 0.4687619}, -{-0.3616132, 0.0644210, 0.5403722}, -{-0.0133978, -0.6893759, 0.0022555}, -{-0.2795456, 0.2388185, 0.3066027}, -{-0.3435858, -1.0622294, 1.3839525}, -{-0.4606309, 0.8689625, -0.1808404}, -{0.0436728, 0.0309941, 0.0779769}, -{-1.2144212, 0.3280368, 1.1422435}, -{1.4425974, 1.2029767, -0.0368267}, -{0.1306524, 0.2390520, -0.0081509}, -{2.1217620, -1.0924654, 0.4345268}, -{-0.6106355, -0.7143250, 0.6539160}, -{-0.4319612, 0.0352604, -0.4342513}, -{0.7439396, -0.0795071, 0.0400865}, -{-1.0824246, -0.1299960, 0.6072925}, -{0.5223889, 0.5372722, 0.0671507}, -{0.8613309, 0.3914070, 1.0842696}, -{0.0697017, -0.4788875, 0.0863608}, -{0.3296230, -0.7277058, 0.0446747}, -{0.8332514, -0.6667767, -0.2415466}, -{0.7945235, 0.5439896, -0.6912783}, -{-0.0018718, -0.2746545, -0.7963305}, -{-0.4212657, -0.0741344, -0.6921852}, -{-0.2297236, -0.0449116, -2.4444411}, -{-0.1546410, -0.2619480, -0.4458716}, -{0.9769508, 0.2324532, -1.4755056}, -{0.0603324, -0.2235228, -0.4749199}, -{-0.2261342, 0.1583202, -0.0890588}, -{1.1347500, 0.5231912, -0.0783576}, -{1.2835879, 1.5989308, 0.2675309}, -{-0.1563951, -0.0877257, 0.0056583}, -{-0.4353131, -0.2275659, -0.1538261}, -{1.5696293, -0.5990186, 0.8605889}, -{0.2011114, 0.2541572, 0.2179711}, -{1.4144413, 0.3084099, -0.0707369}, -{-1.4188868, 0.5855426, -0.2045327}, -{-0.0951070, -0.2150468, 0.4492942}, -{-0.4150939, 1.0124195, 1.7362443}, -{-1.6240791, -0.8737992, 0.1607043}, -{0.0286951, -0.2929608, 0.2924671}, -{0.8041289, -2.1361256, 1.8789718}, -{0.9384006, 1.3188051, -0.7108405}, -{0.0588037, 0.2486502, 0.1590979}, -{-1.1750753, -1.2137033, 0.5708227}, -{-0.1466718, -0.3109528, 0.5655375}, -{0.5360453, -0.5760319, -0.9462004}, -{0.0339591, -0.7289788, -2.3281207}, -{-0.6125847, 0.7640702, -0.6292368}, -{-0.0606963, 0.1589563, -0.1900295}, -{0.3024064, 0.0920928, -1.0615352}, -{-0.9067103, -1.0652633, -0.4528189}, -{-0.3342672, 0.0948349, -0.2582483}, -{0.4328010, 1.3181278, -0.4744631}, -{-0.4539895, 0.9821225, 0.0208663}, -{-0.5160073, 0.0583511, -0.1113255}, -{3.1874425, 1.0600907, -3.2202568}, -{0.2045040, 1.1823189, -0.9022408}, -{0.2263491, 0.1163727, 0.5391917}, -{1.2766294, 0.6517097, 1.0558430}, -{-0.1744633, -1.7860831, 0.9612696}, -{1.0932646, -0.2364822, 0.4536990}, -{-0.6022773, 0.2607149, 0.0278037}, -{2.0080938, 1.3418733, 0.1140860}, -{0.1388996, 0.1659812, -0.1547923}, -{-0.3483557, 1.0403330, 0.1808880}, -{-1.5871731, -1.4050128, 0.1111639}, -{0.0513101, 0.9246361, 0.1777123}, -{-0.8135710, 0.7514899, 1.4888937}, -{0.1868052, -1.0575619, 1.3166194}, -{0.4243813, -0.1433290, -0.5605025}, -{0.2122696, -0.8574135, 0.7580556}, -{0.3622668, 0.0998559, -1.0363106}, -{-0.9942097, -0.0725464, -0.1208294}, -{-0.5421924, -2.9266388, 0.2075399}, -{-0.4544846, 0.5861464, -1.0951717}, -{0.2986474, -0.1758485, 0.5562159}, -{0.7042826, 0.2486936, 1.6898185}, -{0.1601723, 1.8819710, 3.3904181}, -{-0.7885876, 0.0685952, -0.0512156}, -{-2.2584867, -0.9708675, -1.3621267}, -{0.4784492, -0.4440466, -0.8422213}, -{-0.4547810, -0.2526099, -0.3042130}, -{-1.7466832, -0.2775930, -0.8734662}, -{0.5982465, 0.9265888, -0.5664800}, -{-0.2812441, -0.4340431, -0.3027408}, -{-0.0099332, -0.2350193, -0.2031857}, -{0.9657702, -1.7529747, -0.0755040}, -{0.8557581, 0.0344044, -0.5119299}, -{-0.4265734, -0.2481560, 1.0991817}, -{-0.9611034, 1.8810757, -1.6863877}, -{0.0680340, -0.2499276, 0.2103311}, -{-0.9813464, 0.7574427, 0.6334512}, -{1.9816474, -0.3008255, 0.5659413}, -{0.0743926, 0.1991030, 0.1739688}, -{-1.2545652, -1.8440899, -0.9652572}, -{-1.2315587, 1.7165680, 0.3927878}, -{0.4524940, 0.6373256, 0.6192719}, -{-1.0007663, -1.4420122, 0.5547880}, -{0.7061728, 0.9638134, 0.6067114}, -{0.1248113, 0.3663825, 0.4235675}, -{0.0890168, 0.2036207, 0.5182387}, -{0.6865680, -0.0064653, 2.6458580}, -{0.7280783, 0.1811616, -0.0053050}, -{2.5963855, -3.6140480, 0.6141892}, -{1.0749336, -1.6271942, -0.1931566}, -{0.6400931, 0.8303810, -0.0525217}, -{0.6228190, 1.3478081, -0.5956874}, -{0.6581643, 0.9540196, 0.8467883}, -{0.2937865, 0.5670866, 0.0420283}, -{1.2441798, 1.1429937, -0.0008812}, -{-1.8047795, -0.9819098, -0.3326008}, -{0.2592802, -0.3606196, 0.3500480}, -{0.7513626, -0.7237280, -2.1067259}, -{0.8302072, -1.2852298, 0.1934827}, -{0.0657602, 0.1933138, 0.1652633}, -{-0.3394072, 0.9632767, -0.0345765}, -{-0.2708515, -0.7377703, 0.5247406}, -{0.5324025, -0.0338855, -0.2557825}, -{-0.0332083, 2.3715754, 2.6812580}, -{0.2106650, 1.2982793, -1.9198284}, -{-0.3882978, 0.2773162, -0.1566467}, -{0.6842939, 0.2363236, -0.0927603}, -{-0.4975215, 0.3493944, -0.0361282}, -{-0.0785213, -0.6406282, 0.1505781}, -{1.3432631, 0.3366086, 0.6945970}, -{0.2470809, -0.0756031, 0.2555925}, -{0.0853592, -0.0652942, -0.5889140}, -{0.7638033, 3.1229467, -0.6648214}, -{-0.4763352, 2.4959598, 0.5056210}, -{-0.1806993, -0.5432213, 0.2843736}, -{-0.2851862, -1.2223417, -2.3436835}, -{0.0488849, -0.1425444, -0.6422551}, -{-0.2694544, -0.4383469, -0.4233050}, -{1.1562103, 0.9095083, -0.4348487}, -{0.2227415, 1.1239938, 0.3942123}, -{0.7497494, 0.0162871, -0.2495404}, -{-0.8118009, 1.4446896, -0.1192937}, -{0.8743648, -0.5178355, 0.3918512}, -{0.5102125, 0.2096758, -0.0837898}, -{-0.3812311, 0.1009151, -2.8909907}, -{1.3811345, -0.7022987, 1.6551329}, -{0.3635255, 0.6113850, 0.1289049}, -{-1.5010520, 2.3515971, -0.1179833}, -{0.8911003, 0.0458043, 2.1255031}, -{0.3383859, -0.5216249, -0.3670131}, -{-0.0222431, -0.4195570, -0.3683732}, -{0.1035808, 0.5594608, -1.0870854}, -{-0.4575243, -0.1457765, 0.2333346}, -{0.9333634, -2.2853220, -0.9771534}, -{1.0375823, -0.7634330, -1.1223359}, -{-0.1559228, 0.1043360, 0.0821770}, -{-0.7102571, 1.1715165, 1.7390429}, -{-0.3811435, 0.1892812, 0.1846211}, -{0.0664489, 0.2080631, 0.6648822}, -{-0.2100766, 0.3373742, -0.5602056}, -{-0.6065773, 0.9566219, -2.3069391}, -{-0.1001610, -0.4580465, 0.2141227}, -{0.1262279, 0.3539358, -3.0745261}, -{0.1043043, -0.3671958, 0.3719296}, -{-0.2817933, -0.2571922, -0.0996102}, -{0.3463142, -0.1981713, -1.0207673}, -{-0.2327146, 0.0020525, 0.7985563}, -{-0.2689331, 0.3785664, 0.0798595}, -{-0.5162449, 0.8201548, -3.1564975}, -{-1.5903827, -1.7621437, 0.6881874}, -{0.0048246, -0.4759708, -0.0738936}, -{1.0543069, 0.2924356, -0.1066342}, -{0.0364947, -0.8517160, 1.0451261}, -{-0.3612126, -0.1745372, 0.3256247}, -{-0.9182695, 0.1880198, 1.1307583}, -{0.1676093, -0.7128160, -0.5507276}, -{0.0711024, 0.5620128, -0.0074725}, -{-0.5144805, 2.1171145, -0.0592497}, -{0.3860890, 0.2278595, 1.4619155}, -{-0.0760329, 0.5528181, -0.6329138}, -{-0.0874852, 0.8025664, -1.2379004}, -{0.1175832, 0.2772044, -0.0147253}, -{0.1065130, 0.5501590, 0.0184569}, -{0.8714615, 0.2682802, -0.1892951}, -{0.3843272, -0.2079395, -0.1060220}, -{0.2366555, -0.6261734, 0.6541875}, -{-1.1383044, -1.3284452, -0.9045585}, -{-0.9462357, 0.2739009, -0.1071676}, -{-0.0149826, 0.4667172, 0.7682894}, -{-0.0803631, -1.0632856, 2.0736759}, -{1.6758080, 2.3316565, -0.6084354}, -{-0.3280069, -0.6008183, -0.3874582}, -{-0.2193978, -0.7154838, -0.3603603}, -{-0.2541980, -0.1756253, -0.3254856}, -{-0.3995382, 0.2999764, 0.4474368}, -{-2.1671083, -1.2442071, 2.2970946}, -{0.3842055, -1.5038354, -1.1651783}, -{0.1253111, -0.3916615, 0.0990714}, -{-0.6258905, -0.3115948, -0.0609327}, -{-0.2318305, -0.3654129, 0.5379831}, -{0.0248208, 0.2172277, -0.2154812}, -{0.5461804, 1.3661685, -0.7178068}, -{0.7874064, -0.1713565, -0.7170748}, -{-0.0668144, 0.4643478, 0.7407570}, -{-0.2472431, 1.1257744, 1.0743895}, -{0.4754061, -1.3696481, -0.1107416}, -{0.0332486, -0.2161750, -0.7318135}, -{0.4546133, 2.6417387, -0.1771612}, -{-0.9954500, -1.1070106, 1.7166064}, -{0.6684822, 0.0389398, -0.5103916}, -{0.7106223, -0.5984623, 1.4676100}, -{-0.0180548, 0.6186212, 0.7124271}, -{0.3684176, 0.1915117, 0.4574291}, -{-0.6605723, -0.4776009, -0.1714699}, -{0.6230213, 0.8811471, -0.5237863}, -{-0.4639271, -0.0289711, -0.1107749}, -{0.0810988, -0.8342401, 1.1062237}, -{-0.0043185, 1.5453044, 1.8495306}, -{0.3252796, 0.5535001, -0.0210690}, -{0.7039585, 0.0304528, 0.7488002}, -{-3.1266320, 0.8982795, 0.7932382}, -{-0.3040464, -0.0956764, 0.1787673}, -{1.5714536, -0.2443707, 0.2651815}, -{1.6010883, -0.3409451, -0.7286844}, -{-0.2446991, 0.3281004, 0.4191608}, -{0.2511722, 1.5679746, 0.7382987}, -{0.1747750, -2.0016353, -0.6139721}, -{-0.1808464, -0.2324242, 0.1796414}, -{-1.3749504, -0.4150036, -2.2158248}, -{-0.7579169, 0.8251844, -2.5272484}, -{0.3365933, 0.0655660, 0.2658690}, -{1.3894050, -0.1512876, 1.5279932}, -{0.2145588, -1.4648892, 0.2948973}, -{-0.0487690, 0.4385817, -0.1938620}, -{0.4509403, -1.5200739, -0.4747092}, -{-0.2927358, 0.6016082, 1.8909622}, -{-0.6322096, -0.2535308, -0.2843190}, -{1.2373637, 2.3364511, -2.3392823}, -{-1.0114760, -1.0720674, 0.0711724}, -{-0.1732398, -0.0261945, -0.6678236}, -{0.8655713, -2.0310826, 0.2035973}, -{-0.3951114, -3.2660396, 0.9068025}, -{0.4633079, -0.4011953, 0.1509482}, -{-1.1632513, -0.2686191, 0.7479566}, -{-1.1288460, 0.5224013, -0.7071405}, -{0.2753272, -0.1049730, 0.4954640}, -{0.2280669, 0.2922401, -0.9084337}, -{-0.4034806, 0.0632414, -1.2777942}, -{0.9172549, 0.0381378, -0.0020629}, -{-1.2033563, 0.0080304, 0.6273499}, -{1.1239382, -1.5385803, 0.7743198}, -{-0.2292927, -0.0302441, 0.2960904}, -{-1.1285660, 0.4411039, -0.1940200}, -{-0.2111314, 0.7835525, 1.5255970}, -{0.5109436, -0.5191429, -0.5383697}, -{0.8612888, 1.2402579, -0.7108637}, -{-2.2914145, -0.6560324, -1.4838983}, -{-0.0423224, 0.6251078, 0.5791327}, -{0.9559423, -1.2503113, -0.2148864}, -{0.2743281, 0.2480550, 0.5128396}, -{-0.6473759, -0.0634553, -0.1410885}, -{-1.2001119, 0.7783778, 0.6844893}, -{0.1962320, -0.8177443, 0.9078065}, -{-0.7795309, -0.1459623, 0.4616510}, -{-0.2013292, -1.7937678, -2.7544332}, -{0.3951344, 2.8615417, -0.3757853}, -{-0.1747396, 0.0131728, -0.4296161}, -{-1.0168656, 0.8491535, 1.0783796}, -{-1.7667279, 2.5400186, 2.9606388}, -{-0.1650680, -0.2646386, -0.5213848}, -{-0.0222441, 1.8407776, -1.1231588}, -{0.8195877, 0.7836348, -0.4222779}, -{0.0756311, -0.6076029, -0.0214414}, -{-0.4997029, 2.1816645, -1.1829225}, -{0.5428643, -1.3364594, 0.4281762}, -{0.2795046, -0.0568897, 0.5771241}, -{-0.6909153, 0.3522191, -0.1823404}, -{-0.7245165, 1.5655990, 0.4610687}, -{-0.2262031, -0.2609998, -0.2442952}, -{-1.1189588, 0.4458430, -1.3053010}, -{2.3245552, 2.1020088, -2.1802189}, -{0.4141465, -0.1931222, -0.1940308}, -{1.5178657, -0.5221220, -1.2199500}, -{0.6123936, -0.1649587, -0.4476845}, -{0.4898485, 0.5140274, -0.4363274}, -{-0.1475200, 1.6245583, -0.6914984}, -{0.5409344, -0.8558110, -0.0906438}, -{-0.4149029, -0.0973401, 0.2261453}, -{1.2430096, -0.5414080, 1.0359372}, -{-1.4536083, 1.1314714, -0.8227271}, -{-0.0739528, 0.3550161, -0.2813268}, -{0.0728111, 1.0232264, 0.2419352}, -{-0.6875274, -0.5136456, -0.3851624}, -{0.2719647, 0.1005786, -0.0421788}, -{0.0329587, 1.7026182, 2.2875586}, -{0.6616063, 0.6036244, 1.0885552}, -{-0.3212471, 0.4800737, -0.0186967}, -{2.5871515, 0.1145867, -0.1377340}, -{-0.3430902, 1.6900281, -0.0151148}, -{0.5332945, 0.7661790, 0.6845329}, -{2.2581165, -2.2959800, 1.0272455}, -{-0.7071382, 3.4413819, 0.3576091}, -{0.1060316, 0.3053801, -0.1398560}, -{-0.8212290, 0.1110008, 0.3181683}, -{0.0409975, -0.1065134, -1.2176194}, -{0.3714863, 0.3128957, 0.1250173}, -{-0.1359615, 1.6703734, -1.1533105}, -{-0.9583793, 1.2406772, 1.5374537}, -{0.5514312, -0.2751155, -0.0967078}, -{1.4590201, -1.4057349, -1.1647836}, -{1.7223262, 1.1741972, 0.1305296}, -{0.2369588, 0.0977347, 0.2035000}, -{-0.5651605, -1.1933389, -0.7634996}, -{0.3525024, 0.7151349, 1.3669395}, -{0.1494075, 0.0546159, -0.1346167}, -{0.6174384, -2.2808917, 0.5443513}, -{-0.0253756, 0.5467376, 2.5576780}, -{0.0870596, -0.4208933, -0.3515500}, -{-0.0521946, -1.2504283, -2.3431804}, -{0.1326849, 1.5246128, -0.7345757}, -{-0.0729481, 0.0055636, 0.5246770}, -{0.3851186, 0.1467380, 1.3317426}, -{1.3889802, 0.9790010, 0.2114205}, -{0.8874863, 0.1094970, -0.4470561}, -{1.0893173, -0.9360121, -1.1712661}, -{1.2030444, 1.3442061, 0.0820334}, -{-0.3377520, -0.2605527, 0.1224524}, -{2.2476363, 0.5014247, 0.1100320}, -{-1.1900799, -0.9660457, 0.9357408}, -{0.6751202, 0.8709425, -0.4217593}, -{-0.3844710, 0.1591683, 0.5398039}, -{1.3850998, -0.4400775, -1.1595434}, -{0.2331452, 0.4941926, -0.4111556}, -{2.1051412, -0.1981188, 0.6622845}, -{0.5621961, -0.0153541, -2.5061831}, -{0.2710508, -0.0332247, 0.0466747}, -{-0.4380794, 0.0377458, -0.3879628}, -{0.6304389, 0.1697129, 0.0387581}, -{0.1869036, -0.1646213, -0.0040420}, -{-2.9431393, -0.8826652, -2.4652698}, -{-2.4716263, -0.4598258, 0.9287906}, -{0.2538436, 0.3020846, 0.7762181}, -{-0.2919392, 0.3549357, 0.3479130}, -{-1.9860728, -0.8739800, -2.1916211}, -{0.0718299, -0.2183405, 0.0526539}, -{0.8886699, -1.7341677, -2.3292537}, -{1.1824337, 0.4483269, -0.6684165}, -{0.2444049, 0.4654630, 0.1074933}, -{-1.8459442, -0.5480993, -0.6839509}, -{-0.8411992, 0.9080196, 1.0119698}, -{-0.7822326, 0.2243735, 0.4362777}, -{-0.3760080, 0.4634489, 1.2608665}, -{-0.9150872, 0.0946041, 0.3221638}, -{-0.1206276, -0.6073695, -0.5531824}, -{-0.3791826, -0.0968147, -0.2610960}, -{-0.3311057, -0.6679179, 0.3981678}, -{-0.0095479, -0.5737157, 0.0870669}, -{-0.3695840, -0.5543298, -1.2533088}, -{0.7445883, -1.8487699, 0.7753882}, -{-0.2136426, -0.3134682, 0.2693648}, -{0.5548847, -1.3195339, 0.2302717}, -{-0.7647904, -0.3060101, 0.7871435}, -{0.0333131, 0.7000988, 0.3295616}, -{0.7506181, 0.3002109, -1.5722436}, -{0.7997450, 0.5823374, 0.3900973}, -{-0.1578774, -0.0265839, 0.2702753}, -{1.1937959, -1.2557060, 0.3684081}, -{0.9932565, -0.5843939, 0.7774101}, -{-0.0788409, -0.1011954, 0.6223034}, -{-0.0284122, 0.2541364, 0.1689752}, -{-1.5475578, -0.2326246, -1.7748033}, -{-0.4183896, 0.4030563, -0.7385012}, -{-1.4740523, 0.5550991, -0.2141495}, -{-0.5519641, 0.4148456, -1.3050870}, -{-0.0502150, -0.6106843, -0.3348640}, -{-2.1921139, -0.5020902, -0.1717405}, -{0.3945543, 0.0663796, -3.2730620}, -{-0.2018403, 0.0678087, 0.3422906}, -{-0.1123440, -0.1664633, 0.0468393}, -{0.1686210, -0.0475791, 0.5621452}, -{-0.1679789, -0.1245326, -0.5708570}, -{-2.3219974, 1.5279332, -0.5255268}, -{1.8733239, 1.6172699, -0.1331223}, -{-0.1847003, 0.1981145, 0.4501662}, -{-1.9631660, 0.0846889, 0.1142958}, -{-0.4951121, 0.5100477, 0.5506064}, -{-0.3028322, 0.1818124, -0.1747748}, -{2.9946721, 1.5612638, 2.0427296}, -{0.2516814, 0.5605670, 0.1005344}, -{-0.4528318, -0.0433427, 0.3809957}, -{-1.1957211, 0.2300788, -0.6495776}, -{-0.3508146, -0.6458142, 1.5076011}, -{-0.2025355, -0.2468513, 0.4147938}, -{-1.0257332, 2.7190862, -2.9409275}, -{0.4485800, -0.0428527, 1.6062663}, -{0.1880595, -0.0823561, -0.6946436}, -{-0.1032507, 1.2205203, 0.7530265}, -{0.7883430, -1.3692307, 1.3779318}, -{0.0741224, -0.6160498, 0.5319684}, -{0.5968047, -0.7766421, -0.3892636}, -{0.9095093, -0.7126544, 0.5339088}, -{-0.0804346, 0.1129407, -0.1689872}, -{-0.5798643, 0.6110374, -0.0314167}, -{-0.7950493, 0.7874534, 0.1465069}, -{0.8130277, 0.0035119, 0.4362926}, -{-2.0421975, -0.0897226, -0.4865768}, -{-0.5780741, 0.5385581, 1.2131044}, -{-0.0285086, -0.2417564, 0.6944125}, -{0.5191757, -0.2664703, -1.1074744}, -{-0.1830286, 1.7174866, 0.7125751}, -{-0.1684143, -0.0974395, -0.1063207}, -{0.4360677, -1.9195026, -1.8097597}, -{-0.2612115, -0.3045791, -1.0861151}, -{-0.0706915, -0.0059983, 0.0716696}, -{0.6907970, -0.9097346, -0.0772231}, -{-1.0820535, 0.8814815, -0.2220984}, -{-0.4010280, 0.0277108, -0.0530600}, -{0.8424790, 0.7044147, -0.6721722}, -{1.1460623, 0.2719930, 1.3990902}, -{-0.5665182, 0.1469257, 0.0218538}, -{-0.0851942, 1.4517957, 0.4060135}, -{1.1463039, -0.1761454, -0.6773041}, -{0.0357431, -0.4357459, 0.1937613}, -{-0.9913079, 2.2639842, 1.4065881}, -{0.1428457, -1.1586103, 0.0109180}, -{0.6074266, 0.2727721, -0.1382518}, -{-0.4322366, 0.7369309, -2.2064323}, -{1.1483483, 0.1411776, 0.3180246}, -{-0.2594711, 0.6325002, 0.1287930}, -{-1.9607490, -1.8322183, -0.7937443}, -{1.7338630, -0.5794216, 2.2493713}, -{0.2673426, -0.1597674, -0.5226926}, -{0.1080047, -0.1557170, -0.4686148}, -{0.4015809, 0.1332406, -0.9526657}, -{0.0936265, 0.0743585, 0.2335869}, -{-1.0205194, 0.0692118, 1.3590918}, -{1.1881797, 0.3579656, -0.9436999}, -{0.6904192, -0.0019986, 0.3392285}, -{0.3912680, -2.1206980, 0.3364756}, -{-0.6591944, 0.7831136, -1.0224345}, -{0.1720738, -0.0842649, 0.2511529}, -{1.2886822, 1.1883541, 0.4512889}, -{0.6559697, -1.2316865, 0.0939906}, -{-0.6291719, 0.0987552, -0.7535119}, -{-0.2204676, -0.2726866, -0.5871083}, -{-1.0658157, 1.9406302, -1.5409926}, -{-0.0554852, 0.0184100, 0.7208944}, -{0.5691118, 0.4146146, 0.9038186}, -{1.2543690, -0.1573769, 3.8439217}, -{-0.5332232, 0.3123770, -0.2655576}, -{-0.2752865, 0.8534500, 0.9998737}, -{-1.9741675, 0.4666367, -0.3780151}, -{0.2007645, 0.1135765, 0.9117863}, -{0.0398454, 0.1548842, 0.5897847}, -{-2.6355815, 1.1258231, 0.5080641}, -{0.0914914, -0.3113448, 0.2668859}, -{0.9919775, 0.5456223, 0.8703047}, -{-0.3051947, 0.8162928, 0.4344322}, -{0.0683383, 0.1031249, -0.5070200}, -{0.3259829, -0.0975287, -0.2761288}, -{-0.9550345, 1.4984384, -0.8833745}, -{0.3639604, -0.2223184, 0.0702380}, -{-0.7582729, -0.8033005, 0.8367257}, -{2.8126307, -0.1317658, -1.0419916}, -{0.3297430, 0.3625096, -0.2009601}, -{0.2007120, 0.4205164, 0.2449099}, -{-1.1571105, 1.6408093, 0.0635439}, -{-0.9417689, 0.9980576, -0.1540141}, -{0.8092425, 0.0306801, 0.6645252}, -{1.4946065, -0.2553121, -1.4854876}, -{-0.2821849, 0.9171243, 0.0803657}, -{-0.5010048, -0.5144395, -2.9023211}, -{-0.7419951, 0.0443254, -1.4067882}, -{-0.3731175, -0.2321450, 0.2605013}, -{-1.0260322, -0.8049412, 1.9138852}, -{0.2387373, -2.2399294, 0.2145263}, -{0.0146068, -0.5217500, -0.0928021}, -{-0.5165490, 0.0473421, 0.4899678}, -{-0.0588376, -1.5287520, 0.2664182}, -{-0.1583689, -1.2201079, 0.1286481}, -{0.1015012, -1.5666679, 0.1225969}, -{1.7676047, -0.1250552, -1.0923731}, -{-0.0884068, 0.3550341, 0.3517229}, -{1.0522006, 1.6226590, 0.9756668}, -{-1.1522766, 0.7175042, 1.4295297}, -{0.1033235, -0.1532708, -0.0285741}, -{1.9980594, -0.4767149, 0.3030482}, -{-0.2539494, 0.8780801, -3.0760355}, -{-0.0697192, 0.2145880, 0.1386372}, -{0.7043540, 0.1936789, 0.9466585}, -{0.7823062, -2.1523302, -0.5020938}, -{-0.0574027, 0.1423455, 0.5135712}, -{-0.7774902, 0.0330973, 0.6058371}, -{-0.2667536, 0.1220984, 0.3016899}, -{-0.2348238, 0.3927772, -0.2601168}, -{0.5806867, 0.0592215, 1.1926886}, -{-1.4486833, 1.1966019, 1.3879683}, -{-0.1275574, -0.1593172, -0.3171982}, -{1.6229414, 1.7786614, 1.1632363}, -{0.4193570, -0.2496879, -0.9531791}, -{0.1785847, -0.8162258, -0.5761198}, -{0.6370699, 0.6642181, -0.5160198}, -{1.1117023, -1.2940826, -1.5034223}, -{-0.2192285, -0.1101295, 0.2561440}, -{-0.0106426, 0.1904371, 1.2885914}, -{0.6077187, -0.6442351, 0.4569452}, -{-0.3446608, 0.2477424, 0.3465205}, -{0.1966575, 0.3548093, 0.4743665}, -{-0.2865349, -0.3678663, 0.4601056}, -{0.3918188, 0.0643876, 0.1034784}, -{3.9110799, -2.1930604, 2.8604395}, -{2.4029074, 0.3370222, -0.7531694}, -{0.3196436, 0.8067563, 0.1359811}, -{0.3144977, 1.1365383, 0.1749476}, -{0.6672608, -0.1306082, -0.0374105}, -{0.3660787, -0.0129517, -0.1434708}, -{0.5302131, -1.0710094, -1.6953470}, -{-3.0996675, -0.1991017, -0.6331081}, -{0.2270696, -0.6395828, 0.0939506}, -{-0.2028331, 0.6810054, 1.6606349}, -{-1.1375883, 1.1953206, 0.8480914}, -{-0.2145544, 0.0446063, -0.1258891}, -{1.7118497, 2.6503046, -0.4642426}, -{-0.1909427, -0.5168851, -0.6455520}, -{0.6685079, 0.7275302, -0.1457919}, -{0.7726604, -0.0904229, -0.3671038}, -{1.2108988, 2.2489240, -0.7640979}, -{-0.0537513, -0.3229373, 0.5962414}, -{-1.6526722, 0.1892129, 1.0147537}, -{2.0532992, -0.0067418, -0.2755892}, -{0.3863001, 0.1848747, -0.0086033}, -{2.1328139, 1.5326600, -0.5981897}, -{-0.2671626, 3.3582578, -2.4123821}, -{1.0211469, 0.3527845, 0.0910533}, -{-0.4963009, 3.5257967, 0.0394728}, -{-0.3179801, -0.0514200, 0.2587981}, -{-0.6233700, 0.2616705, -0.2835513}, -{1.8534980, 1.1764400, 0.3797418}, -{-1.2030880, -0.7938480, 0.2828699}, -{0.1359778, -0.4647487, 0.6558750}, -{1.2983428, -0.4135988, 0.0156575}, -{0.5066807, -0.0752325, -2.8942995}, -{0.4701657, 0.5376399, -0.1334778}, -{0.2813871, -1.8618318, 0.5929232}, -{-0.0956991, -0.1122485, -1.0591098}, -{-0.1220059, 0.0137590, 0.4294175}, -{2.0208197, -1.2264850, 0.7505284}, -{2.1963711, -0.4620777, -1.4420916}, -{-0.1589621, -0.1424045, -1.1627051}, -{1.5759472, 0.6422336, -1.8273895}, -{-1.5266118, -0.4572094, -1.2595973}, -{0.2317313, -0.3245305, 0.4702481}, -{0.1740259, -0.3300968, -0.8634441}, -{0.4384616, 0.2849818, -0.4180621}, -{0.5383259, 0.0227820, -0.4770480}, -{-0.3574426, -0.1600805, -1.6900026}, -{1.1444541, -1.8931904, 0.1823831}, -{-0.2963827, 0.6547326, 0.0524469}, -{0.4766048, 1.1353862, 0.3695239}, -{0.8964642, 0.0092930, -0.0221161}, -{-0.1658179, 0.2722859, -0.2497851}, -{0.5990334, 0.1842503, 1.5463277}, -{1.7770616, -0.0702329, -1.5356592}, -{0.5722326, -0.0361564, 0.2246031}, -{-0.4416194, -1.5883330, -1.0111673}, -{-0.9885341, 0.9255606, -1.9045055}, -{-0.1824374, 0.0269213, 0.2286639}, -{0.6313763, -0.7452465, -1.9685919}, -{-2.1414912, 1.0299960, 0.3344697}, -{-0.2090014, 0.0548566, -0.3919711}, -{0.4107269, -0.6021173, -0.1356743}, -{0.2956126, 1.2751666, -1.3086487}, -{-0.3627963, -0.0879567, -0.4310247}, -{0.3563787, -0.9919942, 1.2132691}, -{-0.6370059, -1.1982492, 1.5301647}, -{-0.3120021, 0.3356211, -0.6419587}, -{-0.5405554, 0.1122788, 1.4597992}, -{-0.0433941, -1.4200183, 3.5880423}, -{0.3868426, 0.1268371, 0.4259449}, -{0.8275454, 0.3298776, 0.5812069}, -{-0.6240539, -0.0175077, 0.9668505}, -{-0.1463688, -0.6979248, -0.5676000}, -{-1.5020248, 0.9482570, -1.7663740}, -{-1.0598823, 0.2743153, -1.2381145}, -{0.3219805, 0.0832126, -0.3169729}, -{0.6270071, 0.7850292, -0.3955949}, -{0.9385762, -0.4952129, -0.9076512}, -{0.1900787, 0.6720265, -0.1446555}, -{-1.7723001, -1.1502981, -1.1688106}, -{-0.5658141, 0.0370063, -0.3974012}, -{0.0924157, -0.7659582, 0.2837994}, -{-0.2101512, 1.9625436, -1.4274324}, -{-0.2243468, 1.5177820, -1.2479485}, -{-0.7112671, -0.1598022, -0.3567881}, -{-1.2621156, -0.2679341, 0.3995107}, -{-0.6821368, 0.4237337, -0.6507512}, -{-0.1011014, 0.1921293, -0.1153116}, -{-0.6209096, 0.3092612, -0.0884591}, -{1.5190843, -0.3775480, 0.2195322}, -{0.0196044, 0.0860823, 0.2973800}, -{-0.3387913, 1.5387986, 0.5497510}, -{-0.6603910, -0.4352000, -0.6664391}, -{0.3120975, 0.5528405, -0.2274425}, -{-1.1137364, 1.8695363, 2.7239711}, -{1.1564933, 0.4023444, -1.3802921}, -{-0.0743923, -0.0733330, 0.3583429}, -{-0.8186594, -1.7662607, 0.1534434}, -{-2.1364610, 0.2043771, 0.1883618}, -{-0.1740492, 0.1797984, -0.2892924}, -{2.0078225, -2.1446202, 2.0730276}, -{1.1344044, -0.3644475, -0.7590541}, -{0.0854935, 0.0270803, 0.4509822}, -{0.1837166, -1.3012282, 2.9484854}, -{0.0004204, 0.2278706, 0.0147970}, -{-0.0552170, -0.3517761, -0.2091179}, -{-0.7003056, 1.7923379, 0.0188573}, -{0.7175202, -0.4975690, -0.8741381}, -{0.2428824, 0.1524490, -0.8271532}, -{-0.7403136, 1.5520018, -0.6560709}, -{0.3560133, 0.0181020, 0.0573789}, -{-0.7088351, -0.5266527, -0.0623918}, -{-0.6774435, -0.2173230, -0.6340031}, -{-0.8446214, -0.2742446, -0.4378030}, -{0.2340351, 0.0017753, -0.1101530}, -{0.3561848, -0.6642830, -1.7600967}, -{0.1073545, 0.7226250, 0.1867609}, -{-0.1520944, -0.0409526, 0.0724849}, -{-2.3091717, -0.1119149, 0.1751748}, -{0.1415150, 1.5004507, 1.4573934}, -{0.2246373, -0.7106193, -0.3996265}, -{0.7687288, 0.6036479, -1.3184373}, -{-0.5265087, 1.0463331, 1.0482836}, -{-0.3498624, 0.2581154, 0.5188651}, -{2.2946980, -0.5753409, -0.2251089}, -{-2.4343500, -1.1803403, -1.0390882}, -{-0.0420544, -0.0912205, 0.1183695}, -{0.2125504, 0.4044687, 0.8048229}, -{0.3298763, 0.9782372, -1.0471267}, -{0.5841959, 0.0842409, 0.2081068}, -{0.3496853, 0.1177010, 0.6513656}, -{0.5201629, 0.2740540, 0.2508169}, -{0.1798604, -0.2892801, 0.5653869}, -{-0.3199445, -0.6915660, 1.2055200}, -{-0.3311461, 0.0260270, -1.2230072}, -{0.5410323, 0.0047646, 0.0064614}, -{0.3915576, -0.4731174, -0.9129841}, -{2.6600547, 0.9133549, 5.2014017}, -{-0.4977411, 0.4708571, -0.5003035}, -{-0.8105456, -1.0926651, -0.1236163}, -{1.8522243, 0.5612028, -1.1810312}, -{-0.1053167, 0.6057392, -0.3428728}, -{-1.0538895, 0.3794276, -0.4498492}, -{-0.8366367, 0.9600160, -0.5135319}, -{-0.1797072, 0.0975158, -0.0620564}, -{1.7915609, -1.8351694, 3.9484658}, -{-0.7902451, 2.3364801, -0.5674584}, -{-0.1480844, 0.2718256, 0.3480698}, -{-1.5157764, -1.9246758, -0.6663021}, -{-0.3502777, -0.0334997, 0.2304987}, -{0.3150263, -0.1954090, 0.0230561}, -{1.4908941, 0.5816092, -0.0367951}, -{-2.0410471, -1.3067585, 0.2442299}, -{0.2270925, -0.0587633, -0.1868389}, -{-0.0896880, 0.1807815, 0.4304860}, -{-1.2500017, 2.8124261, 0.7810630}, -{0.2250600, -0.2852002, -0.2544924}, -{-0.1544874, -0.9561267, 0.4643451}, -{0.3821835, -0.2090691, -0.9224794}, -{-0.0841490, -0.2448371, 0.0123721}, -{-3.2711694, 0.4130130, 2.2697542}, -{0.7381184, 1.4675046, -1.4138809}, -{-0.2309129, 0.1334297, -0.5507937}, -{-0.3781918, 0.4875311, 1.4868340}, -{-1.9950997, 1.2088904, -2.2154684}, -{0.0753145, 0.1323792, -0.5294404}, -{-1.6599053, -1.1509786, 0.7889889}, -{0.8572137, 0.3763480, 1.1621208}, -{0.5563838, 0.1153576, -0.0271555}, -{-0.3684671, 0.0219985, -0.3995056}, -{1.3066648, 0.7430841, 0.0171679}, -{0.4138333, -0.0423945, -0.1950621}, -{-3.0832880, 0.7055725, -0.1394205}, -{0.7865282, -0.7032972, -0.7492079}, -{0.3730027, -0.2462053, -0.1843648}, -{-0.9904535, 0.2853409, -0.0957325}, -{0.0995947, 0.3689333, 0.1442961}, -{-0.0727069, -0.5527809, -0.0586388}, -{0.1626593, -0.4746469, 0.4775504}, -{-0.1508746, -0.7287767, -0.8511173}, -{0.0672912, -0.3608705, 0.2575250}, -{0.5449254, -0.3445344, 0.2704121}, -{-0.5439202, -0.6435033, -0.8591672}, -{0.4488284, 0.3316808, 0.7533852}, -{-1.9470593, 3.7639956, -0.5129005}, -{-0.6385725, -1.0070664, -2.0543072}, -{-0.4107278, 0.0005204, -0.5987951}, -{-1.3172512, 0.8079382, -2.3034844}, -{2.3986535, -0.1548067, -1.0269145}, -{-0.3918560, -0.3249387, 0.6937745}, -{0.0871469, -0.7324569, 0.7717754}, -{-0.4687026, 0.8964357, 0.5454189}, -{-0.0763474, -0.0195979, -0.2843160}, -{-0.9732656, 1.3373082, 1.5794865}, -{-1.1804993, 0.4382990, 0.7195058}, -{-0.0091989, 0.1671064, -0.7479311}, -{0.2783962, 1.7838250, -0.1778455}, -{0.6078019, -0.8949001, 1.2569758}, -{0.1096788, -0.5518859, -0.4744784}, -{0.7819977, -0.2198442, -1.1711152}, -{0.0608847, -0.9257585, -0.3354142}, -{-0.1238085, -0.2633382, 0.2053835}, -{0.0081768, -0.0029068, 0.4442386}, -{0.5097581, 0.0604296, 1.2095935}, -{0.7611731, -0.5562501, -0.6874958}, -{-0.0039368, 0.8525688, -0.2588333}, -{-0.1680904, -1.0188329, -1.9486998}, -{-0.0882039, 0.5803663, -0.0416845}, -{1.6542871, 3.0614572, 0.6032845}, -{-1.2981867, -1.4436511, -0.5161183}, -{-0.0224709, -0.5000301, 0.7719707}, -{-0.8648980, 2.4311323, 1.8762631}, -{0.4183536, 1.0172172, -1.4858289}, -{0.2040381, -0.1198477, -0.2146469}, -{0.7342027, -1.1127731, 0.9749743}, -{0.4669384, 0.8732132, -0.0761847}, -{0.4349642, -0.5918078, 0.1747871}, -{0.4832168, -1.4230698, 0.3752550}, -{0.5239087, 1.3984516, -0.1885493}, -{-0.1276229, -0.4617692, 0.5400417}, -{0.5906874, 0.2008977, -0.8847906}, -{-2.2619503, -0.3376203, -0.0827895}, -{-0.2490359, -0.0096206, -0.6939417}, -{0.9771618, 0.8436343, -0.7519156}, -{0.8550339, 1.9923643, -0.4752832}, -{-0.2576922, 0.3191662, 0.0823885}, -{0.2153384, 1.0574030, 1.3205327}, -{-1.3408494, -0.0754505, 0.7083285}, -{0.1473799, 0.1162142, 0.6459522}, -{-0.9384412, 0.5154702, 0.0736638}, -{-1.4143867, -0.9784397, -2.2815325}, -{-0.3448535, 0.0941069, 0.1597455}, -{1.8150656, 1.5128734, 0.3585925}, -{-1.3304186, 1.1480422, 1.7970989}, -{0.3544706, 0.0666241, -0.0160328}, -{1.2672811, 1.0309504, 0.9032988}, -{-0.9101483, 0.7024614, -0.5353448}, -{-0.0658098, 0.5021660, -0.2418520}, -{-0.2573677, -0.3536445, -0.6290275}, -{0.2786247, 0.4970271, 0.0826009}, -{0.1084428, -0.2811415, 0.7457543}, -{1.3460747, 1.1374136, -0.0860377}, -{-1.2410277, 2.4784880, 0.1839910}, -{0.0249650, -0.2588879, 0.0697544}, -{-0.4928717, 0.0003062, 0.3508443}, -{-0.8587130, -0.2909271, 0.0035082}, -{-0.5618606, 0.1873441, -0.5341417}, -{-1.2169414, 0.1206937, -2.5025930}, -{-1.7895788, -0.6976333, 0.6339008}, -{0.5397766, 0.0050049, 0.4334220}, -{1.0274590, 1.1073549, -1.8176671}, -{-1.4525179, -1.2487983, 0.3598966}, -{-0.2722475, 0.4382981, -0.1663276}, -{1.4440126, 1.6699879, 0.3453755}, -{1.7331709, -0.9411019, 0.7492484}, -{0.3380721, 0.2873397, -0.3249937}, -{0.4294828, -1.0953101, 1.1471711}, -{-0.2262238, 1.1458008, 2.0756519}, -{0.0561207, -0.4521647, 0.2512634}, -{3.4772489, -1.5042380, 2.6120212}, -{-0.9934180, -1.4533414, -1.2454156}, -{0.3016475, -0.0573869, -0.0732524}, -{0.2874741, -1.4768513, -2.4165094}, -{-0.4094175, 0.1081606, -0.6735604}, -{-0.6349090, 0.0747228, -0.9409584}, -{0.8994194, 0.8142163, -2.0331502}, -{0.6012303, 0.2917452, 1.8704175}, -{-0.1960032, -0.7715361, 0.6562485}, -{0.5379429, -0.8896164, 0.6886985}, -{-0.0455518, 0.1723307, 1.8003830}, -{-0.0640825, 0.4523121, -0.0855005}, -{0.9607145, 3.5865724, -0.4398001}, -{-0.5160860, -3.3554018, -0.9243845}, -{0.8192768, 0.5932611, 0.6510293}, -{-0.6469444, 0.7199324, -0.1530534}, -{0.1459192, 0.5902175, 0.2657698}, -{-0.1015517, 0.1540838, 0.2384614}, -{0.8414450, -0.5550307, 1.1410275}, -{-0.0537884, 0.6413527, 0.2257701}, -{0.4710964, 0.5098178, -0.0593317}, -{0.9465701, 0.7356147, 1.5549394}, -{0.5513063, 0.6685256, -0.0500042}, -{-0.0833613, -0.3030859, 0.0659485}, -{1.7019023, 2.4069221, -2.5039151}, -{-1.5266738, -0.1283427, -1.5275842}, -{0.6539321, 0.7518348, -0.1989176}, -{0.6906852, 0.6463949, 0.4515626}, -{0.1533164, 1.6890860, -0.9568561}, -{-0.0688325, 0.1627806, 0.1546466}, -{1.0651517, 0.2124171, 1.9008875}, -{-0.5433175, -0.2787330, -0.4279428}, -{0.4062927, -0.6656478, -0.3035466}, -{0.7288890, -1.5553913, -0.2263021}, -{0.2082396, -0.1094010, -0.3257836}, -{0.2137125, 0.1086558, 0.3555781}, -{0.3459284, -0.2445320, -0.1789996}, -{0.1353031, -0.8651410, -0.6532210}, -{-0.1454497, 0.1734143, 0.1463475}, -{0.1716206, -0.9870976, -0.0461260}, -{0.2334210, -1.3652763, -0.2757375}, -{0.5243182, 0.2594459, -0.1280432}, -{0.2258225, -1.1423697, 0.3634787}, -{1.2530982, 2.2250724, -0.7813466}, -{-0.3481497, 0.5006183, -0.2100560}, -{-0.5647894, 1.1127058, -0.9872646}, -{-1.8693478, -2.4195170, -1.9227022}, -{0.3887536, 0.2825685, 0.5722139}, -{0.0389663, 0.1362318, -0.9134513}, -{0.2218809, 0.5816891, -1.9656017}, -{0.0182663, -0.7612534, 0.6911052}, -{-0.4634917, -0.4267094, 0.4215980}, -{1.1969125, 0.5636480, 1.2777973}, -{0.4553687, -0.6552415, -0.1948107}, -{-1.0294484, -0.3919659, -3.6920843}, -{0.3492595, 0.3691270, -3.4864273}, -{-0.2267344, -0.1671958, 0.2387004}, -{-0.7226841, 0.6724289, -0.0473232}, -{0.3409331, 0.0361212, -1.1534288}, -{-0.1529247, 0.4523427, -0.3651458}, -{-0.1092331, 0.1253513, -0.3916814}, -{-0.3644117, 2.6290045, -0.8258311}, -{-0.3511171, 0.4697167, -0.5182003}, -{0.5479014, 0.0746550, 1.1220559}, -{1.3251113, 0.0840344, -1.7808622}, -{-0.1350763, -0.4736007, -0.1680565}, -{0.0800003, 1.3332638, 1.3467768}, -{-0.7834795, -2.5770895, -1.9924150}, -{-0.5963185, -0.0408362, -0.0924476}, -{-0.0337971, -0.3395993, 0.3716938}, -{0.4661427, 0.0121882, 0.3824299}, -{0.4309115, -0.4509071, 0.4288987}, -{-0.3831378, -1.8938913, 0.3706663}, -{0.9654326, -0.3011430, -1.3204855}, -{0.0691856, -0.0942582, -0.0495481}, -{-0.0398439, 0.2837080, 0.3215376}, -{-1.0192753, 0.6946195, 0.4262432}, -{-0.3629702, -0.0243083, -0.1675541}, -{-0.8095111, 2.6831703, -1.5470415}, -{-2.7248163, 1.0304692, 0.2239088}, -{-0.3627642, 0.1097892, -0.2494321}, -{-0.4320222, 0.1963417, -0.7892334}, -{0.8890470, 0.7900113, 0.0408320}, -{-0.1130301, 0.5669448, 0.1387720}, -{-0.0915618, 0.7410914, 0.3202724}, -{-0.3344726, -0.1646619, -0.3469692}, -{0.0659482, -0.0911694, 0.4364440}, -{-0.9877858, 0.5657336, -1.9585155}, -{-1.7361768, 0.4485280, 2.5608842}, -{0.2031167, -0.5699490, 0.3636538}, -{-0.7144371, 0.0008824, 1.3509007}, -{0.6091772, 0.2562762, -0.5784369}, -{-0.3276436, 0.7317288, 0.3788413}, -{-0.3214622, -1.7530751, 0.0691260}, -{1.8124120, 1.0120775, 1.3165660}, -{-0.1668981, 0.2575147, -0.1877203}, -{-0.1895127, 1.3016299, -0.5970626}, -{-1.0429136, -0.3896537, -1.0129049}, -{-0.4501895, -0.1184276, 0.2295866}, -{-0.4939230, -2.1808956, 0.7280374}, -{0.1189931, 2.1533477, 2.6575902}, -{0.0925906, 0.0766216, -0.3554001}, -{-0.9312062, 1.0662359, -1.3801832}, -{2.5177770, -2.4244611, 2.2008152}, -{0.6492884, -0.3243286, -0.1295348}, -{-0.6173241, 1.5420395, 0.5746314}, -{-0.1021385, -0.3612273, 0.3674847}, -{0.3356473, -0.5923102, -0.3326727}, -{-0.7646415, -1.1361380, 0.6917490}, -{0.4785691, 1.2140300, 0.1097926}, -{-0.3912964, -0.0855925, 0.5627546}, -{-0.9614040, -0.5266327, 0.4802535}, -{-0.0359453, -0.4920498, 2.6995592}, -{-0.2424167, -0.5811092, 0.3715576}, -{2.0336010, -0.4604709, -2.3148305}, -{-0.9361116, -1.0506213, 1.6778309}, -{-0.1443606, 0.0798728, 0.1893478}, -{-0.4597309, -0.7833479, -0.5094951}, -{0.2654067, -0.5923091, -0.3348869}, -{0.4674697, 0.0778034, -0.3657756}, -{0.6166626, 0.1596657, 0.1670346}, -{1.2982385, -0.0440956, -0.9131714}, -{-0.6053553, -0.7692646, -0.1896511}, -{-1.5793655, -1.9473196, 0.0921175}, -{-0.0790121, 0.9685358, 0.4756566}, -{0.2350249, -0.0468491, -0.7311363}, -{-0.5087016, 0.0699998, 0.2206540}, -{2.2148252, -0.1500365, 0.2088574}, -{-0.0043059, -0.6256838, -0.2831102}, -{1.0417457, -1.7080154, -0.1745928}, -{1.4621569, -0.3884174, 2.0751650}, -{-0.0302169, 0.5882015, 0.4287615}, -{1.8859391, -0.5537729, 1.3762642}, -{-1.6265494, 3.0116100, -0.5493395}, -{0.2331057, -0.2556915, 0.1090182}, -{-0.8660760, 0.3077650, -1.5646113}, -{-0.4102871, 0.2212554, -0.5677160}, -{0.4642053, -0.5815051, -0.3633591}, -{-1.8386304, 1.3869263, 0.2780222}, -{-1.0453594, -2.9217319, -1.1768422}, -{-0.0544233, 0.4587353, -0.2696949}, -{0.5549155, -0.3994481, 0.6202176}, -{-0.7764343, -1.0913738, -1.2938977}, -{0.4520560, 0.3101609, 0.0246172}, -{1.1459858, 0.0789252, -1.4473275}, -{2.8826160, 1.0362169, -1.5757072}, -{0.1950696, -0.0617684, 0.0244832}, -{-0.3874945, 2.8472085, 1.9553250}, -{3.0649655, -1.5314090, 0.3003876}, -{0.0930745, 0.1602249, -0.1719821}, -{-1.2194415, -3.8809578, -0.7395230}, -{-1.1115692, 0.9907128, 3.2363007}, -{-0.2745497, 0.8498743, 0.0673484}, -{-0.8782723, -0.9067239, 1.2525970}, -{-0.5084704, 2.8856151, -0.8540258}, -{-0.0988160, 0.1995385, -0.0009457}, -{1.3680693, 1.0791593, 0.2912115}, -{0.4738972, -1.4858443, 0.8924816}, -{-0.1306914, -0.2564970, -0.4436179}, -{-0.4520518, 0.2270908, -0.4645155}, -{0.2844065, 0.1941214, -0.8816218}, -{0.0863048, 0.1430017, 0.1797525}, -{1.1644093, -0.8917708, 1.8344322}, -{1.4035509, 0.2816571, -1.7015198}, -{-0.4342643, -0.0008572, -0.5074114}, -{-0.9106628, 1.4456736, 0.1283984}, -{0.4687289, -0.2044256, -1.1792502}, -{-0.0408045, -0.4291363, 0.3876804}, -{-0.3923119, 0.1261225, 0.8773128}, -{-1.0850151, 2.8279836, 0.3617758}, -{0.1528850, -0.0976621, 0.2615215}, -{-0.1184761, 1.7489783, -0.3879750}, -{0.7683228, 0.8131977, 0.1280721}, -{-0.0712774, 0.2184171, -0.2841342}, -{-0.7690090, -0.1304596, 1.8995746}, -{0.1980280, -0.0320436, -0.5340676}, -{0.0459253, -0.3903672, 0.0966308}, -{0.7122316, 1.2306657, -2.0154083}, -{1.0826155, 0.5206999, 1.3258961}, -{0.1874662, -0.1674248, -0.2266619}, -{-0.6809043, -0.9111043, -0.9662595}, -{-1.1619743, -0.0881198, 0.7962888}, -{0.1415826, -0.5771257, 0.3549959}, -{-0.5149600, 0.5041939, 0.3577995}, -{0.5584505, 0.4092163, -0.6352714}, -{0.2190954, -0.0404649, 0.1866136}, -{-0.6563748, -2.1792681, 1.2619953}, -{1.3069395, 0.7205825, -0.7408518}, -{0.2277157, -0.4160430, -0.2705389}, -{-1.7670697, -0.2802293, 0.0434262}, -{0.4303937, -1.0549341, -2.1575847}, -{-0.5799810, 0.0636395, -0.3780760}, -{-0.8476939, -0.2495265, -1.1969483}, -{0.1549697, 0.2587599, -0.3469005}, -{-0.4648575, -0.9830749, 0.2260747}, -{-1.3217973, -0.6573109, -1.0000709}, -{1.5517104, 0.9700270, 1.0828738}, -{0.4662367, -0.2977712, 0.0329859}, -{1.0277424, -1.2137572, -0.4007829}, -{-0.1694970, 1.6183819, 1.4088627}, -{0.3556900, 0.0728072, 0.8011025}, -{0.6566421, 0.6695959, 0.0635623}, -{-0.4677703, -0.3805525, 0.4565152}, -{-0.2470707, -0.0299033, 0.8534603}, -{0.2174278, -4.2554460, -1.7126447}, -{0.2335066, -1.2625257, -0.5211669}, -{-0.4506806, 0.5702285, -0.0723186}, -{-0.8613529, -0.6360591, 1.0450517}, -{-0.6316258, 0.0042910, 0.1344860}, -{0.1594746, 0.2350933, 0.0386571}, -{2.3657365, -0.7328835, -1.3477842}, -{0.8324553, -0.6989261, -0.4687403}, -{-0.4536468, 0.0671110, 0.4089321}, -{-1.2469934, 0.0808527, -0.7087238}, -{0.3834743, 0.5402464, -0.2490568}, -{0.0465880, 0.1906842, -0.5050662}, -{-0.3145027, -0.4245524, 1.1394728}, -{0.0636200, 0.1814519, -0.7610149}, -{0.0355678, 0.4493580, -0.0116866}, -{-1.6383457, -1.2609742, -0.1881136}, -{1.2866765, 0.8119044, 0.1299509}, -{0.5006986, -0.1953869, 0.1468565}, -{0.9360201, 0.7593806, -0.9745607}, -{0.1997306, -0.8256070, 0.2046241}, -{0.1165280, 0.1819563, -0.3335957}, -{-0.1498930, -4.0531664, -0.8168744}, -{-0.7980457, -1.8356909, -1.5085995}, -{-0.0694953, 0.7460342, -0.2419973}, -{-0.6679947, 0.2092593, 1.2473831}, -{1.5172833, 1.1821281, 0.5524324}, -{-0.0469138, -0.4237493, 0.4833672}, -{-2.5064936, 0.0946723, -1.5600290}, -{-0.8815773, -0.9032957, 0.5700961}, -{0.1290586, -0.4307001, -0.5327262}, -{0.6995362, 1.0346541, 0.4234308}, -{0.9368824, 0.9892706, 0.1361702}, -{-0.2657675, 0.2248059, -0.0519017}, -{0.7496653, 0.1691688, 0.0484315}, -{-0.7640690, -0.4733433, -0.1021922}, -{0.6660147, 0.0135897, -0.2247631}, -{2.0375342, -1.5280222, -0.8443654}, -{-0.4228482, -1.4986917, -1.2030963}, -{-0.1376247, 0.0419212, -0.3619925}, -{-0.1980927, -0.4199083, -1.2895747}, -{1.4239345, 1.0790405, -0.4177651}, -{0.0967801, 0.1652060, 0.1868118}, -{-0.2743653, 1.3516721, 0.1703487}, -{-1.1124676, -2.9112866, 0.4605837}, -{-0.1019230, -0.3345412, -0.5002841}, -{0.0924527, -0.5690290, -0.2706624}, -{0.0988404, -0.7390521, 0.1920539}, -{-0.0973991, 0.2173977, -0.0412308}, -{1.1861721, 1.2512535, 0.5770214}, -{-0.2925737, -0.9498628, 1.1035625}, -{0.0650130, -0.5317082, 0.0869889}, -{1.5382264, -0.2533752, 1.1475521}, -{-0.2129255, -0.5030677, -0.3643261}, -{-0.1545842, 0.0240418, -0.5093538}, -{0.9645492, -0.9970759, -1.3071234}, -{0.7960411, 0.6361202, 0.5951841}, -{0.0196821, -0.2035724, 0.2518326}, -{1.8255240, 1.3117342, -1.0592895}, -{0.1038857, -0.9001826, 0.3633009}, -{0.5928358, 0.3432412, -0.2189609}, -{0.3511599, -0.0435627, -0.1778469}, -{-0.0430759, 0.4796642, -0.2207087}, -{-0.0638916, 0.0332083, 0.1442695}, -{-1.2440709, 0.9524733, 1.2096698}, -{0.5033259, -0.9700074, -0.2244985}, -{0.2980868, 0.2067008, -0.5602028}, -{1.4244348, -1.7092429, -1.6729723}, -{0.4223059, -0.0749001, -0.3316498}, -{-0.1978276, 0.6987300, -0.0038049}, -{-1.9872353, -1.7847530, -2.2861674}, -{-1.7191769, -1.2037894, -1.3971983}, -{-0.0986813, 0.1623161, -0.4471042}, -{0.2016876, 3.4718263, 0.5991595}, -{-2.6355481, 1.9461446, -0.5163711}, -{0.2977748, -0.0613753, 0.2726742}, -{-0.2880998, -1.3256470, -1.2797643}, -{0.6168802, -0.9403800, -1.5590556}, -{0.0454932, -0.4672041, 0.1841905}, -{0.4032496, 1.4282758, -0.1782223}, -{-1.2343112, 0.1043059, 1.3402308}, -{0.2951259, -0.4018296, 0.2071399}, -{1.6251297, -0.5768241, 2.6406765}, -{2.1114595, -2.3178022, 1.1979437}, -{-0.5508848, -0.4513485, 0.1587579}, -{3.1849868, -0.9688381, -0.2506410}, -{3.8478677, -0.1208772, -0.3343852}, -{0.3394571, 0.3288479, 0.2121731}, -{-0.0219260, 0.8145862, -0.0607387}, -{1.0252570, -1.6948912, -0.9305259}, -{0.4016863, -0.5711923, 0.1049533}, -{0.7871976, 0.9286956, 1.3544486}, -{-0.7587793, 0.9012746, -0.1920989}, -{-0.0466974, 0.0644121, 0.3149738}, -{-0.0320310, -0.7426583, 0.3798445}, -{0.4964424, 1.5345387, -0.0322865}, -{0.4873657, 0.2819966, -1.4279664}, -{-3.4429936, 1.1513064, 1.9244943}, -{1.6145058, 0.4685136, 0.8944612}, -{-0.3958128, 0.3423222, 0.0822672}, -{-1.8426415, -0.3842394, 0.7226458}, -{-0.7653251, 2.1658311, 0.0662310}, -{0.3330501, -0.0370922, -0.4391402}, -{2.2461066, -0.7608532, 0.8254874}, -{-0.3921336, 0.7230959, -0.8614879}, -{0.1620374, 0.5327396, -0.2320358}, -{-0.0375869, 0.6868178, -0.7222784}, -{0.2996042, 0.4975377, -0.0511463}, -{0.0233641, -0.0168409, -0.5032887}, -{-0.4454360, -0.2286583, -0.5009743}, -{0.0455388, -0.1465159, -0.7786998}, -{0.0930586, 0.1009375, -0.5629689}, -{0.3923812, -0.0058704, -0.5335502}, -{-0.6625926, 0.5610203, 0.2055977}, -{0.4666490, -0.1677387, -0.0591405}, -{0.7508925, 0.2970353, 0.3906536}, -{-0.1290875, -0.4482655, 0.2588366}, -{0.1830362, 0.6442631, 0.4032815}, -{0.2886492, 1.2192619, 0.3750167}, -{-0.1925070, -0.6002199, 0.5222709}, -{-0.3266450, -0.8703485, 0.0852678}, -{-1.5905187, -0.4142166, -0.7303457}, -{0.9161773, -1.3163726, -1.0235921} -}; - #else // SIRE_USE_OPENMM namespace SireMove { From fbcfaa68fb368ff2ba4c7c8f3f08a7de205bb662 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Sun, 22 May 2022 18:43:04 +0100 Subject: [PATCH 130/148] fix: shift for fromtodummy expression --- corelib/src/libs/SireMove/openmmpmefep.cpp | 7 +++++-- corelib/src/libs/SireMove/openmmpmefep.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index e4c09691e..66e4de7cb 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -405,7 +405,7 @@ bool OpenMMPMEFEP::operator==(const OpenMMPMEFEP &other) const and Integrator::operator==(other); } -/** Comparison operator */ +/* Comparison operator */ bool OpenMMPMEFEP::operator!=(const OpenMMPMEFEP &other) const { return not OpenMMPMEFEP::operator==(other); @@ -417,6 +417,8 @@ QString OpenMMPMEFEP::toString() const return QObject::tr("OpenMMPMEFEP()"); } + +/* various helper functions */ static void addPerParticleParameters(OpenMM::CustomNonbondedForce &force, std::vector params) { @@ -594,8 +596,9 @@ tmpl_str OpenMMPMEFEP::FROMTODUMMY = "U_LJ = 4.0 * eps_avg * (TWSIX3*TWSIX3 - TWSIX3);" "TWSIX3 = ((sigma_avg * sigma_avg) / rLJ)^3;" - "rLJ = deltaftd*sigma_avg*0.1 + r*r;" + "rLJ = deltaftd*sigma_avg*lam_diff + r*r;" + "lam_diff = 0.1;" "eps_avg = sqrt(lamftd*lamftd*eaend + (1-lamftd)*(1-lamftd)*eastart + lamftd*(1-lamftd)*emix);" "q_prod = lamftd*lamftd*qpend + (1-lamftd)*(1-lamftd)*qpstart + lamftd*(1-lamftd)*qmix;" "sigma_avg="; diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index ed7f88f0c..b7cf44932 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -56,7 +56,7 @@ SIREMOVE_EXPORT QDataStream& operator>>(QDataStream&, SireMove::OpenMMPMEFEP&); namespace SireMove { using tmpl_str = const QString; - /** This class implements single topology a free energy method using + /** This class implements the single topology free energy method using OpenMM. @author Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler From 6cfef76f1524bde3129bea1b85383538f413897d Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 23 May 2022 14:07:50 +0100 Subject: [PATCH 131/148] minor changes --- corelib/src/libs/SireMove/openmmpmefep.cpp | 28 ++++++++++++---------- corelib/src/libs/SireMove/openmmpmefep.h | 13 +++++----- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 66e4de7cb..fd2d269d6 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -117,7 +117,6 @@ enum CombinationRules { GEOMETRIC = 1 }; - enum ForceGroups { NONBONDED_FCG = 0, RECIP_FCG = 1, @@ -126,9 +125,11 @@ enum ForceGroups { BOND_FCG = 4 }; +#define SELECT(arg) (1 << (arg)) + // force group selection mask -const int group_mask = 1 << NONBONDED_FCG | 1 << RECIP_FCG - | 1 << DIRECT_FCG | 1 << CORR_FCG; +const int group_mask = SELECT(NONBONDED_FCG) | SELECT(RECIP_FCG) + | SELECT(DIRECT_FCG) | SELECT(CORR_FCG); static const RegisterMetaType r_openmmint; @@ -358,7 +359,7 @@ OpenMMPMEFEP& OpenMMPMEFEP::operator=(const OpenMMPMEFEP &other) } /** - * + * * @param other * @return boolean */ @@ -485,13 +486,12 @@ void OpenMMPMEFEP::addMCBarostat(OpenMM::System &system) // FIXME: disable SPOnOff and see if it works with PME // // NOTE: There is one single namespace for global parameters but each parameter -// must added to the force it is used in. This is relevant for all +// must be added to the force it is used in. This is relevant for all // global lambdas below because they need to be changed during MD. // Cutoff, delta and n could use a single name each as they are constant // throughout the simulation. -#define COULOMB_SHIFT "rCoul = lam_diff + r;" // can we shift? -//#define COULOMB_SHIFT "rCoul = r;" +#define COULOMB_SHIFT "rCoul = lam_diff + r;" // very unstable MD if without // Direct space PME and LJ tmpl_str OpenMMPMEFEP::GENERAL = @@ -532,9 +532,11 @@ tmpl_str OpenMMPMEFEP::GENERAL_SIGMA[2] = { "sqrt((sigmaend1*lam+(1.0-lam)*sigmastart1)*(sigmaend2*lam+(1.0-lam)*sigmastart2));" }; -// subtract 1-2, 1-3 and 1-4 interactions that have been calculated in reciprocal space +// subtract 1-2, 1-3 and 1-4 interactions that have been calculated in +// reciprocal space and so avoid double counting tmpl_str OpenMMPMEFEP::CORR_RECIP = - // cutoff shouldn't be needed because 1-4 should be shorter than cutoff + // cutoff shouldn't be needed because 1-4 should always be shorter than + // the cutoff "-U_corr * withinCutoff;" "withinCutoff = step(cutoff - r);" @@ -628,7 +630,7 @@ tmpl_str OpenMMPMEFEP::INTRA_14_CLJ_SIGMA[2] = { /* * Initialise the OpenMM Free energy single topology calculation. * Parameter fullPME is only useful for debugging of e.g. single ion systems. - * Initialise() must be called before anything else happens. + * initialise() must be called before anything else happens. */ void OpenMMPMEFEP::initialise(bool fullPME) { @@ -2928,11 +2930,11 @@ System OpenMMPMEFEP::minimiseEnergy(System &system, double tolerance = 1.0e-10, << "kcal/mol at lambda =" << current_lambda; const OpenMM::State state1 = openmm_context->getState - (OpenMM::State::Energy, false, 1 << RECIP_FCG); + (OpenMM::State::Energy, false, SELECT(RECIP_FCG)); const OpenMM::State state2 = openmm_context->getState - (OpenMM::State::Energy, false, 1 << DIRECT_FCG); + (OpenMM::State::Energy, false, SELECT(DIRECT_FCG)); const OpenMM::State state4 = openmm_context->getState - (OpenMM::State::Energy, false, 1 << CORR_FCG); + (OpenMM::State::Energy, false, SELECT(CORR_FCG)); qDebug() << "Reciprocal energy =" << state1.getPotentialEnergy() * kJ_per_mol; diff --git a/corelib/src/libs/SireMove/openmmpmefep.h b/corelib/src/libs/SireMove/openmmpmefep.h index b7cf44932..b945d7fd3 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.h +++ b/corelib/src/libs/SireMove/openmmpmefep.h @@ -29,19 +29,20 @@ #ifndef SIREMOVE_OPENMMPMEFEP_H #define SIREMOVE_OPENMMPMEFEP_H +#include #include #include -#include "integrator.h" +#include #ifdef SIRE_USE_OPENMM - #include // CONDITIONAL_INCLUDE + #include #endif -#include +#include "integrator.h" #include "SireUnits/temperature.h" #include "SireSystem/system.h" -#include + SIRE_BEGIN_HEADER #ifdef SIRE_USE_OPENMM @@ -95,7 +96,6 @@ namespace SireMove { bool isTimeReversible() const; void initialise(bool fullPME = false); - void initialise_ion(bool fullPME = false, bool doCharge = true); SireUnits::Dimension::MolarEnergy getPotentialEnergy(const System &system); @@ -308,7 +308,6 @@ namespace SireMove { SireUnits::Dimension::Time timeskip; - bool reinitialise_context; bool Debug; @@ -339,7 +338,7 @@ namespace SireMove { OpenMMMD.py) larger than HMASS. In this way hydrogens and heavier atoms (assuming no elements between H and C) should be cleanly separated by mass. */ - const double HMASS = 5.0; // g/mol + const double HMASS = 5.0; // g/mol const double SMALL = 0.0001; }; } From e7d2af791647555bac42780bb679fe725bf587f3 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 23 May 2022 14:12:09 +0100 Subject: [PATCH 132/148] missing const --- corelib/src/libs/SireMove/openmmpmefep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index fd2d269d6..4c617331b 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -882,7 +882,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) custom_intra_14_clj->addGlobalParameter("cutoffhd", converted_cutoff_distance); custom_intra_14_clj->addGlobalParameter("alpha_pme", alpha_PME); - std::vector paramList = { + const std::vector paramList = { "qpstart", "qpend", "qmix", "eastart", "eaend", "emix", "sastart", "saend", "samix" }; From 4d930ad2008884a2a1c3561ef39c1bbe50227326 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 26 May 2022 08:15:54 +0100 Subject: [PATCH 133/148] added charge_diff parameter to Python scripts --- corelib/src/libs/SireMove/openmmpmefep.cpp | 6 +++--- wrapper/Tools/OpenMMMD.py | 5 ++++- wrapper/python/scripts/somd-freenrg.py | 12 ++++++++++-- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 4c617331b..25ff3ed24 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1,4 +1,4 @@ -/******************************************** \ +/******************************************** * * Sire - Molecular Simulation Framework * @@ -24,7 +24,7 @@ * You can contact the authors via the developer's mailing list * at http://siremol.org * -\*********************************************/ +\********************************************/ #include #include @@ -128,7 +128,7 @@ enum ForceGroups { #define SELECT(arg) (1 << (arg)) // force group selection mask -const int group_mask = SELECT(NONBONDED_FCG) | SELECT(RECIP_FCG) +constexpr int group_mask = SELECT(NONBONDED_FCG) | SELECT(RECIP_FCG) | SELECT(DIRECT_FCG) | SELECT(CORR_FCG); static const RegisterMetaType r_openmmint; diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 500e1e194..388d96a96 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -415,7 +415,10 @@ """The residue number of the molecule to morph.""", ) -verbose = Parameter("verbose", False, """Print debug output""") +charge_diff = Parameter('charge difference', 0, + 'The difference in net charge between the two states') + +verbose = Parameter('verbose', False, 'Print debug output') ############################################################################### # diff --git a/wrapper/python/scripts/somd-freenrg.py b/wrapper/python/scripts/somd-freenrg.py index 2b562ecbd..3c9e6ff11 100644 --- a/wrapper/python/scripts/somd-freenrg.py +++ b/wrapper/python/scripts/somd-freenrg.py @@ -19,7 +19,7 @@ "http://siremol.org", prog="somd-freenrg") -parser.add_argument('-C', '--config', nargs="?", +parser.add_argument('-C', '--config', nargs="?", help='Supply an optional CONFIG file to control the calculation.') parser.add_argument('-H', '--help-config', action="store_true", @@ -44,6 +44,12 @@ help="The morph file describing the single topology " "calculation to be performed.") +parser.add_argument('-q', '--charge_diff', default=0, type=int, + help="The difference in net charge between the two end " + "states. This will trigger the selection of waters " + "which will be transformed to ions to compensate for the " + "change in charge along the lambda coordinate.") + parser.add_argument('-d', '--device', nargs="?", help="The device ID of the GPU on which you want to run the simulation.") @@ -53,7 +59,7 @@ parser.add_argument('-p', '--platform', nargs="?", help="The OpenMM platform on which you want to run the simulation.") -parser.add_argument('-l', '--lambda_val', nargs="?", +parser.add_argument('-l', '--lambda_val', nargs="?", help="The lambda value at which you want to run the simulation.") sys.stdout.write("\n") @@ -129,6 +135,8 @@ lambda_val = float(args.lambda_val) params["lambda_val"] = lambda_val +params['charge difference'] = args.charge_diff + if not (os.path.exists(coord_file) and os.path.exists(top_file) and os.path.exists(morph_file)): parser.print_help() print("\nPlease supply the name of an existing topology, coordinate and morph file.") From ebd71c0255ced0f9b55749f473c4a4dfd3d790fb Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Tue, 31 May 2022 12:55:47 +0100 Subject: [PATCH 134/148] added selection code as placeholder --- wrapper/Tools/OpenMMMD.py | 51 +++++++++++++++++++++++++- wrapper/python/scripts/somd-freenrg.py | 2 +- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 388d96a96..ca5b94936 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -5,6 +5,7 @@ import os import sys import re +import math import time import platform as pf import warnings @@ -416,7 +417,7 @@ ) charge_diff = Parameter('charge difference', 0, - 'The difference in net charge between the two states') + 'The difference in net charge between the two states') verbose = Parameter('verbose', False, 'Print debug output') @@ -1887,6 +1888,49 @@ def computeOpenMMEnergy(prmtop_filename, inpcrd_filename, cutoff): return state.getPotentialEnergy().value_in_unit( units.kilocalorie / units.mole) +def selectWatersForPerturbation(system, charge_diff): + """ + Select the waters that need to be transformed to ions. This can be used in + transformations where the net charges changes and is done such that the + total charge of the system stays zero. + + :param int charge_diff: the difference in net charge of the end states and + so in extenion the number of water molecules that + need to be transformed into ions + """ + + if charge_diff == 0: + return + + mols = system[MGName("all")].molecules() + molnums = mols.molNums() + + nions = abs(charge_diff) + + if charge_diff < 0: + ionname = 'Cl-' + else: # should never be 0! + ionname = 'Na+' + + lig_coords = [] + + for molnum in molnums: + mol = mols.molecule(molnum)[0].molecule() + resname = mol.residues()[0].name() + + if resname != ResName('LIG'): + for atom in mol.atoms(): + coords = atom.property('coordinates') + lig_coords.append(coords) + + distant_waters = set() + MIN_DIST = 6.0 + + # Select waters here + for molnum in molnums: + pass + + ############## # MAIN METHODS @@ -2324,6 +2368,11 @@ def runFreeNrg(): print(f'Raw OpenMM {openmm.__version__} energy ' f'({cutoff_type}): {energy:.2f} kcal mol-1\n') + if charge_diff.val != 0: + print('The difference in charge is', charge_diff.val) + selectWatersForPerturbation(system, charge_diff.val) + exit(0) + if minimise.val: print( "###=======================Minimisation========================###" diff --git a/wrapper/python/scripts/somd-freenrg.py b/wrapper/python/scripts/somd-freenrg.py index 3c9e6ff11..c74ce8871 100644 --- a/wrapper/python/scripts/somd-freenrg.py +++ b/wrapper/python/scripts/somd-freenrg.py @@ -150,5 +150,5 @@ print("\nRunning a somd-freenrg calculation using files %s, %s and %s." % (top_file, coord_file, morph_file)) -# Now lets run the OpenMMMD free energy calculation +# Now lets run the OpenMMMD free energy calculation OpenMMMD.runFreeNrg(params) From b210fe2d54d8cb16dd96c73a1855a98e408454cc Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 1 Jun 2022 10:49:23 +0100 Subject: [PATCH 135/148] added code to deal with charge transformations in SOMD --- corelib/src/libs/SireMove/openmmpmefep.cpp | 15 ++- wrapper/Tools/OpenMMMD.py | 114 +++++++++++++++++---- 2 files changed, 108 insertions(+), 21 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 25ff3ed24..317249730 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1221,6 +1221,19 @@ void OpenMMPMEFEP::initialise(bool fullPME) break; } + // force water atoms in charge transformations to be hard + if (molecule.hasProperty("water2ion")) { + ishard = true; + + qDebug() << "Charge transformation of" << atom.name() + << "charge_start =" << charge_start + << "charge_final =" << charge_final + << "epsilon_start =" << epsilon_start + << "epsilon_final =" << epsilon_final + << "sigma_start =" << sigma_start + << "sigma_final =" << sigma_final; + } + // if not hard check if to_dummy if (!ishard) { for (int l = 0; l < solutetodummy.nViews(); l++) { @@ -1307,7 +1320,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) } } else { // unperturbed atom - charge = charges[j].value(); + charge = charges[j].value(); // unscaled charge recip_space->addParticle(charge, sigma, epsilon); // solvent atom like hard diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index ca5b94936..2650e2665 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -35,7 +35,7 @@ print(f'OPENMM_PLUGIN_DIR = {openmm_dir}') import Sire.IO -# import Sire.Mol +#import Sire.Mol import Sire.CAS import Sire.System import Sire.Move @@ -1888,6 +1888,72 @@ def computeOpenMMEnergy(prmtop_filename, inpcrd_filename, cutoff): return state.getPotentialEnergy().value_in_unit( units.kilocalorie / units.mole) +### This is how a TIP3P specific template for Cl- looks like +# +# version 1 +# molecule WAT +# atom +# name O +# initial_type OW +# final_type Cl +# initial_LJ 3.15075 0.152 +# final_LJ 3.47094 0.265 +# initial_charge -0.834 +# final_charge -1.0 +# endatom +# atom +# name H1 +# initial_type HW +# final_type du +# initial_LJ 0.0000 0.0000 +# final_LJ 0.0000 0.0000 +# initial_charge 0.417 +# final_charge 0.0 +# endatom +# atom +# name H2 +# initial_type HW +# final_type du +# initial_LJ 0.0000 0.0000 +# final_LJ 0.0000 0.0000 +# initial_charge 0.417 +# final_charge 0.0 +# endatom +# endmolecule +# +### and for Na+ +# +# version 1 +# molecule WAT +# atom +# name O +# initial_type OW +# final_type Na +# initial_LJ 3.15075 0.152 +# final_LJ 3.32840 0.00277 +# initial_charge -0.834 +# final_charge 1.0 +# endatom +# atom +# name H1 +# initial_type HW +# final_type du +# initial_LJ 0.0000 0.0000 +# final_LJ 0.0000 0.0000 +# initial_charge 0.417 +# final_charge 0.0 +# endatom +# atom +# name H2 +# initial_type HW +# final_type du +# initial_LJ 0.0000 0.0000 +# final_LJ 0.0000 0.0000 +# initial_charge 0.417 +# final_charge 0.0 +# endatom +# endmolecule + def selectWatersForPerturbation(system, charge_diff): """ Select the waters that need to be transformed to ions. This can be used in @@ -1906,30 +1972,39 @@ def selectWatersForPerturbation(system, charge_diff): molnums = mols.molNums() nions = abs(charge_diff) + cnt = 0 + final_charge = math.copysign(1.0, charge_diff) + water_name = ResName('WAT') + changedmols = MoleculeGroup("changedmols") if charge_diff < 0: - ionname = 'Cl-' - else: # should never be 0! - ionname = 'Na+' + pertfile = 'minus.pert' + else: + pertfile = 'plus.pert' - lig_coords = [] + # this really needs to be able to read from string... + water_pert = Sire.IO.PerturbationsLibrary(pertfile) for molnum in molnums: mol = mols.molecule(molnum)[0].molecule() - resname = mol.residues()[0].name() - if resname != ResName('LIG'): - for atom in mol.atoms(): - coords = atom.property('coordinates') - lig_coords.append(coords) + # FIXME: select waters according to distance criterion + if mol.residue().name() == water_name and cnt < nions: + cnt += 1 - distant_waters = set() - MIN_DIST = 6.0 + perturbed_water = mol.edit() - # Select waters here - for molnum in molnums: - pass + perturbed_water.setProperty("water2ion", True) + perturbed_water.rename('WAT') + mol = perturbed_water.commit() + mol = water_pert.applyTemplate(mol) + + changedmols.add(mol) + + system.update(changedmols) + + return system ############## @@ -2237,6 +2312,10 @@ def runFreeNrg(): % debug_seed.val ) + if charge_diff.val != 0: + print('The difference in charge is', charge_diff.val) + system = selectWatersForPerturbation(system, charge_diff.val) + moves = setupMovesFreeEnergy( system, debug_seed.val, gpu.val, lambda_val.val ) @@ -2368,11 +2447,6 @@ def runFreeNrg(): print(f'Raw OpenMM {openmm.__version__} energy ' f'({cutoff_type}): {energy:.2f} kcal mol-1\n') - if charge_diff.val != 0: - print('The difference in charge is', charge_diff.val) - selectWatersForPerturbation(system, charge_diff.val) - exit(0) - if minimise.val: print( "###=======================Minimisation========================###" From 45c186a2e69d945a3649f2910b8a4ea39f0676cf Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 1 Jun 2022 10:59:15 +0100 Subject: [PATCH 136/148] removed duplicate debug output --- corelib/src/libs/SireMove/openmmpmefep.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 317249730..8d9fb0791 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -1225,13 +1225,9 @@ void OpenMMPMEFEP::initialise(bool fullPME) if (molecule.hasProperty("water2ion")) { ishard = true; - qDebug() << "Charge transformation of" << atom.name() - << "charge_start =" << charge_start - << "charge_final =" << charge_final - << "epsilon_start =" << epsilon_start - << "epsilon_final =" << epsilon_final - << "sigma_start =" << sigma_start - << "sigma_final =" << sigma_final; + if (Debug) { + qDebug() << "Charge transformation of" << atom.name(); + } } // if not hard check if to_dummy From e298330a86d730c88767963dc21e1bbc0c8d17fd Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 1 Jun 2022 11:25:45 +0100 Subject: [PATCH 137/148] get all perturbation information from a single pert file --- wrapper/Tools/OpenMMMD.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 2650e2665..d61d01be2 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1974,31 +1974,32 @@ def selectWatersForPerturbation(system, charge_diff): nions = abs(charge_diff) cnt = 0 final_charge = math.copysign(1.0, charge_diff) - water_name = ResName('WAT') + water_resname = ResName('WAT') changedmols = MoleculeGroup("changedmols") if charge_diff < 0: - pertfile = 'minus.pert' + water_name = 'WATM' else: - pertfile = 'plus.pert' + water_name = 'WATP' - # this really needs to be able to read from string... - water_pert = Sire.IO.PerturbationsLibrary(pertfile) + # FIXME: read this only once, see createSystemFreeEnergy() + water_pert = Sire.IO.PerturbationsLibrary(morphfile.val) for molnum in molnums: mol = mols.molecule(molnum)[0].molecule() # FIXME: select waters according to distance criterion - if mol.residue().name() == water_name and cnt < nions: + if mol.residue().name() == water_resname and cnt < nions: cnt += 1 perturbed_water = mol.edit() perturbed_water.setProperty("water2ion", True) - perturbed_water.rename('WAT') + perturbed_water.rename(water_name) mol = perturbed_water.commit() mol = water_pert.applyTemplate(mol) + mol = mol.edit().rename('WAT').commit() changedmols.add(mol) From e80c77c5f8a48c35cebc70262331f026b760db66 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Wed, 1 Jun 2022 13:51:34 +0100 Subject: [PATCH 138/148] make sure selectWatersForPerturbation() returns a system in any case --- wrapper/Tools/OpenMMMD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index d61d01be2..b9a0187d2 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1966,7 +1966,7 @@ def selectWatersForPerturbation(system, charge_diff): """ if charge_diff == 0: - return + return system mols = system[MGName("all")].molecules() molnums = mols.molNums() From 439e50bf9255794d75648c198d14815138434c44 Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Thu, 2 Jun 2022 13:16:29 +0100 Subject: [PATCH 139/148] fixed compilation problem in wrappers --- wrapper/IO/_IO_free_functions.pypp.cpp | 45 +------------------------- 1 file changed, 1 insertion(+), 44 deletions(-) diff --git a/wrapper/IO/_IO_free_functions.pypp.cpp b/wrapper/IO/_IO_free_functions.pypp.cpp index a9dccf8d6..e20fd4cb0 100644 --- a/wrapper/IO/_IO_free_functions.pypp.cpp +++ b/wrapper/IO/_IO_free_functions.pypp.cpp @@ -367,36 +367,6 @@ namespace bp = boost::python; #include "biosimspace.h" -#include "SireBase/getinstalldir.h" - -#include "SireError/errors.h" - -#include "SireMol/atomelements.h" - -#include "SireMol/atommasses.h" - -#include "SireMol/connectivity.h" - -#include "SireMol/mgname.h" - -#include "SireMol/moleditor.h" - -#include "SireMol/molidx.h" - -#include "SireSystem/system.h" - -#include "SireUnits/units.h" - -#include "SireVol/periodicbox.h" - -#include "SireVol/triclinicbox.h" - -#include "biosimspace.h" - -#include "moleculeparser.h" - -#include "biosimspace.h" - void register_free_functions(){ { //::SireIO::isAmberWater @@ -551,20 +521,7 @@ void register_free_functions(){ "updateCoordinatesAndVelocities" , updateCoordinatesAndVelocities_function_value , ( bp::arg("system0"), bp::arg("system1"), bp::arg("molecule_mapping"), bp::arg("is_lambda1")=(bool const)(false), bp::arg("map0")=SireBase::PropertyMap(), bp::arg("map1")=SireBase::PropertyMap() ) - , "Update the coordinates and velocities of system0 with those from\nsystem1.\nPar:am system0\nThe reference system.\nPar:am system1\nThe updated system, where molecules may not be in the same order.\nPar:am map0\nA dictionary of user-defined molecular property names for system0.\nPar:am map1\nA dictionary of user-defined molecular property names for system1.\nRetval: system, mapping\nThe system with updated coordinates and velocities and a mapping\nbetween the molecule indices in both systems.\n" ); - - } - - { //::SireIO::updateCoordinatesAndVelocities - - typedef ::boost::tuples::tuple< SireSystem::System, QHash< SireMol::MolIdx, SireMol::MolIdx >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type > ( *updateCoordinatesAndVelocities_function_type )( ::SireSystem::System const &,::SireSystem::System const &,::SireSystem::System const &,::QHash< SireMol::MolIdx, SireMol::MolIdx > const &,bool const,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ); - updateCoordinatesAndVelocities_function_type updateCoordinatesAndVelocities_function_value( &::SireIO::updateCoordinatesAndVelocities ); - - bp::def( - "updateCoordinatesAndVelocities" - , updateCoordinatesAndVelocities_function_value - , ( bp::arg("original_system"), bp::arg("renumbered_system"), bp::arg("updated_system"), bp::arg("molecule_mapping"), bp::arg("is_lambda1")=(bool const)(false), bp::arg("map0")=SireBase::PropertyMap(), bp::arg("map1")=SireBase::PropertyMap() ) - , "Update the coordinates and velocities of original_system with those from\nupdated_system.\n\nPar:am system_original\nThe original system.\n\nPar:am system_renumbered\nThe original system, atoms and residues have been renumbered to be\nunique and in ascending order.\n\nPar:am system_updated\nThe updated system, where molecules may not be in the same order.\n\nPar:am map0\nA dictionary of user-defined molecular property names for system0.\n\nPar:am map1\nA dictionary of user-defined molecular property names for system1.\n\nRetval: system, mapping\nThe system with updated coordinates and velocities and a mapping\nbetween the molecule indices in both systems.\n" ); + , "Update the coordinates and velocities of system0 with those from\nsystem1.\n\nPar:am system0\nThe reference system.\n\nPar:am system1\nThe updated system, where molecules may not be in the same order.\n\nPar:am map0\nA dictionary of user-defined molecular property names for system0.\n\nPar:am map1\nA dictionary of user-defined molecular property names for system1.\n\nRetval: system, mapping\nThe system with updated coordinates and velocities and a mapping\nbetween the molecule indices in both systems.\n" ); } From bd9dbeded780b2bb6122683be530a48292a3954a Mon Sep 17 00:00:00 2001 From: Hannes Loeffler Date: Mon, 6 Jun 2022 07:31:17 +0100 Subject: [PATCH 140/148] removed some debugging messages --- corelib/src/libs/SireMove/openmmpmefep.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index 8d9fb0791..dbaf9ebd8 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -3415,20 +3415,13 @@ double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) void OpenMMPMEFEP::updateOpenMMContextLambda(double lambda) { // nonbonded terms - if (perturbed_energies[0]) { + if (perturbed_energies[0]) openmm_context->setParameter("lam", lambda); // 1-5 HD - if (Debug) qDebug() << "Updating direct space lambda tp" << lambda; - } - // reciprocal space corrections for 1-2, 1-3 and scaled 1-4 - if (perturbed_energies[8]) { + if (perturbed_energies[8]) openmm_context->setParameter("lam_corr", lambda); - if (Debug) - qDebug() << "Updating correction lambda to" << lambda; - } - // 1-4 Interactions if (perturbed_energies[1]) openmm_context->setParameter("lamhd", lambda); // 1-4 HD From 8c24f178846b848db8ee530772ecdeee3e62f68a Mon Sep 17 00:00:00 2001 From: Christopher Woods Date: Wed, 24 Aug 2022 12:18:32 +0100 Subject: [PATCH 141/148] I've merged in everything from devel as described in my message in the pull request. Everything compiles and runs. The new pytest tests pass, as do all of the sire_test tests (except for the one expected failure in SireMol due to the change in the way that selections operate) Once pushed, I will check the pull request to see whether this has resolved the conflicts. --- .github/workflows/main.yaml | 99 +- .gitignore | 13 + BUILD_INSTRUCTIONS.rst | 171 +- CHANGELOG | 31 + CODE_OF_CONDUCT.md | 76 + INSTALL.rst | 72 +- README.rst | 61 +- RELEASE_INSTRUCTIONS.rst | 4 +- WINDOWS_INSTALL.rst | 140 - actions/collect_failed.py | 45 + actions/parse_requirements.py | 47 + actions/update_recipe.py | 74 + actions/upload_package.py | 81 + build/INSTALL_INTO_ANACONDA.rst | 118 - build/README | 8 - build/README.md | 6 + build/build_sire.py | 495 --- build/quick_compile.sh | 17 - compile_sire.bat | 112 - compile_sire.sh | 227 -- corelib/CMakeLists.txt | 603 +-- corelib/share/build/install_sire.sh | 13 +- corelib/src/apps/sire/main.cpp | 6 +- corelib/src/apps/test_system/CMakeLists.txt | 14 - corelib/src/libs/CMakeLists.txt | 5 +- corelib/src/libs/SireBase/CMakeLists.txt | 21 +- .../src/libs/SireBase/convert_property.hpp | 50 + corelib/src/libs/SireBase/cpuid.cpp | 118 +- corelib/src/libs/SireBase/cpuid.h | 28 +- corelib/src/libs/SireBase/getinstalldir.cpp | 19 +- corelib/src/libs/SireBase/propertylist.cpp | 26 + corelib/src/libs/SireBase/propertylist.h | 5 + corelib/src/libs/SireBase/slice.cpp | 263 ++ corelib/src/libs/SireBase/slice.h | 105 + corelib/src/libs/SireCAS/expression.cpp | 4 +- corelib/src/libs/SireCAS/expression.h | 4 +- corelib/src/libs/SireError/exception.cpp | 9 +- corelib/src/libs/SireError/exception.h | 3 +- corelib/src/libs/SireFF/g1ff.cpp | 320 +- corelib/src/libs/SireFF/g2ff.cpp | 351 +- corelib/src/libs/SireID/index.h | 42 +- corelib/src/libs/SireIO/amberrst.cpp | 1 + corelib/src/libs/SireIO/amberrst7.cpp | 1 + corelib/src/libs/SireIO/biosimspace.cpp | 56 +- corelib/src/libs/SireIO/charmmpsf.cpp | 23 + corelib/src/libs/SireIO/gro87.cpp | 26 +- corelib/src/libs/SireIO/grotop.cpp | 1 + corelib/src/libs/SireIO/mol2.cpp | 1 + corelib/src/libs/SireIO/moleculeparser.cpp | 178 +- corelib/src/libs/SireIO/moleculeparser.h | 70 +- corelib/src/libs/SireIO/netcdffile.cpp | 2 +- corelib/src/libs/SireIO/pdb2.cpp | 1 + corelib/src/libs/SireIO/sdf.cpp | 1 + corelib/src/libs/SireMM/CMakeLists.txt | 8 +- corelib/src/libs/SireMM/bond.cpp | 382 ++ corelib/src/libs/SireMM/bond.h | 169 + corelib/src/libs/SireMM/clj14group.cpp | 193 +- corelib/src/libs/SireMM/cljextractor.cpp | 127 +- .../src/libs/SireMM/internalperturbation.cpp | 239 +- corelib/src/libs/SireMM/ljperturbation.cpp | 151 +- corelib/src/libs/SireMM/selectorbond.cpp | 939 +++++ corelib/src/libs/SireMM/selectorbond.h | 209 + corelib/src/libs/SireMM/selectormbond.cpp | 910 +++++ corelib/src/libs/SireMM/selectormbond.h | 271 ++ corelib/src/libs/SireMaths/CMakeLists.txt | 186 +- corelib/src/libs/SireMaths/accumulator.cpp | 182 +- corelib/src/libs/SireMol/CMakeLists.txt | 15 +- corelib/src/libs/SireMol/atom.cpp | 25 +- corelib/src/libs/SireMol/atom.h | 8 + corelib/src/libs/SireMol/atomid.cpp | 10 +- corelib/src/libs/SireMol/atomid.h | 30 +- corelib/src/libs/SireMol/atommatcher.cpp | 77 +- corelib/src/libs/SireMol/atommatchers.cpp | 1 + corelib/src/libs/SireMol/atomproperty.hpp | 34 +- corelib/src/libs/SireMol/atomselection.cpp | 278 +- corelib/src/libs/SireMol/atomselection.h | 61 +- corelib/src/libs/SireMol/bead.cpp | 86 +- corelib/src/libs/SireMol/bead.h | 94 +- corelib/src/libs/SireMol/beadeditor.cpp | 15 +- corelib/src/libs/SireMol/beads.cpp | 44 +- corelib/src/libs/SireMol/beads.h | 44 +- corelib/src/libs/SireMol/cgid.cpp | 6 + corelib/src/libs/SireMol/cgid.h | 32 +- corelib/src/libs/SireMol/cgproperty.hpp | 111 +- corelib/src/libs/SireMol/chain.cpp | 94 +- corelib/src/libs/SireMol/chain.h | 94 +- corelib/src/libs/SireMol/chainid.cpp | 6 + corelib/src/libs/SireMol/chainid.h | 38 +- corelib/src/libs/SireMol/chainproperty.hpp | 111 +- .../src/libs/SireMol/chargeperturbation.cpp | 59 +- corelib/src/libs/SireMol/core.h | 53 + corelib/src/libs/SireMol/cutgroup.cpp | 63 +- corelib/src/libs/SireMol/cutgroup.h | 77 +- corelib/src/libs/SireMol/cuttingfunction.cpp | 15 +- corelib/src/libs/SireMol/editor.hpp | 259 +- corelib/src/libs/SireMol/evaluator.cpp | 29 +- corelib/src/libs/SireMol/evaluator.h | 2 + corelib/src/libs/SireMol/evaluatorm.cpp | 276 ++ corelib/src/libs/SireMol/evaluatorm.h | 132 + corelib/src/libs/SireMol/findmcs.cpp | 2 + .../src/libs/SireMol/geometryperturbation.cpp | 279 +- corelib/src/libs/SireMol/molecule.cpp | 102 +- corelib/src/libs/SireMol/molecule.h | 50 +- corelib/src/libs/SireMol/moleculedata.cpp | 232 +- corelib/src/libs/SireMol/moleculedata.h | 66 +- corelib/src/libs/SireMol/moleculegroup.cpp | 555 +-- corelib/src/libs/SireMol/moleculegroup.h | 58 +- corelib/src/libs/SireMol/moleculegroups.cpp | 78 + corelib/src/libs/SireMol/moleculegroups.h | 173 +- corelib/src/libs/SireMol/moleculeinfo.cpp | 103 +- corelib/src/libs/SireMol/moleculeinfo.h | 124 +- corelib/src/libs/SireMol/moleculeinfodata.cpp | 550 ++- corelib/src/libs/SireMol/moleculeinfodata.h | 173 +- corelib/src/libs/SireMol/moleculeview.cpp | 1017 ++++- corelib/src/libs/SireMol/moleculeview.h | 83 + corelib/src/libs/SireMol/molid.h | 78 +- corelib/src/libs/SireMol/molinfo.h | 9 + corelib/src/libs/SireMol/parser.cpp | 191 +- corelib/src/libs/SireMol/parser.h | 57 +- corelib/src/libs/SireMol/partialmolecule.cpp | 110 +- corelib/src/libs/SireMol/partialmolecule.h | 22 +- corelib/src/libs/SireMol/perturbation.cpp | 170 +- corelib/src/libs/SireMol/resid.cpp | 12 +- corelib/src/libs/SireMol/resid.h | 32 +- corelib/src/libs/SireMol/residue.cpp | 75 +- corelib/src/libs/SireMol/residue.h | 75 +- corelib/src/libs/SireMol/resproperty.hpp | 115 +- corelib/src/libs/SireMol/segid.cpp | 6 + corelib/src/libs/SireMol/segid.h | 22 +- corelib/src/libs/SireMol/segment.cpp | 69 +- corelib/src/libs/SireMol/segment.h | 86 +- corelib/src/libs/SireMol/segproperty.hpp | 115 +- corelib/src/libs/SireMol/select.cpp | 563 ++- corelib/src/libs/SireMol/select.h | 182 +- corelib/src/libs/SireMol/selector.hpp | 1055 +++-- corelib/src/libs/SireMol/selectorm.hpp | 1818 +++++++++ corelib/src/libs/SireMol/selectormol.cpp | 1259 ++++++ corelib/src/libs/SireMol/selectormol.h | 352 ++ corelib/src/libs/SireMol/structureeditor.cpp | 25 + corelib/src/libs/SireMol/structureeditor.h | 194 +- corelib/src/libs/SireMol/viewsofmol.cpp | 287 +- corelib/src/libs/SireMol/viewsofmol.h | 92 +- corelib/src/libs/SireMol/weightfunction.cpp | 2 + .../src/libs/SireMove/integratorworkspace.cpp | 301 +- .../libs/SireMove/integratorworkspacejm.cpp | 277 +- corelib/src/libs/SireMove/internalmove.cpp | 61 +- .../src/libs/SireMove/internalmovesingle.cpp | 101 +- corelib/src/libs/SireMove/molinserter.cpp | 1 + corelib/src/libs/SireMove/move.cpp | 76 +- .../src/libs/SireMove/openmmfrenergydt.cpp | 1 + .../src/libs/SireMove/openmmfrenergyst.cpp | 1 + .../src/libs/SireMove/openmmmdintegrator.cpp | 1 + corelib/src/libs/SireMove/openmmpmefep.cpp | 1 + corelib/src/libs/SireMove/rbworkspace.cpp | 275 +- corelib/src/libs/SireMove/rbworkspacejm.cpp | 383 +- corelib/src/libs/SireMove/titrator.cpp | 165 +- corelib/src/libs/SireMove/velocityverlet.cpp | 43 +- corelib/src/libs/SireMove/zmatmove.cpp | 103 +- corelib/src/libs/SireSearch/CMakeLists.txt | 63 + corelib/src/libs/SireSearch/approx_equal.cpp | 71 + corelib/src/libs/SireSearch/approx_equal.h | 50 + corelib/src/libs/SireSearch/ast.cpp | 642 ++++ corelib/src/libs/SireSearch/ast.h | 1066 ++++++ corelib/src/libs/SireSearch/grammar.h | 664 ++++ corelib/src/libs/SireSearch/helper_funcs.cpp | 121 + corelib/src/libs/SireSearch/helper_funcs.h | 66 + corelib/src/libs/SireSearch/idengine.cpp | 3385 +++++++++++++++++ corelib/src/libs/SireSearch/idengine.h | 578 +++ corelib/src/libs/SireSearch/parser.cpp | 271 ++ corelib/src/libs/SireSearch/parser.h | 71 + .../libs/SireSearch/register_siresearch.cpp | 34 + .../libs/SireSystem/create_test_molecule.cpp | 2 + corelib/src/libs/SireSystem/idassigner.cpp | 236 +- .../src/libs/SireSystem/polarisecharges.cpp | 295 +- corelib/src/libs/SireSystem/system.cpp | 786 ++-- corelib/src/libs/SireSystem/system.h | 151 +- corelib/src/libs/SireVol/triclinicbox.cpp | 12 +- .../src/libs/Squire/qmchargeconstraint.cpp | 67 +- corelib/src/libs/sireglobal.h | 12 + doc/Makefile | 43 + doc/requirements.txt | 5 + doc/source/acknowledgements.rst | 486 +++ doc/source/api/index.rst | 89 + doc/source/api/index_Sire.rst | 19 + doc/source/api/index_Sire_Analysis.rst | 28 + doc/source/api/index_Sire_Base.rst | 22 + doc/source/api/index_Sire_CAS.rst | 48 + doc/source/api/index_Sire_Error.rst | 21 + doc/source/api/index_Sire_FF.rst | 15 + doc/source/api/index_Sire_ID.rst | 21 + doc/source/api/index_Sire_IO.rst | 34 + doc/source/api/index_Sire_MM.rst | 55 + doc/source/api/index_Sire_Maths.rst | 12 + doc/source/api/index_Sire_Mol.rst | 108 + doc/source/api/index_Sire_Move.rst | 12 + doc/source/api/index_Sire_Squire.rst | 21 + doc/source/api/index_Sire_Stream.rst | 21 + doc/source/api/index_Sire_System.rst | 22 + doc/source/api/index_Sire_Units.rst | 26 + doc/source/api/index_Sire_Vol.rst | 15 + doc/source/api/index_api_Sire.rst | 8 + doc/source/api/index_api_Sire_Analysis.rst | 8 + doc/source/api/index_api_Sire_Base.rst | 8 + doc/source/api/index_api_Sire_CAS.rst | 8 + doc/source/api/index_api_Sire_Error.rst | 8 + doc/source/api/index_api_Sire_FF.rst | 8 + doc/source/api/index_api_Sire_ID.rst | 8 + doc/source/api/index_api_Sire_IO.rst | 8 + doc/source/api/index_api_Sire_MM.rst | 8 + doc/source/api/index_api_Sire_Maths.rst | 8 + doc/source/api/index_api_Sire_Mol.rst | 8 + doc/source/api/index_api_Sire_Move.rst | 8 + doc/source/api/index_api_Sire_Squire.rst | 8 + doc/source/api/index_api_Sire_Stream.rst | 8 + doc/source/api/index_api_Sire_System.rst | 8 + doc/source/api/index_api_Sire_Units.rst | 8 + doc/source/api/index_api_Sire_Vol.rst | 8 + doc/source/changelog.rst | 6 + doc/source/conf.py | 377 ++ doc/source/contributing.rst | 39 + doc/source/development.rst | 417 ++ doc/source/features.rst | 6 + doc/source/images/logo.svg | 1 + doc/source/index.rst | 94 + doc/source/install.rst | 6 + doc/source/packaging.rst | 65 + doc/source/quickstart/index.rst | 8 + doc/source/roadmap.rst | 33 + doc/source/snaglist.rst | 17 + doc/source/support.rst | 5 + doc/source/tutorial/index.rst | 34 + doc/source/tutorial/index_part01.rst | 26 + doc/source/tutorial/index_part02.rst | 55 + .../tutorial/part01/01_importing_sire.rst | 22 + .../tutorial/part01/02_loading_a_molecule.rst | 31 + .../tutorial/part01/03_simple_indexing.rst | 93 + .../tutorial/part01/04_saving_a_molecule.rst | 30 + .../part01/05_loading_from_multiple_files.rst | 54 + .../part01/06_supported_file_formats.rst | 71 + .../tutorial/part02/01_indexing_atoms.rst | 667 ++++ .../tutorial/part02/02_indexing_residues.rst | 469 +++ .../tutorial/part02/03_indexing_chains.rst | 376 ++ .../tutorial/part02/04_indexing_segments.rst | 298 ++ .../tutorial/part02/05_indexing_molecules.rst | 459 +++ .../tutorial/part02/06_indexing_bonds.rst | 432 +++ doc/source/tutorial/part02/07_searching.rst | 671 ++++ doc/winbuild.bat | 3 + docker/sire-generate-wrappers/Dockerfile | 13 +- docker/sire-generate-wrappers/README.md | 90 +- .../sire-generate-wrappers/generate_wrappers | 2 +- docker/sire-generate-wrappers/scanner.py | 738 ++++ docker/sire-generate-wrappers/unpack_headers | 14 + recipes/fkcombu/LICENSE | 24 - recipes/fkcombu/build.sh | 18 - recipes/fkcombu/meta.yaml | 35 - recipes/libcpuid/LICENSE | 23 - recipes/libcpuid/bld.bat | 14 - recipes/libcpuid/build.sh | 15 - recipes/libcpuid/meta.yaml | 39 - recipes/sire/bld.bat | 1 + recipes/sire/build.sh | 28 +- recipes/sire/template.yaml | 95 +- requirements.txt | 10 + requirements_bss.txt | 15 + requirements_build.txt | 11 + setup.py | 729 ++++ src/sire/CMakeLists.txt | 121 + src/sire/__init__.py | 468 +++ src/sire/_load.py | 465 +++ src/sire/_pythonize.py | 349 ++ src/sire/_thumbsup.py | 165 + src/sire/analysis/CMakeLists.txt | 13 + src/sire/analysis/__init__.py | 9 + src/sire/base/CMakeLists.txt | 13 + src/sire/base/__init__.py | 14 + src/sire/build/cmake/cmake_uninstall.cmake.in | 23 + src/sire/build/cmake/install_python.cmake | 63 + src/sire/cas/CMakeLists.txt | 13 + src/sire/cas/__init__.py | 12 + src/sire/cluster/CMakeLists.txt | 13 + src/sire/cluster/__init__.py | 9 + src/sire/config/CMakeLists.txt | 13 + src/sire/config/__init__.py | 11 + src/sire/error/CMakeLists.txt | 13 + src/sire/error/__init__.py | 12 + src/sire/ff/CMakeLists.txt | 13 + src/sire/ff/__init__.py | 9 + src/sire/id/CMakeLists.txt | 13 + src/sire/id/__init__.py | 12 + src/sire/io/CMakeLists.txt | 13 + src/sire/io/__init__.py | 15 + src/sire/maths/CMakeLists.txt | 13 + src/sire/maths/__init__.py | 13 + src/sire/mm/CMakeLists.txt | 13 + src/sire/mm/__init__.py | 13 + src/sire/mol/CMakeLists.txt | 14 + src/sire/mol/__init__.py | 465 +++ src/sire/mol/_cursor.py | 563 +++ src/sire/move/CMakeLists.txt | 13 + src/sire/move/__init__.py | 9 + src/sire/qt/CMakeLists.txt | 13 + src/sire/qt/__init__.py | 9 + src/sire/search/CMakeLists.txt | 13 + src/sire/search/__init__.py | 15 + src/sire/squire/CMakeLists.txt | 13 + src/sire/squire/__init__.py | 9 + src/sire/stream/CMakeLists.txt | 13 + src/sire/stream/__init__.py | 9 + src/sire/system/CMakeLists.txt | 14 + src/sire/system/__init__.py | 12 + src/sire/system/_system.py | 138 + src/sire/units/CMakeLists.txt | 13 + src/sire/units/__init__.py | 11 + src/sire/utils/CMakeLists.txt | 14 + src/sire/utils/__init__.py | 9 + src/sire/utils/_try_import.py | 176 + src/sire/vol/CMakeLists.txt | 13 + src/sire/vol/__init__.py | 11 + tests/base/test_wrap.py | 56 + tests/biosimspace/test_select.py | 23 + tests/mm/test_index_bonds.py | 76 + tests/mol/test_complex_indexing.py | 443 +++ tests/units/test_pickling.py | 30 + version.txt | 1 + wrapper/Analysis/Bennetts.pypp.cpp | 25 + wrapper/Analysis/BennettsRatios.pypp.cpp | 23 + wrapper/Analysis/CMakeAutogenFile.txt | 10 +- wrapper/Analysis/CMakeLists.txt | 10 +- wrapper/Analysis/ComponentGradients.pypp.cpp | 37 + wrapper/Analysis/DataPoint.pypp.cpp | 22 + wrapper/Analysis/FEP.pypp.cpp | 27 + wrapper/Analysis/FEPDeltas.pypp.cpp | 26 + wrapper/Analysis/Gradients.pypp.cpp | 26 + wrapper/Analysis/PMF.pypp.cpp | 11 + wrapper/Analysis/SireAnalysis_registrars.cpp | 16 +- wrapper/Analysis/TI.pypp.cpp | 29 + wrapper/Analysis/TIComponents.pypp.cpp | 26 + wrapper/Analysis/TIPMF.pypp.cpp | 16 + wrapper/Analysis/__init__.py | 39 +- wrapper/AutoGenerate/create_wrappers.py | 54 +- wrapper/AutoGenerate/scanheaders.py | 29 +- wrapper/Base/Array2DBase.pypp.cpp | 8 + wrapper/Base/Array2D_double_.pypp.cpp | 7 + wrapper/Base/ArrayProperty_QString_.pypp.cpp | 32 + wrapper/Base/ArrayProperty_double_.pypp.cpp | 32 + wrapper/Base/ArrayProperty_int_.pypp.cpp | 32 + wrapper/Base/BooleanProperty.pypp.cpp | 13 + wrapper/Base/CMakeAutogenFile.txt | 96 +- wrapper/Base/CMakeLists.txt | 13 +- wrapper/Base/CPUID.pypp.cpp | 14 + wrapper/Base/ChunkedVector_double_.pypp.cpp | 22 + wrapper/Base/CombineProperties.pypp.cpp | 11 +- wrapper/Base/DoubleArrayProperty.pypp.cpp | 14 + wrapper/Base/FlopsMark.pypp.cpp | 9 + wrapper/Base/Incremint.pypp.cpp | 3 + wrapper/Base/IntegerArrayProperty.pypp.cpp | 14 + wrapper/Base/LengthProperty.pypp.cpp | 5 + wrapper/Base/LinkToProperty.pypp.cpp | 7 +- wrapper/Base/LowerCaseString.pypp.cpp | 4 + wrapper/Base/MajorMinorVersion.pypp.cpp | 10 +- wrapper/Base/MemInfo.pypp.cpp | 12 + wrapper/Base/NoMangling.pypp.cpp | 4 + wrapper/Base/NullProperty.pypp.cpp | 4 + wrapper/Base/NumberProperty.pypp.cpp | 15 + ...PackedArray2D_DoubleArrayProperty.pypp.cpp | 24 + ...Array2D_DoubleArrayProperty_Array.pypp.cpp | 10 + ...ackedArray2D_IntegerArrayProperty.pypp.cpp | 24 + ...rray2D_IntegerArrayProperty_Array.pypp.cpp | 10 + .../Base/PackedArray2D_PropertyList.pypp.cpp | 24 + .../PackedArray2D_PropertyList_Array.pypp.cpp | 10 + wrapper/Base/PackedArray2D_QString_.pypp.cpp | 24 + .../Base/PackedArray2D_QString_Array.pypp.cpp | 10 + wrapper/Base/PackedArray2D_QVariant_.pypp.cpp | 24 + .../PackedArray2D_QVariant_Array.pypp.cpp | 10 + ...PackedArray2D_StringArrayProperty.pypp.cpp | 24 + ...Array2D_StringArrayProperty_Array.pypp.cpp | 10 + wrapper/Base/PackedArray2D_double_.pypp.cpp | 24 + .../Base/PackedArray2D_double_Array.pypp.cpp | 10 + wrapper/Base/PackedArray2D_int_.pypp.cpp | 24 + wrapper/Base/PackedArray2D_int_Array.pypp.cpp | 10 + wrapper/Base/Process.pypp.cpp | 18 + wrapper/Base/Properties.pypp.cpp | 44 +- wrapper/Base/Property.pypp.cpp | 19 + wrapper/Base/PropertyList.pypp.cpp | 46 +- wrapper/Base/PropertyMap.pypp.cpp | 10 + wrapper/Base/PropertyName.pypp.cpp | 12 +- wrapper/Base/Range.pypp.cpp | 11 +- wrapper/Base/SimpleRange.pypp.cpp | 8 + wrapper/Base/SireBase_containers.cpp | 3 + wrapper/Base/SireBase_properties.cpp | 20 +- wrapper/Base/SireBase_registrars.cpp | 40 +- wrapper/Base/StringArrayProperty.pypp.cpp | 14 + wrapper/Base/StringMangler.pypp.cpp | 4 + wrapper/Base/StringProperty.pypp.cpp | 13 + wrapper/Base/TempDir.pypp.cpp | 7 + wrapper/Base/TimeProperty.pypp.cpp | 5 + wrapper/Base/TrigArray2DBase.pypp.cpp | 10 + wrapper/Base/TrigArray2D_double_.pypp.cpp | 7 + wrapper/Base/TrimString.pypp.cpp | 4 + wrapper/Base/UnitTest.pypp.cpp | 8 + wrapper/Base/UpperCaseString.pypp.cpp | 4 + wrapper/Base/VariantProperty.pypp.cpp | 16 + wrapper/Base/Version.pypp.cpp | 7 + wrapper/Base/_Base.main.cpp | 6 + wrapper/Base/_Base_free_functions.pypp.cpp | 205 + wrapper/Base/__init__.py | 70 +- wrapper/Base/autoconvert_Slice.cpp | 114 + wrapper/Base/special_code.py | 5 +- wrapper/CAS/Abs.pypp.cpp | 6 + wrapper/CAS/AlwaysFalse.pypp.cpp | 23 + wrapper/CAS/AlwaysTrue.pypp.cpp | 23 + wrapper/CAS/ArcCos.pypp.cpp | 6 + wrapper/CAS/ArcCosh.pypp.cpp | 6 + wrapper/CAS/ArcCot.pypp.cpp | 6 + wrapper/CAS/ArcCoth.pypp.cpp | 6 + wrapper/CAS/ArcCsc.pypp.cpp | 6 + wrapper/CAS/ArcCsch.pypp.cpp | 6 + wrapper/CAS/ArcSec.pypp.cpp | 6 + wrapper/CAS/ArcSech.pypp.cpp | 6 + wrapper/CAS/ArcSin.pypp.cpp | 6 + wrapper/CAS/ArcSinh.pypp.cpp | 6 + wrapper/CAS/ArcTan.pypp.cpp | 6 + wrapper/CAS/ArcTanh.pypp.cpp | 6 + wrapper/CAS/CMakeAutogenFile.txt | 102 +- wrapper/CAS/CMakeLists.txt | 12 +- wrapper/CAS/ComplexPower.pypp.cpp | 9 + wrapper/CAS/ComplexValues.pypp.cpp | 16 + wrapper/CAS/Condition.pypp.cpp | 24 + wrapper/CAS/Conditional.pypp.cpp | 24 +- wrapper/CAS/Constant.pypp.cpp | 15 + wrapper/CAS/Cos.pypp.cpp | 6 + wrapper/CAS/Cosh.pypp.cpp | 6 + wrapper/CAS/Cot.pypp.cpp | 6 + wrapper/CAS/Coth.pypp.cpp | 6 + wrapper/CAS/Csc.pypp.cpp | 6 + wrapper/CAS/Csch.pypp.cpp | 6 + wrapper/CAS/DoubleFunc.pypp.cpp | 16 + wrapper/CAS/EqualTo.pypp.cpp | 6 + wrapper/CAS/ExBase.pypp.cpp | 22 + wrapper/CAS/Exp.pypp.cpp | 12 + wrapper/CAS/Expression.pypp.cpp | 46 + wrapper/CAS/ExpressionBase.pypp.cpp | 21 + wrapper/CAS/ExpressionProperty.pypp.cpp | 11 + wrapper/CAS/Factor.pypp.cpp | 5 +- wrapper/CAS/GreaterOrEqualThan.pypp.cpp | 6 + wrapper/CAS/GreaterThan.pypp.cpp | 6 + wrapper/CAS/I.pypp.cpp | 10 + wrapper/CAS/Identities.pypp.cpp | 21 + wrapper/CAS/IntegerPower.pypp.cpp | 8 + wrapper/CAS/IntegrationConstant.pypp.cpp | 6 + wrapper/CAS/LessOrEqualThan.pypp.cpp | 6 + wrapper/CAS/LessThan.pypp.cpp | 6 + wrapper/CAS/Ln.pypp.cpp | 6 + wrapper/CAS/Max.pypp.cpp | 6 + wrapper/CAS/Min.pypp.cpp | 6 + wrapper/CAS/NotEqualTo.pypp.cpp | 6 + wrapper/CAS/Power.pypp.cpp | 10 + wrapper/CAS/PowerConstant.pypp.cpp | 9 + wrapper/CAS/PowerFunction.pypp.cpp | 18 + wrapper/CAS/Product.pypp.cpp | 25 + wrapper/CAS/RationalPower.pypp.cpp | 8 + wrapper/CAS/RealPower.pypp.cpp | 8 + wrapper/CAS/Sec.pypp.cpp | 6 + wrapper/CAS/Sech.pypp.cpp | 6 + wrapper/CAS/Sin.pypp.cpp | 6 + wrapper/CAS/SingleFunc.pypp.cpp | 17 + wrapper/CAS/Sinh.pypp.cpp | 6 + wrapper/CAS/SireCAS_registrars.cpp | 86 +- wrapper/CAS/Sum.pypp.cpp | 23 + wrapper/CAS/Symbol.pypp.cpp | 19 + wrapper/CAS/SymbolComplex.pypp.cpp | 3 + wrapper/CAS/SymbolExpression.pypp.cpp | 7 +- wrapper/CAS/SymbolValue.pypp.cpp | 4 + wrapper/CAS/Tan.pypp.cpp | 6 + wrapper/CAS/Tanh.pypp.cpp | 6 + wrapper/CAS/Values.pypp.cpp | 26 + wrapper/CAS/_CAS_free_functions.pypp.cpp | 40 +- wrapper/CAS/__init__.py | 163 +- wrapper/CMakeLists.txt | 402 +- wrapper/Cluster/AbortPacket.pypp.cpp | 6 + wrapper/Cluster/CMakeAutogenFile.txt | 12 +- wrapper/Cluster/CMakeLists.txt | 8 +- wrapper/Cluster/Cluster.pypp.cpp | 21 + wrapper/Cluster/ErrorPacket.pypp.cpp | 8 + wrapper/Cluster/Node.pypp.cpp | 17 + wrapper/Cluster/Nodes.pypp.cpp | 25 + wrapper/Cluster/Promise.pypp.cpp | 16 + wrapper/Cluster/ThisThread.pypp.cpp | 3 + wrapper/Cluster/WorkPacket.pypp.cpp | 17 +- wrapper/Cluster/WorkPacketBase.pypp.cpp | 12 + wrapper/Cluster/WorkTest.pypp.cpp | 6 + wrapper/Cluster/__init__.py | 2 +- wrapper/Error/CMakeLists.txt | 10 +- wrapper/Error/__init__.py | 41 +- wrapper/Error/wrap_SireError.cpp | 4 + wrapper/Error/wrap_exceptions.cpp | 153 +- wrapper/FF/AtomPoint.pypp.cpp | 27 +- wrapper/FF/CMakeAutogenFile.txt | 52 +- wrapper/FF/CMakeLists.txt | 14 +- wrapper/FF/Center.pypp.cpp | 26 + wrapper/FF/CenterOfGeometry.pypp.cpp | 26 + wrapper/FF/CenterOfMass.pypp.cpp | 26 + wrapper/FF/EnergyTable.pypp.cpp | 18 + wrapper/FF/FF.pypp.cpp | 59 +- wrapper/FF/FF3D.pypp.cpp | 3 + wrapper/FF/FFComponent.pypp.cpp | 9 +- wrapper/FF/FFDetail.pypp.cpp | 10 + wrapper/FF/FFID.pypp.cpp | 4 + wrapper/FF/FFIdx.pypp.cpp | 9 + wrapper/FF/FFMolGroup.pypp.cpp | 45 +- wrapper/FF/FFName.pypp.cpp | 8 + wrapper/FF/FieldTable.pypp.cpp | 23 + wrapper/FF/ForceFields.pypp.cpp | 152 +- wrapper/FF/ForceTable.pypp.cpp | 19 + wrapper/FF/G1FF.pypp.cpp | 42 +- wrapper/FF/G2FF.pypp.cpp | 7 +- wrapper/FF/GridFieldTable.pypp.cpp | 18 +- wrapper/FF/GridPotentialTable.pypp.cpp | 18 +- wrapper/FF/IDAndSet_FFID_.pypp.cpp | 8 + wrapper/FF/IDOrSet_FFID_.pypp.cpp | 8 + wrapper/FF/MolEnergyTable.pypp.cpp | 24 + wrapper/FF/MolFieldTable.pypp.cpp | 24 + wrapper/FF/MolForceTable.pypp.cpp | 24 + wrapper/FF/MolPotentialTable.pypp.cpp | 24 + wrapper/FF/NullFF.pypp.cpp | 15 +- wrapper/FF/NullProbe.pypp.cpp | 3 + wrapper/FF/Point.pypp.cpp | 31 +- wrapper/FF/PointRef.pypp.cpp | 4 + wrapper/FF/PotentialTable.pypp.cpp | 23 + wrapper/FF/Probe.pypp.cpp | 5 +- wrapper/FF/SingleComponent.pypp.cpp | 9 +- wrapper/FF/SireFF_properties.cpp | 10 +- wrapper/FF/SireFF_registrars.cpp | 48 +- wrapper/FF/Specify_FFID_.pypp.cpp | 8 + wrapper/FF/VectorPoint.pypp.cpp | 25 + wrapper/FF/__init__.py | 51 +- wrapper/Helpers/CMakeLists.txt | 9 +- wrapper/Helpers/clone_const_reference.hpp | 8 +- wrapper/Helpers/convertdict.hpp | 68 +- wrapper/Helpers/convertlist.hpp | 27 +- wrapper/Helpers/convertset.hpp | 31 +- wrapper/Helpers/convertsharedpointer.hpp | 3 + wrapper/Helpers/objectregistry.cpp | 46 +- wrapper/Helpers/pair.hpp | 13 +- wrapper/Helpers/release_gil_policy.cpp | 136 + wrapper/Helpers/release_gil_policy.hpp | 84 + wrapper/Helpers/tuples.hpp | 101 +- wrapper/ID/CMakeAutogenFile.txt | 4 +- wrapper/ID/CMakeLists.txt | 12 +- wrapper/ID/ID.pypp.cpp | 7 + wrapper/ID/Index.pypp.cpp | 5 + wrapper/ID/IndexBase.pypp.cpp | 7 + wrapper/ID/Name.pypp.cpp | 6 + wrapper/ID/Number.pypp.cpp | 6 + wrapper/ID/SireID_registrars.cpp | 4 +- wrapper/ID/__init__.py | 25 +- wrapper/IO/Amber.pypp.cpp | 7 + wrapper/IO/AmberPrm.pypp.cpp | 37 + wrapper/IO/AmberRst.pypp.cpp | 41 + wrapper/IO/AmberRst7.pypp.cpp | 22 + wrapper/IO/CMakeAutogenFile.txt | 52 +- wrapper/IO/CMakeLists.txt | 13 +- wrapper/IO/CharmmPSF.pypp.cpp | 31 + wrapper/IO/Cube.pypp.cpp | 2 + wrapper/IO/FlexibilityLibrary.pypp.cpp | 7 + wrapper/IO/FlexibilityTemplate.pypp.cpp | 20 + wrapper/IO/Gro87.pypp.cpp | 40 + wrapper/IO/GroAtom.pypp.cpp | 26 + wrapper/IO/GroMolType.pypp.cpp | 15 +- wrapper/IO/GroSystem.pypp.cpp | 16 + wrapper/IO/GroTop.pypp.cpp | 36 + wrapper/IO/IOBase.pypp.cpp | 4 + wrapper/IO/IOParametersBase.pypp.cpp | 2 + wrapper/IO/Mol2.pypp.cpp | 26 + wrapper/IO/MoleculeParser.pypp.cpp | 292 +- wrapper/IO/NullIO.pypp.cpp | 3 + wrapper/IO/NullParser.pypp.cpp | 8 + wrapper/IO/PDB.pypp.cpp | 4 + wrapper/IO/PDB2.pypp.cpp | 22 + wrapper/IO/PDBParameters.pypp.cpp | 2 + wrapper/IO/PerturbationsLibrary.pypp.cpp | 7 + wrapper/IO/PerturbationsTemplate.pypp.cpp | 44 + wrapper/IO/ProtoMS.pypp.cpp | 8 + wrapper/IO/ProtoMSParameters.pypp.cpp | 2 + wrapper/IO/SDF.pypp.cpp | 19 + wrapper/IO/SireIO_properties.cpp | 22 +- wrapper/IO/SireIO_registrars.cpp | 58 +- wrapper/IO/Supplementary.pypp.cpp | 12 + wrapper/IO/Tinker.pypp.cpp | 4 + wrapper/IO/TinkerParameters.pypp.cpp | 2 + wrapper/IO/TrajectoryMonitor.pypp.cpp | 7 + wrapper/IO/ZmatrixMaker.pypp.cpp | 6 + wrapper/IO/_IO.main.cpp | 4 + wrapper/IO/_IO_free_functions.pypp.cpp | 71 +- wrapper/IO/_IO_load.cpp | 156 + wrapper/IO/_IO_load.h | 6 + wrapper/IO/__init__.py | 150 +- wrapper/IO/special_code.py | 5 + wrapper/MM/AmberAngle.pypp.cpp | 10 + wrapper/MM/AmberBond.pypp.cpp | 10 + wrapper/MM/AmberDihPart.pypp.cpp | 10 + wrapper/MM/AmberDihedral.pypp.cpp | 9 + wrapper/MM/AmberNB14.pypp.cpp | 8 + wrapper/MM/AmberParams.pypp.cpp | 57 + wrapper/MM/AngleComponent.pypp.cpp | 9 +- wrapper/MM/AngleParameterName.pypp.cpp | 2 + wrapper/MM/AngleRestraint.pypp.cpp | 27 +- wrapper/MM/AngleSymbols.pypp.cpp | 4 +- wrapper/MM/AtomFunction.pypp.cpp | 2 + wrapper/MM/AtomFunctions.pypp.cpp | 3 + wrapper/MM/AtomLJs.pypp.cpp | 27 + wrapper/MM/AtomPairs_CLJScaleFactor_.pypp.cpp | 17 + .../MM/AtomPairs_CoulombScaleFactor_.pypp.cpp | 17 + wrapper/MM/AtomPairs_LJScaleFactor_.pypp.cpp | 17 + wrapper/MM/BendBendComponent.pypp.cpp | 9 +- wrapper/MM/BendBendParameterName.pypp.cpp | 2 + wrapper/MM/BendBendSymbols.pypp.cpp | 8 +- wrapper/MM/Bond.pypp.cpp | 426 +++ wrapper/MM/Bond.pypp.hpp | 10 + wrapper/MM/BondComponent.pypp.cpp | 9 +- wrapper/MM/BondParameterName.pypp.cpp | 2 + wrapper/MM/BondSymbols.pypp.cpp | 4 +- wrapper/MM/CHARMMSwitchingFunction.pypp.cpp | 8 + wrapper/MM/CLJ14Group.pypp.cpp | 30 +- wrapper/MM/CLJAtom.pypp.cpp | 12 + wrapper/MM/CLJAtoms.pypp.cpp | 36 + wrapper/MM/CLJBox.pypp.cpp | 20 + wrapper/MM/CLJBoxDistance.pypp.cpp | 8 + wrapper/MM/CLJBoxIndex.pypp.cpp | 23 + wrapper/MM/CLJBoxes.pypp.cpp | 36 + wrapper/MM/CLJCalculator.pypp.cpp | 11 + wrapper/MM/CLJComponent.pypp.cpp | 13 +- wrapper/MM/CLJCutoffFunction.pypp.cpp | 15 + wrapper/MM/CLJDelta.pypp.cpp | 20 + wrapper/MM/CLJExtractor.pypp.cpp | 31 + wrapper/MM/CLJFunction.pypp.cpp | 44 +- wrapper/MM/CLJGrid.pypp.cpp | 47 +- wrapper/MM/CLJGroup.pypp.cpp | 31 + wrapper/MM/CLJIntraFunction.pypp.cpp | 8 + wrapper/MM/CLJIntraRFFunction.pypp.cpp | 11 + wrapper/MM/CLJIntraShiftFunction.pypp.cpp | 5 + wrapper/MM/CLJNBPairs.pypp.cpp | 8 + wrapper/MM/CLJParameterNames.pypp.cpp | 2 + wrapper/MM/CLJParameterNames3D.pypp.cpp | 2 + ...ntialInterface_InterCLJPotential_.pypp.cpp | 24 +- ...lInterface_InterSoftCLJPotential_.pypp.cpp | 24 +- ...ntialInterface_IntraCLJPotential_.pypp.cpp | 24 +- ...lInterface_IntraSoftCLJPotential_.pypp.cpp | 24 +- wrapper/MM/CLJProbe.pypp.cpp | 5 + wrapper/MM/CLJRFFunction.pypp.cpp | 13 + wrapper/MM/CLJScaleFactor.pypp.cpp | 5 + wrapper/MM/CLJShiftFunction.pypp.cpp | 7 + wrapper/MM/CLJSoftFunction.pypp.cpp | 14 + wrapper/MM/CLJSoftIntraFunction.pypp.cpp | 14 + wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp | 11 + wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp | 5 + wrapper/MM/CLJSoftRFFunction.pypp.cpp | 12 + wrapper/MM/CLJSoftShiftFunction.pypp.cpp | 6 + wrapper/MM/CLJWorkspace.pypp.cpp | 24 + wrapper/MM/CMakeAutogenFile.txt | 319 +- wrapper/MM/CMakeLists.txt | 12 +- wrapper/MM/ChargeParameterName.pypp.cpp | 2 + wrapper/MM/ChargeParameterName3D.pypp.cpp | 2 + wrapper/MM/CoulombComponent.pypp.cpp | 9 +- wrapper/MM/CoulombNBPairs.pypp.cpp | 3 + ...lInterface_InterCoulombPotential_.pypp.cpp | 15 +- ...lInterface_IntraCoulombPotential_.pypp.cpp | 15 +- wrapper/MM/CoulombProbe.pypp.cpp | 5 + wrapper/MM/CoulombScaleFactor.pypp.cpp | 5 + wrapper/MM/DihedralComponent.pypp.cpp | 9 +- wrapper/MM/DihedralParameterName.pypp.cpp | 2 + wrapper/MM/DihedralRestraint.pypp.cpp | 29 +- wrapper/MM/DihedralSymbols.pypp.cpp | 4 +- wrapper/MM/DistanceRestraint.pypp.cpp | 25 +- wrapper/MM/DoubleDistanceRestraint.pypp.cpp | 29 +- wrapper/MM/FourAtomFunction.pypp.cpp | 11 +- wrapper/MM/FourAtomFunctions.pypp.cpp | 28 + wrapper/MM/FourAtomPerturbation.pypp.cpp | 16 +- wrapper/MM/GridFF.pypp.cpp | 17 + wrapper/MM/GridFF2.pypp.cpp | 17 + wrapper/MM/GromacsAngle.pypp.cpp | 24 + wrapper/MM/GromacsAtomType.pypp.cpp | 17 + wrapper/MM/GromacsBond.pypp.cpp | 20 + wrapper/MM/GromacsDihedral.pypp.cpp | 24 + wrapper/MM/GroupInternalParameters.pypp.cpp | 20 + wrapper/MM/HarmonicSwitchingFunction.pypp.cpp | 8 + wrapper/MM/ImproperComponent.pypp.cpp | 9 +- wrapper/MM/ImproperParameterName.pypp.cpp | 2 + wrapper/MM/ImproperSymbols.pypp.cpp | 6 +- wrapper/MM/InterCLJFF.pypp.cpp | 7 + wrapper/MM/InterCLJFFBase.pypp.cpp | 11 +- wrapper/MM/InterCoulombFF.pypp.cpp | 7 + wrapper/MM/InterCoulombFFBase.pypp.cpp | 11 +- wrapper/MM/InterFF.pypp.cpp | 45 +- wrapper/MM/InterGroupCLJFF.pypp.cpp | 6 + wrapper/MM/InterGroupCLJFFBase.pypp.cpp | 11 +- wrapper/MM/InterGroupCoulombFF.pypp.cpp | 6 + wrapper/MM/InterGroupCoulombFFBase.pypp.cpp | 11 +- wrapper/MM/InterGroupFF.pypp.cpp | 45 +- wrapper/MM/InterGroupLJFF.pypp.cpp | 6 + wrapper/MM/InterGroupLJFFBase.pypp.cpp | 11 +- wrapper/MM/InterGroupSoftCLJFF.pypp.cpp | 6 + wrapper/MM/InterGroupSoftCLJFFBase.pypp.cpp | 11 +- wrapper/MM/InterLJFF.pypp.cpp | 7 + wrapper/MM/InterLJFFBase.pypp.cpp | 11 +- wrapper/MM/InterSoftCLJFF.pypp.cpp | 7 + wrapper/MM/InterSoftCLJFFBase.pypp.cpp | 11 +- wrapper/MM/InternalComponent.pypp.cpp | 33 +- wrapper/MM/InternalFF.pypp.cpp | 24 +- wrapper/MM/InternalParameterNames.pypp.cpp | 2 + wrapper/MM/InternalParameterNames3D.pypp.cpp | 2 + wrapper/MM/InternalParameters.pypp.cpp | 23 + wrapper/MM/InternalParameters3D.pypp.cpp | 10 + wrapper/MM/InternalPerturbation.pypp.cpp | 8 + wrapper/MM/InternalSymbols.pypp.cpp | 2 + wrapper/MM/InternalSymbolsBase.pypp.cpp | 2 + wrapper/MM/Intra14Component.pypp.cpp | 13 +- wrapper/MM/Intra14CoulombComponent.pypp.cpp | 9 +- wrapper/MM/Intra14LJComponent.pypp.cpp | 9 +- wrapper/MM/IntraCLJFF.pypp.cpp | 6 + wrapper/MM/IntraCLJFFBase.pypp.cpp | 11 +- wrapper/MM/IntraCoulombFF.pypp.cpp | 6 + wrapper/MM/IntraCoulombFFBase.pypp.cpp | 11 +- wrapper/MM/IntraFF.pypp.cpp | 28 +- wrapper/MM/IntraGroupCLJFF.pypp.cpp | 6 + wrapper/MM/IntraGroupCLJFFBase.pypp.cpp | 11 +- wrapper/MM/IntraGroupCoulombFF.pypp.cpp | 6 + wrapper/MM/IntraGroupCoulombFFBase.pypp.cpp | 11 +- wrapper/MM/IntraGroupFF.pypp.cpp | 28 +- wrapper/MM/IntraGroupLJFF.pypp.cpp | 6 + wrapper/MM/IntraGroupLJFFBase.pypp.cpp | 11 +- wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp | 6 + wrapper/MM/IntraGroupSoftCLJFFBase.pypp.cpp | 11 +- wrapper/MM/IntraLJFF.pypp.cpp | 6 + wrapper/MM/IntraLJFFBase.pypp.cpp | 11 +- wrapper/MM/IntraSoftCLJFF.pypp.cpp | 6 + wrapper/MM/IntraSoftCLJFFBase.pypp.cpp | 11 +- wrapper/MM/LJComponent.pypp.cpp | 9 +- wrapper/MM/LJNBPairs.pypp.cpp | 3 + wrapper/MM/LJParameter.pypp.cpp | 21 + wrapper/MM/LJParameterName.pypp.cpp | 2 + wrapper/MM/LJParameterName3D.pypp.cpp | 2 + wrapper/MM/LJPerturbation.pypp.cpp | 14 + ...entialInterface_InterLJPotential_.pypp.cpp | 14 +- ...entialInterface_IntraLJPotential_.pypp.cpp | 14 +- wrapper/MM/LJProbe.pypp.cpp | 3 + wrapper/MM/LJScaleFactor.pypp.cpp | 5 + wrapper/MM/MMDetail.pypp.cpp | 25 + wrapper/MM/Mover_Bond_.pypp.cpp | 515 +++ wrapper/MM/Mover_Bond_.pypp.hpp | 10 + wrapper/MM/Mover_SelectorBond_.pypp.cpp | 513 +++ wrapper/MM/Mover_SelectorBond_.pypp.hpp | 10 + wrapper/MM/MultiCLJComponent.pypp.cpp | 30 +- wrapper/MM/NoCutoff.pypp.cpp | 8 + wrapper/MM/NullCLJFunction.pypp.cpp | 4 + wrapper/MM/NullRestraint.pypp.cpp | 22 + wrapper/MM/Restraint.pypp.cpp | 21 + wrapper/MM/Restraint3D.pypp.cpp | 8 +- wrapper/MM/RestraintComponent.pypp.cpp | 9 +- wrapper/MM/RestraintFF.pypp.cpp | 29 +- wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp | 2 + .../MM/ScaledChargeParameterNames3D.pypp.cpp | 2 + wrapper/MM/ScaledLJParameterNames3D.pypp.cpp | 2 + wrapper/MM/SelectorBond.pypp.cpp | 650 ++++ wrapper/MM/SelectorBond.pypp.hpp | 10 + wrapper/MM/SelectorMBond.pypp.cpp | 1078 ++++++ wrapper/MM/SelectorMBond.pypp.hpp | 10 + wrapper/MM/SireMM_properties.cpp | 22 +- wrapper/MM/SireMM_registrars.cpp | 286 +- wrapper/MM/SoftCLJComponent.pypp.cpp | 22 +- ...lInterface_InterSoftCLJPotential_.pypp.cpp | 16 + ...lInterface_IntraSoftCLJPotential_.pypp.cpp | 16 + wrapper/MM/StretchBendComponent.pypp.cpp | 9 +- wrapper/MM/StretchBendParameterName.pypp.cpp | 2 + wrapper/MM/StretchBendSymbols.pypp.cpp | 10 +- .../MM/StretchBendTorsionComponent.pypp.cpp | 9 +- .../StretchBendTorsionParameterName.pypp.cpp | 2 + wrapper/MM/StretchBendTorsionSymbols.pypp.cpp | 16 +- wrapper/MM/StretchStretchComponent.pypp.cpp | 9 +- .../MM/StretchStretchParameterName.pypp.cpp | 2 + wrapper/MM/StretchStretchSymbols.pypp.cpp | 8 +- wrapper/MM/SwitchingFunction.pypp.cpp | 14 + wrapper/MM/TestFF.pypp.cpp | 6 + wrapper/MM/ThreeAtomFunction.pypp.cpp | 9 +- wrapper/MM/ThreeAtomFunctions.pypp.cpp | 24 + wrapper/MM/ThreeAtomPerturbation.pypp.cpp | 14 +- wrapper/MM/TripleDistanceRestraint.pypp.cpp | 35 +- wrapper/MM/TwoAtomFunction.pypp.cpp | 7 +- wrapper/MM/TwoAtomFunctions.pypp.cpp | 24 + wrapper/MM/TwoAtomPerturbation.pypp.cpp | 12 +- wrapper/MM/UreyBradleyComponent.pypp.cpp | 9 +- wrapper/MM/UreyBradleyParameterName.pypp.cpp | 2 + wrapper/MM/_MM.main.cpp | 22 +- wrapper/MM/__init__.py | 187 +- wrapper/MM/active_headers.h | 3 + wrapper/MM/special_code.py | 24 +- wrapper/Maths/Accumulator.pypp.cpp | 8 + wrapper/Maths/Array2D_Matrix_.pypp.cpp | 7 + wrapper/Maths/Array2D_NMatrix_.pypp.cpp | 7 + ...Array2D_SireMaths_AccumulatorPtr_.pypp.cpp | 7 + wrapper/Maths/Array2D_Vector_.pypp.cpp | 7 + wrapper/Maths/ArrayProperty_Vector_.pypp.cpp | 32 + wrapper/Maths/Average.pypp.cpp | 7 + wrapper/Maths/AverageAndStddev.pypp.cpp | 11 + wrapper/Maths/AxisSet.pypp.cpp | 12 + .../Maths/BennettsFreeEnergyAverage.pypp.cpp | 11 + wrapper/Maths/CMakeAutogenFile.txt | 74 +- wrapper/Maths/CMakeLists.txt | 12 +- wrapper/Maths/Complex.pypp.cpp | 23 + wrapper/Maths/DistVector.pypp.cpp | 42 + wrapper/Maths/ExpAverage.pypp.cpp | 8 + wrapper/Maths/FreeEnergyAverage.pypp.cpp | 15 +- wrapper/Maths/Histogram.pypp.cpp | 36 + wrapper/Maths/HistogramBin.pypp.cpp | 6 + wrapper/Maths/HistogramValue.pypp.cpp | 4 + wrapper/Maths/Line.pypp.cpp | 8 + wrapper/Maths/Matrix.pypp.cpp | 37 + wrapper/Maths/Median.pypp.cpp | 11 + wrapper/Maths/MultiDouble.pypp.cpp | 42 + wrapper/Maths/MultiFixed.pypp.cpp | 30 + wrapper/Maths/MultiFloat.pypp.cpp | 59 + wrapper/Maths/MultiInt.pypp.cpp | 39 + wrapper/Maths/MultiUInt.pypp.cpp | 39 + wrapper/Maths/MultiVector.pypp.cpp | 50 + wrapper/Maths/N4Matrix.pypp.cpp | 28 + wrapper/Maths/NMatrix.pypp.cpp | 43 + wrapper/Maths/NVector.pypp.cpp | 24 + wrapper/Maths/NullAccumulator.pypp.cpp | 4 + wrapper/Maths/Plane.pypp.cpp | 9 + wrapper/Maths/Quaternion.pypp.cpp | 22 + wrapper/Maths/RanGenerator.pypp.cpp | 53 + wrapper/Maths/Rational.pypp.cpp | 5 + wrapper/Maths/RecordValues.pypp.cpp | 21 + wrapper/Maths/SireMaths_registrars.cpp | 56 +- wrapper/Maths/Sphere.pypp.cpp | 18 + wrapper/Maths/Torsion.pypp.cpp | 14 + wrapper/Maths/Transform.pypp.cpp | 13 + wrapper/Maths/Triangle.pypp.cpp | 17 + wrapper/Maths/TrigArray2D_Matrix_.pypp.cpp | 7 + wrapper/Maths/TrigArray2D_Vector_.pypp.cpp | 7 + wrapper/Maths/TrigMatrix.pypp.cpp | 35 + wrapper/Maths/Vector.pypp.cpp | 52 + wrapper/Maths/VectorArrayProperty.pypp.cpp | 3 + wrapper/Maths/VectorProperty.pypp.cpp | 6 + wrapper/Maths/_Maths_free_functions.pypp.cpp | 13 + wrapper/Maths/__init__.py | 92 +- wrapper/Mol/AbsFromMass.pypp.cpp | 5 + wrapper/Mol/AbsFromNumber.pypp.cpp | 5 + wrapper/Mol/AmberParameters.pypp.cpp | 24 + wrapper/Mol/AngleID.pypp.cpp | 19 +- wrapper/Mol/AnglePerturbation.pypp.cpp | 9 +- wrapper/Mol/Atom.pypp.cpp | 211 +- wrapper/Mol/AtomBeads.pypp.cpp | 33 +- wrapper/Mol/AtomCharges.pypp.cpp | 27 + wrapper/Mol/AtomCoords.pypp.cpp | 35 + wrapper/Mol/AtomCutting.pypp.cpp | 3 + wrapper/Mol/AtomDoubleArrayProperty.pypp.cpp | 27 + wrapper/Mol/AtomEditor.pypp.cpp | 13 + wrapper/Mol/AtomEditorBase.pypp.cpp | 460 ++- wrapper/Mol/AtomElements.pypp.cpp | 27 + wrapper/Mol/AtomEnergies.pypp.cpp | 27 + wrapper/Mol/AtomFloatProperty.pypp.cpp | 27 + wrapper/Mol/AtomForces.pypp.cpp | 33 +- wrapper/Mol/AtomID.pypp.cpp | 25 + wrapper/Mol/AtomIDMatcher.pypp.cpp | 8 + wrapper/Mol/AtomIdx.pypp.cpp | 9 + wrapper/Mol/AtomIdxMatcher.pypp.cpp | 7 + wrapper/Mol/AtomIntProperty.pypp.cpp | 27 + wrapper/Mol/AtomIntegerArrayProperty.pypp.cpp | 27 + wrapper/Mol/AtomMCSMatcher.pypp.cpp | 12 +- wrapper/Mol/AtomMasses.pypp.cpp | 27 + wrapper/Mol/AtomMatchInverter.pypp.cpp | 8 + wrapper/Mol/AtomMatcher.pypp.cpp | 15 + wrapper/Mol/AtomMultiMatcher.pypp.cpp | 8 + wrapper/Mol/AtomName.pypp.cpp | 8 + wrapper/Mol/AtomNameMatcher.pypp.cpp | 7 + wrapper/Mol/AtomNum.pypp.cpp | 8 + wrapper/Mol/AtomPolarisabilities.pypp.cpp | 27 + wrapper/Mol/AtomProp.pypp.cpp | 11 + wrapper/Mol/AtomPropertyList.pypp.cpp | 27 + wrapper/Mol/AtomRadicals.pypp.cpp | 27 + wrapper/Mol/AtomRadii.pypp.cpp | 27 + wrapper/Mol/AtomResultMatcher.pypp.cpp | 8 + wrapper/Mol/AtomSelection.pypp.cpp | 175 + wrapper/Mol/AtomStringArrayProperty.pypp.cpp | 27 + wrapper/Mol/AtomStringProperty.pypp.cpp | 27 + wrapper/Mol/AtomStructureEditor.pypp.cpp | 17 +- wrapper/Mol/AtomVariantProperty.pypp.cpp | 27 + wrapper/Mol/AtomVelocities.pypp.cpp | 33 +- wrapper/Mol/AtomsIn_CGID_.pypp.cpp | 8 + wrapper/Mol/AtomsIn_ChainID_.pypp.cpp | 8 + wrapper/Mol/AtomsIn_ResID_.pypp.cpp | 8 + wrapper/Mol/AtomsIn_SegID_.pypp.cpp | 8 + wrapper/Mol/Bead.pypp.cpp | 57 +- wrapper/Mol/BeadEditor.pypp.cpp | 19 + wrapper/Mol/BeadEditorBase.pypp.cpp | 256 ++ wrapper/Mol/BeadFloatProperty.pypp.cpp | 14 + wrapper/Mol/BeadID.pypp.cpp | 3 + wrapper/Mol/BeadIdx.pypp.cpp | 8 + wrapper/Mol/BeadIntProperty.pypp.cpp | 14 + wrapper/Mol/BeadNum.pypp.cpp | 7 + wrapper/Mol/BeadProp.pypp.cpp | 9 +- wrapper/Mol/BeadStringProperty.pypp.cpp | 14 + wrapper/Mol/BeadVariantProperty.pypp.cpp | 14 + wrapper/Mol/Beading.pypp.cpp | 5 + wrapper/Mol/Beads.pypp.cpp | 43 +- wrapper/Mol/BondHunter.pypp.cpp | 3 + wrapper/Mol/BondID.pypp.cpp | 17 +- wrapper/Mol/BondPerturbation.pypp.cpp | 9 +- wrapper/Mol/BondType.pypp.cpp | 16 + wrapper/Mol/CGAtomID.pypp.cpp | 8 + wrapper/Mol/CGAtomIdx.pypp.cpp | 11 + wrapper/Mol/CGChainID.pypp.cpp | 8 + wrapper/Mol/CGEditor.pypp.cpp | 14 + wrapper/Mol/CGEditorBase.pypp.cpp | 242 ++ wrapper/Mol/CGFloatProperty.pypp.cpp | 42 + wrapper/Mol/CGID.pypp.cpp | 24 + wrapper/Mol/CGIdx.pypp.cpp | 9 + wrapper/Mol/CGIntProperty.pypp.cpp | 42 + wrapper/Mol/CGName.pypp.cpp | 8 + wrapper/Mol/CGProp.pypp.cpp | 32 + wrapper/Mol/CGResID.pypp.cpp | 8 + wrapper/Mol/CGStringProperty.pypp.cpp | 42 + wrapper/Mol/CGStructureEditor.pypp.cpp | 18 +- wrapper/Mol/CGVariantProperty.pypp.cpp | 42 + wrapper/Mol/CGsWithAtoms.pypp.cpp | 10 +- wrapper/Mol/CMakeAutogenFile.txt | 459 +-- wrapper/Mol/CMakeLists.txt | 12 +- wrapper/Mol/Chain.pypp.cpp | 130 + wrapper/Mol/ChainAtomID.pypp.cpp | 8 + wrapper/Mol/ChainEditor.pypp.cpp | 15 + wrapper/Mol/ChainEditorBase.pypp.cpp | 242 ++ wrapper/Mol/ChainFloatProperty.pypp.cpp | 42 + wrapper/Mol/ChainID.pypp.cpp | 27 + wrapper/Mol/ChainIdx.pypp.cpp | 9 + wrapper/Mol/ChainIntProperty.pypp.cpp | 42 + wrapper/Mol/ChainName.pypp.cpp | 8 + wrapper/Mol/ChainProp.pypp.cpp | 32 + wrapper/Mol/ChainResID.pypp.cpp | 8 + wrapper/Mol/ChainStringProperty.pypp.cpp | 42 + wrapper/Mol/ChainStructureEditor.pypp.cpp | 21 +- wrapper/Mol/ChainVariantProperty.pypp.cpp | 42 + wrapper/Mol/ChainsWithAtoms.pypp.cpp | 10 +- wrapper/Mol/ChainsWithRes.pypp.cpp | 10 +- wrapper/Mol/ChargePerturbation.pypp.cpp | 8 + wrapper/Mol/ChemicalBondHunter.pypp.cpp | 3 + wrapper/Mol/Connectivity.pypp.cpp | 4 + wrapper/Mol/ConnectivityBase.pypp.cpp | 87 +- wrapper/Mol/ConnectivityEditor.pypp.cpp | 5 + wrapper/Mol/CovalentBondHunter.pypp.cpp | 3 + .../Mol/CovalentBondHunterParameters.pypp.cpp | 2 + wrapper/Mol/CutGroup.pypp.cpp | 78 +- wrapper/Mol/CuttingFunction.pypp.cpp | 5 + wrapper/Mol/DihedralID.pypp.cpp | 20 +- wrapper/Mol/DihedralPerturbation.pypp.cpp | 9 +- wrapper/Mol/Element.pypp.cpp | 29 + wrapper/Mol/Evaluator.pypp.cpp | 30 + wrapper/Mol/EvaluatorM.pypp.cpp | 386 ++ wrapper/Mol/EvaluatorM.pypp.hpp | 10 + wrapper/Mol/Force3D.pypp.cpp | 7 + wrapper/Mol/GeometryPerturbation.pypp.cpp | 6 + wrapper/Mol/GeometryPerturbations.pypp.cpp | 16 + wrapper/Mol/GroupAtomIDBase.pypp.cpp | 2 + wrapper/Mol/IDAndSet_AtomID_.pypp.cpp | 8 + wrapper/Mol/IDAndSet_CGID_.pypp.cpp | 8 + wrapper/Mol/IDAndSet_ChainID_.pypp.cpp | 8 + wrapper/Mol/IDAndSet_MGID_.pypp.cpp | 8 + wrapper/Mol/IDAndSet_MolID_.pypp.cpp | 10 + wrapper/Mol/IDAndSet_ResID_.pypp.cpp | 8 + wrapper/Mol/IDAndSet_SegID_.pypp.cpp | 8 + wrapper/Mol/IDOrSet_AtomID_.pypp.cpp | 8 + wrapper/Mol/IDOrSet_CGID_.pypp.cpp | 8 + wrapper/Mol/IDOrSet_ChainID_.pypp.cpp | 8 + wrapper/Mol/IDOrSet_MGID_.pypp.cpp | 8 + wrapper/Mol/IDOrSet_MolID_.pypp.cpp | 10 + wrapper/Mol/IDOrSet_ResID_.pypp.cpp | 8 + wrapper/Mol/IDOrSet_SegID_.pypp.cpp | 8 + wrapper/Mol/ImproperID.pypp.cpp | 20 +- wrapper/Mol/InvertMatch_AtomID_.pypp.cpp | 8 + wrapper/Mol/InvertMatch_CGID_.pypp.cpp | 8 + wrapper/Mol/InvertMatch_ChainID_.pypp.cpp | 8 + wrapper/Mol/InvertMatch_ResID_.pypp.cpp | 8 + wrapper/Mol/InvertMatch_SegID_.pypp.cpp | 8 + wrapper/Mol/MGID.pypp.cpp | 4 + wrapper/Mol/MGIDsAndMaps.pypp.cpp | 6 + wrapper/Mol/MGIdx.pypp.cpp | 9 + wrapper/Mol/MGName.pypp.cpp | 8 + wrapper/Mol/MGNum.pypp.cpp | 9 + wrapper/Mol/MatchAll_AtomID_.pypp.cpp | 8 + wrapper/Mol/MatchAll_CGID_.pypp.cpp | 8 + wrapper/Mol/MatchAll_ChainID_.pypp.cpp | 8 + wrapper/Mol/MatchAll_ResID_.pypp.cpp | 8 + wrapper/Mol/MatchAll_SegID_.pypp.cpp | 8 + wrapper/Mol/MolAtomID.pypp.cpp | 12 +- wrapper/Mol/MolEditor.pypp.cpp | 22 + wrapper/Mol/MolEditorBase.pypp.cpp | 242 ++ wrapper/Mol/MolGroupsBase.pypp.cpp | 248 +- wrapper/Mol/MolID.pypp.cpp | 6 + wrapper/Mol/MolIdx.pypp.cpp | 11 + wrapper/Mol/MolInfo.pypp.cpp | 116 + wrapper/Mol/MolName.pypp.cpp | 10 + wrapper/Mol/MolNum.pypp.cpp | 11 + wrapper/Mol/MolResID.pypp.cpp | 12 +- wrapper/Mol/MolResNum.pypp.cpp | 12 +- wrapper/Mol/MolStructureEditor.pypp.cpp | 32 +- wrapper/Mol/MolViewProperty.pypp.cpp | 13 + wrapper/Mol/MolWithResID.pypp.cpp | 12 +- wrapper/Mol/Molecule.pypp.cpp | 116 +- wrapper/Mol/MoleculeBeading.pypp.cpp | 3 + wrapper/Mol/MoleculeGroup.pypp.cpp | 136 +- wrapper/Mol/MoleculeGroups.pypp.cpp | 36 +- wrapper/Mol/MoleculeInfo.pypp.cpp | 390 +- wrapper/Mol/MoleculeProperty.pypp.cpp | 3 + wrapper/Mol/MoleculeView.pypp.cpp | 515 ++- wrapper/Mol/Molecules.pypp.cpp | 45 + wrapper/Mol/MoverBase.pypp.cpp | 2 + wrapper/Mol/Mover_Atom_.pypp.cpp | 5 + wrapper/Mol/Mover_Bead_.pypp.cpp | 19 + wrapper/Mol/Mover_Beads_.pypp.cpp | 7 + wrapper/Mol/Mover_Chain_.pypp.cpp | 5 + wrapper/Mol/Mover_CutGroup_.pypp.cpp | 5 + wrapper/Mol/Mover_Molecule_.pypp.cpp | 7 + wrapper/Mol/Mover_PartialMolecule_.pypp.cpp | 5 + wrapper/Mol/Mover_Residue_.pypp.cpp | 5 + wrapper/Mol/Mover_Segment_.pypp.cpp | 5 + wrapper/Mol/Mover_Selector_Atom_.pypp.cpp | 5 + wrapper/Mol/Mover_Selector_Chain_.pypp.cpp | 5 + wrapper/Mol/Mover_Selector_CutGroup_.pypp.cpp | 5 + wrapper/Mol/Mover_Selector_Residue_.pypp.cpp | 5 + wrapper/Mol/Mover_Selector_Segment_.pypp.cpp | 5 + wrapper/Mol/NullBeading.pypp.cpp | 3 + wrapper/Mol/NullBondHunter.pypp.cpp | 4 + wrapper/Mol/NullGeometryPerturbation.pypp.cpp | 9 + wrapper/Mol/NullPerturbation.pypp.cpp | 8 + wrapper/Mol/PartialMolecule.pypp.cpp | 45 +- wrapper/Mol/Perturbation.pypp.cpp | 16 + wrapper/Mol/PerturbationSymbols.pypp.cpp | 10 +- wrapper/Mol/Perturbations.pypp.cpp | 16 + wrapper/Mol/Radical.pypp.cpp | 14 + wrapper/Mol/RelFromMass.pypp.cpp | 5 + wrapper/Mol/RelFromNumber.pypp.cpp | 5 + wrapper/Mol/ResAtomID.pypp.cpp | 8 + wrapper/Mol/ResEditor.pypp.cpp | 15 + wrapper/Mol/ResEditorBase.pypp.cpp | 242 ++ wrapper/Mol/ResFloatProperty.pypp.cpp | 42 + wrapper/Mol/ResID.pypp.cpp | 25 + wrapper/Mol/ResIdx.pypp.cpp | 9 + wrapper/Mol/ResIdxAtomCoordMatcher.pypp.cpp | 7 + wrapper/Mol/ResIdxAtomMCSMatcher.pypp.cpp | 12 +- wrapper/Mol/ResIdxAtomNameMatcher.pypp.cpp | 7 + wrapper/Mol/ResIn_ChainID_.pypp.cpp | 8 + wrapper/Mol/ResIntProperty.pypp.cpp | 42 + wrapper/Mol/ResName.pypp.cpp | 8 + wrapper/Mol/ResNum.pypp.cpp | 8 + wrapper/Mol/ResNumAtomNameMatcher.pypp.cpp | 7 + wrapper/Mol/ResProp.pypp.cpp | 32 + wrapper/Mol/ResStringProperty.pypp.cpp | 42 + wrapper/Mol/ResStructureEditor.pypp.cpp | 20 +- wrapper/Mol/ResVariantProperty.pypp.cpp | 42 + wrapper/Mol/ResWithAtoms.pypp.cpp | 10 +- wrapper/Mol/Residue.pypp.cpp | 67 + wrapper/Mol/ResidueBeading.pypp.cpp | 3 + wrapper/Mol/ResidueCutting.pypp.cpp | 3 + wrapper/Mol/SegAtomID.pypp.cpp | 8 + wrapper/Mol/SegCGID.pypp.cpp | 8 + wrapper/Mol/SegChainID.pypp.cpp | 8 + wrapper/Mol/SegEditor.pypp.cpp | 14 + wrapper/Mol/SegEditorBase.pypp.cpp | 242 ++ wrapper/Mol/SegFloatProperty.pypp.cpp | 42 + wrapper/Mol/SegID.pypp.cpp | 24 + wrapper/Mol/SegIdx.pypp.cpp | 9 + wrapper/Mol/SegIntProperty.pypp.cpp | 42 + wrapper/Mol/SegName.pypp.cpp | 8 + wrapper/Mol/SegProp.pypp.cpp | 32 + wrapper/Mol/SegResID.pypp.cpp | 8 + wrapper/Mol/SegStringProperty.pypp.cpp | 42 + wrapper/Mol/SegStructureEditor.pypp.cpp | 18 +- wrapper/Mol/SegVariantProperty.pypp.cpp | 42 + wrapper/Mol/Segment.pypp.cpp | 78 +- wrapper/Mol/SegsWithAtoms.pypp.cpp | 10 +- wrapper/Mol/Select.pypp.cpp | 10 + wrapper/Mol/SelectResult.pypp.cpp | 97 +- wrapper/Mol/SelectResultMover.pypp.cpp | 8 + wrapper/Mol/SelectorM_Atom_.pypp.cpp | 1225 ++++++ wrapper/Mol/SelectorM_Atom_.pypp.hpp | 10 + wrapper/Mol/SelectorM_Chain_.pypp.cpp | 1225 ++++++ wrapper/Mol/SelectorM_Chain_.pypp.hpp | 10 + wrapper/Mol/SelectorM_CutGroup_.pypp.cpp | 1225 ++++++ wrapper/Mol/SelectorM_CutGroup_.pypp.hpp | 10 + wrapper/Mol/SelectorM_Residue_.pypp.cpp | 1225 ++++++ wrapper/Mol/SelectorM_Residue_.pypp.hpp | 10 + wrapper/Mol/SelectorM_Segment_.pypp.cpp | 1225 ++++++ wrapper/Mol/SelectorM_Segment_.pypp.hpp | 10 + wrapper/Mol/SelectorMol.pypp.cpp | 1256 ++++++ wrapper/Mol/SelectorMol.pypp.hpp | 10 + wrapper/Mol/Selector_Atom_.pypp.cpp | 270 ++ wrapper/Mol/Selector_Chain_.pypp.cpp | 270 ++ wrapper/Mol/Selector_CutGroup_.pypp.cpp | 270 ++ wrapper/Mol/Selector_Residue_.pypp.cpp | 270 ++ wrapper/Mol/Selector_Segment_.pypp.cpp | 270 ++ wrapper/Mol/SireMol_containers.cpp | 16 +- wrapper/Mol/SireMol_properties.cpp | 131 +- wrapper/Mol/SireMol_registrars.cpp | 512 +-- wrapper/Mol/SpecifyMol.pypp.cpp | 10 + wrapper/Mol/Specify_AtomID_.pypp.cpp | 8 + wrapper/Mol/Specify_CGID_.pypp.cpp | 8 + wrapper/Mol/Specify_ChainID_.pypp.cpp | 8 + wrapper/Mol/Specify_MGID_.pypp.cpp | 8 + wrapper/Mol/Specify_ResID_.pypp.cpp | 8 + wrapper/Mol/Specify_SegID_.pypp.cpp | 8 + wrapper/Mol/Stereoscopy.pypp.cpp | 14 + wrapper/Mol/UserBeading.pypp.cpp | 6 +- wrapper/Mol/Velocity3D.pypp.cpp | 7 + wrapper/Mol/VolumeMap.pypp.cpp | 25 + wrapper/Mol/WeightFunction.pypp.cpp | 7 +- wrapper/Mol/Within.pypp.cpp | 9 + wrapper/Mol/_Mol.main.cpp | 28 + wrapper/Mol/__init__.py | 282 +- wrapper/Mol/active_headers.h | 3 +- wrapper/Mol/convertviewsofmol.hpp | 63 +- wrapper/Move/CMakeAutogenFile.txt | 130 +- wrapper/Move/CMakeLists.txt | 5 +- wrapper/Move/CMakeOpenMMFile.txt | 1 - wrapper/Move/DLMRigidBody.pypp.cpp | 7 + wrapper/Move/DofID.pypp.cpp | 11 + wrapper/Move/Dynamics.pypp.cpp | 4 + wrapper/Move/Ensemble.pypp.cpp | 37 + wrapper/Move/Flexibility.pypp.cpp | 33 + wrapper/Move/GetCOGPoint.pypp.cpp | 5 +- wrapper/Move/GetCOMPoint.pypp.cpp | 5 +- wrapper/Move/GetCentroidPoint.pypp.cpp | 5 +- wrapper/Move/GetPoint.pypp.cpp | 4 + wrapper/Move/HMCGenerator.pypp.cpp | 5 + wrapper/Move/HMCVelGen.pypp.cpp | 7 + wrapper/Move/HybridMC.pypp.cpp | 14 +- wrapper/Move/Integrator.pypp.cpp | 7 + wrapper/Move/InternalMove.pypp.cpp | 17 +- wrapper/Move/InternalMoveSingle.pypp.cpp | 17 +- wrapper/Move/MTSMC.pypp.cpp | 20 +- wrapper/Move/MaxwellBoltzmann.pypp.cpp | 6 + wrapper/Move/MolDeleter.pypp.cpp | 5 + wrapper/Move/MolInserter.pypp.cpp | 9 + wrapper/Move/MolecularDynamics.pypp.cpp | 32 +- wrapper/Move/MonteCarlo.pypp.cpp | 15 + wrapper/Move/Move.pypp.cpp | 37 +- wrapper/Move/Moves.pypp.cpp | 44 +- .../Move/NoOpenMM/OpenMMFrEnergyDT.pypp.cpp | 10 +- .../Move/NoOpenMM/OpenMMFrEnergyST.pypp.cpp | 10 +- .../Move/NoOpenMM/OpenMMMDIntegrator.pypp.cpp | 2 + wrapper/Move/NullDeleter.pypp.cpp | 5 + wrapper/Move/NullGetPoint.pypp.cpp | 3 + wrapper/Move/NullInserter.pypp.cpp | 7 + wrapper/Move/NullIntegrator.pypp.cpp | 7 + wrapper/Move/NullMove.pypp.cpp | 11 + wrapper/Move/NullSupraMove.pypp.cpp | 4 + wrapper/Move/NullSupraSubMove.pypp.cpp | 5 + wrapper/Move/NullVelocityGenerator.pypp.cpp | 3 + wrapper/Move/NullVolumeChanger.pypp.cpp | 3 + wrapper/Move/OpenMMFrEnergyDT.pypp.cpp | 51 + wrapper/Move/OpenMMFrEnergyST.pypp.cpp | 75 + wrapper/Move/OpenMMMDIntegrator.pypp.cpp | 59 + wrapper/Move/OpenMMPMEFEP.pypp.cpp | 78 +- wrapper/Move/PrefSampler.pypp.cpp | 24 +- wrapper/Move/RBWorkspaceJM.pypp.cpp | 26 + wrapper/Move/RepExMove.pypp.cpp | 14 + wrapper/Move/RepExMove2.pypp.cpp | 14 + wrapper/Move/RepExSubMove.pypp.cpp | 9 + wrapper/Move/Replica.pypp.cpp | 24 +- wrapper/Move/Replicas.pypp.cpp | 34 + wrapper/Move/RigidBodyMC.pypp.cpp | 46 +- wrapper/Move/SameMoves.pypp.cpp | 13 +- wrapper/Move/SameSupraMoves.pypp.cpp | 7 + wrapper/Move/SameSupraSubMoves.pypp.cpp | 9 +- wrapper/Move/Sampler.pypp.cpp | 15 +- wrapper/Move/ScaleVolumeFromCenter.pypp.cpp | 6 +- wrapper/Move/SimPacket.pypp.cpp | 14 + wrapper/Move/SimStore.pypp.cpp | 17 +- wrapper/Move/Simulation.pypp.cpp | 24 + wrapper/Move/SireMove_properties.cpp | 152 +- wrapper/Move/SireMove_registrars.cpp | 176 +- wrapper/Move/SpecifiedGroupsDeleter.pypp.cpp | 15 +- wrapper/Move/SupraMove.pypp.cpp | 6 + wrapper/Move/SupraMoves.pypp.cpp | 12 +- wrapper/Move/SupraSim.pypp.cpp | 24 + wrapper/Move/SupraSimPacket.pypp.cpp | 14 +- wrapper/Move/SupraSubMove.pypp.cpp | 5 + wrapper/Move/SupraSubMoves.pypp.cpp | 12 +- wrapper/Move/SupraSubSim.pypp.cpp | 24 + wrapper/Move/SupraSubSimPacket.pypp.cpp | 14 +- wrapper/Move/SupraSubSystem.pypp.cpp | 24 +- wrapper/Move/SupraSystem.pypp.cpp | 53 +- wrapper/Move/SystemWideDeleter.pypp.cpp | 12 +- wrapper/Move/TitrationMove.pypp.cpp | 5 + wrapper/Move/Titrator.pypp.cpp | 20 + wrapper/Move/UniformInserter.pypp.cpp | 7 + wrapper/Move/UniformSampler.pypp.cpp | 7 + wrapper/Move/VelocitiesFromProperty.pypp.cpp | 3 + wrapper/Move/VelocityGenerator.pypp.cpp | 4 + wrapper/Move/VelocityVerlet.pypp.cpp | 9 + wrapper/Move/VolumeChanger.pypp.cpp | 8 +- wrapper/Move/VolumeMove.pypp.cpp | 12 +- wrapper/Move/WeightedMoves.pypp.cpp | 16 +- wrapper/Move/ZMatMove.pypp.cpp | 22 +- wrapper/Move/ZMatrix.pypp.cpp | 46 + wrapper/Move/ZMatrixCoords.pypp.cpp | 78 +- wrapper/Move/ZMatrixCoordsLine.pypp.cpp | 11 + wrapper/Move/ZMatrixLine.pypp.cpp | 15 + wrapper/Move/__init__.py | 100 +- wrapper/Qt/CMakeLists.txt | 10 +- wrapper/Qt/_Qt.main.cpp | 8 +- wrapper/Qt/__init__.py | 2 +- wrapper/Qt/autoconvert_QString.cpp | 6 +- wrapper/Qt/qtheaders/README | 4 +- wrapper/Qt/sireqt_containers.cpp | 4 + wrapper/Search/CMakeAutogenFile.txt | 4 + wrapper/Search/CMakeLists.txt | 64 + wrapper/Search/_Search.main.cpp | 15 + .../Search/_Search_free_functions.pypp.cpp | 300 ++ .../Search/_Search_free_functions.pypp.hpp | 10 + wrapper/Search/__init__.py | 2 + wrapper/Search/active_headers.h | 11 + wrapper/Squire/AM1BCC.pypp.cpp | 8 + wrapper/Squire/CMakeAutogenFile.txt | 46 +- wrapper/Squire/CMakeLists.txt | 10 +- .../ChargeElementParameterNames3D.pypp.cpp | 2 + wrapper/Squire/ElementParameterName.pypp.cpp | 2 + .../Squire/ElementParameterName3D.pypp.cpp | 2 + wrapper/Squire/GTO.pypp.cpp | 10 +- wrapper/Squire/GTOPair.pypp.cpp | 20 +- wrapper/Squire/HF.pypp.cpp | 7 + wrapper/Squire/Molpro.pypp.cpp | 21 + wrapper/Squire/Mopac.pypp.cpp | 16 + wrapper/Squire/NullQM.pypp.cpp | 4 + .../Squire/NullQMChargeCalculator.pypp.cpp | 4 + wrapper/Squire/Orbital.pypp.cpp | 4 + wrapper/Squire/OrbitalShell.pypp.cpp | 5 + wrapper/Squire/PP_GTO.pypp.cpp | 8 + wrapper/Squire/PP_GTOs.pypp.cpp | 6 + wrapper/Squire/PS_GTO.pypp.cpp | 8 + wrapper/Squire/PS_GTOs.pypp.cpp | 6 + wrapper/Squire/P_GTO.pypp.cpp | 6 + wrapper/Squire/PointCharge.pypp.cpp | 4 + wrapper/Squire/PointDipole.pypp.cpp | 3 + wrapper/Squire/QMChargeCalculator.pypp.cpp | 5 + wrapper/Squire/QMChargeConstraint.pypp.cpp | 9 +- wrapper/Squire/QMComponent.pypp.cpp | 9 +- wrapper/Squire/QMFF.pypp.cpp | 26 +- wrapper/Squire/QMMMFF.pypp.cpp | 33 +- wrapper/Squire/QMProgram.pypp.cpp | 13 +- wrapper/Squire/SQM.pypp.cpp | 22 + wrapper/Squire/SS_GTO.pypp.cpp | 7 + wrapper/Squire/SS_GTOs.pypp.cpp | 8 + wrapper/Squire/S_GTO.pypp.cpp | 6 + wrapper/Squire/ShellPair.pypp.cpp | 7 + wrapper/Squire/Squire_properties.cpp | 18 +- wrapper/Squire/Squire_registrars.cpp | 40 +- wrapper/Squire/__init__.py | 35 +- wrapper/Stream/CMakeLists.txt | 12 +- wrapper/Stream/FileHeader.pypp.cpp | 14 + wrapper/Stream/MD5Sum.pypp.cpp | 3 + wrapper/Stream/__init__.py | 66 +- wrapper/System/AngleComponent.pypp.cpp | 27 +- wrapper/System/AssignerGroup.pypp.cpp | 14 +- wrapper/System/CMakeAutogenFile.txt | 70 +- wrapper/System/CMakeLists.txt | 12 +- wrapper/System/ChargeConstraint.pypp.cpp | 5 +- wrapper/System/CheckPoint.pypp.cpp | 3 + wrapper/System/CloseMols.pypp.cpp | 15 +- wrapper/System/ComponentConstraint.pypp.cpp | 6 +- wrapper/System/Constraint.pypp.cpp | 9 +- wrapper/System/Constraints.pypp.cpp | 19 +- wrapper/System/DihedralComponent.pypp.cpp | 29 +- wrapper/System/DistanceComponent.pypp.cpp | 13 +- .../System/DoubleDistanceComponent.pypp.cpp | 19 +- wrapper/System/EnergyMonitor.pypp.cpp | 25 +- wrapper/System/FreeEnergyMonitor.pypp.cpp | 29 + wrapper/System/GeometryComponent.pypp.cpp | 5 +- wrapper/System/IDAndSet_MonitorID_.pypp.cpp | 8 + wrapper/System/IDAndSet_SysID_.pypp.cpp | 8 + wrapper/System/IDAssigner.pypp.cpp | 13 +- wrapper/System/IDOrSet_MonitorID_.pypp.cpp | 8 + wrapper/System/IDOrSet_SysID_.pypp.cpp | 8 + wrapper/System/IdentityConstraint.pypp.cpp | 10 +- wrapper/System/MoleculeConstraint.pypp.cpp | 3 + wrapper/System/MonitorComponent.pypp.cpp | 9 +- wrapper/System/MonitorComponents.pypp.cpp | 12 +- wrapper/System/MonitorID.pypp.cpp | 4 + wrapper/System/MonitorIdx.pypp.cpp | 9 + wrapper/System/MonitorMonitor.pypp.cpp | 16 +- wrapper/System/MonitorName.pypp.cpp | 8 + wrapper/System/MonitorProperty.pypp.cpp | 17 +- wrapper/System/NullConstraint.pypp.cpp | 4 + wrapper/System/NullMonitor.pypp.cpp | 5 + .../System/PerturbationConstraint.pypp.cpp | 7 +- wrapper/System/PolariseCharges.pypp.cpp | 11 +- wrapper/System/PolariseChargesFF.pypp.cpp | 12 +- wrapper/System/PropertyConstraint.pypp.cpp | 4 + wrapper/System/SireSystem_properties.cpp | 14 +- wrapper/System/SireSystem_registrars.cpp | 86 +- wrapper/System/SpaceWrapper.pypp.cpp | 7 +- wrapper/System/Specify_MonitorID_.pypp.cpp | 8 + wrapper/System/Specify_SysID_.pypp.cpp | 8 + wrapper/System/SysID.pypp.cpp | 4 + wrapper/System/SysIdx.pypp.cpp | 9 + wrapper/System/SysName.pypp.cpp | 8 + wrapper/System/System.pypp.cpp | 220 +- wrapper/System/SystemMonitor.pypp.cpp | 5 + wrapper/System/SystemMonitors.pypp.cpp | 33 +- .../System/TripleDistanceComponent.pypp.cpp | 25 +- wrapper/System/VolMapMonitor.pypp.cpp | 19 +- wrapper/System/WindowedComponent.pypp.cpp | 9 +- .../System/_System_free_functions.pypp.cpp | 2 + wrapper/System/__init__.py | 87 +- wrapper/System/special_code.py | 6 +- wrapper/Units/CMakeAutogenFile.txt | 6 +- wrapper/Units/CMakeLists.txt | 11 +- wrapper/Units/Celsius.pypp.cpp | 5 + wrapper/Units/Fahrenheit.pypp.cpp | 5 + wrapper/Units/GeneralUnit.pypp.cpp | 23 + wrapper/Units/SireUnits_containers.cpp | 9 +- wrapper/Units/TempBase.pypp.cpp | 10 + wrapper/Units/Unit.pypp.cpp | 6 + wrapper/Units/__init__.py | 39 +- wrapper/Units/generalunit.cpp | 60 +- wrapper/Units/generalunit.h | 69 +- wrapper/Vol/AABox.pypp.cpp | 29 + wrapper/Vol/BoxPatching.pypp.cpp | 13 + wrapper/Vol/CMakeAutogenFile.txt | 28 +- wrapper/Vol/CMakeLists.txt | 14 +- wrapper/Vol/Cartesian.pypp.cpp | 40 + wrapper/Vol/CombineSpaces.pypp.cpp | 4 + wrapper/Vol/CombinedSpace.pypp.cpp | 47 +- wrapper/Vol/CoordGroup.pypp.cpp | 5 + wrapper/Vol/CoordGroupArray.pypp.cpp | 35 + wrapper/Vol/CoordGroupArrayArray.pypp.cpp | 37 + wrapper/Vol/CoordGroupBase.pypp.cpp | 13 + wrapper/Vol/CoordGroupEditor.pypp.cpp | 5 + wrapper/Vol/Grid.pypp.cpp | 13 + wrapper/Vol/GridIndex.pypp.cpp | 10 + wrapper/Vol/GridInfo.pypp.cpp | 39 + wrapper/Vol/NullGrid.pypp.cpp | 6 + wrapper/Vol/NullPatching.pypp.cpp | 7 + wrapper/Vol/Patching.pypp.cpp | 11 +- wrapper/Vol/PeriodicBox.pypp.cpp | 35 + wrapper/Vol/RegularGrid.pypp.cpp | 10 + wrapper/Vol/SireVol_properties.cpp | 16 +- wrapper/Vol/SireVol_registrars.cpp | 32 +- wrapper/Vol/Space.pypp.cpp | 43 + wrapper/Vol/TriclinicBox.pypp.cpp | 42 + wrapper/Vol/__init__.py | 50 +- wrapper/__init__.py | 216 +- .../build/clang_boost_macos_crash/README.md | 18 + .../build/clang_boost_macos_crash/clean.sh | 3 + .../build/clang_boost_macos_crash/compile.sh | 5 + wrapper/build/clang_boost_macos_crash/test.py | 2 + .../build/clang_boost_macos_crash/test_bp.cpp | 28 + wrapper/build/cmake/Config__init__.py.in | 26 +- wrapper/build/cmake/GetGitVersion.cmake | 2 +- wrapper/build/cmake/GetSvnVersion.cmake | 6 +- wrapper/build/copy_into_conda.py | 2 + wrapper/bundled/install_boost_python.cmake | 36 +- wrapper/bundled/install_python.cmake | 5 + wrapper/create_all_wrappers.py | 7 +- wrapper/python/CMakeLists.txt | 9 +- wrapper/python/scripts/align.py | 27 +- wrapper/python/scripts/analyse_freenrg.py | 8 +- wrapper/python/scripts/analyse_reti.py | 10 +- wrapper/python/scripts/color_freenrg.py | 44 +- wrapper/python/scripts/ligandswap.py | 16 +- wrapper/python/scripts/lj-tailcorrection.py | 11 +- wrapper/python/scripts/nautilus-avggrids.py | 6 + wrapper/python/scripts/nautilus-boxgrid.py | 6 + wrapper/python/scripts/nautilus-cell2grid.py | 10 +- .../python/scripts/nautilus-clustergrids.py | 6 + wrapper/python/scripts/nautilus-focusgrid.py | 6 + wrapper/python/scripts/nautilus-protocol.py | 6 + .../scripts/nautilus-regionproperties.py | 10 +- wrapper/python/scripts/nautilus-subgrids.py | 6 + wrapper/python/scripts/nautilus-traj2cell.py | 12 +- wrapper/python/scripts/package_sire.py | 5 + wrapper/python/scripts/proteinswap.py | 12 +- wrapper/python/scripts/quantomm.py | 62 +- wrapper/python/scripts/sire_test.py | 12 +- wrapper/python/scripts/somd-freenrg.py | 7 + wrapper/python/scripts/somd.py | 6 + .../python/scripts/standardstatecorrection.py | 8 +- wrapper/python/scripts/transform.py | 24 +- wrapper/python/scripts/waterswap.py | 10 +- wrapper/python/scripts/waterview.py | 23 +- 1389 files changed, 70834 insertions(+), 11165 deletions(-) create mode 100644 CODE_OF_CONDUCT.md delete mode 100644 WINDOWS_INSTALL.rst create mode 100644 actions/collect_failed.py create mode 100644 actions/parse_requirements.py create mode 100644 actions/update_recipe.py create mode 100644 actions/upload_package.py delete mode 100644 build/INSTALL_INTO_ANACONDA.rst delete mode 100644 build/README create mode 100644 build/README.md delete mode 100755 build/build_sire.py delete mode 100755 build/quick_compile.sh delete mode 100644 compile_sire.bat delete mode 100755 compile_sire.sh create mode 100644 corelib/src/libs/SireBase/convert_property.hpp create mode 100644 corelib/src/libs/SireBase/slice.cpp create mode 100644 corelib/src/libs/SireBase/slice.h create mode 100644 corelib/src/libs/SireMM/bond.cpp create mode 100644 corelib/src/libs/SireMM/bond.h create mode 100644 corelib/src/libs/SireMM/selectorbond.cpp create mode 100644 corelib/src/libs/SireMM/selectorbond.h create mode 100644 corelib/src/libs/SireMM/selectormbond.cpp create mode 100644 corelib/src/libs/SireMM/selectormbond.h create mode 100644 corelib/src/libs/SireMol/core.h create mode 100644 corelib/src/libs/SireMol/evaluatorm.cpp create mode 100644 corelib/src/libs/SireMol/evaluatorm.h create mode 100644 corelib/src/libs/SireMol/selectorm.hpp create mode 100644 corelib/src/libs/SireMol/selectormol.cpp create mode 100644 corelib/src/libs/SireMol/selectormol.h create mode 100644 corelib/src/libs/SireSearch/CMakeLists.txt create mode 100644 corelib/src/libs/SireSearch/approx_equal.cpp create mode 100644 corelib/src/libs/SireSearch/approx_equal.h create mode 100644 corelib/src/libs/SireSearch/ast.cpp create mode 100644 corelib/src/libs/SireSearch/ast.h create mode 100644 corelib/src/libs/SireSearch/grammar.h create mode 100644 corelib/src/libs/SireSearch/helper_funcs.cpp create mode 100644 corelib/src/libs/SireSearch/helper_funcs.h create mode 100644 corelib/src/libs/SireSearch/idengine.cpp create mode 100644 corelib/src/libs/SireSearch/idengine.h create mode 100644 corelib/src/libs/SireSearch/parser.cpp create mode 100644 corelib/src/libs/SireSearch/parser.h create mode 100644 corelib/src/libs/SireSearch/register_siresearch.cpp create mode 100644 doc/Makefile create mode 100644 doc/requirements.txt create mode 100644 doc/source/acknowledgements.rst create mode 100644 doc/source/api/index.rst create mode 100644 doc/source/api/index_Sire.rst create mode 100644 doc/source/api/index_Sire_Analysis.rst create mode 100644 doc/source/api/index_Sire_Base.rst create mode 100644 doc/source/api/index_Sire_CAS.rst create mode 100644 doc/source/api/index_Sire_Error.rst create mode 100644 doc/source/api/index_Sire_FF.rst create mode 100644 doc/source/api/index_Sire_ID.rst create mode 100644 doc/source/api/index_Sire_IO.rst create mode 100644 doc/source/api/index_Sire_MM.rst create mode 100644 doc/source/api/index_Sire_Maths.rst create mode 100644 doc/source/api/index_Sire_Mol.rst create mode 100644 doc/source/api/index_Sire_Move.rst create mode 100644 doc/source/api/index_Sire_Squire.rst create mode 100644 doc/source/api/index_Sire_Stream.rst create mode 100644 doc/source/api/index_Sire_System.rst create mode 100644 doc/source/api/index_Sire_Units.rst create mode 100644 doc/source/api/index_Sire_Vol.rst create mode 100644 doc/source/api/index_api_Sire.rst create mode 100644 doc/source/api/index_api_Sire_Analysis.rst create mode 100644 doc/source/api/index_api_Sire_Base.rst create mode 100644 doc/source/api/index_api_Sire_CAS.rst create mode 100644 doc/source/api/index_api_Sire_Error.rst create mode 100644 doc/source/api/index_api_Sire_FF.rst create mode 100644 doc/source/api/index_api_Sire_ID.rst create mode 100644 doc/source/api/index_api_Sire_IO.rst create mode 100644 doc/source/api/index_api_Sire_MM.rst create mode 100644 doc/source/api/index_api_Sire_Maths.rst create mode 100644 doc/source/api/index_api_Sire_Mol.rst create mode 100644 doc/source/api/index_api_Sire_Move.rst create mode 100644 doc/source/api/index_api_Sire_Squire.rst create mode 100644 doc/source/api/index_api_Sire_Stream.rst create mode 100644 doc/source/api/index_api_Sire_System.rst create mode 100644 doc/source/api/index_api_Sire_Units.rst create mode 100644 doc/source/api/index_api_Sire_Vol.rst create mode 100644 doc/source/changelog.rst create mode 100644 doc/source/conf.py create mode 100644 doc/source/contributing.rst create mode 100644 doc/source/development.rst create mode 100644 doc/source/features.rst create mode 100644 doc/source/images/logo.svg create mode 100644 doc/source/index.rst create mode 100644 doc/source/install.rst create mode 100644 doc/source/packaging.rst create mode 100644 doc/source/quickstart/index.rst create mode 100644 doc/source/roadmap.rst create mode 100644 doc/source/snaglist.rst create mode 100644 doc/source/support.rst create mode 100644 doc/source/tutorial/index.rst create mode 100644 doc/source/tutorial/index_part01.rst create mode 100644 doc/source/tutorial/index_part02.rst create mode 100644 doc/source/tutorial/part01/01_importing_sire.rst create mode 100644 doc/source/tutorial/part01/02_loading_a_molecule.rst create mode 100644 doc/source/tutorial/part01/03_simple_indexing.rst create mode 100644 doc/source/tutorial/part01/04_saving_a_molecule.rst create mode 100644 doc/source/tutorial/part01/05_loading_from_multiple_files.rst create mode 100644 doc/source/tutorial/part01/06_supported_file_formats.rst create mode 100644 doc/source/tutorial/part02/01_indexing_atoms.rst create mode 100644 doc/source/tutorial/part02/02_indexing_residues.rst create mode 100644 doc/source/tutorial/part02/03_indexing_chains.rst create mode 100644 doc/source/tutorial/part02/04_indexing_segments.rst create mode 100644 doc/source/tutorial/part02/05_indexing_molecules.rst create mode 100644 doc/source/tutorial/part02/06_indexing_bonds.rst create mode 100644 doc/source/tutorial/part02/07_searching.rst create mode 100644 doc/winbuild.bat create mode 100644 docker/sire-generate-wrappers/scanner.py create mode 100755 docker/sire-generate-wrappers/unpack_headers delete mode 100644 recipes/fkcombu/LICENSE delete mode 100644 recipes/fkcombu/build.sh delete mode 100644 recipes/fkcombu/meta.yaml delete mode 100644 recipes/libcpuid/LICENSE delete mode 100644 recipes/libcpuid/bld.bat delete mode 100644 recipes/libcpuid/build.sh delete mode 100644 recipes/libcpuid/meta.yaml create mode 100644 recipes/sire/bld.bat create mode 100644 requirements.txt create mode 100644 requirements_bss.txt create mode 100644 requirements_build.txt create mode 100644 setup.py create mode 100644 src/sire/CMakeLists.txt create mode 100644 src/sire/__init__.py create mode 100644 src/sire/_load.py create mode 100644 src/sire/_pythonize.py create mode 100644 src/sire/_thumbsup.py create mode 100644 src/sire/analysis/CMakeLists.txt create mode 100644 src/sire/analysis/__init__.py create mode 100644 src/sire/base/CMakeLists.txt create mode 100644 src/sire/base/__init__.py create mode 100644 src/sire/build/cmake/cmake_uninstall.cmake.in create mode 100644 src/sire/build/cmake/install_python.cmake create mode 100644 src/sire/cas/CMakeLists.txt create mode 100644 src/sire/cas/__init__.py create mode 100644 src/sire/cluster/CMakeLists.txt create mode 100644 src/sire/cluster/__init__.py create mode 100644 src/sire/config/CMakeLists.txt create mode 100644 src/sire/config/__init__.py create mode 100644 src/sire/error/CMakeLists.txt create mode 100644 src/sire/error/__init__.py create mode 100644 src/sire/ff/CMakeLists.txt create mode 100644 src/sire/ff/__init__.py create mode 100644 src/sire/id/CMakeLists.txt create mode 100644 src/sire/id/__init__.py create mode 100644 src/sire/io/CMakeLists.txt create mode 100644 src/sire/io/__init__.py create mode 100644 src/sire/maths/CMakeLists.txt create mode 100644 src/sire/maths/__init__.py create mode 100644 src/sire/mm/CMakeLists.txt create mode 100644 src/sire/mm/__init__.py create mode 100644 src/sire/mol/CMakeLists.txt create mode 100644 src/sire/mol/__init__.py create mode 100644 src/sire/mol/_cursor.py create mode 100644 src/sire/move/CMakeLists.txt create mode 100644 src/sire/move/__init__.py create mode 100644 src/sire/qt/CMakeLists.txt create mode 100644 src/sire/qt/__init__.py create mode 100644 src/sire/search/CMakeLists.txt create mode 100644 src/sire/search/__init__.py create mode 100644 src/sire/squire/CMakeLists.txt create mode 100644 src/sire/squire/__init__.py create mode 100644 src/sire/stream/CMakeLists.txt create mode 100644 src/sire/stream/__init__.py create mode 100644 src/sire/system/CMakeLists.txt create mode 100644 src/sire/system/__init__.py create mode 100644 src/sire/system/_system.py create mode 100644 src/sire/units/CMakeLists.txt create mode 100644 src/sire/units/__init__.py create mode 100644 src/sire/utils/CMakeLists.txt create mode 100644 src/sire/utils/__init__.py create mode 100644 src/sire/utils/_try_import.py create mode 100644 src/sire/vol/CMakeLists.txt create mode 100644 src/sire/vol/__init__.py create mode 100644 tests/base/test_wrap.py create mode 100644 tests/biosimspace/test_select.py create mode 100644 tests/mm/test_index_bonds.py create mode 100644 tests/mol/test_complex_indexing.py create mode 100644 tests/units/test_pickling.py create mode 100644 version.txt create mode 100644 wrapper/Base/autoconvert_Slice.cpp create mode 100644 wrapper/Helpers/release_gil_policy.cpp create mode 100644 wrapper/Helpers/release_gil_policy.hpp create mode 100644 wrapper/IO/_IO_load.cpp create mode 100644 wrapper/IO/_IO_load.h create mode 100644 wrapper/IO/special_code.py create mode 100644 wrapper/MM/Bond.pypp.cpp create mode 100644 wrapper/MM/Bond.pypp.hpp create mode 100644 wrapper/MM/Mover_Bond_.pypp.cpp create mode 100644 wrapper/MM/Mover_Bond_.pypp.hpp create mode 100644 wrapper/MM/Mover_SelectorBond_.pypp.cpp create mode 100644 wrapper/MM/Mover_SelectorBond_.pypp.hpp create mode 100644 wrapper/MM/SelectorBond.pypp.cpp create mode 100644 wrapper/MM/SelectorBond.pypp.hpp create mode 100644 wrapper/MM/SelectorMBond.pypp.cpp create mode 100644 wrapper/MM/SelectorMBond.pypp.hpp create mode 100644 wrapper/Mol/EvaluatorM.pypp.cpp create mode 100644 wrapper/Mol/EvaluatorM.pypp.hpp create mode 100644 wrapper/Mol/SelectorM_Atom_.pypp.cpp create mode 100644 wrapper/Mol/SelectorM_Atom_.pypp.hpp create mode 100644 wrapper/Mol/SelectorM_Chain_.pypp.cpp create mode 100644 wrapper/Mol/SelectorM_Chain_.pypp.hpp create mode 100644 wrapper/Mol/SelectorM_CutGroup_.pypp.cpp create mode 100644 wrapper/Mol/SelectorM_CutGroup_.pypp.hpp create mode 100644 wrapper/Mol/SelectorM_Residue_.pypp.cpp create mode 100644 wrapper/Mol/SelectorM_Residue_.pypp.hpp create mode 100644 wrapper/Mol/SelectorM_Segment_.pypp.cpp create mode 100644 wrapper/Mol/SelectorM_Segment_.pypp.hpp create mode 100644 wrapper/Mol/SelectorMol.pypp.cpp create mode 100644 wrapper/Mol/SelectorMol.pypp.hpp create mode 100644 wrapper/Search/CMakeAutogenFile.txt create mode 100644 wrapper/Search/CMakeLists.txt create mode 100644 wrapper/Search/_Search.main.cpp create mode 100644 wrapper/Search/_Search_free_functions.pypp.cpp create mode 100644 wrapper/Search/_Search_free_functions.pypp.hpp create mode 100644 wrapper/Search/__init__.py create mode 100644 wrapper/Search/active_headers.h create mode 100644 wrapper/build/clang_boost_macos_crash/README.md create mode 100755 wrapper/build/clang_boost_macos_crash/clean.sh create mode 100755 wrapper/build/clang_boost_macos_crash/compile.sh create mode 100644 wrapper/build/clang_boost_macos_crash/test.py create mode 100644 wrapper/build/clang_boost_macos_crash/test_bp.cpp diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 6955111ec..f924f01c8 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,5 +1,10 @@ name: Build +# Note that push and pull-request builds are automatically +# now skipped by GitHub if +# [skip ci], [ci skip], [no ci], [skip actions], or [actions skip] +# are in the commit message. We don't need to check for this ourselves. + on: push: branches: [ devel ] @@ -8,21 +13,44 @@ on: jobs: build: - name: build (${{ matrix.python-version }}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - if: "!contains(github.event.head_commit.message, 'ci skip')" + name: build (${{ matrix.python-version }}, ${{ matrix.platform.name }}) + runs-on: ${{ matrix.platform.os }} strategy: - max-parallel: 6 + max-parallel: 9 fail-fast: false matrix: - os: ["ubuntu-latest", "macos-latest"] python-version: ["3.7", "3.8", "3.9"] + platform: + - { + name: "windows", + os: "windows-latest", + shell: "pwsh" + } + - { + name: "linux", + os: "ubuntu-latest", + shell: "bash -l {0}" + } + - { + name: "macos", + os: "macos-latest", + shell: "bash -l {0}" + } environment: name: sire-build + defaults: + run: + shell: ${{ matrix.platform.shell }} env: SIRE_DONT_PHONEHOME: 1 SIRE_SILENT_PHONEHOME: 1 steps: +# Need to install and use VS 2017 for conda-compliant builds + - name: Set up Visual Studio 2017 Build Tools (required for Python modules) + run: | + choco install visualstudio2017-workload-vctools + if: matrix.platform.name == 'windows' +# - uses: conda-incubator/setup-miniconda@v2 with: auto-update-conda: true @@ -31,29 +59,58 @@ jobs: miniforge-version: latest miniforge-variant: Mambaforge use-mamba: true - - name: Clone the repository +# + - name: Clone the devel branch (push to devel) run: git clone https://github.com/michellab/Sire - - name: Checkout the head branch if a pull request - run: | - cd Sire - git checkout "$HEAD_BRANCH" - env: - HEAD_BRANCH: ${{ github.head_ref }} + if: github.event_name != 'pull_request' +# + - name: Clone the feature branch (pull request to devel) + run: git clone -b ${{ github.head_ref }} --single-branch https://github.com/michellab/Sire if: github.event_name == 'pull_request' +# - name: Setup Conda - shell: bash -l {0} - run: mamba install -y -c conda-forge boa anaconda-client + run: mamba install -y -c conda-forge boa anaconda-client pip-requirements-parser +# - name: Update Conda recipe - run: Sire/actions/update_recipe.sh + run: + python ${{ github.workspace }}/Sire/actions/update_recipe.py +# + - name: Prepare build location + run: mkdir ${{ github.workspace }}/build +# + - name: Build Conda package using mamba build + run: conda mambabuild --croot ${{ github.workspace }}/build -c conda-forge -c michellab ${{ github.workspace }}/Sire/recipes/sire + if: matrix.platform.name != 'windows' || matrix.python-version != '3.7' +# + - name: Build Conda package using conda build + run: conda build --croot ${{ github.workspace }}/build -c conda-forge -c michellab ${{ github.workspace }}/Sire/recipes/sire + if: matrix.platform.name == 'windows' && matrix.python-version == '3.7' +# + - name: Collect failed artifacts + run: + python ${{ github.workspace }}/Sire/actions/collect_failed.py env: - SRC_DIR: ${{ github.workspace }}/Sire - - name: Build Conda package - shell: bash -l {0} - run: conda mambabuild -c conda-forge -c michellab Sire/recipes/sire + BUILD_DIR: ${{ github.workspace }}/build + if: ${{ failure() }} +# + - uses: actions/upload-artifact@v2 + with: + name: build-${{ matrix.platform.name }}-${{matrix.python-version}}-${{ github.sha }} + path: ${{ github.workspace }}/build/*/sire-*.tar.bz2 + retention-days: 10 + if: ${{ success() }} +# + - uses: actions/upload-artifact@v2 + with: + name: failed-${{ matrix.platform.name }}-${{matrix.python-version}}-${{ github.sha }} + path: ${{ github.workspace }}/build/failed.tar.bz2 + retention-days: 1 + if: ${{ failure() }} +# - name: Upload Conda package - shell: bash -l {0} - run: Sire/actions/upload_package.sh + run: python ${{ github.workspace }}/Sire/actions/upload_package.py env: SRC_DIR: ${{ github.workspace }}/Sire + BUILD_DIR: ${{ github.workspace }}/build ANACONDA_TOKEN: ${{ secrets.ANACONDA_TOKEN }} if: github.event_name != 'pull_request' diff --git a/.gitignore b/.gitignore index 75d46c28f..244e977b8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,9 +2,14 @@ build_core build_wrapper xcode build/miniconda.sh +build/*_corelib/* +build/*_wrapper/* +build/*_module/* build/corelib/* build/wrapper/* +build/module/* build/downloads/* +recipes/sire/meta.yaml #files for wrapper module_info active_headers.data @@ -12,8 +17,13 @@ exposed_decl.pypp.txt named_tuple.py wrapper/Py++/pyplusplus includes.tar.bz2 +doc/build/* +doc/source/api/generated/* +cache/* +tests/cache/* *.pyc *.data +.vscode # Compiled Object files *.slo @@ -49,3 +59,6 @@ includes.tar.bz2 #Atom .idea + +#VS Code +.vscode \ No newline at end of file diff --git a/BUILD_INSTRUCTIONS.rst b/BUILD_INSTRUCTIONS.rst index 0f2d85d86..860b3569a 100644 --- a/BUILD_INSTRUCTIONS.rst +++ b/BUILD_INSTRUCTIONS.rst @@ -1,77 +1,110 @@ Sire build instructions *********************** -The following page details the Sire build process. Sire is built using -`Miniconda `__, creating +You only need to build Sire if there isn't a package available for your +computer and operating system on conda, or if you want to make changes +to Sire. + +If you want to compile Sire from source, then first download it from +Git, e.g. `git clone https://github.com/michellab/Sire` will download +the (stable) development branch. + +Change into this directory (`cd Sire`) to continue with the build. + +Dependencies +------------ + +Sire is built using +`Miniconda `__, +`Miniforge `__, or +`Mambaforge `__ creating an isolated Conda environment into which Sire with be compiled and deployed. This avoids the need for external dependencies, since everything that is required is already available within the Conda ecosystem. The main script used to compile Sire is -`compile_sire.sh `__ -on Linux and `compile_sire.sh `__ -on Windows. You shouldn't need to modify this file, other than updating -the ``MINICONDA_VERSION`` variable if needed. (Note that since we use -a specific Miniconda we only currently build Sire for Python version 3.7.) - -The `build_sire.py `__ -Python script is called by the above shell scripts to perform the build. -It is within this file that external dependencies are installed, using Conda -where possible, and pip if a package is not yet available via the Anaconda -Cloud. Please use the `conda-forge `__ channel -as your first port of call, since this will help maximise compatibility between -packages. (We plan on eventually migrating to the conda-forge build platform -ourselves, so it is important that we can eventually depend on a single Conda -channel.) When choosing / updating package versions please choose the most -recent version that is supported on all operating systems that we build for, -i.e. ``linux-64``, ``osx-64``, and ``win-64``. To check which versions are -compatible use the Anaconda Cloud, e.g. for the `boost `__. -(Obviously you can use an older version of a package if the latest is broken, -or if dependencies can't be resolved.) Note that versions aren't just -important for Sire itself, but also any applications that are built on top -of Sire, such as `BioSimSpace `__. -Please don't change version numbers without checking that applications that -depend on them still work. (For example, `RDKit `__ -is used by BioSimSpace, which depends on some of the same packages used -by Sire.) - -We use `Azure Pipelines `__ for -continuous integration and deployment. On Linux this is manage using -Docker containers, with details for each stage of the build available -in the `docker `__ -directory. Note that the pipeline can be unreliable because of network -timeouts, so if a build fails it is often worth trying to queue another -build of the same commit from the online control panel. (Check any error -messages first to see if it looks like a genuine issue.) - -The `sire-conda `__ -directory contains all of the files that are used to build and deploy -the Sire `Conda package `__ during -the Azure Pipeline. The scripts will query the Sire Miniconda for the -versions of any external dependencies, then add them to the *recipe* -for our package. This means that any version changes that you make in the -`build_sire.py `__ -file will automatically be updated in the Conda package, i.e. you only need to -maintain dependency versions in a single location. The only thing that is -needed is to update the list of external Conda dependences in -`update_recipe.sh `__ -if a new dependency is added. (Note that you'll also need to manage the -versions of any dependencies of dependencies that are required at run time, -since Conda doesn't do a good job of managing this for you. For example, the -``netcdf4`` Conda package doesn't pin the version of ``libnetcdf`` that it -pulls in, we need to manually pin the version of this package in the run time -requirements of our Conda recipe. Currently we need to do this for ``libcblas``, -``libnetcdf`` and ``qt``.) The Conda package version number is also -automatically inferred from the git commit (we use the tag as the version -and the number of commits since the tag as the build number). The Sire Conda -package is created by extracting all of the compiled Sire binary and library -files from the Miniconda installation, then uploading them to the Oracle Cloud -as an archive. These are then downloaded and unpacked into the correct location -during the Conda installation. See `this `__ -script to see how the archive of files is created and `this `__ -script to see how the same files are unpacked in place during the Conda install. -Currently we pin the version of ``conda-build`` to 3.17 due to regular -performance issues (hanging) with version 3.18, particularly on macOS. The -Linux version is pinned in the `Dockerfile `__ -whereas the macOS version is pinned in the Azure Pipeline -`configuration `__. +`setup.py `__. + +To compile, activate your conda environment and then install the build +dependencies. These are; + +* Mamba - this is an alternative to `conda` that significantly speeds + up installation of dependencies. Install using `conda install mamba`. + +* The conda C and C++ compilers (`mamba install gcc gxx` on Linux, + `mamba install clang clangxx` on MacOS, and `mamba install conda-build` on Windows). + +* Cmake - `mamba install cmake` + +* pip-requirements-parser - `mamba install pip-requirements-parser` + +Compiling Sire +-------------- + +With the dependencies installed, you can now compile and install Sire +using the command + +:: + python setup.py install + + +This will download the rest of Sire's dependencies, will compile Sire +and will install it into your current environment. + +Additional Options +------------------ + +There are some additional options that are useful to control compilation, +or recompilation if you are editing Sire. + +* `--help` : Show instructions for all additional options +* `--skip-deps` : Skip the testing and installation of conda dependencies. +* `--skip-build` : Skip the build phase - just install the Python wrappers. +* `--install-bss-deps` : Additionally install BioSimSpace's dependencies too. + +The available `setup.py` options are; + +* `install` : Compile and install Sire in full +* `install_module` : Install only the pure Python module. Useful during + development if you have only made changes to the pure Python module. +* `build` : Only compile Sire. This will build and install the core C++ library, + and will build (but not install) the C++ Python wrappers. +* `install_requires` : Install all of Sire's dependencies using `conda` or `mamba`. + +Typically, as a developer, if you make any change to `corelib` you should +re-run the compile using `python setup.py --skip-deps install`. + +If you only make changes to the wrappers, you can speed things up by +re-running the installation using `python setup.py --skip-deps --skip-build install`. + +If you only make changes to the pure Python module, then you can get away +with just running `python setup.py install_module`. + +Building the conda package +-------------------------- + +Alternatively, you can compile Sire using the conda recipe. To do this, first +install the conda build dependencies, including `boa` (supports mamba builds) + +:: + + mamba install -y -c conda-forge boa anaconda-client pip-requirements-parser + + +Next, update the recipe by typing + +:: + + python actions/update_recipe.py + +Finally, build the recipe via + +:: + + conda mambabuild -c conda-forge -c michellab recipes/sire + +This set of commands is used by Sire's CI/CD +`GitHub Actions workflow `__. + +We have tested this on Windows, MacOS and Linux, building packages +(currently) for Python 3.7, 3.8 and 3.9. diff --git a/CHANGELOG b/CHANGELOG index a69aee8db..6f812b32f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,37 @@ SIRE changelog devel branch: + [2023.0.0] July 2023 - Updated Sire's API to a more pythonic style. + Module names are in lower case, e.g. `import Sire` becomes + `import sire`, or `import sire as sr`. Functions are in + underscore_case. This change is not backwards compatible. To + support old code, a `sire.use_old_api()` function has been added. + New functions have been added that make it easier to load + and save molecules. These can load from URLs. Tests have been + updated to pytest and now load input data from the sire website. + The search system has been overhauled, optimised and updated. + This is described in the new tutorials that are in the process + of being written in the `doc` directory. This also contains + the new sphinx website. The `CMakeLists.txt` files and build + system have been completely reworked. These now use more + pythonic `setup.py` scripts. These have been updated to fully + support MacOS M1 and Windows. The conda recipe has been + updated to use these scripts. Conda packages are now built + and supported across Linux, MacOS and Windows. + + [2022.3.0] June 2022 - Added support for parsing SDF files (@chryswoods). + Move conda build process to Miniforge and mambdabuild (boa) to + avoid timeouts and memory issues. Update GroTop parser to ensure + new atom types are created when names match but parameters + differ. Added additional BioSimSpace wrapper to update + coordinates and velocities in a system, without first requiring + that it is modified to have unique atom and residue numbers. + Use -Oz compiler flag rather than -Os for compiling Python + wrappers to avoid "illegal hardware instruction" error with + Clang 14 on macOS x86_64. Fixed issue reconstructing triclinic + box objects from a binary data stream. Added missing streaming + operators to Sire.Unit.GeneralUnit. + [2022.2.0] March 2022 - Fixed formatting of SOLVENT_POINTERS flag in AmberPrm7 parser. Removed duplicate definition of sigma_av in OpenMMFreEnergySt.cpp. Fixed SOMD issues related to diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 000000000..a026dfed6 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at Christopher.Woods@bristol.ac.uk. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/INSTALL.rst b/INSTALL.rst index 603825779..360546efd 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -2,68 +2,36 @@ INSTALLATION INSTRUCTIONS ========================= -1. Install dependencies +The easiest way to install Sire is using our `conda channel `__. +Sire is built using dependencies from `conda-forge `__, +so please ensure that the channel takes strict priority. We recommend using +`Miniforge `__. - To compile and install Sire you need to have a UNIX or UNIX-like - environment (e.g. working bash shell), a working C++ compiler - that fully supports C++-14 (e.g. gcc >= 5.0 or clang >= 3.7 are recommended), a working installation of - cmake (version 3.0.0 minimum), and a working git client, so - that you can download the source. You also need an internet connection - to allow you to download Sire and for the Sire build to automatically - download all of its dependencies. +To create a new environment: - Note, on OS X you must make sure that you have installed XCode - and the command line developer tools. Install the tools using - "xcode-select --install" and following the instructions. Without - the tools, you will find that some dependencies won't compile, - with errors like "Cannot find stdio.h" +.. code-block:: bash -2. Download Sire using + conda create -n sire -c conda-forge -c michellab sire + conda activate sire - ``git clone git@github.com:michellab/Sire.git`` +To install the latest development version you can use: -3. Change into the resulting Sire directory +.. code-block:: bash - ``cd Sire`` + conda create -n sire-dev -c conda-forge -c michellab/label/dev sire + conda activate sire-dev -4. Run the script to automatically compile and install Sire +If you find that Conda is particularly slow to install or upgrade, +then we advise using `mamba `__: - ``./compile_sire.sh`` +.. code-block:: bash - This script will ask you which directory you want to install - Sire. By default, this is ${HOME}/sire.app. You can choose anywhere - you want. In the documentation, $SIRE will refer to this - installation directory. You should set this as an environment - variable, e.g. + conda install -c conda-forge mamba - ``export SIRE=$HOME/sire.app`` +You can then replace all ``conda`` commands with ``mamba``, e.g.: -5. Running Sire - - To run a Sire script, e.g. script.py, simply using the Sire python - executable, e.g. +.. code-block:: bash - ``$SIRE/bin/python script.py`` + mamba create -n sire -c conda-forge -c michellab sire - Sire will automatically use all of the cores in a node to parallelise the job. - - Sire also comes with a set of installed scripts, that are linked to in the - $SIRE/bin directory. These include the "waterswap" script. To get help - with these scripts, use "--help", e.g. - - ``$SIRE/bin/waterswap --help`` - -6. Distributing your binaries - - To package your installation of Sire up into a self-extracting - executable, type - - ``$SIRE/bin/package_sire`` - - This will build a "sire.run" package that can be used to install Sire - on any machine that uses the same operating system, C and C++ library - as that on which you compiled the binary. - - To get further help, please get in touch with the authors - via the Sire mailing lists, or via the email links on the - Sire website, http://siremol.org +Packages are available for Python > 3.7 on Windows, MacOS and Linux. diff --git a/README.rst b/README.rst index f08b10f69..d24a94e01 100644 --- a/README.rst +++ b/README.rst @@ -65,30 +65,67 @@ You can then replace all ``conda`` commands with ``mamba``, e.g.: mamba create -n sire -c conda-forge -c michellab sire -There are also many `pre-built binary packages `__, -which are available for Linux, Mac OS X and Windows, which are quick and easy to install. - However, as you are here, it is likely you want to download the latest, greatest version of the code, which you will need to compile. To compile Sire, you need a Git client to download the source, and a working internet connection (needed by the Sire compilation scripts to download additional dependencies). -The easy install option is:: +First, you need to create and activate a conda environment, e.g. + +.. code-block:: bash + + conda create -n sire-dev + conda activate sire-dev + +We find that Conda is particularly slow to install or upgrade, +so we advise installing `mamba `__: + +.. code-block:: bash + + conda install -c conda-forge mamba + +Next, you need to install the Sire build dependencies. + +.. code-block:: bash + + mamba install cmake pip-requirements-parser + +You will also need to install compilers, e.g. on Linux use + +.. code-block:: bash + + mamba install gcc gxx + +on MacOS use + +.. code-block:: bash + + mamba install clang clangxx + +and on Windows use + +.. code-block:: bash + + mamba install conda-build + +Next, you can clone the Sire source code and compile and install Sire:: git clone git@github.com:michellab/Sire.git cd Sire - ./compile_sire.sh + python setup.py install A small word of warning, the compilation can easily take over an hour! -The above will download and install a new Miniconda Python installation, -into which Sire will be compiled and deployed (together with its -dependencies). This is by far the easiest way to compile and install Sire, -and is the route we strongly recommend. If you have any problems with -compiling and installing Sire, then please get in touch using the links below. +The above will compile Sire in your existing conda environment. + +If you plan to build `BioSimSpace `__ +on top of Sire, then you will need to resolve BioSimSpace's dependencies at +the time Sire is installed to ensure that it is built in a self-consistent way. +This can be achieved as follows: + +.. code-block:: bash -If you want to install Sire into an existing Miniconda or Anaconda -Python installation, please follow the instructions in `build/INSTALL_INTO_ANACONDA.rst `__. + python setup.py --install-bss-deps install Support and Development ======================= diff --git a/RELEASE_INSTRUCTIONS.rst b/RELEASE_INSTRUCTIONS.rst index 7bc2466a8..96a33bf98 100644 --- a/RELEASE_INSTRUCTIONS.rst +++ b/RELEASE_INSTRUCTIONS.rst @@ -6,9 +6,7 @@ The following instructions describe how to create a new Sire release: Step 1 ====== -Update the version number in the CMakeLists.txt files -`here `_ and -`here `_. +Update the version number in `version.txt `_. Step 2 ====== diff --git a/WINDOWS_INSTALL.rst b/WINDOWS_INSTALL.rst deleted file mode 100644 index 9587efaed..000000000 --- a/WINDOWS_INSTALL.rst +++ /dev/null @@ -1,140 +0,0 @@ -== Instructions for compiling and installing on windows == - -== All of this is EXPERIMENTAL == -This will be updated and replaced by instructions to compile against the -acaconda that is available as part of the WSL (Windows subsystem for Linux) -that is available as part of Windows 10 - -== MSYS2 BUILD == - -First, install msys2 by following the instructions on http://msys2.github.io -(follow the 64bit instructions as we should target 64bit windows) - -Then ensure that you have fully updated, e.g. via - - # pacman -Syuu - -Then install - - # pacman -S git - # pacman -S mingw-w64-x86_64-cmake - # pacman -S mingw-w64-x86_64-make - # pacman -S mingw-w64-x86_64-toolchain - -You need to ensure that you are using the mingw build tools. These are installed -into /mingw64, so you need to add /mingw64/bin to you PATH. We also need to -install the complete mingw64 build toolchain (compilers, make, linkers etc.) - -Do this by typing; - - # pacman -S mingw-w64-x86_64-gcc - -Also install nano if you like this editor ;-) - - # pacman -S nano - -Now install the dependencies of Sire - I gave up getting these compiled -manually! - - # pacman -Sy mingw-w64-x86_64-intel-tbb - # pacman -Sy mingw-w64-x86_64-qt5 - # pacman -Sy mingw-w64-x86_64-gsl - # pacman -Sy mingw-w64-x86_64-boost - # pacman -Sy mingw-w64-x86_64-python3 - # pacman -Sy mingw-w64-x86_64-pkg-config - -If this has worked, then typing "which gcc" and "which g++" should return - - # /mingw64/bin/gcc - # /mingw64/bin/g++ - -Then clone the Sire repository using - - # git clone https://github.com/michellab/Sire.git - -If this fails with a "child_info_fork" error, then you need to fix -your msys2 installation. Do this by exiting from msys2 and then running -autorebase.bat which is in the C:\msys2 directory. Then go back into -msys2 and try again. - -Next switch to the c++15 branch that holds the development code needed -to support windows - - # git checkout c++15 - -Change into the corelib build directory using - - # mkdir build/corelib - # cd build/corelib - -Now we need to link mingw32-make to make - - # ln -s /mingw64/bin/mingw32-make.exe /mingw64/bin/make - -Run cmake using - - # cmake -G "MSYS Makefiles" ../../corelib - -Then build using - - # mingw32-make install - - (note that you may have to copy sire.app/bundled/bin/libcpuid-10.dll to sire.app/bundled/lib/libcpuid.dll) - - -This works, and builds corelib - -For the wrappers, change into the wrapper build directory - - # cd ../wrapper - -Then run cmake again, using - - # cmake -G "MSYS Makefiles" -DCMAKE_NEED_RESPONSE=1 ../../wrapper - -Then build using - - # mingw32-make install - -While Sire compiles within the MSYS shell, I haven't got it to run from there -yet. You need to run from the standard windows cmd shell. - -First, you need to set the windows PATH. Can do this in a standard CMD shell, e.g. - - # PATH=C:\msys64\home\chzcjw\sire.app\bin;C:\msys64\home\chzcjw\sire.app\lib;C:\msys64\mingw64\lib;C:\msys64\mingw64\bin;%PATH% - # set PYTHONPATH=C:\msys64\mingw64\lib\python3.5;C:\msys64\home\chzcjw\sire.app\lib\python\site-packages - -(note that you will need to update the above based on where you compiled Sire, and - where msys64 is located on your machine) - -Now you can run Sire. Try - - # sire_python - -This should start up the Sire python shell. Into this, type - - # import Sire.Mol - -If this runs, then Sire has successfully imported the Sire.Mol module, -meaning that all of the libraries have been found correctly. - -To run waterswap or ligandswap, you need to run the associated python script -using the sire_python executable. For example - - # sire_python C:\msys64\home\chzcjw\sire.app\share\Sire\scripts\waterswap.py --help - -** At the moment, this is failing because my MSYS python can't find the _struct - module. This will need to be fixed... ** - -** FIX IS TO COPY SIRE_PYTHON AND ALL LIBRARIES INTO MSYS/BIN. NEED TO - INSTALL SIRE WITHIN MSYS!!! ** - -## Running tests - still not fully working - -Install nose. (quite difficult as python easy_install breaks with error -VC 6.0 is not supported. I am afraid that I didn't record how I got nose installed!) - -Then run within the - -cd \path\to\test_directory -\path\to\sire.app\bin\sire_python -m nose diff --git a/actions/collect_failed.py b/actions/collect_failed.py new file mode 100644 index 000000000..2836870aa --- /dev/null +++ b/actions/collect_failed.py @@ -0,0 +1,45 @@ + +# Script that collects as much as it can from a failed conda build so that it can +# be stored as a GitHub Actions artifact for download and further debugging + +import os +import sys +import glob +import tarfile + +if "BUILD_DIR" not in os.environ: + try: + os.environ["BUILD_DIR"] = sys.argv[1] + except Exception: + print("You need to supply BUILD_DIR") + sys.exit(-1) + +build_dir = os.environ["BUILD_DIR"] + +# We want to bzip up the last 'sire-*' and all 'broken-*' directories in build_dir +work_dirs = glob.glob(os.path.join(build_dir, "sire_*", "work", "build")) +broken_dirs = glob.glob(os.path.join(build_dir, "broke*")) + +if len(work_dirs) > 0: + work_dirs = [work_dirs[-1]] + +zipdirs = work_dirs + broken_dirs + +output_filename = os.path.join(build_dir, "failed.tar.bz2") + +print(f"Zipping up {zipdirs} to {output_filename}") + +def filter_function(tarinfo): + filename = tarinfo.name + #print(filename) + if filename.find('.git') != -1: + #print("excluded!") + return None + else: + return tarinfo + +with tarfile.open(output_filename, "w:bz2") as tar: + for dir in zipdirs: + tar.add(dir, arcname=os.path.basename(dir), filter=filter_function) + +print("Complete :-)") diff --git a/actions/parse_requirements.py b/actions/parse_requirements.py new file mode 100644 index 000000000..358e3fb20 --- /dev/null +++ b/actions/parse_requirements.py @@ -0,0 +1,47 @@ + + +def parse_requirements(filename): + """Parse the requirements and return (in conda notation) + the requirements for this system + """ + try: + from pip_requirements_parser import RequirementsFile + except ImportError as e: + print("\n\n[ERROR] ** You need to install pip-requirements-parser") + print("Run `conda install pip-requirements-parser\n\n") + raise e + + from pkg_resources import evaluate_marker + + reqs = RequirementsFile.from_file(filename).to_dict()["requirements"] + + deps = {} + + for req in reqs: + name = req["name"] + specifier = req["specifier"] + marker = req["marker"] + + if len(specifier) == 0: + specifier = "" + else: + specifier = specifier[0] + + if marker is not None: + # check to see if this line fits this platform + include = evaluate_marker(marker) + else: + include = True + + if include: + deps[name] = specifier + + reqs = list(deps.keys()) + reqs.sort() + + result = [] + + for req in reqs: + result.append(f"{req}{deps[req]}") + + return result diff --git a/actions/update_recipe.py b/actions/update_recipe.py new file mode 100644 index 000000000..0a86d328b --- /dev/null +++ b/actions/update_recipe.py @@ -0,0 +1,74 @@ + +import sys +import os +import subprocess + +script = os.path.abspath(sys.argv[0]) + +# we want to import the 'get_requirements' package from this directory +sys.path.insert(0, os.path.dirname(script)) + +from parse_requirements import parse_requirements + +# go up one directories to get the source directory +# (this script is in Sire/actions/) +srcdir = os.path.dirname(os.path.dirname(script)) + +print(f"Sire source is in {srcdir}") + +condadir = os.path.join(srcdir, "recipes", "sire") + +print(f"conda recipe in {condadir}") + +# Store the name of the recipe and template YAML files. +recipe = os.path.join(condadir, "meta.yaml") +template = os.path.join(condadir, "template.yaml") + +# Now parse all of the requirements +run_reqs = parse_requirements(os.path.join(srcdir, "requirements.txt")) +print(run_reqs) +build_reqs = parse_requirements(os.path.join(srcdir, "requirements_build.txt")) +print(build_reqs) +bss_reqs = parse_requirements(os.path.join(srcdir, "requirements_bss.txt")) +print(bss_reqs) + + +def run_cmd(cmd): + p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) + return str(p.stdout.read().decode("utf-8")).lstrip().rstrip() + +gitdir = os.path.join(srcdir, ".git") + +# Get the Sire branch. +sire_branch = run_cmd(f"git --git-dir={gitdir} --work-tree={srcdir} rev-parse --abbrev-ref HEAD") +print(sire_branch) + +lines = open(template, "r").readlines() + + +def dep_lines(deps): + lines = [] + + for dep in deps: + lines.append(f" - {dep}\n") + + return "".join(lines) + + +run_reqs = dep_lines(run_reqs) +build_reqs = dep_lines(build_reqs) +bss_reqs = dep_lines(bss_reqs) + + +with open(recipe, "w") as FILE: + for line in lines: + if line.find("SIRE_BUILD_REQUIREMENTS") != -1: + line = build_reqs + elif line.find("SIRE_RUN_REQUIREMENTS") != -1: + line = run_reqs + elif line.find("SIRE_BSS_REQUIREMENTS") != -1: + line = bss_reqs + else: + line = line.replace("SIRE_BRANCH", sire_branch) + + FILE.write(line) diff --git a/actions/upload_package.py b/actions/upload_package.py new file mode 100644 index 000000000..0585ad571 --- /dev/null +++ b/actions/upload_package.py @@ -0,0 +1,81 @@ + +import os +import sys +import glob + +script = os.path.abspath(sys.argv[0]) + +# go up one directories to get the source directory +# (this script is in Sire/actions/) +srcdir = os.path.dirname(os.path.dirname(script)) + +print(f"Sire source is in {srcdir}\n") + +# Get the anaconda token to authorise uploads +if "ANACONDA_TOKEN" in os.environ: + conda_token = os.environ["ANACONDA_TOKEN"] +else: + conda_token = "TEST" + +# get the build directory +if "BUILD_DIR" in os.environ: + conda_bld = os.environ["BUILD_DIR"] +else: + conda_bld = os.path.join("..", "build") + +print(f"conda_bld = {conda_bld}") + +# Find the packages to upload +sire_pkg = glob.glob(os.path.join(conda_bld, "*-*", "sire-*.tar.bz2")) +fkcombu_pkg = glob.glob(os.path.join(conda_bld, "*-*", "fkcombu-*.tar.bz2")) + +if len(sire_pkg) == 0: + print("No sire packages to upload?") + sys.exit(-1) + +packages = sire_pkg + +if len(fkcombu_pkg) == 0: + packages = packages + fkcombu_pkg + +print(f"Uploading packages:") +print(" * ", "\n * ".join(packages)) + +packages = " ".join(packages) + + +def run_cmd(cmd): + import subprocess + p = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE) + return str(p.stdout.read().decode("utf-8")).lstrip().rstrip() + +gitdir = os.path.join(srcdir, ".git") + +tag = run_cmd(f"git --git-dir={gitdir} --work-tree={srcdir} tag --contains") + +# If the tag is not empty, then set the label to main (this is a release) +if tag is not None and tag.lstrip().rstrip() != "": + print(f"\nTag {tag} is set. This is a 'main' release.") + label = "--label main --label dev" +else: + # this is a development release + print("\nNo tag is set. This is a 'devel' release.") + label = "--label dev" + +# Upload the packages to the michellab channel on Anaconda Cloud. +cmd = f"anaconda --token {conda_token} upload --user michellab {label} --force {packages}" + +print(f"\nUpload command:\n\n{cmd}\n") + +# Label release packages with main and dev so that dev is at least as new as +# main. Only need to uncomment the libcpuid and fkcombu package uploads when +# there new versions are released. +if conda_token == "TEST": + print("Not uploading as the ANACONDA_TOKEN is not set!") + sys.exit(-1) + +output = run_cmd(cmd) + +print(output) + +print("Package uploaded!") diff --git a/build/INSTALL_INTO_ANACONDA.rst b/build/INSTALL_INTO_ANACONDA.rst deleted file mode 100644 index 221c13dfa..000000000 --- a/build/INSTALL_INTO_ANACONDA.rst +++ /dev/null @@ -1,118 +0,0 @@ -== Instructions for installing Sire into an anaconda distribution == - -(1) Download and install a miniconda or anaconda distribution, e.g. - -wget http://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh - -chmod a+x Miniconda3-latest-Linux-x86_64.sh -./Miniconda3-latest-Linux-x86_64.sh - -You can choose to install this wherever you want. To keep the same -naming convention of Sire, you can choose $HOME/sire.app - -Now, you should have a python in $HOME/sire.app/bin/python. Test it. -Can you run a simple python script? - -(1a) Download and install OpenMM - -Sire now depends on OpenMM support, so install OpenMM into miniconda using the commands - -$HOME/sire.app/bin/conda config --add channels http://conda.binstar.org/omnia -$HOME/sire.app/bin/conda install openmm - -(this assumes that you installed miniconda into $HOME/sire.app) - -(2) Download the Sire source - -You can get this from git, e.g. grab the devel branch. I am going -to assume that you have downloaded it to $HOME/Sire, e.g. you should -have the directories - -$HOME/Sire/corelib - -and - -$HOME/Sire/wrapper - -(2) Create the build directories for the corelib and wrappers - -mkdir build -mkdir build/corelib -mkdir build/wrapper - -(3) Now compile the corelib, telling it to build into anaconda - -Do this by typing - -cd build/corelib -cmake -D ANACONDA_BUILD=on -D ANACONDA_BASE=$HOME/sire.app $HOME/Sire/corelib - -(this assumes that you have installed anaconda into $HOME/sire.app and - you have the corelib source in $HOME/Sire/corelib. Note that this will -autodetect and use OpenMM if you have installed it using step 1a.) - -This will now configure the corelib for installation into the anaconda distribution -in $HOME/sire.app - -This will take some time. Have a coffee. - -Once the cmake command has finished, you can now compile the corelib -using the command - -nice make -j 8 - -(-j says how parallel you want to be. If you have 16 cores on your node, - you may want to be more parallel, e.g. -j 16. Equally, if you only have - four cores on your laptop, you may want to be less parallel e.g, -j 4) - -This will also take a long time. You can have more coffee. - -Once this has finished, you can install corelib into -the anaconda distribution by typing - -make -j 8 install/strip - -Once this has finished, you should find that the sire libraries are -visible in $HOME/sire.app/pkgs/sire-0.0.1/lib, e.g. - -ls $HOME/sire.app/pkgs/sire-0.0.1/lib/libSireMol* - -should show all of the SireMol libraries. - -(4) Now compile the python wrappers, also telling it to install - into the anaconda directory - -cd ../wrapper -cmake -D ANACONDA_BUILD=on -D ANACONDA_BASE=$HOME/sire.app $HOME/Sire/wrapper - -(again, this assumes that you have put anaconda into $HOME/sire.app - and that the Sire source is in $HOME/Sire) - -This will configure the python wrappers for installation into the anaconda -directory. Again, this may take a while... - -Once the cmake command has finished, you compile the wrappers using - -make -j 8 - -Again, this will take a while to complete... - -Once the compilation has finished, install using - -make -j 8 install/strip - -Once this has finished, you should find that you have a sire_python -(and all other Sire executables) in $HOME/sire.app/bin. Try to run -one of the Sire programs, e.g. - -$HOME/sire.app/bin/waterswap - -You should see some instructions on how to use the waterswap -program. - -To test your installation, type - -$HOME/sire.app/bin/sire_test - -Hopefully, all of the tests will pass... - diff --git a/build/README b/build/README deleted file mode 100644 index 766677ab4..000000000 --- a/build/README +++ /dev/null @@ -1,8 +0,0 @@ -This directory is used by the automatic Sire build -script to build both the corelib and python wrappers. - -These directories are used by the build_sire.py script -that is contained in this directory, and which must -be called using the python interpreter that is contained -in a working anaconda or miniconda distribution. - diff --git a/build/README.md b/build/README.md new file mode 100644 index 000000000..936844c4c --- /dev/null +++ b/build/README.md @@ -0,0 +1,6 @@ +# Build Directory + +Sire will be built in this directory if you use the `setup.py` script. + +It is safe to remove anything that is created in this directory. + diff --git a/build/build_sire.py b/build/build_sire.py deleted file mode 100755 index 8c60e2989..000000000 --- a/build/build_sire.py +++ /dev/null @@ -1,495 +0,0 @@ -## This script is used to finish the compile of Sire corelib and wrappers -## This script must be called using the python from a miniconda or -## anaconda distribution - -import sys -import sysconfig -import os -import glob -import time -import argparse -import subprocess -import multiprocessing -import platform - - -def parse_args(): - parser=argparse.ArgumentParser() - parser.add_argument("-C", "--corelib", action="append", nargs=1, - metavar=("PARAMETER=VALUE",), default=[], - help="pass CMake definitions for corelib") - parser.add_argument("-W", "--wrapper", action="append", nargs=1, - metavar=("PARAMETER=VALUE",), default=[], - help="pass CMake definitions for wrapper") - parser.add_argument("-G", "--generator", action="append", nargs=1, - metavar=("GENERATOR",), default=[], - help="pass CMake generator") - parser.add_argument("-n", "--ncores", action="store", type=int, nargs=1, - metavar=("N_CORES",), default=multiprocessing.cpu_count(), - help="Number of CPU cores used for compiling corelib " - "(defaults to all available on the current system)") - parser.add_argument("-N", "--npycores", action="store", type=int, nargs=1, - metavar=("N_PYTHON_CORES",), default=-1, - help="Number of CPU cores used for compiling Python wrappers " - "(defaults to the number of CPU cores used for compiling corelib)") - parser.add_argument("--noconda", action="store_true", - help="Use pip rather than conda to install dependencies") - parser.add_argument("--no-openmm", action="store_true", - help="Compile Sire without OpenMM support") - return parser.parse_args() - - -if __name__ == "__main__": - args = parse_args() - - is_linux = False - is_windows = False - is_mingw = False - is_osx = False - - exe_suffix = "" - if platform.system() == "Linux": - is_linux = True - print("Compiling on Linux") - elif platform.system() == "Darwin": - is_osx = True - print("Compiling on MacOS") - elif platform.system() == "Windows": - exe_suffix = ".exe" - #print("Sorry - compiling into miniconda on Windows is not supported yet") - #args.noconda = True - is_mingw = (sysconfig.get_platform() == "mingw") - is_windows = (sysconfig.get_platform().startswith("win")) - else: - print("Unrecognised build platform: %s" % platform.system()) - sys.exit(-1) - - install_script = sys.argv[0] - build_dir = os.path.abspath( os.path.dirname(install_script) ) - - # Get the number of cores to use for any compiling - if this is 0, then - # we use all of the cores - try: - NCORES = int(os.environ["NCORES"]) - except KeyError: - NCORES = args.ncores - - # Get the number of cores to use for compiling the python wrappers - this - # defaults to NCORES - try: - NPYCORES = int(os.environ["NPYCORES"]) - except KeyError: - # default to half the number to save memory - NPYCORES = args.npycores if args.npycores > 0 else NCORES - - print("Number of cores used for compilation = %d" % NCORES) - - if NPYCORES != NCORES: - print("Number of cores used for wrapper compilation = %d" % NPYCORES) - - if args.noconda: - python_exe = sys.executable - py_module_install = [python_exe, "-m", "pip", "install"] - conda_base = "" - else: - conda_base = os.path.abspath(os.path.dirname(sys.executable)) - - if os.path.basename(conda_base) == "bin": - conda_base = os.path.dirname(conda_base) - - python_exe = None - conda_exe = None - - if os.path.exists(os.path.join(conda_base, "bin", "conda")): - conda_bin = os.path.join(conda_base, "bin") - python_exe = os.path.join(conda_bin, "python") - conda_exe = os.path.join(conda_bin, "conda") - elif os.path.exists(os.path.join(conda_base, "python.exe")): - conda_bin = os.path.join(conda_base, "Library", "bin") - python_exe = os.path.join(conda_base, "python.exe") - conda_exe = os.path.join(conda_base, "Scripts", "conda.exe") - else: - print("Cannot find a 'conda' binary in directory '%s'. " - "Are you running this script using the python executable " - "from a valid miniconda or anaconda installation?" % conda_base) - sys.exit(-1) - py_module_install = [conda_exe, "install", "--yes"] - - print("Continuing the Sire install using %s %s" \ - % (python_exe, sys.argv[0])) - - # now go through all of the python modules that need to be available - # into this conda installation, and make sure they have been installed - - conda_pkgs = [] - - # first, pip - try: - import pip - print("pip is already installed...") - except ImportError: - if args.noconda: - print("Could not import pip - please make sure " - "pip is available within your current Python environment " - "then re-run this script.") - sys.exit(-1) - else: - print("Installing pip using '%s install pip'" % conda_exe) - conda_pkgs.append("pip") - - # ipython - try: - import IPython - print("ipython is already installed...") - except ImportError: - conda_pkgs.append("ipython") - - # pytest - try: - import pytest - print("pytest is already installed...") - except ImportError: - conda_pkgs.append("pytest") - - # nose - try: - import nose - print("nose is already installed...") - except ImportError: - conda_pkgs.append("nose") - - # libnetcdf - try: - import netCDF4 - print("netCDF4 is already installed...") - except ImportError: - # had to step back from 1.5.8 as this isn't available - # yet on Linux (works on MacOS) - conda_pkgs.append("netcdf4=1.5.7") - - CC = None - CXX = None - cmake = "cmake%s" % exe_suffix - if (not args.noconda): - # We pin Conda packages to the highest version that is available on - # Linux, macOS, and Windows-x64. - - # boost - if os.path.exists(os.path.join(conda_base, "include", "boost", "python.hpp")): - print("boost is already installed...") - else: - conda_pkgs.append("boost=1.74.0") - - # gsl - if os.path.exists(os.path.join(conda_base, "include", "gsl", "gsl_version.h")): - print("gsl is already installed...") - else: - conda_pkgs.append("gsl=2.7") - - # tbb - if os.path.exists(os.path.join(conda_base, "include", "tbb", "tbb.h")): - print("TBB is already installed...") - else: - conda_pkgs.append("tbb=2021.5.0") - conda_pkgs.append("tbb-devel=2021.5.0") - - # Qt5 - try: - import PyQt5 - print("Qt5 is already installed...") - except ImportError: - if is_osx and platform.machine() == "arm64": - # This is the version needed for Apple M1 - conda_pkgs.append("pyqt=5.15.2") - else: - conda_pkgs.append("pyqt=5.12.3") - - # pymbar (not available on aarch64 and breaks some MacOS) - if (not is_osx) and platform.machine() not in ["aarch64", "arm64"]: - try: - import pymbar - print("pymbar is already installed...") - except ImportError: - conda_pkgs.append("pymbar=3.0.5") - - # compilers (so we keep binary compatibility) - if is_osx: - try: - CXX = glob.glob(os.path.join(conda_bin, "clang++"))[0] - CC = glob.glob(os.path.join(conda_bin, "clang"))[0] - print("clang++ is already installed...") - except: - conda_pkgs.append("clang_osx-64") - conda_pkgs.append("clangxx_osx-64") - elif is_linux: - try: - CXX = glob.glob(os.path.join(conda_bin, "*-g++"))[0] - CC = glob.glob(os.path.join(conda_bin, "*-gcc"))[0] - except: - conda_pkgs.append("gcc_linux-64") - conda_pkgs.append("gxx_linux-64") - conda_pkgs.append("sysroot_linux-64==2.17") - - if (not is_windows): - if os.path.exists(os.path.join(conda_bin, "make")): - print("make is already installed...") - else: - conda_pkgs.append("make") - make = os.path.join(conda_bin, "make") - if os.path.exists(os.path.join(conda_bin, "libtool")): - print("libtool is already installed...") - else: - conda_pkgs.append("libtool") - - if os.path.exists(os.path.join(conda_bin, "cmake%s" % exe_suffix)): - print("cmake is already installed...") - else: - conda_pkgs.append("cmake") - - cmake = os.path.join(conda_bin, "cmake%s" % exe_suffix) - - # check if the user wants to link against openmm - use_openmm = True - - if args.no_openmm: - print("DISABLING OPENMM SUPPORT") - use_openmm = False - - for d in args.corelib: - if ("SIRE_USE_OPENMM=OFF" in d[0]): - use_openmm = False - break - - # openmm last as different repo - if use_openmm: - try: - import openmm - print("openmm is already installed...") - except ImportError: - if args.noconda: - print("It looks like the openmm Python modules are not " - "available - please check your openmm installation") - sys.exit(-1) - else: - conda_pkgs.append("openmm=7.7.0") - - # Write the packages as a requirements.txt file. This will help - # us later when we develop other ways of installing Sire - if len(conda_pkgs) > 0: - with open(f"requirements/requirements_{platform.system()}_{platform.machine()}.txt", "w") as FILE: - for pkg in conda_pkgs: - FILE.write(f"{pkg}\n") - - if (not args.noconda) and conda_pkgs: - cmd = "%s config --prepend channels conda-forge" % conda_exe - print("Activating conda-forge channel using: '%s'" % cmd) - status = subprocess.run(cmd.split()) - if status.returncode != 0: - print("Failed to add conda-forge channel!") - sys.exit(-1) - - cmd = "%s config --set channel_priority strict" % conda_exe - print("Setting channel priority to strict using: '%s'" % cmd) - status = subprocess.run(cmd.split()) - if status.returncode != 0: - print("Failed to set channel priority!") - sys.exit(-1) - - if is_osx and platform.machine() == "arm64": - # Now update conda - this is needed to fix libffi compatibility - # errors that break conda - cmd = [conda_exe, "update", "-y", "-n", "base", - "-c", "defaults", "conda"] - print("Updating conda base using: '%s'" % " ".join(cmd)) - status = subprocess.run(cmd) - - if status.returncode != 0: - print("Something went wrong with the update!") - sys.exit(-1) - - # Need to run this command to prevent conda errors on - # some platforms - see - # https://github.com/ContinuumIO/anaconda-issues/issues/11246 - # If we don't do this, then we can't resolve dependencies - # on MacOS M1 - print("Setting channel priority to false using: '%s'" % cmd) - cmd = "%s config --set channel_priority false" % conda_exe - status = subprocess.run(cmd.split()) - if status.returncode != 0: - print("Failed to set channel priority!") - sys.exit(-1) - - cmd = [*py_module_install, *conda_pkgs] - print("Installing packages using: '%s'" % " ".join(cmd)) - status = subprocess.run(cmd) - - if status.returncode != 0: - print("Something went wrong installing dependencies!") - sys.exit(-1) - - # make sure we really have found the compilers - if (not args.noconda): - if is_osx: - try: - CXX = glob.glob(os.path.join(conda_bin, "clang++"))[0] - CC = glob.glob(os.path.join(conda_bin, "clang"))[0] - print("clang++ is already installed...") - except: - print("Cannot find the conda clang++ binaries!") - sys.exit(-1) - elif is_linux: - try: - CXX = glob.glob(os.path.join(conda_bin, "*-g++"))[0] - CC = glob.glob(os.path.join(conda_bin, "*-gcc"))[0] - except: - print("Cannot find the conda g++ binaries!") - sys.exit(-1) - - print("Using compilers %s | %s" % (CC, CXX)) - - # Make sure all of the above output is printed to the screen - # before we start running any actual compilation - sys.stdout.flush() - - # Now that the miniconda distribution is ok, the next step - # is to use cmake to build the corelib and wrapper in the build/corelib - # and build/wrapper directories - - # change into the build/corelib directory - OLDPWD = os.getcwd() - - coredir = os.path.join(build_dir, "corelib") - - if not os.path.exists(coredir): - os.makedirs(coredir) - - if not os.path.isdir(coredir): - print("SOMETHING IS WRONG. %s is not a directory?" % coredir) - sys.exit(-1) - - os.chdir(coredir) - - def add_default_cmake_defs(cmake_defs): - for a in ("ANACONDA_BUILD=ON", "ANACONDA_BASE=%s" % conda_base.replace("\\", "/"), "BUILD_NCORES=%s" % NCORES): - if (args.noconda and a.startswith("ANACONDA")): - continue - found = False - for d in cmake_defs: - if (a in d[0]): - found = True - break - if (not found): - cmake_defs.append([a]) - - if is_osx: - # don't compile with AVX as the resulting binaries won't - # work on M1 macs - cmake_defs.append(["SIRE_DISABLE_AVX=ON"]) - cmake_defs.append(["SIRE_DISABLE_AVX512F=ON"]) - - def make_cmd(ncores, install = False): - if is_windows: - action = "INSTALL" if install else "ALL_BUILD" - make_args = "%s -- /m:%s /p:Configuration=Release /p:Platform=x64" % (action, ncores) - else: - action = "install" if install else "" - make_args = "%s -- VERBOSE=1 -j %s" % (action, ncores) - return make_args.split() - - if os.path.exists("CMakeCache.txt"): - # we have run cmake in this directory before. Run it again. - status = subprocess.run([cmake, "."]) - else: - # this is the first time we are running cmake - sourcedir = os.path.join(os.path.dirname(os.path.dirname( - os.getcwd())), "corelib") - - if not os.path.exists(os.path.join(sourcedir, "CMakeLists.txt")): - print("SOMETHING IS WRONG. There is no file %s" % os.path.join(sourcedir, "CMakeLists.txt")) - sys.exit(-1) - - for a in ("NetCDF_ROOT_DIR", "OPENMM_ROOT_DIR"): - for i, d in enumerate(args.corelib): - if (a in d[0]): - v = args.corelib.pop(i)[0] - if (not a in os.environ): - os.environ[a] = v.split("=")[-1] - add_default_cmake_defs(args.corelib) - cmake_cmd = [cmake, *sum([["-D", d[0]] for d in args.corelib], []), - *sum([["-G", g[0]] for g in args.generator], []), - sourcedir] - if (CC): - os.environ["CC"] = CC - if (CXX): - os.environ["CXX"] = CXX - print(" ".join(cmake_cmd)) - sys.stdout.flush() - status = subprocess.run(cmake_cmd) - - if status.returncode != 0: - print("SOMETHING WENT WRONG WHEN USING CMAKE ON CORELIB!") - sys.exit(-1) - - # Now that cmake has run, we can compile and install corelib - make_args = make_cmd(NCORES, True) - - print("NOW RUNNING \"%s\" --build . --target %s" % (cmake, " ".join(make_args))) - sys.stdout.flush() - status = subprocess.run([cmake, "--build", ".", "--target", *make_args]) - - if status.returncode != 0: - print("SOMETHING WENT WRONG WHEN COMPILING CORELIB!") - sys.exit(-1) - - # Ok, that is all complete. Next we must work on the - # python wrappers - os.chdir(OLDPWD) - - wrapperdir = os.path.join(build_dir, "wrapper") - - if not os.path.exists(wrapperdir): - os.makedirs(wrapperdir) - - if not os.path.isdir(wrapperdir): - print("SOMETHING IS WRONG. %s is not a directory?" % wrapperdir) - sys.exit(-1) - - os.chdir(wrapperdir) - - if os.path.exists("CMakeCache.txt"): - # we have run cmake in this directory before. Run it again. - status = subprocess.run([cmake, "."]) - else: - # this is the first time we are running cmake - sourcedir = os.path.join(os.path.dirname(os.path.dirname( - os.getcwd())), "wrapper") - - if not os.path.exists(os.path.join(sourcedir, "CMakeLists.txt")): - print("SOMETHING IS WRONG. There is no file %s" % os.path.join(sourcedir, "CMakeLists.txt")) - sys.exit(-1) - - add_default_cmake_defs(args.wrapper) - cmake_cmd = [cmake, *sum([["-D", d[0]] for d in args.wrapper], []), - *sum([["-G", g[0]] for g in args.generator], []), - sourcedir] - print(" ".join(cmake_cmd)) - sys.stdout.flush() - status = subprocess.run(cmake_cmd) - - if status.returncode != 0: - print("SOMETHING WENT WRONG WHEN USING CMAKE ON WRAPPER!") - sys.exit(-1) - - make_args = make_cmd(NPYCORES, True) - - # Now that cmake has run, we can compile and install wrapper - print("NOW RUNNING \"%s\" --build . --target %s" % (cmake, " ".join(make_args))) - sys.stdout.flush() - status = subprocess.run([cmake, "--build", ".", "--target", *make_args]) - - if status.returncode != 0: - print("SOMETHING WENT WRONG WHEN COMPILING WRAPPER!") - sys.exit(-1) - - print("\n\n=================================") - print("Congratulations. Everything has installed :-)") diff --git a/build/quick_compile.sh b/build/quick_compile.sh deleted file mode 100755 index 4d3372f19..000000000 --- a/build/quick_compile.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -# This is a simple script that runs the minimum commands needed to -# compile and install Sire, assuming it has already been successfully -# compiled and installed. This is useful to speed up development, -# as you can run this script instead of `compile_sire.sh` in the -# above directory. - -# Only run this script if you know what you are doing ;-) - -set -e - -cd corelib -/Users/chzcjw/sire.app/bin/cmake --build . --target install -- VERBOSE=1 -j 8 -cd ../wrapper -/Users/chzcjw/sire.app/bin/cmake --build . --target install -- VERBOSE=1 -j 8 -cd .. diff --git a/compile_sire.bat b/compile_sire.bat deleted file mode 100644 index 4a8c4c9f9..000000000 --- a/compile_sire.bat +++ /dev/null @@ -1,112 +0,0 @@ -@echo off - -set OPTIND=0 -set OPTION_h= -set OPTION_help= -set OPTION_install= -set OPTION_G= -set OPTION_clean= - -:_loop_args - set _getopt_arg=%1 - if defined _getopt_arg ( - call :parse_arg %_getopt_arg% - if not errorlevel 1 ( - shift /1 - set /a OPTIND+=1 - goto :_loop_args - ) - ) -set _getopt_arg= -set _getopt_opt= -set _getopt_value= -set _getopt_bool= -goto :main - -:parse_arg -set _getopt_opt= -set _getopt_value=%~1 -set _getopt_bool=1 -if not "%_getopt_value:~0,1%"=="/" goto :_parse_arg_ret -set _getopt_value=%_getopt_value:~1% -:_loop_arg_chars - if not defined _getopt_value goto :_parse_arg_ret - if "%_getopt_value:~0,1%"==":" ( - set _getopt_bool= - set _getopt_value=%_getopt_value:~1% - goto :_parse_arg_ret - ) else ( - set _getopt_opt=%_getopt_opt%%_getopt_value:~0,1% - set _getopt_value=%_getopt_value:~1% - ) - goto :_loop_arg_chars -:_parse_arg_ret -if not defined _getopt_opt exit /B 1 -if defined _getopt_bool ( - call :set_opt %_getopt_opt% %_getopt_bool% -) else ( - call :set_opt %_getopt_opt% %_getopt_value% -) -exit /B 0 - -:set_opt -set OPTION_%1=%~2 -exit /B 0 - -:main -if defined OPTION_h set OPTION_help=1 -if defined OPTION_help ( - echo compile_sire.bat /h or /help shows help. 1>&2 - echo compile_sire.bat /install:\path\to\sire.app will install Sire in \path\to\sire.app 1>&2 - echo compile_sire.bat /clean completely cleans the build directory. 1>&2 - exit /B 0 -) -if not defined OPTION_install set OPTION_install=C:\sire.app -if not defined OPTION_G set "OPTION_G=Visual Studio 15 2017 Win64" -set "GENERATOR=%OPTION_G%" -set "INSTALL_SIRE_DIR=%OPTION_install%" -if defined OPTION_clean ( - echo rmdir /S /Q build/miniconda.sh build\corelib build\wrapper - echo del Miniconda3-*-Windows-*.exe - rmdir 2> NUL /S /Q build/miniconda.sh build\corelib build\wrapper - del 2> NUL Miniconda3-*-Windows-*.exe - echo ...all clean - exit /B 0 -) - -set "MINICONDA_VERSION=4.8.3" -set "PYTHON_VERSION=py37" -if [%processor_architecture%]==[AMD64] set MINICONDA_ARCH=x86_64 -if [%processor_architecture%]==[x86] set MINICONDA_ARCH=x86 -if not defined MINICONDA_ARCH ( - echo Unsupported architecture. - exit /B 1 -) -echo Running an install under Windows -set MINICONDA_INSTALLER=Miniconda3-%PYTHON_VERSION%_%MINICONDA_VERSION%-Windows-%MINICONDA_ARCH%.exe -set MINICONDA=https://repo.continuum.io/miniconda/%MINICONDA_INSTALLER% -if exist "%INSTALL_SIRE_DIR%\" ( - echo Install directory "%INSTALL_SIRE_DIR%" already exists. Assuming that miniconda is already installed here. -) else ( - if not exist build\%MINICONDA_INSTALLER% ( - echo ** Downloading miniconda from %MINICONDA%... ** - powershell -Command "Invoke-WebRequest '%MINICONDA%' -OutFile 'build\%MINICONDA_INSTALLER%'" - ) - echo ** Installing miniconda ** - build\%MINICONDA_INSTALLER% /InstallationType=JustMe /AddToPath=0 /RegisterPython=0 /NoRegistry=1 /S /D=%INSTALL_SIRE_DIR% -) -if exist "%INSTALL_SIRE_DIR%\python.exe" ( - echo ** Running the Python install script... ** - echo ** "%INSTALL_SIRE_DIR%\python.exe" build\build_sire.py -G "%GENERATOR%" ** - call "%INSTALL_SIRE_DIR%\Scripts\activate.bat - "%INSTALL_SIRE_DIR%\python.exe" build\build_sire.py -W Boost_NO_BOOST_CMAKE=ON -G "%GENERATOR%" - call conda.bat deactivate - set PROMPT=$P$G - exit /B 0 -) else ( - echo ** FATAL ** - echo ** Cannot find "%INSTALL_SIRE_DIR%\python.exe" ** - echo ** Something went wrong with the miniconda install! ** - echo ** Remove "%INSTALL_SIRE_DIR%", then run compile_sire.bat --clean, then try again ** - exit /B 1 -) diff --git a/compile_sire.sh b/compile_sire.sh deleted file mode 100755 index a7412f3da..000000000 --- a/compile_sire.sh +++ /dev/null @@ -1,227 +0,0 @@ -#!/bin/bash - -### -### This is a script that can be used to completely compile and -### install Sire from the current directory. This script will -### download and install miniconda, install openmm into that -### and will then configure and compile Sire in build/corelib -### and build/python -### - -build_and_install_sire() -{ -# Now set the MACOSX_DEPLOYMENT_TARGET to make sure -# that we can work with Mavericks or above (needed by Qt5) -if [[ "$OSTYPE" == "darwin"* ]]; then - export MACOSX_DEPLOYMENT_TARGET="10.9" - export SDKROOT=`xcrun --show-sdk-path` -fi - -# Now run the python install script -[ -z "$CONDA_PYTHON" ] && [ -e "${INSTALL_DIR}/bin/python" ] && CONDA_PYTHON="${INSTALL_DIR}/bin/python" -[ -z "$CONDA_PYTHON" ] && [ -e "${INSTALL_DIR}/python" ] && CONDA_PYTHON="${INSTALL_DIR}/python" -if [ ! -z "$CONDA_PYTHON" ]; then - CONDA_BINDIR="`dirname "$CONDA_PYTHON"`" - echo "** Running the conda activate script... **" - echo "** . \"$CONDA_BINDIR/activate\"" - . "$CONDA_BINDIR/activate" "" - echo "** Running the Python install script... **" - echo "** $CONDA_PYTHON build/build_sire.py $NO_OPENMM **" - $CONDA_PYTHON build/build_sire.py $NO_OPENMM - err=$? - conda deactivate - exit $err -else - echo "** FATAL **" - echo "** Cannot find conda python **" - echo "** Something went wrong with the miniconda install! **" - echo "** Remove ${INSTALL_DIR}, then run compile_sire.sh --clean, then try again **" - exit -1 -fi -} - -# Process arguments -key="$1" - -case $key in - -h|--help) - echo "compile_sire.sh -h/--help shows help." - echo "compile_sire.sh --install /path/to/sire.app will install Sire in /path/to/sire.app" - echo "compile_sire.sh --clean completely cleans the build directory." - exit 0 - ;; - --install) - INSTALL_SIRE_DIR="$2" - echo "Installing Sire into ${INSTALL_SIRE_DIR}" - ;; - --no-openmm) - NO_OPENMM="--no-openmm" - echo "Compiling a version of Sire without OpenMM support" - ;; - --clean) - echo "Completely cleaning the build directories..." - echo "rm -rf build/miniconda.sh build/corelib/* build/wrapper/*" - rm -rf build/miniconda.sh build/corelib/* build/wrapper/* - echo "...all clean" - exit 0 - ;; -esac - -# Set the version of miniconda to use. Choose "latest" for the latest -# miniconda, or set a specific version here -MINICONDA_VERSION="4.10.3" -#MINICONDA_VERSION="latest" - -# Set the Python version. Sire has been compiled successfully -# for all versions from Python 3.6-3.9. Your choice is more about -# what things you want to install on top of Sire, e.g. RDKit etc -PYTHON_VERSION="py38" - -if [ -z "$INSTALL_SIRE_DIR" ]; then - # Ask the user where they would like to install sire. By default - # we will aim for $HOME/sire.app - echo -n "Where would you like to install Sire? [$HOME/sire.app]: " - read INSTALL_DIR - - if [ ! ${INSTALL_DIR} ]; then - INSTALL_DIR=$HOME/sire.app - else - # Use eval so that we can expand variables such as $HOME - INSTALL_DIR=`eval echo ${INSTALL_DIR}` - fi -else - INSTALL_DIR=`eval echo ${INSTALL_SIRE_DIR}` -fi - -echo "Installing into directory '${INSTALL_DIR}'" - -# Check whether or not miniconda has been downloaded and -# installed into this directory -if [ -e "${INSTALL_DIR}/bin/python" ] || [ -e "${INSTALL_DIR}/python.exe" ]; then - build_and_install_sire - exit 0 -fi - -# Now work out if we are 32bit or 64bit... -LONG_BIT=$(getconf LONG_BIT) -OS_BIT=$(uname -m) - -# (note that BIT_TYPE is the string used by miniconda to -# denote a 32bit or 64bit operating system) -BIT_TYPE="x86_64" - -if [ ${LONG_BIT} == "64" ]; then - echo "64 bit processor" -elif [ ${LONG_BIT} == "32" ]; then - echo "32 bit processor" -else - echo "Unknown number of bits. Assuming 64 bit" -fi - -if [ ${OS_BIT} == "x86_64" ]; then - echo "x86_64 operating system" -elif [ ${OS_BIT} == "ppc64le" ]; then - echo "ppc64le operating system" - BIT_TYPE=ppc64le -elif [ ${OS_BIT} == "arm64" ]; then - echo "arm64 operating system" - BIT_TYPE="arm64" -elif [ ${OS_BIT} == "aarch64" ]; then - echo "arm64 operating system" - BIT_TYPE="aarch64" -elif [ ${LONG_BIT} == "32" ]; then - # must be 32 bit operating system on 32 bit processor - echo "i386 operating system" - BIT_TYPE="x86" -elif [ ${OS_BIT} == "i386" ] || [ ${OS_BIT} == "i486" ] || [ ${OS_BIT} == "i586" ] || [ ${OS_BIT} == "i686" ]; then - echo "i386 operating system" - BIT_TYPE="x86" -else - echo "Assuming a 64 bit operating system." - echo "If you want to change this, set BIT_TYPE to x86 here" - #BIT_TYPE="x86" -fi - -REPO="https://repo.anaconda.com/miniconda" - -# Work out whether we are on OS X, Linux or Windows, and -# then download the appropriate miniconda distribution -if [ "$(uname)" == "Darwin" ]; then - # This is running on a Mac - PLATFORM="MacOS" - - if [ ${BIT_TYPE} == "arm64" ]; then - echo "Compiling a native M1 version of Sire" - echo "Using an older conda as the newer one isn't available" - MINICONDA_VERSION="4.10.1" - else - echo "Compiling an X64-64 version of Sire." - echo "This version should work on M1 Macs as well as older Intel Macs" - fi - - MINICONDA="${REPO}/Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-MacOSX-${BIT_TYPE}.sh" -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - # This is running on Linux - PLATFORM="Linux" - MINICONDA="${REPO}/Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Linux-${BIT_TYPE}.sh" -elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW32_NT" ]; then - # This is running on Windows NT - echo "Compilation on windows is not supported." - exit -1 -elif [ "$(expr substr $(uname -s) 1 9)" == "CYGWIN_NT" ]; then - # This is running on windows under cygwin - echo "Running an install under cygwin on windows" - PLATFORM="Windows" - SUBPLATFORM="Cygwin" - MINICONDA="${REPO}/Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Windows-${BIT_TYPE}.exe" -elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then - # This is running on windows under cygwin - echo "Running an install under MSYS2 on windows" - PLATFORM="Windows" - SUBPLATFORM="MSYS2" - MINICONDA="${REPO}/Miniconda3-${PYTHON_VERSION}_${MINICONDA_VERSION}-Windows-${BIT_TYPE}.exe" -else - # Cannot identify the platform. Tell the user to download - # miniconda directly - echo "Cannot identify your operating system / platform." - echo "Please download and install miniconda manually, and then " - echo "use the Python from that miniconda to run the build/build_sire.py script." - PLATFORM="$(uname -s)" - echo $PLATFORM - exit -1 -fi - -if [ -e ${INSTALL_DIR} ]; then - echo "Install directory already exists. Assuming that miniconda is already installed here." -else - if [ ${PLATFORM} == "Windows" ]; then - # Download miniconda.exe if it is not already in build/downloads - if [ ! -e "build/miniconda.exe" ]; then - echo "** Downloading miniconda from ${MINICONDA}... **" - echo "curl -L ${MINICONDA} -o build/miniconda.exe" - curl -L ${MINICONDA} -o build/miniconda.exe - chmod a+x build/miniconda.exe - fi - - # Now unpack miniconda and install it into the requested directory - echo "Running the miniconda installation. Make sure you install miniconda just for yourself." - echo "Also, ensure that you install miniconda into the directory 'C:\msys2\${INSTALL_DIR}'" - echo "Also note that you should't select the option to 'add anaconda to the PATH' or to" - echo "register anaconda as the default python" - ./build/miniconda.exe - else - # Download miniconda if it is not already in build/downloads - if [ ! -e "build/miniconda.sh" ]; then - echo "** Downloading miniconda from ${MINICONDA}... **" - echo "** wget ${MINICONDA} -O build/miniconda.sh 2>/dev/null || curl -L ${MINICONDA} -o build/miniconda.sh **" - wget ${MINICONDA} -O build/miniconda.sh 2>/dev/null || curl -L ${MINICONDA} -o build/miniconda.sh - fi - - # Now unpack miniconda and install it into the requested directory - echo "** Unpacking miniconda into ${INSTALL_DIR}... **" - echo "** bash build/miniconda.sh -b -p ${INSTALL_DIR} **" - bash build/miniconda.sh -b -p ${INSTALL_DIR} - fi -fi - -build_and_install_sire diff --git a/corelib/CMakeLists.txt b/corelib/CMakeLists.txt index 648cc0092..415e94932 100644 --- a/corelib/CMakeLists.txt +++ b/corelib/CMakeLists.txt @@ -2,48 +2,31 @@ # # CMake Project file for Sire # -# (C) Christopher Woods -# ################################ -set (S_VERSION_MAJOR "2022") -set (S_VERSION_MINOR "2") -set (S_VERSION_PATCH "0") +# require cmake >= 3.3.0 (released in 2018) +cmake_minimum_required(VERSION 3.3.0 FATAL_ERROR) +cmake_policy(VERSION 3.3) + +# Read the version number (so we can set it once in one place) +file (STRINGS "../version.txt" VERSION_TEXT) + +string(REGEX MATCH "([0-9]*).([0-9]*).([0-9]*)" _ ${VERSION_TEXT}) +set (S_VERSION_MAJOR ${CMAKE_MATCH_1}) +set (S_VERSION_MINOR ${CMAKE_MATCH_2}) +set (S_VERSION_PATCH ${CMAKE_MATCH_3}) set (SIRE_VERSION "${S_VERSION_MAJOR}.${S_VERSION_MINOR}.${S_VERSION_PATCH}") +message( STATUS "Building Sire ${SIRE_VERSION}") + ############ ############ SETTING INITIAL SIRE VARIABLES ############ -# require cmake >= 3.0.0 -cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) -cmake_policy(VERSION 2.8) - # use loose loop syntax in CMakeLists files set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE ) -if(COMMAND CMAKE_POLICY) - if (POLICY CMP0025) - cmake_policy(SET CMP0025 NEW) # Anaconda clang is called Clang, not AppleClang - endif() - if (POLICY CMP0042) - cmake_policy(SET CMP0042 OLD) # managing OS X @rpath manually - endif() - if (POLICY CMP0048) - cmake_policy(SET CMP0048 OLD) # want to manage versions myself! - endif() - if (POLICY CMP0028) - cmake_policy(SET CMP0028 OLD) # Qt has colons in names, which new cmake hates - endif() - if (POLICY CMP0045) - cmake_policy(SET CMP0045 OLD) # Allow non-existant targets with -NOTFOUND - endif() - if (POLICY CMP0020) - cmake_policy(SET CMP0020 NEW) # Automatically link to qtmain on windows - endif() -endif() - # Get rid of install messages (too verbose!) set( CMAKE_INSTALL_MESSAGE "NEVER" ) @@ -64,116 +47,36 @@ if ( NCORES EQUAL 0 ) endif() endif() -if ( CMAKE_GENERATOR MATCHES "Xcode" ) - message( STATUS "Creating Sire Xcode files. Note that this will " - "only work if Sire has already been installed..." ) - - # Look for the Sire cmake config file that should have been - # installed with Sire... - if (NOT DEFINED SIRE_APP) - set( SIRE_APP "$ENV{HOME}/sire.app" CACHE PATH - "The full path to the sire.app installed Sire application." ) - endif() - - set( SIRE_INCLUDE_DIR "${SIRE_APP}/include/Sire" ) - - set ( SIRE_COMP_CMAKE "${SIRE_INCLUDE_DIR}/cmake/SireCompileVariables.cmake" ) +message(STATUS "Configuring on a machine with number of cores = ${NCORES}") - #�Look for the "SireCompileVariables.cmake" file in the install directory - if (EXISTS "${SIRE_COMP_CMAKE}") - include( "${SIRE_COMP_CMAKE}" ) - else() - # try the anaconda path - set( CONDA_APP "$ENV{HOME}/sire.app/pkgs/sire-${SIRE_VERSION}" CACHE PATH - "Install directory for Sire within the Anaconda/Miniconda distribution" ) +message( STATUS "Building into an existing conda installation..." ) - set( SIRE_INCLUDE_DIR "${CONDA_APP}/include/Sire" ) - set ( SIRE_COMP_CMAKE "${SIRE_INCLUDE_DIR}/cmake/SireCompileVariables.cmake" ) +# Where is anaconda installed +if (NOT DEFINED ANACONDA_BASE) + set( ANACONDA_BASE "$ENV{HOME}/miniconda3" CACHE PATH + "Install directory for conda (python3)" ) +endif() - if (EXISTS "${SIRE_COMP_CMAKE}") - include( "${SIRE_COMP_CMAKE}" ) - else() - message( STATUS "You need to provide the full path to sire.app and check that it contains the file ${SIRE_COMP_CMAKE}" ) - message( FATAL_ERROR "Do this by running 'cmake -G Xcode -DSIRE_APP=/path/to/sire.app /path/to/corelib/source'" ) +# Make sure that there is a python3 executable in the bin directory +if (DEFINED PYTHON_EXECUTABLE) + if ( NOT EXISTS "${PYTHON_EXECUTABLE}" ) + message( FATAL_ERROR "Cannot find python3. " + "Please set the full path to the conda " + "installation directory." ) endif() - endif() - - # Now set the C++, C and Fortran compilers to be used to compile the wrappers - # These have to be the same as used to compile corelib - set(CMAKE_C_COMPILER "${SIRE_C_COMPILER}") - set(CMAKE_CXX_COMPILER "${SIRE_CXX_COMPILER}") - - message( STATUS "Setting C compiler to ${SIRE_C_COMPILER} and C++ compiler to ${SIRE_CXX_COMPILER}" ) else() - message(STATUS "Configuring on a machine with number of cores = ${NCORES}") - - # Option to compile and install into an anaconda or miniconda directory - option( ANACONDA_BUILD "Build into an existing anaconda/miniconda installation" OFF ) - - if ( ANACONDA_BUILD ) - message( STATUS "Building into an existing Anaconda/Miniconda installation..." ) - # Where is anaconda installed - if (NOT DEFINED ANACONDA_BASE) - set( ANACONDA_BASE "$ENV{HOME}/miniconda3" CACHE PATH - "Install directory for Anaconda/Miniconda (python3)" ) - endif() - - # Make sure that there is a python3 executable in the bin directory - if (DEFINED PYTHON_EXECUTABLE) - if ( NOT EXISTS "${PYTHON_EXECUTABLE}" ) - message( FATAL_ERROR "Cannot find python3. " - "Please set the full path to the Anaconda or Miniconda " - "installation directory." ) - endif() - else() - if ( NOT EXISTS "${ANACONDA_BASE}/bin/python3" AND NOT EXISTS "${ANACONDA_BASE}/python.exe" ) - message( FATAL_ERROR "Cannot find python3. " - "Please set the full path to the Anaconda or Miniconda " - "installation directory." ) - endif() + if ( NOT EXISTS "${ANACONDA_BASE}/bin/python3" AND NOT EXISTS "${ANACONDA_BASE}/python.exe" ) + message( FATAL_ERROR "Cannot find python3. " + "Please set the full path to the conda " + "installation directory." ) endif() +endif() - set( SIRE_INSTALL_PREFIX "${ANACONDA_BASE}/pkgs/sire-${SIRE_VERSION}" CACHE PATH - "Install directory for Sire within the Anaconda/Miniconda distribution" FORCE) +set( SIRE_INSTALL_PREFIX "${ANACONDA_BASE}/pkgs/sire-${SIRE_VERSION}" CACHE PATH + "Install directory for Sire within the conda" FORCE) - set(CMAKE_INSTALL_PREFIX "${SIRE_INSTALL_PREFIX}" CACHE INTERNAL - "Prefix prepended to install directories" FORCE ) - -# elseif( WIN32 OR WIN64 ) # need this instead of MSYS as don't know we are MSYS yet... -# -# message(STATUS "Compiling on windows using MSYS2/MINGW64...") -# set( MINGW_BASE "C:/msys64/mingw64" CACHE PATH "MSYS MINGW64 root directory" ) -# get_filename_component(MINGW_CMAKE_BIN ${CMAKE_COMMAND} DIRECTORY) -# get_filename_component(MINGW_CMAKE_ROOT ${MINGW_CMAKE_BIN} DIRECTORY) -# message(STATUS "Using cmake ${CMAKE_COMMAND} from MING64 base ${MINGW_CMAKE_ROOT}") -# -# set( MINGW_BASE "${MINGW_CMAKE_ROOT}") -# set( MINGW_PYTHON "${MINGW_BASE}/bin/python3.exe" ) -# -# if ( NOT EXISTS "${MINGW_PYTHON}" ) -# message(STATUS "Cannot find mingw python3 executable, ${MINGW_PYTHON}") -# message(STATUS "Can only install Sire into a MINGW installation with a valid python3.exe.") -# message(STATUS "This is normally in the file C:/msys64/mingw64/bin/python3.exe.") -# message(STATUS "Please install MSYS2/MINGW64 with the MINGW python3 package.") -# message(STATUS "Set MINGW_BASE in cmake to point to your MSYS2/MINGW64 installation directory.") -# message(FATAL_ERROR "Cannot compile until mingw python3 is installed...") -# endif() -# -# set( SIRE_INSTALL_PREFIX "${MINGW_BASE}" ) -# set( CMAKE_INSTALL_PREFIX "${SIRE_INSTALL_PREFIX}" CACHE INTERNAL -# "Prefix prepended to install directories" FORCE ) - else() - #�Option to set the install directory of Sire - if (NOT DEFINED SIRE_APP) - set(SIRE_APP "$ENV{HOME}/sire.app") - endif() - set( SIRE_INSTALL_PREFIX "${SIRE_APP}" CACHE PATH - "Install directory for Sire. This directory can be moved after compilation" ) - - set(CMAKE_INSTALL_PREFIX "${SIRE_INSTALL_PREFIX}" CACHE INTERNAL - "Prefix prepended to install directories" FORCE ) - endif() -endif() +set(CMAKE_INSTALL_PREFIX "${SIRE_INSTALL_PREFIX}" CACHE INTERNAL + "Prefix prepended to install directories" FORCE ) message( STATUS "Sire will be compiled and installed to directory ${CMAKE_INSTALL_PREFIX}" ) set ( SIRE_APP "${ANACONDA_BASE}" ) @@ -185,12 +88,30 @@ if ( CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR ) message( FATAL_ERROR "You must run CMake in a different directory to the source!" ) endif() +if ("$ENV{CONDA_BUILD}" STREQUAL "1") + message( STATUS "Compiling as part of a conda-build") +else() + # conda can set incorrect CXX flags (i.e. -mtune=haswell on MacOS M1!) + # If is safer to completely unset these flags, except for on a conda build + unset(ENV{CXXFLAGS}) + unset(ENV{DEBUG_CXXFLAGS}) + unset(ENV{CFLAGS}) + unset(ENV{DEBUG_CFLAGS}) +endif() + +message( STATUS "ABOUT TO RUN PROJECT" ) + # name the project project (SIRE CXX C) -# Whether or not to build the parts of Sire that depend on -# a graphical environment (e.g. inquire) -option ( SIRE_BUILD_GUI "Build graphical applications" OFF ) +message( STATUS "PROJECT COMPLETE" ) + +# make sure that libraries are not found in any system directories +# This is because everything will be linked to from the conda directory +set (CMAKE_IGNORE_PATH) +foreach (_prefix, /usr /opt /usr/local /usr/local/Frameworks ) + list(APPEND CMAKE_IGNORE_PATH ${_prefix}/include ${_prefix}/lib ${_prefix}/lib64) +endforeach() # Create a file in which we can save the values of all useful variables. # This will mean that projects using Sire won't have to set these variables @@ -212,16 +133,12 @@ save_sire_variable( "SIRE_APP" "${SIRE_APP}" ) save_sire_variable( "S_VERSION_MAJOR" "${S_VERSION_MAJOR}" ) save_sire_variable( "S_VERSION_MINOR" "${S_VERSION_MINOR}" ) save_sire_variable( "S_VERSION_PATCH" "${S_VERSION_PATCH}" ) -save_sire_variable( "SIREE_VERSION" "${SIRE_VERSION}" ) +save_sire_variable( "SIRE_VERSION" "${SIRE_VERSION}" ) save_sire_variable( "SIRE_VERSION_STRING" "${SIRE_VERSION_STRING}" ) save_sire_variable( "SIRE_APP_DIR" "${CMAKE_INSTALL_PREFIX}" ) -save_sire_variable( "SIRE_ANACONDA_BUILD" "${ANACONDA_BUILD}" ) save_sire_variable( "BUILD_NCORES" "${NCORES}" ) - -if (ANACONDA_BUILD) - save_sire_variable( "SIRE_ANACONDA_BASE" "${ANACONDA_BASE}" ) -endif() +save_sire_variable( "SIRE_ANACONDA_BASE" "${ANACONDA_BASE}" ) # Ensure that the Sire's directories are searched for header files # before the system directories - this prevents problems in case @@ -245,10 +162,6 @@ set (SIRE_BIN "bin") # Shared library install dir set (SIRE_LIBS "lib") -# Where to install all bundled components -set (SIRE_BUNDLED_DIR "bundled" ) -set (SIRE_BUNDLED_LIBS "${SIRE_BUNDLED_DIR}/lib") - # Static library install dir set (SIRE_ARCHIVES "lib/static") # Include (header) files install dir @@ -262,7 +175,7 @@ set (SIRE_TEST "test") set( SIRE_SHARE_EXPORT "${SIRE_SHARE}") # Add these directories to the RPATH variable for the libraries / executables, -# so that they can find each other when loading +# so that they can find each other when loading - we will manually handle RPATH set( CMAKE_SKIP_RPATH FALSE ) set (CMAKE_SKIP_BUILD_RPATH FALSE) @@ -274,10 +187,10 @@ if (APPLE) # Add the two passed directories to the @rpaths to search for libraries. @executable_path # is the directory containing the executable, so the libraries are included in - # @exeutable_path/../${SIRE_LIBS} and @exeutable_path/../${SIRE_BUNDLED_LIBS} - set (SIRE_INSTALL_RPATH "@executable_path/.:@executable_path/../${SIRE_LIBS}:@executable_path/../${SIRE_BUNDLED_LIBS}") + # @exeutable_path/../${SIRE_LIBS} + set (SIRE_INSTALL_RPATH "@executable_path/.:@executable_path/../${SIRE_LIBS}") else() - set (SIRE_INSTALL_RPATH "\$ORIGIN/.:\$ORIGIN/../${SIRE_LIBS}:\$ORIGIN/../${SIRE_BUNDLED_LIBS}") + set (SIRE_INSTALL_RPATH "\$ORIGIN/.:\$ORIGIN/../${SIRE_LIBS}") endif() set (CMAKE_INSTALL_RPATH "${SIRE_INSTALL_RPATH}") @@ -286,8 +199,6 @@ set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) save_sire_variable( "SIRE_INSTALL_PREFIX" "${CMAKE_INSTALL_PREFIX}" ) save_sire_variable( "SIRE_BIN" "${SIRE_BIN}" ) save_sire_variable( "SIRE_LIBS" "${SIRE_LIBS}" ) -save_sire_variable( "SIRE_BUNDLED_DIR" "${SIRE_BUNDLED_DIR}" ) -save_sire_variable( "SIRE_BUNDLED_LIBS" "${SIRE_BUNDLED_LIBS}" ) save_sire_variable( "SIRE_ARCHIVES" "${SIRE_ARCHIVES}" ) save_sire_variable( "SIRE_INCLUDES" "${SIRE_INCLUDES}" ) save_sire_variable( "SIRE_SHARE" "${SIRE_SHARE}" ) @@ -300,10 +211,10 @@ save_sire_variable( "SIRE_TEST" "${SIRE_TEST}" ) # set (CMAKE_VERBOSE_MAKEFILE ON) # Path to the project's extra cmake files -set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/build/cmake ${CMAKE_SOURCE_DIR}/build/cmake/cmake_cxx11) +set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/build/cmake) # Options to pass to 'strip' when stripping the libraries -#�(on linux, aix and mac need to use '-x' to ensure we leave +# (on Linux, AIX and MacOS need to use '-x' to ensure we leave # the global symbols) set ( SIRE_STRIP_OPTIONS "-x" CACHE STRING "Options to pass to 'strip'" ) save_sire_variable( "SIRE_STRIP_OPTIONS" "${SIRE_STRIP_OPTIONS}" ) @@ -317,7 +228,8 @@ configure_file( set ( CMAKE_STRIP "${CMAKE_CURRENT_BINARY_DIR}/cmake_strip" ) -# Add option to turn on or off symbol hiding +# Add option to turn on or off symbol hiding - it is really needed +# to keep the symbol table manageable option ( SIRE_SYMBOL_HIDING "Turn on library symbol hiding" ON ) save_sire_variable( "SIRE_SYMBOL_HIDING" "${SIRE_SYMBOL_HIDING}" ) @@ -331,18 +243,12 @@ option ( SIRE_DISABLE_SSE "Prevent use of SSE when compiling" OFF ) # Add option to disable use of AVX option ( SIRE_DISABLE_AVX "Prevent use of AVX when compiling" OFF ) -# Add option to disable use of AVX512F) +# Add option to disable use of AVX512F - this should almost always +# be disabled as it doesn't improve performance and can be buggy option ( SIRE_DISABLE_AVX512F "Prevent use of AVX512F when compiling" ON ) -# Add an option to force off Fortran compilation and linking -option ( SIRE_DISABLE_FORTRAN "Turn off Fortran compilation and linking" ON ) -save_sire_variable( "SIRE_DISABLE_FORTRAN" "${SIRE_DISABLE_FORTRAN}" ) - -if (SIRE_DISABLE_FORTRAN) - message( STATUS "Disabling any code that requires compilation or linking to Fortran" ) -endif() - -# Add an option to say whether or not to use OpenMM +# Add an option to say whether or not to use OpenMM - this is installed +# via conda and should be available and usable option( SIRE_USE_OPENMM "Set whether or not to compile in support for OpenMM" ON ) save_sire_variable( "SIRE_USE_OPENMM" "${SIRE_USE_OPENMM}" ) @@ -390,6 +296,7 @@ set( SIRE_EXE_LINK_FLAGS "" CACHE INTERNAL "Flags needed to link executables" ) ############# DETECTING AND CONFIGURING THE COMPILER ############# +# Need to define these symbols for the tests below if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) set (SLASH_HYPHEN "/") set (COLON_EQUALS ":") @@ -427,19 +334,13 @@ if (SIRE_HAS_CPP_LIB) endif() if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) - CHECK_CXX_COMPILER_FLAG( "/std:c++11" SIRE_HAS_CPP_11 ) - CHECK_CXX_COMPILER_FLAG( "/std:c++1y" SIRE_HAS_CPP_1Y ) CHECK_CXX_COMPILER_FLAG( "/std:c++14" SIRE_HAS_CPP_14 ) else() - CHECK_CXX_COMPILER_FLAG( "-std=c++11" SIRE_HAS_CPP_11 ) - CHECK_CXX_COMPILER_FLAG( "-std=c++1y" SIRE_HAS_CPP_1Y ) CHECK_CXX_COMPILER_FLAG( "-std=c++14" SIRE_HAS_CPP_14 ) endif() save_sire_variable( "SIRE_HAS_CPP_LIB" "${SIRE_HAS_CPP_LIB}" ) -save_sire_variable( "SIRE_HAS_CPP_11" "${SIRE_HAS_CPP_11}" ) -save_sire_variable( "SIRE_HAS_CPP_1Y" "${SIRE_HAS_CPP_1Y}" ) save_sire_variable( "SIRE_HAS_CPP_14" "${SIRE_HAS_CPP_14}" ) option( SIRE_SKIP_LIBC++ "Force Sire to ignore libc++ (e.g. in case of broken clang on linux" OFF ) @@ -462,39 +363,19 @@ if (SIRE_HAS_CPP_14) message(STATUS "Compiler supports C++ 2014") set(SIRE_CXX_NG_FLAGS "${SIRE_CXX_NG_FLAGS} ${SLASH_HYPHEN}std${COLON_EQUALS}c++14 ${SLASH_HYPHEN}DSIRE_HAS_CPP_14 ${SLASH_HYPHEN}DSIRE_HAS_CPP_1Y ${SLASH_HYPHEN}DSIRE_HAS_CPP_11") - if (NEED_UNDEF_STRICT_ANSI) - message( STATUS "Undefining __STRICT_ANSI__ because of compile problems") - set(SIRE_CXX_NG_FLAGS "${SIRE_CXX_NG_FLAGS} -U__STRICT_ANSI__") - endif() -elseif (SIRE_HAS_CPP_1Y) - message(STATUS "Compiler supports C++ 201Y (pre-2014)") - set(SIRE_CXX_NG_FLAGS "${SIRE_CXX_NG_FLAGS} ${SLASH_HYPHEN}std=c++1y ${SLASH_HYPHEN}DSIRE_HAS_CPP_1Y ${SLASH_HYPHEN}DSIRE_HAS_CPP_11") - - if (NEED_UNDEF_STRICT_ANSI) - message( STATUS "Undefining __STRICT_ANSI__ because of compile problems") - set(SIRE_CXX_NG_FLAGS "${SIRE_CXX_NG_FLAGS} -U__STRICT_ANSI__") - endif() -elseif (SIRE_HAS_CPP_11) - message(STATUS "Compiler supports C++ 2011") - set(SIRE_CXX_NG_FLAGS "${SIRE_CXX_NG_FLAGS} ${SLASH_HYPHEN}std${COLON_EQUALS}c++11 ${SLASH_HYPHEN}DSIRE_HAS_CPP_11") - if (NEED_UNDEF_STRICT_ANSI) message( STATUS "Undefining __STRICT_ANSI__ because of compile problems") set(SIRE_CXX_NG_FLAGS "${SIRE_CXX_NG_FLAGS} -U__STRICT_ANSI__") endif() else() message( FATAL_ERROR "Cannot compile Sire as we now require a modern C++ " - "compiler that supports at least C++ 2011 (-std=c++11)") + "compiler that supports at least C++ 2014 (-std=c++14)") endif() save_sire_variable( "SIRE_CXX_NG_FLAGS" "${SIRE_CXX_NG_FLAGS}" ) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${SIRE_CXX_NG_FLAGS}") -# Find which C++ 2011/Y/4 features are supported -include (CheckCXX11Features) - -message( STATUS "C++11 supported features: ${CXX11_FEATURE_LIST}" ) set( SIRE_COMPILER "UNKNOWN" ) if (NOT ${CMAKE_C_COMPILER_ID} STREQUAL ${CMAKE_CXX_COMPILER_ID}) @@ -505,12 +386,14 @@ endif() string( TOUPPER ${CMAKE_CXX_COMPILER_ID} SIRE_CXX_COMPILER_ID ) -# TEMP - TESTING VECTOR DETECTOR +# Brings in the functions used below to find the vectorisation flags include (FindVector) # Add compiler specific flags if ( ${SIRE_CXX_COMPILER_ID} MATCHES "GNU" ) + # This is the default for conda on Linux + message( STATUS "Detected and using GCC C and C++ compilers" ) set( SIRE_COMPILER "GCC" ) @@ -532,26 +415,17 @@ if ( ${SIRE_CXX_COMPILER_ID} MATCHES "GNU" ) message( STATUS "Using GCC version " "${GCC_MAJOR_VERSION}.${GCC_MINOR_VERSION}" ) - # First, we need at least GCC 4.8, as we need C++ 11 support - if ( GCC_MAJOR_VERSION LESS 5 ) - if ( GCC_MINOR_VERSION LESS 8 ) - message( FATAL_ERROR "Sire requires GCC >= 4.8. Please upgrade " - "your version of GCC." ) - endif() + # First, we need at least GCC 7, (released 2018). GCC 11 comes with conda + if ( GCC_MAJOR_VERSION LESS 7 ) + message( FATAL_ERROR "Sire requires GCC >= 7.0. Please upgrade " + "your version of GCC." ) endif() set ( SIRE_SMALL_FLAGS "-Os" ) set ( SIRE_WARNALL_FLAGS "-Wall" ) set ( SIRE_DEBUG_FLAGS "-g" ) - if ( GCC_MAJOR_VERSION GREATER 4 ) - # GCC >= 5 still show weird crashes when using O3 which don't - # show up with other compilers. It is probably my fault, but - # until I find out why, we have to limit compilation to -O2 - set ( SIRE_RELEASE_FLAGS "-O2 -ffast-math" ) - else() - set ( SIRE_RELEASE_FLAGS "-O3 -ffast-math" ) - endif() + set ( SIRE_RELEASE_FLAGS "-O3 -ffast-math" ) # -fomit-frame-pointer breaks backtrace on an apple set ( SIRE_RELEASE_FLAGS "${SIRE_RELEASE_FLAGS} -fomit-frame-pointer" ) @@ -585,6 +459,8 @@ if ( ${SIRE_CXX_COMPILER_ID} MATCHES "GNU" ) elseif ( ${SIRE_CXX_COMPILER_ID} MATCHES "CLANG" ) + # This is the default for conda on MacOS + message( STATUS "Detected and using clang C and C++ compilers" ) set( SIRE_COMPILER "CLANG" ) @@ -631,6 +507,9 @@ elseif ( ${SIRE_CXX_COMPILER_ID} MATCHES "CLANG" ) elseif( ${CMAKE_CXX_COMPILER} MATCHES "icpc" ) + # This is not tested as it is not the default with conda. + # Use at your own risk + message( STATUS "Compiling with the Intel compiler" ) set( SIRE_COMPILER "INTEL" ) @@ -666,6 +545,8 @@ elseif( ${CMAKE_CXX_COMPILER} MATCHES "icpc" ) elseif (MSVC) + # This is the default for conda on Windows + add_compile_options("/EHsc") add_compile_options("/permissive-") add_compile_options("/Zc:twoPhase-") @@ -699,194 +580,84 @@ save_sire_variable( "SIRE_COMPILER" "${SIRE_COMPILER}" ) ################ SORTING OUT ALL OF SIRE'S DEPENDENCIES ################ -# Tell CMake to run moc when necessary +# Tell CMake to not run moc when necessary (we don't use moc or the QObject system) set(CMAKE_AUTOMOC OFF) -# As moc files are generated in the binary dir, tell CMake -# to always look for includes there: +# Always useful to look for header files in the current directory set(CMAKE_INCLUDE_CURRENT_DIR ON) -if ( CMAKE_GENERATOR MATCHES "Xcode" ) - # Xcode build - use the libraries that are already installed... - -else() - # Option to disable all bundles - option( SIRE_ENABLE_BUNDLING "Allow Sire to use bundled libraries" ON ) - - # Fine-grain control of bundling each dependency - option( SIRE_BUNDLE_TBB "Whether Sire should use its bundled copy of TBB" ON ) - option( SIRE_BUNDLE_GSL "Whether Sire should use its bundled copy of GSL" ON ) - # Don't bundle CPUID on Power9. - if (NOT ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "ppc64le") - option( SIRE_BUNDLE_CPUID "Whether Sire should use its bundled copy of libcpuid" ON ) - else() - option( SIRE_BUNDLE_CPUID "Whether Sire should use its bundled copy of libcpuid" OFF ) - message( STATUS "Not bundling libcpuid. CPU detection is disabled on Power9 architecture." ) - endif() - option( SIRE_BUNDLE_BOOST "Whether Sire should use its bundled copy of Boost" ON ) - option( SIRE_BUNDLE_BLASLAPACK "Whether Sire should use its bundled copy of BLAS and LAPACK" ON ) - option( SIRE_BUNDLE_QT "Whether Sire should use its bundled copy of Qt" ON ) - option( SIRE_BUNDLE_OPENMM "Whether Sire should use its bundled copy of OpenMM" OFF ) - - save_sire_variable( "SIRE_ENABLE_BUNDLING" "${SIRE_ENABLE_BUNDLING}" ) - save_sire_variable( "SIRE_BUNDLE_TBB" "${SIRE_BUNDLE_TBB}" ) - save_sire_variable( "SIRE_BUNDLE_CPUID" "${SIRE_BUNDLE_CPUID}" ) - save_sire_variable( "SIRE_BUNDLE_GSL" "${SIRE_BUNDLE_GSL}" ) - save_sire_variable( "SIRE_BUNDLE_BOOST" "${SIRE_BUNDLE_BOOST}" ) - save_sire_variable( "SIRE_BUNDLE_BLASLAPACK" "${SIRE_BUNDLE_BLASLAPACK}" ) - save_sire_variable( "SIRE_BUNDLE_QT" "${SIRE_BUNDLE_QT}" ) - save_sire_variable( "SIRE_BUNDLE_OPENMM" "${SIRE_BUNDLE_OPENMM}" ) - - set (SIRE_FOUND_TBB FALSE) - set (SIRE_FOUND_GSL FALSE) - set (SIRE_FOUND_BOOST FALSE) - set (SIRE_FOUND_BLASLAPACK FALSE) - set (SIRE_FOUND_QT FALSE) - set (SIRE_FOUND_OPENMM FALSE) - set (SIRE_FOUND_NETCDF FALSE) - set (SIRE_FOUND_CPUID FALSE) - - if ( ${SIRE_ENABLE_BUNDLING} ) - message( STATUS "Sire will be compiled to use its own copy of bundled libraries." ) - - set( BUNDLE_BUILDDIR "${CMAKE_BINARY_DIR}/build_bundled" ) - - if ( MSYS ) - message( STATUS "No bundling - using libraries provided by MSYS2/MINGW64...") - set( BUNDLE_STAGEDIR "${CMAKE_INSTALL_PREFIX}" ) - else() - set( BUNDLE_STAGEDIR "${CMAKE_INSTALL_PREFIX}/${SIRE_BUNDLED_DIR}" ) - - if (NOT EXISTS "${BUNDLE_BUILDDIR}") - file(MAKE_DIRECTORY ${BUNDLE_BUILDDIR}) - endif() - - if (NOT EXISTS "${BUNDLE_STAGEDIR}") - file(MAKE_DIRECTORY ${BUNDLE_STAGEDIR}) - endif() - - if (NOT EXISTS "${BUNDLE_STAGEDIR}/lib") - file(MAKE_DIRECTORY ${BUNDLE_STAGEDIR}/lib) - endif() - - if (NOT EXISTS "${BUNDLE_STAGEDIR}/include") - file(MAKE_DIRECTORY ${BUNDLE_STAGEDIR}/include) - endif() - endif() - - if ( ${SIRE_BUNDLE_TBB} ) - include( "src/bundled/install_tbb.cmake" ) - endif() - - if ( ${SIRE_BUNDLE_CPUID} ) - include( "src/bundled/install_cpuid.cmake" ) - endif() - - if ( ${SIRE_BUNDLE_GSL} ) - include( "src/bundled/install_gsl.cmake" ) - - if (${SIRE_FOUND_GSL}) - list(APPEND SIREMATHS_EXTRA_LIBRARIES ${GSL_LIBRARY}) - list(APPEND SIREMATHS_EXTRA_LIBRARIES ${GSL_CBLAS_LIBRARY}) - endif() - - endif() - - if ( ${SIRE_BUNDLE_BOOST} ) - include( "src/bundled/install_boost.cmake" ) - endif() - - if ( ${SIRE_BUNDLE_QT} ) - include( "src/bundled/install_qt5.cmake" ) - endif() - - if ( NOT MSYS ) - if ( NOT ${BUNDLE_STAGEDIR} STREQUAL "${CMAKE_INSTALL_PREFIX}/${SIRE_BUNDLED_DIR}" ) - # All of the bundled objects are built into the directory ${CMAKE_BINARY_DIR}/bundled - # This directory must be installed into the sire.app/ directory - install( DIRECTORY ${BUNDLE_STAGEDIR} - DESTINATION ${CMAKE_INSTALL_PREFIX} - USE_SOURCE_PERMISSIONS ) - endif() - endif() - endif() -endif() +set (SIRE_FOUND_TBB FALSE) +set (SIRE_FOUND_GSL FALSE) +set (SIRE_FOUND_BOOST FALSE) +set (SIRE_FOUND_BLASLAPACK FALSE) +set (SIRE_FOUND_QT FALSE) +set (SIRE_FOUND_OPENMM FALSE) +set (SIRE_FOUND_NETCDF FALSE) if ( NOT ${SIRE_FOUND_QT} ) - # look for Qt5 in the system - find_package( Qt5Core REQUIRED ) + # look for Qt5 in the system - this should be found from conda + find_package( Qt5Core REQUIRED ) endif() -if ( NOT ${SIRE_FOUND_NETCDF} ) - # look for netcdf in the system (ideally from conda) - if (ANACONDA_BUILD) - set(NetCDF_ROOT_DIR "${ANACONDA_BASE}") - endif() - - FIND_PACKAGE( NetCDF ) +get_target_property(QT5_LOCATION Qt5::Core LOCATION) +get_filename_component(SIRE_QT5CORE_DIR ${QT5_LOCATION} PATH) +message( STATUS "Qt5Core location ${SIRE_QT5CORE_DIR}" ) +save_sire_variable( "SIRE_QT5CORE_DIR" "${SIRE_QT5CORE_DIR}" ) - if ( ${NetCDF_FOUND} ) - message(STATUS "Found NetCDF in ${NetCDF_INCLUDE_DIR} | ${NetCDF_LIBRARIES}") - set( SIRE_FOUND_NETCDF 1 ) - save_sire_variable( "SIRE_NetCDF_INCLUDE_DIR" "${NetCDF_INCLUDE_DIR}" ) - save_sire_variable( "SIRE_NetCDF_LIBRARIES" "${NetCDF_LIBRARIES}" ) - save_sire_variable( "SIRE_NetCDF_FOUND" "${NetCDF_FOUND}" ) - else() - message(STATUS "Cannot find NetCDF - disabling its use!") - save_sire_variable( "SIRE_NetCDF_FOUND" "${NetCDF_FOUND}" ) - set( SIRE_FOUND_NETCDF 0 ) - endif() +if ( NOT ${SIRE_FOUND_NETCDF} ) + # look for netcdf in the system from conda + set(NetCDF_ROOT_DIR "${ANACONDA_BASE}") + FIND_PACKAGE( NetCDF ) + + if ( ${NetCDF_FOUND} ) + message(STATUS "Found NetCDF in ${NetCDF_INCLUDE_DIR} | ${NetCDF_LIBRARIES}") + set( SIRE_FOUND_NETCDF 1 ) + save_sire_variable( "SIRE_NetCDF_INCLUDE_DIR" "${NetCDF_INCLUDE_DIR}" ) + save_sire_variable( "SIRE_NetCDF_LIBRARIES" "${NetCDF_LIBRARIES}" ) + save_sire_variable( "SIRE_NetCDF_FOUND" "${NetCDF_FOUND}" ) + else() + message(STATUS "Cannot find NetCDF - disabling its use!") + save_sire_variable( "SIRE_NetCDF_FOUND" "${NetCDF_FOUND}" ) + set( SIRE_FOUND_NETCDF 0 ) + endif() else() message(STATUS "Using NetCDF from ${NetCDF_INCLUDE_DIR} | ${NetCDF_LIBRARIES}") endif() if ( SIRE_USE_OPENMM ) if ( NOT ${SIRE_FOUND_OPENMM} ) - # look for OpenMM in the system - # Now look for OpenMM - if (ANACONDA_BUILD) - set(OpenMM_ROOT_DIR "${ANACONDA_BASE}") - set(OPENMM_ROOT_DIR "${ANACONDA_BASE}") - FIND_PACKAGE( OpenMM ) - else() - option (OPENMM_HOME "The location of the OpenMM installation" "/usr/local/openmm") - set(OpenMM_ROOT_DIR "${OPENMM_HOME}") - FIND_PACKAGE( OpenMM ) - endif() - - save_sire_variable( "SIRE_OpenMM_FOUND" "${OpenMM_FOUND}" ) - - if ( ${OpenMM_FOUND} ) - message( STATUS "Found OpenMM at ${OpenMM_ROOT_DIR}" ) - save_sire_variable( "SIRE_OpenMM_INCLUDE_DIR" "${OpenMM_INCLUDE_DIR}" ) - save_sire_variable( "SIRE_OpenMM_LIBRARIES" "${OpenMM_LIBRARIES}" ) - save_sire_variable( "SIRE_OpenMM_LIBRARY_DIR" "${OpenMM_LIBRARY_DIR}" ) - else() - message( STATUS "Could not find OpenMM. OpenMM support is disabled." ) - endif() - else() - message( STATUS "Disabling use of OpenMM at user request.") - save_sire_variable( "SIRE_OpenMM_FOUND" "${SIRE_USE_OPENMM}" ) + # look for OpenMM in the system + set(OpenMM_ROOT_DIR "${ANACONDA_BASE}") + set(OPENMM_ROOT_DIR "${ANACONDA_BASE}") + FIND_PACKAGE( OpenMM ) + + save_sire_variable( "SIRE_OpenMM_FOUND" "${OpenMM_FOUND}" ) + + if ( ${OpenMM_FOUND} ) + message( STATUS "Found OpenMM at ${OpenMM_ROOT_DIR}" ) + save_sire_variable( "SIRE_OpenMM_INCLUDE_DIR" "${OpenMM_INCLUDE_DIR}" ) + save_sire_variable( "SIRE_OpenMM_LIBRARIES" "${OpenMM_LIBRARIES}" ) + save_sire_variable( "SIRE_OpenMM_LIBRARY_DIR" "${OpenMM_LIBRARY_DIR}" ) + else() + message( STATUS "Could not find OpenMM. OpenMM support is disabled." ) + endif() endif() +else() + message( STATUS "Disabling use of OpenMM at user request.") + save_sire_variable( "SIRE_OpenMM_FOUND" "${SIRE_USE_OPENMM}" ) endif() -get_target_property(QT5_LOCATION Qt5::Core LOCATION) -get_filename_component(SIRE_QT5CORE_DIR ${QT5_LOCATION} PATH) -message( STATUS "Qt5Core location ${SIRE_QT5CORE_DIR}" ) -save_sire_variable( "SIRE_QT5CORE_DIR" "${SIRE_QT5CORE_DIR}" ) - -if (DEFINED SIRE_APP) - include_directories( "${SIRE_APP}/include" "${SIRE_APP}/Library/include" ) -endif() +include_directories( "${SIRE_APP}/include" "${SIRE_APP}/Library/include" ) if (NOT ${SIRE_FOUND_BOOST}) - # Sire depends on >= boost 1.31 - all libraries must be dynamically linked - set (BOOST_ALL_DYN_LINK "YES") - set (Boost_ADDITIONAL_VERSIONS "1.39" "1.39.0") - FIND_PACKAGE ( Boost 1.31 REQUIRED ) + # Sire depends on >= boost 1.7 - all libraries must be dynamically linked + set (Boost_USE_STATIC_LIBS OFF) + set (Boost_USE_STATIC_RUNTIME OFF) + set (Boost_DEBUG ON) # this gives a nice print out in the cmake list to debug how boost is found and linked + find_package( Boost 1.7 REQUIRED ) if (Boost_FOUND) - message(STATUS "Boost paths ${Boost_LIBRARY_DIRS} | ${Boost_INCLUDE_DIR}" ) + message(STATUS "Boost paths ${Boost_LIBRARIES} | ${Boost_INCLUDE_DIR}" ) set ( BOOST_INCLUDE_DIRS "${Boost_INCLUDE_DIR}" ) include_directories( ${Boost_INCLUDE_DIR} ) @@ -900,7 +671,7 @@ endif() if (NOT ${SIRE_FOUND_GSL}) # Sire depends on >= GSL 1.6 - find_package(GSL 1.6 QUIET) + find_package(GSL 1.6 QUIET REQUIRED) message( STATUS "GSL paths ${GSL_LINK_DIRECTORIES} " "${GSL_LIBRARIES} | ${GSL_INCLUDE_DIR}" ) @@ -912,58 +683,43 @@ if (NOT ${SIRE_FOUND_GSL}) save_sire_variable( "SIRE_GSL_INCLUDE_PATH" "${GSL_INCLUDE_DIR}" ) endif() -if (NOT ${SIRE_FOUND_BLASLAPACK}) - # Now look for BLAS and LAPACK - if these are not found then - # a local version will have to be used instead - set( BLA_STATIC OFF ) - find_package( BLAS ) - find_package( LAPACK ) - - if (BLAS_FOUND) - message( STATUS "Found BLAS library ${BLAS_LIBRARIES}" ) - set( SIRE_USE_BLAS ON ) - save_sire_variable( "SIRE_BLAS_LIBRARIES" "${BLAS_LIBRARIES}" ) - else() - message( STATUS "Using internal (non-optimal) BLAS functions." ) - save_sire_variable( SIRE_USE_BLAS OFF ) - endif() +set( SIRE_USE_BLAS OFF ) +set( SIRE_USE_LAPACK OFF ) +save_sire_variable( "SIRE_USE_BLAS" "${SIRE_USE_BLAS}" ) +save_sire_variable( "SIRE_USE_LAPACK" "${SIRE_USE_LAPACK}" ) - save_sire_variable( "SIRE_USE_BLAS" "${SIRE_USE_BLAS}" ) +if (NOT ${SIRE_FOUND_TBB}) + set(TBB_LIBRARY_DIR "${ANACONDA_BASE}/lib") - if (LAPACK_FOUND) - message( STATUS "Found LAPACK library ${LAPACK_LIBRARIES}" ) - set( SIRE_USE_LAPACK ON ) - save_sire_variable( "SIRE_LAPACK_LIBRARIES" "${LAPACK_LIBRARIES}" ) + message( STATUS "TBB LIBRARY DIR: ${TBB_LIBRARY_DIR}") + if (NOT CMAKE_CXX_COMPILER_ID MATCHES "MSVC") + find_library( TBB_LIBRARY "tbb" PATHS ${TBB_LIBRARY_DIR} REQUIRED NO_DEFAULT_PATH) + find_library( TBB_MALLOC_LIBRARY "tbbmalloc" PATHS ${TBB_LIBRARY_DIR} REQUIRED NO_DEFAULT_PATH) else() - message( STATUS "Using internal (non-optimal) LAPACK functions." ) - set( SIRE_USE_LAPACK OFF ) + find_library( TBB_LIBRARY "tbb" PATHS ${TBB_LIBRARY_DIR} REQUIRED) + find_library( TBB_MALLOC_LIBRARY "tbbmalloc" PATHS ${TBB_LIBRARY_DIR} REQUIRED) endif() - save_sire_variable( "SIRE_USE_LAPACK" "${SIRE_USE_LAPACK}" ) -endif() - -if (NOT ${SIRE_FOUND_CPUID}) - if (NOT ${CMAKE_HOST_SYSTEM_PROCESSOR} STREQUAL "ppc64le") - find_library( CPUID_LIBRARY "cpuid" PATHS ${CPUID_LIBRARY_DIR} ) - include_directories (${CPUID_INCLUDE_DIR} ) - set(SIRE_FOUND_CPUID TRUE) - if (HAVE_STDINT_H) - set( CPUID_DEFINITIONS "-DHAVE_STDINT_H" ) - endif() - else() - message( STATUS "Cannot find libcpuid. Will disable CPU detection code." ) - endif() -endif() + message( STATUS "TBB paths ${TBB_LIBRARY} | ${TBB_MALLOC_LIBRARY} | ${TBB_INCLUDE_DIR}" ) -if (NOT ${SIRE_FOUND_TBB}) - find_library( TBB_LIBRARY "tbb" PATHS ${TBB_LIBRARY_DIR} ) - find_library( TBB_MALLOC_LIBRARY "tbbmalloc" PATHS ${TBB_LIBRARY_DIR} ) include_directories(${TBB_INCLUDE_DIR}) save_sire_variable( "TBB_LIBRARY" "${TBB_LIBRARY}" ) save_sire_variable( "TBB_MALLOC_LIBRARY" "${TBB_MALLOC_LIBRARY}" ) save_sire_variable( "TBB_INCLUDE_DIR" "${TBB_INCLUDE_DIR}" ) endif() +# Thanks to this project who have a solution to the tbb12 link +# issue on Windows +# https://fossies.org/linux/opencv/cmake/OpenCVFindLAPACK.cmake +if(CMAKE_GENERATOR MATCHES "Visual Studio") # MSBuild + # workaround DEFAULTLIB:tbb12.lib issue + # We may have tbb.lib for 'tbb' target, but not 'tbb12.lib' + message(STATUS "Adding tbb12 to ignore list") + set(SIRE_IGNORE_DEFAULTLIB_TBB "tbb12.lib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:${SIRE_IGNORE_DEFAULTLIB_TBB}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:${SIRE_IGNORE_DEFAULTLIB_TBB}") +endif() + ########### ########### PRINTING OUT SETTINGS AND FINALISING COMPILE FLAGS ########### @@ -979,13 +735,11 @@ if (SIRE_DISABLE_WARNINGS) endif() set( SIRE_WARNALL_FLAGS "${SIRE_WARNALL_FLAGS} ${SIRE_DISABLE_WARNING_FLAGS}" ) - endif() message( STATUS "CMAKE_SYSTEM_NAME == ${CMAKE_SYSTEM_NAME}" ) message( STATUS "CMAKE_C_COMPILER == ${CMAKE_C_COMPILER}" ) message( STATUS "CMAKE_CXX_COMPILER == ${CMAKE_CXX_COMPILER}" ) -message( STATUS "CMAKE_Fortran_COMPILER == ${CMAKE_Fortran_COMPILER}" ) message ( STATUS "SIRE_CXX_NG_FLAGS == ${SIRE_CXX_NG_FLAGS}" ) message ( STATUS "SIRE_SMALL_FLAGS == ${SIRE_SMALL_FLAGS}" ) @@ -1006,6 +760,11 @@ if ( SIRE_SYMBOL_HIDING ) #set ( SIRE_SHARE_LINK_FLAGS "${SIRE_SHARE_LINK_FLAGS} ${SIRE_VISIBILITY_FLAGS}" ) endif() +message(STATUS "SIRE_COMPILE_FLAGS ${SIRE_COMPILE_FLAGS}") +message(STATUS "SIRE_CXX_NG_FLAGS ${SIRE_CXX_NG_FLAGS}") +message(STATUS "SIRE_SMALL_FLAGS ${SIRE_SMALL_FLAGS}") +message(STATUS "SIRE_USER_CPPFLAGS ${SIRE_USER_CPPFLAGS}") + # Add the small flags here so that they don't accidentally pull in the # vectorisation flags (this breaks the MultiFloat/etc classes for AVX-512F) set( SIRE_C_FLAGS_SMALL "${SIRE_COMPILE_FLAGS} ${SIRE_SMALL_FLAGS} ${SIRE_USER_CFLAGS}" ) @@ -1026,8 +785,8 @@ set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${SIRE_C_FLAGS_RELEASE}" ) set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${SIRE_CXX_FLAGS_RELEASE}" ) set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${SIRE_C_FLAGS_DEBUG}" ) set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${SIRE_CXX_FLAGS_DEBUG}" ) -set( CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_MINSIZEREL} ${SIRE_C_FLAGS_SMALL}" ) -set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} ${SIRE_CXX_FLAGS_SMALL}" ) +set( CMAKE_C_FLAGS_MINSIZEREL "${SIRE_C_FLAGS_SMALL}" ) +set( CMAKE_CXX_FLAGS_MINSIZEREL "${SIRE_CXX_FLAGS_SMALL}" ) if ( CMAKE_BUILD_TYPE STREQUAL "Debug" ) message( STATUS "Compiling Sire using a DEBUG build" ) @@ -1078,6 +837,13 @@ include_directories(${CMAKE_BINARY_DIR}) ################ TELLING CMAKE WHERE THE SOURCE IS LOCATED ################ +if (NOT DEFINED ${SIRE_VERSION}) + message( STATUS "Strange, SIRE_VERSION has been unset. Resetting it.") + set (SIRE_VERSION "${S_VERSION_MAJOR}.${S_VERSION_MINOR}.${S_VERSION_PATCH}") +endif() + +message( STATUS "SIRE VERSION IS ${SIRE_VERSION}") + # Add the compiler test directory - this allows us to run some compiler # tests to make sure that Sire will compile properly add_subdirectory (build/test_compiler) @@ -1106,20 +872,17 @@ install (FILES ${CMAKE_CURRENT_BINARY_DIR}/sire_config.h install (DIRECTORY ${CMAKE_SOURCE_DIR}/parameters DESTINATION ${SIRE_SHARE} USE_SOURCE_PERMISSIONS - PATTERN ".svn" EXCLUDE ) # install the molecular templates into share/Sire install (DIRECTORY ${CMAKE_SOURCE_DIR}/templates DESTINATION ${SIRE_SHARE} USE_SOURCE_PERMISSIONS - PATTERN ".svn" EXCLUDE ) install (DIRECTORY ${CMAKE_SOURCE_DIR}/share/build DESTINATION ${SIRE_SHARE} USE_SOURCE_PERMISSIONS - PATTERN ".svn" EXCLUDE ) # These commands are used to create an 'uninstall' target diff --git a/corelib/share/build/install_sire.sh b/corelib/share/build/install_sire.sh index 13d3009b3..d9be82daa 100755 --- a/corelib/share/build/install_sire.sh +++ b/corelib/share/build/install_sire.sh @@ -62,21 +62,18 @@ echo "##" echo "## CONGRATULATIONS - SUCCESSFUL INSTALLATION" echo "##" echo "## Sire is installed in $install_dir" -echo "## You can run a Sire python script called script.py by typing" +echo "## You can run a sire python script called script.py by typing" echo "## $install_dir/bin/python script.py" echo "##" -echo "## All Sire binaries are available in " +echo "## All sire binaries are available in " echo "## $install_dir/bin" echo "##" -echo "## Everything is contained in this directory, so you can delete Sire by" +echo "## Everything is contained in this directory, so you can delete sire by" echo "## deleting this directory" echo "## e.g. rm -rf $install_dir" echo "##" -echo "## If you have never used Sire before, please take a look at the " -echo "## Sire tutorial at http://siremol.org/tutorial" -echo "##" -echo "## Please also take a look at the examples at http://siremol.org/examples" -echo "## for examples that you can download and use to learn Sire." +echo "## If you have never used sire before, please take a look at the " +echo "## Sire tutorial at https://siremol.org/tutorial" echo "##" echo "## If you want to test this installation of Sire, please run" echo "## $install_dir/bin/sire_test" diff --git a/corelib/src/apps/sire/main.cpp b/corelib/src/apps/sire/main.cpp index 22535dbba..c3b69eff7 100644 --- a/corelib/src/apps/sire/main.cpp +++ b/corelib/src/apps/sire/main.cpp @@ -916,16 +916,16 @@ int main(int argc, char **argv) "http://siremol.org") ); printBox( QObject::tr( - "%4@%5: Starting master node (%1 of %2): nThreads()=%3") + "%4@%5: Starting primary node (%1 of %2): nThreads()=%3") .arg(Cluster::getRank()).arg(Cluster::getCount()) .arg(ppn) .arg(username,hostname) ); //name this process and thread - SireError::setProcessString("master"); + SireError::setProcessString("primary"); SireError::setThreadString("main"); - //start the cluster - on the master we need one extra + //start the cluster - on the primary we need one extra //thread for the Python interpreter #ifdef SIRE_USE_MPI MPI_Barrier( MPI_COMM_WORLD ); diff --git a/corelib/src/apps/test_system/CMakeLists.txt b/corelib/src/apps/test_system/CMakeLists.txt index 0be975b07..a09df3066 100644 --- a/corelib/src/apps/test_system/CMakeLists.txt +++ b/corelib/src/apps/test_system/CMakeLists.txt @@ -20,17 +20,3 @@ if (HAVE_UTSNAME_H) add_executable( get_uname get_uname.c ) install( TARGETS get_uname RUNTIME DESTINATION ${SIRE_TEST} ) endif() - -if (SIRE_FOUND_CPUID) - add_definitions( "-DSIRE_FOUND_CPUID" ) - add_definitions( "${CPUID_DEFINITIONS}" ) - include_directories( ${CPUID_INCLUDE_DIR} ) - - add_executable( get_cpuid get_cpuid.c ) - - target_link_libraries( get_cpuid ${CPUID_LIBRARY} ) - - install( TARGETS get_cpuid RUNTIME DESTINATION ${SIRE_TEST} ) - -endif() - diff --git a/corelib/src/libs/CMakeLists.txt b/corelib/src/libs/CMakeLists.txt index 26162857f..0481ed173 100644 --- a/corelib/src/libs/CMakeLists.txt +++ b/corelib/src/libs/CMakeLists.txt @@ -18,6 +18,7 @@ set ( SUBDIRS SireAnalysis SireMM SireMol SireMove + SireSearch SireStream SireSystem SireUnits @@ -33,10 +34,10 @@ set ( SIRE_HEADERS sireglobal.h tostring.h ) - + install( FILES ${SIRE_HEADERS} DESTINATION ${SIRE_INCLUDES} ) -install( EXPORT SireLibraries +install( EXPORT SireLibraries NAMESPACE SIRE_ DESTINATION ${SIRE_CMAKEFILES} ) diff --git a/corelib/src/libs/SireBase/CMakeLists.txt b/corelib/src/libs/SireBase/CMakeLists.txt index a84f61f8c..31ba4ffcf 100644 --- a/corelib/src/libs/SireBase/CMakeLists.txt +++ b/corelib/src/libs/SireBase/CMakeLists.txt @@ -15,12 +15,6 @@ include_directories(${CMAKE_SOURCE_DIR}/src/libs) # This library uses Intel Threaded Building blocks include_directories(${TBB_INCLUDE_DIR}) -if (SIRE_FOUND_CPUID) - add_definitions( "-DSIRE_FOUND_CPUID" ) - add_definitions( "${CPUID_DEFINITIONS}" ) - include_directories( ${CPUID_INCLUDE_DIR} ) -endif() - # Define the header files for SireBase set ( SIREBASE_HEADERS @@ -31,6 +25,7 @@ set ( SIREBASE_HEADERS chunkedhash.hpp chunkedvector.hpp combineproperties.h + convert_property.hpp countflops.h cpuid.h errors.h @@ -64,6 +59,7 @@ set ( SIREBASE_HEADERS shareddatapointer.hpp sharedpolypointer.hpp sharedpolypointer_cast.hpp + slice.h sparsematrix.hpp stringmangler.h stringproperty.h @@ -109,11 +105,12 @@ set ( SIREBASE_SOURCES refcountdata.cpp savestate.cpp sharedpolypointer.cpp - stringmangler.cpp - stringproperty.cpp + slice.cpp + stringmangler.cpp + stringproperty.cpp tempdir.cpp timeproperty.cpp - trigarray2d.cpp + trigarray2d.cpp unittest.cpp variantproperty.cpp @@ -138,10 +135,6 @@ target_link_libraries (SireBase ${TBB_MALLOC_LIBRARY} ) -if (SIRE_FOUND_CPUID) - target_link_libraries( SireBase ${CPUID_LIBRARY} ) -endif() - # installation install( TARGETS SireBase EXPORT SireLibraries RUNTIME DESTINATION ${SIRE_BIN} @@ -149,5 +142,5 @@ install( TARGETS SireBase EXPORT SireLibraries ARCHIVE DESTINATION ${SIRE_ARCHIVES} ) -install( FILES ${SIREBASE_HEADERS} +install( FILES ${SIREBASE_HEADERS} DESTINATION ${SIRE_INCLUDES}/SireBase ) diff --git a/corelib/src/libs/SireBase/convert_property.hpp b/corelib/src/libs/SireBase/convert_property.hpp new file mode 100644 index 000000000..7b9a088a6 --- /dev/null +++ b/corelib/src/libs/SireBase/convert_property.hpp @@ -0,0 +1,50 @@ +#ifndef SIREBASE_CONVERT_PROPERTY_HPP +#define SIREBASE_CONVERT_PROPERTY_HPP + +#include + +#include "property.h" +#include "variantproperty.h" + +namespace SireBase +{ + +namespace detail +{ + template + struct convert_property + { + template + static SireBase::PropertyPtr convert(const V &value); + }; + + template<> + struct convert_property + { + template + static SireBase::PropertyPtr convert(const V &value) + { + return SireBase::PropertyPtr(value); + } + }; + + template<> + struct convert_property + { + template + static SireBase::PropertyPtr convert(const V &value) + { + return SireBase::PropertyPtr(SireBase::VariantProperty(QVariant::fromValue(value))); + } + }; +} + +template +SireBase::PropertyPtr convert_property(const T &value) +{ + return detail::convert_property::value>::convert(value); +} + +} + +#endif diff --git a/corelib/src/libs/SireBase/cpuid.cpp b/corelib/src/libs/SireBase/cpuid.cpp index 66613599f..aa6b4d3a8 100644 --- a/corelib/src/libs/SireBase/cpuid.cpp +++ b/corelib/src/libs/SireBase/cpuid.cpp @@ -28,9 +28,7 @@ #include "cpuid.h" -#if defined(SIRE_FOUND_CPUID) - #include // CONDITIONAL_INCLUDE -#elif defined(_WIN32) +#if defined(_WIN32) #define WIN32_LEAN_AND_MEAN #include // CONDITIONAL_INCLUDE #elif defined(__APPLE__) || defined(__FreeBSD__) @@ -75,100 +73,76 @@ QDataStream &operator>>(QDataStream &ds, CPUID &cpuid) return ds; } -#ifdef SIRE_FOUND_CPUID - static QString trueFalse(bool val) - { - if (val) - return "true"; - else - return "false"; - } +static QHash getCPUInfo() +{ + QHash info; - /** Return the list of all searchable supportable features */ - QStringList CPUID::supportableFeatures() const - { - QStringList features; + #if defined(__APPLE__) || defined(__FreeBSD__) + char buffer[1024]; + size_t size=sizeof(buffer); + int err = 0; - for (int i=0; i getCPUInfo() - { - if (not cpuid_present()) + err = sysctlbyname("hw.cpufrequency", &val, &size, NULL, 0); + if (err == 0) { - return QHash(); + info["CPU.frequency"] = QString("%1 GHz").arg(val / 1000000000); } - cpu_raw_data_t raw_data; - - if (cpuid_get_raw_data(&raw_data) != 0) + err = sysctlbyname("hw.ncpu", &val, &size, NULL, 0); + if (err == 0) { - return QHash(); + info["CPU.num_cores"] = QString("%1").arg(val); } - cpu_id_t cpuid; - - if (cpu_identify(&raw_data, &cpuid) != 0) + err = sysctlbyname("hw.optional.arm64", &val, &size, NULL, 0); + if (err == 0) { - return QHash(); + if (val == 1) + { + info["CPU.architecture"] = "ARM64"; + } + else + { + info["CPU.architecture"] = "x86-64"; + } } - QHash data; - - data.insert("vendor", cpuid.vendor_str); - data.insert("brand", cpuid.brand_str); - data.insert("num_cores", QString::number(cpuid.num_cores)); - data.insert("num_logical_cores", QString::number(cpuid.num_logical_cpus)); - data.insert("total_logical_cores", QString::number(cpuid.total_logical_cpus)); - data.insert("l1_data_cache", QString::number(cpuid.l1_data_cache)); - data.insert("l1_instruction_cache", QString::number(cpuid.l1_instruction_cache)); - data.insert("l2_cache", QString::number(cpuid.l2_cache)); - data.insert("l3_cache", QString::number(cpuid.l3_cache)); - data.insert("codename", cpuid.cpu_codename); - - for (int i=0; i getCPUInfo() - { - return QHash(); - } + return info; +} - /** Return the list of all searchable supportable features */ - QStringList CPUID::supportableFeatures() const - { - return QStringList(); - } -#endif +/** Return the list of all searchable supportable features */ +QStringList CPUID::supportableFeatures() const +{ + return QStringList(); +} QHash* CPUID::global_props = 0; +Q_GLOBAL_STATIC( QMutex, globalMutex ) + QHash* CPUID::getCPUID() { - //NOT THREAD SAFE - COULD END UP CREATING TWO CPUIDs IN WORST CASE if (not global_props) { - QHash *p = new QHash(getCPUInfo()); + QMutexLocker lkr( globalMutex() ); - if (not global_props) - global_props = p; - else - delete p; + global_props = new QHash(getCPUInfo()); } return global_props; @@ -272,9 +246,7 @@ int CPUID::clockSpeed() const if this is not known (as we must have at least 1 core!) */ int CPUID::numCores() const { - #if defined(SIRE_FOUND_CPUID) - return props.value("total_logical_cores", "1").toInt(); - #elif defined(_WIN32) + #if defined(_WIN32) SYSTEM_INFO system_info; GetSystemInfo(&system_info); return system_info.dwNumberOfProcessors; diff --git a/corelib/src/libs/SireBase/cpuid.h b/corelib/src/libs/SireBase/cpuid.h index 97157f068..7867e3a1d 100644 --- a/corelib/src/libs/SireBase/cpuid.h +++ b/corelib/src/libs/SireBase/cpuid.h @@ -48,7 +48,7 @@ namespace SireBase /** This class obtains and displays the capabilities and ID of the CPU at runtime - + @author Christopher Woods */ class SIREBASE_EXPORT CPUID : public ConcreteProperty @@ -60,42 +60,42 @@ friend SIREBASE_EXPORT QDataStream& ::operator>>(QDataStream&, CPUID&); public: CPUID(); CPUID(const CPUID &other); - + ~CPUID(); - + CPUID& operator=(const CPUID &other); - + bool operator==(const CPUID &other) const; bool operator!=(const CPUID &other) const; - + CPUID* clone() const; - + const char* what() const; static const char* typeName(); - + QString toString() const; - + bool supports(const QString &feature) const; QStringList supportableFeatures() const; - + QStringList supportedFeatures() const; - + QString vendor() const; QString brand() const; - + int clockSpeed() const; int numCores() const; - + bool supportsSSE2() const; bool supportsAVX() const; - + private: QHash* getCPUID(); /** A simple dictionary of key-value pairs for the CPU */ QHash props; - + static QHash *global_props; }; diff --git a/corelib/src/libs/SireBase/getinstalldir.cpp b/corelib/src/libs/SireBase/getinstalldir.cpp index f8c68be3b..c85f9d760 100644 --- a/corelib/src/libs/SireBase/getinstalldir.cpp +++ b/corelib/src/libs/SireBase/getinstalldir.cpp @@ -106,10 +106,12 @@ namespace SireBase QDir d(dir); if (not d.exists()) + { throw SireError::file_error( QObject::tr( "You cannot set the installation directory of Sire to a value " "that doesn't exist (%1).") .arg(dir), CODELOC ); + } install_dir = d.absolutePath(); } @@ -120,13 +122,14 @@ namespace SireBase QString getInstallDir() { if (not install_dir.isEmpty()) - return install_dir; + return QDir::toNativeSeparators(install_dir); + QString sire_root_env = qgetenv("SIRE_ROOT"); if (!sire_root_env.isEmpty()) - return sire_root_env; + return QDir::toNativeSeparators(sire_root_env); //first, find the full path to the running executable. We assume that - //we are using a Sire executable + //we are using a Sire executable or a Python executable //we follow the instructions from a stackoverflow answer by mark40 // @@ -192,7 +195,7 @@ namespace SireBase "For some reason we cannot find the executable file? %1") .arg(buf), CODELOC ); - setInstallDir( stripDir(SIRE_BIN_DIR,f.canonicalPath()) ); + setInstallDir( QDir::toNativeSeparators(f.canonicalPath()) ); return install_dir; #else throw SireError::incomplete_code( QObject::tr( @@ -223,13 +226,17 @@ namespace SireBase .arg(dir.absoluteFilePath(path)), CODELOC ); } - return dir.absoluteFilePath(path); + return QDir::toNativeSeparators(dir.absoluteFilePath(path)); } /** This returns the directory containing the Sire executables */ QString getBinDir() { - return getSireDir(SIRE_BIN_DIR); + #ifdef Q_OS_WIN + return getInstallDir(); + #else + return getSireDir(SIRE_BIN_DIR); + #endif } /** This returns the directory containing the Sire libraries */ diff --git a/corelib/src/libs/SireBase/propertylist.cpp b/corelib/src/libs/SireBase/propertylist.cpp index 61ac6508e..4c20a8aa1 100644 --- a/corelib/src/libs/SireBase/propertylist.cpp +++ b/corelib/src/libs/SireBase/propertylist.cpp @@ -31,6 +31,7 @@ #include "numberproperty.h" #include "arrayproperty.hpp" #include "variantproperty.h" +#include "booleanproperty.h" #include "SireError/errors.h" @@ -93,6 +94,31 @@ namespace SireBase return NumberProperty(value); } + PropertyPtr wrap(qint32 value) + { + return NumberProperty(qint64(value)); + } + + PropertyPtr wrap(quint32 value) + { + return NumberProperty(qint64(value)); + } + + PropertyPtr wrap(qint64 value) + { + return NumberProperty(qint64(value)); + } + + PropertyPtr wrap(quint64 value) + { + return NumberProperty(qint64(value)); + } + + PropertyPtr wrap(bool value) + { + return BooleanProperty(value); + } + PropertyPtr wrap(const QList &values) { QVector ivals; diff --git a/corelib/src/libs/SireBase/propertylist.h b/corelib/src/libs/SireBase/propertylist.h index 19d537509..22327f562 100644 --- a/corelib/src/libs/SireBase/propertylist.h +++ b/corelib/src/libs/SireBase/propertylist.h @@ -290,6 +290,11 @@ SIREBASE_EXPORT PropertyPtr wrap(const QString &value); SIREBASE_EXPORT PropertyPtr wrap(double value); SIREBASE_EXPORT PropertyPtr wrap(const QVariant &value); SIREBASE_EXPORT PropertyPtr wrap(const char *value); +SIREBASE_EXPORT PropertyPtr wrap(qint32 value); +SIREBASE_EXPORT PropertyPtr wrap(qint64 value); +SIREBASE_EXPORT PropertyPtr wrap(quint32 value); +SIREBASE_EXPORT PropertyPtr wrap(quint64 value); +SIREBASE_EXPORT PropertyPtr wrap(bool value); SIREBASE_EXPORT PropertyPtr wrap(const QList &value); SIREBASE_EXPORT PropertyPtr wrap(const QList &values); diff --git a/corelib/src/libs/SireBase/slice.cpp b/corelib/src/libs/SireBase/slice.cpp new file mode 100644 index 000000000..f9ca3c767 --- /dev/null +++ b/corelib/src/libs/SireBase/slice.cpp @@ -0,0 +1,263 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "slice.h" + +#include "SireError/errors.h" + +#include + +#include + +using namespace SireBase; + +const int _unset = std::numeric_limits::max(); + +int _map(int val, int n, bool auto_fix) +{ + if (val < 0) + val = n + val; + + if (auto_fix) + { + if (val >= n) + val = n-1; + + if (val < 0) + val = 0; + } + else if (val < 0 or val >= n) + throw SireError::invalid_index(QObject::tr( + "Invalid index for a container with count == %1" + ).arg(n), CODELOC); + + return val; +} + +SliceIterator::SliceIterator() + : i(0), start(0), stop(0), step(0) +{} + +SliceIterator::SliceIterator(const Slice &slice, int n, bool auto_fix) + : i(slice.start), start(slice.start), + stop(slice.stop), step(slice.step) +{ + if (n <= 0) + throw SireError::invalid_index( + QObject::tr("Cannot slice an empty container!"), CODELOC); + + start = slice.start; + + if (start == _unset) + start = 0; + + start = _map(start, n, auto_fix); + stop = slice.stop; + step = slice.step; + + if (step == _unset) + { + step = 1; + } + + if (stop == _unset) + { + if (step >= 0) + stop = n-1; + else + stop = 0; + } + else + { + if (step >= 0) + { + if (slice.start == slice.stop) + { + // this is a single-value slice + stop = start; + } + else if (stop != 0) + stop = _map(stop-1, n, auto_fix); + } + else + { + if (slice.start == slice.stop) + { + // this is a single-value slice + stop = start; + } + else + stop = _map(stop+1, n, auto_fix); + } + } + + if (step == 0) + step = 1; + + if (start <= stop and step <= 0) + { + step *= -1; + } + else if (start > stop and step >= 0) + { + step *= -1; + } + + i = start; +} + +SliceIterator::SliceIterator(const SliceIterator &other) + : i(other.i), start(other.start), + stop(other.stop), step(other.step) +{} + +SliceIterator::~SliceIterator() +{} + +SliceIterator& SliceIterator::next() +{ + i += step; + return *this; +} + +bool SliceIterator::atEnd() const +{ + if (step > 0) + return i > stop; + else + return i < stop; +} + +int SliceIterator::value() const +{ + return i; +} + +Slice::Slice() : start(_unset), stop(_unset), step(_unset) +{} + +Slice::Slice(const Slice &other) + : start(other.start), stop(other.stop), step(other.step) +{} + +Slice::~Slice() +{} + +Slice Slice::fromStartStop(int _start, int _stop, int _step) +{ + Slice s; + s.start = _start; + s.stop = _stop; + s.step = _step; + + return s; +} + +Slice Slice::fromStart(int _start, int _step) +{ + Slice s; + s.start = _start; + s.stop = _unset; + s.step = _step; + + return s; +} + +Slice& Slice::operator=(const Slice &other) +{ + start = other.start; + stop = other.stop; + step = other.step; + return *this; +} + +bool Slice::operator==(const Slice &other) const +{ + return start == other.start and stop == other.stop and step == other.step; +} + +bool Slice::operator!=(const Slice &other) const +{ + return not operator==(other); +} + +const char* Slice::what() const +{ + return Slice::typeName(); +} + +const char* Slice::typeName() +{ + return "SireBase::Slice"; +} + +int Slice::unset() +{ + return _unset; +} + +QString Slice::toString() const +{ + if (start == _unset) + { + if (stop == _unset) + { + if (step == _unset) + return QObject::tr("slice[::]"); + else + return QObject::tr("slice[::%1]").arg(step); + } + else if (step == _unset) + { + return QObject::tr("slice[:%1]").arg(stop); + } + else + { + return QObject::tr("slice[:%1:%2]").arg(stop).arg(step); + } + } + else if (stop == _unset) + { + if (step == _unset) + return QObject::tr("slice[%1:]").arg(start); + else + return QObject::tr("slice[%1::%2]").arg(start).arg(step); + } + else + { + if (step == _unset) + return QObject::tr("slice[%1:%2]").arg(start).arg(stop); + else + return QObject::tr("slice[%1:%2:%3]").arg(start).arg(stop).arg(step); + } +} + +SliceIterator Slice::begin(int n, bool auto_fix) const +{ + return SliceIterator(*this, n, auto_fix); +} diff --git a/corelib/src/libs/SireBase/slice.h b/corelib/src/libs/SireBase/slice.h new file mode 100644 index 000000000..efe7c8a11 --- /dev/null +++ b/corelib/src/libs/SireBase/slice.h @@ -0,0 +1,105 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREBASE_SLICE_H +#define SIREBASE_SLICE_H + +#include "sireglobal.h" + +SIRE_BEGIN_HEADER + +namespace SireBase +{ + +class SliceIterator; + +/** Simple class that simplifies accessing Sire containers + via Python slices +*/ +class SIREBASE_EXPORT Slice +{ + +friend class SliceIterator; + +public: + Slice(); + Slice(const Slice &other); + + ~Slice(); + + static Slice fromStartStop(int start, int stop, int step=1); + static Slice fromStart(int start, int step=1); + + static int unset(); + + Slice& operator=(const Slice &other); + + bool operator==(const Slice &other) const; + bool operator!=(const Slice &other) const; + + const char* what() const; + static const char* typeName(); + + QString toString() const; + + SliceIterator begin(int n, bool auto_fix=false) const; + +private: + int start; + int stop; + int step; +}; + +/** A simple iterator for the slice */ +class SIREBASE_EXPORT SliceIterator +{ +public: + SliceIterator(); + SliceIterator(const Slice &slice, int n, bool auto_fix=false); + SliceIterator(const SliceIterator &other); + + ~SliceIterator(); + + SliceIterator& next(); + + bool atEnd() const; + + int value() const; + +private: + int i; + int start; + int stop; + int step; +}; + +} + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireCAS/expression.cpp b/corelib/src/libs/SireCAS/expression.cpp index cdfa92ba5..ed8f45d93 100644 --- a/corelib/src/libs/SireCAS/expression.cpp +++ b/corelib/src/libs/SireCAS/expression.cpp @@ -53,7 +53,7 @@ using namespace SireMaths; static const RegisterMetaType r_expression(NO_ROOT); /** Serialise an Expression to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, const Expression &ex) +SIRECAS_EXPORT QDataStream &operator<<(QDataStream &ds, const Expression &ex) { writeHeader(ds, r_expression, 1) << ex.fac << ex.exbase; @@ -61,7 +61,7 @@ QDataStream &operator<<(QDataStream &ds, const Expression &ex) } /** Deserialise an Expression from a binary datastream */ -QDataStream &operator>>(QDataStream &ds, Expression &ex) +SIRECAS_EXPORT QDataStream &operator>>(QDataStream &ds, Expression &ex) { VersionID v = readHeader(ds, r_expression); diff --git a/corelib/src/libs/SireCAS/expression.h b/corelib/src/libs/SireCAS/expression.h index 3069de463..a0d21a0cd 100644 --- a/corelib/src/libs/SireCAS/expression.h +++ b/corelib/src/libs/SireCAS/expression.h @@ -64,8 +64,8 @@ An Expression is the base class of all algebraic entities. class SIRECAS_EXPORT Expression { -friend SIRECAS_EXPORT QDataStream& ::operator<<(QDataStream&, const Expression&); -friend SIRECAS_EXPORT QDataStream& ::operator>>(QDataStream&, Expression&); +friend QDataStream& ::operator<<(QDataStream&, const Expression&); +friend QDataStream& ::operator>>(QDataStream&, Expression&); public: Expression(); diff --git a/corelib/src/libs/SireError/exception.cpp b/corelib/src/libs/SireError/exception.cpp index ce24e2ea3..3ac3b190a 100644 --- a/corelib/src/libs/SireError/exception.cpp +++ b/corelib/src/libs/SireError/exception.cpp @@ -168,7 +168,7 @@ QString getPIDString() } // end of namespace SireError -bool FastExceptionFlag::enable_fast_exceptions = false; +QAtomicInt FastExceptionFlag::enable_fast_exceptions(0); FastExceptionFlag::FastExceptionFlag() {} @@ -194,18 +194,17 @@ FastExceptionFlag FastExceptionFlag::construct() void FastExceptionFlag::disable() { - enable_fast_exceptions = false; d.reset(); } FastExceptionFlag::FastExceptionFlagData::FastExceptionFlagData() { - enable_fast_exceptions = true; + enable_fast_exceptions.ref(); } FastExceptionFlag::FastExceptionFlagData::~FastExceptionFlagData() { - enable_fast_exceptions = false; + enable_fast_exceptions.deref(); } /** Switch on fast exceptions. These are used, e.g. when you know that @@ -233,7 +232,7 @@ exception::exception() */ exception::exception(QString error, QString place) : err(error), plce(place) { - if (FastExceptionFlag::enable_fast_exceptions) + if (FastExceptionFlag::enable_fast_exceptions > 0) return; #if defined(SIRE_ENABLE_BACKTRACE) || defined(SIRE_ENABLE_BOOST_BACKTRACE) diff --git a/corelib/src/libs/SireError/exception.h b/corelib/src/libs/SireError/exception.h index f02657335..a91d81bc9 100644 --- a/corelib/src/libs/SireError/exception.h +++ b/corelib/src/libs/SireError/exception.h @@ -33,6 +33,7 @@ #include #include +#include #include @@ -80,7 +81,7 @@ class SIREERROR_EXPORT FastExceptionFlag boost::shared_ptr d; /** Whether or not fast exceptions are enabled */ - static bool enable_fast_exceptions; + static QAtomicInt enable_fast_exceptions; }; /** This is the base class of all Sire specific exceptions. The python wrapping diff --git a/corelib/src/libs/SireFF/g1ff.cpp b/corelib/src/libs/SireFF/g1ff.cpp index 7dbca7717..d4c80d0ec 100644 --- a/corelib/src/libs/SireFF/g1ff.cpp +++ b/corelib/src/libs/SireFF/g1ff.cpp @@ -58,12 +58,12 @@ QDataStream &operator<<(QDataStream &ds, const G1FF &g1ff) { writeHeader(ds, r_g1ff, 1); - + SharedDataStream sds(ds); sds << g1ff.molgroup << g1ff.allow_overlap_of_atoms << static_cast(g1ff); - + return ds; } @@ -72,22 +72,24 @@ QDataStream &operator>>(QDataStream &ds, G1FF &g1ff) { VersionID v = readHeader(ds, r_g1ff); - + if (v == 1) { SharedDataStream sds(ds); sds >> g1ff.molgroup >> g1ff.allow_overlap_of_atoms >> static_cast(g1ff); + + g1ff.molgroup.setParent(&g1ff); } else throw version_error(v, "1", r_g1ff, CODELOC); - + return ds; } /** Constructor */ -G1FF::G1FF(bool allow_overlap) +G1FF::G1FF(bool allow_overlap) : FF(), allow_overlap_of_atoms(allow_overlap) { molgroup = FFMolGroupPvt(this->name(), 0, this); @@ -96,7 +98,7 @@ G1FF::G1FF(bool allow_overlap) } /** Copy constructor */ -G1FF::G1FF(const G1FF &other) +G1FF::G1FF(const G1FF &other) : FF(other), molgroup(other.molgroup), allow_overlap_of_atoms(other.allow_overlap_of_atoms) { @@ -110,10 +112,10 @@ G1FF& G1FF::operator=(const G1FF &other) molgroup = other.molgroup; molgroup.setParent(this); molgroup.setIndex(0); - + allow_overlap_of_atoms = other.allow_overlap_of_atoms; FF::operator=(other); - + return *this; } @@ -134,7 +136,7 @@ const MoleculeGroup& G1FF::at(MGNum mgnum) const "%4.") .arg(this->name()).arg(this->what()) .arg(mgnum).arg(molgroup.number()), CODELOC ); - + return molgroup; } @@ -154,7 +156,7 @@ void G1FF::_pvt_updateName() molgroup.setName( this->name() ); molgroup.setNewNumber(); - + this->reindex(); } @@ -190,7 +192,7 @@ void G1FF::getGroups(const QList &mgnums, QVarLengthArray &groups) const { groups.clear(); - + foreach (MGNum mgnum, mgnums) { G1FF::assertContains(mgnum); @@ -204,7 +206,7 @@ QHash G1FF::getGroups() const QHash groups; groups.reserve(1); groups.insert( molgroup.number(), &molgroup ); - + return groups; } @@ -229,9 +231,9 @@ void G1FF::group_setName(quint32 i, const QString &new_name) this->reindex(); } -/** Assert that there is no overlap between the atoms in +/** Assert that there is no overlap between the atoms in 'molview' and the atoms in 'group' - + \throw SireMol::duplicate_atom */ void G1FF::assertNoOverlap(const MoleculeGroup &group, @@ -273,7 +275,7 @@ void G1FF::_pvt_removedAll(const ViewsOfMol &mol) /** Assert that there is no overlap between the atoms in 'molview' and any atoms that exist currently in this molecule - + \throw SireMol::duplicate_atom */ void G1FF::assertNoOverlap(const MoleculeView &molview) const @@ -281,10 +283,10 @@ void G1FF::assertNoOverlap(const MoleculeView &molview) const this->assertNoOverlap(molgroup, molview); } -/** Add the molecule view in 'molview' to this forcefield, using the +/** Add the molecule view in 'molview' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error @@ -301,12 +303,12 @@ void G1FF::group_add(quint32 i, const MoleculeView &molview, this->assertNoOverlap(molview); FFMolGroupPvt old_state = molgroup; - + try { molgroup.add(molview); this->_pvt_added( PartialMolecule(molview), map ); - + FF::incrementVersion(); } catch(...) @@ -316,15 +318,15 @@ void G1FF::group_add(quint32 i, const MoleculeView &molview, } } -/** Add the views of the molecule in 'molviews' to this forcefield, using the +/** Add the views of the molecule in 'molviews' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void G1FF::group_add(quint32 i, const ViewsOfMol &molviews, +void G1FF::group_add(quint32 i, const ViewsOfMol &molviews, const PropertyMap &map) { assertValidGroup(i); @@ -337,9 +339,9 @@ void G1FF::group_add(quint32 i, const ViewsOfMol &molviews, this->assertNoOverlap(molviews); molviews.assertNoOverlap(); } - + FFMolGroupPvt old_state = molgroup; - + try { molgroup.add(molviews); @@ -353,15 +355,15 @@ void G1FF::group_add(quint32 i, const ViewsOfMol &molviews, } } -/** Add the molecules in 'molecules' to this forcefield, using the +/** Add the molecules in 'molecules' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void G1FF::group_add(quint32 i, const Molecules &molecules, +void G1FF::group_add(quint32 i, const Molecules &molecules, const PropertyMap &map) { assertValidGroup(i); @@ -378,15 +380,15 @@ void G1FF::group_add(quint32 i, const Molecules &molecules, ++it) { this->assertNoOverlap(*it); - + //also assert that there is no overlap within the molecule it->assertNoOverlap(); } } - + //save the old state of this forcefield boost::shared_ptr old_state( this->clone() ); - + try { if (not allow_overlap_of_atoms) @@ -394,7 +396,7 @@ void G1FF::group_add(quint32 i, const Molecules &molecules, //add the molecules - they must be unique views of we'd //have thrown an exception earlier! QList added_mols = molgroup.addIfUnique(molecules); - + foreach (const ViewsOfMol &added_mol, added_mols) { this->_pvt_added(added_mol, map); @@ -404,7 +406,7 @@ void G1FF::group_add(quint32 i, const Molecules &molecules, { //add the molecules... molgroup.add(molecules); - + //now convert the 'Molecules' into a list... for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); @@ -413,7 +415,7 @@ void G1FF::group_add(quint32 i, const Molecules &molecules, this->_pvt_added(*it, map); } } - + FF::incrementVersion(); } catch(...) @@ -423,29 +425,29 @@ void G1FF::group_add(quint32 i, const Molecules &molecules, } } -/** Add the views of the molecules in the group 'molgroup' to this forcefield, - using the supplied property map to get the names of the properties that +/** Add the views of the molecules in the group 'molgroup' to this forcefield, + using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void G1FF::group_add(quint32 i, const MoleculeGroup &new_group, +void G1FF::group_add(quint32 i, const MoleculeGroup &new_group, const PropertyMap &map) { G1FF::group_add(i, new_group.molecules(), map); } -/** Add the molecule view in 'molview' to this forcefield, using the +/** Add the molecule view in 'molview' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -bool G1FF::group_addIfUnique(quint32 i, const MoleculeView &molview, +bool G1FF::group_addIfUnique(quint32 i, const MoleculeView &molview, const PropertyMap &map) { assertValidGroup(i); @@ -454,7 +456,7 @@ bool G1FF::group_addIfUnique(quint32 i, const MoleculeView &molview, return false; FFMolGroupPvt old_state = molgroup; - + try { if (molgroup.addIfUnique(molview)) @@ -471,7 +473,7 @@ bool G1FF::group_addIfUnique(quint32 i, const MoleculeView &molview, this->_pvt_added( PartialMolecule(molview), map ); FF::incrementVersion(); - + return true; } else @@ -482,32 +484,32 @@ bool G1FF::group_addIfUnique(quint32 i, const MoleculeView &molview, molgroup = old_state; throw; } - + return false; } - -/** Add the views of the molecule in 'molviews' to this forcefield, using the + +/** Add the views of the molecule in 'molviews' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -ViewsOfMol G1FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, +ViewsOfMol G1FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, const PropertyMap &map) { assertValidGroup(i); if (molviews.isEmpty()) return ViewsOfMol(); - + FFMolGroupPvt old_state = molgroup; - + try { ViewsOfMol added_views = molgroup.addIfUnique(molviews); - + if (not added_views.isEmpty()) { if (not allow_overlap_of_atoms) @@ -517,10 +519,10 @@ ViewsOfMol G1FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, } this->_pvt_added(added_views, map); - + FF::incrementVersion(); } - + return added_views; } catch(...) @@ -528,34 +530,34 @@ ViewsOfMol G1FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, molgroup = old_state; throw; } - + return ViewsOfMol(); } -/** Add the molecules in 'molecules' to this forcefield, using the +/** Add the molecules in 'molecules' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -QList G1FF::group_addIfUnique(quint32 i, const Molecules &molecules, +QList G1FF::group_addIfUnique(quint32 i, const Molecules &molecules, const PropertyMap &map) { assertValidGroup(i); if (molecules.isEmpty()) return QList(); - + FFMolGroupPvt old_molgroup = molgroup; - + boost::shared_ptr old_state( this->clone() ); - + try { QList added_mols = molgroup.addIfUnique(molecules); - + if (not added_mols.isEmpty()) { if (not allow_overlap_of_atoms) @@ -568,16 +570,16 @@ QList G1FF::group_addIfUnique(quint32 i, const Molecules &molecules, added_mol.assertNoOverlap(); } } - + //now get the parameters foreach (const ViewsOfMol &added_mol, added_mols) { this->_pvt_added(added_mol, map); } - + FF::incrementVersion(); } - + return added_mols; } catch(...) @@ -585,19 +587,19 @@ QList G1FF::group_addIfUnique(quint32 i, const Molecules &molecules, this->copy(*old_state); throw; } - + return QList(); } -/** Add the views of the molecules in the group 'molgroup' to this forcefield, - using the supplied property map to get the names of the properties that +/** Add the views of the molecules in the group 'molgroup' to this forcefield, + using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -QList G1FF::group_addIfUnique(quint32 i, const MoleculeGroup &new_group, +QList G1FF::group_addIfUnique(quint32 i, const MoleculeGroup &new_group, const PropertyMap &map) { return G1FF::group_addIfUnique(i, new_group.molecules(), map); @@ -607,17 +609,17 @@ QList G1FF::group_addIfUnique(quint32 i, const MoleculeGroup &new_gr bool G1FF::group_remove(quint32 i, const MoleculeView &molview) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup; - + try { if (molgroup.remove(molview)) { this->_pvt_removed( PartialMolecule(molview) ); - + FF::incrementVersion(); - + return true; } } @@ -626,7 +628,7 @@ bool G1FF::group_remove(quint32 i, const MoleculeView &molview) molgroup = old_state; throw; } - + return false; } @@ -634,20 +636,20 @@ bool G1FF::group_remove(quint32 i, const MoleculeView &molview) ViewsOfMol G1FF::group_remove(quint32 i, const ViewsOfMol &molviews) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup; - + try { ViewsOfMol removed_views = molgroup.remove(molviews); - + if (not removed_views.isEmpty()) { this->_pvt_removed(removed_views); - + FF::incrementVersion(); } - + return removed_views; } catch(...) @@ -655,7 +657,7 @@ ViewsOfMol G1FF::group_remove(quint32 i, const ViewsOfMol &molviews) molgroup = old_state; throw; } - + return ViewsOfMol(); } @@ -663,23 +665,23 @@ ViewsOfMol G1FF::group_remove(quint32 i, const ViewsOfMol &molviews) QList G1FF::group_remove(quint32 i, const Molecules &molecules) { assertValidGroup(i); - + boost::shared_ptr old_state( this->clone() ); - + try { QList removed_mols = molgroup.remove(molecules); - + if (not removed_mols.isEmpty()) { foreach (const ViewsOfMol &removed_mol, removed_mols) { this->_pvt_removed(removed_mol); } - + FF::incrementVersion(); } - + return removed_mols; } catch(...) @@ -687,7 +689,7 @@ QList G1FF::group_remove(quint32 i, const Molecules &molecules) this->copy(*old_state); throw; } - + return QList(); } @@ -702,17 +704,17 @@ QList G1FF::group_remove(quint32 i, const MoleculeGroup &new_group) bool G1FF::group_removeAll(quint32 i, const MoleculeView &molview) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup; - + try { if (molgroup.removeAll(molview)) { this->_pvt_removedAll( PartialMolecule(molview) ); - + FF::incrementVersion(); - + return true; } } @@ -721,7 +723,7 @@ bool G1FF::group_removeAll(quint32 i, const MoleculeView &molview) molgroup = old_state; throw; } - + return false; } @@ -729,20 +731,20 @@ bool G1FF::group_removeAll(quint32 i, const MoleculeView &molview) ViewsOfMol G1FF::group_removeAll(quint32 i, const ViewsOfMol &molviews) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup; - + try { ViewsOfMol removed_views = molgroup.removeAll(molviews); - + if (not removed_views.isEmpty()) { this->_pvt_removedAll(removed_views); - + FF::incrementVersion(); } - + return removed_views; } catch(...) @@ -750,7 +752,7 @@ ViewsOfMol G1FF::group_removeAll(quint32 i, const ViewsOfMol &molviews) molgroup = old_state; throw; } - + return ViewsOfMol(); } @@ -758,20 +760,20 @@ ViewsOfMol G1FF::group_removeAll(quint32 i, const ViewsOfMol &molviews) QList G1FF::group_removeAll(quint32 i, const Molecules &molecules) { assertValidGroup(i); - + boost::shared_ptr old_state( this->clone() ); - + try { QList removed_mols = molgroup.removeAll(molecules); - + foreach (const ViewsOfMol &removed_mol, removed_mols) { this->_pvt_removedAll(removed_mol); - + FF::incrementVersion(); } - + return removed_mols; } catch(...) @@ -779,7 +781,7 @@ QList G1FF::group_removeAll(quint32 i, const Molecules &molecules) this->copy(*old_state); throw; } - + return QList(); } @@ -794,20 +796,20 @@ QList G1FF::group_removeAll(quint32 i, const MoleculeGroup &new_grou ViewsOfMol G1FF::group_remove(quint32 i, MolNum molnum) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup; - + try { ViewsOfMol removed_mol = molgroup.remove(molnum); - + if (not removed_mol.isEmpty()) { this->_pvt_removed(removed_mol); - + FF::incrementVersion(); } - + return removed_mol; } catch(...) @@ -815,7 +817,7 @@ ViewsOfMol G1FF::group_remove(quint32 i, MolNum molnum) molgroup = old_state; throw; } - + return ViewsOfMol(); } @@ -824,23 +826,23 @@ ViewsOfMol G1FF::group_remove(quint32 i, MolNum molnum) QList G1FF::group_remove(quint32 i, const QSet &molnums) { assertValidGroup(i); - + boost::shared_ptr old_state( this->clone() ); - + try { QList removed_mols = molgroup.remove(molnums); - + if (not removed_mols.isEmpty()) { foreach (const ViewsOfMol &removed_mol, removed_mols) { this->_pvt_removed(removed_mol); } - + FF::incrementVersion(); } - + return removed_mols; } catch(...) @@ -848,7 +850,7 @@ QList G1FF::group_remove(quint32 i, const QSet &molnums) this->copy(*old_state); throw; } - + return QList(); } @@ -868,9 +870,9 @@ bool G1FF::group_update(quint32 i, const MoleculeData &moldata, bool auto_commit if (molgroup.update(moldata, auto_commit)) { this->_pvt_changed( Molecule(moldata), auto_commit ); - + FF::incrementVersion(); - + return true; } else @@ -882,20 +884,20 @@ bool G1FF::group_update(quint32 i, const MoleculeData &moldata, bool auto_commit QList G1FF::group_update(quint32 i, const Molecules &molecules, bool auto_commit) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup; - + try { QList updated_mols = molgroup.update(molecules, auto_commit); - + if (not updated_mols.isEmpty()) { this->_pvt_changed(updated_mols, auto_commit); - + FF::incrementVersion(); } - + return updated_mols; } catch(...) @@ -903,7 +905,7 @@ QList G1FF::group_update(quint32 i, const Molecules &molecules, bool a molgroup = old_state; throw; } - + return QList(); } @@ -914,28 +916,28 @@ QList G1FF::group_update(quint32 i, const MoleculeGroup &new_group, bo return G1FF::group_update(i, new_group.molecules(), auto_commit); } -/** Set the contents of this forcefield so that it only contains the +/** Set the contents of this forcefield so that it only contains the view of the molecule in 'molview' (using the supplied property map to find the properties that contain the required parameters for this forcefield) */ -bool G1FF::group_setContents(quint32 i, const MoleculeView &molview, +bool G1FF::group_setContents(quint32 i, const MoleculeView &molview, const PropertyMap &map) { assertValidGroup(i); - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup.setContents(molview); - + if (changed or this->_pvt_wouldChangeProperties(molview.data().number(),map)) { this->_pvt_removedAll(); this->_pvt_added( PartialMolecule(molview), map ); - + FF::incrementVersion(); - + return true; } } @@ -944,33 +946,33 @@ bool G1FF::group_setContents(quint32 i, const MoleculeView &molview, this->copy(*old_state); throw; } - + return false; } /** Set the contents of this forcefield so that it contains just the views of the molecule in 'molviews' */ -bool G1FF::group_setContents(quint32 i, const ViewsOfMol &molviews, +bool G1FF::group_setContents(quint32 i, const ViewsOfMol &molviews, const PropertyMap &map) { assertValidGroup(i); - + if (not allow_overlap_of_atoms) molviews.assertNoOverlap(); - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup.setContents(molviews); - + if (changed or this->_pvt_wouldChangeProperties(molviews.number(), map)) { this->_pvt_removedAll(); this->_pvt_added(molviews, map); - + FF::incrementVersion(); - + return true; } } @@ -979,16 +981,16 @@ bool G1FF::group_setContents(quint32 i, const ViewsOfMol &molviews, this->copy(*old_state); throw; } - + return false; } /** Set the contents of this forcefield so that it only contains 'molecules' */ -bool G1FF::group_setContents(quint32 i, const Molecules &molecules, +bool G1FF::group_setContents(quint32 i, const Molecules &molecules, const PropertyMap &map) { assertValidGroup(i); - + if (not allow_overlap_of_atoms) { for (Molecules::const_iterator it = molecules.constBegin(); @@ -998,13 +1000,13 @@ bool G1FF::group_setContents(quint32 i, const Molecules &molecules, it->assertNoOverlap(); } } - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup.setContents(molecules); - + if (not changed) { for (Molecules::const_iterator it = molecules.constBegin(); @@ -1018,20 +1020,20 @@ bool G1FF::group_setContents(quint32 i, const Molecules &molecules, } } } - + if (changed) { this->_pvt_removedAll(); - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) { this->_pvt_added(*it, map); } - + FF::incrementVersion(); - + return true; } } @@ -1040,17 +1042,17 @@ bool G1FF::group_setContents(quint32 i, const Molecules &molecules, this->copy(*old_state); throw; } - + return false; } /** Set the contents of this forcefield so that it contains only the molecules in 'molgroup' */ -bool G1FF::group_setContents(quint32 i, const MoleculeGroup &new_group, +bool G1FF::group_setContents(quint32 i, const MoleculeGroup &new_group, const PropertyMap &map) { assertValidGroup(i); - + if (not allow_overlap_of_atoms) { for (MoleculeGroup::const_iterator it = new_group.constBegin(); @@ -1060,13 +1062,13 @@ bool G1FF::group_setContents(quint32 i, const MoleculeGroup &new_group, it->assertNoOverlap(); } } - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup.setContents(new_group); - + if (not changed) { for (MoleculeGroup::const_iterator it = new_group.constBegin(); @@ -1080,20 +1082,20 @@ bool G1FF::group_setContents(quint32 i, const MoleculeGroup &new_group, } } } - + if (changed) { this->_pvt_removedAll(); - + for (MoleculeGroup::const_iterator it = new_group.constBegin(); it != new_group.constEnd(); ++it) { this->_pvt_added(*it, map); } - + FF::incrementVersion(); - + return true; } } @@ -1102,7 +1104,7 @@ bool G1FF::group_setContents(quint32 i, const MoleculeGroup &new_group, this->copy(*old_state); throw; } - + return false; } @@ -1281,7 +1283,7 @@ void G1FF::setContents(const MoleculeGroup &group, const PropertyMap &map) FF::setContents(MGIdx(0), group, map); } -/** Return whether or not this forcefield is using temporary workspace that needs +/** Return whether or not this forcefield is using temporary workspace that needs to be accepted */ bool G1FF::needsAccepting() const { diff --git a/corelib/src/libs/SireFF/g2ff.cpp b/corelib/src/libs/SireFF/g2ff.cpp index 451746837..6a85273db 100644 --- a/corelib/src/libs/SireFF/g2ff.cpp +++ b/corelib/src/libs/SireFF/g2ff.cpp @@ -78,13 +78,13 @@ QDataStream &operator<<(QDataStream &ds, const G2FF &g2ff) { writeHeader(ds, r_g2ff, 1); - + SharedDataStream sds(ds); - - sds << g2ff.molgroup[0] << g2ff.molgroup[1] + + sds << g2ff.molgroup[0] << g2ff.molgroup[1] << g2ff.allow_overlap_of_atoms << static_cast(g2ff); - + return ds; } @@ -93,17 +93,20 @@ QDataStream &operator>>(QDataStream &ds, G2FF &g2ff) { VersionID v = readHeader(ds, r_g2ff); - + if (v == 1) { SharedDataStream sds(ds); sds >> g2ff.molgroup[0] >> g2ff.molgroup[1] >> g2ff.allow_overlap_of_atoms >> static_cast(g2ff); + + g2ff.molgroup[0].setParent(&g2ff); + g2ff.molgroup[1].setParent(&g2ff); } else throw version_error(v, "1", r_g2ff, CODELOC); - + return ds; } @@ -112,10 +115,10 @@ G2FF::G2FF(bool allow_overlap) : FF(), allow_overlap_of_atoms(allow_overlap) { molgroup[0] = FFMolGroupPvt( QString("%1_A").arg(this->name()), 0, this ); molgroup[1] = FFMolGroupPvt( QString("%1_B").arg(this->name()), 1, this ); - + molgroup[0].setParent(this); molgroup[1].setParent(this); - + MolGroupsBase::addToIndex(molgroup[0]); MolGroupsBase::addToIndex(molgroup[1]); } @@ -143,29 +146,29 @@ void G2FF::_pvt_updateName() molgroup[0].setNewNumber(); need_reindex = true; } - + if (molgroup[1].name().value() != name_b) { molgroup[1].setName(name_b); molgroup[1].setNewNumber(); need_reindex = true; } - + if (need_reindex) this->reindex(); } /** Copy constructor */ -G2FF::G2FF(const G2FF &other) +G2FF::G2FF(const G2FF &other) : FF(other), allow_overlap_of_atoms(other.allow_overlap_of_atoms) { molgroup[0] = other.molgroup[0]; molgroup[1] = other.molgroup[1]; - + molgroup[0].setParent(this); molgroup[1].setParent(this); - + molgroup[0].setIndex(0); molgroup[1].setIndex(1); } @@ -179,15 +182,15 @@ G2FF& G2FF::operator=(const G2FF &other) { molgroup[0] = other.molgroup[0]; molgroup[1] = other.molgroup[1]; - + molgroup[0].setParent(this); molgroup[1].setParent(this); molgroup[0].setIndex(0); molgroup[1].setIndex(1); - + allow_overlap_of_atoms = other.allow_overlap_of_atoms; FF::operator=(other); - + return *this; } @@ -213,7 +216,7 @@ void G2FF::assertContains(MGNum mgnum) const const MoleculeGroup& G2FF::getGroup(MGNum mgnum) const { G2FF::assertContains(mgnum); - + if (molgroup[0].number() == mgnum) return molgroup[0]; else @@ -237,7 +240,7 @@ void G2FF::getGroups(const QList &mgnums, QVarLengthArray &groups) const { groups.clear(); - + foreach (MGNum mgnum, mgnums) { groups.append( &(this->at(mgnum)) ); @@ -251,7 +254,7 @@ QHash G2FF::getGroups() const groups.reserve(2); groups.insert( molgroup[0].number(), &(molgroup[0]) ); groups.insert( molgroup[1].number(), &(molgroup[1]) ); - + return groups; } @@ -276,9 +279,9 @@ void G2FF::group_setName(quint32 i, const QString &new_name) this->reindex(); } -/** Assert that there is no overlap between the atoms in +/** Assert that there is no overlap between the atoms in 'molview' and the atoms in 'group' - + \throw SireMol::duplicate_atom */ void G2FF::assertNoOverlap(const MoleculeGroup &group, @@ -292,9 +295,9 @@ void G2FF::assertNoOverlap(const MoleculeGroup &group, .arg(group.name()).arg(group.number()), CODELOC ); } -/** Assert that there is no overlap between the atoms in the molecules +/** Assert that there is no overlap between the atoms in the molecules in 'molecules' and the atoms in the group 'group' - + \throw SireMol::duplicate_atom */ void G2FF::assertNoOverlap(const MoleculeGroup &group, @@ -310,7 +313,7 @@ void G2FF::assertNoOverlap(const MoleculeGroup &group, /** Tell the derived forcefield that the following views have just been added to group 'groupid' - use the supplied map to get the parameters */ -void G2FF::_pvt_added(quint32 groupid, const ViewsOfMol &molviews, +void G2FF::_pvt_added(quint32 groupid, const ViewsOfMol &molviews, const PropertyMap &map) { this->_pvt_added(groupid, molviews.all(), map); @@ -337,7 +340,7 @@ void G2FF::_pvt_removedAll(quint32 groupid, const ViewsOfMol &mol) /** Assert that there is no overlap between the atoms in 'molview' and any atoms that exist currently in this molecule - + \throw SireMol::duplicate_atom */ void G2FF::assertNoOverlap(const MoleculeView &molview) const @@ -346,10 +349,10 @@ void G2FF::assertNoOverlap(const MoleculeView &molview) const this->assertNoOverlap(molgroup[1], molview); } -/** Add the molecule view in 'molview' to this forcefield, using the +/** Add the molecule view in 'molview' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error @@ -366,7 +369,7 @@ void G2FF::group_add(quint32 i, const MoleculeView &molview, this->assertNoOverlap(molview); FFMolGroupPvt old_state = molgroup[i]; - + try { molgroup[i].add(molview); @@ -380,15 +383,15 @@ void G2FF::group_add(quint32 i, const MoleculeView &molview, } } -/** Add the views of the molecule in 'molviews' to this forcefield, using the +/** Add the views of the molecule in 'molviews' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void G2FF::group_add(quint32 i, const ViewsOfMol &molviews, +void G2FF::group_add(quint32 i, const ViewsOfMol &molviews, const PropertyMap &map) { assertValidGroup(i); @@ -401,9 +404,9 @@ void G2FF::group_add(quint32 i, const ViewsOfMol &molviews, this->assertNoOverlap(molviews); molviews.assertNoOverlap(); } - + FFMolGroupPvt old_state = molgroup[i]; - + try { molgroup[i].add(molviews); @@ -417,15 +420,15 @@ void G2FF::group_add(quint32 i, const ViewsOfMol &molviews, } } -/** Add the molecules in 'molecules' to this forcefield, using the +/** Add the molecules in 'molecules' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void G2FF::group_add(quint32 i, const Molecules &molecules, +void G2FF::group_add(quint32 i, const Molecules &molecules, const PropertyMap &map) { assertValidGroup(i); @@ -442,15 +445,15 @@ void G2FF::group_add(quint32 i, const Molecules &molecules, ++it) { this->assertNoOverlap(*it); - + //also assert that there is no overlap within the molecule it->assertNoOverlap(); } } - + //save the old state of this forcefield boost::shared_ptr old_state( this->clone() ); - + try { if (not allow_overlap_of_atoms) @@ -458,7 +461,7 @@ void G2FF::group_add(quint32 i, const Molecules &molecules, //add the molecules - they must be unique views of we'd //have thrown an exception earlier! QList added_mols = molgroup[i].addIfUnique(molecules); - + foreach (const ViewsOfMol &added_mol, added_mols) { this->_pvt_added(i, added_mol, map); @@ -468,7 +471,7 @@ void G2FF::group_add(quint32 i, const Molecules &molecules, { //add the molecules... molgroup[i].add(molecules); - + //now parameterise the molecules and add them for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); @@ -477,7 +480,7 @@ void G2FF::group_add(quint32 i, const Molecules &molecules, this->_pvt_added(i, *it, map); } } - + FF::incrementVersion(); } catch(...) @@ -487,29 +490,29 @@ void G2FF::group_add(quint32 i, const Molecules &molecules, } } -/** Add the views of the molecules in the group 'molgroup' to this forcefield, - using the supplied property map to get the names of the properties that +/** Add the views of the molecules in the group 'molgroup' to this forcefield, + using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void G2FF::group_add(quint32 i, const MoleculeGroup &new_group, +void G2FF::group_add(quint32 i, const MoleculeGroup &new_group, const PropertyMap &map) { G2FF::group_add(i, new_group.molecules(), map); } -/** Add the molecule view in 'molview' to this forcefield, using the +/** Add the molecule view in 'molview' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -bool G2FF::group_addIfUnique(quint32 i, const MoleculeView &molview, +bool G2FF::group_addIfUnique(quint32 i, const MoleculeView &molview, const PropertyMap &map) { assertValidGroup(i); @@ -518,7 +521,7 @@ bool G2FF::group_addIfUnique(quint32 i, const MoleculeView &molview, return false; FFMolGroupPvt old_state = molgroup[i]; - + try { if (molgroup[i].addIfUnique(molview)) @@ -535,7 +538,7 @@ bool G2FF::group_addIfUnique(quint32 i, const MoleculeView &molview, this->_pvt_added( i, PartialMolecule(molview), map ); FF::incrementVersion(); - + return true; } else @@ -546,32 +549,32 @@ bool G2FF::group_addIfUnique(quint32 i, const MoleculeView &molview, molgroup[i] = old_state; throw; } - + return false; } - -/** Add the views of the molecule in 'molviews' to this forcefield, using the + +/** Add the views of the molecule in 'molviews' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -ViewsOfMol G2FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, +ViewsOfMol G2FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, const PropertyMap &map) { assertValidGroup(i); if (molviews.isEmpty()) return ViewsOfMol(); - + FFMolGroupPvt old_state = molgroup[i]; - + try { ViewsOfMol added_views = molgroup[i].addIfUnique(molviews); - + if (not added_views.isEmpty()) { if (not allow_overlap_of_atoms) @@ -581,10 +584,10 @@ ViewsOfMol G2FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, } this->_pvt_added(i, added_views, map); - + FF::incrementVersion(); } - + return added_views; } catch(...) @@ -592,34 +595,34 @@ ViewsOfMol G2FF::group_addIfUnique(quint32 i, const ViewsOfMol &molviews, molgroup[i] = old_state; throw; } - + return ViewsOfMol(); } -/** Add the molecules in 'molecules' to this forcefield, using the +/** Add the molecules in 'molecules' to this forcefield, using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -QList G2FF::group_addIfUnique(quint32 i, const Molecules &molecules, +QList G2FF::group_addIfUnique(quint32 i, const Molecules &molecules, const PropertyMap &map) { assertValidGroup(i); if (molecules.isEmpty()) return QList(); - + FFMolGroupPvt old_molgroup = molgroup[i]; - + boost::shared_ptr old_state( this->clone() ); - + try { QList added_mols = molgroup[i].addIfUnique(molecules); - + if (not added_mols.isEmpty()) { if (not allow_overlap_of_atoms) @@ -632,16 +635,16 @@ QList G2FF::group_addIfUnique(quint32 i, const Molecules &molecules, added_mol.assertNoOverlap(); } } - + //now get the parameters foreach (const ViewsOfMol &added_mol, added_mols) { this->_pvt_added(i, added_mol, map); } - + FF::incrementVersion(); } - + return added_mols; } catch(...) @@ -649,19 +652,19 @@ QList G2FF::group_addIfUnique(quint32 i, const Molecules &molecules, this->copy(*old_state); throw; } - + return QList(); } -/** Add the views of the molecules in the group 'molgroup' to this forcefield, - using the supplied property map to get the names of the properties that +/** Add the views of the molecules in the group 'molgroup' to this forcefield, + using the supplied property map to get the names of the properties that contain the required forcefield parameters - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -QList G2FF::group_addIfUnique(quint32 i, const MoleculeGroup &new_group, +QList G2FF::group_addIfUnique(quint32 i, const MoleculeGroup &new_group, const PropertyMap &map) { return G2FF::group_addIfUnique(i, new_group.molecules(), map); @@ -671,17 +674,17 @@ QList G2FF::group_addIfUnique(quint32 i, const MoleculeGroup &new_gr bool G2FF::group_remove(quint32 i, const MoleculeView &molview) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup[i]; - + try { if (molgroup[i].remove(molview)) { this->_pvt_removed( i, PartialMolecule(molview) ); - + FF::incrementVersion(); - + return true; } } @@ -690,7 +693,7 @@ bool G2FF::group_remove(quint32 i, const MoleculeView &molview) molgroup[i] = old_state; throw; } - + return false; } @@ -698,20 +701,20 @@ bool G2FF::group_remove(quint32 i, const MoleculeView &molview) ViewsOfMol G2FF::group_remove(quint32 i, const ViewsOfMol &molviews) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup[i]; - + try { ViewsOfMol removed_views = molgroup[i].remove(molviews); - + if (not removed_views.isEmpty()) { this->_pvt_removed(i, removed_views); - + FF::incrementVersion(); } - + return removed_views; } catch(...) @@ -719,7 +722,7 @@ ViewsOfMol G2FF::group_remove(quint32 i, const ViewsOfMol &molviews) molgroup[i] = old_state; throw; } - + return ViewsOfMol(); } @@ -727,23 +730,23 @@ ViewsOfMol G2FF::group_remove(quint32 i, const ViewsOfMol &molviews) QList G2FF::group_remove(quint32 i, const Molecules &molecules) { assertValidGroup(i); - + boost::shared_ptr old_state( this->clone() ); - + try { QList removed_mols = molgroup[i].remove(molecules); - + if (not removed_mols.isEmpty()) { foreach (const ViewsOfMol &removed_mol, removed_mols) { this->_pvt_removed(i, removed_mol); } - + FF::incrementVersion(); } - + return removed_mols; } catch(...) @@ -751,7 +754,7 @@ QList G2FF::group_remove(quint32 i, const Molecules &molecules) this->copy(*old_state); throw; } - + return QList(); } @@ -766,17 +769,17 @@ QList G2FF::group_remove(quint32 i, const MoleculeGroup &new_group) bool G2FF::group_removeAll(quint32 i, const MoleculeView &molview) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup[i]; - + try { if (molgroup[i].removeAll(molview)) { this->_pvt_removedAll( i, PartialMolecule(molview) ); - + FF::incrementVersion(); - + return true; } } @@ -785,7 +788,7 @@ bool G2FF::group_removeAll(quint32 i, const MoleculeView &molview) molgroup[i] = old_state; throw; } - + return false; } @@ -793,20 +796,20 @@ bool G2FF::group_removeAll(quint32 i, const MoleculeView &molview) ViewsOfMol G2FF::group_removeAll(quint32 i, const ViewsOfMol &molviews) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup[i]; - + try { ViewsOfMol removed_views = molgroup[i].removeAll(molviews); - + if (not removed_views.isEmpty()) { this->_pvt_removedAll(i, removed_views); - + FF::incrementVersion(); } - + return removed_views; } catch(...) @@ -814,7 +817,7 @@ ViewsOfMol G2FF::group_removeAll(quint32 i, const ViewsOfMol &molviews) molgroup[i] = old_state; throw; } - + return ViewsOfMol(); } @@ -822,20 +825,20 @@ ViewsOfMol G2FF::group_removeAll(quint32 i, const ViewsOfMol &molviews) QList G2FF::group_removeAll(quint32 i, const Molecules &molecules) { assertValidGroup(i); - + boost::shared_ptr old_state( this->clone() ); - + try { QList removed_mols = molgroup[i].removeAll(molecules); - + foreach (const ViewsOfMol &removed_mol, removed_mols) { this->_pvt_removedAll(i, removed_mol); - + FF::incrementVersion(); } - + return removed_mols; } catch(...) @@ -843,7 +846,7 @@ QList G2FF::group_removeAll(quint32 i, const Molecules &molecules) this->copy(*old_state); throw; } - + return QList(); } @@ -858,20 +861,20 @@ QList G2FF::group_removeAll(quint32 i, const MoleculeGroup &new_grou ViewsOfMol G2FF::group_remove(quint32 i, MolNum molnum) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup[i]; - + try { ViewsOfMol removed_mol = molgroup[i].remove(molnum); - + if (not removed_mol.isEmpty()) { this->_pvt_removed(i, removed_mol); - + FF::incrementVersion(); } - + return removed_mol; } catch(...) @@ -879,7 +882,7 @@ ViewsOfMol G2FF::group_remove(quint32 i, MolNum molnum) molgroup[i] = old_state; throw; } - + return ViewsOfMol(); } @@ -888,23 +891,23 @@ ViewsOfMol G2FF::group_remove(quint32 i, MolNum molnum) QList G2FF::group_remove(quint32 i, const QSet &molnums) { assertValidGroup(i); - + boost::shared_ptr old_state( this->clone() ); - + try { QList removed_mols = molgroup[i].remove(molnums); - + if (not removed_mols.isEmpty()) { foreach (const ViewsOfMol &removed_mol, removed_mols) { this->_pvt_removed(i, removed_mol); } - + FF::incrementVersion(); } - + return removed_mols; } catch(...) @@ -912,7 +915,7 @@ QList G2FF::group_remove(quint32 i, const QSet &molnums) this->copy(*old_state); throw; } - + return QList(); } @@ -930,17 +933,17 @@ void G2FF::group_removeAll(quint32 i) bool G2FF::group_update(quint32 i, const MoleculeData &moldata, bool auto_commit) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup[i]; - + try { if (molgroup[i].update(moldata,auto_commit)) { this->_pvt_changed( i, Molecule(moldata), auto_commit ); - + FF::incrementVersion(); - + return true; } } @@ -949,7 +952,7 @@ bool G2FF::group_update(quint32 i, const MoleculeData &moldata, bool auto_commit molgroup[i] = old_state; throw; } - + return false; } @@ -958,20 +961,20 @@ bool G2FF::group_update(quint32 i, const MoleculeData &moldata, bool auto_commit QList G2FF::group_update(quint32 i, const Molecules &molecules, bool auto_commit) { assertValidGroup(i); - + FFMolGroupPvt old_state = molgroup[i]; - + try { QList updated_mols = molgroup[i].update(molecules, auto_commit); - + if (not updated_mols.isEmpty()) { this->_pvt_changed(i, updated_mols, auto_commit); - + FF::incrementVersion(); } - + return updated_mols; } catch(...) @@ -979,7 +982,7 @@ QList G2FF::group_update(quint32 i, const Molecules &molecules, bool a molgroup[i] = old_state; throw; } - + return QList(); } @@ -990,31 +993,31 @@ QList G2FF::group_update(quint32 i, const MoleculeGroup &new_group, bo return G2FF::group_update(i, new_group.molecules(), auto_commit); } -/** Set the contents of this forcefield so that it only contains the +/** Set the contents of this forcefield so that it only contains the view of the molecule in 'molview' (using the supplied property map to find the properties that contain the required parameters for this forcefield) */ -bool G2FF::group_setContents(quint32 i, const MoleculeView &molview, +bool G2FF::group_setContents(quint32 i, const MoleculeView &molview, const PropertyMap &map) { assertValidGroup(i); - + if (not allow_overlap_of_atoms) this->assertNoOverlap(molgroup[i!=1], molview); - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup[i].setContents(molview); - + if (changed or this->_pvt_wouldChangeProperties(i, molview.data().number(),map)) { this->_pvt_removedAll(i); this->_pvt_added( i, PartialMolecule(molview), map ); - + FF::incrementVersion(); - + return true; } } @@ -1023,36 +1026,36 @@ bool G2FF::group_setContents(quint32 i, const MoleculeView &molview, this->copy(*old_state); throw; } - + return false; } /** Set the contents of this forcefield so that it contains just the views of the molecule in 'molviews' */ -bool G2FF::group_setContents(quint32 i, const ViewsOfMol &molviews, +bool G2FF::group_setContents(quint32 i, const ViewsOfMol &molviews, const PropertyMap &map) { assertValidGroup(i); - + if (not allow_overlap_of_atoms) { molviews.assertNoOverlap(); this->assertNoOverlap(molgroup[i!=1], molviews); } - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup[i].setContents(molviews); - + if (changed or this->_pvt_wouldChangeProperties(i, molviews.number(), map)) { this->_pvt_removedAll(i); this->_pvt_added(i, molviews, map); - + FF::incrementVersion(); - + return true; } } @@ -1061,16 +1064,16 @@ bool G2FF::group_setContents(quint32 i, const ViewsOfMol &molviews, this->copy(*old_state); throw; } - + return false; } /** Set the contents of this forcefield so that it only contains 'molecules' */ -bool G2FF::group_setContents(quint32 i, const Molecules &molecules, +bool G2FF::group_setContents(quint32 i, const Molecules &molecules, const PropertyMap &map) { assertValidGroup(i); - + if (not allow_overlap_of_atoms) { for (Molecules::const_iterator it = molecules.constBegin(); @@ -1079,18 +1082,18 @@ bool G2FF::group_setContents(quint32 i, const Molecules &molecules, { it->assertNoOverlap(); } - + //assert that none of these molecules overlap with the //molecules in the other group this->assertNoOverlap(molgroup[i!=1], molecules); } - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup[i].setContents(molecules); - + if (not changed) { for (Molecules::const_iterator it = molecules.constBegin(); @@ -1104,20 +1107,20 @@ bool G2FF::group_setContents(quint32 i, const Molecules &molecules, } } } - + if (changed) { this->_pvt_removedAll(i); - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) { this->_pvt_added(i, *it, map); } - + FF::incrementVersion(); - + return true; } } @@ -1126,17 +1129,17 @@ bool G2FF::group_setContents(quint32 i, const Molecules &molecules, this->copy(*old_state); throw; } - + return false; } /** Set the contents of this forcefield so that it contains only the molecules in 'molgroup' */ -bool G2FF::group_setContents(quint32 i, const MoleculeGroup &new_group, +bool G2FF::group_setContents(quint32 i, const MoleculeGroup &new_group, const PropertyMap &map) { assertValidGroup(i); - + if (not allow_overlap_of_atoms) { for (MoleculeGroup::const_iterator it = new_group.constBegin(); @@ -1145,18 +1148,18 @@ bool G2FF::group_setContents(quint32 i, const MoleculeGroup &new_group, { it->assertNoOverlap(); } - + //assert that none of these molecules overlap with the //molecules in the other group this->assertNoOverlap(molgroup[i!=1], new_group.molecules()); } - + boost::shared_ptr old_state( this->clone() ); - + try { bool changed = molgroup[i].setContents(new_group); - + if (not changed) { for (MoleculeGroup::const_iterator it = new_group.constBegin(); @@ -1170,20 +1173,20 @@ bool G2FF::group_setContents(quint32 i, const MoleculeGroup &new_group, } } } - + if (changed) { this->_pvt_removedAll(i); - + for (MoleculeGroup::const_iterator it = new_group.constBegin(); it != new_group.constEnd(); ++it) { this->_pvt_added(i, *it, map); } - + FF::incrementVersion(); - + return true; } } @@ -1192,7 +1195,7 @@ bool G2FF::group_setContents(quint32 i, const MoleculeGroup &new_group, this->copy(*old_state); throw; } - + return false; } @@ -1210,7 +1213,7 @@ void G2FF::accept() { if (molgroup[0].needsAccepting()) molgroup[0].accept(); - + if (molgroup[1].needsAccepting()) molgroup[1].accept(); } diff --git a/corelib/src/libs/SireID/index.h b/corelib/src/libs/SireID/index.h index 9cf28dbad..837a02595 100644 --- a/corelib/src/libs/SireID/index.h +++ b/corelib/src/libs/SireID/index.h @@ -54,10 +54,10 @@ namespace SireID provides the index of an object in an indexable list or array (or indeed any container that holds objects in a linear, numerical indexed manner (e.g. atoms in a Molecule, Molecules in a group) - - This class cannot be instantiated on its own - it must be + + This class cannot be instantiated on its own - it must be inherited by a derived class to be used. - + @author Christopher Woods */ class SIREID_EXPORT IndexBase @@ -83,20 +83,20 @@ friend SIREID_EXPORT QDataStream& ::operator>>(QDataStream&, IndexBase&); protected: explicit IndexBase(qint32 idx = IndexBase::null()); - + IndexBase(const IndexBase &other); - + IndexBase& operator=(const IndexBase &other); - + void throwInvalidIndex(qint32 n) const; - + /** The actual index value */ qint32 _idx; }; /** This derived version of index provides all of the standard operators that you would expect. - + @author Christopher Woods */ template @@ -104,15 +104,15 @@ class Index_T_ : public IndexBase { public: explicit Index_T_(qint32 idx=IndexBase::null()); - + explicit Index_T_(const Index_T_ &other); ~Index_T_(); const char* what() const; - + IndexBase* clone() const; - + uint hash() const; bool operator==(const T &other) const; @@ -120,13 +120,13 @@ class Index_T_ : public IndexBase bool operator==(qint32 val) const; bool operator!=(const T &other) const; bool operator!=(qint32 val) const; - + T& operator=(qint32 idx); - + T& operator+=(qint32 val); T& operator++(); T operator++(qint32); - + T& operator-=(qint32 val); T& operator--(); T operator--(qint32); @@ -136,17 +136,17 @@ class SIREID_EXPORT Index : public Index_T_ { public: explicit Index(qint32 idx = IndexBase::null()); - + Index(const Index &other); - + ~Index(); - + static const char* typeName(); - + Index* clone() const; - + static Index null(); - + QString toString() const; }; @@ -268,7 +268,7 @@ T Index_T_::operator++(qint32) { T orig(*this); ++_idx; - + return orig; } diff --git a/corelib/src/libs/SireIO/amberrst.cpp b/corelib/src/libs/SireIO/amberrst.cpp index 0546e2db8..396bf1790 100644 --- a/corelib/src/libs/SireIO/amberrst.cpp +++ b/corelib/src/libs/SireIO/amberrst.cpp @@ -39,6 +39,7 @@ #include "SireMol/atomvelocities.h" #include "SireMol/atomforces.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireVol/periodicbox.h" #include "SireVol/triclinicbox.h" diff --git a/corelib/src/libs/SireIO/amberrst7.cpp b/corelib/src/libs/SireIO/amberrst7.cpp index 75666ba3a..9675c26a3 100644 --- a/corelib/src/libs/SireIO/amberrst7.cpp +++ b/corelib/src/libs/SireIO/amberrst7.cpp @@ -37,6 +37,7 @@ #include "SireMol/atomcoords.h" #include "SireMol/atomvelocities.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireVol/periodicbox.h" #include "SireVol/triclinicbox.h" diff --git a/corelib/src/libs/SireIO/biosimspace.cpp b/corelib/src/libs/SireIO/biosimspace.cpp index d9bea9854..43f7de6c0 100644 --- a/corelib/src/libs/SireIO/biosimspace.cpp +++ b/corelib/src/libs/SireIO/biosimspace.cpp @@ -39,6 +39,7 @@ #include "SireMol/mgname.h" #include "SireMol/moleditor.h" #include "SireMol/molidx.h" +#include "SireMol/core.h" #include "SireVol/periodicbox.h" #include "SireVol/triclinicbox.h" @@ -935,10 +936,16 @@ System repartitionHydrogenMass( { PropertyMap pmap; + // Whether to use coordinates to reconstruct the + // connectivity. + if (map["use_coordinates"].hasValue()) + { + pmap.set("use_coordinates", map["use_coordinates"]); + } + // Lambda = 0 mappings. pmap.set("mass", "mass0"); pmap.set("element", "element0"); - pmap.set("connectivity", "connectivity0"); pmap.set("coordinates", "coordinates0"); molecule = repartitionHydrogenMass( @@ -947,7 +954,6 @@ System repartitionHydrogenMass( // Lambda = 1 mappings. pmap.set("mass", "mass1"); pmap.set("element", "element1"); - pmap.set("connectivity", "connectivity1"); pmap.set("coordinates", "coordinates1"); molecule = repartitionHydrogenMass( @@ -955,8 +961,18 @@ System repartitionHydrogenMass( } else { + // Copy the property map. + PropertyMap pmap = map; + + // Whether to use coordinates to reconstruct the + // connectivity. + if (map["use_coordinates"].hasValue()) + { + pmap.set("use_coordinates", map["use_coordinates"]); + } + molecule = repartitionHydrogenMass( - molecule, factor, water, map); + molecule, factor, water, pmap); } molgroup.add(molecule); @@ -985,9 +1001,10 @@ Molecule repartitionHydrogenMass( return molecule; } - // Get the name of the element and mass properties. + // Get the name of the element, mass, and connectivity properties. const auto elem_prop = map["element"]; const auto mass_prop = map["mass"]; + const auto conn_prop = map["connectivity"]; if (not molecule.hasProperty(elem_prop)) { @@ -1022,9 +1039,24 @@ Molecule repartitionHydrogenMass( if (hydrogens.count() == 0) return molecule; - // Generate the molecular connectivity. (Don't rely on the "connectivity" - // property.) - const auto connectivity = Connectivity(molecule, CovalentBondHunter(), map); + Connectivity connectivity; + // Generate the connectivity from the coordinates. + if (map["use_coordinates"].hasValue()) + { + connectivity = Connectivity(molecule, CovalentBondHunter(), map); + } + // Use the "connectivity" property, if present. + else + { + if (not molecule.hasProperty(conn_prop)) + { + throw SireError::incompatible_error(QObject::tr( + "The molecule doesn't have a \"%1\" property!") + .arg(conn_prop.toString()), CODELOC); + } + + connectivity = molecule.property(conn_prop).asA(); + } // Compute the initial mass. double initial_mass = 0; @@ -1049,7 +1081,7 @@ Molecule repartitionHydrogenMass( .molecule(); // Store the indices of the atoms that are connected to this hydrogen. - connections.append(connectivity.connectionsTo(idx).toList()); + connections.append(connectivity.connectionsTo(idx).values()); } // Commit the changes. @@ -1198,7 +1230,7 @@ boost::tuple > updateCoordinatesAndVelocities( } // Try to update the velocity property. This isn't always present, - // so olny try this when the passed system contains the property. + // so only try this when the passed system contains the property. if (molecule1.hasProperty(prop_v1)) { try @@ -1239,7 +1271,7 @@ boost::tuple > updateCoordinatesAndVelocities( else { // Loop over the mapping. - for (const auto &molIdx0 : molecule_mapping) + for (const auto &molIdx0 : molecule_mapping.keys()) { // Get the molecule index in molecule1. const auto molIdx1 = molecule_mapping[molIdx0]; @@ -1398,7 +1430,7 @@ boost::tuple > updateCoordinatesAndVelocities( } // Try to update the velocity property. This isn't always present, - // so olny try this when the passed system contains the property. + // so only try this when the passed system contains the property. if (molecule_updated.hasProperty(prop_v1)) { try @@ -1439,7 +1471,7 @@ boost::tuple > updateCoordinatesAndVelocities( else { // Loop over the mapping. - for (const auto &molIdx0 : molecule_mapping) + for (const auto &molIdx0 : molecule_mapping.keys()) { // Get the molecule index in molecule1. const auto molIdx1 = molecule_mapping[molIdx0]; diff --git a/corelib/src/libs/SireIO/charmmpsf.cpp b/corelib/src/libs/SireIO/charmmpsf.cpp index 0a13801cc..25257fc2b 100644 --- a/corelib/src/libs/SireIO/charmmpsf.cpp +++ b/corelib/src/libs/SireIO/charmmpsf.cpp @@ -52,6 +52,7 @@ #include "SireMol/connectivity.h" #include "SireMol/molecule.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -3742,6 +3743,10 @@ MolStructureEditor CharmmPSF::getMolStructure(int imol, const PropertyName &cutt // There will be multiple atoms per residue. QMultiMap res_to_atom; + // Mapping between segments and atoms. + // There will be multiple atoms per segment + QMultiMap seg_to_atom; + // Mapping between residue number and name. QMap num_to_name; @@ -3760,6 +3765,10 @@ MolStructureEditor CharmmPSF::getMolStructure(int imol, const PropertyName &cutt // Map the atom to its residue. res_to_atom.insert(res_num, atom_id); + const auto seg = atom.getSegment(); + + seg_to_atom.insert(seg, atom_id); + // Make sure the residue number doesn't already exist // in the map. Residue numbers must be unique. if (not num_to_name.contains(res_num)) @@ -3815,6 +3824,20 @@ MolStructureEditor CharmmPSF::getMolStructure(int imol, const PropertyName &cutt ires++; } + for (auto seg : seg_to_atom.uniqueKeys()) + { + auto segment = mol.add(SegName(seg)); + + QList seg_atoms = seg_to_atom.values(seg); + std::sort(seg_atoms.begin(), seg_atoms.end()); + + for (auto seg_atom : seg_atoms) + { + auto atom = mol.atom(AtomNum(atoms[seg_atom].getNumber())); + atom.reparent(SegName(seg)); + } + } + if (cutting.hasValue()) { const CuttingFunction &cutfunc = cutting.value().asA(); diff --git a/corelib/src/libs/SireIO/gro87.cpp b/corelib/src/libs/SireIO/gro87.cpp index bbb534891..df6a20c61 100644 --- a/corelib/src/libs/SireIO/gro87.cpp +++ b/corelib/src/libs/SireIO/gro87.cpp @@ -38,6 +38,7 @@ #include "SireMol/mgname.h" #include "SireMol/molidx.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireUnits/units.h" @@ -182,7 +183,7 @@ static QVector toLines(const QVector &atmnams, if (has_velocities) { - Vector vel = 0.1 * vels.constData()[iatm]; // convert to nanometers per picosecond + Vector vel = vels.constData()[iatm]; lines_data[iatm] = QString("%1%2%3%4%5%6%7%8%9%10") .arg(resnum, 5) @@ -296,16 +297,16 @@ static QVector getVelocities(const Molecule &mol, const PropertyName &ve QVector vels( mol.nAtoms() ); - const double units = 1.0 / (angstrom/picosecond).value(); + const auto units = nanometer / picosecond; for (int i=0; i MoleculeParser::parse(const QStringList &filenames, System MoleculeParser::read(const QString &filename, const PropertyMap &map) { MoleculeParserPtr parser = MoleculeParser::parse(filename, map); - return parser.read().toSystem(map); + auto system = parser.read().toSystem(map); + + if (system.name().isEmpty()) + { + system.setName(QFileInfo(filename).baseName()); + } + + return system; } /** Read the two passed files, returning the System contained therein. The two @@ -947,7 +954,24 @@ System MoleculeParser::read(const QString &file1, const QString &file2, parser2 = MoleculeParser::parse(file2,map); } - return parser1.read().toSystem(parser2.read(),map); + auto system = parser1.read().toSystem(parser2.read(),map); + + if (system.name().isEmpty()) + { + auto p1 = QFileInfo(file1).baseName(); + auto p2 = QFileInfo(file2).baseName(); + + if (p1 == p2) + { + system.setName(p1); + } + else + { + system.setName(QString("%1:%2").arg(p1).arg(p2)); + } + } + + return system; } /** Read the files with passed filenames, returning the System contained therein. @@ -962,7 +986,23 @@ System MoleculeParser::read(const QStringList &filenames, const PropertyMap &map MoleculeParserPtr parser = parsers.takeFirst(); - return parser.read().toSystem(parsers, map); + auto system = parser.read().toSystem(parsers, map); + + if (system.name().isEmpty()) + { + QSet parts; + for (const auto &filename : filenames) + { + parts.insert(QFileInfo(filename).baseName()); + } + + //QStringList names(parts.constBegin(), parts.constEnd()); + QStringList names = parts.values(); + + system.setName(names.join(":")); + } + + return system; } /** Synonym for MoleculeParser::read */ @@ -983,6 +1023,60 @@ System MoleculeParser::load(const QStringList &filenames, const PropertyMap &map return MoleculeParser::read(filenames, map); } +/** Parse the passed file, returning the resulting Parser. This employs a lot + of magic to automatically work out the format of the file and whether or + not this is parseable by Sire... This raises an exception if the file + cannot be recognised, or if there is an error in parsing. */ +MoleculeParserPtr MoleculeParser::parse(const QString &filename) +{ + return parse(filename, PropertyMap()); +} + +/** Parse the passed set of files, returning the resulting Parsers */ +QList MoleculeParser::parse(const QStringList &filenames) +{ + return parse(filenames, PropertyMap()); +} + +/** Read the passed file called 'filename', returning the System contained therein */ +System MoleculeParser::read(const QString &filename) +{ + return read(filename, PropertyMap()); +} + +/** Read the two passed files, returning the System contained therein. The two + files must refer to the same System, i.e. they could be a parameter + coordinate file */ +System MoleculeParser::read(const QString &file1, const QString &file2) +{ + return read(file1, file2, PropertyMap()); +} + +/** Read the files with passed filenames, returning the System contained therein. + Note that all of the files must be connected to the same system + (i.e. it could be the Amber Parm and Rst file) */ +System MoleculeParser::read(const QStringList &filenames) +{ + return read(filenames, PropertyMap()); +} + +/** Synonym for MoleculeParser::read */ +System MoleculeParser::load(const QString &filename) +{ + return load(filename, PropertyMap()); +} + +/** Synonym for MoleculeParser::read */ +System MoleculeParser::load(const QString &file1, const QString &file2) +{ + return load(file1, file2, PropertyMap()); +} + +/** Synonym for MoleculeParser::read */ +System MoleculeParser::load(const QStringList &filenames) +{ + return load(filenames, PropertyMap()); +} + /** Return the suffix (or suffixes) given to files that support this format. The first suffix is the preferred on to use */ QStringList MoleculeParser::formatSuffix() const @@ -1445,6 +1539,84 @@ System MoleculeParser::toSystem(const QList &others, return system; } +/** Save the passed System to the file called 'filename'. First, the 'fileformat' + property is looked at in 'map'. This is used to set the format(s) of + the files that are written (comma-separated list). + + If this does not exist, then the extension of the + file is used to work out which format to use. If no extension is given, + then the System will be queried to find out its preferred format (normally + the format it was loaded with), via its 'fileformat' property + (again, comma separated list). + + If their preferred format results in multiple files, then + multiple files will be written. This returns the full pathnames to + all of the files that are written +*/ +QStringList MoleculeParser::write(const System &system, const QString &filename) +{ + return write(system, filename, PropertyMap()); +} + +/** Extension of MoleculeParser::write which allows many filenames. + The same rules to locate the fileformats are now used, except that now only + the number of files written must match the number of filenames */ +QStringList MoleculeParser::write(const System &system, + const QStringList &files) +{ + return write(system, files, PropertyMap()); +} + +/** Extension of MoleculeParser::write which allows you to specify two filenames. + The same rules to locate the fileformats are now used, except now only two + files are permitted to be written */ +QStringList MoleculeParser::write(const System &system, const QString &file1, + const QString &file2) +{ + return write(system, file1, file2, PropertyMap()); +} + +/** Synonym of MoleculeParser::write */ +QStringList MoleculeParser::save(const System &system, const QString &filename) +{ + return save(system, filename, PropertyMap()); +} + +/** Synonym of MoleculeParser::write */ +QStringList MoleculeParser::save(const System &system, + const QString &file1, const QString &file2) +{ + return save(system, file1, file2, PropertyMap()); +} + +/** Synonym of MoleculeParser::write */ +QStringList MoleculeParser::save(const System &system, + const QStringList &filenames) +{ + return save(system, filenames, PropertyMap()); +} + +/** Return the System that is constructed from the data in this parser */ +System MoleculeParser::toSystem() const +{ + return toSystem(PropertyMap()); +} + +/** Return the System that is constructed from the data in the two + passed parsers (i.e. representing a topology and a coordinate file) */ +System MoleculeParser::toSystem(const MoleculeParser &other) const +{ + return toSystem(other, PropertyMap()); +} + +/** Return the System that is constructed from the information in the passed + parsers. This will parse the information in order, meaning that data contained + in earlier parsers may be overwritten by data from later parsers */ +System MoleculeParser::toSystem(const QList &others) const +{ + return toSystem(others, PropertyMap()); +} + /** Start creating a new System using the information contained in this parser, using the (optional) property map to name the properties */ System MoleculeParser::startSystem(const PropertyMap &map) const diff --git a/corelib/src/libs/SireIO/moleculeparser.h b/corelib/src/libs/SireIO/moleculeparser.h index b825d40ca..b2c94e791 100644 --- a/corelib/src/libs/SireIO/moleculeparser.h +++ b/corelib/src/libs/SireIO/moleculeparser.h @@ -159,48 +159,78 @@ friend SIREIO_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeParser&); static QString supportedFormats(); static MoleculeParserPtr parse(const QString &filename, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static QList parse(const QStringList &filenames, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static SireSystem::System read(const QString &filename, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static SireSystem::System read(const QString &file1, const QString &file2, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static SireSystem::System read(const QStringList &filenames, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static SireSystem::System load(const QString &filename, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static SireSystem::System load(const QString &file1, const QString &file2, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static SireSystem::System load(const QStringList &filenames, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static QStringList write(const SireSystem::System &system, const QString &filename, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static QStringList write(const SireSystem::System &system, const QString &file1, const QString &file2, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static QStringList write(const SireSystem::System &system, const QStringList &filenames, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static QStringList save(const SireSystem::System &system, const QString &filename, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static QStringList save(const SireSystem::System &system, const QString &file1, const QString &file2, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); static QStringList save(const SireSystem::System &system, const QStringList &filenames, - const PropertyMap &map = PropertyMap()); + const PropertyMap &map); + + static MoleculeParserPtr parse(const QString &filename); + + static QList parse(const QStringList &filenames); + + static SireSystem::System read(const QString &filename); + static SireSystem::System read(const QString &file1, const QString &file2); + static SireSystem::System read(const QStringList &filenames); + + static SireSystem::System load(const QString &filename); + static SireSystem::System load(const QString &file1, const QString &file2); + static SireSystem::System load(const QStringList &filenames); + + static QStringList write(const SireSystem::System &system, + const QString &filename); + + static QStringList write(const SireSystem::System &system, + const QString &file1, const QString &file2); + + static QStringList write(const SireSystem::System &system, + const QStringList &filenames); + + static QStringList save(const SireSystem::System &system, + const QString &filename); + + static QStringList save(const SireSystem::System &system, + const QString &file1, const QString &file2); + + static QStringList save(const SireSystem::System &system, + const QStringList &filenames); virtual bool isLead() const; virtual bool canFollow() const; @@ -220,13 +250,19 @@ friend SIREIO_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeParser&); void setUseParallel(bool on); bool usesParallel() const; - SireSystem::System toSystem(const PropertyMap &map = PropertyMap()) const; + SireSystem::System toSystem(const PropertyMap &map) const; SireSystem::System toSystem(const MoleculeParser &other, - const PropertyMap &map = PropertyMap()) const; + const PropertyMap &map) const; SireSystem::System toSystem(const QList &others, - const PropertyMap &map = PropertyMap()) const; + const PropertyMap &map) const; + + SireSystem::System toSystem() const; + + SireSystem::System toSystem(const MoleculeParser &other) const; + + SireSystem::System toSystem(const QList &others) const; virtual void writeToFile(const QString &filename) const; diff --git a/corelib/src/libs/SireIO/netcdffile.cpp b/corelib/src/libs/SireIO/netcdffile.cpp index cdff1096d..0842acc82 100644 --- a/corelib/src/libs/SireIO/netcdffile.cpp +++ b/corelib/src/libs/SireIO/netcdffile.cpp @@ -985,7 +985,7 @@ static void assert_no_netcdf_error(int errnum) #else throw SireError::io_error( QObject::tr( "NetCDF experienced an error as it is not compiled and supported with " - "this version of Sire."), CODELOC ); + "this version of sire."), CODELOC ); #endif } diff --git a/corelib/src/libs/SireIO/pdb2.cpp b/corelib/src/libs/SireIO/pdb2.cpp index 391809967..6928fc081 100644 --- a/corelib/src/libs/SireIO/pdb2.cpp +++ b/corelib/src/libs/SireIO/pdb2.cpp @@ -45,6 +45,7 @@ #include "SireMol/errors.h" #include "SireMol/molecule.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireUnits/units.h" diff --git a/corelib/src/libs/SireIO/sdf.cpp b/corelib/src/libs/SireIO/sdf.cpp index 3e9d7c2ec..b6a476c9c 100644 --- a/corelib/src/libs/SireIO/sdf.cpp +++ b/corelib/src/libs/SireIO/sdf.cpp @@ -55,6 +55,7 @@ #include "SireMol/bondtype.h" #include "SireMol/stereoscopy.h" #include "SireMol/radical.h" +#include "SireMol/core.h" #include "SireBase/propertylist.h" diff --git a/corelib/src/libs/SireMM/CMakeLists.txt b/corelib/src/libs/SireMM/CMakeLists.txt index 95996ed9e..cdf522ec1 100644 --- a/corelib/src/libs/SireMM/CMakeLists.txt +++ b/corelib/src/libs/SireMM/CMakeLists.txt @@ -20,6 +20,7 @@ set ( SIREMM_HEADERS atomfunctions.h atomljs.h atompairs.hpp + bond.h clj14group.h cljatoms.h cljboxes.h @@ -72,6 +73,8 @@ set ( SIREMM_HEADERS restraint.h restraintcomponent.h restraintff.h + selectorbond.h + selectormbond.h softcljcomponent.h softcljpotential.h switchingfunction.h @@ -93,6 +96,7 @@ set ( SIREMM_SOURCES anglerestraint.cpp atomfunctions.cpp atomljs.cpp + bond.cpp clj14group.cpp cljatoms.cpp cljboxes.cpp @@ -144,12 +148,14 @@ set ( SIREMM_SOURCES restraint.cpp restraintcomponent.cpp restraintff.cpp + selectorbond.cpp + selectormbond.cpp softcljcomponent.cpp softcljpotential.cpp switchingfunction.cpp testff.cpp threeatomfunctions.cpp - twoatomfunctions.cpp + twoatomfunctions.cpp ${SIREMM_HEADERS} ${SIREMM_DETAIL_HEADERS} diff --git a/corelib/src/libs/SireMM/bond.cpp b/corelib/src/libs/SireMM/bond.cpp new file mode 100644 index 000000000..1c579271a --- /dev/null +++ b/corelib/src/libs/SireMM/bond.cpp @@ -0,0 +1,382 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "bond.h" +#include "selectorbond.h" + +#include "twoatomfunctions.h" + +#include "SireMol/molecule.h" +#include "SireMol/mover.hpp" +#include "SireMol/selector.hpp" + +#include "SireCAS/symbol.h" +#include "SireCAS/values.h" +#include "SireCAS/expression.h" + +#include "SireBase/errors.h" +#include "SireMol/errors.h" + +#include "SireUnits/units.h" + +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" + +#include + +using namespace SireMM; +using namespace SireMol; +using namespace SireBase; +using namespace SireCAS; +using namespace SireStream; +using namespace SireError; +using namespace SireUnits; +using namespace SireUnits::Dimension; + +static const RegisterMetaType r_bond; + +SIREMM_EXPORT QDataStream& operator<<(QDataStream &ds, const Bond &bond) +{ + writeHeader(ds, r_bond, 1); + ds << bond.bnd << static_cast(bond); + return ds; +} + +SIREMM_EXPORT QDataStream& operator>>(QDataStream &ds, Bond &bond) +{ + auto v = readHeader(ds, r_bond); + + if (v == 1) + { + ds >> bond.bnd >> static_cast(bond); + } + else + throw SireStream::version_error(v, "1", r_bond, CODELOC); + + return ds; +} + +Bond::Bond() : ConcreteProperty() +{} + + +Bond::Bond(const Atom &atom0, const Atom &atom1) + : ConcreteProperty(atom0) +{ + if (not atom0.isSameMolecule(atom1)) + { + throw SireError::incompatible_error(QObject::tr( + "You can only create a bond from two atoms in the same molecule. " + "%1 and %2 are from different molecules (%3 and %4)") + .arg(atom0.toString()).arg(atom1.toString()) + .arg(atom0.molecule().toString()) + .arg(atom1.molecule().toString()), CODELOC); + } + else if (atom0.index() == atom1.index()) + { + throw SireMol::duplicate_atom(QObject::tr( + "You cannot create a bond from two identical atoms. %1") + .arg(atom0.toString()), CODELOC); + } + + bnd = BondID(atom0.index(), atom1.index()); +} + +Bond::Bond(const MoleculeView &molview, + const AtomID &atom0, const AtomID &atom1) + : ConcreteProperty(molview) +{ + this->operator=(Bond(molview.atom(atom0), molview.atom(atom1))); +} + +Bond::Bond(const MoleculeData &moldata, + const AtomID &atm0, const AtomID &atm1) + : ConcreteProperty() +{ + this->operator=(Bond(Atom(moldata, atm0), Atom(moldata, atm1))); +} + +Bond::Bond(const MoleculeData &moldata, const BondID &bond) + : ConcreteProperty(moldata) +{ + auto atomidx0 = moldata.info().atomIdx(bond.atom0()); + auto atomidx1 = moldata.info().atomIdx(bond.atom1()); + + if (atomidx0 > atomidx1) + { + qSwap(atomidx0, atomidx1); + } + else if (atomidx0 == atomidx1) + { + throw SireMol::duplicate_atom(QObject::tr( + "You cannot make a bond out of two identical atoms. %1") + .arg(atomidx0.toString()), CODELOC); + } + + bnd = BondID(atomidx0, atomidx1); +} + +Bond::Bond(const Bond &other) + : ConcreteProperty(other), bnd(other.bnd) +{} + +Bond::~Bond() +{} + +const char* Bond::typeName() +{ + return QMetaType::typeName(qMetaTypeId()); +} + +Bond& Bond::operator=(const Bond &other) +{ + if (this != &other) + { + bnd = other.bnd; + MoleculeView::operator=(other); + } + + return *this; +} + +bool Bond::operator==(const Bond &other) const +{ + return bnd == other.bnd and MoleculeView::operator==(other); +} + +bool Bond::operator!=(const Bond &other) const +{ + return not operator==(other); +} + +MolViewPtr Bond::toSelector() const +{ + return SelectorBond(*this); +} + +QString Bond::toString() const +{ + if (this->isNull()) + return QObject::tr("Bond::null"); + + auto a0 = this->atom0(); + auto a1 = this->atom1(); + + return QObject::tr("Bond( %1:%2 => %3:%4 )") + .arg(a0.name()).arg(a0.number()) + .arg(a1.name()).arg(a1.number()); +} + +Atom Bond::atom0() const +{ + return Atom(*this, bnd.atom0()); +} + +Atom Bond::atom1() const +{ + return Atom(*this, bnd.atom1()); +} + +Evaluator Bond::evaluate() const +{ + return Evaluator(*this); +} + +Mover Bond::move() const +{ + return Mover(*this); +} + +BondID Bond::ID() const +{ + return bnd; +} + +bool Bond::isEmpty() const +{ + return this->isNull(); +} + +bool Bond::selectedAll() const +{ + return this->data().info().nAtoms() == 2; +} + +AtomSelection Bond::selection() const +{ + if (this->isNull()) + return AtomSelection(); + + auto s = AtomSelection(this->data()); + s = s.deselectAll(); + + s = s.select(bnd.atom0()); + s = s.select(bnd.atom1()); + + return s; +} + +bool Bond::hasConnectivity() const +{ + return this->data().hasProperty("connectivity"); +} + +const Connectivity& Bond::getConnectivity() const +{ + return this->data().property("connectivity").asA(); +} + +bool Bond::hasProperty(const PropertyName &key) const +{ + if (this->hasConnectivity()) + { + return this->getConnectivity().hasProperty(bnd, key); + } + + return false; +} + +bool Bond::hasMetadata(const PropertyName &key) const +{ + return false; +} + +bool Bond::hasMetadata(const PropertyName &key, + const PropertyName &metakey) const +{ + return false; +} + +QStringList Bond::propertyKeys() const +{ + if (this->hasConnectivity()) + { + return this->getConnectivity().propertyKeys(bnd); + } + + return QStringList(); +} + +QStringList Bond::metadataKeys() const +{ + return QStringList(); +} + +QStringList Bond::metadataKeys(const PropertyName &key) const +{ + return QStringList(); +} + +Properties Bond::properties() const +{ + if (this->hasConnectivity()) + { + return this->getConnectivity().properties(bnd); + } + + return Properties(); +} + +const Property& Bond::property(const PropertyName &key) const +{ + if (this->hasConnectivity()) + { + return this->getConnectivity().property(bnd, key); + } + + if (key.hasValue()) + return key.value(); + + throw SireBase::missing_property(QObject::tr( + "Bond %1 has no property at key %2.") + .arg(this->toString()).arg(key.source()), + CODELOC); + + return key.value(); +} + +const Property& Bond::property(const PropertyName &key, + const Property &default_value) const +{ + if (this->hasConnectivity()) + { + return this->getConnectivity().property(bnd, key, default_value); + } + + if (key.hasValue()) + return key.value(); + + return default_value; +} + +SireUnits::Dimension::Length Bond::length(const PropertyMap &map) const +{ + return bnd.length(*this, map) * angstrom; +} + +SireUnits::Dimension::Length Bond::length() const +{ + return this->length(PropertyMap()); +} + +SireCAS::Expression Bond::potential() const +{ + return this->potential(PropertyMap()); +} + +Expression Bond::potential(const PropertyMap &map) const +{ + try + { + auto funcs = this->data().property(map["bond"]).asA(); + return funcs.potential(bnd); + } + catch(const SireError::exception&) + {} + + return Expression(); +} + +SireUnits::Dimension::MolarEnergy Bond::energy() const +{ + return this->energy(PropertyMap()); +} + +SireUnits::Dimension::MolarEnergy Bond::energy(const PropertyMap &map) const +{ + auto pot = this->potential(map); + auto l = this->length(map); + + Values vals(Symbol("r")==l.to(angstrom)); + return pot.evaluate(vals) * kcal_per_mol; +} + +namespace SireMol +{ + template class Mover; +} diff --git a/corelib/src/libs/SireMM/bond.h b/corelib/src/libs/SireMM/bond.h new file mode 100644 index 000000000..c357eaad1 --- /dev/null +++ b/corelib/src/libs/SireMM/bond.h @@ -0,0 +1,169 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREMM_BOND_H +#define SIREMM_BOND_H + +#include "SireMol/atom.h" +#include "SireMol/bondid.h" +#include "SireMol/angleid.h" +#include "SireMol/dihedralid.h" +#include "SireMol/improperid.h" +#include "SireMol/connectivity.h" +#include "SireMol/mover.hpp" +#include "SireMol/evaluator.h" + +#include "SireUnits/dimensions.h" + +SIRE_BEGIN_HEADER + +namespace SireMM +{ +class Bond; +} + +SIREMM_EXPORT QDataStream& operator<<(QDataStream&, const SireMM::Bond&); +SIREMM_EXPORT QDataStream& operator>>(QDataStream&, SireMM::Bond&); + +namespace SireCAS +{ +class Expression; +} + +namespace SireMM +{ + +/** This class provides a molecule view to a bond */ +class SIREMM_EXPORT Bond + : public SireBase::ConcreteProperty +{ + +friend QDataStream& ::operator<<(QDataStream&, const Bond&); +friend QDataStream& ::operator>>(QDataStream&, Bond&); + +public: + Bond(); + Bond(const SireMol::Atom &atom0, const SireMol::Atom &atom1); + Bond(const SireMol::MoleculeView &molview, + const SireMol::AtomID &atom0, const SireMol::AtomID &atom1); + Bond(const SireMol::MoleculeData &moldata, + const SireMol::AtomID &atom0, const SireMol::AtomID &atom1); + Bond(const SireMol::MoleculeData &moldata, const SireMol::BondID &bond); + + Bond(const Bond &other); + virtual ~Bond(); + + static const char* typeName(); + + virtual const char* what() const + { + return Bond::typeName(); + } + + virtual Bond* clone() const + { + return new Bond(*this); + } + + Bond& operator=(const Bond &bond); + + bool operator==(const Bond &other) const; + bool operator!=(const Bond &other) const; + + SireMol::MolViewPtr toSelector() const; + + QString toString() const; + + SireMol::Atom atom0() const; + SireMol::Atom atom1() const; + + SireMol::BondID ID() const; + + bool isEmpty() const; + bool selectedAll() const; + + SireMol::AtomSelection selection() const; + + bool hasProperty(const SireBase::PropertyName &key) const; + bool hasMetadata(const SireBase::PropertyName &key) const; + bool hasMetadata(const SireBase::PropertyName &key, + const SireBase::PropertyName &metakey) const; + + QStringList propertyKeys() const; + QStringList metadataKeys() const; + QStringList metadataKeys(const SireBase::PropertyName &key) const; + + SireBase::Properties properties() const; + + SireMol::Evaluator evaluate() const; + SireMol::Mover move() const; + + const Property& property(const SireBase::PropertyName &key) const; + const Property& property(const SireBase::PropertyName &key, + const Property &default_value) const; + + SireUnits::Dimension::Length length() const; + SireUnits::Dimension::Length length(const SireBase::PropertyMap &map) const; + + SireCAS::Expression potential() const; + SireCAS::Expression potential(const SireBase::PropertyMap &map) const; + + SireUnits::Dimension::MolarEnergy energy() const; + SireUnits::Dimension::MolarEnergy energy( + const SireBase::PropertyMap &map) const; + +protected: + bool hasConnectivity() const; + const SireMol::Connectivity& getConnectivity() const; + + /** The ID of the bond (holding AtomIdx IDs) */ + SireMol::BondID bnd; +}; + +} + +Q_DECLARE_METATYPE( SireMM::Bond ) +Q_DECLARE_METATYPE(SireMol::Mover); + +SIRE_EXPOSE_CLASS( SireMM::Bond ) +SIRE_EXPOSE_ALIAS( SireMol::Mover, SireMol::Mover_Bond_ ) + +#ifdef SIRE_INSTANTIATE_TEMPLATES + +#include "SireMol/mover.hpp" + +namespace SireMol +{ + template class SireMol::Mover; +} + +#endif //SIRE_INSTANTIATE_TEMPLATES + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireMM/clj14group.cpp b/corelib/src/libs/SireMM/clj14group.cpp index 363aeb8f3..981f71f11 100644 --- a/corelib/src/libs/SireMM/clj14group.cpp +++ b/corelib/src/libs/SireMM/clj14group.cpp @@ -34,6 +34,7 @@ #include "SireMM/atomljs.h" #include "SireMol/mover.hpp" #include "SireMol/editor.hpp" +#include "SireMol/core.h" #include "SireUnits/units.h" @@ -56,25 +57,25 @@ namespace SireMM public: /** index of the two atoms, in sorted CGAtomIdx order */ CGAtomIdx atom0, atom1; - + /** The reduced charges of both atoms */ double chg0, chg1; - + /** The reduced sigma parameters of both atoms */ double sig0, sig1; - + /** The reduced epsilon parameters for both atoms */ double eps0, eps1; - + /** The 14 coulomb and LJ scale factors between these atoms */ double coul14scl, lj14scl; - + CLJ14PairData() : atom0( CGAtomIdx::null() ), atom1( CGAtomIdx::null() ), chg0(0), chg1(0), sig0(0), sig1(0), eps0(0), eps1(0), coul14scl(0), lj14scl(0) {} - + CLJ14PairData(const CGAtomIdx &idx0, const CGAtomIdx &idx1, const Charge &charge0, const Charge &charge1, const LJParameter &lj0, const LJParameter &lj1, @@ -85,14 +86,14 @@ namespace SireMM //store the reduced charge and reduced sigma and epsilon parameters chg0 = charge0.value() * std::sqrt(SireUnits::one_over_four_pi_eps0); chg1 = charge1.value() * std::sqrt(SireUnits::one_over_four_pi_eps0); - + sig0 = std::sqrt(lj0.sigma()); sig1 = std::sqrt(lj1.sigma()); - + eps0 = std::sqrt(4.0 * lj0.epsilon()); eps1 = std::sqrt(4.0 * lj1.epsilon()); } - + CLJ14PairData(const CLJ14PairData &other) : atom0(other.atom0), atom1(other.atom1), chg0(other.chg0), chg1(other.chg1), @@ -100,10 +101,10 @@ namespace SireMM eps0(other.eps0), eps1(other.eps1), coul14scl(other.coul14scl), lj14scl(other.lj14scl) {} - + ~CLJ14PairData() {} - + CLJ14PairData& operator=(const CLJ14PairData &other) { if (this != &other) @@ -119,10 +120,10 @@ namespace SireMM coul14scl = other.coul14scl; lj14scl = other.lj14scl; } - + return *this; } - + bool operator==(const CLJ14PairData &other) const { return atom0 == other.atom0 and @@ -143,23 +144,23 @@ namespace SireMM QDataStream& operator<<(QDataStream &ds, const SireMM::detail::CLJ14PairData &atom) { quint32 version = 1; - + ds << version << atom.atom0 << atom.atom1 << atom.chg0 << atom.chg1 << atom.sig0 << atom.sig1 << atom.eps0 << atom.eps1 << atom.coul14scl << atom.lj14scl; - + return ds; } QDataStream& operator>>(QDataStream &ds, SireMM::detail::CLJ14PairData &atom) { quint32 version; - + ds >> version; - + if (version == 1) { ds >> atom.atom0 >> atom.atom1 @@ -182,57 +183,57 @@ static const RegisterMetaType r_group( NO_ROOT ); QDataStream &operator<<(QDataStream &ds, const CLJ14Group &group) { writeHeader(ds, r_group, 2); - + SharedDataStream sds(ds); - + sds << group.mol << group.newmol << group.propmap << group.data_for_pair << group.cgidx_to_idx << qint32(group.combining_rules) << group.total_cnrg << group.total_ljnrg << group.needs_energy << group.is_strict; - + return ds; } QDataStream &operator>>(QDataStream &ds, CLJ14Group &group) { VersionID v = readHeader(ds, r_group); - + if (v == 2) { SharedDataStream sds(ds); - + qint32 combining_rules; - + sds >> group.mol >> group.newmol >> group.propmap >> group.data_for_pair >> group.cgidx_to_idx >> combining_rules >> group.total_cnrg >> group.total_ljnrg >> group.needs_energy >> group.is_strict; - + group.is_strict = true; - + group.combining_rules = CLJFunction::COMBINING_RULES(combining_rules); } else if (v == 1) { SharedDataStream sds(ds); - + qint32 combining_rules; - + sds >> group.mol >> group.newmol >> group.propmap >> group.data_for_pair >> group.cgidx_to_idx >> combining_rules >> group.total_cnrg >> group.total_ljnrg >> group.needs_energy; - + group.is_strict = true; - + group.combining_rules = CLJFunction::COMBINING_RULES(combining_rules); } else throw version_error(v, "1,2", r_group, CODELOC ); - + return ds; } @@ -294,7 +295,7 @@ CLJ14Group& CLJ14Group::operator=(const CLJ14Group &other) needs_energy = other.needs_energy; is_strict = other.is_strict; } - + return *this; } @@ -343,7 +344,7 @@ const MoleculeView& CLJ14Group::molecule() const return newmol; } -/** Return the property map used to find the properties needed to +/** Return the property map used to find the properties needed to calculate the 14 energy ("coordinates", "charge", "LJ" and "intrascale") */ PropertyMap CLJ14Group::propertyMap() const @@ -490,7 +491,7 @@ void CLJ14Group::updateSelection(const AtomSelection &selection) propmap = map; return; } - + if (newmol.selection() != selection) { newmol = PartialMolecule(newmol.data(), selection); @@ -503,14 +504,14 @@ void CLJ14Group::update(const MoleculeView &new_molecule) { if (isNull()) return; - + if (new_molecule.data().number() != newmol.number()) throw SireError::incompatible_error( QObject::tr( "You cannot update the new molecule %1 as it is not the same " "molecule as the old molecule %2.") .arg(new_molecule.toString()) .arg(mol.toString()), CODELOC ); - + if (recalculatingFromScratch()) { newmol = new_molecule; @@ -555,10 +556,10 @@ void CLJ14Group::addCGData(CGIdx cg0, CGIdx cg1, if (cg1 < cg0) qSwap(cg0, cg1); - + quint32 index = quint32( data_for_pair.count() ); data_for_pair.append(pairdata); - + cgidx_to_idx[cg0].insert(index); if (cg0 != cg1) @@ -588,7 +589,7 @@ void CLJ14Group::reextract() total_cnrg = 0; total_ljnrg = 0; needs_energy = true; - + const MoleculeInfoData &molinfo = newmol.data().info(); const AtomSelection selected_atoms = newmol.selection(); @@ -600,14 +601,14 @@ void CLJ14Group::reextract() } const CLJNBPairs &pairs = newmol.data().property( propmap["intrascale"] ).asA(); - + if (pairs.isEmpty()) { //there are no 1-4 pairs needs_energy = false; return; } - + const AtomCharges &chgs = newmol.data().property( propmap["charge"] ).asA(); const AtomLJs &ljs = newmol.data().property( propmap["LJ"] ).asA(); @@ -617,23 +618,23 @@ void CLJ14Group::reextract() for (CGIdx cg0(0); cg0 cgpairdata; cgpairdata.reserve(n0*n0); - + const CLJNBPairs::CGPairs &cgpairs = pairs.get(cg0,cg0); - + for (int i=0; i cgpairdata; cgpairdata.reserve(n0*n1); - + const CLJNBPairs::CGPairs &cgpairs = pairs.get(cg0,cg1); - + const Charge *chgs1 = chgs.constData(cg1); const LJParameter *ljs1 = ljs.constData(cg1); - + if (cgpairs.isEmpty()) { if (cgpairs.defaultValue() != CLJScaleFactor(1,1) and @@ -690,7 +691,7 @@ void CLJ14Group::reextract() for (int j=0; j selected_cgroups = selected_atoms.selectedCutGroups(); - + foreach (CGIdx cg0, selected_cgroups) { const Charge *chgs0 = chgs.constData(cg0); const LJParameter *ljs0 = ljs.constData(cg0); - + QSet atoms0 = selected_atoms.selectedAtoms(cg0); - + //do the CutGroup with itself { QVector cgpairdata; cgpairdata.reserve(atoms0.count()*atoms0.count()); - + const CLJNBPairs::CGPairs &cgpairs = pairs.get(cg0,cg0); - + foreach (Index i, atoms0) { foreach (Index j, atoms0) @@ -735,7 +736,7 @@ void CLJ14Group::reextract() if (i < j) { const CLJScaleFactor &scl = cgpairs.get(i,j); - + if (scl != CLJScaleFactor(1,1) and scl != CLJScaleFactor(0)) { cgpairdata.append( SireMM::detail::CLJ14PairData( @@ -748,27 +749,27 @@ void CLJ14Group::reextract() } } } - + cgpairdata.squeeze(); addCGData(cg0, cg0, cgpairdata); - + } // end of cutgroup with itself - + //now look at this cutgroup with all other pairs foreach (CGIdx cg1, selected_cgroups) { if (cg0 < cg1) { const QSet atoms1 = selected_atoms.selectedAtoms(cg1); - + QVector cgpairdata; cgpairdata.reserve(atoms0.count()*atoms1.count()); - + const CLJNBPairs::CGPairs &cgpairs = pairs.get(cg0,cg1); - + const Charge *chgs1 = chgs.constData(cg1); const LJParameter *ljs1 = ljs.constData(cg1); - + if (cgpairs.isEmpty()) { if (cgpairs.defaultValue() != CLJScaleFactor(1,1) and @@ -795,7 +796,7 @@ void CLJ14Group::reextract() foreach (Index j, atoms1) { const CLJScaleFactor &scl = cgpairs.get(i,j); - + if (scl != CLJScaleFactor(1,1) and scl != CLJScaleFactor(0)) { @@ -808,12 +809,12 @@ void CLJ14Group::reextract() } } } - + cgpairdata.squeeze(); addCGData(cg0, cg1, cgpairdata); } } // end of loop over j CutGroups - + } // end of loop over i CutGroups } // end of if selected all else if is_strict else @@ -832,16 +833,16 @@ static void calculateAriEnergy(const AtomCoords &coords, { cnrg = 0; ljnrg = 0; - + for (int i=0; i CLJ14Group::energy() { this->reextract(); } - + total_cnrg = 0; total_ljnrg = 0; - + for (int i=0; i CLJ14Group::energy() const PropertyName chg_property = propmap["charge"]; const PropertyName lj_property = propmap["LJ"]; const PropertyName scl_property = propmap["intrascale"]; - + if (newmol.version(chg_property) != mol.version(chg_property) or newmol.version(lj_property) != mol.version(lj_property) or newmol.version(scl_property) != mol.version(scl_property)) @@ -958,7 +959,7 @@ boost::tuple CLJ14Group::energy() } const PropertyName coords_property = propmap["coordinates"]; - + if (newmol.version(coords_property) == mol.version(coords_property)) { //nothing has changed @@ -974,13 +975,13 @@ boost::tuple CLJ14Group::energy() } QSet changed_cgroups; - + const AtomCoords &newcoords = newmol.property(coords_property).asA(); const AtomCoords &oldcoords = mol.property(coords_property).asA(); - + const CoordGroup *newarray = newcoords.constData(); const CoordGroup *oldarray = oldcoords.constData(); - + if (newarray != oldarray) { for (int i=0; i CLJ14Group::energy() } } } - + if (changed_cgroups.count() >= int(0.4 * newmol.data().info().nCutGroups())) { this->mustNowRecalculateFromScratch(); return this->energy(); } - + //calculate the change in energy as a delta double delta_cnrg = 0; double delta_ljnrg = 0; - + QSet changed_cgpairs; - + foreach (quint32 cgroup, changed_cgroups) { changed_cgpairs += cgidx_to_idx.value(cgroup); } - + foreach (quint32 changed_cgpair, changed_cgpairs) { double old_cnrg, old_ljnrg; ::calculateEnergy(combining_rules, oldcoords, data_for_pair.at(changed_cgpair), old_cnrg, old_ljnrg); - + double new_cnrg, new_ljnrg; ::calculateEnergy(combining_rules, newcoords, data_for_pair.at(changed_cgpair), new_cnrg, new_ljnrg); - + delta_cnrg += (new_cnrg - old_cnrg); delta_ljnrg += (new_ljnrg - old_ljnrg); } - + total_cnrg += delta_cnrg; total_ljnrg += delta_ljnrg; } diff --git a/corelib/src/libs/SireMM/cljextractor.cpp b/corelib/src/libs/SireMM/cljextractor.cpp index f96df5ca3..6e685d257 100644 --- a/corelib/src/libs/SireMM/cljextractor.cpp +++ b/corelib/src/libs/SireMM/cljextractor.cpp @@ -34,6 +34,7 @@ #include "SireMM/atomljs.h" #include "SireMol/mover.hpp" #include "SireMol/editor.hpp" +#include "SireMol/core.h" #include "SireError/errors.h" @@ -53,9 +54,9 @@ static const RegisterMetaType r_cljext( NO_ROOT ); QDataStream &operator<<(QDataStream &ds, const CLJExtractor &cljext) { writeHeader(ds, r_cljext, 2); - + SharedDataStream sds(ds); - + sds << cljext.mol << cljext.newmol << cljext.selected_atoms << cljext.new_selected_atoms << cljext.props << cljext.cljidxs @@ -69,40 +70,40 @@ QDataStream &operator<<(QDataStream &ds, const CLJExtractor &cljext) QDataStream &operator>>(QDataStream &ds, CLJExtractor &cljext) { VersionID v = readHeader(ds, r_cljext); - + if (v == 2) { SharedDataStream sds(ds); - + qint32 id_source; qint32 extract_source; - + sds >> cljext.mol >> cljext.newmol >> cljext.selected_atoms >> cljext.new_selected_atoms >> cljext.props >> cljext.cljidxs >> cljext.cljdeltas >> id_source >> extract_source; - + cljext.id_source = CLJAtoms::ID_SOURCE(id_source); cljext.extract_source = CLJExtractor::EXTRACT_SOURCE(extract_source); } else if (v == 1) { SharedDataStream sds(ds); - + qint32 id_source; bool extract_by_residue; - + sds >> cljext.mol >> cljext.newmol >> cljext.selected_atoms >> cljext.new_selected_atoms >> cljext.props >> cljext.cljidxs >> cljext.cljdeltas >> id_source >> extract_by_residue; - + cljext.id_source = CLJAtoms::ID_SOURCE(id_source); - + if (extract_by_residue) { cljext.extract_source = CLJExtractor::EXTRACT_BY_RESIDUE; @@ -124,7 +125,7 @@ CLJExtractor::CLJExtractor() {} /** Construct to extract the CLJ properties from the passed molecule, extracting - information per-residue, and using the supplied property map to find the + information per-residue, and using the supplied property map to find the correct properties */ CLJExtractor::CLJExtractor(const MoleculeView &molecule, const PropertyMap &map) : props(map), id_source(CLJAtoms::USE_MOLNUM), @@ -155,14 +156,14 @@ CLJExtractor::CLJExtractor(const MoleculeView &molecule, EXTRACT_SOURCE ext, } /** Construct to extract the CLJ properties from the passed molecule, extracting - information per-residue, and using the supplied property map to find the + information per-residue, and using the supplied property map to find the correct properties */ CLJExtractor::CLJExtractor(const MoleculeView &molecule, CLJAtoms::ID_SOURCE id, const PropertyMap &map) : props(map), id_source(id), extract_source(EXTRACT_BY_CUTGROUP) { newmol = molecule.molecule(); - + if (not molecule.selectedAll()) { new_selected_atoms = molecule.selection(); @@ -178,7 +179,7 @@ CLJExtractor::CLJExtractor(const MoleculeView &molecule, CLJAtoms::ID_SOURCE id, : props(map), id_source(id), extract_source(ext) { newmol = molecule.molecule(); - + if (not molecule.selectedAll()) { new_selected_atoms = molecule.selection(); @@ -213,7 +214,7 @@ CLJExtractor& CLJExtractor::operator=(const CLJExtractor &other) id_source = other.id_source; extract_source = other.extract_source; } - + return *this; } @@ -251,7 +252,7 @@ QString CLJExtractor::toString() const { if (this->isNull()) return QObject::tr("CLJExtractor::null"); - + else if (this->needsCommitting()) return QObject::tr("CLJExtractor( %1 => %2 )") .arg(oldMolecule().toString(), newMolecule().toString()); @@ -278,7 +279,7 @@ bool CLJExtractor::hasChangedAtoms() const return true; } } - + return false; } @@ -400,7 +401,7 @@ void CLJExtractor::add(const AtomSelection &new_selection, { AtomSelection news = new_selected_atoms; news = news.unite(new_selection); - + this->updateSelection(news, boxes, workspace); } } @@ -422,7 +423,7 @@ void CLJExtractor::remove(const AtomSelection &new_selection, //we have atoms to remove AtomSelection news = new_selected_atoms; news = news.subtract(new_selection); - + this->updateSelection(news, boxes, workspace); } else @@ -460,7 +461,7 @@ void CLJExtractor::updateSelection(const AtomSelection &new_selection, if (old_selection == new_selection) //nothing to do return; - + if (new_selection.selectedNone()) { //all atoms have been removed @@ -511,10 +512,10 @@ void CLJExtractor::updateSelection(const AtomSelection &new_selection, { AtomSelection old_cg_selection = old_selection; AtomSelection new_cg_selection = new_selection; - + old_cg_selection = old_cg_selection.mask(i); new_cg_selection = new_cg_selection.mask(i); - + if (old_cg_selection != new_cg_selection) { cljdeltas[i] = workspace.push(boxes, cljidxs.at(i), @@ -529,10 +530,10 @@ void CLJExtractor::updateSelection(const AtomSelection &new_selection, { AtomSelection old_res_selection = old_selection; AtomSelection new_res_selection = new_selection; - + old_res_selection = old_res_selection.mask(i); new_res_selection = new_res_selection.mask(i); - + if (old_res_selection != new_res_selection) { cljdeltas[i] = workspace.push(boxes, cljidxs.at(i), @@ -548,7 +549,7 @@ void CLJExtractor::updateSelection(const AtomSelection &new_selection, id_source, props ), cljdeltas[0]); } } - + if (new_selection.selectedAll()) { new_selected_atoms = AtomSelection(); @@ -569,7 +570,7 @@ namespace detail if (container[i] == value) return true; } - + return false; } } @@ -585,7 +586,7 @@ void CLJExtractor::update(const MoleculeView &new_molecule, "You cannot update one molecule (%1) with data from another molecule!") .arg(mol.toString()).arg(new_molecule.molecule().toString()), CODELOC ); - + if (new_molecule.data().version() == newmol.version()) //there is nothing to update return; @@ -610,34 +611,34 @@ void CLJExtractor::update(const MoleculeView &new_molecule, bool changed_charge = newmol.version(charge_property) != new_molecule.data().version(charge_property); - + bool changed_lj = newmol.version(lj_property) != new_molecule.data().version(lj_property); - + if (not (changed_coords or changed_charge or changed_lj)) { //nothing important has changed :-) newmol = new_molecule.molecule(); return; } - + //do we have multiple CLJAtoms groups to extract? if (extractingByCutGroup() and newmol.nCutGroups() > 1) { //generate a list of changed CutGroup indicies QVarLengthArray changed_cgroups; - + if (changed_coords) { const AtomCoords &old_coords = newmol.property(coords_property).asA(); const AtomCoords &new_coords = new_molecule.data() .property(coords_property).asA(); - + for (CGIdx i(0); i(); const AtomCharges &new_chgs = new_molecule.data() .property(charge_property).asA(); - + for (CGIdx i(0); i(); @@ -690,7 +691,7 @@ void CLJExtractor::update(const MoleculeView &new_molecule, { const LJParameter *oldlj = old_ljs.constData(i); const LJParameter *newlj = new_ljs.constData(i); - + if (oldlj != newlj) { for (Index j(0); j changed_residues; - + if (changed_coords) { const AtomCoords &old_coords = newmol.property(coords_property).asA(); const AtomCoords &new_coords = new_molecule.data() .property(coords_property).asA(); - + for (CGIdx i(0); i(); const AtomCharges &new_chgs = new_molecule.data() .property(charge_property).asA(); - + for (CGIdx i(0); i(); @@ -800,7 +801,7 @@ void CLJExtractor::update(const MoleculeView &new_molecule, { const LJParameter *oldlj = old_ljs.constData(i); const LJParameter *newlj = new_ljs.constData(i); - + if (oldlj != newlj) { for (Index j(0); jinitialise(boxes, workspace); } - + for (int i=0; i( newmol.nCutGroups(), CLJDelta() ); @@ -979,7 +980,7 @@ void CLJExtractor::initialise(CLJBoxes &boxes, CLJWorkspace &workspace) { AtomSelection cg_selection = new_selected_atoms; cg_selection = cg_selection.mask(i); - + cljdeltas[i] = workspace.push(boxes, QVector(), CLJAtoms( PartialMolecule(newmol,cg_selection), id_source, props ), CLJDelta()); @@ -1003,7 +1004,7 @@ void CLJExtractor::initialise(CLJBoxes &boxes, CLJWorkspace &workspace) { AtomSelection res_selection = new_selected_atoms; res_selection = res_selection.mask(i); - + cljdeltas[i] = workspace.push(boxes, QVector(), CLJAtoms( PartialMolecule(newmol,res_selection), id_source, props ), CLJDelta()); @@ -1014,7 +1015,7 @@ void CLJExtractor::initialise(CLJBoxes &boxes, CLJWorkspace &workspace) { cljdeltas = QVector( 1, CLJDelta() ); cljidxs = QVector< QVector >( 1, QVector() ); - + if (new_selected_atoms.isNull()) { cljdeltas[0] = workspace.push(boxes, QVector(), diff --git a/corelib/src/libs/SireMM/internalperturbation.cpp b/corelib/src/libs/SireMM/internalperturbation.cpp index 404507f62..3ca8714a1 100644 --- a/corelib/src/libs/SireMM/internalperturbation.cpp +++ b/corelib/src/libs/SireMM/internalperturbation.cpp @@ -35,6 +35,7 @@ #include "SireMol/molecule.h" #include "SireMol/moleditor.h" #include "SireMol/mover.hpp" +#include "SireMol/core.h" #include "SireCAS/values.h" @@ -58,12 +59,12 @@ QDataStream &operator<<(QDataStream &ds, const InternalPerturbation &intpert) { writeHeader(ds, r_intpert, 1); - + SharedDataStream sds(ds); - + sds << intpert.base_expression << intpert.initial_forms << intpert.final_forms << static_cast(intpert); - + return ds; } @@ -71,31 +72,31 @@ QDataStream &operator>>(QDataStream &ds, InternalPerturbation &intpert) { VersionID v = readHeader(ds, r_intpert); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> intpert.base_expression >> intpert.initial_forms >> intpert.final_forms >> static_cast(intpert); - + intpert.buildPerturbExpression(); } else throw version_error(v, "1", r_intpert, CODELOC); - + return ds; } -/** Internal function used to rebuild the perturb expression from +/** Internal function used to rebuild the perturb expression from the mapping function, base expression and initial and final forms */ void InternalPerturbation::buildPerturbExpression() { //build all of the perturbed identities Identities perturbed_idents; - + const Expression &mapfunc = mappingFunction(); - + foreach (Symbol symbol, initial_forms.symbols()) { if (final_forms.contains(symbol)) @@ -103,7 +104,7 @@ void InternalPerturbation::buildPerturbExpression() Identities ident; ident.set( symbols().initial(), initial_forms[symbol] ); ident.set( symbols().final(), final_forms[symbol] ); - + perturbed_idents.set(symbol, mapfunc.substitute(ident)); } else @@ -111,11 +112,11 @@ void InternalPerturbation::buildPerturbExpression() Identities ident; ident.set( symbols().initial(), initial_forms[symbol] ); ident.set( symbols().final(), Expression(0) ); - + perturbed_idents.set(symbol, mapfunc.substitute(ident)); } } - + foreach (Symbol symbol, final_forms.symbols()) { if (not initial_forms.contains(symbol)) @@ -123,19 +124,19 @@ void InternalPerturbation::buildPerturbExpression() Identities ident; ident.set( symbols().initial(), Expression(0) ); ident.set( symbols().final(), final_forms[symbol] ); - + perturbed_idents.set(symbol, mapfunc.substitute(ident)); } } - + perturb_expression = base_expression.substitute(perturbed_idents); } /** Null constructor */ InternalPerturbation::InternalPerturbation() : Perturbation() {} - -/** Construct to map from one function to another (from initial_function to + +/** Construct to map from one function to another (from initial_function to final_function) using the passed mapping function */ InternalPerturbation::InternalPerturbation(const Expression &initial_function, const Expression &final_function, @@ -148,7 +149,7 @@ InternalPerturbation::InternalPerturbation(const Expression &initial_function, initial_forms = (f == initial_function); final_forms = (f == final_function); base_expression = f; - + this->buildPerturbExpression(); } @@ -176,7 +177,7 @@ InternalPerturbation::InternalPerturbation(const InternalPerturbation &other) initial_forms(other.initial_forms), final_forms(other.final_forms) {} - + /** Destructor */ InternalPerturbation::~InternalPerturbation() {} @@ -192,14 +193,14 @@ InternalPerturbation& InternalPerturbation::operator=(const InternalPerturbation initial_forms = other.initial_forms; final_forms = other.final_forms; } - + return *this; } /** Comparison operator */ bool InternalPerturbation::operator==(const InternalPerturbation &other) const { - return base_expression == other.base_expression and + return base_expression == other.base_expression and initial_forms == other.initial_forms and final_forms == other.final_forms and Perturbation::operator==(other); @@ -216,7 +217,7 @@ const char* InternalPerturbation::typeName() return "SireMM::InternalPerturbation"; } -/** Return the base expression - this is the expression into which +/** Return the base expression - this is the expression into which the mapped identites are substituted */ const Expression& InternalPerturbation::baseExpression() const { @@ -230,14 +231,14 @@ const Expression& InternalPerturbation::perturbExpression() const return perturb_expression; } -/** Return the initial forms - these are the identities that +/** Return the initial forms - these are the identities that are substituted into the base expression at the initial state */ const Identities& InternalPerturbation::initialForms() const { return initial_forms; } -/** Return the final forms - these are the identities that +/** Return the final forms - these are the identities that are substituted into the base expression at the final state */ const Identities& InternalPerturbation::finalForms() const { @@ -247,9 +248,9 @@ const Identities& InternalPerturbation::finalForms() const PerturbationPtr InternalPerturbation::recreate(const Expression &expression) const { PerturbationPtr ret = Perturbation::recreate(expression); - + ret.edit().asA().buildPerturbExpression(); - + return ret; } @@ -257,18 +258,18 @@ PerturbationPtr InternalPerturbation::recreate(const Expression &expression, const PropertyMap &map) const { PerturbationPtr ret = Perturbation::recreate(expression, map); - + ret.edit().asA().buildPerturbExpression(); - + return ret; } PerturbationPtr InternalPerturbation::substitute(const Identities &identities) const { PerturbationPtr ret = Perturbation::substitute(identities); - + ret.edit().asA().buildPerturbExpression(); - + return ret; } @@ -278,16 +279,16 @@ PerturbationPtr InternalPerturbation::substitute(const Identities &identities) c static const RegisterMetaType r_twoatom; -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const TwoAtomPerturbation &twoatom) { writeHeader(ds, r_twoatom, 1); - + SharedDataStream sds(ds); - + sds << twoatom.atm0 << twoatom.atm1 << static_cast(twoatom); - + return ds; } @@ -295,11 +296,11 @@ QDataStream &operator>>(QDataStream &ds, TwoAtomPerturbation &twoatom) { VersionID v = readHeader(ds, r_twoatom); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> twoatom.atm0 >> twoatom.atm1 >> static_cast(twoatom); } @@ -315,7 +316,7 @@ TwoAtomPerturbation::TwoAtomPerturbation() {} /** Construct to perturb the function between the atoms 'atom0' and 'atom1' - to use 'initial_form' at the initial state and 'final_form' at the + to use 'initial_form' at the initial state and 'final_form' at the final state, where the functions are mapped between these two states using the default mapping function */ TwoAtomPerturbation::TwoAtomPerturbation(const AtomID &atom0, const AtomID &atom1, @@ -330,7 +331,7 @@ TwoAtomPerturbation::TwoAtomPerturbation(const AtomID &atom0, const AtomID &atom {} /** Construct to perturb the function between the atoms 'atom0' and 'atom1' - to use 'initial_form' at the initial state and 'final_form' at the + to use 'initial_form' at the initial state and 'final_form' at the final state, where the functions are mapped between these two states using 'mapping_function' */ TwoAtomPerturbation::TwoAtomPerturbation(const AtomID &atom0, const AtomID &atom1, @@ -382,7 +383,7 @@ TwoAtomPerturbation::TwoAtomPerturbation(const AtomID &atom0, const AtomID &atom map), atm0(atom0), atm1(atom1) {} - + /** Copy constructor */ TwoAtomPerturbation::TwoAtomPerturbation(const TwoAtomPerturbation &other) : ConcreteProperty(other), @@ -402,7 +403,7 @@ TwoAtomPerturbation& TwoAtomPerturbation::operator=(const TwoAtomPerturbation &o atm1 = other.atm1; InternalPerturbation::operator=(other); } - + return *this; } @@ -449,56 +450,56 @@ QString TwoAtomPerturbation::toString() const QSet TwoAtomPerturbation::requiredProperties() const { QSet props; - + const PropertyName ¶m_property = propertyMap()["parameters"]; - + if (param_property.hasSource()) props.insert(param_property.source()); - + return props; } /** Return whether or not this perturbation with the passed values would change the molecule 'molecule' */ -bool TwoAtomPerturbation::wouldChange(const Molecule &molecule, +bool TwoAtomPerturbation::wouldChange(const Molecule &molecule, const Values &values) const { const PropertyName ¶m_property = propertyMap()["parameters"]; - + if (not molecule.hasProperty(param_property)) return true; - + const TwoAtomFunctions &funcs = molecule.property(param_property) .asA(); - + Identities idents; - + foreach (Symbol symbol, values.symbols()) { idents.set(symbol, Expression(values[symbol])); } - + Expression new_function = perturbExpression().substitute(idents); - + return new_function != funcs.potential(atm0, atm1); } /** Perturb the two atom function in passed molecule using the reaction - coordinate(s) in 'values' - + coordinate(s) in 'values' + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void TwoAtomPerturbation::perturbMolecule(MolEditor &molecule, +void TwoAtomPerturbation::perturbMolecule(MolEditor &molecule, const Values &values) const { const PropertyName ¶m_property = propertyMap()["parameters"]; - + TwoAtomFunctions funcs; - + bool new_property = false; - + if (molecule.hasProperty(param_property)) { funcs = molecule.property(param_property).asA(); @@ -508,17 +509,17 @@ void TwoAtomPerturbation::perturbMolecule(MolEditor &molecule, funcs = TwoAtomFunctions(molecule.data()); new_property = true; } - + //calculate the perturbed function Identities idents; - + foreach (Symbol symbol, values.symbols()) { idents.set(symbol, Expression(values[symbol])); } Expression new_function = perturbExpression().substitute(idents); - + Expression old_function = funcs.potential(atm0, atm1); if (new_property or (new_function != old_function)) @@ -535,16 +536,16 @@ void TwoAtomPerturbation::perturbMolecule(MolEditor &molecule, static const RegisterMetaType r_threeatom; -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const ThreeAtomPerturbation &threeatom) { writeHeader(ds, r_threeatom, 1); - + SharedDataStream sds(ds); - + sds << threeatom.atm0 << threeatom.atm1 << threeatom.atm2 << static_cast(threeatom); - + return ds; } @@ -552,11 +553,11 @@ QDataStream &operator>>(QDataStream &ds, ThreeAtomPerturbation &threeatom) { VersionID v = readHeader(ds, r_threeatom); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> threeatom.atm0 >> threeatom.atm1 >> threeatom.atm2 >> static_cast(threeatom); } @@ -572,7 +573,7 @@ ThreeAtomPerturbation::ThreeAtomPerturbation() {} /** Construct to perturb the function between the atoms 'atom0', 'atom1' and 'atom2' - to use 'initial_form' at the initial state and 'final_form' at the + to use 'initial_form' at the initial state and 'final_form' at the final state, where the functions are mapped between these two states using the default mapping function */ ThreeAtomPerturbation::ThreeAtomPerturbation(const AtomID &atom0, const AtomID &atom1, @@ -588,7 +589,7 @@ ThreeAtomPerturbation::ThreeAtomPerturbation(const AtomID &atom0, const AtomID & {} /** Construct to perturb the function between the atoms 'atom0', 'atom1' and 'atom2' - to use 'initial_form' at the initial state and 'final_form' at the + to use 'initial_form' at the initial state and 'final_form' at the final state, where the functions are mapped between these two states using 'mapping_function' */ ThreeAtomPerturbation::ThreeAtomPerturbation(const AtomID &atom0, const AtomID &atom1, @@ -642,7 +643,7 @@ ThreeAtomPerturbation::ThreeAtomPerturbation(const AtomID &atom0, const AtomID & map), atm0(atom0), atm1(atom1), atm2(atom2) {} - + /** Copy constructor */ ThreeAtomPerturbation::ThreeAtomPerturbation(const ThreeAtomPerturbation &other) : ConcreteProperty(other), @@ -663,7 +664,7 @@ ThreeAtomPerturbation& ThreeAtomPerturbation::operator=(const ThreeAtomPerturbat atm2 = other.atm2; InternalPerturbation::operator=(other); } - + return *this; } @@ -672,7 +673,7 @@ bool ThreeAtomPerturbation::operator==(const ThreeAtomPerturbation &other) const { return ( (atm0 == other.atm0 and atm2 == other.atm2) or (atm0 == other.atm2 and atm2 == other.atm0) ) and - atm1 == other.atm1 and + atm1 == other.atm1 and InternalPerturbation::operator==(other); } @@ -717,56 +718,56 @@ QString ThreeAtomPerturbation::toString() const QSet ThreeAtomPerturbation::requiredProperties() const { QSet props; - + const PropertyName ¶m_property = propertyMap()["parameters"]; - + if (param_property.hasSource()) props.insert(param_property.source()); - + return props; } /** Return whether or not this perturbation with the passed values would change the molecule 'molecule' */ -bool ThreeAtomPerturbation::wouldChange(const Molecule &molecule, +bool ThreeAtomPerturbation::wouldChange(const Molecule &molecule, const Values &values) const { const PropertyName ¶m_property = propertyMap()["parameters"]; - + if (not molecule.hasProperty(param_property)) return true; - + const ThreeAtomFunctions &funcs = molecule.property(param_property) .asA(); - + Identities idents; - + foreach (Symbol symbol, values.symbols()) { idents.set(symbol, Expression(values[symbol])); } - + Expression new_function = perturbExpression().substitute(idents); - + return new_function != funcs.potential(atm0, atm1, atm2); } /** Perturb the three atom function in passed molecule using the reaction - coordinate(s) in 'values' - + coordinate(s) in 'values' + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void ThreeAtomPerturbation::perturbMolecule(MolEditor &molecule, +void ThreeAtomPerturbation::perturbMolecule(MolEditor &molecule, const Values &values) const { const PropertyName ¶m_property = propertyMap()["parameters"]; - + ThreeAtomFunctions funcs; - + bool new_property = false; - + if (molecule.hasProperty(param_property)) { funcs = molecule.property(param_property).asA(); @@ -776,17 +777,17 @@ void ThreeAtomPerturbation::perturbMolecule(MolEditor &molecule, funcs = ThreeAtomFunctions(molecule.data()); new_property = true; } - + //calculate the perturbed function Identities idents; - + foreach (Symbol symbol, values.symbols()) { idents.set(symbol, Expression(values[symbol])); } Expression new_function = perturbExpression().substitute(idents); - + Expression old_function = funcs.potential(atm0, atm1, atm2); if (new_property or (new_function != old_function)) @@ -803,16 +804,16 @@ void ThreeAtomPerturbation::perturbMolecule(MolEditor &molecule, static const RegisterMetaType r_fouratom; -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const FourAtomPerturbation &fouratom) { writeHeader(ds, r_fouratom, 1); - + SharedDataStream sds(ds); - + sds << fouratom.atm0 << fouratom.atm1 << fouratom.atm2 << fouratom.atm3 << static_cast(fouratom); - + return ds; } @@ -820,11 +821,11 @@ QDataStream &operator>>(QDataStream &ds, FourAtomPerturbation &fouratom) { VersionID v = readHeader(ds, r_fouratom); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> fouratom.atm0 >> fouratom.atm1 >> fouratom.atm2 >> fouratom.atm3 >> static_cast(fouratom); } @@ -840,7 +841,7 @@ FourAtomPerturbation::FourAtomPerturbation() {} /** Construct to perturb the function between the atoms - to use 'initial_form' at the initial state and 'final_form' at the + to use 'initial_form' at the initial state and 'final_form' at the final state, where the functions are mapped between these two states using the default mapping function */ FourAtomPerturbation::FourAtomPerturbation(const AtomID &atom0, const AtomID &atom1, @@ -856,7 +857,7 @@ FourAtomPerturbation::FourAtomPerturbation(const AtomID &atom0, const AtomID &at {} /** Construct to perturb the function between the atoms - to use 'initial_form' at the initial state and 'final_form' at the + to use 'initial_form' at the initial state and 'final_form' at the final state, where the functions are mapped between these two states using 'mapping_function' */ FourAtomPerturbation::FourAtomPerturbation(const AtomID &atom0, const AtomID &atom1, @@ -910,7 +911,7 @@ FourAtomPerturbation::FourAtomPerturbation(const AtomID &atom0, const AtomID &at map), atm0(atom0), atm1(atom1), atm2(atom2), atm3(atom3) {} - + /** Copy constructor */ FourAtomPerturbation::FourAtomPerturbation(const FourAtomPerturbation &other) : ConcreteProperty(other), @@ -932,7 +933,7 @@ FourAtomPerturbation& FourAtomPerturbation::operator=(const FourAtomPerturbation atm3 = other.atm3; InternalPerturbation::operator=(other); } - + return *this; } @@ -993,58 +994,58 @@ QString FourAtomPerturbation::toString() const QSet FourAtomPerturbation::requiredProperties() const { QSet props; - + const PropertyName ¶m_property = propertyMap()["parameters"]; - + if (param_property.hasSource()) props.insert(param_property.source()); - + return props; } /** Return whether or not this perturbation with the passed values would change the molecule 'molecule' */ -bool FourAtomPerturbation::wouldChange(const Molecule &molecule, +bool FourAtomPerturbation::wouldChange(const Molecule &molecule, const Values &values) const { const PropertyName ¶m_property = propertyMap()["parameters"]; - + if (not molecule.hasProperty(param_property)) return true; - + const FourAtomFunctions &funcs = molecule.property(param_property) .asA(); - + Identities idents; - + foreach (Symbol symbol, values.symbols()) { idents.set(symbol, Expression(values[symbol])); } - + Expression new_function = perturbExpression().substitute(idents); - + // Use DihedralID as this looks up both atm0-atm1-atm2-atm3 // and atm3-atm2-atm1-atm0 return new_function != funcs.potential( DihedralID(atm0, atm1, atm2, atm3) ); } /** Perturb the four atom function in passed molecule using the reaction - coordinate(s) in 'values' - + coordinate(s) in 'values' + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error */ -void FourAtomPerturbation::perturbMolecule(MolEditor &molecule, +void FourAtomPerturbation::perturbMolecule(MolEditor &molecule, const Values &values) const { const PropertyName ¶m_property = propertyMap()["parameters"]; - + FourAtomFunctions funcs; - + bool new_property = false; - + if (molecule.hasProperty(param_property)) { funcs = molecule.property(param_property).asA(); @@ -1054,18 +1055,18 @@ void FourAtomPerturbation::perturbMolecule(MolEditor &molecule, funcs = FourAtomFunctions(molecule.data()); new_property = true; } - + //calculate the perturbed function Identities idents; - + foreach (Symbol symbol, values.symbols()) { idents.set(symbol, Expression(values[symbol])); } Expression new_function = perturbExpression().substitute(idents); - - // Use DihedralID as this looks up both atm0-atm1-atm2-atm3 and + + // Use DihedralID as this looks up both atm0-atm1-atm2-atm3 and // atm3-atm2-atm1-atm0 Expression old_function = funcs.potential( DihedralID(atm0, atm1, atm2, atm3) ); diff --git a/corelib/src/libs/SireMM/ljperturbation.cpp b/corelib/src/libs/SireMM/ljperturbation.cpp index f1f8b76bf..5f8ecdcf6 100644 --- a/corelib/src/libs/SireMM/ljperturbation.cpp +++ b/corelib/src/libs/SireMM/ljperturbation.cpp @@ -32,6 +32,7 @@ #include "SireMol/molecule.h" #include "SireMol/moleditor.h" #include "SireMol/mover.hpp" +#include "SireMol/core.h" #include "SireCAS/values.h" #include "SireCAS/identities.h" @@ -52,12 +53,12 @@ QDataStream &operator<<(QDataStream &ds, const LJPerturbation &ljpert) { writeHeader(ds, r_ljpert, 1); - + SharedDataStream sds(ds); - + sds << ljpert.sigma_mapfunc << quint32(ljpert.maptype) << static_cast(ljpert); - + return ds; } @@ -65,14 +66,14 @@ QDataStream &operator>>(QDataStream &ds, LJPerturbation &ljpert) { VersionID v = readHeader(ds, r_ljpert); - + if (v == 1) { SharedDataStream sds(ds); - + quint32 maptype; sds >> ljpert.sigma_mapfunc >> maptype >> static_cast(ljpert); - + switch (maptype) { case LJPerturbation::MAP_SIGMA_AND_EPSILON: @@ -90,11 +91,11 @@ QDataStream &operator>>(QDataStream &ds, } else throw version_error(v, "1", r_ljpert, CODELOC); - + return ds; } -/** Constructor - this creates a LJ perturbation that +/** Constructor - this creates a LJ perturbation that perturbs from LJs in "initial_LJ" to LJs in "final_LJ", placing the current LJs in "LJ", and using Perturbation::defaultEquation() to map the @@ -147,7 +148,7 @@ LJPerturbation::LJPerturbation(const Expression &sigma_function, /** Construct, using the passed map to find the properties used by this perturbation and the passed mapping function to map the LJs between the states */ -LJPerturbation::LJPerturbation(const Expression &sigma_function, +LJPerturbation::LJPerturbation(const Expression &sigma_function, const Expression &epsilon_function, MapType typ, const PropertyMap &map) @@ -179,7 +180,7 @@ LJPerturbation& LJPerturbation::operator=(const LJPerturbation &other) maptype = other.maptype; Perturbation::operator=(other); } - + return *this; } @@ -200,7 +201,7 @@ PerturbationPtr LJPerturbation::recreate(const Expression &mapping_function) con { PerturbationPtr ret = Perturbation::recreate(mapping_function); ret.edit().asA().sigma_mapfunc = mapping_function; - + return ret; } @@ -209,20 +210,20 @@ PerturbationPtr LJPerturbation::recreate(const Expression &mapping_function, { PerturbationPtr ret = Perturbation::recreate(mapping_function, map); ret.edit().asA().sigma_mapfunc = mapping_function; - + return ret; } -/** Substitute the identities in 'identities' in all of the mapping functions - used by this perturbation. This is useful if, for example, you want to +/** Substitute the identities in 'identities' in all of the mapping functions + used by this perturbation. This is useful if, for example, you want to switch from using 'lambda' to control the perturbation to using 'alpha', e.g. - + alpha_perturbations = lambda_perturbations.substitute( lam == Expression(alpha) ); */ PerturbationPtr LJPerturbation::substitute(const Identities &identities) const { PerturbationPtr ret = Perturbation::substitute(identities); - + ret.edit().asA().sigma_mapfunc = sigma_mapfunc.substitute(identities); return ret; @@ -270,19 +271,19 @@ QString LJPerturbation::toString() const { case MAP_SIGMA_AND_EPSILON: return QObject::tr("LJPerturbation( sigma => %1, epsilon => %2 )") - .arg(sigma_mapfunc.toString(), + .arg(sigma_mapfunc.toString(), Perturbation::mappingFunction().toString()); case MAP_RMIN_AND_EPSILON: return QObject::tr("LJPerturbation( r_min => %1, epsilon => %2 )") - .arg(sigma_mapfunc.toString(), + .arg(sigma_mapfunc.toString(), Perturbation::mappingFunction().toString()); case MAP_A_AND_B: return QObject::tr("LJPerturbation( A => %1, B => %2 )") - .arg(sigma_mapfunc.toString(), + .arg(sigma_mapfunc.toString(), Perturbation::mappingFunction().toString()); } } - + return QObject::tr( "LJParameter( ??? )" ); } @@ -317,7 +318,7 @@ const Expression& LJPerturbation::rMinMappingFunction() const return sigma_mapfunc; } -/** Return the function used to map sigma +/** Return the function used to map sigma \throw SireError::invalid_state */ @@ -377,49 +378,49 @@ const Expression& LJPerturbation::B_MappingFunction() const QSet LJPerturbation::requiredProperties() const { QSet props; - + PropertyName prop = propertyMap()["LJ"]; - + if (prop.hasSource()) props.insert( prop.source() ); - + prop = propertyMap()["initial_LJ"]; - + if (prop.hasSource()) props.insert( prop.source() ); - + prop = propertyMap()["final_LJ"]; - + if (prop.hasSource()) props.insert( prop.source() ); - + return props; } /** Return whether or not this perturbation with the passed values would change the molecule 'molecule' */ -bool LJPerturbation::wouldChange(const Molecule &molecule, +bool LJPerturbation::wouldChange(const Molecule &molecule, const Values &values) const { try { - const AtomLJs &initial_ljs = molecule.property( + const AtomLJs &initial_ljs = molecule.property( propertyMap()["initial_LJ"] ) .asA(); - - const AtomLJs &final_ljs = molecule.property( + + const AtomLJs &final_ljs = molecule.property( propertyMap()["final_LJ"] ) .asA(); - const AtomLJs &ljs = molecule.property( + const AtomLJs &ljs = molecule.property( propertyMap()["LJ"] ) .asA(); - + const Expression &f0 = sigma_mapfunc; const Expression &f1 = Perturbation::mappingFunction(); const Symbol &initial = this->symbols().initial(); const Symbol &final = this->symbols().final(); - + for (CGIdx i(0); i(); - + const AtomLJs &final_ljs = molecule.property( propertyMap()["final_LJ"] ) .asA(); - + AtomLJs ljs(initial_ljs); - + const Expression &f0 = sigma_mapfunc; const Expression &f1 = Perturbation::mappingFunction(); const Symbol &initial = this->symbols().initial(); const Symbol &final = this->symbols().final(); - + for (CGIdx i(0); i + +using namespace SireMM; +using namespace SireMol; +using namespace SireBase; +using namespace SireCAS; +using namespace SireID; +using namespace SireStream; +using namespace SireError; +using namespace SireUnits; +using namespace SireUnits::Dimension; + +static const RegisterMetaType r_sbond; + +SIREMM_EXPORT QDataStream& operator<<(QDataStream &ds, const SelectorBond &sbond) +{ + writeHeader(ds, r_sbond, 1); + SharedDataStream sds(ds); + sds << sbond.bnds << static_cast(sbond); + return ds; +} + +SIREMM_EXPORT QDataStream& operator>>(QDataStream &ds, SelectorBond &sbond) +{ + auto v = readHeader(ds, r_sbond); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> sbond.bnds >> static_cast(sbond); + } + else + throw SireStream::version_error(v, "1", r_sbond, CODELOC); + + return ds; +} + +SelectorBond::SelectorBond() : ConcreteProperty() +{} + +SelectorBond::SelectorBond(const MoleculeView &mol, + const SireBase::PropertyMap &map) + : ConcreteProperty(mol) +{ + if (mol.data().hasProperty(map["connectivity"])) + { + auto c = mol.data().property(map["connectivity"]).asA(); + + auto bonds = c.getBonds(); + + if (mol.selectedAll()) + { + bnds = bonds; + } + else + { + const auto s = mol.selection(); + + for (const auto &bond : bonds) + { + if (s.selected(bond.atom0()) and s.selected(bond.atom1())) + { + bnds.append(bond); + } + } + } + } +} + +SelectorBond::SelectorBond(const MoleculeView &mol, + const QList &bonds) + : ConcreteProperty(mol) +{ + const auto s = mol.selection(); + + for (const auto &bond : bonds) + { + BondID b(mol.data().info().atomIdx(bond.atom0()), + mol.data().info().atomIdx(bond.atom1())); + + if (s.selected(b.atom0()) and s.selected(b.atom1())) + { + bnds.append(b); + } + } +} + +SelectorBond::SelectorBond(const MoleculeData &moldata, + const SireBase::PropertyMap &map) + : ConcreteProperty() +{ + this->operator=(SelectorBond(Molecule(moldata), map)); +} + +SelectorBond::SelectorBond(const MoleculeView &mol, + const BondID &bond, const PropertyMap &map) + : ConcreteProperty(mol) +{ + auto atoms0 = mol.data().info().map(bond.atom0()); + auto atoms1 = mol.data().info().map(bond.atom1()); + + if (mol.data().hasProperty(map["connectivity"])) + { + auto c = mol.data().property(map["connectivity"]).asA(); + + auto ce = c.edit(); + ce.disconnectAll(); + + QList bonds; + + for (const auto &atom0 : atoms0) + { + for (const auto &atom1 : atoms1) + { + auto atomidx0 = atom0; + auto atomidx1 = atom1; + + if (atomidx0 > atomidx1) + { + qSwap(atomidx0, atomidx1); + } + + if (atomidx0 != atomidx1 and c.areConnected(atomidx0, atomidx1) + and not ce.areConnected(atomidx0, atomidx1)) + { + ce = ce.connect(atomidx0, atomidx1); + bonds.append(BondID(atomidx0, atomidx1)); + } + } + } + + if (mol.selectedAll()) + { + bnds = bonds; + } + else + { + const auto s = mol.selection(); + + for (const auto &bond : bonds) + { + if (s.selected(bond.atom0()) and s.selected(bond.atom1())) + { + bnds.append(bond); + } + } + } + } +} + +SelectorBond::SelectorBond(const MoleculeView &mol, + const AtomID &atom, const PropertyMap &map) + : ConcreteProperty(mol) +{ + if (mol.data().hasProperty(map["connectivity"])) + { + auto c = mol.data().property(map["connectivity"]).asA(); + + auto ce = c.edit(); + ce.disconnectAll(); + + QList bonds; + + for (const auto &atomidx : mol.data().info().map(atom)) + { + for (const auto &b : c.getBonds(atomidx)) + { + auto atomidx0 = mol.data().info().atomIdx(b.atom0()); + auto atomidx1 = mol.data().info().atomIdx(b.atom1()); + + if (atomidx0 > atomidx1) + { + qSwap(atomidx0, atomidx1); + } + + if (atomidx0 != atomidx1 and not ce.areConnected(atomidx0, atomidx1)) + { + ce = ce.connect(atomidx0, atomidx1); + bonds.append(BondID(atomidx0, atomidx1)); + } + } + } + + if (mol.selectedAll()) + { + bnds = bonds; + } + else + { + const auto s = mol.selection(); + + for (const auto &bond : bonds) + { + if (s.selected(bond.atom0()) and s.selected(bond.atom1())) + { + bnds.append(bond); + } + } + } + } +} + +SelectorBond::SelectorBond(const MoleculeView &mol, + const AtomID &atom0, const AtomID &atom1, + const PropertyMap &map) + : ConcreteProperty(mol) +{ + if (mol.data().hasProperty(map["connectivity"])) + { + auto c = mol.data().property(map["connectivity"]).asA(); + + auto ce = c.edit().disconnectAll(); + + QList bonds; + + for (const auto &atomidx0 : mol.data().info().map(atom0)) + { + for (const auto &atomidx1 : mol.data().info().map(atom1)) + { + if (atomidx0 != atomidx1 and c.areConnected(atomidx0, atomidx1)) + { + if (not (ce.areConnected(atomidx0, atomidx1))) + { + if (atomidx0 <= atomidx1) + { + bonds.append(BondID(atomidx0, atomidx1)); + } + else + { + bonds.append(BondID(atomidx1, atomidx0)); + } + } + } + } + } + + if (mol.selectedAll()) + { + bnds = bonds; + } + else + { + const auto s = mol.selection(); + + for (const auto &bond : bonds) + { + if (s.selected(bond.atom0()) and s.selected(bond.atom1())) + { + bnds.append(bond); + } + } + } + } +} + +SelectorBond::SelectorBond(const MoleculeData &mol, + const AtomID &atom, const PropertyMap &map) + : ConcreteProperty() +{ + this->operator=(SelectorBond(Molecule(mol), atom, map)); +} + +SelectorBond::SelectorBond(const MoleculeData &mol, + const AtomID &atom0, const AtomID &atom1, + const PropertyMap &map) + : ConcreteProperty() +{ + this->operator=(SelectorBond(Molecule(mol), atom0, atom1, map)); +} + +SelectorBond::SelectorBond(const Selector &atoms, + const PropertyMap &map) + : ConcreteProperty(atoms) +{ + if (atoms.data().hasProperty(map["connectivity"])) + { + auto c = atoms.data().property(map["connectivity"]).asA(); + + auto ce = c.edit(); + ce.disconnectAll(); + + QList bonds; + + for (int i=0; i atomidx1) + { + qSwap(atomidx0, atomidx1); + } + + if (atomidx0 != atomidx1 and not ce.areConnected(atomidx0, atomidx1)) + { + ce = ce.connect(atomidx0, atomidx1); + bonds.append(BondID(atomidx0, atomidx1)); + } + } + } + + bnds = bonds; + } +} + +SelectorBond::SelectorBond(const Selector &atoms0, + const Selector &atoms1, + const PropertyMap &map) + : ConcreteProperty(atoms0) +{ + if (not atoms0.isSameMolecule(atoms1)) + throw SireError::incompatible_error(QObject::tr( + "You can only create a bond from two atoms in the same molecule. " + "%1 and %2 are from different molecules (%3 and %4)") + .arg(atoms0.toString()).arg(atoms1.toString()) + .arg(atoms0.molecule().toString()) + .arg(atoms1.molecule().toString()), CODELOC); + + if (atoms0.data().hasProperty(map["connectivity"])) + { + auto c = atoms0.data().property(map["connectivity"]).asA(); + + auto ce = c.edit(); + ce.disconnectAll(); + + QList bonds; + + for (int i=0; i atomidx1) + { + qSwap(atomidx0, atomidx1); + } + + if (atomidx0 != atomidx1 and c.areConnected(atomidx0, atomidx1) + and not ce.areConnected(atomidx0, atomidx1)) + { + ce = ce.connect(atomidx0, atomidx1); + bonds.append(BondID(atomidx0, atomidx1)); + } + } + } + + bnds = bonds; + } +} + +SelectorBond::SelectorBond(const SelectorBond &other) + : ConcreteProperty(other), bnds(other.bnds) +{} + +SelectorBond::~SelectorBond() +{} + +const char* SelectorBond::typeName() +{ + return QMetaType::typeName(qMetaTypeId()); +} + +SelectorBond& SelectorBond::operator=(const SelectorBond &other) +{ + if (this != &other) + { + bnds = other.bnds; + MoleculeView::operator=(other); + } + + return *this; +} + +bool SelectorBond::operator==(const SelectorBond &other) const +{ + return bnds == other.bnds and MoleculeView::operator==(other); +} + +bool SelectorBond::operator!=(const SelectorBond &other) const +{ + return not operator==(other); +} + +int SelectorBond::count() const +{ + return this->bnds.count(); +} + +int SelectorBond::size() const +{ + return this->count(); +} + +int SelectorBond::nViews() const +{ + return this->count(); +} + +QString SelectorBond::toString() const +{ + if (this->isNull()) + return QObject::tr("SelectorBond::null"); + else if (this->isEmpty()) + return QObject::tr("SelectorBond::empty"); + + QStringList parts; + + if (this->count() <= 10) + { + for (int i=0; icount(); ++i) + { + parts.append(QObject::tr("%1: %2").arg(i) + .arg(this->operator()(i).toString())); + } + } + else + { + for (int i=0; i<5; ++i) + { + parts.append(QObject::tr("%1: %2").arg(i) + .arg(this->operator()(i).toString())); + } + + parts.append("..."); + + for (int i=this->count()-5; icount(); ++i) + { + parts.append(QObject::tr("%1: %2").arg(i) + .arg(this->operator()(i).toString())); + } + } + + return QObject::tr("SelectorBond( size=%1\n%2\n)") + .arg(this->count()).arg(parts.join("\n")); +} + +SelectorBond SelectorBond::add(const Bond &bond) const +{ + if (bond.isNull()) + return *this; + + if (this->isEmpty()) + { + return SelectorBond(bond); + } + + if (bond.data().number() != this->data().number()) + { + throw SireError::incompatible_error(QObject::tr( + "You cannot add bonds from a different molecule (%1) to " + "a set of bonds from molecule %2.") + .arg(bond.data().number()) + .arg(this->data().number()), + CODELOC); + } + + auto atom0 = this->data().info().atomIdx(bond.ID().atom0()); + auto atom1 = this->data().info().atomIdx(bond.ID().atom1()); + + if (atom0 > atom1) + qSwap(atom0, atom1); + + if (atom0 == atom1) + // cannot add bonds to the same atom + return *this; + + SelectorBond ret(*this); + + ret.bnds.append(BondID(atom0, atom1)); + + return ret; +} + +MolViewPtr SelectorBond::operator[](int i) const +{ + return this->operator()(i); +} + +MolViewPtr SelectorBond::operator[](const SireBase::Slice &slice) const +{ + return this->operator()(slice); +} + +MolViewPtr SelectorBond::operator[](const QList &idxs) const +{ + return this->operator()(idxs); +} + +MolViewPtr SelectorBond::operator[](const BondID &bond) const +{ + return this->operator()(bond); +} + +Bond SelectorBond::operator()(int i) const +{ + auto bnd = bnds.at(Index(i).map(bnds.count())); + return Bond(this->data(), bnd); +} + +SelectorBond SelectorBond::operator()(const SireBase::Slice &slice) const +{ + SelectorBond ret(*this); + ret.bnds.clear(); + + for (auto it = slice.begin(bnds.count()); not it.atEnd(); it.next()) + { + ret.bnds.append(this->bnds.at(it.value())); + } + + return ret; +} + +SelectorBond SelectorBond::operator()(const QList &idxs) const +{ + SelectorBond ret(*this); + ret.bnds.clear(); + + for (const auto &idx : idxs) + { + ret.bnds.append(this->bnds.at(Index(idx).map(this->bnds.count()))); + } + + return ret; +} + +SelectorBond SelectorBond::operator()(int i, int j) const +{ + i = Index(i).map(bnds.count()); + j = Index(j).map(bnds.count()); + + SelectorBond ret(*this); + ret.bnds.clear(); + + if (i <= j) + { + for ( ; i<=j; ++i) + { + ret.bnds.append(this->bnds.at(i)); + } + } + else + { + for ( ; i >= j; --i) + { + ret.bnds.append(this->bnds.at(i)); + } + } + + return ret; +} + +SelectorBond SelectorBond::operator()(const BondID &bond) const +{ + auto atom0s = this->data().info().map(bond.atom0()); + auto atom1s = this->data().info().map(bond.atom1()); + + SelectorBond ret(*this); + ret.bnds.clear(); + + for (const auto &atom0 : atom0s) + { + for (const auto &atom1 : atom1s) + { + auto a0 = atom0; + auto a1 = atom1; + + if (a0 > a1) + qSwap(a0, a1); + + BondID bond(a0, a1); + + for (const auto &b : bnds) + { + if (b == bond) + ret.bnds.append(b); + } + } + } + + return ret; +} + +MolViewPtr SelectorBond::toSelector() const +{ + return MolViewPtr(*this); +} + +QList SelectorBond::toList() const +{ + QList l; + l.reserve(bnds.count()); + + auto d = this->data(); + + for (const auto &bnd : bnds) + { + l.append(MolViewPtr(new Bond(d, bnd))); + } + + return l; +} + +SelectorBond SelectorBond::add(const SelectorBond &other) const +{ + if (this->isEmpty()) + return other; + else if (other.isEmpty()) + return *this; + + MoleculeView::assertSameMolecule(other); + + SelectorBond ret(*this); + + for (const auto &bond : other.bnds) + { + if (not this->bnds.contains(bond)) + { + ret.bnds.append(bond); + } + } + + return ret; +} + +SelectorBond SelectorBond::intersection(const SelectorBond &other) const +{ + if (this->isEmpty() or other.isEmpty()) + { + return SelectorBond(); + } + + MoleculeView::assertSameMolecule(other); + + SelectorBond ret(*this); + ret.bnds.clear(); + + for (const auto &bond : this->bnds) + { + if (ret.bnds.contains(bond)) + { + ret.bnds.append(bond); + } + } + + return ret; +} + +SelectorBond SelectorBond::invert(const PropertyMap &map) const +{ + auto s = SelectorBond(this->molecule(), map); + + SelectorBond ret(*this); + ret.bnds.clear(); + + for (const auto &bond : s.bnds) + { + if (not this->bnds.contains(bond)) + { + ret.bnds.append(bond); + } + } + + return ret; +} + +SelectorBond SelectorBond::invert() const +{ + return this->invert(PropertyMap()); +} + +QList SelectorBond::IDs() const +{ + return bnds; +} + +bool SelectorBond::isEmpty() const +{ + return this->bnds.isEmpty(); +} + +bool SelectorBond::selectedAll() const +{ + return this->selection().selectedAll(); +} + +AtomSelection SelectorBond::selection() const +{ + if (this->isNull()) + return AtomSelection(); + + auto s = AtomSelection(this->data()); + s = s.deselectAll(); + + for (const auto &bnd : bnds) + { + s = s.select(bnd.atom0()); + s = s.select(bnd.atom1()); + } + + return s; +} + +bool SelectorBond::hasProperty(const PropertyName &key) const +{ + for (int i=0; icount(); ++i) + { + if (this->operator()(i).hasProperty(key)) + return true; + } + + return false; +} + +bool SelectorBond::hasMetadata(const PropertyName &key) const +{ + return false; +} + +bool SelectorBond::hasMetadata(const PropertyName &key, + const PropertyName &metakey) const +{ + return false; +} + +QStringList SelectorBond::propertyKeys() const +{ + QSet keys; + + for (int i=0; icount(); ++i) + { + for (const auto &k : this->operator()(i).propertyKeys()) + { + keys.insert(k); + } + } + + //QStringList ret(keys.constBegin(), keys.constEnd()); + QStringList ret = keys.values(); + + return ret; +} + +QStringList SelectorBond::metadataKeys() const +{ + return QStringList(); +} + +QStringList SelectorBond::metadataKeys(const PropertyName &key) const +{ + return QStringList(); +} + +QList SelectorBond::properties() const +{ + QList props; + + for (int i=0; icount(); ++i) + { + props.append(this->operator()(i).properties()); + } + + return props; +} + +Mover SelectorBond::move() const +{ + return Mover(*this); +} + +Evaluator SelectorBond::evaluate() const +{ + return Evaluator(*this); +} + +QList SelectorBond::property(const PropertyName &key) const +{ + bool has_prop = false; + + QList props; + + for (int i=0; icount(); ++i) + { + try + { + props.append(this->operator()(i).property(key)); + has_prop = true; + } + catch(SireError::exception&) + { + props.append(NullProperty()); + } + } + + if (not has_prop) + throw SireBase::missing_property(QObject::tr( + "None of the bonds in this container have a property called %1.") + .arg(key.source()), CODELOC); + + return props; +} + +QList SelectorBond::property(const PropertyName &key, + const Property &default_value) const +{ + QList props; + + for (int i=0; icount(); ++i) + { + props.append(this->operator()(i).property(key, default_value)); + } + + return props; +} + +QList SelectorBond::lengths(const PropertyMap &map) const +{ + QList l; + + for (int i=0; icount(); ++i) + { + l.append(this->operator()(i).length(map)); + } + + return l; +} + +QList SelectorBond::lengths() const +{ + return this->lengths(PropertyMap()); +} + +QList SelectorBond::potentials() const +{ + return this->potentials(PropertyMap()); +} + +QList SelectorBond::potentials(const PropertyMap &map) const +{ + QList p; + + for (int i=0; icount(); ++i) + { + p.append(this->operator()(i).potential(map)); + } + + return p; +} + +QList SelectorBond::energies() const +{ + return this->energies(PropertyMap()); +} + +QList SelectorBond::energies(const PropertyMap &map) const +{ + QList nrgs; + + for (int i=0; icount(); ++i) + { + nrgs.append(this->operator()(i).energy(map)); + } + + return nrgs; +} + +MolarEnergy SelectorBond::energy() const +{ + return this->energy(PropertyMap()); +} + +MolarEnergy SelectorBond::energy(const PropertyMap &map) const +{ + MolarEnergy nrg(0); + + for (int i=0; icount(); ++i) + { + nrg += this->operator()(i).energy(map); + } + + return nrg; +} + +namespace SireMol +{ + template class Mover; +} diff --git a/corelib/src/libs/SireMM/selectorbond.h b/corelib/src/libs/SireMM/selectorbond.h new file mode 100644 index 000000000..45cbef0c5 --- /dev/null +++ b/corelib/src/libs/SireMM/selectorbond.h @@ -0,0 +1,209 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREMM_SELECTORBOND_H +#define SIREMM_SELECTORBOND_H + +#include "bond.h" + +#include "SireMol/selector.hpp" + +SIRE_BEGIN_HEADER + +namespace SireMM +{ +class SelectorBond; +} + +SIREMM_EXPORT QDataStream& operator<<(QDataStream&, const SireMM::SelectorBond&); +SIREMM_EXPORT QDataStream& operator>>(QDataStream&, SireMM::SelectorBond&); + +namespace SireMM +{ + +/** This provides a Selector-style interface for multiple bonds */ +class SIREMM_EXPORT SelectorBond : + public SireBase::ConcreteProperty +{ + +friend QDataStream& ::operator<<(QDataStream&, const SelectorBond&); +friend QDataStream& ::operator>>(QDataStream&, SelectorBond&); + +public: + SelectorBond(); + SelectorBond(const SireMol::MoleculeData &molecule, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + SelectorBond(const MoleculeView &molecule, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + SelectorBond(const SireMol::MoleculeView &molecule, + const QList &bonds); + + SelectorBond(const SireMol::MoleculeData &molecule, + const SireMol::AtomID &atom, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SelectorBond(const SireMol::MoleculeData &molecule, + const SireMol::AtomID &atom0, const SireMol::AtomID &atom1, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SelectorBond(const SireMol::MoleculeView &molecule, + const SireMol::AtomID &atom, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SelectorBond(const SireMol::MoleculeView &molecule, + const SireMol::BondID &atom, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SelectorBond(const SireMol::MoleculeView &molecule, + const SireMol::AtomID &atom0, const SireMol::AtomID &atom1, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SelectorBond(const SireMol::Selector &atoms, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + SelectorBond(const SireMol::Selector &atoms0, + const SireMol::Selector &atoms1, + const SireBase::PropertyMap &map = SireBase::PropertyMap()); + + SelectorBond(const SelectorBond &other); + + virtual ~SelectorBond(); + + static const char* typeName(); + + virtual const char* what() const + { + return SelectorBond::typeName(); + } + + virtual SelectorBond* clone() const + { + return new SelectorBond(*this); + } + + SelectorBond& operator=(const SelectorBond &bond); + + bool operator==(const SelectorBond &other) const; + bool operator!=(const SelectorBond &other) const; + + QString toString() const; + + SireMol::MolViewPtr operator[](int i) const; + SireMol::MolViewPtr operator[](const SireBase::Slice &slice) const; + SireMol::MolViewPtr operator[](const QList &idxs) const; + SireMol::MolViewPtr operator[](const SireMol::BondID &bond) const; + + Bond operator()(int i) const; + SelectorBond operator()(int i, int j) const; + SelectorBond operator()(const SireBase::Slice &slice) const; + SelectorBond operator()(const QList &idxs) const; + SelectorBond operator()(const SireMol::BondID &bond) const; + + QList toList() const; + + QList IDs() const; + + SelectorBond add(const Bond &bond) const; + + int count() const; + int size() const; + int nViews() const; + + bool isEmpty() const; + bool selectedAll() const; + + SireMol::MolViewPtr toSelector() const; + + SireMol::AtomSelection selection() const; + + SelectorBond add(const SelectorBond &other) const; + + SelectorBond intersection(const SelectorBond &other) const; + + SelectorBond invert(const SireBase::PropertyMap &map) const; + SelectorBond invert() const; + + bool hasProperty(const SireBase::PropertyName &key) const; + bool hasMetadata(const SireBase::PropertyName &key) const; + bool hasMetadata(const SireBase::PropertyName &key, + const SireBase::PropertyName &metakey) const; + + QStringList propertyKeys() const; + QStringList metadataKeys() const; + QStringList metadataKeys(const SireBase::PropertyName &key) const; + + QList properties() const; + + SireMol::Mover move() const; + SireMol::Evaluator evaluate() const; + + QList property(const SireBase::PropertyName &key) const; + QList property(const SireBase::PropertyName &key, + const Property &default_value) const; + + QList lengths() const; + QList lengths(const SireBase::PropertyMap &map) const; + + QList potentials() const; + QList potentials(const SireBase::PropertyMap &map) const; + + QList energies() const; + QList energies( + const SireBase::PropertyMap &map) const; + + SireUnits::Dimension::MolarEnergy energy() const; + SireUnits::Dimension::MolarEnergy energy( + const SireBase::PropertyMap &map) const; + +protected: + /** The IDs of the bond (holding AtomIdx IDs) */ + QList bnds; +}; + +} // end of namespace SireMM + +Q_DECLARE_METATYPE( SireMM::SelectorBond ) +Q_DECLARE_METATYPE( SireMol::Mover ) + +SIRE_EXPOSE_CLASS( SireMM::SelectorBond ) + +SIRE_EXPOSE_ALIAS( SireMol::Mover, SireMol::Mover_SelectorBond_ ) + +#ifdef SIRE_INSTANTIATE_TEMPLATES + +#include "SireMol/mover.hpp" + +namespace SireMol +{ + template class SireMol::Mover; +} + +#endif + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireMM/selectormbond.cpp b/corelib/src/libs/SireMM/selectormbond.cpp new file mode 100644 index 000000000..b81605259 --- /dev/null +++ b/corelib/src/libs/SireMM/selectormbond.cpp @@ -0,0 +1,910 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "selectormbond.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" +#include "SireError/errors.h" + +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" + +using namespace SireBase; +using namespace SireStream; +using namespace SireMol; +using namespace SireMM; +using namespace SireID; + +RegisterMetaType r_sbnd; + +/** Serialise to a binary datastream */ +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SelectorMBond &bnds) +{ + writeHeader(ds, r_sbnd, 1); + + SharedDataStream sds(ds); + + sds << bnds.bnds << static_cast(bnds); + + return ds; +} + +/** Extract from a binary datastream */ +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SelectorMBond &bnds) +{ + VersionID v = readHeader(ds, r_sbnd); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> bnds.bnds >> static_cast(bnds); + } + else + throw version_error(v, "1", r_sbnd, CODELOC); + + return ds; +} + +SelectorMBond::SelectorMBond() + : ConcreteProperty() +{} + +SelectorMBond::SelectorMBond(const Bond &view) + : ConcreteProperty() +{ + bnds.append(SelectorBond(view)); +} + +SelectorMBond::SelectorMBond(const Molecules &mols) + : ConcreteProperty() +{ + if (not mols.isEmpty()) + { + auto toList = [](const QSet &molnums) + { + return molnums.values(); + }; + + auto molnums = toList(mols.molNums()); + + //sort them, as this is also likely the order the molecules + //were read in from a file, and so more likely to be the + //order the user would expect + std::sort(molnums.begin(), molnums.end()); + + this->bnds.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + SelectorBond b(mols.at(molnum)); + + if (not b.isEmpty()) + this->bnds.append(b); + } + } +} + +SelectorMBond::SelectorMBond(const MoleculeGroup &mols) + : ConcreteProperty() +{ + if (not mols.isEmpty()) + { + const auto molnums = mols.molNums(); + this->bnds.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + SelectorBond b(mols.at(molnum)); + + if (not b.isEmpty()) + this->bnds.append(b); + } + } +} + +SelectorMBond::SelectorMBond(const MolGroupsBase &mols) + : ConcreteProperty() +{ + if (not mols.isEmpty()) + { + const auto molnums = mols.molNums(); + this->bnds.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + SelectorBond b(mols.at(molnum)); + + if (not b.isEmpty()) + this->bnds.append(b); + } + } +} + +SelectorMBond::SelectorMBond(const SelectResult &mols) + : ConcreteProperty() +{ + if (not mols.isEmpty()) + { + this->bnds.reserve(mols.count()); + + for (const auto &mol : mols) + { + SelectorBond b; + + if (mol->isA()) + b = mol->asA(); + else + b = SelectorBond(*mol); + + if (not b.isEmpty()) + this->bnds.append(b); + } + } +} + +SelectorMBond::SelectorMBond(const SelectResult &mols, const PropertyMap &map) + : ConcreteProperty() +{ + if (not mols.isEmpty()) + { + this->bnds.reserve(mols.count()); + + for (const auto &mol : mols) + { + SelectorBond b(*mol, map); + + if (not b.isEmpty()) + this->bnds.append(b); + } + } +} + +SelectorMBond::SelectorMBond(const SelectResult &mols, const BondID &bond) + : ConcreteProperty() +{ + if (not mols.isEmpty()) + { + this->bnds.reserve(mols.count()); + + for (const auto &mol : mols) + { + try + { + auto b = SelectorBond(*mol, bond); + + if (not b.isEmpty()) + this->bnds.append(b); + } + catch(...) + {} + } + } +} + +SelectorMBond::SelectorMBond(const SelectorBond &bonds) + : ConcreteProperty() +{ + if (not bonds.isEmpty()) + bnds.append(bonds); +} + +SelectorMBond::SelectorMBond(const SelectorMol &mols) + : ConcreteProperty() +{ + if (not mols.isEmpty()) + { + this->bnds.reserve(mols.count()); + + for (const auto &mol : mols) + { + SelectorBond b(mol); + + if (not b.isEmpty()) + bnds.append(b); + } + } +} + +void SelectorMBond::_append(const Bond &bond) +{ + if (this->bnds.isEmpty()) + { + this->bnds.append(SelectorBond(bond)); + } + else if (this->bnds.last().data().number() != bond.data().number()) + { + // new molecule + this->bnds.append(SelectorBond(bond)); + } + else + { + // a new view in the current molecule + this->bnds.last() = this->bnds.last().add(bond); + } +} + +SelectorMBond::SelectorMBond(const SelectorMBond &bonds, + const SireBase::Slice &slice) + : SireBase::ConcreteProperty() +{ + for (auto it = slice.begin(bonds.count()); + not it.atEnd(); it.next()) + { + this->_append(bonds[it.value()]); + } +} + +SelectorMBond::SelectorMBond(const SelectorMBond &bonds, + const QList &idxs) + : SireBase::ConcreteProperty() +{ + for (const auto &idx : idxs) + { + this->_append(bonds[idx]); + } +} + +SelectorMBond::SelectorMBond(const SelectorMBond &other) + : ConcreteProperty(), bnds(other.bnds) +{} + +SelectorMBond::~SelectorMBond() +{} + +const char* SelectorMBond::typeName() +{ + return QMetaType::typeName(qMetaTypeId()); +} + +SelectorMBond& SelectorMBond::operator=(const SelectorMBond &other) +{ + if (this != &other) + { + bnds = other.bnds; + Property::operator=(other); + } + + return *this; +} + +bool SelectorMBond::operator==(const SelectorMBond &other) const +{ + return bnds == other.bnds; +} + +bool SelectorMBond::operator!=(const SelectorMBond &other) const +{ + return not operator==(other); +} + +Bond SelectorMBond::operator[](int i) const +{ + i = SireID::Index(i).map(this->count()); + + for (const auto &b : bnds) + { + if (i < b.count()) + { + return b(i); + } + else + { + i -= b.count(); + } + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Bond(); +} + +SelectorMBond SelectorMBond::operator[](const SireBase::Slice &slice) const +{ + return SelectorMBond(*this, slice); +} + +SelectorMBond SelectorMBond::operator[](const QList &idxs) const +{ + return SelectorMBond(*this, idxs); +} + +SelectorMBond SelectorMBond::operator[](const BondID &id) const +{ + SelectorMBond ret; + + for (const auto &b : bnds) + { + try + { + auto r = b(id); + + if (not r.isEmpty()) + { + ret.bnds.append(r); + } + } + catch(...) + {} + } + + return ret; +} + +Bond SelectorMBond::operator()(int i) const +{ + return this->operator[](i); +} + +SelectorMBond SelectorMBond::operator()(const SireBase::Slice &slice) const +{ + return this->operator[](slice); +} + +SelectorMBond SelectorMBond::operator()(const QList &idxs) const +{ + return this->operator[](idxs); +} + +SelectorMBond SelectorMBond::operator()(const BondID &id) const +{ + return this->operator[](id); +} + +QList SelectorMBond::toList() const +{ + QList l; + l.reserve(bnds.count()); + + for (const auto &bnd : bnds) + { + l.append(MolViewPtr(bnd.clone())); + } + + return l; +} + +int SelectorMBond::count() const +{ + int n = 0; + + for (const auto &b : bnds) + { + n += b.count(); + } + + return n; +} + +int SelectorMBond::size() const +{ + return this->count(); +} + +EvaluatorM SelectorMBond::evaluate() const +{ + return EvaluatorM(this->atoms()); +} + +MoleculeGroup SelectorMBond::toMoleculeGroup() const +{ + MoleculeGroup grp; + + for (const auto &b : this->bnds) + { + grp.add(b); + } + + return grp; + +} + +SelectResult SelectorMBond::toSelectResult() const +{ + QList r; + + for (const auto &b : bnds) + { + r.append(b); + } + + return SelectResult(r); +} + +Molecule SelectorMBond::molecule(int i) const +{ + return this->molecules().molecule(i); +} + +Molecule SelectorMBond::molecule(const QString &name) const +{ + return this->molecules().molecule(name); +} + +Molecule SelectorMBond::molecule(const MolID &molid) +{ + return this->molecules().molecule(molid); +} + +SelectorMol SelectorMBond::molecules() const +{ + QList mols; + + for (const auto &b : this->bnds) + { + mols.append(b.molecule()); + } + + return SelectorMol(mols); +} + +SelectorMol SelectorMBond::molecules(int i) const +{ + return this->molecules().molecules(i); +} + +SelectorMol SelectorMBond::molecules(const SireBase::Slice &slice) const +{ + return this->molecules().molecules(slice); +} + +SelectorMol SelectorMBond::molecules(const QList &idxs) const +{ + return this->molecules().molecules(idxs); +} + +SelectorMol SelectorMBond::molecules(const QString &name) const +{ + return this->molecules().molecules(name); +} + +SelectorMol SelectorMBond::molecules(const MolID &molid) const +{ + return this->molecules().molecules(molid); +} + +Atom SelectorMBond::atom(int i) const +{ + return this->atoms()(i); +} + +Atom SelectorMBond::atom(const QString &name) const +{ + return this->atoms()(name); +} + +Atom SelectorMBond::atom(const AtomID &atomid) const +{ + return this->atoms()(atomid); +} + +Residue SelectorMBond::residue(int i) const +{ + return this->residues()(i); +} + +Residue SelectorMBond::residue(const QString &name) const +{ + return this->residues()(name); +} + +Residue SelectorMBond::residue(const ResID &resid) const +{ + return this->residues()(resid); +} + +Chain SelectorMBond::chain(int i) const +{ + return this->chains()(i); +} + +Chain SelectorMBond::chain(const QString &name) const +{ + return this->chains()(name); +} + +Chain SelectorMBond::chain(const ChainID &chainid) const +{ + return this->chains()(chainid); +} + +Segment SelectorMBond::segment(int i) const +{ + return this->segments()(i); +} + +Segment SelectorMBond::segment(const QString &name) const +{ + return this->segments()(name); +} + +Segment SelectorMBond::segment(const SegID &segid) const +{ + return this->segments()(segid); +} + +CutGroup SelectorMBond::cutGroup(int i) const +{ + return this->cutGroups()(i); +} + +CutGroup SelectorMBond::cutGroup(const QString &name) const +{ + return this->cutGroups()(name); +} + +CutGroup SelectorMBond::cutGroup(const CGID &cgid) const +{ + return this->cutGroups()(cgid); +} + +SelectorM SelectorMBond::atoms() const +{ + QList< Selector > ret; + + for (const auto &b : this->bnds) + { + ret.append(b.atoms()); + } + + return SelectorM(ret); +} + +SelectorM SelectorMBond::atoms(int i) const +{ + return this->atoms().atoms(i); +} + +SelectorM SelectorMBond::atoms(const SireBase::Slice &slice) const +{ + return this->atoms().atoms(slice); +} + +SelectorM SelectorMBond::atoms(const QList &idxs) const +{ + return this->atoms().atoms(idxs); +} + +SelectorM SelectorMBond::atoms(const QString &name) const +{ + return this->atoms().atoms(name); +} + +SelectorM SelectorMBond::atoms(const AtomID &atomid) const +{ + return this->atoms().atoms(atomid); +} + +SelectorM SelectorMBond::residues() const +{ + QList< Selector > ret; + + for (const auto &b : this->bnds) + { + ret.append(b.residues()); + } + + return SelectorM(ret); +} + +SelectorM SelectorMBond::residues(int i) const +{ + return this->residues().residues(i); +} + +SelectorM SelectorMBond::residues(const SireBase::Slice &slice) const +{ + return this->residues().residues(slice); +} + +SelectorM SelectorMBond::residues(const QList &idxs) const +{ + return this->residues().residues(idxs); +} + +SelectorM SelectorMBond::residues(const QString &name) const +{ + return this->residues().residues(name); +} + +SelectorM SelectorMBond::residues(const ResID &resid) const +{ + return this->residues().residues(resid); +} + +SelectorM SelectorMBond::chains() const +{ + QList< Selector > ret; + + for (const auto &b : this->bnds) + { + ret.append(b.chains()); + } + + return SelectorM(ret); +} + +SelectorM SelectorMBond::chains(int i) const +{ + return this->chains().chains(i); +} + +SelectorM SelectorMBond::chains(const SireBase::Slice &slice) const +{ + return this->chains().chains(slice); +} + +SelectorM SelectorMBond::chains(const QList &idxs) const +{ + return this->chains().chains(idxs); +} + +SelectorM SelectorMBond::chains(const QString &name) const +{ + return this->chains().chains(name); +} + +SelectorM SelectorMBond::chains(const ChainID &chainid) const +{ + return this->chains().chains(chainid); +} + +SelectorM SelectorMBond::segments() const +{ + QList< Selector > ret; + + for (const auto &b : this->bnds) + { + ret.append(b.segments()); + } + + return SelectorM(ret); +} + +SelectorM SelectorMBond::segments(int i) const +{ + return this->segments().segments(i); +} + +SelectorM SelectorMBond::segments(const SireBase::Slice &slice) const +{ + return this->segments().segments(slice); +} + +SelectorM SelectorMBond::segments(const QList &idxs) const +{ + return this->segments().segments(idxs); +} + +SelectorM SelectorMBond::segments(const QString &name) const +{ + return this->segments().segments(name); +} + +SelectorM SelectorMBond::segments(const SegID &segid) const +{ + return this->segments().segments(segid); +} + +SelectorM SelectorMBond::cutGroups() const +{ + QList< Selector > ret; + + for (const auto &b : this->bnds) + { + ret.append(b.cutGroups()); + } + + return SelectorM(ret); +} + +SelectorM SelectorMBond::cutGroups(int i) const +{ + return this->cutGroups().cutGroups(i); +} + +SelectorM SelectorMBond::cutGroups(const SireBase::Slice &slice) const +{ + return this->cutGroups().cutGroups(slice); +} + +SelectorM SelectorMBond::cutGroups(const QList &idxs) const +{ + return this->cutGroups().cutGroups(idxs); +} + +SelectorM SelectorMBond::cutGroups(const QString &name) const +{ + return this->cutGroups().cutGroups(name); +} + +SelectorM SelectorMBond::cutGroups(const CGID &cgid) const +{ + return this->cutGroups().cutGroups(cgid); +} + +SelectResult SelectorMBond::search(const QString &search_string) const +{ + return this->toSelectResult().search(search_string); +} + +QList SelectorMBond::IDs() const +{ + QList ret; + + for (const auto &b : this->bnds) + { + ret += b.IDs(); + } + + return ret; +} + +int SelectorMBond::nAtoms() const +{ + int n = 0; + + for (const auto &b : this->bnds) + { + n += b.nAtoms(); + } + + return n; +} + +int SelectorMBond::nResidues() const +{ + int n = 0; + + for (const auto &b : this->bnds) + { + n += b.nResidues(); + } + + return n; +} + +int SelectorMBond::nChains() const +{ + int n = 0; + + for (const auto &b : this->bnds) + { + n += b.nChains(); + } + + return n; +} + +int SelectorMBond::nSegments() const +{ + int n = 0; + + for (const auto &b : this->bnds) + { + n += b.nSegments(); + } + + return n; +} + +int SelectorMBond::nCutGroups() const +{ + int n = 0; + + for (const auto &b : this->bnds) + { + n += b.nCutGroups(); + } + + return n; +} + +int SelectorMBond::nMolecules() const +{ + return this->bnds.count(); +} + +bool SelectorMBond::isEmpty() const +{ + return this->bnds.isEmpty(); +} + +SelectorMBond::const_iterator SelectorMBond::begin() const +{ + return this->bnds.constBegin(); +} + +SelectorMBond::const_iterator SelectorMBond::end() const +{ + return this->bnds.constEnd(); +} + +SelectorMBond::const_iterator SelectorMBond::constBegin() const +{ + return this->bnds.constBegin(); +} + +SelectorMBond::const_iterator SelectorMBond::constEnd() const +{ + return this->bnds.constEnd(); +} + +QString SelectorMBond::toString() const +{ + if (this->isEmpty()) + { + return QObject::tr("SelectorMBond::empty"); + } + else + { + QStringList parts; + + const auto n = this->count(); + + if (n <= 10) + { + for (int i=0; ioperator[](i); + + parts.append(QString("%1: %2 %3") + .arg(i).arg(view.data().number().toString()) + .arg(view.toString())); + } + } + else + { + for (int i=0; i<5; ++i) + { + const auto view = this->operator[](i); + + parts.append(QString("%1: %2 %3") + .arg(i).arg(view.data().number().toString()) + .arg(view.toString())); + } + + parts.append("..."); + + for (int i=n-5; ioperator[](i); + + parts.append(QString("%1: %2 %3") + .arg(i).arg(view.data().number().toString()) + .arg(view.toString())); + } + } + + return QObject::tr("SelectorMBond( size=%2\n%3\n)") + .arg(n) + .arg(parts.join("\n")); + } +} + diff --git a/corelib/src/libs/SireMM/selectormbond.h b/corelib/src/libs/SireMM/selectormbond.h new file mode 100644 index 000000000..73e9edc68 --- /dev/null +++ b/corelib/src/libs/SireMM/selectormbond.h @@ -0,0 +1,271 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREMM_SELECTORMBOND_H +#define SIREMM_SELECTORMBOND_H + +#include "SireMol/selectormol.h" +#include "SireMol/selectorm.hpp" + +#include "selectorbond.h" + + +SIRE_BEGIN_HEADER + +namespace SireMol +{ +class Atom; +class Residue; +class Chain; +class Segment; +class CutGroup; +class Molecule; +class MoleculeGroup; +class Molecules; +class SelectResult; + +class SelectorMol; +class EvaluatorM; + +} + +namespace SireMM +{ +class SelectorMBond; +} + +SIREMM_EXPORT QDataStream& operator<<(QDataStream&, const SireMM::SelectorMBond&); +SIREMM_EXPORT QDataStream& operator>>(QDataStream&, SireMM::SelectorMBond&); + +namespace SireMM +{ + +/** Multi-molecule selector for bonds */ +class SIREMM_EXPORT SelectorMBond + : public SireBase::ConcreteProperty +{ + +friend QDataStream& ::operator<<(QDataStream&, const SelectorMBond&); +friend QDataStream& ::operator>>(QDataStream&, SelectorMBond&); + +public: + typedef QList::const_iterator const_iterator; + typedef QList::const_iterator iterator; + + SelectorMBond(); + SelectorMBond(const Bond &view); + SelectorMBond(const SireMol::Molecules &mols); + SelectorMBond(const SireMol::MoleculeGroup &mols); + SelectorMBond(const SireMol::MolGroupsBase &mols); + SelectorMBond(const SireMol::SelectResult &mols); + SelectorMBond(const SelectorBond &bonds); + + SelectorMBond(const SireMol::SelectorMol &mols); + + template + SelectorMBond(const SireMol::SelectorM &other); + + SelectorMBond(const SelectorMBond &bonds, const SireBase::Slice &slice); + SelectorMBond(const SelectorMBond &bonds, const QList &idxs); + + SelectorMBond(const SireMol::SelectResult &mols, const SireMol::BondID &bond); + + SelectorMBond(const SireMol::SelectResult &mols, + const SireBase::PropertyMap &map); + + SelectorMBond(const SelectorMBond &other); + + virtual ~SelectorMBond(); + + static const char* typeName(); + + virtual SelectorMBond* clone() const + { + return new SelectorMBond(*this); + } + + SelectorMBond& operator=(const SelectorMBond &other); + + bool operator==(const SelectorMBond &other) const; + bool operator!=(const SelectorMBond &other) const; + + Bond operator[](int i) const; + SelectorMBond operator[](const SireBase::Slice &slice) const; + SelectorMBond operator[](const QList &idxs) const; + SelectorMBond operator[](const SireMol::BondID &id) const; + + Bond operator()(int i) const; + SelectorMBond operator()(const SireBase::Slice &slice) const; + SelectorMBond operator()(const QList &idxs) const; + SelectorMBond operator()(const SireMol::BondID &id) const; + + QList toList() const; + + int count() const; + int size() const; + + SireMol::EvaluatorM evaluate() const; + + SireMol::MoleculeGroup toMoleculeGroup() const; + SireMol::SelectResult toSelectResult() const; + + SireMol::Molecule molecule(int i) const; + SireMol::Molecule molecule(const QString &name) const; + SireMol::Molecule molecule(const SireMol::MolID &molid); + + SireMol::SelectorMol molecules() const; + SireMol::SelectorMol molecules(int i) const; + SireMol::SelectorMol molecules(const SireBase::Slice &slice) const; + SireMol::SelectorMol molecules(const QList &idxs) const; + SireMol::SelectorMol molecules(const QString &name) const; + SireMol::SelectorMol molecules(const SireMol::MolID &molid) const; + + SireMol::Atom atom(int i) const; + SireMol::Atom atom(const QString &name) const; + SireMol::Atom atom(const SireMol::AtomID &atomid) const; + + SireMol::Residue residue(int i) const; + SireMol::Residue residue(const QString &name) const; + SireMol::Residue residue(const SireMol::ResID &resid) const; + + SireMol::Chain chain(int i) const; + SireMol::Chain chain(const QString &name) const; + SireMol::Chain chain(const SireMol::ChainID &chainid) const; + + SireMol::Segment segment(int i) const; + SireMol::Segment segment(const QString &name) const; + SireMol::Segment segment(const SireMol::SegID &segid) const; + + SireMol::CutGroup cutGroup(int i) const; + SireMol::CutGroup cutGroup(const QString &name) const; + SireMol::CutGroup cutGroup(const SireMol::CGID &cgid) const; + + SireMol::SelectorM atoms() const; + SireMol::SelectorM atoms(int i) const; + SireMol::SelectorM atoms(const SireBase::Slice &slice) const; + SireMol::SelectorM atoms(const QList &idxs) const; + SireMol::SelectorM atoms(const QString &name) const; + SireMol::SelectorM atoms(const SireMol::AtomID &atomid) const; + + SireMol::SelectorM residues() const; + SireMol::SelectorM residues(int i) const; + SireMol::SelectorM residues(const SireBase::Slice &slice) const; + SireMol::SelectorM residues(const QList &idxs) const; + SireMol::SelectorM residues(const QString &name) const; + SireMol::SelectorM residues(const SireMol::ResID &resid) const; + + SireMol::SelectorM chains() const; + SireMol::SelectorM chains(int i) const; + SireMol::SelectorM chains(const SireBase::Slice &slice) const; + SireMol::SelectorM chains(const QList &idxs) const; + SireMol::SelectorM chains(const QString &name) const; + SireMol::SelectorM chains(const SireMol::ChainID &chainid) const; + + SireMol::SelectorM segments() const; + SireMol::SelectorM segments(int i) const; + SireMol::SelectorM segments(const SireBase::Slice &slice) const; + SireMol::SelectorM segments(const QList &idxs) const; + SireMol::SelectorM segments(const QString &name) const; + SireMol::SelectorM segments(const SireMol::SegID &segid) const; + + SireMol::SelectorM cutGroups() const; + SireMol::SelectorM cutGroups(int i) const; + SireMol::SelectorM cutGroups(const SireBase::Slice &slice) const; + SireMol::SelectorM cutGroups(const QList &idxs) const; + SireMol::SelectorM cutGroups(const QString &name) const; + SireMol::SelectorM cutGroups(const SireMol::CGID &cgid) const; + + SireMol::SelectResult search(const QString &search_string) const; + + QList IDs() const; + + int nAtoms() const; + int nResidues() const; + int nChains() const; + int nSegments() const; + int nCutGroups() const; + int nMolecules() const; + + bool isEmpty() const; + + const_iterator begin() const; + const_iterator end() const; + + const_iterator constBegin() const; + const_iterator constEnd() const; + + virtual QString toString() const; + +protected: + void _append(const Bond &bond); + + /** The actual bonds */ + QList< SelectorBond > bnds; +}; + +} // end of namespace SireMM + +#include "SireMol/selectorm.hpp" +#include "SireMol/atom.h" +#include "SireMol/residue.h" +#include "SireMol/chain.h" +#include "SireMol/segment.h" +#include "SireMol/cutgroup.h" + +#ifndef SIRE_SKIP_INLINE_FUNCTIONS + +namespace SireMM +{ + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMBond::SelectorMBond(const SireMol::SelectorM &other) + : SireBase::ConcreteProperty() +{ + if (not other.isEmpty()) + { + this->bnds.reserve(other.nMolecules()); + + for (int i=0; ibnds.append(SelectorBond(other.molecule(i))); + } + } +} + +} // end of namespace SireMol + +#endif // SIRE_SKIP_INLINE_FUNCTIONS + +Q_DECLARE_METATYPE(SireMM::SelectorMBond) + +SIRE_EXPOSE_CLASS(SireMM::SelectorMBond) + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireMaths/CMakeLists.txt b/corelib/src/libs/SireMaths/CMakeLists.txt index dde69f14b..20ebb5f73 100644 --- a/corelib/src/libs/SireMaths/CMakeLists.txt +++ b/corelib/src/libs/SireMaths/CMakeLists.txt @@ -7,166 +7,13 @@ # Export symbols when building the library add_definitions( "-DSIREMATHS_BUILD" ) -if (SIRE_DISABLE_FORTRAN) - add_definitions( "-DSIRE_DISABLE_FORTRAN" ) - message( STATUS "Disabling SireMaths BLAS/LAPACK/LINPACK interfaces.") - message( STATUS "Have to do this as Fortran code has been disabled.") - -else() - # We first create a library (SireBLASPACK) that provides an interface - # to BLAS, LAPACK and LINPACK. This library either links - # to those libraries, or it provides the necessary functions - # from those libraries if they are not available. - - set( SIRE_BLAS_FUNCTIONS - DGEMM - DGEMV - ) - - set( SIRE_LAPACK_FUNCTIONS - DSYEV - ) - - set( SIRE_LINPACK_FUNCTIONS - DGECO - DGEDI - ) - - if ( SIRE_USE_BLAS ) - list(APPEND SIREBLASPACK_LIBRARIES ${BLAS_LIBRARIES}) - set( SIREBLASPACK_HAS_LIBRARIES TRUE ) - else() - set( SIRE_BLAS_SOURCES - ThirdParty/BLAS/idamax.f - ThirdParty/BLAS/dasum.f - ThirdParty/BLAS/daxpy.f - ThirdParty/BLAS/dcopy.f - ThirdParty/BLAS/ddot.f - ThirdParty/BLAS/dgemm.f - ThirdParty/BLAS/dgemv.f - ThirdParty/BLAS/dger.f - ThirdParty/BLAS/dnrm2.f - ThirdParty/BLAS/dscal.f - ThirdParty/BLAS/dswap.f - ThirdParty/BLAS/dsymv.f - ThirdParty/BLAS/dsyr2.f - ThirdParty/BLAS/dsyr2k.f - ThirdParty/BLAS/dtrmm.f - ThirdParty/BLAS/dtrmv.f - ThirdParty/BLAS/lsame.f - ThirdParty/BLAS/xerbla.f - ) - endif() - - if ( SIRE_USE_LINPACK ) - list(APPEND SIREBLASPACK_LIBRARIES ${LINPACK_LIBRARIES}) - set( SIREBLASPACK_HAS_LIBRARIES TRUE ) - else() - set( SIRE_LINPACK_SOURCES - ThirdParty/LINPACK/dgeco.f - ThirdParty/LINPACK/dgedi.f - ThirdParty/LINPACK/dgefa.f - ) - endif() - - if ( SIRE_USE_LAPACK ) - list(APPEND SIREBLASPACK_LIBRARIES ${LAPACK_LIBRARIES}) - set( SIREBLASPACK_HAS_LIBRARIES TRUE ) - else() - set( SIRE_LAPACK_SOURCES - ThirdParty/LAPACK/disnan.f - ThirdParty/LAPACK/dlae2.f - ThirdParty/LAPACK/dlaev2.f - ThirdParty/LAPACK/dlaisnan.f - ThirdParty/LAPACK/dlamch.f - ThirdParty/LAPACK/dlanst.f - ThirdParty/LAPACK/dlansy.f - ThirdParty/LAPACK/dlapy2.f - ThirdParty/LAPACK/dlascl.f - ThirdParty/LAPACK/dlarf.f - ThirdParty/LAPACK/dlarfb.f - ThirdParty/LAPACK/dlartg.f - ThirdParty/LAPACK/dlarfg.f - ThirdParty/LAPACK/dlarft.f - ThirdParty/LAPACK/dlaset.f - ThirdParty/LAPACK/dlasr.f - ThirdParty/LAPACK/dlasrt.f - ThirdParty/LAPACK/dlassq.f - ThirdParty/LAPACK/dlatrd.f - ThirdParty/LAPACK/dorg2l.f - ThirdParty/LAPACK/dorg2r.f - ThirdParty/LAPACK/dorgql.f - ThirdParty/LAPACK/dorgqr.f - ThirdParty/LAPACK/dorgtr.f - ThirdParty/LAPACK/dsyev.f - ThirdParty/LAPACK/dsytd2.f - ThirdParty/LAPACK/dsytrd.f - ThirdParty/LAPACK/dsteqr.f - ThirdParty/LAPACK/dsterf.f - ThirdParty/LAPACK/ilaenv.f - ThirdParty/LAPACK/iladlc.f - ThirdParty/LAPACK/iladlr.f - ThirdParty/LAPACK/ieeeck.f - ThirdParty/LAPACK/iparmq.f - ) - endif() - - if (NOT CMAKE_GENERATOR STREQUAL "Xcode" ) - # We need to sort out the naming convention for the - # fortran blas, lapack and linpack libraries - if ( USING_CMAKE_2_6 ) - message( STATUS "Detecting C++/Fortran interface using cmake-2.6 code..." ) - include( FortranCInterface ) - create_fortran_c_interface( Sire SIRE_BLAS_FUNCTIONS sire_blas_f.h ) - create_fortran_c_interface( Sire SIRE_LAPACK_FUNCTIONS sire_lapack_f.h ) - create_fortran_c_interface( Sire SIRE_LINPACK_FUNCTIONS sire_linpack_f.h ) - else() - message( STATUS "Detecting C++/Fortran interface using cmake-2.8 code..." ) - include( FortranCInterface ) - - FortranCInterface_VERIFY( CXX QUIET ) - - if (FortranCInterface_VERIFIED_CXX AND FortranCInterface_GLOBAL_FOUND) - FortranCInterface_HEADER( sire_blas_f.h - MACRO_NAMESPACE "Sire" - SYMBOL_NAMESPACE "Sire" - SYMBOLS ${SIRE_BLAS_FUNCTIONS} ) - - FortranCInterface_HEADER( sire_lapack_f.h - MACRO_NAMESPACE "Sire" - SYMBOL_NAMESPACE "Sire" - SYMBOLS ${SIRE_LAPACK_FUNCTIONS} ) - - FortranCInterface_HEADER( sire_linpack_f.h - MACRO_NAMESPACE "Sire" - SYMBOL_NAMESPACE "Sire" - SYMBOLS ${SIRE_LINPACK_FUNCTIONS} ) - - include_directories( BEFORE ${CMAKE_BINARY_DIR}/src/libs/SireMaths ) - else() - message( STATUS "Fortran/C++ compilers are incompatible. Disabling Fortran code!" ) - set( SIRE_DISABLE_FORTRAN ON ) - add_definitions( "-DSIRE_DISABLE_FORTRAN" ) - endif() - endif() - endif() -endif() +add_definitions( "-DSIRE_DISABLE_FORTRAN" ) +message( STATUS "Disabling SireMaths BLAS/LAPACK/LINPACK interfaces.") +message( STATUS "Have to do this as Fortran code has been disabled.") # Other Sire libraries include_directories(${CMAKE_SOURCE_DIR}/src/libs) -if ( NOT SIRE_DISABLE_FORTRAN ) - # Define the sources in SireBLASPACK - set( SIREBLASPACK_SOURCES - - ${SIRE_BLAS_SOURCES} - ${SIRE_LAPACK_SOURCES} - ${SIRE_LINPACK_SOURCES} - - sire_blaspack.f - ) -endif() - # Define the headers in SireMaths set ( SIREMATHS_HEADERS accumulator.h @@ -262,21 +109,6 @@ set ( SIREMATHS_SOURCES ${SIREMATHS_HEADERS} ) -if (NOT SIRE_DISABLE_FORTRAN) - add_library (SireBLASPACK ${SIREBLASPACK_SOURCES}) - - set_target_properties (SireBLASPACK PROPERTIES - VERSION ${SIRE_VERSION} - SOVERSION ${S_VERSION_MAJOR} - ) - - if ( SIREBLASPACK_HAS_LIBRARIES ) - target_link_libraries (SireBLASPACK - ${SIREBLASPACK_LIBRARIES} - ) - endif() -endif() - add_library (SireMaths ${SIREMATHS_SOURCES}) set_target_properties (SireMaths PROPERTIES @@ -293,10 +125,6 @@ target_link_libraries (SireMaths ${SIREMATHS_EXTRA_LIBRARIES} ) -if (NOT SIRE_DISABLE_FORTRAN) - target_link_libraries (SireMaths SireBLASPACK ) -endif() - save_sire_variable( "SIREMATHS_EXTRA_LIBRARIES" "${SIREMATHS_EXTRA_LIBRARIES}" ) # installation @@ -306,13 +134,5 @@ install( TARGETS SireMaths EXPORT SireLibraries ARCHIVE DESTINATION ${SIRE_ARCHIVES} ) -if (NOT SIRE_DISABLE_FORTRAN) - install( TARGETS SireBLASPACK EXPORT SireLibraries - RUNTIME DESTINATION ${SIRE_BIN} - LIBRARY DESTINATION ${SIRE_LIBS} - ARCHIVE DESTINATION ${SIRE_ARCHIVES} - ) -endif() - install( FILES ${SIREMATHS_HEADERS} DESTINATION ${SIRE_INCLUDES}/SireMaths ) diff --git a/corelib/src/libs/SireMaths/accumulator.cpp b/corelib/src/libs/SireMaths/accumulator.cpp index 1b04fcbbd..cc56ed2bc 100644 --- a/corelib/src/libs/SireMaths/accumulator.cpp +++ b/corelib/src/libs/SireMaths/accumulator.cpp @@ -52,14 +52,14 @@ using namespace SireStream; static const RegisterMetaType r_accum( MAGIC_ONLY, Accumulator::typeName() ); - + /** Serialise to a binary datastream */ QDataStream &operator<<(QDataStream &ds, const Accumulator &accum) { writeHeader(ds, r_accum, 1); - + ds << accum.nvalues << static_cast(accum); - + return ds; } @@ -67,14 +67,14 @@ QDataStream &operator<<(QDataStream &ds, const Accumulator &accum) QDataStream &operator>>(QDataStream &ds, Accumulator &accum) { VersionID v = readHeader(ds, r_accum); - + if (v == 1) { ds >> accum.nvalues >> static_cast(accum); } else throw version_error(v, "1", r_accum, CODELOC); - + return ds; } @@ -163,9 +163,9 @@ static const RegisterMetaType r_null; QDataStream &operator<<(QDataStream &ds, const NullAccumulator &null) { writeHeader(ds, r_null, 1); - + ds << static_cast(null); - + return ds; } @@ -173,19 +173,19 @@ QDataStream &operator<<(QDataStream &ds, const NullAccumulator &null) QDataStream &operator>>(QDataStream &ds, NullAccumulator &null) { VersionID v = readHeader(ds, r_null); - + if (v == 1) { ds >> static_cast(null); } else throw version_error(v, "1", r_null, CODELOC); - + return ds; } /** Construct an empty average */ -NullAccumulator::NullAccumulator() +NullAccumulator::NullAccumulator() : ConcreteProperty() {} @@ -241,9 +241,9 @@ static const RegisterMetaType r_avg; QDataStream &operator<<(QDataStream &ds, const Average &avg) { writeHeader(ds, r_avg, 1); - + ds << avg.avgval << static_cast(avg); - + return ds; } @@ -251,14 +251,14 @@ QDataStream &operator<<(QDataStream &ds, const Average &avg) QDataStream &operator>>(QDataStream &ds, Average &avg) { VersionID v = readHeader(ds, r_avg); - + if (v == 1) { ds >> avg.avgval >> static_cast(avg); } else throw version_error(v, "1", r_avg, CODELOC); - + return ds; } @@ -283,7 +283,7 @@ Average& Average::operator=(const Average &other) avgval = other.avgval; Accumulator::operator=(other); } - + return *this; } @@ -305,19 +305,19 @@ Average& Average::operator+=(const Average &other) { if (nSamples() == 0) this->operator=(other); - + else if (other.nSamples() > 0) { double nsteps = nSamples() + other.nSamples(); - + double my_ratio = nSamples() / nsteps; double other_ratio = other.nSamples() / nsteps; - + avgval = avgval * my_ratio + other.avgval * other_ratio; - + Accumulator::add(other.nSamples()); } - + return *this; } @@ -338,20 +338,20 @@ void Average::clear() QString Average::toString() const { - return QObject::tr("Average( %s )").arg(this->average()); + return QObject::tr("Average( %1 )").arg(this->average()); } /** Accumulate the passed value onto the average */ void Average::accumulate(double value) { double nsteps = this->nSamples() + 1; - + //calculate the average as // average = ((n-1)/n) * average + (1/n) * value - + double big_ratio = (nsteps - 1) / nsteps; double small_ratio = 1.0 / nsteps; - + avgval = (big_ratio * avgval) + (small_ratio * value); Accumulator::accumulate(value); } @@ -380,13 +380,13 @@ const char* Average::typeName() static const RegisterMetaType r_avgstddev; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const AverageAndStddev &avgstddev) { writeHeader(ds, r_avgstddev, 1); - + ds << avgstddev.avgval2 << static_cast(avgstddev); - + return ds; } @@ -395,14 +395,14 @@ QDataStream &operator>>(QDataStream &ds, AverageAndStddev &avgstddev) { VersionID v = readHeader(ds, r_avgstddev); - + if (v == 1) { ds >> avgstddev.avgval2 >> static_cast(avgstddev); } else throw version_error( v, "1", r_avgstddev, CODELOC ); - + return ds; } @@ -430,7 +430,7 @@ AverageAndStddev& AverageAndStddev::operator=(const AverageAndStddev &other) avgval2 = other.avgval2; Average::operator=(other); } - + return *this; } @@ -456,15 +456,15 @@ AverageAndStddev& AverageAndStddev::operator+=(const AverageAndStddev &other) else if (other.nSamples() > 0) { Average::operator+=(other); - + double nsteps = nSamples() + other.nSamples(); - + double my_ratio = nSamples() / nsteps; double other_ratio = other.nSamples() / nsteps; - + avgval2 = avgval2 * my_ratio + other.avgval2 * other_ratio; } - + return *this; } @@ -493,13 +493,13 @@ QString AverageAndStddev::toString() const void AverageAndStddev::accumulate(double value) { double nsteps = this->nSamples() + 1; - + //calculate the average of the squares as // average2 = ((n-1)/n) * average2 + (1/n) * value * value - + double big_ratio = (nsteps - 1) / nsteps; double small_ratio = 1.0 / nsteps; - + avgval2 = (big_ratio * avgval2) + (small_ratio * value * value); Average::accumulate(value); @@ -530,7 +530,7 @@ double AverageAndStddev::standardError() const return standardDeviation() / sqrt(nSamples()); } -/** Return the standard error calculated to the passed level +/** Return the standard error calculated to the passed level (66, 90, 95 or 99%) */ double AverageAndStddev::standardError(int level) const { @@ -558,10 +558,10 @@ static const RegisterMetaType r_expavg; QDataStream &operator<<(QDataStream &ds, const ExpAverage &expavg) { writeHeader(ds, r_expavg, 2); - + ds << expavg.avgval << expavg.avgval2 << expavg.sclfac << static_cast(expavg); - + return ds; } @@ -569,7 +569,7 @@ QDataStream &operator<<(QDataStream &ds, const ExpAverage &expavg) QDataStream &operator>>(QDataStream &ds, ExpAverage &expavg) { VersionID v = readHeader(ds, r_expavg); - + if (v == 2) { ds >> expavg.avgval >> expavg.avgval2 >> expavg.sclfac @@ -579,12 +579,12 @@ QDataStream &operator>>(QDataStream &ds, ExpAverage &expavg) { ds >> expavg.avgval >> expavg.sclfac >> static_cast(expavg); - + expavg.avgval2 = expavg.avgval * expavg.avgval;; } else throw version_error(v, "1,2", r_expavg, CODELOC); - + return ds; } @@ -592,14 +592,14 @@ QDataStream &operator>>(QDataStream &ds, ExpAverage &expavg) \throw SireError::invalid_arg */ -ExpAverage::ExpAverage(double scale_factor) - : ConcreteProperty(), +ExpAverage::ExpAverage(double scale_factor) + : ConcreteProperty(), avgval(0), sclfac(scale_factor) {} /** Copy constructor */ ExpAverage::ExpAverage(const ExpAverage &other) - : ConcreteProperty(other), + : ConcreteProperty(other), avgval(other.avgval), sclfac(other.sclfac) {} @@ -616,7 +616,7 @@ ExpAverage& ExpAverage::operator=(const ExpAverage &other) sclfac = other.sclfac; Accumulator::operator=(other); } - + return *this; } @@ -642,22 +642,22 @@ ExpAverage& ExpAverage::operator+=(const ExpAverage &other) "Cannot add together these two ExpAverage objects as their scale " "factors are different. %1 vs. %2.") .arg(sclfac).arg(other.sclfac), CODELOC ); - + if (nSamples() == 0) this->operator=(other); - + else if (other.nSamples() > 0) { double nsteps = nSamples() + other.nSamples(); - + double my_ratio = nSamples() / nsteps; double other_ratio = other.nSamples() / nsteps; - + avgval = avgval * my_ratio + other.avgval * other_ratio; Accumulator::add(other.nSamples()); } - + return *this; } @@ -678,7 +678,7 @@ void ExpAverage::clear() QString ExpAverage::toString() const { - return QObject::tr("ExpAverage( %s )").arg(this->average()); + return QObject::tr("ExpAverage( %1 )").arg(this->average()); } /** Accumulate the passed value onto the average */ @@ -687,16 +687,16 @@ void ExpAverage::accumulate(double value) double expvalue = std::exp( sclfac * value ); double nsteps = this->nSamples() + 1; - + //calculate the average as // average = ((n-1)/n) * average + (1/n) * expvalue - + double big_ratio = (nsteps - 1) / nsteps; double small_ratio = 1.0 / nsteps; - + avgval = (big_ratio * avgval) + (small_ratio * expvalue); avgval2 = (big_ratio * avgval) + (small_ratio * expvalue*expvalue); - + Accumulator::accumulate(value); } @@ -739,10 +739,10 @@ static const RegisterMetaType r_median; QDataStream &operator<<(QDataStream &ds, const Median &median) { writeHeader(ds, r_median, 1); - + ds << median.minval << median.maxval << static_cast(median); - + return ds; } @@ -750,7 +750,7 @@ QDataStream &operator<<(QDataStream &ds, const Median &median) QDataStream &operator>>(QDataStream &ds, Median &median) { VersionID v = readHeader(ds, r_median); - + if (v == 1) { ds >> median.minval >> median.maxval @@ -758,20 +758,20 @@ QDataStream &operator>>(QDataStream &ds, Median &median) } else throw version_error(v, "1", r_median, CODELOC); - + return ds; } /** Construct an empty average */ -Median::Median() - : ConcreteProperty(), +Median::Median() + : ConcreteProperty(), minval( std::numeric_limits::max() ), maxval( -std::numeric_limits::max() ) {} /** Copy constructor */ Median::Median(const Median &other) - : ConcreteProperty(other), + : ConcreteProperty(other), minval(other.minval), maxval(other.maxval) {} @@ -788,7 +788,7 @@ Median& Median::operator=(const Median &other) maxval = other.maxval; Accumulator::operator=(other); } - + return *this; } @@ -824,7 +824,7 @@ void Median::accumulate(double value) { if (value < minval) minval = value; - + if (value > maxval) maxval = value; @@ -883,12 +883,12 @@ static const RegisterMetaType r_recval; QDataStream &operator<<(QDataStream &ds, const RecordValues &recval) { writeHeader(ds, r_recval, 2); - + SharedDataStream sds(ds); - + sds << recval.vals << static_cast(recval); - + return ds; } @@ -896,37 +896,37 @@ QDataStream &operator<<(QDataStream &ds, const RecordValues &recval) QDataStream &operator>>(QDataStream &ds, RecordValues &recval) { VersionID v = readHeader(ds, r_recval); - + if (v == 2) { SharedDataStream sds(ds); - + sds >> recval.vals >> static_cast(recval); } else if (v == 1) { QVector vals; - + ds >> vals >> static_cast(recval); - + recval.vals = ChunkedVector::fromVector(vals); } else throw version_error(v, "1", r_recval, CODELOC); - + return ds; } /** Construct an empty average */ -RecordValues::RecordValues() +RecordValues::RecordValues() : ConcreteProperty() {} /** Copy constructor */ RecordValues::RecordValues(const RecordValues &other) - : ConcreteProperty(other), + : ConcreteProperty(other), vals(other.vals) {} @@ -942,7 +942,7 @@ RecordValues& RecordValues::operator=(const RecordValues &other) vals = other.vals; Accumulator::operator=(other); } - + return *this; } @@ -1005,15 +1005,15 @@ double RecordValues::max() const if (nvals == 0) return 0; - + double maxval = -(std::numeric_limits::max()); - + for (int i=0; i maxval) maxval = vals[i]; } - + return maxval; } @@ -1030,15 +1030,15 @@ double RecordValues::min() const if (nvals == 0) return 0; - + double minval = std::numeric_limits::max(); - + for (int i=0; icount() == 0) return 0; - + else return this->sum() / this->count(); } @@ -1100,7 +1100,7 @@ double RecordValues::meanOfSquares() const { if (this->count() == 0) return 0; - + else return this->sum2() / this->count(); } diff --git a/corelib/src/libs/SireMol/CMakeLists.txt b/corelib/src/libs/SireMol/CMakeLists.txt index b40501cd0..84ede366f 100644 --- a/corelib/src/libs/SireMol/CMakeLists.txt +++ b/corelib/src/libs/SireMol/CMakeLists.txt @@ -71,6 +71,7 @@ set ( SIREMOL_HEADERS chainresid.h chargeperturbation.h connectivity.h + core.h cutgroup.h cuttingfunction.h dihedralid.h @@ -80,6 +81,7 @@ set ( SIREMOL_HEADERS elementdb.h errors.h evaluator.h + evaluatorm.h improperid.h geometryperturbation.h groupatomids.h @@ -114,12 +116,7 @@ set ( SIREMOL_HEADERS mover.h mover.hpp mover_metaid.h - parser.h - parser/ast.h - parser/idengine.h - parser/grammar.h - partialmolecule.h perturbation.h radical.h @@ -142,6 +139,8 @@ set ( SIREMOL_HEADERS segproperty.hpp select.h selector.hpp + selectorm.hpp + selectormol.h specifymol.h stereoscopy.h structureeditor.h @@ -198,6 +197,7 @@ set ( SIREMOL_SOURCES elementdb.cpp errors.cpp evaluator.cpp + evaluatorm.cpp improperid.cpp findmcs.cpp geometryperturbation.cpp @@ -224,11 +224,7 @@ set ( SIREMOL_SOURCES molwithresid.cpp molviewproperty.cpp mover.cpp - parser.cpp - parser/ast.cpp - parser/idengine.cpp - partialmolecule.cpp perturbation.cpp radical.cpp @@ -244,6 +240,7 @@ set ( SIREMOL_SOURCES segment.cpp segproperty.cpp select.cpp + selectormol.cpp specifymol.cpp stereoscopy.cpp structureeditor.cpp diff --git a/corelib/src/libs/SireMol/atom.cpp b/corelib/src/libs/SireMol/atom.cpp index 68ec8f630..bf215030e 100644 --- a/corelib/src/libs/SireMol/atom.cpp +++ b/corelib/src/libs/SireMol/atom.cpp @@ -158,8 +158,31 @@ bool Atom::operator!=(const Atom &other) const /** Return a string representation of this atom */ QString Atom::toString() const { - return QObject::tr( "Atom( %1 : %2 )" ).arg(this->name()) + if (this->hasProperty("coordinates")) + { + try + { + QString name = QString("%1:%2").arg(this->name()) .arg(this->number()); + + Vector c = this->property("coordinates"); + return QObject::tr("Atom( %1 [%2, %3, %4] )") + .arg(name, -7) + .arg(c.x(), 7, 'f', 2) + .arg(c.y(), 7, 'f', 2) + .arg(c.z(), 7, 'f', 2); + } + catch(SireError::exception&) + {} + } + + return QObject::tr( "Atom( %1:%2 )" ).arg(this->name()) + .arg(this->number()); +} + +MolViewPtr Atom::toSelector() const +{ + return MolViewPtr( Selector(*this) ); } /** Is this atom empty? */ diff --git a/corelib/src/libs/SireMol/atom.h b/corelib/src/libs/SireMol/atom.h index fd087655a..b8baa6edf 100644 --- a/corelib/src/libs/SireMol/atom.h +++ b/corelib/src/libs/SireMol/atom.h @@ -115,6 +115,8 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Atom&); void update(const MoleculeData &other); + MolViewPtr toSelector() const; + AtomName name() const; AtomNum number() const; AtomIdx index() const; @@ -274,6 +276,12 @@ namespace detail void assertSameSize(Atom*, int nats, int nprops); +template<> +SIRE_ALWAYS_INLINE int getCount(const MolInfo &molinfo) +{ + return molinfo.nAtoms(); +} + template<> SIRE_ALWAYS_INLINE QList getAll(const MolInfo &molinfo) { diff --git a/corelib/src/libs/SireMol/atomid.cpp b/corelib/src/libs/SireMol/atomid.cpp index ad59d0178..051034f17 100644 --- a/corelib/src/libs/SireMol/atomid.cpp +++ b/corelib/src/libs/SireMol/atomid.cpp @@ -374,6 +374,12 @@ InvertMatch AtomID::operator!() const return InvertMatch(*this); } +/** Return an AtomID constructed from the passed string */ +AtomIdentifier AtomID::fromString(const QString &id) +{ + return AtomName(id); +} + /** Return the invert (not) of this match */ InvertMatch AtomID::invert() const { @@ -455,8 +461,8 @@ Atom AtomID::selectFrom(const MoleculeView &molview, const PropertyMap &map) con if (atomidxs.count() > 1) throw SireMol::duplicate_atom( QObject::tr( - "More than one atom matches the ID %1 (atoms %2).") - .arg(this->toString()).arg(Sire::toString(atomidxs)), + "More than one atom matches the ID %1 (number of matches is %2).") + .arg(this->toString()).arg(atomidxs.count()), CODELOC ); return Atom(molview.data(), atomidxs.at(0)); diff --git a/corelib/src/libs/SireMol/atomid.h b/corelib/src/libs/SireMol/atomid.h index 728c729af..29d811f12 100644 --- a/corelib/src/libs/SireMol/atomid.h +++ b/corelib/src/libs/SireMol/atomid.h @@ -83,7 +83,7 @@ class CGsWithAtoms; class ChainsWithAtoms; class SegsWithAtoms; -/** This is the base class of all identifiers that are used +/** This is the base class of all identifiers that are used to identify an atom @author Christopher Woods @@ -97,9 +97,9 @@ class SIREMOL_EXPORT AtomID : public SireID::ID AtomID(); AtomID(const AtomID &other); - + virtual ~AtomID(); - + Specify operator[](qint64 i) const; Specify operator[](const SireBase::Range &range) const; Specify operator()(const SireBase::Range &range) const; @@ -131,10 +131,10 @@ class SIREMOL_EXPORT AtomID : public SireID::ID IDOrSet operator*(const ChainID &other) const; IDOrSet operator*(const SegID &other) const; IDOrSet operator*(const MolID &other) const; - + IDAndSet operator&&(const AtomID &other) const; IDAndSet operator&(const AtomID &other) const; - + GroupAtomID operator&&(const CGID &other) const; GroupAtomID operator&&(const ResID &other) const; GroupAtomID operator&&(const ChainID &other) const; @@ -176,36 +176,36 @@ class SIREMOL_EXPORT AtomID : public SireID::ID virtual AtomID* clone() const=0; - /** Map this ID back to the indicies of the matching atoms in the molecule, + /** Map this ID back to the indicies of the matching atoms in the molecule, using the passed MoleculeInfo to do the mapping */ virtual QList map(const MolInfo &molinfo) const=0; virtual QList map(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Atom selectFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Selector selectAllFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Atom selectFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; virtual Atom selectFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual Atom selectFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; - virtual QHash< MolNum,Selector > + virtual QHash< MolNum,Selector > selectAllFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; @@ -214,9 +214,11 @@ class SIREMOL_EXPORT AtomID : public SireID::ID static SireID::MatchAll any(); + static AtomIdentifier fromString(const QString &id); + protected: static QList matchAll(const MolInfo &molinfo); - + void processMatches(QList &matches, const MolInfo &molinfo) const; }; diff --git a/corelib/src/libs/SireMol/atommatcher.cpp b/corelib/src/libs/SireMol/atommatcher.cpp index febf148ce..a8ee18636 100644 --- a/corelib/src/libs/SireMol/atommatcher.cpp +++ b/corelib/src/libs/SireMol/atommatcher.cpp @@ -35,6 +35,7 @@ #include "evaluator.h" #include "moleculeinfodata.h" #include "moleculeview.h" +#include "mover.hpp" #include "tostring.h" @@ -59,7 +60,7 @@ const AtomMultiMatcher& AtomMatcher::null() { if (not null_matcher) null_matcher = new AtomMultiMatcher(); - + return *null_matcher; } @@ -70,9 +71,9 @@ static const RegisterMetaType r_atommatcher( MAGIC_ONLY, QDataStream &operator<<(QDataStream &ds, const AtomMatcher &matcher) { writeHeader(ds, r_atommatcher, 1); - + ds << static_cast(matcher); - + return ds; } @@ -80,14 +81,14 @@ QDataStream &operator<<(QDataStream &ds, const AtomMatcher &matcher) QDataStream &operator>>(QDataStream &ds, AtomMatcher &matcher) { VersionID v = readHeader(ds, r_atommatcher); - + if (v == 1) { ds >> static_cast(matcher); } else throw version_error(v, "1", r_atommatcher, CODELOC); - + return ds; } @@ -114,7 +115,7 @@ AtomMultiMatcher AtomMatcher::operator+(const AtomMatcher &other) const { return AtomMultiMatcher(*this, other); } - + /** Return the matcher that matches using this matcher, and then 'other' (in that order) */ AtomMultiMatcher AtomMatcher::add(const AtomMatcher &other) const { @@ -127,12 +128,12 @@ bool AtomMatcher::pvt_changesOrder(const MoleculeInfoData &mol0, { if (mol0.nAtoms() != mol1.nAtoms()) return true; - + QHash map = this->match(mol0, mol1); - + if (map.count() != mol0.nAtoms()) return true; - + for (QHash::const_iterator it = map.constBegin(); it != map.constEnd(); ++it) @@ -140,7 +141,7 @@ bool AtomMatcher::pvt_changesOrder(const MoleculeInfoData &mol0, if (it.key() != it.value()) return true; } - + return false; } @@ -152,15 +153,15 @@ bool AtomMatcher::pvt_changesOrder(const MoleculeView &molview0, { const int nats0 = molview0.selection().nSelectedAtoms(); const int nats1 = molview1.selection().nSelectedAtoms(); - + if (nats0 != nats1) return true; QHash map = this->match(molview0,map0,molview1,map1); - + if (map.count() != nats0) return true; - + for (QHash::const_iterator it = map.constBegin(); it != map.constEnd(); ++it) @@ -168,7 +169,7 @@ bool AtomMatcher::pvt_changesOrder(const MoleculeView &molview0, if (it.key() != it.value()) return true; } - + return false; } @@ -279,7 +280,7 @@ QDataStream &operator<<(QDataStream &ds, const AtomResultMatcher &resmatcher) writeHeader(ds, r_resmatcher, 1); SharedDataStream sds(ds); sds << resmatcher.m << static_cast(resmatcher); - + return ds; } @@ -287,7 +288,7 @@ QDataStream &operator<<(QDataStream &ds, const AtomResultMatcher &resmatcher) QDataStream &operator>>(QDataStream &ds, AtomResultMatcher &resmatcher) { VersionID v = readHeader(ds, r_resmatcher); - + if (v == 1) { SharedDataStream sds(ds); @@ -312,7 +313,7 @@ AtomResultMatcher::AtomResultMatcher(const QHash &results, bool //invert the map (this allows reverse lookups) m.clear(); m.reserve(results.count()); - + for (QHash::const_iterator it = results.constBegin(); it != results.constEnd(); ++it) @@ -367,7 +368,7 @@ QString AtomResultMatcher::toString() const /** Match the atoms in 'mol1' to the atoms in 'mol0' - this returns the AtomIdxs of the atoms in 'mol1' that are in 'mol0', indexed by the AtomIdx of the atom in 'mol0'. - + This skips atoms in 'mol1' that are not in 'mol0' */ QHash AtomResultMatcher::pvt_match(const MoleculeView &mol0, @@ -377,12 +378,12 @@ QHash AtomResultMatcher::pvt_match(const MoleculeView &mol0, { const AtomSelection sel0 = mol0.selection(); const AtomSelection sel1 = mol1.selection(); - + QHash map; - + const int nats0 = mol0.data().info().nAtoms(); const int nats1 = mol1.data().info().nAtoms(); - + for (QHash::const_iterator it = m.constBegin(); it != m.constEnd(); ++it) @@ -396,23 +397,23 @@ QHash AtomResultMatcher::pvt_match(const MoleculeView &mol0, } } } - + return map; } /** Match the atoms in 'mol1' to the atoms in 'mol0' - this returns the AtomIdxs of the atoms in 'mol1' that are in 'mol0', indexed by the AtomIdx of the atom in 'mol0'. - + This skips atoms in 'mol1' that are not in 'mol0' */ QHash AtomResultMatcher::pvt_match(const MoleculeInfoData &mol0, const MoleculeInfoData &mol1) const { QHash map; - + const int nats0 = mol0.nAtoms(); const int nats1 = mol1.nAtoms(); - + for (QHash::const_iterator it = m.constBegin(); it != m.constEnd(); ++it) @@ -425,7 +426,7 @@ QHash AtomResultMatcher::pvt_match(const MoleculeInfoData &mol0 } } } - + return map; } @@ -446,7 +447,7 @@ QDataStream &operator<<(QDataStream &ds, const AtomMatchInverter &inverter) writeHeader(ds, r_inverter, 1); SharedDataStream sds(ds); sds << inverter.m << static_cast(inverter); - + return ds; } @@ -454,7 +455,7 @@ QDataStream &operator<<(QDataStream &ds, const AtomMatchInverter &inverter) QDataStream &operator>>(QDataStream &ds, AtomMatchInverter &inverter) { VersionID v = readHeader(ds, r_inverter); - + if (v == 1) { SharedDataStream sds(ds); @@ -523,7 +524,7 @@ QString AtomMatchInverter::toString() const /** Match the atoms in 'mol1' to the atoms in 'mol0' - this returns the AtomIdxs of the atoms in 'mol1' that are in 'mol0', indexed by the AtomIdx of the atom in 'mol0'. - + This skips atoms in 'mol1' that are not in 'mol0' */ QHash AtomMatchInverter::pvt_match(const MoleculeView &mol0, @@ -533,23 +534,23 @@ QHash AtomMatchInverter::pvt_match(const MoleculeView &mol0, { if (isNull()) return QHash(); - + //apply the match backwards, and then invert the result QHash map = m.read().match(mol1,map1,mol0,map0); - + //invert the match if (not map.isEmpty()) { QHash invmap; invmap.reserve(map.count()); - + for (QHash::const_iterator it = map.constBegin(); it != map.constEnd(); ++it) { invmap.insert( it.value(), it.key() ); } - + return invmap; } else @@ -558,7 +559,7 @@ QHash AtomMatchInverter::pvt_match(const MoleculeView &mol0, /** Match the atoms in 'mol1' to the atoms in 'mol0' - this returns the AtomIdxs of the atoms in 'mol1' that are in 'mol0', indexed by the AtomIdx of the atom in 'mol0'. - + This skips atoms in 'mol1' that are not in 'mol0' */ QHash AtomMatchInverter::pvt_match(const MoleculeInfoData &mol0, @@ -566,23 +567,23 @@ QHash AtomMatchInverter::pvt_match(const MoleculeInfoData &mol0 { if (isNull()) return QHash(); - + //apply the match backwards, and then invert the result QHash map = m.read().match(mol1,mol0); - + //invert the match if (not map.isEmpty()) { QHash invmap; invmap.reserve(map.count()); - + for (QHash::const_iterator it = map.constBegin(); it != map.constEnd(); ++it) { invmap.insert( it.value(), it.key() ); } - + return invmap; } else diff --git a/corelib/src/libs/SireMol/atommatchers.cpp b/corelib/src/libs/SireMol/atommatchers.cpp index 379e81882..37a26b559 100644 --- a/corelib/src/libs/SireMol/atommatchers.cpp +++ b/corelib/src/libs/SireMol/atommatchers.cpp @@ -38,6 +38,7 @@ #include "moleculeview.h" #include "mover.h" #include "selector.hpp" +#include "mover.hpp" #include "tostring.h" diff --git a/corelib/src/libs/SireMol/atomproperty.hpp b/corelib/src/libs/SireMol/atomproperty.hpp index 0c3eb7605..a1d3fa4ea 100644 --- a/corelib/src/libs/SireMol/atomproperty.hpp +++ b/corelib/src/libs/SireMol/atomproperty.hpp @@ -29,11 +29,10 @@ #ifndef SIREMOL_ATOMPROPERTY_HPP #define SIREMOL_ATOMPROPERTY_HPP -#include - #include #include "SireBase/qvariant_metatype.h" +#include "SireBase/convert_property.hpp" #include "molviewproperty.h" #include "moleculeinfo.h" @@ -544,33 +543,6 @@ QVariant AtomProperty::getAsVariant(const CGAtomIdx &cgatomidx) const return QVariant::fromValue(value); } -template -struct PvtConvert -{ - template - static SireBase::PropertyPtr convert(const V &value); -}; - -template<> -struct PvtConvert -{ - template - static SireBase::PropertyPtr convert(const V &value) - { - return SireBase::PropertyPtr(value); - } -}; - -template<> -struct PvtConvert -{ - template - static SireBase::PropertyPtr convert(const V &value) - { - return SireBase::PropertyPtr(SireBase::VariantProperty(QVariant::fromValue(value))); - } -}; - /** Return the value for the atom at index 'cgatomidx' as a Property. This lets you get the value without knowing the actual type of this AtomProperty @@ -582,9 +554,7 @@ SIRE_OUTOFLINE_TEMPLATE SireBase::PropertyPtr AtomProperty::getAsProperty( const CGAtomIdx &cgatomidx) const { - const T &value = this->get(cgatomidx); - - return PvtConvert::value>::convert(value); + return SireBase::convert_property(this->get(cgatomidx)); } /** Set the value of the property for the atom at index 'cgatomidx' diff --git a/corelib/src/libs/SireMol/atomselection.cpp b/corelib/src/libs/SireMol/atomselection.cpp index 4d85c811b..a7439447d 100644 --- a/corelib/src/libs/SireMol/atomselection.cpp +++ b/corelib/src/libs/SireMol/atomselection.cpp @@ -154,6 +154,7 @@ AtomSelection::AtomSelection(const MoleculeInfoData &molinfo) AtomSelection::AtomSelection(const AtomSelection &other) : ConcreteProperty(other), selected_atoms(other.selected_atoms), + selected_residues(other.selected_residues), d(other.d), nselected(other.nselected) {} @@ -167,6 +168,7 @@ AtomSelection& AtomSelection::operator=(const AtomSelection &other) MoleculeProperty::operator=(other); selected_atoms = other.selected_atoms; + selected_residues = other.selected_residues; d = other.d; nselected = other.nselected; @@ -286,18 +288,10 @@ bool AtomSelection::selected(ResIdx residx) const { residx = ResIdx( residx.map(info().nResidues()) ); - if (selected_atoms.isEmpty()) + if (selected_residues.isEmpty()) return nselected > 0; else - { - for ( const auto &atomidx : info().cgAtomIdxs(residx) ) - { - if (this->_pvt_selected(atomidx)) - return true; - } - - return false; - } + return selected_residues.contains(residx); } /** Return whether or not any atoms in the chain @@ -315,11 +309,8 @@ bool AtomSelection::selected(ChainIdx chainidx) const { foreach( ResIdx residx, info().getResiduesIn(chainidx) ) { - foreach( const CGAtomIdx &atomidx, info().cgAtomIdxs(residx) ) - { - if (this->_pvt_selected(atomidx)) - return true; - } + if (this->selected(residx)) + return true; } return false; @@ -503,13 +494,7 @@ bool AtomSelection::selectedAllResidues() const return nselected > 0; else { - for (ResIdx i(0); iselected(i)) - return false; - } - - return true; + return selected_residues.count() == info().nResidues(); } } @@ -907,26 +892,9 @@ QList AtomSelection::selectedResidues() const } else { - //run over all of the residues and see if they have - //any selected atoms - int nres = info().nResidues(); - QList selected_res; - - for (ResIdx i(0); iselected( info().getAtom(i,j) )) - { - selected_res.append(i); - break; - } - } - } - - return selected_res; + QList residxs = selected_residues.values(); + std::sort(residxs.begin(), residxs.end()); + return residxs; } } @@ -1112,7 +1080,7 @@ int AtomSelection::nSelected(AtomIdx atomidx) const int AtomSelection::_pvt_nSelected(ResIdx residx) const { - if (this->isEmpty()) + if (not this->selected(residx)) return 0; else if (this->selectedAll()) return info().nAtoms(residx); @@ -1368,21 +1336,7 @@ int AtomSelection::nSelectedResidues() const return 0; else { - int nres = 0; - - for (ResIdx i(0); i_pvt_selected(atomidx)) - { - ++nres; - break; - } - } - } - - return nres; + return selected_residues.count(); } } @@ -1463,6 +1417,7 @@ int AtomSelection::nSegments() const AtomSelection& AtomSelection::selectAll() { selected_atoms.clear(); + selected_residues.clear(); nselected = info().nAtoms(); return *this; @@ -1472,6 +1427,7 @@ AtomSelection& AtomSelection::selectAll() AtomSelection& AtomSelection::deselectAll() { selected_atoms.clear(); + selected_residues.clear(); nselected = 0; return *this; @@ -1517,6 +1473,13 @@ void AtomSelection::_pvt_select(const CGAtomIdx &cgatomidx) it->insert(cgatomidx.atom()); } + const auto atomidx = info().atomIdx(cgatomidx); + + if (info().isWithinResidue(atomidx)) + { + selected_residues.insert(info().parentResidue(atomidx)); + } + ++nselected; } @@ -1569,6 +1532,7 @@ void AtomSelection::_pvt_deselect(const CGAtomIdx &cgatomidx) { //we have just removed the last selected atom selected_atoms.clear(); + selected_residues.clear(); nselected = 0; return; } @@ -1577,6 +1541,8 @@ void AtomSelection::_pvt_deselect(const CGAtomIdx &cgatomidx) //we need to create space for all CutGroups selected_atoms.clear(); selected_atoms.reserve( info().nCutGroups() ); + selected_residues.clear(); + selected_residues.reserve( info().nResidues() ); for (CGIdx i(0); iselected(info().cgAtomIdx(atomidx))) + { + selected_residues.insert(i); + break; + } + } + } } else if ( this->selectedAll(cgatomidx.cutGroup()) ) { @@ -1624,6 +1603,27 @@ void AtomSelection::_pvt_deselect(const CGAtomIdx &cgatomidx) //removed the one and only atom from the CutGroup selected_atoms.remove(cgatomidx.cutGroup()); } + + auto atomidx = info().atomIdx(cgatomidx); + + if (info().isWithinResidue(atomidx)) + { + auto residx = info().parentResidue(atomidx); + + bool is_selected = false; + + for (const auto &atomidx : info().getAtomsIn(residx)) + { + if (this->selected(info().cgAtomIdx(atomidx))) + { + is_selected = true; + break; + } + } + + if (not is_selected) + selected_residues.remove(residx); + } } else { @@ -1640,6 +1640,27 @@ void AtomSelection::_pvt_deselect(const CGAtomIdx &cgatomidx) .arg(nselected).arg(cgatomidx.toString()), CODELOC ); } } + + auto atomidx = info().atomIdx(cgatomidx); + + if (info().isWithinResidue(atomidx)) + { + auto residx = info().parentResidue(atomidx); + + bool is_selected = false; + + for (const auto &atomidx : info().getAtomsIn(residx)) + { + if (this->selected(info().cgAtomIdx(atomidx))) + { + is_selected = true; + break; + } + } + + if (not is_selected) + selected_residues.remove(residx); + } } --nselected; @@ -1732,6 +1753,22 @@ void AtomSelection::_pvt_select(CGIdx cgidx) selected_atoms.insert(cgidx, QSet()); } } + + if (info().isResidueCutting()) + { + // we know that the CGIdx equals the ResIdx + selected_residues.insert(ResIdx(cgidx.value())); + } + else + { + for (const auto &atomidx : info().getAtomsIn(cgidx)) + { + if (info().isWithinResidue(atomidx)) + { + selected_residues.insert(info().parentResidue(atomidx)); + } + } + } } void AtomSelection::_pvt_deselect(CGIdx cgidx) @@ -1740,6 +1777,7 @@ void AtomSelection::_pvt_deselect(CGIdx cgidx) if (this->selectedAll()) { selected_atoms.clear(); + selected_residues.clear(); nselected -= info().nAtoms(cgidx); if (info().nCutGroups() > 1) @@ -1756,6 +1794,32 @@ void AtomSelection::_pvt_deselect(CGIdx cgidx) } } } + + if (info().isResidueCutting() and info().nResidues() > 1) + { + selected_residues.reserve(info().nResidues()); + for (ResIdx i(0); iselected(info().cgAtomIdx(atomidx))) + { + selected_residues.insert(i); + break; + } + } + } + } } else { @@ -1775,6 +1839,40 @@ void AtomSelection::_pvt_deselect(CGIdx cgidx) nselected -= atoms.count(); } } + + if (info().isResidueCutting()) + { + selected_residues.remove(ResIdx(cgidx.value())); + } + else + { + QSet residxs; + + for (const auto &atomidx : info().getAtomsIn(cgidx)) + { + if (info().isWithinResidue(atomidx)) + { + residxs.insert(info().parentResidue(atomidx)); + } + } + + for (const auto &residx : residxs) + { + bool is_selected = false; + + for (const auto &atomidx : info().getAtomsIn(residx)) + { + if (this->selected(info().cgAtomIdx(atomidx))) + { + is_selected = true; + break; + } + } + + if (not is_selected) + selected_residues.remove(residx); + } + } } if (selected_atoms.isEmpty() and nselected > 0) @@ -4053,3 +4151,67 @@ const char* AtomSelection::typeName() { return QMetaType::typeName( qMetaTypeId() ); } + +/** Return whether or not this selection represents the whole molecule */ +bool AtomSelection::isMolecule() const +{ + return this->selectedAll(); +} + +/** Return whether or not this selection represents a single atom */ +bool AtomSelection::isAtom() const +{ + return this->nSelected() == 1; +} + +/** Return whether or not this selection represents a single CutGroup */ +bool AtomSelection::isCutGroup() const +{ + auto cgidxs = this->selectedCutGroups(); + + if (cgidxs.count() == 1) + { + return this->selectedAll(cgidxs.at(0)); + } + + return false; +} + +/** Return whether or not this selection represents a single Residue */ +bool AtomSelection::isResidue() const +{ + auto residxs = this->selectedResidues(); + + if (residxs.count() == 1) + { + return this->selectedAll(residxs.at(0)); + } + + return false; +} + +/** Return whether or not this selection represents a single Chain */ +bool AtomSelection::isChain() const +{ + auto chainidxs = this->selectedChains(); + + if (chainidxs.count() == 1) + { + return this->selectedAll(chainidxs.at(0)); + } + + return false; +} + +/** Return whether or not this selection represents a single Segment */ +bool AtomSelection::isSegment() const +{ + auto segidxs = this->selectedSegments(); + + if (segidxs.count() == 1) + { + return this->selectedAll(segidxs.at(0)); + } + + return false; +} diff --git a/corelib/src/libs/SireMol/atomselection.h b/corelib/src/libs/SireMol/atomselection.h index ce307605c..d9741cad9 100644 --- a/corelib/src/libs/SireMol/atomselection.h +++ b/corelib/src/libs/SireMol/atomselection.h @@ -128,13 +128,13 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! int nSelected(ResIdx residx) const; int nSelected(ChainIdx chainidx) const; int nSelected(SegIdx segidx) const; - + int nSelected(const CGID &cgid) const; int nSelected(const AtomID &atomid) const; int nSelected(const ResID &resid) const; int nSelected(const ChainID &chainid) const; int nSelected(const SegID &segid) const; - + int nSelected(const AtomSelection &selection) const; int nSelectedAtoms() const; @@ -149,6 +149,13 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! int nChains() const; int nSegments() const; + bool isAtom() const; + bool isResidue() const; + bool isCutGroup() const; + bool isChain() const; + bool isSegment() const; + bool isMolecule() const; + bool selectedAllAtoms() const; bool selectedAllCutGroups() const; bool selectedAllResidues() const; @@ -163,7 +170,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! bool selected(ResIdx residx) const; bool selected(ChainIdx chainidx) const; bool selected(SegIdx segidx) const; - + bool selected(const CGID &cgid) const; bool selected(const ResID &resid) const; bool selected(const ChainID &chainid) const; @@ -178,7 +185,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! bool selectedAll(ResIdx residx) const; bool selectedAll(ChainIdx chainidx) const; bool selectedAll(SegIdx segidx) const; - + bool selectedAll(const AtomID &atomid) const; bool selectedAll(const CGID &cgid) const; bool selectedAll(const ResID &resid) const; @@ -194,7 +201,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! bool selectedNone(ResIdx residx) const; bool selectedNone(ChainIdx chainidx) const; bool selectedNone(SegIdx segidx) const; - + bool selectedNone(const AtomID &atomid) const; bool selectedNone(const CGID &cgid) const; bool selectedNone(const ResID &resid) const; @@ -222,7 +229,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! AtomSelection& select(ChainIdx chainidx); AtomSelection& deselect(ChainIdx chainidx); AtomSelection& selectOnly(ChainIdx chainidx); - + AtomSelection& select(SegIdx segidx); AtomSelection& deselect(SegIdx segidx); AtomSelection& selectOnly(SegIdx segidx); @@ -282,7 +289,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! AtomSelection& select(const ChainID &chainid); AtomSelection& deselect(const ChainID &chainid); AtomSelection& selectOnly(const ChainID &chainid); - + AtomSelection& select(const SegID &segid); AtomSelection& deselect(const SegID &segid); AtomSelection& selectOnly(const SegID &segid); @@ -292,13 +299,13 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! AtomSelection& selectOnly(const AtomSelection &selection); AtomSelection& invert(); - + bool intersects(AtomIdx atomidx) const; bool intersects(CGIdx cgidx) const; bool intersects(ResIdx residx) const; bool intersects(ChainIdx chainidx) const; bool intersects(SegIdx segidx) const; - + bool intersects(const AtomID &atomid) const; bool intersects(const CGID &cgid) const; bool intersects(const ResID &resid) const; @@ -306,13 +313,13 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! bool intersects(const SegID &segid) const; bool intersects(const AtomSelection &selection) const; - + bool contains(AtomIdx atomidx) const; bool contains(CGIdx cgidx) const; bool contains(ResIdx residx) const; bool contains(ChainIdx chainidx) const; bool contains(SegIdx segidx) const; - + bool contains(const AtomID &atomid) const; bool contains(const CGID &cgid) const; bool contains(const ResID &resid) const; @@ -338,7 +345,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! AtomSelection& intersect(const QList &residx); AtomSelection& intersect(const QList &chainidx); AtomSelection& intersect(const QList &segidx); - + AtomSelection& intersect(const AtomID &atomid); AtomSelection& intersect(const CGID &cgid); AtomSelection& intersect(const ResID &resid); @@ -364,7 +371,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! AtomSelection& unite(const QList &residx); AtomSelection& unite(const QList &chainidx); AtomSelection& unite(const QList &segidx); - + AtomSelection& unite(const AtomID &atomid); AtomSelection& unite(const CGID &cgid); AtomSelection& unite(const ResID &resid); @@ -392,7 +399,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! AtomSelection& subtract(const QList &residx); AtomSelection& subtract(const QList &chainidx); AtomSelection& subtract(const QList &segidx); - + AtomSelection& subtract(const AtomID &atomid); AtomSelection& subtract(const CGID &cgid); AtomSelection& subtract(const ResID &resid); @@ -418,7 +425,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! AtomSelection& mask(const QList &residx); AtomSelection& mask(const QList &chainidx); AtomSelection& mask(const QList &segidx); - + AtomSelection& mask(const AtomID &atomid); AtomSelection& mask(const CGID &cgid); AtomSelection& mask(const ResID &resid); @@ -430,7 +437,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! QVector selectedAtoms() const; QSet selectedAtoms(CGIdx cgid) const; - + QList selectedCutGroups() const; QList selectedResidues() const; QList selectedChains() const; @@ -438,7 +445,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! void assertSelected(AtomIdx atomidx) const; void assertSelected(const AtomID &atomid) const; - + bool isCompatibleWith(const MoleculeInfoData &molinfo) const; void assertCompatibleWith(const MoleculeData &moldata) const; @@ -452,7 +459,7 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! private: bool _pvt_selected(const CGAtomIdx &cgatomidx) const; bool _pvt_selected(AtomIdx atomidx) const; - + bool _pvt_selectedAll(CGIdx cgidx) const; bool _pvt_selectedAll(const QVector &atomidxs) const; @@ -460,15 +467,15 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! void _pvt_select(AtomIdx atomidx); void _pvt_deselect(AtomIdx atomidx); - + void _pvt_select(CGIdx cgidx); void _pvt_deselect(CGIdx cgidx); - + void _pvt_select(const CGAtomIdx &cgatomidx); void _pvt_deselect(const CGAtomIdx &cgatomidx); - + void _pvt_select(CGIdx cgidx, const QSet &atoms); - + void _pvt_select(const QVector &cgatomidxs); void _pvt_deselect(const QVector &cgatomidxs); @@ -476,13 +483,19 @@ friend class SelectionFromMol; //so can modify a single AtomSelection! template void _pvt_selectAtoms(const IDXS &atoms); - + template void _pvt_deselectAtoms(const IDXS &atoms); - /** The indicies of selected atoms, arranged by CGIdx */ + /** The indicies of selected atoms */ QHash< CGIdx, QSet > selected_atoms; + /** The indicies of selected residues (residues that have at + * least one atom selected). This is empty if all residues + * are selected + */ + QSet< ResIdx > selected_residues; + /** The MoleculeInfo describing the molecule whose parts are being selected by this object */ SharedDataPointer d; diff --git a/corelib/src/libs/SireMol/bead.cpp b/corelib/src/libs/SireMol/bead.cpp index d36dd71bf..de4ac8f51 100644 --- a/corelib/src/libs/SireMol/bead.cpp +++ b/corelib/src/libs/SireMol/bead.cpp @@ -30,6 +30,13 @@ #include "beadeditor.h" #include "beads.h" #include "mover.hpp" +#include "selector.hpp" +#include "atom.h" +#include "residue.h" +#include "chain.h" +#include "cutgroup.h" +#include "segment.h" +#include "partialmolecule.h" #include "SireBase/errors.h" @@ -47,31 +54,31 @@ static const RegisterMetaType r_bead; QDataStream &operator<<(QDataStream &ds, const Bead &bead) { writeHeader(ds, r_bead, 1); - + SharedDataStream sds(ds); - - sds << bead.beadidx << bead.bdng + + sds << bead.beadidx << bead.bdng << bead.beading_property << bead.selected_atoms << static_cast(bead); - + return ds; } QDataStream &operator>>(QDataStream &ds, Bead &bead) { VersionID v = readHeader(ds, r_bead); - + if (v == 1) { SharedDataStream sds(ds); - - sds >> bead.beadidx >> bead.bdng + + sds >> bead.beadidx >> bead.bdng >> bead.beading_property >> bead.selected_atoms >> static_cast(bead); } else throw version_error(v, "1", r_bead, CODELOC); - + return ds; } @@ -86,7 +93,7 @@ Bead::Bead(const MoleculeData &moldata, const BeadIdx &bead, : ConcreteProperty(moldata), beadidx(bead) { beading_property = map["beading"]; - + if (not moldata.hasProperty(beading_property)) { bdng = ResidueBeading(); @@ -95,12 +102,12 @@ Bead::Bead(const MoleculeData &moldata, const BeadIdx &bead, { bdng = moldata.property(beading_property).asA(); } - + beadidx = BeadIdx( beadidx.map(bdng.read().nBeads(moldata.info())) ); selected_atoms = bdng.read().selection(moldata.info(), beadidx); } -/** Internal constructor */ +/** Internal constructor */ Bead::Bead(const MoleculeData &moldata, BeadIdx idx, const Beading &beading, const PropertyName &prop) : ConcreteProperty(moldata), @@ -113,7 +120,7 @@ Bead::Bead(const MoleculeData &moldata, BeadIdx idx, /** Copy constructor */ Bead::Bead(const Bead &other) : ConcreteProperty(other), - beadidx(other.beadidx), bdng(other.bdng), + beadidx(other.beadidx), bdng(other.bdng), beading_property(other.beading_property), selected_atoms(other.selected_atoms) {} @@ -133,7 +140,7 @@ Bead& Bead::operator=(const Bead &other) selected_atoms = other.selected_atoms; MoleculeView::operator=(other); } - + return *this; } @@ -160,6 +167,11 @@ Bead* Bead::clone() const return new Bead(*this); } +MolViewPtr Bead::toSelector() const +{ + return PartialMolecule(*this).toSelector(); +} + /** Return a string representation of this bead */ QString Bead::toString() const { @@ -193,7 +205,7 @@ AtomSelection Bead::selection() const void Bead::update(const MoleculeData &moldata) { BeadingPtr new_beading; - + if (moldata.hasProperty(beading_property)) { new_beading = moldata.property(beading_property).asA(); @@ -204,9 +216,9 @@ void Bead::update(const MoleculeData &moldata) } new_beading.read().assertValidIndex(beadidx, moldata.info()); - + MoleculeView::update(moldata); - + if (not new_beading.read().equals(bdng.read())) { bdng = new_beading; @@ -232,14 +244,14 @@ bool Bead::hasProperty(const PropertyName &key) const if (this->data().hasProperty(key)) { const Property &prop = this->data().property(key); - + if (prop.isA()) { if (prop.asA().beading().equals(bdng.read())) return true; } } - + return false; } @@ -249,14 +261,14 @@ bool Bead::hasMetadata(const PropertyName &metakey) const if (this->data().hasMetadata(metakey)) { const Property &prop = this->data().metadata(metakey); - + if (prop.isA()) { if (prop.asA().beading().equals(bdng.read())) return true; } } - + return false; } @@ -267,14 +279,14 @@ bool Bead::hasMetadata(const PropertyName &key, if (this->data().hasMetadata(key,metakey)) { const Property &prop = this->data().metadata(key,metakey); - + if (prop.isA()) { if (prop.asA().beading().equals(bdng.read())) return true; } } - + return false; } @@ -282,20 +294,20 @@ bool Bead::hasMetadata(const PropertyName &key, QStringList Bead::propertyKeys() const { QStringList beadprops = d->properties().propertyKeysOfType(); - + QMutableStringListIterator it(beadprops); - + while (it.hasNext()) { const QString &key = it.next(); - + if (not this->data().property(key).asA().beading() .equals(bdng.read())) { it.remove(); } } - + return beadprops; } @@ -303,20 +315,20 @@ QStringList Bead::propertyKeys() const QStringList Bead::metadataKeys() const { QStringList beadprops = d->properties().metadataKeysOfType(); - + QMutableStringListIterator it(beadprops); - + while (it.hasNext()) { const QString &metakey = it.next(); - + if (not this->data().metadata(metakey).asA().beading() .equals(bdng.read())) { it.remove(); } } - + return beadprops; } @@ -325,20 +337,20 @@ QStringList Bead::metadataKeys() const QStringList Bead::metadataKeys(const PropertyName &key) const { QStringList beadprops = d->properties().metadataKeysOfType(key); - + QMutableStringListIterator it(beadprops); - + while (it.hasNext()) { const QString &metakey = it.next(); - + if (not this->data().metadata(key, metakey).asA().beading() .equals(bdng.read())) { it.remove(); } } - + return beadprops; } @@ -419,7 +431,7 @@ bool Bead::intersects(const AtomID &atomid) const return selected_atoms.selected(atomid); } -/** Assert that this bead contains the property with key 'key' +/** Assert that this bead contains the property with key 'key' \throw SireBase::missing_property */ @@ -433,7 +445,7 @@ void Bead::assertContainsProperty(const PropertyName &key) const Sire::toString(this->propertyKeys())), CODELOC ); } -/** Assert that this bead contains the metadata with key 'metakey' +/** Assert that this bead contains the metadata with key 'metakey' \throw SireBase::missing_property */ @@ -447,7 +459,7 @@ void Bead::assertContainsMetadata(const PropertyName &metakey) const Sire::toString(this->metadataKeys())), CODELOC ); } -/** Assert that this bead contains the metadata property with key 'key':'metakey' +/** Assert that this bead contains the metadata property with key 'key':'metakey' \throw SireBase::missing_property */ diff --git a/corelib/src/libs/SireMol/bead.h b/corelib/src/libs/SireMol/bead.h index 724c1bff5..98a19d525 100644 --- a/corelib/src/libs/SireMol/bead.h +++ b/corelib/src/libs/SireMol/bead.h @@ -65,7 +65,7 @@ using SireBase::Property; /** A Bead is a group of atoms (defined using a SireMol::Beading function) within a molecule. Beads can be used for coarse-graining, or for implementing group-based cutoffs - + @author Christopher Woods */ class SIREMOL_EXPORT Bead : public SireBase::ConcreteProperty @@ -81,53 +81,55 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Bead&); Bead(); Bead(const MoleculeData &moldata, const BeadIdx &bead, const PropertyMap &map = PropertyMap()); - + Bead(const Bead &other); - + ~Bead(); - + Bead& operator=(const Bead &other); - + bool operator==(const Bead &other) const; bool operator!=(const Bead &other) const; - + static const char* typeName(); Bead* clone() const; MolViewPtr operator[](int i) const; int nViews() const; - + Atom atom(int i) const; QString toString() const; - + bool isEmpty() const; bool selectedAll() const; + MolViewPtr toSelector() const; + AtomSelection selection() const; void update(const MoleculeData &moldata); BeadIdx index() const; - + Beads beads() const; - + bool hasProperty(const PropertyName &key) const; bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; - + template const T& property(const PropertyName &key) const; - + template const T& metadata(const PropertyName &metakey) const; - + template const T& metadata(const PropertyName &key, const PropertyName &metakey) const; @@ -135,19 +137,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Bead&); Mover move() const; Evaluator evaluate() const; BeadEditor edit() const; - + int nAtoms() const; - + QList atomIdxs() const; - + const Beading& beading() const; - + bool contains(AtomIdx atomidx) const; bool contains(const AtomID &atomid) const; bool intersects(const AtomID &atomid) const; void assertContainsProperty(const PropertyName &key) const; - + void assertContainsMetadata(const PropertyName &metakey) const; void assertContainsMetadata(const PropertyName &key, const PropertyName &metakey) const; @@ -158,7 +160,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Bead&); template void setMetadata(const QString &metakey, const T &value); - + template void setMetadata(const QString &key, const QString &metakey, const T &value); @@ -170,25 +172,25 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Bead&); private: /** The index of the bead in the molecule */ BeadIdx beadidx; - + /** The beading used to create the beads */ BeadingPtr bdng; - + /** The location of the beading property */ PropertyName beading_property; - + /** The atoms that are selected as part of this residue */ AtomSelection selected_atoms; }; #ifndef SIRE_SKIP_INLINE_FUNCTIONS -/** Return the property (of type T) at key 'key' that is +/** Return the property (of type T) at key 'key' that is specifically assigned to this bead. This will only work if the property at this key is a bead property (i.e. has one value for every bead) and that it can be cast to type T - + \throw SireBase::missing_property \throw SireError::invalid_cast */ @@ -217,13 +219,13 @@ const T& Bead::metadata(const PropertyName &metakey) const /** Return the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireBase::missing_property \throw SireError::invalid_cast */ template SIRE_OUTOFLINE_TEMPLATE -const T& Bead::metadata(const PropertyName &key, +const T& Bead::metadata(const PropertyName &key, const PropertyName &metakey) const { const Property &property = d->metadata(key, metakey); @@ -235,9 +237,9 @@ const T& Bead::metadata(const PropertyName &key, residue to be equal to 'value'. This works by creating a ResProperty for this molecule, and assigning the value for this residue to 'value'. If there is already - a property at key 'key', then it must be of type + a property at key 'key', then it must be of type ResProperty for this to work - + \throw SireMol::invalid_cast */ template @@ -246,7 +248,7 @@ void Bead::setProperty(const QString &key, const T &value) { BeadProperty props; MoleculeData &data = *d; - + if (data.hasProperty(key)) { //take the property to prevent unnecessary copying caused @@ -256,15 +258,15 @@ void Bead::setProperty(const QString &key, const T &value) } else props = BeadProperty(data.info(), bdng.read()); - + props.set(this->index(), value); - + data.setProperty(key, props); } -/** Set the metadata at metakey 'metakey' to the value 'value' +/** Set the metadata at metakey 'metakey' to the value 'value' for this residue - + \throw SireError::invalid_cast */ template @@ -273,7 +275,7 @@ void Bead::setMetadata(const QString &metakey, const T &value) { BeadProperty props; MoleculeData &data = *d; - + if (data.hasMetadata(metakey)) { //take the metadata to prevent unnecessary copying caused @@ -283,15 +285,15 @@ void Bead::setMetadata(const QString &metakey, const T &value) } else props = BeadProperty(data.info(), bdng.read()); - + props.set(this->index(), value); - + data.setMetadata(metakey, props); } /** Set the metadata at metakey 'metakey' for the property at key 'key' to the value 'value' - + \throw SireError::invalid_cast */ template @@ -301,7 +303,7 @@ void Bead::setMetadata(const QString &key, const QString &metakey, { BeadProperty props; MoleculeData &data = *d; - + if (data.hasMetadata(key, metakey)) { //take the metadata to prevent unnecessary copying caused @@ -311,9 +313,9 @@ void Bead::setMetadata(const QString &key, const QString &metakey, } else props = BeadProperty(data.info(),bdng.read()); - + props.set(this->index(), value); - + data.setMetadata(key, metakey, props); } @@ -321,7 +323,7 @@ namespace detail { void assertSameSize(Bead*, int nres, int nprops); - + template SIRE_OUTOFLINE_TEMPLATE QList get_property(Bead*, const MoleculeData &moldata, @@ -380,7 +382,7 @@ void set_metadata(Bead *ptr, MoleculeData &moldata, const QList &values) { assertSameSize(ptr, idxs.count(), values.count()); - + set_metadata,Bead::Index,V>(moldata,idxs,key,metakey,values); } @@ -416,12 +418,12 @@ void set_metadata(Bead*, MoleculeData &moldata, SIREMOL_EXPORT bool has_property(const Bead*, const MoleculeData &moldata, const PropertyName &key); - + SIREMOL_EXPORT bool has_metadata(const Bead*, const MoleculeData &moldata, const PropertyName &metakey); - + SIREMOL_EXPORT bool has_metadata(const Bead*, const MoleculeData &moldata, - const PropertyName &key, const PropertyName &metakey); + const PropertyName &key, const PropertyName &metakey); } //end of namespace detail diff --git a/corelib/src/libs/SireMol/beadeditor.cpp b/corelib/src/libs/SireMol/beadeditor.cpp index a960f51a1..57bd6fd92 100644 --- a/corelib/src/libs/SireMol/beadeditor.cpp +++ b/corelib/src/libs/SireMol/beadeditor.cpp @@ -27,6 +27,13 @@ \*********************************************/ #include "beadeditor.h" +#include "mover.hpp" +#include "selector.hpp" +#include "atom.h" +#include "residue.h" +#include "chain.h" +#include "cutgroup.h" +#include "segment.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -40,23 +47,23 @@ static const RegisterMetaType r_beadeditor; QDataStream &operator<<(QDataStream &ds, const BeadEditor &beadeditor) { writeHeader(ds, r_beadeditor, 1); - + ds << static_cast(beadeditor); - + return ds; } QDataStream &operator>>(QDataStream &ds, BeadEditor &beadeditor) { VersionID v = readHeader(ds, r_beadeditor); - + if (v == 1) { ds >> static_cast(beadeditor); } else throw version_error(v, "1", r_beadeditor, CODELOC); - + return ds; } diff --git a/corelib/src/libs/SireMol/beads.cpp b/corelib/src/libs/SireMol/beads.cpp index 11111352f..6be12d97e 100644 --- a/corelib/src/libs/SireMol/beads.cpp +++ b/corelib/src/libs/SireMol/beads.cpp @@ -28,6 +28,7 @@ #include "beads.h" #include "mover.hpp" +#include "partialmolecule.h" #include "SireStream/datastream.h" #include "SireStream/datastream.h" @@ -41,29 +42,29 @@ static const RegisterMetaType r_beads; QDataStream &operator<<(QDataStream &ds, const Beads &beads) { writeHeader(ds, r_beads, 1); - + SharedDataStream sds(ds); - + sds << beads.bdng << beads.beading_property << beads.selected_atoms << static_cast(beads); - + return ds; } QDataStream &operator>>(QDataStream &ds, Beads &beads) { VersionID v = readHeader(ds, r_beads); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> beads.bdng >> beads.beading_property >> beads.selected_atoms >> static_cast(beads); } else throw version_error(v, "1", r_beads, CODELOC); - + return ds; } @@ -77,7 +78,7 @@ Beads::Beads(const MoleculeData &moldata, const PropertyMap &map) : ConcreteProperty(moldata) { beading_property = map["beading"]; - + if (moldata.hasProperty(beading_property)) { bdng = moldata.property(beading_property).asA(); @@ -86,10 +87,10 @@ Beads::Beads(const MoleculeData &moldata, const PropertyMap &map) { bdng = ResidueBeading(); } - + selected_atoms = bdng.read().selection(moldata.info()); } - + /** Copy constructor */ Beads::Beads(const Beads &other) : ConcreteProperty(other), @@ -111,14 +112,14 @@ Beads& Beads::operator=(const Beads &other) beading_property = other.beading_property; selected_atoms = other.selected_atoms; } - + return *this; } /** Comparison operator */ bool Beads::operator==(const Beads &other) const { - return MoleculeView::operator==(other) and + return MoleculeView::operator==(other) and beading_property == other.beading_property; } @@ -138,16 +139,21 @@ Beads* Beads::clone() const return new Beads(*this); } -/** Return the bead at index 'beadidx' +MolViewPtr Beads::toSelector() const +{ + return PartialMolecule(*this).toSelector(); +} + +/** Return the bead at index 'beadidx' \throw SireError::invalid_index */ Bead Beads::operator[](BeadIdx beadidx) const { - return Bead(this->data(), beadidx, bdng.read(), beading_property); + return Bead(this->data(), beadidx, bdng.read(), beading_property); } -/** Return the bead at index 'beadidx' +/** Return the bead at index 'beadidx' \throw SireError::invalid_index */ @@ -156,7 +162,7 @@ Bead Beads::at(BeadIdx beadidx) const return this->operator[](beadidx); } -/** Return the bead at index 'beadidx' +/** Return the bead at index 'beadidx' \throw SireError::invalid_index */ @@ -235,9 +241,9 @@ void Beads::update(const MoleculeData &moldata) { new_beading = ResidueBeading(); } - + MoleculeView::update(moldata); - + if (not new_beading.read().equals(bdng.read())) { bdng = new_beading; @@ -287,7 +293,7 @@ bool Beads::intersects(const AtomID &atomid) const return selected_atoms.selected(atomid); } -/** Return the atom properties for all of the atoms in the beads, in +/** Return the atom properties for all of the atoms in the beads, in BeadIdx/Index order */ PropertyPtr Beads::atomProperty(const PropertyName &key) const { @@ -312,7 +318,7 @@ bool Beads::hasMetadata(const PropertyName &key, { return false; } - + /** At the moment, the "Beads" object has no properties or metadata */ QStringList Beads::propertyKeys() const { diff --git a/corelib/src/libs/SireMol/beads.h b/corelib/src/libs/SireMol/beads.h index 03c7312fa..77272b1d2 100644 --- a/corelib/src/libs/SireMol/beads.h +++ b/corelib/src/libs/SireMol/beads.h @@ -48,7 +48,7 @@ namespace SireMol /** This class is a view of all of the beads (for a specific "Beading") in a molecule - + @author Christopher Woods */ class SIREMOL_EXPORT Beads : public SireBase::ConcreteProperty @@ -61,48 +61,50 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Beads&); Beads(); Beads(const MoleculeData &moldata, const PropertyMap &map = PropertyMap()); - + Beads(const Beads &other); - + ~Beads(); - + Beads& operator=(const Beads &other); - + bool operator==(const Beads &other) const; bool operator!=(const Beads &other) const; - + static const char* typeName(); - + Beads* clone() const; - + Bead operator[](BeadIdx beadidx) const; - + Bead at(BeadIdx beadidx) const; - + Bead bead(BeadIdx beadidx) const; - + int count() const; int size() const; - + QString toString() const; - + + MolViewPtr toSelector() const; + bool isEmpty() const; bool selectedAll() const; - + AtomSelection selection() const; - + int nBeads() const; int nAtoms() const; - + void update(const MoleculeData &moldata); Mover move() const; Evaluator evaluate() const; QList atomIdxs() const; - + const Beading& beading() const; - + bool contains(AtomIdx atomidx) const; bool contains(const AtomID &atomid) const; bool intersects(const AtomID &atomid) const; @@ -113,7 +115,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Beads&); bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; @@ -121,10 +123,10 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Beads&); private: /** The beading used to divide the molecule into beads */ BeadingPtr bdng; - + /** The location of the beading property */ PropertyName beading_property; - + /** The atoms that are part of the beads */ AtomSelection selected_atoms; }; diff --git a/corelib/src/libs/SireMol/cgid.cpp b/corelib/src/libs/SireMol/cgid.cpp index 5fd97ffd5..39a73bdf3 100644 --- a/corelib/src/libs/SireMol/cgid.cpp +++ b/corelib/src/libs/SireMol/cgid.cpp @@ -73,6 +73,12 @@ CGID::CGID(const CGID &other) : ID(other) CGID::~CGID() {} +/** Return an CGID constructed from the passed string */ +CGIdentifier CGID::fromString(const QString &id) +{ + return CGName(id); +} + /** Return a specific object that matches this ID */ Specify CGID::operator[](qint64 i) const { diff --git a/corelib/src/libs/SireMol/cgid.h b/corelib/src/libs/SireMol/cgid.h index 090ad437a..6f5442990 100644 --- a/corelib/src/libs/SireMol/cgid.h +++ b/corelib/src/libs/SireMol/cgid.h @@ -69,7 +69,7 @@ class MoleculeGroup; class MolGroupsBase; class MolNum; -/** This is the base class of all identifiers that are used +/** This is the base class of all identifiers that are used to identify a CutGroup @author Christopher Woods @@ -93,7 +93,7 @@ class SIREMOL_EXPORT CGID : public SireID::ID Specify operator()(qint64 i) const; Specify operator()(qint64 start, qint64 end) const; Specify operator()(qint64 start, qint64 end, qint64 increment) const; - + IDAndSet operator+(const CGID &other) const; GroupAtomID operator+(const AtomID &other) const; GroupGroupID operator+(const SegID &other) const; @@ -119,7 +119,7 @@ class SIREMOL_EXPORT CGID : public SireID::ID GroupGroupID operator&(const SegID &other) const; GroupGroupID operator&(const ChainID &other) const; GroupGroupID operator&(const ResID &other) const; - + IDOrSet operator*(const CGID &other) const; IDOrSet operator*(const AtomID &other) const; @@ -128,24 +128,26 @@ class SIREMOL_EXPORT CGID : public SireID::ID IDOrSet operator|(const CGID &other) const; IDOrSet operator|(const AtomID &other) const; - + SireID::InvertMatch operator!() const; - + AtomsIn atoms() const; AtomsIn atom(int i) const; AtomsIn atoms(int i, int j) const; - + static SireID::MatchAll any(); SireID::InvertMatch invert() const; SireID::InvertMatch inverse() const; - + static const char* typeName() { return "SireMol::CGID"; } - + virtual CGID* clone() const=0; + static CGIdentifier fromString(const QString &id); + /** Map this ID back to the indicies of the CutGroups within the molecule described by the info in 'molinfo' */ virtual QList map(const MolInfo &molinfo) const=0; @@ -153,30 +155,30 @@ class SIREMOL_EXPORT CGID : public SireID::ID virtual QList map(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual CutGroup selectFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Selector selectAllFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual CutGroup selectFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; virtual CutGroup selectFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual CutGroup selectFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; - virtual QHash< MolNum,Selector > + virtual QHash< MolNum,Selector > selectAllFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; diff --git a/corelib/src/libs/SireMol/cgproperty.hpp b/corelib/src/libs/SireMol/cgproperty.hpp index bb634d2ce..718748d4f 100644 --- a/corelib/src/libs/SireMol/cgproperty.hpp +++ b/corelib/src/libs/SireMol/cgproperty.hpp @@ -32,6 +32,7 @@ #include #include "SireBase/qvariant_metatype.h" +#include "SireBase/convert_property.hpp" #include "moleculeinfodata.h" #include "molviewproperty.h" @@ -73,30 +74,33 @@ class SIREMOL_EXPORT CGProp : public MolViewProperty public: CGProp(); CGProp(const CGProp &other); - + virtual ~CGProp(); - + virtual bool canConvert(const QVariant &value) const=0; - + virtual void assignFrom(const CGProperty &values)=0; - + + virtual QVariant getAsVariant(const CGIdx &cgidx) const=0; + virtual SireBase::PropertyPtr getAsProperty(const CGIdx &cgidx) const=0; + virtual CGProperty toVariant() const=0; - + virtual void assertCanConvert(const QVariant &value) const=0; }; /** This is a property that can hold one value for each CutGroup in the molecule. - + mol.setProperty( "charge", CGCharges( [....] ) ) mol.setProperty( "lj", CGLJs( [....] ) ) cg.setProperty( "charge", 0.0 * mod_e ) - + @author Christopher Woods */ template -class SIREMOL_EXPORT CGProperty +class SIREMOL_EXPORT CGProperty : public SireBase::ConcreteProperty, CGProp> { @@ -107,19 +111,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, CGProperty&); CGProperty(); CGProperty(const MoleculeInfoData &molinfo); - + CGProperty(const QVector &values); - + CGProperty(const CGProperty &other); - + ~CGProperty(); - + CGProperty& operator=(const CGProperty &other); - + static const char* typeName(); - + CGProperty* clone() const; - + bool operator==(const CGProperty &other) const; bool operator!=(const CGProperty &other) const; @@ -127,6 +131,9 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, CGProperty&); const T& at(const CGIdx &cgidx) const; const T& get(const CGIdx &cgidx) const; + QVariant getAsVariant(const CGIdx &idx) const; + SireBase::PropertyPtr getAsProperty(const CGIdx &idx) const; + CGProperty& set(CGIdx cgidx, const T &value); const T* data() const; @@ -138,19 +145,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, CGProperty&); int size() const; int count() const; - + int nCutGroups() const; void assignFrom(const CGProperty &variant); const QVector& array() const; - + CGProperty toVariant() const; - + static CGProperty fromVariant(const CGProperty &variant); - + bool canConvert(const QVariant &value) const; - + void assertCanConvert(const QVariant &value) const; bool isCompatibleWith(const MoleculeInfoData &molinfo) const; @@ -169,7 +176,7 @@ CGProperty::CGProperty() : SireBase::ConcreteProperty,CGProp>() {} -/** Construct space for the values of the property for all of the +/** Construct space for the values of the property for all of the CutGroups in the molecule described by 'molinfo' */ template SIRE_OUTOFLINE_TEMPLATE @@ -195,7 +202,7 @@ CGProperty::CGProperty(const QVector &values) /** Assert that the variant can be converted to a value that can be held in this list of properties - + \throw SireError::invalid_cast */ template @@ -252,7 +259,7 @@ bool CGProperty::operator!=(const CGProperty &other) const return props != other.props; } -/** Return the property for the CutGroup at index 'cgidx' +/** Return the property for the CutGroup at index 'cgidx' \throw SireError::invalid_index */ @@ -262,7 +269,7 @@ const T& CGProperty::operator[](const CGIdx &cgidx) const { return props.constData()[cgidx.map(props.count())]; } - + template SIRE_OUTOFLINE_TEMPLATE const char* CGProperty::typeName() @@ -309,13 +316,13 @@ CGProperty CGProperty::fromVariant(const CGProperty &variant) { CGProperty array; array.assignFrom(variant); - + return array; } /** Assign the values of this property from the array of variants in 'values' - + \throw SireError::invalid_cast */ template @@ -327,19 +334,19 @@ void CGProperty::assignFrom(const CGProperty &variant) props.clear(); return; } - + int nvals = variant.count(); const QVariant *variant_array = variant.constData(); - + props = QVector(nvals); props.squeeze(); T *props_array = props.data(); - + for (int i=0; i::assertCanConvert(value); - + if (value.isNull()) props_array[i] = T(); else @@ -354,10 +361,10 @@ CGProperty CGProperty::toVariant() const { if (props.isEmpty()) return CGProperty(); - + int nvals = props.count(); const T *props_array = props.constData(); - + QVector converted_vals(nvals); converted_vals.squeeze(); QVariant *converted_vals_array = converted_vals.data(); @@ -366,11 +373,11 @@ CGProperty CGProperty::toVariant() const { converted_vals_array[i].setValue(props_array[i]); } - + return CGProperty(converted_vals); } -/** Return the property for the CutGroup at index 'cgidx' +/** Return the property for the CutGroup at index 'cgidx' \throw SireError::invalid_index */ @@ -381,7 +388,7 @@ const T& CGProperty::at(const CGIdx &cgidx) const return this->operator[](cgidx); } -/** Return the property for the CutGroup at index 'cgidx' +/** Return the property for the CutGroup at index 'cgidx' \throw SireError::invalid_index */ @@ -392,7 +399,35 @@ const T& CGProperty::get(const CGIdx &cgidx) const return this->operator[](cgidx); } -/** Set the value of the property for the CutGroup at +/** Return the value for the passed index, as + a QVariant. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +QVariant CGProperty::getAsVariant(const CGIdx &cgidx) const +{ + const T &value = this->get(cgidx); + return QVariant::fromValue(value); +} + +/** Return the value for this index as a + Property. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +SireBase::PropertyPtr CGProperty::getAsProperty( + const CGIdx &cgidx) const +{ + return SireBase::convert_property(this->get(cgidx)); +} + +/** Set the value of the property for the CutGroup at index 'cgidx' */ template SIRE_OUTOFLINE_TEMPLATE @@ -471,7 +506,7 @@ QDataStream& operator<<(QDataStream &ds, const SireMol::CGProperty &prop) //serialise the base class - this writes the header and version! ds << static_cast(prop); ds << prop.props; - + return ds; } @@ -482,7 +517,7 @@ QDataStream& operator>>(QDataStream &ds, SireMol::CGProperty &prop) { ds >> static_cast(prop); ds >> prop.props; - + return ds; } diff --git a/corelib/src/libs/SireMol/chain.cpp b/corelib/src/libs/SireMol/chain.cpp index 7a25ea0fe..d7779c2ad 100644 --- a/corelib/src/libs/SireMol/chain.cpp +++ b/corelib/src/libs/SireMol/chain.cpp @@ -56,13 +56,13 @@ using namespace SireStream; static const RegisterMetaType r_chainprop(MAGIC_ONLY, "SireMol::ChainProp"); - + /** Serialise to a binary datastream */ QDataStream &operator<<(QDataStream &ds, const ChainProp &chainprop) { writeHeader(ds, r_chainprop, 1) << static_cast(chainprop); - + return ds; } @@ -70,14 +70,14 @@ QDataStream &operator<<(QDataStream &ds, const ChainProp &chainprop) QDataStream &operator>>(QDataStream &ds, ChainProp &chainprop) { VersionID v = readHeader(ds, r_chainprop); - + if (v == 1) { ds >> static_cast(chainprop); } else throw version_error(v, "1", r_chainprop, CODELOC); - + return ds; } @@ -102,7 +102,7 @@ QDataStream &operator<<(QDataStream &ds, const Chain &chain) writeHeader(ds, r_chain, 1); SharedDataStream sds(ds); - + sds << chain.chainidx << static_cast(chain); return ds; @@ -116,9 +116,9 @@ QDataStream &operator>>(QDataStream &ds, Chain &chain) if (v == 1) { SharedDataStream sds(ds); - + sds >> chain.chainidx >> static_cast(chain); - + chain.selected_atoms = AtomSelection(chain.data()); chain.selected_atoms.selectOnly(chain.chainidx); } @@ -134,13 +134,13 @@ Chain::Chain() : ConcreteProperty(), chainidx( ChainIdx::nul /** Construct the chain at ID 'chainid' in the molecule whose data is in 'moldata' - + \throw SireMol::missing_chain \throw SireMol::duplicate_chain \throw SireError::invalid_index */ Chain::Chain(const MoleculeData &moldata, const ChainID &chainid) - : ConcreteProperty(moldata), + : ConcreteProperty(moldata), chainidx( moldata.info().chainIdx(chainid) ) { selected_atoms = AtomSelection(moldata); @@ -169,7 +169,7 @@ Chain& Chain::operator=(const Chain &other) /** Comparison operator */ bool Chain::operator==(const Chain &other) const { - return chainidx == other.chainidx and + return chainidx == other.chainidx and MoleculeView::operator==(other); } @@ -180,10 +180,33 @@ bool Chain::operator!=(const Chain &other) const MoleculeView::operator!=(other); } +MolViewPtr Chain::operator[](int i) const +{ + return this->residue(i); +} + +MolViewPtr Chain::operator[](const QString &name) const +{ + return this->residue(name); +} + +MolViewPtr Chain::operator[](const SireID::Index &idx) const +{ + return this->residue(idx.value()); +} + +MolViewPtr Chain::operator[](const SireBase::Slice &slice) const +{ + return this->residues(slice); +} + /** Return a string representation of this chain */ QString Chain::toString() const { - return QObject::tr( "Chain( %1 )" ).arg( this->name() ); + return QObject::tr( "Chain( %1 num_residues=%2 num_atoms=%3)" ) + .arg( this->name() ) + .arg( this->nResidues() ) + .arg( this->nAtoms() ); } /** Is this chain empty? */ @@ -192,6 +215,11 @@ bool Chain::isEmpty() const return chainidx.isNull(); } +MolViewPtr Chain::toSelector() const +{ + return MolViewPtr( Selector(*this) ); +} + /** Is this chain the entire molecule? */ bool Chain::selectedAll() const { @@ -225,7 +253,7 @@ void Chain::update(const MoleculeData &moldata) .arg(moldata.number()).arg(moldata.info().UID().toString()), CODELOC ); } - + d = moldata; } @@ -241,13 +269,19 @@ ChainIdx Chain::index() const return chainidx; } +/** Return the number of this chain (same as its index) */ +ChainIdx Chain::number() const +{ + return chainidx; +} + /** Return an object that can move a copy of this chain */ Mover Chain::move() const { return Mover(*this); } -/** Return an evaluator that can evaluate properties +/** Return an evaluator that can evaluate properties of this chain */ Evaluator Chain::evaluate() const { @@ -279,21 +313,21 @@ Selector Chain::selector() const return Selector(*this); } -/** Return whether or not this chain contains the atom +/** Return whether or not this chain contains the atom at index 'atomidx' */ bool Chain::contains(AtomIdx atomidx) const { return d->info().contains(chainidx, atomidx); } -/** Return whether or not this chain contains all of +/** Return whether or not this chain contains all of the atoms identified by the ID 'atomid' */ bool Chain::contains(const AtomID &atomid) const { return d->info().contains(chainidx, atomid); } -/** Return whether or not this chain contains some of +/** Return whether or not this chain contains some of the atoms identified by the ID 'atomid' */ bool Chain::intersects(const AtomID &atomid) const { @@ -313,7 +347,7 @@ const QList& Chain::resIdxs() const return d->info().getResiduesIn(chainidx); } -/** Return whether or not this chain contains the +/** Return whether or not this chain contains the residue at index 'residx' */ bool Chain::contains(ResIdx residx) const { @@ -334,6 +368,20 @@ bool Chain::intersects(const ResID &resid) const return d->info().intersects(chainidx, resid); } +/** Return the specified property as a QVariant */ +QVariant Chain::propertyAsVariant(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsVariant(chainidx); +} + +/** Return the specified property as a PropertyPtr */ +PropertyPtr Chain::propertyAsProperty(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsProperty(chainidx); +} + /** Return whether or not there is a ChainProperty at key 'key' */ bool Chain::hasProperty(const PropertyName &key) const { @@ -348,7 +396,7 @@ bool Chain::hasMetadata(const PropertyName &metakey) const /** Return whether the metadata at metakey 'metakey' for the property at key 'key' is a ChainProperty - + \throw SireBase::missing_property */ bool Chain::hasMetadata(const PropertyName &key, @@ -369,9 +417,9 @@ QStringList Chain::metadataKeys() const return d->properties().metadataKeysOfType(); } -/** Return the metakeys of all ChainProperty metadata for +/** Return the metakeys of all ChainProperty metadata for the property at key 'key' - + \throw SireBase::missing_property */ QStringList Chain::metadataKeys(const PropertyName &key) const @@ -393,7 +441,7 @@ void Chain::assertContainsProperty(const PropertyName &key) const /** Assert that this chain has an ChainProperty piece of metadata at metakey 'metakey' - + \throw SireBase::missing_property */ void Chain::assertContainsMetadata(const PropertyName &metakey) const @@ -407,7 +455,7 @@ void Chain::assertContainsMetadata(const PropertyName &metakey) const /** Assert that the property at key 'key' has an ChainProperty piece of metadata at metakey 'metakey' - + \throw SireBase::missing_property */ void Chain::assertContainsMetadata(const PropertyName &key, @@ -456,7 +504,7 @@ namespace SireMol /////// explicitly instantiate chain templates template class Selector; template class Mover; - + template class Mover< Selector >; } diff --git a/corelib/src/libs/SireMol/chain.h b/corelib/src/libs/SireMol/chain.h index 93bf8c5af..14af7a70b 100644 --- a/corelib/src/libs/SireMol/chain.h +++ b/corelib/src/libs/SireMol/chain.h @@ -77,9 +77,10 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Chain&); typedef ChainID ID; typedef ChainIdx Index; typedef ChainName Name; + typedef ChainIdx Number; Chain(); - + Chain(const MoleculeData &moldata, const ChainID &chainid); Chain(const Chain &other); @@ -87,68 +88,79 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Chain&); ~Chain(); Chain& operator=(const Chain &other); - + static const char* typeName(); - + Chain* clone() const; - + bool operator==(const Chain &other) const; bool operator!=(const Chain &other) const; + MolViewPtr operator[](int i) const; + MolViewPtr operator[](const QString &name) const; + MolViewPtr operator[](const SireID::Index &idx) const; + MolViewPtr operator[](const SireBase::Slice &slice) const; + QString toString() const; - + bool isEmpty() const; bool selectedAll() const; - + AtomSelection selection() const; - + + MolViewPtr toSelector() const; + void update(const MoleculeData &moldata); - + ChainName name() const; ChainIdx index() const; - + ChainIdx number() const; + bool hasProperty(const PropertyName &key) const; bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; - + + QVariant propertyAsVariant(const PropertyName &key) const; + SireBase::PropertyPtr propertyAsProperty(const PropertyName &key) const; + template const T& property(const PropertyName &key) const; - + template const T& metadata(const PropertyName &metakey) const; - + template const T& metadata(const PropertyName &key, const PropertyName &metakey) const; - + Mover move() const; Evaluator evaluate() const; ChainEditor edit() const; Selector selector() const; - + int nAtoms() const; - + QList atomIdxs() const; - + bool contains(AtomIdx atomidx) const; bool contains(const AtomID &atomid) const; bool intersects(const AtomID &atomid) const; - + int nResidues() const; - + const QList& resIdxs() const; - + bool contains(ResIdx residx) const; bool contains(const ResID &resid) const; bool intersects(const ResID &resid) const; void assertContainsProperty(const PropertyName &key) const; - + void assertContainsMetadata(const PropertyName &metakey) const; void assertContainsMetadata(const PropertyName &key, const PropertyName &metakey) const; @@ -159,7 +171,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Chain&); template void setMetadata(const QString &metakey, const T &value); - + template void setMetadata(const QString &key, const QString &metakey, const T &value); @@ -167,19 +179,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Chain&); private: /** The index of the Chain in the molecule */ ChainIdx chainidx; - + /** The atoms that are selected as part of this Chain */ AtomSelection selected_atoms; }; #ifndef SIRE_SKIP_INLINE_FUNCTIONS -/** Return the property (of type T) at key 'key' that is +/** Return the property (of type T) at key 'key' that is specifically assigned to this chain. This will only work if the property at this key is a chain property (i.e. has one value for every chain) and that it can be cast to type T - + \throw SireMol::missing_property \throw SireError::invalid_cast */ @@ -208,7 +220,7 @@ const T& Chain::metadata(const PropertyName &key) const /** Return the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireMol::missing_property \throw SireError::invalid_cast */ @@ -218,7 +230,7 @@ const T& Chain::metadata(const PropertyName &key, const PropertyName &metakey) c { const Property &property = d->metadata(key, metakey); const ChainProperty &chain_props = property.asA< ChainProperty >(); - + return chain_props.at(this->index()); } @@ -226,9 +238,9 @@ const T& Chain::metadata(const PropertyName &key, const PropertyName &metakey) c chain to be equal to 'value'. This works by creating a ChainProperty for this molecule, and assigning the value for this chain to 'value'. If there is already - a property at key 'key', then it must be of type + a property at key 'key', then it must be of type ChainProperty for this to work - + \throw SireMol::invalid_cast */ template @@ -239,9 +251,9 @@ void Chain::setProperty(const QString &key, const T &value) value); } -/** Set the metadata at metakey 'metakey' to the value 'value' +/** Set the metadata at metakey 'metakey' to the value 'value' for this residue - + \throw SireError::invalid_cast */ template @@ -254,7 +266,7 @@ void Chain::setMetadata(const QString &metakey, const T &value) /** Set the metadata at metakey 'metakey' for the property at key 'key' to the value 'value' - + \throw SireError::invalid_cast */ template @@ -262,7 +274,7 @@ SIRE_OUTOFLINE_TEMPLATE void Chain::setMetadata(const QString &key, const QString &metakey, const T &value) { - MoleculeView::setMetadata,T>(*d, key, metakey, + MoleculeView::setMetadata,T>(*d, key, metakey, this->index(), value); } @@ -270,7 +282,13 @@ namespace detail { void assertSameSize(Chain*, int nres, int nprops); - + +template<> +SIRE_ALWAYS_INLINE int getCount(const MolInfo &molinfo) +{ + return molinfo.nChains(); +} + template<> SIRE_ALWAYS_INLINE QList getAll(const MolInfo &molinfo) { @@ -343,7 +361,7 @@ void set_metadata(Chain *ptr, MoleculeData &moldata, const QList &values) { assertSameSize(ptr, idxs.count(), values.count()); - + set_metadata,Chain::Index,V>(moldata,idxs,key,metakey,values); } @@ -379,12 +397,12 @@ void set_metadata(Chain*, MoleculeData &moldata, SIREMOL_EXPORT bool has_property(const Chain*, const MoleculeData &moldata, const PropertyName &key); - + SIREMOL_EXPORT bool has_metadata(const Chain*, const MoleculeData &moldata, const PropertyName &metakey); - + SIREMOL_EXPORT bool has_metadata(const Chain*, const MoleculeData &moldata, - const PropertyName &key, const PropertyName &metakey); + const PropertyName &key, const PropertyName &metakey); } //end of namespace detail diff --git a/corelib/src/libs/SireMol/chainid.cpp b/corelib/src/libs/SireMol/chainid.cpp index f1904b025..fc3ba6705 100644 --- a/corelib/src/libs/SireMol/chainid.cpp +++ b/corelib/src/libs/SireMol/chainid.cpp @@ -71,6 +71,12 @@ ChainID::ChainID(const ChainID &other) : ID(other) ChainID::~ChainID() {} +/** Return an AtomID constructed from the passed string */ +ChainIdentifier ChainID::fromString(const QString &id) +{ + return ChainName(id); +} + /** Combine with another ID object */ IDAndSet ChainID::operator+(const ChainID &other) const { diff --git a/corelib/src/libs/SireMol/chainid.h b/corelib/src/libs/SireMol/chainid.h index 24bc56df8..67be0e504 100644 --- a/corelib/src/libs/SireMol/chainid.h +++ b/corelib/src/libs/SireMol/chainid.h @@ -72,7 +72,7 @@ class MoleculeGroup; class MolGroupsBase; class MolNum; -/** This is the base class of all identifiers that are used +/** This is the base class of all identifiers that are used to identify a chain within a molecule @author Christopher Woods @@ -89,20 +89,20 @@ class SIREMOL_EXPORT ChainID : public SireID::ID ChainID(const ChainID &other); virtual ~ChainID(); - + Specify operator[](qint64 i) const; Specify operator[](const SireBase::Range &range) const; Specify operator()(const SireBase::Range &range) const; Specify operator()(qint64 i) const; Specify operator()(qint64 start, qint64 end) const; Specify operator()(qint64 start, qint64 end, qint64 increment) const; - + IDAndSet operator+(const ChainID &other) const; ChainResID operator+(const ResID &other) const; GroupAtomID operator+(const AtomID &other) const; GroupGroupID operator+(const SegID &other) const; GroupGroupID operator+(const CGID &other) const; - + IDAndSet operator-(const ChainID &other) const; ChainResID operator-(const ResID &other) const; GroupAtomID operator-(const AtomID &other) const; @@ -122,7 +122,7 @@ class SIREMOL_EXPORT ChainID : public SireID::ID GroupAtomID operator&(const AtomID &other) const; GroupGroupID operator&(const SegID &other) const; GroupGroupID operator&(const CGID &other) const; - + IDOrSet operator*(const ChainID &other) const; IDOrSet operator||(const ChainID &other) const; IDOrSet operator|(const ChainID &other) const; @@ -140,54 +140,56 @@ class SIREMOL_EXPORT ChainID : public SireID::ID AtomsIn atoms() const; AtomsIn atom(int i) const; AtomsIn atoms(int i, int j) const; - + ResIn residues() const; ResIn residue(int i) const; ResIn residues(int i, int j) const; - + + static ChainIdentifier fromString(const QString &id); + static SireID::MatchAll any(); - + SireID::InvertMatch invert() const; SireID::InvertMatch inverse() const; - + static const char* typeName() { return "SireMol::ChainID"; } - + virtual ChainID* clone() const=0; - /** Map this ID back to the indicies of the chains in the molecule, + /** Map this ID back to the indicies of the chains in the molecule, using the passed MoleculeInfo to do the mapping */ virtual QList map(const MolInfo &molinfo) const=0; virtual QList map(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Chain selectFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Selector selectAllFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Chain selectFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; virtual Chain selectFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual Chain selectFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; - virtual QHash< MolNum,Selector > + virtual QHash< MolNum,Selector > selectAllFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; diff --git a/corelib/src/libs/SireMol/chainproperty.hpp b/corelib/src/libs/SireMol/chainproperty.hpp index 674275e64..182dae1f5 100644 --- a/corelib/src/libs/SireMol/chainproperty.hpp +++ b/corelib/src/libs/SireMol/chainproperty.hpp @@ -32,6 +32,7 @@ #include #include "SireBase/qvariant_metatype.h" +#include "SireBase/convert_property.hpp" #include "moleculeinfodata.h" #include "molviewproperty.h" @@ -72,30 +73,33 @@ class SIREMOL_EXPORT ChainProp : public MolViewProperty public: ChainProp(); ChainProp(const ChainProp &other); - + virtual ~ChainProp(); virtual bool canConvert(const QVariant &value) const=0; - + virtual void assignFrom(const ChainProperty &values)=0; - + + virtual QVariant getAsVariant(const ChainIdx &chainidx) const=0; + virtual SireBase::PropertyPtr getAsProperty(const ChainIdx &chainidx) const=0; + virtual ChainProperty toVariant() const=0; - + virtual void assertCanConvert(const QVariant &value) const=0; }; /** This is a property that can hold one value for each chain in the molecule. - + mol.setProperty( "charge", ChainCharges( [....] ) ) mol.setProperty( "lj", ChainLJs( [....] ) ) chain.setProperty( "charge", 0.0 * mod_e ) - + @author Christopher Woods */ template -class SIREMOL_EXPORT ChainProperty +class SIREMOL_EXPORT ChainProperty : public SireBase::ConcreteProperty, ChainProp> { @@ -106,19 +110,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, ChainProperty ChainProperty(); ChainProperty(const MoleculeInfoData &molinfo); - + ChainProperty(const QVector &values); - + ChainProperty(const ChainProperty &other); - + ~ChainProperty(); - + ChainProperty& operator=(const ChainProperty &other); - + static const char* typeName(); - + ChainProperty* clone() const; - + bool operator==(const ChainProperty &other) const; bool operator!=(const ChainProperty &other) const; @@ -126,6 +130,9 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, ChainProperty const T& at(const ChainIdx &chainidx) const; const T& get(const ChainIdx &chainidx) const; + QVariant getAsVariant(const ChainIdx &idx) const; + SireBase::PropertyPtr getAsProperty(const ChainIdx &idx) const; + ChainProperty& set(ChainIdx chainidx, const T &value); const T* data() const; @@ -137,21 +144,21 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, ChainProperty int count() const; QString toString() const; - + const QVector& array() const; - + int nChains() const; void assignFrom(const ChainProperty &values); - + static ChainProperty fromVariant(const ChainProperty &values); - + ChainProperty toVariant() const; - + bool isCompatibleWith(const MoleculeInfoData &molinfo) const; - + bool canConvert(const QVariant &value) const; - + void assertCanConvert(const QVariant &value) const; private: @@ -168,7 +175,7 @@ ChainProperty::ChainProperty() : SireBase::ConcreteProperty,ChainProp>() {} -/** Construct space for the values of the property for all of the +/** Construct space for the values of the property for all of the chains in the molecule described by 'molinfo' */ template SIRE_OUTOFLINE_TEMPLATE @@ -194,7 +201,7 @@ ChainProperty::ChainProperty(const QVector &values) /** Assert that the variant can be converted to a value that can be held in this list of properties - + \throw SireError::invalid_cast */ template @@ -251,7 +258,7 @@ bool ChainProperty::operator!=(const ChainProperty &other) const return props != other.props; } -/** Return the property for the chain at index 'chainidx' +/** Return the property for the chain at index 'chainidx' \throw SireError::invalid_index */ @@ -308,13 +315,13 @@ ChainProperty ChainProperty::fromVariant(const ChainProperty &va { ChainProperty array; array.assignFrom(variant); - + return array; } /** Assign the values of this property from the array of variants in 'values' - + \throw SireError::invalid_cast */ template @@ -326,19 +333,19 @@ void ChainProperty::assignFrom(const ChainProperty &variant) props.clear(); return; } - + int nvals = variant.count(); const QVariant *variant_array = variant.constData(); - + props = QVector(nvals); props.squeeze(); T *props_array = props.data(); - + for (int i=0; i::assertCanConvert(value); - + if (value.isNull()) props_array[i] = T(); else @@ -353,10 +360,10 @@ ChainProperty ChainProperty::toVariant() const { if (props.isEmpty()) return ChainProperty(); - + int nvals = props.count(); const T *props_array = props.constData(); - + QVector converted_vals(nvals); converted_vals.squeeze(); QVariant *converted_vals_array = converted_vals.data(); @@ -365,11 +372,11 @@ ChainProperty ChainProperty::toVariant() const { converted_vals_array[i].setValue(props_array[i]); } - + return ChainProperty(converted_vals); } -/** Return the property for the chain at index 'chainidx' +/** Return the property for the chain at index 'chainidx' \throw SireError::invalid_index */ @@ -380,7 +387,7 @@ const T& ChainProperty::at(const ChainIdx &chainidx) const return this->operator[](chainidx); } -/** Return the property for the chain at index 'chainidx' +/** Return the property for the chain at index 'chainidx' \throw SireError::invalid_index */ @@ -391,7 +398,35 @@ const T& ChainProperty::get(const ChainIdx &chainidx) const return this->operator[](chainidx); } -/** Set the value of the property for the chain at +/** Return the value for the passed index, as + a QVariant. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +QVariant ChainProperty::getAsVariant(const ChainIdx &chainidx) const +{ + const T &value = this->get(chainidx); + return QVariant::fromValue(value); +} + +/** Return the value for this index as a + Property. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +SireBase::PropertyPtr ChainProperty::getAsProperty( + const ChainIdx &chainidx) const +{ + return SireBase::convert_property(this->get(chainidx)); +} + +/** Set the value of the property for the chain at index 'chainidx' */ template SIRE_OUTOFLINE_TEMPLATE @@ -470,7 +505,7 @@ QDataStream& operator<<(QDataStream &ds, const SireMol::ChainProperty &prop) //serialise the base class - this writes the header and version! ds << static_cast(prop); ds << prop.props; - + return ds; } @@ -481,7 +516,7 @@ QDataStream& operator>>(QDataStream &ds, SireMol::ChainProperty &prop) { ds >> static_cast(prop); ds >> prop.props; - + return ds; } diff --git a/corelib/src/libs/SireMol/chargeperturbation.cpp b/corelib/src/libs/SireMol/chargeperturbation.cpp index f752bdfea..30ceeda46 100644 --- a/corelib/src/libs/SireMol/chargeperturbation.cpp +++ b/corelib/src/libs/SireMol/chargeperturbation.cpp @@ -31,6 +31,7 @@ #include "molecule.h" #include "moleditor.h" #include "mover.hpp" +#include "selector.hpp" #include "SireCAS/values.h" @@ -48,9 +49,9 @@ QDataStream &operator<<(QDataStream &ds, const ChargePerturbation &chgpert) { writeHeader(ds, r_chgpert, 1); - + ds << static_cast(chgpert); - + return ds; } @@ -58,18 +59,18 @@ QDataStream &operator>>(QDataStream &ds, ChargePerturbation &chgpert) { VersionID v = readHeader(ds, r_chgpert); - + if (v == 1) { ds >> static_cast(chgpert); } else throw version_error(v, "1", r_chgpert, CODELOC); - + return ds; } -/** Constructor - this creates a charge perturbation that +/** Constructor - this creates a charge perturbation that perturbs from charges in "initial_charge" to charges in "final_charge", placing the current charges in "charge", and using Perturbation::defaultEquation() to map the @@ -137,48 +138,48 @@ bool ChargePerturbation::operator!=(const ChargePerturbation &other) const QSet ChargePerturbation::requiredProperties() const { QSet props; - + PropertyName prop = propertyMap()["charge"]; - + if (prop.hasSource()) props.insert( prop.source() ); - + prop = propertyMap()["initial_charge"]; - + if (prop.hasSource()) props.insert( prop.source() ); - + prop = propertyMap()["final_charge"]; - + if (prop.hasSource()) props.insert( prop.source() ); - + return props; } /** Return whether or not this perturbation with the passed values would change the molecule 'molecule' */ -bool ChargePerturbation::wouldChange(const Molecule &molecule, +bool ChargePerturbation::wouldChange(const Molecule &molecule, const Values &values) const { try { - const AtomCharges &initial_chgs = molecule.property( + const AtomCharges &initial_chgs = molecule.property( propertyMap()["initial_charge"] ) .asA(); - - const AtomCharges &final_chgs = molecule.property( + + const AtomCharges &final_chgs = molecule.property( propertyMap()["final_charge"] ) .asA(); - const AtomCharges &chgs = molecule.property( + const AtomCharges &chgs = molecule.property( propertyMap()["charge"] ) .asA(); - + const Expression &f = this->mappingFunction(); const Symbol &initial = this->symbols().initial(); const Symbol &final = this->symbols().final(); - + for (CGIdx i(0); i(); - + const AtomCharges &final_chgs = molecule.property( propertyMap()["final_charge"] ) .asA(); - + AtomCharges chgs(initial_chgs); - + const Expression &f = this->mappingFunction(); const Symbol &initial = this->symbols().initial(); const Symbol &final = this->symbols().final(); - + for (CGIdx i(0); i r_cgprop(MAGIC_ONLY, "SireMol::CGProp"); - + /** Serialise to a binary datastream */ QDataStream &operator<<(QDataStream &ds, const CGProp &cgprop) { writeHeader(ds, r_cgprop, 1) << static_cast(cgprop); - + return ds; } @@ -71,14 +71,14 @@ QDataStream &operator<<(QDataStream &ds, const CGProp &cgprop) QDataStream &operator>>(QDataStream &ds, CGProp &cgprop) { VersionID v = readHeader(ds, r_cgprop); - + if (v == 1) { ds >> static_cast(cgprop); } else throw version_error(v, "1", r_cgprop, CODELOC); - + return ds; } @@ -103,7 +103,7 @@ QDataStream &operator<<(QDataStream &ds, const CutGroup &cg) writeHeader(ds, r_cg, 1); SharedDataStream sds(ds); - + sds << cg.cgidx << static_cast(cg); return ds; @@ -117,7 +117,7 @@ QDataStream &operator>>(QDataStream &ds, CutGroup &cg) if (v == 1) { SharedDataStream sds(ds); - + sds >> cg.cgidx >> static_cast(cg); } else @@ -132,13 +132,13 @@ CutGroup::CutGroup() : ConcreteProperty(), cgidx( CGIdx:: /** Construct the CutGroup at ID 'cgid' in the molecule whose data is in 'moldata' - + \throw SireMol::missing_CutGroup \throw SireMol::duplicate_CutGroup \throw SireError::invalid_index */ CutGroup::CutGroup(const MoleculeData &moldata, const CGID &cgid) - : ConcreteProperty(moldata), + : ConcreteProperty(moldata), cgidx( moldata.info().cgIdx(cgid) ) {} @@ -162,7 +162,7 @@ CutGroup& CutGroup::operator=(const CutGroup &other) /** Comparison operator */ bool CutGroup::operator==(const CutGroup &other) const { - return cgidx == other.cgidx and + return cgidx == other.cgidx and MoleculeView::operator==(other); } @@ -185,6 +185,11 @@ bool CutGroup::isEmpty() const return cgidx.isNull(); } +MolViewPtr CutGroup::toSelector() const +{ + return MolViewPtr( Selector(*this) ); +} + /** Is this CutGroup the whole molecule? */ bool CutGroup::selectedAll() const { @@ -196,7 +201,7 @@ AtomSelection CutGroup::selection() const { AtomSelection selected_atoms(this->data()); selected_atoms.selectOnly(cgidx); - + return selected_atoms; } @@ -221,7 +226,7 @@ void CutGroup::update(const MoleculeData &moldata) .arg(moldata.number()).arg(moldata.info().UID().toString()), CODELOC ); } - + d = moldata; } @@ -237,13 +242,19 @@ CGIdx CutGroup::index() const return cgidx; } +/** Return the number of this CutGroup (same as the index) */ +CGIdx CutGroup::number() const +{ + return cgidx; +} + /** Return an object that can move a copy of this CutGroup */ Mover CutGroup::move() const { return Mover(*this); } -/** Return an evaluator that can evaluate properties +/** Return an evaluator that can evaluate properties of this CutGroup */ Evaluator CutGroup::evaluate() const { @@ -275,14 +286,14 @@ const QList& CutGroup::atomIdxs() const return d->info().getAtomsIn(cgidx); } -/** Return whether or not this CutGroup contains the atom +/** Return whether or not this CutGroup contains the atom at index 'atomidx' in the molecule */ bool CutGroup::contains(AtomIdx atomidx) const { return d->info().contains(cgidx, atomidx); } -/** Return whether or not this CutGroup contains all of +/** Return whether or not this CutGroup contains all of the atoms that match the ID 'atomid' */ bool CutGroup::contains(const AtomID &atomid) const { @@ -296,6 +307,20 @@ bool CutGroup::intersects(const AtomID &atomid) const return d->info().intersects(cgidx, atomid); } +/** Return the specified property as a QVariant */ +QVariant CutGroup::propertyAsVariant(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsVariant(cgidx); +} + +/** Return the specified property as a PropertyPtr */ +PropertyPtr CutGroup::propertyAsProperty(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsProperty(cgidx); +} + /** Return whether or not there is a CGProperty at key 'key' */ bool CutGroup::hasProperty(const PropertyName &key) const { @@ -320,9 +345,9 @@ QStringList CutGroup::metadataKeys() const return d->properties().metadataKeysOfType(); } -/** Return the metakeys of all CGProperty metadata for +/** Return the metakeys of all CGProperty metadata for the property at key 'key' - + \throw SireBase::missing_property */ QStringList CutGroup::metadataKeys(const PropertyName &key) const @@ -332,7 +357,7 @@ QStringList CutGroup::metadataKeys(const PropertyName &key) const /** Return whether the metadata at metakey 'metakey' for the property at key 'key' is a CGProperty - + \throw SireBase::missing_property */ bool CutGroup::hasMetadata(const PropertyName &key, @@ -355,7 +380,7 @@ void CutGroup::assertContainsProperty(const PropertyName &key) const /** Assert that this CutGroup has an CGProperty piece of metadata at metakey 'metakey' - + \throw SireBase::missing_property */ void CutGroup::assertContainsMetadata(const PropertyName &metakey) const @@ -369,7 +394,7 @@ void CutGroup::assertContainsMetadata(const PropertyName &metakey) const /** Assert that the property at key 'key' has an CGProperty piece of metadata at metakey 'metakey' - + \throw SireBase::missing_property */ void CutGroup::assertContainsMetadata(const PropertyName &key, diff --git a/corelib/src/libs/SireMol/cutgroup.h b/corelib/src/libs/SireMol/cutgroup.h index ca579f71d..2473bccaf 100644 --- a/corelib/src/libs/SireMol/cutgroup.h +++ b/corelib/src/libs/SireMol/cutgroup.h @@ -79,6 +79,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, CutGroup&); typedef CGID ID; typedef CGIdx Index; typedef CGName Name; + typedef CGIdx Number; CutGroup(); @@ -89,50 +90,56 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, CutGroup&); ~CutGroup(); CutGroup& operator=(const CutGroup &other); - + bool operator==(const CutGroup &other) const; bool operator!=(const CutGroup &other) const; - + static const char* typeName(); - + CutGroup* clone() const; QString toString() const; - + bool isEmpty() const; bool selectedAll() const; - + AtomSelection selection() const; - + + MolViewPtr toSelector() const; + void update(const MoleculeData &moldata); - + const CGName& name() const; CGIdx index() const; - + CGIdx number() const; + bool hasProperty(const PropertyName &key) const; bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; - + + QVariant propertyAsVariant(const PropertyName &key) const; + SireBase::PropertyPtr propertyAsProperty(const PropertyName &key) const; + template const T& property(const PropertyName &key) const; - + template const T& metadata(const PropertyName &metakey) const; - + template const T& metadata(const PropertyName &key, const PropertyName &metakey) const; - + Mover move() const; Evaluator evaluate() const; CGEditor edit() const; Selector selector() const; - + int nAtoms() const; const QList& atomIdxs() const; @@ -140,9 +147,9 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, CutGroup&); bool contains(const AtomID &atomid) const; bool contains(AtomIdx atomidx) const; bool intersects(const AtomID &atomid) const; - + void assertContainsProperty(const PropertyName &key) const; - + void assertContainsMetadata(const PropertyName &metakey) const; void assertContainsMetadata(const PropertyName &key, const PropertyName &metakey) const; @@ -154,7 +161,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, CutGroup&); template void setMetadata(const QString &key, const QString &metakey, const T &value); - + template void setMetadata(const QString &metakey, const T &value); @@ -165,12 +172,12 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, CutGroup&); #ifndef SIRE_SKIP_INLINE_FUNCTIONS -/** Return the property (of type T) at key 'key' that is +/** Return the property (of type T) at key 'key' that is specifically assigned to this CutGroup. This will only work if the property at this key is a CutGroup property (i.e. has one value for every CutGroup) and that it can be cast to type T - + \throw SireMol::missing_property \throw SireError::invalid_cast */ @@ -199,13 +206,13 @@ const T& CutGroup::metadata(const PropertyName &key) const /** Return the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireMol::missing_property \throw SireError::invalid_cast */ template SIRE_OUTOFLINE_TEMPLATE -const T& CutGroup::metadata(const PropertyName &key, +const T& CutGroup::metadata(const PropertyName &key, const PropertyName &metakey) const { const Property &property = d->metadata(key, metakey); @@ -217,9 +224,9 @@ const T& CutGroup::metadata(const PropertyName &key, CutGroup to be equal to 'value'. This works by creating a CGProperty for this molecule, and assigning the value for this CutGroup to 'value'. If there is already - a property at key 'key', then it must be of type + a property at key 'key', then it must be of type CGProperty for this to work - + \throw SireMol::invalid_cast */ template @@ -230,9 +237,9 @@ void CutGroup::setProperty(const QString &key, const T &value) value); } -/** Set the metadata at metakey 'metakey' to the value 'value' +/** Set the metadata at metakey 'metakey' to the value 'value' for this residue - + \throw SireError::invalid_cast */ template @@ -245,7 +252,7 @@ void CutGroup::setMetadata(const QString &metakey, const T &value) /** Set the metadata at metakey 'metakey' for the property at key 'key' to the value 'value' - + \throw SireError::invalid_cast */ template @@ -253,7 +260,7 @@ SIRE_OUTOFLINE_TEMPLATE void CutGroup::setMetadata(const QString &key, const QString &metakey, const T &value) { - MoleculeView::setMetadata,T>(*d, key, metakey, this->index(), + MoleculeView::setMetadata,T>(*d, key, metakey, this->index(), value); } @@ -261,7 +268,13 @@ namespace detail { void assertSameSize(CutGroup*, int nres, int nprops); - + +template<> +SIRE_ALWAYS_INLINE int getCount(const MolInfo &molinfo) +{ + return molinfo.nCutGroups(); +} + template<> SIRE_ALWAYS_INLINE QList getAll(const MolInfo &molinfo) { @@ -334,7 +347,7 @@ void set_metadata(CutGroup *ptr, MoleculeData &moldata, const QList &values) { assertSameSize(ptr, idxs.count(), values.count()); - + set_metadata,CutGroup::Index,V>(moldata,idxs,key,metakey,values); } @@ -370,12 +383,12 @@ void set_metadata(CutGroup*, MoleculeData &moldata, SIREMOL_EXPORT bool has_property(const CutGroup*, const MoleculeData &moldata, const PropertyName &key); - + SIREMOL_EXPORT bool has_metadata(const CutGroup*, const MoleculeData &moldata, const PropertyName &metakey); - + SIREMOL_EXPORT bool has_metadata(const CutGroup*, const MoleculeData &moldata, - const PropertyName &key, const PropertyName &metakey); + const PropertyName &key, const PropertyName &metakey); } //end of namespace detail diff --git a/corelib/src/libs/SireMol/cuttingfunction.cpp b/corelib/src/libs/SireMol/cuttingfunction.cpp index af15cd4c9..68ef82e12 100644 --- a/corelib/src/libs/SireMol/cuttingfunction.cpp +++ b/corelib/src/libs/SireMol/cuttingfunction.cpp @@ -34,6 +34,7 @@ #include "molecule.h" #include "mover.hpp" #include "moleditor.h" +#include "selector.hpp" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -48,14 +49,14 @@ using namespace SireStream; static const RegisterMetaType r_cutfunc( MAGIC_ONLY, "SireMol::CuttingFunction" ); - + /** Serialise to a binary datastream */ QDataStream &operator<<(QDataStream &ds, const CuttingFunction &cutfunc) { writeHeader(ds, r_cutfunc, 1); - + ds << static_cast(cutfunc); - + return ds; } @@ -63,14 +64,14 @@ QDataStream &operator<<(QDataStream &ds, const CuttingFunction &cutfunc) QDataStream &operator>>(QDataStream &ds, CuttingFunction &cutfunc) { VersionID v = readHeader(ds, r_cutfunc); - + if (v == 1) { ds >> static_cast(cutfunc); } else throw version_error( v, "1", r_cutfunc, CODELOC ); - + return ds; } @@ -92,9 +93,9 @@ CuttingFunction::~CuttingFunction() Molecule CuttingFunction::operator()(const Molecule &molecule) const { MolStructureEditor moleditor( molecule ); - + moleditor = this->operator()(moleditor); - + return moleditor.commit(); } diff --git a/corelib/src/libs/SireMol/editor.hpp b/corelib/src/libs/SireMol/editor.hpp index 95f907909..420215e10 100644 --- a/corelib/src/libs/SireMol/editor.hpp +++ b/corelib/src/libs/SireMol/editor.hpp @@ -45,7 +45,7 @@ class MolEditor; /** This is the class that is used to edit the molecule view of type 'T' - + @author Christopher Woods */ template @@ -53,46 +53,75 @@ class Editor : public T { public: ~Editor(); - + Editor& operator=(const Editor &other); Editor& operator=(const T &other); + MolViewPtr operator[](int i); + MolViewPtr operator[](const QString &name); + MolViewPtr operator[](const AtomID &atomid); + MolViewPtr operator[](const ResID &resid); + MolViewPtr operator[](const CGID &cgid); + MolViewPtr operator[](const ChainID &chainid); + MolViewPtr operator[](const SegID &segid); + MolViewPtr operator[](const SireID::Index &idx); + template Parent& setProperty(const SireBase::PropertyName &key, const V &value); - + template Parent& setMetadata(const SireBase::PropertyName &metakey, const V &value); - + template - Parent& setMetadata(const SireBase::PropertyName &key, + Parent& setMetadata(const SireBase::PropertyName &key, const SireBase::PropertyName &metakey, const V &value); - + Parent& removeProperty(const SireBase::PropertyName &key); Parent& removeMetadata(const SireBase::PropertyName &metakey); - Parent& removeMetadata(const SireBase::PropertyName &key, + Parent& removeMetadata(const SireBase::PropertyName &key, const SireBase::PropertyName &metakey); AtomEditor atom(); - AtomEditor atom(const AtomID &atomid, + AtomEditor atom(int i, + const PropertyMap &map = PropertyMap()); + AtomEditor atom(const QString &name, const PropertyMap &map = PropertyMap()); - + AtomEditor atom(const AtomID &atomid, + const PropertyMap &map = PropertyMap()); + CGEditor cutGroup(); + CGEditor cutGroup(int i, + const PropertyMap &map = PropertyMap()); + CGEditor cutGroup(const QString &name, + const PropertyMap &map = PropertyMap()); CGEditor cutGroup(const CGID &cgid, const PropertyMap &map = PropertyMap()); - + ResEditor residue(); + ResEditor residue(int i, + const PropertyMap &map = PropertyMap()); + ResEditor residue(const QString &name, + const PropertyMap &map = PropertyMap()); ResEditor residue(const ResID &resid, const PropertyMap &map = PropertyMap()); - + ChainEditor chain(); + ChainEditor chain(int i, + const PropertyMap &map = PropertyMap()); + ChainEditor chain(const QString &name, + const PropertyMap &map = PropertyMap()); ChainEditor chain(const ChainID &chainid, const PropertyMap &map = PropertyMap()); - + SegEditor segment(); + SegEditor segment(int i, + const PropertyMap &map = PropertyMap()); + SegEditor segment(const QString &name, + const PropertyMap &map = PropertyMap()); SegEditor segment(const SegID &segid, const PropertyMap &map = PropertyMap()); - + MolEditor molecule(); AtomEditor select(const AtomID &atomid, @@ -113,7 +142,7 @@ class Editor : public T protected: Editor(); Editor(const T &view); - + Editor(const Editor &other); }; @@ -161,7 +190,7 @@ SIRE_OUTOFLINE_TEMPLATE Editor& Editor::operator=(const Editor &other) { T::operator=(other); - + return *this; } @@ -171,20 +200,82 @@ SIRE_OUTOFLINE_TEMPLATE Editor& Editor::operator=(const T &other) { T::operator=(other); - + return *this; } +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](int i) +{ + return this->atom(i); +} + +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](const QString &key) +{ + return this->atom(key); +} + +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](const AtomID &atomid) +{ + return this->atom(atomid); +} + +/** Return the residue(s) that match 'resid' in this view of the molecule */ +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](const ResID &resid) +{ + return this->residue(resid); +} + +/** Return the CutGroups(s) that match 'resid' in this view of the molecule */ +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](const CGID &cgid) +{ + return this->cutGroup(cgid); +} + +/** Return the residue(s) that match 'resid' in this view of the molecule */ +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](const ChainID &chainid) +{ + return this->chain(chainid); +} + +/** Return the residue(s) that match 'resid' in this view of the molecule */ +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](const SegID &segid) +{ + return this->segment(segid); +} + +/** This is an overload of operator[](int), allowing a SireID::Index to be used + as the int */ +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Editor::operator[](const SireID::Index &idx) +{ + return this->operator[](idx.value()); +} + /** Expose the protected 'T::setProperty()' function */ template template SIRE_OUTOFLINE_TEMPLATE -Parent& Editor::setProperty(const SireBase::PropertyName &key, +Parent& Editor::setProperty(const SireBase::PropertyName &key, const V &value) { if (key.hasSource()) T::setProperty(key.source(), value); - + return static_cast(*this); } @@ -192,38 +283,38 @@ Parent& Editor::setProperty(const SireBase::PropertyName &key, template template SIRE_OUTOFLINE_TEMPLATE -Parent& Editor::setMetadata(const SireBase::PropertyName &metakey, +Parent& Editor::setMetadata(const SireBase::PropertyName &metakey, const V &value) { if (metakey.hasSource()) T::setMetadata(metakey.source(), value); - + return static_cast(*this); } -/** Expose the protected 'T::setMetadata()' function +/** Expose the protected 'T::setMetadata()' function \throw SireBase::missing_property */ template template SIRE_OUTOFLINE_TEMPLATE -Parent& Editor::setMetadata(const SireBase::PropertyName &key, +Parent& Editor::setMetadata(const SireBase::PropertyName &key, const SireBase::PropertyName &metakey, const V &value) { if (key.hasSource() and metakey.hasSource()) T::setMetadata(key.source(), metakey.source(), value); - + return static_cast(*this); } /** Completely remove the property 'key', if this is valid property for this view. Note that this will remove this - property for *all* views, e.g. if this is a Mover, + property for *all* views, e.g. if this is a Mover, then this will remove the property if it is an AtomProp, - and it will remove the property for *all* atoms. - + and it will remove the property for *all* atoms. + \throw SireBase::missing_property */ template @@ -235,16 +326,16 @@ Parent& Editor::removeProperty(const SireBase::PropertyName &key) T::assertContainsProperty(key.source()); this->d->removeProperty(key.source()); } - + return static_cast(*this); } /** Completely remove the metadata 'metakey', if this is valid property for this view. Note that this will remove this - property for *all* views, e.g. if this is a Mover, + property for *all* views, e.g. if this is a Mover, then this will remove the property if it is an AtomProp, - and it will remove the property for *all* atoms. - + and it will remove the property for *all* atoms. + \throw SireBase::missing_property */ template @@ -256,22 +347,22 @@ Parent& Editor::removeMetadata(const SireBase::PropertyName &metakey) T::assertContainsMetadata(metakey.source()); this->d->removeMetadata(metakey.source()); } - + return static_cast(*this); } /** Completely remove metadata with metakey 'metakey' from the property with 'key', if this is valid property for this view. Note that this will remove this - property for *all* views, e.g. if this is a Mover, + property for *all* views, e.g. if this is a Mover, then this will remove the property if it is an AtomProp, - and it will remove the property for *all* atoms. - + and it will remove the property for *all* atoms. + \throw SireBase::missing_property */ template SIRE_OUTOFLINE_TEMPLATE -Parent& Editor::removeMetadata(const SireBase::PropertyName &key, +Parent& Editor::removeMetadata(const SireBase::PropertyName &key, const SireBase::PropertyName &metakey) { if (key.hasSource() and metakey.hasSource()) @@ -279,13 +370,13 @@ Parent& Editor::removeMetadata(const SireBase::PropertyName &key, T::assertContainsMetadata(key.source(), metakey.source()); this->d->removeMetadata(key.source(), metakey.source()); } - + return static_cast(*this); } /** Return the atom of this view - for this to work, only a single atom should be contained in this view - + \throw SireMol::missing_atom \throw SireMol::duplicate_atom */ @@ -296,6 +387,20 @@ AtomEditor Editor::atom() return AtomEditor( MoleculeView::atom() ); } +template +SIRE_OUTOFLINE_TEMPLATE +AtomEditor Editor::atom(int i, const PropertyMap &map) +{ + return AtomEditor( MoleculeView::atom(i, map) ); +} + +template +SIRE_OUTOFLINE_TEMPLATE +AtomEditor Editor::atom(const QString &name, const PropertyMap &map) +{ + return AtomEditor( MoleculeView::atom(name, map) ); +} + /** Return the atom from this view that matches the ID 'atomid' \throw SireMol::missing_atom @@ -309,9 +414,9 @@ AtomEditor Editor::atom(const AtomID &atomid, const PropertyMap &map) return AtomEditor( MoleculeView::atom(atomid, map) ); } -/** Return the CutGroup involved with this view - for this +/** Return the CutGroup involved with this view - for this to work, only a single CutGroup should be involved in this view - + \throw SireMol::missing_cutgroup \throw SireMol::duplicate_cutgroup */ @@ -322,6 +427,20 @@ CGEditor Editor::cutGroup() return CGEditor( MoleculeView::cutGroup() ); } +template +SIRE_OUTOFLINE_TEMPLATE +CGEditor Editor::cutGroup(int i, const PropertyMap &map) +{ + return CGEditor( MoleculeView::cutGroup(i, map) ); +} + +template +SIRE_OUTOFLINE_TEMPLATE +CGEditor Editor::cutGroup(const QString &name, const PropertyMap &map) +{ + return CGEditor( MoleculeView::cutGroup(name, map) ); +} + /** Return the CutGroups from this view that match the ID 'cgid' \throw SireMol::missing_cutgroup @@ -334,10 +453,10 @@ CGEditor Editor::cutGroup(const CGID &cgid, const PropertyMap &map) { return CGEditor( MoleculeView::cutGroup(cgid, map) ); } - -/** Return the residue involved with this view - for this + +/** Return the residue involved with this view - for this to work, only a single residue should be involved in this view - + \throw SireMol::missing_residue \throw SireMol::duplicate_residue */ @@ -348,6 +467,20 @@ ResEditor Editor::residue() return ResEditor( MoleculeView::residue() ); } +template +SIRE_OUTOFLINE_TEMPLATE +ResEditor Editor::residue(int i, const PropertyMap &map) +{ + return ResEditor( MoleculeView::residue(i, map) ); +} + +template +SIRE_OUTOFLINE_TEMPLATE +ResEditor Editor::residue(const QString &name, const PropertyMap &map) +{ + return ResEditor( MoleculeView::residue(name, map) ); +} + /** Return the residues from this view that match the ID 'resid' \throw SireMol::missing_residue @@ -360,10 +493,10 @@ ResEditor Editor::residue(const ResID &resid, const PropertyMap &map) { return ResEditor( MoleculeView::residue(resid, map) ); } - -/** Return the chain involved with this view - for this + +/** Return the chain involved with this view - for this to work, only a single chain should be involved in this view - + \throw SireMol::missing_chain \throw SireMol::duplicate_chain */ @@ -374,6 +507,20 @@ ChainEditor Editor::chain() return ChainEditor( MoleculeView::chain() ); } +template +SIRE_OUTOFLINE_TEMPLATE +ChainEditor Editor::chain(int i, const PropertyMap &map) +{ + return ChainEditor( MoleculeView::chain(i, map) ); +} + +template +SIRE_OUTOFLINE_TEMPLATE +ChainEditor Editor::chain(const QString &name, const PropertyMap &map) +{ + return ChainEditor( MoleculeView::chain(name, map) ); +} + /** Return the chains from this view that match the ID 'chainid' \throw SireMol::missing_chain @@ -386,10 +533,10 @@ ChainEditor Editor::chain(const ChainID &chainid, const PropertyMap & { return ChainEditor( MoleculeView::chain(chainid, map) ); } - -/** Return the segment involved with this view - for this + +/** Return the segment involved with this view - for this to work, only a single segment should be involved in this view - + \throw SireMol::missing_segment \throw SireMol::duplicate_segment */ @@ -400,6 +547,20 @@ SegEditor Editor::segment() return SegEditor( MoleculeView::segment() ); } +template +SIRE_OUTOFLINE_TEMPLATE +SegEditor Editor::segment(int i, const PropertyMap &map) +{ + return SegEditor( MoleculeView::segment(i, map) ); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SegEditor Editor::segment(const QString &name, const PropertyMap &map) +{ + return SegEditor( MoleculeView::segment(name, map) ); +} + /** Return the segments from this view that match the ID 'segid' \throw SireMol::missing_segment @@ -412,7 +573,7 @@ SegEditor Editor::segment(const SegID &segid, const PropertyMap &map) { return SegEditor( MoleculeView::segment(segid, map) ); } - + /** Return the editor for the molecule that is viewed */ template SIRE_OUTOFLINE_TEMPLATE diff --git a/corelib/src/libs/SireMol/evaluator.cpp b/corelib/src/libs/SireMol/evaluator.cpp index 290da288e..51d3f97a7 100644 --- a/corelib/src/libs/SireMol/evaluator.cpp +++ b/corelib/src/libs/SireMol/evaluator.cpp @@ -40,6 +40,7 @@ #include "molecule.h" #include "mover.hpp" #include "editor.hpp" +#include "core.h" #include "SireVol/coordgroup.h" @@ -193,6 +194,11 @@ AtomSelection Evaluator::selection() const return selected_atoms; } +MolViewPtr Evaluator::toSelector() const +{ + return PartialMolecule(*this).toSelector(); +} + static void getMinMax(const CoordGroup &cgroup, Vector &min, Vector &max) { //we can cheat by using the CoordGroup's aabox! @@ -748,12 +754,16 @@ MolarMass Evaluator::mass(const PropertyMap &map) const return ::getMass(masses, selected_atoms); } - else + else if (d->hasProperty(map["element"])) { const AtomElements &elements = d->property(map["element"]).asA(); return ::getMass(elements, selected_atoms); } + else + { + return MolarMass(0); + } } /** Return the total charge of the selected part of the molecule, using @@ -764,9 +774,22 @@ MolarMass Evaluator::mass(const PropertyMap &map) const */ Charge Evaluator::charge(const PropertyMap &map) const { - const AtomCharges &charges = d->property(map["charge"]).asA(); + if (d->hasProperty(map["charge"])) + { + const AtomCharges &charges = d->property(map["charge"]).asA(); - return ::getCharge(charges, selected_atoms); + return ::getCharge(charges, selected_atoms); + } + else if (d->hasProperty(map["formal_charge"])) + { + const AtomCharges &charges = d->property(map["formal_charge"]).asA(); + + return ::getCharge(charges, selected_atoms); + } + else + { + return Charge(0); + } } /** Return the centroid of these atoms - this is the average diff --git a/corelib/src/libs/SireMol/evaluator.h b/corelib/src/libs/SireMol/evaluator.h index dfcb5cc3b..69e1baebb 100644 --- a/corelib/src/libs/SireMol/evaluator.h +++ b/corelib/src/libs/SireMol/evaluator.h @@ -152,6 +152,8 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Evaluator&); return QStringList(); } + MolViewPtr toSelector() const; + AtomSelection selection() const; SireUnits::Dimension::MolarMass mass(const PropertyMap &map = PropertyMap()) const; diff --git a/corelib/src/libs/SireMol/evaluatorm.cpp b/corelib/src/libs/SireMol/evaluatorm.cpp new file mode 100644 index 000000000..b1fbcd1ff --- /dev/null +++ b/corelib/src/libs/SireMol/evaluatorm.cpp @@ -0,0 +1,276 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "evaluatorm.h" +#include "atomcoords.h" +#include "atommasses.h" +#include "atomcharges.h" +#include "atomelements.h" +#include "atommatcher.h" +#include "atommatchers.h" +#include "bondid.h" +#include "angleid.h" +#include "dihedralid.h" +#include "connectivity.h" +#include "molecule.h" +#include "mover.hpp" +#include "editor.hpp" +#include "selectormol.h" +#include "core.h" + +#include "SireVol/coordgroup.h" + +#include "SireMaths/sphere.h" +#include "SireMaths/axisset.h" +#include "SireMaths/line.h" +#include "SireMaths/triangle.h" +#include "SireMaths/torsion.h" +#include "SireMaths/accumulator.h" + +#include "SireBase/errors.h" +#include "SireMol/errors.h" + +#include "SireUnits/dimensions.h" +#include "SireUnits/units.h" + +#include "SireError/errors.h" + +#include "SireStream/datastream.h" + +using namespace SireMol; +using namespace SireMaths; +using namespace SireVol; +using namespace SireBase; +using namespace SireStream; + +static const RegisterMetaType r_eval; + +SIREMOL_EXPORT QDataStream& operator<<(QDataStream &ds, const EvaluatorM &eval) +{ + writeHeader(ds, r_eval, 1); + + SharedDataStream sds(ds); + + sds << eval.vws << static_cast(eval); + + return ds; +} + +SIREMOL_EXPORT QDataStream& operator>>(QDataStream &ds, EvaluatorM &eval) +{ + VersionID v = readHeader(ds, r_eval); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> eval.vws >> static_cast(eval); + } + else + throw version_error(v, "1", r_eval, CODELOC); + + return ds; +} + +EvaluatorM::EvaluatorM() : ConcreteProperty() +{} + +EvaluatorM::EvaluatorM(const SelectorMol &mols) : ConcreteProperty() +{ + this->vws.reserve(mols.count()); + + for (const auto &mol : mols) + { + this->vws.append(PartialMolecule(mol)); + } +} + +EvaluatorM::EvaluatorM(const EvaluatorM &other) + : ConcreteProperty(other), vws(other.vws) +{} + +EvaluatorM::~EvaluatorM() +{} + +const char* EvaluatorM::typeName() +{ + return QMetaType::typeName( qMetaTypeId() ); +} + +EvaluatorM& EvaluatorM::operator=(const EvaluatorM &other) +{ + if (this != &other) + { + vws = other.vws; + Property::operator=(other); + } + + return *this; +} + +bool EvaluatorM::operator==(const EvaluatorM &other) const +{ + return vws == other.vws; +} + +bool EvaluatorM::operator!=(const EvaluatorM &other) const +{ + return not EvaluatorM::operator==(other); +} + +int EvaluatorM::nAtoms() const +{ + int n = 0; + + for (const auto &view : this->vws) + { + n += view.nAtoms(); + } + + return n; +} + +int EvaluatorM::nMolecules() const +{ + return this->vws.count(); +} + +bool EvaluatorM::isEmpty() const +{ + return this->vws.isEmpty(); +} + +QString EvaluatorM::toString() const +{ + return QObject::tr("EvaluatorM( num_molecules=%1 num_atoms=%2 )") + .arg(this->nMolecules()) + .arg(this->nAtoms()); +} + +SireUnits::Dimension::MolarMass EvaluatorM::mass() const +{ + return this->mass(PropertyMap()); +} + +SireUnits::Dimension::MolarMass EvaluatorM::mass(const SireBase::PropertyMap &map) const +{ + if (this->isEmpty()) + return SireUnits::Dimension::MolarMass(0); + + auto m = this->vws[0].evaluate().mass(map); + + for (int i=1; ivws.count(); ++i) + { + m += this->vws[i].evaluate().mass(map); + } + + return m; +} + +SireUnits::Dimension::Charge EvaluatorM::charge() const +{ + return this->charge(PropertyMap()); +} + +SireUnits::Dimension::Charge EvaluatorM::charge(const PropertyMap &map) const +{ + if (this->isEmpty()) + return SireUnits::Dimension::Charge(0); + + auto c = this->vws[0].evaluate().charge(map); + + for (int i=1; ivws.count(); ++i) + { + c += this->vws[i].evaluate().charge(map); + } + + return c; +} + +Vector EvaluatorM::center() const +{ + return this->center(PropertyMap()); +} + +Vector EvaluatorM::center(const PropertyMap &map) const +{ + return this->aaBox(map).center(); +} + +AABox EvaluatorM::aaBox() const +{ + return this->aaBox(PropertyMap()); +} + +AABox EvaluatorM::aaBox(const PropertyMap &map) const +{ + throw SireError::incomplete_code(); + return AABox(); +} + +Sphere EvaluatorM::boundingSphere() const +{ + return this->boundingSphere(PropertyMap()); +} + +Sphere EvaluatorM::boundingSphere(const PropertyMap &map) const +{ + return this->aaBox(map).boundingSphere(); +} + +Vector EvaluatorM::centroid() const +{ + return this->centroid(PropertyMap()); +} + +Vector EvaluatorM::centroid(const PropertyMap &map) const +{ + throw SireError::incomplete_code(); + return Vector(); +} + +Vector EvaluatorM::centerOfGeometry() const +{ + return this->centerOfGeometry(PropertyMap()); +} + +Vector EvaluatorM::centerOfGeometry(const PropertyMap &map) const +{ + throw SireError::incomplete_code(); + return Vector(); +} + +Vector EvaluatorM::centerOfMass() const +{ + return this->centerOfMass(PropertyMap()); +} + +Vector EvaluatorM::centerOfMass(const PropertyMap &map) const +{ + throw SireError::incomplete_code(); + return Vector(); +} diff --git a/corelib/src/libs/SireMol/evaluatorm.h b/corelib/src/libs/SireMol/evaluatorm.h new file mode 100644 index 000000000..a70b907a6 --- /dev/null +++ b/corelib/src/libs/SireMol/evaluatorm.h @@ -0,0 +1,132 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREMOL_EVALUATORM_H +#define SIREMOL_EVALUATORM_H + +#include "evaluator.h" +#include "partialmolecule.h" + +SIRE_BEGIN_HEADER + +namespace SireMol +{ +class EvaluatorM; +class SelectorMol; + +template +class SelectorM; +} + +SIREMOL_EXPORT QDataStream& operator<<(QDataStream&, const SireMol::EvaluatorM&); +SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::EvaluatorM&); + +namespace SireMol +{ + +/** This is a multi-molecule version of the evaluator class */ +class SIREMOL_EXPORT EvaluatorM + : public SireBase::ConcreteProperty +{ + +friend SIREMOL_EXPORT QDataStream& ::operator<<(QDataStream&, const EvaluatorM&); +friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, EvaluatorM&); + +public: + EvaluatorM(); + EvaluatorM(const SelectorMol &mols); + + template + EvaluatorM(const SelectorM &views); + + EvaluatorM(const EvaluatorM &other); + + virtual ~EvaluatorM(); + + static const char* typeName(); + + virtual const char* what() const + { + return EvaluatorM::typeName(); + } + + virtual EvaluatorM* clone() const + { + return new EvaluatorM(*this); + } + + EvaluatorM& operator=(const EvaluatorM &other); + + bool operator==(const EvaluatorM &other) const; + bool operator!=(const EvaluatorM &other) const; + + QString toString() const; + + bool isEmpty() const; + + int nAtoms() const; + int nMolecules() const; + + SireUnits::Dimension::MolarMass mass() const; + SireUnits::Dimension::MolarMass mass(const SireBase::PropertyMap &map) const; + + SireUnits::Dimension::Charge charge() const; + SireUnits::Dimension::Charge charge(const PropertyMap &map) const; + + SireMaths::Vector center() const; + SireMaths::Vector center(const PropertyMap &map) const; + + SireVol::AABox aaBox() const; + SireVol::AABox aaBox(const PropertyMap &map) const; + + SireMaths::Sphere boundingSphere() const; + SireMaths::Sphere boundingSphere(const PropertyMap &map) const; + + SireMaths::Vector centroid() const; + SireMaths::Vector centroid(const PropertyMap &map) const; + + SireMaths::Vector centerOfGeometry() const; + SireMaths::Vector centerOfGeometry(const PropertyMap &map) const; + + SireMaths::Vector centerOfMass() const; + SireMaths::Vector centerOfMass(const PropertyMap &map) const; + +protected: + /** The actual views */ + QList vws; +}; + +} // end of namespace SireMol + +Q_DECLARE_METATYPE( SireMol::EvaluatorM ) + +SIRE_EXPOSE_CLASS( SireMol::EvaluatorM ) + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireMol/findmcs.cpp b/corelib/src/libs/SireMol/findmcs.cpp index a71dc8174..c158bc2b9 100644 --- a/corelib/src/libs/SireMol/findmcs.cpp +++ b/corelib/src/libs/SireMol/findmcs.cpp @@ -49,6 +49,8 @@ #include "dihedralid.h" #include "improperid.h" +#include "core.h" + #include "SireUnits/dimensions.h" #include "SireUnits/units.h" diff --git a/corelib/src/libs/SireMol/geometryperturbation.cpp b/corelib/src/libs/SireMol/geometryperturbation.cpp index a34da1928..3e7bab7ed 100644 --- a/corelib/src/libs/SireMol/geometryperturbation.cpp +++ b/corelib/src/libs/SireMol/geometryperturbation.cpp @@ -31,6 +31,7 @@ #include "molecule.h" #include "moleditor.h" #include "mover.hpp" +#include "core.h" #include "SireCAS/values.h" #include "SireCAS/identities.h" @@ -51,30 +52,30 @@ using namespace SireStream; /////////// Implementation of GeometryPerturbation /////////// -static const RegisterMetaType r_geompert( MAGIC_ONLY, +static const RegisterMetaType r_geompert( MAGIC_ONLY, GeometryPerturbation::typeName() ); - -QDataStream &operator<<(QDataStream &ds, + +QDataStream &operator<<(QDataStream &ds, const GeometryPerturbation &geompert) { writeHeader(ds, r_geompert, 1); - + ds << static_cast(geompert); - + return ds; } QDataStream &operator>>(QDataStream &ds, GeometryPerturbation &geompert) { VersionID v = readHeader(ds, r_geompert); - + if (v == 1) { ds >> static_cast(geompert); } else throw version_error(v, "1", r_geompert, CODELOC); - + return ds; } @@ -84,7 +85,7 @@ GeometryPerturbation::GeometryPerturbation(const PropertyMap &map) : Perturbatio /** Constructor */ GeometryPerturbation::GeometryPerturbation(const Expression &mapping_function, - const PropertyMap &map) + const PropertyMap &map) : Perturbation(mapping_function, map) {} @@ -120,22 +121,22 @@ bool GeometryPerturbation::operator!=(const GeometryPerturbation &other) const QSet GeometryPerturbation::requiredProperties() const { QSet props; - + PropertyName coords_property = propertyMap()["coordinates"]; - + if (coords_property.hasSource()) props.insert( coords_property.source() ); return props; } -void GeometryPerturbation::perturbMolecule(MolEditor &molecule, +void GeometryPerturbation::perturbMolecule(MolEditor &molecule, const Values &values) const { Mover molmover = molecule.move(); - + this->perturbMolecule(molmover, values); - + molecule = molmover.commit().edit(); } @@ -150,15 +151,15 @@ Q_GLOBAL_STATIC( SharedPolyPointer, perturbationPtr ); const NullGeometryPerturbation& GeometryPerturbation::null() { SharedPolyPointer *ptr = perturbationPtr(); - + if (ptr->constData() == 0) { QMutexLocker lkr( globalMutex() ); - + if (ptr->constData() == 0) *ptr = static_cast(new NullGeometryPerturbation()); } - + return ptr->constData()->asA(); } @@ -168,32 +169,32 @@ const NullGeometryPerturbation& GeometryPerturbation::null() static const RegisterMetaType r_nullpert; -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const NullGeometryPerturbation &nullpert) { writeHeader(ds, r_nullpert, 1); - + ds << static_cast(nullpert); - + return ds; } -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, NullGeometryPerturbation &nullpert) { VersionID v = readHeader(ds, r_nullpert); - + if (v == 1) { ds >> static_cast(nullpert); } else throw version_error(v, "1", r_nullpert, CODELOC); - + return ds; } -NullGeometryPerturbation::NullGeometryPerturbation() +NullGeometryPerturbation::NullGeometryPerturbation() : ConcreteProperty() {} @@ -209,7 +210,7 @@ const char* NullGeometryPerturbation::typeName() return QMetaType::typeName( qMetaTypeId() ); } -NullGeometryPerturbation& +NullGeometryPerturbation& NullGeometryPerturbation::operator=(const NullGeometryPerturbation &other) { GeometryPerturbation::operator=(other); @@ -235,7 +236,7 @@ QSet NullGeometryPerturbation::requiredProperties() const { return QSet(); } - + bool NullGeometryPerturbation::wouldChange(const Molecule&, const Values&) const { return false; @@ -257,11 +258,11 @@ QDataStream &operator<<(QDataStream &ds, const GeometryPerturbations &geomperts) { writeHeader(ds, r_geomperts, 1); - + SharedDataStream sds(ds); - + sds << geomperts.perts << static_cast(geomperts); - + return ds; } @@ -269,16 +270,16 @@ QDataStream &operator>>(QDataStream &ds, GeometryPerturbations &geomperts) { VersionID v = readHeader(ds, r_geomperts); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> geomperts.perts >> static_cast(geomperts); } else throw version_error(v, "1", r_geomperts, CODELOC); - + return ds; } @@ -316,7 +317,7 @@ GeometryPerturbations::GeometryPerturbations(const QList &perturbat } } -/** Copy constructor */ +/** Copy constructor */ GeometryPerturbations::GeometryPerturbations(const GeometryPerturbations &other) : ConcreteProperty(other), perts(other.perts) @@ -332,7 +333,7 @@ const char* GeometryPerturbations::typeName() } /** Copy assignment operator */ -GeometryPerturbations& +GeometryPerturbations& GeometryPerturbations::operator=(const GeometryPerturbations &other) { if (this != &other) @@ -340,7 +341,7 @@ GeometryPerturbations::operator=(const GeometryPerturbations &other) perts = other.perts; GeometryPerturbation::operator=(other); } - + return *this; } @@ -360,16 +361,16 @@ QString GeometryPerturbations::toString() const { if (perts.isEmpty()) return QObject::tr("GeometryPerturbations::null"); - + QStringList lines; - + lines.append( QObject::tr("GeometryPerturbations:") ); - + foreach (GeomPertPtr pert, perts) { lines.append( QString(" %1").arg(pert->toString()) ); } - + return lines.join("\n"); } @@ -384,18 +385,18 @@ QList GeometryPerturbations::perturbations() const PerturbationPtr GeometryPerturbations::recreate(const Expression &mapping_function) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { - new_perts.append( + new_perts.append( it->read().recreate(mapping_function)->asA() ); } - + GeometryPerturbations ret(*this); ret.perts = new_perts; - + return ret; } @@ -404,18 +405,18 @@ PerturbationPtr GeometryPerturbations::recreate(const Expression &mapping_functi PerturbationPtr GeometryPerturbations::recreate(const PropertyMap &map) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { - new_perts.append( + new_perts.append( it->read().recreate(map)->asA() ); } - + GeometryPerturbations ret(*this); ret.perts = new_perts; - + return ret; } @@ -425,42 +426,42 @@ PerturbationPtr GeometryPerturbations::recreate(const Expression &mapping_functi const PropertyMap &map) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { - new_perts.append( + new_perts.append( it->read().recreate(mapping_function,map)->asA() ); } - + GeometryPerturbations ret(*this); ret.perts = new_perts; - + return ret; } -/** Substitute the identities in 'identities' in all of the mapping functions - used by this perturbation. This is useful if, for example, you want to +/** Substitute the identities in 'identities' in all of the mapping functions + used by this perturbation. This is useful if, for example, you want to switch from using 'lambda' to control the perturbation to using 'alpha', e.g. - + alpha_perturbations = lambda_perturbations.substitute( lam == Expression(alpha) ); */ PerturbationPtr GeometryPerturbations::substitute(const Identities &identities) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { - new_perts.append( + new_perts.append( it->read().substitute(identities)->asA() ); } - + GeometryPerturbations ret(*this); ret.perts = new_perts; - + return ret; } @@ -474,14 +475,14 @@ PerturbationPtr GeometryPerturbations::substitute(const SireCAS::Symbol &old_sym QList GeometryPerturbations::children() const { QList kids; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { kids += it->read().children(); } - + return kids; } @@ -489,30 +490,30 @@ QList GeometryPerturbations::children() const QSet GeometryPerturbations::requiredSymbols() const { QSet syms; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { syms += it->read().requiredSymbols(); } - + return syms; } -/** Return all of the properties that are needed or affected by +/** Return all of the properties that are needed or affected by these perturbations */ QSet GeometryPerturbations::requiredProperties() const { QSet props; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { props += it->read().requiredProperties(); } - + return props; } @@ -530,7 +531,7 @@ bool GeometryPerturbations::wouldChange(const Molecule &molecule, if (it->read().wouldChange(molecule,values)) return true; } - + return false; } catch(...) @@ -540,7 +541,7 @@ bool GeometryPerturbations::wouldChange(const Molecule &molecule, } } -void GeometryPerturbations::perturbMolecule(Mover &molecule, +void GeometryPerturbations::perturbMolecule(Mover &molecule, const SireCAS::Values &values) const { for (QList::const_iterator it = perts.constBegin(); @@ -558,17 +559,17 @@ void GeometryPerturbations::perturbMolecule(Mover &molecule, static const RegisterMetaType r_bondpert; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const BondPerturbation &bondpert) { writeHeader(ds, r_bondpert, 1); - + SharedDataStream sds(ds); - + sds << bondpert.bondid << bondpert.start_size.to(angstrom) << bondpert.end_size.to(angstrom) << static_cast(bondpert); - + return ds; } @@ -576,22 +577,22 @@ QDataStream &operator<<(QDataStream &ds, QDataStream &operator>>(QDataStream &ds, BondPerturbation &bondpert) { VersionID v = readHeader(ds, r_bondpert); - + if (v == 1) { SharedDataStream sds(ds); - + double start_size, end_size; - + sds >> bondpert.bondid >> start_size >> end_size >> static_cast(bondpert); - + bondpert.start_size = start_size * angstrom; bondpert.end_size = end_size * angstrom; } - else + else throw version_error(v, "1", r_bondpert, CODELOC); - + return ds; } @@ -602,16 +603,16 @@ BondPerturbation::BondPerturbation() {} /** Construct to perturb the bond 'bond' from 'start' to 'end' */ -BondPerturbation::BondPerturbation(const BondID &bond, +BondPerturbation::BondPerturbation(const BondID &bond, const Length &start, const Length &end, const PropertyMap &map) : ConcreteProperty(map), bondid(bond), start_size(start), end_size(end) {} - -/** Construct to perturb the bond 'bond' from 'start' to 'end' + +/** Construct to perturb the bond 'bond' from 'start' to 'end' using the passed mapping function */ -BondPerturbation::BondPerturbation(const BondID &bond, +BondPerturbation::BondPerturbation(const BondID &bond, const Length &start, const Length &end, const Expression &mapping_function, const PropertyMap &map) @@ -619,7 +620,7 @@ BondPerturbation::BondPerturbation(const BondID &bond, bondid(bond), start_size(start), end_size(end) {} -/** Construct to perturb the bond between atoms 'atom0' and 'atom1' +/** Construct to perturb the bond between atoms 'atom0' and 'atom1' from 'start' to 'end' */ BondPerturbation::BondPerturbation(const AtomID &atom0, const AtomID &atom1, const Length &start, const Length &end, @@ -627,8 +628,8 @@ BondPerturbation::BondPerturbation(const AtomID &atom0, const AtomID &atom1, : ConcreteProperty(map), bondid(atom0,atom1), start_size(start), end_size(end) {} - -/** Construct to perturb the bond between atoms 'atom0' and 'atom1' + +/** Construct to perturb the bond between atoms 'atom0' and 'atom1' from 'start' to 'end' using the passed mapping function */ BondPerturbation::BondPerturbation(const AtomID &atom0, const AtomID &atom1, const Length &start, const Length &end, @@ -662,10 +663,10 @@ BondPerturbation& BondPerturbation::operator=(const BondPerturbation &other) bondid = other.bondid; start_size = other.start_size; end_size = other.end_size; - + GeometryPerturbation::operator=(other); } - + return *this; } @@ -712,15 +713,15 @@ const SireUnits::Dimension::Length& BondPerturbation::end() const change the molecule 'molecule' */ bool BondPerturbation::wouldChange(const Molecule &molecule, const Values &values) const { - try + try { Values new_vals = values + ( symbols().initial() == start_size.value() ) + ( symbols().final() == end_size.value() ); Length new_length = Length( mappingFunction().evaluate(new_vals) ); - + Length old_length( bondid.length(molecule, propertyMap()) ); - + return std::abs(new_length - old_length) > 0.000001; } catch(...) @@ -735,7 +736,7 @@ bool BondPerturbation::wouldChange(const Molecule &molecule, const Values &value \throw SireError::incompatible_error \throw SireError::invalid_cast */ -void BondPerturbation::perturbMolecule(Mover &molecule, +void BondPerturbation::perturbMolecule(Mover &molecule, const Values &values) const { //calculate the desired value of the bond @@ -745,7 +746,7 @@ void BondPerturbation::perturbMolecule(Mover &molecule, Length new_length = Length( mappingFunction().evaluate(new_vals) ); Length old_length( bondid.length(molecule, propertyMap()) ); - + if (std::abs(new_length - old_length) > 0.000001) molecule.set(bondid, new_length, propertyMap()).commit(); } @@ -757,17 +758,17 @@ void BondPerturbation::perturbMolecule(Mover &molecule, static const RegisterMetaType r_anglepert; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const AnglePerturbation &anglepert) { writeHeader(ds, r_anglepert, 1); - + SharedDataStream sds(ds); - + sds << anglepert.angleid << anglepert.start_size.to(degrees) << anglepert.end_size.to(degrees) << static_cast(anglepert); - + return ds; } @@ -775,22 +776,22 @@ QDataStream &operator<<(QDataStream &ds, QDataStream &operator>>(QDataStream &ds, AnglePerturbation &anglepert) { VersionID v = readHeader(ds, r_anglepert); - + if (v == 1) { SharedDataStream sds(ds); - + double start_size, end_size; - + sds >> anglepert.angleid >> start_size >> end_size >> static_cast(anglepert); - + anglepert.start_size = start_size * degrees; anglepert.end_size = end_size * degrees; } - else + else throw version_error(v, "1", r_anglepert, CODELOC); - + return ds; } @@ -801,16 +802,16 @@ AnglePerturbation::AnglePerturbation() {} /** Construct to perturb the angle 'angle' from 'start' to 'end' */ -AnglePerturbation::AnglePerturbation(const AngleID &angle, +AnglePerturbation::AnglePerturbation(const AngleID &angle, const Angle &start, const Angle &end, const PropertyMap &map) : ConcreteProperty(map), angleid(angle), start_size(start), end_size(end) {} - -/** Construct to perturb the angle 'angle' from 'start' to 'end' + +/** Construct to perturb the angle 'angle' from 'start' to 'end' using the passed mapping function */ -AnglePerturbation::AnglePerturbation(const AngleID &angle, +AnglePerturbation::AnglePerturbation(const AngleID &angle, const Angle &start, const Angle &end, const Expression &mapping_function, const PropertyMap &map) @@ -818,7 +819,7 @@ AnglePerturbation::AnglePerturbation(const AngleID &angle, angleid(angle), start_size(start), end_size(end) {} -/** Construct to perturb the angle between atoms 'atom0', 'atom1' and 'atom2' +/** Construct to perturb the angle between atoms 'atom0', 'atom1' and 'atom2' from 'start' to 'end' */ AnglePerturbation::AnglePerturbation(const AtomID &atom0, const AtomID &atom1, const AtomID &atom2, @@ -827,8 +828,8 @@ AnglePerturbation::AnglePerturbation(const AtomID &atom0, const AtomID &atom1, : ConcreteProperty(map), angleid(atom0,atom1,atom2), start_size(start), end_size(end) {} - -/** Construct to perturb the angle between atoms 'atom0', 'atom1' and 'atom2' + +/** Construct to perturb the angle between atoms 'atom0', 'atom1' and 'atom2' from 'start' to 'end' using the passed mapping function */ AnglePerturbation::AnglePerturbation(const AtomID &atom0, const AtomID &atom1, const AtomID &atom2, @@ -871,10 +872,10 @@ AnglePerturbation& AnglePerturbation::operator=(const AnglePerturbation &other) angleid = other.angleid; start_size = other.start_size; end_size = other.end_size; - + GeometryPerturbation::operator=(other); } - + return *this; } @@ -913,15 +914,15 @@ const SireUnits::Dimension::Angle& AnglePerturbation::end() const change the molecule 'molecule' */ bool AnglePerturbation::wouldChange(const Molecule &molecule, const Values &values) const { - try + try { Values new_vals = values + ( symbols().initial() == start_size.value() ) + ( symbols().final() == end_size.value() ); Angle new_size = Angle( mappingFunction().evaluate(new_vals) ); - + Angle old_size( angleid.size(molecule, propertyMap()) ); - + return std::abs(new_size.value() - old_size.value()) > 0.0001; } catch(...) @@ -936,7 +937,7 @@ bool AnglePerturbation::wouldChange(const Molecule &molecule, const Values &valu \throw SireError::incompatible_error \throw SireError::invalid_cast */ -void AnglePerturbation::perturbMolecule(Mover &molecule, +void AnglePerturbation::perturbMolecule(Mover &molecule, const Values &values) const { //calculate the desired value of the angle @@ -957,17 +958,17 @@ void AnglePerturbation::perturbMolecule(Mover &molecule, static const RegisterMetaType r_dihedralpert; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const DihedralPerturbation &dihedralpert) { writeHeader(ds, r_dihedralpert, 1); - + SharedDataStream sds(ds); - + sds << dihedralpert.dihedralid << dihedralpert.start_size.to(degrees) << dihedralpert.end_size.to(degrees) << static_cast(dihedralpert); - + return ds; } @@ -975,22 +976,22 @@ QDataStream &operator<<(QDataStream &ds, QDataStream &operator>>(QDataStream &ds, DihedralPerturbation &dihedralpert) { VersionID v = readHeader(ds, r_dihedralpert); - + if (v == 1) { SharedDataStream sds(ds); - + double start_size, end_size; - + sds >> dihedralpert.dihedralid >> start_size >> end_size >> static_cast(dihedralpert); - + dihedralpert.start_size = start_size * degrees; dihedralpert.end_size = end_size * degrees; } - else + else throw version_error(v, "1", r_dihedralpert, CODELOC); - + return ds; } @@ -1001,16 +1002,16 @@ DihedralPerturbation::DihedralPerturbation() {} /** Construct to perturb the dihedral 'dihedral' from 'start' to 'end' */ -DihedralPerturbation::DihedralPerturbation(const DihedralID &dihedral, +DihedralPerturbation::DihedralPerturbation(const DihedralID &dihedral, const Angle &start, const Angle &end, const PropertyMap &map) : ConcreteProperty(map), dihedralid(dihedral), start_size(start), end_size(end) {} - -/** Construct to perturb the dihedral 'dihedral' from 'start' to 'end' + +/** Construct to perturb the dihedral 'dihedral' from 'start' to 'end' using the passed mapping function */ -DihedralPerturbation::DihedralPerturbation(const DihedralID &dihedral, +DihedralPerturbation::DihedralPerturbation(const DihedralID &dihedral, const Angle &start, const Angle &end, const Expression &mapping_function, const PropertyMap &map) @@ -1018,7 +1019,7 @@ DihedralPerturbation::DihedralPerturbation(const DihedralID &dihedral, dihedralid(dihedral), start_size(start), end_size(end) {} -/** Construct to perturb the dihedral between atoms 'atom0', 'atom1', 'atom2' and 'atom3' +/** Construct to perturb the dihedral between atoms 'atom0', 'atom1', 'atom2' and 'atom3' from 'start' to 'end' */ DihedralPerturbation::DihedralPerturbation(const AtomID &atom0, const AtomID &atom1, const AtomID &atom2, const AtomID &atom3, @@ -1027,8 +1028,8 @@ DihedralPerturbation::DihedralPerturbation(const AtomID &atom0, const AtomID &at : ConcreteProperty(map), dihedralid(atom0,atom1,atom2,atom3), start_size(start), end_size(end) {} - -/** Construct to perturb the dihedral between atoms 'atom0', 'atom1', 'atom2' and 'atom3' + +/** Construct to perturb the dihedral between atoms 'atom0', 'atom1', 'atom2' and 'atom3' from 'start' to 'end' using the passed mapping function */ DihedralPerturbation::DihedralPerturbation(const AtomID &atom0, const AtomID &atom1, const AtomID &atom2, const AtomID &atom3, @@ -1071,10 +1072,10 @@ DihedralPerturbation& DihedralPerturbation::operator=(const DihedralPerturbation dihedralid = other.dihedralid; start_size = other.start_size; end_size = other.end_size; - + GeometryPerturbation::operator=(other); } - + return *this; } @@ -1111,18 +1112,18 @@ const SireUnits::Dimension::Angle& DihedralPerturbation::end() const /** Return whether or not this perturbation with the passed values would change the molecule 'molecule' */ -bool DihedralPerturbation::wouldChange(const Molecule &molecule, +bool DihedralPerturbation::wouldChange(const Molecule &molecule, const Values &values) const { - try + try { Values new_vals = values + ( symbols().initial() == start_size.value() ) + ( symbols().final() == end_size.value() ); Angle new_size = Angle( mappingFunction().evaluate(new_vals) ); - + Angle old_size( dihedralid.size(molecule, propertyMap()) ); - + return std::abs(new_size.value() - old_size.value()) > 0.0001; } catch(...) @@ -1137,14 +1138,14 @@ bool DihedralPerturbation::wouldChange(const Molecule &molecule, \throw SireError::incompatible_error \throw SireError::invalid_cast */ -void DihedralPerturbation::perturbMolecule(Mover &molecule, +void DihedralPerturbation::perturbMolecule(Mover &molecule, const Values &values) const { //calculate the desired value of the dihedral Values new_vals = values + ( symbols().initial() == start_size.value() ) + ( symbols().final() == end_size.value() ); - + Angle new_dihedral = Angle( mappingFunction().evaluate(new_vals) ); - + molecule.set(dihedralid, new_dihedral, propertyMap()).commit(); } diff --git a/corelib/src/libs/SireMol/molecule.cpp b/corelib/src/libs/SireMol/molecule.cpp index a2e49cfa2..460e55276 100644 --- a/corelib/src/libs/SireMol/molecule.cpp +++ b/corelib/src/libs/SireMol/molecule.cpp @@ -42,6 +42,8 @@ #include "mover.hpp" #include "selector.hpp" +#include "core.h" + #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -58,7 +60,7 @@ QDataStream &operator<<(QDataStream &ds, { writeHeader(ds, r_mol, 1); ds << static_cast(mol); - + return ds; } @@ -67,14 +69,14 @@ QDataStream &operator>>(QDataStream &ds, Molecule &mol) { VersionID v = readHeader(ds, r_mol); - + if (v == 1) { ds >> static_cast(mol); } else throw version_error(v, "1", r_mol, CODELOC); - + return ds; } @@ -124,9 +126,10 @@ bool Molecule::operator!=(const Molecule &other) const /** Return a string representation of this molecule */ QString Molecule::toString() const { - return QObject::tr( "Molecule( %1 version %2 : nAtoms() = %3, nResidues() = %4 )" ) - .arg(this->number()) - .arg(this->version()) + QString n = QString("%1:%2").arg(this->name()).arg(this->number()); + + return QObject::tr( "Molecule( %1 num_atoms=%2 num_residues=%3 )" ) + .arg(n, -7) .arg(this->nAtoms()) .arg(this->nResidues()); } @@ -168,57 +171,92 @@ MolNum Molecule::number() const { return d->number(); } - + /** Return the version number of this molecule - all molecules with the same ID number and version number must be identical */ quint64 Molecule::version() const { return d->version(); } - + +MolViewPtr Molecule::toSelector() const +{ + return MolViewPtr(*this); +} + /** Return the version number of the property at key 'key'. All molecules with the same ID number and same property version number must have the same value of this property (although this says nothing about any metadata associated with this property) - - \throw SireBase::missing_property + + \throw SireBase::missing_property */ quint64 Molecule::version(const PropertyName &key) const { return d->version(key); } - + /** Return the number of atoms in this molecule */ int Molecule::nAtoms() const { return d->info().nAtoms(); } - + +/** Return the number of atoms in the identified residue(s) */ +int Molecule::nAtoms(const ResID &id) const +{ + return this->residues(id).selection().nSelectedAtoms(); +} + +/** Return the number of atoms in the identified cutgroups(s) */ +int Molecule::nAtoms(const CGID &id) const +{ + return this->cutGroups(id).selection().nSelectedAtoms(); +} + +/** Return the number of atoms in the identified chain(s) */ +int Molecule::nAtoms(const ChainID &id) const +{ + return this->chains(id).selection().nSelectedAtoms(); +} + +/** Return the number of atoms in the identified segment(s) */ +int Molecule::nAtoms(const SegID &id) const +{ + return this->segments(id).selection().nSelectedAtoms(); +} + /** Return the number of CutGroups in this molecule */ int Molecule::nCutGroups() const { return d->info().nCutGroups(); } - + +/** Return the number of residues in the identified chain(s) */ +int Molecule::nResidues(const ChainID &id) const +{ + return this->chains(id).selection().nSelectedResidues(); +} + /** Return the number of residues in this molecule */ int Molecule::nResidues() const { return d->info().nResidues(); } - + /** Return the number of chains in this molecule */ int Molecule::nChains() const { return d->info().nChains(); } - + /** Return the number of segments in this molecule */ int Molecule::nSegments() const { return d->info().nSegments(); } - + /** Return a Mover that moves all of the atoms in this molecule */ Mover Molecule::move() const @@ -256,7 +294,7 @@ void Molecule::update(const MoleculeData &moldata) .arg(d->number()).arg(moldata.number()), CODELOC ); } - + d = moldata; } @@ -266,7 +304,7 @@ const Properties& Molecule::properties() const return d->properties(); } -/** Return the property associated with the key 'key' +/** Return the property associated with the key 'key' \throw SireMol::missing_property */ @@ -284,9 +322,9 @@ const Property& Molecule::metadata(const PropertyName &metakey) const return d->metadata(metakey); } -/** Return the metadata for the metakey 'metakey' for +/** Return the metadata for the metakey 'metakey' for the property at key 'key' - + \throw SireBase::missing_property */ const Property& Molecule::metadata(const PropertyName &key, @@ -296,9 +334,9 @@ const Property& Molecule::metadata(const PropertyName &key, } /** Set the property at key 'key' to the value 'value'. If this - is a property derived from MolViewProperty then this + is a property derived from MolViewProperty then this property is checked to ensure it is compatible with this molecule - + \throw SireError::incompatible_error */ void Molecule::setProperty(const QString &key, const Property &value) @@ -312,28 +350,28 @@ void Molecule::setProperty(const QString &key, const Property &value) return; } } - + d->setProperty(key, value); } /** Set the metadata at metakey 'metakey' to the value 'value'. - If this is a property derived from MolViewProperty then this + If this is a property derived from MolViewProperty then this property is checked to ensure it is compatible with this molecule - + \throw SireError::incompatible_error */ void Molecule::setMetadata(const QString &metakey, const Property &value) { if (value.isA()) value.asA().assertCompatibleWith(d->info()); - + d->setMetadata(metakey, value); } /** Set the metadata at metakey 'metakey' to the value 'value'. - If this is a property derived from MolViewProperty then this + If this is a property derived from MolViewProperty then this property is checked to ensure it is compatible with this molecule - + \throw SireError::incompatible_error */ void Molecule::setMetadata(const QString &key, const QString &metakey, @@ -341,7 +379,7 @@ void Molecule::setMetadata(const QString &key, const QString &metakey, { if (value.isA()) value.asA().assertCompatibleWith(d->info()); - + d->setMetadata(key, metakey, value); } @@ -360,7 +398,7 @@ bool Molecule::hasMetadata(const PropertyName &metakey) const /** Return whether or not the property of this molecule at key 'key' has metadata at metakey 'metakey' - + \throw SireBase::missing_property */ bool Molecule::hasMetadata(const PropertyName &key, @@ -389,7 +427,7 @@ void Molecule::assertContainsMetadata(const PropertyName &metakey) const /** Assert that this molecule contains some metadata at metakey 'metakey' associated with the property at key 'key' - + \throw SireBase::missing_property */ void Molecule::assertContainsMetadata(const PropertyName &key, @@ -412,7 +450,7 @@ QStringList Molecule::metadataKeys() const /** Return the metakeys for all of the metadata for the property at key 'key' - + \throw SireBase::missing_property */ QStringList Molecule::metadataKeys(const PropertyName &key) const diff --git a/corelib/src/libs/SireMol/molecule.h b/corelib/src/libs/SireMol/molecule.h index e4497431e..a8877e638 100644 --- a/corelib/src/libs/SireMol/molecule.h +++ b/corelib/src/libs/SireMol/molecule.h @@ -63,7 +63,7 @@ class Residue; class Chain; class Segment; -/** A Molecule represents a complete molecule. +/** A Molecule represents a complete molecule. Most of the manipulation of a molecule is handled by the 'or/er' classes, e.g. Mover, Selector, Editer, Evaluator. @@ -104,7 +104,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Molecule&); public: Molecule(); Molecule(const QString &molname); - + Molecule(const MoleculeData &moldata); Molecule(const Molecule &other); @@ -117,66 +117,76 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Molecule&); bool operator!=(const Molecule &other) const; static const char* typeName(); - + Molecule* clone() const; QString toString() const; - + bool isEmpty() const; bool selectedAll() const; - + + MolViewPtr toSelector() const; + AtomSelection selection() const; - + const MolName& name() const; MolNum number() const; - + quint64 version() const; quint64 version(const PropertyName &key) const; - + int nAtoms() const; + int nAtoms(const ResID &id) const; + int nAtoms(const ChainID &id) const; + int nAtoms(const SegID &seg) const; + int nAtoms(const CGID &id) const; + int nCutGroups() const; + int nResidues() const; + int nResidues(const ChainID &id) const; + int nChains() const; int nSegments() const; - + MoleculeInfo info() const; - + Mover move() const; Evaluator evaluate() const; MolEditor edit() const; - + void update(const MoleculeData &moldata); - + bool hasProperty(const PropertyName &key) const; bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; - + const Properties& properties() const; - + const Property& property(const PropertyName &key) const; - + const Property& metadata(const PropertyName &metakey) const; - + const Property& metadata(const PropertyName &key, const PropertyName &metakey) const; void assertContainsProperty(const PropertyName &key) const; - + void assertContainsMetadata(const PropertyName &metakey) const; void assertContainsMetadata(const PropertyName &key, const PropertyName &metakey) const; protected: void setProperty(const QString &key, const Property &value); - + void setMetadata(const QString &metakey, const Property &value); - + void setMetadata(const QString &key, const QString &metakey, const Property &value); }; diff --git a/corelib/src/libs/SireMol/moleculedata.cpp b/corelib/src/libs/SireMol/moleculedata.cpp index 4a608dd67..298e6ecbd 100644 --- a/corelib/src/libs/SireMol/moleculedata.cpp +++ b/corelib/src/libs/SireMol/moleculedata.cpp @@ -36,6 +36,8 @@ #include "atommatchers.h" #include "moleditor.h" +#include "core.h" + #include "SireBase/incremint.h" #include "SireBase/unittest.h" @@ -61,9 +63,9 @@ static const RegisterMetaType r_moldata(NO_ROOT); quint64 MoleculeData::PropVersions::increment() { QMutexLocker lkr(&mutex); - + ++version; - + return version; } @@ -71,7 +73,7 @@ quint64 MoleculeData::PropVersions::increment() quint64 MoleculeData::PropVersions::increment(const QString &key) { QHash::iterator it = property_version.find(key); - + if (it == property_version.end()) { property_version.insert(key, 1); @@ -85,19 +87,19 @@ quint64 MoleculeData::PropVersions::increment(const QString &key) } /** Increment the version number of the property with key 'key', - also updating and returning the global version number of + also updating and returning the global version number of the molecule */ quint64 MoleculeData::PropVersions::increment(const QString &key, quint64 &molversion) { QMutexLocker lkr(&mutex); - + //now increment the global version ++version; - + //return the values molversion = version; - + return this->increment(key); } @@ -106,18 +108,18 @@ quint64 MoleculeData::PropVersions::increment(const QString &key, void MoleculeData::PropVersions::incrementAll(MoleculeData &moldata) { QMutexLocker lkr(&mutex); - + //increment the version for all of the keys in the molecule moldata.prop_vrsns.clear(); - + foreach (QString key, moldata.props.propertyKeys()) { moldata.prop_vrsns.insert(key, this->increment(key)); } - + //now increment the global version ++version; - + moldata.vrsn = version; } @@ -126,20 +128,20 @@ void MoleculeData::PropVersions::incrementAll(MoleculeData &moldata) ///////// /** Serialise to a binary data stream */ -QDataStream &operator<<(QDataStream &ds, const MoleculeData &moldata) +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const MoleculeData &moldata) { writeHeader(ds, r_moldata, 1); - + SharedDataStream sds(ds); - - sds << moldata.molinfo << moldata.props + + sds << moldata.molinfo << moldata.props << moldata.molname << moldata.molnum; - + return ds; } /** Deserialise from a binary data stream */ -QDataStream &operator>>(QDataStream &ds, MoleculeData &moldata) +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, MoleculeData &moldata) { VersionID v = readHeader(ds, r_moldata); @@ -179,14 +181,14 @@ MoleculeData::registerMolecule(MolNum molnum) { QMutexLocker lkr(&version_registry_mutex); - boost::shared_ptr vrsns + boost::shared_ptr vrsns = version_registry[molnum].lock(); if (not vrsns) { vrsns.reset( new PropVersions() ); version_registry[molnum] = vrsns; - + if (version_registry.capacity() - version_registry.count() < 10) { //ok, its time to try and clean out - remove all expired @@ -196,17 +198,17 @@ MoleculeData::registerMolecule(MolNum molnum) //of the hash) QMutableHashIterator< MolNum, boost::weak_ptr > it( version_registry ); - + while( it.hasNext() ) { it.next(); - + if (it.value().expired()) it.remove(); } } } - + return vrsns; } @@ -215,14 +217,14 @@ static Incremint last_registered_molnum(0); MolNum MoleculeData::createUniqueMolNum() { QMutexLocker lkr(&version_registry_mutex); - + MolNum molnum( last_registered_molnum.increment() ); - + while (version_registry.contains(molnum)) { molnum = MolNum( last_registered_molnum.increment() ); } - + return molnum; } @@ -235,7 +237,7 @@ MolNum MolNum::getUniqueNumber() MoleculeData::MoleculeData() : RefCountData(), molinfo( MoleculeInfoData::null() ), - vrsn(0), + vrsn(0), molnum(0), vrsns( MoleculeData::registerMolecule(molnum) ) {} @@ -245,16 +247,16 @@ MoleculeData::MoleculeData(const MoleculeView &molview) : RefCountData() { this->operator=( molview.data() ); - + SireBase::assert_true(vrsns.get() != 0, CODELOC); } SharedDataPointer MoleculeData::null() { auto n = SharedDataPointer( create_shared_null() ); - + SireBase::assert_true(n.read().vrsns.get() != 0, CODELOC); - + return n; } @@ -263,11 +265,11 @@ void MoleculeData::renumber() { //get the new ID number... molnum = MolNum::getUniqueNumber(); - + vrsns = MoleculeData::registerMolecule(molnum); - + SireBase::assert_true(vrsns.get() != 0, CODELOC); - + vrsns->incrementAll(*this); } @@ -277,7 +279,7 @@ void MoleculeData::renumber(MolNum newnum) if (newnum == molnum) //nothing to do return; - + molnum = newnum; vrsns = MoleculeData::registerMolecule(molnum); SireBase::assert_true(vrsns.get() != 0, CODELOC); @@ -290,13 +292,13 @@ MoleculeData::MoleculeData(const StructureEditor &editor) { //create the info object from this editor molinfo = SharedDataPointer( new MoleculeInfoData(editor) ); - + //now copy across the properties... props = editor.properties(); - + //copy across the name molname = editor.molName(); - + //finally, sort out the molecule number - this also //sets up all of the version numbers and performs //the registration of the molecule @@ -340,7 +342,7 @@ MoleculeData& MoleculeData::operator=(const MoleculeData &other) vrsns = other.vrsns; SireBase::assert_true(vrsns.get() != 0, CODELOC); } - + return *this; } @@ -354,7 +356,7 @@ MoleculeData& MoleculeData::operator=(const StructureEditor &editor) the same ID and version numbers. */ bool MoleculeData::operator==(const MoleculeData &other) const { - return molnum == other.molnum and + return molnum == other.molnum and vrsn == other.vrsn; } @@ -370,76 +372,76 @@ bool MoleculeData::operator!=(const MoleculeData &other) const MoleculeData MoleculeData::extract(const AtomSelection &selected_atoms) const { selected_atoms.assertCompatibleWith(*this); - + if (selected_atoms.selectedAll()) return *this; - + else if (selected_atoms.selectedNone()) return MoleculeData(); - + // edit a copy of this molecule MolStructureEditor editor = MolStructureEditor( Molecule(*this) ); - + // delete all of the atoms that don't exist for (int i=molinfo->nAtoms()-1; i>=0; --i) { AtomIdx idx(i); - + if (not selected_atoms.selected(idx)) { editor = editor.remove(idx); } } - + // delete all empty cutgroups for (int i=molinfo->nCutGroups()-1; i>=0; --i) { CGIdx idx(i); - + if (not selected_atoms.selected(idx)) { editor = editor.remove(idx); } } - + //delete all empty segments for (int i=molinfo->nSegments()-1; i>=0; --i) { SegIdx idx(i); - + if (not selected_atoms.selected(idx)) { editor = editor.remove(idx); } } - + //delete all empty chains for (int i=molinfo->nChains()-1; i>=0; --i) { ChainIdx idx(i); - + if (not selected_atoms.selected(idx)) { editor = editor.remove(idx); } } - + //delete all empty residues for (int i=molinfo->nResidues()-1; i>=0; --i) { ResIdx idx(i); - + if (not selected_atoms.selected(idx)) { editor = editor.remove(idx); } } - + return editor.commit().data(); } /** Return the version number of the property at key 'key'. - If there is no such key in this molecule, or + If there is no such key in this molecule, or the value is supplied by the key itself, then a version number of 0 is returned */ quint64 MoleculeData::version(const PropertyName &key) const @@ -456,7 +458,7 @@ bool MoleculeData::hasProperty(const PropertyName &key) const return props.hasProperty(key); } -/** Return whether this molecule contains metadata at +/** Return whether this molecule contains metadata at metakey 'metakey' */ bool MoleculeData::hasMetadata(const PropertyName &metakey) const { @@ -464,8 +466,8 @@ bool MoleculeData::hasMetadata(const PropertyName &metakey) const } /** Return whether this molecule has metadata at metakey 'metakey' - for the property at key 'key' - + for the property at key 'key' + \throw SireBase::missing_property */ bool MoleculeData::hasMetadata(const PropertyName &key, @@ -473,8 +475,8 @@ bool MoleculeData::hasMetadata(const PropertyName &key, { return props.hasMetadata(key, metakey); } - -/** Return the type name of the property at key 'key'. + +/** Return the type name of the property at key 'key'. \throw SireBase::missing_property */ @@ -515,7 +517,7 @@ const char* MoleculeData::metadataType(const PropertyName &metakey) const /** Return the type name of the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireBase::missing_property */ const char* MoleculeData::metadataType(const PropertyName &key, @@ -524,7 +526,7 @@ const char* MoleculeData::metadataType(const PropertyName &key, return props.metadataType(key, metakey); } -/** Return the property at key 'key' +/** Return the property at key 'key' \throw SireBase::missing_property */ @@ -534,7 +536,7 @@ const Property& MoleculeData::property(const PropertyName &key) const } /** Return the property at key 'key', or 'default_value' if there - is no such property */ + is no such property */ const Property& MoleculeData::property(const PropertyName &key, const Property &default_value) const { @@ -552,7 +554,7 @@ const Property& MoleculeData::metadata(const PropertyName &metakey) const /** Return the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireBase::missing_property */ const Property& MoleculeData::metadata(const PropertyName &key, @@ -568,10 +570,10 @@ const Property& MoleculeData::metadata(const PropertyName &metakey, { return props.metadata(metakey, default_value); } - + /** Return the metadata at metakey 'metakey' for the property at key 'key', or 'default_value' if there is no such value - + \throw SireBase::missing_property */ const Property& MoleculeData::metadata(const PropertyName &key, @@ -586,7 +588,7 @@ const Property& MoleculeData::metadata(const PropertyName &key, void MoleculeData::updatePropertyMolInfo(const AtomMatcher &matcher) { Properties newprops = props; - + for (auto it = props.constBegin(); it != props.constEnd(); ++it) { if (it.value().read().isA()) @@ -595,7 +597,7 @@ void MoleculeData::updatePropertyMolInfo(const AtomMatcher &matcher) .makeCompatibleWith(molinfo.read(),matcher)); } } - + props = newprops; } @@ -606,6 +608,12 @@ void MoleculeData::updatePropertyMolInfo() this->updatePropertyMolInfo( AtomIdxMatcher() ); } +/** Return if this is empty (has now atoms) */ +bool MoleculeData::isEmpty() const +{ + return this->info().isEmpty(); +} + /** Rename this molecule to 'newname'. This changes the info().UID() number, and the version number, but doesn't change this->number() */ void MoleculeData::rename(const MolName &newname) @@ -627,7 +635,7 @@ void MoleculeData::rename(const MolName &newname) void MoleculeData::rename(AtomIdx atomidx, const AtomName &newname) { MoleculeInfoData newinfo = molinfo->rename(atomidx, newname); - + if (newinfo.UID() != molinfo.constData()->UID()) { SireBase::assert_true( vrsns.get() != 0, CODELOC ); @@ -648,12 +656,12 @@ void MoleculeData::rename(const AtomID &atomid, const AtomName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo( *(molinfo.constData()) ); - + foreach (AtomIdx atomidx, atomid.map(info())) { newinfo = newinfo.rename(atomidx, newname); } - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -671,7 +679,7 @@ void MoleculeData::rename(CGIdx cgidx, const CGName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->rename(cgidx, newname); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -690,12 +698,12 @@ void MoleculeData::rename(const CGID &cgid, const CGName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo( *(molinfo.constData()) ); - + foreach (CGIdx cgidx, cgid.map(info())) { newinfo = newinfo.rename(cgidx, newname); } - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -713,7 +721,7 @@ void MoleculeData::rename(ResIdx residx, const ResName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->rename(residx, newname); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -732,12 +740,12 @@ void MoleculeData::rename(const ResID &resid, const ResName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo( *(molinfo.constData()) ); - + foreach (ResIdx residx, resid.map(info())) { newinfo = newinfo.rename(residx, newname); } - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -755,7 +763,7 @@ void MoleculeData::rename(ChainIdx chainidx, const ChainName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->rename(chainidx, newname); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -774,12 +782,12 @@ void MoleculeData::rename(const ChainID &chainid, const ChainName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo( *(molinfo.constData()) ); - + foreach (ChainIdx chainidx, chainid.map(info())) { newinfo = newinfo.rename(chainidx, newname); } - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -797,7 +805,7 @@ void MoleculeData::rename(SegIdx segidx, const SegName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->rename(segidx, newname); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -816,12 +824,12 @@ void MoleculeData::rename(const SegID &segid, const SegName &newname) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo( *(molinfo.constData()) ); - + foreach (SegIdx segidx, segid.map(info())) { newinfo = newinfo.rename(segidx, newname); } - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -839,7 +847,7 @@ void MoleculeData::renumber(AtomIdx atomidx, AtomNum newnum) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->renumber(atomidx, newnum); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -858,12 +866,12 @@ void MoleculeData::renumber(const AtomID &atomid, AtomNum newnum) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo( *(molinfo.constData()) ); - + foreach (AtomIdx atomidx, atomid.map(info())) { newinfo = newinfo.renumber(atomidx, newnum); } - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -881,7 +889,7 @@ void MoleculeData::renumber(ResIdx residx, ResNum newnum) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->renumber(residx, newnum); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -900,12 +908,12 @@ void MoleculeData::renumber(const ResID &resid, ResNum newnum) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo( *(molinfo.constData()) ); - + foreach (ResIdx residx, resid.map(info())) { newinfo = newinfo.renumber(residx, newnum); } - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -920,7 +928,7 @@ void MoleculeData::renumber(const QHash &atomnums) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->renumber(atomnums); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -935,7 +943,7 @@ void MoleculeData::renumber(const QHash &resnums) SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->renumber(resnums); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -951,7 +959,7 @@ void MoleculeData::renumber(const QHash &atomnums, SireBase::assert_true( vrsns.get() != 0, CODELOC ); MoleculeInfoData newinfo = molinfo->renumber(atomnums,resnums); - + if (newinfo.UID() != molinfo.constData()->UID()) { molinfo = newinfo; @@ -966,22 +974,22 @@ void MoleculeData::renumber(const QHash &atomnums, with this molecule (e.g. it ensures that if the property is an atomic property, then it has the right number of values for the atoms) - + \throw SireError::incompatible_error */ -void MoleculeData::setProperty(const QString &key, +void MoleculeData::setProperty(const QString &key, const Property &value, bool clear_metadata) { if (key.isEmpty()) throw SireError::invalid_arg( QObject::tr( "You cannot set a property with an empty key!"), CODELOC ); - + SireBase::assert_true( vrsns.get() != 0, CODELOC ); - + //now the property version number prop_vrsns.insert( key, vrsns->increment(key, vrsn) ); - + //now save the property itself props.setProperty(key, value, clear_metadata); } @@ -995,12 +1003,12 @@ void MoleculeData::removeProperty(const QString &key) { props.removeProperty(key); prop_vrsns.remove(key); - + //do not remove from the shared version numbers, in - //case the user re-adds a property with this key - + //case the user re-adds a property with this key - //we have to still ensure that the version number is //unique :-) - + //increment the global version number vrsn = vrsns->increment(); } @@ -1008,44 +1016,44 @@ void MoleculeData::removeProperty(const QString &key) /** Remove the property at key 'key', returning the value of that property - + \throw SireBase::missing_property */ PropertyPtr MoleculeData::takeProperty(const QString &key) { PropertyPtr value = this->property(key); this->removeProperty(key); - + return value; } /** Remove the metadata at metakey 'metakey', returning the value of the metadata - + \throw SireBase::missing_property */ PropertyPtr MoleculeData::takeMetadata(const QString &metakey) { PropertyPtr value = this->metadata(metakey); this->removeMetadata(metakey); - + return value; } /** Remove the metadata at metakey 'metakey' from the property at key 'key', returning the value of the metadata - + \throw SireBase::missing_property */ PropertyPtr MoleculeData::takeMetadata(const QString &key, const QString &metakey) { PropertyPtr value = this->metadata(key, metakey); this->removeMetadata(key,metakey); - + return value; } -/** Set the value of the metadata at metakey 'metakey' to +/** Set the value of the metadata at metakey 'metakey' to the value 'value' */ void MoleculeData::setMetadata(const QString &metakey, const Property &value) { @@ -1061,12 +1069,12 @@ void MoleculeData::setMetadata(const QString &metakey, const Property &value) vrsn = vrsns->increment(); } -/** Set the value of the metadata at metakey 'metakey' of the +/** Set the value of the metadata at metakey 'metakey' of the property at key 'key' to the value 'value' - + \throw SireBase::missing_property -*/ -void MoleculeData::setMetadata(const QString &key, const QString &metakey, +*/ +void MoleculeData::setMetadata(const QString &key, const QString &metakey, const Property &value) { if (key.isNull()) @@ -1079,7 +1087,7 @@ void MoleculeData::setMetadata(const QString &key, const QString &metakey, SireBase::assert_true( vrsns.get() != 0, CODELOC ); props.setMetadata(key, metakey, value); - + //increment the global version number vrsn = vrsns->increment(); } @@ -1094,9 +1102,9 @@ void MoleculeData::removeMetadata(const QString &metakey) } } -/** Remove the metadata at metakey 'metakey' from the +/** Remove the metadata at metakey 'metakey' from the property at key 'key' - + \throw SireBase::missing_property */ void MoleculeData::removeMetadata(const QString &key, const QString &metakey) diff --git a/corelib/src/libs/SireMol/moleculedata.h b/corelib/src/libs/SireMol/moleculedata.h index 339d1ad6d..30a186f5c 100644 --- a/corelib/src/libs/SireMol/moleculedata.h +++ b/corelib/src/libs/SireMol/moleculedata.h @@ -50,8 +50,8 @@ namespace SireMol class MoleculeData; } -QDataStream& operator<<(QDataStream&, const SireMol::MoleculeData&); -QDataStream& operator>>(QDataStream&, SireMol::MoleculeData&); +SIREMOL_EXPORT QDataStream& operator<<(QDataStream&, const SireMol::MoleculeData&); +SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::MoleculeData&); namespace SireMol { @@ -117,7 +117,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); ~MoleculeData(); static const char* typeName(); - + const char* what() const { return MoleculeData::typeName(); @@ -165,17 +165,17 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + template bool hasPropertyOfType(const PropertyName &key) const; - + template bool hasMetadataOfType(const PropertyName &metakey) const; - + template bool hasMetadataOfType(const PropertyName &key, const PropertyName &metakey) const; - + const char* propertyType(const PropertyName &key) const; const char* metadataType(const PropertyName &metakey) const; const char* metadataType(const PropertyName &key, @@ -193,15 +193,15 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); MoleculeData extract(const AtomSelection &selected_atoms) const; QStringList propertyKeys() const; - + QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; const Property& property(const PropertyName &key) const; - + const Property& property(const PropertyName &key, const Property &default_value) const; - + const Property& metadata(const PropertyName &metakey) const; const Property& metadata(const PropertyName &key, @@ -209,11 +209,13 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); const Property& metadata(const PropertyName &metakey, const Property &default_value) const; - + const Property& metadata(const PropertyName &key, const PropertyName &metakey, const Property &default_value) const; + bool isEmpty() const; + void rename(const MolName &newname); void renumber(); @@ -224,19 +226,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); void rename(CGIdx cgidx, const CGName &newname); void rename(const CGID &cgid, const CGName &newname); - + void rename(ResIdx residx, const ResName &newname); void rename(const ResID &resid, const ResName &newname); - + void rename(ChainIdx chainidx, const ChainName &newname); void rename(const ChainID &chainid, const ChainName &newname); - + void rename(SegIdx segix, const SegName &newname); void rename(const SegID &segid, const SegName &newname); - + void renumber(AtomIdx atomidx, AtomNum newnum); void renumber(const AtomID &atomid, AtomNum newnum); - + void renumber(ResIdx residx, ResNum newnum); void renumber(const ResID &resid, ResNum newnum); @@ -245,13 +247,13 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); void renumber(const QHash &atomnums, const QHash &resnums); - void setProperty(const QString &key, + void setProperty(const QString &key, const Property &value, bool clear_metadata=false); void removeProperty(const QString &key); void setMetadata(const QString &metakey, const Property &value); - void setMetadata(const QString &key, const QString &metakey, + void setMetadata(const QString &key, const QString &metakey, const Property &value); void removeMetadata(const QString &metakey); @@ -287,7 +289,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); as a metadata property "version" with each property) */ Properties props; - /** The version number of this molecule - this changes + /** The version number of this molecule - this changes whenever the molecule is changed in any way. If two molecules have the same molecule number and version then they must be the same */ quint64 vrsn; @@ -307,28 +309,28 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); public: PropVersions() : version(0) {} - + ~PropVersions() {} - + quint64 increment(); quint64 increment(const QString &key, quint64 &mol); - + void incrementAll(MoleculeData &moldata); - + quint64 reset(QHash &prop_vrsns); - + private: quint64 increment(const QString &key); - + /** Mutex used to serialise access to the last version number */ QMutex mutex; - - /** The last version number assigned to - this molecule */ + + /** The last version number assigned to + this molecule */ quint64 version; - + /** The last version number assigned to each property of the molecule */ QHash property_version; @@ -339,7 +341,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeData&); static boost::shared_ptr registerMolecule(MolNum molnum); - /** The version number of each of the properties in + /** The version number of each of the properties in this molecule */ QHash prop_vrsns; @@ -358,7 +360,7 @@ bool MoleculeData::hasPropertyOfType(const PropertyName &key) const { return props.hasPropertyOfType(key); } - + /** Return whether or not this molecule has some metadata at metakey 'metakey' that is of type 'T' */ template @@ -370,7 +372,7 @@ bool MoleculeData::hasMetadataOfType(const PropertyName &metakey) const /** Return whether or not the property at key 'key' has some metadata at metakey 'metakey' that is of type 'T' - + \throw SireBase::missing_property */ template diff --git a/corelib/src/libs/SireMol/moleculegroup.cpp b/corelib/src/libs/SireMol/moleculegroup.cpp index fd8f9ba13..e0811d9b3 100644 --- a/corelib/src/libs/SireMol/moleculegroup.cpp +++ b/corelib/src/libs/SireMol/moleculegroup.cpp @@ -30,6 +30,9 @@ #include "molnum.h" #include "select.h" + +#include "core.h" + #include "SireID/index.h" namespace SireMol @@ -102,7 +105,7 @@ MGNum MGNum::getUniqueNumber() { new_num = MGNum(last_number.increment()); } - + return new_num; } @@ -110,23 +113,23 @@ MGNum MGNum::getUniqueNumber() //////// Functions relating to the tuple //////// -static QDataStream& operator<<(QDataStream &ds, +static QDataStream& operator<<(QDataStream &ds, const tuple &molviewidx) { ds << molviewidx.get<0>() << molviewidx.get<1>(); return ds; } -static QDataStream& operator>>(QDataStream &ds, +static QDataStream& operator>>(QDataStream &ds, tuple &molviewidx) { MolNum molnum; Index viewidx; - + ds >> molnum >> viewidx; molviewidx = tuple(molnum,viewidx); - + return ds; } @@ -143,30 +146,30 @@ class MolGroupPvt : public RefCountData { public: MolGroupPvt(); - + MolGroupPvt(const QString &name); MolGroupPvt(const QString &name, const MolGroupPvt &other); - + MolGroupPvt(const MolGroupPvt &other); - + ~MolGroupPvt(); MolGroupPvt& operator=(const MolGroupPvt &other); - + bool operator==(const MolGroupPvt &other) const; bool operator!=(const MolGroupPvt &other) const; - + void incrementMajor(); void incrementMinor(); - + Molecules molecules; - + QVector molidx_to_num; QVector< tuple > molviewidx_to_num; - + MGName name; MGNum number; - + MajorMinorVersion version; }; @@ -176,13 +179,13 @@ class MolGroupPvt : public RefCountData using namespace SireMol::detail; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const MolGroupPvt &molgrouppvt) { SharedDataStream sds(ds); - + QHash< MolNum,QList > molname_to_num; - + sds << molgrouppvt.molecules << molgrouppvt.molidx_to_num << molgrouppvt.molviewidx_to_num @@ -194,13 +197,13 @@ QDataStream &operator<<(QDataStream &ds, } /** Deserialise from a binary datastream */ -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, MolGroupPvt &molgrouppvt) { SharedDataStream sds(ds); QHash< MolNum,QList > molname_to_num; - + sds >> molgrouppvt.molecules >> molgrouppvt.molidx_to_num >> molgrouppvt.molviewidx_to_num @@ -209,12 +212,12 @@ QDataStream &operator>>(QDataStream &ds, >> molgrouppvt.number; molgrouppvt.version = mgnum_registry.registerObject(molgrouppvt.number); - + return ds; } /** Construct an empty, unnamed MolGroupPvt */ -MolGroupPvt::MolGroupPvt() +MolGroupPvt::MolGroupPvt() : RefCountData(), name("unnamed"), number( MGNum::getUniqueNumber() ), @@ -230,7 +233,7 @@ MolGroupPvt::MolGroupPvt(const QString &nme) {} /** Construct a named group that contains the same molecules as 'other' */ -MolGroupPvt::MolGroupPvt(const QString &nme, +MolGroupPvt::MolGroupPvt(const QString &nme, const MolGroupPvt &other) : RefCountData(), molecules(other.molecules), @@ -251,7 +254,7 @@ MolGroupPvt::MolGroupPvt(const MolGroupPvt &other) number(other.number), version(other.version) {} - + /** Destructor */ MolGroupPvt::~MolGroupPvt() {} @@ -268,7 +271,7 @@ MolGroupPvt& MolGroupPvt::operator=(const MolGroupPvt &other) number = other.number; version = other.version; } - + return *this; } @@ -316,7 +319,7 @@ QDataStream &operator<<(QDataStream &ds, SharedDataStream sds(ds); sds << molgroup.d; } - + return ds; } @@ -325,22 +328,22 @@ QDataStream &operator>>(QDataStream &ds, MoleculeGroup &molgroup) { VersionID v = readHeader(ds, r_MoleculeGroup); - + if (v == 1) { SharedDataStream sds(ds); - + molgroup.workspace.clear(); sds >> molgroup.d; } else throw version_error(v, "1", r_MoleculeGroup, CODELOC); - + return ds; } /** Default constructor */ -MoleculeGroup::MoleculeGroup() +MoleculeGroup::MoleculeGroup() : ConcreteProperty(), d( create_shared_null() ) {} @@ -402,8 +405,8 @@ MoleculeGroup::MoleculeGroup(const QString &name, const Molecules &molecules) { this->add(molecules); } - -/** Construct a named group that contains the same molecules as 'other' */ + +/** Construct a named group that contains the same molecules as 'other' */ MoleculeGroup::MoleculeGroup(const QString &name, const MoleculeGroup &other) : ConcreteProperty(), workspace(other.workspace) { @@ -453,7 +456,7 @@ bool MoleculeGroup::operator!=(const MoleculeGroup &other) const const ViewsOfMol& MoleculeGroup::at(MolNum molnum) const { const ViewsOfMol &oldmol = d->molecules.at(molnum); - + if (workspace.isEmpty()) { return oldmol; @@ -470,7 +473,7 @@ const ViewsOfMol& MoleculeGroup::at(MolNum molnum) const PartialMolecule MoleculeGroup::operator[](const boost::tuple &viewidx) const { PartialMolecule oldmol = d->molecules.at(viewidx); - + if (workspace.isEmpty()) return oldmol; else @@ -522,7 +525,7 @@ const ViewsOfMol& MoleculeGroup::operator[](const MolID &molid) const \throw SireMol::duplicate_molecule \throw SireError::invalid_index */ -PartialMolecule +PartialMolecule MoleculeGroup::operator[](const boost::tuple &viewidx) const { return this->at(viewidx); @@ -562,7 +565,7 @@ quint64 MoleculeGroup::getMoleculeVersion(MolNum molnum) const return this->at(molnum).version(); } -/** Return the version number of the molecule with ID 'molid' +/** Return the version number of the molecule with ID 'molid' \throw SireMol::missing_molecule \throw SireMol::duplicate_molecule @@ -611,7 +614,7 @@ const ViewsOfMol& MoleculeGroup::at(const MolID &molid) const PartialMolecule MoleculeGroup::at(const boost::tuple &viewidx) const { PartialMolecule oldmol = d->molecules.at(viewidx); - + if (workspace.isEmpty()) return oldmol; else @@ -624,7 +627,7 @@ PartialMolecule MoleculeGroup::at(const boost::tuple &viewidx) con \throw SireMol::duplicate_molecule \throw SireError::invalid_index */ -PartialMolecule +PartialMolecule MoleculeGroup::at(const boost::tuple &viewidx) const { PartialMolecule oldmol = this->at( viewidx.get<0>().base(), viewidx.get<1>() ); @@ -650,9 +653,9 @@ PartialMolecule MoleculeGroup::at(MolNum molnum, int viewidx) const return workspace.getUpdated(oldmol); } -/** Return the specified view of the molecule identified by - the ID 'molid' - +/** Return the specified view of the molecule identified by + the ID 'molid' + \throw SireMol::missing_molecule \throw SireMol::duplicate_molecule \throw SireError::invalid_index @@ -690,9 +693,9 @@ const ViewsOfMol& MoleculeGroup::moleculeAt(int idx) const PartialMolecule MoleculeGroup::viewAt(int idx) const { idx = Index(idx).map(d->molviewidx_to_num.count()); - + const tuple &molviewidx = d->molviewidx_to_num.constData()[idx]; - + PartialMolecule oldmol = d->molecules.at( molviewidx.get<0>(), molviewidx.get<1>() ); if (workspace.isEmpty()) @@ -708,7 +711,7 @@ PartialMolecule MoleculeGroup::viewAt(int idx) const const tuple& MoleculeGroup::molViewIndexAt(int idx) const { idx = Index(idx).map(d->molviewidx_to_num.count()); - + return d->molviewidx_to_num.constData()[idx]; } @@ -721,7 +724,7 @@ MolNum MoleculeGroup::molNumAt(int idx) const return d->molidx_to_num.constData()[ Index(idx).map(d->molidx_to_num.count()) ]; } -/** Return the index of the view of the molecule viewed in 'molview'. This +/** Return the index of the view of the molecule viewed in 'molview'. This is the index of this specific view, so you use this index with the MoleculeGroup::viewAt(int i) function. This returns -1 if this view is not in this group */ @@ -729,10 +732,10 @@ int MoleculeGroup::indexOf(const MoleculeView &molview) const { //get this molecule const ViewsOfMol &mol = this->operator[](molview.data().number()); - + //get the index of this view in the molecule int idx = mol.indexOf( molview.selection() ); - + if (idx == -1) return idx; @@ -759,13 +762,13 @@ int MoleculeGroup::indexOf(MolNum molnum) const /** Return the views of the molecule with number 'molnum' from this group - + \throw SireMol::missing_molecule */ const ViewsOfMol& MoleculeGroup::molecule(MolNum molnum) const { const ViewsOfMol &oldmol = d->molecules.at(molnum); - + if (workspace.isEmpty()) return oldmol; else @@ -810,20 +813,20 @@ const ViewsOfMol& MoleculeGroup::molecule(const MolID &molid) const Molecules MoleculeGroup::molecules(const MolID &molid) const { QList molnums = this->map(molid); - + Molecules mols; - + foreach (MolNum molnum, molnums) { mols.add( this->at(molnum) ); } - + return mols; } /** Obvious function used to shortcut the getMoleculeNumber(const MolID&) function - + \throw SireMol::missing_molecule */ MolNum MoleculeGroup::getMoleculeNumber(MolNum molnum) const @@ -839,7 +842,7 @@ MolNum MoleculeGroup::getMoleculeNumber(MolNum molnum) const MolNum MoleculeGroup::getMoleculeNumber(MolIdx molidx) const { int i = molidx.map( d->molidx_to_num.count() ); - + return d->molidx_to_num.constData()[i]; } @@ -851,7 +854,7 @@ MolNum MoleculeGroup::getMoleculeNumber(MolIdx molidx) const MolNum MoleculeGroup::getMoleculeNumber(const MolName &molname) const { QList molnums = this->map(molname); - + if (molnums.count() > 1) throw SireMol::duplicate_molecule( QObject::tr( "There is more than one molecule with the name \"%1\"." @@ -871,14 +874,14 @@ MolNum MoleculeGroup::getMoleculeNumber(const MolName &molname) const MolNum MoleculeGroup::getMoleculeNumber(const MolID &molid) const { QList molnums = this->map(molid); - + if (molnums.count() > 1) throw SireMol::duplicate_molecule( QObject::tr( "There is more than one molecule that matches the ID %1. " "Matching molecules have numbers %2.") .arg(molid.toString()) .arg(Sire::toString(molnums)), CODELOC ); - + return molnums.first(); } @@ -889,10 +892,10 @@ MolNum MoleculeGroup::getMoleculeNumber(const MolID &molid) const QList MoleculeGroup::map(MolNum molnum) const { this->assertContains(molnum); - + QList molnums; molnums.append(molnum); - + return molnums; } @@ -906,7 +909,7 @@ QList MoleculeGroup::map(MolIdx molidx) const QList molnums; molnums.append( d->molidx_to_num.constData()[i] ); - + return molnums; } @@ -930,7 +933,7 @@ QList MoleculeGroup::map(const MolID &molid) const return molid.map(*this); } -/** Return whether or not this group contains any views of the +/** Return whether or not this group contains any views of the molecule with number 'molnum' */ bool MoleculeGroup::contains(MolNum molnum) const { @@ -980,7 +983,7 @@ bool MoleculeGroup::contains(const MolID &molid) const } } -/** Return whether or not this group contains any version of +/** Return whether or not this group contains any version of the view of the molecule in 'molview' */ bool MoleculeGroup::contains(const MoleculeView &molview) const { @@ -994,7 +997,7 @@ bool MoleculeGroup::contains(const ViewsOfMol &molviews) const return d->molecules.contains(molviews); } -/** Return whether or not this group contains all of the +/** Return whether or not this group contains all of the views of any version of all of the molecules contained in 'molecules' */ bool MoleculeGroup::contains(const Molecules &molecules) const @@ -1002,7 +1005,7 @@ bool MoleculeGroup::contains(const Molecules &molecules) const return d->molecules.contains(molecules); } -/** Return whether or not this group contains all of the +/** Return whether or not this group contains all of the views of any version of all of the molecules contained in the group 'other' */ bool MoleculeGroup::contains(const MoleculeGroup &other) const @@ -1010,7 +1013,7 @@ bool MoleculeGroup::contains(const MoleculeGroup &other) const return this->contains(other.molecules()); } -/** Return whether or not this group contains any version +/** Return whether or not this group contains any version of any of the atoms of the molecule in 'molview' */ bool MoleculeGroup::intersects(const MoleculeView &molview) const { @@ -1025,7 +1028,7 @@ bool MoleculeGroup::intersects(const Molecules &other) const } /** Return whether or not this group contains any version - of any of the atoms in any of the molecules contained in + of any of the atoms in any of the molecules contained in the group 'other' */ bool MoleculeGroup::intersects(const MoleculeGroup &other) const { @@ -1038,8 +1041,60 @@ int MoleculeGroup::nMolecules() const return d->molidx_to_num.count(); } -/** Return the number of views of molecules in this group - - this must always be greater or equal to the number of +/** Return the number of atoms in this group */ +int MoleculeGroup::nAtoms() const +{ + int nats = 0; + + for (const auto &mol : d->molecules) + { + nats += mol.nAtoms(); + } + + return nats; +} + +/** Return the total number of residues in this group */ +int MoleculeGroup::nResidues() const +{ + int nres = 0; + + for (const auto &mol : d->molecules) + { + nres += mol.nResidues(); + } + + return nres; +} + +/** Return the total number of chains in this group */ +int MoleculeGroup::nChains() const +{ + int nchains = 0; + + for (const auto &mol : d->molecules) + { + nchains += mol.nChains(); + } + + return nchains; +} + +/** Return the total number of segments in this group */ +int MoleculeGroup::nSegments() const +{ + int nseg = 0; + + for (const auto &mol : d->molecules) + { + nseg += mol.nSegments(); + } + + return nseg; +} + +/** Return the number of views of molecules in this group - + this must always be greater or equal to the number of molecules! */ int MoleculeGroup::nViews() const { @@ -1048,7 +1103,7 @@ int MoleculeGroup::nViews() const /** Return the number of views of the molecule with number 'molnum' that are present in this group. - + \throw SireMol::missing_molecule */ int MoleculeGroup::nViews(MolNum molnum) const @@ -1058,21 +1113,21 @@ int MoleculeGroup::nViews(MolNum molnum) const /** Return the number of views of the molecule(s) that match the ID 'molid' - + \throw SireMol::missing_molecule \throw SireError::invalid_index */ int MoleculeGroup::nViews(const MolID &molid) const { QList molnums = this->map(molid); - + int nviews = 0; - + foreach (MolNum molnum, molnums) { nviews += this->nViews(molnum); } - + return nviews; } @@ -1101,7 +1156,7 @@ const Molecules& MoleculeGroup::molecules() const return d->molecules; } -/** Return a reference to the first molecule in the group +/** Return a reference to the first molecule in the group \throw SireError::invalid_index */ @@ -1143,7 +1198,7 @@ const ViewsOfMol& MoleculeGroup::front() const return workspace.getUpdated(oldmol); } -/** Return a reference to the last molecule in the group +/** Return a reference to the last molecule in the group \throw SireError::invalid_index */ @@ -1205,7 +1260,7 @@ MoleculeGroup::const_iterator MoleculeGroup::constEnd() const return d->molecules.constEnd(); } -/** Return an iterator pointing to the molecule with +/** Return an iterator pointing to the molecule with number 'molnum'. If there is no such molecule then this returns MoleculeGroup::end() */ MoleculeGroup::const_iterator MoleculeGroup::find(MolNum molnum) const @@ -1218,7 +1273,7 @@ MoleculeGroup::const_iterator MoleculeGroup::find(MolNum molnum) const return d->molecules.find(molnum); } -/** Return an iterator pointing to the molecule with +/** Return an iterator pointing to the molecule with number 'molnum'. If there is no such molecule then this returns MoleculeGroup::end() */ MoleculeGroup::const_iterator MoleculeGroup::constFind(MolNum molnum) const @@ -1233,7 +1288,7 @@ MoleculeGroup::const_iterator MoleculeGroup::constFind(MolNum molnum) const /** Return an iterator that points to the molecule that matches the ID 'molid' - + \throw SireMol::missing_molecule \throw SireMol::duplicate_molecule \throw SireError::invalid_index @@ -1250,7 +1305,7 @@ MoleculeGroup::const_iterator MoleculeGroup::find(const MolID &molid) const /** Return an iterator that points to the molecule that matches the ID 'molid' - + \throw SireMol::missing_molecule \throw SireMol::duplicate_molecule \throw SireError::invalid_index @@ -1283,7 +1338,7 @@ const QVector< tuple >& MoleculeGroup::molViewIndicies() const QSet MoleculeGroup::molNames() const { QSet molnames; - + for (Molecules::const_iterator it = d->molecules.constBegin(); it != d->molecules.constEnd(); ++it) @@ -1294,9 +1349,9 @@ QSet MoleculeGroup::molNames() const return molnames; } -/** Assert that this group contains a view of any part of the +/** Assert that this group contains a view of any part of the molecule with number 'molnum' - + \throw SireMol::missing_molecule */ void MoleculeGroup::assertContains(MolNum molnum) const @@ -1391,8 +1446,8 @@ SelectResult MoleculeGroup::search(const QString &search_term) const return Select(search_term)(*this); } -/** Add the view of the molecule in 'molview' to this group. - This adds the view as a duplicate if it already exists +/** Add the view of the molecule in 'molview' to this group. + This adds the view as a duplicate if it already exists in this group */ void MoleculeGroup::add(const MoleculeView &molview) { @@ -1407,9 +1462,9 @@ void MoleculeGroup::add(const MoleculeView &molview) if (not dref.molecules.contains(molnum)) dref.molidx_to_num.append(molnum); - + dref.molecules.add(molview); - + dref.molviewidx_to_num.append( tuple(molnum, Index(dref.molecules.nViews(molnum) - 1)) ); @@ -1432,26 +1487,26 @@ void MoleculeGroup::add(const ViewsOfMol &molviews) accept(); MolNum molnum = molviews.number(); - + MolGroupPvt &dref = *d; - + if (not dref.molecules.contains(molnum)) dref.molidx_to_num.append(molnum); - + dref.molecules.add(molviews); - + quint32 nviews = dref.molecules.nViews(molnum); - + for (quint32 i = nviews - molviews.count(); i < nviews; ++i) { dref.molviewidx_to_num.append( tuple(molnum,Index(i)) ); } - + dref.incrementMajor(); } /** Add all of the molecules in 'molecules' to this group. - This duplicates any molecules that already exist in this + This duplicates any molecules that already exist in this group. */ void MoleculeGroup::add(const Molecules &molecules) { @@ -1466,23 +1521,23 @@ void MoleculeGroup::add(const Molecules &molecules) accept(); MolGroupPvt &dref = *d; - + //add the molecules to the index for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) { MolNum molnum = it.key(); - + quint32 nviews = 0; - + if (not dref.molecules.contains(molnum)) dref.molidx_to_num.append(molnum); else nviews = dref.molecules.nViews(molnum); quint32 n_newviews = it->nViews(); - + for (quint32 i=nviews; i(molnum,Index(i)) ); @@ -1491,12 +1546,12 @@ void MoleculeGroup::add(const Molecules &molecules) //now add the molecules themselves dref.molecules.add(molecules); - + dref.incrementMajor(); } -/** Add the molecules in 'MoleculeGroup' to this set. This adds the - molecules and views in the same order as they appear in +/** Add the molecules in 'MoleculeGroup' to this set. This adds the + molecules and views in the same order as they appear in 'MoleculeGroup', adding them as duplicates if they already exist in this set. Note that the version of the molecule will be taken from this set. */ @@ -1504,7 +1559,7 @@ void MoleculeGroup::add(const MoleculeGroup &molgroup) { if (molgroup.isEmpty()) return; - + if (molgroup.needsAccepting()) { MoleculeGroup copy(molgroup); @@ -1512,34 +1567,34 @@ void MoleculeGroup::add(const MoleculeGroup &molgroup) this->add(copy); return; } - + if (this->isEmpty()) { MolGroupPvt &dref = *d; dref.molecules = molgroup.d->molecules; dref.molidx_to_num = molgroup.d->molidx_to_num; dref.molviewidx_to_num = molgroup.d->molviewidx_to_num; - + dref.incrementMajor(); return; } - + accept(); - + SharedDataPointer old_state = d; - + try { MolGroupPvt &dref = *d; - + //append the other group's index onto this group foreach (MolNum molnum, molgroup.d->molidx_to_num) { if (not dref.molecules.contains(molnum)) dref.molidx_to_num.append(molnum); } - - for (QVector< tuple >::const_iterator + + for (QVector< tuple >::const_iterator it = molgroup.d->molviewidx_to_num.constBegin(); it != molgroup.d->molviewidx_to_num.constEnd(); ++it) @@ -1547,17 +1602,17 @@ void MoleculeGroup::add(const MoleculeGroup &molgroup) MolNum molnum = it->get<0>(); int nviews = 0; - + if (dref.molecules.contains(molnum)) nviews = dref.molecules.nViews(molnum); - + dref.molviewidx_to_num.append( tuple( molnum, Index(it->get<1>() + nviews) ) ); } - + //now add the molecules themselves to this set dref.molecules.add(molgroup.d->molecules); - + dref.incrementMajor(); } catch(...) @@ -1567,8 +1622,8 @@ void MoleculeGroup::add(const MoleculeGroup &molgroup) } } -/** Add the view of the molecule in 'molview' to this group. - This only adds the view if it does not already exist in +/** Add the view of the molecule in 'molview' to this group. + This only adds the view if it does not already exist in this group, and returns whether or not the view was added */ bool MoleculeGroup::addIfUnique(const MoleculeView &molview) { @@ -1580,18 +1635,18 @@ bool MoleculeGroup::addIfUnique(const MoleculeView &molview) MolNum molnum = molview.data().number(); MolGroupPvt &dref = *d; - + bool hasmol = dref.molecules.contains(molnum); - + if (dref.molecules.addIfUnique(molview)) { //the view has been added! if (not hasmol) dref.molidx_to_num.append(molnum); - + dref.molviewidx_to_num.append( tuple(molnum, Index(dref.molecules.nViews(molnum) - 1)) ); - + dref.incrementMajor(); return true; } @@ -1607,33 +1662,33 @@ ViewsOfMol MoleculeGroup::addIfUnique(const ViewsOfMol &molviews) { if (molviews.isEmpty()) return ViewsOfMol(); - + accept(); - + MolNum molnum = molviews.number(); - + MolGroupPvt &dref = *d; - + bool hasmol = dref.molecules.contains(molnum); - + ViewsOfMol added_views = dref.molecules.addIfUnique(molviews); - + if (not added_views.isEmpty()) { if (not hasmol) dref.molidx_to_num.append(molnum); - + quint32 nviews = dref.molecules.nViews(molnum); quint32 nadded = added_views.nViews(); - + for (quint32 i=nviews-nadded-1; i(molnum,Index(i)) ); } - + dref.incrementMajor(); } - + return added_views; } @@ -1644,36 +1699,36 @@ QList MoleculeGroup::addIfUnique(const Molecules &molecules) { if (molecules.isEmpty()) return QList(); - + accept(); - + MolGroupPvt &dref = *d; //which molecules already exist in this group? QSet groupmols = dref.molecules.molNums(); - + //add the molecules to this group QList added_mols = dref.molecules.addIfUnique(molecules); - + //now update the index if (not added_mols.isEmpty()) { foreach (const ViewsOfMol &added_mol, added_mols) { MolNum molnum = added_mol.number(); - + if (not groupmols.contains(molnum)) dref.molidx_to_num.append(molnum); - + quint32 nviews = dref.molecules.nViews(molnum); quint32 nadded = added_mol.nViews(); - + for (quint32 i=nviews-nadded-1; i(molnum,Index(i)) ); } } - + dref.incrementMajor(); } @@ -1685,9 +1740,9 @@ QList MoleculeGroup::addIfUnique(const Molecules &molecules) the same action as MoleculeGroup::addIfUnique(molecules), but it ensures that the added views are in the same order as in 'MoleculeGroup'. This is costly, so if you don't care - about the added order, then use - MoleculeGroup::addIfUnique(MoleculeGroup.molecules()) instead. - + about the added order, then use + MoleculeGroup::addIfUnique(MoleculeGroup.molecules()) instead. + This returns the added views. */ QList MoleculeGroup::addIfUnique(const MoleculeGroup &molgroup) @@ -1696,31 +1751,31 @@ QList MoleculeGroup::addIfUnique(const MoleculeGroup &molgroup) if (molgroup.isEmpty()) return added_mols; - + if (molgroup.needsAccepting()) { MoleculeGroup copy(molgroup); copy.accept(); return this->addIfUnique(copy); } - + accept(); - + MolGroupPvt &dref = *d; //which molecules already exist in this group? QSet groupmols = dref.molecules.molNums(); - - for (QVector< tuple >::const_iterator + + for (QVector< tuple >::const_iterator it = dref.molviewidx_to_num.constBegin(); it != dref.molviewidx_to_num.constEnd(); ++it) { MolNum molnum = it->get<0>(); Index i = it->get<1>(); - + PartialMolecule molview = molgroup[molnum].valueAt(i); - + if (dref.molecules.addIfUnique(molview)) added_mols.append(molview); } @@ -1731,22 +1786,22 @@ QList MoleculeGroup::addIfUnique(const MoleculeGroup &molgroup) foreach (const ViewsOfMol &added_mol, added_mols) { MolNum molnum = added_mol.number(); - + if (not groupmols.contains(molnum)) dref.molidx_to_num.append(molnum); - + quint32 nviews = dref.molecules.nViews(molnum); quint32 nadded = added_mol.nViews(); - + for (quint32 i=nviews-nadded-1; i(molnum,Index(i)) ); } } - + dref.incrementMajor(); } - + return added_mols; } @@ -1768,7 +1823,7 @@ QList MoleculeGroup::unite(const Molecules &molecules) return this->addIfUnique(molecules); } -/** Synonym for MoleculeGroup::addIfUnique(MoleculeGroup). The +/** Synonym for MoleculeGroup::addIfUnique(MoleculeGroup). The function MoleculeGroup::addIfUnique(MoleculeGroup.molecules()) is quicker if you don't care about the order in which the views are added. */ @@ -1792,36 +1847,36 @@ bool MoleculeGroup::_pvt_remove(const MoleculeView &molview) if (it == d.constData()->molecules.end()) return false; - + int viewidx = it->indexOf(selected_atoms); - + if (viewidx == -1) //this view is not present in this group return false; - - //the view is present - remove it! + + //the view is present - remove it! MolGroupPvt &dref = *d; - + //remove all of the views of this molecule... ViewsOfMol molviews = dref.molecules.remove(molview.data().number()); - + //remove the specified view from this set... molviews.removeAt(viewidx); - + //if there are any views left then add them back //to the collection of molecules if (not molviews.isEmpty()) { dref.molecules.add(molviews); - + //the molecule has only been partially removed, //so remove this view from the molview index QMutableVectorIterator< tuple > it(dref.molviewidx_to_num); - + while (it.hasNext()) { tuple &molviewidx = it.next(); - + if (molviewidx.get<0>() == molnum) { if (molviewidx.get<1>() == viewidx) @@ -1837,23 +1892,23 @@ bool MoleculeGroup::_pvt_remove(const MoleculeView &molview) //this molecule has been completely removed... //remove it completely from the index dref.molidx_to_num.remove( dref.molidx_to_num.indexOf(molnum) ); - + QMutableVectorIterator< tuple > it(dref.molviewidx_to_num); - + while (it.hasNext()) { const tuple &molviewidx = it.next(); - + if (molviewidx.get<0>() == molnum) it.remove(); } } - + return true; } /** Remove the view of the molecule in 'molview' from this set. - This only removes the first such view from the set, and + This only removes the first such view from the set, and returns whether or not any view was removed */ bool MoleculeGroup::remove(const MoleculeView &molview) { @@ -1870,23 +1925,23 @@ ViewsOfMol MoleculeGroup::_pvt_remove(const ViewsOfMol &molviews) { if (molviews.isEmpty()) return molviews; - + accept(); - + int nviews = molviews.nViews(); - + QList removed_views; - + for (int i=0; i_pvt_remove(view)) { removed_views.append(view.selection()); } } - + if (removed_views.isEmpty()) return ViewsOfMol(); else @@ -1899,33 +1954,33 @@ ViewsOfMol MoleculeGroup::_pvt_remove(const ViewsOfMol &molviews) ViewsOfMol MoleculeGroup::remove(const ViewsOfMol &molviews) { ViewsOfMol removed_views = this->_pvt_remove(molviews); - + if (not removed_views.isEmpty()) d->incrementMajor(); - + return removed_views; } -/** Remove all of the molecules listed in 'molecules' from this set. +/** Remove all of the molecules listed in 'molecules' from this set. This only removes the first of any duplicated views in this set. This returns the views/molecules that were successfully removed. */ QList MoleculeGroup::remove(const Molecules &molecules) { QList removed_mols; - + for (Molecules::const_iterator it = molecules.begin(); it != molecules.end(); ++it) { ViewsOfMol removed_views = this->_pvt_remove(*it); - + if (not removed_views.isEmpty()) removed_mols.append(removed_views); } if (not removed_mols.isEmpty()) d->incrementMajor(); - + return removed_mols; } @@ -1950,12 +2005,12 @@ bool MoleculeGroup::_pvt_removeAll(const MoleculeView &molview) //just keep removing it until the view has gone completely! bool removed_a_view = false; - + while (this->_pvt_remove(molview)) { removed_a_view = true; } - + return removed_a_view; } @@ -1977,21 +2032,21 @@ ViewsOfMol MoleculeGroup::_pvt_removeAll(const ViewsOfMol &molviews) { if (molviews.isEmpty()) return molviews; - + accept(); - + QList removed_views; - + int nviews = molviews.nViews(); - + for (int i=0; i_pvt_removeAll(view)) removed_views.append(view.selection()); } - + if (removed_views.isEmpty()) return ViewsOfMol(); else @@ -2004,10 +2059,10 @@ ViewsOfMol MoleculeGroup::_pvt_removeAll(const ViewsOfMol &molviews) ViewsOfMol MoleculeGroup::removeAll(const ViewsOfMol &molviews) { ViewsOfMol removed_views = this->_pvt_remove(molviews); - + if (not removed_views.isEmpty()) d->incrementMajor(); - + return removed_views; } @@ -2017,25 +2072,25 @@ ViewsOfMol MoleculeGroup::removeAll(const ViewsOfMol &molviews) QList MoleculeGroup::removeAll(const Molecules &molecules) { QList removed_mols; - + for (Molecules::const_iterator it = molecules.begin(); it != molecules.end(); ++it) { ViewsOfMol removed_views = this->_pvt_removeAll(*it); - + if (not removed_views.isEmpty()) removed_mols.append(removed_views); } - + if (not removed_mols.isEmpty()) d->incrementMajor(); - + return removed_mols; } /** Remove all copies of all of the views of the molecules in the - group 'MoleculeGroup'. This removes all copies of any duplicated + group 'MoleculeGroup'. This removes all copies of any duplicated views in this group. This returns the molecules/views that were removed */ @@ -2062,20 +2117,20 @@ ViewsOfMol MoleculeGroup::_pvt_remove(MolNum molnum) //remove the molecule ViewsOfMol removed_views = dref.molecules.remove(molnum); - + //now remove it from the index dref.molidx_to_num.remove( dref.molidx_to_num.indexOf(molnum) ); - + QMutableVectorIterator< tuple > it(dref.molviewidx_to_num); - + while (it.hasNext()) { const tuple &molviewidx = it.next(); - + if (molviewidx.get<0>() == molnum) it.remove(); } - + return removed_views; } @@ -2084,10 +2139,10 @@ ViewsOfMol MoleculeGroup::_pvt_remove(MolNum molnum) ViewsOfMol MoleculeGroup::remove(MolNum molnum) { ViewsOfMol removed_views = this->_pvt_remove(molnum); - + if (not removed_views.isEmpty()) d->incrementMajor(); - + return removed_views; } @@ -2100,14 +2155,14 @@ QList MoleculeGroup::remove(const QSet &molnums) foreach (MolNum molnum, molnums) { ViewsOfMol removed_views = this->_pvt_remove(molnum); - + if (not removed_views.isEmpty()) removed_mols.append(removed_views); } - + if (not removed_mols.isEmpty()) d->incrementMajor(); - + return removed_mols; } @@ -2117,21 +2172,21 @@ void MoleculeGroup::removeAll() if (not this->isEmpty()) { MolGroupPvt &dref = *d; - + dref.molecules.clear(); dref.molidx_to_num.clear(); dref.molviewidx_to_num.clear(); - + workspace.clear(); - + dref.incrementMajor(); } } -/** Update this group so that the molecule in this group whose +/** Update this group so that the molecule in this group whose data is in 'moldata' is also at the same version as 'moldata'. - - This does nothing if there is no such molecule in this + + This does nothing if there is no such molecule in this group, or if it is already at this version, and this returns whether or not this changes the group. */ bool MoleculeGroup::update(const MoleculeData &moldata, bool auto_commit) @@ -2140,7 +2195,7 @@ bool MoleculeGroup::update(const MoleculeData &moldata, bool auto_commit) { if (this->needsAccepting()) this->accept(); - + if (d.constData()->molecules.contains(moldata.number())) { if (d.constData()->molecules.at(moldata.number()).version() != moldata.version()) @@ -2163,7 +2218,7 @@ bool MoleculeGroup::update(const MoleculeData &moldata, bool auto_commit) { workspace.setVersion(d.constData()->version); } - + workspace.push(moldata); workspace.incrementMinor(); return true; @@ -2176,8 +2231,8 @@ bool MoleculeGroup::update(const MoleculeData &moldata, bool auto_commit) /** Update this group so that the molecule in this group that is also viewed in 'molview' is updated to the same version as 'molview'. - - This does nothing if there is no such molecule in this + + This does nothing if there is no such molecule in this group, or if it is already at this version, and this returns whether or not this changes the group. */ bool MoleculeGroup::update(const MoleculeView &molview, bool auto_commit) @@ -2185,7 +2240,7 @@ bool MoleculeGroup::update(const MoleculeView &molview, bool auto_commit) return this->update(molview.data(), auto_commit); } -/** Update this group so that the contained molecules have the +/** Update this group so that the contained molecules have the same versions as the molecules in 'molecules'. This does nothing if none of these molecules are in this group, or if they are already at the same versions. This returns @@ -2198,7 +2253,7 @@ QList MoleculeGroup::update(const Molecules &molecules, bool auto_comm { if (this->needsAccepting()) this->accept(); - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) @@ -2212,14 +2267,14 @@ QList MoleculeGroup::update(const Molecules &molecules, bool auto_comm } } } - + if (not updated_mols.isEmpty()) d->version.incrementMinor(); } else { bool must_create_version = false; - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) @@ -2230,22 +2285,22 @@ QList MoleculeGroup::update(const Molecules &molecules, bool auto_comm { if (workspace.isEmpty()) must_create_version = true; - + workspace.push(it.value().data()); updated_mols.append(it.value().molecule()); } } } - + if (not updated_mols.isEmpty()) { if (must_create_version) workspace.setVersion( d.constData()->version ); - + workspace.incrementMinor(); } } - + return updated_mols; } @@ -2279,42 +2334,42 @@ void MoleculeGroup::_pvt_setContents(const Molecules &molecules) workspace.clear(); MolGroupPvt &dref = *d; - + //set the molecules dref.molecules = molecules; - + //resize the two indexes dref.molidx_to_num.resize(molecules.nMolecules()); dref.molviewidx_to_num.resize(molecules.nViews()); MolNum *molidx_to_num_array = dref.molidx_to_num.data(); tuple *molviewidx_to_num_array = dref.molviewidx_to_num.data(); - + int imol = 0; int iview = 0; - + //index the molecules and views... for (Molecules::const_iterator it = molecules.begin(); it != molecules.end(); ++it) { const ViewsOfMol &molviews = *it; - + //index the molecule molidx_to_num_array[imol] = it.key(); ++imol; - + //now index its views int nviews = molviews.nViews(); - + for (int i=0; i < nviews; ++i) { molviewidx_to_num_array[iview+i] = tuple(it.key(), Index(i)); } - + iview += nviews; } - + dref.incrementMajor(); } @@ -2345,13 +2400,13 @@ bool MoleculeGroup::setContents(const Molecules &molecules) if (oldmols == molecules) //there is nothing to do return false; - + //see if the actual list of molecules has changed, or whether //it is just their versions... if (oldmols.nMolecules() == molecules.nMolecules()) { bool different = false; - + //loop over all molecules and views and check that the same //molecules are in both sets, with the same views for (Molecules::const_iterator it = oldmols.begin(); @@ -2363,18 +2418,18 @@ bool MoleculeGroup::setContents(const Molecules &molecules) different = true; break; } - + const ViewsOfMol &oldviews = *it; const ViewsOfMol &newviews = molecules.molecule(it.key()); - + int nviews = oldviews.nViews(); - + if (nviews != newviews.nViews()) { different = true; break; } - + for (int i=0; imolecules = molecules; d->incrementMinor(); return true; } } - + //ok, the two sets of molecules contain different molecules and/or views. //We'll just have to reindex them completely. this->_pvt_setContents(molecules); return true; } -/** Set the contents of this group so that it only contains the +/** Set the contents of this group so that it only contains the view 'molview'. This clears any existing contents of this group */ bool MoleculeGroup::setContents(const MoleculeView &molview) { return this->setContents( Molecules(molview) ); } -/** Set the contents of this group so that it only contains the +/** Set the contents of this group so that it only contains the views of the molecule in 'molviews'. This clears any existing contents of this group. */ bool MoleculeGroup::setContents(const ViewsOfMol &molviews) @@ -2442,10 +2497,10 @@ bool MoleculeGroup::setContents(const MoleculeGroup &molgroup) this->minorVersion() != molgroup.minorVersion()); d = molgroup.d; - + return changed; } - + if (d.constData()->molecules == molgroup.d->molecules and d.constData()->molidx_to_num == molgroup.d->molidx_to_num and d.constData()->molviewidx_to_num == molgroup.d->molviewidx_to_num) @@ -2453,15 +2508,15 @@ bool MoleculeGroup::setContents(const MoleculeGroup &molgroup) //the contents are exactly the same! return false; } - + MolGroupPvt &dref = *d; - + dref.molecules = molgroup.d->molecules; dref.molidx_to_num = molgroup.d->molidx_to_num; dref.molviewidx_to_num = molgroup.d->molviewidx_to_num; - + dref.incrementMajor(); - + return true; } @@ -2482,7 +2537,7 @@ void MoleculeGroup::accept() { d->molecules.update( workspace.constData()[i].read() ); } - + d->version = workspace.version(); workspace.clear(); } diff --git a/corelib/src/libs/SireMol/moleculegroup.h b/corelib/src/libs/SireMol/moleculegroup.h index 54789c537..cb882241b 100644 --- a/corelib/src/libs/SireMol/moleculegroup.h +++ b/corelib/src/libs/SireMol/moleculegroup.h @@ -90,15 +90,15 @@ using SireBase::Version; /** This is the virtual base class of all MoleculeGroup type objects. Molecule groups are groups of molecules that also provide full indexing, versioning and identification support. - + Molecule group form the foundation of forcefields (which use groups to hold the molecules), Systems (again, use groups to hold the molecules) and Moves (use groups to select which molecules should be moved). - + Molecule groups provide the common interface for indexing, searching and managing groups of molecules. - + @author Christopher Woods */ class SIREMOL_EXPORT MoleculeGroup : public ConcreteProperty @@ -142,32 +142,32 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); virtual bool operator==(const MoleculeGroup &other) const; virtual bool operator!=(const MoleculeGroup &other) const; - + const ViewsOfMol& operator[](MolNum molnum) const; const ViewsOfMol& operator[](MolIdx molidx) const; const ViewsOfMol& operator[](const MolName &molname) const; const ViewsOfMol& operator[](const MolID &molid) const; - + PartialMolecule operator[](const boost::tuple &viewidx) const; PartialMolecule operator[](const boost::tuple &viewidx) const; - + MoleculeGroup& operator+=(const Molecules &molecules); MoleculeGroup& operator-=(const Molecules &molecules); quint64 getMoleculeVersion(MolNum molnum) const; quint64 getMoleculeVersion(const MolID &molid) const; - + const ViewsOfMol& at(MolNum molnum) const; const ViewsOfMol& at(MolIdx molidx) const; const ViewsOfMol& at(const MolName &molname) const; const ViewsOfMol& at(const MolID &molid) const; - + PartialMolecule at(const boost::tuple &viewidx) const; PartialMolecule at(const boost::tuple &viewidx) const; - + PartialMolecule at(MolNum molnum, int viewidx) const; PartialMolecule at(const MolID &molid, int viewidx) const; - + const ViewsOfMol& moleculeAt(int idx) const; PartialMolecule viewAt(int idx) const; @@ -201,18 +201,22 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); bool contains(MolIdx molidx) const; bool contains(const MolName &molname) const; bool contains(const MolID &molid) const; - + bool contains(const MoleculeView &molview) const; bool contains(const ViewsOfMol &molviews) const; bool contains(const Molecules &molecules) const; bool contains(const MoleculeGroup &MoleculeGroup) const; - + bool intersects(const MoleculeView &molview) const; bool intersects(const Molecules &other) const; bool intersects(const MoleculeGroup &MoleculeGroup) const; - + + int nAtoms() const; + int nResidues() const; + int nChains() const; + int nSegments() const; int nMolecules() const; - + int nViews() const; int nViews(MolNum molnum) const; @@ -221,12 +225,12 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); int nViews(Index idx) const; bool isEmpty() const; - + const Molecules& molecules() const; const ViewsOfMol& first() const; const ViewsOfMol& last() const; - + const ViewsOfMol& front() const; const ViewsOfMol& back() const; @@ -252,13 +256,13 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); const MGName& name() const; MGNum number() const; const Version& version() const; - + virtual QString toString() const; - + virtual void setName(const QString &new_name); virtual void setNumber(quint32 new_number); void setNewNumber(); - + quint64 majorVersion() const; quint64 minorVersion() const; @@ -266,22 +270,22 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); virtual void add(const ViewsOfMol &molviews); virtual void add(const Molecules &molecules); virtual void add(const MoleculeGroup &MoleculeGroup); - + virtual bool addIfUnique(const MoleculeView &molview); virtual ViewsOfMol addIfUnique(const ViewsOfMol &molviews); virtual QList addIfUnique(const Molecules &molecules); virtual QList addIfUnique(const MoleculeGroup &MoleculeGroup); - + bool unite(const MoleculeView &molview); ViewsOfMol unite(const ViewsOfMol &molviews); QList unite(const Molecules &molecules); QList unite(const MoleculeGroup &MoleculeGroup); - + virtual bool remove(const MoleculeView &molview); virtual ViewsOfMol remove(const ViewsOfMol &molviews); virtual QList remove(const Molecules &molecules); virtual QList remove(const MoleculeGroup &MoleculeGroup); - + virtual bool removeAll(const MoleculeView &molview); virtual ViewsOfMol removeAll(const ViewsOfMol &molviews); virtual QList removeAll(const Molecules &molecules); @@ -294,10 +298,10 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); virtual bool update(const MoleculeData &moldata, bool auto_commit=true); bool update(const MoleculeView &molview, bool auto_commit=true); - + virtual QList update(const Molecules &molecules, bool auto_commit=true); virtual QList update(const MoleculeGroup &MoleculeGroup, bool auto_commit=true); - + virtual bool setContents(const MoleculeView &molview); virtual bool setContents(const ViewsOfMol &molviews); virtual bool setContents(const Molecules &molecules); @@ -313,7 +317,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); ViewsOfMol _pvt_remove(const ViewsOfMol &molviews); ViewsOfMol _pvt_remove(MolNum molnum); - + bool _pvt_removeAll(const MoleculeView &molview); ViewsOfMol _pvt_removeAll(const ViewsOfMol &molviews); @@ -322,7 +326,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroup&); /** Implicitly shared pointer to the contents and index of this group */ SireBase::SharedDataPointer d; - + /** The workspace used to cache updates, thus preventing excessive re-allocation of memory during, e.g. MC moves */ MolGroupWorkspace workspace; diff --git a/corelib/src/libs/SireMol/moleculegroups.cpp b/corelib/src/libs/SireMol/moleculegroups.cpp index e8c873c0c..6fa1ebbe6 100644 --- a/corelib/src/libs/SireMol/moleculegroups.cpp +++ b/corelib/src/libs/SireMol/moleculegroups.cpp @@ -62,6 +62,8 @@ #include "tostring.h" +#include "SireBase/slice.h" + #include "SireMol/errors.h" #include "SireError/errors.h" @@ -203,6 +205,30 @@ ViewsOfMol MolGroupsBase::operator[](MolNum molnum) const return this->at(molnum); } +ViewsOfMol MolGroupsBase::operator[](int i) const +{ + return this->at(MolIdx(i)); +} + +ViewsOfMol MolGroupsBase::operator[](const QString &name) const +{ + return this->at(MolName(name)); +} + +QList MolGroupsBase::operator[](const SireBase::Slice &slice) const +{ + const auto molnums = this->molNums(); + + QList views; + + for (auto it = slice.begin(molnums.count()); not it.atEnd(); it.next()) + { + views.append(this->operator[](molnums.at(it.value()))); + } + + return views; +} + /** Return all of the views of the molecule identified by 'molid' that are contained in this set of groups. Note that if the same view appears in multiple groups, then it will be returned @@ -1532,6 +1558,58 @@ int MolGroupsBase::nMolecules() const return molnum_to_mgnum.count(); } +/** Return the total number of atoms in this groups in this set */ +int MolGroupsBase::nAtoms() const +{ + int n = 0; + + for (const auto &mol : this->molecules()) + { + n += mol.nAtoms(); + } + + return n; +} + +/** Return the total number of residues in this groups in this set */ +int MolGroupsBase::nResidues() const +{ + int n = 0; + + for (const auto &mol : this->molecules()) + { + n += mol.nResidues(); + } + + return n; +} + +/** Return the total number of chains in this groups in this set */ +int MolGroupsBase::nChains() const +{ + int n = 0; + + for (const auto &mol : this->molecules()) + { + n += mol.nChains(); + } + + return n; +} + +/** Return the total number of segments in this groups in this set */ +int MolGroupsBase::nSegments() const +{ + int n = 0; + + for (const auto &mol : this->molecules()) + { + n += mol.nSegments(); + } + + return n; +} + /** Return the total number of views of molecules in the groups in this set. Note that if a view appears multiple times, then it will be counted multiple times */ diff --git a/corelib/src/libs/SireMol/moleculegroups.h b/corelib/src/libs/SireMol/moleculegroups.h index 28516437a..38fbb3492 100644 --- a/corelib/src/libs/SireMol/moleculegroups.h +++ b/corelib/src/libs/SireMol/moleculegroups.h @@ -33,6 +33,8 @@ #include #include +#include + #include "SireBase/property.h" #include "moleculegroup.h" @@ -51,6 +53,11 @@ SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::MolGroupsBase&); SIREMOL_EXPORT QDataStream& operator<<(QDataStream&, const SireMol::MoleculeGroups&); SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::MoleculeGroups&); +namespace SireBase +{ +class Slice; +} + namespace SireMol { @@ -93,7 +100,7 @@ class AtomID; CA atoms in the "proteins" group). This is the virtual base class of the hierarchy - see MolGroups for a simple concrete instantiation. - + @author Christopher Woods */ class SIREMOL_EXPORT MolGroupsBase : public Property @@ -102,64 +109,68 @@ class SIREMOL_EXPORT MolGroupsBase : public Property friend SIREMOL_EXPORT QDataStream& ::operator<<(QDataStream&, const MolGroupsBase&); friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); -public: +public: virtual ~MolGroupsBase(); - + const MoleculeGroup& operator[](MGNum mgnum) const; const MoleculeGroup& operator[](const MGName &mgname) const; const MoleculeGroup& operator[](MGIdx mgidx) const; const MoleculeGroup& operator[](const MGID &mgid) const; - + + ViewsOfMol operator[](int i) const; + ViewsOfMol operator[](const QString &name) const; + ViewsOfMol operator[](MolNum molnum) const; ViewsOfMol operator[](const MolID &molid) const; - + Segment operator[](const SegID &segid) const; Chain operator[](const ChainID &chainid) const; Residue operator[](const ResID &resid) const; CutGroup operator[](const CGID &cgid) const; Atom operator[](const AtomID &atomid) const; - + QList operator[](const SireBase::Slice &slice) const; + virtual MolGroupsBase* clone() const=0; - + static const char* typeName() { return "SireMol::MolGroupsBase"; } - + MGNum getGroupNumber(MGNum mgnum) const; MGNum getGroupNumber(MGIdx mgidx) const; MGNum getGroupNumber(const MGName &mgname) const; MGNum getGroupNumber(const MGID &mgid) const; - + MGIdx mgIdx(MGNum mgnum) const; - + QList map(MGNum mgnum) const; QList map(MGIdx mgidx) const; QList map(const MGName &mgname) const; QList map(const MGID &mgid) const; - + MolNum getMoleculeNumber(MolNum molnum) const; MolNum getMoleculeNumber(MolIdx molidx) const; MolNum getMoleculeNumber(const MolName &molname) const; MolNum getMoleculeNumber(const MolID &molid) const; - + quint64 getMoleculeVersion(MolNum molnum) const; quint64 getMoleculeVersion(const MolID &molid) const; - + QList molNums() const; QList getMoleculeNumbers() const; - + QList map(MolNum molnum) const; QList map(MolIdx molidx) const; QList map(const MolName &molname) const; QList map(const MolID &molid) const; - + virtual const MoleculeGroup& at(MGNum mgnum) const=0; - + const MoleculeGroup& at(MGIdx mgidx) const; const MoleculeGroup& at(const MGName &mgname) const; const MoleculeGroup& at(const MGID &mgid) const; - + ViewsOfMol at(MolNum molnum) const; ViewsOfMol at(const MolID &molid) const; @@ -185,42 +196,42 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); QList selectAll(MGIdx mgidx) const; QList selectAll(const MGName &mgname) const; QList selectAll(const MGID &mgid) const; - + QList selectAll(const MolID &molid) const; - + QHash< MolNum,Selector > selectAll(const SegID &segid) const; QHash< MolNum,Selector > selectAll(const ChainID &chainid) const; QHash< MolNum,Selector > selectAll(const ResID &resid) const; QHash< MolNum,Selector > selectAll(const CGID &cgid) const; QHash< MolNum,Selector > selectAll(const AtomID &atomid) const; - + const MoleculeGroup& group(MGNum mgnum) const; const MoleculeGroup& group(const MGName &mgname) const; const MoleculeGroup& group(MGIdx mgidx) const; const MoleculeGroup& group(const MGID &mgid) const; - + QList groupNumbers() const; QList groupNames() const; - + QList groups() const; - + QList groups(MGNum mgnum) const; QList groups(MGIdx mgidx) const; QList groups(const MGName &mgname) const; QList groups(const MGID &mgid) const; - + ViewsOfMol molecule(MolNum molnum) const; ViewsOfMol molecule(const MolID &molid) const; - + QList molecules(MolNum molnum) const; QList molecules(const MolID &molid) const; - + Segment segment(const SegID &segid) const; Chain chain(const ChainID &chainid) const; Residue residue(const ResID &resid) const; CutGroup cutGroup(const CGID &cgid) const; Atom atom(const AtomID &atomid) const; - + QHash< MolNum,Selector > segments(const SegID &segid) const; QHash< MolNum,Selector > chains(const ChainID &chainid) const; QHash< MolNum,Selector > residues(const ResID &resid) const; @@ -231,21 +242,25 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); bool contains(MolNum molnum) const; bool contains(const QList &molnums) const; - + bool contains(const MoleculeView &molview) const; bool contains(const ViewsOfMol &molviews) const; bool contains(const Molecules &molecules) const; - + bool intersects(const MoleculeView &molview) const; bool intersects(const Molecules &other) const; const QList& groupsContaining(MolNum molnum) const; - + int nGroups() const; int count() const; - + + int nAtoms() const; + int nResidues() const; + int nChains() const; + int nSegments() const; int nMolecules() const; - + int nViews() const; int nViews(MolNum molnum) const; @@ -256,21 +271,21 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); Molecules molecules() const; Molecules molecules(const MGID &mgid) const; - + QList mgNums() const; QList mgNames() const; - + void assertContains(MolNum molnum) const; void assertContains(const MolID &molid) const; - + void assertContains(MGNum mgnum) const; void assertContains(const MGID &mgid) const; - + virtual void add(const MoleculeView &molview, const MGID &mgid)=0; virtual void add(const ViewsOfMol &molviews, const MGID &mgid)=0; virtual void add(const Molecules &molecules, const MGID &mgid)=0; virtual void add(const MoleculeGroup &molgroup, const MGID &mgid)=0; - + virtual void addIfUnique(const MoleculeView &molview, const MGID &mgid)=0; virtual void addIfUnique(const ViewsOfMol &molviews, @@ -279,18 +294,18 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); const MGID &mgid)=0; virtual void addIfUnique(const MoleculeGroup &molgroup, const MGID &mgid)=0; - + void unite(const MoleculeView &molview, const MGID &mgid); void unite(const ViewsOfMol &molviews, const MGID &mgid); void unite(const Molecules &molecules, const MGID &mgid); void unite(const MoleculeGroup &molgroup, const MGID &mgid); virtual bool remove(const MoleculeGroup &molgroup); - + virtual bool remove(const MoleculeView &molview); virtual bool remove(const ViewsOfMol &molviews); virtual bool remove(const Molecules &molecules); - + virtual bool removeAll(const MoleculeView &molview); virtual bool removeAll(const ViewsOfMol &molviews); virtual bool removeAll(const Molecules &molecules); @@ -303,14 +318,14 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); virtual bool remove(const MGID &mgid); virtual bool removeAll(const MGID &mgid)=0; - + virtual bool removeAll(); - + virtual bool remove(const MoleculeView &molview, const MGID &mgid)=0; virtual bool remove(const ViewsOfMol &molviews, const MGID &mgid)=0; virtual bool remove(const Molecules &molecules, const MGID &mgid)=0; virtual bool remove(const MoleculeGroup &molgroup, const MGID &mgid)=0; - + virtual bool removeAll(const MoleculeView &molview, const MGID &mgid)=0; virtual bool removeAll(const ViewsOfMol &molviews, const MGID &mgid)=0; virtual bool removeAll(const Molecules &molecules, const MGID &mgid)=0; @@ -321,26 +336,26 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); virtual void update(const MoleculeData &moldata, bool auto_commit=true)=0; void update(const MoleculeView &molview, bool auto_commit=true); - + virtual void update(const Molecules &molecules, bool auto_commit=true)=0; virtual void update(const MoleculeGroup &molgroup, bool auto_commit=true)=0; - + virtual void setContents(const MGID &mgid, const MoleculeView &molview)=0; virtual void setContents(const MGID &mgid, const ViewsOfMol &molviews)=0; virtual void setContents(const MGID &mgid, const Molecules &molecules)=0; virtual void setContents(const MGID &mgid, const MoleculeGroup &molgroup)=0; - + static const MoleculeGroups& null(); - + protected: MolGroupsBase(); - + MolGroupsBase(const MolGroupsBase &other); MolGroupsBase& operator=(const MolGroupsBase &other); virtual const MoleculeGroup& getGroup(MGNum mgnum) const=0; - + virtual void getGroups(const QList &mgnums, QVarLengthArray &groups) const=0; @@ -358,14 +373,14 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); void addToIndex(MGNum mgnum, MolNum molnum); void addToIndex(MGNum mgnum, const QSet &molnums); void addToIndex(MGNum mgnum, const QList &molnums); - + void removeFromIndex(MGNum mgnum); void removeFromIndex(MolNum molnum); - + void removeFromIndex(MGNum mgnum, MolNum molnum); void removeFromIndex(MGNum mgnum, const QSet &molnums); - void changeNameIndex(MGNum mgnum, const MGName &old_name, + void changeNameIndex(MGNum mgnum, const MGName &old_name, const MGName &new_name); void clearIndex(MGNum mgnum); @@ -374,10 +389,10 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); private: /** This index keeps an order of MoleculeGroup objects */ QList mgidx_to_num; - + /** This index maps the names of the MoleculeGroup objects */ QHash< MGName, QList > mgname_to_mgnum; - + /** This is an index of which groups contain which molecules */ QHash< MolNum, QList > molnum_to_mgnum; }; @@ -387,24 +402,24 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MolGroupsBase&); This is a virtual class, which can hold the virtual MoleculeGroup class objects. This can be used usefully in several situations, e.g.; - + System is derived from MolGroupsBase, and uses the MolGroups code to manage the indexing and version management of all of the molecules in the system. - + The forcefields are also derived from MolGroupsBase, allowing the MolGroups code to do the indexing and version management - of molecules in a forcefield. Also, this allows easy + of molecules in a forcefield. Also, this allows easy management of multiple groups in a forcefield, e.g. QM molecules and MM molecules, or group A and group B. - + While System and the forcefields are derived from MolGroupsBase, this class, MolGroups, provides a concrete class that allows the user to easily group together different MoleculeGroups. - + @author Christopher Woods */ -class SIREMOL_EXPORT MoleculeGroups +class SIREMOL_EXPORT MoleculeGroups : public ConcreteProperty { @@ -413,36 +428,36 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroups&); public: MoleculeGroups(); - + MoleculeGroups(const MoleculeGroup &molgroup); - + MoleculeGroups(const QList &molgroups); - + MoleculeGroups(const MoleculeGroups &other); - + ~MoleculeGroups(); MoleculeGroups* clone() const; - + static const char* typeName(); - + MoleculeGroups& operator=(const MoleculeGroups &other); - + bool operator==(const MoleculeGroups &other) const; bool operator!=(const MoleculeGroups &other) const; - + MoleculeGroups& operator+=(const MoleculeGroup &molgroup); MoleculeGroups& operator-=(const MoleculeGroup &molgroup); - + MoleculeGroups& operator-=(const MGID &mgid); - + MoleculeGroups& operator-=(const Molecules &molecules); MoleculeGroups& operator-=(const MolID &molid); void add(const MoleculeGroup &molgroup); bool remove(const MGID &mgid); - + /////////////////////////////////////////////// /// Pure virtual functions of MoleculeGroupsBase /// /////////////////////////////////////////////// @@ -453,7 +468,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroups&); void add(const ViewsOfMol &molviews, const MGID &mgid); void add(const Molecules &molecules, const MGID &mgid); void add(const MoleculeGroup &molgroup, const MGID &mgid); - + void addIfUnique(const MoleculeView &molview, const MGID &mgid); void addIfUnique(const ViewsOfMol &molviews, const MGID &mgid); void addIfUnique(const Molecules &molecules, const MGID &mgid); @@ -467,30 +482,30 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroups&); bool remove(const ViewsOfMol &molviews, const MGID &mgid); bool remove(const Molecules &molecules, const MGID &mgid); bool remove(const MoleculeGroup &molgroup, const MGID &mgid); - + bool removeAll(const MoleculeView &molview, const MGID &mgid); bool removeAll(const ViewsOfMol &molviews, const MGID &mgid); bool removeAll(const Molecules &molecules, const MGID &mgid); bool removeAll(const MoleculeGroup &molgroup, const MGID &mgid); bool removeAll(const MGID &mgid); - + bool remove(MolNum molnum, const MGID &mgid); bool remove(const QSet &molnums, const MGID &mgid); void update(const MoleculeData &moldata, bool auto_commit=true); - + void update(const Molecules &molecules, bool auto_commit=true); void update(const MoleculeGroup &molgroup, bool auto_commit=true); - + void setContents(const MGID &mgid, const MoleculeView &molview); void setContents(const MGID &mgid, const ViewsOfMol &molviews); void setContents(const MGID &mgid, const Molecules &molecules); void setContents(const MGID &mgid, const MoleculeGroup &molgroup); - + bool needsAccepting() const; void accept(); - + protected: const MoleculeGroup& getGroup(MGNum mgnum) const; @@ -504,7 +519,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeGroups&); bool _pvt_remove(MGNum mgnum); private: - /** All of the MoleculeGroup objects in this collection, + /** All of the MoleculeGroup objects in this collection, indexed by molecule group number */ QHash mgroups; }; diff --git a/corelib/src/libs/SireMol/moleculeinfo.cpp b/corelib/src/libs/SireMol/moleculeinfo.cpp index 8063a7221..1df64e7f4 100644 --- a/corelib/src/libs/SireMol/moleculeinfo.cpp +++ b/corelib/src/libs/SireMol/moleculeinfo.cpp @@ -41,7 +41,7 @@ static const RegisterMetaType r_molinfo; QDataStream &operator<<(QDataStream &ds, const MoleculeInfo &molinfo) { writeHeader(ds, r_molinfo, 1); - + SharedDataStream sds(ds); sds << molinfo.d; return ds; @@ -50,7 +50,7 @@ QDataStream &operator<<(QDataStream &ds, const MoleculeInfo &molinfo) QDataStream &operator>>(QDataStream &ds, MoleculeInfo &molinfo) { VersionID v = readHeader(ds, r_molinfo); - + if (v == 1) { SharedDataStream sds(ds); @@ -58,7 +58,7 @@ QDataStream &operator>>(QDataStream &ds, MoleculeInfo &molinfo) } else throw version_error(v, "1", r_molinfo, CODELOC); - + return ds; } @@ -381,8 +381,8 @@ bool MoleculeInfo::isAtomCutting() const return d->isAtomCutting(); } -/** Return whether or not residue-based cutting is used for the entire - molecule (meaning that there is exactly one cutgroup per residue, and +/** Return whether or not residue-based cutting is used for the entire + molecule (meaning that there is exactly one cutgroup per residue, and atoms in a cutgroup are in the same order as atoms in the residue). This is the default. Note that a single atom molecule is simultaneously atom cutting, residue cutting and molecule cutting. */ @@ -535,7 +535,7 @@ QList MoleculeInfo::getAtomsIn(const ChainID &chainid, { return d->getAtomsIn(chainid,name); } - + /** Return the indicies of all atoms in the specified chain(s) */ const QList& MoleculeInfo::getAtomsIn(CGIdx cgidx) const { @@ -758,6 +758,12 @@ bool MoleculeInfo::intersects(ChainIdx chainidx, const ResID &resid) const return d->intersects(chainidx,resid); } +/** Return whether or not this is empty (contains no atoms) */ +bool MoleculeInfo::isEmpty() const +{ + return d->isEmpty(); +} + /** Return the number of atoms in the molecule */ int MoleculeInfo::nAtoms() const { @@ -848,6 +854,91 @@ int MoleculeInfo::nSegments() const return d->nSegments(); } +QList MoleculeInfo::mapNoThrow(const AtomName &name) const +{ + return d->mapNoThrow(name); +} + +QList MoleculeInfo::mapNoThrow(const AtomNum &num) const +{ + return d->mapNoThrow(num); +} + +QList MoleculeInfo::mapNoThrow(const AtomIdx &idx) const +{ + return d->mapNoThrow(idx); +} + +QList MoleculeInfo::mapNoThrow(const AtomID &id) const +{ + return d->mapNoThrow(id); +} + +QList MoleculeInfo::mapNoThrow(const ResName &name) const +{ + return d->mapNoThrow(name); +} + +QList MoleculeInfo::mapNoThrow(const ResNum &num) const +{ + return d->mapNoThrow(num); +} + +QList MoleculeInfo::mapNoThrow(const ResIdx &idx) const +{ + return d->mapNoThrow(idx); +} + +QList MoleculeInfo::mapNoThrow(const ResID &id) const +{ + return d->mapNoThrow(id); +} + +QList MoleculeInfo::mapNoThrow(const ChainName &name) const +{ + return d->mapNoThrow(name); +} + +QList MoleculeInfo::mapNoThrow(const ChainIdx &idx) const +{ + return d->mapNoThrow(idx); +} + +QList MoleculeInfo::mapNoThrow(const ChainID &id) const +{ + return d->mapNoThrow(id); +} + +QList MoleculeInfo::mapNoThrow(const SegName &name) const +{ + return d->mapNoThrow(name); +} + +QList MoleculeInfo::mapNoThrow(const SegIdx &idx) const +{ + return d->mapNoThrow(idx); +} + +QList MoleculeInfo::mapNoThrow(const SegID &id) const +{ + return d->mapNoThrow(id); +} + +QList MoleculeInfo::mapNoThrow(const CGName &name) const +{ + return d->mapNoThrow(name); +} + +QList MoleculeInfo::mapNoThrow(const CGIdx &idx) const +{ + return d->mapNoThrow(idx); +} + +QList MoleculeInfo::mapNoThrow(const CGID &id) const +{ + return d->mapNoThrow(id); +} + /** Return the indicies of the matching residue(s) */ QList MoleculeInfo::map(const ResName &name) const { diff --git a/corelib/src/libs/SireMol/moleculeinfo.h b/corelib/src/libs/SireMol/moleculeinfo.h index 09f0684ab..12d976a6e 100644 --- a/corelib/src/libs/SireMol/moleculeinfo.h +++ b/corelib/src/libs/SireMol/moleculeinfo.h @@ -55,12 +55,12 @@ namespace SireMol how the atoms in the molecule are connected together, where the atoms are in space, or any additional properties that are associated with the molecule (or indeed the name or number of the molecule!) - + Each layout is given a unique ID (UID) number, which is unique within a single invocation of Sire, and uniquely identifies a MoleculeInfo layout within the program (thus allowing for a quick and simple test to ensure that molecules have the same layout of data). - + @author Christopher Woods */ class SIREMOL_EXPORT MoleculeInfo @@ -72,66 +72,66 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfo&); public: MoleculeInfo(); - + MoleculeInfo(const MoleculeView &molecule); - + MoleculeInfo(const SireBase::SharedDataPointer &ptr); - + MoleculeInfo(const MoleculeInfo &other); - + ~MoleculeInfo(); - + static const char* typeName(); - + const char* what() const; - + MoleculeInfo& operator=(const MoleculeInfo &other); - + bool operator==(const MoleculeInfo &other) const; bool operator!=(const MoleculeInfo &other) const; - + const QUuid& UID() const; - + const ChainName& name(const ChainID &chainid) const; const ChainName& name(ChainIdx chainidx) const; - + const SegName& name(const SegID &segid) const; const SegName& name(SegIdx segidx) const; - + const ResName& name(const ResID &resid) const; const ResName& name(ResIdx residx) const; - + const CGName& name(const CGID &cgid) const; const CGName& name(CGIdx cgidx) const; - + const AtomName& name(const AtomID &atomid) const; const AtomName& name(AtomIdx atomidx) const; - + ResNum number(const ResID &resid) const; ResNum number(ResIdx residx) const; - + AtomNum number(const AtomID &atomid) const; AtomNum number(AtomIdx atomidx) const; - + MoleculeInfo rename(AtomIdx atomidx, const AtomName &newname) const; MoleculeInfo renumber(AtomIdx atomidx, const AtomNum &newnum) const; - + MoleculeInfo rename(ResIdx residx, const ResName &newname) const; MoleculeInfo renumber(ResIdx residx, const ResNum &newnum) const; - + MoleculeInfo rename(CGIdx cgidx, const CGName &newname) const; MoleculeInfo rename(ChainIdx chainidx, const ChainName &newname) const; MoleculeInfo rename(SegIdx segidx, const SegName &newname) const; - + const CGAtomIdx& cgAtomIdx(AtomIdx atomidx) const; const CGAtomIdx& cgAtomIdx(const AtomID &atomid) const; - + QVector cgAtomIdxs(AtomIdx atomidx) const; QVector cgAtomIdxs(CGIdx cgidx) const; QVector cgAtomIdxs(ResIdx residx) const; QVector cgAtomIdxs(ChainIdx chainidx) const; QVector cgAtomIdxs(SegIdx segidx) const; - + QVector cgAtomIdxs(const AtomID &atomid) const; QVector cgAtomIdxs(const CGID &cgid) const; QVector cgAtomIdxs(const ResID &resid) const; @@ -160,7 +160,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfo&); QList getCutGroups() const; QList getChains() const; QList getResidues() const; - + const QList& getResiduesIn(ChainIdx chainidx) const; QList getResiduesIn(const ChainID &chainid) const; @@ -170,7 +170,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfo&); AtomIdx getAtom(ResIdx residx, int i) const; AtomIdx getAtom(ChainIdx chainidx, int i) const; AtomIdx getAtom(SegIdx segidx, int i) const; - + ResIdx getResidue(ChainIdx chainidx, int i) const; const QList& getAtomsIn(ResIdx residx) const; @@ -181,50 +181,50 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfo&); QList getAtomsIn(ChainIdx chainidx) const; QList getAtomsIn(const ChainID &chainid) const; - QList getAtomsIn(ChainIdx chainidx, + QList getAtomsIn(ChainIdx chainidx, const AtomName &atomname) const; QList getAtomsIn(const ChainID &chainid, const AtomName &atomname) const; - + const QList& getAtomsIn(CGIdx cgidx) const; QList getAtomsIn(const CGID &cgid) const; - + const QList& getAtomsIn(SegIdx segidx) const; QList getAtomsIn(const SegID &segid) const; bool isWithinResidue(AtomIdx atomidx) const; bool isWithinResidue(const AtomID &atomid) const; - + bool isWithinChain(AtomIdx atomidx) const; bool isWithinChain(const AtomID &atomid) const; - + bool isWithinSegment(AtomIdx atomidx) const; bool isWithinSegment(const AtomID &atomid) const; - + bool isWithinChain(ResIdx residx) const; bool isWithinChain(const ResID &resid) const; ChainIdx parentChain(ResIdx residx) const; ChainIdx parentChain(const ResID &resid) const; - + ChainIdx parentChain(AtomIdx atomidx) const; ChainIdx parentChain(const AtomID &atomid) const; - + ResIdx parentResidue(AtomIdx atomidx) const; ResIdx parentResidue(const AtomID &atomid) const; - + SegIdx parentSegment(AtomIdx atomidx) const; SegIdx parentSegment(const AtomID &atomid) const; - + CGIdx parentCutGroup(AtomIdx atomidx) const; CGIdx parentCutGroup(const AtomID &atomid) const; - + bool contains(ResIdx residx, AtomIdx atomidx) const; bool contains(ChainIdx chainidx, AtomIdx atomidx) const; bool contains(SegIdx segidx, AtomIdx atomidx) const; bool contains(CGIdx cgidx, AtomIdx atomidx) const; bool contains(ChainIdx chainidx, ResIdx residx) const; - + bool contains(ResIdx residx, const AtomID &atomid) const; bool contains(ChainIdx chainidx, const AtomID &atomid) const; bool contains(SegIdx segidx, const AtomID &atomid) const; @@ -236,34 +236,58 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfo&); bool intersects(SegIdx segidx, const AtomID &atomid) const; bool intersects(CGIdx cgidx, const AtomID &atomid) const; bool intersects(ChainIdx chainidx, const ResID &resid) const; - + + bool isEmpty() const; + int nAtoms() const; - + int nAtoms(const ChainID &chainid) const; int nAtoms(ChainIdx chainidx) const; - + int nAtoms(const ResID &resid) const; int nAtoms(ResIdx residx) const; - + int nAtoms(const SegID &segid) const; int nAtoms(SegIdx segidx) const; - + int nAtoms(const CGID &cgid) const; int nAtoms(CGIdx cgidx) const; - + int nResidues() const; int nResidues(const ChainID &chainid) const; int nResidues(ChainIdx chainidx) const; - + int nChains() const; int nCutGroups() const; int nSegments() const; - + + QList mapNoThrow(const AtomName &name) const; + QList mapNoThrow(const AtomNum &num) const; + QList mapNoThrow(const AtomIdx &idx) const; + QList mapNoThrow(const AtomID &atomid) const; + + QList mapNoThrow(const ResName &name) const; + QList mapNoThrow(const ResNum &num) const; + QList mapNoThrow(const ResIdx &idx) const; + QList mapNoThrow(const ResID &resid) const; + + QList mapNoThrow(const ChainName &name) const; + QList mapNoThrow(const ChainIdx &idx) const; + QList mapNoThrow(const ChainID &chainid) const; + + QList mapNoThrow(const SegName &name) const; + QList mapNoThrow(const SegIdx &idx) const; + QList mapNoThrow(const SegID &segid) const; + + QList mapNoThrow(const CGName &name) const; + QList mapNoThrow(const CGIdx &idx) const; + QList mapNoThrow(const CGID &cgid) const; + QList map(const ResName &name) const; QList map(ResNum num) const; QList map(ResIdx idx) const; QList map(const ResID &resid) const; - + QList map(const ChainName &name) const; QList map(ChainIdx idx) const; QList map(const ChainID &chainid) const; @@ -271,11 +295,11 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfo&); QList map(const SegName &name) const; QList map(SegIdx idx) const; QList map(const SegID &segid) const; - + QList map(const CGName &name) const; QList map(CGIdx idx) const; QList map(const CGID &cgid) const; - + QList map(const AtomName &name) const; QList map(AtomNum num) const; QList map(AtomIdx idx) const; @@ -311,7 +335,7 @@ SIRE_ALWAYS_INLINE MoleculeInfo::operator const MoleculeInfoData&() const return *d; } -/** Retrieve a reference to the underlying data object - this is used for +/** Retrieve a reference to the underlying data object - this is used for compaibility with old code. It should not be used in new code */ SIRE_ALWAYS_INLINE const MoleculeInfoData& MoleculeInfo::data() const { diff --git a/corelib/src/libs/SireMol/moleculeinfodata.cpp b/corelib/src/libs/SireMol/moleculeinfodata.cpp index 8c2fad4e4..2b946a77a 100644 --- a/corelib/src/libs/SireMol/moleculeinfodata.cpp +++ b/corelib/src/libs/SireMol/moleculeinfodata.cpp @@ -1159,6 +1159,36 @@ ResNum MoleculeInfoData::number(ResIdx residx) const return res_by_index[residx].number; } +CGIdx MoleculeInfoData::number(CGIdx cgidx) const +{ + return CGIdx(cgidx.map(this->nCutGroups())); +} + +CGIdx MoleculeInfoData::number(const CGID &cgid) const +{ + return this->cgIdx(cgid); +} + +ChainIdx MoleculeInfoData::number(ChainIdx chainidx) const +{ + return ChainIdx(chainidx.map(this->nChains())); +} + +ChainIdx MoleculeInfoData::number(const ChainID &chainid) const +{ + return this->chainIdx(chainid); +} + +SegIdx MoleculeInfoData::number(SegIdx segidx) const +{ + return SegIdx(segidx.map(this->nSegments())); +} + +SegIdx MoleculeInfoData::number(const SegID &segid) const +{ + return this->segIdx(segid); +} + /** Return the number of the atom with ID 'atomid' */ AtomNum MoleculeInfoData::number(const AtomID &atomid) const { @@ -2751,6 +2781,12 @@ bool MoleculeInfoData::intersects(ChainIdx chainidx, const ResID &resid) const } } +/** Return whether or not this is empty (has no atoms) */ +bool MoleculeInfoData::isEmpty() const +{ + return atoms_by_index.isEmpty(); +} + /** Return the number of atoms in the molecule */ int MoleculeInfoData::nAtoms() const { @@ -2959,15 +2995,87 @@ int MoleculeInfoData::nSegments() const return seg_by_index.count(); } -/** Return the indicies of all of the residues in this molecule that - are called 'name' - this returns the ResIdx indicies of the - residues sorted in the order that they appear in the molecule. - This raises an exception if there are no residues with this - name in this molecule. +QList MoleculeInfoData::mapNoThrow(const AtomName &name) const +{ + if (name.isNull()) + return this->getAtoms(); - \throw SireMol::missing_residue -*/ -QList MoleculeInfoData::map(const ResName &name) const + QList atomidxs; + + if (name.isCaseSensitive()) + { + atomidxs = atoms_by_name.values(name); + } + else + { + //search manually... + QString lower_name = QString(name).toLower(); + + for (QMultiHash::const_iterator it = atoms_by_name.constBegin(); + it != atoms_by_name.constEnd(); + ++it) + { + if (it.key().toLower() == lower_name) + atomidxs.append( it.value() ); + } + } + + if (atomidxs.isEmpty()) + return QList(); + + std::sort(atomidxs.begin(), atomidxs.end()); + return atomidxs; +} + +QList MoleculeInfoData::mapNoThrow(const AtomNum &num) const +{ + if (num.isNull()) + return this->getAtoms(); + + QList atomidxs = atoms_by_num.values(num); + + if (atomidxs.isEmpty()) + return QList(); + + std::sort(atomidxs.begin(), atomidxs.end()); + return atomidxs; +} + +QList MoleculeInfoData::mapNoThrow(const AtomIdx &idx) const +{ + if (idx.isNull()) + return this->getAtoms(); + + int i = idx.value(); + + if (i < 0) + i += this->nAtoms(); + + if (i < 0 or i >= this->nAtoms()) + return QList(); + + QList atomidxs; + atomidxs.append( AtomIdx(i) ); + + return atomidxs; +} + +QList MoleculeInfoData::mapNoThrow(const AtomID &id) const +{ + if (id.isNull()) + return this->getAtoms(); + + try + { + return id.map(*this); + } + catch(...) + { + return QList(); + } +} + +QList MoleculeInfoData::mapNoThrow(const ResName &name) const { if (name.isNull()) return this->getResidues(); @@ -2992,6 +3100,272 @@ QList MoleculeInfoData::map(const ResName &name) const } } + if (residxs.isEmpty()) + return QList(); + + std::sort(residxs.begin(), residxs.end()); + return residxs; +} + +QList MoleculeInfoData::mapNoThrow(const ResNum &num) const +{ + if (num.isNull()) + return this->getResidues(); + + QList residxs = res_by_num.values(num); + + if (residxs.isEmpty()) + return QList(); + + std::sort(residxs.begin(), residxs.end()); + return residxs; +} + +QList MoleculeInfoData::mapNoThrow(const ResIdx &idx) const +{ + if (idx.isNull()) + return this->getResidues(); + + int i = idx.value(); + + if (i < 0) + i += this->nResidues(); + + if (i < 0 or i >= this->nResidues()) + return QList(); + + QList residxs; + residxs.append( ResIdx(i) ); + + return residxs; +} + +QList MoleculeInfoData::mapNoThrow(const ResID &id) const +{ + if (id.isNull()) + return this->getResidues(); + + try + { + return id.map(*this); + } + catch(...) + { + return QList(); + } +} + +QList MoleculeInfoData::mapNoThrow(const ChainName &name) const +{ + if (name.isNull()) + return this->getChains(); + + QList chainidxs; + + if (name.isCaseSensitive()) + { + chainidxs = chains_by_name.values(name); + } + else + { + //search manually + QString lower_name = QString(name).toLower(); + + for (QMultiHash::const_iterator + it = chains_by_name.constBegin(); + it != chains_by_name.constEnd(); + ++it) + { + if (it.key().toLower() == lower_name) + chainidxs.append(it.value()); + } + } + + if (chainidxs.isEmpty()) + return QList(); + + std::sort(chainidxs.begin(), chainidxs.end()); + return chainidxs; +} + +QList MoleculeInfoData::mapNoThrow(const ChainIdx &idx) const +{ + if (idx.isNull()) + return this->getChains(); + + int i = idx.value(); + + if (i < 0) + i += this->nChains(); + + if (i < 0 or i >= this->nChains()) + return QList(); + + QList idxs; + idxs.append( ChainIdx(i) ); + + return idxs; +} + +QList MoleculeInfoData::mapNoThrow(const ChainID &id) const +{ + if (id.isNull()) + return this->getChains(); + + try + { + return id.map(*this); + } + catch(...) + { + return QList(); + } +} + +QList MoleculeInfoData::mapNoThrow(const SegName &name) const +{ + if (name.isNull()) + return this->getSegments(); + + QList segidxs; + + if (name.isCaseSensitive()) + { + segidxs = seg_by_name.values(name); + } + else + { + //search manually + QString lower_name = QString(name).toLower(); + + for (QMultiHash::const_iterator it = seg_by_name.constBegin(); + it != seg_by_name.constEnd(); + ++it) + { + if (it.key().toLower() == lower_name) + segidxs.append(it.value()); + } + } + + if (segidxs.isEmpty()) + return QList(); + + std::sort(segidxs.begin(), segidxs.end()); + return segidxs; +} + +QList MoleculeInfoData::mapNoThrow(const SegIdx &idx) const +{ + if (idx.isNull()) + return this->getSegments(); + + int i = idx.value(); + + if (i < 0) + i += this->nSegments(); + + if (i < 0 or i >= this->nSegments()) + return QList(); + + QList idxs; + idxs.append( SegIdx(i) ); + + return idxs; +} + +QList MoleculeInfoData::mapNoThrow(const SegID &id) const +{ + if (id.isNull()) + return this->getSegments(); + + try + { + return id.map(*this); + } + catch(...) + { + return QList(); + } +} + +QList MoleculeInfoData::mapNoThrow(const CGName &name) const +{ + if (name.isNull()) + return this->getCutGroups(); + + QList cgidxs; + + if (name.isCaseSensitive()) + { + cgidxs = cg_by_name.values(name); + } + else + { + //search manually + QString lower_name = QString(name).toLower(); + + for (QMultiHash::const_iterator it = cg_by_name.constBegin(); + it != cg_by_name.constEnd(); + ++it) + { + if (it.key().toLower() == lower_name) + cgidxs.append(it.value()); + } + } + + if (cgidxs.isEmpty()) + return QList(); + + std::sort(cgidxs.begin(), cgidxs.end()); + return cgidxs; +} + +QList MoleculeInfoData::mapNoThrow(const CGIdx &idx) const +{ + if (idx.isNull()) + return this->getCutGroups(); + + int i = idx.value(); + + if (i < 0) + i += this->nCutGroups(); + + if (i < 0 or i >= this->nCutGroups()) + return QList(); + + QList idxs; + idxs.append( CGIdx(i) ); + + return idxs; +} + +QList MoleculeInfoData::mapNoThrow(const CGID &id) const +{ + if (id.isNull()) + return this->getCutGroups(); + + try + { + return id.map(*this); + } + catch(...) + { + return QList(); + } +} + +/** Return the indicies of all of the residues in this molecule that + are called 'name' - this returns the ResIdx indicies of the + residues sorted in the order that they appear in the molecule. + This raises an exception if there are no residues with this + name in this molecule. + + \throw SireMol::missing_residue +*/ +QList MoleculeInfoData::map(const ResName &name) const +{ + auto residxs = this->mapNoThrow(name); + if (residxs.isEmpty()) throw SireMol::missing_residue( QObject::tr( "There is no residue called \"%1\" in the layout \"%2\". " @@ -2999,7 +3373,6 @@ QList MoleculeInfoData::map(const ResName &name) const .arg(name).arg(uid.toString()) .arg(Sire::toString(res_by_name.keys())), CODELOC ); - std::sort(residxs.begin(), residxs.end()); return residxs; } @@ -3013,10 +3386,7 @@ QList MoleculeInfoData::map(const ResName &name) const */ QList MoleculeInfoData::map(ResNum num) const { - if (num.isNull()) - return this->getResidues(); - - QList residxs = res_by_num.values(num); + auto residxs = this->mapNoThrow(num); if (residxs.isEmpty()) throw SireMol::missing_residue( QObject::tr( @@ -3036,13 +3406,14 @@ QList MoleculeInfoData::map(ResNum num) const */ QList MoleculeInfoData::map(ResIdx idx) const { - if (idx.isNull()) - return this->getResidues(); + auto idxs = this->mapNoThrow(idx); - QList residxs; - residxs.append( ResIdx(idx.map(res_by_index.count())) ); + if (idxs.isEmpty()) + throw SireError::invalid_index( QObject::tr( + "There is no residue with the index \"%1\" in the layout \"%2\".") + .arg(idx).arg(uid.toString()), CODELOC ); - return residxs; + return idxs; } /** Return the indicies of residues that match the generic residue ID 'resid'. @@ -3069,36 +3440,13 @@ QList MoleculeInfoData::map(const ResID &resid) const */ QList MoleculeInfoData::map(const ChainName &name) const { - if (name.isNull()) - return this->getChains(); - - QList chainidxs; - - if (name.isCaseSensitive()) - { - chainidxs = chains_by_name.values(name); - } - else - { - //search manually - QString lower_name = QString(name).toLower(); - - for (QMultiHash::const_iterator - it = chains_by_name.constBegin(); - it != chains_by_name.constEnd(); - ++it) - { - if (it.key().toLower() == lower_name) - chainidxs.append(it.value()); - } - } + auto chainidxs = this->mapNoThrow(name); if (chainidxs.isEmpty()) throw SireMol::missing_chain( QObject::tr( "There is no chain called \"%1\" in the layout \"%2\".") .arg(name).arg(uid.toString()), CODELOC ); - std::sort(chainidxs.begin(), chainidxs.end()); return chainidxs; } @@ -3109,13 +3457,14 @@ QList MoleculeInfoData::map(const ChainName &name) const */ QList MoleculeInfoData::map(ChainIdx idx) const { - if (idx.isNull()) - return this->getChains(); + auto idxs = this->mapNoThrow(idx); - QList chainidxs; - chainidxs.append( ChainIdx(idx.map(chains_by_index.count())) ); + if (idxs.isEmpty()) + throw SireError::invalid_index( QObject::tr( + "There is no chain with the index \"%1\" in the layout \"%2\".") + .arg(idx).arg(uid.toString()), CODELOC ); - return chainidxs; + return idxs; } /** Return the indicies of chains that match the ChainID 'chainid' @@ -3137,28 +3486,7 @@ QList MoleculeInfoData::map(const ChainID &chainid) const */ QList MoleculeInfoData::map(const SegName &name) const { - if (name.isNull()) - return this->getSegments(); - - QList segidxs; - - if (name.isCaseSensitive()) - { - segidxs = seg_by_name.values(name); - } - else - { - //search manually - QString lower_name = QString(name).toLower(); - - for (QMultiHash::const_iterator it = seg_by_name.constBegin(); - it != seg_by_name.constEnd(); - ++it) - { - if (it.key().toLower() == lower_name) - segidxs.append(it.value()); - } - } + auto segidxs = this->mapNoThrow(name); if (segidxs.isEmpty()) throw SireMol::missing_segment( QObject::tr( @@ -3176,13 +3504,14 @@ QList MoleculeInfoData::map(const SegName &name) const */ QList MoleculeInfoData::map(SegIdx idx) const { - if (idx.isNull()) - return this->getSegments(); + auto idxs = this->mapNoThrow(idx); - QList segidxs; - segidxs.append( SegIdx(idx.map(seg_by_index.count())) ); + if (idxs.isEmpty()) + throw SireError::invalid_index(QObject::tr( + "There is no segment with the index \"%1\" in the layout \"%2\".") + .arg(idx).arg(uid.toString()), CODELOC ); - return segidxs; + return idxs; } /** Return the indicies of segments that match the ID 'segid' @@ -3204,28 +3533,7 @@ QList MoleculeInfoData::map(const SegID &segid) const */ QList MoleculeInfoData::map(const CGName &name) const { - if (name.isNull()) - return this->getCutGroups(); - - QList cgidxs; - - if (name.isCaseSensitive()) - { - cgidxs = cg_by_name.values(name); - } - else - { - //search manually - QString lower_name = QString(name).toLower(); - - for (QMultiHash::const_iterator it = cg_by_name.constBegin(); - it != cg_by_name.constEnd(); - ++it) - { - if (it.key().toLower() == lower_name) - cgidxs.append(it.value()); - } - } + auto cgidxs = this->mapNoThrow(name); if (cgidxs.isEmpty()) throw SireMol::missing_cutgroup( QObject::tr( @@ -3243,13 +3551,14 @@ QList MoleculeInfoData::map(const CGName &name) const */ QList MoleculeInfoData::map(CGIdx idx) const { - if (idx.isNull()) - return this->getCutGroups(); + auto idxs = this->mapNoThrow(idx); - QList cgidxs; - cgidxs.append( CGIdx(idx.map(cg_by_index.count())) ); + if (idxs.isEmpty()) + throw SireError::invalid_index( QObject::tr( + "There is no CutGroup with the index \"%1\" in the layout \"%2\".") + .arg(idx).arg(uid.toString()), CODELOC ); - return cgidxs; + return idxs; } /** Return the indicies of CutGroups that match the ID 'cgid' @@ -3271,35 +3580,13 @@ QList MoleculeInfoData::map(const CGID &cgid) const */ QList MoleculeInfoData::map(const AtomName &name) const { - if (name.isNull()) - return this->getAtoms(); - - QList atomidxs; - - if (name.isCaseSensitive()) - { - atomidxs = atoms_by_name.values(name); - } - else - { - //search manually... - QString lower_name = QString(name).toLower(); - - for (QMultiHash::const_iterator it = atoms_by_name.constBegin(); - it != atoms_by_name.constEnd(); - ++it) - { - if (it.key().toLower() == lower_name) - atomidxs.append( it.value() ); - } - } + auto atomidxs = this->mapNoThrow(name); if (atomidxs.isEmpty()) throw SireMol::missing_atom( QObject::tr( "There is no atom called \"%1\" in the layout \"%2\".") .arg(name).arg(uid.toString()), CODELOC ); - std::sort(atomidxs.begin(), atomidxs.end()); return atomidxs; } @@ -3309,17 +3596,13 @@ QList MoleculeInfoData::map(const AtomName &name) const */ QList MoleculeInfoData::map(AtomNum num) const { - if (num.isNull()) - return this->getAtoms(); - - QList atomidxs = atoms_by_num.values(num); + auto atomidxs = this->mapNoThrow(num); if (atomidxs.isEmpty()) throw SireMol::missing_atom( QObject::tr( "There is no atom with the number \"%1\" in the layout \"%2\".") .arg(num).arg(uid.toString()), CODELOC ); - std::sort(atomidxs.begin(), atomidxs.end()); return atomidxs; } @@ -3330,11 +3613,12 @@ QList MoleculeInfoData::map(AtomNum num) const */ QList MoleculeInfoData::map(AtomIdx idx) const { - if (idx.isNull()) - return this->getAtoms(); + auto atomidxs = this->mapNoThrow(idx); - QList atomidxs; - atomidxs.append( AtomIdx(idx.map(atoms_by_index.count())) ); + if (atomidxs.isEmpty()) + throw SireError::invalid_index( QObject::tr( + "There is no atom with the index \"%1\" in the layout \"%2\".") + .arg(idx).arg(uid.toString()), CODELOC ); return atomidxs; } diff --git a/corelib/src/libs/SireMol/moleculeinfodata.h b/corelib/src/libs/SireMol/moleculeinfodata.h index 59c7bc741..b1dac796c 100644 --- a/corelib/src/libs/SireMol/moleculeinfodata.h +++ b/corelib/src/libs/SireMol/moleculeinfodata.h @@ -113,12 +113,12 @@ class SegInfo; how the atoms in the molecule are connected together, where the atoms are in space, or any additional properties that are associated with the molecule (or indeed the name or number of the molecule!) - + Each layout is given a unique ID (UID) number, which is unique within a single invocation of Sire, and uniquely identifies a MoleculeInfo layout within the program (thus allowing for a quick and simple test to ensure that molecules have the same layout of data). - + @author Christopher Woods */ class SIREMOL_EXPORT MoleculeInfoData : public MolInfo, public SireBase::RefCountData @@ -129,72 +129,81 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) public: MoleculeInfoData(); - + MoleculeInfoData(const StructureEditor &editor); - + MoleculeInfoData(const MoleculeInfoData &other); - + ~MoleculeInfoData(); - + static const char* typeName(); - + const char* what() const { return MoleculeInfoData::typeName(); } - + MoleculeInfoData& operator=(const MoleculeInfoData &other); - + bool operator==(const MoleculeInfoData &other) const; bool operator!=(const MoleculeInfoData &other) const; - + const QUuid& UID() const; - + const ChainName& name(const ChainID &chainid) const; const ChainName& name(ChainIdx chainidx) const; - + const SegName& name(const SegID &segid) const; const SegName& name(SegIdx segidx) const; - + const ResName& name(const ResID &resid) const; const ResName& name(ResIdx residx) const; - + const CGName& name(const CGID &cgid) const; const CGName& name(CGIdx cgidx) const; - + const AtomName& name(const AtomID &atomid) const; const AtomName& name(AtomIdx atomidx) const; - + + SegIdx number(const SegID &segid) const; + SegIdx number(SegIdx segidx) const; + + CGIdx number(const CGID &cgid) const; + CGIdx number(CGIdx cgidx) const; + + ChainIdx number(const ChainID &chainid) const; + ChainIdx number(ChainIdx chainidx) const; + ResNum number(const ResID &resid) const; ResNum number(ResIdx residx) const; - + AtomNum number(const AtomID &atomid) const; AtomNum number(AtomIdx atomidx) const; - + MoleculeInfoData rename(AtomIdx atomidx, const AtomName &newname) const; MoleculeInfoData renumber(AtomIdx atomidx, const AtomNum &newnum) const; - + MoleculeInfoData rename(ResIdx residx, const ResName &newname) const; MoleculeInfoData renumber(ResIdx residx, const ResNum &newnum) const; - + MoleculeInfoData rename(CGIdx cgidx, const CGName &newname) const; MoleculeInfoData rename(ChainIdx chainidx, const ChainName &newname) const; MoleculeInfoData rename(SegIdx segidx, const SegName &newname) const; - + MoleculeInfoData renumber( const QHash &atomnums ) const; MoleculeInfoData renumber( const QHash &resnums) const; MoleculeInfoData renumber( const QHash &atomnums, const QHash &resnums ) const; - + const CGAtomIdx& cgAtomIdx(AtomIdx atomidx) const; const CGAtomIdx& cgAtomIdx(const AtomID &atomid) const; - + QVector cgAtomIdxs(AtomIdx atomidx) const; QVector cgAtomIdxs(CGIdx cgidx) const; QVector cgAtomIdxs(ResIdx residx) const; QVector cgAtomIdxs(ChainIdx chainidx) const; QVector cgAtomIdxs(SegIdx segidx) const; - + QVector cgAtomIdxs(const AtomID &atomid) const; QVector cgAtomIdxs(const CGID &cgid) const; QVector cgAtomIdxs(const ResID &resid) const; @@ -207,7 +216,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) ResIdx resIdx(const ResID &resid) const; ChainIdx chainIdx(const ChainID &chainid) const; SegIdx segIdx(const SegID &segid) const; - + CGIdx cgIdx(const CGID &cgid) const; CGIdx cgIdx(const ResIdx &residx) const; CGIdx cgIdx(const ResID &resid) const; @@ -223,7 +232,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) QList getCutGroups() const; QList getChains() const; QList getResidues() const; - + const QList& getResiduesIn(ChainIdx chainidx) const; QList getResiduesIn(const ChainID &chainid) const; @@ -233,7 +242,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) AtomIdx getAtom(ResIdx residx, int i) const; AtomIdx getAtom(ChainIdx chainidx, int i) const; AtomIdx getAtom(SegIdx segidx, int i) const; - + ResIdx getResidue(ChainIdx chainidx, int i) const; const QList& getAtomsIn(ResIdx residx) const; @@ -244,50 +253,50 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) QList getAtomsIn(ChainIdx chainidx) const; QList getAtomsIn(const ChainID &chainid) const; - QList getAtomsIn(ChainIdx chainidx, + QList getAtomsIn(ChainIdx chainidx, const AtomName &atomname) const; QList getAtomsIn(const ChainID &chainid, const AtomName &atomname) const; - + const QList& getAtomsIn(CGIdx cgidx) const; QList getAtomsIn(const CGID &cgid) const; - + const QList& getAtomsIn(SegIdx segidx) const; QList getAtomsIn(const SegID &segid) const; bool isWithinResidue(AtomIdx atomidx) const; bool isWithinResidue(const AtomID &atomid) const; - + bool isWithinChain(AtomIdx atomidx) const; bool isWithinChain(const AtomID &atomid) const; - + bool isWithinSegment(AtomIdx atomidx) const; bool isWithinSegment(const AtomID &atomid) const; - + bool isWithinChain(ResIdx residx) const; bool isWithinChain(const ResID &resid) const; ChainIdx parentChain(ResIdx residx) const; ChainIdx parentChain(const ResID &resid) const; - + ChainIdx parentChain(AtomIdx atomidx) const; ChainIdx parentChain(const AtomID &atomid) const; - + ResIdx parentResidue(AtomIdx atomidx) const; ResIdx parentResidue(const AtomID &atomid) const; - + SegIdx parentSegment(AtomIdx atomidx) const; SegIdx parentSegment(const AtomID &atomid) const; - + CGIdx parentCutGroup(AtomIdx atomidx) const; CGIdx parentCutGroup(const AtomID &atomid) const; - + bool contains(ResIdx residx, AtomIdx atomidx) const; bool contains(ChainIdx chainidx, AtomIdx atomidx) const; bool contains(SegIdx segidx, AtomIdx atomidx) const; bool contains(CGIdx cgidx, AtomIdx atomidx) const; bool contains(ChainIdx chainidx, ResIdx residx) const; - + bool contains(ResIdx residx, const AtomID &atomid) const; bool contains(ChainIdx chainidx, const AtomID &atomid) const; bool contains(SegIdx segidx, const AtomID &atomid) const; @@ -299,34 +308,58 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) bool intersects(SegIdx segidx, const AtomID &atomid) const; bool intersects(CGIdx cgidx, const AtomID &atomid) const; bool intersects(ChainIdx chainidx, const ResID &resid) const; - + + bool isEmpty() const; + int nAtoms() const; - + int nAtoms(const ChainID &chainid) const; int nAtoms(ChainIdx chainidx) const; - + int nAtoms(const ResID &resid) const; int nAtoms(ResIdx residx) const; - + int nAtoms(const SegID &segid) const; int nAtoms(SegIdx segidx) const; - + int nAtoms(const CGID &cgid) const; int nAtoms(CGIdx cgidx) const; - + int nResidues() const; int nResidues(const ChainID &chainid) const; int nResidues(ChainIdx chainidx) const; - + int nChains() const; int nCutGroups() const; int nSegments() const; - + + QList mapNoThrow(const AtomName &name) const; + QList mapNoThrow(const AtomNum &num) const; + QList mapNoThrow(const AtomIdx &idx) const; + QList mapNoThrow(const AtomID &atomid) const; + + QList mapNoThrow(const ResName &name) const; + QList mapNoThrow(const ResNum &num) const; + QList mapNoThrow(const ResIdx &idx) const; + QList mapNoThrow(const ResID &resid) const; + + QList mapNoThrow(const ChainName &name) const; + QList mapNoThrow(const ChainIdx &idx) const; + QList mapNoThrow(const ChainID &chainid) const; + + QList mapNoThrow(const SegName &name) const; + QList mapNoThrow(const SegIdx &idx) const; + QList mapNoThrow(const SegID &segid) const; + + QList mapNoThrow(const CGName &name) const; + QList mapNoThrow(const CGIdx &idx) const; + QList mapNoThrow(const CGID &cgid) const; + QList map(const ResName &name) const; QList map(ResNum num) const; QList map(ResIdx idx) const; QList map(const ResID &resid) const; - + QList map(const ChainName &name) const; QList map(ChainIdx idx) const; QList map(const ChainID &chainid) const; @@ -334,11 +367,11 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) QList map(const SegName &name) const; QList map(SegIdx idx) const; QList map(const SegID &segid) const; - + QList map(const CGName &name) const; QList map(CGIdx idx) const; QList map(const CGID &cgid) const; - + QList map(const AtomName &name) const; QList map(AtomNum num) const; QList map(AtomIdx idx) const; @@ -355,23 +388,23 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) void assertContains(SegIdx segidx) const; void assertEqualTo(const MoleculeInfoData &other) const; - + static const MoleculeInfoData& null(); - + private: - + void rebuildNameAndNumberIndexes(); - + bool _pvt_hasSameFingerprint(const MoleculeInfoData &other); - + QList _pvt_getAtomsIn(const QList &residxs) const; QList _pvt_getAtomsIn(const QList &residxs, const AtomName &name) const; - + int _pvt_nAtoms(const QVector &residxs) const; int _pvt_nAtoms(const QList &residxs) const; int _pvt_nAtoms(ChainIdx chainidx) const; - + QVector _pvt_cgAtomIdxs(const QList &atomidxs) const; /** The unique ID that identifies this particular @@ -381,50 +414,50 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeInfoData&) /** All of the atoms in the molecule, in the order they were added to the molecule */ QVector atoms_by_index; - + /** Hash mapping atom names to atom indicies */ QMultiHash atoms_by_name; - + /** Hash mapping atom numbers to atom indicies */ QMultiHash atoms_by_num; - + /** All of the residues in this molecule, arranged in the order that they appear in this molecule */ QVector res_by_index; - + /** Hash mapping residue names to residue indicies */ QMultiHash res_by_name; - + /** Hash mapping residue numbers to residue indicies */ QMultiHash res_by_num; - - /** All of the chains in this molecule, arranged in the + + /** All of the chains in this molecule, arranged in the order that they appear in this molecule */ QVector chains_by_index; - + /** Hash mapping chain names to chain indicies */ QMultiHash chains_by_name; - + /** All of the segments in this molecule, arranged in the order that they appear in this molecule */ QVector seg_by_index; - + /** Hash mapping segment names to segment indicies */ QMultiHash seg_by_name; - + /** All of the CutGroups in this molecule, arranged in the order that they appear in this molecule */ QVector cg_by_index; /** Hash mapping CutGroup name to CutGroup indicies */ QMultiHash cg_by_name; - + /** The cutting scheme for the molecule. This is either 0 = unknown, 1 = atom, 2 = residue or 3 = molecule */ qint32 cutting_scheme; }; -} //end of namespace SireMol +} //end of namespace SireMol Q_DECLARE_METATYPE(SireMol::MoleculeInfoData); diff --git a/corelib/src/libs/SireMol/moleculeview.cpp b/corelib/src/libs/SireMol/moleculeview.cpp index 9d5c5d007..e3c289882 100644 --- a/corelib/src/libs/SireMol/moleculeview.cpp +++ b/corelib/src/libs/SireMol/moleculeview.cpp @@ -37,6 +37,8 @@ #include "molecule.h" #include "select.h" +#include "SireBase/slice.h" + #include "SireBase/errors.h" #include "SireError/errors.h" #include "SireMol/errors.h" @@ -54,13 +56,13 @@ RegisterMetaType r_molview( MAGIC_ONLY, "SireMol::MoleculeView" ); /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const MoleculeView &molview) { writeHeader(ds, r_molview, 2); SharedDataStream sds(ds); - + sds << molview.d << static_cast(molview); @@ -76,13 +78,13 @@ QDataStream &operator>>(QDataStream &ds, if (v == 2) { SharedDataStream sds(ds); - + sds >> molview.d >> static_cast(molview); } else if (v == 1) { SharedDataStream sds(ds); - + sds >> molview.d; } else @@ -149,9 +151,9 @@ bool MoleculeView::isSameMolecule(const MoleculeView &other) const return this->isSameMolecule(other.data()); } -/** Assert that this view is looking at the molecule whose data is +/** Assert that this view is looking at the molecule whose data is in 'other' (albeit perhaps a different version of that molecule) - + \throw SireError::incompatible_error */ void MoleculeView::assertSameMolecule(const MoleculeData &other) const @@ -159,7 +161,7 @@ void MoleculeView::assertSameMolecule(const MoleculeData &other) const if (d->number() != other.number()) //these are different molecules! throw SireError::incompatible_error( QObject::tr( - "The molecules \"%1\", number %2, and \"%3\", number %3, " + "The molecules \"%1\", number %2, and \"%3\", number %4, " "are different, and therefore incompatible.") .arg(d->name()).arg(d->number()) .arg(other.name()).arg(other.number()), @@ -168,7 +170,7 @@ void MoleculeView::assertSameMolecule(const MoleculeData &other) const /** Assert that this is a view of the same molecule as 'other' (albeit at a different version) - + \throw SireError::incompatible_error */ void MoleculeView::assertSameMolecule(const MoleculeView &other) const @@ -176,17 +178,17 @@ void MoleculeView::assertSameMolecule(const MoleculeView &other) const this->assertSameMolecule(other.data()); } -/** Update this view with a new version of the molecule. You +/** Update this view with a new version of the molecule. You can only update the molecule if it has the same layout UID (so same atoms, residues, cutgroups etc.) - + \throw SireError::incompatible_error */ void MoleculeView::update(const MoleculeData &moldata) { this->assertSameMolecule(moldata); d->info().assertEqualTo(moldata.info()); - + d = moldata; } @@ -198,14 +200,14 @@ QStringList MoleculeView::keys() const /** Return the type of the property at key 'key' - \throw SireBase::missing_property + \throw SireBase::missing_property */ const char* MoleculeView::propertyType(const PropertyName &key) const { return d->property(key).what(); } -/** Return the type of the metadata at metakey 'metakey' +/** Return the type of the metadata at metakey 'metakey' \throw SireBase::missing_property */ @@ -214,9 +216,9 @@ const char* MoleculeView::metadataType(const PropertyName &metakey) const return d->metadata(metakey).what(); } -/** Return the type of the metadata at metakey 'metakey' +/** Return the type of the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireBase::missing_property */ const char* MoleculeView::metadataType(const PropertyName &key, @@ -240,7 +242,7 @@ void MoleculeView::assertContains(AtomIdx atomidx) const .arg(atomidx), CODELOC ); } -/** Assert that this contains a property at key 'key' +/** Assert that this contains a property at key 'key' \throw SireBase::missing_property */ @@ -255,7 +257,7 @@ void MoleculeView::assertHasProperty(const PropertyName &key) const .arg(key.toString()), CODELOC ); } -/** Assert that this contains some metadata at metakey 'metakey' +/** Assert that this contains some metadata at metakey 'metakey' \throw SireBase::missing_property */ @@ -270,7 +272,7 @@ void MoleculeView::assertHasMetadata(const PropertyName &metakey) const .arg(metakey.toString()), CODELOC ); } -/** Assert that this contains some metadata at metakey 'metakey' +/** Assert that this contains some metadata at metakey 'metakey' for the property at key 'key' \throw SireBase::missing_property @@ -289,6 +291,52 @@ void MoleculeView::assertHasMetadata(const PropertyName &key, .arg(key.toString()), CODELOC ); } +Atom MoleculeView::atom(int i, const PropertyMap &map) const +{ + auto s = this->selection(); + + if (s.selectedAllAtoms()) + { + return this->atom(AtomIdx(i), map); + } + else + { + auto atomidxs = s.selectedAtoms(); + return this->atom(atomidxs.at(Index(i).map(atomidxs.count())), map); + } +} + +Atom MoleculeView::atom(const QString &name, const PropertyMap &map) const +{ + try + { + return this->atom(AtomID::fromString(name), map); + } + catch(const SireMol::duplicate_atom &e) + { + throw e; + } + catch(const SireError::exception &e) + { + try + { + auto a = this->search(name).views().at(0).atom(); + return this->atom(a.index(), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Atom(); +} + /** Return the atom in this view that matches the ID 'atomid' \throw SireMol::missing_atom @@ -300,6 +348,155 @@ Atom MoleculeView::atom(const AtomID &atomid, const PropertyMap &map) const return atomid.selectFrom(*this, map); } +template +QList _toIndicies(const QList &ids) +{ + QList idxs; + + for (const auto &id : ids) + { + idxs.append(id.value()); + } + + return idxs; +} + +Selector MoleculeView::atoms(const QString &name, + const PropertyMap &map) const +{ + try + { + return this->atoms(AtomID::fromString(name), map); + } + catch(const SireError::exception &e) + { + try + { + const auto a = this->search(name).views(); + + if (a.count() == 0) + throw SireMol::missing_atom(QObject::tr( + "No atom matches '%1'").arg(name), CODELOC); + + return this->molecule().atoms( + _toIndicies(a[0].atoms().IDs()), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Selector(); +} + +Selector MoleculeView::atoms(const QStringList &names, + const PropertyMap &map) const +{ + if (names.count() == 0) + throw SireMol::missing_atom(QObject::tr( + "You must specify some names.."), CODELOC); + + auto s = this->atoms(names[0], map); + + for (int i=1; iatoms(names[i], map); + } + + return s; +} + +Selector MoleculeView::atoms(const QList &values, + const PropertyMap &map) const +{ + if (values.count() == 0) + throw SireError::invalid_index(QObject::tr( + "You must specify some indexes.."), CODELOC); + + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + ret.reserve(values.count()); + + for (const auto &value : values) + { + ret.append(IDs.at(SireID::Index(value).map(IDs.count()))); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllAtoms()) + { + for (auto value : values) + { + idxs.append(AtomIdx(value)); + } + } + else + { + auto atomidxs = s.selectedAtoms(); + + for (auto value : values) + { + idxs.append(atomidxs.at(Index(value).map(atomidxs.count()))); + } + } + + return Selector(this->data(), idxs); +} + +Selector MoleculeView::atoms(const Slice &slice, + const PropertyMap &map) const +{ + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + + for (auto it = slice.begin(IDs.count()); not it.atEnd(); it.next()) + { + ret.append(IDs.at(it.value())); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllAtoms()) + { + for (auto it = slice.begin(s.nAtoms()); not it.atEnd(); it.next()) + { + idxs.append(AtomIdx(it.value())); + } + } + else + { + auto atomidxs = s.selectedAtoms(); + + for (auto it = slice.begin(atomidxs.count()); not it.atEnd(); it.next()) + { + idxs.append(atomidxs.at(Index(it.value()).map(atomidxs.count()))); + } + } + + return Selector(this->data(), idxs); +} + /** Return the atoms from this view that match the ID 'atomid' \throw SireMol::missing_atom @@ -313,36 +510,39 @@ Selector MoleculeView::atoms(const AtomID &atomid, /** Return this view as a Atom - this will only work if this view contains only a single atom - + \throw SireMol::duplicate_atom */ Atom MoleculeView::atom() const { QVector selected_atoms = this->selection().selectedAtoms(); - + if (selected_atoms.isEmpty()) throw SireMol::missing_atom( QObject::tr( "This view does not contain any atoms."), CODELOC ); - + else if (selected_atoms.count() != 1) throw SireMol::duplicate_atom( QObject::tr( "Cannot convert this view (%1) into an Atom as " "we can only do this is just one atom is selected. " - "These atoms are selected ; %2.") - .arg(this->toString(), Sire::toString(selected_atoms)), + "The number of matching atoms is %2.") + .arg(this->toString()).arg(selected_atoms.count()), CODELOC ); - + return Atom(this->data(), selected_atoms.at(0)); } -/** Return all of the atoms in this view +/** Return all of the atoms in this view \throw SireMol::missing_atom */ Selector MoleculeView::atoms() const { + if (this->isA< Selector >()) + return this->asA< Selector >(); + AtomSelection selected_atoms = this->selection(); - + if (selected_atoms.selectedNone()) throw SireMol::missing_atom( QObject::tr( "No atoms are available in this view (%1).") @@ -351,9 +551,29 @@ Selector MoleculeView::atoms() const return Selector(this->data(), this->selection()); } +CutGroup MoleculeView::cutGroup(int i, const PropertyMap &map) const +{ + auto s = this->selection(); + + if (s.selectedAllCutGroups()) + { + return this->cutGroup(AtomIdx(i), map); + } + else + { + auto cgidxs = s.selectedCutGroups(); + return this->cutGroup(cgidxs.at(Index(i).map(cgidxs.count())), map); + } +} + +CutGroup MoleculeView::cutGroup(const QString &name, const PropertyMap &map) const +{ + return this->cutGroup(CGID::fromString(name), map); +} + /** Return the CutGroup whose atoms are in this view that matches the ID in 'cgid' - + \throw SireMol::missing_cutgroup \throw SireError::invalid_index \throw SireMol::duplicate_cutgroup @@ -363,9 +583,56 @@ CutGroup MoleculeView::cutGroup(const CGID &cgid, const PropertyMap &map) const return cgid.selectFrom(*this, map); } +Selector MoleculeView::cutGroups(const QString &name, + const PropertyMap &map) const +{ + return this->cutGroups(CGName(name), map); +} + +Selector MoleculeView::cutGroups(const Slice &slice, + const PropertyMap &map) const +{ + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + + for (auto it = slice.begin(IDs.count()); not it.atEnd(); it.next()) + { + ret.append(IDs.at(it.value())); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllCutGroups()) + { + + for (auto it = slice.begin(s.nCutGroups()); not it.atEnd(); it.next()) + { + idxs.append(CGIdx(it.value())); + } + } + else + { + auto cgidxs = s.selectedCutGroups(); + + for (auto it = slice.begin(cgidxs.count()); not it.atEnd(); it.next()) + { + idxs.append(cgidxs.at(it.value())); + } + } + + return Selector(*this, idxs); +} + /** Return the CutGroups whose atoms are in this view that match the ID in 'cgid' - + \throw SireMol::missing_cutgroup \throw SireError::invalid_index */ @@ -383,19 +650,19 @@ Selector MoleculeView::cutGroups(const CGID &cgid, CutGroup MoleculeView::cutGroup() const { QList selected_cgs = this->selection().selectedCutGroups(); - + if (selected_cgs.isEmpty()) throw SireMol::missing_cutgroup( QObject::tr( "This view does not contain any CutGroups."), CODELOC ); - + else if (selected_cgs.count() != 1) throw SireMol::duplicate_cutgroup( QObject::tr( "Cannot convert this view (%1) into a CutGroup as " "we can only do this is just one CutGroup is selected. " "These CutGroups are selected ; %2.") - .arg(this->toString(), Sire::toString(selected_cgs)), + .arg(this->toString(), Sire::toString(selected_cgs)), CODELOC ); - + return CutGroup(this->data(), selected_cgs.at(0)); } @@ -405,8 +672,11 @@ CutGroup MoleculeView::cutGroup() const */ Selector MoleculeView::cutGroups() const { + if (this->isA< Selector >()) + return this->asA< Selector >(); + QList selected_cgs = this->selection().selectedCutGroups(); - + if (selected_cgs.isEmpty()) throw SireMol::missing_cutgroup( QObject::tr( "This view does not contain any CutGroups."), CODELOC ); @@ -414,6 +684,52 @@ Selector MoleculeView::cutGroups() const return Selector(this->data(), selected_cgs); } +Residue MoleculeView::residue(int i, const PropertyMap &map) const +{ + auto s = this->selection(); + + if (s.selectedAllResidues()) + { + return this->residue(ResIdx(i), map); + } + else + { + auto residxs = s.selectedResidues(); + return this->residue(residxs.at(Index(i).map(residxs.count())), map); + } +} + +Residue MoleculeView::residue(const QString &name, const PropertyMap &map) const +{ + try + { + return this->residue(ResID::fromString(name), map); + } + catch(const SireMol::duplicate_residue &e) + { + throw e; + } + catch(const SireError::exception &e) + { + try + { + auto a = this->search(name).views().at(0).residue(); + return this->residue(a.index(), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Residue(); +} + /** Return the residue from this view that matches the ID 'resid' \throw SireMol::missing_residue @@ -425,6 +741,142 @@ Residue MoleculeView::residue(const ResID &resid, const PropertyMap &map) const return resid.selectFrom(*this, map); } +Selector MoleculeView::residues(const QString &name, + const PropertyMap &map) const +{ + try + { + return this->residues(ResID::fromString(name), map); + } + catch(const SireError::exception &e) + { + try + { + const auto a = this->search(name).views(); + + if (a.count() == 0) + throw SireMol::missing_residue(QObject::tr( + "No residue matches '%1'").arg(name), CODELOC); + + return this->molecule().residues( + _toIndicies(a[0].residues().IDs()), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Selector(); +} + +Selector MoleculeView::residues(const QStringList &names, + const PropertyMap &map) const +{ + if (names.count() == 0) + throw SireMol::missing_residue(QObject::tr( + "You must specify some names.."), CODELOC); + + auto s = this->residues(names[0], map); + + for (int i=1; iresidues(names[i], map); + } + + return s; +} + +Selector MoleculeView::residues(const QList &values, + const PropertyMap &map) const +{ + if (values.count() == 0) + throw SireError::invalid_index(QObject::tr( + "You must specify some indexes.."), CODELOC); + + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + ret.reserve(values.count()); + + for (const auto &value : values) + { + ret.append(IDs.at(SireID::Index(value).map(IDs.count()))); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllResidues()) + { + for (auto value : values) + { + idxs.append(ResIdx(value)); + } + } + else + { + auto residxs = s.selectedResidues(); + + for (auto value : values) + { + idxs.append(residxs.at(Index(value).map(residxs.count()))); + } + } + + return Selector(this->data(), idxs); +} + +Selector MoleculeView::residues(const Slice &slice, + const PropertyMap &map) const +{ + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + + for (auto it = slice.begin(IDs.count()); not it.atEnd(); it.next()) + { + ret.append(IDs.at(it.value())); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllResidues()) + { + for (auto it = slice.begin(s.nResidues()); not it.atEnd(); it.next()) + { + idxs.append(ResIdx(it.value())); + } + } + else + { + auto residxs = s.selectedResidues(); + + for (auto it = slice.begin(residxs.count()); not it.atEnd(); it.next()) + { + idxs.append(residxs.at(Index(it.value()).map(residxs.count()))); + } + } + + return Selector(*this, idxs); +} + /** Return the residues from this view that match the ID 'resid' \throw SireMol::missing_residue @@ -444,19 +896,19 @@ Selector MoleculeView::residues(const ResID &resid, Residue MoleculeView::residue() const { QList selected_res = this->selection().selectedResidues(); - + if (selected_res.isEmpty()) throw SireMol::missing_residue( QObject::tr( "This view does not contain any residues."), CODELOC ); - + else if (selected_res.count() != 1) throw SireMol::duplicate_residue( QObject::tr( "Cannot convert this view (%1) into a Residue as " "we can only do this is just one Residue is selected. " "These Residues are selected ; %2.") - .arg(this->toString(), Sire::toString(selected_res)), + .arg(this->toString(), Sire::toString(selected_res)), CODELOC ); - + return Residue(this->data(), selected_res.at(0)); } @@ -466,15 +918,66 @@ Residue MoleculeView::residue() const */ Selector MoleculeView::residues() const { + if (this->isA< Selector >()) + return this->asA< Selector >(); + QList selected_res = this->selection().selectedResidues(); - + if (selected_res.isEmpty()) + { throw SireMol::missing_residue( QObject::tr( "This view does not contain any residues."), CODELOC ); - + } + return Selector(this->data(), selected_res); } +Chain MoleculeView::chain(int i, const PropertyMap &map) const +{ + auto s = this->selection(); + + if (s.selectedAllChains()) + { + return this->chain(ChainIdx(i), map); + } + else + { + auto cidxs = s.selectedChains(); + return this->chain(cidxs.at(Index(i).map(cidxs.count())), map); + } +} + +Chain MoleculeView::chain(const QString &name, const PropertyMap &map) const +{ + try + { + return this->chain(ChainID::fromString(name), map); + } + catch(const SireMol::duplicate_chain &e) + { + throw e; + } + catch(const SireError::exception &e) + { + try + { + auto a = this->search(name).views().at(0).chain(); + return this->chain(a.index(), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Chain(); +} + /** Return the chain that is involved with this view that matches the ID 'chainid' @@ -487,6 +990,143 @@ Chain MoleculeView::chain(const ChainID &chainid, const PropertyMap &map) const return chainid.selectFrom(*this, map); } +Selector MoleculeView::chains(const QString &name, + const PropertyMap &map) const +{ + try + { + return this->chains(ChainID::fromString(name), map); + } + catch(const SireError::exception &e) + { + try + { + const auto a = this->search(name).views(); + + if (a.count() == 0) + throw SireMol::missing_chain(QObject::tr( + "No chain matches '%1'").arg(name), CODELOC); + + return this->molecule().chains( + _toIndicies(a[0].chains().IDs()), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Selector(); +} + +Selector MoleculeView::chains(const QStringList &names, + const PropertyMap &map) const +{ + if (names.count() == 0) + throw SireMol::missing_atom(QObject::tr( + "You must specify some names.."), CODELOC); + + auto s = this->chains(names[0], map); + + for (int i=1; ichains(names[i], map); + } + + return s; +} + +Selector MoleculeView::chains(const QList &values, + const PropertyMap &map) const +{ + if (values.count() == 0) + throw SireError::invalid_index(QObject::tr( + "You must specify some indexes.."), CODELOC); + + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + ret.reserve(values.count()); + + for (const auto &value : values) + { + ret.append(IDs.at(SireID::Index(value).map(IDs.count()))); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllChains()) + { + for (auto value : values) + { + idxs.append(ChainIdx(value)); + } + } + else + { + auto chainidxs = s.selectedChains(); + + for (auto value : values) + { + idxs.append(chainidxs.at(Index(value).map(chainidxs.count()))); + } + } + + return Selector(this->data(), idxs); +} + +Selector MoleculeView::chains(const Slice &slice, + const PropertyMap &map) const +{ + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + + for (auto it = slice.begin(IDs.count()); not it.atEnd(); it.next()) + { + ret.append(IDs.at(it.value())); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllChains()) + { + + for (auto it = slice.begin(s.nChains()); not it.atEnd(); it.next()) + { + idxs.append(ChainIdx(it.value())); + } + } + else + { + auto cidxs = s.selectedChains(); + + for (auto it = slice.begin(cidxs.count()); not it.atEnd(); it.next()) + { + idxs.append(cidxs.at(it.value())); + } + } + + return Selector(*this, idxs); +} + /** Return the chains that are involved with this view that match the ID 'chainid' @@ -508,19 +1148,19 @@ Selector MoleculeView::chains(const ChainID &chainid, Chain MoleculeView::chain() const { QList selected_chn = this->selection().selectedChains(); - + if (selected_chn.isEmpty()) throw SireMol::missing_chain( QObject::tr( "This view does not contain any chains."), CODELOC ); - + else if (selected_chn.count() != 1) throw SireMol::duplicate_chain( QObject::tr( "Cannot convert this view (%1) into a Chain as " "we can only do this is just one Chain is selected. " "These Chains are selected ; %2.") - .arg(this->toString(), Sire::toString(selected_chn)), + .arg(this->toString(), Sire::toString(selected_chn)), CODELOC ); - + return Chain(this->data(), selected_chn.at(0)); } @@ -530,15 +1170,64 @@ Chain MoleculeView::chain() const */ Selector MoleculeView::chains() const { + if (this->isA< Selector >()) + return this->asA< Selector >(); + QList selected_chn = this->selection().selectedChains(); - + if (selected_chn.isEmpty()) throw SireMol::missing_chain( QObject::tr( "This view does not contain any chains."), CODELOC ); - + return Selector(this->data(), selected_chn); } +Segment MoleculeView::segment(int i, const PropertyMap &map) const +{ + auto s = this->selection(); + + if (s.selectedAllSegments()) + { + return this->segment(SegIdx(i), map); + } + else + { + auto segidxs = s.selectedSegments(); + return this->segment(segidxs.at(Index(i).map(segidxs.count())), map); + } +} + +Segment MoleculeView::segment(const QString &name, const PropertyMap &map) const +{ + try + { + return this->segment(SegID::fromString(name), map); + } + catch(const SireMol::duplicate_segment &e) + { + throw e; + } + catch(const SireError::exception &e) + { + try + { + auto a = this->search(name).views().at(0).segment(); + return this->segment(a.index(), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Segment(); +} + /** Return the segment that is involved with this view that matches the ID 'segid' @@ -551,6 +1240,143 @@ Segment MoleculeView::segment(const SegID &segid, const PropertyMap &map) const return segid.selectFrom(*this, map); } +Selector MoleculeView::segments(const QString &name, + const PropertyMap &map) const +{ + try + { + return this->segments(SegID::fromString(name), map); + } + catch(const SireError::exception &e) + { + try + { + const auto a = this->search(name).views(); + + if (a.count() == 0) + throw SireMol::missing_segment(QObject::tr( + "No segment matches '%1'").arg(name), CODELOC); + + return this->molecule().segments( + _toIndicies(a[0].segments().IDs()), map); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return Selector(); +} + +Selector MoleculeView::segments(const QStringList &names, + const PropertyMap &map) const +{ + if (names.count() == 0) + throw SireMol::missing_atom(QObject::tr( + "You must specify some names.."), CODELOC); + + auto s = this->segments(names[0], map); + + for (int i=1; isegments(names[i], map); + } + + return s; +} + +Selector MoleculeView::segments(const QList &values, + const PropertyMap &map) const +{ + if (values.count() == 0) + throw SireError::invalid_index(QObject::tr( + "You must specify some indexes.."), CODELOC); + + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + ret.reserve(values.count()); + + for (const auto &value : values) + { + ret.append(IDs.at(SireID::Index(value).map(IDs.count()))); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllSegments()) + { + for (auto value : values) + { + idxs.append(SegIdx(value)); + } + } + else + { + auto segidxs = s.selectedSegments(); + + for (auto value : values) + { + idxs.append(segidxs.at(Index(value).map(segidxs.count()))); + } + } + + return Selector(this->data(), idxs); +} + +Selector MoleculeView::segments(const Slice &slice, + const PropertyMap &map) const +{ + if (this->isA< Selector >()) + { + auto IDs = this->asA< Selector >().indexes(); + + QList ret; + + for (auto it = slice.begin(IDs.count()); not it.atEnd(); it.next()) + { + ret.append(IDs.at(it.value())); + } + + return Selector(this->data(), ret); + } + + const auto s = this->selection(); + QList idxs; + + if (s.selectedAllSegments()) + { + + for (auto it = slice.begin(s.nSegments()); not it.atEnd(); it.next()) + { + idxs.append(SegIdx(it.value())); + } + } + else + { + auto segidxs = s.selectedSegments(); + + for (auto it = slice.begin(segidxs.count()); not it.atEnd(); it.next()) + { + idxs.append(segidxs.at(it.value())); + } + } + + return Selector(*this, idxs); +} + /** Return the segments that are involved with this view that match the ID 'segid' @@ -570,19 +1396,19 @@ Selector MoleculeView::segments(const SegID &segid, const PropertyMap & Segment MoleculeView::segment() const { QList selected_seg = this->selection().selectedSegments(); - + if (selected_seg.isEmpty()) throw SireMol::missing_segment( QObject::tr( "This view does not contain any segments."), CODELOC ); - + else if (selected_seg.count() != 1) throw SireMol::duplicate_segment( QObject::tr( "Cannot convert this view (%1) into a Segment as " "we can only do this is just one Segment is selected. " "These Segments are selected ; %2.") - .arg(this->toString(), Sire::toString(selected_seg)), + .arg(this->toString(), Sire::toString(selected_seg)), CODELOC ); - + return Segment(this->data(), selected_seg.at(0)); } @@ -592,12 +1418,15 @@ Segment MoleculeView::segment() const */ Selector MoleculeView::segments() const { + if (this->isA< Selector >()) + return this->asA< Selector >(); + QList selected_seg = this->selection().selectedSegments(); - + if (selected_seg.isEmpty()) throw SireMol::missing_segment( QObject::tr( "This view does not contain any segments."), CODELOC ); - + return Selector(this->data(), selected_seg); } @@ -609,7 +1438,7 @@ Molecule MoleculeView::molecule() const /** Return the CutGroup whose atoms are in this view that matches the ID in 'cgid' - + \throw SireMol::missing_cutgroup \throw SireError::invalid_index \throw SireMol::duplicate_cutgroup @@ -683,7 +1512,7 @@ Selector MoleculeView::selectAll(const AtomID &atomid, return this->atoms(atomid, map); } -/** Return all of the atoms in this view +/** Return all of the atoms in this view \throw SireMol::missing_atom */ @@ -692,7 +1521,7 @@ Selector MoleculeView::selectAll() const return this->atoms(); } -/** Return all of the atoms in this view +/** Return all of the atoms in this view \throw SireMol::missing_atom */ @@ -703,7 +1532,7 @@ Selector MoleculeView::selectAllAtoms() const /** Return the CutGroups whose atoms are in this view that match the ID in 'cgid' - + \throw SireMol::missing_cutgroup \throw SireError::invalid_index */ @@ -791,6 +1620,36 @@ const MoleculeView& MoleculeView::null() return *(create_shared_null()); } +/** Return the number of atoms in this view */ +int MoleculeView::nAtoms() const +{ + return this->selection().nSelectedAtoms(); +} + +/** Return the number of residues in this view */ +int MoleculeView::nResidues() const +{ + return this->selection().nSelectedResidues(); +} + +/** Return the number of CutGroups in this view */ +int MoleculeView::nCutGroups() const +{ + return this->selection().nSelectedCutGroups(); +} + +/** Return the number of chains in this view */ +int MoleculeView::nChains() const +{ + return this->selection().nSelectedChains(); +} + +/** Return the number of segments in this view */ +int MoleculeView::nSegments() const +{ + return this->selection().nSelectedSegments(); +} + /** Return the number of sub-views in this view. Most MoleculeViews are just a single view, but some (e.g. ViewsOfMol or Selector) have multiple views */ @@ -815,24 +1674,33 @@ int MoleculeView::count() const return this->nViews(); } +/** Expand this into a list of unit classes. This will return the view itself if + * this is a unit class, e.g. Atom, Residue, Molecule etc. + * This will return a list of unit classes if this is a Selector or + * equivalent type class. +*/ +QList MoleculeView::toList() const +{ + return QList({MolViewPtr(this->clone())}); +} + /** Return the ith view in this MoleculeView. */ MolViewPtr MoleculeView::operator[](int i) const { - if (i > 0 or i < -1) - { - throw SireError::invalid_index( QObject::tr( - "The %1 only has a single view. Index %2 is not supported!") - .arg(this->what()).arg(i), CODELOC ); - } - - return this->clone(); + return this->atom(i); +} + +/** Return the child with the specified name from this MoleculeView */ +MolViewPtr MoleculeView::operator[](const QString &name) const +{ + return this->atom(name); } /** Return the atom(s) that match 'atomid' in this view of the molecule */ MolViewPtr MoleculeView::operator[](const AtomID &atomid) const { auto atoms = this->selectAll(atomid); - + if (atoms.count() == 1) { return atoms[0]; @@ -847,7 +1715,7 @@ MolViewPtr MoleculeView::operator[](const AtomID &atomid) const MolViewPtr MoleculeView::operator[](const ResID &resid) const { auto residues = this->selectAll(resid); - + if (residues.count() == 1) { return residues[0]; @@ -862,7 +1730,7 @@ MolViewPtr MoleculeView::operator[](const ResID &resid) const MolViewPtr MoleculeView::operator[](const CGID &cgid) const { auto cutgroups = this->selectAll(cgid); - + if (cutgroups.count() == 1) { return cutgroups[0]; @@ -877,7 +1745,7 @@ MolViewPtr MoleculeView::operator[](const CGID &cgid) const MolViewPtr MoleculeView::operator[](const ChainID &chainid) const { auto chains = this->selectAll(chainid); - + if (chains.count() == 1) { return chains[0]; @@ -892,7 +1760,7 @@ MolViewPtr MoleculeView::operator[](const ChainID &chainid) const MolViewPtr MoleculeView::operator[](const SegID &segid) const { auto segments = this->selectAll(segid); - + if (segments.count() == 1) { return segments[0]; @@ -907,8 +1775,17 @@ MolViewPtr MoleculeView::operator[](const SegID &segid) const as the int */ MolViewPtr MoleculeView::operator[](const SireID::Index &idx) const { - int i = idx.map(this->nViews()); - return this->operator[](i); + return this->operator[](idx.value()); +} + +MolViewPtr MoleculeView::operator[](const Slice &slice) const +{ + return this->atoms(slice); +} + +MolViewPtr MoleculeView::operator[](const QList &idxs) const +{ + return this->atoms(idxs); } MolViewPtr MoleculeView::at(int i) const diff --git a/corelib/src/libs/SireMol/moleculeview.h b/corelib/src/libs/SireMol/moleculeview.h index 1db5e759a..726fddb2b 100644 --- a/corelib/src/libs/SireMol/moleculeview.h +++ b/corelib/src/libs/SireMol/moleculeview.h @@ -35,6 +35,8 @@ #include "moleculedata.h" #include "moleculeinfodata.h" +#include + SIRE_BEGIN_HEADER namespace SireMol @@ -45,6 +47,11 @@ class MoleculeView; SIREMOL_EXPORT QDataStream& operator<<(QDataStream&, const SireMol::MoleculeView&); SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::MoleculeView&); +namespace SireBase +{ +class Slice; +} + namespace SireMol { @@ -124,13 +131,25 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeView&); int count() const; virtual int nViews() const; + virtual int nAtoms() const; + virtual int nResidues() const; + virtual int nChains() const; + virtual int nSegments() const; + virtual int nCutGroups() const; + virtual MolViewPtr operator[](int i) const; + virtual MolViewPtr operator[](const QString &name) const; virtual MolViewPtr operator[](const AtomID &atomid) const; virtual MolViewPtr operator[](const ResID &resid) const; virtual MolViewPtr operator[](const CGID &cgid) const; virtual MolViewPtr operator[](const ChainID &chainid) const; virtual MolViewPtr operator[](const SegID &segid) const; virtual MolViewPtr operator[](const SireID::Index &idx) const; + virtual MolViewPtr operator[](const SireBase::Slice &slice) const; + virtual MolViewPtr operator[](const QList &idxs) const; + + virtual QList toList() const; + virtual MolViewPtr toSelector() const=0; MolViewPtr at(int i) const; MolViewPtr at(const AtomID &atomid) const; @@ -140,30 +159,80 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeView&); MolViewPtr at(const SegID &segid) const; MolViewPtr at(const SireID::Index &idx) const; + Atom atom(int i, const PropertyMap &map = PropertyMap()) const; + Atom atom(const QString &name, const PropertyMap &map = PropertyMap()) const; Atom atom(const AtomID &atomid, const PropertyMap &map = PropertyMap()) const; + Selector atoms(const QString &name, + const PropertyMap &map = PropertyMap()) const; + + Selector atoms(const SireBase::Slice &slice, + const PropertyMap &map = PropertyMap()) const; + + Selector atoms(const QList &values, + const PropertyMap &map = PropertyMap()) const; + + Selector atoms(const QStringList &names, + const PropertyMap &map = PropertyMap()) const; + Selector atoms(const AtomID &atomid, const PropertyMap &map = PropertyMap()) const; Atom atom() const; Selector atoms() const; + CutGroup cutGroup(int i, const PropertyMap &map = PropertyMap()) const; + CutGroup cutGroup(const QString &name, const PropertyMap &map = PropertyMap()) const; CutGroup cutGroup(const CGID &cgid, const PropertyMap &map = PropertyMap()) const; + Selector cutGroups(const QString &name, + const PropertyMap &map = PropertyMap()) const; + + Selector cutGroups(const SireBase::Slice &slice, + const PropertyMap &map = PropertyMap()) const; + Selector cutGroups(const CGID &cgid, const PropertyMap &map = PropertyMap()) const; CutGroup cutGroup() const; Selector cutGroups() const; + Residue residue(int i, const PropertyMap &map = PropertyMap()) const; + Residue residue(const QString &name, const PropertyMap &map = PropertyMap()) const; Residue residue(const ResID &resid, const PropertyMap &map = PropertyMap()) const; + Selector residues(const QString &name, + const PropertyMap &map = PropertyMap()) const; + + Selector residues(const QList &values, + const PropertyMap &map = PropertyMap()) const; + + Selector residues(const QStringList &names, + const PropertyMap &map = PropertyMap()) const; + + Selector residues(const SireBase::Slice &slice, + const PropertyMap &map = PropertyMap()) const; + Selector residues(const ResID &resid, const PropertyMap &map = PropertyMap()) const; Residue residue() const; Selector residues() const; + Selector chains(const QString &name, + const PropertyMap &map = PropertyMap()) const; + + Selector chains(const QList &values, + const PropertyMap &map = PropertyMap()) const; + + Selector chains(const QStringList &names, + const PropertyMap &map = PropertyMap()) const; + + Selector chains(const SireBase::Slice &slice, + const PropertyMap &map = PropertyMap()) const; + + Chain chain(int i, const PropertyMap &map = PropertyMap()) const; + Chain chain(const QString &name, const PropertyMap &map = PropertyMap()) const; Chain chain(const ChainID &chainid, const PropertyMap &map = PropertyMap()) const; Selector chains(const ChainID &chainid, @@ -172,6 +241,20 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, MoleculeView&); Chain chain() const; Selector chains() const; + Selector segments(const QString &name, + const PropertyMap &map = PropertyMap()) const; + + Selector segments(const QList &values, + const PropertyMap &map = PropertyMap()) const; + + Selector segments(const QStringList &names, + const PropertyMap &map = PropertyMap()) const; + + Selector segments(const SireBase::Slice &slice, + const PropertyMap &map = PropertyMap()) const; + + Segment segment(int i, const PropertyMap &map = PropertyMap()) const; + Segment segment(const QString &name, const PropertyMap &map = PropertyMap()) const; Segment segment(const SegID &segid, const PropertyMap &map = PropertyMap()) const; Selector segments(const SegID &segid, diff --git a/corelib/src/libs/SireMol/molid.h b/corelib/src/libs/SireMol/molid.h index c2948033c..6b423a29a 100644 --- a/corelib/src/libs/SireMol/molid.h +++ b/corelib/src/libs/SireMol/molid.h @@ -56,7 +56,7 @@ class Molecules; class MoleculeGroup; class MolGroupsBase; -/** This is the base class of all identifiers that are used +/** This is the base class of all identifiers that are used to identify a Molecule @author Christopher Woods @@ -69,9 +69,9 @@ class SIREMOL_EXPORT MolID : public SireID::ID typedef Molecules SearchObject; MolID(); - + MolID(const MolID &other); - + virtual ~MolID(); static const char* typeName() @@ -80,11 +80,11 @@ class SIREMOL_EXPORT MolID : public SireID::ID } virtual MolID* clone() const=0; - + SpecifyMol operator[](int i) const; SpecifyMol operator()(int i) const; SpecifyMol operator()(int i, int j) const; - + IDAndSet operator+(const MolID &other) const; MolAtomID operator+(const AtomID &other) const; @@ -95,21 +95,21 @@ class SIREMOL_EXPORT MolID : public SireID::ID IDAndSet operator&(const MolID &other) const; MolAtomID operator&(const AtomID &other) const; - + IDOrSet operator||(const MolID &other) const; IDOrSet operator|(const MolID &other) const; - + IDOrSet operator*(const AtomID &other) const; IDOrSet operator|(const AtomID &other) const; IDOrSet operator||(const AtomID &other) const; - + /* TODO!!! SireID::InvertMatch operator!() const; SireID::InvertMatch invert() const; SireID::InvertMatch inverse() const; - + static SireID::MatchAll any();*/ - + virtual QList map(const Molecules &molecules) const=0; virtual QList map(const MoleculeGroup &molgroup) const=0; virtual QList map(const MolGroupsBase &molgroupsbase) const=0; @@ -144,42 +144,42 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, IDAndSet& IDAndSet(); IDAndSet(const MolID &id); IDAndSet(const MolID &id0, const MolID &id1); - + IDAndSet(const QList &ids); - + IDAndSet(const IDAndSet &other); - + ~IDAndSet(); - + static const char* typeName(); - + const char* what() const { return IDAndSet::typeName(); } - + IDAndSet* clone() const; - + bool isNull() const; - + uint hash() const; - + QString toString() const; const QSet& IDs() const; - + IDAndSet& operator=(const IDAndSet &other); IDAndSet& operator=(const MolID &other); - + bool operator==(const SireID::ID &other) const; bool operator!=(const SireID::ID &other) const; - + bool operator==(const IDAndSet &other) const; bool operator!=(const IDAndSet &other) const; - + bool operator==(const MolID &other) const; bool operator!=(const MolID &other) const; - + QList map(const Molecules &mols) const; QList map(const MoleculeGroup &molgroup) const; QList map(const MolGroupsBase &molgroups) const; @@ -189,7 +189,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, IDAndSet& template QList _pvt_map(const T &group) const; - + QSet ids; }; @@ -204,42 +204,42 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, IDOrSet&) IDOrSet(); IDOrSet(const MolID &id); IDOrSet(const MolID &id0, const MolID &id1); - + IDOrSet(const QList &ids); - + IDOrSet(const IDOrSet &other); - + ~IDOrSet(); - + static const char* typeName(); - + const char* what() const { return IDOrSet::typeName(); } - + IDOrSet* clone() const; - + bool isNull() const; - + uint hash() const; - + QString toString() const; const QSet& IDs() const; - + IDOrSet& operator=(const IDOrSet &other); IDOrSet& operator=(const MolID &other); - + bool operator==(const SireID::ID &other) const; bool operator!=(const SireID::ID &other) const; - + bool operator==(const IDOrSet &other) const; bool operator!=(const IDOrSet &other) const; - + bool operator==(const MolID &other) const; bool operator!=(const MolID &other) const; - + QList map(const Molecules &mols) const; QList map(const MoleculeGroup &molgroup) const; QList map(const MolGroupsBase &molgroups) const; diff --git a/corelib/src/libs/SireMol/molinfo.h b/corelib/src/libs/SireMol/molinfo.h index f530252de..adb3a6f7b 100644 --- a/corelib/src/libs/SireMol/molinfo.h +++ b/corelib/src/libs/SireMol/molinfo.h @@ -76,6 +76,12 @@ class SIREMOL_EXPORT MolInfo MolInfo(); virtual ~MolInfo(); + virtual int nAtoms() const=0; + virtual int nResidues() const=0; + virtual int nChains() const=0; + virtual int nSegments() const=0; + virtual int nCutGroups() const=0; + virtual QList map(const AtomName &name) const=0; virtual QList map(AtomNum num) const=0; virtual QList map(AtomIdx idx) const=0; @@ -204,6 +210,9 @@ template QList getAll(const MolInfo &molinfo, const AtomSelection &selected_atoms); +template +int getCount(const MolInfo &molinfo); + } //end of namespace detail #endif //SIRE_SKIP_INLINE_FUNCTIONS diff --git a/corelib/src/libs/SireMol/parser.cpp b/corelib/src/libs/SireMol/parser.cpp index fa069ef7d..2057ee169 100644 --- a/corelib/src/libs/SireMol/parser.cpp +++ b/corelib/src/libs/SireMol/parser.cpp @@ -27,175 +27,64 @@ \*********************************************/ #include "parser.h" -#include "parser/ast.h" -#include "SireError/errors.h" - -#include -#include -#include - -#include -#include - -#include -#include -#include -#include -#include - -#include -#include - -using namespace SireMol; - -namespace spirit = boost::spirit; -namespace qi = spirit::qi; -namespace phoenix = boost::phoenix; - -//////// -//////// implementation of parse_error -//////// - -const char* parse_error::typeName() -{ - return QMetaType::typeName( qMetaTypeId() ); -} - -static const RegisterMetaType r_parse; - -//////// -//////// implementation of the user tokens registry -//////// - -typedef qi::symbols UserTokens; -static UserTokens *_user_tokens = 0; - -Q_GLOBAL_STATIC( QMutex, tokensMutex ) +#include "core.h" -/** Get the set of user-supplied tokens */ -UserTokens getUserTokens() -{ - QMutexLocker lkr(tokensMutex()); - - if (_user_tokens == 0) - _user_tokens = new UserTokens(); - - return *_user_tokens; -} - -/** Clear all of the user-supplied tokens */ -static void reset_tokens() -{ - QMutexLocker lkr(tokensMutex()); - - delete _user_tokens; - _user_tokens = 0; -} +#include "SireError/errors.h" -template -QString toString(IteratorT begin, IteratorT end) +namespace SireMol { - QStringList lines; - for (; begin != end; ++begin) + namespace parser { - lines.append( QString( *begin ) ); - } - - return lines.join(""); -} + Parser* Parser::global_parser(0); -#include "parser/grammar.h" //file containing the actual grammar - separated to ease reading - -/** Function that parses the passed string (represented via its iterators) into an AST::Node */ -template -AST::Node parse(const IteratorT & begin, const IteratorT & end) -{ - using LinePosIteratorT = spirit::line_pos_iterator; - - using SkipperGrammarT = SkipperGrammar; - using ParserGrammarT = Grammar; + void Parser::install_parser(Parser *parser) + { + if (global_parser != 0) + delete global_parser; - SkipperGrammarT skipper; - ParserGrammarT grammar; - LinePosIteratorT posIterBegin( begin ); - LinePosIteratorT posIterEnd( end ); - - AST::Node result; + global_parser = parser; + } - const bool parseResult = qi::phrase_parse( posIterBegin, - posIterEnd, - grammar, - skipper, - result ); - - if( not (parseResult && posIterBegin == posIterEnd) ) - { - QString line = toString( LinePosIteratorT(begin), LinePosIteratorT(end) ); - QString left = toString( posIterBegin, posIterEnd ); + Parser& Parser::globalParser() + { + if (global_parser == 0) + throw SireError::program_bug( QObject::tr( + "No parser has been loaded!"), CODELOC ); - throw SireMol::parse_error( QObject::tr("Failed to parse the selection '%1'. " - "Successfully parsed the beginning, but failed to parse '%2'") - .arg(line).arg(left), CODELOC ); - } - - return result; -} + return *global_parser; + } -/** Function used internally to associate a user token with a user-specified selection */ -static void set_token(const std::string &token, const std::string &str) -{ - //first parse this into an AST::Node - auto node = parse( str.begin(), str.end() ); - - if (node.values.size() != 1) - throw SireMol::parse_error( QObject::tr( - "Cannot set a token based on a multi-line selection!"), CODELOC ); - - QMutexLocker lkr(tokensMutex()); - - if (_user_tokens == 0) - _user_tokens = new UserTokens(); - - _user_tokens->add(token, AST::IDUser(token,node.values[0].value)); -} + void set_token(const QString &token, const QString &selection) + { + Parser::globalParser().set_token(token, selection); + } -/** Function used internally to parse a string into an AST::Node */ -static AST::Node parse_main(const std::string &str) -{ - // Read file contents. - return parse( str.begin(), str.end() ); -} + QString get_token(const QString &token) + { + return Parser::globalParser().get_token(token); + } -namespace SireMol -{ - namespace parser - { - /** Internal function used to parse the passed string and convert - it into a SelectEngine object */ - SelectEnginePtr parse( const QString &str ) + void delete_token(const QString &token) { - auto ast = ::parse_main( str.toStdString() ); - - auto engine = ast.toEngine(); - - if (engine.get()) - engine = engine->simplify(); - - return engine; + Parser::globalParser().delete_token(token); } - - /** Internal function used to associate a named token with the - passed user-specified selection string */ - void set_token(const QString &token, const QString &selection) + + void delete_all_tokens() { - ::set_token(token.toStdString(), selection.toStdString()); + Parser::globalParser().delete_all_tokens(); } - - /** Internal function used to clear all user-specified tokens */ + void reset_tokens() { - ::reset_tokens(); + Parser::globalParser().reset_tokens(); + } + + /** Internal function used to parse the passed string and convert + it into a SelectEngine object */ + SelectEnginePtr parse( const QString &str ) + { + return Parser::globalParser().parse(str); } } } diff --git a/corelib/src/libs/SireMol/parser.h b/corelib/src/libs/SireMol/parser.h index 41e15d7b4..7a4fd95d4 100644 --- a/corelib/src/libs/SireMol/parser.h +++ b/corelib/src/libs/SireMol/parser.h @@ -30,60 +30,53 @@ #define SIREMOL_PARSER_H #include "select.h" -#include "SireMol/errors.h" SIRE_BEGIN_HEADER namespace SireMol { -/** This exception is thrown when there was an error parsing a selection - - @author Christopher Woods -*/ -class SIREMOL_EXPORT parse_error : public siremol_error +namespace parser { -public: - parse_error() : siremol_error() - {} + class SIREMOL_EXPORT Parser + { + public: + Parser() + {} - parse_error(QString err, QString place = QString()) - : siremol_error(err,place) - {} + virtual ~Parser() + {} - parse_error(const parse_error &other) : siremol_error(other) - {} + static void install_parser(Parser *parser); - ~parse_error() throw() - {} + virtual bool has_token(const QString &token)=0; - static const char* typeName(); + virtual QString get_token(const QString &token)=0; - const char* what() const throw() - { - return parse_error::typeName(); - } + virtual void set_token(const QString &token, const QString &selection)=0; - void throwSelf() const - { - throw parse_error(*this); - } -}; + virtual void delete_token(const QString &token)=0; -namespace parser -{ - using SireMol::parser::SelectEnginePtr; + virtual void delete_all_tokens()=0; + + virtual void reset_tokens()=0; + + virtual SireMol::parser::SelectEnginePtr parse(const QString &str)=0; + + static Parser& globalParser(); + + private: + static Parser* global_parser; + }; void set_token(const QString &token, const QString &selection); void reset_tokens(); - SelectEnginePtr parse(const QString &str); + SireMol::parser::SelectEnginePtr parse(const QString &str); } } -Q_DECLARE_METATYPE(SireMol::parse_error) - SIRE_END_HEADER #endif diff --git a/corelib/src/libs/SireMol/partialmolecule.cpp b/corelib/src/libs/SireMol/partialmolecule.cpp index af053b5df..5645de041 100644 --- a/corelib/src/libs/SireMol/partialmolecule.cpp +++ b/corelib/src/libs/SireMol/partialmolecule.cpp @@ -57,13 +57,13 @@ using namespace SireStream; RegisterMetaType r_partialmol; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const PartialMolecule &partialmol) { writeHeader(ds, r_partialmol, 1); SharedDataStream sds(ds); - + sds << partialmol.selected_atoms << static_cast(partialmol); @@ -71,7 +71,7 @@ QDataStream &operator<<(QDataStream &ds, } /** Deserialise from a binary datastream */ -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, PartialMolecule &partialmol) { VersionID v = readHeader(ds, r_partialmol); @@ -113,7 +113,7 @@ PartialMolecule::PartialMolecule(const MoleculeData &moldata, PartialMolecule::PartialMolecule(const PartialMolecule &other) : ConcreteProperty(other), selected_atoms(other.selected_atoms) -{} +{} /** Destructor */ PartialMolecule::~PartialMolecule() @@ -181,21 +181,21 @@ MolNum PartialMolecule::number() const { return d->number(); } - + /** Return the version number of this molecule - all molecules with the same ID number and version number must be identical */ quint64 PartialMolecule::version() const { return d->version(); } - + /** Return the version number of the property at key 'key'. All molecules with the same ID number and same property version number must have the same value of this property (although this says nothing about any metadata associated with this property) - - \throw SireBase::missing_property + + \throw SireBase::missing_property */ quint64 PartialMolecule::version(const PropertyName &key) const { @@ -238,7 +238,7 @@ Mover PartialMolecule::move() const return Mover(*this); } -/** Return an evaluator that can evaluate properties +/** Return an evaluator that can evaluate properties over all of the atoms in this view */ Evaluator PartialMolecule::evaluate() const { @@ -266,10 +266,10 @@ bool PartialMolecule::hasMetadata(const PropertyName &metakey) const /** Return whether or not the property at key 'key' has some metadata at metakey 'metakey' - + \throw SireBase::missing_property */ -bool PartialMolecule::hasMetadata(const PropertyName &key, +bool PartialMolecule::hasMetadata(const PropertyName &key, const PropertyName &metakey) const { return d->hasMetadata(key, metakey); @@ -292,26 +292,26 @@ PartialMolecule PartialMolecule::extract() const else if (this->selectedAll()) return *this; - + else { PartialMolecule ret; - + ret.d = d->extract(selected_atoms); ret.selected_atoms = AtomSelection( *(ret.d) ); - + return ret; } } -/** Return the keys of all of the metadata contained directly by +/** Return the keys of all of the metadata contained directly by this molecule */ QStringList PartialMolecule::metadataKeys() const { return d->metadataKeys(); } -/** Return the keys of all metadata for the property at key 'key' +/** Return the keys of all metadata for the property at key 'key' \throw SireBase::missing_property */ @@ -320,10 +320,10 @@ QStringList PartialMolecule::metadataKeys(const PropertyName &key) const return d->metadataKeys(key); } -/** Return the property at key 'key'. Note that this returns the +/** Return the property at key 'key'. Note that this returns the property for the molecule - no attempt is made to mask this property to match the current selection - + \throw SireBase::missing_property */ const Property& PartialMolecule::property(const PropertyName &key) const @@ -331,10 +331,10 @@ const Property& PartialMolecule::property(const PropertyName &key) const return d->property(key); } -/** Return the metadata at metakey 'metakey'. Note that this returns the +/** Return the metadata at metakey 'metakey'. Note that this returns the metadata for the molecule - no attempt is made to mask this metadata to match the current selection - + \throw SireBase::missing_property */ const Property& PartialMolecule::metadata(const PropertyName &metakey) const @@ -343,10 +343,10 @@ const Property& PartialMolecule::metadata(const PropertyName &metakey) const } /** Return the metadata at the metakey 'metakey' for the property - at key 'key'. Note that this returns the + at key 'key'. Note that this returns the metadata for the molecule - no attempt is made to mask this metadata to match the current selection - + \throw SireBase::missing_property */ const Property& PartialMolecule::metadata(const PropertyName &key, @@ -360,61 +360,55 @@ const char* PartialMolecule::typeName() return QMetaType::typeName( qMetaTypeId() ); } +MolViewPtr PartialMolecule::toSelector() const +{ + const auto unit = this->toUnit(); + + if (unit.data() == this) + { + return MolViewPtr(this->atoms()); + } + else + { + return unit->toSelector(); + } +} + /** Return a copy of this PartialMolecule that has been reduced to its unit type, i.e. if this is a single Atom, this returns the Atom, if this is a single residue, this returns the Residue etc. */ MolViewPtr PartialMolecule::toUnit() const { - if (this->selectedAll()) + const auto s = this->selection(); + + if (s.isMolecule()) { return this->molecule(); } - else if (this->nAtoms() == 1) + else if (s.isAtom()) { return this->atom(); } - - if (this->nResidues() == 1) + else if (s.isResidue()) { - const auto res = this->residue(); - - if (this->selection().selectedAll(res.number())) - { - return res; - } + return this->residue(); } - - if (this->nCutGroups() == 1) + else if (s.isChain()) { - const auto cg = this->cutGroup(); - - if (this->selection().selectedAll(cg.name())) - { - return cg; - } + return this->chain(); } - - if (this->nChains() == 1) + else if (s.isSegment()) { - const auto chain = this->chain(); - - if (this->selection().selectedAll(chain.name())) - { - return chain; - } + return this->segment(); } - - if (this->nSegments() == 1) + else if (s.isCutGroup()) { - const auto segment = this->segment(); - - if (this->selection().selectedAll(segment.name())) - { - return segment; - } + return this->cutGroup(); + } + else + { + return *this; } - - return *this; } namespace SireMol diff --git a/corelib/src/libs/SireMol/partialmolecule.h b/corelib/src/libs/SireMol/partialmolecule.h index 25fff45f7..3a9e9818b 100644 --- a/corelib/src/libs/SireMol/partialmolecule.h +++ b/corelib/src/libs/SireMol/partialmolecule.h @@ -64,7 +64,7 @@ class Atom; @author Christopher Woods */ -class SIREMOL_EXPORT PartialMolecule +class SIREMOL_EXPORT PartialMolecule : public SireBase::ConcreteProperty { @@ -93,10 +93,12 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, PartialMolecule&); bool operator!=(const PartialMolecule &other) const; QString toString() const; - + bool isEmpty() const; bool selectedAll() const; + MolViewPtr toSelector() const; + const MolName& name() const; MolNum number() const; @@ -110,20 +112,20 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, PartialMolecule&); int nSegments() const; Mover move() const; - + Evaluator evaluate() const; AtomSelection selection() const; - + PartialMolecule extract() const; - + bool hasProperty(const PropertyName &key) const; - + bool hasMetadata(const PropertyName &metakey) const; - - bool hasMetadata(const PropertyName &key, + + bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; @@ -148,7 +150,7 @@ Q_DECLARE_METATYPE(SireMol::Mover); SIRE_EXPOSE_CLASS( SireMol::PartialMolecule ) -SIRE_EXPOSE_ALIAS( SireMol::Mover, +SIRE_EXPOSE_ALIAS( SireMol::Mover, SireMol::Mover_PartialMolecule_ ) #ifdef SIRE_INSTANTIATE_TEMPLATES diff --git a/corelib/src/libs/SireMol/perturbation.cpp b/corelib/src/libs/SireMol/perturbation.cpp index 3db6c819b..1f1c8b571 100644 --- a/corelib/src/libs/SireMol/perturbation.cpp +++ b/corelib/src/libs/SireMol/perturbation.cpp @@ -32,6 +32,8 @@ #include "moleditor.h" #include "mover.hpp" +#include "core.h" + #include "SireCAS/values.h" #include "SireCAS/identities.h" @@ -77,19 +79,19 @@ const Symbol& PerturbationSymbols::final() const ////////// Implementation of Perturbation ////////// -static const RegisterMetaType r_pert( MAGIC_ONLY, +static const RegisterMetaType r_pert( MAGIC_ONLY, Perturbation::typeName() ); - + /** Serialise to a binary datastream */ QDataStream &operator<<(QDataStream &ds, const Perturbation &pert) { writeHeader(ds, r_pert, 1); - + SharedDataStream sds(ds); - + sds << pert.mapping_eqn << pert.map << static_cast(pert); - + return ds; } @@ -97,16 +99,16 @@ QDataStream &operator<<(QDataStream &ds, QDataStream &operator>>(QDataStream &ds, Perturbation &pert) { VersionID v = readHeader(ds, r_pert); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> pert.mapping_eqn >> pert.map >> static_cast(pert); } else throw version_error(v, "1", r_pert, CODELOC); - + return ds; } @@ -130,14 +132,14 @@ const Expression& Perturbation::defaultFunction() if (not default_equation) { QMutexLocker lkr( globalMutex() ); - + if (not default_equation) { default_equation = new Expression(); - - *default_equation = ((1 - Perturbation::symbols().lambda()) * - Perturbation::symbols().initial() ) + - ( Perturbation::symbols().lambda() * + + *default_equation = ((1 - Perturbation::symbols().lambda()) * + Perturbation::symbols().initial() ) + + ( Perturbation::symbols().lambda() * Perturbation::symbols().final() ); } } @@ -158,7 +160,7 @@ Perturbation::Perturbation(const Expression &equation, const PropertyMap &m) {} /** Copy constructor */ -Perturbation::Perturbation(const Perturbation &other) +Perturbation::Perturbation(const Perturbation &other) : Property(other), mapping_eqn(other.mapping_eqn), map(other.map) {} @@ -173,10 +175,10 @@ Perturbation& Perturbation::operator=(const Perturbation &other) { mapping_eqn = other.mapping_eqn; map = other.map; - + Property::operator=(other); } - + return *this; } @@ -192,7 +194,7 @@ bool Perturbation::operator!=(const Perturbation &other) const { return not Perturbation::operator==(other); } - + /** Recreate this perturbation - this has the same effect as .clone() */ PerturbationPtr Perturbation::recreate() const { @@ -210,9 +212,9 @@ PerturbationPtr Perturbation::recreate(const Expression &mapping_function) const else { PerturbationPtr new_pert(*this); - + new_pert.edit().mapping_eqn = mapping_function; - + return new_pert; } } @@ -227,14 +229,14 @@ PerturbationPtr Perturbation::recreate(const PropertyMap &new_map) const else { PerturbationPtr new_pert(*this); - + new_pert.edit().map = new_map; - + return new_pert; } } -/** Recreate this perturbation, replacing both the mapping function and +/** Recreate this perturbation, replacing both the mapping function and the property map */ PerturbationPtr Perturbation::recreate(const Expression &mapping_function, const PropertyMap &new_map) const @@ -246,28 +248,28 @@ PerturbationPtr Perturbation::recreate(const Expression &mapping_function, else { PerturbationPtr new_pert(*this); - + new_pert.edit().mapping_eqn = mapping_function; new_pert.edit().map = new_map; - + return new_pert; } } -/** Substitute the identities in 'identities' in all of the mapping functions - used by this perturbation. This is useful if, for example, you want to +/** Substitute the identities in 'identities' in all of the mapping functions + used by this perturbation. This is useful if, for example, you want to switch from using 'lambda' to control the perturbation to using 'alpha', e.g. - + alpha_perturbations = lambda_perturbations.substitute( lam == Expression(alpha) ); */ PerturbationPtr Perturbation::substitute(const Identities &identities) const { Expression new_mapping_eqn = mapping_eqn.substitute(identities); - + if (new_mapping_eqn != mapping_eqn) { PerturbationPtr new_pert(*this); - + new_pert.edit().mapping_eqn = new_mapping_eqn; return new_pert; } @@ -277,9 +279,9 @@ PerturbationPtr Perturbation::substitute(const Identities &identities) const /** Substitute the symbol 'old_symbol' with the symbol 'new_symbol' in all of the mapping functions used by this perturbation. This is - useful if, for example, you want to switch from using + useful if, for example, you want to switch from using 'lambda' to control the perturbation to using 'alpha', e.g. - + alpha_perturbations = lambda_perturbations.substitute(lam, alpha); */ PerturbationPtr Perturbation::substitute(const Symbol &old_symbol, @@ -288,7 +290,7 @@ PerturbationPtr Perturbation::substitute(const Symbol &old_symbol, return this->substitute( old_symbol == Expression(new_symbol) ); } -/** Return all of the child perturbations that make up +/** Return all of the child perturbations that make up this perturbation */ QList Perturbation::children() const { @@ -305,20 +307,20 @@ QSet Perturbation::requiredSymbols() const QSet syms = mapping_eqn.symbols(); syms.remove( symbols().initial() ); syms.remove( symbols().final() ); - + return syms; } /** Return the equation used to control the mapping from the the initial value (represented using symbols().initial()) to - the final value (represented using symbols().final()) as a + the final value (represented using symbols().final()) as a function of the reaction coordinate (which is normally represented using symbols().lambda()) */ const Expression& Perturbation::mappingFunction() const { return mapping_eqn; } - + /** Return the property map used to find the properties used, and affected by this perturbation */ const PropertyMap& Perturbation::propertyMap() const @@ -349,15 +351,15 @@ Q_GLOBAL_STATIC( SharedPolyPointer, perturbationPtr ); const NullPerturbation& Perturbation::null() { SharedPolyPointer *ptr = perturbationPtr(); - + if (ptr->constData() == 0) { QMutexLocker lkr( globalMutex() ); - + if (ptr->constData() == 0) *ptr = static_cast(new NullPerturbation()); } - + return ptr->constData()->asA(); } @@ -370,23 +372,23 @@ static const RegisterMetaType r_nullpert; QDataStream &operator<<(QDataStream &ds, const NullPerturbation &nullpert) { writeHeader(ds, r_nullpert, 1); - + ds << static_cast(nullpert); - + return ds; } QDataStream &operator>>(QDataStream &ds, NullPerturbation &nullpert) { VersionID v = readHeader(ds, r_nullpert); - + if (v == 1) { ds >> static_cast(nullpert); } else throw version_error(v, "1", r_nullpert, CODELOC); - + return ds; } @@ -430,7 +432,7 @@ QSet NullPerturbation::requiredProperties() const { return QSet(); } - + bool NullPerturbation::wouldChange(const Molecule&, const Values&) const { return false; @@ -450,11 +452,11 @@ QDataStream &operator<<(QDataStream &ds, const Perturbations &perts) { writeHeader(ds, r_perts, 1); - + SharedDataStream sds(ds); - + sds << perts.perts << static_cast(perts); - + return ds; } @@ -462,18 +464,18 @@ QDataStream &operator<<(QDataStream &ds, QDataStream &operator>>(QDataStream &ds, Perturbations &perts) { VersionID v = readHeader(ds, r_perts); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> perts.perts >> static_cast(perts); - + perts.makeSane(); } else throw version_error(v, "1", r_perts, CODELOC); - + return ds; } @@ -483,16 +485,16 @@ void Perturbations::makeSane() { QList norm_perts; QList geom_perts; - + QList kids = this->children(); - + for (QList::const_iterator it = kids.constBegin(); it != kids.constEnd(); ++it) { if ((*it)->isA()) continue; - + else if ((*it)->isA() and not (*it)->isA()) { @@ -503,9 +505,9 @@ void Perturbations::makeSane() norm_perts.append(*it); } } - + norm_perts.append( GeometryPerturbations(geom_perts) ); - + perts = norm_perts; } @@ -532,7 +534,7 @@ Perturbations::Perturbations(const QList &perturbations) /** Copy constructor */ Perturbations::Perturbations(const Perturbations &other) - : ConcreteProperty(other), + : ConcreteProperty(other), perts(other.perts) {} @@ -568,17 +570,17 @@ const char* Perturbations::typeName() QString Perturbations::toString() const { QStringList lines; - + if (perts.isEmpty()) return QObject::tr("Perturbations::null"); - + lines.append( QObject::tr("Perturbations:") ); - + foreach (PerturbationPtr pert, perts) { lines.append( QString(" %1").arg(pert->toString()) ); } - + return lines.join("\n"); } @@ -593,17 +595,17 @@ QList Perturbations::perturbations() const PerturbationPtr Perturbations::recreate(const Expression &mapping_function) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { new_perts.append( it->read().recreate(mapping_function) ); } - + Perturbations ret(*this); ret.perts = new_perts; - + return ret; } @@ -612,17 +614,17 @@ PerturbationPtr Perturbations::recreate(const Expression &mapping_function) cons PerturbationPtr Perturbations::recreate(const PropertyMap &map) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { new_perts.append( it->read().recreate(map) ); } - + Perturbations ret(*this); ret.perts = new_perts; - + return ret; } @@ -632,40 +634,40 @@ PerturbationPtr Perturbations::recreate(const Expression &mapping_function, const PropertyMap &map) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { new_perts.append( it->read().recreate(mapping_function,map) ); } - + Perturbations ret(*this); ret.perts = new_perts; - + return ret; } -/** Substitute the identities in 'identities' in all of the mapping functions - used by this perturbation. This is useful if, for example, you want to +/** Substitute the identities in 'identities' in all of the mapping functions + used by this perturbation. This is useful if, for example, you want to switch from using 'lambda' to control the perturbation to using 'alpha', e.g. - + alpha_perturbations = lambda_perturbations.substitute( lam == Expression(alpha) ); */ PerturbationPtr Perturbations::substitute(const Identities &identities) const { QList new_perts; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { new_perts.append( it->read().substitute(identities) ); } - + Perturbations ret(*this); ret.perts = new_perts; - + return ret; } @@ -680,14 +682,14 @@ PerturbationPtr Perturbations::substitute(const SireCAS::Symbol &old_symbol, QList Perturbations::children() const { QList kids; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { kids += it->read().children(); } - + return kids; } @@ -695,30 +697,30 @@ QList Perturbations::children() const QSet Perturbations::requiredSymbols() const { QSet syms; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { syms += it->read().requiredSymbols(); } - + return syms; } -/** Return all of the properties that are needed or affected by +/** Return all of the properties that are needed or affected by these perturbations */ QSet Perturbations::requiredProperties() const { QSet props; - + for (QList::const_iterator it = perts.constBegin(); it != perts.constEnd(); ++it) { props += it->read().requiredProperties(); } - + return props; } @@ -735,7 +737,7 @@ bool Perturbations::wouldChange(const Molecule &molecule, const Values &values) if (it->read().wouldChange(molecule,values)) return true; } - + return false; } catch(...) @@ -745,7 +747,7 @@ bool Perturbations::wouldChange(const Molecule &molecule, const Values &values) } } -/** Apply this perturbation to the passed molecule for the +/** Apply this perturbation to the passed molecule for the specified lambda value */ void Perturbations::perturbMolecule(MolEditor &molecule, const Values &values) const { diff --git a/corelib/src/libs/SireMol/resid.cpp b/corelib/src/libs/SireMol/resid.cpp index b0ed6e030..7db602698 100644 --- a/corelib/src/libs/SireMol/resid.cpp +++ b/corelib/src/libs/SireMol/resid.cpp @@ -75,6 +75,12 @@ ResID::ResID(const ResID &other) : ID(other) ResID::~ResID() {} +/** Return an ResID constructed from the passed string */ +ResIdentifier ResID::fromString(const QString &id) +{ + return ResName(id); +} + /** Return a specific object that matches this ID */ Specify ResID::operator[](qint64 i) const { @@ -383,7 +389,7 @@ QList ResID::map(const MoleculeView &molview, const PropertyMap&) const if (residxs.isEmpty()) throw SireMol::missing_residue( QObject::tr( - "No atoms matching %1 can be found in the passed molecule.") + "No residues matching %1 can be found in the passed molecule.") .arg(this->toString()), CODELOC ); return residxs; @@ -402,8 +408,8 @@ Residue ResID::selectFrom(const MoleculeView &molview, const PropertyMap &map) c if (residxs.count() > 1) throw SireMol::duplicate_residue( QObject::tr( - "More than one atom matches the ID %1 (atoms %2).") - .arg(this->toString()).arg(Sire::toString(residxs)), + "More than one residue matches the ID %1 (number of matches is %2).") + .arg(this->toString()).arg(residxs.count()), CODELOC ); return Residue(molview.data(), residxs.at(0)); diff --git a/corelib/src/libs/SireMol/resid.h b/corelib/src/libs/SireMol/resid.h index 9f1a94945..5323256b5 100644 --- a/corelib/src/libs/SireMol/resid.h +++ b/corelib/src/libs/SireMol/resid.h @@ -73,7 +73,7 @@ class MolNum; class ChainsWithRes; -/** This is the base class of all identifiers that are used +/** This is the base class of all identifiers that are used to identify a residue within a molecule @author Christopher Woods @@ -85,13 +85,13 @@ class SIREMOL_EXPORT ResID : public SireID::ID typedef ResIdx Index; typedef ResIdentifier Identifier; typedef MolInfo SearchObject; - + ResID(); ResID(const ResID &other); virtual ~ResID(); - + Specify operator[](qint64 i) const; Specify operator[](const SireBase::Range &range) const; Specify operator()(const SireBase::Range &range) const; @@ -138,7 +138,7 @@ class SIREMOL_EXPORT ResID : public SireID::ID IDOrSet operator|(const ChainID &other) const; SireID::InvertMatch operator!() const; - + SireID::InvertMatch invert() const; SireID::InvertMatch inverse() const; @@ -147,46 +147,48 @@ class SIREMOL_EXPORT ResID : public SireID::ID AtomsIn atoms() const; AtomsIn atom(int i) const; AtomsIn atoms(int i, int j) const; - + ChainsWithRes chains() const; - + static const char* typeName() { return "SireMol::ResID"; } - + virtual ResID* clone() const=0; - /** Map this ID back to the indicies of the residues in the molecule, + static ResIdentifier fromString(const QString &id); + + /** Map this ID back to the indicies of the residues in the molecule, using the passed MoleculeInfo to do the mapping */ virtual QList map(const MolInfo &molinfo) const=0; virtual QList map(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Residue selectFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Selector selectAllFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Residue selectFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; virtual Residue selectFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual Residue selectFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; - virtual QHash< MolNum,Selector > + virtual QHash< MolNum,Selector > selectAllFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; diff --git a/corelib/src/libs/SireMol/residue.cpp b/corelib/src/libs/SireMol/residue.cpp index 45abfce72..8036f98c5 100644 --- a/corelib/src/libs/SireMol/residue.cpp +++ b/corelib/src/libs/SireMol/residue.cpp @@ -58,13 +58,13 @@ using namespace SireStream; static const RegisterMetaType r_resprop(MAGIC_ONLY, "SireMol::ResProp"); - + /** Serialise to a binary datastream */ QDataStream &operator<<(QDataStream &ds, const ResProp &resprop) { writeHeader(ds, r_resprop, 1) << static_cast(resprop); - + return ds; } @@ -72,14 +72,14 @@ QDataStream &operator<<(QDataStream &ds, const ResProp &resprop) QDataStream &operator>>(QDataStream &ds, ResProp &resprop) { VersionID v = readHeader(ds, r_resprop); - + if (v == 1) { ds >> static_cast(resprop); } else throw version_error(v, "1", r_resprop, CODELOC); - + return ds; } @@ -104,7 +104,7 @@ QDataStream &operator<<(QDataStream &ds, const Residue &res) writeHeader(ds, r_res, 1); SharedDataStream sds(ds); - + sds << res.residx << static_cast(res); return ds; @@ -118,9 +118,9 @@ QDataStream &operator>>(QDataStream &ds, Residue &res) if (v == 1) { SharedDataStream sds(ds); - + sds >> res.residx >> static_cast(res); - + res.selected_atoms = AtomSelection(res.data()); res.selected_atoms.selectOnly(res.residx); } @@ -151,7 +151,7 @@ Residue::Residue(const MoleculeData &moldata, const ResID &resid) selected_atoms = AtomSelection(moldata); selected_atoms.selectOnly(residx); } - + /** Copy constructor */ Residue::Residue(const Residue &other) : ConcreteProperty(other), residx(other.residx), @@ -171,14 +171,14 @@ Residue& Residue::operator=(const Residue &other) residx = other.residx; selected_atoms = other.selected_atoms; } - + return *this; } /** Comparison operator */ bool Residue::operator==(const Residue &other) const { - return residx == other.residx and + return residx == other.residx and MoleculeView::operator==(other); } @@ -192,9 +192,16 @@ bool Residue::operator!=(const Residue &other) const /** Return a string representation of this residue */ QString Residue::toString() const { - return QObject::tr( "Residue( %1 : %2 )" ) - .arg( this->name() ) - .arg( this->number() ); + QString n = QString("%1:%2").arg(this->name()).arg(this->number()); + + return QObject::tr( "Residue( %1 num_atoms=%2 )" ) + .arg( n, -7 ) + .arg( this->nAtoms() ); +} + +MolViewPtr Residue::toSelector() const +{ + return MolViewPtr( Selector(*this) ); } /** Is this residue empty? */ @@ -237,7 +244,7 @@ void Residue::update(const MoleculeData &moldata) .arg(moldata.number()).arg(moldata.info().UID().toString()), CODELOC ); } - + d = moldata; } @@ -265,14 +272,14 @@ Mover Residue::move() const return Mover(*this); } -/** Return an Evaluator that evaluates values using all of +/** Return an Evaluator that evaluates values using all of the atoms in the residue */ Evaluator Residue::evaluate() const { return Evaluator(*this); } -/** Return an editor that can be used to edit any of the +/** Return an editor that can be used to edit any of the atoms of this residue */ ResEditor Residue::edit() const { @@ -298,21 +305,21 @@ const QList& Residue::atomIdxs() const return d->info().getAtomsIn(residx); } -/** Return whether or not this residue contains the atom +/** Return whether or not this residue contains the atom at index 'atomidx' */ bool Residue::contains(AtomIdx atomidx) const { return d->info().contains(residx, atomidx); } -/** Return whether or not this residue contains all of +/** Return whether or not this residue contains all of the atoms identified by the ID 'atomid' */ bool Residue::contains(const AtomID &atomid) const { return d->info().contains(residx, atomid); } -/** Return whether or not this residue contains some of +/** Return whether or not this residue contains some of the atoms identified by the ID 'atomid' */ bool Residue::intersects(const AtomID &atomid) const { @@ -325,6 +332,20 @@ bool Residue::isWithinChain() const return d->info().isWithinChain(residx); } +/** Return the specified property as a QVariant */ +QVariant Residue::propertyAsVariant(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsVariant(residx); +} + +/** Return the specified property as a PropertyPtr */ +PropertyPtr Residue::propertyAsProperty(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsProperty(residx); +} + /** Return whether or not there is a ResProperty at key 'key' */ bool Residue::hasProperty(const PropertyName &key) const { @@ -339,7 +360,7 @@ bool Residue::hasMetadata(const PropertyName &metakey) const /** Return whether the metadata at metakey 'metakey' for the property at key 'key' is a ResProperty - + \throw SireBase::missing_property */ bool Residue::hasMetadata(const PropertyName &key, @@ -389,7 +410,7 @@ void Residue::assertContainsMetadata(const PropertyName &key, "There is no residue metadata at metakey \"%1\" for the " "property at key \"%2\" for the " "residue %2 (%3) in the molecule \"%4\".") - .arg(metakey.toString(), key.toString(), + .arg(metakey.toString(), key.toString(), this->name()).arg(this->number()) .arg(d->name()), CODELOC ); } @@ -406,9 +427,9 @@ QStringList Residue::metadataKeys() const return d->properties().metadataKeysOfType(); } -/** Return the metakeys of all ResProperty metadata for +/** Return the metakeys of all ResProperty metadata for the property at key 'key' - + \throw SireBase::missing_property */ QStringList Residue::metadataKeys(const PropertyName &key) const @@ -421,23 +442,23 @@ const char* Residue::typeName() return QMetaType::typeName( qMetaTypeId() ); } -bool SireMol::detail::has_property(const Residue*, +bool SireMol::detail::has_property(const Residue*, const MoleculeData &moldata, const PropertyName &key) { return moldata.hasPropertyOfType(key); } -bool SireMol::detail::has_metadata(const Residue*, +bool SireMol::detail::has_metadata(const Residue*, const MoleculeData &moldata, const PropertyName &metakey) { return moldata.hasMetadataOfType(metakey); } -bool SireMol::detail::has_metadata(const Residue*, +bool SireMol::detail::has_metadata(const Residue*, const MoleculeData &moldata, - const PropertyName &key, + const PropertyName &key, const PropertyName &metakey) { return moldata.hasMetadataOfType(key, metakey); diff --git a/corelib/src/libs/SireMol/residue.h b/corelib/src/libs/SireMol/residue.h index 4432ff2ac..8cfbaaf57 100644 --- a/corelib/src/libs/SireMol/residue.h +++ b/corelib/src/libs/SireMol/residue.h @@ -81,7 +81,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Residue&); typedef ResNum Number; Residue(); - + Residue(const MoleculeData &moldata, const ResID &resid); Residue(const Residue &other); @@ -89,63 +89,68 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Residue&); ~Residue(); Residue& operator=(const Residue &other); - + bool operator==(const Residue &other) const; bool operator!=(const Residue &other) const; - + static const char* typeName(); - + Residue* clone() const; QString toString() const; - + bool isEmpty() const; bool selectedAll() const; AtomSelection selection() const; + MolViewPtr toSelector() const; + void update(const MoleculeData &moldata); ResName name() const; ResNum number() const; ResIdx index() const; - + bool hasProperty(const PropertyName &key) const; bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; - + + QVariant propertyAsVariant(const PropertyName &key) const; + SireBase::PropertyPtr propertyAsProperty(const PropertyName &key) const; + template const T& property(const PropertyName &key) const; - + template const T& metadata(const PropertyName &metakey) const; - + template const T& metadata(const PropertyName &key, const PropertyName &metakey) const; - + Mover move() const; Evaluator evaluate() const; ResEditor edit() const; Selector selector() const; - + int nAtoms() const; - + const QList& atomIdxs() const; - + bool contains(AtomIdx atomidx) const; bool contains(const AtomID &atomid) const; bool intersects(const AtomID &atomid) const; - + bool isWithinChain() const; void assertContainsProperty(const PropertyName &key) const; - + void assertContainsMetadata(const PropertyName &metakey) const; void assertContainsMetadata(const PropertyName &key, const PropertyName &metakey) const; @@ -156,7 +161,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Residue&); template void setMetadata(const QString &metakey, const T &value); - + template void setMetadata(const QString &key, const QString &metakey, const T &value); @@ -164,19 +169,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Residue&); private: /** The index of the residue in the molecule */ ResIdx residx; - + /** The atoms that are selected as part of this residue */ AtomSelection selected_atoms; }; #ifndef SIRE_SKIP_INLINE_FUNCTIONS -/** Return the property (of type T) at key 'key' that is +/** Return the property (of type T) at key 'key' that is specifically assigned to this residue. This will only work if the property at this key is a residue property (i.e. has one value for every residue) and that it can be cast to type T - + \throw SireMol::missing_property \throw SireError::invalid_cast */ @@ -205,13 +210,13 @@ const T& Residue::metadata(const PropertyName &metakey) const /** Return the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireMol::missing_property \throw SireError::invalid_cast */ template SIRE_OUTOFLINE_TEMPLATE -const T& Residue::metadata(const PropertyName &key, +const T& Residue::metadata(const PropertyName &key, const PropertyName &metakey) const { const Property &property = d->metadata(key, metakey); @@ -223,9 +228,9 @@ const T& Residue::metadata(const PropertyName &key, residue to be equal to 'value'. This works by creating a ResProperty for this molecule, and assigning the value for this residue to 'value'. If there is already - a property at key 'key', then it must be of type + a property at key 'key', then it must be of type ResProperty for this to work - + \throw SireMol::invalid_cast */ template @@ -236,9 +241,9 @@ void Residue::setProperty(const QString &key, const T &value) value); } -/** Set the metadata at metakey 'metakey' to the value 'value' +/** Set the metadata at metakey 'metakey' to the value 'value' for this residue - + \throw SireError::invalid_cast */ template @@ -251,7 +256,7 @@ void Residue::setMetadata(const QString &metakey, const T &value) /** Set the metadata at metakey 'metakey' for the property at key 'key' to the value 'value' - + \throw SireError::invalid_cast */ template @@ -266,6 +271,12 @@ void Residue::setMetadata(const QString &key, const QString &metakey, namespace detail { +template<> +SIRE_ALWAYS_INLINE int getCount(const MolInfo &molinfo) +{ + return molinfo.nResidues(); +} + template<> SIRE_ALWAYS_INLINE QList getAll(const MolInfo &molinfo) { @@ -281,7 +292,7 @@ SIRE_ALWAYS_INLINE QList getAll(const MolInfo &molinfo, } void assertSameSize(Residue*, int nres, int nprops); - + template SIRE_OUTOFLINE_TEMPLATE QList get_property(Residue*, const MoleculeData &moldata, @@ -340,7 +351,7 @@ void set_metadata(Residue *ptr, MoleculeData &moldata, const QList &values) { assertSameSize(ptr, idxs.count(), values.count()); - + set_metadata,Residue::Index,V>(moldata,idxs,key,metakey,values); } @@ -376,12 +387,12 @@ void set_metadata(Residue*, MoleculeData &moldata, SIREMOL_EXPORT bool has_property(const Residue*, const MoleculeData &moldata, const PropertyName &key); - + SIREMOL_EXPORT bool has_metadata(const Residue*, const MoleculeData &moldata, const PropertyName &metakey); - + SIREMOL_EXPORT bool has_metadata(const Residue*, const MoleculeData &moldata, - const PropertyName &key, const PropertyName &metakey); + const PropertyName &key, const PropertyName &metakey); } //end of namespace detail diff --git a/corelib/src/libs/SireMol/resproperty.hpp b/corelib/src/libs/SireMol/resproperty.hpp index 583fe429e..329ac3e45 100644 --- a/corelib/src/libs/SireMol/resproperty.hpp +++ b/corelib/src/libs/SireMol/resproperty.hpp @@ -32,6 +32,7 @@ #include #include "SireBase/qvariant_metatype.h" +#include "SireBase/convert_property.hpp" #include "moleculeinfodata.h" #include "molviewproperty.h" @@ -72,30 +73,33 @@ class SIREMOL_EXPORT ResProp : public MolViewProperty public: ResProp(); ResProp(const ResProp &other); - + virtual ~ResProp(); - + virtual bool canConvert(const QVariant &value) const=0; - + virtual void assignFrom(const ResProperty &values)=0; - + + virtual QVariant getAsVariant(const ResIdx &residx) const=0; + virtual SireBase::PropertyPtr getAsProperty(const ResIdx &residx) const=0; + virtual ResProperty toVariant() const=0; - + virtual void assertCanConvert(const QVariant &value) const=0; }; /** This is a property that can hold one value for each residue in the molecule. - + mol.setProperty( "charge", ResCharges( [....] ) ) mol.setProperty( "lj", ResLJs( [....] ) ) res.setProperty( "charge", 0.0 * mod_e ) - + @author Christopher Woods */ template -class SIREMOL_EXPORT ResProperty +class SIREMOL_EXPORT ResProperty : public SireBase::ConcreteProperty, ResProp> { @@ -106,19 +110,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, ResProperty&) ResProperty(); ResProperty(const MoleculeInfoData &molinfo); - + ResProperty(const QVector &values); - + ResProperty(const ResProperty &other); - + ~ResProperty(); - + ResProperty& operator=(const ResProperty &other); - + static const char* typeName(); - + ResProperty* clone() const; - + bool operator==(const ResProperty &other) const; bool operator!=(const ResProperty &other) const; @@ -126,6 +130,9 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, ResProperty&) const T& at(const ResIdx &residx) const; const T& get(const ResIdx &residx) const; + QVariant getAsVariant(const ResIdx &idx) const; + SireBase::PropertyPtr getAsProperty(const ResIdx &idx) const; + ResProperty& set(ResIdx residx, const T &value); const T* data() const; @@ -135,23 +142,23 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, ResProperty&) int size() const; int count() const; - + int nResidues() const; QString toString() const; - + const QVector& array() const; void assignFrom(const ResProperty &values); - + static ResProperty fromVariant(const ResProperty &values); - + ResProperty toVariant() const; - + bool isCompatibleWith(const MoleculeInfoData &molinfo) const; - + bool canConvert(const QVariant &value) const; - + void assertCanConvert(const QVariant &value) const; private: @@ -168,7 +175,7 @@ ResProperty::ResProperty() : SireBase::ConcreteProperty,ResProp>() {} -/** Construct space for the values of the property for all of the +/** Construct space for the values of the property for all of the residues in the molecule described by 'molinfo' */ template SIRE_OUTOFLINE_TEMPLATE @@ -194,7 +201,7 @@ ResProperty::ResProperty(const QVector &values) /** Assert that the variant can be converted to a value that can be held in this list of properties - + \throw SireError::invalid_cast */ template @@ -251,7 +258,7 @@ bool ResProperty::operator!=(const ResProperty &other) const return props != other.props; } -/** Return the property for the residue at index 'residx' +/** Return the property for the residue at index 'residx' \throw SireError::invalid_index */ @@ -261,7 +268,7 @@ const T& ResProperty::operator[](const ResIdx &residx) const { return props.constData()[residx.map(props.count())]; } - + template SIRE_OUTOFLINE_TEMPLATE const char* ResProperty::typeName() @@ -308,13 +315,13 @@ ResProperty ResProperty::fromVariant(const ResProperty &variant) { ResProperty array; array.assignFrom(variant); - + return array; } /** Assign the values of this property from the array of variants in 'values' - + \throw SireError::invalid_cast */ template @@ -326,19 +333,19 @@ void ResProperty::assignFrom(const ResProperty &variant) props.clear(); return; } - + int nvals = variant.count(); const QVariant *variant_array = variant.constData(); - + props = QVector(nvals); props.squeeze(); T *props_array = props.data(); - + for (int i=0; i::assertCanConvert(value); - + if (value.isNull()) props_array[i] = T(); else @@ -353,10 +360,10 @@ ResProperty ResProperty::toVariant() const { if (props.isEmpty()) return ResProperty(); - + int nvals = props.count(); const T *props_array = props.constData(); - + QVector converted_vals(nvals); converted_vals.squeeze(); QVariant *converted_vals_array = converted_vals.data(); @@ -365,11 +372,11 @@ ResProperty ResProperty::toVariant() const { converted_vals_array[i].setValue(props_array[i]); } - + return ResProperty(converted_vals); } -/** Return the property for the residue at index 'residx' +/** Return the property for the residue at index 'residx' \throw SireError::invalid_index */ @@ -380,7 +387,7 @@ const T& ResProperty::at(const ResIdx &residx) const return this->operator[](residx); } -/** Return the property for the residue at index 'residx' +/** Return the property for the residue at index 'residx' \throw SireError::invalid_index */ @@ -391,7 +398,35 @@ const T& ResProperty::get(const ResIdx &residx) const return this->operator[](residx); } -/** Set the value of the property for the residue at +/** Return the value for the passed index, as + a QVariant. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +QVariant ResProperty::getAsVariant(const ResIdx &residx) const +{ + const T &value = this->get(residx); + return QVariant::fromValue(value); +} + +/** Return the value for this index as a + Property. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +SireBase::PropertyPtr ResProperty::getAsProperty( + const ResIdx &residx) const +{ + return SireBase::convert_property(this->get(residx)); +} + +/** Set the value of the property for the residue at index 'residx' */ template SIRE_OUTOFLINE_TEMPLATE @@ -470,7 +505,7 @@ QDataStream& operator<<(QDataStream &ds, const SireMol::ResProperty &prop) //serialise the base class - this writes the header and version! ds << static_cast(prop); ds << prop.props; - + return ds; } @@ -481,7 +516,7 @@ QDataStream& operator>>(QDataStream &ds, SireMol::ResProperty &prop) { ds >> static_cast(prop); ds >> prop.props; - + return ds; } diff --git a/corelib/src/libs/SireMol/segid.cpp b/corelib/src/libs/SireMol/segid.cpp index d4220563d..db338ed0d 100644 --- a/corelib/src/libs/SireMol/segid.cpp +++ b/corelib/src/libs/SireMol/segid.cpp @@ -72,6 +72,12 @@ SegID::SegID(const SegID &other) : ID(other) SegID::~SegID() {} +/** Return an AtomID constructed from the passed string */ +SegIdentifier SegID::fromString(const QString &id) +{ + return SegName(id); +} + /** Return a specific object that matches this ID */ Specify SegID::operator[](qint64 i) const { diff --git a/corelib/src/libs/SireMol/segid.h b/corelib/src/libs/SireMol/segid.h index c4cddbc8f..d341454c0 100644 --- a/corelib/src/libs/SireMol/segid.h +++ b/corelib/src/libs/SireMol/segid.h @@ -69,7 +69,7 @@ class MoleculeGroup; class MolGroupsBase; class MolNum; -/** This is the base class of all identifiers that are used +/** This is the base class of all identifiers that are used to identify a Segment within a Molecule @author Christopher Woods @@ -132,7 +132,7 @@ class SIREMOL_EXPORT SegID : public SireID::ID SireID::InvertMatch operator!() const; SireID::InvertMatch invert() const; SireID::InvertMatch inverse() const; - + static SireID::MatchAll any(); AtomsIn atoms() const; @@ -146,36 +146,38 @@ class SIREMOL_EXPORT SegID : public SireID::ID virtual SegID* clone() const=0; - /** Map this ID back to the indicies of the segments in the molecule, + static SegIdentifier fromString(const QString &id); + + /** Map this ID back to the indicies of the segments in the molecule, using the passed MoleculeInfo to do the mapping */ virtual QList map(const MolInfo &molinfo) const=0; virtual QList map(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Segment selectFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Selector selectAllFrom(const MoleculeView &molview, const PropertyMap &map = PropertyMap()) const; - + virtual Segment selectFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; virtual Segment selectFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual QHash< MolNum,Selector > selectAllFrom(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + virtual Segment selectFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; - virtual QHash< MolNum,Selector > + virtual QHash< MolNum,Selector > selectAllFrom(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; diff --git a/corelib/src/libs/SireMol/segment.cpp b/corelib/src/libs/SireMol/segment.cpp index 994ecfefe..30111cf3d 100644 --- a/corelib/src/libs/SireMol/segment.cpp +++ b/corelib/src/libs/SireMol/segment.cpp @@ -54,13 +54,13 @@ using namespace SireStream; static const RegisterMetaType r_segprop(MAGIC_ONLY, "SireMol::SegProp"); - + /** Serialise to a binary datastream */ QDataStream &operator<<(QDataStream &ds, const SegProp &segprop) { writeHeader(ds, r_segprop, 1) << static_cast(segprop); - + return ds; } @@ -68,14 +68,14 @@ QDataStream &operator<<(QDataStream &ds, const SegProp &segprop) QDataStream &operator>>(QDataStream &ds, SegProp &segprop) { VersionID v = readHeader(ds, r_segprop); - + if (v == 1) { ds >> static_cast(segprop); } else throw version_error(v, "1", r_segprop, CODELOC); - + return ds; } @@ -100,7 +100,7 @@ QDataStream &operator<<(QDataStream &ds, const Segment &seg) writeHeader(ds, r_seg, 1); SharedDataStream sds(ds); - + sds << seg.segidx << static_cast(seg); return ds; @@ -114,9 +114,9 @@ QDataStream &operator>>(QDataStream &ds, Segment &seg) if (v == 1) { SharedDataStream sds(ds); - + sds >> seg.segidx >> static_cast(seg); - + seg.selected_atoms = AtomSelection(seg.data()); seg.selected_atoms.selectOnly(seg.segidx); } @@ -132,13 +132,13 @@ Segment::Segment() : ConcreteProperty(), segidx( SegIdx::n /** Construct the Segment at ID 'cgid' in the molecule whose data is in 'moldata' - + \throw SireMol::missing_Segment \throw SireMol::duplicate_Segment \throw SireError::invalid_index */ Segment::Segment(const MoleculeData &moldata, const SegID &segid) - : ConcreteProperty(moldata), + : ConcreteProperty(moldata), segidx( moldata.info().segIdx(segid) ) { selected_atoms = AtomSelection(moldata); @@ -167,7 +167,7 @@ Segment& Segment::operator=(const Segment &other) /** Comparison operator */ bool Segment::operator==(const Segment &other) const { - return segidx == other.segidx and + return segidx == other.segidx and MoleculeView::operator==(other); } @@ -181,8 +181,8 @@ bool Segment::operator!=(const Segment &other) const /** Return a string representation of this segment */ QString Segment::toString() const { - return QObject::tr( "Segment( %1 )" ) - .arg( this->name() ); + return QObject::tr( "Segment( %1 num_atoms=%2 )" ) + .arg( this->name() ).arg(this->nAtoms()); } /** Return whether or not this segment is empty */ @@ -197,6 +197,11 @@ bool Segment::selectedAll() const return selected_atoms.selectedAll(); } +MolViewPtr Segment::toSelector() const +{ + return MolViewPtr( Selector(*this) ); +} + /** Return the atoms that are in this Segment */ AtomSelection Segment::selection() const { @@ -224,7 +229,7 @@ void Segment::update(const MoleculeData &moldata) .arg(moldata.number()).arg(moldata.info().UID().toString()), CODELOC ); } - + d = moldata; } @@ -240,13 +245,19 @@ SegIdx Segment::index() const return segidx; } +/** Return the number of this segment (same as its index) */ +SegIdx Segment::number() const +{ + return segidx; +} + /** Return an object that can move a copy of this Segment */ Mover Segment::move() const { return Mover(*this); } -/** Return an evaluator that can evaluate properties +/** Return an evaluator that can evaluate properties of this Segment */ Evaluator Segment::evaluate() const { @@ -279,27 +290,41 @@ const QList& Segment::atomIdxs() const return d->info().getAtomsIn(segidx); } -/** Return whether or not this segment contains the atom +/** Return whether or not this segment contains the atom at index 'atomidx' */ bool Segment::contains(AtomIdx atomidx) const { return d->info().contains(segidx, atomidx); } -/** Return whether or not this segment contains all of +/** Return whether or not this segment contains all of the atoms identified by the ID 'atomid' */ bool Segment::contains(const AtomID &atomid) const { return d->info().contains(segidx, atomid); } -/** Return whether or not this segment contains some of +/** Return whether or not this segment contains some of the atoms identified by the ID 'atomid' */ bool Segment::intersects(const AtomID &atomid) const { return d->info().intersects(segidx, atomid); } +/** Return the specified property as a QVariant */ +QVariant Segment::propertyAsVariant(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsVariant(segidx); +} + +/** Return the specified property as a PropertyPtr */ +PropertyPtr Segment::propertyAsProperty(const PropertyName &key) const +{ + const Property &property = d->property(key); + return property.asA().getAsProperty(segidx); +} + /** Return whether or not there is a SegProperty at key 'key' */ bool Segment::hasProperty(const PropertyName &key) const { @@ -314,7 +339,7 @@ bool Segment::hasMetadata(const PropertyName &metakey) const /** Return whether the metadata at metakey 'metakey' for the property at key 'key' is a SegProperty - + \throw SireBase::missing_property */ bool Segment::hasMetadata(const PropertyName &key, @@ -335,9 +360,9 @@ QStringList Segment::metadataKeys() const return d->properties().metadataKeysOfType(); } -/** Return the metakeys of all SegProperty metadata for +/** Return the metakeys of all SegProperty metadata for the property at key 'key' - + \throw SireBase::missing_property */ QStringList Segment::metadataKeys(const PropertyName &key) const @@ -359,7 +384,7 @@ void Segment::assertContainsProperty(const PropertyName &key) const /** Assert that this segment has an SegProperty piece of metadata at metakey 'metakey' - + \throw SireBase::missing_property */ void Segment::assertContainsMetadata(const PropertyName &metakey) const @@ -373,7 +398,7 @@ void Segment::assertContainsMetadata(const PropertyName &metakey) const /** Assert that the property at key 'key' has an SegProperty piece of metadata at metakey 'metakey' - + \throw SireBase::missing_property */ void Segment::assertContainsMetadata(const PropertyName &key, diff --git a/corelib/src/libs/SireMol/segment.h b/corelib/src/libs/SireMol/segment.h index 5451f9189..aa9384682 100644 --- a/corelib/src/libs/SireMol/segment.h +++ b/corelib/src/libs/SireMol/segment.h @@ -33,9 +33,6 @@ #include "segproperty.hpp" #include "atomselection.h" -#include "mover.hpp" -#include "selector.hpp" - SIRE_BEGIN_HEADER namespace SireMol @@ -79,70 +76,77 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Segment&); typedef SegID ID; typedef SegIdx Index; typedef SegName Name; + typedef SegIdx Number; Segment(); - + Segment(const MoleculeData &data, const SegID &segid); - + Segment(const Segment &other); - + ~Segment(); - + Segment& operator=(const Segment &other); - + bool operator==(const Segment &other) const; bool operator!=(const Segment &other) const; static const char* typeName(); - + Segment* clone() const; QString toString() const; - + + MolViewPtr toSelector() const; + bool isEmpty() const; bool selectedAll() const; - + AtomSelection selection() const; - + void update(const MoleculeData &moldata); - + const SegName& name() const; SegIdx index() const; - + SegIdx number() const; + bool hasProperty(const PropertyName &key) const; bool hasMetadata(const PropertyName &metakey) const; bool hasMetadata(const PropertyName &key, const PropertyName &metakey) const; - + QStringList propertyKeys() const; QStringList metadataKeys() const; QStringList metadataKeys(const PropertyName &key) const; + QVariant propertyAsVariant(const PropertyName &key) const; + SireBase::PropertyPtr propertyAsProperty(const PropertyName &key) const; + template const T& property(const PropertyName &key) const; template const T& metadata(const PropertyName &metakey) const; - + template const T& metadata(const PropertyName &key, const PropertyName &metakey) const; - + Mover move() const; Evaluator evaluate() const; SegEditor edit() const; Selector selector() const; - + int nAtoms() const; - + const QList& atomIdxs() const; - + bool contains(AtomIdx atomidx) const; bool contains(const AtomID &atomid) const; bool intersects(const AtomID &atomid) const; void assertContainsProperty(const PropertyName &key) const; - + void assertContainsMetadata(const PropertyName &metakey) const; void assertContainsMetadata(const PropertyName &key, const PropertyName &metakey) const; @@ -150,10 +154,10 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Segment&); protected: template void setProperty(const QString &key, const T &value); - + template void setMetadata(const QString &metakey, const T &value); - + template void setMetadata(const QString &key, const QString &metakey, const T &value); @@ -161,19 +165,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Segment&); private: /** The index of the segment in the molecule */ SegIdx segidx; - + /** The atoms that are part of this segment */ AtomSelection selected_atoms; }; #ifndef SIRE_SKIP_INLINE_FUNCTIONS -/** Return the property (of type T) at key 'key' that is +/** Return the property (of type T) at key 'key' that is specifically assigned to this segment. This will only work if the property at this key is a segment property (i.e. has one value for every segment) and that it can be cast to type T - + \throw SireMol::missing_property \throw SireError::invalid_cast */ @@ -202,13 +206,13 @@ const T& Segment::metadata(const PropertyName &metakey) const /** Return the metadata at metakey 'metakey' for the property at key 'key' - + \throw SireMol::missing_property \throw SireError::invalid_cast */ template SIRE_OUTOFLINE_TEMPLATE -const T& Segment::metadata(const PropertyName &key, +const T& Segment::metadata(const PropertyName &key, const PropertyName &metakey) const { const Property &property = d->metadata(key, metakey); @@ -220,9 +224,9 @@ const T& Segment::metadata(const PropertyName &key, segment to be equal to 'value'. This works by creating a SrgProperty for this molecule, and assigning the value for this segment to 'value'. If there is already - a property at key 'key', then it must be of type + a property at key 'key', then it must be of type SegProperty for this to work - + \throw SireMol::invalid_cast */ template @@ -233,9 +237,9 @@ void Segment::setProperty(const QString &key, const T &value) value); } -/** Set the metadata at metakey 'metakey' to the value 'value' +/** Set the metadata at metakey 'metakey' to the value 'value' for this residue - + \throw SireError::invalid_cast */ template @@ -248,7 +252,7 @@ void Segment::setMetadata(const QString &metakey, const T &value) /** Set the metadata at metakey 'metakey' for the property at key 'key' to the value 'value' - + \throw SireError::invalid_cast */ template @@ -256,7 +260,7 @@ SIRE_OUTOFLINE_TEMPLATE void Segment::setMetadata(const QString &key, const QString &metakey, const T &value) { - MoleculeView::setMetadata,T>(*d, key, metakey, this->index(), + MoleculeView::setMetadata,T>(*d, key, metakey, this->index(), value); } @@ -265,6 +269,12 @@ namespace detail void assertSameSize(Segment*, int nres, int nprops); +template<> +SIRE_ALWAYS_INLINE int getCount(const MolInfo &molinfo) +{ + return molinfo.nSegments(); +} + template<> SIRE_ALWAYS_INLINE QList getAll(const MolInfo &molinfo) { @@ -337,7 +347,7 @@ void set_metadata(Segment *ptr, MoleculeData &moldata, const QList &values) { assertSameSize(ptr, idxs.count(), values.count()); - + set_metadata,Segment::Index,V>(moldata,idxs,key,metakey,values); } @@ -373,12 +383,12 @@ void set_metadata(Segment*, MoleculeData &moldata, SIREMOL_EXPORT bool has_property(const Segment*, const MoleculeData &moldata, const PropertyName &key); - + SIREMOL_EXPORT bool has_metadata(const Segment*, const MoleculeData &moldata, const PropertyName &metakey); - + SIREMOL_EXPORT bool has_metadata(const Segment*, const MoleculeData &moldata, - const PropertyName &key, const PropertyName &metakey); + const PropertyName &key, const PropertyName &metakey); } //end of namespace detail diff --git a/corelib/src/libs/SireMol/segproperty.hpp b/corelib/src/libs/SireMol/segproperty.hpp index 4506305e9..94b746dc9 100644 --- a/corelib/src/libs/SireMol/segproperty.hpp +++ b/corelib/src/libs/SireMol/segproperty.hpp @@ -32,6 +32,7 @@ #include #include "SireBase/qvariant_metatype.h" +#include "SireBase/convert_property.hpp" #include "moleculeinfodata.h" #include "molviewproperty.h" @@ -72,30 +73,33 @@ class SIREMOL_EXPORT SegProp : public MolViewProperty public: SegProp(); SegProp(const SegProp &other); - + virtual ~SegProp(); - + virtual bool canConvert(const QVariant &value) const=0; - + virtual void assignFrom(const SegProperty &values)=0; - + + virtual QVariant getAsVariant(const SegIdx &segidx) const=0; + virtual SireBase::PropertyPtr getAsProperty(const SegIdx &segidx) const=0; + virtual SegProperty toVariant() const=0; - + virtual void assertCanConvert(const QVariant &value) const=0; }; /** This is a property that can hold one value for each segment in the molecule. - + mol.setProperty( "charge", SegCharges( [....] ) ) mol.setProperty( "lj", SegLJs( [....] ) ) seg.setProperty( "charge", 0.0 * mod_e ) - + @author Christopher Woods */ template -class SIREMOL_EXPORT SegProperty +class SIREMOL_EXPORT SegProperty : public SireBase::ConcreteProperty, SegProp> { @@ -106,19 +110,19 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, SegProperty&) SegProperty(); SegProperty(const MoleculeInfoData &molinfo); - + SegProperty(const QVector &values); - + SegProperty(const SegProperty &other); - + ~SegProperty(); - + SegProperty& operator=(const SegProperty &other); - + static const char* typeName(); - + SegProperty* clone() const; - + bool operator==(const SegProperty &other) const; bool operator!=(const SegProperty &other) const; @@ -126,6 +130,9 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, SegProperty&) const T& at(const SegIdx &segidx) const; const T& get(const SegIdx &segidx) const; + QVariant getAsVariant(const SegIdx &idx) const; + SireBase::PropertyPtr getAsProperty(const SegIdx &idx) const; + SegProperty& set(SegIdx segidx, const T &value); const T* data() const; @@ -135,23 +142,23 @@ friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, SegProperty&) int size() const; int count() const; - + int nSegments() const; QString toString() const; - + const QVector& array() const; void assignFrom(const SegProperty &values); - + static SegProperty fromVariant(const SegProperty &values); - + SegProperty toVariant() const; - + bool isCompatibleWith(const MoleculeInfoData &molinfo) const; - + bool canConvert(const QVariant &value) const; - + void assertCanConvert(const QVariant &value) const; private: @@ -168,7 +175,7 @@ SegProperty::SegProperty() : SireBase::ConcreteProperty,SegProp>() {} -/** Construct space for the values of the property for all of the +/** Construct space for the values of the property for all of the segments in the molecule described by 'molinfo' */ template SIRE_OUTOFLINE_TEMPLATE @@ -194,7 +201,7 @@ SegProperty::SegProperty(const QVector &values) /** Assert that the variant can be converted to a value that can be held in this list of properties - + \throw SireError::invalid_cast */ template @@ -251,7 +258,7 @@ bool SegProperty::operator!=(const SegProperty &other) const return props != other.props; } -/** Return the property for the segment at index 'segidx' +/** Return the property for the segment at index 'segidx' \throw SireError::invalid_index */ @@ -261,7 +268,7 @@ const T& SegProperty::operator[](const SegIdx &segidx) const { return props.constData()[segidx.map(props.count())]; } - + template SIRE_OUTOFLINE_TEMPLATE const char* SegProperty::typeName() @@ -308,13 +315,13 @@ SegProperty SegProperty::fromVariant(const SegProperty &variant) { SegProperty array; array.assignFrom(variant); - + return array; } /** Assign the values of this property from the array of variants in 'values' - + \throw SireError::invalid_cast */ template @@ -326,19 +333,19 @@ void SegProperty::assignFrom(const SegProperty &variant) props.clear(); return; } - + int nvals = variant.count(); const QVariant *variant_array = variant.constData(); - + props = QVector(nvals); props.squeeze(); T *props_array = props.data(); - + for (int i=0; i::assertCanConvert(value); - + if (value.isNull()) props_array[i] = T(); else @@ -353,10 +360,10 @@ SegProperty SegProperty::toVariant() const { if (props.isEmpty()) return SegProperty(); - + int nvals = props.count(); const T *props_array = props.constData(); - + QVector converted_vals(nvals); converted_vals.squeeze(); QVariant *converted_vals_array = converted_vals.data(); @@ -365,11 +372,11 @@ SegProperty SegProperty::toVariant() const { converted_vals_array[i].setValue(props_array[i]); } - + return SegProperty(converted_vals); } -/** Return the property for the segment at index 'segidx' +/** Return the property for the segment at index 'segidx' \throw SireError::invalid_index */ @@ -380,7 +387,7 @@ const T& SegProperty::at(const SegIdx &segidx) const return this->operator[](segidx); } -/** Return the property for the segment at index 'segidx' +/** Return the property for the segment at index 'segidx' \throw SireError::invalid_index */ @@ -391,7 +398,35 @@ const T& SegProperty::get(const SegIdx &segidx) const return this->operator[](segidx); } -/** Set the value of the property for the segment at +/** Return the value for the passed index, as + a QVariant. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +QVariant SegProperty::getAsVariant(const SegIdx &segidx) const +{ + const T &value = this->get(segidx); + return QVariant::fromValue(value); +} + +/** Return the value for this index as a + Property. This lets you get the value without knowing the + actual type of this property + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +SireBase::PropertyPtr SegProperty::getAsProperty( + const SegIdx &segidx) const +{ + return SireBase::convert_property(this->get(segidx)); +} + +/** Set the value of the property for the segment at index 'segidx' */ template SIRE_OUTOFLINE_TEMPLATE @@ -470,7 +505,7 @@ QDataStream& operator<<(QDataStream &ds, const SireMol::SegProperty &prop) //serialise the base class - this writes the header and version! ds << static_cast(prop); ds << prop.props; - + return ds; } @@ -481,7 +516,7 @@ QDataStream& operator>>(QDataStream &ds, SireMol::SegProperty &prop) { ds >> static_cast(prop); ds >> prop.props; - + return ds; } diff --git a/corelib/src/libs/SireMol/select.cpp b/corelib/src/libs/SireMol/select.cpp index 9dc3ea322..8b6aee910 100644 --- a/corelib/src/libs/SireMol/select.cpp +++ b/corelib/src/libs/SireMol/select.cpp @@ -31,6 +31,8 @@ #include "SireMol/molecules.h" #include "SireMol/moleculegroup.h" +#include "SireMol/core.h" + #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -38,6 +40,17 @@ using namespace SireBase; using namespace SireStream; using namespace SireMol; +//////// +//////// implementation of parse_error +//////// + +const char* parse_error::typeName() +{ + return QMetaType::typeName( qMetaTypeId() ); +} + +static const RegisterMetaType r_parse; + /////////// /////////// Implementation of SelectEngine /////////// @@ -56,15 +69,52 @@ SireMol::parser::SelectEnginePtr SireMol::parser::SelectEngine::self() return selfptr.lock(); } +/** Return if any of the parts in 'molecule' match this engine */ +bool SireMol::parser::SelectEngine::matches(const MoleculeView &molecule, + const PropertyMap &map) const +{ + auto r = this->operator()(molecule, map); + + return not r.isEmpty(); +} + +/** Return if all of the parts in 'molecule' match this engine */ +bool SireMol::parser::SelectEngine::matchesAll(const MoleculeView &molecule, + const PropertyMap &map) const +{ + auto r = this->operator()(molecule, map); + + if (r.isEmpty()) + return false; + + if (molecule.nAtoms() > 1) + { + return r.contains(molecule); + } + else + { + return true; + } +} + SelectResult SireMol::parser::SelectEngine::operator()(const SelectResult &result, const PropertyMap &map) const { - SelectResult r = this->select(result, map); - if (hasParent()) - return r; + { + return this->select(result, map); + } else + { + // need to pass in the context so that, e.g. a MolIdx search can + // know which molecule was referred to + PropertyMap m(map); + m.set("_context", result); + + auto r = this->select(result, m); + return this->expand(r); + } } SelectResult SireMol::parser::SelectEngine::operator()(const MolGroupsBase &molgroups, @@ -97,6 +147,11 @@ void SireMol::parser::SelectEngine::setParent(SireMol::parser::SelectEnginePtr p const_cast(this)->parent = ptr; } +QString SireMol::parser::SelectEngine::toString() const +{ + return QObject::tr("%1").arg(typeid(*this).name()); +} + /** Internal function used to make a shared pointer out of the passed pointer */ SireMol::parser::SelectEnginePtr SireMol::parser::SelectEngine::makePtr(SelectEngine *ptr) { @@ -124,22 +179,22 @@ bool SireMol::parser::SelectEngine::hasParent() const } /** Expand the passed molecule based on the selection type of this SelectEngine */ -ViewsOfMol SireMol::parser::SelectEngine::expandMol(const ViewsOfMol &mol) const +MolViewPtr SireMol::parser::SelectEngine::expandMol(const MoleculeView &mol) const { switch(this->objectType()) { case SelectEngine::ATOM: - return ViewsOfMol( mol.atoms() ); + return mol.atoms(); case SelectEngine::CUTGROUP: - return ViewsOfMol( mol.cutGroups() ); + return mol.cutGroups(); case SelectEngine::RESIDUE: - return ViewsOfMol( mol.residues() ); + return mol.residues(); case SelectEngine::CHAIN: - return ViewsOfMol( mol.chains() ); + return mol.chains(); case SelectEngine::SEGMENT: - return ViewsOfMol( mol.segments() ); + return mol.segments(); case SelectEngine::MOLECULE: - return ViewsOfMol( mol.molecule() ); + return mol.molecule(); default: return mol; } @@ -150,58 +205,59 @@ SelectResult SireMol::parser::SelectEngine::expand(const SelectResult &results) { const auto objtyp = this->objectType(); - if (objtyp == SelectEngine::COMPLEX) + if (objtyp == SelectEngine::COMPLEX | objtyp == SelectEngine::BOND) { - //we don't need to do anything + //we don't need to do anything (or can't do anything for bonds!) return results; } - QList expanded; + QList expanded; if (objtyp == SelectEngine::ATOM) { for (auto result : results) { - expanded.append( ViewsOfMol(result.atoms()) ); + expanded.append( result->atoms() ); } } else if (objtyp == SelectEngine::CUTGROUP) { for (auto result : results) { - expanded.append( ViewsOfMol(result.cutGroups()) ); + expanded.append( result->cutGroups() ); } } else if (objtyp == SelectEngine::RESIDUE) { for (auto result : results) { - expanded.append( ViewsOfMol(result.residues()) ); + expanded.append( result->residues() ); } } else if (objtyp == SelectEngine::CHAIN) { for (auto result : results) { - expanded.append( ViewsOfMol(result.chains()) ); + expanded.append( result->chains() ); } } else if (objtyp == SelectEngine::SEGMENT) { for (auto result : results) { - expanded.append( ViewsOfMol(result.segments()) ); + expanded.append( result->segments() ); } } else if (objtyp == SelectEngine::MOLECULE) { for (auto result : results) { - expanded.append( ViewsOfMol(result.molecule()) ); + expanded.append( result->molecule() ); } } else { + qDebug() << "UNRECOGNISED TYPE" << objtyp; return results; } @@ -374,6 +430,8 @@ QString Select::objectType() const return QObject::tr("complex view"); case SireMol::parser::SelectEngine::ATOM: return QObject::tr("atoms"); + case SireMol::parser::SelectEngine::BOND: + return QObject::tr("bonds"); case SireMol::parser::SelectEngine::CUTGROUP: return QObject::tr("cutgroups"); case SireMol::parser::SelectEngine::RESIDUE: @@ -385,6 +443,8 @@ QString Select::objectType() const case SireMol::parser::SelectEngine::MOLECULE: return QObject::tr("molecules"); } + + return QObject::tr("nothing"); } QString Select::toString() const @@ -449,6 +509,72 @@ SelectResult::SelectResult(const Molecules &molecules) } } +SelectResult::SelectResult(const QList &views) + : ConcreteProperty() +{ + molviews.reserve(views.count()); + + for (const auto &view : views) + { + molviews.append(view); + } +} + +SelectResult::SelectResult(const QList< Selector > &views) + : ConcreteProperty() +{ + molviews.reserve(views.count()); + + for (const auto &view : views) + { + molviews.append(view); + } +} + +SelectResult::SelectResult(const QList< Selector > &views) + : ConcreteProperty() +{ + molviews.reserve(views.count()); + + for (const auto &view : views) + { + molviews.append(view); + } +} + +SelectResult::SelectResult(const QList< Selector > &views) + : ConcreteProperty() +{ + molviews.reserve(views.count()); + + for (const auto &view : views) + { + molviews.append(view); + } +} + +SelectResult::SelectResult(const QList< Selector > &views) + : ConcreteProperty() +{ + molviews.reserve(views.count()); + + for (const auto &view : views) + { + molviews.append(view); + } +} + +SelectResult::SelectResult(const QList< Selector > &views) + : ConcreteProperty() +{ + molviews.reserve(views.count()); + + for (const auto &view : views) + { + molviews.append(view); + } +} + /** Construct from the passed molecules */ SelectResult::SelectResult(const MolGroupsBase &molgroups) : ConcreteProperty() @@ -475,44 +601,41 @@ SelectResult::SelectResult(const MoleculeView &molview) { if (not molview.isEmpty()) { - if (molview.isA()) - molviews.append( molview.asA() ); - else - molviews.append( ViewsOfMol(molview) ); + molviews.append(molview); } } /** Construct from the passed molecules */ -SelectResult::SelectResult(const QList views) +SelectResult::SelectResult(const QList &views) : ConcreteProperty() { - molviews = views; - - bool remove_empty = false; + molviews.reserve(views.count()); for (const auto &view : views) { - if (view.isEmpty()) + if (not view.isEmpty()) { - remove_empty = true; - break; + molviews.append(view); } } +} - if (remove_empty) - { - QMutableListIterator it(molviews); +/** Construct from the passed molecules */ +SelectResult::SelectResult(const QList &views) + : ConcreteProperty() +{ + molviews.reserve(views.count()); - while (it.hasNext()) + for (const auto &view : views) + { + if (not (view.isNull() or view->isEmpty())) { - const auto &view = it.next(); - - if (view.isEmpty()) - it.remove(); + molviews.append(view); } } } + /** Copy constructor */ SelectResult::SelectResult(const SelectResult &other) : ConcreteProperty(other), @@ -571,7 +694,7 @@ int SelectResult::count() const for (const auto &view : molviews) { - total += view.nViews(); + total += view->nViews(); } return total; @@ -589,30 +712,90 @@ bool SelectResult::contains(MolNum molnum) const { for (const auto &molview : molviews) { - if (molview.data().number() == molnum) + if (molview->data().number() == molnum) return true; } return false; } +/** Return whether or not this set contains all of the atoms in the + passed molecule */ +bool SelectResult::contains(const MoleculeView &mol) const +{ + AtomSelection s; + + QList selections; + + for (const auto &molview : molviews) + { + if (molview->data().number() == mol.data().number()) + { + if (s.isNull()) + { + s = mol.selection(); + } + + auto selection = molview->selection(); + + if (selection.contains(s)) + { + return true; + } + + // maybe we will see another view of this molecule? + selections.append(selection); + } + } + + if (selections.count() < 2) + // nope + return false; + + auto selection = selections.takeFirst(); + selection.unite(selections); + + return selection.contains(s); +} + /** Return all of the views in this result, grouped by molecule */ QList SelectResult::views() const { - return molviews; + QList v; + + for (const auto &view : molviews) + { + v.append(ViewsOfMol(*view)); + } + + return v; } /** Return all of the views of the molecule with number 'molnum'. This returns an empty set of views if the molecule is not in this set */ ViewsOfMol SelectResult::views(MolNum molnum) const { + ViewsOfMol v; + for (const auto &molview : molviews) { - if (molview.data().number() == molnum) - return molview; + if (molview->data().number() == molnum) + { + for (int i=0; inViews(); ++i) + { + if (v.isEmpty()) + { + v = molview->at(i); + } + else + { + v += ViewsOfMol(molview->at(i)); + } + } + } } - return ViewsOfMol(); + return v; } /** Return the numbers of all molecules whose views are in this set, @@ -623,71 +806,43 @@ QList SelectResult::molNums() const for (const auto &molview : molviews) { - molnums.append(molview.data().number()); + molnums.append(molview->data().number()); } return molnums; } +/** Return the ith MolViewPtr in the underlying list */ +MolViewPtr SelectResult::listAt(int i) const +{ + i = Index(i).map(molviews.count()); + return MolViewPtr(molviews.at(i)->clone()); +} + +/** Return the number of items in the list */ +int SelectResult::listCount() const +{ + return molviews.count(); +} + /** Return the ith view in the result. This is automatically converted to the right molecule view type */ MolViewPtr SelectResult::operator[](int i) const { i = Index(i).map( this->count() ); - int nmol = 0; - for (const auto &view : molviews) { - nmol += 1; - - if (i >= view.nViews()) + if (i >= view->nViews()) { - i -= view.nViews(); + i -= view->nViews(); } else { - auto mol = view.valueAt(i); - - if (mol.selectedAll()) - { - return MolViewPtr( mol.molecule() ); - } - else if (mol.nAtoms() == 1) - { - return mol.atom(); - } - else if (mol.nResidues() == 1) - { - const auto res = mol.residue(); - - if (mol.selection().selectedAll(res.number())) - return MolViewPtr(res); - } - else if (mol.nChains() == 1) - { - const auto chain = mol.chain(); - - if (mol.selection().selectedAll(chain.name())) - return MolViewPtr(chain); - } - else if (mol.nSegments() == 1) - { - const auto seg = mol.segment(); - - if (mol.selection().selectedAll(seg.name())) - return MolViewPtr(seg); - } - else if (mol.nCutGroups() == 1) - { - const auto cg = mol.cutGroup(); - - if (mol.selection().selectedAll(cg.name())) - return MolViewPtr(cg); - } - - //this is a mixed view - return MolViewPtr(mol); + if (view->nViews() == 1) + return view; + else + return view->at(i); } } @@ -704,42 +859,45 @@ MolViewPtr SelectResult::operator[](MolNum molnum) const return this->views(molnum); } +/** Return the results as a list of MolViewPtrs */ +QList SelectResult::toList() const +{ + return molviews; +} + QString SelectResult::toString() const { QStringList lines; - const int nviews = this->count(); + const int nviews = this->listCount(); if (nviews == 0) return QObject::tr("SelectResult::empty"); - else if (nviews <= 5) + else if (nviews <= 10) { for (int i=0; ioperator[](i).read().toString()) ); + lines.append( QString("%1 : %2").arg(i).arg(this->listAt(i).read().toString()) ); } } else { - for (int i=0; i<3; ++i) + for (int i=0; i<5; ++i) { - lines.append( QString("%1 : %2").arg(i).arg(this->operator[](i).read().toString()) ); + lines.append( QString("%1 : %2").arg(i).arg(this->listAt(i).read().toString()) ); } lines.append( "..." ); - for (int i=-2; i<0; ++i) + for (int i=nviews-5; ioperator[](idx).read().toString()) ); + lines.append( QString("%1 : %2").arg(i).arg(this->listAt(i).read().toString()) ); } } - return QObject::tr("SelectResult{ count() == %1,\n %2\n}") - .arg(nviews).arg(lines.join(",\n ")); + return QObject::tr("SelectResult( size=%1,\n%2\n)") + .arg(nviews).arg(lines.join("\n")); } /** Return a object that can be used to move all of the views in this result */ @@ -775,43 +933,99 @@ SelectResult SelectResult::search(const QString &search_term) const /** Return a copy of this result with all views joined into single views */ SelectResult SelectResult::join() const { - return Select("join all")(*this); + QList result; + result.reserve(molviews.count()); + + for (const auto &mol : molviews) + { + result.append( PartialMolecule(*mol).toUnit() ); + } + + return SelectResult(result); } /** Return a copy of this result with all views split into individual atoms */ SelectResult SelectResult::atoms() const { - return Select("atoms with *")(*this); + QList result; + result.reserve(molviews.count()); + + for (const auto &mol : molviews) + { + result.append(mol->atoms()); + } + + return SelectResult(result); } /** Return a copy of this result with all views split into individual cutgroups */ SelectResult SelectResult::cutGroups() const { - return Select("cutgroups with *")(*this); + QList result; + result.reserve(molviews.count()); + + for (const auto &mol : molviews) + { + result.append(mol->cutGroups()); + } + + return SelectResult(result); } /** Return a copy of this result with all views split into individual residues */ SelectResult SelectResult::residues() const { - return Select("residues with *")(*this); + QList result; + result.reserve(molviews.count()); + + for (const auto &mol : molviews) + { + result.append(mol->residues()); + } + + return SelectResult(result); } /** Return a copy of this result with all views split into individual chains */ SelectResult SelectResult::chains() const { - return Select("chains with *")(*this); + QList result; + result.reserve(molviews.count()); + + for (const auto &mol : molviews) + { + result.append(mol->chains()); + } + + return SelectResult(result); } /** Return a copy of this result with all views split into individual segments */ SelectResult SelectResult::segments() const { - return Select("segments with *")(*this); + QList result; + result.reserve(molviews.count()); + + for (const auto &mol : molviews) + { + result.append(mol->segments()); + } + + return SelectResult(result); } /** Return a copy of this result with all views split into individual molecules */ SelectResult SelectResult::molecules() const { - return Select("molecules with *")(*this); + QList result; + result.reserve(molviews.count()); + + for (const auto &mol : molviews) + { + result.append(mol->molecule()); + } + + return SelectResult(result); } SelectResult::const_iterator SelectResult::begin() const @@ -834,6 +1048,133 @@ SelectResult::const_iterator SelectResult::constEnd() const return end(); } +/** Return the highest common type (e.g. SireMol::Atom, SireMol::Residue etc) + * that suits all of the views in this result + */ +QString SelectResult::getCommonType() const +{ + if (molviews.isEmpty()) + return QString(); + + // we need to start from the largest type and work downwards + // (as some atoms may be whole residues) + + QList selections; + + for (const auto &molview : molviews) + { + const auto typ = molview->what(); + + if (typ == Molecule::typeName() or + typ == Atom::typeName() or + typ == Residue::typeName() or + typ == Chain::typeName() or + typ == Segment::typeName() or + typ == CutGroup::typeName()) + { + selections.append(molview->selection()); + } + else + { + //this is a composite container + for (int i=0; inViews(); ++i) + { + selections.append(molview->at(i)->selection()); + } + } + } + + bool is_molecule = true; + + for (const auto &s : selections) + { + if (not s.isMolecule()) + { + is_molecule = false; + break; + } + } + + if (is_molecule) + return Molecule::typeName(); + + bool is_segment = true; + + for (const auto &s : selections) + { + if (not s.isSegment()) + { + is_segment = false; + break; + } + } + + if (is_segment) + return Segment::typeName(); + + bool is_chain = true; + + for (const auto &s : selections) + { + if (not s.isChain()) + { + is_chain = false; + break; + } + } + + if (is_chain) + return Chain::typeName(); + + bool is_residue = true; + + for (const auto &s : selections) + { + if (not s.isResidue()) + { + is_residue = false; + break; + } + } + + if (is_residue) + return Residue::typeName(); + + bool is_atom = true; + + for (const auto &s : selections) + { + if (not s.isAtom()) + { + is_atom = false; + break; + } + } + + if (is_atom) + return Atom::typeName(); + + bool is_cutgroup = true; + + for (const auto &s : selections) + { + if (not s.isCutGroup()) + { + is_cutgroup = false; + break; + } + } + + if (is_cutgroup) + return CutGroup::typeName(); + + if (is_cutgroup) + return CutGroup::typeName(); + + // ok, go with the default + return PartialMolecule::typeName(); +} + /////////// /////////// Implementation of SelectResult /////////// diff --git a/corelib/src/libs/SireMol/select.h b/corelib/src/libs/SireMol/select.h index b2add0dcd..0bda29232 100644 --- a/corelib/src/libs/SireMol/select.h +++ b/corelib/src/libs/SireMol/select.h @@ -45,6 +45,8 @@ #include "SireMol/moleculegroup.h" #include "SireMol/moleculegroups.h" +#include "SireMol/errors.h" + #include #include @@ -73,6 +75,39 @@ class Molecules; class MoleculeView; class ViewsOfMol; +/** This exception is thrown when there was an error parsing a selection + + @author Christopher Woods +*/ +class SIREMOL_EXPORT parse_error : public siremol_error +{ +public: + parse_error() : siremol_error() + {} + + parse_error(QString err, QString place = QString()) + : siremol_error(err,place) + {} + + parse_error(const parse_error &other) : siremol_error(other) + {} + + ~parse_error() throw() + {} + + static const char* typeName(); + + const char* what() const throw() + { + return parse_error::typeName(); + } + + void throwSelf() const + { + throw parse_error(*this); + } +}; + namespace parser { @@ -86,7 +121,7 @@ using SelectEngineWeakPtr = boost::weak_ptr; @author Christopher Woods */ -class SelectEngine +class SIREMOL_EXPORT SelectEngine { public: @@ -96,59 +131,69 @@ class SelectEngine RESIDUE = 3, CHAIN = 4, SEGMENT = 5, - MOLECULE = 6 }; + MOLECULE = 6, + BOND = 7 }; virtual ~SelectEngine(); - + + virtual bool matches(const MoleculeView &molecule, + const PropertyMap &map) const; + + virtual bool matchesAll(const MoleculeView &molecule, + const PropertyMap &map) const; + SelectResult operator()(const SelectResult &result, const PropertyMap &map = PropertyMap()) const; - + SelectResult operator()(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; - + SelectResult operator()(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + SelectResult operator()(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; - + SelectResult operator()(const MoleculeView &molecule, const PropertyMap &map = PropertyMap()) const; - + virtual SelectEnginePtr simplify(); - + + virtual QString toString() const; + virtual bool usesCoordinates() const; - + bool hasParent() const; - + SelectEnginePtr self(); - + void setParent(SelectEnginePtr parent) const; - + virtual ObjType objectType() const=0; - + + virtual SelectResult expand(const SelectResult &result) const; + protected: SelectEngine(); virtual SelectResult select(const SelectResult &result, const PropertyMap &map) const=0; static SelectEnginePtr makePtr(SelectEngine *ptr); - - virtual ViewsOfMol expandMol(const ViewsOfMol &mol) const; - virtual SelectResult expand(const SelectResult &result) const; - + + virtual MolViewPtr expandMol(const MoleculeView &mol) const; + /** The parent engine */ SelectEngineWeakPtr parent; - + /** Weak pointer to self */ SelectEngineWeakPtr selfptr; }; } //end of namespace parser -/** This is the only publicly visible selector class. This provides a +/** This is the only publicly visible selector class. This provides a front-end interface to selecting atoms and molecules - + @author Christopher Woods */ class SIREMOL_EXPORT Select : public SireBase::ConcreteProperty @@ -160,34 +205,34 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Select&); public: Select(); Select(const QString &str); - + Select(const Select &other); - + ~Select(); - + Select& operator=(const Select &other); - + bool operator==(const Select &other) const; bool operator!=(const Select &other) const; Select* clone() const; - + const char* what() const; static const char* typeName(); - + QString toString() const; QString objectType() const; SelectResult operator()(const MolGroupsBase &molgroups, const PropertyMap &map = PropertyMap()) const; - + SelectResult operator()(const MoleculeGroup &molgroup, const PropertyMap &map = PropertyMap()) const; - + SelectResult operator()(const Molecules &molecules, const PropertyMap &map = PropertyMap()) const; - + SelectResult operator()(const MoleculeView &molecule, const PropertyMap &map = PropertyMap()) const; @@ -205,7 +250,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, Select&); parser::SelectEnginePtr e; }; -/** This class holds the result of a Select +/** This class holds the result of a Select @author Christopher Woods */ @@ -217,38 +262,46 @@ friend SIREMOL_EXPORT QDataStream& ::operator<<(QDataStream &ds, const SelectRes friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream &ds, SelectResult&); public: - typedef QList Container; + typedef QList Container; typedef Container::const_iterator const_iterator; typedef const_iterator iterator; SelectResult(); - + SelectResult(const MolGroupsBase &molgroups); SelectResult(const MoleculeGroup &molgroup); SelectResult(const Molecules &molecules); SelectResult(const MoleculeView &molview); - - SelectResult(const QList molviews); - + + SelectResult(const QList &views); + SelectResult(const QList &views); + SelectResult(const QList< Selector > &views); + SelectResult(const QList< Selector > &views); + SelectResult(const QList< Selector > &views); + SelectResult(const QList< Selector > &views); + SelectResult(const QList< Selector > &views); + + SelectResult(const QList &molviews); + SelectResult(const SelectResult &other); ~SelectResult(); SelectResult& operator=(const SelectResult &other); - + bool operator==(const SelectResult &other) const; bool operator!=(const SelectResult &other) const; - + static const char* typeName(); - + const char* what() const; - + const_iterator begin() const; const_iterator end() const; - + const_iterator constBegin() const; const_iterator constEnd() const; - + SelectResult* clone() const; QString toString() const; @@ -256,29 +309,37 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream &ds, SelectResult&); MolViewPtr operator[](int i) const; MolViewPtr operator[](MolNum molnum) const; + QList toList() const; + + MolViewPtr listAt(int i) const; + int listCount() const; + SelectResultMover move() const; - + bool isEmpty() const; - + int count() const; int size() const; bool contains(MolNum molnum) const; + bool contains(const MoleculeView &mol) const; + + QString getCommonType() const; QList views() const; ViewsOfMol views(MolNum molnum) const; - + QList molNums() const; MoleculeGroup toGroup() const; MoleculeGroup toGroup(const QString &name) const; - + Molecules toMolecules() const; SelectResult search(const QString &search_term) const; SelectResult join() const; - + SelectResult atoms() const; SelectResult cutGroups() const; SelectResult residues() const; @@ -287,13 +348,13 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream &ds, SelectResult&); SelectResult molecules() const; private: - /** The list of all ViewsOfMol views */ - QList molviews; + /** The list of all views */ + QList molviews; }; -/** This class provides a simple "move" interface to move all - views in a SelectResult - +/** This class provides a simple "move" interface to move all + views in a SelectResult + @author Christopher Woods */ class SIREMOL_EXPORT SelectResultMover @@ -302,26 +363,26 @@ class SIREMOL_EXPORT SelectResultMover public: SelectResultMover(); SelectResultMover(const SelectResult &other); - + SelectResultMover(const SelectResultMover &other); - + ~SelectResultMover(); SelectResultMover& operator=(const SelectResultMover &other); - + bool operator==(const SelectResultMover &other) const; bool operator!=(const SelectResultMover &other) const; - + static const char* typeName(); - + const char* what() const; - + SelectResultMover* clone() const; QString toString() const; - + SelectResultMover& translate(const Vector &delta); - + SelectResult commit() const; private: @@ -331,6 +392,7 @@ class SIREMOL_EXPORT SelectResultMover } //end of namespace SireMol +Q_DECLARE_METATYPE( SireMol::parse_error ) Q_DECLARE_METATYPE( SireMol::Select ) Q_DECLARE_METATYPE( SireMol::SelectResult ) Q_DECLARE_METATYPE( SireMol::SelectResultMover ) diff --git a/corelib/src/libs/SireMol/selector.hpp b/corelib/src/libs/SireMol/selector.hpp index e703a1c14..442bc56c6 100644 --- a/corelib/src/libs/SireMol/selector.hpp +++ b/corelib/src/libs/SireMol/selector.hpp @@ -38,10 +38,30 @@ #include "chain.h" #include "segment.h" +#include "SireBase/slice.h" + +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireStream/errors.h" + +#include "SireMol/errors.h" + #include "tostring.h" SIRE_BEGIN_HEADER +namespace SireMol +{ +template +class Selector; +} + +template +SIREMOL_EXPORT QDataStream& operator<<(QDataStream&, const SireMol::Selector&); + +template +SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::Selector&); + namespace SireMol { @@ -96,8 +116,12 @@ SIREMOL_EXPORT bool has_metadata(const Segment*, const MoleculeData &moldata, @author Christopher Woods */ template -class Selector : public SireBase::ConcreteProperty,MoleculeView> +class SIREMOL_EXPORT Selector : public SireBase::ConcreteProperty,MoleculeView> { + +friend SIREMOL_EXPORT QDataStream& ::operator<<<>(QDataStream&, const Selector&); +friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, Selector&); + public: Selector(); @@ -123,6 +147,11 @@ class Selector : public SireBase::ConcreteProperty,MoleculeView> Selector* clone() const; + QList IDs() const; + QList indexes() const; + QList names() const; + QList numbers() const; + bool operator==(const Selector &other) const; bool operator!=(const Selector &other) const; @@ -138,6 +167,9 @@ class Selector : public SireBase::ConcreteProperty,MoleculeView> int nViews() const; MolViewPtr operator[](int i) const; + MolViewPtr operator[](const QString &name) const; + MolViewPtr operator[](const SireBase::Slice &slice) const; + MolViewPtr operator[](const QList &idxs) const; MolViewPtr operator[](const AtomID &atomid) const; MolViewPtr operator[](const ResID &resid) const; MolViewPtr operator[](const CGID &cgid) const; @@ -146,10 +178,21 @@ class Selector : public SireBase::ConcreteProperty,MoleculeView> MolViewPtr operator[](const SireID::Index &idx) const; T operator()(int i) const; + T operator()(const SireID::Index &idx) const; Selector operator()(int i, int j) const; + Selector operator()(const SireBase::Slice &slice) const; + Selector operator()(const QList &idxs) const; + Selector operator()(const AtomID &atomid) const; + Selector operator()(const ResID &resid) const; + Selector operator()(const CGID &cgid) const; + Selector operator()(const ChainID &chainid) const; + Selector operator()(const SegID &segid) const; typename T::Index index(int i) const; + MolViewPtr toSelector() const; + QList toList() const; + QString toString() const; bool isEmpty() const; @@ -234,16 +277,11 @@ class Selector : public SireBase::ConcreteProperty,MoleculeView> const V &value); private: - void _pvt_add(typename T::Index idx); - void _pvt_sub(typename T::Index idx); - /** The list of indicies of the selected parts - of the molecule */ + of the molecule. This is empty if the entire + molecule is selected + */ QList idxs; - - /** The set of indicies of the selected parts - used - for rapid searching */ - QSet idxs_set; }; #ifndef SIRE_SKIP_INLINE_FUNCTIONS @@ -260,10 +298,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector::Selector(const MoleculeData &moldata) : SireBase::ConcreteProperty,MoleculeView>(moldata) -{ - idxs = detail::getAll(moldata.info()); - idxs_set = convert_to_qset(idxs); -} +{} /** Construct the set of all groups for the molecule whose data is in 'moldata' and with the specfied groups selected */ @@ -273,16 +308,15 @@ Selector::Selector(const MoleculeData &moldata, const QList &indexes) : SireBase::ConcreteProperty,MoleculeView>(moldata) { - int nats = moldata.info().nAtoms(); + int n = detail::getCount(moldata.info()); //ensure all of the indexes are valid! foreach (typename T::Index idx, indexes) { - idx.map(nats); + idx.map(n); } idxs = indexes; - idxs_set = convert_to_qset(idxs); } /** Construct the set of all groups that contain at least @@ -296,8 +330,14 @@ Selector::Selector(const MoleculeData &moldata, const AtomSelection &selected_atoms) : SireBase::ConcreteProperty,MoleculeView>(moldata) { - idxs = detail::getAll(moldata.info(), selected_atoms); - idxs_set = convert_to_qset(idxs); + if (selected_atoms.selectedNone()) + { + this->operator=(Selector()); + } + else if (not selected_atoms.selectedAll()) + { + idxs = detail::getAll(moldata.info(), selected_atoms); + } } /** Construct the set that contains only the view 'view' */ @@ -307,7 +347,6 @@ Selector::Selector(const T &view) : SireBase::ConcreteProperty,MoleculeView>(view) { idxs.append(view.index()); - idxs_set.insert(view.index()); } /** Construct the set of parts that match the ID 'id' from the @@ -327,7 +366,15 @@ Selector::Selector(const MoleculeData &moldata, : SireBase::ConcreteProperty,MoleculeView>(moldata) { idxs = viewid.map(moldata.info()); - idxs_set = convert_to_qset(idxs); + + if (idxs.count() == detail::getCount(moldata.info())) + { + idxs.clear(); + } + else if (idxs.isEmpty()) + { + this->operator=(Selector()); + } } /** Copy constructor */ @@ -335,7 +382,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector::Selector(const Selector &other) : SireBase::ConcreteProperty,MoleculeView>(other), - idxs(other.idxs), idxs_set(other.idxs_set) + idxs(other.idxs) {} /** Destructor */ @@ -351,7 +398,6 @@ Selector& Selector::operator=(const Selector &other) { MoleculeView::operator=(other); idxs = other.idxs; - idxs_set = other.idxs_set; return *this; } @@ -366,9 +412,6 @@ Selector& Selector::operator=(const T &view) idxs.clear(); idxs.append(view.index()); - idxs_set.clear(); - idxs_set.insert(view.index()); - return *this; } @@ -402,52 +445,157 @@ Selector* Selector::clone() const return new Selector(*this); } -/** Return whether this set is empty */ +/** Return the IDs of all of the items in this selector, in the + * order they appear in the selector + */ template SIRE_OUTOFLINE_TEMPLATE -bool Selector::isEmpty() const +QList Selector::IDs() const { - return idxs.isEmpty(); + if (this->isEmpty()) + return QList(); + + else if (this->selectedAll()) + { + const int n = detail::getCount(this->data().info()); + + QList ret; + ret.reserve(n); + + for (int i=0; i SIRE_OUTOFLINE_TEMPLATE -bool Selector::selectedAll() const +QList Selector::indexes() const { - //there has to be a better way of doing this... - return this->selection().selectedAll(); + return this->IDs(); } -/** Return a string representation of this selector */ +/** Return the names of all of the items in this selector, in the + * order they appear in the selector + */ template SIRE_OUTOFLINE_TEMPLATE -QString Selector::toString() const +QList Selector::names() const +{ + auto indexes = this->IDs(); + + QList n; + n.reserve(indexes.count()); + + const auto &molinfo = this->data().info(); + + for (const auto &index : indexes) + { + n.append( molinfo.name(index) ); + } + + return n; +} + +/** Return the numbers of all of the items in this selector, in the + * order they appear in the selector + */ +template +SIRE_OUTOFLINE_TEMPLATE +QList Selector::numbers() const +{ + auto indexes = this->IDs(); + + QList n; + n.reserve(indexes.count()); + + const auto &molinfo = this->data().info(); + + for (const auto &index : indexes) + { + n.append( molinfo.number(index) ); + } + + return n; +} + +/** Return whether this set is empty */ +template +SIRE_OUTOFLINE_TEMPLATE +bool Selector::isEmpty() const { - return QObject::tr( "Selector<%1>( %2 )" ) - .arg( T::typeName() ) - .arg( Sire::toString(idxs) ); + return this->data().isEmpty(); } +/** Return whether or not the entire molecule is selected */ template SIRE_OUTOFLINE_TEMPLATE -void Selector::_pvt_add(typename T::Index idx) +bool Selector::selectedAll() const { - if (not idxs_set.contains(idx)) + // have no indexes if we have selected all of the molecule + if (not this->isEmpty()) { - idxs.append(idx); - idxs_set.insert(idx); + if (idxs.isEmpty()) + return true; + + const int n = detail::getCount(this->data().info()); + + if (idxs.count() >= n) + { + auto s = _list_to_set(idxs); + return s.count() == n; + } } + + return false; } +/** Return a string representation of this selector */ template SIRE_OUTOFLINE_TEMPLATE -void Selector::_pvt_sub(typename T::Index idx) +QString Selector::toString() const { - if (idxs_set.contains(idx)) + if (this->isEmpty()) { - idxs.removeAll(idx); - idxs_set.remove(idx); + return QObject::tr("Selector<%1>::empty").arg(T::typeName()); + } + else + { + QStringList parts; + + if (this->size() <= 10) + { + for (int i=0; isize(); ++i) + { + parts.append(QString("%1: %2").arg(i).arg(this->operator()(i).toString())); + } + } + else + { + for (int i=0; i<5; ++i) + { + parts.append(QString("%1: %2").arg(i).arg(this->operator()(i).toString())); + } + + parts.append("..."); + + for (int i=this->size()-5; isize(); ++i) + { + parts.append(QString("%1: %3").arg(i).arg(this->operator()(i).toString())); + } + } + + return QObject::tr( "Selector<%1>( size=%2\n%3\n)") + .arg(T::typeName()).arg(this->count()) + .arg(parts.join("\n")); } } @@ -461,13 +609,62 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::add(const Selector &other) const { + if (this->selectedAll()) + { + if (other.isEmpty()) + return *this; + + MoleculeView::assertSameMolecule(other); + + return *this; + } + else if (other.selectedAll()) + { + if (this->isEmpty()) + return other; + + MoleculeView::assertSameMolecule(other); + + // do this so that we always use the version from the left hand molecule + Selector ret(*this); + ret.idxs.clear(); + return ret; + } + MoleculeView::assertSameMolecule(other); Selector ret(*this); - foreach (typename T::Index idx, other.idxs) + if (ret.idxs.isEmpty()) { - ret._pvt_add(idx); + //expand the indexes + const int n = detail::getCount(this->data().info()); + ret.idxs.reserve(n); + + for (int i=0; i(this->data().info()); + ret.idxs.reserve(ret.idxs.count() + n); + + for (int i=0; i SIRE_OUTOFLINE_TEMPLATE Selector Selector::add(const T &view) const { - MoleculeView::assertSameMolecule(view); - - Selector ret(*this); - ret._pvt_add(view.index()); - return ret; + return this->add(Selector(view)); } /** Return the set that has all views that match the ID 'id' @@ -499,15 +692,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::add(const typename T::ID &id) const { - Selector ret(*this); - QList idxs = id.map(this->d->info()); - - foreach (typename T::Index idx, idxs) - { - ret._pvt_add(idx); - } - - return ret; + return this->operator+(Selector(this->data(), id)); } /** Subtract all of the views in 'other' from this set @@ -518,13 +703,33 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::subtract(const Selector &other) const { - MoleculeView::assertSameMolecule(other); + if (this->isEmpty()) + return Selector(); + else if (other.selectedAll()) + { + MoleculeView::assertSameMolecule(other); + return Selector(); + } Selector ret(*this); + const int n = detail::getCount(this->data().info()); + + if (ret.idxs.isEmpty()) + { + + for (int i=0; i(); } return ret; @@ -538,12 +743,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::subtract(const T &view) const { - MoleculeView::assertSameMolecule(view); - - Selector ret(*this); - ret._pvt_sub(view.index()); - - return ret; + return this->subtract(Selector(view)); } /** Subtract all of the views that match the ID 'id' from @@ -560,16 +760,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::subtract(const typename T::ID &id) const { - QList idxs = id.map(this->d->info()); - - Selector ret(*this); - - foreach (typename T::Index idx, idxs) - { - ret._pvt_sub(idx); - } - - return ret; + return this->subtract(Selector(this->data(), id)); } /** Syntactic sugar for add() */ @@ -628,7 +819,33 @@ template SIRE_OUTOFLINE_TEMPLATE MolViewPtr Selector::operator[](int i) const { - return T( this->data(), idxs.at( SireID::Index(i).map(idxs.count()) ) ); + return this->operator()(i); +} + +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Selector::operator[](const QString &name) const +{ + auto match = this->operator()(AtomName(name)); + + if (match.nAtoms() == 1) + return match(0); + else + return match; +} + +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Selector::operator[](const SireBase::Slice &slice) const +{ + return this->operator()(slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Selector::operator[](const QList &idxs) const +{ + return this->operator()(idxs); } /** Exposing MoleculeView::operator[] */ @@ -636,7 +853,12 @@ template SIRE_OUTOFLINE_TEMPLATE MolViewPtr Selector::operator[](const AtomID &atom) const { - return MoleculeView::operator[](atom); + auto match = this->operator()(atom); + + if (match.nAtoms() == 1) + return match(0); + else + return match; } /** Exposing MoleculeView::operator[] */ @@ -644,7 +866,12 @@ template SIRE_OUTOFLINE_TEMPLATE MolViewPtr Selector::operator[](const ResID &res) const { - return MoleculeView::operator[](res); + auto match = this->operator()(res); + + if (match.nResidues() == 1) + return match(0); + else + return match; } /** Exposing MoleculeView::operator[] */ @@ -652,7 +879,12 @@ template SIRE_OUTOFLINE_TEMPLATE MolViewPtr Selector::operator[](const CGID &cg) const { - return MoleculeView::operator[](cg); + auto match = this->operator()(cg); + + if (match.nCutGroups() == 1) + return match(0); + else + return match; } /** Exposing MoleculeView::operator[] */ @@ -660,7 +892,12 @@ template SIRE_OUTOFLINE_TEMPLATE MolViewPtr Selector::operator[](const ChainID &chain) const { - return MoleculeView::operator[](chain); + auto match = this->operator()(chain); + + if (match.nChains() == 1) + return match(0); + else + return match; } /** Exposing MoleculeView::operator[] */ @@ -668,7 +905,12 @@ template SIRE_OUTOFLINE_TEMPLATE MolViewPtr Selector::operator[](const SegID &seg) const { - return MoleculeView::operator[](seg); + auto match = this->operator()(seg); + + if (match.nSegments() == 1) + return match(0); + else + return match; } /** Exposing MoleculeView::operator[] */ @@ -676,7 +918,7 @@ template SIRE_OUTOFLINE_TEMPLATE MolViewPtr Selector::operator[](const SireID::Index &idx) const { - return MoleculeView::operator[](idx); + return this->operator()(idx.value()); } /** Return the index of the ith view in this set (this supports negative indexing) @@ -687,7 +929,20 @@ template SIRE_OUTOFLINE_TEMPLATE typename T::Index Selector::index(int i) const { - return idxs.at( SireID::Index(i).map(idxs.count()) ); + if (not this->isEmpty()) + { + if (idxs.isEmpty()) + { + const int n = detail::getCount(this->data().info()); + return typename T::Index(SireID::Index(i).map(n)); + } + else + { + return idxs.at( SireID::Index(i).map(idxs.count())); + } + } + + return typename T::Index(SireID::Index(i).map(0)); } /** Return the ith view in this set (this supports negative indexing!) @@ -698,7 +953,7 @@ template SIRE_OUTOFLINE_TEMPLATE T Selector::operator()(int i) const { - return T( this->data(), idxs.at( SireID::Index(i).map(idxs.count()) ) ); + return T(this->data(), this->index(i)); } /** Return the range of views from index i to j in this set. This @@ -711,29 +966,251 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::operator()(int i, int j) const { - i = SireID::Index(i).map(idxs.count()); - j = SireID::Index(j).map(idxs.count()); + if (this->isEmpty()) + // raise an index exception + i = SireID::Index(i).map(0); - Selector ret(*this); - ret.idxs.clear(); - ret.idxs_set.clear(); + if (this->idxs.isEmpty()) + { + const int n = detail::getCount(this->data().info()); + + i = SireID::Index(i).map(n); + j = SireID::Index(j).map(n); + + Selector ret(*this); + ret.idxs.clear(); + + if (i <= j) + { + if (i == 0 and j == n-1) + // selected all + return ret; + + for ( ; i<=j; ++i) + { + ret.idxs.append(typename T::Index(i)); + } + } + else + { + if (i == n-1 and j == 0) + // selected all + return ret; + + for ( ; i >= j; --i) + { + ret.idxs.append(typename T::Index(i)); + } + } + + return ret; + } + else + { + i = SireID::Index(i).map(idxs.count()); + j = SireID::Index(j).map(idxs.count()); + + Selector ret(*this); + ret.idxs.clear(); + + if (i <= j) + { + for ( ; i<=j; ++i) + { + ret.idxs.append(this->idxs.at(i)); + } + } + else + { + for ( ; i >= j; --i) + { + ret.idxs.append(this->idxs.at(i)); + } + } - if (i <= j) + return ret; + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::operator()(const SireBase::Slice &slice) const +{ + if (this->isEmpty()) + //raise an exception + slice.begin(0); + + if (this->idxs.isEmpty()) { - for ( ; i<=j; ++i) + const int n = detail::getCount(this->data().info()); + + Selector ret(*this); + ret.idxs.clear(); + + for (auto it = slice.begin(n); not it.atEnd(); it.next()) { - ret._pvt_add( typename T::Index(i) ); + ret.idxs.append(typename T::Index(it.value())); } + + return ret; } else { - for ( ; i >= j; --i) + Selector ret(*this); + ret.idxs.clear(); + + for (auto it = slice.begin(this->idxs.count()); + not it.atEnd(); it.next()) { - ret._pvt_add( typename T::Index(i) ); + ret.idxs.append(this->idxs.at(it.value())); } + + return ret; } +} - return ret; +/** Return the range of views from whose indicies are in idxs in this set. + + \throw SireError::invalid_index +*/ +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::operator()(const QList &idxs) const +{ + if (idxs.isEmpty()) + return Selector(); + + else if (this->isEmpty()) + { + //raise an exception + SireID::Index(idxs.at(0)).map(0); + return Selector(); + } + else if (this->idxs.isEmpty()) + { + Selector ret(*this); + ret.idxs.clear(); + + const int n = detail::getCount(this->data().info()); + + QSet seen; + + for (const auto &idx : idxs) + { + typename T::Index index(SireID::Index(idx).map(n)); + + if (not seen.contains(index)) + { + ret.idxs.append(index); + seen.insert(index); + } + } + + if (ret.idxs.count() >= n) + ret.idxs.clear(); + + return ret; + } + else + { + Selector ret(*this); + ret.idxs.clear(); + + for (const auto &idx : idxs) + { + auto index = this->idxs.at(SireID::Index(idx).map(this->idxs.count())); + ret.idxs.append(index); + } + + return ret; + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::operator()(const AtomID &atomid) const +{ + return this->atoms(atomid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::operator()(const ResID &resid) const +{ + return this->residues(resid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::operator()(const CGID &cgid) const +{ + return this->cutGroups(cgid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::operator()(const ChainID &chainid) const +{ + return this->chains(chainid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::operator()(const SegID &segid) const +{ + return this->segments(segid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +MolViewPtr Selector::toSelector() const +{ + return MolViewPtr(*this); +} + +template +SIRE_OUTOFLINE_TEMPLATE +QList Selector::toList() const +{ + QList l; + + if (not this->isEmpty()) + { + if (idxs.isEmpty()) + { + //return the entire molecule + const auto& d = this->data(); + + const int n = detail::getCount(d.info()); + l.reserve(n); + + for (int i=0; idata(); + + for (const auto &idx : idxs) + { + l.append(MolViewPtr(new T(d, idx))); + } + } + } + + return l; +} + +template +SIRE_OUTOFLINE_TEMPLATE +T Selector::operator()(const SireID::Index &idx) const +{ + return this->operator()(idx.value()); } /** Return the number of views in this set */ @@ -741,7 +1218,23 @@ template SIRE_OUTOFLINE_TEMPLATE int Selector::nViews() const { - return idxs.count(); + if (this->isEmpty()) + return 0; + else if (this->selectedAll()) + return detail::getCount(this->data().info()); + else + return this->idxs.count(); +} + +template +SIRE_INLINE_TEMPLATE +QSet _list_to_set(const QList &vals) +{ + #if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0) + return QSet(vals.constBegin(), vals.constEnd()); + #else + return vals.toSet(); + #endif } /** Return the intersection of this set with 'other' - the @@ -754,28 +1247,66 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::intersection(const Selector &other) const { - MoleculeView::assertSameMolecule(other); - - Selector ret(*this); + if (this->isEmpty() or other.isEmpty()) + return Selector(); - if (idxs.count() <= other.idxs.count()) + else if (this->selectedAll()) { - foreach (typename T::Index idx, idxs) - { - if (not other.idxs_set.contains(idx)) - ret._pvt_sub(idx); - } + MoleculeView::assertSameMolecule(other); + Selector ret(*this); + ret.idxs = other.idxs; + return ret; + } + else if (other.selectedAll()) + { + MoleculeView::assertSameMolecule(other); + return *this; } else { - foreach (typename T::Index idx, other.idxs) + MoleculeView::assertSameMolecule(other); + + Selector ret(*this); + ret.idxs.clear(); + + auto this_idxs = this->idxs; + auto other_idxs = other.idxs; + + const int n = detail::getCount(this->data().info()); + + if (this_idxs.isEmpty()) { - if (not idxs_set.contains(idx)) - ret._pvt_sub(idx); + this_idxs.reserve(n); + for (int i=0; i(); + } + + return ret; + } } /** Return the intersection of this set with 'view' @@ -786,18 +1317,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::intersection(const T &view) const { - MoleculeView::assertSameMolecule(view); - - if (idxs_set.contains(view.index())) - { - Selector ret(*this); - ret.idxs.clear(); - ret.idxs_set.clear(); - ret._pvt_add(view.index()); - return ret; - } - else - return Selector(this->data()); + return this->intersection(Selector(view)); } /** Return the intersection of this set with the views identified @@ -814,50 +1334,57 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::intersection(const typename T::ID &id) const { - QList other_idxs = id.map(this->d->info()); - - Selector ret(*this); + return this->intersection(Selector(this->data(), id)); +} - if (idxs.count() <= other_idxs.count()) +/** Return the set that has a completely inverted selection */ +template +SIRE_OUTOFLINE_TEMPLATE +Selector Selector::invert() const +{ + if (this->isEmpty()) { - auto other_idxs_set = convert_to_qset(other_idxs); - - foreach (typename T::Index idx, idxs) - { - if (not other_idxs_set.contains(idx)) - ret._pvt_sub(idx); - } + throw SireMol::missing_atom(QObject::tr( + "Cannot invert an empty selection!"), CODELOC); + } + else if (this->selectedAll()) + { + return Selector(); } else { - foreach (typename T::Index idx, other_idxs) + Selector ret(*this); + ret.idxs.clear(); + + const int n = detail::getCount(this->data().info()); + + if (this->idxs.count() == 1) { - if (not idxs_set.contains(idx)) - ret._pvt_sub(idx); - } - } + auto seen = this->idxs.at(0); - return ret; -} + for (int i=0; i -SIRE_OUTOFLINE_TEMPLATE -Selector Selector::invert() const -{ - QList all_idxs = detail::getAll(this->d->info()); + if (idx != seen) + ret.idxs.append(idx); + } + } + else + { + auto seen = _list_to_set(this->idxs); - Selector ret(*this); - ret.idxs.clear(); - ret.idxs_set.clear(); + for (int i=0; i SIRE_OUTOFLINE_TEMPLATE bool Selector::contains(const Selector &other) const { - if (idxs_set.count() < other.idxs_set.count()) + if (this->isEmpty() or other.isEmpty()) + return false; + + MoleculeView::assertSameMolecule(other); + + if (this->selectedAll()) + return true; + else if (other.selectedAll()) return false; + else { - foreach (typename T::Index idx, other.idxs) + auto seen = _list_to_set(this->idxs); + + for (const auto &idx : other.idxs) { - if (not idxs_set.contains(idx)) + if (not seen.contains(idx)) return false; } @@ -889,23 +1426,20 @@ template SIRE_OUTOFLINE_TEMPLATE bool Selector::intersects(const Selector &other) const { + if (this->isEmpty() or other.isEmpty()) + return false; + MoleculeView::assertSameMolecule(other); - if (idxs_set.count() <= other.idxs_set.count()) - { - foreach (typename T::Index idx, idxs) - { - if (other.idxs_set.contains(idx)) - return true; - } - } - else + if (this->selectedAll() or other.selectedAll()) + return true; + + auto seen = _list_to_set(this->idxs); + + for (const auto &idx : other.idxs) { - foreach (typename T::Index idx, other.idxs) - { - if (idxs_set.contains(idx)) - return true; - } + if (seen.contains(idx)) + return true; } return false; @@ -916,8 +1450,7 @@ template SIRE_OUTOFLINE_TEMPLATE bool Selector::contains(const T &view) const { - MoleculeView::assertSameMolecule(view); - return idxs_set.contains(view.index()); + return this->contains(Selector(view)); } /** Return whether or not this set contains all of the @@ -926,20 +1459,7 @@ template SIRE_OUTOFLINE_TEMPLATE bool Selector::contains(const typename T::ID &id) const { - QList id_idxs = id.map(this->d->info()); - - if (idxs.count() < id_idxs.count()) - return false; - else - { - foreach (typename T::Index idx, id_idxs) - { - if (not idxs_set.contains(idx)) - return false; - } - - return true; - } + return this->contains(Selector(this->data(), id)); } /** Return whether or not this set contains the view 'view' */ @@ -947,7 +1467,7 @@ template SIRE_OUTOFLINE_TEMPLATE bool Selector::intersects(const T &view) const { - return this->isSameMolecule(view) and idxs.contains(view.index()); + return this->intersects(Selector(view)); } /** Return whether this set contains some of the views @@ -956,28 +1476,7 @@ template SIRE_OUTOFLINE_TEMPLATE bool Selector::intersects(const typename T::ID &id) const { - QList id_idxs = id.map(this->d->info()); - - if (idxs.count() <= id_idxs.count()) - { - auto id_idxs_set = convert_to_qset(id_idxs); - - foreach (typename T::Index idx, idxs) - { - if (id_idxs_set.contains(idx)) - return true; - } - } - else - { - foreach (typename T::Index idx, id_idxs) - { - if (idxs_set.contains(idx)) - return true; - } - } - - return false; + return this->intersects(Selector(this->data(), id)); } /** Return all of the atoms selected in this set */ @@ -985,11 +1484,19 @@ template SIRE_OUTOFLINE_TEMPLATE AtomSelection Selector::selection() const { - AtomSelection selected_atoms(*(this->d)); + if (this->isEmpty()) + return AtomSelection(); + + else if (this->selectedAll()) + { + return AtomSelection(this->data()); + } + + AtomSelection selected_atoms(this->data()); selected_atoms.selectNone(); - foreach (typename T::Index idx, idxs) + for (const auto &idx : this->idxs) { selected_atoms.select(idx); } @@ -1005,11 +1512,7 @@ template SIRE_OUTOFLINE_TEMPLATE AtomSelection Selector::selection(int i) const { - AtomSelection selected_atoms(*(this->d)); - - selected_atoms.selectOnly( idxs.at( SireID::Index(i).map(idxs.count()) ) ); - - return selected_atoms; + return this->operator()(i).selection(); } /** Return the selection of the atoms in the ith to jth views @@ -1020,21 +1523,7 @@ template SIRE_OUTOFLINE_TEMPLATE AtomSelection Selector::selection(int i, int j) const { - AtomSelection selected_atoms(*(this->d)); - selected_atoms.selectNone(); - - i = SireID::Index(i).map(idxs.count()); - j = SireID::Index(j).map(idxs.count()); - - if (i > j) - qSwap(i,j); - - for ( ; i<=j; ++i) - { - selected_atoms = selected_atoms.select( idxs.at(i) ); - } - - return selected_atoms; + return this->operator()(i, j).selection(); } /** Return an object that can move a copy of all of the views @@ -1051,7 +1540,7 @@ template SIRE_OUTOFLINE_TEMPLATE Mover< Selector > Selector::move(int i) const { - return Mover< Selector >(*this, this->selection(i)); + return Mover< Selector >(Selector(this->operator()(i))); } /** Return an object that can move the ith to jth views in this set */ @@ -1059,7 +1548,7 @@ template SIRE_OUTOFLINE_TEMPLATE Mover< Selector > Selector::move(int i, int j) const { - return Mover< Selector >(*this, this->selection(i,j)); + return Mover< Selector >(this->operator()(i,j)); } /** Return an evaluator that can evaluate properties over all @@ -1077,7 +1566,7 @@ template SIRE_OUTOFLINE_TEMPLATE Evaluator Selector::evaluate(int i) const { - return Evaluator(*this, this->selection(i)); + return Evaluator(this->operator()(i)); } /** Return an evaluator that can evaluate properties over @@ -1086,7 +1575,7 @@ template SIRE_OUTOFLINE_TEMPLATE Evaluator Selector::evaluate(int i, int j) const { - return Evaluator(*this, this->selection(i,j)); + return Evaluator(this->operator()(i,j)); } /** Return a selector that can change the selection of this view */ @@ -1106,7 +1595,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::selector(int i) const { - return Selector(*(this->d), this->selection(i)); + return Selector(this->operator()(i)); } /** Return a selector for the ith to jth views @@ -1117,7 +1606,7 @@ template SIRE_OUTOFLINE_TEMPLATE Selector Selector::selector(int i, int j) const { - return Selector(*(this->d), this->selection(i,j)); + return this->operator()(i, j); } /** Return a list of the values of the property called 'key' for each @@ -1132,7 +1621,7 @@ SIRE_OUTOFLINE_TEMPLATE QList Selector::property(const PropertyName &key) const { T *ptr = 0; - return detail::get_property(ptr, this->data(), this->idxs, key); + return detail::get_property(ptr, this->data(), this->IDs(), key); } /** Return a list of all of the metadata called 'metakey' for each @@ -1148,7 +1637,7 @@ QList Selector::metadata(const PropertyName &metakey) const { T *ptr = 0; return detail::get_metadata(ptr, this->data(), - this->idxs, metakey); + this->IDs(), metakey); } /** Return a list of all of the metadata called 'key'/'metakey' for each @@ -1164,7 +1653,7 @@ QList Selector::metadata(const PropertyName &key, const PropertyName &metakey) const { T *ptr = 0; - return detail::get_metadata(ptr, this->data(), this->idxs, + return detail::get_metadata(ptr, this->data(), this->IDs(), key, metakey); } @@ -1181,7 +1670,7 @@ SIRE_OUTOFLINE_TEMPLATE void Selector::setProperty(const QString &key, const QList &values) { T *ptr = 0; - detail::set_property(ptr, this->data(), this->idxs, key, values); + detail::set_property(ptr, this->data(), this->IDs(), key, values); } /** Set the metadata at key 'metakey' for all of the views in this set @@ -1197,7 +1686,7 @@ SIRE_OUTOFLINE_TEMPLATE void Selector::setMetadata(const QString &metakey, const QList &values) { T *ptr = 0; - detail::set_metadata(ptr, this->data(), this->idxs, metakey, values); + detail::set_metadata(ptr, this->data(), this->IDs(), metakey, values); } @@ -1215,7 +1704,7 @@ void Selector::setMetadata(const QString &key, const QString &metakey, const QList &values) { T *ptr = 0; - detail::set_metadata(ptr, this->data(), this->idxs, key, metakey, values); + detail::set_metadata(ptr, this->data(), this->IDs(), key, metakey, values); } /** Set the property at key 'key' for all of the views in this set @@ -1229,7 +1718,7 @@ SIRE_OUTOFLINE_TEMPLATE void Selector::setProperty(const QString &key, const V &value) { T *ptr = 0; - detail::set_property(ptr, this->data(), this->idxs, key, value); + detail::set_property(ptr, this->data(), this->IDs(), key, value); } /** Set the metadata at metakey 'metakey' for all of the views in this set @@ -1243,7 +1732,7 @@ SIRE_OUTOFLINE_TEMPLATE void Selector::setMetadata(const QString &metakey, V &value) { T *ptr = 0; - detail::set_metadata(ptr, this->data(), this->idxs, metakey, value); + detail::set_metadata(ptr, this->data(), this->IDs(), metakey, value); } /** Set the metadata at key 'key'/'metakey' for all of the views in this set @@ -1258,7 +1747,7 @@ void Selector::setMetadata(const QString &key, const QString &metakey, const V &value) { T *ptr = 0; - detail::set_metadata(ptr, this->data(), this->idxs, key, metakey, value); + detail::set_metadata(ptr, this->data(), this->IDs(), key, metakey, value); } /** Return whether or not the views of this selector has a property @@ -1336,8 +1825,70 @@ QStringList Selector::metadataKeys(const PropertyName &key) const #endif //SIRE_SKIP_INLINE_FUNCTIONS +} // end of namespace SireMol + +#ifndef SIRE_SKIP_INLINE_FUNCTIONS + +/** Extract from a binary datastream */ +template +SIRE_OUTOFLINE_TEMPLATE +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SireMol::Selector &views) +{ + QString cls; + SireStream::VersionID version; + + ds >> cls; + + if (cls != QString(SireMol::Selector::typeName())) + { + throw SireStream::corrupted_data(QObject::tr( + "Found the wrong class (%1) when trying to read a %2.") + .arg(cls).arg(SireMol::Selector::typeName()), CODELOC); + } + + ds >> version; + + if (version == 2) + { + SireStream::SharedDataStream sds(ds); + sds >> views.idxs >> static_cast(views); + } + else if (version == 1) + { + SireStream::SharedDataStream sds(ds); + + QList idxs; + SireMol::MoleculeData moldata; + sds >> moldata >> idxs; + + views = SireMol::Selector(moldata, idxs); + } + else + { + throw SireStream::version_error(version, "1", + SireMol::Selector::typeName(), + CODELOC); + } + + return ds; } +/** Serialise to a binary datastream */ +template +SIRE_OUTOFLINE_TEMPLATE +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SireMol::Selector &views) +{ + ds << QString(SireMol::Selector::typeName()) << SireStream::VersionID(2); + + SireStream::SharedDataStream sds(ds); + + sds << views.idxs << static_cast(views); + + return ds; +} + +#endif // SIRE_SKIP_INLINE_FUNCTIONS + SIRE_END_HEADER #endif diff --git a/corelib/src/libs/SireMol/selectorm.hpp b/corelib/src/libs/SireMol/selectorm.hpp new file mode 100644 index 000000000..3646101a5 --- /dev/null +++ b/corelib/src/libs/SireMol/selectorm.hpp @@ -0,0 +1,1818 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREMOL_SELECTORM_HPP +#define SIREMOL_SELECTORM_HPP + +#include "selectormol.h" + +#include "core.h" + +#include "SireMol/errors.h" + +SIRE_BEGIN_HEADER + +namespace SireMol +{ +template +class SelectorM; + +class SelectorMol; +} + +template +SIREMOL_EXPORT QDataStream& operator<<(QDataStream&, const SireMol::SelectorM&); + +template +SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::SelectorM&); + +namespace SireMol +{ + +/** This is an analogue of the Selector class that is designed + to hold views from multiple molecules +*/ +template +class SIREMOL_EXPORT SelectorM + : public SireBase::ConcreteProperty,SireBase::Property> +{ + +friend SIREMOL_EXPORT QDataStream& ::operator<<<>(QDataStream&, const SelectorM&); +friend SIREMOL_EXPORT QDataStream& ::operator>><>(QDataStream&, SelectorM&); + +public: + typedef typename QList< Selector >::const_iterator iterator; + typedef typename QList< Selector >::const_iterator const_iterator; + + SelectorM(); + SelectorM(const T &view); + SelectorM(const Molecules &mols); + SelectorM(const MoleculeGroup &mols); + SelectorM(const MolGroupsBase &mols); + SelectorM(const SelectResult &mols); + + SelectorM(const SelectorMol &mols); + SelectorM(const SelectorMol &mols, const SireBase::Slice &slice); + SelectorM(const SelectorMol &mols, const QList &idxs); + SelectorM(const SelectorMol &mols, const QString &name); + SelectorM(const SelectorMol &mols, const typename T::ID &id); + + template + SelectorM(const SelectorM &other); + template + SelectorM(const SelectorM &other, const SireBase::Slice &slice); + template + SelectorM(const SelectorM &other, const QList &idxs); + template + SelectorM(const SelectorM &other, const QString &name); + template + SelectorM(const SelectorM &other, const typename T::ID &id); + + SelectorM(const SelectorM &other); + + virtual ~SelectorM(); + + static const char* typeName(); + + virtual SelectorM* clone() const + { + return new SelectorM(*this); + } + + SelectorM& operator=(const SelectorM &other); + + bool operator==(const SelectorM &other) const; + bool operator!=(const SelectorM &other) const; + + T operator[](int i) const; + SelectorM operator[](const SireBase::Slice &slice) const; + SelectorM operator[](const QList &idxs) const; + T operator[](const QString &name) const; + T operator[](const typename T::ID &id) const; + + T operator()(int i) const; + T operator()(const QString &name) const; + T operator()(const typename T::ID &id) const; + + QList toList() const; + + int count() const; + int size() const; + + EvaluatorM evaluate() const; + + MoleculeGroup toMoleculeGroup() const; + SelectResult toSelectResult() const; + + Molecule molecule(int i) const; + Molecule molecule(const QString &name) const; + Molecule molecule(const MolID &molid); + + SelectorMol molecules() const; + SelectorMol molecules(int i) const; + SelectorMol molecules(const SireBase::Slice &slice) const; + SelectorMol molecules(const QList &idxs) const; + SelectorMol molecules(const QString &name) const; + SelectorMol molecules(const MolID &molid) const; + + Atom atom(int i) const; + Atom atom(const QString &name) const; + Atom atom(const AtomID &atomid) const; + + Residue residue(int i) const; + Residue residue(const QString &name) const; + Residue residue(const ResID &resid) const; + + Chain chain(int i) const; + Chain chain(const QString &name) const; + Chain chain(const ChainID &chainid) const; + + Segment segment(int i) const; + Segment segment(const QString &name) const; + Segment segment(const SegID &segid) const; + + CutGroup cutGroup(int i) const; + CutGroup cutGroup(const QString &name) const; + CutGroup cutGroup(const CGID &cgid) const; + + SelectorM atoms() const; + SelectorM atoms(int i) const; + SelectorM atoms(const SireBase::Slice &slice) const; + SelectorM atoms(const QList &idxs) const; + SelectorM atoms(const QString &name) const; + SelectorM atoms(const AtomID &atomid) const; + + SelectorM residues() const; + SelectorM residues(int i) const; + SelectorM residues(const SireBase::Slice &slice) const; + SelectorM residues(const QList &idxs) const; + SelectorM residues(const QString &name) const; + SelectorM residues(const ResID &resid) const; + + SelectorM chains() const; + SelectorM chains(int i) const; + SelectorM chains(const SireBase::Slice &slice) const; + SelectorM chains(const QList &idxs) const; + SelectorM chains(const QString &name) const; + SelectorM chains(const ChainID &chainid) const; + + SelectorM segments() const; + SelectorM segments(int i) const; + SelectorM segments(const SireBase::Slice &slice) const; + SelectorM segments(const QList &idxs) const; + SelectorM segments(const QString &name) const; + SelectorM segments(const SegID &segid) const; + + SelectorM cutGroups() const; + SelectorM cutGroups(int i) const; + SelectorM cutGroups(const SireBase::Slice &slice) const; + SelectorM cutGroups(const QList &idxs) const; + SelectorM cutGroups(const QString &name) const; + SelectorM cutGroups(const CGID &cgid) const; + + SelectResult search(const QString &search_string) const; + + QList IDs() const; + QList indexes() const; + QList numbers() const; + QList names() const; + + int nAtoms() const; + int nResidues() const; + int nChains() const; + int nSegments() const; + int nCutGroups() const; + int nMolecules() const; + + bool isEmpty() const; + + const_iterator begin() const; + const_iterator end() const; + + const_iterator constBegin() const; + const_iterator constEnd() const; + + virtual QString toString() const; + +protected: + void _append(const T &view); + + /** The actual views */ + QList< Selector > vws; +}; + +#ifndef SIRE_SKIP_INLINE_FUNCTIONS + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM() + : SireBase::ConcreteProperty,SireBase::Property>() +{} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const T &view) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + this->vws.append(Selector(view)); +} + +template +struct _get_view +{ + template + static int count(const C &mols) + { + return mols.nAtoms(); + } + + template + static T at(const C &mols, int idx) + { + return mols.atom(idx); + } + + template + static Selector get(const C &view) + { + if (view.template isA< Selector >()) + return view.template asA< Selector >(); + else + return view.atoms(); + } + + static SelectorM getName(const SelectorM &view, const QString &name) + { + return view.atoms(name); + } + + static SelectorM getID(const SelectorM &view, + const typename T::ID &id) + { + return view.atoms(id); + } + + template + static Selector get(const C &view, const ID &id) + { + return view.atoms(id); + } + + static void raise_duplicate(const QString &id, int n) + { + throw SireMol::duplicate_atom(QObject::tr( + "Multiple atoms matched %1. Number of matches is %2.") + .arg(id).arg(n), CODELOC); + } + + static void raise_missing(const QString &id) + { + throw SireMol::missing_atom(QObject::tr( + "No atom matches %1.").arg(id), CODELOC); + } +}; + +template<> +struct _get_view +{ + template + static int count(const C &mols) + { + return mols.nResidues(); + } + + template + static Residue at(const C &mols, int idx) + { + return mols.residue(idx); + } + + static SelectorM getName(const SelectorM &view, + const QString &name) + { + return view.residues(name); + } + + static SelectorM getID(const SelectorM &view, + const Residue::ID &id) + { + return view.residues(id); + } + + template + static Selector get(const C &view) + { + if (view.template isA< Selector >()) + return view.template asA< Selector >(); + else + return view.residues(); + } + + template + static Selector get(const C &view, const ID &id) + { + return view.residues(id); + } + + static void raise_duplicate(const QString &id, int n) + { + throw SireMol::duplicate_residue(QObject::tr( + "Multiple residues matched %1. Number of matches is %2.") + .arg(id).arg(n), CODELOC); + } + + static void raise_missing(const QString &id) + { + throw SireMol::missing_residue(QObject::tr( + "No residue matches %1.").arg(id), CODELOC); + } +}; + +template<> +struct _get_view +{ + template + static int count(const C &mols) + { + return mols.nChains(); + } + + template + static Chain at(const C &mols, int idx) + { + return mols.chain(idx); + } + + static SelectorM getName(const SelectorM &view, + const QString &name) + { + return view.chains(name); + } + + static SelectorM getID(const SelectorM &view, + const Chain::ID &id) + { + return view.chains(id); + } + + template + static Selector get(const C &view) + { + if (view.template isA< Selector >()) + return view.template asA< Selector >(); + else + return view.chains(); + } + + template + static Selector get(const C &view, const ID &id) + { + return view.chains(id); + } + + static void raise_duplicate(const QString &id, int n) + { + throw SireMol::duplicate_chain(QObject::tr( + "Multiple chains matched %1. Number of matches is %2.") + .arg(id).arg(n), CODELOC); + } + + static void raise_missing(const QString &id) + { + throw SireMol::missing_chain(QObject::tr( + "No chain matches %1.").arg(id), CODELOC); + } +}; + +template<> +struct _get_view +{ + template + static int count(const C &mols) + { + return mols.nCutGroups(); + } + + template + static CutGroup at(const C &mols, int idx) + { + return mols.cutGroup(idx); + } + + static SelectorM getName(const SelectorM &view, + const QString &name) + { + return view.cutGroup(name); + } + + static SelectorM getID(const SelectorM &view, + const CutGroup::ID &id) + { + return view.cutGroups(id); + } + + template + static Selector get(const C &view) + { + if (view.template isA< Selector >()) + return view.template asA< Selector >(); + else + return view.cutGroups(); + } + + template + static Selector get(const C &view, const ID &id) + { + return view.cutGroups(id); + } + + static void raise_duplicate(const QString &id, int n) + { + throw SireMol::duplicate_cutgroup(QObject::tr( + "Multiple CutGroups matched %1. Number of matches is %2.") + .arg(id).arg(n), CODELOC); + } + + static void raise_missing(const QString &id) + { + throw SireMol::missing_cutgroup(QObject::tr( + "No CutGroup matches %1.").arg(id), CODELOC); + } +}; + +template<> +struct _get_view +{ + template + static int count(const C &mols) + { + return mols.nSegments(); + } + + template + static Segment at(const C &mols, int idx) + { + return mols.segment(idx); + } + + static SelectorM getName(const SelectorM &view, + const QString &name) + { + return view.segments(name); + } + + static SelectorM getID(const SelectorM &view, + const Segment::ID &id) + { + return view.segments(id); + } + + template + static Selector get(const C &view) + { + if (view.template isA< Selector >()) + return view.template asA< Selector >(); + else + return view.segments(); + } + + template + static Selector get(const C &view, const ID &id) + { + return view.segments(id); + } + + static void raise_duplicate(const QString &id, int n) + { + throw SireMol::duplicate_segment(QObject::tr( + "Multiple segments matched %1. Number of matches is %2.") + .arg(id).arg(n), CODELOC); + } + + static void raise_missing(const QString &id) + { + throw SireMol::missing_segment(QObject::tr( + "No segment matches %1.").arg(id), CODELOC); + } +}; + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorMol &mols) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &mol : mols) + { + this->vws += _get_view::get(mol); + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +void SelectorM::_append(const T &view) +{ + if (this->vws.isEmpty()) + { + this->vws.append(Selector(view)); + } + else if (this->vws.last().data().number() != view.data().number()) + { + // new molecule + this->vws.append(Selector(view)); + } + else + { + // a new view in the current molecule + this->vws.last() = this->vws.last().add(view); + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const Molecules &molecules) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + if (not molecules.isEmpty()) + { + auto toList = [](const QSet &molnums) + { + //return QList(molnums.constBegin(), molnums.constEnd()); + return molnums.values(); + }; + + auto molnums = toList(molecules.molNums()); + + //sort them, as this is also likely the order the molecules + //were read in from a file, and so more likely to be the + //order the user would expect + std::sort(molnums.begin(), molnums.end()); + + this->vws.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + this->vws.append(_get_view::get(molecules.at(molnum))); + } + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const MoleculeGroup &molecules) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + if (not molecules.isEmpty()) + { + const auto molnums = molecules.molNums(); + this->vws.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + this->vws.append(_get_view::get(molecules.at(molnum))); + } + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const MolGroupsBase &molecules) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + if (not molecules.isEmpty()) + { + const auto molnums = molecules.molNums(); + this->vws.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + this->vws.append(_get_view::get(molecules.at(molnum))); + } + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectResult &molecules) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + if (not molecules.isEmpty()) + { + this->vws.reserve(molecules.count()); + + for (const auto &mol : molecules) + { + this->vws.append(_get_view::get(*mol)); + } + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorMol &mols, const SireBase::Slice &slice) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (auto it = slice.begin(_get_view::count(mols)); + not it.atEnd(); it.next()) + { + this->_append(_get_view::at(mols, it.value())); + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorMol &mols, const QList &idxs) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &idx : idxs) + { + this->_append(_get_view::at(mols, idx)); + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorMol &mols, const QString &name) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &mol : mols) + { + auto flag = SireError::exception::enableFastExceptions(); + + try + { + this->vws.append(_get_view::get(mol, typename T::Name(name))); + } + catch(...) + {} + } + + if (this->vws.isEmpty()) + { + // try a search + try + { + this->operator=(SelectorM(mols.search(name))); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + _get_view::raise_missing(name); + else + //likely a syntax error + throw; + } + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorMol &mols, const typename T::ID &id) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &mol : mols) + { + auto flag = SireError::exception::enableFastExceptions(); + + try + { + this->vws.append(_get_view::get(mol, id)); + } + catch(...) + {} + } + + if (this->vws.isEmpty()) + _get_view::raise_missing(id.toString()); +} + +template +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorM &other) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &o : other) + { + this->vws.append(_get_view::get(o)); + } +} + +template +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorM &other, const SireBase::Slice &slice) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (auto it = slice.begin(_get_view::count(other)); + not it.atEnd(); it.next()) + { + this->_append(_get_view::at(other, it.value())); + } +} + +template +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorM &other, const QList &idxs) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &idx : idxs) + { + this->_append(_get_view::at(other, idx)); + } +} + +template +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorM &other, const QString &name) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &view : other) + { + auto flag = SireError::exception::enableFastExceptions(); + + try + { + this->vws.append(_get_view::get(view, name)); + } + catch(...) + {} + } + + if (this->vws.isEmpty()) + { + // try a search + try + { + this->operator=(SelectorM(other.search(name))); + } + catch(...) + { + if (name.length() < 5) + //likely a name error + _get_view::raise_missing(name); + else + //likely a syntax error + throw; + } + } +} + +template +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorM &other, const typename T::ID &id) + : SireBase::ConcreteProperty,SireBase::Property>() +{ + for (const auto &view : other) + { + auto flag = SireError::exception::enableFastExceptions(); + + try + { + this->vws.append(_get_view::get(view, id)); + } + catch(...) + {} + } + + if (this->vws.isEmpty()) + _get_view::raise_missing(id.toString()); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::SelectorM(const SelectorM &other) + : SireBase::ConcreteProperty,SireBase::Property>(), + vws(other.vws) +{} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM::~SelectorM() +{} + +template +SIRE_OUTOFLINE_TEMPLATE +const char* SelectorM::typeName() +{ + return QMetaType::typeName( qMetaTypeId< SelectorM >() ); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM& SelectorM::operator=(const SelectorM &other) +{ + if (this != &other) + { + this->vws = other.vws; + Property::operator=(other); + } + + return *this; +} + +template +SIRE_OUTOFLINE_TEMPLATE +bool SelectorM::operator==(const SelectorM &other) const +{ + return vws == other.vws; +} + +template +SIRE_OUTOFLINE_TEMPLATE +bool SelectorM::operator!=(const SelectorM &other) const +{ + return not this->operator==(other); +} + +template +SIRE_OUTOFLINE_TEMPLATE +T SelectorM::operator[](int i) const +{ + i = SireID::Index(i).map(this->count()); + + for (const auto &v : vws) + { + if (i < v.count()) + { + return v(i); + } + else + { + i -= v.count(); + } + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return T(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::operator[](const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::operator[](const QList &idxs) const +{ + return SelectorM(*this,idxs); +} + + +template +SIRE_OUTOFLINE_TEMPLATE +T SelectorM::operator[](const QString &name) const +{ + auto all = _get_view::getName(*this, name); + + if (all.count() > 1) + { + _get_view::raise_duplicate(name, all.count()); + } + + BOOST_ASSERT( not all.isEmpty() ); + + return all(0); +} + +template +SIRE_OUTOFLINE_TEMPLATE +T SelectorM::operator[](const typename T::ID &id) const +{ + auto all = _get_view::getID(*this, id); + + if (all.count() > 1) + { + _get_view::raise_duplicate(id.toString(), all.count()); + } + + BOOST_ASSERT( not all.isEmpty() ); + + return all(0); +} + +template +SIRE_OUTOFLINE_TEMPLATE +T SelectorM::operator()(int i) const +{ + return this->operator[](i); +} + +template +SIRE_OUTOFLINE_TEMPLATE +T SelectorM::operator()(const QString &name) const +{ + return this->operator[](name); +} + +template +SIRE_OUTOFLINE_TEMPLATE +T SelectorM::operator()(const typename T::ID &id) const +{ + return this->operator[](id); +} + +template +SIRE_OUTOFLINE_TEMPLATE +QList SelectorM::toList() const +{ + QList l; + l.reserve(vws.count()); + + for (const auto &v : vws) + { + l.append(MolViewPtr(v.clone())); + } + + return l; +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectResult SelectorM::toSelectResult() const +{ + return SelectResult(this->vws); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectResult SelectorM::search(const QString &search_term) const +{ + return this->toSelectResult().search(search_term); +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::count() const +{ + int n = 0; + + for (const auto &v : this->vws) + { + n += v.count(); + } + + return n; +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::size() const +{ + return this->count(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +MoleculeGroup SelectorM::toMoleculeGroup() const +{ + MoleculeGroup grp; + + for (const auto &view : this->vws) + { + grp.add(view); + } + + return grp; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Molecule SelectorM::molecule(int i) const +{ + i = SireID::Index(i).map(this->vws.count()); + + return this->vws.at(i).molecule(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Molecule SelectorM::molecule(const QString &name) const +{ + auto mols = this->molecules(name); + + if (mols.count() > 1) + throw SireMol::duplicate_molecule(QObject::tr( + "More than one molecule matches '%1'. Number of matches is %2.") + .arg(name).arg(mols.count()), CODELOC); + + BOOST_ASSERT(not mols.isEmpty()); + + return mols[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Molecule SelectorM::molecule(const MolID &molid) +{ + auto mols = this->molecules(molid); + + if (mols.count() > 1) + throw SireMol::duplicate_molecule(QObject::tr( + "More than one molecule matches '%1'. Number of matches is %2.") + .arg(molid.toString()).arg(mols.count()), CODELOC); + + BOOST_ASSERT(not mols.isEmpty()); + + return mols[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol SelectorM::molecules() const +{ + return SelectorMol(*this); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol SelectorM::molecules(int i) const +{ + return SelectorMol(this->molecule(i)); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol SelectorM::molecules(const SireBase::Slice &slice) const +{ + return SelectorMol(*this, slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol SelectorM::molecules(const QList &idxs) const +{ + return SelectorMol(*this, idxs); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol SelectorM::molecules(const QString &name) const +{ + return SelectorMol(*this, name); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol SelectorM::molecules(const MolID &molid) const +{ + return SelectorMol(*this, molid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Atom SelectorM::atom(int i) const +{ + i = SireID::Index(i).map(this->nAtoms()); + + for (const auto &v : this->vws) + { + if (i < v.nAtoms()) + { + return v.atom(i); + } + else + { + i -= v.nAtoms(); + } + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Atom(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Atom SelectorM::atom(const QString &name) const +{ + auto all = this->atoms(name); + + if (all.count() > 1) + _get_view::raise_duplicate(name, all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Atom SelectorM::atom(const AtomID &atomid) const +{ + auto all = this->atoms(atomid); + + if (all.count() > 1) + _get_view::raise_duplicate(atomid.toString(), all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Residue SelectorM::residue(int i) const +{ + i = SireID::Index(i).map(this->nResidues()); + + for (const auto &v : this->vws) + { + if (i < v.nResidues()) + { + return v.residue(i); + } + else + { + i -= v.nResidues(); + } + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Residue(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Residue SelectorM::residue(const QString &name) const +{ + auto all = this->residues(name); + + if (all.count() > 1) + _get_view::raise_duplicate(name, all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Residue SelectorM::residue(const ResID &resid) const +{ + auto all = this->residues(resid); + + if (all.count() > 1) + _get_view::raise_duplicate(resid.toString(), all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Chain SelectorM::chain(int i) const +{ + i = SireID::Index(i).map(this->nChains()); + + for (const auto &v : this->vws) + { + if (i < v.nChains()) + { + return v.chain(i); + } + else + { + i -= v.nChains(); + } + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Chain(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Chain SelectorM::chain(const QString &name) const +{ + auto all = this->chains(name); + + if (all.count() > 1) + _get_view::raise_duplicate(name, all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Chain SelectorM::chain(const ChainID &chainid) const +{ + auto all = this->chains(chainid); + + if (all.count() > 1) + _get_view::raise_duplicate(chainid.toString(), all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Segment SelectorM::segment(int i) const +{ + i = SireID::Index(i).map(this->nSegments()); + + for (const auto &v : this->vws) + { + if (i < v.nSegments()) + { + return v.segment(i); + } + else + { + i -= v.nSegments(); + } + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Segment(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +Segment SelectorM::segment(const QString &name) const +{ + auto all = this->segments(name); + + if (all.count() > 1) + _get_view::raise_duplicate(name, all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +Segment SelectorM::segment(const SegID &segid) const +{ + auto all = this->segments(segid); + + if (all.count() > 1) + _get_view::raise_duplicate(segid.toString(), all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +CutGroup SelectorM::cutGroup(int i) const +{ + i = SireID::Index(i).map(this->nCutGroups()); + + for (const auto &v : this->vws) + { + if (i < v.nCutGroups()) + { + return v.cutGroup(i); + } + else + { + i -= v.nCutGroups(); + } + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return CutGroup(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +CutGroup SelectorM::cutGroup(const QString &name) const +{ + auto all = this->cutGroups(name); + + if (all.count() > 1) + _get_view::raise_duplicate(name, all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +CutGroup SelectorM::cutGroup(const CGID &cgid) const +{ + auto all = this->cutGroups(cgid); + + if (all.count() > 1) + _get_view::raise_duplicate(cgid.toString(), all.count()); + + BOOST_ASSERT( not all.isEmpty() ); + + return all[0]; +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::atoms() const +{ + return SelectorM(*this); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::atoms(int i) const +{ + return SelectorM(this->atom(i)); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::atoms(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::atoms(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::atoms(const QString &name) const +{ + return SelectorM(*this, name); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::atoms(const AtomID &atomid) const +{ + return SelectorM(*this, atomid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::residues() const +{ + return SelectorM(*this); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::residues(int i) const +{ + return SelectorM(this->residue(i)); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::residues(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::residues(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::residues(const QString &name) const +{ + return SelectorM(*this, name); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::residues(const ResID &resid) const +{ + return SelectorM(*this, resid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::chains() const +{ + return SelectorM(*this); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::chains(int i) const +{ + return SelectorM(this->chain(i)); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::chains(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::chains(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::chains(const QString &name) const +{ + return SelectorM(*this, name); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::chains(const ChainID &chainid) const +{ + return SelectorM(*this, chainid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::segments() const +{ + return SelectorM(*this); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::segments(int i) const +{ + return SelectorM(this->segment(i)); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::segments(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::segments(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::segments(const QString &name) const +{ + return SelectorM(*this, name); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::segments(const SegID &segid) const +{ + return SelectorM(*this, segid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::cutGroups() const +{ + return SelectorM(*this); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::cutGroups(int i) const +{ + return SelectorM(this->cutGroup(i)); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::cutGroups(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::cutGroups(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::cutGroups(const QString &name) const +{ + return SelectorM(*this, name); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorM SelectorM::cutGroups(const CGID &cgid) const +{ + return SelectorM(*this, cgid); +} + +template +SIRE_OUTOFLINE_TEMPLATE +QList SelectorM::IDs() const +{ + QList ids; + + for (const auto &v : this->vws) + { + ids += v.IDs(); + } + + return ids; +} + +template +SIRE_OUTOFLINE_TEMPLATE +QList SelectorM::indexes() const +{ + QList idxs; + + for (const auto &v : this->vws) + { + idxs += v.indexes(); + } + + return idxs; +} + +template +SIRE_OUTOFLINE_TEMPLATE +QList SelectorM::numbers() const +{ + QList nums; + + for (const auto &v : this->vws) + { + nums += v.numbers(); + } + + return nums; +} + +template +SIRE_OUTOFLINE_TEMPLATE +QList SelectorM::names() const +{ + QList nmes; + + for (const auto &v : this->vws) + { + nmes += v.names(); + } + + return nmes; +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::nAtoms() const +{ + int n = 0; + + for (const auto &v : this->vws) + { + n += v.nAtoms(); + } + + return n; +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::nResidues() const +{ + int n = 0; + + for (const auto &v : this->vws) + { + n += v.nResidues(); + } + + return n; +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::nChains() const +{ + int n = 0; + + for (const auto &v : this->vws) + { + n += v.nChains(); + } + + return n; +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::nSegments() const +{ + int n = 0; + + for (const auto &v : this->vws) + { + n += v.nSegments(); + } + + return n; +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::nCutGroups() const +{ + int n = 0; + + for (const auto &v : this->vws) + { + n += v.nCutGroups(); + } + + return n; +} + +template +SIRE_OUTOFLINE_TEMPLATE +int SelectorM::nMolecules() const +{ + return this->vws.count(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +bool SelectorM::isEmpty() const +{ + return this->vws.isEmpty(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +typename SelectorM::const_iterator SelectorM::begin() const +{ + return this->vws.constBegin(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +typename SelectorM::const_iterator SelectorM::end() const +{ + return this->vws.constEnd(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +typename SelectorM::const_iterator SelectorM::constBegin() const +{ + return this->vws.constBegin(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +typename SelectorM::const_iterator SelectorM::constEnd() const +{ + return this->vws.constEnd(); +} + +template +SIRE_OUTOFLINE_TEMPLATE +QString SelectorM::toString() const +{ + if (this->isEmpty()) + { + return QObject::tr("%1::empty").arg(this->what()); + } + else + { + QStringList parts; + + const auto n = this->count(); + + if (n <= 10) + { + for (int i=0; ioperator[](i); + + parts.append(QString("%1: %2 %3") + .arg(i).arg(view.data().number().toString()) + .arg(view.toString())); + } + } + else + { + for (int i=0; i<5; ++i) + { + const auto view = this->operator[](i); + + parts.append(QString("%1: %2 %3") + .arg(i).arg(view.data().number().toString()) + .arg(view.toString())); + } + + parts.append("..."); + + for (int i=n-5; ioperator[](i); + + parts.append(QString("%1: %2 %3") + .arg(i).arg(view.data().number().toString()) + .arg(view.toString())); + } + } + + return QObject::tr("%1( size=%2\n%3\n)") + .arg(this->what()).arg(n) + .arg(parts.join("\n")); + } +} + +#endif // SIRE_SKIP_INLINE_FUNCTIONS + +} // end of namespace SireMol + +#include "evaluatorm.h" + +#ifndef SIRE_SKIP_INLINE_FUNCTIONS + +namespace SireMol +{ + +template +SIRE_OUTOFLINE_TEMPLATE +EvaluatorM::EvaluatorM(const SelectorM &views) + : SireBase::ConcreteProperty() +{ + this->vws.reserve(views.count()); + + for (const auto &view : views) + { + this->vws.append(PartialMolecule(view)); + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +EvaluatorM SelectorM::evaluate() const +{ + return EvaluatorM(*this); +} + +} // end of namespace SireMol + +#endif // SIRE_SKIP_INLINE_FUNCTIONS + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireMol/selectormol.cpp b/corelib/src/libs/SireMol/selectormol.cpp new file mode 100644 index 000000000..7b269ba0e --- /dev/null +++ b/corelib/src/libs/SireMol/selectormol.cpp @@ -0,0 +1,1259 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "selectormol.h" +#include "selectorm.hpp" +#include "molecules.h" +#include "moleculegroup.h" +#include "moleculegroups.h" +#include "evaluatorm.h" + +#include "atomid.h" +#include "resid.h" +#include "chainid.h" +#include "segid.h" +#include "cgid.h" +#include "molid.h" +#include "molidx.h" +#include "molnum.h" +#include "molname.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" +#include "SireError/errors.h" + +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" + +using namespace SireBase; +using namespace SireStream; +using namespace SireMol; +using namespace SireID; + +RegisterMetaType r_smol; +RegisterMetaType< SelectorM > r_satm; +RegisterMetaType< SelectorM > r_sres; +RegisterMetaType< SelectorM > r_schn; +RegisterMetaType< SelectorM > r_sseg; +RegisterMetaType< SelectorM > r_scg; + +/** Serialise to a binary datastream */ +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SelectorMol &mols) +{ + writeHeader(ds, r_smol, 1); + + SharedDataStream sds(ds); + + sds << mols.mols << static_cast(mols); + + return ds; +} + +/** Extract from a binary datastream */ +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SelectorMol &mols) +{ + VersionID v = readHeader(ds, r_smol); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> mols.mols >> static_cast(mols); + } + else + throw version_error(v, "1", r_smol, CODELOC); + + return ds; +} + +/** Serialise to a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SelectorM &mols) +{ + writeHeader(ds, r_satm, 1); + + SharedDataStream sds(ds); + + sds << mols.vws << static_cast(mols); + + return ds; +} + +/** Extract from a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SelectorM &mols) +{ + VersionID v = readHeader(ds, r_satm); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> mols.vws >> static_cast(mols); + } + else + throw version_error(v, "1", r_satm, CODELOC); + + return ds; +} +/** Serialise to a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SelectorM &mols) +{ + writeHeader(ds, r_sres, 1); + + SharedDataStream sds(ds); + + sds << mols.vws << static_cast(mols); + + return ds; +} + +/** Extract from a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SelectorM &mols) +{ + VersionID v = readHeader(ds, r_sres); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> mols.vws >> static_cast(mols); + } + else + throw version_error(v, "1", r_sres, CODELOC); + + return ds; +} +/** Serialise to a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SelectorM &mols) +{ + writeHeader(ds, r_schn, 1); + + SharedDataStream sds(ds); + + sds << mols.vws << static_cast(mols); + + return ds; +} + +/** Extract from a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SelectorM &mols) +{ + VersionID v = readHeader(ds, r_schn); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> mols.vws >> static_cast(mols); + } + else + throw version_error(v, "1", r_schn, CODELOC); + + return ds; +} +/** Serialise to a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SelectorM &mols) +{ + writeHeader(ds, r_sseg, 1); + + SharedDataStream sds(ds); + + sds << mols.vws << static_cast(mols); + + return ds; +} + +/** Extract from a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SelectorM &mols) +{ + VersionID v = readHeader(ds, r_sseg); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> mols.vws >> static_cast(mols); + } + else + throw version_error(v, "1", r_sseg, CODELOC); + + return ds; +} +/** Serialise to a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator<<(QDataStream &ds, const SelectorM &mols) +{ + writeHeader(ds, r_scg, 1); + + SharedDataStream sds(ds); + + sds << mols.vws << static_cast(mols); + + return ds; +} + +/** Extract from a binary datastream */ +template<> +SIREMOL_EXPORT QDataStream &operator>>(QDataStream &ds, SelectorM &mols) +{ + VersionID v = readHeader(ds, r_scg); + + if (v == 1) + { + SharedDataStream sds(ds); + sds >> mols.vws >> static_cast(mols); + } + else + throw version_error(v, "1", r_scg, CODELOC); + + return ds; +} + +SelectorMol::SelectorMol() : ConcreteProperty() +{} + +SelectorMol::SelectorMol(const MoleculeView &mol) + : ConcreteProperty() +{ + this->mols.append(mol.molecule()); +} + +SelectorMol::SelectorMol(const Molecules &molecules) + : ConcreteProperty() +{ + if (not molecules.isEmpty()) + { + auto toList = [](const QSet &molnums) + { + return molnums.values(); + }; + + auto molnums = toList(molecules.molNums()); + + //sort them, as this is also likely the order the molecules + //were read in from a file, and so more likely to be the + //order the user would expect + std::sort(molnums.begin(), molnums.end()); + + this->mols.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + this->mols.append(molecules.at(molnum).molecule()); + } + } +} + +SelectorMol::SelectorMol(const MoleculeGroup &molecules) + : ConcreteProperty() +{ + if (not molecules.isEmpty()) + { + const auto molnums = molecules.molNums(); + this->mols.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + this->mols.append(molecules.at(molnum).molecule()); + } + } +} + +SelectorMol::SelectorMol(const MolGroupsBase &molecules) + : ConcreteProperty() +{ + if (not molecules.isEmpty()) + { + const auto molnums = molecules.molNums(); + this->mols.reserve(molnums.count()); + + for (const auto &molnum : molnums) + { + this->mols.append(molecules.at(molnum).molecule()); + } + } +} + +SelectorMol::SelectorMol(const SelectResult &molecules) + : ConcreteProperty() +{ + if (not molecules.isEmpty()) + { + this->mols.reserve(molecules.count()); + + for (const auto &mol : molecules) + { + this->mols.append(mol->molecule()); + } + } +} + +SelectorMol::SelectorMol(const SelectorMol &other) + : ConcreteProperty(), + mols(other.mols) +{} + +SelectorMol::~SelectorMol() +{} + +const char* SelectorMol::typeName() +{ + return QMetaType::typeName(qMetaTypeId()); +} + +SelectorMol& SelectorMol::operator=(const SelectorMol &other) +{ + if (this != &other) + { + mols = other.mols; + Property::operator=(other); + } + + return *this; +} + +bool SelectorMol::operator==(const SelectorMol &other) const +{ + return mols == other.mols; +} + +bool SelectorMol::operator!=(const SelectorMol &other) const +{ + return not SelectorMol::operator==(other); +} + +Molecule SelectorMol::operator[](int i) const +{ + return this->molecule(i); +} + +SelectorMol SelectorMol::operator[](const Slice &slice) const +{ + return this->molecules(slice); +} + +SelectorMol SelectorMol::operator[](const QList &idxs) const +{ + return this->molecules(idxs); +} + +Molecule SelectorMol::operator[](const QString &name) const +{ + return this->molecule(name); +} + +Molecule SelectorMol::operator[](const MolIdx &molid) const +{ + return this->molecule(molid); +} + +Molecule SelectorMol::operator[](const MolName &molid) const +{ + return this->molecule(molid); +} + +Molecule SelectorMol::operator[](const MolNum &molid) const +{ + return this->molecule(molid); +} + +Molecule SelectorMol::operator[](const MolID &molid) const +{ + return this->molecule(molid); +} + +QList SelectorMol::toList() const +{ + QList l; + l.reserve(mols.count()); + + for (const auto &mol : mols) + { + l.append(MolViewPtr(mol.clone())); + } + + return l; +} + +SelectResult SelectorMol::toSelectResult() const +{ + return SelectResult(this->mols); +} + +EvaluatorM SelectorMol::evaluate() const +{ + return EvaluatorM(*this); +} + +SelectResult SelectorMol::search(const QString &search_string) const +{ + return this->toSelectResult().search(search_string); +} + +int SelectorMol::count() const +{ + return this->mols.count(); +} + +int SelectorMol::size() const +{ + return this->mols.count(); +} + +bool SelectorMol::contains(const MolNum &molnum) const +{ + for (const auto &mol : this->mols) + { + if (mol.number() == molnum) + return true; + } + + return false; +} + +Molecule SelectorMol::molecule(int i) const +{ + return this->mols.at(Index(i).map(this->mols.count())); +} + +Molecule SelectorMol::molecule(const QString &name) const +{ + auto m = this->molecules(name); + + if (m.count() > 1) + throw SireMol::duplicate_molecule(QObject::tr( + "More than one molecule matches %1. Number of matches is %2.") + .arg(name).arg(m.count()), CODELOC); + + BOOST_ASSERT(m.count() != 0); + + return m[0]; +} + +Molecule SelectorMol::molecule(const MolIdx &molid) const +{ + auto m = this->molecules(molid); + + if (m.count() > 1) + throw SireMol::duplicate_molecule(QObject::tr( + "More than one molecule matches %1. Number of matches is %2.") + .arg(molid.toString()).arg(m.count()), CODELOC); + + BOOST_ASSERT(m.count() != 0); + + return m[0]; +} + +Molecule SelectorMol::molecule(const MolName &molid) const +{ + auto m = this->molecules(molid); + + if (m.count() > 1) + throw SireMol::duplicate_molecule(QObject::tr( + "More than one molecule matches %1. Number of matches is %2.") + .arg(molid.toString()).arg(m.count()), CODELOC); + + BOOST_ASSERT(m.count() != 0); + + return m[0]; +} + +Molecule SelectorMol::molecule(const MolNum &molid) const +{ + auto m = this->molecules(molid); + + if (m.count() > 1) + throw SireMol::duplicate_molecule(QObject::tr( + "More than one molecule matches %1. Number of matches is %2.") + .arg(molid.toString()).arg(m.count()), CODELOC); + + BOOST_ASSERT(m.count() != 0); + + return m[0]; +} + +Molecule SelectorMol::molecule(const MolID &molid) const +{ + auto m = this->molecules(molid); + + if (m.count() > 1) + throw SireMol::duplicate_molecule(QObject::tr( + "More than one molecule matches %1. Number of matches is %2.") + .arg(molid.toString()).arg(m.count()), CODELOC); + + BOOST_ASSERT(m.count() != 0); + + return m[0]; +} + +SelectorMol SelectorMol::molecules() const +{ + return *this; +} + +SelectorMol SelectorMol::molecules(int i) const +{ + return SelectorMol(this->molecule(i)); +} + +SelectorMol SelectorMol::molecules(const SireBase::Slice &slice) const +{ + SelectorMol m; + + for (auto it = slice.begin(this->mols.count()); not it.atEnd(); it.next()) + { + m.mols.append(this->mols.at(it.value())); + } + + return m; +} + +SelectorMol SelectorMol::molecules(const QList &idxs) const +{ + SelectorMol m; + + for (const auto &idx : idxs) + { + m.mols.append(this->molecule(idx)); + } + + return m; +} + +SelectorMol SelectorMol::molecules(const QString &name) const +{ + try + { + return this->molecules(MolName(name)); + } + catch(const SireError::exception &e) + { + try + { + SelectorMol ret(this->search(name)); + + if (ret.count() == 0) + throw SireMol::missing_molecule(QObject::tr( + "No molecule matches '%1'").arg(name), CODELOC); + + return ret; + } + catch(...) + { + if (name.length() < 5) + //likely a name error + e.throwSelf(); + else + //likely a syntax error + throw; + } + } + + return SelectorMol(); +} + +SelectorMol SelectorMol::molecules(const MolIdx &molid) const +{ + return this->molecules(molid.value()); +} + +SelectorMol SelectorMol::molecules(const MolName &molname) const +{ + SelectorMol m; + + for (const auto &mol : this->mols) + { + if (mol.name() == molname) + { + m.mols.append(mol); + } + } + + if (m.isEmpty()) + throw SireMol::missing_molecule(QObject::tr( + "There is no molecule called %1 in this container.") + .arg(molname), CODELOC); + + return m; +} + +SelectorMol SelectorMol::molecules(const MolNum &molnum) const +{ + SelectorMol m; + + for (const auto &mol : this->mols) + { + if (mol.number() == molnum) + { + m.mols.append(mol); + // there should only be one matching molecule + break; + } + } + + if (m.isEmpty()) + throw SireMol::missing_molecule(QObject::tr( + "There is no molecule with number %1 in this container.") + .arg(molnum), CODELOC); + + return m; +} + +MoleculeGroup SelectorMol::toMoleculeGroup() const +{ + MoleculeGroup grp; + + for (const auto &mol : this->mols) + { + grp.add(mol); + } + + return grp; +} + +SelectorMol SelectorMol::molecules(const MolID &molid) const +{ + auto molnums = molid.map(this->toMoleculeGroup()); + + QHash m; + + //QSet molnums_set(molnums.constBegin(), molnums.constEnd()); + QSet molnums_set = _list_to_set(molnums); + + for (const auto &mol : this->mols) + { + if (molnums_set.contains(mol.number())) + { + if (not m.contains(mol.number())) + { + m.insert(mol.number(), mol); + + if (m.count() == molnums_set.count()) + break; + } + } + } + + SelectorMol ret; + + for (const auto &molnum : molnums) + { + ret.mols.append(m[molnum]); + } + + return ret; +} + +Atom SelectorMol::atom(int i) const +{ + i = Index(i).map(this->nAtoms()); + + for (const auto &mol : this->mols) + { + if (i < mol.nAtoms()) + return mol.atom(AtomIdx(i)); + else + i -= mol.nAtoms(); + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Atom(); +} + +Atom SelectorMol::atom(const QString &name) const +{ + auto atms = this->atoms(name); + + if (atms.count() > 1) + throw SireMol::duplicate_atom(QObject::tr( + "More than one atom matches the name '%1'. Number of matches is %2.") + .arg(name).arg(atms.count()), CODELOC); + + BOOST_ASSERT(not atms.isEmpty()); + + return atms[0]; +} + +Atom SelectorMol::atom(const AtomID &atomid) const +{ + auto atms = this->atoms(atomid); + + if (atms.count() > 1) + throw SireMol::duplicate_atom(QObject::tr( + "More than one atom matches '%1'. Number of matches is %2.") + .arg(atomid.toString()).arg(atms.count()), CODELOC); + + BOOST_ASSERT(not atms.isEmpty()); + + return atms[0]; +} + +Residue SelectorMol::residue(int i) const +{ + i = Index(i).map(this->nResidues()); + + for (const auto &mol : this->mols) + { + if (i < mol.nResidues()) + return mol.residue(ResIdx(i)); + else + i -= mol.nResidues(); + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Residue(); +} + +Residue SelectorMol::residue(const QString &name) const +{ + auto res = this->residues(name); + + if (res.count() > 1) + throw SireMol::duplicate_residue(QObject::tr( + "More than one residue matches the name '%1'. Number of matches is %2.") + .arg(name).arg(res.count()), CODELOC); + + BOOST_ASSERT(not res.isEmpty()); + + return res[0]; +} + +Residue SelectorMol::residue(const ResID &resid) const +{ + auto res = this->residues(resid); + + if (res.count() > 1) + throw SireMol::duplicate_residue(QObject::tr( + "More than one residue matches '%1'. Number of matches is %2.") + .arg(resid.toString()).arg(res.count()), CODELOC); + + BOOST_ASSERT(not res.isEmpty()); + + return res[0]; +} + +Chain SelectorMol::chain(int i) const +{ + i = Index(i).map(this->nChains()); + + for (const auto &mol : this->mols) + { + if (i < mol.nChains()) + return mol.chain(ChainIdx(i)); + else + i -= mol.nChains(); + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Chain(); +} + +Chain SelectorMol::chain(const QString &name) const +{ + auto cs = this->chains(name); + + if (cs.count() > 1) + throw SireMol::duplicate_chain(QObject::tr( + "More than one chain matches the name '%1'. Number of matches is %2.") + .arg(name).arg(cs.count()), CODELOC); + + BOOST_ASSERT(not cs.isEmpty()); + + return cs[0]; +} + +Chain SelectorMol::chain(const ChainID &chainid) const +{ + auto cs = this->chains(chainid); + + if (cs.count() > 1) + throw SireMol::duplicate_chain(QObject::tr( + "More than one chain matches '%1'. Number of matches is %2.") + .arg(chainid.toString()).arg(cs.count()), CODELOC); + + BOOST_ASSERT(not cs.isEmpty()); + + return cs[0]; +} + +Segment SelectorMol::segment(int i) const +{ + i = Index(i).map(this->nSegments()); + + for (const auto &mol : this->mols) + { + if (i < mol.nSegments()) + return mol.segment(SegIdx(i)); + else + i -= mol.nSegments(); + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return Segment(); +} + +Segment SelectorMol::segment(const QString &name) const +{ + auto segs = this->segments(name); + + if (segs.count() > 1) + throw SireMol::duplicate_segment(QObject::tr( + "More than one segment matches the name '%1'. Number of matches is %2.") + .arg(name).arg(segs.count()), CODELOC); + + BOOST_ASSERT(not segs.isEmpty()); + + return segs[0]; +} + +Segment SelectorMol::segment(const SegID &segid) const +{ + auto segs = this->segments(segid); + + if (segs.count() > 1) + throw SireMol::duplicate_segment(QObject::tr( + "More than one segment matches '%1'. Number of matches is %2.") + .arg(segid.toString()).arg(segs.count()), CODELOC); + + BOOST_ASSERT(not segs.isEmpty()); + + return segs[0]; +} + +CutGroup SelectorMol::cutGroup(int i) const +{ + i = Index(i).map(this->nCutGroups()); + + for (const auto &mol : this->mols) + { + if (i < mol.nCutGroups()) + return mol.cutGroup(CGIdx(i)); + else + i -= mol.nCutGroups(); + } + + throw SireError::program_bug(QObject::tr("Should not get here!"), CODELOC); + + return CutGroup(); +} + +CutGroup SelectorMol::cutGroup(const QString &name) const +{ + auto cgs = this->cutGroups(name); + + if (cgs.count() > 1) + throw SireMol::duplicate_cutgroup(QObject::tr( + "More than one CutGroup matches the name '%1'. Number of matches is %2.") + .arg(name).arg(cgs.count()), CODELOC); + + BOOST_ASSERT(not cgs.isEmpty()); + + return cgs[0]; +} + +CutGroup SelectorMol::cutGroup(const CGID &cgid) const +{ + auto cgs = this->cutGroups(cgid); + + if (cgs.count() > 1) + throw SireMol::duplicate_cutgroup(QObject::tr( + "More than one CutGroup matches '%1'. Number of matches is %2.") + .arg(cgid.toString()).arg(cgs.count()), CODELOC); + + BOOST_ASSERT(not cgs.isEmpty()); + + return cgs[0]; +} + +SelectorM SelectorMol::atoms() const +{ + return SelectorM(*this); +} + +SelectorM SelectorMol::atoms(int i) const +{ + return SelectorM(this->atom(i)); +} + +SelectorM SelectorMol::atoms(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +SelectorM SelectorMol::atoms(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +SelectorM SelectorMol::atoms(const QString &name) const +{ + return SelectorM(*this, name); +} + +SelectorM SelectorMol::atoms(const AtomID &atomid) const +{ + return SelectorM(*this, atomid); +} + +SelectorM SelectorMol::residues() const +{ + return SelectorM(*this); +} + +SelectorM SelectorMol::residues(int i) const +{ + return SelectorM(this->residue(i)); +} + +SelectorM SelectorMol::residues(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +SelectorM SelectorMol::residues(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +SelectorM SelectorMol::residues(const QString &name) const +{ + return SelectorM(*this, name); +} + +SelectorM SelectorMol::residues(const ResID &resid) const +{ + return SelectorM(*this, resid); +} + +SelectorM SelectorMol::chains() const +{ + return SelectorM(*this); +} + +SelectorM SelectorMol::chains(int i) const +{ + return SelectorM(this->chain(i)); +} + +SelectorM SelectorMol::chains(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +SelectorM SelectorMol::chains(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +SelectorM SelectorMol::chains(const QString &name) const +{ + return SelectorM(*this, name); +} + +SelectorM SelectorMol::chains(const ChainID &chainid) const +{ + return SelectorM(*this, chainid); +} + +SelectorM SelectorMol::segments() const +{ + return SelectorM(*this); +} + +SelectorM SelectorMol::segments(int i) const +{ + return SelectorM(this->segment(i)); +} + +SelectorM SelectorMol::segments(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +SelectorM SelectorMol::segments(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +SelectorM SelectorMol::segments(const QString &name) const +{ + return SelectorM(*this, name); +} + +SelectorM SelectorMol::segments(const SegID &segid) const +{ + return SelectorM(*this, segid); +} + +SelectorM SelectorMol::cutGroups() const +{ + return SelectorM(*this); +} + +SelectorM SelectorMol::cutGroups(int i) const +{ + return SelectorM(this->cutGroup(i)); +} + +SelectorM SelectorMol::cutGroups(const SireBase::Slice &slice) const +{ + return SelectorM(*this, slice); +} + +SelectorM SelectorMol::cutGroups(const QList &idxs) const +{ + return SelectorM(*this, idxs); +} + +SelectorM SelectorMol::cutGroups(const QString &name) const +{ + return SelectorM(*this, name); +} + +SelectorM SelectorMol::cutGroups(const CGID &cgid) const +{ + return SelectorM(*this, cgid); +} + +QVector SelectorMol::molNums() const +{ + if (this->isEmpty()) + return QVector(); + + QVector molnums; + molnums.reserve(this->mols.count()); + + for (const auto &mol : this->mols) + { + molnums.append(mol.number()); + } + + return molnums; +} + +QList SelectorMol::IDs() const +{ + return this->numbers(); +} + +QList SelectorMol::indexes() const +{ + if (this->isEmpty()) + return QList(); + + QList idxs; + idxs.reserve(this->mols.count()); + + for (int i=0; imols.count(); ++i) + { + idxs.append(MolIdx(i)); + } + + return idxs; +} + +QList SelectorMol::numbers() const +{ + if (this->isEmpty()) + return QList(); + + QList nums; + nums.reserve(this->mols.count()); + + for (const auto &mol : this->mols) + { + nums.append(mol.number()); + } + + return nums; +} + +QList SelectorMol::names() const +{ + if (this->isEmpty()) + return QList(); + + QList names; + names.reserve(this->mols.count()); + + for (const auto &mol : this->mols) + { + names.append(mol.name()); + } + + return names; +} + +int SelectorMol::nAtoms() const +{ + int nats = 0; + + for (const auto &mol : this->mols) + { + nats += mol.nAtoms(); + } + + return nats; +} + +int SelectorMol::nResidues() const +{ + int nres = 0; + + for (const auto &mol : this->mols) + { + nres += mol.nResidues(); + } + + return nres; +} + +int SelectorMol::nChains() const +{ + int nc = 0; + + for (const auto &mol : this->mols) + { + nc += mol.nChains(); + } + + return nc; +} + +int SelectorMol::nSegments() const +{ + int ns = 0; + + for (const auto &mol : this->mols) + { + ns += mol.nSegments(); + } + + return ns; +} + +int SelectorMol::nCutGroups() const +{ + int nc = 0; + + for (const auto &mol : this->mols) + { + nc += mol.nCutGroups(); + } + + return nc; +} + +int SelectorMol::nMolecules() const +{ + return this->mols.count(); +} + +bool SelectorMol::isEmpty() const +{ + return this->mols.isEmpty(); +} + +SelectorMol::const_iterator SelectorMol::begin() const +{ + return this->mols.begin(); +} + +SelectorMol::const_iterator SelectorMol::end() const +{ + return this->mols.end(); +} + +SelectorMol::const_iterator SelectorMol::constBegin() const +{ + return this->mols.constBegin(); +} + +SelectorMol::const_iterator SelectorMol::constEnd() const +{ + return this->mols.constEnd(); +} + +QString SelectorMol::toString() const +{ + if (this->isEmpty()) + { + return QObject::tr("SelectorMol::empty"); + } + else + { + QStringList parts; + + const auto n = this->count(); + + if (n <= 10) + { + for (int i=0; imols[i].toString())); + } + } + else + { + for (int i=0; i<5; ++i) + { + parts.append(QObject::tr("%1: %2").arg(i) + .arg(this->mols[i].toString())); + } + + parts.append("..."); + + for (int i=n-5; imols[i].toString())); + } + } + + return QObject::tr("SelectorMol( size=%1\n%2\n)") + .arg(n).arg(parts.join("\n")); + } +} + + +namespace SireMol +{ + template class SelectorM; + template class SelectorM; + template class SelectorM; + template class SelectorM; + template class SelectorM; +} diff --git a/corelib/src/libs/SireMol/selectormol.h b/corelib/src/libs/SireMol/selectormol.h new file mode 100644 index 000000000..78642e82a --- /dev/null +++ b/corelib/src/libs/SireMol/selectormol.h @@ -0,0 +1,352 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIREMOL_SELECTORMOL_H +#define SIREMOL_SELECTORMOL_H + +#include "molecule.h" +#include "atom.h" +#include "residue.h" +#include "chain.h" +#include "segment.h" +#include "cutgroup.h" +#include "moleculegroup.h" +#include "moleculegroups.h" +#include "select.h" + +#include "SireBase/slice.h" + +SIRE_BEGIN_HEADER + +namespace SireMol +{ + class SelectorMol; + class EvaluatorM; + + template + class SelectorM; + + class Molecules; + class MoleculeGroup; + class MolGroupsBase; + + class AtomID; + class ResID; + class ChainID; + class SegID; + class CGID; + + class MolID; + class MolName; + class MolNum; + class MolIdx; +} + +SIREMOL_EXPORT QDataStream& operator<<(QDataStream&, const SireMol::SelectorMol&); +SIREMOL_EXPORT QDataStream& operator>>(QDataStream&, SireMol::SelectorMol&); + +namespace SireMol +{ + +/** This class provides a Selector-type interface to a + collection of molecules. +*/ +class SIREMOL_EXPORT SelectorMol + : public SireBase::ConcreteProperty +{ + +friend SIREMOL_EXPORT QDataStream& ::operator<<(QDataStream&, const SelectorMol&); +friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, SelectorMol&); + +public: + typedef QList::const_iterator const_iterator; + typedef QList::const_iterator iterator; + + SelectorMol(); + SelectorMol(const MoleculeView &mol); + SelectorMol(const Molecules &mols); + SelectorMol(const MoleculeGroup &mols); + SelectorMol(const MolGroupsBase &mols); + SelectorMol(const SelectResult &mols); + + template + SelectorMol(const SelectorM &other); + template + SelectorMol(const SelectorM &other, const QString &name); + template + SelectorMol(const SelectorM &other, const SireBase::Slice &slice); + template + SelectorMol(const SelectorM &other, const QList &idxs); + template + SelectorMol(const SelectorM &other, const MolID &molid); + + SelectorMol(const SelectorMol &other); + + virtual ~SelectorMol(); + + static const char* typeName(); + + virtual const char* what() const + { + return SelectorMol::typeName(); + } + + virtual SelectorMol* clone() const + { + return new SelectorMol(*this); + } + + SelectorMol& operator=(const SelectorMol &other); + + bool operator==(const SelectorMol &other) const; + bool operator!=(const SelectorMol &other) const; + + Molecule operator[](int i) const; + SelectorMol operator[](const SireBase::Slice &slice) const; + SelectorMol operator[](const QList &idxs) const; + Molecule operator[](const QString &name) const; + Molecule operator[](const MolIdx &molidx) const; + Molecule operator[](const MolName &molname) const; + Molecule operator[](const MolNum &molnum) const; + Molecule operator[](const MolID &molid) const; + + QList toList() const; + + int count() const; + int size() const; + + EvaluatorM evaluate() const; + + MoleculeGroup toMoleculeGroup() const; + SelectResult toSelectResult() const; + + Molecule molecule(int i) const; + Molecule molecule(const QString &name) const; + Molecule molecule(const MolIdx &molidx) const; + Molecule molecule(const MolName &molname) const; + Molecule molecule(const MolNum &molnum) const; + Molecule molecule(const MolID &molid) const; + + SelectorMol molecules() const; + SelectorMol molecules(int i) const; + SelectorMol molecules(const SireBase::Slice &slice) const; + SelectorMol molecules(const QList &idxs) const; + SelectorMol molecules(const QString &name) const; + SelectorMol molecules(const MolIdx &molidx) const; + SelectorMol molecules(const MolName &molname) const; + SelectorMol molecules(const MolNum &molnum) const; + SelectorMol molecules(const MolID &molid) const; + + bool contains(const MolNum &molnum) const; + + Atom atom(int i) const; + Atom atom(const QString &name) const; + Atom atom(const AtomID &atomid) const; + + Residue residue(int i) const; + Residue residue(const QString &name) const; + Residue residue(const ResID &resid) const; + + Chain chain(int i) const; + Chain chain(const QString &name) const; + Chain chain(const ChainID &chainid) const; + + Segment segment(int i) const; + Segment segment(const QString &name) const; + Segment segment(const SegID &segid) const; + + CutGroup cutGroup(int i) const; + CutGroup cutGroup(const QString &name) const; + CutGroup cutGroup(const CGID &cgid) const; + + SelectorM atoms() const; + SelectorM atoms(int i) const; + SelectorM atoms(const SireBase::Slice &slice) const; + SelectorM atoms(const QList &idxs) const; + SelectorM atoms(const QString &name) const; + SelectorM atoms(const AtomID &atomid) const; + + SelectorM residues() const; + SelectorM residues(int i) const; + SelectorM residues(const SireBase::Slice &slice) const; + SelectorM residues(const QList &idxs) const; + SelectorM residues(const QString &name) const; + SelectorM residues(const ResID &resid) const; + + SelectorM chains() const; + SelectorM chains(int i) const; + SelectorM chains(const SireBase::Slice &slice) const; + SelectorM chains(const QList &idxs) const; + SelectorM chains(const QString &name) const; + SelectorM chains(const ChainID &chainid) const; + + SelectorM segments() const; + SelectorM segments(int i) const; + SelectorM segments(const SireBase::Slice &slice) const; + SelectorM segments(const QList &idxs) const; + SelectorM segments(const QString &name) const; + SelectorM segments(const SegID &segid) const; + + SelectorM cutGroups() const; + SelectorM cutGroups(int i) const; + SelectorM cutGroups(const SireBase::Slice &slice) const; + SelectorM cutGroups(const QList &idxs) const; + SelectorM cutGroups(const QString &name) const; + SelectorM cutGroups(const CGID &cgid) const; + + SelectResult search(const QString &search_string) const; + + QVector molNums() const; + + QList IDs() const; + QList indexes() const; + QList numbers() const; + QList names() const; + + int nAtoms() const; + int nResidues() const; + int nChains() const; + int nSegments() const; + int nCutGroups() const; + int nMolecules() const; + + bool isEmpty() const; + + const_iterator begin() const; + const_iterator end() const; + + const_iterator constBegin() const; + const_iterator constEnd() const; + + virtual QString toString() const; + +protected: + /** The actual list of molecules */ + QList mols; +}; + +} + +Q_DECLARE_METATYPE(SireMol::SelectorMol); +Q_DECLARE_METATYPE(SireMol::SelectorM); +Q_DECLARE_METATYPE(SireMol::SelectorM); +Q_DECLARE_METATYPE(SireMol::SelectorM); +Q_DECLARE_METATYPE(SireMol::SelectorM); +Q_DECLARE_METATYPE(SireMol::SelectorM); + +SIRE_EXPOSE_CLASS(SireMol::SelectorMol) + +SIRE_EXPOSE_ALIAS( SireMol::SelectorM, SireMol::SelectorM_Atom_ ) +SIRE_EXPOSE_ALIAS( SireMol::SelectorM, SireMol::SelectorM_Residue_ ) +SIRE_EXPOSE_ALIAS( SireMol::SelectorM, SireMol::SelectorM_Chain_ ) +SIRE_EXPOSE_ALIAS( SireMol::SelectorM, SireMol::SelectorM_Segment_ ) +SIRE_EXPOSE_ALIAS( SireMol::SelectorM, SireMol::SelectorM_CutGroup_ ) + +// include this here so that SelectorM is always instantiatable if +// SelectorMol has been included +#include "selectorm.hpp" + +#ifndef SIRE_SKIP_INLINE_FUNCTIONS + +namespace SireMol +{ + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol::SelectorMol(const SelectorM &other) + : SireBase::ConcreteProperty() +{ + if (not other.isEmpty()) + { + this->mols.reserve(other.nMolecules()); + + for (int i=0; imols.append(other.molecule(i)); + } + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol::SelectorMol(const SelectorM &other, const QString &name) + : SireBase::ConcreteProperty() +{ + this->operator=(SelectorMol(other).molecules(name)); +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol::SelectorMol(const SelectorM &other, const SireBase::Slice &slice) + : SireBase::ConcreteProperty() +{ + for (auto it = slice.begin(other.nMolecules()); + not it.atEnd(); it.next()) + { + this->mols.append(other.molecule(it.value())); + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol::SelectorMol(const SelectorM &other, const QList &idxs) + : SireBase::ConcreteProperty() +{ + for (const auto &idx : idxs) + { + this->mols.append(other.molecule(idx)); + } +} + +template +SIRE_OUTOFLINE_TEMPLATE +SelectorMol::SelectorMol(const SelectorM &other, const MolID &molid) + : SireBase::ConcreteProperty() +{ + this->operator=(other.molecules().molecules(molid)); +} + +} // end of namespace SireMol + +#endif // SIRE_SKIP_INLINE_FUNCTIONS + +#ifdef SIRE_INSTANTIATE_TEMPLATES + +#include "selectorm.hpp" + +template class SireMol::SelectorM; +template class SireMol::SelectorM; +template class SireMol::SelectorM; +template class SireMol::SelectorM; +template class SireMol::SelectorM; + +#endif //SIRE_INSTANTIATE_TEMPLATES + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireMol/structureeditor.cpp b/corelib/src/libs/SireMol/structureeditor.cpp index 0db7aa8d6..b600f23a0 100644 --- a/corelib/src/libs/SireMol/structureeditor.cpp +++ b/corelib/src/libs/SireMol/structureeditor.cpp @@ -2161,6 +2161,31 @@ EditMolInfo* EditMolInfo::clone() const return new EditMolInfo(*this); } +int EditMolInfo::nAtoms() const +{ + return d->atoms_by_index.count(); +} + +int EditMolInfo::nResidues() const +{ + return d->res_by_index.count(); +} + +int EditMolInfo::nChains() const +{ + return d->chains_by_index.count(); +} + +int EditMolInfo::nCutGroups() const +{ + return d->cg_by_index.count(); +} + +int EditMolInfo::nSegments() const +{ + return d->seg_by_index.count(); +} + /** Is this the entire molecule */ bool EditMolInfo::selectedAll() const { diff --git a/corelib/src/libs/SireMol/structureeditor.h b/corelib/src/libs/SireMol/structureeditor.h index c4f84e1c5..703435164 100644 --- a/corelib/src/libs/SireMol/structureeditor.h +++ b/corelib/src/libs/SireMol/structureeditor.h @@ -107,21 +107,21 @@ class EditMolData; SIREMOL_EXPORT QString cacheName(const QString &name); -/** This is the base class of all of the molecule structure editors. +/** This is the base class of all of the molecule structure editors. The structure editors are classes that can actually add, move and remove parts of a molecule (e.g. add, move or remove residues). As such, they are more powerful than the standard 'editor' classes (like AtomEditor), but they require a different underlying data structure, which doesn't rely on the structure of the molecule being constant. - + This class is explicitly shared and is *definitely not* thread safe! - - Because it is not thread safe, it is not derived from + + Because it is not thread safe, it is not derived from SireBase::Property (unlike the MoleculeView classes). You cannot therefore add a molecule whose structure is being edited as a property. - + @author Christopher Woods */ class SIREMOL_EXPORT StructureEditor @@ -140,25 +140,25 @@ friend class EditMolInfo; //so can see d pointer virtual ~StructureEditor(); virtual StructureEditor* clone() const=0; - + static const char* typeName() { return "SireMol::StructureEditor"; } - + virtual const char* what() const=0; virtual bool isEmpty() const; virtual bool selectedAll() const=0; - + virtual QString toString() const=0; protected: StructureEditor(); StructureEditor(const MoleculeData &moldata); - + StructureEditor(const StructureEditor &other); - + StructureEditor& operator=(const MoleculeData &moldata); StructureEditor& operator=(const StructureEditor &other); @@ -171,26 +171,26 @@ friend class EditMolInfo; //so can see d pointer MoleculeData commitChanges() const; const MoleculeInfoData& commitInfo(); - + bool needsInfoRebuild() const; const MoleculeInfoData& info() const; /// functions used by MoleculeInfoData when committing - boost::tuple + boost::tuple getAtomData(AtomIdx atomidx) const; - + boost::tuple< CGName,QList > getCGData(CGIdx cgidx) const; - + boost::tuple< ResName,ResNum,ChainIdx,QList > getResData(ResIdx residx) const; - + boost::tuple< ChainName,QList > getChainData(ChainIdx chainidx) const; - + boost::tuple< SegName,QList > getSegData(SegIdx segidx) const; - + /// Functions predominantly for StructureEditor derived classes quint32 getUID(AtomIdx atomidx) const; @@ -198,13 +198,13 @@ friend class EditMolInfo; //so can see d pointer quint32 getUID(ResIdx residx) const; quint32 getUID(ChainIdx chainidx) const; quint32 getUID(SegIdx segidx) const; - + quint32 getUID(const AtomID &atomid) const; quint32 getUID(const CGID &cgid) const; quint32 getUID(const ResID &resid) const; quint32 getUID(const ChainID &chainid) const; quint32 getUID(const SegID &segid) const; - + int nAtomsInResidue(quint32 uid) const; int nAtomsInCutGroup(quint32 uid) const; int nAtomsInChain(quint32 uid) const; @@ -221,36 +221,36 @@ friend class EditMolInfo; //so can see d pointer quint32 atomInCutGroup(quint32 uid, int i) const; quint32 atomInResidue(quint32 uid, int i) const; quint32 atomInSegment(quint32 uid, int i) const; - + quint32 residueInChain(quint32 uid, int i) const; quint32 cutGroupParentOfAtom(quint32 uid) const; quint32 residueParentOfAtom(quint32 uid) const; quint32 chainParentOfAtom(quint32 uid) const; quint32 segmentParentOfAtom(quint32 uid) const; - + quint32 chainParentOfResidue(quint32 uid) const; - + const MolName& molName() const; MolNum molNum() const; - + const AtomName& atomName(quint32 uid) const; AtomNum atomNum(quint32 uid) const; AtomIdx atomIdx(quint32 uid) const; - + const CGName& cgName(quint32 uid) const; CGIdx cgIdx(quint32 uid) const; - + const ResName& resName(quint32 uid) const; ResNum resNum(quint32 uid) const; ResIdx resIdx(quint32 uid) const; - + const ChainName& chainName(quint32 uid) const; ChainIdx chainIdx(quint32 uid) const; - + const SegName& segName(quint32 uid) const; SegIdx segIdx(quint32 uid) const; - + AtomIdx atomIdx(const AtomID &atomid) const; CGIdx cgIdx(const CGID &cgid) const; ResIdx resIdx(const ResID &resid) const; @@ -258,53 +258,53 @@ friend class EditMolInfo; //so can see d pointer SegIdx segIdx(const SegID &segid) const; Properties properties() const; - + void renameMolecule(const MolName &name); - + void renumberMolecule(); void renumberMolecule(MolNum newnum); - + void renameAtom(quint32 uid, const AtomName &name); void renumberAtom(quint32 uid, AtomNum number); void reindexAtom(quint32 uid, AtomIdx index); - + void renameCutGroup(quint32 uid, const CGName &name); void reindexCutGroup(quint32 uid, CGIdx index); - + void renameResidue(quint32 uid, const ResName &name); void renumberResidue(quint32 uid, ResNum number); void reindexResidue(quint32 uid, ResIdx index); - + void renameChain(quint32 uid, const ChainName &name); void reindexChain(quint32 uid, ChainIdx index); - + void renameSegment(quint32 uid, const SegName &name); void reindexSegment(quint32 uid, SegIdx index); - + void removeAtom(quint32 uid); void removeCutGroup(quint32 uid); void removeResidue(quint32 uid); void removeChain(quint32 uid); void removeSegment(quint32 uid); - + void removeAtoms(const AtomID &atomid); void removeCutGroups(const CGID &cgid); void removeResidues(const ResID &resid); void removeChains(const ChainID &chainid); void removeSegments(const SegID &segid); - + void removeAllAtoms(); void removeAllCutGroups(); void removeAllResidues(); void removeAllChains(); void removeAllSegments(); - + void reparentAtom(quint32 uid, CGIdx cgidx); void reparentAtom(quint32 uid, ResIdx residx); void reparentAtom(quint32 uid, SegIdx segidx); - + void reparentResidue(quint32 uid, ChainIdx chainidx); - + AtomStructureEditor addAtom(); CGStructureEditor addCutGroup(); ResStructureEditor addResidue(); @@ -313,10 +313,10 @@ friend class EditMolInfo; //so can see d pointer template T _pvt_getProperty(const QString &key, const QVariant &value) const; - + template T _pvt_getMetadata(const QString &metakey, const QVariant &value) const; - + template T _pvt_getMetadata(const QString &key, const QString &metakey, const QVariant &value) const; @@ -354,63 +354,63 @@ friend class EditMolInfo; //so can see d pointer template void _pvt_createSpaceForMetadata(const QString &metakey); - + template void _pvt_createSpaceForMetadata(const QString &key, const QString &metakey); - void _pvt_setAtomProperty(quint32 uid, const QString &key, + void _pvt_setAtomProperty(quint32 uid, const QString &key, const QVariant &value); void _pvt_setAtomMetadata(quint32 uid, const QString &metakey, const QVariant &value); - + void _pvt_setAtomMetadata(quint32 uid, const QString &key, const QString &metakey, const QVariant &value); - void _pvt_setResProperty(quint32 uid, const QString &key, + void _pvt_setResProperty(quint32 uid, const QString &key, const QVariant &value); void _pvt_setResMetadata(quint32 uid, const QString &metakey, const QVariant &value); - + void _pvt_setResMetadata(quint32 uid, const QString &key, const QString &metakey, const QVariant &value); - void _pvt_setCGProperty(quint32 uid, const QString &key, + void _pvt_setCGProperty(quint32 uid, const QString &key, const QVariant &value); void _pvt_setCGMetadata(quint32 uid, const QString &metakey, const QVariant &value); - + void _pvt_setCGMetadata(quint32 uid, const QString &key, const QString &metakey, const QVariant &value); - void _pvt_setChainProperty(quint32 uid, const QString &key, + void _pvt_setChainProperty(quint32 uid, const QString &key, const QVariant &value); void _pvt_setChainMetadata(quint32 uid, const QString &metakey, const QVariant &value); - + void _pvt_setChainMetadata(quint32 uid, const QString &key, const QString &metakey, const QVariant &value); - void _pvt_setSegProperty(quint32 uid, const QString &key, + void _pvt_setSegProperty(quint32 uid, const QString &key, const QVariant &value); void _pvt_setSegMetadata(quint32 uid, const QString &metakey, const QVariant &value); - + void _pvt_setSegMetadata(quint32 uid, const QString &key, const QString &metakey, const QVariant &value); - + void assertSane() const; - + void assertValidAtom(quint32 uid) const; void assertValidCutGroup(quint32 uid) const; void assertValidResidue(quint32 uid) const; @@ -422,14 +422,14 @@ friend class EditMolInfo; //so can see d pointer Properties& _pvt_properties(); - static void _pvt_invalidPropertyCast(const QString &key, + static void _pvt_invalidPropertyCast(const QString &key, const QString ¤t_type, const QString &required_type); static void _pvt_invalidMetadataCast(const QString &metakey, const QString ¤t_type, const QString &required_type); - + static void _pvt_invalidMetadataCast(const QString &key, const QString &metakey, const QString ¤t_type, @@ -447,7 +447,7 @@ friend class EditMolInfo; //so can see d pointer /** Protected template function used by the property() functions */ template SIRE_OUTOFLINE_TEMPLATE -T StructureEditor::_pvt_getProperty(const QString &key, +T StructureEditor::_pvt_getProperty(const QString &key, const QVariant &value) const { if (value.isValid()) @@ -456,7 +456,7 @@ T StructureEditor::_pvt_getProperty(const QString &key, StructureEditor::_pvt_invalidPropertyCast( key, value.typeName(), T::typeName()); - + return value.value(); } else @@ -466,7 +466,7 @@ T StructureEditor::_pvt_getProperty(const QString &key, /** Protected template function used by the metadata() functions */ template SIRE_OUTOFLINE_TEMPLATE -T StructureEditor::_pvt_getMetadata(const QString &metakey, +T StructureEditor::_pvt_getMetadata(const QString &metakey, const QVariant &value) const { if (value.isValid()) @@ -475,7 +475,7 @@ T StructureEditor::_pvt_getMetadata(const QString &metakey, StructureEditor::_pvt_invalidMetadataCast( metakey, value.typeName(), T::typeName()); - + return value.value(); } else @@ -485,7 +485,7 @@ T StructureEditor::_pvt_getMetadata(const QString &metakey, /** Protected template function used by the metadata() functions */ template SIRE_OUTOFLINE_TEMPLATE -T StructureEditor::_pvt_getMetadata(const QString &key, const QString &metakey, +T StructureEditor::_pvt_getMetadata(const QString &key, const QString &metakey, const QVariant &value) const { if (value.isValid()) @@ -494,7 +494,7 @@ T StructureEditor::_pvt_getMetadata(const QString &key, const QString &metakey, StructureEditor::_pvt_invalidMetadataCast( key, metakey, value.typeName(), T::typeName()); - + return value.value(); } else @@ -508,7 +508,7 @@ void StructureEditor::_pvt_createSpaceForProperty(const QString &key) { Properties &props = this->_pvt_properties(); Properties::const_iterator it = props.constFind(key); - + if (it != props.constEnd()) { //a property of this name already exists - ensure that @@ -530,11 +530,11 @@ SIRE_OUTOFLINE_TEMPLATE void StructureEditor::_pvt_createSpaceForMetadata(const QString &metakey) { Properties &props = this->_pvt_properties(); - + if (props.hasMetadata(metakey)) { const SireBase::Property &metadata = props.metadata(metakey); - + //a property of this name already exists - ensure that //it is of the correct type! if (dynamic_cast( &metadata ) == 0) @@ -555,11 +555,11 @@ void StructureEditor::_pvt_createSpaceForMetadata(const QString &key, const QString &metakey) { Properties &props = this->_pvt_properties(); - + if (props.hasMetadata(key, metakey)) { const SireBase::Property &metadata = props.metadata(key, metakey); - + //a property of this name already exists - ensure that //it is of the correct type! if (dynamic_cast( &metadata ) == 0) @@ -577,7 +577,7 @@ void StructureEditor::_pvt_createSpaceForMetadata(const QString &key, /** This class is used to query a StructureEditor (to map from an ID to the index) - + @author Christopher Woods */ class SIREMOL_EXPORT EditMolInfo : public StructureEditor, public MolInfo @@ -585,95 +585,101 @@ class SIREMOL_EXPORT EditMolInfo : public StructureEditor, public MolInfo public: EditMolInfo(); EditMolInfo(const StructureEditor &editor); - + EditMolInfo(const EditMolInfo &other); - + ~EditMolInfo(); - + EditMolInfo& operator=(const StructureEditor &editor); EditMolInfo& operator=(const EditMolInfo &other); - + static const char* typeName() { return "SireMol::EditMolInfo"; } - + const char* what() const { return EditMolInfo::typeName(); } - + EditMolInfo* clone() const; - + QString toString() const; - + bool selectedAll() const; - + + int nAtoms() const; + int nResidues() const; + int nChains() const; + int nCutGroups() const; + int nSegments() const; + QList map(const AtomName &name) const; QList map(AtomNum num) const; QList map(AtomIdx idx) const; QList map(const AtomID &atomid) const; - + QList map(const ResName &name) const; QList map(ResNum num) const; QList map(ResIdx idx) const; QList map(const ResID &resid) const; - + QList map(const CGName &name) const; QList map(CGIdx idx) const; QList map(const CGID &cgid) const; - + QList map(const ChainName &name) const; QList map(ChainIdx idx) const; QList map(const ChainID &chainid) const; - + QList map(const SegName &name) const; QList map(SegIdx idx) const; QList map(const SegID &segid) const; - + QList getAtoms() const; - + AtomIdx getAtom(CGIdx cgidx, int i) const; AtomIdx getAtom(ResIdx residx, int i) const; AtomIdx getAtom(ChainIdx chainidx, int i) const; AtomIdx getAtom(SegIdx segidx, int i) const; - + QList getAtomsIn(const ResID &resid) const; QList getAtomsIn(const CGID &cgid) const; QList getAtomsIn(const ChainID &chainid) const; QList getAtomsIn(const SegID &segid) const; QList getResidues() const; - + ResIdx getResidue(ChainIdx chainidx, int i) const; QList getResiduesIn(const ChainID &chainid) const; - + QList getCutGroups() const; QList getChains() const; QList getSegments() const; ChainIdx parentChain(ResIdx residx) const; ChainIdx parentChain(const ResID &resid) const; - + ChainIdx parentChain(AtomIdx atomidx) const; ChainIdx parentChain(const AtomID &atomid) const; - + ResIdx parentResidue(AtomIdx atomidx) const; ResIdx parentResidue(const AtomID &atomid) const; - + SegIdx parentSegment(AtomIdx atomidx) const; SegIdx parentSegment(const AtomID &atomid) const; - + CGIdx parentCutGroup(AtomIdx atomidx) const; CGIdx parentCutGroup(const AtomID &atomid) const; - + AtomIdx atomIdx(const AtomID &atomid) const; CGIdx cgIdx(const CGID &cgid) const; ResIdx resIdx(const ResID &resid) const; ChainIdx chainIdx(const ChainID &chainid) const; SegIdx segIdx(const SegID &segid) const; - + void assertCompatibleWith(const AtomSelection &selected_atoms) const; }; diff --git a/corelib/src/libs/SireMol/viewsofmol.cpp b/corelib/src/libs/SireMol/viewsofmol.cpp index 876f90c1b..f5eab888d 100644 --- a/corelib/src/libs/SireMol/viewsofmol.cpp +++ b/corelib/src/libs/SireMol/viewsofmol.cpp @@ -56,13 +56,13 @@ using namespace SireStream; RegisterMetaType r_molviews; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const ViewsOfMol &molviews) { writeHeader(ds, r_molviews, 1); SharedDataStream sds(ds); - + sds << molviews.selected_atoms << molviews.views << static_cast(molviews); @@ -70,7 +70,7 @@ QDataStream &operator<<(QDataStream &ds, } /** Deserialise from a binary datastream */ -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, ViewsOfMol &molviews) { VersionID v = readHeader(ds, r_molviews); @@ -95,14 +95,14 @@ ViewsOfMol::ViewsOfMol() : ConcreteProperty() /** Construct an empty view of the molecule whose data is in 'moldata' */ ViewsOfMol::ViewsOfMol(const MoleculeData &moldata) - : ConcreteProperty(moldata), + : ConcreteProperty(moldata), selected_atoms(moldata) {} /** Construct the view of the passed molecule */ ViewsOfMol::ViewsOfMol(const MoleculeData &moldata, const AtomSelection &molview) - : ConcreteProperty(moldata), + : ConcreteProperty(moldata), selected_atoms(molview) { selected_atoms.assertCompatibleWith(moldata); @@ -126,7 +126,7 @@ ViewsOfMol::ViewsOfMol(const MoleculeData &moldata, { views = molviews; views.at(0).assertCompatibleWith(moldata); - + selected_atoms = views.at(0); selected_atoms.unite(views); } @@ -134,7 +134,7 @@ ViewsOfMol::ViewsOfMol(const MoleculeData &moldata, /** Construct just a single view of a molecule */ ViewsOfMol::ViewsOfMol(const MoleculeView &view) - : ConcreteProperty(view), + : ConcreteProperty(view), selected_atoms(view.selection()) {} @@ -147,9 +147,9 @@ void ViewsOfMol::setEqualTo(const Selector &selection) views.clear(); int nviews = selection.count(); - + if (nviews == 1) - { + { selected_atoms = selection(0).selection(); } else if (nviews > 1) @@ -158,7 +158,7 @@ void ViewsOfMol::setEqualTo(const Selector &selection) { views.append( selection(i).selection() ); } - + selected_atoms = views.at(0); selected_atoms.unite(views); } @@ -201,7 +201,7 @@ ViewsOfMol::ViewsOfMol(const Selector &segments) /** Copy constructor */ ViewsOfMol::ViewsOfMol(const ViewsOfMol &other) - : ConcreteProperty(other), + : ConcreteProperty(other), selected_atoms(other.selected_atoms), views(other.views) {} @@ -216,7 +216,7 @@ ViewsOfMol& ViewsOfMol::operator=(const ViewsOfMol &other) MoleculeView::operator=(other); selected_atoms = other.selected_atoms; views = other.views; - + return *this; } @@ -226,7 +226,7 @@ ViewsOfMol& ViewsOfMol::operator=(const MoleculeView &view) MoleculeView::operator=(view); selected_atoms = view.selection(); views.clear(); - + return *this; } @@ -323,13 +323,130 @@ int ViewsOfMol::nViews() const MolViewPtr ViewsOfMol::operator[](int i) const { i = Index(i).map( this->nViews() ); - + if ( i == 0 and views.isEmpty() ) return PartialMolecule(*d, selected_atoms).toUnit(); else return PartialMolecule(*d, views.at(i)).toUnit(); } +/** Get the common type of all of the views */ +QString ViewsOfMol::getCommonType() const +{ + if (this->isEmpty()) + return this->what(); + + // we need to start from the largest type and work downwards + // (as some atoms may be whole residues) + + bool is_molecule = true; + + for (const auto &view : views) + { + if (not view.isMolecule()) + { + is_molecule = false; + break; + } + } + + if (is_molecule) + return Molecule::typeName(); + + bool is_segment = true; + + for (const auto &view : views) + { + if (not view.isSegment()) + { + is_segment = false; + break; + } + } + + if (is_segment) + return Segment::typeName(); + + bool is_chain = true; + + for (const auto &view : views) + { + if (not view.isChain()) + { + is_chain = false; + break; + } + } + + if (is_chain) + return Chain::typeName(); + + bool is_residue = true; + + for (const auto &view : views) + { + if (not view.isResidue()) + { + is_residue = false; + break; + } + } + + if (is_residue) + return Residue::typeName(); + + bool is_atom = true; + + for (const auto &view : views) + { + if (not view.isAtom()) + { + is_atom = false; + break; + } + } + + if (is_atom) + return Atom::typeName(); + + bool is_cutgroup = true; + + for (const auto &view : views) + { + if (not view.isCutGroup()) + { + is_cutgroup = false; + break; + } + } + + if (is_cutgroup) + return CutGroup::typeName(); + + // ok, go with the default + return PartialMolecule::typeName(); +} + +MolViewPtr ViewsOfMol::toSelector() const +{ + auto typ = this->getCommonType(); + + if (typ == Atom::typeName()) + return this->atoms().toSelector(); + else if (typ == Residue::typeName()) + return this->residues().toSelector(); + else if (typ == Chain::typeName()) + return this->chains().toSelector(); + else if (typ == CutGroup::typeName()) + return this->cutGroups().toSelector(); + else if (typ == Segment::typeName()) + return this->segments().toSelector(); + else if (typ == Molecule::typeName()) + return this->molecule().toSelector(); + + return this->join().toSelector(); +} + /** Return the name of the molecule being viewed */ const MolName& ViewsOfMol::name() const { @@ -371,7 +488,7 @@ PartialMolecule ViewsOfMol::valueAt(int i) const return PartialMolecule(*this, this->viewAt(i)); } -/** Add the view 'view' to this set - this adds the +/** Add the view 'view' to this set - this adds the view even if it already exists in this set \throw SireError::incompatible_error @@ -379,34 +496,34 @@ PartialMolecule ViewsOfMol::valueAt(int i) const void ViewsOfMol::add(const AtomSelection &view) { int nviews = this->nViews(); - + if (nviews == 0) this->operator=(ViewsOfMol(*d, view)); else if (nviews == 1) { view.assertCompatibleWith(*d); - + views.append(selected_atoms); views.append(view); - + if (not selected_atoms.selectedAll()) selected_atoms = selected_atoms.unite(view); } else { view.assertCompatibleWith(*d); - + views.append(view); - + if (not selected_atoms.selectedAll()) selected_atoms = selected_atoms.unite(view); } } -/** Return the views where 'views' have been added to +/** Return the views where 'views' have been added to the set - this duplicates any views that already exist - + \throw SireError::incompatible_error */ void ViewsOfMol::add(const QList &views) @@ -420,19 +537,19 @@ void ViewsOfMol::add(const QList &views) } ViewsOfMol new_views(*this); - + foreach (const AtomSelection &view, views) { new_views.add(view); } - + this->operator=(new_views); } /** Add the view 'view' to this set, only if it doesn't already exist - this returns whether the view has been added - + \throw SireError::incompatible_error */ bool ViewsOfMol::addIfUnique(const AtomSelection &view) @@ -449,7 +566,7 @@ bool ViewsOfMol::addIfUnique(const AtomSelection &view) /** Add the views in 'views' that don't already exist in this set - this returns the views that were added (or an empty list if nothing was added) - + \throw SireError::incompatible_error */ QList ViewsOfMol::addIfUnique(const QList &views) @@ -463,23 +580,23 @@ QList ViewsOfMol::addIfUnique(const QList &views) else return QList(); } - + QList added_views; ViewsOfMol new_views(*this); - + foreach (const AtomSelection &view, views) { if (new_views.addIfUnique(view)) added_views.append(view); } - + this->operator=(new_views); - + return added_views; } /** Synonym for ViewsOfMol::addIfUnique(view) - + \throw SireError::incompatible_error */ bool ViewsOfMol::unite(const AtomSelection &view) @@ -487,8 +604,8 @@ bool ViewsOfMol::unite(const AtomSelection &view) return this->addIfUnique(view); } -/** Synonym for ViewsOfMol:addIfUnique(views) - +/** Synonym for ViewsOfMol:addIfUnique(views) + \throw SireError::incompatible_error */ QList ViewsOfMol::unite(const QList &views) @@ -517,7 +634,7 @@ AtomSelection ViewsOfMol::removeAt(int i) else { removed_view = views.takeAt(i); - + if (views.count() < 2) { selected_atoms = views.first(); @@ -533,19 +650,19 @@ AtomSelection ViewsOfMol::removeAt(int i) return removed_view; } -/** Remove the view 'view' from this set, if +/** Remove the view 'view' from this set, if any copies exist. This only removes the first copy of this view from this set, if multiple - copies of this view exist. This returns whether + copies of this view exist. This returns whether any copies were removed from this set. - + \throw SireError::incompatible_error */ bool ViewsOfMol::remove(const AtomSelection &view) { if (not selected_atoms.contains(view)) return false; - + if (views.count() == 0) { if (selected_atoms == view) @@ -559,11 +676,11 @@ bool ViewsOfMol::remove(const AtomSelection &view) else { int i = views.indexOf(view); - + if (i >= 0) { views.removeAt(i); - + if (views.count() < 2) { selected_atoms = views.first(); @@ -574,7 +691,7 @@ bool ViewsOfMol::remove(const AtomSelection &view) selected_atoms = views.at(0); selected_atoms.unite(views); } - + return true; } else @@ -599,13 +716,13 @@ QList ViewsOfMol::remove(const QList &views) ViewsOfMol new_views(*this); QList removed_views; - + foreach (const AtomSelection &view, views) { if (new_views.remove(view)) removed_views.append(view); } - + this->operator=(new_views); return removed_views; } @@ -620,7 +737,7 @@ bool ViewsOfMol::removeAll(const AtomSelection &view) { if (not selected_atoms.contains(view)) return false; - + if (views.isEmpty()) { if (selected_atoms == view) @@ -637,7 +754,7 @@ bool ViewsOfMol::removeAll(const AtomSelection &view) { if (views.isEmpty()) this->removeAll(); - + else if (views.count() == 1) { selected_atoms = views.first(); @@ -648,7 +765,7 @@ bool ViewsOfMol::removeAll(const AtomSelection &view) selected_atoms = views.first(); selected_atoms.unite(views); } - + return true; } else @@ -670,18 +787,18 @@ QList ViewsOfMol::removeAll(const QList &views) else return QList(); } - + ViewsOfMol new_views; QList removed_views; - + foreach (const AtomSelection &view, views) { if (new_views.removeAll(view)) removed_views.append(view); } - + this->operator=(new_views); - + return removed_views; } @@ -692,33 +809,33 @@ QList ViewsOfMol::removeDuplicates() { if (views.isEmpty()) return views; - + QList removed_views; int nviews = views.count(); - + //compare all pairs of views int i = 0; - + while (i < nviews-1) { //need to take a pointer as removing views would //screw up the reference const AtomSelection *view0 = &(views.at(i)); - + int j = i+1; - + while (j < nviews) { const AtomSelection &view1 = views.at(j); - + if (*view0 == view1) { //this is a duplicate view - remove the later view removed_views.append(view1); views.removeAt(j); --nviews; - + //need to retake the pointer to view0 as removing the //item may have moved view0 in memory view0 = &(views.at(i)); @@ -726,10 +843,10 @@ QList ViewsOfMol::removeDuplicates() else ++j; } - + ++i; } - + return removed_views; } @@ -764,7 +881,7 @@ ViewsOfMol ViewsOfMol::operator-(const ViewsOfMol &other) const /** Synonym for ViewsOfMol::add(views), except that this set is returned - + \throw SireError::incompatible_error */ ViewsOfMol& ViewsOfMol::operator+=(const ViewsOfMol &other) @@ -774,8 +891,8 @@ ViewsOfMol& ViewsOfMol::operator+=(const ViewsOfMol &other) } /** Synonym for ViewsOfMol::remove(views), except that this - set is returned - + set is returned + \throw SireError::incompatible_error */ ViewsOfMol& ViewsOfMol::operator-=(const ViewsOfMol &other) @@ -804,14 +921,14 @@ Molecule ViewsOfMol::molecule() const return Molecule(*d); } -/** Return the mover that can move all of the atoms +/** Return the mover that can move all of the atoms in all of the views */ Mover ViewsOfMol::move() const { return Mover(*this); } -/** Return all of the atoms selected across all of the +/** Return all of the atoms selected across all of the views in this set */ AtomSelection ViewsOfMol::selection() const { @@ -819,13 +936,13 @@ AtomSelection ViewsOfMol::selection() const } /** Return the atoms selected in the ith view in this set - + \throw SireError:invalid_index */ const AtomSelection& ViewsOfMol::selection(int i) const { i = Index(i).map( this->nViews() ); - + if (views.isEmpty()) return selected_atoms; else @@ -851,8 +968,8 @@ QList ViewsOfMol::selections() const } /** Return the mover that can move all of the atoms - in the ith view in this set - + in the ith view in this set + \throw SireError::invalid_index */ Mover ViewsOfMol::move(int i) const @@ -868,8 +985,8 @@ Evaluator ViewsOfMol::evaluate() const } /** Return an evaluator that can evaluate properties - over the atoms in the ith view of this set - + over the atoms in the ith view of this set + \throw SireError::invalid_index */ Evaluator ViewsOfMol::evaluate(int i) const @@ -878,8 +995,8 @@ Evaluator ViewsOfMol::evaluate(int i) const } /** Return whether or not any of the views contains - the atom at index 'atomidx' - + the atom at index 'atomidx' + \throw SireError::invalid_index */ bool ViewsOfMol::contains(AtomIdx atomidx) const @@ -889,7 +1006,7 @@ bool ViewsOfMol::contains(AtomIdx atomidx) const /** Return whether or not the views between them contain all of the atoms identified by 'atomid' - + \throw SireMol::missing_atom \throw SireError::invalid_index */ @@ -900,7 +1017,7 @@ bool ViewsOfMol::contains(const AtomID &atomid) const /** Return whether or not the views between them contain all of the atoms in the selection 'selection' - + \throw SireError::incompatible_error */ bool ViewsOfMol::contains(const AtomSelection &selection) const @@ -910,7 +1027,7 @@ bool ViewsOfMol::contains(const AtomSelection &selection) const /** Return whether or not the views between them contain all of the atoms in all of the selections in 'selections' - + \throw SireError::incompatible_error */ bool ViewsOfMol::contains(const QList &selections) const @@ -920,13 +1037,13 @@ bool ViewsOfMol::contains(const QList &selections) const if (not selected_atoms.contains(selection)) return false; } - + return true; } /** Return whether or not any of the views contains any of the atoms identified by 'atomid' - + \throw SireMol::missing_atom \throw SireError::invalid_index */ @@ -937,7 +1054,7 @@ bool ViewsOfMol::intersects(const AtomID &atomid) const /** Return whether or not any of the views contains any of the atoms in 'selection' - + \throw SireError::incompatible_error */ bool ViewsOfMol::intersects(const AtomSelection &selection) const @@ -945,10 +1062,10 @@ bool ViewsOfMol::intersects(const AtomSelection &selection) const return selected_atoms.intersects(selection); } -/** Return the index of the view 'selection' in this set, +/** Return the index of the view 'selection' in this set, searching forward from the index position 'from'. This returns -1 if this view is not present in this set - + \throw SireError::incompatible_error */ int ViewsOfMol::indexOf(const AtomSelection &selection, int from) const @@ -960,7 +1077,7 @@ int ViewsOfMol::indexOf(const AtomSelection &selection, int from) const from = Index(from).map(this->nViews()); selected_atoms.assertCompatibleWith(selection); - + if (views.isEmpty()) { return (selection == selected_atoms) - 1; @@ -973,7 +1090,7 @@ int ViewsOfMol::indexOf(const AtomSelection &selection, int from) const /** Assert that none of the views contain the same atoms (i.e. there is no overlap between each view) - + \throw SireMol::duplicate_atom */ void ViewsOfMol::assertNoOverlap() const @@ -982,16 +1099,16 @@ void ViewsOfMol::assertNoOverlap() const if (nviews < 2) return; - + //compare each pair of views... for (int i=0; i { @@ -78,12 +78,12 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, ViewsOfMol&); public: ViewsOfMol(); - + ViewsOfMol(const MoleculeData &moldata); ViewsOfMol(const MoleculeData &moldata, const AtomSelection &selected_atoms); - + ViewsOfMol(const MoleculeData &moldata, const QList &views); @@ -92,105 +92,109 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, ViewsOfMol&); ViewsOfMol(const Selector &cgroups); ViewsOfMol(const Selector &residue); ViewsOfMol(const Selector &atoms); - + ViewsOfMol(const MoleculeView &view); - + ViewsOfMol(const ViewsOfMol &other); - + ~ViewsOfMol(); - + static const char* typeName(); - + ViewsOfMol* clone() const; - + ViewsOfMol& operator=(const ViewsOfMol &other); - + ViewsOfMol& operator=(const Selector &atoms); ViewsOfMol& operator=(const Selector &cgroups); ViewsOfMol& operator=(const Selector &residues); ViewsOfMol& operator=(const Selector &chains); ViewsOfMol& operator=(const Selector &segments); - + ViewsOfMol& operator=(const MoleculeView &view); - + ViewsOfMol operator+(const ViewsOfMol &views) const; ViewsOfMol operator-(const ViewsOfMol &views) const; - + ViewsOfMol& operator+=(const ViewsOfMol &views); ViewsOfMol& operator-=(const ViewsOfMol &views); - + bool operator==(const ViewsOfMol &other) const; bool operator!=(const ViewsOfMol &other) const; + QString getCommonType() const; + MolViewPtr operator[](int i) const; int nViews() const; QString toString() const; - + bool isEmpty() const; bool selectedAll() const; - + + MolViewPtr toSelector() const; + PartialMolecule valueAt(int i) const; const AtomSelection& viewAt(int i) const; - + MolNum number() const; const MolName& name() const; - + quint64 version() const; quint64 version(const PropertyName &key) const; - + PartialMolecule join() const; PartialMolecule all() const; - + Molecule molecule() const; Mover move() const; Mover move(int i) const; - + Evaluator evaluate() const; Evaluator evaluate(int i) const; AtomSelection selection() const; const AtomSelection& selection(int i) const; - + QList selections() const; - + bool contains(AtomIdx atomidx) const; bool contains(const AtomID &atomid) const; bool intersects(const AtomID &atomid) const; - + bool contains(const AtomSelection &selection) const; bool intersects(const AtomSelection &selection) const; - + int indexOf(const AtomSelection &selection, int from=0) const; - + bool contains(const QList &selections) const; - + bool hasProperty(const PropertyName&) const { return false; } - + bool hasMetadata(const PropertyName&) const { return false; } - + bool hasMetadata(const PropertyName&, const PropertyName&) const { return false; } - + QStringList propertyKeys() const { return QStringList(); } - + QStringList metadataKeys() const { return QStringList(); } - + QStringList metadataKeys(const PropertyName&) const { return QStringList(); @@ -198,27 +202,27 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, ViewsOfMol&); void add(const AtomSelection &view); void add(const QList &views); - + bool addIfUnique(const AtomSelection &view); QList addIfUnique(const QList &views); - + bool unite(const AtomSelection &view); QList unite(const QList &views); - + bool remove(const AtomSelection &view); QList remove(const QList &views); - + AtomSelection removeAt(int i); - + bool removeAll(const AtomSelection &view); QList removeAll(const QList &views); - + QList removeDuplicates(); - + void removeAll(); - + void assertNoOverlap() const; - + private: template void setEqualTo(const Selector &selection); @@ -226,7 +230,7 @@ friend SIREMOL_EXPORT QDataStream& ::operator>>(QDataStream&, ViewsOfMol&); /** The union of all of the views of the molecule (and the first view, if there is only one view) */ AtomSelection selected_atoms; - + /** The array of views of the molecule */ QList views; }; diff --git a/corelib/src/libs/SireMol/weightfunction.cpp b/corelib/src/libs/SireMol/weightfunction.cpp index 6064cf820..50d5dfd2e 100644 --- a/corelib/src/libs/SireMol/weightfunction.cpp +++ b/corelib/src/libs/SireMol/weightfunction.cpp @@ -37,6 +37,8 @@ #include "mover.hpp" #include "editor.hpp" +#include "core.h" + #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" diff --git a/corelib/src/libs/SireMove/integratorworkspace.cpp b/corelib/src/libs/SireMove/integratorworkspace.cpp index da65b1fcf..762dc67df 100644 --- a/corelib/src/libs/SireMove/integratorworkspace.cpp +++ b/corelib/src/libs/SireMove/integratorworkspace.cpp @@ -41,6 +41,7 @@ #include "SireMol/atommasses.h" #include "SireMol/atomcoords.h" #include "SireMol/molidx.h" +#include "SireMol/core.h" #include "SireBase/quickcopy.hpp" @@ -72,9 +73,9 @@ QDataStream &operator<<(QDataStream &ds, const IntegratorWorkspace &intws) { writeHeader(ds, r_intws, 1); - + SharedDataStream sds(ds); - + if (intws.need_new_forces) { sds << true << intws.sys << intws.molgroup << intws.map @@ -86,7 +87,7 @@ QDataStream &operator<<(QDataStream &ds, << intws.molforces << intws.last_nrg_component << static_cast(intws); } - + return ds; } @@ -94,26 +95,26 @@ QDataStream &operator<<(QDataStream &ds, QDataStream &operator>>(QDataStream &ds, IntegratorWorkspace &intws) { VersionID v = readHeader(ds, r_intws); - + if (v == 1) { SharedDataStream sds(ds); bool need_new_forces; - + sds >> need_new_forces; - + if (need_new_forces) { intws.need_new_forces = true; - + sds >> intws.sys >> intws.molgroup >> intws.map >> static_cast(intws); } else { intws.need_new_forces = false; - + sds >> intws.sys >> intws.molgroup >> intws.map >> intws.molforces >> intws.last_nrg_component >> static_cast(intws); @@ -126,20 +127,20 @@ QDataStream &operator>>(QDataStream &ds, IntegratorWorkspace &intws) } /** Constructor */ -IntegratorWorkspace::IntegratorWorkspace(const PropertyMap &m) +IntegratorWorkspace::IntegratorWorkspace(const PropertyMap &m) : Property(), map(m), need_new_forces(true) {} /** Construct to hold the variables used to integrate the molecules in 'molgroup' */ IntegratorWorkspace::IntegratorWorkspace(const MoleculeGroup &molecule_group, const PropertyMap &m) - : Property(), molgroup(molecule_group), + : Property(), molgroup(molecule_group), molforces(molecule_group), map(m), need_new_forces(true) {} /** Copy constructor */ IntegratorWorkspace::IntegratorWorkspace(const IntegratorWorkspace &other) - : Property(other), + : Property(other), sys(other.sys), molgroup(other.molgroup), molforces(other.molforces), @@ -165,7 +166,7 @@ IntegratorWorkspace& IntegratorWorkspace::operator=(const IntegratorWorkspace &o map = other.map; need_new_forces = other.need_new_forces; } - + return *this; } @@ -174,9 +175,9 @@ bool IntegratorWorkspace::operator==(const IntegratorWorkspace &other) const { return (this == &other) or (sys == other.sys and - molgroup == other.molgroup and + molgroup == other.molgroup and last_nrg_component == other.last_nrg_component and - need_new_forces == other.need_new_forces and + need_new_forces == other.need_new_forces and map == other.map and molforces == other.molforces); } @@ -200,7 +201,7 @@ const ForceTable& IntegratorWorkspace::forceTable() const return molforces; } -/** Set the system to be integrated - this updates the molecules in +/** Set the system to be integrated - this updates the molecules in the passed molecule group - this returns whether or not the system has changed */ bool IntegratorWorkspace::setSystem(const System &system) @@ -214,29 +215,29 @@ bool IntegratorWorkspace::setSystem(const System &system) if (sys.UID() == system.UID() and sys.version() == system.version()) //nothing needs to change return false; - + if (system.contains(molgroup.read().number())) { MolGroupPtr new_molgroup = system[molgroup.read().number()]; - - if (new_molgroup.read().version().majorVersion() + + if (new_molgroup.read().version().majorVersion() != molgroup.read().version().majorVersion()) { //we need to reallocate new space for the forces molforces = ForceTable(new_molgroup.read()); } - + molgroup = new_molgroup; } else { molgroup.edit().update(system.molecules()); } - + need_new_forces = true; last_nrg_component = Symbol(); sys = system; - + return true; } @@ -247,7 +248,7 @@ const System& IntegratorWorkspace::system() const } /** Return the system being integrated */ -System& IntegratorWorkspace::nonConstsystem() +System& IntegratorWorkspace::nonConstsystem() { return sys; } @@ -380,7 +381,7 @@ bool IntegratorWorkspace::calculateForces(const Symbol &nrg_component) sys.force(molforces, nrg_component); last_nrg_component = nrg_component; need_new_forces = false; - + return true; } else @@ -406,7 +407,7 @@ void IntegratorWorkspace::mustNowRecalculateFromScratch() void IntegratorWorkspace::pvt_update(const Molecules &changed_mols) { sys.update(changed_mols); - + if (sys.contains(molgroup.read().number())) { molgroup = sys[molgroup.read().number()]; @@ -415,7 +416,7 @@ void IntegratorWorkspace::pvt_update(const Molecules &changed_mols) { molgroup.edit().update(changed_mols); } - + need_new_forces = true; last_nrg_component = Symbol(); } @@ -441,29 +442,29 @@ const NullIntegratorWorkspace& IntegratorWorkspace::null() static const RegisterMetaType r_nullintws; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const NullIntegratorWorkspace &nullintws) { writeHeader(ds, r_nullintws, 1); - + ds << static_cast(nullintws); - + return ds; } /** Extract from a binary datastream */ -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, NullIntegratorWorkspace &nullintws) { VersionID v = readHeader(ds, r_nullintws); - + if (v == 1) { ds >> static_cast(nullintws); } else throw version_error( v, "1", r_nullintws, CODELOC ); - + return ds; } @@ -511,7 +512,7 @@ MolarEnergy NullIntegratorWorkspace::kineticEnergy() const return MolarEnergy(0); } -/** This contains no molecules +/** This contains no molecules \throw SireMol::missing_molecule */ @@ -521,11 +522,11 @@ MolarEnergy NullIntegratorWorkspace::kineticEnergy(MolNum molnum) const "The null integrator workspace does not contain any molecules, so it " "definitely does not contain %1.") .arg(molnum.toString()), CODELOC ); - + return MolarEnergy(0); } -/** This contains no molecules +/** This contains no molecules \throw SireMol::missing_molecule */ @@ -535,7 +536,7 @@ MolarEnergy NullIntegratorWorkspace::kineticEnergy(const MoleculeView &molview) "The null integrator workspace does not contain any molecules, so it " "definitely does not contain %1.") .arg(molview.toString()), CODELOC ); - + return MolarEnergy(0); } @@ -550,15 +551,15 @@ const char* NullIntegratorWorkspace::typeName() static const RegisterMetaType r_atvelws; -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const AtomicVelocityWorkspace &atvelws) { writeHeader(ds, r_atvelws, 1); - + SharedDataStream sds(ds); - + sds << static_cast(atvelws); - + return ds; } @@ -566,22 +567,22 @@ QDataStream &operator>>(QDataStream &ds, AtomicVelocityWorkspace &atvelws) { VersionID v = readHeader(ds, r_atvelws); - + if (v == 1) { SharedDataStream sds(ds); - + AtomicVelocityWorkspace ws; - + sds >> static_cast(ws); - + ws.rebuildFromScratch(); - + atvelws = ws; } else throw version_error(v, "1", r_atvelws, CODELOC); - + return ds; } @@ -590,15 +591,15 @@ static QVector getMasses(const QVector &masses) int sz = masses.count(); QVector atom_masses(sz); atom_masses.squeeze(); - + const MolarMass *masses_array = masses.constData(); double *atom_masses_array = atom_masses.data(); - + for (int i=0; i getMasses(const QVector &elements) int sz = elements.count(); QVector atom_masses(sz); atom_masses.squeeze(); - + const Element *elements_array = elements.constData(); double *atom_masses_array = atom_masses.data(); - + for (int i=0; i getMomenta(const QVector &velocities, const QVector &masses) { int nats = velocities.count(); - + QVector momenta(nats); momenta.squeeze(); - + const Velocity3D *vel_array = velocities.constData(); const double *mass_array = masses.constData(); - + Vector *mom_array = momenta.data(); - + for (int i=0; i getVelocities(const QVector &momenta, const QVector &masses) { int nats = momenta.count(); - + QVector velocities(nats); velocities.squeeze(); - + const Vector *mom_array = momenta.constData(); const double *mass_array = masses.constData(); - + Velocity3D *vel_array = velocities.data(); - + for (int i=0; i getVelocities(const QVector &momenta, else vel_array[i] = Velocity3D(0); } - + return velocities; } @@ -669,45 +670,45 @@ static QVector getVelocities(const QVector &momenta, void AtomicVelocityWorkspace::rebuildFromScratch() { const System &sys = this->system(); - + PropertyName coords_property = this->coordinatesProperty(); PropertyName mass_property = this->massesProperty(); PropertyName element_property = this->elementsProperty(); PropertyName velocity_property = this->velocitiesProperty(); PropertyName velgen_property = this->velocityGeneratorProperty(); - + const MoleculeGroup &molgroup = this->moleculeGroup(); const ForceTable &forcetable = this->forceTable(); - + int nmols = molgroup.nMolecules(); - + atom_coords = QVector< QVector >(nmols); atom_momenta = QVector< QVector >(nmols); atom_masses = QVector< QVector >(nmols); - + atom_coords.squeeze(); atom_momenta.squeeze(); atom_masses.squeeze(); - + QVector *atom_coords_array = atom_coords.data(); QVector *atom_mom_array = atom_momenta.data(); QVector *atom_masses_array = atom_masses.data(); atom_forces = QVector< QVector >(); QVector *atom_forces_array = 0; - + if (sys.containsProperty(velgen_property)) vel_generator = sys.property(velgen_property).asA(); else vel_generator = NullVelocityGenerator(); - + for (int i=0; i().toVector()); } - + if (moldata.hasProperty(velocity_property)) { atom_mom_array[i] = ::getMomenta( @@ -744,10 +745,10 @@ void AtomicVelocityWorkspace::rebuildFromScratch() else { AtomSelection selected_atoms = mol.selection(); - + atom_coords_array[i] = moldata.property(coords_property) .asA().toVector(selected_atoms); - + if (moldata.hasProperty(mass_property)) { atom_masses_array[i] = ::getMasses( @@ -762,7 +763,7 @@ void AtomicVelocityWorkspace::rebuildFromScratch() .asA() .toVector(selected_atoms)); } - + if (moldata.hasProperty(velocity_property)) { atom_mom_array[i] = ::getMomenta( @@ -776,16 +777,16 @@ void AtomicVelocityWorkspace::rebuildFromScratch() vel_generator.read().generate(mol, propertyMap()) .toVector(selected_atoms), atom_masses_array[i]); - + } - + if (atom_forces_array == 0) { atom_forces = QVector< QVector >(nmols); atom_forces.squeeze(); atom_forces_array = atom_forces.data(); } - + atom_forces_array[i] = forcetable.getTable(molnum).toVector(selected_atoms); } } @@ -796,7 +797,7 @@ bool AtomicVelocityWorkspace::calculateForces(const Symbol &nrg_component) { if (not IntegratorWorkspace::calculateForces(nrg_component)) return false; - + else if (atom_forces.isEmpty()) { //there is nothing to do, as we have no partial molecules, @@ -807,15 +808,15 @@ bool AtomicVelocityWorkspace::calculateForces(const Symbol &nrg_component) { int nmols = atom_forces.count(); QVector *atom_forces_array = atom_forces.data(); - + const MoleculeGroup &molgroup = moleculeGroup(); const ForceTable &forcetable = forceTable(); - + for (int i=0; i(); @@ -823,7 +824,7 @@ bool AtomicVelocityWorkspace::calculateForces(const Symbol &nrg_component) atom_forces_array[i] = forcetable.getTable(molnum) .toVector(mol.selection()); } - + return true; } } @@ -832,18 +833,18 @@ bool AtomicVelocityWorkspace::calculateForces(const Symbol &nrg_component) void AtomicVelocityWorkspace::regenerateVelocities(const VelocityGenerator &generator) { const MoleculeGroup &molgroup = moleculeGroup(); - + int nmols = molgroup.nMolecules(); QVector *atom_mom_array = atom_momenta.data(); - + const QVector *atom_masses_array = atom_masses.constData(); - + for (int i=0; i &masses, { int nats = masses.count(); BOOST_ASSERT( momenta.count() == nats ); - + const double *masses_array = masses.constData(); const Vector *mom_array = momenta.constData(); - + double nrg = 0; - + // Kinetic energy is p**2 / 2m // - // Internal units are self-consistent + // Internal units are self-consistent // (Angstrom / AKMA, and g mol-1, which give // energies in kcal mol-1 - + for (int i=0; i *masses_array = atom_masses.constData(); const QVector *mom_array = atom_momenta.constData(); - + double nrg = 0; - + for (int i=0; imoleculeGroup().indexOf(molnum); - + return MolarEnergy( ::getKineticEnergy(atom_masses[i], atom_momenta[i]) ); } /** Return the total kinetic energy of the atoms in the the molecule viewed in 'molview' - + \throw SireMol::missing_molecule */ MolarEnergy AtomicVelocityWorkspace::kineticEnergy(const MoleculeView &molview) const @@ -1042,7 +1043,7 @@ const Vector* AtomicVelocityWorkspace::forceArray(int i) const return forceTable().getTable( moleculeGroup().molNumAt(i) ).constValueData(); const QVector &forces = atom_forces.constData()[i]; - + if (forces.isEmpty()) //we can get the forces straight from the forcetable return forceTable().getTable( moleculeGroup().molNumAt(i) ).constValueData(); @@ -1115,28 +1116,28 @@ bool AtomicVelocityWorkspace::setSystem(const System &new_system) void AtomicVelocityWorkspace::commitCoordinates() { int nmols = atom_coords.count(); - + const MoleculeGroup &molgroup = moleculeGroup(); const Molecules &molecules = molgroup.molecules(); - + BOOST_ASSERT( molgroup.nMolecules() == nmols ); - + const QVector *coords_array = atom_coords.constData(); - + PropertyName coords_property = coordinatesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i(); - + if (mol.selectedAll()) coords.copyFrom(coords_array[i]); else @@ -1146,7 +1147,7 @@ void AtomicVelocityWorkspace::commitCoordinates() .setProperty(coords_property, coords) .commit() ); } - + IntegratorWorkspace::pvt_update(changed_mols); } @@ -1154,28 +1155,28 @@ void AtomicVelocityWorkspace::commitCoordinates() void AtomicVelocityWorkspace::commitVelocities() { int nmols = atom_coords.count(); - + const MoleculeGroup &molgroup = moleculeGroup(); const Molecules &molecules = molgroup.molecules(); - + BOOST_ASSERT( molgroup.nMolecules() == nmols ); - + const QVector *mom_array = atom_momenta.constData(); const QVector *mass_array = atom_masses.constData(); - + PropertyName vels_property = velocitiesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i *coords_array = atom_coords.constData(); const QVector *mom_array = atom_momenta.constData(); const QVector *mass_array = atom_masses.constData(); - + PropertyName coords_property = coordinatesProperty(); PropertyName vels_property = velocitiesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i(); AtomVelocities vels; - + if (mol.data().hasProperty(vels_property)) { vels = mol.data().property(vels_property) @@ -1240,7 +1241,7 @@ void AtomicVelocityWorkspace::commitCoordinatesAndVelocities() { vels = AtomVelocities(mol.data().info()); } - + if (mol.selectedAll()) { coords.copyFrom(coords_array[i]); @@ -1249,7 +1250,7 @@ void AtomicVelocityWorkspace::commitCoordinatesAndVelocities() else { coords.copyFrom(coords_array[i], mol.selection()); - vels.copyFrom( ::getVelocities(mom_array[i],mass_array[i]), + vels.copyFrom( ::getVelocities(mom_array[i],mass_array[i]), mol.selection() ); } @@ -1258,7 +1259,7 @@ void AtomicVelocityWorkspace::commitCoordinatesAndVelocities() .setProperty(vels_property, vels) .commit() ); } - + IntegratorWorkspace::pvt_update(changed_mols); } @@ -1266,22 +1267,22 @@ void AtomicVelocityWorkspace::commitCoordinatesAndVelocities() void AtomicVelocityWorkspace::commitBufferedCoordinatesAndVelocities( QVector < QVector< QVector< Vector > > > &buffered_coords ) { int nmols = atom_coords.count(); - + const MoleculeGroup &molgroup = moleculeGroup(); const Molecules &molecules = molgroup.molecules(); - + BOOST_ASSERT( molgroup.nMolecules() == nmols ); - + const QVector *coords_array = atom_coords.constData(); const QVector *mom_array = atom_momenta.constData(); const QVector *mass_array = atom_masses.constData(); - + PropertyName coords_property = coordinatesProperty(); PropertyName vels_property = velocitiesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + //qDebug() << " buffered_coords has " << buffered_coords.size() << " elements ";// number of mols //qDebug() << " buffered_coords[0] has " << buffered_coords[0].size() << " elements ";// number of atoms in mol 1 //qDebug() << " buffered_coords[0][0] has " << buffered_coords[0][0].size() << " elements "; // number of coords for atom @@ -1290,18 +1291,18 @@ void AtomicVelocityWorkspace::commitBufferedCoordinatesAndVelocities( QVector < { //qDebug() << " Doing mol " << i ; MolNum molnum = molgroup.molNumAt(i); - + const ViewsOfMol &mol = molecules[molnum]; - + AtomCoords coords = mol.data().property(coords_property) .asA(); //qDebug() << " buffered_coords[0][ " << i << " ] has " << buffered_coords[0][i].size() << " elements "; - + QVector< AtomCoords > buffered_molcoords; - + AtomVelocities vels; - + if (mol.data().hasProperty(vels_property)) { vels = mol.data().property(vels_property) @@ -1311,7 +1312,7 @@ void AtomicVelocityWorkspace::commitBufferedCoordinatesAndVelocities( QVector < { vels = AtomVelocities(mol.data().info()); } - + if (mol.selectedAll()) { coords.copyFrom(coords_array[i]); @@ -1327,7 +1328,7 @@ void AtomicVelocityWorkspace::commitBufferedCoordinatesAndVelocities( QVector < else { coords.copyFrom(coords_array[i], mol.selection()); - vels.copyFrom( ::getVelocities(mom_array[i],mass_array[i]), + vels.copyFrom( ::getVelocities(mom_array[i],mass_array[i]), mol.selection() ); } @@ -1350,6 +1351,6 @@ void AtomicVelocityWorkspace::commitBufferedCoordinatesAndVelocities( QVector < buffered_molcoords.clear(); //qDebug() << " Looping "; } - + IntegratorWorkspace::pvt_update(changed_mols); } diff --git a/corelib/src/libs/SireMove/integratorworkspacejm.cpp b/corelib/src/libs/SireMove/integratorworkspacejm.cpp index 66a58c855..398fab84a 100644 --- a/corelib/src/libs/SireMove/integratorworkspacejm.cpp +++ b/corelib/src/libs/SireMove/integratorworkspacejm.cpp @@ -41,6 +41,7 @@ #include "SireMol/atommasses.h" #include "SireMol/atomcoords.h" #include "SireMol/molidx.h" +#include "SireMol/core.h" #include "SireBase/quickcopy.hpp" @@ -70,9 +71,9 @@ QDataStream &operator<<(QDataStream &ds, const IntegratorWorkspaceJM &intws) { writeHeader(ds, r_intwsjm, 1); - + SharedDataStream sds(ds); - + if (intws.need_new_forces) { sds << true << intws.sys << intws.molgroup << intws.map @@ -84,7 +85,7 @@ QDataStream &operator<<(QDataStream &ds, << intws.molforces << intws.molenergies << intws.last_nrg_component << static_cast(intws); } - + return ds; } @@ -92,26 +93,26 @@ QDataStream &operator<<(QDataStream &ds, QDataStream &operator>>(QDataStream &ds, IntegratorWorkspaceJM &intws) { VersionID v = readHeader(ds, r_intwsjm); - + if (v == 1) { SharedDataStream sds(ds); bool need_new_forces; - + sds >> need_new_forces; - + if (need_new_forces) { intws.need_new_forces = true; - + sds >> intws.sys >> intws.molgroup >> intws.map >> static_cast(intws); } else { intws.need_new_forces = false; - + sds >> intws.sys >> intws.molgroup >> intws.map >> intws.molforces >> intws.molenergies >> intws.last_nrg_component >> static_cast(intws); @@ -124,20 +125,20 @@ QDataStream &operator>>(QDataStream &ds, IntegratorWorkspaceJM &intws) } /** Constructor */ -IntegratorWorkspaceJM::IntegratorWorkspaceJM(const PropertyMap &m) +IntegratorWorkspaceJM::IntegratorWorkspaceJM(const PropertyMap &m) : Property(), map(m), need_new_forces(true) {} /** Construct to hold the variables used to integrate the molecules in 'molgroup' */ IntegratorWorkspaceJM::IntegratorWorkspaceJM(const MoleculeGroup &molecule_group, const PropertyMap &m) - : Property(), molgroup(molecule_group), + : Property(), molgroup(molecule_group), molforces(molecule_group), molenergies(molecule_group), map(m), need_new_forces(true) {} /** Copy constructor */ IntegratorWorkspaceJM::IntegratorWorkspaceJM(const IntegratorWorkspaceJM &other) - : Property(other), + : Property(other), sys(other.sys), molgroup(other.molgroup), molforces(other.molforces), @@ -165,7 +166,7 @@ IntegratorWorkspaceJM& IntegratorWorkspaceJM::operator=(const IntegratorWorkspac map = other.map; need_new_forces = other.need_new_forces; } - + return *this; } @@ -174,11 +175,11 @@ bool IntegratorWorkspaceJM::operator==(const IntegratorWorkspaceJM &other) const { return (this == &other) or (sys == other.sys and - molgroup == other.molgroup and + molgroup == other.molgroup and last_nrg_component == other.last_nrg_component and - need_new_forces == other.need_new_forces and + need_new_forces == other.need_new_forces and map == other.map and - molforces == other.molforces and + molforces == other.molforces and molenergies == other.molenergies); } @@ -233,7 +234,7 @@ const EnergyTable& IntegratorWorkspaceJM::energyTable() const } -/** Set the system to be integrated - this updates the molecules in +/** Set the system to be integrated - this updates the molecules in the passed molecule group - this returns whether or not the system has changed */ bool IntegratorWorkspaceJM::setSystem(const System &system) @@ -247,12 +248,12 @@ bool IntegratorWorkspaceJM::setSystem(const System &system) if (sys.UID() == system.UID() and sys.version() == system.version()) //nothing needs to change return false; - + if (system.contains(molgroup.read().number())) { MolGroupPtr new_molgroup = system[molgroup.read().number()]; - - if (new_molgroup.read().version().majorVersion() + + if (new_molgroup.read().version().majorVersion() != molgroup.read().version().majorVersion()) { //we need to reallocate new space for the forces @@ -260,18 +261,18 @@ bool IntegratorWorkspaceJM::setSystem(const System &system) molenergies = EnergyTable(new_molgroup.read()); } - + molgroup = new_molgroup; } else { molgroup.edit().update(system.molecules()); } - + need_new_forces = true; last_nrg_component = Symbol(); sys = system; - + return true; } @@ -415,7 +416,7 @@ bool IntegratorWorkspaceJM::calculateForces(const Symbol &nrg_component) last_nrg_component = nrg_component; need_new_forces = false; - + return true; } else @@ -431,7 +432,7 @@ bool IntegratorWorkspaceJM::calculateForces(const Symbol &nrg_component) // sys.energy(molenergies, nrg_component); // last_nrg_component = nrg_component; // need_new_forces = false; -// +// // return true; // } // else @@ -458,7 +459,7 @@ void IntegratorWorkspaceJM::mustNowRecalculateFromScratch() void IntegratorWorkspaceJM::pvt_update(const Molecules &changed_mols) { sys.update(changed_mols); - + if (sys.contains(molgroup.read().number())) { molgroup = sys[molgroup.read().number()]; @@ -467,7 +468,7 @@ void IntegratorWorkspaceJM::pvt_update(const Molecules &changed_mols) { molgroup.edit().update(changed_mols); } - + need_new_forces = true; last_nrg_component = Symbol(); } @@ -493,29 +494,29 @@ const NullIntegratorWorkspaceJM& IntegratorWorkspaceJM::null() static const RegisterMetaType r_nullintwsjm; /** Serialise to a binary datastream */ -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const NullIntegratorWorkspaceJM &nullintws) { writeHeader(ds, r_nullintwsjm, 1); - + ds << static_cast(nullintws); - + return ds; } /** Extract from a binary datastream */ -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, NullIntegratorWorkspaceJM &nullintws) { VersionID v = readHeader(ds, r_nullintwsjm); - + if (v == 1) { ds >> static_cast(nullintws); } else throw version_error( v, "1", r_nullintwsjm, CODELOC ); - + return ds; } @@ -563,7 +564,7 @@ MolarEnergy NullIntegratorWorkspaceJM::kineticEnergy() const return MolarEnergy(0); } -/** This contains no molecules +/** This contains no molecules \throw SireMol::missing_molecule */ @@ -573,11 +574,11 @@ MolarEnergy NullIntegratorWorkspaceJM::kineticEnergy(MolNum molnum) const "The null integrator workspace does not contain any molecules, so it " "definitely does not contain %1.") .arg(molnum.toString()), CODELOC ); - + return MolarEnergy(0); } -/** This contains no molecules +/** This contains no molecules \throw SireMol::missing_molecule */ @@ -587,7 +588,7 @@ MolarEnergy NullIntegratorWorkspaceJM::kineticEnergy(const MoleculeView &molview "The null integrator workspace does not contain any molecules, so it " "definitely does not contain %1.") .arg(molview.toString()), CODELOC ); - + return MolarEnergy(0); } @@ -602,15 +603,15 @@ const char* NullIntegratorWorkspaceJM::typeName() static const RegisterMetaType r_atvelwsjm; -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const AtomicVelocityWorkspaceJM &atvelws) { writeHeader(ds, r_atvelwsjm, 1); - + SharedDataStream sds(ds); - + sds << static_cast(atvelws); - + return ds; } @@ -618,22 +619,22 @@ QDataStream &operator>>(QDataStream &ds, AtomicVelocityWorkspaceJM &atvelws) { VersionID v = readHeader(ds, r_atvelwsjm); - + if (v == 1) { SharedDataStream sds(ds); - + AtomicVelocityWorkspaceJM ws; - + sds >> static_cast(ws); - + ws.rebuildFromScratch(); - + atvelws = ws; } else throw version_error(v, "1", r_atvelwsjm, CODELOC); - + return ds; } @@ -642,15 +643,15 @@ static QVector getMasses(const QVector &masses) int sz = masses.count(); QVector atom_masses(sz); atom_masses.squeeze(); - + const MolarMass *masses_array = masses.constData(); double *atom_masses_array = atom_masses.data(); - + for (int i=0; i getMasses(const QVector &elements) int sz = elements.count(); QVector atom_masses(sz); atom_masses.squeeze(); - + const Element *elements_array = elements.constData(); double *atom_masses_array = atom_masses.data(); - + for (int i=0; i getMomenta(const QVector &velocities, const QVector &masses) { int nats = velocities.count(); - + QVector momenta(nats); momenta.squeeze(); - + const Velocity3D *vel_array = velocities.constData(); const double *mass_array = masses.constData(); - + Vector *mom_array = momenta.data(); - + for (int i=0; i getVelocities(const QVector &momenta, const QVector &masses) { int nats = momenta.count(); - + QVector velocities(nats); velocities.squeeze(); - + const Vector *mom_array = momenta.constData(); const double *mass_array = masses.constData(); - + Velocity3D *vel_array = velocities.data(); - + for (int i=0; i getVelocities(const QVector &momenta, else vel_array[i] = Velocity3D(0); } - + return velocities; } @@ -721,34 +722,34 @@ static QVector getVelocities(const QVector &momenta, void AtomicVelocityWorkspaceJM::rebuildFromScratch() { const System &sys = this->system(); - + PropertyName coords_property = this->coordinatesProperty(); PropertyName mass_property = this->massesProperty(); PropertyName element_property = this->elementsProperty(); PropertyName velocity_property = this->velocitiesProperty(); PropertyName velgen_property = this->velocityGeneratorProperty(); - + const MoleculeGroup &molgroup = this->moleculeGroup(); const ForceTable &forcetable = this->forceTable(); const EnergyTable &energytable = this->energyTable(); int nmols = molgroup.nMolecules(); - + atom_coords = QVector< QVector >(nmols); atom_momenta = QVector< QVector >(nmols); atom_masses = QVector< QVector >(nmols); - + atom_coords.squeeze(); atom_momenta.squeeze(); atom_masses.squeeze(); - + QVector *atom_coords_array = atom_coords.data(); QVector *atom_mom_array = atom_momenta.data(); QVector *atom_masses_array = atom_masses.data(); atom_forces = QVector< QVector >(); QVector *atom_forces_array = 0; - + atom_energies = QVector< QVector >(); QVector *atom_energies_array = 0; @@ -756,14 +757,14 @@ void AtomicVelocityWorkspaceJM::rebuildFromScratch() vel_generator = sys.property(velgen_property).asA(); else vel_generator = NullVelocityGenerator(); - + for (int i=0; i().toVector()); } - + if (moldata.hasProperty(velocity_property)) { atom_mom_array[i] = ::getMomenta( @@ -800,10 +801,10 @@ void AtomicVelocityWorkspaceJM::rebuildFromScratch() else { AtomSelection selected_atoms = mol.selection(); - + atom_coords_array[i] = moldata.property(coords_property) .asA().toVector(selected_atoms); - + if (moldata.hasProperty(mass_property)) { atom_masses_array[i] = ::getMasses( @@ -818,7 +819,7 @@ void AtomicVelocityWorkspaceJM::rebuildFromScratch() .asA() .toVector(selected_atoms)); } - + if (moldata.hasProperty(velocity_property)) { atom_mom_array[i] = ::getMomenta( @@ -832,16 +833,16 @@ void AtomicVelocityWorkspaceJM::rebuildFromScratch() vel_generator.read().generate(mol, propertyMap()) .toVector(selected_atoms), atom_masses_array[i]); - + } - + if (atom_forces_array == 0) { atom_forces = QVector< QVector >(nmols); atom_forces.squeeze(); atom_forces_array = atom_forces.data(); } - + atom_forces_array[i] = forcetable.getTable(molnum).toVector(selected_atoms); if (atom_energies_array == 0) @@ -850,9 +851,9 @@ void AtomicVelocityWorkspaceJM::rebuildFromScratch() atom_energies.squeeze(); atom_energies_array = atom_energies.data(); } - + atom_energies_array[i] = energytable.getTable(molnum).toVector(selected_atoms); - + } } } @@ -862,7 +863,7 @@ bool AtomicVelocityWorkspaceJM::calculateForces(const Symbol &nrg_component) { if (not IntegratorWorkspaceJM::calculateForces(nrg_component)) return false; - + else if (atom_forces.isEmpty()) { //there is nothing to do, as we have no partial molecules, @@ -873,7 +874,7 @@ bool AtomicVelocityWorkspaceJM::calculateForces(const Symbol &nrg_component) { int nmols = atom_forces.count(); QVector *atom_forces_array = atom_forces.data(); - + const MoleculeGroup &molgroup = moleculeGroup(); const ForceTable &forcetable = forceTable(); @@ -884,7 +885,7 @@ bool AtomicVelocityWorkspaceJM::calculateForces(const Symbol &nrg_component) { MolNum molnum = molgroup.molNumAt(i); const ViewsOfMol &mol = molgroup[molnum].data(); - + if (mol.selectedAll()) { atom_forces_array[i] = QVector(); @@ -899,7 +900,7 @@ bool AtomicVelocityWorkspaceJM::calculateForces(const Symbol &nrg_component) .toVector(mol.selection()); } } - + return true; } } @@ -908,18 +909,18 @@ bool AtomicVelocityWorkspaceJM::calculateForces(const Symbol &nrg_component) void AtomicVelocityWorkspaceJM::regenerateVelocities(const VelocityGenerator &generator) { const MoleculeGroup &molgroup = moleculeGroup(); - + int nmols = molgroup.nMolecules(); QVector *atom_mom_array = atom_momenta.data(); - + const QVector *atom_masses_array = atom_masses.constData(); - + for (int i=0; i &masses, { int nats = masses.count(); BOOST_ASSERT( momenta.count() == nats ); - + const double *masses_array = masses.constData(); const Vector *mom_array = momenta.constData(); - + double nrg = 0; - + // Kinetic energy is p**2 / 2m // - // Internal units are self-consistent + // Internal units are self-consistent // (Angstrom / AKMA, and g mol-1, which give // energies in kcal mol-1 - + for (int i=0; i *masses_array = atom_masses.constData(); const QVector *mom_array = atom_momenta.constData(); - + double nrg = 0; - + for (int i=0; imoleculeGroup().indexOf(molnum); - + return MolarEnergy( ::getKineticEnergy(atom_masses[i], atom_momenta[i]) ); } /** Return the total kinetic energy of the atoms in the the molecule viewed in 'molview' - + \throw SireMol::missing_molecule */ MolarEnergy AtomicVelocityWorkspaceJM::kineticEnergy(const MoleculeView &molview) const @@ -1118,7 +1119,7 @@ const Vector* AtomicVelocityWorkspaceJM::forceArray(int i) const return forceTable().getTable( moleculeGroup().molNumAt(i) ).constValueData(); const QVector &forces = atom_forces.constData()[i]; - + if (forces.isEmpty()) //we can get the forces straight from the forcetable return forceTable().getTable( moleculeGroup().molNumAt(i) ).constValueData(); @@ -1135,7 +1136,7 @@ const Vector* AtomicVelocityWorkspaceJM::energyArray(int i) const return energyTable().getTable( moleculeGroup().molNumAt(i) ).constValueData(); const QVector &energies = atom_energies.constData()[i]; - + if (energies.isEmpty()) //we can get the energies straight from the forcetable return energyTable().getTable( moleculeGroup().molNumAt(i) ).constValueData(); @@ -1216,28 +1217,28 @@ bool AtomicVelocityWorkspaceJM::setSystem(const System &new_system) void AtomicVelocityWorkspaceJM::commitCoordinates() { int nmols = atom_coords.count(); - + const MoleculeGroup &molgroup = moleculeGroup(); const Molecules &molecules = molgroup.molecules(); - + BOOST_ASSERT( molgroup.nMolecules() == nmols ); - + const QVector *coords_array = atom_coords.constData(); - + PropertyName coords_property = coordinatesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i(); - + if (mol.selectedAll()) coords.copyFrom(coords_array[i]); else @@ -1247,7 +1248,7 @@ void AtomicVelocityWorkspaceJM::commitCoordinates() .setProperty(coords_property, coords) .commit() ); } - + IntegratorWorkspaceJM::pvt_update(changed_mols); } @@ -1255,28 +1256,28 @@ void AtomicVelocityWorkspaceJM::commitCoordinates() void AtomicVelocityWorkspaceJM::commitVelocities() { int nmols = atom_coords.count(); - + const MoleculeGroup &molgroup = moleculeGroup(); const Molecules &molecules = molgroup.molecules(); - + BOOST_ASSERT( molgroup.nMolecules() == nmols ); - + const QVector *mom_array = atom_momenta.constData(); const QVector *mass_array = atom_masses.constData(); - + PropertyName vels_property = velocitiesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i *coords_array = atom_coords.constData(); const QVector *mom_array = atom_momenta.constData(); const QVector *mass_array = atom_masses.constData(); - + PropertyName coords_property = coordinatesProperty(); PropertyName vels_property = velocitiesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i(); AtomVelocities vels; - + if (mol.data().hasProperty(vels_property)) { vels = mol.data().property(vels_property) @@ -1341,7 +1342,7 @@ void AtomicVelocityWorkspaceJM::commitCoordinatesAndVelocities() { vels = AtomVelocities(mol.data().info()); } - + if (mol.selectedAll()) { coords.copyFrom(coords_array[i]); @@ -1350,7 +1351,7 @@ void AtomicVelocityWorkspaceJM::commitCoordinatesAndVelocities() else { coords.copyFrom(coords_array[i], mol.selection()); - vels.copyFrom( ::getVelocities(mom_array[i],mass_array[i]), + vels.copyFrom( ::getVelocities(mom_array[i],mass_array[i]), mol.selection() ); } @@ -1359,6 +1360,6 @@ void AtomicVelocityWorkspaceJM::commitCoordinatesAndVelocities() .setProperty(vels_property, vels) .commit() ); } - + IntegratorWorkspaceJM::pvt_update(changed_mols); } diff --git a/corelib/src/libs/SireMove/internalmove.cpp b/corelib/src/libs/SireMove/internalmove.cpp index a50dac51f..7272a719b 100644 --- a/corelib/src/libs/SireMove/internalmove.cpp +++ b/corelib/src/libs/SireMove/internalmove.cpp @@ -41,6 +41,7 @@ #include "SireMol/bondid.h" #include "SireMol/angleid.h" #include "SireMol/dihedralid.h" +#include "SireMol/core.h" #include "SireMaths/vectorproperty.h" @@ -69,14 +70,14 @@ static const RegisterMetaType r_internalmove; QDataStream &operator<<(QDataStream &ds, const InternalMove &internalmove) { writeHeader(ds, r_internalmove, 2); - + SharedDataStream sds(ds); - + sds << internalmove.smplr << internalmove.center_function << internalmove.flexibility_property << static_cast(internalmove); - + return ds; } @@ -88,7 +89,7 @@ QDataStream &operator>>(QDataStream &ds, InternalMove &internalmove) if (v == 2) { SharedDataStream sds(ds); - + sds >> internalmove.smplr >> internalmove.center_function >> internalmove.flexibility_property @@ -97,10 +98,10 @@ QDataStream &operator>>(QDataStream &ds, InternalMove &internalmove) else if (v == 1) { SharedDataStream sds(ds); - + internalmove.center_function = GetCOMPoint(); - - sds >> internalmove.smplr + + sds >> internalmove.smplr >> internalmove.flexibility_property >> static_cast(internalmove); } @@ -111,7 +112,7 @@ QDataStream &operator>>(QDataStream &ds, InternalMove &internalmove) } /** Null constructor */ -InternalMove::InternalMove(const PropertyMap &map) +InternalMove::InternalMove(const PropertyMap &map) : ConcreteProperty(map) { flexibility_property = map["flexibility"]; @@ -163,7 +164,7 @@ InternalMove& InternalMove::operator=(const InternalMove &other) center_function = other.center_function; flexibility_property = other.flexibility_property; } - + return *this; } @@ -263,7 +264,7 @@ double clipDouble(double value) return (std::min)(maxdbl, (std::max)(mindbl, value)); } -/** Actually perform 'nmoves' moves of the molecules in the +/** Actually perform 'nmoves' moves of the molecules in the system 'system', optionally recording simulation statistics if 'record_stats' is true */ void InternalMove::move(System &system, int nmoves, bool record_stats) @@ -284,29 +285,29 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) double old_nrg = system.energy( this->energyComponent() ); System old_system(system); SamplerPtr old_sampler(smplr); - + double old_bias = 1; double new_bias = 1; - + //move one molecule //update the sampler with the latest version of the molecules smplr.edit().updateFrom(system); //this will randomly select one molecule tuple mol_and_bias = smplr.read().sample(); - + const PartialMolecule &oldmol = mol_and_bias.get<0>(); - + if (smplr.read().isBiased()) old_bias = mol_and_bias.get<1>(); - + Flexibility flex = oldmol.property(flexibility_property).asA(); - // Select the dofs to move. + // Select the dofs to move. QList moved_bonds; QList moved_angles; QList moved_dihedrals; - + QList flex_bonds = flex.flexibleBonds(); QList flex_angs = flex.flexibleAngles(); QList flex_dihs = flex.flexibleDihedrals(); @@ -338,7 +339,7 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) } } } - + // Select angles if ( nangles == 0 || maxanglevar < 0 || maxanglevar >= nangles ) { @@ -358,7 +359,7 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) } } } - + // Select dihedrals if ( ndihedrals == 0 || maxdihedralvar < 0 || maxdihedralvar >= ndihedrals ) { @@ -385,9 +386,9 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) // of the molecule) const bool has_center_property = (oldmol.selectedAll() and oldmol.hasProperty(center_property)); - + Vector old_center; - + if (has_center_property) { old_center = oldmol.property(center_property).asA(); @@ -402,7 +403,7 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) // move the bonds of this molecule Length bond_delta; - + foreach (const BondID &bond, moved_bonds) { //const Length bond_delta_value = flex.bond_deltas[bond]; @@ -415,7 +416,7 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) // and the angles Angle angle_delta; - + foreach (const AngleID &angle, moved_angles) { //const Angle angle_delta_value = flex.angle_deltas[angle]; @@ -425,10 +426,10 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) mol_mover.change(angle, angle_delta, map); } - + // and the torsions Angle dihedral_delta; - + foreach (const DihedralID &dihedral, moved_dihedrals) { double angle_delta_value = clipDouble(flex.delta(dihedral)); @@ -437,7 +438,7 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) // 50% chance to either rotate around central bond or to just change that dihedral if (this->generator().randBool()) - { + { //move only this specific dihedral mol_mover.change(dihedral, dihedral_delta, map); } @@ -455,7 +456,7 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) //evaluate the new center of geometry, and translate the molecule //to correct for any motion Vector new_center; - + if (has_center_property) { new_center = newmol.property(center_property).asA(); @@ -464,7 +465,7 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) { new_center = center_function.read()(newmol,map); } - + if (old_center != new_center) { newmol = newmol.move().translate( old_center-new_center, map ).commit(); @@ -475,14 +476,14 @@ void InternalMove::move(System &system, int nmoves, bool record_stats) //get the new bias on this molecule smplr.edit().updateFrom(system); - + if (smplr.read().isBiased()) new_bias = smplr.read().probabilityOf( PartialMolecule(newmol, oldmol.selection()) ); //calculate the energy of the system double new_nrg = system.energy( this->energyComponent() ); - + //accept or reject the move based on the change of energy //and the biasing factors if (not this->test(new_nrg, old_nrg, new_bias, old_bias)) diff --git a/corelib/src/libs/SireMove/internalmovesingle.cpp b/corelib/src/libs/SireMove/internalmovesingle.cpp index f777cd6db..cae3e9ec4 100644 --- a/corelib/src/libs/SireMove/internalmovesingle.cpp +++ b/corelib/src/libs/SireMove/internalmovesingle.cpp @@ -41,6 +41,7 @@ #include "SireMol/bondid.h" #include "SireMol/angleid.h" #include "SireMol/dihedralid.h" +#include "SireMol/core.h" #include "SireUnits/dimensions.h" #include "SireUnits/units.h" @@ -66,14 +67,14 @@ static const RegisterMetaType r_internalmovesingle; QDataStream &operator<<(QDataStream &ds, const InternalMoveSingle &internalmove) { writeHeader(ds, r_internalmovesingle, 1); - + SharedDataStream sds(ds); - - sds << internalmove.smplr + + sds << internalmove.smplr << internalmove.flexibility_property - << internalmove.synched_molgroup + << internalmove.synched_molgroup << static_cast(internalmove); - + return ds; } @@ -85,8 +86,8 @@ QDataStream &operator>>(QDataStream &ds, InternalMoveSingle &internalmove) if (v == 1) { SharedDataStream sds(ds); - - sds >> internalmove.smplr + + sds >> internalmove.smplr >> internalmove.flexibility_property >> internalmove.synched_molgroup >> static_cast(internalmove); @@ -98,7 +99,7 @@ QDataStream &operator>>(QDataStream &ds, InternalMoveSingle &internalmove) } /** Null constructor */ -InternalMoveSingle::InternalMoveSingle(const PropertyMap &map) +InternalMoveSingle::InternalMoveSingle(const PropertyMap &map) : ConcreteProperty(map) { flexibility_property = map["flexibility"]; @@ -148,7 +149,7 @@ InternalMoveSingle& InternalMoveSingle::operator=(const InternalMoveSingle &othe flexibility_property = other.flexibility_property; synched_molgroup = other.synched_molgroup; } - + return *this; } @@ -156,7 +157,7 @@ InternalMoveSingle& InternalMoveSingle::operator=(const InternalMoveSingle &othe bool InternalMoveSingle::operator==(const InternalMoveSingle &other) const { return MonteCarlo::operator==(other) and smplr == other.smplr and - flexibility_property == other.flexibility_property and + flexibility_property == other.flexibility_property and synched_molgroup == other.synched_molgroup ; } @@ -238,7 +239,7 @@ void InternalMoveSingle::_pvt_setTemperature(const Temperature &temperature) MonteCarlo::setEnsemble( Ensemble::NVT(temperature) ); } -/** Actually perform 'nmoves' moves of the molecules in the +/** Actually perform 'nmoves' moves of the molecules in the system 'system', optionally recording simulation statistics if 'record_stats' is true */ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) @@ -253,33 +254,33 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) { PropertyMap map; map.set("coordinates", this->coordinatesProperty()); - + for (int i=0; ienergyComponent() ); System old_system(system); SamplerPtr old_sampler(smplr); - + double old_bias = 1; double new_bias = 1; - + //move one molecule //update the sampler with the latest version of the molecules smplr.edit().updateFrom(system); //this will randomly select one molecule tuple mol_and_bias = smplr.read().sample(); - + const PartialMolecule &oldmol = mol_and_bias.get<0>(); old_bias = mol_and_bias.get<1>(); - + Flexibility flex = oldmol.property(flexibility_property).asA(); - // Select the dofs to move. + // Select the dofs to move. QList moved_bonds; QList moved_angles; QList moved_dihedrals; - + QList flex_bonds = flex.flexibleBonds(); QList flex_angs = flex.flexibleAngles(); QList flex_dihs = flex.flexibleDihedrals(); @@ -309,7 +310,7 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) { moved_bonds.append(bond); ++movecount; - } + } } } // Select angles @@ -328,7 +329,7 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) { moved_angles.append(angle); ++movecount; - } + } } } // Select dihedrals @@ -347,7 +348,7 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) { moved_dihedrals.append(dihedral); ++movecount; - } + } } } @@ -360,17 +361,17 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) // } // else // { -// // draw a random number [0, bonds.size()+angles.size()+dihedrals.size()) -// // to find matching dof. +// // draw a random number [0, bonds.size()+angles.size()+dihedrals.size()) +// // to find matching dof. // // Add it to moved_bonds or moved_angles or moved_dihedrals -// // if not already present +// // if not already present // int movecount = 0; - + // while (movecount < maxvar) // { // int rand = this->generator().randInt(0, ndofs - 1); // //qDebug() << " rand is " << rand; - + // if ( rand < nbonds ) // { // // it is a bond... @@ -386,7 +387,7 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) // { // // it is an angle... // const AngleID &angle = flex_angs.at( rand - nbonds ); - + // if ( not moved_angles.contains(angle) ) // { // //qDebug() << " adding angle " << rand - nbonds; @@ -397,9 +398,9 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) // else // { // // it is a dihedral... -// const DihedralID &dihedral = flex_dihs.at( +// const DihedralID &dihedral = flex_dihs.at( // rand - nbonds - nangles ); - + // if ( not moved_dihedrals.contains(dihedral) ) // { // //qDebug() << " adding dihedral " << rand - nbonds - nangles; @@ -415,12 +416,12 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) // move the bonds of this molecule Length bond_delta; - + foreach (const BondID &bond, moved_bonds) { //const Length bond_delta_value = flex.bond_deltas[bond]; double bond_delta_value = flex.delta(bond); - bond_delta = Length( this->generator().rand(-bond_delta_value, + bond_delta = Length( this->generator().rand(-bond_delta_value, bond_delta_value) ); mol_mover.change(bond, bond_delta); @@ -428,34 +429,34 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) // and the angles Angle angle_delta; - + foreach (const AngleID &angle, moved_angles) { //const Angle angle_delta_value = flex.angle_deltas[angle]; double angle_delta_value = flex.delta(angle); angle_delta = Angle( this->generator().rand(-angle_delta_value, - angle_delta_value) ); + angle_delta_value) ); mol_mover.change(angle, angle_delta); } - + // and the torsions Angle dihedral_delta; - + foreach (const DihedralID &dihedral, moved_dihedrals) { - // We rotate by picking the central bond of the dihedral to + // We rotate by picking the central bond of the dihedral to // handle concerted motions //BondID centralbond; //centralbond = BondID(dihedral.atom1(), dihedral.atom2()); - + //const Angle angle_delta_value = flex.angle_deltas[dihedral]; double angle_delta_value = flex.delta(dihedral); dihedral_delta = Angle( this->generator().rand(-angle_delta_value, angle_delta_value) ); //mol_mover.change(centralbond, dihedral_delta); if (this->generator().randBool()) - { + { //move only this specific dihedral mol_mover.change(dihedral, dihedral_delta); } @@ -471,32 +472,32 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) Molecule newmol = mol_mover.commit(); //system.update(newmol); - + //JM 03/11 test if molecule coordinates synched with others // if so, for each synched mol, set coordinates to those of newmol // This only works if all molecules have identical topology - // --> This should be a constraint ? - + // --> This should be a constraint ? + //qDebug() << "HELLO " << synched_molgroup.molecules().toString(); // Get the synched_molgroup from system using the name of the stored synched_molgroup - // We have to look up by names at numbers may have changed if for instance + // We have to look up by names at numbers may have changed if for instance // two replicas have been swapped const MGName &sync_name = synched_molgroup.name(); - + synched_molgroup = system[ sync_name ]; - if (not synched_molgroup.molecules().isEmpty()) + if (not synched_molgroup.molecules().isEmpty()) { const PropertyName &coords_property = map["coordinates"]; const AtomCoords &coords = newmol.data().property(coords_property) .asA(); Molecules new_molecules = synched_molgroup.molecules(); - + for (Molecules::const_iterator it = synched_molgroup.molecules().constBegin(); - it != synched_molgroup.molecules().constEnd(); + it != synched_molgroup.molecules().constEnd(); ++it) { //qDebug() << it; @@ -520,16 +521,16 @@ void InternalMoveSingle::move(System &system, int nmoves, bool record_stats) //get the new bias on this molecule smplr.edit().updateFrom(system); - + new_bias = smplr.read().probabilityOf( PartialMolecule(newmol, oldmol.selection()) ); - // JM DEBUG THERE IS A BUG AND THE INTRAGROUP FORCEFIELDS ENERGIES OF THE MOVED MOLECULE - // ARE NOT UPDATED ( BUT THE PERTURBED ENERGIES ARE CORRECT ! ) + // JM DEBUG THERE IS A BUG AND THE INTRAGROUP FORCEFIELDS ENERGIES OF THE MOVED MOLECULE + // ARE NOT UPDATED ( BUT THE PERTURBED ENERGIES ARE CORRECT ! ) //system.mustNowRecalculateFromScratch(); //calculate the energy of the system double new_nrg = system.energy( this->energyComponent() ); - + //accept or reject the move based on the change of energy //and the biasing factors if (not this->test(new_nrg, old_nrg, new_bias, old_bias)) diff --git a/corelib/src/libs/SireMove/molinserter.cpp b/corelib/src/libs/SireMove/molinserter.cpp index bf08f611f..5b1b64b1d 100644 --- a/corelib/src/libs/SireMove/molinserter.cpp +++ b/corelib/src/libs/SireMove/molinserter.cpp @@ -30,6 +30,7 @@ #include "SireMol/molecule.h" #include "SireMol/partialmolecule.h" +#include "SireMol/core.h" #include "SireVol/space.h" diff --git a/corelib/src/libs/SireMove/move.cpp b/corelib/src/libs/SireMove/move.cpp index 24aec82f0..1ec9571bb 100644 --- a/corelib/src/libs/SireMove/move.cpp +++ b/corelib/src/libs/SireMove/move.cpp @@ -31,6 +31,8 @@ #include "move.h" #include "ensemble.h" +#include "SireMol/core.h" + #include "SireUnits/units.h" #include "SireUnits/temperature.h" @@ -60,14 +62,14 @@ static const RegisterMetaType r_move( MAGIC_ONLY, "SireMove::Move" ); QDataStream &operator<<(QDataStream &ds, const Move &move) { writeHeader(ds, r_move, 2); - + SharedDataStream sds(ds); - + sds << move.nrgcomponent << move.coordsproperty << move.spaceproperty << move.map << static_cast(move); - + return ds; } @@ -75,11 +77,11 @@ QDataStream &operator<<(QDataStream &ds, const Move &move) QDataStream &operator>>(QDataStream &ds, Move &move) { VersionID v = readHeader(ds, r_move); - + if (v == 2) { SharedDataStream sds(ds); - + sds >> move.nrgcomponent >> move.coordsproperty >> move.spaceproperty >> move.map @@ -88,21 +90,21 @@ QDataStream &operator>>(QDataStream &ds, Move &move) else if (v == 1) { SharedDataStream sds(ds); - + sds >> move.nrgcomponent >> move.coordsproperty >> move.spaceproperty >> static_cast(move); - + move.map = PropertyMap(); } else throw version_error(v, "1,2", r_move, CODELOC); - + return ds; } /** Constructor */ -Move::Move(const PropertyMap &map) +Move::Move(const PropertyMap &map) : Property(), nrgcomponent(ForceFields::totalComponent()) { coordsproperty = map["coordinates"]; @@ -110,7 +112,7 @@ Move::Move(const PropertyMap &map) } /** Copy constructor */ -Move::Move(const Move &other) +Move::Move(const Move &other) : Property(other), nrgcomponent(other.nrgcomponent), coordsproperty(other.coordsproperty), spaceproperty(other.spaceproperty), map(other.map) @@ -127,9 +129,9 @@ Move& Move::operator=(const Move &other) coordsproperty = other.coordsproperty; spaceproperty = other.spaceproperty; map = other.map; - + Property::operator=(other); - + return *this; } @@ -148,14 +150,14 @@ bool Move::operator!=(const Move &other) const return not Move::operator==(other); } -/** Perform a single move on the system 'system' without +/** Perform a single move on the system 'system' without recording any statistics */ void Move::move(System &system) { this->move(system, 1, false); } -/** Perform 'n' moves on the system without recording any +/** Perform 'n' moves on the system without recording any statistics */ void Move::move(System &system, int nmoves) { @@ -169,7 +171,7 @@ void Move::setEnergyComponent(const Symbol &component) nrgcomponent = component; } -/** Return the symbol that describes the Hamiltonian that this move +/** Return the symbol that describes the Hamiltonian that this move will sample */ const Symbol& Move::energyComponent() const { @@ -177,7 +179,7 @@ const Symbol& Move::energyComponent() const } /** Set the property used to find the simulation box for this move. This - property is only used when the move involves changing the + property is only used when the move involves changing the simulation box, or when trying to find the volume using the 'volume' function */ void Move::setSpaceProperty(const PropertyName &space_property) @@ -186,8 +188,8 @@ void Move::setSpaceProperty(const PropertyName &space_property) map.set("space", spaceproperty); } -/** Return the property used to find the simulation space (box) - for this move. This property is only used when the move +/** Return the property used to find the simulation space (box) + for this move. This property is only used when the move involves changing the simulation box. */ const PropertyName& Move::spaceProperty() const { @@ -282,11 +284,11 @@ Temperature Move::temperature() const "samples from the %2") .arg( this->what() ).arg(this->ensemble().toString()), CODELOC ); - + return this->ensemble().temperature(); } -/** Return the constant pressure that this move samples +/** Return the constant pressure that this move samples \throw SireError::incompatible_error */ @@ -298,11 +300,11 @@ Pressure Move::pressure() const "samples from the %2") .arg( this->what() ).arg(this->ensemble().toString()), CODELOC ); - + return this->ensemble().pressure(); } -/** Return the constant fugacity that this move samples +/** Return the constant fugacity that this move samples \throw SireError::incompatible_error */ @@ -314,11 +316,11 @@ Pressure Move::fugacity() const "samples from the %2") .arg( this->what() ).arg(this->ensemble().toString()), CODELOC ); - + return this->ensemble().fugacity(); } -/** Return the constant chemical potential that this move samples +/** Return the constant chemical potential that this move samples \throw SireError::incompatible_error */ @@ -330,7 +332,7 @@ MolarEnergy Move::chemicalPotential() const "samples from the %2") .arg( this->what() ).arg(this->ensemble().toString()), CODELOC ); - + return this->ensemble().chemicalPotential(); } @@ -350,7 +352,7 @@ void Move::_pvt_setTemperature(const Temperature &temperature) .arg(this->what()) .arg(this->ensemble().toString()), CODELOC ); } - + /** Set the pressure - this should never be called! */ void Move::_pvt_setPressure(const Pressure &pressure) { @@ -361,7 +363,7 @@ void Move::_pvt_setPressure(const Pressure &pressure) .arg(this->what()) .arg(this->ensemble().toString()), CODELOC ); } - + /** Set the pressure - this should never be called! */ void Move::_pvt_setFugacity(const Pressure &fugacity) { @@ -373,9 +375,9 @@ void Move::_pvt_setFugacity(const Pressure &fugacity) .arg(this->ensemble().toString()), CODELOC ); } -/** Set the temperature that this constant temperature move samples +/** Set the temperature that this constant temperature move samples to 'temperature' - + \throw SireError::incompatible_error */ void Move::setTemperature(const Temperature &temperature) @@ -392,9 +394,9 @@ void Move::setTemperature(const Temperature &temperature) this->_pvt_setTemperature(temperature); } -/** Set the pressure that this constant pressure move samples +/** Set the pressure that this constant pressure move samples to 'pressure' - + \throw SireError::incompatible_error */ void Move::setPressure(const SireUnits::Dimension::Pressure &pressure) @@ -411,9 +413,9 @@ void Move::setPressure(const SireUnits::Dimension::Pressure &pressure) this->_pvt_setPressure(pressure); } -/** Set the chemical potential that this constant chemical potential move samples +/** Set the chemical potential that this constant chemical potential move samples to 'chemical_potential' - + \throw SireError::incompatible_error */ void Move::setChemicalPotential(const MolarEnergy &chemical_potential) @@ -432,9 +434,9 @@ void Move::setChemicalPotential(const MolarEnergy &chemical_potential) .fugacity() ); } -/** Set the fugacity that this constant fugacity move samples +/** Set the fugacity that this constant fugacity move samples to 'fugacity' - + \throw SireError::incompatible_error */ void Move::setFugacity(const Pressure &fugacity) @@ -463,7 +465,7 @@ QDataStream &operator<<(QDataStream &ds, const NullMove &nullmove) { writeHeader(ds, r_nullmove, 1); ds << static_cast(nullmove); - + return ds; } @@ -471,7 +473,7 @@ QDataStream &operator<<(QDataStream &ds, const NullMove &nullmove) QDataStream &operator>>(QDataStream &ds, NullMove &nullmove) { VersionID v = readHeader(ds, r_nullmove); - + if (v == 1) { ds >> static_cast(nullmove); diff --git a/corelib/src/libs/SireMove/openmmfrenergydt.cpp b/corelib/src/libs/SireMove/openmmfrenergydt.cpp index 69cd68029..20aeac771 100644 --- a/corelib/src/libs/SireMove/openmmfrenergydt.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergydt.cpp @@ -35,6 +35,7 @@ #include "SireMol/atommasses.h" #include "SireMol/atomcoords.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireMol/amberparameters.h" diff --git a/corelib/src/libs/SireMove/openmmfrenergyst.cpp b/corelib/src/libs/SireMove/openmmfrenergyst.cpp index 5d0d7ef52..38c78a251 100644 --- a/corelib/src/libs/SireMove/openmmfrenergyst.cpp +++ b/corelib/src/libs/SireMove/openmmfrenergyst.cpp @@ -35,6 +35,7 @@ #include "SireMol/atommasses.h" #include "SireMol/atomcoords.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireMol/amberparameters.h" diff --git a/corelib/src/libs/SireMove/openmmmdintegrator.cpp b/corelib/src/libs/SireMove/openmmmdintegrator.cpp index 11b470c83..c1e5f2879 100644 --- a/corelib/src/libs/SireMove/openmmmdintegrator.cpp +++ b/corelib/src/libs/SireMove/openmmmdintegrator.cpp @@ -35,6 +35,7 @@ #include "SireMol/atommasses.h" #include "SireMol/atomcoords.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireBase/variantproperty.h" diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index dbaf9ebd8..ac79f11ad 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -38,6 +38,7 @@ #include "SireMol/atommasses.h" #include "SireMol/atomcoords.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireMol/amberparameters.h" diff --git a/corelib/src/libs/SireMove/rbworkspace.cpp b/corelib/src/libs/SireMove/rbworkspace.cpp index 9af43d1a6..7bcde29bb 100644 --- a/corelib/src/libs/SireMove/rbworkspace.cpp +++ b/corelib/src/libs/SireMove/rbworkspace.cpp @@ -35,6 +35,7 @@ #include "SireMol/atomcoords.h" #include "SireMol/molecule.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireMaths/axisset.h" @@ -57,33 +58,33 @@ static const RegisterMetaType r_rbws; QDataStream &operator<<(QDataStream &ds, const RBWorkspace &rbws) { writeHeader(ds, r_rbws, 1); - + SharedDataStream sds(ds); - + sds << static_cast(rbws); - + return ds; } QDataStream &operator>>(QDataStream &ds, RBWorkspace &rbws) { VersionID v = readHeader(ds, r_rbws); - + if (v == 1) { RBWorkspace rb; - + SharedDataStream sds(ds); - + sds >> static_cast(rb); - + rb.rebuildFromScratch(); - + rbws = rb; } else throw version_error(v, "1", r_rbws, CODELOC); - + return ds; } @@ -107,7 +108,7 @@ static Vector getPrincipalAxes(Matrix &inertia) if (inertia_array[i] < 1e-6 and inertia_array[i] > -1e-6) inertia_array[i] = 0; } - + //symmetric matrix inertia_array[inertia.offset(1,0)] = inertia_array[inertia.offset(0,1)]; inertia_array[inertia.offset(2,0)] = inertia_array[inertia.offset(0,2)]; @@ -117,10 +118,10 @@ static Vector getPrincipalAxes(Matrix &inertia) Vector &principle_inertia = eigs.get<0>(); Matrix &orientation = eigs.get<1>(); - + //if one or more of the eigenvalues is zero then we may have a problem //because the wrong eigenvector direction may be chosen - in this case, - //we will build this eigenvector using a cross product to ensure that + //we will build this eigenvector using a cross product to ensure that //the right-hand-rule definition of our axes is maintained // // Also, even if we have three eigenvalues, we still need to make sure @@ -128,9 +129,9 @@ static Vector getPrincipalAxes(Matrix &inertia) bool zero_x = std::abs(principle_inertia[0]) < 1e-6; bool zero_y = std::abs(principle_inertia[1]) < 1e-6; bool zero_z = std::abs(principle_inertia[2]) < 1e-6; - + int n_zeroes = int(zero_x) + int(zero_y) + int(zero_z); - + if (n_zeroes == 3) { //no axes! @@ -150,21 +151,21 @@ static Vector getPrincipalAxes(Matrix &inertia) Vector r0 = orientation.row0(); Vector r1 = orientation.row1(); Vector r2 = orientation.row2(); - + if (zero_x) r0 = Vector::cross(r1,r2); else if (zero_y) r1 = Vector::cross(r2,r0); else if (zero_z) r2 = Vector::cross(r0,r1); - + orientation = Matrix(r0, r1, r2); } else { Vector r0 = orientation.row0(); Vector r1 = orientation.row1(); - + orientation = Matrix( r0, r1, Vector::cross(r0,r1) ); } @@ -173,7 +174,7 @@ static Vector getPrincipalAxes(Matrix &inertia) } template -static QVector buildBead(const ViewsOfMol &mol, +static QVector buildBead(const ViewsOfMol &mol, const AtomCoords &coords, const AtomProperty &masses, const QVector &beading, @@ -188,15 +189,15 @@ static QVector buildBead(const ViewsOfMol &mol, if (mol.selectedAll()) { int nats = moldata.info().nAtoms(); - + int_atom_coords = QVector(nats); int_atom_coords.squeeze(); - + Vector *int_coords_array = int_atom_coords.data(); - + const Vector *coords_array = coords.array().constCoordsData(); const T *masses_array = masses.array().constValueData(); - + if (beading.isEmpty()) { //all atoms are part of the same bead @@ -204,21 +205,21 @@ static QVector buildBead(const ViewsOfMol &mol, double &bead_mass = bead_masses[0]; Matrix &bead_to_world = beads_to_world[0]; Vector &bead_inertia = bead_inertias[0]; - + //calculate the COM of the bead for (int i=0; i buildBead(const ViewsOfMol &mol, Vector d = coords_array[i] - bead_com; const double mass = ::getMass(masses_array[i]); - - inertia_array[ bead_to_world.offset(0,0) ] += + + inertia_array[ bead_to_world.offset(0,0) ] += mass * (d.y()*d.y() + d.z()*d.z()); - inertia_array[ bead_to_world.offset(1,1) ] += + inertia_array[ bead_to_world.offset(1,1) ] += mass * (d.x()*d.x() + d.z()*d.z()); - inertia_array[ bead_to_world.offset(2,2) ] += + inertia_array[ bead_to_world.offset(2,2) ] += mass * (d.x()*d.x() + d.y()*d.y()); - + inertia_array[ bead_to_world.offset(0,1) ] -= mass * d.x() * d.y(); inertia_array[ bead_to_world.offset(0,2) ] -= mass * d.x() * d.z(); inertia_array[ bead_to_world.offset(1,2) ] -= mass * d.y() * d.z(); } bead_inertia = ::getPrincipalAxes(bead_to_world); - + //now calculate the coordinates of all of the atoms in terms //of the center of mass / orientaton frame Matrix inv_matrix = bead_to_world.inverse(); @@ -256,57 +257,57 @@ static QVector buildBead(const ViewsOfMol &mol, //the molecule is split into several beads const qint32 *beading_array = beading.constData(); int nbeads = 0; - + //calculate the COM of each bead for (int i=0; i nbeads) nbeads = bead_idx + 1; - + const double mass = ::getMass(masses_array[i]); - + bead_coords[bead_idx] += mass * coords_array[i]; bead_masses[bead_idx] += mass; } - + for (int i=0; i buildBead(const ViewsOfMol &mol, { bead_inertias[i] = ::getPrincipalAxes(beads_to_world[i]); } - + //now calculate the coordinates of all of the atoms in terms //of the center of mass / orientaton frame qint32 last_idx = -1; @@ -325,16 +326,16 @@ static QVector buildBead(const ViewsOfMol &mol, for (int i=0; i buildBead(const ViewsOfMol &mol, const QVector &b Vector *bead_inertia) { const MoleculeData &moldata = mol.data(); - + if (moldata.hasProperty(masses_property)) { return ::buildBead(mol, moldata.property(coords_property).asA(), @@ -384,11 +385,11 @@ static void getBeading(const ViewsOfMol &mol, const PropertyName &beading_proper QPair< qint32,QVector > &beading, qint32 &nbeads) { const MoleculeData &moldata = mol.data(); - + if (moldata.hasProperty(beading_property)) { qDebug() << CODELOC; - + if (mol.selectedAll()) { throw SireError::incomplete_code( QObject::tr("TODO"), CODELOC ); @@ -412,41 +413,41 @@ static void getBeading(const ViewsOfMol &mol, const PropertyName &beading_proper void RBWorkspace::rebuildFromScratch() { const System &sys = this->system(); - + PropertyName coords_property = this->coordinatesProperty(); PropertyName masses_property = this->massesProperty(); PropertyName elements_property = this->elementsProperty(); PropertyName velgen_property = this->velocityGeneratorProperty(); PropertyName beading_property = this->beadingProperty(); - + const MoleculeGroup &molgroup = this->moleculeGroup(); - + int nmols = molgroup.nMolecules(); - + if (sys.containsProperty(velgen_property)) vel_generator = sys.property(velgen_property).asA(); else vel_generator = NullVelocityGenerator(); - + atom_int_coords = QVector< QVector >(nmols); atoms_to_beads = QVector< QPair< qint32,QVector > >(nmols, QPair< qint32,QVector >(-1,QVector()) ); - + atom_int_coords.squeeze(); atoms_to_beads.squeeze(); - + QVector *atom_int_coords_array = atom_int_coords.data(); QPair< qint32,QVector > *atoms_to_beads_array = atoms_to_beads.data(); //bead up the molecules qint32 nbeads = 0; - + for (int i=0; i(nbeads, Matrix(double(0))); bead_masses = QVector(nbeads, 0.0); bead_inertia = QVector(nbeads, Vector(0)); - + bead_coordinates.squeeze(); bead_orientations.squeeze(); bead_to_world.squeeze(); bead_masses.squeeze(); bead_inertia.squeeze(); - + Vector *bead_coords_array = bead_coordinates.data(); Matrix *bead_to_world_array = bead_to_world.data(); Quaternion *bead_orients_array = bead_orientations.data(); double *bead_masses_array = bead_masses.data(); Vector *bead_inertia_array = bead_inertia.data(); - + for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -484,8 +485,8 @@ void RBWorkspace::rebuildFromScratch() //there are no beads for this molecule continue; - atom_int_coords_array[i] = ::buildBead(molgroup[molgroup.molNumAt(i)], - beading.second, + atom_int_coords_array[i] = ::buildBead(molgroup[molgroup.molNumAt(i)], + beading.second, coords_property, masses_property, elements_property, bead_coords_array + beading.first, @@ -494,13 +495,13 @@ void RBWorkspace::rebuildFromScratch() bead_masses_array + beading.first, bead_inertia_array + beading.first); } - + //create space for the forces, torques and momenta bead_forces = QVector(nbeads, Vector(0)); bead_torques = QVector(nbeads, Vector(0)); bead_linear_momenta = QVector(nbeads, Vector(0)); bead_angular_momenta = QVector(nbeads, Vector(0)); - + bead_forces.squeeze(); bead_torques.squeeze(); bead_linear_momenta.squeeze(); @@ -525,18 +526,18 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, { const Vector *atomforces = forces.constValueData(); const int nats = atom_int_coords.count(); - + BOOST_ASSERT( forces.nValues() == nats ); - + if (beading.isEmpty()) { //there is only a single bead for the molecule const Matrix &bead_to_world = beads_to_world[0]; const Quaternion &bead_orient = bead_orients[0]; - + Vector &bead_force = bead_forces[0]; Vector &bead_torque = bead_torques[0]; - + if (nats == 1) { //and this is made of a single atom - force and no torque @@ -547,12 +548,12 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, { Matrix orient = bead_orient.toMatrix() * bead_to_world; const Vector *int_coords = atom_int_coords.constData(); - + for (int i=0; i nbeads) nbeads = bead_idx + 1; } - + bead_forces[bead_idx] += atomforces[i]; - - //calculate the vector from the center of mass to + + //calculate the vector from the center of mass to //the atom, in the World cartesian frame Vector r = orient * int_coords[i]; @@ -604,7 +605,7 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, for (int i=0; i > *atoms_to_beads_array + const QPair< qint32,QVector > *atoms_to_beads_array = atoms_to_beads.constData(); const QVector *int_coords_array = atom_int_coords.constData(); - + const ForceTable &forcetable = forceTable(); - + for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -664,14 +665,14 @@ bool RBWorkspace::calculateForces(const Symbol &nrg_component) MolNum molnum = molgroup.molNumAt(i); - ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), - int_coords_array[i], beading.second, + ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), + int_coords_array[i], beading.second, bead_to_world_array + beading.first, bead_orients_array + beading.first, bead_forces_array + beading.first, bead_torques_array + beading.first); } - + return true; } @@ -714,7 +715,7 @@ RBWorkspace& RBWorkspace::operator=(const RBWorkspace &other) if (this != &other) { IntegratorWorkspace::operator=(other); - + atom_int_coords = other.atom_int_coords; atoms_to_beads = other.atoms_to_beads; bead_coordinates = other.bead_coordinates; @@ -728,16 +729,16 @@ RBWorkspace& RBWorkspace::operator=(const RBWorkspace &other) bead_inertia = other.bead_inertia; vel_generator = other.vel_generator; } - + return *this; } /** Comparison operator */ bool RBWorkspace::operator==(const RBWorkspace &other) const { - return this == &other or + return this == &other or (IntegratorWorkspace::operator==(other) and - atom_int_coords == other.atom_int_coords and + atom_int_coords == other.atom_int_coords and atoms_to_beads == other.atoms_to_beads and bead_coordinates == other.bead_coordinates and bead_to_world == other.bead_to_world and @@ -747,7 +748,7 @@ bool RBWorkspace::operator==(const RBWorkspace &other) const bead_masses == other.bead_masses and bead_inertia == other.bead_inertia and vel_generator == other.vel_generator); - + //don't need forces or torques as these are implied by the //forcetable in IntegratorWorkspace } @@ -768,34 +769,34 @@ MolarEnergy RBWorkspace::kineticEnergy() const { //sum together the linear kinetic energy of the beads... double nrg = 0; - + int nbeads = bead_linear_momenta.count(); - + const Vector *p = bead_linear_momenta.constData(); const double *m = bead_masses.constData(); - + for (int i=0; i new_coords(nats); Vector *new_coords_array = new_coords.data(); - + if (beading.isEmpty()) { //just one bead for the whole molecule const Vector &com = bead_coords[0]; Matrix orient = bead_orients[0].toMatrix() * beads_to_world[0]; - + for (int i=0; i *int_coords_array = atom_int_coords.constData(); - const QPair< qint32,QVector > + const QPair< qint32,QVector > *atoms_to_beads_array = atoms_to_beads.constData(); - + const Vector *bead_coords_array = bead_coordinates.constData(); const Quaternion *bead_orients_array = bead_orientations.constData(); const Matrix *bead_to_world_array = bead_to_world.constData(); - + PropertyName coords_property = coordinatesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -1008,7 +1009,7 @@ void RBWorkspace::commitCoordinates() MolNum molnum = molgroup.molNumAt(i); const ViewsOfMol &mol = molgroup[molnum]; - AtomCoords new_coords = ::updateCoordinates(mol, coords_property, + AtomCoords new_coords = ::updateCoordinates(mol, coords_property, beading.second, int_coords_array[i], bead_coords_array + beading.first, @@ -1018,7 +1019,7 @@ void RBWorkspace::commitCoordinates() changed_mols.add( mol.molecule().edit() .setProperty(coords_property,new_coords).commit() ); } - + IntegratorWorkspace::pvt_update(changed_mols); } @@ -1029,7 +1030,7 @@ void RBWorkspace::commitVelocities() //throw SireError::incomplete_code( QObject::tr("Need to write!"), CODELOC ); } -/** Commit both the coordinates and velocities - this performs the +/** Commit both the coordinates and velocities - this performs the equivalent of commitCoordinates() and commitVelocities() in a single call */ void RBWorkspace::commitCoordinatesAndVelocities() @@ -1038,7 +1039,7 @@ void RBWorkspace::commitCoordinatesAndVelocities() //throw SireError::incomplete_code( QObject::tr("Need to write!"), CODELOC ); } -/** This internal function is called whenever a property is changed. +/** This internal function is called whenever a property is changed. This is used to see if the data has to be regenerated */ void RBWorkspace::changedProperty(const QString &property) { diff --git a/corelib/src/libs/SireMove/rbworkspacejm.cpp b/corelib/src/libs/SireMove/rbworkspacejm.cpp index 0be4344c5..05bc91314 100644 --- a/corelib/src/libs/SireMove/rbworkspacejm.cpp +++ b/corelib/src/libs/SireMove/rbworkspacejm.cpp @@ -36,6 +36,7 @@ #include "SireMol/molecule.h" #include "SireMol/moleditor.h" #include "SireMol/atombeads.h" +#include "SireMol/core.h" #include "SireMaths/axisset.h" @@ -58,33 +59,33 @@ static const RegisterMetaType r_rbwsjm; QDataStream &operator<<(QDataStream &ds, const RBWorkspaceJM &rbwsjm) { writeHeader(ds, r_rbwsjm, 1); - + SharedDataStream sds(ds); - + sds << static_cast(rbwsjm); - + return ds; } QDataStream &operator>>(QDataStream &ds, RBWorkspaceJM &rbwsjm) { VersionID v = readHeader(ds, r_rbwsjm); - + if (v == 1) { RBWorkspaceJM rb; - + SharedDataStream sds(ds); - + sds >> static_cast(rb); - + rb.rebuildFromScratch(); - + rbwsjm = rb; } else throw version_error(v, "1", r_rbwsjm, CODELOC); - + return ds; } @@ -108,7 +109,7 @@ static Vector getPrincipalAxes(Matrix &inertia) if (inertia_array[i] < 1e-6 and inertia_array[i] > -1e-6) inertia_array[i] = 0; } - + //symmetric matrix inertia_array[inertia.offset(1,0)] = inertia_array[inertia.offset(0,1)]; inertia_array[inertia.offset(2,0)] = inertia_array[inertia.offset(0,2)]; @@ -128,7 +129,7 @@ static Vector getPrincipalAxes(Matrix &inertia) //if one or more of the eigenvalues is zero then we may have a problem //because the wrong eigenvector direction may be chosen - in this case, - //we will build this eigenvector using a cross product to ensure that + //we will build this eigenvector using a cross product to ensure that //the right-hand-rule definition of our axes is maintained // // Also, even if we have three eigenvalues, we still need to make sure @@ -136,9 +137,9 @@ static Vector getPrincipalAxes(Matrix &inertia) bool zero_x = std::abs(principle_inertia[0]) < 1e-6; bool zero_y = std::abs(principle_inertia[1]) < 1e-6; bool zero_z = std::abs(principle_inertia[2]) < 1e-6; - + int n_zeroes = int(zero_x) + int(zero_y) + int(zero_z); - + if (n_zeroes == 3) { //no axes! @@ -158,21 +159,21 @@ static Vector getPrincipalAxes(Matrix &inertia) Vector r0 = orientation.row0(); Vector r1 = orientation.row1(); Vector r2 = orientation.row2(); - + if (zero_x) r0 = Vector::cross(r1,r2); else if (zero_y) r1 = Vector::cross(r2,r0); else if (zero_z) r2 = Vector::cross(r0,r1); - + orientation = Matrix(r0, r1, r2); } else { Vector r0 = orientation.row0(); Vector r1 = orientation.row1(); - + orientation = Matrix( r0, r1, Vector::cross(r0,r1) ); } @@ -181,7 +182,7 @@ static Vector getPrincipalAxes(Matrix &inertia) } template -static QVector buildBead(const ViewsOfMol &mol, +static QVector buildBead(const ViewsOfMol &mol, const AtomCoords &coords, const AtomProperty &masses, const QVector &beading, @@ -196,15 +197,15 @@ static QVector buildBead(const ViewsOfMol &mol, if (mol.selectedAll()) { int nats = moldata.info().nAtoms(); - + int_atom_coords = QVector(nats); int_atom_coords.squeeze(); - + Vector *int_coords_array = int_atom_coords.data(); - + const Vector *coords_array = coords.array().constCoordsData(); const T *masses_array = masses.array().constValueData(); - + if (beading.isEmpty()) { //all atoms are part of the same bead @@ -212,24 +213,24 @@ static QVector buildBead(const ViewsOfMol &mol, double &bead_mass = bead_masses[0]; Matrix &bead_to_world = beads_to_world[0]; Vector &bead_inertia = bead_inertias[0]; - + //calculate the COM of the bead for (int i=0; i buildBead(const ViewsOfMol &mol, Vector d = coords_array[i] - bead_com; const double mass = ::getMass(masses_array[i]); - - inertia_array[ bead_to_world.offset(0,0) ] += + + inertia_array[ bead_to_world.offset(0,0) ] += mass * (d.y()*d.y() + d.z()*d.z()); - inertia_array[ bead_to_world.offset(1,1) ] += + inertia_array[ bead_to_world.offset(1,1) ] += mass * (d.x()*d.x() + d.z()*d.z()); - inertia_array[ bead_to_world.offset(2,2) ] += + inertia_array[ bead_to_world.offset(2,2) ] += mass * (d.x()*d.x() + d.y()*d.y()); - + inertia_array[ bead_to_world.offset(0,1) ] -= mass * d.x() * d.y(); inertia_array[ bead_to_world.offset(0,2) ] -= mass * d.x() * d.z(); inertia_array[ bead_to_world.offset(1,2) ] -= mass * d.y() * d.z(); } bead_inertia = ::getPrincipalAxes(bead_to_world); - + //now calculate the coordinates of all of the atoms in terms //of the center of mass / orientaton frame Matrix inv_matrix = bead_to_world.inverse(); - // JM 10/14 correct row vs. column major bug introduced in Aug14 version of sire + // JM 10/14 correct row vs. column major bug introduced in Aug14 version of sire inv_matrix = inv_matrix.transpose(); - + //qDebug() << " inv_matrix " << inv_matrix.toString() << "\n"; @@ -273,57 +274,57 @@ static QVector buildBead(const ViewsOfMol &mol, //the molecule is split into several beads const qint32 *beading_array = beading.constData(); int nbeads = 0; - + //calculate the COM of each bead for (int i=0; i nbeads) nbeads = bead_idx + 1; - + const double mass = ::getMass(masses_array[i]); - + bead_coords[bead_idx] += mass * coords_array[i]; bead_masses[bead_idx] += mass; } - + for (int i=0; i buildBead(const ViewsOfMol &mol, { bead_inertias[i] = ::getPrincipalAxes(beads_to_world[i]); } - + //now calculate the coordinates of all of the atoms in terms //of the center of mass / orientaton frame qint32 last_idx = -1; @@ -342,16 +343,16 @@ static QVector buildBead(const ViewsOfMol &mol, for (int i=0; i buildBead(const ViewsOfMol &mol, const QVector &b Vector *bead_inertia) { const MoleculeData &moldata = mol.data(); - + if (moldata.hasProperty(masses_property)) { return ::buildBead(mol, moldata.property(coords_property).asA(), @@ -401,11 +402,11 @@ static void getBeading(const ViewsOfMol &mol, const PropertyName &beading_proper QPair< qint32,QVector > &beading, qint32 &nbeads) { const MoleculeData &moldata = mol.data(); - + if (moldata.hasProperty(beading_property)) { //qDebug() << CODELOC; - + if (mol.selectedAll()) { const AtomBeads &beadprop = moldata.property(beading_property) @@ -417,30 +418,30 @@ static void getBeading(const ViewsOfMol &mol, const PropertyName &beading_proper QVector beads(nats); beads.squeeze(); - + int num_beads = 0; - + const BeadNum *beading_array = beadprop.array().constValueData(); - + for (int i=0; i 0) { beading.first = nbeads; @@ -467,41 +468,41 @@ static void getBeading(const ViewsOfMol &mol, const PropertyName &beading_proper void RBWorkspaceJM::rebuildFromScratch() { const System &sys = this->system(); - + PropertyName coords_property = this->coordinatesProperty(); PropertyName masses_property = this->massesProperty(); PropertyName elements_property = this->elementsProperty(); PropertyName velgen_property = this->velocityGeneratorProperty(); PropertyName beading_property = this->beadingProperty(); - + const MoleculeGroup &molgroup = this->moleculeGroup(); - + int nmols = molgroup.nMolecules(); - + if (sys.containsProperty(velgen_property)) vel_generator = sys.property(velgen_property).asA(); else vel_generator = NullVelocityGenerator(); - + atom_int_coords = QVector< QVector >(nmols); atoms_to_beads = QVector< QPair< qint32,QVector > >(nmols, QPair< qint32,QVector >(-1,QVector()) ); - + atom_int_coords.squeeze(); atoms_to_beads.squeeze(); - + QVector *atom_int_coords_array = atom_int_coords.data(); QPair< qint32,QVector > *atoms_to_beads_array = atoms_to_beads.data(); //bead up the molecules qint32 nbeads = 0; - + for (int i=0; i(nbeads, Matrix( double(0) ) ); bead_masses = QVector(nbeads, 0.0); bead_inertia = QVector(nbeads, Vector(0)); - + bead_coordinates.squeeze(); bead_orientations.squeeze(); bead_to_world.squeeze(); bead_masses.squeeze(); bead_inertia.squeeze(); - + Vector *bead_coords_array = bead_coordinates.data(); Matrix *bead_to_world_array = bead_to_world.data(); Quaternion *bead_orients_array = bead_orientations.data(); double *bead_masses_array = bead_masses.data(); Vector *bead_inertia_array = bead_inertia.data(); - + for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -539,8 +540,8 @@ void RBWorkspaceJM::rebuildFromScratch() //there are no beads for this molecule continue; - atom_int_coords_array[i] = ::buildBead(molgroup[molgroup.molNumAt(i)], - beading.second, + atom_int_coords_array[i] = ::buildBead(molgroup[molgroup.molNumAt(i)], + beading.second, coords_property, masses_property, elements_property, bead_coords_array + beading.first, @@ -549,15 +550,15 @@ void RBWorkspaceJM::rebuildFromScratch() bead_masses_array + beading.first, bead_inertia_array + beading.first); } - + //create space for the forces, torques and momenta bead_forces = QVector(nbeads, Vector(0)); bead_torques = QVector(nbeads, Vector(0)); bead_linear_momenta = QVector(nbeads, Vector(0)); bead_angular_momenta = QVector(nbeads, Vector(0)); - + bead_energies = QVector(nbeads, Vector(0)); - + bead_forces.squeeze(); bead_torques.squeeze(); bead_linear_momenta.squeeze(); @@ -584,23 +585,23 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, const Vector *atomforces = forces.constValueData(); const int nats = atom_int_coords.count(); - + BOOST_ASSERT( forces.nValues() == nats ); //qDebug() << "MOL " << "\n"; //for (int i=0; i < nats ; ++i ) //qDebug() << " AtomForces " << forces.toVector().at(i).toString() ; - + if (beading.isEmpty()) { //there is only a single bead for the molecule const Matrix &bead_to_world = beads_to_world[0]; const Quaternion &bead_orient = bead_orients[0]; - + Vector &bead_force = bead_forces[0]; Vector &bead_torque = bead_torques[0]; - + if (nats == 1) { //and this is made of a single atom - force and no torque @@ -616,8 +617,8 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, Matrix orient = bead_orient.toMatrix() * bead_to_world; - // JM 10/14 correct row vs. column major bug introduced in Aug14 version of sire - orient = orient.transpose(); + // JM 10/14 correct row vs. column major bug introduced in Aug14 version of sire + orient = orient.transpose(); //qDebug() << " orient is " << orient.toString(); @@ -630,10 +631,10 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, for (int i=0; i nbeads) nbeads = bead_idx + 1; } - + bead_forces[bead_idx] += atomforces[i]; - - //calculate the vector from the center of mass to + + //calculate the vector from the center of mass to //the atom, in the World cartesian frame Vector r = orient * int_coords[i]; @@ -690,7 +691,7 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, for (int i=0; i > *atoms_to_beads_array +// const QPair< qint32,QVector > *atoms_to_beads_array // = atoms_to_beads.constData(); // const QVector *int_coords_array = atom_int_coords.constData(); -// +// // const ForceTable &forcetable = forceTable(); -// +// // for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -751,13 +752,13 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, // if (beading.first == -1) // //there are no beads for this molecule, so no forces or torques // continue; -// +// // MolNum molnum = molgroup.molNumAt(i); // // qDebug() << " Mol " << i << " MolNum " << molnum.toString() << " beading.first is " << beading.first << " beading.second is " << beading.second; // -// ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), -// int_coords_array[i], beading.second, +// ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), +// int_coords_array[i], beading.second, // bead_to_world_array + beading.first, // bead_orients_array + beading.first, // bead_forces_array + beading.first, @@ -767,7 +768,7 @@ static void calculateForces(const ViewsOfMol &mol, const MolForceTable &forces, // //qDebug() << bead_forces_array ; // //exit(-1); // } -// +// // return true; //} @@ -784,7 +785,7 @@ static void calculateEnergies(const ViewsOfMol &mol, const MolEnergyTable &energ const Vector *atomenergies = energies.constValueData(); const int nats = atom_int_coords.count(); - + BOOST_ASSERT( energies.nValues() == nats ); if (beading.isEmpty()) @@ -809,29 +810,29 @@ static void calculateEnergies(const ViewsOfMol &mol, const MolEnergyTable &energ else { const qint32 *beading_array = beading.constData(); - + qint32 last_idx = -1; - + int nbeads = 0; - + for (int i=0; i nbeads) nbeads = bead_idx + 1; } - + bead_energies[bead_idx] += atomenergies[i]; - + } } } @@ -845,13 +846,13 @@ static void calculateEnergies(const ViewsOfMol &mol, const MolEnergyTable &energ //bool RBWorkspaceJM::calculateEnergies(const Symbol &nrg_component) //{ // qDebug() << " in RBWorkspaceJM::calculateEnergies "; -// +// // const int nbeads = bead_coordinates.count(); -// +// // if (nbeads == 0) // //no beads, so no need to calculate forces // return false; -// +// // //else if (not IntegratorWorkspaceJM::calculateEnergies(nrg_component)) // // return false; // @@ -860,23 +861,23 @@ static void calculateEnergies(const ViewsOfMol &mol, const MolEnergyTable &energ // // const MoleculeGroup &molgroup = moleculeGroup(); // const int nmols = molgroup.nMolecules(); -// +// // qDebug() << " nmols is " << nmols; // // Vector *bead_energies_array = bead_energies.data(); // -// const QPair< qint32,QVector > *atoms_to_beads_array +// const QPair< qint32,QVector > *atoms_to_beads_array // = atoms_to_beads.constData(); // // const QVector *int_coords_array = atom_int_coords.constData(); -// +// // const EnergyTable &energytable = EnergyTable(molgroup); -// +// // for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -884,13 +885,13 @@ static void calculateEnergies(const ViewsOfMol &mol, const MolEnergyTable &energ // if (beading.first == -1) // //there are no beads for this molecule, so no bead_energies // continue; -// +// // MolNum molnum = molgroup.molNumAt(i); // // qDebug() << " Mol " << i << " MolNum " << molnum.toString() << " beading.first is " << beading.first << " beading.second is " << beading.second; // -// ::calculateEnergies(molgroup[molnum], energytable.getTable(molnum), -// int_coords_array[i], beading.second, +// ::calculateEnergies(molgroup[molnum], energytable.getTable(molnum), +// int_coords_array[i], beading.second, // bead_energies_array + beading.first); // // @@ -898,7 +899,7 @@ static void calculateEnergies(const ViewsOfMol &mol, const MolEnergyTable &energ // //qDebug() << bead_forces_array ; // //exit(-1); // } -// +// // return true; //} @@ -911,7 +912,7 @@ void RBWorkspaceJM::setForceTable(ForceTable &forces) bool RBWorkspaceJM::calculateRBForces() { const int nbeads = bead_coordinates.count(); - + if (nbeads == 0) //no beads, so no need to calculate forces return false; @@ -924,7 +925,7 @@ bool RBWorkspaceJM::calculateRBForces() const MoleculeGroup &molgroup = moleculeGroup(); const int nmols = molgroup.nMolecules(); - + // qDebug() << " nmols is " << nmols; Vector *bead_forces_array = bead_forces.data(); @@ -935,10 +936,10 @@ bool RBWorkspaceJM::calculateRBForces() const Matrix *bead_to_world_array = bead_to_world.constData(); const Quaternion *bead_orients_array = bead_orientations.constData(); - const QPair< qint32,QVector > *atoms_to_beads_array + const QPair< qint32,QVector > *atoms_to_beads_array = atoms_to_beads.constData(); const QVector *int_coords_array = atom_int_coords.constData(); - + //const ForceTable &forcetable = forceTable(); const ForceTable &forcetable = myforcetable; @@ -950,7 +951,7 @@ bool RBWorkspaceJM::calculateRBForces() bead_torques_array[i] = Vector(0); bead_energies_array[i] = Vector(0); } - + for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -958,27 +959,27 @@ bool RBWorkspaceJM::calculateRBForces() if (beading.first == -1) //there are no beads for this molecule, so no forces or torques continue; - + MolNum molnum = molgroup.molNumAt(i); // qDebug() << " Mol " << i << " MolNum " << molnum.toString() << " beading.first is " << beading.first << " beading.second is " << beading.second; - ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), - int_coords_array[i], beading.second, + ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), + int_coords_array[i], beading.second, bead_to_world_array + beading.first, bead_orients_array + beading.first, bead_forces_array + beading.first, bead_torques_array + beading.first); - //::calculateEnergies(molgroup[molnum], energytable.getTable(molnum), - // int_coords_array[i], beading.second, + //::calculateEnergies(molgroup[molnum], energytable.getTable(molnum), + // int_coords_array[i], beading.second, // bead_energies_array + beading.first); // qDebug() << " Done " ; //qDebug() << bead_forces_array ; //exit(-1); } - + return true; } @@ -986,7 +987,7 @@ bool RBWorkspaceJM::calculateRBForces() bool RBWorkspaceJM::calculateForces(const Symbol &nrg_component) { const int nbeads = bead_coordinates.count(); - + if (nbeads == 0) //no beads, so no need to calculate forces return false; @@ -1001,7 +1002,7 @@ bool RBWorkspaceJM::calculateForces(const Symbol &nrg_component) const MoleculeGroup &molgroup = moleculeGroup(); const int nmols = molgroup.nMolecules(); - + // qDebug() << " nmols is " << nmols; Vector *bead_forces_array = bead_forces.data(); @@ -1012,10 +1013,10 @@ bool RBWorkspaceJM::calculateForces(const Symbol &nrg_component) const Matrix *bead_to_world_array = bead_to_world.constData(); const Quaternion *bead_orients_array = bead_orientations.constData(); - const QPair< qint32,QVector > *atoms_to_beads_array + const QPair< qint32,QVector > *atoms_to_beads_array = atoms_to_beads.constData(); const QVector *int_coords_array = atom_int_coords.constData(); - + const ForceTable &forcetable = forceTable(); const EnergyTable &energytable = energyTable(); @@ -1026,7 +1027,7 @@ bool RBWorkspaceJM::calculateForces(const Symbol &nrg_component) bead_torques_array[i] = Vector(0); bead_energies_array[i] = Vector(0); } - + for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -1034,27 +1035,27 @@ bool RBWorkspaceJM::calculateForces(const Symbol &nrg_component) if (beading.first == -1) //there are no beads for this molecule, so no forces or torques continue; - + MolNum molnum = molgroup.molNumAt(i); // qDebug() << " Mol " << i << " MolNum " << molnum.toString() << " beading.first is " << beading.first << " beading.second is " << beading.second; - ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), - int_coords_array[i], beading.second, + ::calculateForces(molgroup[molnum], forcetable.getTable(molnum), + int_coords_array[i], beading.second, bead_to_world_array + beading.first, bead_orients_array + beading.first, bead_forces_array + beading.first, bead_torques_array + beading.first); - ::calculateEnergies(molgroup[molnum], energytable.getTable(molnum), - int_coords_array[i], beading.second, + ::calculateEnergies(molgroup[molnum], energytable.getTable(molnum), + int_coords_array[i], beading.second, bead_energies_array + beading.first); // qDebug() << " Done " ; //qDebug() << bead_forces_array ; //exit(-1); } - + return true; } @@ -1099,7 +1100,7 @@ RBWorkspaceJM& RBWorkspaceJM::operator=(const RBWorkspaceJM &other) if (this != &other) { IntegratorWorkspaceJM::operator=(other); - + atom_int_coords = other.atom_int_coords; atoms_to_beads = other.atoms_to_beads; bead_coordinates = other.bead_coordinates; @@ -1114,16 +1115,16 @@ RBWorkspaceJM& RBWorkspaceJM::operator=(const RBWorkspaceJM &other) bead_energies = other.bead_energies; vel_generator = other.vel_generator; } - + return *this; } /** Comparison operator */ bool RBWorkspaceJM::operator==(const RBWorkspaceJM &other) const { - return this == &other or + return this == &other or (IntegratorWorkspaceJM::operator==(other) and - atom_int_coords == other.atom_int_coords and + atom_int_coords == other.atom_int_coords and atoms_to_beads == other.atoms_to_beads and bead_coordinates == other.bead_coordinates and bead_to_world == other.bead_to_world and @@ -1134,7 +1135,7 @@ bool RBWorkspaceJM::operator==(const RBWorkspaceJM &other) const bead_inertia == other.bead_inertia and bead_energies == other.bead_energies and vel_generator == other.vel_generator); - + //don't need forces or torques as these are implied by the //forcetable in IntegratorWorkspaceJM } @@ -1155,34 +1156,34 @@ MolarEnergy RBWorkspaceJM::kineticEnergy() const { //sum together the linear kinetic energy of the beads... double nrg = 0; - + int nbeads = bead_linear_momenta.count(); - + const Vector *p = bead_linear_momenta.constData(); const double *m = bead_masses.constData(); - + for (int i=0; i new_coords(nats); Vector *new_coords_array = new_coords.data(); - + if (beading.isEmpty()) { //just one bead for the whole molecule const Vector &com = bead_coords[0]; Matrix orient = bead_orients[0].toMatrix() * beads_to_world[0]; - + for (int i=0; i *int_coords_array = atom_int_coords.constData(); - const QPair< qint32,QVector > + const QPair< qint32,QVector > *atoms_to_beads_array = atoms_to_beads.constData(); - + const Vector *bead_coords_array = bead_coordinates.constData(); const Quaternion *bead_orients_array = bead_orientations.constData(); const Matrix *bead_to_world_array = bead_to_world.constData(); - + PropertyName coords_property = coordinatesProperty(); - + Molecules changed_mols; changed_mols.reserve(nmols); - + for (int i=0; i > &beading = atoms_to_beads_array[i]; @@ -1424,7 +1425,7 @@ void RBWorkspaceJM::commitCoordinates() MolNum molnum = molgroup.molNumAt(i); const ViewsOfMol &mol = molgroup[molnum]; - AtomCoords new_coords = ::updateCoordinates(mol, coords_property, + AtomCoords new_coords = ::updateCoordinates(mol, coords_property, beading.second, int_coords_array[i], bead_coords_array + beading.first, @@ -1434,7 +1435,7 @@ void RBWorkspaceJM::commitCoordinates() changed_mols.add( mol.molecule().edit() .setProperty(coords_property,new_coords).commit() ); } - + IntegratorWorkspaceJM::pvt_update(changed_mols); } @@ -1445,7 +1446,7 @@ void RBWorkspaceJM::commitVelocities() //throw SireError::incomplete_code( QObject::tr("Need to write!"), CODELOC ); } -/** Commit both the coordinates and velocities - this performs the +/** Commit both the coordinates and velocities - this performs the equivalent of commitCoordinates() and commitVelocities() in a single call */ void RBWorkspaceJM::commitCoordinatesAndVelocities() @@ -1454,7 +1455,7 @@ void RBWorkspaceJM::commitCoordinatesAndVelocities() //throw SireError::incomplete_code( QObject::tr("Need to write!"), CODELOC ); } -/** This internal function is called whenever a property is changed. +/** This internal function is called whenever a property is changed. This is used to see if the data has to be regenerated */ void RBWorkspaceJM::changedProperty(const QString &property) { diff --git a/corelib/src/libs/SireMove/titrator.cpp b/corelib/src/libs/SireMove/titrator.cpp index dd1be4e02..5cb312746 100644 --- a/corelib/src/libs/SireMove/titrator.cpp +++ b/corelib/src/libs/SireMove/titrator.cpp @@ -39,6 +39,7 @@ #include "SireMol/evaluator.h" #include "SireMol/editor.hpp" #include "SireMol/mover.hpp" +#include "SireMol/core.h" #include "SireMaths/rangenerator.h" @@ -62,9 +63,9 @@ static const RegisterMetaType r_titrator; QDataStream &operator<<(QDataStream &ds, const Titrator &titrator) { writeHeader(ds, r_titrator, 1); - + SharedDataStream sds(ds); - + sds << titrator.mgname << titrator.mgnum << titrator.mgversion << titrator.chgs << titrator.desired_chgs << titrator.neutral_template << titrator.negative_template @@ -74,18 +75,18 @@ QDataStream &operator<<(QDataStream &ds, const Titrator &titrator) << titrator.positive_map << titrator.propmap << titrator.pos_charge << titrator.neg_charge << static_cast(titrator); - + return ds; } QDataStream &operator>>(QDataStream &ds, Titrator &titrator) { VersionID v = readHeader(ds, r_titrator); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> titrator.mgname >> titrator.mgnum >> titrator.mgversion >> titrator.chgs >> titrator.desired_chgs >> titrator.neutral_template >> titrator.negative_template @@ -98,7 +99,7 @@ QDataStream &operator>>(QDataStream &ds, Titrator &titrator) } else throw version_error(v, "1", r_titrator, CODELOC); - + return ds; } @@ -167,7 +168,7 @@ Titrator& Titrator::operator=(const Titrator &other) neg_charge = other.neg_charge; Property::operator=(other); } - + return *this; } @@ -208,7 +209,7 @@ void Titrator::clearState() { mgnum = MGNum(); mgversion = Version(); - + chgs.clear(); desired_chgs.clear(); } @@ -245,27 +246,27 @@ void Titrator::setPositiveTemplate(const Molecule &positive_ion, //check also that there is a charge property of type "AtomCharges" const Property &p = positive_ion.property( map["charge"] ); - + if (not p.isA()) { throw SireBase::missing_property( QObject::tr( "The positive ion template is missing the AtomCharges charge property..."), CODELOC ); } - + double chg = positive_ion.evaluate().charge(map); - + if (chg <= 0) throw SireError::invalid_arg( QObject::tr( "The charge on the positive ion template is not positive! %1") .arg(chg), CODELOC ); - + pos_charge = qint32( chg+0.5 ); positive_template = positive_ion; positive_properties = properties; positive_map = map; - + clearState(); } @@ -290,7 +291,7 @@ void Titrator::setNegativeTemplate(const Molecule &negative_ion, //check also that there is a charge property of type "AtomCharges" const Property &p = negative_ion.property( map["charge"] ); - + if (not p.isA()) { throw SireBase::missing_property( QObject::tr( @@ -299,18 +300,18 @@ void Titrator::setNegativeTemplate(const Molecule &negative_ion, } double chg = negative_ion.evaluate().charge(map); - + if (chg >= 0) throw SireError::invalid_arg( QObject::tr( "The charge on the negative ion template is not negative! %1") .arg(chg), CODELOC ); - + neg_charge = qint32( chg-0.5 ); negative_template = negative_ion; negative_properties = properties; negative_map = map; - + clearState(); } @@ -335,7 +336,7 @@ void Titrator::setNeutralTemplate(const Molecule &neutral_mol, //check also that there is a charge property of type "AtomCharges" const Property &p = neutral_mol.property( map["charge"] ); - + if (not p.isA()) { throw SireBase::missing_property( QObject::tr( @@ -344,7 +345,7 @@ void Titrator::setNeutralTemplate(const Molecule &neutral_mol, } double chg = neutral_mol.evaluate().charge(map); - + if (not SireMaths::isZero(chg)) throw SireError::invalid_arg( QObject::tr( "The charge on the neutral molecule template is not zero! %1") @@ -353,7 +354,7 @@ void Titrator::setNeutralTemplate(const Molecule &neutral_mol, neutral_template = neutral_mol; neutral_properties = properties; neutral_map = map; - + clearState(); } @@ -382,7 +383,7 @@ void Titrator::setNeutralTemplate(const Molecule &neutral_mol, const PropertyMap int Titrator::nIons() const { int nions = 0; - + if (desired_chgs.isEmpty()) { foreach (int charge, chgs) @@ -399,7 +400,7 @@ int Titrator::nIons() const nions += 1; } } - + return nions; } @@ -424,7 +425,7 @@ int Titrator::nNeutrals() const nmols += 1; } } - + return nmols; } @@ -432,7 +433,7 @@ int Titrator::nNeutrals() const int Titrator::nPositiveIons() const { int nions = 0; - + if (desired_chgs.isEmpty()) { foreach (int charge, chgs) @@ -449,7 +450,7 @@ int Titrator::nPositiveIons() const nions += 1; } } - + return nions; } @@ -457,7 +458,7 @@ int Titrator::nPositiveIons() const int Titrator::nNegativeIons() const { int nions = 0; - + if (desired_chgs.isEmpty()) { foreach (int charge, chgs) @@ -474,7 +475,7 @@ int Titrator::nNegativeIons() const nions += 1; } } - + return nions; } @@ -482,7 +483,7 @@ int Titrator::nNegativeIons() const int Titrator::getIonIndex(int ion_index) const { ion_index = Index(ion_index).map( this->nIons() ); - + if (desired_chgs.isEmpty()) { for (int i=0; inPositiveIons() ); - + if (desired_chgs.isEmpty()) { for (int i=0; inNegativeIons() ); - + if (desired_chgs.isEmpty()) { for (int i=0; inNeutrals() ); - + if (desired_chgs.isEmpty()) { for (int i=0; i(chgs.count(), 0); - + while (npositive + nnegative > desired_chgs.count()) { npositive -= 1; - + if (npositive + nnegative > desired_chgs.count()) nnegative -= 1; } - + while (npositive > 0) { int idx = rand.randInt(desired_chgs.count()); - + if (desired_chgs[idx] == 0) { desired_chgs[idx] = pos_charge; npositive -= 1; } } - + while (nnegative > 0) { int idx = rand.randInt(desired_chgs.count()); - + if (desired_chgs[idx] == 0) { desired_chgs[idx] = neg_charge; @@ -738,57 +739,57 @@ void Titrator::randomiseCharge(int ncharges) double Titrator::applyTo(System &system) { MoleculeGroup group = system.group(mgname); - + if (group.number() != mgnum or group.version().majorVersion() != mgversion.majorVersion()) //if there is a change in group, or a change in the molecules in a group, //then we need to reinitialise this object clearState(); - + PropertyName chgkey = propmap["charge"]; - + AtomCharges positive_chgs = positive_template.property( positive_map["charge"] ) .asA(); - + AtomCharges negative_chgs = negative_template.property( negative_map["charge"] ) .asA(); - + AtomCharges neutral_chgs = neutral_template.property( neutral_map["charge"] ) .asA(); - + if (chgs.isEmpty()) { desired_chgs.clear(); - + //go through all of the molecules and work out what charge they have. We do this //by checking the "charge" property of the molecule and seeing which of the three //templates it agrees with. If it agrees with none of them, then we will force the //molecule to have a neutral charge and will assign the neutral molecule int nmols = group.nMolecules(); - + chgs = QVector(nmols, 0); - + Molecules mols; - + for (int i=0; i(); } catch(...) {} - + if (molchgs.array() == positive_chgs.array()) { //this is a positively charged molecule - copy across all of the //other positive ion properties molecule = copyIntoMol(molecule, positive_template, positive_properties, positive_map, propmap); - + chgs[i] = pos_charge; } else if (molchgs.array() == negative_chgs.array()) @@ -797,7 +798,7 @@ double Titrator::applyTo(System &system) //other negative ion properties molecule = copyIntoMol(molecule, negative_template, negative_properties, negative_map, propmap); - + chgs[i] = neg_charge; } else @@ -806,13 +807,13 @@ double Titrator::applyTo(System &system) //properties molecule = copyIntoMol(molecule, neutral_template, neutral_properties, neutral_map, propmap); - + chgs[i] = 0; } - + mols.add(molecule); } - + group.update(mols); } else @@ -820,7 +821,7 @@ double Titrator::applyTo(System &system) if (not desired_chgs.isEmpty()) { Molecules mols; - + for (int i=0; i 0) { //switch the molecule to the positive ion @@ -848,13 +849,13 @@ double Titrator::applyTo(System &system) molecule = copyIntoMol(molecule, neutral_template, neutral_properties, neutral_map, propmap); } - + mols.add(molecule); } } - + group.update(mols); - + chgs = desired_chgs; desired_chgs.clear(); } @@ -862,13 +863,13 @@ double Titrator::applyTo(System &system) mgnum = group.number(); mgversion = group.version(); - + system.update(group); - + PropertyName tiprop = propmap["titrator"]; - + if (tiprop.hasSource()) system.setProperty(tiprop.source(), *this ); - + return 0; } diff --git a/corelib/src/libs/SireMove/velocityverlet.cpp b/corelib/src/libs/SireMove/velocityverlet.cpp index ba08d1c25..98a0dc469 100644 --- a/corelib/src/libs/SireMove/velocityverlet.cpp +++ b/corelib/src/libs/SireMove/velocityverlet.cpp @@ -35,6 +35,7 @@ #include "SireMol/atommasses.h" #include "SireMol/atomcoords.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireSystem/system.h" @@ -66,11 +67,11 @@ static const RegisterMetaType r_velver; QDataStream &operator<<(QDataStream &ds, const VelocityVerlet &velver) { writeHeader(ds, r_velver, 1); - + SharedDataStream sds(ds); - + sds << velver.frequent_save_velocities << static_cast(velver); - + return ds; } @@ -78,21 +79,21 @@ QDataStream &operator<<(QDataStream &ds, const VelocityVerlet &velver) QDataStream &operator>>(QDataStream &ds, VelocityVerlet &velver) { VersionID v = readHeader(ds, r_velver); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> velver.frequent_save_velocities >> static_cast(velver); } else throw version_error(v, "1", r_velver, CODELOC); - + return ds; } /** Constructor */ -VelocityVerlet::VelocityVerlet(bool frequent_save) +VelocityVerlet::VelocityVerlet(bool frequent_save) : ConcreteProperty(), frequent_save_velocities(frequent_save) {} @@ -112,7 +113,7 @@ VelocityVerlet& VelocityVerlet::operator=(const VelocityVerlet &other) { Integrator::operator=(other); frequent_save_velocities = other.frequent_save_velocities; - + return *this; } @@ -134,11 +135,11 @@ QString VelocityVerlet::toString() const { return QObject::tr("VelocityVerlet()"); } - + /** Integrate the coordinates of the atoms in the molecules in 'molgroup' - using the forces in 'forcetable', using the optionally supplied - property map to find the necessary molecular properties - + using the forces in 'forcetable', using the optionally supplied + property map to find the necessary molecular properties + \throw SireMol::missing_molecule \throw SireBase::missing_property \throw SireError:invalid_cast @@ -150,20 +151,20 @@ void VelocityVerlet::integrate(IntegratorWorkspace &workspace, int nmoves, bool record_stats) { AtomicVelocityWorkspace &ws = workspace.asA(); - + const double dt = timestep.value(); const int nmols = ws.nMolecules(); - + for (int imove=0; imove r_zmatmove; QDataStream &operator<<(QDataStream &ds, const ZMatMove &zmatmove) { writeHeader(ds, r_zmatmove, 2); - + SharedDataStream sds(ds); - + sds << zmatmove.smplr << zmatmove.zmatrix_property << zmatmove.sync_bonds << zmatmove.sync_angles << zmatmove.sync_dihedrals << static_cast(zmatmove); - + return ds; } @@ -76,11 +77,11 @@ QDataStream &operator<<(QDataStream &ds, const ZMatMove &zmatmove) QDataStream &operator>>(QDataStream &ds, ZMatMove &zmatmove) { VersionID v = readHeader(ds, r_zmatmove); - + if (v == 2) { SharedDataStream sds(ds); - + sds >> zmatmove.smplr >> zmatmove.zmatrix_property >> zmatmove.sync_bonds >> zmatmove.sync_angles >> zmatmove.sync_dihedrals @@ -89,22 +90,22 @@ QDataStream &operator>>(QDataStream &ds, ZMatMove &zmatmove) else if (v == 1) { SharedDataStream sds(ds); - + sds >> zmatmove.smplr >> zmatmove.zmatrix_property >> static_cast(zmatmove); - + zmatmove.sync_bonds = false; zmatmove.sync_angles = false; zmatmove.sync_dihedrals = false; } else throw version_error(v, "1", r_zmatmove, CODELOC); - + return ds; } /** Null constructor */ -ZMatMove::ZMatMove(const PropertyMap &map) +ZMatMove::ZMatMove(const PropertyMap &map) : ConcreteProperty(map), sync_bonds(false), sync_angles(false), sync_dihedrals(false) @@ -163,7 +164,7 @@ ZMatMove& ZMatMove::operator=(const ZMatMove &other) sync_angles = other.sync_angles; sync_dihedrals = other.sync_dihedrals; } - + return *this; } @@ -221,7 +222,7 @@ const PropertyName& ZMatMove::zmatrixProperty() const { return zmatrix_property; } - + /** Set the name of the property used to find the z-matrix of each molecule */ void ZMatMove::setZMatrixProperty(const PropertyName &property) { @@ -229,7 +230,7 @@ void ZMatMove::setZMatrixProperty(const PropertyName &property) Move::setProperty("z-matrix", zmatrix_property); } -/** Set whether or not to synchronise all motion for all molecules +/** Set whether or not to synchronise all motion for all molecules in the group */ void ZMatMove::setSynchronisedMotion(bool on) { @@ -303,7 +304,7 @@ void ZMatMove::_pvt_setTemperature(const Temperature &temperature) void ZMatMove::move(AtomIdx atom, ZMatrixCoords &zmatrix, QHash< AtomIdx, tuple > &saved_deltas) { - // first generate the amounts by which to change the + // first generate the amounts by which to change the // bond, angle and dihedral values Length bonddelta; Angle angledelta, dihedraldelta; @@ -312,25 +313,25 @@ void ZMatMove::move(AtomIdx atom, ZMatrixCoords &zmatrix, { //we are synchronising bonds, angles or dihedrals, so //we may need to look up previous values for previous molecules - + if (saved_deltas.contains(atom)) { bonddelta = saved_deltas.value(atom).get<0>(); angledelta = saved_deltas.value(atom).get<1>(); dihedraldelta = saved_deltas.value(atom).get<2>(); - + if ((not sync_bonds) and bonddelta.value() != 0) { bonddelta = Length( this->generator().rand(-bonddelta.value(), bonddelta.value() ) ); } - + if ((not sync_angles) and angledelta.value() != 0) { angledelta = Angle( this->generator().rand(-angledelta.value(), angledelta.value() ) ); } - + if ((not sync_dihedrals) and dihedraldelta.value() != 0) { dihedraldelta = Angle( this->generator().rand(-dihedraldelta.value(), @@ -342,25 +343,25 @@ void ZMatMove::move(AtomIdx atom, ZMatrixCoords &zmatrix, bonddelta = zmatrix.bondDelta(atom); angledelta = zmatrix.angleDelta(atom); dihedraldelta = zmatrix.dihedralDelta(atom); - + if (sync_bonds and bonddelta.value() != 0) { bonddelta = Length( this->generator().rand(-bonddelta.value(), bonddelta.value() ) ); } - + if (sync_angles and angledelta.value() != 0) { angledelta = Angle( this->generator().rand(-angledelta.value(), angledelta.value() ) ); } - + if (sync_dihedrals and dihedraldelta.value() != 0) { dihedraldelta = Angle( this->generator().rand(-dihedraldelta.value(), dihedraldelta.value() ) ); } - + saved_deltas[atom] = tuple(bonddelta, angledelta, dihedraldelta); } @@ -370,19 +371,19 @@ void ZMatMove::move(AtomIdx atom, ZMatrixCoords &zmatrix, bonddelta = zmatrix.bondDelta(atom); angledelta = zmatrix.angleDelta(atom); dihedraldelta = zmatrix.dihedralDelta(atom); - + if (bonddelta.value() != 0) { bonddelta = Length( this->generator().rand(-bonddelta.value(), bonddelta.value() ) ); } - + if (angledelta.value() != 0) { angledelta = Angle( this->generator().rand(-angledelta.value(), angledelta.value() ) ); } - + if (dihedraldelta.value() != 0) { dihedraldelta = Angle( this->generator().rand(-dihedraldelta.value(), @@ -396,7 +397,7 @@ void ZMatMove::move(AtomIdx atom, ZMatrixCoords &zmatrix, { zmatrix.moveBond(atom, bonddelta); } - + if (angledelta.value() != 0) { zmatrix.moveAngle(atom, angledelta); @@ -408,28 +409,28 @@ void ZMatMove::move(AtomIdx atom, ZMatrixCoords &zmatrix, } } -/** Actually perform 'nmoves' moves of the molecules in the +/** Actually perform 'nmoves' moves of the molecules in the system 'system', optionally recording simulation statistics if 'record_stats' is true */ void ZMatMove::move(System &system, int nmoves, bool record_stats) { if (nmoves <= 0) return; - + //save our, and the system's, current state ZMatMove old_state(*this); - + System old_system_state(system); - + try { const PropertyMap &map = Move::propertyMap(); - + for (int i=0; ienergyComponent() ); - + //save the old system and sampler System old_system(system); SamplerPtr old_sampler(smplr); @@ -443,23 +444,23 @@ void ZMatMove::move(System &system, int nmoves, bool record_stats) { //move all of everything! const Molecules &molecules = smplr.read().group().molecules(); - + Molecules new_molecules = molecules; - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) { ZMatrixCoords zmatrix( *it, map ); - //move the internal coordinates of selected atoms in the + //move the internal coordinates of selected atoms in the //z-matrix AtomSelection selected_atoms = it->selection(); - + if (selected_atoms.selectedAll()) { //move everything - for (QHash::const_iterator + for (QHash::const_iterator it2 = zmatrix.index().constBegin(); it2 != zmatrix.index().constEnd(); ++it2) @@ -470,7 +471,7 @@ void ZMatMove::move(System &system, int nmoves, bool record_stats) else { //move only the selected atoms - for (QHash::const_iterator + for (QHash::const_iterator it2 = zmatrix.index().constBegin(); it2 != zmatrix.index().constEnd(); ++it2) @@ -481,11 +482,11 @@ void ZMatMove::move(System &system, int nmoves, bool record_stats) } new_molecules.update( it->molecule().edit() - .setProperty( map["coordinates"], + .setProperty( map["coordinates"], zmatrix.toCartesian() ) .commit() ); } - + system.update(new_molecules); } else if (sync_bonds or sync_angles or sync_dihedrals) @@ -497,7 +498,7 @@ void ZMatMove::move(System &system, int nmoves, bool record_stats) else { //move all of just one molecule - + //update the sampler with the latest version of the molecules smplr.edit().updateFrom(system); @@ -505,34 +506,34 @@ void ZMatMove::move(System &system, int nmoves, bool record_stats) tuple mol_and_bias = smplr.read().sample(); const PartialMolecule &oldmol = mol_and_bias.get<0>(); - + if (smplr.read().isBiased()) old_bias = mol_and_bias.get<1>(); ZMatrixCoords zmatrix( oldmol.molecule(), map ); - //move the internal coordinates of selected atoms in the + //move the internal coordinates of selected atoms in the //z-matrix AtomSelection selected_atoms = oldmol.selection(); AtomCoords coords; - + if (selected_atoms.selectedAll()) { //move everything - for (QHash::const_iterator + for (QHash::const_iterator it = zmatrix.index().constBegin(); it != zmatrix.index().constEnd(); ++it) { this->move(it.key(), zmatrix, saved_deltas); } - + coords = zmatrix.toCartesian(); } else { //move only the selected atoms - for (QHash::const_iterator + for (QHash::const_iterator it = zmatrix.index().constBegin(); it != zmatrix.index().constEnd(); ++it) @@ -542,10 +543,10 @@ void ZMatMove::move(System &system, int nmoves, bool record_stats) this->move(it.key(), zmatrix, saved_deltas); } } - + AtomCoords oldcoords = oldmol.property(map["coordinates"]).asA(); AtomCoords newcoords = zmatrix.toCartesian(); - + foreach (CGIdx cgidx, selected_atoms.selectedCutGroups()) { if (selected_atoms.selectedAll(cgidx)) @@ -561,20 +562,20 @@ void ZMatMove::move(System &system, int nmoves, bool record_stats) } } } - + coords = oldcoords; } Molecule newmol = oldmol.molecule().edit() .setProperty( map["coordinates"], coords ) .commit(); - + //update the system with the new coordinates system.update(newmol); //get the new bias on this molecule smplr.edit().updateFrom(system); - + if (smplr.read().isBiased()) new_bias = smplr.read().probabilityOf( PartialMolecule(newmol, oldmol.selection()) ); diff --git a/corelib/src/libs/SireSearch/CMakeLists.txt b/corelib/src/libs/SireSearch/CMakeLists.txt new file mode 100644 index 000000000..c10175eb0 --- /dev/null +++ b/corelib/src/libs/SireSearch/CMakeLists.txt @@ -0,0 +1,63 @@ +######################################## +# +# CMake file for library:SireIO +# +######################################## + +# Export symbols when building the library +add_definitions( "-DSIRESEARCH_BUILD" ) + +# Other Sire libraries +include_directories(${CMAKE_SOURCE_DIR}/src/libs) + +# This library uses Intel Threaded Building blocks +include_directories(${TBB_INCLUDE_DIR}) + +# Define the headers in SireSearch +set ( SIRESEARCH_HEADERS + approx_equal.h + ast.h + grammar.h + helper_funcs.h + idengine.h + parser.h + ) + +# Define the sources in SireSearch +set ( SIRESEARCH_SOURCES + + register_siresearch.cpp + + approx_equal.cpp + ast.cpp + helper_funcs.cpp + idengine.cpp + parser.cpp + + ${SIRESEARCH_HEADERS} + ) + +add_library (SireSearch ${SIRESEARCH_SOURCES}) + +set_target_properties (SireSearch PROPERTIES + VERSION ${SIRE_VERSION} + SOVERSION ${S_VERSION_MAJOR} + ) + +# Link to other Sire libraries +target_link_libraries (SireSearch + SireMM + SireMol + SireCAS + SireStream + ) + +# installation +install( TARGETS SireSearch EXPORT SireLibraries + RUNTIME DESTINATION ${SIRE_BIN} + LIBRARY DESTINATION ${SIRE_LIBS} + ARCHIVE DESTINATION ${SIRE_ARCHIVES} + ) + +install( FILES ${SIRESEARCH_HEADERS} + DESTINATION ${SIRE_INCLUDES}/SireSearch ) diff --git a/corelib/src/libs/SireSearch/approx_equal.cpp b/corelib/src/libs/SireSearch/approx_equal.cpp new file mode 100644 index 000000000..273ad8204 --- /dev/null +++ b/corelib/src/libs/SireSearch/approx_equal.cpp @@ -0,0 +1,71 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "approx_equal.h" + +#include + +#include + +struct Epsilon +{ + double epsilon = 1e-6; + QReadWriteLock lock; +}; + +Q_GLOBAL_STATIC(Epsilon, epsilon); + +namespace SireSearch +{ + double SIRESEARCH_EXPORT get_approx_epsilon() + { + auto e = epsilon(); + QReadLocker lkr(&(e->lock)); + return e->epsilon; + } + + void SIRESEARCH_EXPORT set_approx_epsilon(double eps) + { + auto e = epsilon(); + QWriteLocker lkr(&(e->lock)); + e->epsilon = abs(eps); + } + + bool SIRESEARCH_EXPORT approx_equal(double val0, double val1) + { + double delta = abs(val1 - val0); + double eps = get_approx_epsilon(); + + //check absolute difference is less than epsilon**2 + if (delta <= (eps*eps)) + return true; + + //check relative difference is less than eps + return delta <= 0.5 * eps * (abs(val0) + abs(val1)); + } +} diff --git a/corelib/src/libs/SireSearch/approx_equal.h b/corelib/src/libs/SireSearch/approx_equal.h new file mode 100644 index 000000000..d20b84fe8 --- /dev/null +++ b/corelib/src/libs/SireSearch/approx_equal.h @@ -0,0 +1,50 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIRESEARCH_APPROX_EQUAL_H +#define SIRESEARCH_APPROX_EQUAL_H + +#include "sireglobal.h" + +SIRE_BEGIN_HEADER + +namespace SireSearch +{ + bool SIRESEARCH_EXPORT approx_equal(double val0, double val1); + + double SIRESEARCH_EXPORT get_approx_epsilon(); + void SIRESEARCH_EXPORT set_approx_epsilon(double eps); +} + +SIRE_EXPOSE_FUNCTION( SireSearch::approx_equal ) +SIRE_EXPOSE_FUNCTION( SireSearch::get_approx_epsilon ) +SIRE_EXPOSE_FUNCTION( SireSearch::set_approx_epsilon ) + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireSearch/ast.cpp b/corelib/src/libs/SireSearch/ast.cpp new file mode 100644 index 000000000..845a8d4d8 --- /dev/null +++ b/corelib/src/libs/SireSearch/ast.cpp @@ -0,0 +1,642 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2018 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "ast.h" +#include "idengine.h" + +#include "SireMol/core.h" + +#include "SireError/errors.h" + +using namespace parser_idengine; + +namespace AST +{ + QString expression_to_string(const ExpressionVariant &expression) + { + return boost::apply_visitor( qstring_visitor(), expression ); + } + + QString idobject_to_string(IDObject obj) + { + switch(obj) + { + case ID_UNKNOWN: + return "unknown"; + case ATOM: + return "atom"; + case CUTGROUP: + return "cutgroup"; + case RESIDUE: + return "residue"; + case CHAIN: + return "chain"; + case SEGMENT: + return "segment"; + case MOLECULE: + return "molecule"; + case BOND: + return "bond"; + default: + return "unknown"; + } + } + + QString idnumtype_to_string(IDNumType typ) + { + switch(typ) + { + case ID_NUMBER: + return "number"; + case ID_INDEX: + return "index"; + default: + return "unknown"; + } + } + + QString idoperation_to_string(IDOperation op) + { + switch(op) + { + case ID_AND: + return "and"; + case ID_OR: + return "or"; + default: + return "unknown"; + } + } + + QString idcomparison_to_string(IDComparison cmp) + { + switch(cmp) + { + case ID_CMP_LT: + return "<"; + case ID_CMP_LE: + return "<="; + case ID_CMP_AE: + return "=~"; + case ID_CMP_EQ: + return "=="; + case ID_CMP_NE: + return "!="; + case ID_CMP_GT: + return ">"; + case ID_CMP_GE: + return ">="; + default: + return "unknown"; + } + } + + QString idbondtoken_to_string(IDBondToken token) + { + switch(token) + { + case ID_BOND_FROM: + return "from"; + case ID_BOND_TO: + return "to"; + default: + return "unknown"; + } + } + + QString idtoken_to_string(IDToken token) + { + switch(token) + { + case ID_WHERE: + return "where"; + case ID_WITH: + return "with"; + case ID_IN: + return "in"; + default: + return "unknown"; + } + } + + QString idcoordtype_to_string(IDCoordType typ) + { + switch(typ) + { + case ID_COORD_CENTER: + return "coords.center"; + case ID_COORD_CENTER_X: + return "coords.center.x"; + case ID_COORD_CENTER_Y: + return "coords.center.y"; + case ID_COORD_CENTER_Z: + return "coords.center.z"; + case ID_COORD_MAX: + return "coords.max"; + case ID_COORD_MAX_X: + return "coords.max.x"; + case ID_COORD_MAX_Y: + return "coords.max.y"; + case ID_COORD_MAX_Z: + return "coords.max.z"; + case ID_COORD_MIN: + return "coords.min"; + case ID_COORD_MIN_X: + return "coords.min.x"; + case ID_COORD_MIN_Y: + return "coords.min.y"; + case ID_COORD_MIN_Z: + return "coords.min.z"; + case ID_COORD_X: + return "coords.x"; + case ID_COORD_Y: + return "coords.y"; + case ID_COORD_Z: + return "coords.z"; + default: + return "unknown"; + } + } + + QString LengthValue::toString() const + { + return (value * unit).toString(); + } + + QString VectorValue::toString() const + { + if (_c == 0) + return "unset"; + else if (_c == 1) + return x.toString(); + else if (_c == 2) + return QString("( %1, %2 )").arg(x.toString()).arg(y.toString()); + else + return QString("( %1, %2, %3 )") + .arg(x.toString()).arg(y.toString()).arg(z.toString()); + } + + QString RegExpValue::toString() const + { + QString qstr = QString::fromStdString(value); + + if (is_case_sensitive) + return QObject::tr("/%1/").arg(qstr); + else + return QObject::tr("/%1/i").arg(qstr); + } + + QString CompareValue::toString() const + { + return QString("%1 %2").arg(idcomparison_to_string(compare)) + .arg(value); + } + + SireBase::Slice RangeValue::toSlice() const + { + int _start = 0; + + if (start.get() != 0) + _start = *start; + + if (stop.get() == 0) + { + if (_c == 0) + // single value + return SireBase::Slice::fromStartStop(_start, _start); + else if (step.get() == 0) + return SireBase::Slice::fromStart(_start); + else + return SireBase::Slice::fromStart(_start, *step); + } + else + { + if (step.get() == 0) + return SireBase::Slice::fromStartStop(_start, *stop); + else + return SireBase::Slice::fromStartStop(_start, *stop, *step); + } + } + + QString RangeValue::toString() const + { + if (_c == 0) + { + if (start.get() != 0) + return QString::number(*start); + else + return "0"; + } + + QStringList parts; + + if (start.get() != 0) + parts.append(QString::number(*start)); + else + parts.append(""); + + if (stop.get() != 0) + parts.append(QString::number(*stop)); + else + parts.append(""); + + if (step.get() != 0) + parts.append(QString::number(*step)); + else + parts.append(""); + + return parts.join(":"); + } + + QString Expression::toString() const + { + return boost::apply_visitor( qstring_visitor(), value ); + } + + QString ExpressionPart::toString() const + { + return boost::apply_visitor( qstring_visitor(), value ); + } + + QString IDUser::toString() const + { + return QString("{ %1 => %2 }").arg( QString::fromStdString(token) ) + .arg( boost::apply_visitor( qstring_visitor(), value ) ); + } + + QString Node::toString() const + { + QStringList lines; + + for (const auto &value : values) + { + lines.append( value.toString() ); + } + + return lines.join("; "); + } + + QString IDNull::toString() const + { + return QObject::tr("null"); + } + + QString IDName::toString() const + { + QStringList lines; + for (const auto &value : values) + { + lines.append( value.toString() ); + } + + return QObject::tr("%1name %2") + .arg( idobject_to_string(name) ) + .arg( lines.join(",") ); + } + + QString IDAll::toString() const + { + return QString("all %1").arg( idobject_to_string(name) ); + } + + QString IDWater::toString() const + { + return QString("water"); + } + + QString IDPerturbable::toString() const + { + return QString("perturbable"); + } + + QString IDNumber::toString() const + { + QStringList lines; + for (const auto &value : values) + { + lines.append( boost::apply_visitor( qstring_visitor(), value ) ); + } + + return QObject::tr("%1%2 %3") + .arg( idobject_to_string(name) ) + .arg( idnumtype_to_string(numtype) ) + .arg( lines.join(",") ); + } + + QString IDElement::toString() const + { + QStringList lines; + + for (const auto &element : values) + { + lines.append( element.symbol() ); + } + + return QObject::tr("element %1").arg(lines.join(",")); + } + + QString IDBinary::toString() const + { + return QObject::tr("(%1 %2 %3)") + .arg(part0.toString()) + .arg(idoperation_to_string(operation)) + .arg(part1.toString()); + } + + QString IDProperty::toString() const + { + auto p = QString::fromStdString(this->property); + auto v = QString("True"); + + if (not this->value.empty()) + { + v = QString::fromStdString(this->value); + } + + return QObject::tr("%1 property %2 %3 %4") + .arg(idobject_to_string(name)) + .arg(p) + .arg(idcomparison_to_string(compare)) + .arg(v); + } + + QString IDBond::toString() const + { + if (to_token != ID_BOND_UNKNOWN) + return QObject::tr("bonds %1 %2 %3 %4") + .arg(idbondtoken_to_string(from_token)) + .arg(from_value.toString()) + .arg(idbondtoken_to_string(to_token)) + .arg(to_value.toString()); + else + return QObject::tr("bonds %1 %2") + .arg(idbondtoken_to_string(from_token)) + .arg(from_value.toString()); + } + + QString IDWith::toString() const + { + return QObject::tr("(%1) %2 (%3)") + .arg(value0.toString()) + .arg(idtoken_to_string(token)) + .arg(value1.toString()); + } + + QString IDWhereWithin::toString() const + { + return QString("is within %1 of %2") + .arg(distance.toString()) + .arg(value.toString()); + } + + QString IDWhereCompare::toString() const + { + return QString("%1 %2") + .arg(idcomparison_to_string(compare)) + .arg(value.toString()); + } + + QString IDWhere::toString() const + { + return QString("%1s where %2 %3") + .arg(idobject_to_string(name)) + .arg(idcoordtype_to_string(typ)) + .arg(boost::apply_visitor( qstring_visitor(), value )); + } + + QString IDJoin::toString() const + { + return QString("join (%1)").arg(value.toString()); + } + + QString IDNot::toString() const + { + return QString("not (%1)").arg(value.toString()); + } + + QString IDSubscript::toString() const + { + return QString("{%1}[%2]").arg(value.toString()).arg(range.toString()); + } + + QString IDWithin::toString() const + { + return QObject::tr("%1s within %2 of %3") + .arg(idobject_to_string(name)) + .arg(distance.toString()) + .arg(value.toString()); + } + + QString IDWithinVector::toString() const + { + return QObject::tr("%1s within %2 of %3") + .arg(idobject_to_string(name)) + .arg(distance.toString()) + .arg(value.toString()); + } + + SelectEnginePtr Node::toEngine() const + { + if (values.size() == 0) + return SelectEnginePtr(); + else if (values.size() == 1) + return values.at(0).toEngine(); + else + { + QList engines; + + for (const auto &value : values) + { + engines.append( value.toEngine() ); + } + + return IDOrEngine::construct(engines); + } + } + + SelectEnginePtr Expression::toEngine() const + { + return boost::apply_visitor( engine_visitor(), value ); + } + + SelectEnginePtr ExpressionPart::toEngine() const + { + return boost::apply_visitor( engine_visitor(), value ); + } + + SelectEnginePtr IDUser::toEngine() const + { + return boost::apply_visitor( engine_visitor(), value ); + } + + SelectEnginePtr IDName::toEngine() const + { + return IDNameEngine::construct(name,values); + } + + SelectEnginePtr IDNull::toEngine() const + { + return SelectEnginePtr(); + } + + SelectEnginePtr IDElement::toEngine() const + { + return IDElementEngine::construct(values); + } + + SelectEnginePtr IDNumber::toEngine() const + { + switch(numtype) + { + case ID_NUMBER: + return IDNumberEngine::construct(name,values); + case ID_INDEX: + return IDIndexEngine::construct(name,values); + default: + return SelectEnginePtr(); + } + } + + SelectEnginePtr IDAll::toEngine() const + { + return IDAllEngine::construct(name); + } + + SelectEnginePtr IDWater::toEngine() const + { + return IDWaterEngine::construct(); + } + + SelectEnginePtr IDPerturbable::toEngine() const + { + return IDPerturbableEngine::construct(); + } + + SelectEnginePtr IDBinary::toEngine() const + { + switch(operation) + { + case ID_AND: + return IDAndEngine::construct(part0.toEngine(),part1.toEngine()); + case ID_OR: + return IDOrEngine::construct(part0.toEngine(),part1.toEngine()); + default: + return SelectEnginePtr(); + } + } + + SelectEnginePtr IDWith::toEngine() const + { + return IDWithEngine::construct(value0.toEngine(), + token, value1.toEngine()); + } + + SelectEnginePtr IDProperty::toEngine() const + { + QString v; + + if (not this->value.empty()) + { + v = QString::fromStdString(this->value); + } + else + { + v = "True"; + } + + return IDPropertyEngine::construct(this->name, + QString::fromStdString(this->property), + this->compare, + v); + } + + SelectEnginePtr IDBond::toEngine() const + { + return IDBondEngine::construct(from_token, from_value.toEngine(), + to_token, to_value.toEngine()); + } + + SelectEnginePtr IDWhereWithin::toEngine(IDObject name, IDCoordType typ) const + { + return IDDistanceEngine::construct(name, typ, distance.value * distance.unit, + value.toEngine()); + } + + SelectEnginePtr IDWhereCompare::toEngine(IDObject name, IDCoordType typ) const + { + qDebug() << "NOT YET IMPLEMENTED IDWhereCompare!"; + return SelectEnginePtr(); + } + + class where_engine_visitor : public boost::static_visitor + { + public: + where_engine_visitor(IDObject o, IDCoordType t) + : boost::static_visitor(), obj(o), typ(t) + {} + + IDObject obj; + IDCoordType typ; + + template + SelectEnginePtr operator()(const T &value) const + { + return value.toEngine(obj,typ); + } + }; + + SelectEnginePtr IDWhere::toEngine() const + { + return boost::apply_visitor( where_engine_visitor(name,typ), value ); + } + + SelectEnginePtr IDJoin::toEngine() const + { + return IDJoinEngine::construct(value.toEngine()); + } + + SelectEnginePtr IDNot::toEngine() const + { + return IDNotEngine::construct(value.toEngine()); + } + + SelectEnginePtr IDSubscript::toEngine() const + { + return IDSubScriptEngine::construct(value.toEngine(),range); + } + + SelectEnginePtr IDWithin::toEngine() const + { + return IDDistanceEngine::construct(name, distance.value * distance.unit, value.toEngine()); + } + + SelectEnginePtr IDWithinVector::toEngine() const + { + return IDDistanceVectorEngine::construct(name, distance.value * distance.unit, value); + } +} diff --git a/corelib/src/libs/SireSearch/ast.h b/corelib/src/libs/SireSearch/ast.h new file mode 100644 index 000000000..79d640145 --- /dev/null +++ b/corelib/src/libs/SireSearch/ast.h @@ -0,0 +1,1066 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2018 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIRESEARCH_PARSER_AST_H +#define SIRESEARCH_PARSER_AST_H + +#include "SireUnits/dimensions.h" +#include "SireUnits/units.h" +#include "SireMol/select.h" +#include "SireMol/element.h" + +#include "SireError/errors.h" + +#include "parser.h" + +namespace SireBase +{ +class Slice; +} + +SIRE_BEGIN_HEADER + +// need to use this to increase the number of variants that can be +// held in ExpressionVariant from the default of 20. This is +// not a long term solution! +#define BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS +#define BOOST_MPL_LIMIT_LIST_SIZE 30 + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +#include + +// A lot of the below code is heavily inspired by +// https://medium.com/@alinakipoglu/parsing-with-spirit-qi-fcaeaf4357b3 + +/** Namespace holding the objects used in the abstract syntax tree */ +namespace AST +{ + using SireMol::parser::SelectEnginePtr; + + /** The different objects that can be identified */ + enum IDObject { ID_UNKNOWN = 0, ATOM = 1, CUTGROUP = 2, + RESIDUE = 3, CHAIN = 4, SEGMENT = 5, MOLECULE = 6, + BOND = 7 }; + + QString idobject_to_string(IDObject obj); + + /** The different types of number that can be identified */ + enum IDNumType { ID_TYP_UNKNOWN = 0, ID_NUMBER = 1, ID_INDEX = 2 }; + + QString idnumtype_to_string(IDNumType typ); + + /** The different types of logical operation */ + enum IDOperation { ID_OP_UNKNOWN = 0, ID_AND = 1, ID_OR = 2 }; + + QString idoperation_to_string(IDOperation op); + + /** The different types of value comparison */ + enum IDComparison { ID_CMP_UNKNOWN = 0, ID_CMP_LT = 1, ID_CMP_LE = 2, + ID_CMP_EQ = 3, ID_CMP_NE = 4, ID_CMP_GT = 5, ID_CMP_GE = 6, + ID_CMP_AE = 7 }; + + QString idcomparison_to_string(IDComparison cmp); + + /** The different miscellaneous tokens */ + enum IDToken { ID_TOKEN_UNKNOWN = 0, ID_WHERE = 1, ID_WITH = 2, ID_IN = 3 }; + + QString idtoken_to_string(IDToken token); + + /** The different bond tokens */ + enum IDBondToken { ID_BOND_UNKNOWN = 0, ID_BOND_FROM = 1, ID_BOND_TO = 2 }; + + QString idbondtoken_to_string(IDBondToken token); + + /** The different types of coordinate */ + enum IDCoordType { ID_COORD_UNKNOWN = 0, ID_COORD_CENTER = 1, ID_COORD_CENTER_X = 2, + ID_COORD_CENTER_Y = 3, ID_COORD_CENTER_Z = 4, ID_COORD_MAX = 5, + ID_COORD_MAX_X = 6, ID_COORD_MAX_Y = 7, ID_COORD_MAX_Z = 8, + ID_COORD_MIN = 9, ID_COORD_MIN_X = 10, ID_COORD_MIN_Y = 11, + ID_COORD_MIN_Z = 12, ID_COORD_X = 13, ID_COORD_Y = 14, ID_COORD_Z = 15, + ID_COORD_CLOSEST = 16 }; + + QString idcoordtype_to_string(IDCoordType typ); + + struct NameValue; + struct RangeValue; + struct CompareValue; + struct RegExpValue; + struct LengthValue; + struct VectorValue; + + struct IDNull; + struct IDName; + struct IDNumber; + struct IDBinary; + struct IDWith; + struct IDWhere; + struct IDCount; + struct IDNot; + struct IDSubscript; + struct IDWithin; + struct IDWithinVector; + struct IDUser; + struct IDJoin; + struct IDAll; + struct IDWater; + struct IDProtein; + struct IDPerturbable; + struct IDBond; + struct IDProperty; + struct IDMass; + struct IDCharge; + struct IDCmpMass; + struct IDCmpCharge; + struct IDObjMass; + struct IDObjCmpMass; + struct IDObjCharge; + struct IDObjCmpCharge; + + struct IDWhereCompare; + struct IDWhereWithin; + + struct IDElement; + + struct Expression; + struct ExpressionPart; + struct Node; + + /** Base holder for all of the different ID expressions */ + using ExpressionVariant = boost::variant, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper, + boost::recursive_wrapper >; + + QString expression_to_string(const ExpressionVariant &expression); + + /** Base holder for strings or regular expressions */ + using NameVariant = boost::variant, + std::string>; + + /** Base holder for ranges of value comparisons */ + using RangeVariant = boost::variant, + boost::recursive_wrapper >; + + /** Base holder for different methods of holding a "where" expression */ + using IDWhereVariant = boost::variant, + boost::recursive_wrapper >; + + using IDNames = std::vector; + using Expressions = std::vector; + using NameValues = std::vector; + using RangeValues = std::vector; + + /** Visitor used to get string representations from a boost::variant */ + class qstring_visitor : public boost::static_visitor + { + public: + /** In general, use the .toString() function from a class */ + template + QString operator()(const T &value) const + { + return value.toString(); + } + + /** Convert a std::string into a QString */ + QString operator()(const std::string &string) const + { + return QString("'%1'").arg(QString::fromStdString(string)); + } + }; + + /** Visitorused to get SelectEnginePtr values from a boost::variant */ + class engine_visitor : public boost::static_visitor + { + public: + /** In general, use the .toEngine() function from a class */ + template + SelectEnginePtr operator()(const T &value) const + { + return value.toEngine(); + } + }; + + /** Struct that holds a length or distance, with units */ + struct LengthValue + { + LengthValue() : value(0), unit(1.0) + {} + + LengthValue& operator+=(double v) + { + value = v; + return *this; + } + + LengthValue& operator+=(SireUnits::Dimension::Length v) + { + unit = v; + return *this; + } + + double value; + SireUnits::Dimension::Length unit; + + QString toString() const; + }; + + /** Struct that holds a vector or point in space (within units) */ + struct VectorValue + { + LengthValue x; + LengthValue y; + LengthValue z; + + VectorValue() : _c(0) + {} + + VectorValue& operator+=(const LengthValue &val) + { + if (_c == 0) + { + x = val; + y = val; + z = val; + _c += 1; + } + else if (_c == 1) + { + y = val; + z = val; + _c += 1; + } + else if (_c == 2) + { + z = val; + _c += 1; + } + else + throw SireMol::parse_error( QObject::tr( + "Cannot add more than there points to a vector"), CODELOC ); + + return *this; + } + + QString toString() const; + + private: + int _c; + + }; + + /** Struct that holds a regular expression */ + struct RegExpValue + { + RegExpValue() : is_case_sensitive(true) + {} + + template + RegExpValue& operator+=(const T &val) + { + value = val; + return *this; + } + + template + RegExpValue& operator*=(const T &val) + { + is_case_sensitive = false; + return *this; + } + + QString toString() const; + + std::string value; + bool is_case_sensitive; + }; + + /** Struct that holds a name (either a string or regular expression) */ + struct NameValue + { + NameVariant value; + + QString toString() const + { + return boost::apply_visitor( qstring_visitor(), value ); + } + }; + + /** Struct that holds a comparison against an integer */ + struct CompareValue + { + IDComparison compare; + int value; + + QString toString() const; + }; + + /** Struct that holds a range of integers */ + struct RangeValue + { + RangeValue() : _c(0) + {} + + std::shared_ptr start; + std::shared_ptr stop; + std::shared_ptr step; + + RangeValue& operator*=(const int val) + { + _c += 1; + return *this; + } + + RangeValue& operator+=(const int val) + { + if (_c == 0) + { + start.reset(new int(val)); + } + else if (_c == 1) + { + stop.reset(new int(val)); + } + else if (_c == 2) + { + step.reset(new int(val)); + } + else + { + qDebug() << "extra +=" << val; + } + + return *this; + } + + QString toString() const; + + SireBase::Slice toSlice() const; + + private: + int _c; + }; + + /** Null struct for empty values */ + struct IDNull + { + IDObject name; + NameValues values; + + QString toString() const; + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a general selection expression */ + struct Expression + { + ExpressionVariant value = IDNull(); + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an atomic part of a selection expression */ + struct ExpressionPart + { + ExpressionVariant value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an ID token that matches everything */ + struct IDAll + { + IDAll(IDObject object = MOLECULE) : name(object) + {} + + IDObject name; + + QString toString() const; + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold an ID token that matches water molecules */ + struct IDWater + { + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold an ID token that matches protein molecules */ + struct IDProtein + { + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold an ID token that matches perturbable molecules */ + struct IDPerturbable + { + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an ID token that represents a user-supplied selection */ + struct IDUser + { + std::string token; + ExpressionVariant value; + + IDUser() + {} + + IDUser(const std::string t, const ExpressionVariant &s) + : token(t), value(s) + {} + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** The root node of the AST - this holds a set of Expressions */ + struct Node + { + Expressions values; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + /** Struct that holds a name and associated values */ + struct IDName + { + IDObject name; + NameValues values; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a number and associated values */ + struct IDNumber + { + IDObject name; + IDNumType numtype; + RangeValues values; + + IDNumber() : name(ID_UNKNOWN), numtype(ID_TYP_UNKNOWN) + {} + + IDNumber& operator+=(const QPair &v) + { + name = v.first; + numtype = v.second; + return *this; + } + + IDNumber& operator+=(const RangeValues &vals) + { + values = vals; + return *this; + } + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Structs that holds a list of elements */ + struct IDElement + { + std::vector values; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a binary expression, e.g. something and other */ + struct IDBinary + { + Expression part0; + IDOperation operation; + Expression part1; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an ID token that represents a Property expression, + * e.g. property charge, property charge > 0, property perturbable == True + */ + struct IDProperty + { + IDObject name; + std::string property; + IDComparison compare; + std::string value; + + IDProperty& operator/=(int) + { + //reset the search + property.clear(); + value.clear(); + name = AST::MOLECULE; + compare = AST::ID_CMP_EQ; + return *this; + } + + IDProperty& operator+=(const std::string &p) + { + property = p; + return *this; + } + + IDProperty& operator+=(const IDObject &n) + { + this->operator/=(1); + name = n; + return *this; + } + + IDProperty& operator+=(const IDComparison &c) + { + compare = c; + return *this; + } + + IDProperty& operator*=(const std::string &v) + { + value = v; + return *this; + } + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an ID token that represents a Bond expression, + * e.g. bonds within resnum 1, bonds in resnum 1, + * bonds from atomnum 1 to atomnum 2 + */ + struct IDBond + { + IDBondToken from_token; + Expression from_value; + IDBondToken to_token; + Expression to_value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a "with" expression, e.g. molecules with resname ala */ + struct IDWith + { + IDWith() + {} + + Expression value0; + IDToken token; + Expression value1; + + IDWith& operator+=(const Expression &v) + { + value0 = v; + return *this; + } + + IDWith& operator+=(const IDToken &t) + { + token = t; + return *this; + } + + IDWith& operator*=(const Expression &v) + { + value1 = v; + return *this; + } + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a "mass" expression, e.g. 1 g_per_mol */ + struct IDMass + { + double value; + SireUnits::Dimension::MolarMass units; + + IDMass() : value(0.0), units(1.0) + {} + + IDMass(const IDMass &other) : value(other.value), units(other.units) + {} + + IDMass& operator+=(double v) + { + value = v; + return *this; + } + + IDMass& operator+=(SireUnits::Dimension::MolarMass u) + { + units = u; + return *this; + } + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a mass comparison, e.g. mass > 1 g_per_mol */ + struct IDCmpMass + { + IDComparison compare; + IDMass value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an object mass, e.g. atom mass 1 g_per_mol */ + struct IDObjMass + { + IDObject name; + IDMass value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an object mass comparison, e.g. atom mass > 1 g_per_mol */ + struct IDObjCmpMass + { + IDObject name; + IDComparison compare; + IDMass value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a "charge" expression, e.g. 1 e */ + struct IDCharge + { + double value; + SireUnits::Dimension::Charge units; + + IDCharge() : value(0.0), units(1.0) + {} + + IDCharge(const IDCharge &other) : value(other.value), units(other.units) + {} + + IDCharge& operator+=(double v) + { + value = v; + return *this; + } + + IDCharge& operator+=(SireUnits::Dimension::Charge u) + { + units = u; + return *this; + } + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a charge comparison, e.g. charge > 1 e */ + struct IDCmpCharge + { + IDComparison compare; + IDCharge value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an object charge, e.g. atom char 1 e */ + struct IDObjCharge + { + IDObject name; + IDCharge value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds an object charge comparison, e.g. atom charge > 1 e */ + struct IDObjCmpCharge + { + IDObject name; + IDComparison compare; + IDCharge value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds "count(*) < X" expressions */ + struct IDCount + { + Expression object; + IDComparison compare; + int value; + + IDCount& operator+=(const Expression &o) + { + object = o; + return *this; + } + + IDCount& operator+=(const IDComparison &c) + { + compare = c; + return *this; + } + + IDCount& operator+=(int v) + { + value = v; + return *this; + } + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct that holds a "where within" + expression, e.g. residues where center is within 5 A of resname /lig/i */ + struct IDWhereWithin + { + LengthValue distance; + Expression value; + + QString toString() const; + + SelectEnginePtr toEngine(IDObject name, IDCoordType typ) const; + }; + + /** Struct that holds a "where" comparison expression, e.g. + residues where center.x >= 5 */ + struct IDWhereCompare + { + IDComparison compare; + VectorValue value; + + QString toString() const; + + SelectEnginePtr toEngine(IDObject name, IDCoordType typ) const; + }; + + /** Struct that holds a general "where" expression */ + struct IDWhere + { + IDObject name; + IDCoordType typ; + IDWhereVariant value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold a negated (not) expression */ + struct IDNot + { + Expression value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold a join expression */ + struct IDJoin + { + Expression value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold a subscripted expression, e.g. {something}[0:10:2] */ + struct IDSubscript + { + Expression value; + RangeValue range; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold expressions that select based on being within a distance */ + struct IDWithin + { + IDObject name; + LengthValue distance; + Expression value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; + + /** Struct to hold expressions that select based on being within a distance to a point*/ + struct IDWithinVector + { + IDObject name; + LengthValue distance; + VectorValue value; + + QString toString() const; + + SelectEnginePtr toEngine() const; + }; +} + +BOOST_FUSION_ADAPT_STRUCT( AST::IDWithin, + (AST::IDObject,name) + (AST::LengthValue,distance) + (AST::Expression,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDCharge, + (double,value) + (SireUnits::Dimension::Charge,units) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDMass, + (double,value) + (SireUnits::Dimension::MolarMass,units) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDCmpCharge, + (AST::IDComparison,compare) + (AST::IDCharge,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDCmpMass, + (AST::IDComparison,compare) + (AST::IDMass,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDObjCharge, + (AST::IDObject, name) + (AST::IDCharge,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDObjMass, + (AST::IDObject, name) + (AST::IDMass,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDObjCmpCharge, + (AST::IDObject, name) + (AST::IDComparison,compare) + (AST::IDCharge,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDObjCmpMass, + (AST::IDObject, name) + (AST::IDComparison,compare) + (AST::IDMass,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDWithinVector, + (AST::IDObject,name) + (AST::LengthValue,distance) + (AST::VectorValue,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::LengthValue, + (double,value) + (SireUnits::Dimension::Length,unit) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDCount, + (AST::Expression,object) + (AST::IDComparison,compare) + (int,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDWhereWithin, + (AST::LengthValue,distance) + (AST::Expression,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDWhereCompare, + (AST::IDComparison,compare) + (AST::VectorValue,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDWhere, + (AST::IDObject,name) + (AST::IDCoordType,typ) + (AST::IDWhereVariant,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::NameValue, + (AST::NameVariant,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::CompareValue, + (AST::IDComparison,compare) + (int,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDNot, + (AST::Expression,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDJoin, + (AST::Expression,value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDSubscript, + (AST::Expression,value) + (AST::RangeValue,range) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::RegExpValue, + (std::string,value) + (bool,is_case_sensitive) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::Node, + (AST::Expressions,values) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDNull, + (AST::IDObject, name), + (AST::NameValues, values) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDName, + (AST::IDObject, name), + (AST::NameValues, values) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDElement, + (std::vector, values) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDNumber, + (AST::IDObject, name), + (AST::IDNumType, numtype), + (AST::RangeValues, values) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDBinary, + (AST::Expression, part0), + (AST::IDOperation, operation), + (AST::Expression, part1) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDWith, + (AST::Expression,value0) + (AST::IDToken,token) + (AST::Expression,value1) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::IDBond, + (AST::IDBondToken,from_token) + (AST::Expression,from_value) + (AST::IDBondToken,to_token) + (AST::Expression,to_value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::Expression, + (AST::ExpressionVariant, value) + ) + +BOOST_FUSION_ADAPT_STRUCT( AST::ExpressionPart, + (AST::ExpressionVariant, value) + ) + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireSearch/grammar.h b/corelib/src/libs/SireSearch/grammar.h new file mode 100644 index 000000000..1aa15df51 --- /dev/null +++ b/corelib/src/libs/SireSearch/grammar.h @@ -0,0 +1,664 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2018 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIRESEARCH_GRAMMAR_H + +using qi::lit; +using qi::lexeme; +using qi::eps; +using qi::_1; +using qi::int_; +using qi::double_; +using qi::on_error; +using qi::fail; +using namespace qi::labels; +using qi::as_string; + +using phoenix::construct; +using phoenix::val; + +using boost::spirit::ascii::char_; + +UserTokens getUserTokens(); + +/** This is the grammar that enables skipping of spaces, newlines and comments */ +template +class SkipperGrammar : public qi::grammar +{ +public: + SkipperGrammar() : SkipperGrammar::base_type( rule ) + { + lineCommentRule = qi::lit( "//" ) >> + *(qi::char_ -qi::eol) >> + qi::eol; + blockCommentRule = qi::lit( "/*" ) >> + *(qi::char_ -qi::lit( "*/" ) ) >> + qi::lit( "*/" ); + spaceRule = qi::space; + rule = spaceRule | lineCommentRule | blockCommentRule; + } + + qi::rule lineCommentRule; + qi::rule blockCommentRule; + qi::rule spaceRule; + qi::rule rule; +}; + +/** This is a quoted string grammar that will parse quoted strings and also + auto-escape characters */ +template +class ValueGrammar : public qi::grammar +{ +public: + ValueGrammar() : ValueGrammar::base_type( rule, "String" ) + { + escapedStringRule %= qi::lexeme[ + qi::lit( "'" ) >> + *( escapeCharSymbols | ( qi::char_ - qi::char_( "'" ) ) ) >> + qi::lit( "'" ) ]; + + rawStringRule %= qi::lexeme[ + +( qi::alnum | + qi::char_( '.' ) | + qi::char_( '/' ) | + qi::char_( '_' ) | + qi::char_( '-' ) + ) ]; + + rule %= rawStringRule | escapedStringRule; + + escapeCharSymbols.add( "\\a", '\a' ) + ( "\\b", '\b' ) + ( "\\f", '\f' ) + ( "\\n", '\n' ) + ( "\\r", '\r' ) + ( "\\t", '\t' ) + ( "\\v", '\v' ) + ( "\\\\", '\\' ) + ( "\\\'", '\'' ) + ( "\\\"", '\"' ); + + escapedStringRule.name( "Escaped String" ); + rawStringRule.name( "Escaped String" ); + + escapeCharSymbols.name( "Escaped Chars" ); + } + + qi::rule escapedStringRule; + qi::rule rawStringRule; + qi::rule rule; + qi::symbols escapeCharSymbols; +}; + +/** This the main grammar for the selection statements */ +template +class Grammar : public qi::grammar +{ +public: + Grammar() : Grammar::base_type( nodeRule, "Node" ) + { + ///// + ///// first define all of the tokens recognised by the grammar + ///// + + //all of the different words to match "all" + all_token.add( "*", AST::IDAll() ) + ( "all", AST::IDAll() ) + ( "atoms", AST::IDAll(AST::ATOM) ) + ( "bonds", AST::IDAll(AST::BOND) ) + ( "residues", AST::IDAll(AST::RESIDUE) ) + ( "chains", AST::IDAll(AST::CHAIN) ) + ( "segments", AST::IDAll(AST::SEGMENT) ) + ( "molecules", AST::IDAll(AST::MOLECULE) ) + ( "cutgroups", AST::IDAll(AST::CUTGROUP) ) + ; + + // all of the different tokens to match "water" + water_token.add( "water", AST::IDWater() ) + ( "WATER", AST::IDWater() ) + ( "wat", AST::IDWater() ) + ( "WAT", AST::IDWater() ) + ( "waters", AST::IDWater() ) + ( "WATERS", AST::IDWater() ); + + // all of the different tokens to match "protein" + protein_token.add( "protein", AST::IDProtein() ) + ( "proteins", AST::IDProtein() ) + ( "PROTEIN", AST::IDProtein() ) + ( "PROTEINS", AST::IDProtein() ); + + // all of the different tokens to match "perturbable" + pert_token.add( "perturbable", AST::IDPerturbable() ) + ( "PERTURBABLE", AST::IDPerturbable() ) + ( "pert", AST::IDPerturbable() ) + ( "PERT", AST::IDPerturbable() ); + + //all of the different object names + name_token.add( "atomnam", AST::ATOM ) + ( "atomname", AST::ATOM ) + ( "cgname", AST::CUTGROUP ) + ( "cgnam", AST::CUTGROUP ) + ( "resnam", AST::RESIDUE ) + ( "resname", AST::RESIDUE ) + ( "chainnam", AST::CHAIN ) + ( "chainname", AST::CHAIN ) + ( "segnam", AST::SEGMENT ) + ( "segname", AST::SEGMENT ) + ( "molnam", AST::MOLECULE ) + ( "molname", AST::MOLECULE ); + + //all of the different object numbers + number_token + .add( "atomnum", QPair(AST::ATOM,AST::ID_NUMBER) ) + ( "atomidx", QPair(AST::ATOM,AST::ID_INDEX) ) + ( "cgnum", QPair(AST::CUTGROUP,AST::ID_NUMBER) ) + ( "cgidx", QPair(AST::CUTGROUP,AST::ID_INDEX) ) + ( "resnum", QPair(AST::RESIDUE,AST::ID_NUMBER) ) + ( "residx", QPair(AST::RESIDUE,AST::ID_INDEX) ) + ( "chainnum", QPair(AST::CHAIN,AST::ID_NUMBER) ) + ( "chainidx", QPair(AST::CHAIN,AST::ID_INDEX) ) + ( "segnum", QPair(AST::SEGMENT,AST::ID_NUMBER) ) + ( "segidx", QPair(AST::SEGMENT,AST::ID_INDEX) ) + ( "molnum", QPair(AST::MOLECULE,AST::ID_NUMBER) ) + ( "molidx", QPair(AST::MOLECULE,AST::ID_INDEX) ) + ; + + //all of the different types of logical operation + op_token.add( "and", AST::ID_AND ) + ( "AND", AST::ID_AND ) + ( "or", AST::ID_OR ) + ( "OR", AST::ID_OR ); + + //all of the different value comparison tokens + cmp_token.add( "<=", AST::ID_CMP_LE ) + ( "<", AST::ID_CMP_LT ) + ( "==", AST::ID_CMP_EQ ) + ( "!=", AST::ID_CMP_NE ) + ( ">=", AST::ID_CMP_GE ) + ( ">", AST::ID_CMP_GT ) + ( "=~", AST::ID_CMP_AE ); + + //all of the different object identification tokens + obj_token.add( "atoms", AST::ATOM ) + ( "atom", AST::ATOM ) + ( "cutgroups", AST::CUTGROUP ) + ( "cutgroup", AST::CUTGROUP ) + ( "group", AST::CUTGROUP ) + ( "groups", AST::CUTGROUP ) + ( "residues", AST::RESIDUE ) + ( "residue", AST::RESIDUE ) + ( "res", AST::RESIDUE ) + ( "chains", AST::CHAIN ) + ( "chain", AST::CHAIN ) + ( "segments", AST::SEGMENT ) + ( "segment", AST::SEGMENT ) + ( "segs", AST::SEGMENT ) + ( "seg", AST::SEGMENT ) + ( "molecules", AST::MOLECULE ) + ( "molecule", AST::MOLECULE ) + ( "mol", AST::MOLECULE ) + ( "mols", AST::MOLECULE ) + ( "bond", AST::BOND ) + ( "bonds", AST::BOND ) + ; + + //all of the different length unit tokens + length_token.add( "Angstroms", SireUnits::angstrom ) + ( "Angstrom", SireUnits::angstrom ) + ( "angstroms", SireUnits::angstrom ) + ( "angstrom", SireUnits::angstrom ) + ( "A", SireUnits::angstrom ) + ( "picometers", SireUnits::picometer ) + ( "picometer", SireUnits::picometer ) + ( "pm", SireUnits::picometer ) + ( "nanometers", SireUnits::nanometer ) + ( "nanometer", SireUnits::nanometer ) + ( "nm", SireUnits::nanometer ) + ; + + //all of the different mass tokens + mass_token.add( "g_per_mol", SireUnits::g_per_mol ) + ( "mg_per_mol", SireUnits::mg_per_mol ) + ( "kg_per_mol", SireUnits::kg_per_mol ) + ; + + //all of the different charge tokens + charge_token.add( "e", SireUnits::mod_electron ) + ( "coulomb", SireUnits::coulomb ) + ; + + //all of the different "with" and "in" expression tokens + with_token.add( "with", AST::ID_WITH ) + ( "in", AST::ID_IN ) + ; + + //all of the different bond tokens + bond_token.add( "to", AST::ID_BOND_TO ) + ( "from", AST::ID_BOND_FROM ) + ; + + //all of the different types of coordinates tokens + coord_token.add( "center", AST::ID_COORD_CENTER ) + ( "coords.center", AST::ID_COORD_CENTER ) + ( "center.x", AST::ID_COORD_CENTER_X ) + ( "coords.center.x", AST::ID_COORD_CENTER_X ) + ( "center.y", AST::ID_COORD_CENTER_Y ) + ( "coords.center.y", AST::ID_COORD_CENTER_Y ) + ( "center.z", AST::ID_COORD_CENTER_Z ) + ( "coords.center.z", AST::ID_COORD_CENTER_Z ) + ( "max", AST::ID_COORD_MAX ) + ( "coords.max", AST::ID_COORD_MAX ) + ( "max.x", AST::ID_COORD_MAX_X ) + ( "coords.max.x", AST::ID_COORD_MAX_X ) + ( "max.y", AST::ID_COORD_MAX_Y ) + ( "coords.max.y", AST::ID_COORD_MAX_Y ) + ( "max.z", AST::ID_COORD_MAX_Z ) + ( "coords.max.z", AST::ID_COORD_MAX_Z ) + ( "min", AST::ID_COORD_MIN ) + ( "coords.min", AST::ID_COORD_MIN ) + ( "min.x", AST::ID_COORD_MIN_X ) + ( "coords.min.x", AST::ID_COORD_MIN_X ) + ( "min.y", AST::ID_COORD_MIN_Y ) + ( "coords.min.y", AST::ID_COORD_MIN_Y ) + ( "min.z", AST::ID_COORD_MIN_Z ) + ( "coords.min.z", AST::ID_COORD_MIN_Z ) + ( "x", AST::ID_COORD_X ) + ( "coords.x", AST::ID_COORD_X ) + ( "y", AST::ID_COORD_Y ) + ( "coords.y", AST::ID_COORD_Y ) + ( "z", AST::ID_COORD_Z ) + ( "coords.z", AST::ID_COORD_Z ) + ; + + //now add in all of the element tokens + for (int i=0; i<=111; ++i) //loop through all known elements + { + Element e(i); + + //add tokens for the capitalised symbol, and lowercase symbol and name + element_token.add( e.symbol().toLatin1().constData(), e ); + element_token.add( e.symbol().toLower().toLatin1().constData(), e ); + element_token.add( e.name().toLower().toLatin1().constData(), e ); + } + + //now get all of the user tokens (user-identified sub-expressions) + user_token = getUserTokens(); + + ///// + ///// Now define all of the grammar rules + ///// + + //root rule to read a node as a set of expressions + nodeRule %= expressionsRule; + + //a set of expressions is a list of expression rules separated by semicolons + expressionsRule %= ( expressionRule % qi::lit( ';' ) ); + + //an expression is either a binary or a expression + expressionRule %= binaryRule2 | binaryRule | withRule2 | withRule | expressionPartRule; + + //a binary is two expressions separated by an op_token (and/or) + binaryRule %= (expressionPartRule >> op_token >> expressionPartRule) | + ( qi::lit('(') >> binaryRule >> qi::lit(')') ); + + //allow multiple op_tokens, e.g. a and b and c + binaryRule2 %= binaryRule >> op_token >> binaryRule | + binaryRule >> op_token >> expressionPartRule | + expressionPartRule >> op_token >> binaryRule | + (qi::lit('(') >> binaryRule2 >> qi::lit(')') ); + + //a withRule is two expressions separated by a "with" or "in" + withRule %= (expressionPartRule >> with_token >> expressionPartRule) | + ( qi::lit('(') >> withRule >> qi::lit(')') ); + + //allow multiple with_tokens, e.g. atoms in molecules with resname ALA + withRule2 %= withRule >> with_token >> withRule | + expressionPartRule >> with_token >> withRule | + withRule >> with_token >> expressionPartRule | + (qi::lit('(') >> withRule2 >> qi::lit(')') ); + + //an expression is either a subscript, name, number, within, where, not + //or user-identified expression, optionally surrounded by parenthesis '( )' + expressionPartRule %= subscriptRule | idNameRule | idNumberRule | idElementRule | + withinRule | withinVectorRule | propertyRule | bondRule | all_token | + water_token | pert_token | protein_token | + whereRule | notRule | joinRule | + massRule | massCmpRule | chargeRule | chargeCmpRule | + massObjRule | massObjCmpRule | chargeObjRule | chargeObjCmpRule | + countRule | user_token | + ( qi::lit('(') >> expressionPartRule >> qi::lit(')') ); + + //grammar that specifies a list of names (comma-separated) + nameValuesRule %= ( nameValueRule % qi::lit( ',' ) ); + + //grammar for a single name (string or regular expression) + nameValueRule %= regExpRule | stringRule; + + //grammar for a regular expression (identified using '/') + regExpRule = eps [ _val = AST::RegExpValue() ] >> + ( + lexeme[ "/" >> as_string[+(char_ - "/")][ _val += _1 ] >> "/" ] + >> -qi::lit("i")[ _val *= 1 ] + ) + ; + + //grammar for a set of integers (either as ranges or comparisons) + rangeValuesRule %= ( (compareValueRule | rangeValueRule) % qi::lit( ',' ) ); + + //grammar for an integer or range (e.g. 0:10, or 5) + rangeValueRule = eps [ _val = AST::RangeValue() ] >> + ( + -(int_[ _val += _1 ]) >> + -(qi::lit(":")[ _val *= 1 ]) >> + -(int_[ _val += _1 ]) >> + -(qi::lit(":")[ _val *= 1 ]) >> + -(int_[ _val += _1 ]) + ) + ; + + massValueRule = eps [ _val = AST::IDMass() ] >> + ( + double_[ _val += _1 ] >> + mass_token[ _val += _1 ] + ) + | + ( + double_[ _val += _1 ] + ) + ; + + chargeValueRule = eps [ _val = AST::IDCharge() ] >> + ( + double_[ _val += _1 ] >> + charge_token[ _val += _1 ] + ) + | + ( + double_[ _val += _1 ] + ) + ; + + //allow looking for mass + massRule %= qi::lit("mass") >> massValueRule; + massCmpRule %= qi::lit("mass") >> cmp_token >> massValueRule; + massObjRule %= obj_token >> qi::lit("mass") >> massValueRule; + massObjCmpRule %= obj_token >> qi::lit("mass") >> cmp_token >> massValueRule; + + //allow looking for charge + chargeRule %= qi::lit("charge") >> chargeValueRule; + chargeCmpRule %= qi::lit("charge") >> cmp_token >> chargeValueRule; + chargeObjRule %= obj_token >> qi::lit("charge") >> chargeValueRule; + chargeObjCmpRule %= obj_token >> qi::lit("charge") >> cmp_token >> chargeValueRule; + + //grammar for a comparison (e.g. x > 5) + compareValueRule %= cmp_token >> int_; + + //grammar for a length/distance (with optional unit) + lengthValueRule = eps [ _val = AST::LengthValue() ] >> + ( + double_[ _val += _1 ] >> + length_token[ _val += _1 ] + ) + | + ( + double_[ _val += _1 ] + ) + ; + + //grammar for a vector/point (with optional units, and optionally in brackets '(') + vectorValueRule = eps[ _val = AST::VectorValue() ] >> + ( + lengthValueRule[ _val += _1 ] >> + qi::repeat(0,2)[( ',' >> lengthValueRule[ _val += _1 ] )] + ) + | + ( + qi::lit('(') >> + lengthValueRule[ _val += _1 ] >> + qi::repeat(0,2)[( ',' >> lengthValueRule[ _val += _1 ] )] >> + qi::lit(')') + ) + ; + + //grammar for an individual name assigned to name values + idNameRule %= name_token >> nameValuesRule; + + //grammer for an individual numbers assigned to number values + idNumberRule = eps [ _val = AST::IDNumber() ] >> + ( + number_token[ _val += _1 ] >> + rangeValuesRule[ _val += _1 ] + ) + ; + + //grammar for selecting by chemical element + idElementRule %= qi::lit("element") >> ( element_token % qi::lit(",") ); + + //allow searching by molecular property + propertyRule = eps [ _val = AST::IDProperty() ] >> + ( + qi::lit("property")[ _val /= 1 ] >> + stringRule[ _val += _1 ] >> + cmp_token[ _val += _1 ] >> + stringRule[ _val *= _1 ] + ) + | + ( + qi::lit("property")[ _val /= 1 ] >> + stringRule[ _val += _1 ] + ) + | + ( + obj_token[ _val += _1 ] >> + qi::lit("property") >> + stringRule[ _val += _1 ] >> + cmp_token[ _val += _1 ] >> + stringRule[ _val *= _1 ] + ) + | + ( + obj_token[ _val += _1 ] >> + qi::lit("property") >> + stringRule[ _val += _1 ] + ) + ; + + //allow looking for bonds + bondRule %= (qi::lit("bonds") >> bond_token >> expressionRule + >> bond_token >> expressionRule) | + (qi::lit("bonds") >> bond_token >> expressionRule); + + //grammar for a "not" expression + notRule %= qi::lit("not") >> expressionRule; + + //grammar for a "join" expression + joinRule %= qi::lit("join") >> expressionRule; + + //grammar for a "within" expression + withinRule %= obj_token >> qi::lit("within") >> lengthValueRule + >> qi::lit("of") >> expressionRule; + + //grammar for a "within" expression comparing with a vector position. + withinVectorRule %= obj_token >> qi::lit("within") >> lengthValueRule + >> qi::lit("of") >> vectorValueRule; + + //grammar to enable subscripting of an expression + subscriptRule %= qi::lit("{") >> expressionRule >> qi::lit("}") >> + qi::lit("[") >> rangeValueRule >> qi::lit("]"); + + //grammar for a "where" expression + whereRule %= obj_token >> qi::lit("where") >> coord_token >> + (whereWithinRule | whereCompareRule); + + //sub-grammar for a "where within" expression + whereWithinRule %= qi::lit("within") >> lengthValueRule >> qi::lit("of") + >> expressionRule; + + //sub-grammar for a "where comparison" expression + whereCompareRule %= cmp_token >> vectorValueRule; + + //grammar for a count expression e.g. count(atoms) < 5 + countRule = eps [ _val = AST::IDCount() ] >> + ( + qi::lit("count(") >> + expressionRule[ _val += _1 ] >> + qi::lit(")") >> + cmp_token[ _val += _1 ] >> + qi::int_[ _val += _1 ] + ) + ; + + ///// + ///// name all of the rules to simplify error messages + ///// + nodeRule.name( "Node" ); + idNameRule.name( "Name" ); + idNumberRule.name( "Number" ); + idElementRule.name( "Element" ); + binaryRule.name( "Binary" ); + binaryRule2.name( "Binary2" ); + withRule.name( "With" ); + withRule2.name( "With2" ); + withinRule.name( "Within" ); + withinVectorRule.name( "Within Vector" ); + notRule.name( "Not" ); + joinRule.name( "Join" ); + subscriptRule.name( "Subscript" ); + whereRule.name( "Where" ); + whereWithinRule.name( "Where Within" ); + whereCompareRule.name( "Where Compare" ); + countRule.name( "Count Rule" ); + expressionsRule.name( "Expressions" ); + expressionRule.name( "Expression" ); + expressionPartRule.name( "Expression Part" ); + nameValuesRule.name( "Name Values" ); + nameValueRule.name( "Name Value" ); + rangeValuesRule.name( "Range Values" ); + compareValueRule.name( "Compare Value" ); + rangeValueRule.name( "Range Value" ); + lengthValueRule.name( "Length Value" ); + vectorValueRule.name( "Vector Value" ); + massValueRule.name( "Mass Value" ); + chargeValueRule.name( "Charge Value" ); + massRule.name( "Mass Rule" ); + massCmpRule.name( "Mass Compare Rule" ); + massObjRule.name( "Mass Object Rule" ); + massObjCmpRule.name( "Mass Object Compare Rule" ); + chargeRule.name( "Charge Rule" ); + chargeCmpRule.name( "Charge Compare Rule" ); + chargeObjRule.name( "Charge Object Rule" ); + chargeObjCmpRule.name( "Charge Object Compare Rule" ); + stringRule.name( "String" ); + regExpRule.name( "RegExp" ); + bondRule.name( "Bond" ); + propertyRule.name( "Property" ); + + //action on failure to parse the string using the grammar + on_error + ( + nodeRule + , std::cout + << val("Error! Expecting ") + << _4 // what failed? + << val(" here: \"") + << construct(_3, _2) // iterators to error-pos, end + << val("\"") + << std::endl + ); + } + + qi::rule nodeRule; + qi::rule idNameRule; + qi::rule idNumberRule; + qi::rule idElementRule; + qi::rule binaryRule; + qi::rule binaryRule2; + qi::rule bondRule; + qi::rule propertyRule; + qi::rule withRule; + qi::rule withRule2; + qi::rule withinRule; + qi::rule withinVectorRule; + qi::rule notRule; + qi::rule joinRule; + qi::rule subscriptRule; + qi::rule massRule; + qi::rule massCmpRule; + qi::rule massObjRule; + qi::rule massObjCmpRule; + qi::rule chargeRule; + qi::rule chargeCmpRule; + qi::rule chargeObjRule; + qi::rule chargeObjCmpRule; + + qi::rule whereRule; + qi::rule whereWithinRule; + qi::rule whereCompareRule; + qi::rule countRule; + + qi::rule expressionsRule; + qi::rule expressionRule; + + qi::rule expressionPartRule; + + qi::rule nameValuesRule; + qi::rule nameValueRule; + + qi::rule rangeValuesRule; + qi::rule compareValueRule; + qi::rule rangeValueRule; + + qi::rule massValueRule; + qi::rule chargeValueRule; + + qi::rule lengthValueRule; + qi::rule vectorValueRule; + + qi::symbols name_token; + qi::symbols > number_token; + qi::symbols op_token; + qi::symbols obj_token; + qi::symbols with_token; + qi::symbols bond_token; + qi::symbols length_token; + qi::symbols mass_token; + qi::symbols charge_token; + qi::symbols cmp_token; + qi::symbols coord_token; + qi::symbols element_token; + qi::symbols all_token; + qi::symbols water_token; + qi::symbols pert_token; + qi::symbols protein_token; + UserTokens user_token; + + ValueGrammar stringRule; + qi::rule regExpRule; +}; + +#endif diff --git a/corelib/src/libs/SireSearch/helper_funcs.cpp b/corelib/src/libs/SireSearch/helper_funcs.cpp new file mode 100644 index 000000000..ea71336bc --- /dev/null +++ b/corelib/src/libs/SireSearch/helper_funcs.cpp @@ -0,0 +1,121 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "helper_funcs.h" + +#include "SireSearch/parser.h" + +#include "SireMol/core.h" + +#include + +struct ProtRes +{ + int min_res = 5; + QSet res_names = {"gly", "ala", "val", "leu", "ile", "ser", + "thr", "asp", "asn", "lys", "glu", "gln", + "arg", "his", "phe", "cys", "trp", "tyr", + "met", "pro", "ash", "glh", "cyx", "hid", + "hie", "hip"}; + QReadWriteLock lock; +}; + +Q_GLOBAL_STATIC(ProtRes, protres); + + +namespace SireSearch +{ + SIRESEARCH_EXPORT void install_search_parser() + { + SireSearch::parser::SearchParser::install(); + } + + SIRESEARCH_EXPORT int get_min_protein_residues() + { + auto p = protres(); + QReadLocker lkr(&(p->lock)); + return p->min_res; + } + + SIRESEARCH_EXPORT void set_min_protein_residues(int nres) + { + if (nres < 0) + nres = 0; + + auto p = protres(); + QWriteLocker lkr(&(p->lock)); + p->min_res = nres; + } + + SIRESEARCH_EXPORT QSet get_protein_residue_names() + { + auto p = protres(); + QReadLocker lkr(&(p->lock)); + return p->res_names; + } + + SIRESEARCH_EXPORT void set_protein_residue_names(const QSet &names) + { + // have to lower-case the names + QSet r; + + for (const auto &name : names) + { + r.insert(name.toLower()); + } + + auto p = protres(); + QWriteLocker lkr(&(p->lock)); + p->res_names = r; + } + + SIRESEARCH_EXPORT void set_token(const QString &token, const QString &search) + { + parser::SearchParser::globalParser().set_token(token, search); + } + + SIRESEARCH_EXPORT bool has_token(const QString &token) + { + return parser::SearchParser::globalParser().has_token(token); + } + + SIRESEARCH_EXPORT QString get_token(const QString &token) + { + return parser::SearchParser::globalParser().get_token(token); + } + + SIRESEARCH_EXPORT void delete_token(const QString &token) + { + parser::SearchParser::globalParser().delete_token(token); + } + + SIRESEARCH_EXPORT void delete_all_tokens() + { + parser::SearchParser::globalParser().delete_all_tokens(); + } +} diff --git a/corelib/src/libs/SireSearch/helper_funcs.h b/corelib/src/libs/SireSearch/helper_funcs.h new file mode 100644 index 000000000..aba441937 --- /dev/null +++ b/corelib/src/libs/SireSearch/helper_funcs.h @@ -0,0 +1,66 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2022 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIRESEARCH_HELPER_FUNCS +#define SIRESEARCH_HELPER_FUNCS + +#include "sireglobal.h" + +SIRE_BEGIN_HEADER + +namespace SireSearch +{ + SIRESEARCH_EXPORT void install_search_parser(); + + SIRESEARCH_EXPORT int get_min_protein_residues(); + SIRESEARCH_EXPORT void set_min_protein_residues(int nres); + + SIRESEARCH_EXPORT QSet get_protein_residue_names(); + SIRESEARCH_EXPORT void set_protein_residue_names(const QSet &names); + + SIRESEARCH_EXPORT void set_token(const QString &token, const QString &search); + SIRESEARCH_EXPORT bool has_token(const QString &token); + SIRESEARCH_EXPORT QString get_token(const QString &token); + SIRESEARCH_EXPORT void delete_token(const QString &token); + SIRESEARCH_EXPORT void delete_all_tokens(); +} + +SIRE_EXPOSE_FUNCTION( SireSearch::install_search_parser ) +SIRE_EXPOSE_FUNCTION( SireSearch::get_min_protein_residues ) +SIRE_EXPOSE_FUNCTION( SireSearch::set_min_protein_residues ) +SIRE_EXPOSE_FUNCTION( SireSearch::get_protein_residue_names ) +SIRE_EXPOSE_FUNCTION( SireSearch::set_protein_residue_names ) +SIRE_EXPOSE_FUNCTION( SireSearch::set_token ) +SIRE_EXPOSE_FUNCTION( SireSearch::has_token ) +SIRE_EXPOSE_FUNCTION( SireSearch::get_token ) +SIRE_EXPOSE_FUNCTION( SireSearch::delete_token ) +SIRE_EXPOSE_FUNCTION( SireSearch::delete_all_tokens ) + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireSearch/idengine.cpp b/corelib/src/libs/SireSearch/idengine.cpp new file mode 100644 index 000000000..d4141af22 --- /dev/null +++ b/corelib/src/libs/SireSearch/idengine.cpp @@ -0,0 +1,3385 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2018 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "idengine.h" +#include "approx_equal.h" + +#include "SireBase/parallel.h" +#include "SireBase/booleanproperty.h" + +#include "SireMol/atomelements.h" +#include "SireMol/core.h" + +#include "SireMM/selectorbond.h" + +#include "SireVol/space.h" +#include "SireVol/cartesian.h" + +#include "SireSearch/helper_funcs.h" + +#include "tostring.h" + +#include + +using namespace SireSearch; +using namespace SireMol; +using namespace SireMM; +using namespace SireBase; +using namespace parser_idengine; + +SelectEngine::ObjType _to_obj_type(AST::IDObject obj) +{ + switch(obj) + { + case AST::ATOM: + return SelectEngine::ATOM; + case AST::CUTGROUP: + return SelectEngine::CUTGROUP; + case AST::RESIDUE: + return SelectEngine::RESIDUE; + case AST::CHAIN: + return SelectEngine::CHAIN; + case AST::SEGMENT: + return SelectEngine::SEGMENT; + case AST::MOLECULE: + return SelectEngine::MOLECULE; + case AST::BOND: + return SelectEngine::BOND; + default: + return SelectEngine::COMPLEX; + } +} + +MolViewPtr _expand(const MoleculeView &mol, SelectEngine::ObjType typ, + const PropertyMap &map) +{ + switch(typ) + { + case SelectEngine::ATOM: + if (mol.isA< Selector >()) + return mol; + else + return mol.atoms(); + case SelectEngine::CUTGROUP: + if (mol.isA< Selector >()) + return mol; + else + return mol.cutGroups(); + case SelectEngine::RESIDUE: + if (mol.isA< Selector >()) + return mol; + else + return mol.residues(); + case SelectEngine::CHAIN: + if (mol.isA< Selector >()) + return mol; + else + return mol.chains(); + case SelectEngine::SEGMENT: + if (mol.isA< Selector >()) + return mol; + else + return mol.segments(); + case SelectEngine::BOND: + if (mol.isA()) + return mol; + else + return SelectorBond(mol, map); + case SelectEngine::MOLECULE: + return mol.molecule(); + default: + return mol.atoms(); + } +} + +MolViewPtr _invert(const MoleculeView &mol, SelectEngine::ObjType typ, + const PropertyMap &map) +{ + switch(typ) + { + case SelectEngine::ATOM: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert(); + else + return mol.atoms().invert(); + case SelectEngine::CUTGROUP: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert(); + else + return mol.cutGroups().invert(); + case SelectEngine::RESIDUE: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert(); + else + return mol.residues().invert(); + case SelectEngine::CHAIN: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert(); + else + return mol.chains().invert(); + case SelectEngine::SEGMENT: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert(); + else + return mol.segments().invert(); + case SelectEngine::BOND: + if (mol.isA()) + return mol.asA().invert(map); + else + return SelectorBond(mol, map).invert(map); + default: + return mol.atoms().invert(); + } +} + +MolViewPtr _invert_and_intersect(const MoleculeView &mol, SelectEngine::ObjType typ, + const MoleculeView &view, const PropertyMap &map) +{ + auto s = _expand(view, typ, map); + + switch(typ) + { + case SelectEngine::ATOM: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert().intersection(s->asA< Selector >()); + else + return mol.atoms().invert().intersection(s->asA< Selector >()); + case SelectEngine::CUTGROUP: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert().intersection(s->asA< Selector >()); + else + return mol.atoms().invert().intersection(s->asA< Selector >()); + case SelectEngine::RESIDUE: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert().intersection(s->asA< Selector >()); + else + return mol.atoms().invert().intersection(s->asA< Selector >()); + case SelectEngine::CHAIN: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert().intersection(s->asA< Selector >()); + else + return mol.atoms().invert().intersection(s->asA< Selector >()); + case SelectEngine::SEGMENT: + if (mol.isA< Selector >()) + return mol.asA< Selector >().invert().intersection(s->asA< Selector >()); + else + return mol.atoms().invert().intersection(s->asA< Selector >()); + case SelectEngine::BOND: + if (mol.isA()) + return mol.asA().invert(map).intersection(s->asA()); + else + return SelectorBond(mol, map).invert(map).intersection(s->asA()); + default: + return mol.atoms().invert().intersection(s->asA< Selector >()); + } +} + +MolViewPtr _intersection(const MoleculeView &mol0, const MoleculeView &mol1, + SelectEngine::ObjType obj, const PropertyMap &map) +{ + auto s0 = _expand(mol0, obj, map); + auto s1 = _expand(mol1, obj, map); + + switch(obj) + { + case SelectEngine::ATOM: + return s0->asA< Selector >().intersection(s1->asA< Selector >()); + case SelectEngine::CUTGROUP: + return s0->asA< Selector >().intersection(s1->asA< Selector >()); + case SelectEngine::RESIDUE: + return s0->asA< Selector >().intersection(s1->asA< Selector >()); + case SelectEngine::CHAIN: + return s0->asA< Selector >().intersection(s1->asA< Selector >()); + case SelectEngine::SEGMENT: + return s0->asA< Selector >().intersection(s1->asA< Selector >()); + case SelectEngine::BOND: + return s0->asA< SelectorBond >().intersection(s1->asA< SelectorBond >()); + default: + return s0->molecule(); + } +} + +MolViewPtr _unite(const MoleculeView &mol0, const MoleculeView &mol1, + SelectEngine::ObjType obj, const PropertyMap &map) +{ + auto s0 = _expand(mol0, obj, map); + auto s1 = _expand(mol1, obj, map); + + switch(obj) + { + case SelectEngine::ATOM: + return s0->asA< Selector >().add(s1->asA< Selector >()); + case SelectEngine::CUTGROUP: + return s0->asA< Selector >().add(s1->asA< Selector >()); + case SelectEngine::RESIDUE: + return s0->asA< Selector >().add(s1->asA< Selector >()); + case SelectEngine::CHAIN: + return s0->asA< Selector >().add(s1->asA< Selector >()); + case SelectEngine::SEGMENT: + return s0->asA< Selector >().add(s1->asA< Selector >()); + case SelectEngine::BOND: + return s0->asA< SelectorBond >().add(s1->asA< SelectorBond >()); + default: + return s0->molecule(); + } +} + +//////// +//////// Implementation of the IDNameEngine +//////// + +IDNameEngine::IDNameEngine() : SelectEngine() +{} + +// backport of Qt5 wildcardToRegularExpression +QString _wildcardToRegularExpression(const QString &pattern) +{ + const int wclen = pattern.length(); + QString rx; + rx.reserve(wclen + wclen / 16); + int i = 0; + const QChar *wc = pattern.unicode(); + +#ifdef Q_OS_WIN + const QLatin1Char nativePathSeparator('\\'); + const QLatin1String starEscape("[^/\\\\]*"); + const QLatin1String questionMarkEscape("[^/\\\\]"); +#else + const QLatin1Char nativePathSeparator('/'); + const QLatin1String starEscape("[^/]*"); + const QLatin1String questionMarkEscape("[^/]"); +#endif + + while (i < wclen) { + const QChar c = wc[i++]; + switch (c.unicode()) { + case '*': + rx += starEscape; + break; + case '?': + rx += questionMarkEscape; + break; + case '\\': +#ifdef Q_OS_WIN + case '/': + rx += QLatin1String("[/\\\\]"); + break; +#endif + case '$': + case '(': + case ')': + case '+': + case '.': + case '^': + case '{': + case '|': + case '}': + rx += QLatin1Char('\\'); + rx += c; + break; + case '[': + rx += c; + // Support for the [!abc] or [!a-c] syntax + if (i < wclen) { + if (wc[i] == QLatin1Char('!')) { + rx += QLatin1Char('^'); + ++i; + } + + if (i < wclen && wc[i] == QLatin1Char(']')) + rx += wc[i++]; + + while (i < wclen && wc[i] != QLatin1Char(']')) { + // The '/' appearing in a character class invalidates the + // regular expression parsing. It also concerns '\\' on + // Windows OS types. + if (wc[i] == QLatin1Char('/') || wc[i] == nativePathSeparator) + return rx; + if (wc[i] == QLatin1Char('\\')) + rx += QLatin1Char('\\'); + rx += wc[i++]; + } + } + break; + default: + rx += c; + break; + } + } + + return QRegularExpression::anchoredPattern(rx); +} + +QString IDNameEngine::toString() const +{ + if (names.count() > 0) + return QObject::tr("IDNameEngine(%1 from %2)") + .arg(idobject_to_string(obj)) + .arg(names.join(", ")); + else if (regexps.count() > 0) + return QObject::tr("IDNameEngine(%1 from %2)") + .arg(idobject_to_string(obj)) + .arg("regexps"); + else + return QObject::tr("IDNameEngine(%1 from *)") + .arg(idobject_to_string(obj)); +} + +SelectEnginePtr IDNameEngine::construct(IDObject o, NameValues vals) +{ + IDNameEngine *ptr = new IDNameEngine(); + ptr->obj = o; + + try + { + for (const auto &val : vals) + { + if (val.value.which() == 0) + { + RegExpValue v = boost::get(val.value); + QString r = QString::fromStdString(v.value); + + QRegularExpression regexp; + + if (v.is_case_sensitive) + regexp = QRegularExpression(_wildcardToRegularExpression(r)); + else + regexp = QRegularExpression(_wildcardToRegularExpression(r), + QRegularExpression::CaseInsensitiveOption); + + if (not regexp.isValid()) + { + throw SireMol::parse_error( QObject::tr("Failed to interpret the " + "regular expression '%1' (escaped version is '%2'). Error is '%3'") + .arg( QString::fromStdString(v.value) ) + .arg(r) + .arg(regexp.errorString()), CODELOC ); + } + + //optimise (JIT-compile) the regular expression now as it will + //be used a lot + #if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0) + regexp.optimize(); // introduced in Qt 5.4 + #endif + + ptr->regexps.append(regexp); + } + else if (val.value.which() == 1) + ptr->names.append( QString::fromStdString(boost::get(val.value)) ); + } + } + catch(...) + { + delete ptr; + throw; + } + + return makePtr(ptr); +} + +IDNameEngine::~IDNameEngine() +{} + +/** Internal function used to see if the passed string matches */ +bool IDNameEngine::match(const QString &val) const +{ + //try all of the fixed names + for (const auto &name : names) + { + if (name == val) + { + //name matches exactly + return true; + } + } + + //now try all of the regexps + for (const auto ®exp : regexps) + { + auto match = regexp.match(val); + + if (match.hasMatch()) + { + //we have a regexp match. Make sure we have matched the + //entire string + return match.captured(0).length() == val.length(); + } + } + + return false; +} + +template +Selector get_views(const MolViewPtr &mol); + +template<> +Selector get_views(const MolViewPtr &mol) +{ + return mol->atoms(); +} + +template<> +Selector get_views(const MolViewPtr &mol) +{ + return mol->residues(); +} + +template<> +Selector get_views(const MolViewPtr &mol) +{ + return mol->chains(); +} + +template<> +Selector get_views(const MolViewPtr &mol) +{ + return mol->cutGroups(); +} + +template<> +Selector get_views(const MolViewPtr &mol) +{ + return mol->segments(); +} + +template +SelectResult IDNameEngine::searchName(const SelectResult &mols, + bool uses_parallel) const +{ + QList< Selector > matches; + + if (this->names.count() == 1 and this->regexps.isEmpty()) + { + //this is a simple name match + const auto id = typename T::Name(this->names.at(0)); + + for (const auto &mol : mols) + { + auto idxs = mol->data().info().mapNoThrow(id); + + if (not idxs.isEmpty()) + { + if (mol->selectedAll()) + matches.append(Selector(mol->data(), idxs)); + else + { + // need to filter out all of the non-matching idxs + auto s = mol->selection(); + + QList selected_idxs; + + for (const auto &idx : idxs) + { + if (s.selected(idx)) + selected_idxs.append(idx); + } + + if (not selected_idxs.isEmpty()) + matches.append(Selector(mol->data(), selected_idxs)); + } + } + } + + return SelectResult(matches); + } + + for (const auto &mol : mols) + { + QList idxs; + + auto views = get_views(mol); + + if (views.nViews() == 0) + continue; + + const auto n = views.names(); + + for (qint64 i=0; i matches; + + for (const auto &mol : mols) + { + const auto molname = mol->data().name().value(); + + if (match(molname)) + { + matches.append(mol->molecule()); + } + }; + + return SelectResult(matches); +} + +SelectResult IDNameEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + bool use_parallel = true; + + if (map["parallel"].hasValue()) + { + use_parallel = map["parallel"].value().asA().value(); + } + + switch(obj) + { + case AST::ATOM: + return searchName(mols, use_parallel); + case AST::CUTGROUP: + return searchName(mols, use_parallel); + case AST::RESIDUE: + return searchName(mols, use_parallel); + case AST::CHAIN: + return searchName(mols, use_parallel); + case AST::SEGMENT: + return searchName(mols, use_parallel); + case AST::MOLECULE: + return searchMolName(mols, use_parallel); + default: + return SelectResult(); + } +} + +SelectEngine::ObjType IDNameEngine::objectType() const +{ + return _to_obj_type(obj); +} + +//////// +//////// Implementation of the IDNumberEngine +//////// + +/** Internal function used to see if the passed integer matches any of the + range values */ +bool IDNumberEngine::match(const int idx) const +{ + for (const auto &val : vals) + { + if (val.which() == 0) + { + auto v = boost::get(val); + + auto slice = v.toSlice(); + + for (auto it = slice.begin(std::numeric_limits::max()); + not it.atEnd(); it.next()) + { + if (it.value() == idx) + return true; + } + } + else + { + auto v = boost::get(val); + + switch(v.compare) + { + case ID_CMP_LT: + if (idx < v.value) + return true; + break; + case ID_CMP_LE: + if (idx <= v.value) + return true; + break; + case ID_CMP_AE: + if (approx_equal(idx, v.value)) + return true; + break; + case ID_CMP_EQ: + if (idx == v.value) + return true; + break; + case ID_CMP_NE: + if (idx != v.value) + return true; + break; + case ID_CMP_GE: + if (idx >= v.value) + return true; + break; + case ID_CMP_GT: + if (idx > v.value) + return true; + break; + default: + return false; + } + } + } + + return false; +} + +bool _is_single_value(const RangeValues &vals) +{ + if (vals.size() == 1) + { + if (vals[0].which() == 0) + { + auto v = boost::get(vals[0]); + + auto slice = v.toSlice(); + + auto it = slice.begin(std::numeric_limits::max()); + it.next(); + + if (it.atEnd()) + return true; + } + } + + return false; +} + +int _to_single_value(const RangeValues &vals) +{ + if (vals.size() == 1) + { + if (vals[0].which() == 0) + { + auto v = boost::get(vals[0]); + + auto slice = v.toSlice(); + + auto it = slice.begin(std::numeric_limits::max()); + + int first = it.value(); + it.next(); + + if (it.atEnd()) + return first; + } + } + + return 0; +} + +template +SelectResult IDNumberEngine::searchNum(const SelectResult &mols, + bool uses_parallel) const +{ + QList< Selector > matches; + + if (_is_single_value(this->vals)) + { + //this is a simple name match + const auto id = typename T::Number(_to_single_value(this->vals)); + + for (const auto &mol : mols) + { + auto idxs = mol->data().info().mapNoThrow(id); + + if (not idxs.isEmpty()) + { + if (mol->selectedAll()) + matches.append(Selector(mol->data(), idxs)); + else + { + // need to filter out all of the non-matching idxs + auto s = mol->selection(); + + QList selected_idxs; + + for (const auto &idx : idxs) + { + if (s.selected(idx)) + selected_idxs.append(idx); + } + + if (not selected_idxs.isEmpty()) + matches.append(Selector(mol->data(), selected_idxs)); + } + } + } + + return SelectResult(matches); + } + + for (const auto &mol : mols) + { + QList idxs; + + auto views = get_views(mol); + + if (views.nViews() == 0) + continue; + + const auto numbers = views.numbers(); + + for (qint64 i=0; imatch(viewnum)) + { + idxs.append(i); + } + } + + if (idxs.count() == views.nViews()) + { + if (idxs.count() == 1) + matches.append(views(0)); + else + matches.append(views); + } + else if (idxs.count() == 1) + { + matches.append(views(idxs.at(0))); + } + else if (not idxs.isEmpty()) + { + matches.append(views(idxs)); + } + } + + return SelectResult(matches); +} + +SelectResult IDNumberEngine::searchMolNum(const SelectResult &mols, + bool uses_parallel) const +{ + QList matches; + + for (const auto &mol : mols) + { + const auto molnum = mol->data().number().value(); + + if (this->match(molnum)) + matches.append(mol->molecule()); + }; + + return SelectResult(matches); +} + +IDNumberEngine::IDNumberEngine() +{} + +SelectEnginePtr IDNumberEngine::construct( IDObject o, RangeValues v ) +{ + IDNumberEngine *ptr = new IDNumberEngine(); + ptr->obj = o; + ptr->vals = v; + + return makePtr(ptr); +} + +IDNumberEngine::~IDNumberEngine() +{} + +SelectResult IDNumberEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + bool use_parallel = true; + + if (map["parallel"].hasValue()) + { + use_parallel = map["parallel"].value().asA().value(); + } + + switch(obj) + { + case AST::ATOM: + return searchNum(mols, use_parallel); + case AST::RESIDUE: + return searchNum(mols, use_parallel); + case AST::CHAIN: + return searchNum(mols, use_parallel); + case AST::CUTGROUP: + return searchNum(mols, use_parallel); + case AST::SEGMENT: + return searchNum(mols, use_parallel); + case AST::MOLECULE: + return searchMolNum(mols, use_parallel); + default: + return SelectResult(); + } +} + +SelectEngine::ObjType IDNumberEngine::objectType() const +{ + return _to_obj_type(obj); +} + +//////// +//////// Implementation of the IDIndexEngine +//////// + +static int map(int idx, int n) +{ + if (idx >= 0) + return qMin(idx, n-1); + else + return n - qMin(abs(idx), n); +} + +/** Internal function used to see if the passed integer matches any of the + range values */ +bool IDIndexEngine::match(int idx, const int count) const +{ + idx = map(idx, count); + + for (const auto &val : vals) + { + if (val.which() == 0) + { + auto v = boost::get(val); + + auto slice = v.toSlice(); + + for (auto it = slice.begin(count, true); not it.atEnd(); it.next()) + { + if (idx == it.value()) + return true; + } + } + else + { + auto v = boost::get(val); + + int value = map(v.value,count); + + if (value < count and value >= 0) + { + switch(v.compare) + { + case ID_CMP_LT: + if (idx < value) + return true; + break; + case ID_CMP_LE: + if (idx <= value) + return true; + break; + case ID_CMP_EQ: + if (idx == value) + return true; + break; + case ID_CMP_AE: + if (approx_equal(idx, value)) + return true; + break; + case ID_CMP_NE: + if (idx != value) + return true; + break; + case ID_CMP_GE: + if (idx >= value) + return true; + break; + case ID_CMP_GT: + if (idx > value) + return true; + break; + default: + return false; + } + } + } + } + + return false; +} + +template +SelectResult IDIndexEngine::searchIdx(const SelectResult &mols, + bool uses_parallel) const +{ + QList< Selector > matches; + + if (_is_single_value(this->vals)) + { + //this is a simple name match + const auto id = typename T::Index(_to_single_value(this->vals)); + + for (const auto &mol : mols) + { + auto idxs = mol->data().info().mapNoThrow(id); + + if (not idxs.isEmpty()) + { + if (mol->selectedAll()) + matches.append(Selector(mol->data(), idxs)); + else + { + // need to filter out all of the non-matching idxs + auto s = mol->selection(); + + QList selected_idxs; + + for (const auto &idx : idxs) + { + if (s.selected(idx)) + selected_idxs.append(idx); + } + + if (not selected_idxs.isEmpty()) + matches.append(Selector(mol->data(), selected_idxs)); + } + } + } + + return SelectResult(matches); + } + + for (const auto &mol : mols) + { + QList idxs; + + auto views = get_views(mol); + + const int count = views.nViews(); + + if (views.nViews() == 0) + continue; + + for (qint64 i=0; imatch(i, count)) + { + idxs.append(i); + } + } + + if (idxs.count() == views.nViews()) + { + if (idxs.count() == 1) + matches.append(views(0)); + else + matches.append(views); + } + else if (idxs.count() == 1) + { + matches.append(views(idxs.at(0))); + } + else if (not idxs.isEmpty()) + { + matches.append(views(idxs)); + } + } + + return SelectResult(matches); +} + +SelectResult IDIndexEngine::searchMolIdx(const SelectResult &mols, + const SelectResult &context, + bool uses_parallel) const +{ + QList matches; + + int idx = 0; + int count = context.listCount(); + + for (const auto &mol : context) + { + if (this->match(idx, count)) + { + // we have found the molecule in the context - need to see how + // much of this molecule remains in 'mols' + if (&mols == &context) + { + // parent search + matches.append(mol->molecule()); + } + else + { + // child search - need to see if this molecule is still + // in the child + const auto molnum = mol->data().number(); + + for (const auto &m : mols) + { + if (m->data().number() == molnum) + { + // assume we are talking about this molecule + matches.append(m->molecule()); + break; + } + } + } + } + + idx += 1; + }; + + return SelectResult(matches); +} + +IDIndexEngine::IDIndexEngine() +{} + +SelectEnginePtr IDIndexEngine::construct( IDObject o, RangeValues v ) +{ + IDIndexEngine *ptr = new IDIndexEngine(); + ptr->obj = o; + ptr->vals = v; + + return makePtr(ptr); +} + +IDIndexEngine::~IDIndexEngine() +{} + +SelectResult IDIndexEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + SelectResult::Container result; + + bool use_parallel = true; + + if (map["parallel"].hasValue()) + { + use_parallel = map["parallel"].value().asA().value(); + } + + switch(obj) + { + case AST::ATOM: + return searchIdx(mols, use_parallel); + case AST::CUTGROUP: + return searchIdx(mols, use_parallel); + case AST::RESIDUE: + return searchIdx(mols, use_parallel); + case AST::CHAIN: + return searchIdx(mols, use_parallel); + case AST::SEGMENT: + return searchIdx(mols, use_parallel); + case AST::MOLECULE: + { + if (this->hasParent()) + { + auto context = map["_context"].value().asA(); + return searchMolIdx(mols, context, use_parallel); + } + else + { + return searchMolIdx(mols, mols, use_parallel); + } + } + default: + return SelectResult(); + } +} + +SelectEngine::ObjType IDIndexEngine::objectType() const +{ + return _to_obj_type(obj); +} + +//////// +//////// Implementation of the IDAndEngine +//////// + +IDAndEngine::IDAndEngine() +{} + +SelectEnginePtr IDAndEngine::construct(SelectEnginePtr p0, SelectEnginePtr p1) +{ + IDAndEngine *ptr = new IDAndEngine(); + + auto p = makePtr(ptr); + + if (p0) + p0->setParent(p); + + if (p1) + p1->setParent(p); + + ptr->part0 = p0; + ptr->part1 = p1; + + return p; +} + +IDAndEngine::~IDAndEngine() +{} + +SelectResult IDAndEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + if (part0.get() == 0 and part1.get() == 0) + return SelectResult(); + else if (part0.get() == 0) + return part1->operator()(mols, map); + else if (part1.get() == 0) + return part0->operator()(mols, map); + + // need to get the object type - this is the smallest of the two parts + auto obj = qMin(part0->objectType(), part1->objectType()); + + // perform the search from left to right, so search the left hand side first... + QList left = part0->operator()(mols, map).toList(); + + QHash molnum_to_idx; + QList ordered_molnums; + molnum_to_idx.reserve(left.count()); + + for (int i=0; idata().number(); + + if (molnum_to_idx.contains(molnum)) + { + auto idx = molnum_to_idx[molnum]; + left[i] = _intersection(*(left[idx]), *(left[i]), obj, map); + } + else + { + molnum_to_idx[molnum] = i; + ordered_molnums.append(molnum); + } + } + + // now perform the right hand side on the result of the left hand side + QSet seen; + + for (const auto &mol : part1->operator()(mols, map)) + { + auto molnum = mol->data().number(); + + if (molnum_to_idx.contains(molnum)) + { + auto idx = molnum_to_idx[molnum]; + + if (not left[idx]->isEmpty()) + left[idx] = _intersection(*(left[idx]), *mol, obj, map); + + if (not (seen.contains(molnum) or left[idx]->isEmpty())) + { + seen.insert(molnum); + } + } + } + + QList result; + + for (const auto &molnum : ordered_molnums) + { + if (seen.contains(molnum)) + { + auto idx = molnum_to_idx[molnum]; + + if (not left[idx]->isEmpty()) + result.append(left[idx]); + } + } + + return SelectResult(result); +} + +SelectEnginePtr IDAndEngine::simplify() +{ + if (part0.get()) + part0 = part0->simplify(); + + if (part1.get()) + part1 = part1->simplify(); + + if (part0.get() == 0) + return part1; + else if (part1.get() == 0) + return part0; + else + return selfptr.lock(); +} + +SelectEngine::ObjType IDAndEngine::objectType() const +{ + if (part0.get() and part1.get()) + { + auto o0 = part0->objectType(); + auto o1 = part1->objectType(); + + if (o0 == o1) + return o0; + else + { + //the object type is always the smallest, e.g. atom and residue == atom + return qMin(o0,o1); + } + } + else if (part0.get()) + { + return part0->objectType(); + } + else if (part1.get()) + { + return part1->objectType(); + } + else + return SelectEngine::COMPLEX; +} + +//////// +//////// Implementation of the IDOrEngine +//////// + +IDOrEngine::IDOrEngine() +{} + +SelectEnginePtr IDOrEngine::construct(SelectEnginePtr part0, SelectEnginePtr part1) +{ + IDOrEngine *ptr = new IDOrEngine(); + + auto p = makePtr(ptr); + + if (part0) + part0->setParent(p); + + if (part1) + part1->setParent(p); + + ptr->parts.append(part0); + ptr->parts.append(part1); + + return p; +} + +SelectEnginePtr IDOrEngine::construct(QList parts) +{ + IDOrEngine *ptr = new IDOrEngine(); + + auto p = makePtr(ptr); + + for (auto &part : parts) + { + if (part) + part->setParent(p); + } + + ptr->parts = parts; + + return p; +} + +IDOrEngine::~IDOrEngine() +{} + +SelectResult IDOrEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + if (parts.isEmpty()) + return SelectResult(); + else if (parts.count() == 1) + return parts[0]->operator()(mols, map); + + QList result; + + QHash molnum_to_idx; + + ObjType obj = parts[0]->objectType(); + + for (const auto &mol : parts[0]->operator()(mols, map)) + { + auto molnum = mol->data().number(); + + if (molnum_to_idx.contains(molnum)) + { + int idx = molnum_to_idx[molnum]; + result[idx] = _unite(*(result[idx]), *mol, obj, map); + } + else + { + molnum_to_idx[molnum] = result.count(); + result.append(mol); + } + } + + for (int i=1; iobjectType()); + + for (const auto &mol : parts[i]->operator()(mols, map)) + { + auto molnum = mol->data().number(); + + if (molnum_to_idx.contains(molnum)) + { + int idx = molnum_to_idx[molnum]; + result[idx] = _unite(*(result[idx]), *mol, obj, map); + } + else + { + molnum_to_idx[molnum] = result.count(); + result.append(mol); + } + } + } + + return SelectResult(result); +} + +SelectEnginePtr IDOrEngine::simplify() +{ + for (auto &part : parts) + { + part = part->simplify(); + } + + return selfptr.lock(); +} + +SelectEngine::ObjType IDOrEngine::objectType() const +{ + bool set = false; + auto o = SelectEngine::COMPLEX; + + for (auto part : parts) + { + if (part.get()) + { + if (not set) + { + o = part->objectType(); + set = true; + } + else if (o != part->objectType()) + { + //the object type is always the smallest, e.g. atom or residue == atom + o = qMin(o, part->objectType()); + } + } + } + + return o; +} + +//////// +//////// Implementation of the IDNotEngine +//////// + +IDNotEngine::IDNotEngine() +{} + +SelectEnginePtr IDNotEngine::construct(SelectEnginePtr part) +{ + IDNotEngine *ptr = new IDNotEngine(); + auto p = makePtr(ptr); + + if (part) + part->setParent(p); + + ptr->part = part; + + return p; +} + +IDNotEngine::~IDNotEngine() +{} + +SelectResult IDNotEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + if (not part.get()) + return SelectResult(); + + QList result; + + // first, make the selection + auto selected = part->operator()(mols, map).toList(); + + // now index the selection by molecule number + QHash molnum_to_idx; + molnum_to_idx.reserve(selected.count()); + + for (int i=0; idata().number(); + + if (molnum_to_idx.contains(molnum)) + { + selected[molnum_to_idx[molnum]] = + MolViewPtr( + PartialMolecule(selected[i]->data(), + selected[molnum_to_idx[molnum]]->selection() + + selected[i]->selection()) ); + } + else + { + molnum_to_idx.insert(molnum, i); + } + } + + auto typ = part->objectType(); + + // now go through the views and see if they have made it into the + // selection + for (const auto &mol : mols) + { + const auto molnum = mol->data().number(); + + if (molnum_to_idx.contains(molnum)) + { + auto s = selected[molnum_to_idx[molnum]]; + + if (not s->selectedAll()) + { + if (mol->selectedAll()) + { + result.append(_invert(*s, typ, map)); + } + else + { + result.append(_invert_and_intersect(*s, typ, *mol, map)); + } + } + } + else + { + // this wasn't selected, so need to add the whole view + result.append(_expand(*mol, typ, map)); + } + } + + return SelectResult(result); +} + +SelectEnginePtr IDNotEngine::simplify() +{ + if (part.get()) + part = part->simplify(); + + return selfptr.lock(); +} + +SelectEngine::ObjType IDNotEngine::objectType() const +{ + if (part) + return part->objectType(); + else + return SelectEngine::COMPLEX; +} + +//////// +//////// Implementation of the IDJoinEngine +//////// + +IDJoinEngine::IDJoinEngine() +{} + +SelectEnginePtr IDJoinEngine::construct(SelectEnginePtr part) +{ + IDJoinEngine *ptr = new IDJoinEngine(); + auto p = makePtr(ptr); + + if (part) + part->setParent(p); + + ptr->part = part; + + return p; +} + +IDJoinEngine::~IDJoinEngine() +{} + +SelectResult IDJoinEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + if (not part.get()) + return SelectResult(); + + //first, select the parts... + auto selected = part->operator()(mols, map); + + QList result; + result.reserve(selected.count()); + + for (const auto &mol : selected) + { + result.append( PartialMolecule(*mol).toUnit() ); + } + + return SelectResult(result); +} + +SelectEnginePtr IDJoinEngine::simplify() +{ + if (part.get()) + part = part->simplify(); + + return selfptr.lock(); +} + +SelectEngine::ObjType IDJoinEngine::objectType() const +{ + return SelectEngine::COMPLEX; +} + +//////// +//////// Implementation of the IDSubScriptEngine +//////// + +IDSubScriptEngine::IDSubScriptEngine() +{} + +SelectEnginePtr IDSubScriptEngine::construct(SelectEnginePtr part, const RangeValue &val) +{ + IDSubScriptEngine *ptr = new IDSubScriptEngine(); + auto p = makePtr(ptr); + + if (part) + part->setParent(p); + + ptr->part = part; + ptr->val = val; + + return p; +} + +IDSubScriptEngine::~IDSubScriptEngine() +{} + +SelectResult IDSubScriptEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + if (not part.get()) + return SelectResult(); + + //first, select the parts... + QList all; + auto obj = part->objectType(); + + for (auto &mol : part->operator()(mols, map).toList()) + { + all += _expand(*mol, obj, map)->toList(); + } + + const int nviews = all.count(); + + auto addView = [](const MoleculeView &view, QList &result, + SelectEngine::ObjType obj, + const PropertyMap &map) + { + const int molnum = view.data().number(); + + for (int i=0; idata().number() == molnum) + { + result[i] = _unite(*(result[i]), view, obj, map); + return; + } + } + + result.append(view); + }; + + QList result; + + //now get the range of views to return + auto slice = val.toSlice(); + + for (auto it = slice.begin(nviews, true); not it.atEnd(); it.next()) + { + addView( *(all[it.value()]), result, obj, map ); + } + + return SelectResult(result); +} + +SelectEnginePtr IDSubScriptEngine::simplify() +{ + if (part.get()) + part = part->simplify(); + + return selfptr.lock(); +} + +SelectEngine::ObjType IDSubScriptEngine::objectType() const +{ + if (part) + return part->objectType(); + else + return SelectEngine::COMPLEX; +} + +//////// +//////// Implementation of the IDMass +//////// + +QString IDMass::toString() const +{ + return QObject::tr("%1") + .arg((value * units).toString()); +} + +SelectEnginePtr IDMass::toEngine() const +{ + IDCmpMass m; + m.compare = ID_CMP_AE; + m.value = *this; + + return m.toEngine(); +} + +QString IDCmpMass::toString() const +{ + return QObject::tr("mass %1 %2") + .arg(idcomparison_to_string(compare)) + .arg((value.value * value.units).toString()); +} + +SelectEnginePtr IDCmpMass::toEngine() const +{ + return IDMassEngine::construct(ATOM, compare, value.value * value.units); +} + +QString IDObjMass::toString() const +{ + return QObject::tr("%1 mass %2") + .arg(idobject_to_string(name)) + .arg((value.value * value.units).toString()); +} + +QString IDObjCmpMass::toString() const +{ + return QObject::tr("%1 mass %2 %3") + .arg(idobject_to_string(name)) + .arg(idcomparison_to_string(compare)) + .arg((value.value * value.units).toString()); +} + +SelectEnginePtr IDObjMass::toEngine() const +{ + IDObjCmpMass m; + m.name = name; + m.compare = ID_CMP_AE; + m.value = value; + + return m.toEngine(); +} + +SelectEnginePtr IDObjCmpMass::toEngine() const +{ + return IDMassEngine::construct(name, compare, value.value * value.units); +} + +//////// +//////// Implementation of the IDCharge +//////// + +QString IDCharge::toString() const +{ + return QObject::tr("IDCharge( %1 )") + .arg((value * units).toString()); +} + +SelectEnginePtr IDCharge::toEngine() const +{ + IDCmpCharge c; + c.compare = ID_CMP_AE; + c.value = *this; + + return c.toEngine(); +} + +QString IDCmpCharge::toString() const +{ + return QObject::tr("charge %1 %2") + .arg(idcomparison_to_string(compare)) + .arg((value.value * value.units).toString()); +} + +SelectEnginePtr IDCmpCharge::toEngine() const +{ + return IDChargeEngine::construct(ATOM, compare, value.value * value.units); +} + +QString IDObjCharge::toString() const +{ + return QObject::tr("%1 charge %2") + .arg(idobject_to_string(name)) + .arg((value.value * value.units).toString()); +} + +QString IDObjCmpCharge::toString() const +{ + return QObject::tr("%1 charge %2 %3") + .arg(idobject_to_string(name)) + .arg(idcomparison_to_string(compare)) + .arg((value.value * value.units).toString()); +} + +SelectEnginePtr IDObjCharge::toEngine() const +{ + IDObjCmpCharge c; + c.name = name; + c.compare = ID_CMP_AE; + c.value = value; + + return c.toEngine(); +} + +SelectEnginePtr IDObjCmpCharge::toEngine() const +{ + return IDChargeEngine::construct(name, compare, value.value * value.units); +} + +//////// +//////// Implementation of the IDMassEngine +//////// + +IDMassEngine::IDMassEngine() +{} + +SelectEngine::ObjType IDMassEngine::objectType() const +{ + return _to_obj_type(obj); +} + +SelectEnginePtr IDMassEngine::construct(IDObject obj, IDComparison compare, + SireUnits::Dimension::MolarMass value) +{ + IDMassEngine *ptr = new IDMassEngine(); + auto p = makePtr(ptr); + + ptr->obj = obj; + ptr->compare = compare; + ptr->value = value; + + return p; +} + +IDMassEngine::~IDMassEngine() +{} + +#include + +std::function _get_compare(IDComparison compare) +{ + switch(compare) + { + case ID_CMP_LT: + return std::less(); + case ID_CMP_LE: + return std::less_equal(); + case ID_CMP_EQ: + return std::equal_to(); + case ID_CMP_AE: + return SireSearch::approx_equal; + case ID_CMP_NE: + return std::not_equal_to(); + case ID_CMP_GE: + return std::greater_equal(); + case ID_CMP_GT: + return std::greater(); + default: + return std::equal_to(); + } +} + +template +SelectResult IDMassEngine::select_t(const SelectResult &mols, + const PropertyMap &map) const +{ + if (mols.count() == 0) + return SelectResult(); + + QList ret; + + auto compare_func = _get_compare(compare); + + for (const auto &mol : mols) + { + auto views = get_views(mol); + + if (views.isEmpty()) + continue; + + QList idxs; + + for (qint64 i=0; i 0) + { + if (idxs.count() == views.nViews()) + { + ret.append(views); + } + else + { + ret.append(views(idxs)); + } + } + } + + return SelectResult(ret); +} + +SelectResult IDMassEngine::select_bonds(const SelectResult &mols, + const PropertyMap &map) const +{ + if (mols.count() == 0) + return SelectResult(); + + QList ret; + + auto compare_func = _get_compare(compare); + + for (const auto &mol : mols) + { + auto bonds = SelectorBond(*mol, map); + + if (bonds.isEmpty()) + continue; + + QList idxs; + + for (qint64 i=0; i 0) + { + if (idxs.count() == bonds.nViews()) + { + ret.append(bonds); + } + else + { + ret.append(bonds(idxs)); + } + } + } + + return SelectResult(ret); +} + +SelectResult IDMassEngine::select_mols(const SelectResult &mols, + const PropertyMap &map) const +{ + if (mols.count() == 0) + return SelectResult(); + + QList ret; + + auto compare_func = _get_compare(compare); + + for (const auto &mol : mols) + { + auto molecule = mol->molecule(); + + if (compare_func(molecule.evaluate().mass(map).value(), value.value())) + { + ret.append(molecule); + } + } + + return SelectResult(ret); +} + +SelectResult IDMassEngine::select(const SelectResult &mols, + const PropertyMap &map) const +{ + switch (obj) + { + case AST::ATOM: + return this->select_t(mols, map); + case AST::RESIDUE: + return this->select_t(mols, map); + case AST::CHAIN: + return this->select_t(mols, map); + case AST::SEGMENT: + return this->select_t(mols, map); + case AST::CUTGROUP: + return this->select_t(mols, map); + case AST::MOLECULE: + return this->select_mols(mols, map); + case AST::BOND: + return this->select_bonds(mols, map); + default: + throw SireError::invalid_key(QObject::tr("Unsupported search object!")); + } + + return SelectResult(); +} + +//////// +//////// Implementation of the IDChargeEngine +//////// + +IDChargeEngine::IDChargeEngine() +{} + +SelectEngine::ObjType IDChargeEngine::objectType() const +{ + return _to_obj_type(obj); +} + +SelectEnginePtr IDChargeEngine::construct(IDObject obj, IDComparison compare, + SireUnits::Dimension::Charge value) +{ + IDChargeEngine *ptr = new IDChargeEngine(); + auto p = makePtr(ptr); + + ptr->obj = obj; + ptr->compare = compare; + ptr->value = value; + + return p; +} + +IDChargeEngine::~IDChargeEngine() +{} + +template +SelectResult IDChargeEngine::select_t(const SelectResult &mols, + const PropertyMap &map) const +{ + if (mols.count() == 0) + return SelectResult(); + + QList ret; + + auto compare_func = _get_compare(compare); + + for (const auto &mol : mols) + { + auto views = get_views(mol); + + if (views.isEmpty()) + continue; + + QList idxs; + + for (qint64 i=0; i 0) + { + if (idxs.count() == views.nViews()) + { + ret.append(views); + } + else + { + ret.append(views(idxs)); + } + } + } + + return SelectResult(ret); +} + +SelectResult IDChargeEngine::select_bonds(const SelectResult &mols, + const PropertyMap &map) const +{ + if (mols.count() == 0) + return SelectResult(); + + QList ret; + + auto compare_func = _get_compare(compare); + + for (const auto &mol : mols) + { + auto bonds = SelectorBond(*mol, map); + + if (bonds.isEmpty()) + continue; + + QList idxs; + + for (qint64 i=0; i 0) + { + if (idxs.count() == bonds.nViews()) + { + ret.append(bonds); + } + else + { + ret.append(bonds(idxs)); + } + } + } + + return SelectResult(ret); +} + +SelectResult IDChargeEngine::select_mols(const SelectResult &mols, + const PropertyMap &map) const +{ + if (mols.count() == 0) + return SelectResult(); + + QList ret; + + auto compare_func = _get_compare(compare); + + for (const auto &mol : mols) + { + auto molecule = mol->molecule(); + + if (compare_func(molecule.evaluate().charge(map).value(), value.value())) + { + ret.append(molecule); + } + } + + return SelectResult(ret); +} + +SelectResult IDChargeEngine::select(const SelectResult &mols, + const PropertyMap &map) const +{ + switch (obj) + { + case AST::ATOM: + return this->select_t(mols, map); + case AST::RESIDUE: + return this->select_t(mols, map); + case AST::CHAIN: + return this->select_t(mols, map); + case AST::SEGMENT: + return this->select_t(mols, map); + case AST::CUTGROUP: + return this->select_t(mols, map); + case AST::MOLECULE: + return this->select_mols(mols, map); + case AST::BOND: + return this->select_bonds(mols, map); + default: + throw SireError::invalid_key(QObject::tr("Unsupported search object!")); + } + + return SelectResult(); +} + +//////// +//////// Implementation of the IDPropertyEngine +//////// + +IDPropertyEngine::IDPropertyEngine() +{} + +SelectEnginePtr IDPropertyEngine::construct(const IDObject &name, + const QString &property, + const IDComparison &compare, + const QString &value) +{ + IDPropertyEngine *ptr = new IDPropertyEngine(); + auto p = makePtr(ptr); + + ptr->name = name; + ptr->property = property; + ptr->compare = compare; + ptr->value = value; + + return p; +} + +IDPropertyEngine::~IDPropertyEngine() +{} + + +bool _compare_equal(const QString &left, + const IDComparison &compare, + const QString &right) +{ + // if they are strings, then this should be ok + if (left == right) + return true; + + // could they both be numbers? + { + bool left_ok; + double left_num = left.toDouble(&left_ok); + + bool right_ok; + double right_num = right.toDouble(&right_ok); + + if (left_ok and right_ok) + { + auto compare_func = _get_compare(compare); + return compare_func(left_num, right_num); + } + } + + // could they both be booleans? + try + { + BooleanProperty left_bool(left); + BooleanProperty right_bool(right); + + return left_bool.value() == right_bool.value(); + } + catch(...) + { + // not bools - this is ok. + } + + if (compare == ID_CMP_AE) + { + // allow simplified, case-insensitive comparison + return left.toLower().simplified() == right.toLower().simplified(); + } + + return false; +} + +bool _compare(const QString &left, + const IDComparison &compare, + const QString &right) +{ + if (compare == ID_CMP_NE) + { + return not _compare(left, ID_CMP_EQ, right); + } + else if (compare == ID_CMP_EQ or compare == ID_CMP_AE) + { + return _compare_equal(left, compare, right); + } + else + { + // all other comparisons must be numeric. Check if these are both + // numbers + bool ok; + + double left_num = left.toDouble(&ok); + + if (!ok) + return false; + + double right_num = right.toDouble(&ok); + + if (!ok) + return false; + + auto compare_func = _get_compare(compare); + + return compare_func(left_num, right_num); + } +} + +template +MolViewPtr _select_property_(const MolViewPtr &mol, + const PropertyName &property, + const IDComparison &compare, + const QString &value) +{ + auto views = get_views(mol); + + QList idxs; + + for (int i=0; iasAString(); + + if (_compare(p, compare, value)) + { + idxs.append(i); + } + } + } + + if (idxs.count() == views.count()) + //everything has been selected + return views; + else if (not idxs.isEmpty()) + return views(idxs); + else + return Selector(); +} + +MolViewPtr _select_property_bond(const SelectorBond &bonds, + const PropertyName &property, + const IDComparison &compare, + const QString &value) +{ + QList idxs; + + for (int i=0; i(mol, property, compare, value); + case AST::RESIDUE: + return _select_property_(mol, property, compare, value); + case AST::CHAIN: + return _select_property_(mol, property, compare, value); + case AST::SEGMENT: + return _select_property_(mol, property, compare, value); + case AST::CUTGROUP: + return _select_property_(mol, property, compare, value); + case AST::BOND: + { + if (mol->isA()) + return _select_property_bond(mol->asA(), property, compare, value); + else + return _select_property_bond(SelectorBond(*mol, map), property, compare, value); + } + default: + qDebug() << "UNRECOGNISED" << name; + return MolViewPtr(); + } +} + +SelectResult IDPropertyEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList ret; + + const auto p = map[this->property]; + + if (name == AST::MOLECULE) + { + for (const auto &mol : mols) + { + auto m = mol->molecule(); + + if (m.hasProperty(p)) + { + try + { + if (_compare(m.property(p).asAString(), this->compare, this->value)) + { + ret.append(m); + } + } + catch(...) + { + // the property isn't compatible, so this molecule + // can't match + } + } + } + } + else + { + for (const auto &mol : mols) + { + try + { + auto selected = _select_property(mol, this->name, p, this->compare, this->value, map); + + if (not selected->isEmpty()) + ret.append(selected); + } + catch(...) + { + // the property isn't compatible, so this can't match + } + } + } + + return SelectResult(ret); +} + +SelectEnginePtr IDPropertyEngine::simplify() +{ + return selfptr.lock(); +} + +SelectEngine::ObjType IDPropertyEngine::objectType() const +{ + return _to_obj_type(name); +} + +//////// +//////// Implementation of the IDBondEngine +//////// + +IDBondEngine::IDBondEngine() +{} + +SelectEnginePtr IDBondEngine::construct( IDBondToken from_token, + SelectEnginePtr from_value, + IDBondToken to_token, + SelectEnginePtr to_value ) +{ + IDBondEngine *ptr = new IDBondEngine(); + auto p = makePtr(ptr); + + if (to_token == ID_BOND_TO) + { + if (from_token != ID_BOND_FROM) + { + throw SireMol::parse_error(QObject::tr( + "Invalid syntax: Should be 'bonds from X to Y', not " + "'bonds %1 X %2 Y'") + .arg(AST::idbondtoken_to_string(from_token)) + .arg(AST::idbondtoken_to_string(to_token)), CODELOC); + } + } + else if (to_token != ID_BOND_UNKNOWN) + { + throw SireMol::parse_error(QObject::tr( + "Invalid 'to' token, %1. Should only be 'to'.") + .arg(AST::idbondtoken_to_string(to_token)), + CODELOC); + } + + if (from_token == ID_BOND_FROM and to_token != ID_BOND_TO) + { + throw SireMol::parse_error(QObject::tr( + "Invalid syntax: Should be 'bonds from X to Y', not " + "'bonds %1 X %2 Y'") + .arg(AST::idbondtoken_to_string(from_token)) + .arg(AST::idbondtoken_to_string(to_token)), CODELOC); + } + + if (from_value) + from_value->setParent(p); + else + throw SireMol::parse_error(QObject::tr( + "Missing first (from) group to search..."), CODELOC); + + if (to_value) + { + if (to_token != ID_BOND_TO) + throw SireMol::parse_error(QObject::tr( + "Should not have a 'to' group if not running a 'to' match!"), + CODELOC); + + ptr->to_token = ID_BOND_TO; + ptr->to_value = to_value; + to_value->setParent(p); + } + else if (to_token != ID_BOND_UNKNOWN) + { + throw SireMol::parse_error(QObject::tr( + "Missing 'to' group when running a 'to' search!"), CODELOC); + } + + ptr->from_token = from_token; + ptr->from_value = from_value; + + return p; +} + +IDBondEngine::~IDBondEngine() +{} + +#include "SireMM/selectorbond.h" +using namespace SireMM; + +SelectResult IDBondEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + if (not from_value.get() or from_token == ID_BOND_UNKNOWN) + return SelectResult(); + + SelectResult result = from_value->operator()(mols, map); + + if (result.count() == 0) + return SelectResult(); + + SelectResult to_result; + + if (from_token == ID_BOND_FROM and to_token == ID_BOND_TO) + { + to_result = to_value->operator()(mols, map); + + if (to_result.count() == 0) + return SelectResult(); + } + + QList ret; + + for (const auto &mol : result) + { + if (from_token == ID_BOND_TO) + { + // only bonds to this object, not wholly contained in this object + auto from = mol->atoms(); + auto to = from.invert(); + auto result = SelectorBond(from, to, map); + + ret.append(result); + } + else if (from_token == ID_BOND_FROM and to_token == ID_BOND_TO) + { + for (const auto &to_mol : to_result) + { + if (mol->data().number() == to_mol->data().number()) + ret.append(SelectorBond(mol->atoms(), to_mol->atoms(), map)); + } + } + } + + return SelectResult(ret); +} + +SelectEnginePtr IDBondEngine::simplify() +{ + if (from_value.get()) + from_value = from_value->simplify(); + + if (to_value.get()) + to_value = to_value->simplify(); + + return selfptr.lock(); +} + +SelectEngine::ObjType IDBondEngine::objectType() const +{ + return SelectEngine::COMPLEX; +} + +//////// +//////// Implementation of the IDWithEngine +//////// + +IDWithEngine::IDWithEngine() +{} + +SelectEnginePtr IDWithEngine::construct( SelectEnginePtr part0, + IDToken token, + SelectEnginePtr part1) +{ + IDWithEngine *ptr = new IDWithEngine(); + auto p = makePtr(ptr); + + if (part0.get() == 0) + part0 = IDAllEngine::construct(); + + if (part1.get() == 0) + part1 = IDAllEngine::construct(); + + part0->setParent(p); + part1->setParent(p); + + ptr->part0 = part0; + ptr->token = token; + ptr->part1 = part1; + + return p; +} + +IDWithEngine::~IDWithEngine() +{} + +SelectResult IDWithEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList result; + + auto first = part0; + auto second = part1; + + if (token == AST::ID_IN) + { + // an "in" search is an inverted "with" search + first = part1; + second = part0; + } + + // we need to expand bonds manually + const bool is_bond = part0->objectType() == SelectEngine::BOND; + + // need to expand the result so that we have the right type of unit + // when we try to match the second part + for (const auto &mol : first->expand(first->operator()(mols, map))) + { + const auto units = mol->toList(); + + QList matches; + matches.reserve(units.count()); + + for (int i=0; imatches(*(units[i]), map)) + { + matches.append(i); + } + } + + if (not matches.isEmpty()) + { + if (matches.count() == units.count()) + { + if (is_bond) + { + auto bonds = SelectorBond(mol, map); + if (not bonds.isEmpty()) + result.append(bonds); + } + else + result.append(mol); + } + else + { + //rejoin the matches into the appropriate Selector + if (is_bond) + { + auto bonds = SelectorBond(mol->operator[](matches), map); + if (not bonds.isEmpty()) + result.append(bonds); + } + else + result.append(mol->operator[](matches)); + } + } + } + + return SelectResult(result); +} + +SelectEnginePtr IDWithEngine::simplify() +{ + if (part0.get()) + part0 = part0->simplify(); + + if (part1.get()) + part1 = part1->simplify(); + + return selfptr.lock(); +} + +SelectEngine::ObjType IDWithEngine::objectType() const +{ + if (part0.get()) + return part0->objectType(); + else if (part1.get()) + return part1->objectType(); + else + return SelectEngine::ATOM; +} + +//////// +//////// Implementation of the IDElementEngine +//////// + +IDElementEngine::IDElementEngine() +{} + +SelectEnginePtr IDElementEngine::construct(const std::vector &vals) +{ + IDElementEngine *ptr = new IDElementEngine(); + auto p = makePtr(ptr); + + for (const auto &value : vals) + { + ptr->elements.insert(value); + } + + return p; +} + +IDElementEngine::~IDElementEngine() +{} + +SelectResult IDElementEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList result; + + const auto element_property = map["element"]; + + for (const auto &mol : mols) + { + const auto atoms = mol->atoms(); + + QList matches; + matches.reserve(atoms.count()); + + try + { + for (int i=0; i(element_property); + + if (this->elements.contains(element)) + { + matches.append(i); + } + } + } + catch(...) + { + // no matching element property - this would be the same + // for all atoms + } + + if (not matches.isEmpty()) + { + if (matches.count() == atoms.count()) + { + // all atoms matched + result.append(atoms); + } + else + { + result.append(atoms(matches)); + } + } + } + + return SelectResult(result); +} + +SelectEngine::ObjType IDElementEngine::objectType() const +{ + return SelectEngine::ATOM; +} + +//////// +//////// Implementation of the IDDistanceEngine +//////// + +IDDistanceEngine::IDDistanceEngine() +{} + +SelectEnginePtr IDDistanceEngine::construct(IDObject obj, IDCoordType typ, + SireUnits::Dimension::Length distance, + SelectEnginePtr part) +{ + IDDistanceEngine *ptr = new IDDistanceEngine(); + auto p = makePtr(ptr); + + if (part) + part->setParent(p); + + ptr->part = part; + ptr->obj = obj; + ptr->typ = typ; + ptr->distance = distance.value(); + + return p; +} + +SelectEnginePtr IDDistanceEngine::construct(IDObject obj, + SireUnits::Dimension::Length distance, + SelectEnginePtr part) +{ + return IDDistanceEngine::construct(obj, ID_COORD_CLOSEST, distance, part); +} + +IDDistanceEngine::~IDDistanceEngine() +{} + +SelectEnginePtr IDDistanceEngine::simplify() +{ + if (part.get() != 0) + part->simplify(); + + return selfptr.lock(); +} + +QVector _get_coords(const Selector &atoms, + const PropertyName &coords_property, + const Space &space) +{ + QVector coords; + + coords.reserve(atoms.count()); + + for (int i=0; i(coords_property), + Vector(0))); + } + + return coords; +} + +Vector _get_point(const AABox &box, const IDCoordType &typ) +{ + Vector center = box.center(); + + switch(typ) + { + case ID_COORD_CENTER: + case ID_COORD_CENTER_X: + case ID_COORD_CENTER_Y: + case ID_COORD_CENTER_Z: + case ID_COORD_X: + case ID_COORD_Y: + case ID_COORD_Z: + return center; + case ID_COORD_MAX: + return box.maxCoords(); + case ID_COORD_MIN: + return box.minCoords(); + case ID_COORD_MAX_X: + center.setX(box.maxCoords().x()); + return center; + case ID_COORD_MAX_Y: + center.setY(box.maxCoords().y()); + return center; + case ID_COORD_MAX_Z: + center.setZ(box.maxCoords().z()); + return center; + case ID_COORD_MIN_X: + center.setX(box.minCoords().x()); + return center; + case ID_COORD_MIN_Y: + center.setY(box.minCoords().y()); + return center; + case ID_COORD_MIN_Z: + center.setZ(box.minCoords().z()); + return center; + default: + qDebug() << "UNRECOGNISED ID TYP" << typ; + return center; + } +} + +bool _is_within(const QVector &coords, + const CoordGroup &ref_group, + double distance, + const IDCoordType &typ, const Space &space) +{ + CoordGroup group(coords); + + if (typ == ID_COORD_CLOSEST) + { + return space.minimumDistance(group, ref_group) < distance; + } + + Vector point = _get_point(group.aaBox(), typ); + + return space.minimumDistance(CoordGroup(1, point), ref_group) < distance; +} + +SelectResult IDDistanceEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + //first, get the objects against where the distance is calculated + if (part.get() == 0) + return SelectResult(); + + QList ret; + + const auto refmols = part->operator()(mols, map); + + if (refmols.isEmpty()) + //nothing against which to compare + return SelectResult(); + + const auto coords_property = map["coordinates"]; + + SireVol::SpacePtr space = SireVol::Cartesian(); + + if (map["space"].hasValue()) + { + space = map["space"].value().asA(); + } + + // merge all atoms in 'refmols' into a single array of coordinates + QVector ref_coords; + + for (const auto &mol : refmols) + { + ref_coords += _get_coords(mol->atoms(), coords_property, *space); + } + + CoordGroup ref_group(ref_coords); + + for (const auto &mol : mols) + { + // expand this molecule into the views that are requested + const auto expanded = _expand(*mol, this->objectType(), map); + + QList idxs; + idxs.reserve(expanded->count()); + + for (int i=0; icount(); ++i) + { + const auto view = expanded->operator[](i); + + QVector coords = _get_coords(view->atoms(), + coords_property, *space); + + if (_is_within(coords, ref_group, distance, typ, *space)) + { + idxs.append(i); + } + } + + if (idxs.count() == expanded->count()) + { + ret.append(expanded); + } + else if (not idxs.isEmpty()) + { + ret.append(expanded->operator[](idxs)); + } + } + + return SelectResult(ret); +} + +SelectEngine::ObjType IDDistanceEngine::objectType() const +{ + return _to_obj_type(obj); +} + +//////// +//////// Implementation of the IDDistanceVectorEngine +//////// + +IDDistanceVectorEngine::IDDistanceVectorEngine() +{} + +SelectEnginePtr IDDistanceVectorEngine::construct(IDObject obj, IDCoordType typ, + SireUnits::Dimension::Length distance, + VectorValue position) +{ + IDDistanceVectorEngine *ptr = new IDDistanceVectorEngine(); + auto p = makePtr(ptr); + + ptr->position = position; + ptr->obj = obj; + ptr->typ = typ; + ptr->distance = distance.value(); + + return p; +} + +SelectEnginePtr IDDistanceVectorEngine::construct(IDObject obj, + SireUnits::Dimension::Length distance, + VectorValue position) +{ + return IDDistanceVectorEngine::construct(obj, ID_COORD_CLOSEST, distance, position); +} + +IDDistanceVectorEngine::~IDDistanceVectorEngine() +{} + +SelectEnginePtr IDDistanceVectorEngine::simplify() +{ + return selfptr.lock(); +} + +SelectResult IDDistanceVectorEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList ret; + + const auto coords_property = map["coordinates"]; + + SireVol::SpacePtr space = SireVol::Cartesian(); + + if (map["space"].hasValue()) + { + space = map["space"].value().asA(); + } + + // turn the reference point into a single-point CoordGroup + Vector point((position.x.value * position.x.unit).to(SireUnits::angstrom), + (position.y.value * position.y.unit).to(SireUnits::angstrom), + (position.z.value * position.z.unit).to(SireUnits::angstrom)); + + QVector ref_coords(1, point); + CoordGroup ref_group(ref_coords); + + for (const auto &mol : mols) + { + // expand this molecule into the views that are requested + const auto expanded = _expand(*mol, this->objectType(), map); + + QList idxs; + idxs.reserve(expanded->count()); + + for (int i=0; icount(); ++i) + { + const auto view = expanded->operator[](i); + + QVector coords = _get_coords(view->atoms(), + coords_property, *space); + + if (_is_within(coords, ref_group, distance, typ, *space)) + { + idxs.append(i); + } + } + + if (idxs.count() == expanded->count()) + { + ret.append(expanded); + } + else if (not idxs.isEmpty()) + { + ret.append(expanded->operator[](idxs)); + } + } + + return SelectResult(ret); +} + +SelectEngine::ObjType IDDistanceVectorEngine::objectType() const +{ + return _to_obj_type(obj); +} + +//////// +//////// Implementation of the IDAllEngine +//////// + +IDAllEngine::IDAllEngine() +{} + +SelectEnginePtr IDAllEngine::construct(IDObject obj) +{ + IDAllEngine *ptr = new IDAllEngine(); + auto p = makePtr(ptr); + + ptr->obj = obj; + + return p; +} + +IDAllEngine::~IDAllEngine() +{} + +SelectResult _get_bonds(const SelectResult &mols, + const PropertyMap &map) +{ + QList result; + + for (const auto &mol : mols) + { + SelectorBond b(*mol, map); + + if (not b.isEmpty()) + result.append(b); + } + + return result; +} + +SelectResult IDAllEngine::select(const SelectResult &mols, + const PropertyMap &map) const +{ + switch (obj) + { + case AST::ATOM: + return mols.atoms(); + case AST::RESIDUE: + return mols.residues(); + case AST::CHAIN: + return mols.chains(); + case AST::SEGMENT: + return mols.segments(); + case AST::CUTGROUP: + return mols.cutGroups(); + case AST::MOLECULE: + return mols.molecules(); + case AST::BOND: + return _get_bonds(mols, map); + default: + return mols.molecules(); + } +} + +SelectEngine::ObjType IDAllEngine::objectType() const +{ + return _to_obj_type(obj); +} + +//////// +//////// Implementation of the IDWaterEngine +//////// + +IDWaterEngine::IDWaterEngine() +{} + +SelectEnginePtr IDWaterEngine::construct() +{ + IDWaterEngine *ptr = new IDWaterEngine(); + auto p = makePtr(ptr); + + return p; +} + +IDWaterEngine::~IDWaterEngine() +{} + +SelectResult IDWaterEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList result; + + for (const auto &molview : mols) + { + // Counters for the number of hydrogens, oxygens, and protons in the molecule. + int num_hydrogen = 0; + int num_oxygen = 0; + int num_protons = 0; + + // Convert to a molecule. + auto molecule = molview->molecule(); + + // Skip if there is no element property. + if (not molecule.hasProperty(map["element"])) + continue; + + // Extract the element property. + const auto &elements = molecule.property(map["element"]).asA(); + + // Whether this a water molecule. + bool is_water = true; + + // Loop over all cut-groups associated with the elements. + for (int i=0; i 1 or + num_hydrogen > 2 or + num_protons > 10) + { + is_water = false; + break; + } + } + + // Break out of inner loop. + if (not is_water) + break; + } + + // If this is a water molecule, append the result. + if (is_water and num_oxygen == 1 and num_hydrogen == 2 and num_protons == 10) + result.append(molecule); + } + + return SelectResult(result); +} + +SelectEngine::ObjType IDWaterEngine::objectType() const +{ + return SelectEngine::MOLECULE; +} + + +//////// +//////// Implementation of the IDProteinEngine +//////// + +QString IDProtein::toString() const +{ + return QString("protein"); +} + +SelectEnginePtr IDProtein::toEngine() const +{ + return IDProteinEngine::construct(); +} + +IDProteinEngine::IDProteinEngine() +{} + +SelectEnginePtr IDProteinEngine::construct() +{ + IDProteinEngine *ptr = new IDProteinEngine(); + auto p = makePtr(ptr); + + return p; +} + +IDProteinEngine::~IDProteinEngine() +{} + + +SelectResult IDProteinEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList result; + + auto min_res = get_min_protein_residues(); + auto resnames = get_protein_residue_names(); + + for (const auto &mol : mols) + { + auto molinfo = mol->data().info(); + + if (molinfo.nResidues() < min_res) + continue; + + int nres = 0; + bool is_protein = false; + + for (int i=0; i= min_res) + { + is_protein = true; + break; + } + } + } + + if (is_protein) + result.append(mol->molecule()); + } + + return SelectResult(result); +} + +SelectEngine::ObjType IDProteinEngine::objectType() const +{ + return SelectEngine::MOLECULE; +} + +//////// +//////// Implementation of the IDPerturbableEngine +//////// + +IDPerturbableEngine::IDPerturbableEngine() +{} + +SelectEnginePtr IDPerturbableEngine::construct() +{ + IDPerturbableEngine *ptr = new IDPerturbableEngine(); + auto p = makePtr(ptr); + + return p; +} + +IDPerturbableEngine::~IDPerturbableEngine() +{} + +SelectResult IDPerturbableEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList result; + + for (const auto &molview : mols) + { + // Convert to a molecule. + auto molecule = molview->molecule(); + + // Check whether this molecule is flagged as being perturbable. + if (molecule.hasProperty(map["is_perturbable"])) + result.append(molecule); + } + + return SelectResult(result); +} + +SelectEngine::ObjType IDPerturbableEngine::objectType() const +{ + return SelectEngine::MOLECULE; +} + +//////// +//////// Implementation of the IDCountEngine +//////// + +IDCountEngine::IDCountEngine() +{} + +SelectEnginePtr IDCount::toEngine() const +{ + return IDCountEngine::construct(object.toEngine(), compare, value); +} + +QString IDCount::toString() const +{ + return QObject::tr("count( %1 ) %2 %3") + .arg(object.toString()) + .arg(idcomparison_to_string(compare)) + .arg(value); +} + +SelectEnginePtr IDCountEngine::construct(SelectEnginePtr object, + IDComparison compare, int value) +{ + IDCountEngine *ptr = new IDCountEngine(); + auto p = makePtr(ptr); + + if (object) + object->setParent(p); + + ptr->object = object; + ptr->compare = compare; + ptr->value = value; + + return p; +} + +IDCountEngine::~IDCountEngine() +{} + +std::function _get_count(SelectEngine::ObjType obj) +{ + switch(obj) + { + case SelectEngine::ATOM: + return [](const MoleculeView &view){ return view.nAtoms(); }; + case SelectEngine::RESIDUE: + return [](const MoleculeView &view){ return view.nResidues(); }; + case SelectEngine::CHAIN: + return [](const MoleculeView &view){ return view.nChains(); }; + case SelectEngine::SEGMENT: + return [](const MoleculeView &view){ return view.nSegments(); }; + case SelectEngine::CUTGROUP: + return [](const MoleculeView &view){ return view.nCutGroups(); }; + case SelectEngine::BOND: + return [](const MoleculeView &view){ return SelectorBond(view).count(); }; + default: + return [](const MoleculeView&){ return 0; }; + } +} + +SelectResult IDCountEngine::select(const SelectResult &mols, const PropertyMap &map) const +{ + QList result; + + // first select our expression from mols + if (not object) + return result; + + auto compare_func = _get_compare(compare); + auto count_func = _get_count(object->objectType()); + + auto items = object->operator()(mols, map); + + if (items.isEmpty()) + return SelectResult(); + + for (const auto &molview : items.toList()) + { + if (compare_func(count_func(*molview), value)) + { + result.append(molview); + } + } + + return SelectResult(result); +} + +SelectEngine::ObjType IDCountEngine::objectType() const +{ + if (object) + return object->objectType(); + else + return SelectEngine::COMPLEX; +} + +SelectEnginePtr IDCountEngine::simplify() +{ + if (object.get()) + object = object->simplify(); + + return selfptr.lock(); +} diff --git a/corelib/src/libs/SireSearch/idengine.h b/corelib/src/libs/SireSearch/idengine.h new file mode 100644 index 000000000..6d60a1a35 --- /dev/null +++ b/corelib/src/libs/SireSearch/idengine.h @@ -0,0 +1,578 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2018 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIRESEARCH_IDENGINE_H +#define SIRESEARCH_IDENGINE_H + +#include "SireMol/select.h" + +#include "ast.h" + +#include +#include + +SIRE_BEGIN_HEADER + +namespace parser_idengine +{ + +using SireMol::parser::SelectEngine; + +using SireMol::SelectResult; +using SireBase::PropertyMap; + +using namespace AST; + +/** Internal class providing the SelectEngine for objects + based on their names + + @author Christopher Woods +*/ +class IDNameEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct( IDObject obj, NameValues vals ); + ~IDNameEngine(); + + ObjType objectType() const; + + QString toString() const; + +protected: + IDNameEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + template + SelectResult searchName(const SelectResult &mols, bool use_parallel) const; + + SelectResult searchMolName(const SelectResult &mols, bool use_parallel) const; + + bool match(const QString &name) const; + + IDObject obj; + QStringList names; + QList regexps; +}; + +/** Internal class providing the SelectEngine for objects + based on their numbers + + @author Christopher Woods +*/ +class IDNumberEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct( IDObject obj, RangeValues vals ); + ~IDNumberEngine(); + + ObjType objectType() const; + +protected: + IDNumberEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + template + SelectResult searchNum(const SelectResult &mols, bool use_parallel) const; + + SelectResult searchMolNum(const SelectResult &mols, bool use_parallel) const; + + bool match(int val) const; + + IDObject obj; + RangeValues vals; +}; + +/** Internal class providing the SelectEngine for objects + based on their indicies (index) + + @author Christopher Woods +*/ +class IDIndexEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct( IDObject obj, RangeValues vals ); + ~IDIndexEngine(); + + ObjType objectType() const; + +protected: + IDIndexEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + template + SelectResult searchIdx(const SelectResult &mols, bool use_parallel) const; + + SelectResult searchMolIdx(const SelectResult &mols, + const SelectResult &context, + bool use_parallel) const; + + bool match(int val, int count) const; + + IDObject obj; + RangeValues vals; +}; + +/** Internal class providing the SelectEngine for selecting by chemical element + + @author Christopher Woods +*/ +class IDElementEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(const std::vector &values); + ~IDElementEngine(); + + ObjType objectType() const; + +protected: + IDElementEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + QSet elements; +}; + +/** Internal class providing the SelectEngine for objects + in an "and" expression + + @author Christopher Woods +*/ +class IDAndEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(SelectEnginePtr part0, SelectEnginePtr part1); + ~IDAndEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDAndEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + SelectEnginePtr part0, part1; +}; + +/** Internal class providing the SelectEngine for objects + in an "or" expression + + @author Christopher Woods +*/ +class IDOrEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(SelectEnginePtr part0, SelectEnginePtr part1); + static SelectEnginePtr construct(QList parts); + ~IDOrEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDOrEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + QList parts; +}; + +/** Internal class providing the SelectEngine for objects + in a "not" expression + + @author Christopher Woods +*/ +class IDNotEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(SelectEnginePtr part); + ~IDNotEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDNotEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + SelectEnginePtr part; +}; + +/** Internal class providing the SelectEngine for objects + in a "join" expression + + @author Christopher Woods +*/ +class IDJoinEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(SelectEnginePtr part); + ~IDJoinEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDJoinEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + SelectEnginePtr part; +}; + +/** Internal class providing the SelectEngine for objects + in a "subscript" expression + + @author Christopher Woods +*/ +class IDSubScriptEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(SelectEnginePtr part, const RangeValue &val); + ~IDSubScriptEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDSubScriptEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + SelectEnginePtr part; + RangeValue val; +}; + +/** Internal class providing the SelectEngine for objects + * in a "property" expression + */ +class IDPropertyEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(const IDObject &name, + const QString &property, + const IDComparison &compare, + const QString &value); + + ~IDPropertyEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDPropertyEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + IDObject name; + QString property; + IDComparison compare; + QString value; +}; + +/** Internal class providing the SelectEngine for objects + * in a "bonds" expression +*/ +class IDBondEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct( IDBondToken from_token, + SelectEnginePtr from_value, + IDBondToken to_token, + SelectEnginePtr to_value); + ~IDBondEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDBondEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + IDBondToken from_token; + SelectEnginePtr from_value; + IDBondToken to_token; + SelectEnginePtr to_value; +}; + +/** Internal class providing the SelectEngine for objects + in a "with" expression + + @author Christopher Woods +*/ +class IDWithEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct( SelectEnginePtr part0, + IDToken token, + SelectEnginePtr part1); + ~IDWithEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDWithEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + SelectEnginePtr part0; + IDToken token; + SelectEnginePtr part1; +}; + +/** Internal class used to find atoms by their mass */ +class IDMassEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(IDObject obj, IDComparison compare, SireUnits::Dimension::MolarMass mass); + ~IDMassEngine(); + + ObjType objectType() const; + +protected: + IDMassEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + + template + SelectResult select_t(const SelectResult &mols, const PropertyMap &map) const; + + SelectResult select_mols(const SelectResult &mols, const PropertyMap &map) const; + + SelectResult select_bonds(const SelectResult &mols, const PropertyMap &map) const; + +private: + IDObject obj; + IDComparison compare; + SireUnits::Dimension::MolarMass value; +}; + +/** Internal class used to find atoms by their charge */ +class IDChargeEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(IDObject obj, IDComparison compare, SireUnits::Dimension::Charge mass); + ~IDChargeEngine(); + + ObjType objectType() const; + +protected: + IDChargeEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + + template + SelectResult select_t(const SelectResult &mols, const PropertyMap &map) const; + + SelectResult select_mols(const SelectResult &mols, const PropertyMap &map) const; + + SelectResult select_bonds(const SelectResult &mols, const PropertyMap &map) const; + +private: + IDObject obj; + IDComparison compare; + SireUnits::Dimension::Charge value; +}; + +/** Internal class used to select objects that are within a certain + distance of other objects + + @author Christopher Woods +*/ +class IDDistanceEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct( IDObject obj, SireUnits::Dimension::Length distance, + SelectEnginePtr part ); + + static SelectEnginePtr construct( IDObject obj, IDCoordType typ, + SireUnits::Dimension::Length distance, + SelectEnginePtr part ); + + ~IDDistanceEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDDistanceEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + IDObject obj; + IDCoordType typ; + SelectEnginePtr part; + double distance; +}; + +/** Internal class used to select objects that are within a certain + distance of a 3D position vector. + + @author Lester Hedges +*/ +class IDDistanceVectorEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct( IDObject obj, SireUnits::Dimension::Length distance, + VectorValue position ); + + static SelectEnginePtr construct( IDObject obj, IDCoordType typ, + SireUnits::Dimension::Length distance, + VectorValue position ); + + ~IDDistanceVectorEngine(); + + ObjType objectType() const; + + SelectEnginePtr simplify(); + +protected: + IDDistanceVectorEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + IDObject obj; + IDCoordType typ; + VectorValue position; + double distance; +}; + +/** Internal class used to select all objects + + @author Christopher Woods +*/ +class IDAllEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(IDObject object=AST::MOLECULE); + + ~IDAllEngine(); + + ObjType objectType() const; + +protected: + IDAllEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + /** All as what (atoms, residues etc.) */ + IDObject obj; +}; + +/** Internal class used to select objects based on counts, + * e.g. count(atoms) < 5 + */ +class IDCountEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(SelectEnginePtr object, IDComparison compare, int value); + + ~IDCountEngine(); + + ObjType objectType() const; + SelectEnginePtr simplify(); + +protected: + IDCountEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; + +private: + SelectEnginePtr object; + IDComparison compare; + int value; +}; + +/** Internal class used to select all water molecules. + + @author Lester Hedges +*/ +class IDWaterEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(); + + ~IDWaterEngine(); + + ObjType objectType() const; + +protected: + IDWaterEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; +}; + +/** Internal class used to select all protein molecules */ +class IDProteinEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(); + + ~IDProteinEngine(); + + ObjType objectType() const; + +protected: + IDProteinEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; +}; + +/** Internal class used to select all perturbable molecules. + + @author Lester Hedges +*/ +class IDPerturbableEngine : public SelectEngine +{ +public: + static SelectEnginePtr construct(); + + ~IDPerturbableEngine(); + + ObjType objectType() const; + +protected: + IDPerturbableEngine(); + SelectResult select(const SelectResult &mols, const PropertyMap &map) const; +}; + +} + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireSearch/parser.cpp b/corelib/src/libs/SireSearch/parser.cpp new file mode 100644 index 000000000..7e06fa0bd --- /dev/null +++ b/corelib/src/libs/SireSearch/parser.cpp @@ -0,0 +1,271 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2018 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#define BOOST_SPIRIT_USE_PHOENIX_V3 +#define BOOST_SPIRIT_UNICODE + +#include "parser.h" +#include "ast.h" + +#include "SireError/errors.h" + +#include "SireMol/core.h" + +#include "SireSearch/ast.h" + +#include +#include +#include + +#include +#include + +#include +#include +#include +#include +#include + +#include +#include + +using namespace SireSearch; +using namespace SireMol; + +namespace spirit = boost::spirit; +namespace qi = spirit::qi; +namespace unicode = boost::spirit::unicode; +namespace phoenix = boost::phoenix; + +//////// +//////// implementation of the user tokens registry +//////// + +typedef qi::symbols UserTokens; +static UserTokens *_user_tokens = 0; + +Q_GLOBAL_STATIC( QMutex, tokensMutex ) + +/** Get the set of user-supplied tokens */ +UserTokens getUserTokens() +{ + QMutexLocker lkr(tokensMutex()); + + if (_user_tokens == 0) + _user_tokens = new UserTokens(); + + return *_user_tokens; +} + +/** Clear all of the user-supplied tokens */ +static void reset_tokens() +{ + QMutexLocker lkr(tokensMutex()); + + delete _user_tokens; + _user_tokens = 0; +} + +template +QString toString(IteratorT begin, IteratorT end) +{ + QStringList lines; + for (; begin != end; ++begin) + { + lines.append( QString( *begin ) ); + } + + return lines.join(""); +} + +#include "grammar.h" //file containing the actual grammar - separated to ease reading + +/** Function that parses the passed string (represented via its iterators) into an AST::Node */ +template +AST::Node parse(const IteratorT & begin, const IteratorT & end) +{ + using LinePosIteratorT = spirit::line_pos_iterator; + + using SkipperGrammarT = SkipperGrammar; + using ParserGrammarT = Grammar; + + SkipperGrammarT skipper; + ParserGrammarT grammar; + LinePosIteratorT posIterBegin( begin ); + LinePosIteratorT posIterEnd( end ); + + AST::Node result; + + const bool parseResult = qi::phrase_parse( posIterBegin, + posIterEnd, + grammar, + skipper, + result ); + + if( not (parseResult && posIterBegin == posIterEnd) ) + { + QString line = toString( LinePosIteratorT(begin), LinePosIteratorT(end) ); + QString left = toString( posIterBegin, posIterEnd ); + + if (line == left) + throw SireMol::parse_error( QObject::tr( + "Failed to parse any of the selection '%1'." + ).arg(line), CODELOC); + else + throw SireMol::parse_error( QObject::tr( + "Failed to parse the selection '%1'. " + "Successfully parsed the beginning, but failed to parse '%2'.") + .arg(line).arg(left), CODELOC ); + } + + return result; +} + +/** Function used internally to associate a user token with a user-specified selection */ +static void set_token(const std::string &token, const std::string &str) +{ + //first parse this into an AST::Node + auto node = parse( str.begin(), str.end() ); + + if (node.values.size() != 1) + throw SireMol::parse_error( QObject::tr( + "Cannot set a token based on a multi-line selection!"), CODELOC ); + + QMutexLocker lkr(tokensMutex()); + + if (_user_tokens == 0) + _user_tokens = new UserTokens(); + + _user_tokens->add(token, AST::IDUser(token,node.values[0].value)); +} + +static bool has_token(const std::string &token) +{ + QMutexLocker lkr(tokensMutex()); + + if (_user_tokens == 0) + return false; + + return _user_tokens->find(token) != 0; +} + +static QString get_token(const std::string &token) +{ + QMutexLocker lkr(tokensMutex()); + + if (_user_tokens == 0) + throw SireError::invalid_key( QObject::tr( + "There is no user token '%1'").arg(QString::fromStdString(token)), CODELOC); + + auto p = _user_tokens->find(token); + + if (p == 0) + throw SireError::invalid_key( QObject::tr( + "There is no user token '%1'").arg(QString::fromStdString(token)), CODELOC); + + return expression_to_string(p->value); +} + +static void delete_token(const std::string &token) +{ + QMutexLocker lkr(tokensMutex()); + + if (_user_tokens == 0) + return; + + auto p = _user_tokens->find(token); + + if (p) + _user_tokens->remove(token); +} + +/** Function used internally to parse a string into an AST::Node */ +static AST::Node parse_main(const std::string &str) +{ + // Read file contents. + return parse( str.begin(), str.end() ); +} + +namespace SireSearch +{ + namespace parser + { + SearchParser::SearchParser() : SireMol::parser::Parser() + {} + + SearchParser::~SearchParser() + {} + + void SearchParser::install() + { + SireMol::parser::Parser::install_parser(new SearchParser()); + } + + void SearchParser::set_token(const QString &token, const QString &selection) + { + ::set_token(token.toStdString(), selection.toStdString()); + } + + bool SearchParser::has_token(const QString &token) + { + return ::has_token(token.toStdString()); + } + + QString SearchParser::get_token(const QString &token) + { + return ::get_token(token.toStdString()); + } + + void SearchParser::delete_token(const QString &token) + { + ::delete_token(token.toStdString()); + } + + void SearchParser::delete_all_tokens() + { + ::reset_tokens(); + } + + void SearchParser::reset_tokens() + { + ::reset_tokens(); + } + + SireMol::parser::SelectEnginePtr SearchParser::parse(const QString &str) + { + auto ast = ::parse_main( str.toStdString() ); + + auto engine = ast.toEngine(); + + if (engine.get()) + engine = engine->simplify(); + + return engine; + } + } +} diff --git a/corelib/src/libs/SireSearch/parser.h b/corelib/src/libs/SireSearch/parser.h new file mode 100644 index 000000000..9069b57cd --- /dev/null +++ b/corelib/src/libs/SireSearch/parser.h @@ -0,0 +1,71 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2018 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#ifndef SIRESEARCH_PARSER_H +#define SIRESEARCH_PARSER_H + +#include "SireMol/select.h" +#include "SireMol/parser.h" + +SIRE_BEGIN_HEADER + +namespace SireSearch +{ + +namespace parser +{ + void set_token(const QString &token, const QString &selection); + void reset_tokens(); + + SireMol::parser::SelectEnginePtr parse(const QString &str); + + class SIRESEARCH_EXPORT SearchParser : public SireMol::parser::Parser + { + public: + SearchParser(); + ~SearchParser(); + + static void install(); + + void set_token(const QString &token, const QString &selection); + bool has_token(const QString &token); + QString get_token(const QString &token); + void delete_token(const QString &token); + void delete_all_tokens(); + + void reset_tokens(); + + SireMol::parser::SelectEnginePtr parse(const QString &str); + }; +} + +} + +SIRE_END_HEADER + +#endif diff --git a/corelib/src/libs/SireSearch/register_siresearch.cpp b/corelib/src/libs/SireSearch/register_siresearch.cpp new file mode 100644 index 000000000..d4c6b5c93 --- /dev/null +++ b/corelib/src/libs/SireSearch/register_siresearch.cpp @@ -0,0 +1,34 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2008 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include "SireStream/streamdata.hpp" +#include "SireStream/version_error_impl.h" + +using namespace SireStream; + +static const RegisterLibrary *registry = new RegisterLibrary( QString("SireSearch"), 1, 1 ); diff --git a/corelib/src/libs/SireSystem/create_test_molecule.cpp b/corelib/src/libs/SireSystem/create_test_molecule.cpp index a52aa8903..95ff08429 100644 --- a/corelib/src/libs/SireSystem/create_test_molecule.cpp +++ b/corelib/src/libs/SireSystem/create_test_molecule.cpp @@ -13,6 +13,8 @@ #include "SireMol/moleditor.h" #include "SireMol/atomnum.h" #include "SireMol/resnum.h" +#include "SireMol/core.h" + #include "create_test_molecule.h" diff --git a/corelib/src/libs/SireSystem/idassigner.cpp b/corelib/src/libs/SireSystem/idassigner.cpp index 7a8b4c487..2b931100f 100644 --- a/corelib/src/libs/SireSystem/idassigner.cpp +++ b/corelib/src/libs/SireSystem/idassigner.cpp @@ -69,47 +69,47 @@ static const RegisterMetaType r_idassigner; QDataStream &operator<<(QDataStream &ds, const IDAssigner &idassigner) { writeHeader(ds, r_idassigner, 2); - + SharedDataStream sds(ds); - + sds << idassigner.molgroup << idassigner.identity_points << idassigner.spce << idassigner.map; - + return ds; } QDataStream &operator>>(QDataStream &ds, IDAssigner &idassigner) { VersionID v = readHeader(ds, r_idassigner); - + if (v == 2) { SharedDataStream sds(ds); - + MolGroupPtr molgroup; QVector points; SpacePtr space; PropertyMap map; - + sds >> molgroup >> points >> space >> map; - + idassigner = IDAssigner(points, molgroup, space, map); } else if (v == 1) { SharedDataStream sds(ds); - + MolGroupPtr molgroup; QVector points; PropertyMap map; - + sds >> molgroup >> points >> map; - + idassigner = IDAssigner(points, molgroup, map); } else throw version_error(v, "1,2", r_idassigner, CODELOC); - + return ds; } @@ -134,19 +134,19 @@ void IDAssigner::validateGroup(const MoleculeGroup &new_group) const { //run through each molecule and ensure that the coordinate properties //of them all are compatible - + if (new_group.nMolecules() < 2) return; - + const PropertyName &coords_property = map["coordinates"]; - + const ViewsOfMol &first_mol = new_group.moleculeAt(0); - + const AtomCoords &coords = first_mol.data().property(coords_property) .asA(); - - for ( Molecules::const_iterator it = new_group.constBegin(); - it != new_group.constEnd(); + + for ( Molecules::const_iterator it = new_group.constBegin(); + it != new_group.constEnd(); ++it ) { if (not coords.isCompatibleWith(it->data().info())) @@ -163,13 +163,13 @@ void IDAssigner::validateGroup(const MoleculeGroup &new_group) const /** Constructor */ -IDAssigner::IDAssigner() +IDAssigner::IDAssigner() : ConcreteProperty(), distances_changed(false) {} /** Construct to find the identity of the molecules from - 'molgroup' that match the points in 'points' - - this creates a list of n molecules, where the ith molecule + 'molgroup' that match the points in 'points' - + this creates a list of n molecules, where the ith molecule is matched to the ith point */ IDAssigner::IDAssigner(const QVector &points, const MoleculeGroup &group, @@ -186,19 +186,19 @@ IDAssigner::IDAssigner(const QVector &points, if (not identity_points.isEmpty()) { const int npoints = identity_points.count(); - + //construct a CloseMols to record the closest 'npoints' molecules //to each of the identity points points_with_mols.reserve(npoints); - + for (int i=0; irebuildMolToMolNum(); this->recalculateDistances(); this->assignMoleculesToPoints(); @@ -206,8 +206,8 @@ IDAssigner::IDAssigner(const QVector &points, } /** Construct to find the identity of the molecules from - 'molgroup' that match the points in 'points' - - this creates a list of n molecules, where the ith molecule + 'molgroup' that match the points in 'points' - + this creates a list of n molecules, where the ith molecule is matched to the ith point */ IDAssigner::IDAssigner(const QVector &points, const MoleculeGroup &group, @@ -239,14 +239,14 @@ IDAssigner::IDAssigner(const PointRef &point, points.append( PointPtr(point) ); this->operator=( IDAssigner(points,group,space,property_map) ); } - -/** Copy constructor */ + +/** Copy constructor */ IDAssigner::IDAssigner(const IDAssigner &other) : ConcreteProperty(other), molgroup(other.molgroup), identity_points(other.identity_points), spce(other.spce), - map(other.map), + map(other.map), points_with_mols(other.points_with_mols), mol_to_molnum(other.mol_to_molnum), point_distances(other.point_distances), @@ -273,7 +273,7 @@ IDAssigner& IDAssigner::operator=(const IDAssigner &other) point_to_mol = other.point_to_mol; distances_changed = other.distances_changed; } - + return *this; } @@ -322,12 +322,12 @@ const PropertyMap& IDAssigner::propertyMap() const } /** Update the space used to calculate the distances between - the points and the molecules - this returns whether or + the points and the molecules - this returns whether or not the space has changed */ bool IDAssigner::updateSpace(const System &system) { const Space &new_space = system.property(map["space"]).asA(); - + if (spce != new_space) { spce = new_space; @@ -337,16 +337,16 @@ bool IDAssigner::updateSpace(const System &system) return false; } -/** Update the points in this constraint from the passed system - +/** Update the points in this constraint from the passed system - this returns whether or not this changes any points */ bool IDAssigner::updatePoints(const System &system) { int npoints = identity_points.count(); - + const PointPtr *const_points_array = identity_points.constData(); - + bool need_update = false; - + for (int i=0; ivalidateGroup(new_group); } - + molgroup = new_group; return true; } @@ -418,56 +418,56 @@ IDAssigner* IDAssigner::clone() const return new IDAssigner(*this); } -/** Internal function used to recalculate all of the distances^2 +/** Internal function used to recalculate all of the distances^2 between the molecules in 'mol_to_molnum' and all of the identity points */ void IDAssigner::recalculateDistances() { point_distances = QHash(); - + const Molecules &molecules = this->moleculeGroup().molecules(); - + const int nmols = mol_to_molnum.count(); const MolNum *mol_to_molnum_array = mol_to_molnum.constData(); - + point_distances.reserve(nmols); - + const int npoints = identity_points.count(); const PointPtr *const_points_array = identity_points.constData(); - + QVector< Vector > points(npoints); Vector *points_array = points.data(); - + for (int i=0; idata().property(coords_property) .asA(); - + Vector center = coords.array().aaBox().center(); - + NVector distances(npoints); double *distances_array = distances.data(); - + for (int j=0; j(); - + const int npoints = points_with_mols.count(); const QVector &molnums = molgroup.read().molNums(); const int nmols = molnums.count(); - + //reserve space - worst case is we have to record all npoints molecules //from all npoints points, together with the npoints assigned molecules mol_to_molnum.reserve( qMin(nmols, npoints*(npoints+1)) ); - - //loop through the molecules in the order they appear in the + + //loop through the molecules in the order they appear in the //molecule group and see if they are a candidate - the first 'npoints' //molecules are automatically candidates (as they are assigned) for (int i=0; i invert(const QVector &point_to_mol) { QVector mol_to_point = point_to_mol; - + const int *point_to_mol_array = point_to_mol.constData(); int *mol_to_point_array = mol_to_point.data(); - + const int npoints = point_to_mol.count(); - + for (int i=0; i::const_iterator + + QHash::const_iterator it = point_distances.constFind(molnum); - + BOOST_ASSERT( it != point_distances.constEnd() ); - + distmatrix.setRow(i, it.value()); } } @@ -578,23 +578,23 @@ void IDAssigner::assignMoleculesToPoints() //points which have zero distance to all molecules distmatrix = NMatrix(nmols, nmols); distmatrix = distmatrix.transpose(); // change to row-major memory order - + const int nzeroes = nmols - npoints; NVector new_row(npoints + nzeroes); - + for (int i=0; i::const_iterator + + QHash::const_iterator it = point_distances.constFind(molnum); - + BOOST_ASSERT( it != point_distances.constEnd() ); - + const NVector &distances = it.value(); - + memcpy( new_row.data(), distances.constData(), npoints*sizeof(double) ); - + distmatrix.setRow( i, new_row ); } } @@ -609,12 +609,12 @@ void IDAssigner::assignMoleculesToPoints() for (int i=0; i::const_iterator + + QHash::const_iterator it = point_distances.constFind(molnum); - + BOOST_ASSERT( it != point_distances.constEnd() ); - + distmatrix.setRow(i, it.value()); } } @@ -625,22 +625,22 @@ void IDAssigner::assignMoleculesToPoints() { double delta0 = std::numeric_limits::max(); double delta1 = delta0; - + const int nrows = distmatrix.nRows(); const int ncolumns = qMin( distmatrix.nColumns(), npoints ); - + const double *distmatrix_array = distmatrix.constData(); - + for (int i=0; i::max()) //really degenerate! delta1 = 0.1; - + //add a small penalty function that make molecule 'i' prefer //point 'i', or the point as close to point 'i' as possible. This //is used to help remove degeneracies caused by using points with //the same coordinates. If multiple points have the same coordinates, //then the molecule with index closest to the index of the point - //will be preferred - this penalty function has to be kept to + //will be preferred - this penalty function has to be kept to //about 10% of the smallest non-zero difference between distances, //so that it doesn't affect the assignment of points with no degeneracies @@ -685,28 +685,28 @@ void IDAssigner::assignMoleculesToPoints() } } } - + //now calculate optimum assignment of molecules to points that //minimises the total distance between each molecule and its //assigned point point_to_mol = solve_linear_assignment(distmatrix, true); - + point_to_mol = ::invert(point_to_mol); - //if there are more molecules than points, then the last set of + //if there are more molecules than points, then the last set of //molecules are not associated with points. To ensure deterministic //mapping the extra molecules must be ordered so that they are //assigned to the null points in order if (nmols > npoints) { - qSort( point_to_mol.data() + npoints, point_to_mol.data() + nmols ); + std::sort(point_to_mol.data() + npoints, point_to_mol.data() + nmols ); } - + point_to_mol.squeeze(); distances_changed = false; } -/** Return the number of identity points (and thus the number of +/** Return the number of identity points (and thus the number of identified molecules) */ int IDAssigner::nPoints() const { @@ -717,14 +717,14 @@ int IDAssigner::nPoints() const QString IDAssigner::toString() const { QStringList lines; - + for (QVector::const_iterator it = identity_points.constBegin(); it != identity_points.constEnd(); ++it) { lines.append( (*it)->toString() ); } - + return QObject::tr("IDAssigner( points() => [ %1 ], moleculeGroup() = %2 )") .arg(lines.join(", "), molgroup->toString()); } @@ -745,7 +745,7 @@ void IDAssigner::update(const System &system) const int npoints = points_with_mols.count(); bool closemols_changed = false; - + for (int i=0; iassignMoleculesToPoints(); } -/** Returns the list of identified molecules from the system, +/** Returns the list of identified molecules from the system, which are returned in the same order as the list of identity points */ QVector IDAssigner::identifiedMolecules() const { //find each matching molecule in turn const Molecules molecules = this->moleculeGroup().molecules(); - + int n_to_match = qMin( identity_points.count(), molecules.count() ); - + const int *point_to_mol_array = point_to_mol.constData(); QVector matched_mols; matched_mols.reserve(point_to_mol.count()); - + //the match uses mol_to_molnum, as only a subset of molecules //are candidate molecules const MolNum *mol_to_molnum_array = mol_to_molnum.constData(); - + if (mol_to_molnum.count() < n_to_match) throw SireError::program_bug( QObject::tr( "WEIRD: Number of matched molecules is greater than the number of " @@ -793,13 +793,13 @@ QVector IDAssigner::identifiedMolecules() const "identified molecules? %1, %2, %3") .arg(n_to_match).arg(point_to_mol.count()) .arg(Sire::toString(point_to_mol)), CODELOC ); - + for (int i=0; i xx_matricies; - + /** The matrix holding alpha * (X X^T)**-1 */ QVector inv_xx_matricies; - + /** The connectivity of the molecule */ Connectivity connectivity; - + /** The selection of atoms to be polarised - this is empty if all of the atoms are selected */ AtomSelection selected_atoms; - + /** The version number of the molecule for which this data has been calculated */ quint64 molversion; @@ -149,18 +150,18 @@ static void calculateAtomMatrix(AtomIdx atomidx, const AtomCoords &coords, const QSet &bonded_atoms = connectivity.connectionsTo(atomidx); const int nbonded = bonded_atoms.count(); - + //qDebug() << atomidx << "Bonded" << bonded_atoms; - + const double alpha = four_pi_eps0 * polarisability.value(); - + if (nbonded == 0 or alpha < 1e-6) return; //qDebug() << "coords" << coords[ molinfo.cgAtomIdx(atomidx) ].toString(); //qDebug() << "alpha" << polarisability.toString() << four_pi_eps0 << alpha; - //construct the X matrix (matrix of vectors from connected + //construct the X matrix (matrix of vectors from connected //atoms to the this atom { X.resize(nbonded); @@ -171,7 +172,7 @@ static void calculateAtomMatrix(AtomIdx atomidx, const AtomCoords &coords, foreach (AtomIdx bonded_atom, bonded_atoms) { X[i] = coords[ molinfo.cgAtomIdx(bonded_atom) ] - atom_coords; - + ++i; } } @@ -181,8 +182,8 @@ static void calculateAtomMatrix(AtomIdx atomidx, const AtomCoords &coords, //{ // qDebug() << i << X[i].toString(); //} - - //now construct (1/alpha)( X^T X ) + + //now construct (1/alpha)( X^T X ) xx = NMatrix(nbonded, nbonded); const double one_over_alpha = 1 / alpha; @@ -190,7 +191,7 @@ static void calculateAtomMatrix(AtomIdx atomidx, const AtomCoords &coords, for (int i=0; i(); const MoleculeInfoData &molinfo = molview.data().info(); - + connectivity = molview.data().property(connectivity_property) .asA(); - + const AtomPolarisabilities &polarise = molview.data().property(polarise_property) .asA(); @@ -233,27 +234,27 @@ PolariseChargesData::PolariseChargesData(const MoleculeView &molview, //this is the matrix of r vectors QVarLengthArray X; - + if (molview.selectedAll()) { //loop over all of the atoms int nats = coords.nAtoms(); - + for (AtomIdx i(0); i(polchgs); @@ -345,7 +346,7 @@ QDataStream &operator<<(QDataStream &ds, return ds; } -QDataStream &operator>>(QDataStream &ds, +QDataStream &operator>>(QDataStream &ds, PolariseCharges &polchgs) { VersionID v = readHeader(ds, r_polarise_charges); @@ -353,22 +354,22 @@ QDataStream &operator>>(QDataStream &ds, if (v == 2) { SharedDataStream sds(ds); - + polchgs = PolariseCharges(); - - sds >> polchgs.field_component >> polchgs.field_probe + + sds >> polchgs.field_component >> polchgs.field_probe >> polchgs.convergence_limit >> static_cast(polchgs); } else if (v == 1) { SharedDataStream sds(ds); - + polchgs = PolariseCharges(); - - sds >> polchgs.field_component >> polchgs.field_probe + + sds >> polchgs.field_component >> polchgs.field_probe >> static_cast(polchgs); - + polchgs.convergence_limit = 1e-3; } else @@ -395,12 +396,12 @@ void PolariseCharges::setProbe(const Probe &probe) } /** Null constructor */ -PolariseCharges::PolariseCharges() +PolariseCharges::PolariseCharges() : ConcreteProperty(), convergence_limit(1e-3) {} -/** Construct a constraint that uses the total energy field and a +/** Construct a constraint that uses the total energy field and a single unit charge probe to polarise the molecules in 'molgroup' */ PolariseCharges::PolariseCharges(const MoleculeGroup &molgroup, const PropertyMap &map) @@ -411,7 +412,7 @@ PolariseCharges::PolariseCharges(const MoleculeGroup &molgroup, this->setProbe( CoulombProbe( 1*mod_electron ) ); } -/** Construct a constraint that uses the total energy field and +/** Construct a constraint that uses the total energy field and the passed probe to polarise the molecules in 'molgroup' */ PolariseCharges::PolariseCharges(const MoleculeGroup &molgroup, const Probe &probe, const PropertyMap &map) @@ -467,10 +468,10 @@ PolariseCharges& PolariseCharges::operator=(const PolariseCharges &other) moldata = other.moldata; changed_mols = other.changed_mols; convergence_limit = other.convergence_limit; - + ChargeConstraint::operator=(other); } - + return *this; } @@ -479,7 +480,7 @@ bool PolariseCharges::operator==(const PolariseCharges &other) const { return (this == &other) or (field_component == other.field_component and - field_probe == other.field_probe and + field_probe == other.field_probe and convergence_limit == other.convergence_limit and ChargeConstraint::operator==(other)); } @@ -506,7 +507,7 @@ QString PolariseCharges::toString() const return "SireSystem::PolariseCharges"; } -/** Return the component of the forcefield that is used to +/** Return the component of the forcefield that is used to calculate the electrostatic field on the atoms to be polarised */ const Symbol& PolariseCharges::fieldComponent() const @@ -547,43 +548,43 @@ static void calculateCharges(AtomIdx atomidx, return; CGAtomIdx cgatomidx = molinfo.cgAtomIdx(atomidx); - + const QSet &bonded_atoms = connectivity.connectionsTo(atomidx); - + int nbonded = bonded_atoms.count(); - + BOOST_ASSERT(nbonded == alpha_inv_XX.nRows()); - + double phi_a = moltable[cgatomidx.cutGroup()][cgatomidx.atom()].value(); - + //qDebug() << "atom" << atomidx << "phi" << phi_a; - + NVector delta_phi(nbonded); { int i = 0; foreach (AtomIdx bonded_atom, bonded_atoms) { CGAtomIdx bonded_cgatom = molinfo.cgAtomIdx(bonded_atom); - + delta_phi[i] = phi_a - moltable[bonded_cgatom.cutGroup()] [bonded_cgatom.atom()].value(); - + ++i; } } //qDebug() << "delta_phi\n" << delta_phi.toString(); - + NVector delta_q = alpha_inv_XX * delta_phi; - + //qDebug() << "delta_q\n" << delta_q.toString(); - + //calculate the self energy - this is (1 / 2 alpha) p^T X X^T p MolarEnergy self_nrg( 0.5 * delta_q.dot( inv_alpha_XX * delta_q ) ); - + //qDebug() << "self_nrg" << self_nrg.toString(); - - induced_charges.set(cgatomidx, + + induced_charges.set(cgatomidx, induced_charges[cgatomidx] + Charge( -(delta_q.sum()) ) ); //qDebug() << "SUM charges" << delta_q.sum() << induced_charges[cgatomidx]; @@ -592,19 +593,19 @@ static void calculateCharges(AtomIdx atomidx, { int i = 0; - + foreach (AtomIdx bonded_atom, bonded_atoms) { CGAtomIdx bonded_cgatom = molinfo.cgAtomIdx(bonded_atom); - induced_charges.set( bonded_cgatom, - induced_charges[bonded_cgatom] + + induced_charges.set( bonded_cgatom, + induced_charges[bonded_cgatom] + Charge( delta_q[i] ) ); ++i; } } } -static QPair +static QPair calculateCharges(const MoleculeView &molview, const PolariseChargesData &poldata, const MolPotentialTable &moltable) { @@ -613,23 +614,23 @@ calculateCharges(const MoleculeView &molview, const PolariseChargesData &poldata const NMatrix *inv_xx_mat_array = poldata.inv_xx_matricies.constData(); const MoleculeInfoData &molinfo = molview.data().info(); const Connectivity &connectivity = poldata.connectivity; - + AtomCharges induced_charges(molinfo); AtomEnergies selfpol_nrgs(molinfo); - + if (selected_atoms.isEmpty()) { //all of the atoms have been selected int nats = moltable.nValues(); BOOST_ASSERT( nats == poldata.inv_xx_matricies.count() ); - + for (AtomIdx i(0); i(induced_charges, selfpol_nrgs); } -static bool haveConverged(const AtomCharges &new_charges, - const AtomCharges &old_charges, +static bool haveConverged(const AtomCharges &new_charges, + const AtomCharges &old_charges, double convergence_limit) { //calculate the root mean square change in charge double msd = 0; - + const int nchgs = new_charges.nAtoms(); BOOST_ASSERT( old_charges.nAtoms() == nchgs ); - + const Charge *new_array = new_charges.array().constValueData(); const Charge *old_array = old_charges.array().constValueData(); - + for (int i=0; imoleculeGroup().version(); this->updateGroup(system); - + if (old_version.majorVersion() != this->moleculeGroup().version().majorVersion()) moldata.clear(); } @@ -772,13 +773,13 @@ void PolariseCharges::setSystem(const System &system) { QHash< MolNum,SharedDataPointer >::const_iterator it2 = moldata.constFind(it.key()); - + if (it2 == moldata.constEnd()) { moldata.insert( it.key(), SharedDataPointer( new PolariseChargesData( it.value(), - coords_property, + coords_property, connectivity_property, polarise_property) ) ); } @@ -792,30 +793,30 @@ void PolariseCharges::setSystem(const System &system) polarise_property); } } - + it2 = moldata.constFind(it.key()); - + const MolPotentialTable &moltable = potentials.getTable(it.key()); - - QPair result + + QPair result = calculateCharges(it.value(), *(it2.value().constData()), moltable); const AtomCharges &new_charges = result.first; const AtomEnergies &selfpol_nrgs = result.second; - + if (not new_charges.isEmpty()) { Molecule new_mol(it.value()); - + if (new_mol.hasProperty(induced_charges_property)) { const Property &p = new_mol.property(induced_charges_property); - + if (p.isA()) { //have the charges converged? - if ( haveConverged(new_charges, p.asA(), + if ( haveConverged(new_charges, p.asA(), convergence_limit) ) continue; } @@ -826,17 +827,17 @@ void PolariseCharges::setSystem(const System &system) PackedArray2D charges = new_mol.property(fixed_charges_property) .asA() .array(); - + Charge *charges_array = charges.valueData(); const Charge *new_charges_array = new_charges.array().constValueData(); - + BOOST_ASSERT( charges.nValues() == new_charges.array().nValues() ); - + for (int i=0; isetSystem(delta.deltaSystem()); - + if (not changed_mols.isEmpty()) { //qDebug() << "Iteration 1"; @@ -888,31 +889,31 @@ bool PolariseCharges::fullApply(Delta &delta) { //we have to iterate to ensure self-consistent polarisation int n_iterations = 1; - + while (changed and n_iterations < 10) { changed = false; ++n_iterations; - + //qDebug() << "Iteration" << n_iterations; this->setSystem(delta.deltaSystem()); - + if (not changed_mols.isEmpty()) changed = delta.update(changed_mols); } } - + //qDebug() << "Complete!"; - + return true; } } - + return false; } -/** Apply this constraint based on the delta, knowing that the - last application of this constraint was on this system, +/** Apply this constraint based on the delta, knowing that the + last application of this constraint was on this system, at subversion number last_subversion */ bool PolariseCharges::deltaApply(Delta &delta, quint32 last_subversion) { @@ -936,15 +937,15 @@ PolariseChargesFF PolariseCharges::selfEnergyFF() const static const RegisterMetaType r_polchgff; -QDataStream &operator<<(QDataStream &ds, +QDataStream &operator<<(QDataStream &ds, const PolariseChargesFF &polchgff) { writeHeader(ds, r_polchgff, 1); - + SharedDataStream sds(ds); - + sds << polchgff.energy_property << static_cast(polchgff); - + return ds; } @@ -952,20 +953,20 @@ QDataStream &operator>>(QDataStream &ds, PolariseChargesFF &polchgff) { VersionID v = readHeader(ds, r_polchgff); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> polchgff.energy_property >> static_cast(polchgff); polchgff.molnrg = QHash(); - + polchgff._pvt_updateName(); } else throw version_error(v, "1", r_polchgff, CODELOC); - + return ds; } @@ -993,7 +994,7 @@ PolariseChargesFF::PolariseChargesFF(const PolariseCharges &constraint) if molecules are added or removed from the constraint, so you must make sure that you add or remove molecules from this forcefield whenever you add or remove molecules from this constraint */ -PolariseChargesFF::PolariseChargesFF(const QString &name, +PolariseChargesFF::PolariseChargesFF(const QString &name, const PolariseCharges &constraint) : ConcreteProperty(true) { @@ -1029,7 +1030,7 @@ PolariseChargesFF& PolariseChargesFF::operator=(const PolariseChargesFF &other) energy_property = other.energy_property; molnrg = other.molnrg; } - + return *this; } @@ -1069,7 +1070,7 @@ bool PolariseChargesFF::setProperty(const QString &name, const Property &propert "set, so you cannot set the property \"%1\" to the " "value %2.") .arg(name, property.toString()), CODELOC ); - + return false; } @@ -1087,7 +1088,7 @@ const Properties& PolariseChargesFF::properties() const return *(nullProperties()); } -/** This forcefield doesn't contain any properties +/** This forcefield doesn't contain any properties \throw SireBase::missing_property */ @@ -1097,7 +1098,7 @@ const Property& PolariseChargesFF::property(const QString &name) const "The PolariseChargesFF does not contain any properties, so " "it definitely doesn't contain the property \"%1\".") .arg(name), CODELOC ); - + return Property::null(); } @@ -1121,13 +1122,13 @@ void PolariseChargesFF::recalculateEnergy() //loop over all of the molecules in this forcefield Molecules mols = this->molecules(); - + for (Molecules::const_iterator it = mols.constBegin(); it != mols.constEnd(); ++it) { QHash::const_iterator it2 = molnrg.constFind(it.key()); - + if (it2 != molnrg.constEnd()) { nrg += it2.value(); @@ -1144,42 +1145,42 @@ void PolariseChargesFF::recalculateEnergy() const AtomEnergies &selfpol = it.value().data() .property(energy_property) .asA(); - + if (it->selectedAll()) { const MolarEnergy *nrgs_array = selfpol.array().constValueData(); int nats = selfpol.nAtoms(); - + MolarEnergy this_molnrg(0); - + for (int i=0; i nrgs = selfpol.toVector(it->selection()); - + const MolarEnergy *nrgs_array = nrgs.constData(); int nats = nrgs.count(); - + MolarEnergy this_molnrg(0); - + for (int i=0; icomponents().setEnergy(*this, SingleEnergy(nrg)); } @@ -1195,7 +1196,7 @@ void PolariseChargesFF::_pvt_added(const PartialMolecule&, const PropertyMap&) { this->mustNowRecalculateFromScratch(); } - + /** Called when a molecule is remove from this forcefield */ void PolariseChargesFF::_pvt_removed(const PartialMolecule&) { @@ -1232,10 +1233,10 @@ void PolariseChargesFF::_pvt_removedAll() molnrg.clear(); } -/** Called to test if the passed property map would change the +/** Called to test if the passed property map would change the properties used for the passed molecule - in this case it wouldn't, as the properties are fixed */ -bool PolariseChargesFF::_pvt_wouldChangeProperties(SireMol::MolNum, +bool PolariseChargesFF::_pvt_wouldChangeProperties(SireMol::MolNum, const PropertyMap &map) const { return false; @@ -1246,7 +1247,7 @@ void PolariseChargesFF::_pvt_added(const ViewsOfMol&, const PropertyMap&) { this->mustNowRecalculateFromScratch(); } - + /** Called when a molecule is removed from this forcefield */ void PolariseChargesFF::_pvt_removed(const ViewsOfMol&) { diff --git a/corelib/src/libs/SireSystem/system.cpp b/corelib/src/libs/SireSystem/system.cpp index 71c9fded5..2395e34b2 100644 --- a/corelib/src/libs/SireSystem/system.cpp +++ b/corelib/src/libs/SireSystem/system.cpp @@ -79,7 +79,7 @@ static VersionRegistry& systemRegistry() //need to make this thread-safe... system_registry = new VersionRegistry(); } - + return *system_registry; } @@ -91,10 +91,10 @@ static VersionRegistry& systemRegistry() void System::reindex() { MolGroupsBase::clearIndex(); - + QList mgnums0 = molgroups[0]->mgNums(); QList mgnums1 = molgroups[1]->mgNums(); - + foreach (MGNum mgnum, mgnums0) { MolGroupsBase::addToIndex(molgroups[0]->at(mgnum)); @@ -111,17 +111,17 @@ void System::rebuildIndex() { //rebuild our index... mgroups_by_num.clear(); - + QList mgnums0 = molgroups[0]->mgNums(); QList mgnums1 = molgroups[1]->mgNums(); - + mgroups_by_num.reserve( mgnums0.count() + mgnums1.count() ); - + foreach (MGNum mgnum, mgnums0) { mgroups_by_num.insert( mgnum, 0 ); } - + foreach (MGNum mgnum, mgnums1) { if (mgroups_by_num.contains(mgnum)) @@ -129,13 +129,13 @@ void System::rebuildIndex() "It should not be possible for a System to contain two molecule " "groups that both contain the same number... (%1)") .arg(mgnum), CODELOC ); - + mgroups_by_num.insert( mgnum, 1 ); } - + //now rebuild the index of molecules MolGroupsBase::clearIndex(); - + foreach (MGNum mgnum, mgnums0) { MolGroupsBase::addToIndex(molgroups[0]->at(mgnum)); @@ -156,28 +156,28 @@ QDataStream &operator<<(QDataStream &ds, const System &system) qDebug() << "SYSTEM NEEDS ACCEPTING"; writeHeader(ds, r_system, 3); - + if (system.subversion != 0) throw SireError::program_bug( QObject::tr( "It is a mistake to try and save a system that is in a " "temporarily invalid state (i.e. has non-zero subversion number). " "The subversion number for %1 is %2.") .arg(system.toString()).arg(system.subversion), CODELOC ); - - + + SharedDataStream sds(ds); - + //first try to save all of the loaded LJ parameter types. This will //help ensure that the LJID of parameters don't change too much between //save and loads, which will help with memory consumption... SireMM::LJDBIOLock dblock = SireMM::LJParameterDB::saveParameters(sds); - + sds << system.uid << system.sysname - << system.molgroups[0] << system.molgroups[1] + << system.molgroups[0] << system.molgroups[1] << system.sysmonitors << system.cons << static_cast(system); - + return ds; } @@ -185,56 +185,56 @@ QDataStream &operator<<(QDataStream &ds, const System &system) QDataStream &operator>>(QDataStream &ds, System &system) { VersionID v = readHeader(ds, r_system); - + if (v == 3) { SharedDataStream sds(ds); - + SireMM::LJDBIOLock dblock = SireMM::LJParameterDB::loadParameters(sds); - + sds >> system.uid >> system.sysname - >> system.molgroups[0] >> system.molgroups[1] + >> system.molgroups[0] >> system.molgroups[1] >> system.sysmonitors >> system.cons >> static_cast(system); system.rebuildIndex(); - + system.sysversion = systemRegistry().registerObject(system.uid); system.subversion = 0; } else if (v == 2) { SharedDataStream sds(ds); - + sds >> system.uid >> system.sysname - >> system.molgroups[0] >> system.molgroups[1] + >> system.molgroups[0] >> system.molgroups[1] >> system.sysmonitors >> system.cons >> static_cast(system); system.rebuildIndex(); - + system.sysversion = systemRegistry().registerObject(system.uid); system.subversion = 0; } else if (v == 1) { SharedDataStream sds(ds); - + sds >> system.uid >> system.sysname - >> system.molgroups[0] >> system.molgroups[1] + >> system.molgroups[0] >> system.molgroups[1] >> system.sysmonitors >> static_cast(system); system.rebuildIndex(); - + system.sysversion = systemRegistry().registerObject(system.uid); system.subversion = 0; } else throw version_error(v, "1,2", r_system, CODELOC); - + return ds; } @@ -297,14 +297,14 @@ System& System::operator=(const System &other) cons = other.cons; mgroups_by_num = other.mgroups_by_num; subversion = other.subversion; - + MolGroupsBase::operator=(other); } - + return *this; } -/** Comparison operator - two systems are equal if they have the +/** Comparison operator - two systems are equal if they have the same UID and version */ bool System::operator==(const System &other) const { @@ -312,7 +312,7 @@ bool System::operator==(const System &other) const subversion == other.subversion; } -/** Comparison operator - two systems are equal if they have the +/** Comparison operator - two systems are equal if they have the same UID and version */ bool System::operator!=(const System &other) const { @@ -327,14 +327,14 @@ ForceFields& System::_pvt_forceFields() return molgroups[0].edit().asA(); } -/** Return a reference to all of the forcefields in this system */ +/** Return a reference to all of the forcefields in this system */ const ForceFields& System::_pvt_forceFields() const { BOOST_ASSERT( molgroups[0]->isA() ); return molgroups[0]->asA(); } -/** Return a reference to all of the forcefields in this system */ +/** Return a reference to all of the forcefields in this system */ const ForceFields& System::_pvt_constForceFields() const { return this->_pvt_forceFields(); @@ -374,37 +374,37 @@ void System::_pvt_throwMissingGroup(MGNum mgnum) const /** Return the set of molecule groups that contains the molecule group with number 'mgnum' - + \throw SireMol::missing_group */ MolGroupsBase& System::_pvt_moleculeGroups(MGNum mgnum) { int idx = mgroups_by_num.value(mgnum, -1); - + if (idx == -1) this->_pvt_throwMissingGroup(mgnum); - + return molgroups[idx].edit(); } /** Return the set of molecule groups that contains the molecule group with number 'mgnum' - + \throw SireMol::missing_group */ const MolGroupsBase& System::_pvt_moleculeGroups(MGNum mgnum) const { int idx = mgroups_by_num.value(mgnum, -1); - + if (idx == -1) this->_pvt_throwMissingGroup(mgnum); - + return molgroups[idx].read(); } /** Return the set of molecule groups that contains the molecule group with number 'mgnum' - + \throw SireMol::missing_group */ const MolGroupsBase& System::_pvt_constMoleculeGroups(MGNum mgnum) const @@ -419,10 +419,10 @@ const MolGroupsBase& System::_pvt_constMoleculeGroups(MGNum mgnum) const const MoleculeGroup& System::_pvt_moleculeGroup(MGNum mgnum) const { int idx = mgroups_by_num.value(mgnum, -1); - + if (idx == -1) this->_pvt_throwMissingGroup(mgnum); - + return molgroups[idx]->at(mgnum); } @@ -437,7 +437,7 @@ void System::getGroups(const QList &mgnums, QVarLengthArray &groups) const { groups.clear(); - + foreach (MGNum mgnum, mgnums) { groups.append( &(this->_pvt_moleculeGroup(mgnum)) ); @@ -448,22 +448,22 @@ void System::getGroups(const QList &mgnums, QHash System::getGroups() const { QHash groups; - + QList mgnums0 = molgroups[0]->mgNums(); QList mgnums1 = molgroups[1]->mgNums(); groups.reserve(mgnums0.count() + mgnums1.count()); - + foreach (MGNum mgnum, mgnums0) { groups.insert( mgnum, &(molgroups[0]->at(mgnum)) ); } - + foreach (MGNum mgnum, mgnums1) { groups.insert( mgnum, &(molgroups[1]->at(mgnum)) ); } - + return groups; } @@ -521,6 +521,21 @@ ViewsOfMol System::operator[](const MolID &molid) const return MolGroupsBase::operator[](molid); } +ViewsOfMol System::operator[](int i) const +{ + return MolGroupsBase::operator[](i); +} + +ViewsOfMol System::operator[](const QString &name) const +{ + return MolGroupsBase::operator[](name); +} + +QList System::operator[](const SireBase::Slice &slice) const +{ + return MolGroupsBase::operator[](slice); +} + /** Convienient syntax for System::add */ System& System::operator+=(const FF &forcefield) { @@ -599,15 +614,21 @@ System& System::operator-=(const Constraints &constraints) } /** Set the name of this system */ -void System::setName(const QString &newname) +void System::setName(const SysName &newname) { - if (sysname != SysName(newname)) + if (sysname != newname) { - sysname = SysName(newname); + sysname = newname; sysversion.incrementMajor(); } } +/** Set the name of this system */ +void System::setName(const QString &newname) +{ + this->setName(SysName(newname)); +} + /** Collect statistics about the current configuration */ void System::collectStats() { @@ -670,9 +691,9 @@ const FF& System::forceField(const FFID &ffid) const return this->_pvt_forceFields().forceField(ffid); } -/** Return the forcefield that contains the molecule group +/** Return the forcefield that contains the molecule group identified by the ID 'mgid' - + \throw SireMol::missing_group \throw SireMol::duplicate_group \throw SireError::invalid_index @@ -736,12 +757,28 @@ const FFName& System::ffName(const FFID &ffid) const /** Return a string representation of this system */ QString System::toString() const { - return QString("System( name=%1, nForceFields=%2, nMolecules=%3 " - "nMonitors()=%4 )") - .arg(this->name()) - .arg(this->nForceFields()) - .arg(this->nMolecules()) - .arg(this->nMonitors()); + QStringList parts; + + parts.append(QString("name=%1").arg(this->name())); + parts.append(QString("num_molecules=%1").arg(this->nMolecules())); + + if (this->nForceFields() > 0) + parts.append(QString("num_force_fields=%1").arg(this->nForceFields())); + + if (this->nMonitors() > 0) + parts.append(QString("num_monitors=%1").arg(this->nMonitors())); + + if (parts.count() < 4) + { + parts.insert(2, QString("num_atoms=%1").arg(this->nAtoms())); + } + + if (parts.count() < 5) + { + parts.insert(2, QString("num_residues=%1").arg(this->nResidues())); + } + + return QString("System( %1 )").arg(parts.join(" ")); } /** Return the symbol that represents the total energy component @@ -759,7 +796,7 @@ MolarEnergy System::energy() /** Return the total energy of the energy component in this system that is identified by the energy component 'component' - + \throw SireFF::missing_component */ MolarEnergy System::energy(const Symbol &component) @@ -767,7 +804,7 @@ MolarEnergy System::energy(const Symbol &component) return this->_pvt_forceFields().energy(component); } -/** Return the total energytable in this system +/** Return the total energytable in this system */ void System::energy(EnergyTable &energytable, double scale_energy) { @@ -784,7 +821,7 @@ void System::energy(EnergyTable &energytable, const Symbol &component, /** Return the energies of the energy components of this system whose symbols are in 'components' - + \throw SireFF::missing_component */ Values System::energies(const QSet &components) @@ -814,7 +851,7 @@ bool System::hasEnergyComponent(const Symbol &component) const } /** Set the energy component 'symbol' equal to the expression 'expression' */ -void System::setEnergyComponent(const Symbol &symbol, +void System::setEnergyComponent(const Symbol &symbol, const Expression &expression) { if (this->hasComponent(symbol)) @@ -824,7 +861,7 @@ void System::setEnergyComponent(const Symbol &symbol, } SaveState old_state = SaveState::save(*this); - + try { this->_pvt_forceFields().setEnergyComponent(symbol, expression); @@ -849,8 +886,8 @@ Values System::energyComponents() { return this->_pvt_forceFields().energyComponents(); } - -/** Return the energy expression for the energy component 'component' + +/** Return the energy expression for the energy component 'component' \throw SireFF::missing_component */ @@ -861,7 +898,7 @@ Expression System::energyExpression(const Symbol &component) const /** Return the energy expressions for the energy components whose symbols are in 'symbols' - + \throw SireFF::missing_component */ QHash System::energyExpressions(const QSet &symbols) const @@ -874,7 +911,7 @@ QHash System::energyExpressions() const { return this->_pvt_forceFields().energyExpressions(); } - + /** Return the constant value for the constant component 'component' \throw SireFF::missing_component @@ -892,7 +929,7 @@ Values System::constants() const /** Return the values of the constant components whose symbols are in 'components' - + \throw SireFF::missing_component */ Values System::constants(const QSet &components) const @@ -902,7 +939,7 @@ Values System::constants(const QSet &components) const /** Return whether or not the system component 'component' is a constant component - + \throw SireFF::missing_component */ bool System::isConstantComponent(const Symbol &component) const @@ -938,13 +975,13 @@ void System::setConstantComponent(const Symbol &symbol, if (this->hasConstantComponent(symbol)) { Expression ex = this->constantExpression(symbol); - + if (ex == expression) return; } - + SaveState old_state = SaveState::save(*this); - + try { this->_pvt_forceFields().setConstantComponent(symbol, expression); @@ -980,9 +1017,9 @@ Values System::constantComponents() const return this->_pvt_forceFields().constantComponents(); } -/** Return the expression that defines the constant component with +/** Return the expression that defines the constant component with symbol 'symbol' - + \throw SireFF::missing_component */ Expression System::constantExpression(const Symbol &symbol) const @@ -992,7 +1029,7 @@ Expression System::constantExpression(const Symbol &symbol) const /** Return the expressions that define the constant components whose symbols are in 'symbols' - + \throw SireFF::missing_component */ QHash System::constantExpressions(const QSet &symbols) const @@ -1037,7 +1074,7 @@ Values System::componentValues() } /** Return the value of the energy or constant component - with symbol 'symbol' + with symbol 'symbol' \throw SireFF::missing_component */ @@ -1048,7 +1085,7 @@ double System::componentValue(const Symbol &symbol) /** Retunr the value of the energy or constant component values whose symbols are in 'symbols' - + \throw SireFF::missing_component */ Values System::componentValues(const QSet &symbols) @@ -1065,7 +1102,7 @@ bool System::hasComponent(const Symbol &symbol) const /** Return the expression that defines the component represented by the symbol 'symbol' - + \throw SireFF::missing_component */ Expression System::componentExpression(const Symbol &symbol) const @@ -1075,7 +1112,7 @@ Expression System::componentExpression(const Symbol &symbol) const /** Return the expressions that define the components whose symbols are in 'symbols' - + \throw SireFF::missing_component */ QHash System::componentExpressions(const QSet &symbols) const @@ -1091,7 +1128,7 @@ QHash System::componentExpressions() const } /** Add the forces acting on the molecules in the forcetable 'forcetable' - from this system onto this forcetable, scaled by the optionally + from this system onto this forcetable, scaled by the optionally supplied 'scale_force' */ void System::force(ForceTable &forcetable, double scale_force) { @@ -1099,7 +1136,7 @@ void System::force(ForceTable &forcetable, double scale_force) } /** Add the forces acting on the molecules in the forcetable 'forcetable' - from the component of this system identified by 'component' onto + from the component of this system identified by 'component' onto this forcetable, scaled by the optionally supplied 'scale_force' */ void System::force(ForceTable &forcetable, const Symbol &component, double scale_force) @@ -1108,7 +1145,7 @@ void System::force(ForceTable &forcetable, const Symbol &component, } /** Add the fields acting on the molecules in the fieldtable 'fieldtable' - from this system onto this fieldtable, scaled by the optionally + from this system onto this fieldtable, scaled by the optionally supplied 'scale_field' */ void System::field(FieldTable &fieldtable, double scale_field) { @@ -1116,7 +1153,7 @@ void System::field(FieldTable &fieldtable, double scale_field) } /** Add the fields acting on the molecules in the fieldtable 'fieldtable' - from the component of this system identified by 'component' onto + from the component of this system identified by 'component' onto this fieldtable, scaled by the optionally supplied 'scale_field' */ void System::field(FieldTable &fieldtable, const Symbol &component, double scale_field) @@ -1125,7 +1162,7 @@ void System::field(FieldTable &fieldtable, const Symbol &component, } /** Add the fields acting on the molecules in the fieldtable 'fieldtable' - from this system onto this fieldtable, scaled by the optionally + from this system onto this fieldtable, scaled by the optionally supplied 'scale_field' */ void System::field(FieldTable &fieldtable, const Probe &probe, double scale_field) { @@ -1133,7 +1170,7 @@ void System::field(FieldTable &fieldtable, const Probe &probe, double scale_fiel } /** Add the fields acting on the molecules in the fieldtable 'fieldtable' - from the component of this system identified by 'component' onto + from the component of this system identified by 'component' onto this fieldtable, scaled by the optionally supplied 'scale_field' */ void System::field(FieldTable &fieldtable, const Symbol &component, const Probe &probe, double scale_field) @@ -1142,7 +1179,7 @@ void System::field(FieldTable &fieldtable, const Symbol &component, } /** Add the potentials acting on the molecules in the potential table 'pottable' - from this system onto this potential table, scaled by the optionally + from this system onto this potential table, scaled by the optionally supplied 'scale_potential' */ void System::potential(PotentialTable &pottable, double scale_potential) { @@ -1150,7 +1187,7 @@ void System::potential(PotentialTable &pottable, double scale_potential) } /** Add the potentials acting on the molecules in the potential table 'pottable' - from the component of this system identified by 'component' onto + from the component of this system identified by 'component' onto this potential table, scaled by the optionally supplied 'scale_potential' */ void System::potential(PotentialTable &pottable, const Symbol &component, double scale_potential) @@ -1159,7 +1196,7 @@ void System::potential(PotentialTable &pottable, const Symbol &component, } /** Add the potentials acting on the molecules in the potential table 'pottable' - from this system onto this potential table, scaled by the optionally + from this system onto this potential table, scaled by the optionally supplied 'scale_potential' */ void System::potential(PotentialTable &pottable, const Probe &probe, double scale_potential) @@ -1168,18 +1205,18 @@ void System::potential(PotentialTable &pottable, const Probe &probe, } /** Add the potentials acting on the molecules in the potential table 'pottable' - from the component of this system identified by 'component' onto + from the component of this system identified by 'component' onto this potential table, scaled by the optionally supplied 'scale_potential' */ void System::potential(PotentialTable &pottable, const Symbol &component, const Probe &probe, double scale_potential) { - this->_pvt_forceFields().potential(pottable, component, + this->_pvt_forceFields().potential(pottable, component, probe, scale_potential); } -/** Set the value of the property called 'name' to the value 'value' in +/** Set the value of the property called 'name' to the value 'value' in all forcefields that have this property - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error @@ -1193,7 +1230,7 @@ void System::setProperty(const QString &name, const Property &value) /** Set the value of the property called 'name' in the forcefields identified by the ID 'ffid' to the value 'value' - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error @@ -1204,10 +1241,10 @@ void System::setProperty(const FFID &ffid, const QString &name, const Property & sysversion.incrementMajor(); this->applyConstraints(); } - + /** Remove the property with name 'name'. Note that this can only remove user-level properties - it cannot remove built-in properties - of the system. This does nothing if there is no user-level + of the system. This does nothing if there is no user-level property with this name */ void System::removeProperty(const QString &name) { @@ -1216,14 +1253,14 @@ void System::removeProperty(const QString &name) this->applyConstraints(); } -/** Return whether or not the property 'name' exists and is a compound +/** Return whether or not the property 'name' exists and is a compound property (either a link or a combined property) */ bool System::isCompoundProperty(const QString &name) const { return this->_pvt_forceFields().isCompoundProperty(name); } -/** Return whether or not the property 'name' exists and is a user +/** Return whether or not the property 'name' exists and is a user supplied property (either a compound property or an extra System property) */ bool System::isUserProperty(const QString &name) const @@ -1242,7 +1279,7 @@ bool System::isBuiltinProperty(const QString &name) const the property representing the link, or the combined property, and raises an exception if a compound property with this name does not exist - + \throw SireBase::missing_property */ const Property& System::compoundProperty(const QString &name) const @@ -1252,7 +1289,7 @@ const Property& System::compoundProperty(const QString &name) const /** Return the user-supplied property at 'name'. This raises an exception if there is no user-supplied property with this name - + \throw SireBase::missing_property */ const Property& System::userProperty(const QString &name) const @@ -1263,7 +1300,7 @@ const Property& System::userProperty(const QString &name) const /** Return the built-in property at 'name'. This will by-pass any user-supplied property with this name, and will raise an exception if there is no built-in property with this name - + \throw SireBase::missing_property */ const Property& System::builtinProperty(const QString &name) const @@ -1290,9 +1327,9 @@ bool System::constraintsSatisfied() const return cons.areSatisfied(*this); } -/** Return the values of the property called 'name' in all of the +/** Return the values of the property called 'name' in all of the forcefields that contain this property - + \throw SireBase::missing_property \throw SireBase::duplicate_property */ @@ -1308,9 +1345,9 @@ const Property& System::property(const PropertyName &name) const } } -/** Return the value of the property 'name' in the forcefield identified +/** Return the value of the property 'name' in the forcefield identified by the ID 'ffid' - + \throw SireBase::duplicate_property \throw SireFF::missing_forcefield \throw SireBase::missing_property @@ -1330,7 +1367,7 @@ QStringList System::propertyKeys() const return this->_pvt_forceFields().propertyKeys(); } -/** Return the names of all of the properties of the forcefields in +/** Return the names of all of the properties of the forcefields in this system that match the ID 'ffid' \throw SireFF::missing_forcefield @@ -1339,7 +1376,7 @@ QStringList System::propertyKeys() const QStringList System::propertyKeys(const FFID &ffid) const { return this->_pvt_forceFields().propertyKeys(ffid); -} +} /** Return whether or not any of the forcefields contain a property called 'name' */ bool System::containsProperty(const QString &name) const @@ -1368,7 +1405,7 @@ bool System::containsProperty(const FFID &ffid, const PropertyName &name) const } /** Return the values of all of the properties of this system - + \throw SireBase::duplicate_property */ Properties System::properties() const @@ -1378,7 +1415,7 @@ Properties System::properties() const /** Return the values of all of the properties of this system that are in the forcefields that match the ID 'ffid' - + \throw SireBase::duplicate_property \throw SireFF::missing_forcefield \throw SireError::invalid_index @@ -1386,8 +1423,8 @@ Properties System::properties() const Properties System::properties(const FFID &ffid) const { return this->_pvt_forceFields().properties(ffid); -} - +} + /** Return the values of all user-level properties of this system */ Properties System::userProperties() const @@ -1477,7 +1514,7 @@ bool System::isClean() const /** Add a system monitor 'monitor', identified by the name 'name', which will be updated every 'frequency' steps. - + \throw SireSystem::duplicate_monitor */ void System::add(const QString &name, const SystemMonitor &monitor, int frequency) @@ -1486,7 +1523,7 @@ void System::add(const QString &name, const SystemMonitor &monitor, int frequenc sysversion.incrementMajor(); } -/** Add the monitors in 'monitors' to this system +/** Add the monitors in 'monitors' to this system \throw SireSystem::duplicate_monitor */ @@ -1496,9 +1533,9 @@ void System::add(const SystemMonitors &monitors) sysversion.incrementMajor(); } -/** Add the monitors in 'monitors', setting the frequency of the +/** Add the monitors in 'monitors', setting the frequency of the new monitors to 'frequency' - + \throw SireSystem::duplicate_monitor */ void System::add(const SystemMonitors &monitors, int frequency) @@ -1517,7 +1554,7 @@ void System::setMonitors(const SystemMonitors &monitors) } } -/** Set the monitors of the system to 'monitors', and reset the +/** Set the monitors of the system to 'monitors', and reset the frequency of all of the monitors so that they are triggered every 'frequency' steps */ void System::setMonitors(const SystemMonitors &monitors, int frequency) @@ -1530,8 +1567,8 @@ void System::setMonitors(const SystemMonitors &monitors, int frequency) /** Add the forcefield 'forcefield' to this system. This will raise an exception if this forcefield (or one with the same name) is already present in this set. Note that if the added - forcefield will be updated to contain the versions of - any molecules that are already present in any of the + forcefield will be updated to contain the versions of + any molecules that are already present in any of the other forcefields. \throw SireFF::duplicate_forcefield @@ -1543,7 +1580,7 @@ void System::add(const FF &forcefield) ff.edit().update( this->matchToExistingVersion(forcefield.molecules()) ); SaveState old_state = SaveState::save(*this); - + try { this->_pvt_forceFields().add(ff.read()); @@ -1559,14 +1596,14 @@ void System::add(const FF &forcefield) } } -/** Add the molecule group 'molgroup' to this system. If this is +/** Add the molecule group 'molgroup' to this system. If this is a molecule group that is part of a forcefield, then the entire forcefield will be added to this system. This will raise - an exception if this molecule group is already present in - this system. Note that the added molecule group will be + an exception if this molecule group is already present in + this system. Note that the added molecule group will be updated to contain the version of the any molecules that are already present in this system - + \throw SireFF::duplicate_forcefield \throw SireMol::duplicate_group */ @@ -1586,13 +1623,13 @@ void System::add(const MoleculeGroup &molgroup) mgroup.edit().update( this->matchToExistingVersion(molgroup.molecules()) ); SaveState old_state = SaveState::save(*this); - + try { this->_pvt_moleculeGroups().add(mgroup); this->rebuildIndex(); sysversion.incrementMajor(); - + this->applyAllConstraints(); } catch(...) @@ -1607,13 +1644,13 @@ void System::add(const MoleculeGroup &molgroup) void System::add(const Constraints &constraints) { SaveState old_state = SaveState::save(*this); - + try { int nconstraints = cons.count(); - + cons.add(constraints); - + if (cons.count() != nconstraints) { sysversion.incrementMajor(); @@ -1640,12 +1677,12 @@ void System::setConstraints(const Constraints &constraints) return; SaveState old_state = SaveState::save(*this); - + try { cons = constraints; sysversion.incrementMajor(); - + this->applyAllConstraints(); } catch(...) @@ -1673,7 +1710,7 @@ void System::remove(const MonitorID &monid) void System::remove(const FFID &ffid) { SaveState old_state = SaveState::save(*this); - + try { this->_pvt_forceFields().remove(ffid); @@ -1690,7 +1727,7 @@ void System::remove(const FFID &ffid) /** Remove the forcefield 'ff'. Note that this removes the forcefield in this system that has the same name as 'ff' - + \throw SireFF::missing_forcefield */ void System::remove(const FF &ff) @@ -1698,10 +1735,10 @@ void System::remove(const FF &ff) this->remove(ff.name()); } -/** Remove the molecule group(s) that match the ID 'mgid'. +/** Remove the molecule group(s) that match the ID 'mgid'. Note that you can't remove molecule groups that are part of a forcefield - + \throw SireMol::missing_group \throw SireError::invalid_index \throw SireError::invalid_arg @@ -1709,22 +1746,22 @@ void System::remove(const FF &ff) bool System::remove(const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + try { bool removed = false; - + foreach (MGNum mgnum, mgnums) { if (mgroups_by_num.value(mgnum) == 0) { const MoleculeGroup &molgroup = this->_pvt_moleculeGroup(mgnum); BOOST_ASSERT( molgroup.isA() ); - + const FF &ff = molgroup.asA().forceField(); - + throw SireError::invalid_arg( QObject::tr( "You cannot remove the molecule group with number %1 " "(that matches the ID %2) as it is part of the forcefield " @@ -1732,24 +1769,27 @@ bool System::remove(const MGID &mgid) .arg(mgnum).arg(mgid.toString()) .arg(ff.name()), CODELOC ); } - + this->_pvt_moleculeGroups().remove(mgnum); this->removeFromIndex(mgnum); mgroups_by_num.remove(mgnum); removed = true; } - - sysversion.incrementMajor(); - this->applyAllConstraints(); - - return true; + + if (removed) + { + sysversion.incrementMajor(); + this->applyAllConstraints(); + + return true; + } } catch(...) { old_state.restore(*this); throw; } - + return false; } @@ -1771,11 +1811,11 @@ bool System::remove(const MoleculeGroup &molgroup) bool System::remove(const MolID &molid) { QList molnums = molid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MolNum molnum, molnums) @@ -1785,10 +1825,10 @@ bool System::remove(const MolID &molid) molgroups[mgroups_by_num.value(mgnum)].edit().remove(molnum, mgnum); mols_removed = true; } - + this->removeFromIndex(molnum); } - + sysversion.incrementMinor(); this->applyAllConstraints(); } @@ -1797,7 +1837,7 @@ bool System::remove(const MolID &molid) old_state.restore(*this); throw; } - + return mols_removed; } @@ -1807,7 +1847,7 @@ void System::remove(const Constraints &constraints) { int nconstraints = cons.count(); cons.remove(constraints); - + if (cons.count() != nconstraints) { sysversion.incrementMajor(); @@ -1832,24 +1872,24 @@ bool System::removeAllMolecules() void System::removeAllMoleculeGroups() { SaveState old_state = SaveState::save(*this); - + try { QList mgnums = this->_pvt_constMoleculeGroups().mgNums(); - + if (not mgnums.isEmpty()) { this->_pvt_moleculeGroups().remove( IDOrSet(mgnums) ); - + foreach (MGNum mgnum, mgnums) { this->removeFromIndex(mgnum); mgroups_by_num.remove(mgnum); } } - + sysversion.incrementMajor(); - + this->applyAllConstraints(); } catch(...) @@ -1877,7 +1917,7 @@ void System::removeAllForceFields() return; SaveState old_state = SaveState::save(*this); - + try { QList mgnums = this->_pvt_forceFields().mgNums(); @@ -1888,9 +1928,9 @@ void System::removeAllForceFields() this->removeFromIndex(mgnum); mgroups_by_num.remove(mgnum); } - + sysversion.incrementMajor(); - + this->applyAllConstraints(); } catch(...) @@ -1907,7 +1947,7 @@ void System::removeAllConstraints() return; cons = Constraints(); - + sysversion.incrementMajor(); } @@ -1925,7 +1965,7 @@ const MoleculeGroup& System::at(MGNum mgnum) const is used to find the properties required by any forcefields that this molecule may be added to. The version of the molecule already present in this system is used, if such a molecule exists. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -1936,12 +1976,12 @@ void System::add(const MoleculeView &molview, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + PartialMolecule view(molview); view.update( this->matchToExistingVersion(molview.data()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -1950,12 +1990,12 @@ void System::add(const MoleculeView &molview, const MGID &mgid, this->_pvt_forceFields().add(view, mgnum, map); else this->_pvt_moleculeGroups().add(view, mgnum); - + this->addToIndex(mgnum, view.data().number()); } - + sysversion.incrementMinor(); - + this->applyAllConstraints(); } catch(...) @@ -1970,7 +2010,7 @@ void System::add(const MoleculeView &molview, const MGID &mgid, is used to find the properties required by any forcefields that this molecule may be added to. The version of the molecule already present in this system is used, if such a molecule exists. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -1981,12 +2021,12 @@ void System::add(const ViewsOfMol &molviews, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + ViewsOfMol views(molviews); views.update( this->matchToExistingVersion(molviews.data()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -1995,10 +2035,10 @@ void System::add(const ViewsOfMol &molviews, const MGID &mgid, this->_pvt_forceFields().add(views, mgnum, map); else this->_pvt_moleculeGroups().add(views, mgnum); - + this->addToIndex(mgnum, views.number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2015,7 +2055,7 @@ void System::add(const ViewsOfMol &molviews, const MGID &mgid, is used to find the properties required by any forcefields that this molecule may be added to. The version of the molecule already present in this system is used, if such a molecule exists. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2026,11 +2066,11 @@ void System::add(const Molecules &molecules, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + Molecules mols = this->matchToExistingVersion(molecules); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2039,10 +2079,10 @@ void System::add(const Molecules &molecules, const MGID &mgid, this->_pvt_forceFields().add(mols, mgnum, map); else this->_pvt_moleculeGroups().add(mols, mgnum); - + this->addToIndex(mgnum, mols.molNums()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2059,7 +2099,7 @@ void System::add(const Molecules &molecules, const MGID &mgid, is used to find the properties required by any forcefields that this molecule may be added to. The version of the molecule already present in this system is used, if such a molecule exists. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2070,12 +2110,12 @@ void System::add(const MoleculeGroup &molgroup, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + MolGroupPtr group(molgroup); group.edit().update( this->matchToExistingVersion(molgroup.molecules()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2084,10 +2124,10 @@ void System::add(const MoleculeGroup &molgroup, const MGID &mgid, this->_pvt_forceFields().add(group, mgnum, map); else this->_pvt_moleculeGroups().add(group, mgnum); - + this->addToIndex(mgnum, molgroup.molNums().toList()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2102,11 +2142,11 @@ void System::add(const MoleculeGroup &molgroup, const MGID &mgid, /** Add the view of the molecule in 'molview' to the groups identified by 'mgid'. This only adds the view to a group if it doesn't already exist in the group. The version - of the molecule already present in this set is used if + of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2117,12 +2157,12 @@ void System::addIfUnique(const MoleculeView &molview, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + PartialMolecule view(molview); view.update( this->matchToExistingVersion(molview.data()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2131,10 +2171,10 @@ void System::addIfUnique(const MoleculeView &molview, const MGID &mgid, this->_pvt_forceFields().addIfUnique(view, mgnum, map); else this->_pvt_moleculeGroups().addIfUnique(view, mgnum); - + this->addToIndex(mgnum, view.data().number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2149,11 +2189,11 @@ void System::addIfUnique(const MoleculeView &molview, const MGID &mgid, /** Add the views of the molecule in 'molviews' to the groups identified by 'mgid'. This only adds the view to a group if it doesn't already exist in the group. The version - of the molecule already present in this set is used if + of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2164,12 +2204,12 @@ void System::addIfUnique(const ViewsOfMol &molviews, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + ViewsOfMol views(molviews); views.update( this->matchToExistingVersion(molviews.data()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2178,10 +2218,10 @@ void System::addIfUnique(const ViewsOfMol &molviews, const MGID &mgid, this->_pvt_forceFields().addIfUnique(views, mgnum, map); else this->_pvt_moleculeGroups().addIfUnique(views, mgnum); - + this->addToIndex(mgnum, views.number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2196,11 +2236,11 @@ void System::addIfUnique(const ViewsOfMol &molviews, const MGID &mgid, /** Add the views of the molecules in 'molecules' to the groups identified by 'mgid'. This only adds the view to a group if it doesn't already exist in the group. The version - of the molecule already present in this set is used if + of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2211,11 +2251,11 @@ void System::addIfUnique(const Molecules &molecules, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + Molecules mols = this->matchToExistingVersion(molecules); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2224,10 +2264,10 @@ void System::addIfUnique(const Molecules &molecules, const MGID &mgid, this->_pvt_forceFields().addIfUnique(mols, mgnum, map); else this->_pvt_moleculeGroups().addIfUnique(mols, mgnum); - + this->addToIndex(mgnum, mols.molNums()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2242,11 +2282,11 @@ void System::addIfUnique(const Molecules &molecules, const MGID &mgid, /** Add the view of the molecules in the group 'molgroup' to the groups identified by 'mgid'. This only adds the view to a group if it doesn't already exist in the group. The version - of the molecule already present in this set is used if + of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2257,12 +2297,12 @@ void System::addIfUnique(const MoleculeGroup &molgroup, const MGID &mgid, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + MolGroupPtr group(molgroup); group.edit().update( this->matchToExistingVersion(molgroup.molecules()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2271,10 +2311,10 @@ void System::addIfUnique(const MoleculeGroup &molgroup, const MGID &mgid, this->_pvt_forceFields().addIfUnique(group, mgnum, map); else this->_pvt_moleculeGroups().addIfUnique(group, mgnum); - + this->addToIndex(mgnum, molgroup.molNums().toList()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2287,8 +2327,8 @@ void System::addIfUnique(const MoleculeGroup &molgroup, const MGID &mgid, } /** Convenient overload of System::add that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2301,8 +2341,8 @@ void System::add(const MoleculeView &molview, const MGID &mgid) } /** Convenient overload of System::add that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2315,8 +2355,8 @@ void System::add(const ViewsOfMol &molviews, const MGID &mgid) } /** Convenient overload of System::add that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2329,8 +2369,8 @@ void System::add(const Molecules &molecules, const MGID &mgid) } /** Convenient overload of System::add that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2343,8 +2383,8 @@ void System::add(const MoleculeGroup &molgroup, const MGID &mgid) } /** Convenient overload of System::addIfUnique that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2357,8 +2397,8 @@ void System::addIfUnique(const MoleculeView &molview, const MGID &mgid) } /** Convenient overload of System::addIfUnique that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2371,8 +2411,8 @@ void System::addIfUnique(const ViewsOfMol &molviews, const MGID &mgid) } /** Convenient overload of System::addIfUnique that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2385,8 +2425,8 @@ void System::addIfUnique(const Molecules &molecules, const MGID &mgid) } /** Convenient overload of System::addIfUnique that uses the default locations - to find any necessary properties. - + to find any necessary properties. + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index @@ -2406,7 +2446,7 @@ void System::addIfUnique(const MoleculeGroup &molgroup, const MGID &mgid) bool System::removeAll(const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); bool mols_removed = false; @@ -2421,7 +2461,7 @@ bool System::removeAll(const MGID &mgid) mols_removed = true; } } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2431,41 +2471,41 @@ bool System::removeAll(const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } /** Remove the view 'molview' from the specified groups in this forcefield. Note that this only removes the specific view - (and indeed only the first copy of this view if there + (and indeed only the first copy of this view if there are duplicates) - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::remove(const MoleculeView &molview, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) { MolGroupsBase &molgroups = this->_pvt_moleculeGroups(mgnum); - + bool mol_removed = molgroups.remove(molview, mgnum); - + mols_removed = mols_removed or mol_removed; - + if (not molgroups.at(mgnum).contains(molview.data().number())) this->removeFromIndex(mgnum, molview.data().number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2475,40 +2515,40 @@ bool System::remove(const MoleculeView &molview, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } /** Remove the views in 'molviews' from the specified groups in this forcefield. Note that this only removes the specific views - (and indeed only the first copy of this view if there + (and indeed only the first copy of this view if there are duplicates) - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::remove(const ViewsOfMol &molviews, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) { MolGroupsBase &molgroups = this->_pvt_moleculeGroups(mgnum); - + bool mol_removed = molgroups.remove(molviews, mgnum); mols_removed = mols_removed or mol_removed; - + if (not molgroups.at(mgnum).contains(molviews.number())) this->removeFromIndex(mgnum, molviews.number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2518,38 +2558,38 @@ bool System::remove(const ViewsOfMol &molviews, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } /** Remove them molecules in 'molecules' from the specified groups in this forcefield. Note that this only removes the specific views - (and indeed only the first copy of this view if there + (and indeed only the first copy of this view if there are duplicates) - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::remove(const Molecules &molecules, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) { MolGroupsBase &molgroups = this->_pvt_moleculeGroups(mgnum); - + bool mol_removed = molgroups.remove(molecules, mgnum); mols_removed = mols_removed or mol_removed; - + const MoleculeGroup &molgroup = molgroups.at(mgnum); - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) @@ -2558,7 +2598,7 @@ bool System::remove(const Molecules &molecules, const MGID &mgid) this->removeFromIndex(mgnum, it->number()); } } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2568,16 +2608,16 @@ bool System::remove(const Molecules &molecules, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } -/** Remove the views in the molecule group 'molgroup' from the specified +/** Remove the views in the molecule group 'molgroup' from the specified groups in this forcefield. Note that this only removes the specific views - (and indeed only the first copy of this view if there + (and indeed only the first copy of this view if there are duplicates) - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ @@ -2586,34 +2626,34 @@ bool System::remove(const MoleculeGroup &molgroup, const MGID &mgid) return this->remove(molgroup.molecules(), mgid); } -/** Remove the all copies of the view in 'molview' from the specified +/** Remove the all copies of the view in 'molview' from the specified groups in this forcefield. Note that this only removes the specific views - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::removeAll(const MoleculeView &molview, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) { MolGroupsBase &molgroups = this->_pvt_moleculeGroups(mgnum); - + bool mol_removed = molgroups.removeAll(molview, mgnum); mols_removed = mols_removed or mol_removed; - + if (not molgroups.at(mgnum).contains(molview.data().number())) this->removeFromIndex(mgnum, molview.data().number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2623,38 +2663,38 @@ bool System::removeAll(const MoleculeView &molview, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } -/** Remove the all copies of the views in 'molviews' from the specified +/** Remove the all copies of the views in 'molviews' from the specified groups in this forcefield. Note that this only removes the specific views - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::removeAll(const ViewsOfMol &molviews, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) { MolGroupsBase &molgroups = this->_pvt_moleculeGroups(mgnum); - + bool mol_removed = molgroups.removeAll(molviews, mgnum); mols_removed = mols_removed or mol_removed; - + if (not molgroups.at(mgnum).contains(molviews.number())) this->removeFromIndex(mgnum, molviews.number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2664,36 +2704,36 @@ bool System::removeAll(const ViewsOfMol &molviews, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } -/** Remove the all copies of the molecules in 'molecules' from the specified +/** Remove the all copies of the molecules in 'molecules' from the specified groups in this forcefield. Note that this only removes the specific views - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::removeAll(const Molecules &molecules, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) { MolGroupsBase &molgroups = this->_pvt_moleculeGroups(mgnum); - + bool mol_removed = molgroups.removeAll(molecules, mgnum); mols_removed = mols_removed or mol_removed; - + const MoleculeGroup &molgroup = molgroups.at(mgnum); - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) @@ -2702,7 +2742,7 @@ bool System::removeAll(const Molecules &molecules, const MGID &mgid) this->removeFromIndex(mgnum, it->number()); } } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2712,15 +2752,15 @@ bool System::removeAll(const Molecules &molecules, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } -/** Remove the all copies of the molecules in the molecule group 'molgroup' +/** Remove the all copies of the molecules in the molecule group 'molgroup' from the specified groups in this forcefield. Note that this only removes - the specific views - it does not remove the atoms in this view from all + the specific views - it does not remove the atoms in this view from all of the other views - + \throw SireMol::missing_group \throw SireError::invalid_index */ @@ -2731,18 +2771,18 @@ bool System::removeAll(const MoleculeGroup &molgroup, const MGID &mgid) /** Remove all views of the molecule with number 'molnum' from the molecule groups identified by 'mgid' - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::remove(MolNum molnum, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) @@ -2753,7 +2793,7 @@ bool System::remove(MolNum molnum, const MGID &mgid) mols_removed = true; } } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2763,24 +2803,24 @@ bool System::remove(MolNum molnum, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } /** Remove all of the molecules whose numbers are in 'molnums' from all of the molecule groups identified by the ID 'mgid' - + \throw SireMol::missing_group \throw SireError::invalid_index */ bool System::remove(const QSet &molnums, const MGID &mgid) { QList mgnums = mgid.map(*this); - + SaveState old_state = SaveState::save(*this); - + bool mols_removed = false; - + try { foreach (MGNum mgnum, mgnums) @@ -2791,7 +2831,7 @@ bool System::remove(const QSet &molnums, const MGID &mgid) mols_removed = true; } } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -2801,13 +2841,13 @@ bool System::remove(const QSet &molnums, const MGID &mgid) old_state.restore(*this); throw; } - + return mols_removed; } /** Update this system so that it uses the version of the molecule available in 'moldata' - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error @@ -2815,13 +2855,13 @@ bool System::remove(const QSet &molnums, const MGID &mgid) void System::update(const MoleculeData &moldata, bool auto_commit) { Delta delta(*this, auto_commit); - + //this ensures that only a single copy of System is used - prevents //unnecessary copying this->operator=( System() ); delta.update(moldata); this->operator=( delta.apply() ); - + if (auto_commit and this->needsAccepting()) { delta = Delta(); @@ -2831,7 +2871,7 @@ void System::update(const MoleculeData &moldata, bool auto_commit) /** Update this system so that it uses the same version of the molecules present in 'molecules' - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error @@ -2839,13 +2879,13 @@ void System::update(const MoleculeData &moldata, bool auto_commit) void System::update(const Molecules &molecules, bool auto_commit) { Delta delta(*this, auto_commit); - + //this ensures that only a single copy of System is used - prevents //unnecessary copying this->operator=( System() ); delta.update(molecules); this->operator=( delta.apply() ); - + if (auto_commit and this->needsAccepting()) { delta = Delta(); @@ -2855,7 +2895,7 @@ void System::update(const Molecules &molecules, bool auto_commit) /** Update this system so that it uses the same version of the molecules present in the molecule group 'molgroup' - + \throw SireBase::missing_property \throw SireError::invalid_cast \throw SireError::incompatible_error @@ -2867,27 +2907,27 @@ void System::update(const MoleculeGroup &molgroup, bool auto_commit) /** Set the contents of the molecule group(s) identified by the ID 'mgid' so that they contain just the view of the molecule in 'molview'. - The version of the molecule already present in this set is used if + The version of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const MoleculeView &molview, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + PartialMolecule view(molview); view.update( this->matchToExistingVersion(molview.data()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2900,7 +2940,7 @@ void System::setContents(const MGID &mgid, const MoleculeView &molview, this->clearIndex(mgnum); this->addToIndex(mgnum, view.data().number()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); } @@ -2913,27 +2953,27 @@ void System::setContents(const MGID &mgid, const MoleculeView &molview, /** Set the contents of the molecule group(s) identified by the ID 'mgid' so that they contain just the views of the molecule in 'molviews'. - The version of the molecule already present in this set is used if + The version of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const ViewsOfMol &molviews, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + ViewsOfMol views(molviews); views.update( this->matchToExistingVersion(molviews.data()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2946,9 +2986,9 @@ void System::setContents(const MGID &mgid, const ViewsOfMol &molviews, this->clearIndex(mgnum); this->addToIndex(mgnum, views.number()); } - + sysversion.incrementMinor(); - + this->applyAllConstraints(); } catch(...) @@ -2960,26 +3000,26 @@ void System::setContents(const MGID &mgid, const ViewsOfMol &molviews, /** Set the contents of the molecule group(s) identified by the ID 'mgid' so that they contain just the views of the molecules in 'molecules'. - The version of the molecule already present in this set is used if + The version of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const Molecules &molecules, const PropertyMap &map) { QList mgnums = mgid.map(*this); - + Molecules mols = this->matchToExistingVersion(molecules); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -2992,7 +3032,7 @@ void System::setContents(const MGID &mgid, const Molecules &molecules, this->clearIndex(mgnum); this->addToIndex(mgnum, mols.molNums()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -3006,27 +3046,27 @@ void System::setContents(const MGID &mgid, const Molecules &molecules, /** Set the contents of the molecule group(s) identified by the ID 'mgid' so that they contain just the molecules in the group 'molgroup'. - The version of the molecule already present in this set is used if + The version of the molecule already present in this set is used if such a molecule already exists. The supplied property map is used to find the properties required by any forcefields that this molecule may be added to. - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const MoleculeGroup &molgroup, - const PropertyMap &map) + const PropertyMap &map) { QList mgnums = mgid.map(*this); - + MolGroupPtr group(molgroup); group.edit().update( this->matchToExistingVersion(molgroup.molecules()) ); - + SaveState old_state = SaveState::save(*this); - + try { foreach (MGNum mgnum, mgnums) @@ -3039,7 +3079,7 @@ void System::setContents(const MGID &mgid, const MoleculeGroup &molgroup, this->clearIndex(mgnum); this->addToIndex(mgnum, group->molNums().toList()); } - + sysversion.incrementMinor(); this->applyAllConstraints(); @@ -3053,13 +3093,13 @@ void System::setContents(const MGID &mgid, const MoleculeGroup &molgroup, /** Convenient overload of System::setContents that uses the default property locations to find the properties required by the forcefields - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const MoleculeView &molview) { this->setContents(mgid, molview, PropertyMap()); @@ -3067,13 +3107,13 @@ void System::setContents(const MGID &mgid, const MoleculeView &molview) /** Convenient overload of System::setContents that uses the default property locations to find the properties required by the forcefields - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const ViewsOfMol &molviews) { this->setContents(mgid, molviews, PropertyMap()); @@ -3081,13 +3121,13 @@ void System::setContents(const MGID &mgid, const ViewsOfMol &molviews) /** Convenient overload of System::setContents that uses the default property locations to find the properties required by the forcefields - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const Molecules &molecules) { this->setContents(mgid, molecules, PropertyMap()); @@ -3095,13 +3135,13 @@ void System::setContents(const MGID &mgid, const Molecules &molecules) /** Convenient overload of System::setContents that uses the default property locations to find the properties required by the forcefields - + \throw SireMol::missing_group \throw SireBase::missing_property \throw SireError::invalid_index \throw SireError::invalid_cast \throw SireError::incompatible_error -*/ +*/ void System::setContents(const MGID &mgid, const MoleculeGroup &molgroup) { this->setContents(mgid, molgroup, PropertyMap()); @@ -3134,7 +3174,7 @@ bool System::deltaUpdate(const QString &property, const QList &ffidxs, { if (ffidxs.isEmpty()) return false; - + else if (ffidxs.count() == 1) { this->_pvt_forceFields().setProperty(ffidxs.at(0), property, value); @@ -3144,7 +3184,7 @@ bool System::deltaUpdate(const QString &property, const QList &ffidxs, else { SaveState old_state = SaveState::save(*this); - + try { foreach (const FFIdx &ffidx, ffidxs) @@ -3159,7 +3199,7 @@ bool System::deltaUpdate(const QString &property, const QList &ffidxs, old_state.restore(*this); throw; } - + return true; } } @@ -3173,12 +3213,12 @@ bool System::deltaUpdate(const MoleculeData &moldata, bool auto_commit) { if (in_molgroup) this->_pvt_moleculeGroups().update(moldata, auto_commit); - + if (in_ffields) this->_pvt_forceFields().update(moldata, auto_commit); ++subversion; - + return true; } else @@ -3193,15 +3233,15 @@ QList System::deltaUpdate(const Molecules &molecules, bool auto_commit) else if (molecules.count() == 1) { QList molnums; - + if (this->deltaUpdate( molecules.constBegin()->data(), auto_commit )) molnums.append( molecules.constBegin()->data().number() ); - + return molnums; } - + QList changed_mols; - + for (Molecules::const_iterator it = molecules.constBegin(); it != molecules.constEnd(); ++it) @@ -3212,30 +3252,30 @@ QList System::deltaUpdate(const Molecules &molecules, bool auto_commit) changed_mols.append(it.key()); } } - + if (changed_mols.isEmpty()) return changed_mols; - + bool in_molgroup = this->_pvt_constMoleculeGroups().contains(changed_mols); bool in_ffields = this->_pvt_constForceFields().contains(changed_mols); - + if (in_molgroup or in_ffields) { if (in_ffields) this->_pvt_forceFields().update(molecules, auto_commit); - + if (in_molgroup) this->_pvt_moleculeGroups().update(molecules, auto_commit); ++subversion; - + return changed_mols; } else return QList(); } -void System::commitDelta(const Constraints &constraints, +void System::commitDelta(const Constraints &constraints, bool is_minor_change, bool is_major_change) { @@ -3244,14 +3284,14 @@ void System::commitDelta(const Constraints &constraints, try { cons = constraints; - + if (is_major_change) sysversion.incrementMajor(); else if (is_minor_change) sysversion.incrementMinor(); - + subversion = 0; - + cons.committed(*this); } catch(...) diff --git a/corelib/src/libs/SireSystem/system.h b/corelib/src/libs/SireSystem/system.h index f3babaedc..c749b7099 100644 --- a/corelib/src/libs/SireSystem/system.h +++ b/corelib/src/libs/SireSystem/system.h @@ -104,10 +104,10 @@ using SireBase::Version; /** This is a simulation system. If contains molecules, forcefields that provide energy functions of those molecules, and monitors that can monitor the changing state of the system - + @author Christopher Woods */ -class SIRESYSTEM_EXPORT System +class SIRESYSTEM_EXPORT System : public SireBase::ConcreteProperty { @@ -117,15 +117,15 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); public: System(); System(const QString &name); - + System(const System &other); ~System(); - + static const char* typeName(); - + System& operator=(const System &other); - + bool operator==(const System &other) const; bool operator!=(const System &other) const; @@ -135,14 +135,18 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); const SystemMonitor& operator[](const MonitorID &monid) const; const MoleculeGroup& operator[](const MGID &mgid) const; + ViewsOfMol operator[](int i) const; + ViewsOfMol operator[](const QString &name) const; + QList operator[](const SireBase::Slice &slice) const; + ViewsOfMol operator[](MolNum molnum) const; ViewsOfMol operator[](const MolID &molid) const; - + System& operator+=(const FF &forcefield); System& operator+=(const MoleculeGroup &molgroup); System& operator+=(const Constraint &constraint); System& operator+=(const Constraints &constraints); - + System& operator-=(const FF &forcefield); System& operator-=(const MoleculeGroup &molgroup); System& operator-=(const FFID &ffid); @@ -150,12 +154,13 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); System& operator-=(const MolID &molid); System& operator-=(const Constraint &constraint); System& operator-=(const Constraints &constraints); - + const QUuid& UID() const; const SysName& name() const; const Version& version() const; quint32 subVersion() const; + void setName(const SysName &newname); void setName(const QString &newname); void collectStats(); @@ -164,13 +169,13 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); bool constraintsSatisfied() const; using SireMol::MolGroupsBase::at; - + const FF& at(const FFID &ffid) const; const SystemMonitor& at(const MonitorID &monid) const; - + const FF& forceField(const FFID &ffid) const; const FF& forceField(const MGID &mgid) const; - + const SystemMonitor& monitor(const MonitorID &monid) const; QList monitors(const MonitorID &monid) const; @@ -178,104 +183,104 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); int nForceFields() const; int nMonitors() const; int nConstraints() const; - + FFIdx ffIdx(const FFID &ffid) const; - + const FFName& ffName(const FFID &ffid) const; MonitorName monitorName(const MonitorID &monid) const; - + QString toString() const; - + const Symbol& totalComponent() const; - + SireUnits::Dimension::MolarEnergy energy(); SireUnits::Dimension::MolarEnergy energy(const Symbol &component); - + Values energies(); Values energies(const QSet &components); - + bool isEnergyComponent(const Symbol &component) const; bool hasEnergyComponent(const Symbol &component) const; - - void setEnergyComponent(const Symbol &symbol, + + void setEnergyComponent(const Symbol &symbol, const SireCAS::Expression &expression); QSet energySymbols() const; Values energyComponents(); - + SireCAS::Expression energyExpression(const Symbol &expression) const; QHash energyExpressions( const QSet &symbols) const; QHash energyExpressions() const; - + double constant(const Symbol &component) const; - + Values constants() const; Values constants(const QSet &components) const; - + bool isConstantComponent(const Symbol &component) const; bool hasConstantComponent(const Symbol &component) const; - + void setConstant(const Symbol &symbol, double value); void setConstant(const Symbol &symbol, const SireCAS::Expression &expression); - + void setConstantComponent(const Symbol &symbol, double value); void setConstantComponent(const Symbol &symbol, const SireCAS::Expression &expression); QSet constantSymbols() const; Values constantComponents() const; - + SireCAS::Expression constantExpression(const Symbol &symbol) const; QHash constantExpressions( const QSet &symbols) const; QHash constantExpressions() const; - + void setComponent(const Symbol &symbol, double value); void setComponent(const Symbol &symbol, const SireCAS::Expression &expression); - + QSet componentSymbols() const; Values componentValues(); Values componentValues(const QSet &symbols); - + bool hasComponent(const Symbol &symbol) const; double componentValue(const Symbol &symbol); - + SireCAS::Expression componentExpression(const Symbol &symbol) const; QHash componentExpressions( const QSet &symbols) const; QHash componentExpressions() const; - + void energy(EnergyTable &energytable, double scale_energy=1); void energy(EnergyTable &energytable, const Symbol &component, double scale_energy=1); void force(ForceTable &forcetable, double scale_force=1); void force(ForceTable &forcetable, const Symbol &component, double scale_force=1); - + void field(FieldTable &fieldtable, double scale_field=1); void field(FieldTable &fieldtable, const Symbol &component, double scale_field=1); - + void field(FieldTable &fieldtable, const Probe &probe, double scale_field=1); void field(FieldTable &fieldtable, const Symbol &component, const Probe &probe, double scale_field=1); - - void potential(PotentialTable &pottable, const Probe &probe, + + void potential(PotentialTable &pottable, const Probe &probe, double scale_potential=1); void potential(PotentialTable &pottable, const Symbol &component, const Probe &probe, double scale_potential=1); - + void potential(PotentialTable &pottable, double scale_potential=1); void potential(PotentialTable &pottable, const Symbol &component, double scale_potential=1); - + void setProperty(const QString &name, const Property &value); void setProperty(const FFID &ffid, const QString &name, const Property &value); - + void removeProperty(const QString &name); - + bool isCompoundProperty(const QString &name) const; bool isUserProperty(const QString &name) const; bool isBuiltinProperty(const QString &name) const; @@ -283,7 +288,7 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); const Property& compoundProperty(const QString &name) const; const Property& userProperty(const QString &name) const; const Property& builtinProperty(const QString &name) const; - + const Property& property(const PropertyName &name) const; const Property& property(const FFID &ffid, const PropertyName &name) const; @@ -296,52 +301,52 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); bool containsProperty(const PropertyName &name) const; bool containsProperty(const FFID &ffid, const PropertyName &name) const; - + Properties properties() const; Properties properties(const FFID &ffid) const; - + Properties userProperties() const; Properties builtinProperties() const; - + const SystemMonitors& monitors() const; const ForceFields& forceFields() const; const MoleculeGroups& extraGroups() const; const Constraints& constraints() const; - + void clearStatistics(); void clearStatistics(const MonitorID &monid); - + void mustNowRecalculateFromScratch(); - + void accept(); bool needsAccepting() const; - + bool isDirty() const; bool isClean() const; - + using SireMol::MolGroupsBase::add; using SireMol::MolGroupsBase::remove; using SireMol::MolGroupsBase::update; - + void add(const QString &name, const SystemMonitor &monitor, int frequency = 1); - + void add(const SystemMonitors &monitors); void add(const SystemMonitors &monitors, int frequency); - + void setMonitors(const SystemMonitors &monitors); void setMonitors(const SystemMonitors &monitors, int frequency); - + void add(const FF &forcefield); void add(const MoleculeGroup &molgroup); - + void add(const Constraint &constraint); void add(const Constraints &constraints); void setConstraints(const Constraints &constraints); - + void remove(const MonitorID &monid); - + void remove(const FFID &ffid); void remove(const FF &ff); @@ -371,7 +376,7 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); const PropertyMap &map); void add(const MoleculeGroup &molgroup, const MGID &mgid, const PropertyMap &map); - + void addIfUnique(const MoleculeView &molview, const MGID &mgid, const PropertyMap &map); void addIfUnique(const ViewsOfMol &molviews, const MGID &mgid, @@ -380,12 +385,12 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); const PropertyMap &map); void addIfUnique(const MoleculeGroup &molgroup, const MGID &mgid, const PropertyMap &map); - + void add(const MoleculeView &molview, const MGID &mgid); void add(const ViewsOfMol &molviews, const MGID &mgid); void add(const Molecules &molecules, const MGID &mgid); void add(const MoleculeGroup &molgroup, const MGID &mgid); - + void addIfUnique(const MoleculeView &molview, const MGID &mgid); void addIfUnique(const ViewsOfMol &molviews, const MGID &mgid); void addIfUnique(const Molecules &molecules, const MGID &mgid); @@ -398,7 +403,7 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); bool remove(const ViewsOfMol &molviews, const MGID &mgid); bool remove(const Molecules &molecules, const MGID &mgid); bool remove(const MoleculeGroup &molgroup, const MGID &mgid); - + bool removeAll(const MoleculeView &molview, const MGID &mgid); bool removeAll(const ViewsOfMol &molviews, const MGID &mgid); bool removeAll(const Molecules &molecules, const MGID &mgid); @@ -410,7 +415,7 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); void update(const MoleculeData &moldata, bool auto_commit=true); void update(const Molecules &molecules, bool auto_commit=true); void update(const MoleculeGroup &molgroup, bool auto_commit=true); - + void setContents(const MGID &mgid, const MoleculeView &molview, const PropertyMap &map); void setContents(const MGID &mgid, const ViewsOfMol &molviews, @@ -419,17 +424,17 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); const PropertyMap &map); void setContents(const MGID &mgid, const MoleculeGroup &molgroup, const PropertyMap &map); - + void setContents(const MGID &mgid, const MoleculeView &molview); void setContents(const MGID &mgid, const ViewsOfMol &molviews); void setContents(const MGID &mgid, const Molecules &molecules); - void setContents(const MGID &mgid, const MoleculeGroup &molgroup); + void setContents(const MGID &mgid, const MoleculeGroup &molgroup); static const System& null(); protected: const MoleculeGroup& getGroup(MGNum mgnum) const; - + void getGroups(const QList &mgnums, QVarLengthArray &groups) const; @@ -446,11 +451,11 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); bool deltaUpdate(const Symbol &component, double value); bool deltaUpdate(const QString &property, const Property &value); bool deltaUpdate(const QString &property, const FFID &ffid, - const Property &value); + const Property &value); bool deltaUpdate(const QString &property, const QList &ffidxs, const Property &value); - void commitDelta(const Constraints &constraints, + void commitDelta(const Constraints &constraints, bool is_minor_change, bool is_major_change); @@ -463,15 +468,15 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); const ForceFields& _pvt_forceFields() const; MoleculeGroups& _pvt_moleculeGroups(); - + const MoleculeGroups& _pvt_constMoleculeGroups() const; const MoleculeGroups& _pvt_moleculeGroups() const; MolGroupsBase& _pvt_moleculeGroups(MGNum mgnum); - + const MolGroupsBase& _pvt_moleculeGroups(MGNum mgnum) const; const MolGroupsBase& _pvt_constMoleculeGroups(MGNum mgnum) const; - + const MoleculeGroup& _pvt_moleculeGroup(MGNum mgnum) const; void _pvt_throwMissingGroup(MGNum mgnum) const; @@ -482,10 +487,10 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); /** The unique ID for this system */ QUuid uid; - + /** The name of this system */ SysName sysname; - + /** The version number of this system */ MajorMinorVersion sysversion; @@ -499,7 +504,7 @@ friend SIRESYSTEM_EXPORT QDataStream& ::operator>>(QDataStream&, System&); /** All of the constraints that are applied to this system */ Constraints cons; - + /** The index of which of the two set of MoleculeGroups each individual molecule group in this set is in */ QHash mgroups_by_num; diff --git a/corelib/src/libs/SireVol/triclinicbox.cpp b/corelib/src/libs/SireVol/triclinicbox.cpp index 7f9fa7d41..e8708e4d7 100644 --- a/corelib/src/libs/SireVol/triclinicbox.cpp +++ b/corelib/src/libs/SireVol/triclinicbox.cpp @@ -152,14 +152,20 @@ TriclinicBox::TriclinicBox(double a, double b, double c, /** Construct a TriclinicBox with the specified lattice vectors */ void TriclinicBox::construct(const Vector &v0, - const Vector &v1, - const Vector &v2) + const Vector &v1, + const Vector &v2) { // What follows was adapted from Appendex A from Chapter 3 of // "Molecular dynamics of sense and sensibility in processing and analysis of data" // by Tsjerk A. Wassenaar. // https://pure.rug.nl/ws/portalfiles/portal/2839530/03_c3.pdf + // Store the original lattice vectors. These are needed for streaming + // support. + this->v0_orig = v0; + this->v1_orig = v1; + this->v2_orig = v2; + // Get the magnitudes of the lattice box vectors. auto m0 = v0.magnitude(); auto m1 = v1.magnitude(); @@ -324,8 +330,6 @@ void TriclinicBox::construct(const Vector &v0, 1.0/this->v2.magnitude()); } - - /** Copy constructor */ TriclinicBox::TriclinicBox(const TriclinicBox &other) : ConcreteProperty(other), diff --git a/corelib/src/libs/Squire/qmchargeconstraint.cpp b/corelib/src/libs/Squire/qmchargeconstraint.cpp index e42571e3a..f8fb024d7 100644 --- a/corelib/src/libs/Squire/qmchargeconstraint.cpp +++ b/corelib/src/libs/Squire/qmchargeconstraint.cpp @@ -35,6 +35,7 @@ #include "SireMol/mgname.h" #include "SireMol/moleculegroup.h" #include "SireMol/moleditor.h" +#include "SireMol/core.h" #include "SireSystem/system.h" #include "SireSystem/delta.h" @@ -55,12 +56,12 @@ QDataStream &operator<<(QDataStream &ds, const QMChargeConstraint &qmchgconstraint) { writeHeader(ds, r_qmchgconstraint, 1); - + SharedDataStream sds(ds); - + sds << qmchgconstraint.charge_calculator << static_cast(qmchgconstraint); - + return ds; } @@ -69,19 +70,19 @@ QDataStream &operator>>(QDataStream &ds, QMChargeConstraint &qmchgconstraint) { VersionID v = readHeader(ds, r_qmchgconstraint); - + if (v == 1) { SharedDataStream sds(ds); - + sds >> qmchgconstraint.charge_calculator >> static_cast(qmchgconstraint); - + qmchgconstraint.must_recalc_from_scratch = true; } else throw version_error(v, "1", r_qmchgconstraint, CODELOC); - + return ds; } @@ -91,7 +92,7 @@ QMChargeConstraint::QMChargeConstraint() must_recalc_from_scratch(true) {} -/** Construct to constrain the charges for the molecules in the +/** Construct to constrain the charges for the molecules in the molecule group 'molgroup' using the optionally supplied property map to find the necessary properteis */ QMChargeConstraint::QMChargeConstraint(const MoleculeGroup &molgroup, @@ -101,8 +102,8 @@ QMChargeConstraint::QMChargeConstraint(const MoleculeGroup &molgroup, must_recalc_from_scratch(true) {} -/** Construct to constrain the charges for the molecules in the - molecule group 'molgroup' to those calculated using the +/** Construct to constrain the charges for the molecules in the + molecule group 'molgroup' to those calculated using the QM charge calculator 'chargecalculator', using the optionally supplied property map to find the necessary properties */ QMChargeConstraint::QMChargeConstraint(const MoleculeGroup &molgroup, @@ -113,7 +114,7 @@ QMChargeConstraint::QMChargeConstraint(const MoleculeGroup &molgroup, charge_calculator(chargecalculator), must_recalc_from_scratch(true) {} - + /** Copy constructor */ QMChargeConstraint::QMChargeConstraint(const QMChargeConstraint &other) : ConcreteProperty(other), @@ -137,10 +138,10 @@ QMChargeConstraint& QMChargeConstraint::operator=(const QMChargeConstraint &othe { charge_calculator = other.charge_calculator; must_recalc_from_scratch = other.must_recalc_from_scratch; - + ChargeConstraint::operator=(other); } - + return *this; } @@ -189,21 +190,21 @@ Molecule QMChargeConstraint::_pvt_calculateCharges(const PartialMolecule &molecu { AtomCharges new_chgs = charge_calculator.read().calculate(molecule, this->propertyMap()); - + const PropertyName &charge_property = this->propertyMap()["charge"]; if (molecule.hasProperty(charge_property)) { const Property &old_chgs = molecule.property(charge_property); - + if (old_chgs.isA()) - { + { if (old_chgs.asA() == new_chgs) //the charges haven't changed return Molecule(); } } - + return molecule.molecule().edit() .setProperty(charge_property, new_chgs) .commit(); @@ -222,17 +223,17 @@ void QMChargeConstraint::setSystem(const System &system) mols_to_change = Molecules(); const Molecules &mols = this->moleculeGroup().molecules(); - + for (Molecules::const_iterator it = mols.constBegin(); it != mols.constEnd(); ++it) { Molecule new_mol = this->_pvt_calculateCharges(*it); - + if (not new_mol.isEmpty()) mols_to_change.add(new_mol); } - + must_recalc_from_scratch = false; Constraint::setSatisfied(system, mols_to_change.isEmpty()); @@ -247,18 +248,18 @@ bool QMChargeConstraint::fullApply(Delta &delta) { if (must_recalc_from_scratch) this->setSystem(delta.deltaSystem()); - + if (mols_to_change.isEmpty()) return false; - + else { bool changed = delta.update(mols_to_change); mols_to_change = Molecules(); - + if (changed) this->updateGroup(delta.deltaSystem()); - + return changed; } } @@ -267,22 +268,22 @@ bool QMChargeConstraint::deltaApply(Delta &delta, quint32 last_subversion) { if ( must_recalc_from_scratch or (not mols_to_change.isEmpty()) ) return this->fullApply(delta); - + QList changed_mols = delta.changedMoleculesSince(last_subversion); - + if (changed_mols.isEmpty()) return false; - + this->updateGroup(delta.deltaSystem()); - + const Molecules &mols = moleculeGroup().molecules(); - + foreach (MolNum changed_mol, changed_mols) { mols_to_change.remove(changed_mol); Molecules::const_iterator it = mols.constFind(changed_mol); - + if (it != mols.constEnd()) { Molecule new_mol = this->_pvt_calculateCharges(*it); @@ -291,7 +292,7 @@ bool QMChargeConstraint::deltaApply(Delta &delta, quint32 last_subversion) mols_to_change.add(new_mol); } } - + if (mols_to_change.isEmpty()) return false; @@ -299,10 +300,10 @@ bool QMChargeConstraint::deltaApply(Delta &delta, quint32 last_subversion) { bool changed = delta.update(mols_to_change); mols_to_change = Molecules(); - + if (changed) this->updateGroup(delta.deltaSystem()); - + return changed; } } diff --git a/corelib/src/libs/sireglobal.h b/corelib/src/libs/sireglobal.h index 3867af63e..ce6577ac3 100644 --- a/corelib/src/libs/sireglobal.h +++ b/corelib/src/libs/sireglobal.h @@ -406,6 +406,18 @@ #define SIREMOVE_EXPORT SIRE_EXPORT #endif // SIREMOVE_EXPORT end definitions +// SIRESEARCH_EXPORT definitions +#ifdef _WIN32 +#ifdef SIRESEARCH_BUILD +#define SIRESEARCH_EXPORT SIRE_EXPORT +#else +#define SIRESEARCH_EXPORT SIRE_IMPORT +#endif +#endif +#ifndef SIRESEARCH_EXPORT +#define SIRESEARCH_EXPORT SIRE_EXPORT +#endif +// SIRESEARCH_EXPORT end definitions // SIRESTREAM_EXPORT definitions #ifdef _WIN32 #ifdef SIRESTREAM_BUILD diff --git a/doc/Makefile b/doc/Makefile new file mode 100644 index 000000000..ff4bcb047 --- /dev/null +++ b/doc/Makefile @@ -0,0 +1,43 @@ +# Makefile for Sphinx documentation +# + +SHELL := /bin/bash + +# You can set these variables from the command line. +SPHINXOPTS = -j8 -v +SPHINXBUILD ?= LANG=C sphinx-build +PAPER = + +BUILD_DIR ?= build +FILES = + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILD_DIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source + +.PHONY: help clean html + +#------------------------------------------------------------------------------ +all: html +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + +clean: + -rm -rf $(BUILD_DIR)/* source/generated source/api/generated + +html: + mkdir -p $(BUILD_DIR)/html $(BUILD_DIR)/doctrees + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILD_DIR)/html $(FILES) + @echo + @echo "Build finished. The HTML pages are in build/html." + +latex: + mkdir -p $(BUILD_DIR)/latex $(BUILD_DIR)/doctrees + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILD_DIR)/latex $(FILES) + +html_check: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) build/html $(FILES) + diff --git a/doc/requirements.txt b/doc/requirements.txt new file mode 100644 index 000000000..d5eb4ef99 --- /dev/null +++ b/doc/requirements.txt @@ -0,0 +1,5 @@ +sphinx +sphinxcontrib-programoutput +sphinx-issues +furo + diff --git a/doc/source/acknowledgements.rst b/doc/source/acknowledgements.rst new file mode 100644 index 000000000..8c0d6368d --- /dev/null +++ b/doc/source/acknowledgements.rst @@ -0,0 +1,486 @@ +================ +Acknowledgements +================ + +We gratefully acknowledge funding from the EPSRC and BBSRC who contributed +funding to the development of Sire and related software. + +We also thank the `Software Sustainability Institute `__ +for many useful discussions. + +We thank the Universities of Bristol and Edinburgh for providing the +time to the members of staff who have contributed to Sire's development. + +We thank `CCP-BioSim `__ who have also provided +guidance and encouragement during the development of this software. + +Third Party Software +==================== + +Sire depends on a lot of third party software, the details and licenses of +which can be found below. The software will be installed automatically +as part of the installing the Sire conda package, so you shouldn't +have to do anything yourself. + +Sire is itself distributed under the terms of the GPL version 2. + +Qt 5 +---- + +Sire is built on top of Qt.Core from Qt 5. This is used under the terms +of the `LGPL 2 `__. +Sire does not modify Qt, so this license allows both +commercial and non-commercial use without fee. You can find out more +about Qt and its license `from here `__. + +Python +------ + +The Sire C++ library is wrapped up and made available for use within Python 3. +This is used under the terms of the `PSF license `__, +which is compatible with +the GPLv2. The license allows both commercial and non-commercial use +without fee. You can find out more about Python and its license +`from here `__. + +boost +----- + +Sire uses many of the components from the boost libraries, in particular +the boost::python module that is used to wrap up the C++ code. +This is used under the terms of the +`Boost Software License `__, +which allows both commercial and non-commercial +use without fee. This is compatible with the GPL. You can find out +more about boost and its license `from here `__. + +Py++ +---- + +Sire uses Py++ to auto-generate all of the C++ python wrappers. Py++ uses +either GCCXML or CastXML, and, as it is used as a tool, its license does +not affect Sire. You can read more about Py++ +`from here `__. + +cmake +----- + +Sire uses cmake as its build system. As it is used as a tool, its license +does not affect Sire. CMake is excellent. You can read more about it +`from here `__. + +Anaconda +--------- + +Sire uses Anaconda Python (specifically miniconda and conda-forge) to +simplify the management and installation of Python and the various +modules on which Sire depends. + +Anaconda (and miniconda) are distributed as +`open source projects `__. +As Sire does not explicitly link with them, the license is not an issue. +You can find out more about Anaconda `from here `__. + +Threading Building Blocks (tbb) +------------------------------- + +Sire uses the `Threading Building Blocks `__ +library for within-node +parallelisation. This is licensed under the open source +`Apache 2.0 license `__. + +Gnu Scientific Library (GSL) +---------------------------- + +Sire uses some of the routines from the Gnu Scientific Library. +This is used under the terms of the `GPL v3 `__ +license. More information +about GSL and its license can be `found here `__. + +Regress +------- + +Sire uses the linear least squares regression library, `regress`, for +polynomial least squares fitting. This is used under the terms of +the GPLv3 license. + +The source code for this module can be +`found here `__. + +eig3 +---- + +Sire uses the eig3 library for eigenvector/eigenmatrix calculations by +Connelly Barnes. This is in the public domain, and is derived itself +from the Java matrix library JAMA (also public domain). + +Information about this can be +`found here `__, +with the license within Sire `found here `__. + +Mersenne Twister +---------------- + +Sire uses the Mersenne Twister program by Richard Wagner for the generation +of random numbers. This is used under a BSD-style license, shown below. + +:: + + // Mersenne Twister random number generator -- a C++ class MTRand + // Based on code by Makoto Matsumoto, Takuji Nishimura, and Shawn Cokus + // Richard J. Wagner v1.0 15 May 2003 rjwagner@writeme.com + + // The Mersenne Twister is an algorithm for generating random numbers. It + // was designed with consideration of the flaws in various other generators. + // The period, 2^19937-1, and the order of equidistribution, 623 dimensions, + // are far greater. The generator is also fast; it avoids multiplication and + // division, and it benefits from caches and pipelines. For more information + // see the inventors' web page at http://www.math.keio.ac.jp/~matumoto/emt.html + + // Reference + // M. Matsumoto and T. Nishimura, "Mersenne Twister: A 623-Dimensionally + // Equidistributed Uniform Pseudo-Random Number Generator", ACM Transactions on + // Modeling and Computer Simulation, Vol. 8, No. 1, January 1998, pp 3-30. + + // Copyright (C) 1997 - 2002, Makoto Matsumoto and Takuji Nishimura, + // Copyright (C) 2000 - 2003, Richard J. Wagner + // All rights reserved. + // + // Redistribution and use in source and binary forms, with or without + // modification, are permitted provided that the following conditions + // are met: + // + // 1. Redistributions of source code must retain the above copyright + // notice, this list of conditions and the following disclaimer. + // + // 2. Redistributions in binary form must reproduce the above copyright + // notice, this list of conditions and the following disclaimer in the + // documentation and/or other materials provided with the distribution. + // + // 3. The names of its contributors may not be used to endorse or promote + // products derived from this software without specific prior written + // permission. + // + // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR + // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR + // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF + // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + // The original code included the following notice: + // + // When you use this, send an email to: matumoto@math.keio.ac.jp + // with an appropriate reference to your work. + // + // It would be nice to CC: rjwagner@writeme.com and Cokus@math.washington.edu + // when you write. + +I must remember to send them an email… + +More information about Mersenne Twister can be +`found here `__. + +sse_mathfun and neon_mathfun +---------------------------- + +Sire uses sse_mathfun and neon_mathfun for vectorising intrinsic maths +functions on processors that support SSE or Neon. These libraries were written +by Julien Pommier, and released under the BSD-style zlib license, +which is given here. + +:: + + /* Copyright (C) 2007 Julien Pommier + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + (this is the zlib license) + */ + + +avx_mathfun +----------- + +This is an AVX library inspired by sse_mathfun, that extends support to +processors with AVX instructions. It was written by Giovanni Garberoglio, +and is also under a BSD-style zlib license. + +:: + + AVX implementation of sin, cos, sincos, exp and log + Based on "sse_mathfun.h", by Julien Pommier + http://gruntthepeon.free.fr/ssemath/ + Copyright (C) 2012 Giovanni Garberoglio + Interdisciplinary Laboratory for Computational Science (LISC) + Fondazione Bruno Kessler and University of Trento + via Sommarive, 18 + I-38123 Trento (Italy) + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + (this is the zlib license) + +BLAS +---- + +Sire bundles the reference version of the BLAS library. The license for which +is described below (it is ‘freely-available’). + +:: + + + + The reference BLAS is a freely-available software package. + It is available from netlib via anonymous ftp and the World Wide Web. + Thus, it can be included in commercial software packages (and has been). + We only ask that proper credit be given to the authors. + + Like all software, it is copyrighted. It is not trademarked, but we do ask the following: + + If you modify the source for these routines we ask that you change the name of the + routine and comment the changes made to the original. + + We will gladly answer any questions regarding the software. If a modification is done, + however, it is the responsibility of the person who modified the routine to provide support. + +LAPACK +------ + +Sire also bundles a reference LAPACK, the license for which is given below; + +:: + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are + met: + + - Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + - Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer listed + in this license in the documentation and/or other materials + provided with the distribution. + + - Neither the name of the copyright holders nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +LINPACK +------- + +Sire also bundles some routines from LINPACK. Forum postings indicate +that LINPACK is BSD licensed. + +:: + + LINPACK is a collection of Fortran subroutines that analyze and + solve linear equations and linear least-squares probles. The + package solves linear systems whose matrices are general, banded, + symmetric indefinite, symmetric positive definite, triangular, + and tridiagonal square. In addition, the package computes + the QR and singular value decompositions of rectangular matrices + and applies them to least-squares problems. LINPACK uses + column-oriented algorithms to increase efficiency by preserving + locality of reference. + + LINPACK was designed for supercomputers in use in the 1970s and + early 1980s. LINPACK has been largely superceded by LAPACK + which has been designed to run efficiently on shared-memory, vector + supercomputers. + + Developed by Jack Dongarra, Jim Bunch, Cleve Moler and Pete Stewart. + 1 Feb 84 + + If you are interested in acquiring the entire LINPACK, it may + make more sense to talk with NAG. NAG distribute the software + on a mag tape for a nominal charge. + NAG + 1400 Opus Place, Suite 200 + Downers Grove, IL 60515-5702 + 708-971-2337, FAX 971-2706 + +See ThirdParty/LAPACK for BSD LAPACK license. Forum postings indicate +that LINPACK is also BSD licensed (e.g. +http://icl.cs.utk.edu/lapack-forum/archives/lapack/msg00301.html) + +:: + + [Lapack] Linpack license? + From: Jakub Kurzak + Date: Wed, 11 Jul 2007 09:50:02 -0400 + Basically it is BSD. + Jakub + + On 7/10/07, Benjamin Collar wrote: + + -----BEGIN PGP SIGNED MESSAGE----- + Hash: SHA1 + + Hello, + + I am trying to find out what license Linpack is released under. I + checked the netlib/linpack site, but didn't find the answer there. Do + you know? + + Thanks + Benjamin + -----BEGIN PGP SIGNATURE----- + Version: GnuPG v1.4.7 (MingW32) + Comment: http://firegpg.tuxfamily.org + + iD8DBQFGlE594CA25YTAYOMRAiG8AJ4uLe6DgAIszvyZl7fUdcmdv960MACdF1mA + jfqWri2vpHcKrlsur6Uc1yg= + =Xb40 + -----END PGP SIGNATURE----- + _______________________________________________ + Lapack mailing list + Lapack@Domain.Removed + http://lists.cs.utk.edu/listinfo/lapack + + -------------- next part -------------- + An HTML attachment was scrubbed... + URL: + http://lists.cs.utk.edu/private/lapack/attachments/20070711/cbd659b6/attachment.htm + +LAP (Linear Assignment Problem Solver) +-------------------------------------- + +Sire implements its own C++ version of the LAP library for solving the +linear assignment problem. This is `available here `__. + +The original code is Freeware, with more information about it available +`from here `__. + +MD5 +--- + +Sire uses the MD5 library written by L. Peter Deutsch. +It is used under a BSD-style license, given below. + +:: + + Copyright (C) 1999, 2002 Aladdin Enterprises. All rights reserved. + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + L. Peter Deutsch + ghost@aladdin.com + +More information about MD5 libraries in general can be +`found here `__. + +kabasch fitting +--------------- + +I have written a C++ implementation of the kabasch algorithm for alignment. +This was inspired by the calculate_rmsd python script written by +Jimmy Charnley Kromann and Lars Bratholm, +available https://github.com/charnley/rmsd, and under license; + +:: + + ===================== + Copyright (c) 2013, Jimmy Charnley Kromann & Lars Bratholm + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + ======================= + +ap (ascii plot) +--------------- + +Sire bundles the Python “ap” library for drawing ascii graphs. +This is available as “Sire.Tools.ap” + +Version 0.9 written by M. Fouesneau is included, available +freely from `GitHub here `__. +The only change I've made is running this through Python's 2to3 +program to make this code work with Python 3. + +The header documentation reads; + +:: + + Package that allows you to plot simple graphs in ASCII, a la matplotlib. + This package is a inspired from Imri Goldberg's ASCII-Plotter 1.0 + (https://pypi.python.org/pypi/ASCII-Plotter/1.0) + At a time I was enoyed by security not giving me direct access to my computer, + and thus to quickly make figures from python, I looked at how I could make + quick and dirty ASCII figures. But if I were to develop something, I wanted + something that can be used with just python and possible standard-ish packages + (numpy, scipy). + So I came up with this package after many iterations based of ASCII-plotter. + I added the feature to show multiple curves on one plot with different markers. + And I also made the usage, close to matplotlib, such that there is a plot, + hist, hist2d and imshow functions. + + TODO: + imshow does not plot axis yet. + make a correct documentation diff --git a/doc/source/api/index.rst b/doc/source/api/index.rst new file mode 100644 index 000000000..43e571a09 --- /dev/null +++ b/doc/source/api/index.rst @@ -0,0 +1,89 @@ +============= +Documentation +============= + +Sire is composed of several modules: + +* The :doc:`Sire ` top-level Python module. This has top-level + functions that should make it easy to use Sire without knowing about + or directly loading the other modules. + By convention, we normally import `Sire` under + the alias ``sr``. + +There are also a number of submodules. These provide additional functionality, +going all the way up to letting you construct complete molecular simulation +programs. + +* The :doc:`sire.mol ` module. This contains all of the + classes and functions used to represent and manipulate molecules. + +* The :doc:`sire.system ` module. This contains + classes which represent systems (collections) of molecules. Systems + can combine molecules with other data, e.g. forcefields for calculating + energies, or additional properties such as the periodic box holding + the molecules. + +* The :doc:`sire.io ` module. This provides lots of + parsers to read and write molecular information to a range of + different file formats (e.g. PDB, mol2, grotop etc.). + +* The :doc:`sire.units ` module. This contains + classes and functions for representing the units of physical + quantities. + +* The :doc:`sire.cas ` module. This implements a + complete Computer Algebra System, which is used for, e.g. giving + the algebraic form of bond or dihedral functions. + +* The :doc:`sire.move ` module. This provides a + collection of moves, which can be used to move atoms or molecules + in a :class:`~sire.system.System` as part of a simulation. + +* The :doc:`sire.analysis ` module. This + provides a set of analysis functionality that can be used + to analyse running simulations (e.g. calculating FEP and TI + free energies). + +* The :doc:`sire.ff ` module. This provides the base + functionality for all forcefields (classes used to calculate the + energy or forces on molecules). + +* The :doc:`sire.mm ` module. This provides code to calculate + energies and forces according to several molecular mechanics forcefields. + +* The :doc:`sire.squire ` module. This provides + interfaces to various quantum chemical packages, so that you can + calculate QM or QM/MM energies. + +* Other useful modules, such as; :doc:`sire.maths ` + (maths routines); :doc:`sire.base ` (base utilities, + including the :class:`~sire.base.Property` class); + :doc:`sire.stream ` (functions relating to streaming/pickling + of Sire objects); :doc:`sire.id ` (functions used to + implement Sire's identification system) and + :doc:`sire.vol ` (classes that represent different + simulation spaces, e.g. :class:`sire.vol.PeriodicBox`). + +Detail +------ + +.. toctree:: + :maxdepth: 1 + + index_Sire + index_Sire_Analysis + index_Sire_Base + index_Sire_CAS + index_Sire_Error + index_Sire_FF + index_Sire_ID + index_Sire_IO + index_Sire_Maths + index_Sire_MM + index_Sire_Mol + index_Sire_Move + index_Sire_Squire + index_Sire_Stream + index_Sire_System + index_Sire_Units + index_Sire_Vol diff --git a/doc/source/api/index_Sire.rst b/doc/source/api/index_Sire.rst new file mode 100644 index 000000000..6d6f107b0 --- /dev/null +++ b/doc/source/api/index_Sire.rst @@ -0,0 +1,19 @@ +==== +Sire +==== + +This is the top-level Python package that provides the core objects +and functions used in ``sire``. + +The package centers around a few core functions: + +:func:`~sire.load` + Load one or more molecules from the specified file(s) or URL(s). + +:func:`~sire.save` + Save a molecule or molecules to a file. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire diff --git a/doc/source/api/index_Sire_Analysis.rst b/doc/source/api/index_Sire_Analysis.rst new file mode 100644 index 000000000..7d68ce1e6 --- /dev/null +++ b/doc/source/api/index_Sire_Analysis.rst @@ -0,0 +1,28 @@ +============= +Sire.Analysis +============= + +This module contains classes that are used to analyse running simulations. +For example, calculating free energies using FEP or TI. + +The package centers around a few core classes: + +:class:`~sire.analysis.Bennetts` + Use Bennetts to calculate free energies. + +:class:`~sire.analysis.FEP` + Use FEP (free energy perturbation) to calculate free energies. + +:class:`~sire.analysis.TI` + Use TI (thermodynamic integration) to calculate free energies. + +:class:`~sire.analysis.PMF` + Holds a PMF (potential of mean force) + +:class:`~sire.analysis.DataPoint` + Represents a data point in the :class:`~sire.analysis.PMF`. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Analysis diff --git a/doc/source/api/index_Sire_Base.rst b/doc/source/api/index_Sire_Base.rst new file mode 100644 index 000000000..8ac70ff15 --- /dev/null +++ b/doc/source/api/index_Sire_Base.rst @@ -0,0 +1,22 @@ +========= +Sire.Base +========= + +This module implements base functionality that is used across Sire. +A key part of this is :class:`sire.base.Property`. Nearly all +objects in Sire derive from :class:`~sire.base.Property`. These can +be held as generic collections, e.g. a :class:`sire.mol.Molecule` is +really just a collection of properties, keyed as `coordinates`, +`charge` and `element`. + +:func:`~sire.base.Property` + The base class of most Sire object. + +:func:`~sire.base.Properties` + Used to hold collections of :class:`~sire.base.Property` objects, + keyed by :class:`~sire.base.PropertyName`. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Base diff --git a/doc/source/api/index_Sire_CAS.rst b/doc/source/api/index_Sire_CAS.rst new file mode 100644 index 000000000..aad7522ba --- /dev/null +++ b/doc/source/api/index_Sire_CAS.rst @@ -0,0 +1,48 @@ +======== +Sire.CAS +======== + +This module implements a complete Computer Algebra System. This is +used to create algebraic expressions that can represent energy +expressions (or anything else you want). This is used in Sire to +hold generic expressions for internal energies (e.g. bond, angle or +dihedral potentials). It is also used to build energy expressions +as a combination of components of forcefields. This lets you build +arbitrary energy expressions that involve user-defined parameters +(such as lambda, for free energy simulations). + +The module is built from some core classes. + +:class:`~sire.cas.Symbol` + This represents an algebraic symbol. + +:class:`~sire.cas.Expression` + This represents a complete algebraic expression. + +:func:`~sire.cas.create_symbols` + Create symbols from the passed strings. + +There are also lots of functions defined, e.g. `~sire.cas.Cos`, +`~sire.cas.Sin`, `~sire.cas.Coth` etc. + +Example +------- + +.. code-block:: python + + >>> x, theta = create_symbols("x", "theta") + >>> f = x**2 + 3 * x - 5 + >>> print(f.differentiate(x)) + 2 x + 3 + + >>> f = (Sin(theta) + Cos(theta))**3 + >>> print(f.evaluate({theta: 0.5})) + 2.4988910432100395 + + >>> print(f.differentiate(theta)) + 3 [[cos(theta) - sin(theta)] [sin(theta) + cos(theta)]^2] + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_CAS diff --git a/doc/source/api/index_Sire_Error.rst b/doc/source/api/index_Sire_Error.rst new file mode 100644 index 000000000..eab7969f9 --- /dev/null +++ b/doc/source/api/index_Sire_Error.rst @@ -0,0 +1,21 @@ +========== +Sire.Error +========== + +This module is used to convert between Sire's C++ and Python exceptions. +There are some key functions that are useful if you want more detail +about an error or issue that has occurred. + +:func:`~sire.error.get_last_error_details` + Get more information about the last C++ Sire exception that was + raised. This includes information like the C++ backtrace from + where the exception was raised, and the line of C++ code that + triggered the issue. + +:func:`~sire.error.get_back_trace` + Get the full current backtrace. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Error diff --git a/doc/source/api/index_Sire_FF.rst b/doc/source/api/index_Sire_FF.rst new file mode 100644 index 000000000..7133522f7 --- /dev/null +++ b/doc/source/api/index_Sire_FF.rst @@ -0,0 +1,15 @@ +======= +Sire.FF +======= + +This is the base module for all forcefields. Forcefields provide +an interface to different functions for calculating energies +and forces on molecules. + +:class:`~sire.ff.FF` + The base class of all forcefields + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_FF diff --git a/doc/source/api/index_Sire_ID.rst b/doc/source/api/index_Sire_ID.rst new file mode 100644 index 000000000..f7f60ac84 --- /dev/null +++ b/doc/source/api/index_Sire_ID.rst @@ -0,0 +1,21 @@ +======= +Sire.ID +======= + +This module holds the base classes of all of the objects used +to identify things in Sire. The core identifier types are; + +:class:`~sire.id.Index` + Identify by index (the 0-indexed position in the container) + +:class:`~sire.id.Number` + Identify by a user-assigned number, e.g. the residue number + +:class:`~sire.id.Name` + Identify by a user-assigned name, e.g. the residue name + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_ID + diff --git a/doc/source/api/index_Sire_IO.rst b/doc/source/api/index_Sire_IO.rst new file mode 100644 index 000000000..26aa4718b --- /dev/null +++ b/doc/source/api/index_Sire_IO.rst @@ -0,0 +1,34 @@ +======= +Sire.IO +======= + +This module provides all of the parsers which are used to load and +save molecular information from files. Sire comes with parsers for +many popular molecule file formats. The Sire parsers are written +using a simple design philosophy: + +1. The parser should read as much information as possible from the file, + ideally discarding nothing + +2. The parser should be symmetric, meaning that it should be capable + of writing any information that it can read. + +These two principles mean that Sire can be used to convert between +molecule file formats. You can also use Sire to load a molecular +system from a file, make some edits, and then save it back to +the same file format. + +.. note:: + Note that you rarely need to use any of the functions or classes + from this module directly. The :func:`sire.load` and :func:`sire.save` + functions will do nearly everything you need. + +The package centers around a few core classes + +:class:`~sire.io.MoleculeParser` + Load one or more molecules from the specified file(s) or URL(s). + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_IO diff --git a/doc/source/api/index_Sire_MM.rst b/doc/source/api/index_Sire_MM.rst new file mode 100644 index 000000000..b92603bfc --- /dev/null +++ b/doc/source/api/index_Sire_MM.rst @@ -0,0 +1,55 @@ +======= +Sire.MM +======= + +This module implements the molecular mechanics forcefields. These +are forcefields that calculate molecular energies and forces +using classical molecular mechanics potentials. + +There are a lot of classes in this module. Many of them are only +used internally as part of Sire's use as a rapid prototyping +engine. + +The useful classes are those that implement complete molecular +mechanics forcefields. Sire does this by using forcefield classes +that represent different forcefield components: + +:class:`~sire.mm.InterCLJFF` + Calculates the intermolecular coulomb and Lennard Jones (CLJ) + energy of all contained molecules. + +:class:`~sire.mm.InterGroupCLJFF` + Calculates the intermolecular coulomb and Lennard Jones (CLJ) + energy between the two groups of molecules contained within. + +:class:`~sire.mm.IntraCLJFF` + Calculates the intramolecular coulomb and Lennard Jones (CLJ) + energy within all contained molecules. + +:class:`~sire.mm.IntraGroupCLJFF` + Calculates the intramolecular coulomb and Lennard Jones (CLJ) + energy between groups within a molecule. + +:class:`~sire.mm.InternalFF` + Calculates the intramolecular bond, angle and dihedral energy + of contained molecules. These energies are calculated via + algebraic expressions. + +Each forcefield exposes its energy components as :mod:`sire.cas` +algebraic symbols. You can then assemble a total energy by combining +these symbols in whatever way you need. + +Sire was originally written as a means to prototype new Monte Carlo +algorithms. As such, calculations of energies are highly optimised +for Monte Carlo. Calculations of changes in energy resulting from +small changes in molecular positions or properties are handled +in as efficient a manner as possible. Because of this, the forcefield +classes are less efficient at calculating forces or performing +molecular dynamics. We highly recommend `OpenMM `__ +as a great library for prototyping molecular dynamics simulations. +We do have, and continue to work on a bridge between Sire and OpenMM. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_MM diff --git a/doc/source/api/index_Sire_Maths.rst b/doc/source/api/index_Sire_Maths.rst new file mode 100644 index 000000000..99e72ba2d --- /dev/null +++ b/doc/source/api/index_Sire_Maths.rst @@ -0,0 +1,12 @@ +========== +Sire.Maths +========== + +This module provides some useful maths functions that are needed +by Sire. In particular, it provides the :class:`~sire.maths.Vector` +class which is used to store 3D coordinates. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Maths diff --git a/doc/source/api/index_Sire_Mol.rst b/doc/source/api/index_Sire_Mol.rst new file mode 100644 index 000000000..47f154b30 --- /dev/null +++ b/doc/source/api/index_Sire_Mol.rst @@ -0,0 +1,108 @@ +======== +Sire.Mol +======== + +This module provides all of the molecular classes in Sire. The molecular +model in Sire is based on :class:`sire.base.Property` combined with +:class:`sire.mol.MoleculeInfo`. + +A molecule is simply a collection of arbitrary properties, which are +indexed via the identities held in the attached :class:`~sire.mol.MoleculeInfo`. + +This core data type (called ``MoleculeData`` in C++) is not exposed +directly. Instead, you interact with this via a series of types of +classes. + +.. note:: + + Note that you normally don't need to use the classes in this module + directly. Instead, the classes will be created and used implicitly + as you are calling higher-level functions. + + +View Classes +------------ + +You can view the data using one of the view classes. These include +:class:`~sire.mol.Atom`, :class:`~sire.mol.Residue`, :class:`~sire.mol.Chain`, :class:`~sire.mol.Segment` and :class:`~sire.mol.Molecule`, which provide views of atoms, residues, +chains, segments or whole molecules. + +There are other view classes, e.g. :class:`~sire.mol.PartialMolecule`, +which can view an arbitrary selection of atoms. The atoms selected +are held in the :class:`~sire.mol.AtomSelection` class. + +Edit Classes +------------ + +You can edit the data in the molecule by using one of the edit classes. +These are created by calling the ``.edit()`` function on a view. + +This edits a copy of the molecule. Any edits have to be committed +back to the molecule, e.g. + +.. code-block:: python + + >>> mol = mol.edit().setProperty("name", "My Molecule").commit() + >>> print(mol.property("name")) + "My Molecule" + +We also provide a simpler interface to editing molecules via +the :class:`sire.Cursor` interface. This creates a cursor that automatically +handles the change to the underlying edit classes, e.g. + +.. code-block:: python + + >>> c = mol.cursor() + >>> c["name"] = "My Molecule" + >>> print(c["name"]) + "My Molecule" + + >>> mol = c.commit() + >>> print(mol.property("name")) + "My Molecule" + +Mover Classes +------------- + +You can move a molecule (or part of a molecule) by using one of the move +classes. These work similarly to the edit classes, but instead have +functions to translate and rotate molecules (or parts of molecules). + +.. code-block:: python + + >>> mol = mol.move().translate([1.0, 0.0, 2.0]).commit() + +Evaluator Classes +----------------- + +These classes perform calculations on the data held in a molecule +(or the part of the molecule being viewed). Examples include +calculating the total mass, charge or center of geometry. + +.. code-block:: python + + >>> mass = mol.evaluate().mass() + +Selector Classes +---------------- + +These provide views that hold selections within molecules. These selections +could be a set of Atoms, or Residues etc. You can index within molecules +using the ID classes, e.g. :class:`~sire.mol.AtomName` to locate by +atom name. Sire will do its best to work out what you mean if you just +pass in a string (likely a name) or a number (likely an index). + +.. code-block:: python + + >>> mass = mol.atoms("CA").evaluate().mass() + +You can also search for selections using the search function, e.g. + +.. code-block:: python + + >>> mass = mol.search("atomname CA and resname ALA").evaluate().mass() + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Mol diff --git a/doc/source/api/index_Sire_Move.rst b/doc/source/api/index_Sire_Move.rst new file mode 100644 index 000000000..73386ecf4 --- /dev/null +++ b/doc/source/api/index_Sire_Move.rst @@ -0,0 +1,12 @@ +========= +Sire.Move +========= + +This module provides classes that are used to move molecules +as part of molecular simulations. This is where the bulk of the +Monte Carlo code is located. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Move diff --git a/doc/source/api/index_Sire_Squire.rst b/doc/source/api/index_Sire_Squire.rst new file mode 100644 index 000000000..5e100a1e5 --- /dev/null +++ b/doc/source/api/index_Sire_Squire.rst @@ -0,0 +1,21 @@ +=========== +Sire.Squire +=========== + +This is an experimental module that provided interfaces to various +quantum chemical packages. This enabled Sire to use those programs +to calculate QM and QM/MM energies, so that QM and QM/MM simulations +could be performed. + +.. warning:: + + These classes have not been developed or used in a while. It + is likely that the interfaces to the QM programs is now out + of date. If you are interested in this functionality then + please get in touch and we can work out how to + resurrect this code. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Squire diff --git a/doc/source/api/index_Sire_Stream.rst b/doc/source/api/index_Sire_Stream.rst new file mode 100644 index 000000000..546048744 --- /dev/null +++ b/doc/source/api/index_Sire_Stream.rst @@ -0,0 +1,21 @@ +=========== +Sire.Stream +=========== + +Nearly all Sire objects can be streamed (marshalled) to and from a portable, versioned +and compact binary format. This is interfaced to +`Python's pickle module `__, +meaning that nearly all Sire objects can be safely pickled, e.g. + +.. code-block:: python + + >>> s = pickle.dumps(mol) + >>> new_mol = pickle.loads(s) + +You wouldn't normally need to use any of the functionality in this module +directly. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Stream diff --git a/doc/source/api/index_Sire_System.rst b/doc/source/api/index_Sire_System.rst new file mode 100644 index 000000000..3e7c66918 --- /dev/null +++ b/doc/source/api/index_Sire_System.rst @@ -0,0 +1,22 @@ +=========== +Sire.System +=========== + +This module provides the classes that are used to collect and +manage molecular, forcefield and other data into complete +systems (held in :class:`sire.system.System` objects). +The :class:`~sire.system.System` is the complete molecular +system, with all information needed for simulation. + +The moves in :mod:`sire.move` operate on :class:`~sire.system.System` +objects. These are also what are returned by the molecule +parsers in :mod:`sire.io`. + +As for much of ``sire``, you rarely need to instantiate or use these +classes directly. They are created and managed for you by +higher level parts of ``sire``. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_System diff --git a/doc/source/api/index_Sire_Units.rst b/doc/source/api/index_Sire_Units.rst new file mode 100644 index 000000000..0a9be487a --- /dev/null +++ b/doc/source/api/index_Sire_Units.rst @@ -0,0 +1,26 @@ +========== +Sire.Units +========== + +This module implements the dimensionally-consistent units system +that is used throughout Sire. Most of Sire takes dimensioned values. +These support type checking (e.g. making sure that we don't pass +in a length to a function that expects a time), plus automatic +unit conversion between a range of commonly-used units. + +For example; + +.. code-block:: python + + >>> from Sire.Units import meter, second, kilogram, joule, kcal, mole + >>> energy = 5000 * kilogram * (meter / second)**2 / mole + >>> print(energy.to(joule / mole)) + 5000.000000000001 + + >>> print(energy.to(kcal / mole)) + 1.1950286806883368 + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Units diff --git a/doc/source/api/index_Sire_Vol.rst b/doc/source/api/index_Sire_Vol.rst new file mode 100644 index 000000000..a52adb645 --- /dev/null +++ b/doc/source/api/index_Sire_Vol.rst @@ -0,0 +1,15 @@ +======== +Sire.Vol +======== + +This class provides classes used to define volumes or spaces, e.g. +periodic boxes or truncated octahedrons, and to then efficiently calculate +distances between points within those spaces. This module is rarely +used directly, but instead is used implicitly by higher-level +parts of Sire. + +.. toctree:: + :maxdepth: 3 + + index_api_Sire_Vol + diff --git a/doc/source/api/index_api_Sire.rst b/doc/source/api/index_api_Sire.rst new file mode 100644 index 000000000..5a8965034 --- /dev/null +++ b/doc/source/api/index_api_Sire.rst @@ -0,0 +1,8 @@ +=============== +sire API Detail +=============== + +.. automodule:: sire + +.. toctree:: + :maxdepth: 3 diff --git a/doc/source/api/index_api_Sire_Analysis.rst b/doc/source/api/index_api_Sire_Analysis.rst new file mode 100644 index 000000000..3f09da106 --- /dev/null +++ b/doc/source/api/index_api_Sire_Analysis.rst @@ -0,0 +1,8 @@ +======================== +sire.analysis API Detail +======================== + +.. automodule:: sire.analysis + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Base.rst b/doc/source/api/index_api_Sire_Base.rst new file mode 100644 index 000000000..11d9b8822 --- /dev/null +++ b/doc/source/api/index_api_Sire_Base.rst @@ -0,0 +1,8 @@ +==================== +sire.base API Detail +==================== + +.. automodule:: sire.base + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_CAS.rst b/doc/source/api/index_api_Sire_CAS.rst new file mode 100644 index 000000000..e83878b8f --- /dev/null +++ b/doc/source/api/index_api_Sire_CAS.rst @@ -0,0 +1,8 @@ +=================== +sire.cas API Detail +=================== + +.. automodule:: sire.cas + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Error.rst b/doc/source/api/index_api_Sire_Error.rst new file mode 100644 index 000000000..b07d671ed --- /dev/null +++ b/doc/source/api/index_api_Sire_Error.rst @@ -0,0 +1,8 @@ +===================== +sire.error API Detail +===================== + +.. automodule:: sire.error + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_FF.rst b/doc/source/api/index_api_Sire_FF.rst new file mode 100644 index 000000000..e23674f7a --- /dev/null +++ b/doc/source/api/index_api_Sire_FF.rst @@ -0,0 +1,8 @@ +================== +sire.ff API Detail +================== + +.. automodule:: sire.ff + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_ID.rst b/doc/source/api/index_api_Sire_ID.rst new file mode 100644 index 000000000..7546acdbe --- /dev/null +++ b/doc/source/api/index_api_Sire_ID.rst @@ -0,0 +1,8 @@ +================== +sire.id API Detail +================== + +.. automodule:: sire.id + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_IO.rst b/doc/source/api/index_api_Sire_IO.rst new file mode 100644 index 000000000..59aeccaf6 --- /dev/null +++ b/doc/source/api/index_api_Sire_IO.rst @@ -0,0 +1,8 @@ +================== +sire.io API Detail +================== + +.. automodule:: sire.io + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_MM.rst b/doc/source/api/index_api_Sire_MM.rst new file mode 100644 index 000000000..3d6ea81d9 --- /dev/null +++ b/doc/source/api/index_api_Sire_MM.rst @@ -0,0 +1,8 @@ +================== +sire.mm API Detail +================== + +.. automodule:: sire.mm + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Maths.rst b/doc/source/api/index_api_Sire_Maths.rst new file mode 100644 index 000000000..8cf37e8a9 --- /dev/null +++ b/doc/source/api/index_api_Sire_Maths.rst @@ -0,0 +1,8 @@ +===================== +sire.maths API Detail +===================== + +.. automodule:: sire.maths + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Mol.rst b/doc/source/api/index_api_Sire_Mol.rst new file mode 100644 index 000000000..4950ae0dc --- /dev/null +++ b/doc/source/api/index_api_Sire_Mol.rst @@ -0,0 +1,8 @@ +=================== +sire.mol API Detail +=================== + +.. automodule:: sire.mol + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Move.rst b/doc/source/api/index_api_Sire_Move.rst new file mode 100644 index 000000000..5fa8b1f42 --- /dev/null +++ b/doc/source/api/index_api_Sire_Move.rst @@ -0,0 +1,8 @@ +==================== +sire.move API Detail +==================== + +.. automodule:: sire.move + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Squire.rst b/doc/source/api/index_api_Sire_Squire.rst new file mode 100644 index 000000000..6ba5d8f6a --- /dev/null +++ b/doc/source/api/index_api_Sire_Squire.rst @@ -0,0 +1,8 @@ +====================== +sire.squire API Detail +====================== + +.. automodule:: sire.squire + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Stream.rst b/doc/source/api/index_api_Sire_Stream.rst new file mode 100644 index 000000000..090e07099 --- /dev/null +++ b/doc/source/api/index_api_Sire_Stream.rst @@ -0,0 +1,8 @@ +====================== +sire.stream API Detail +====================== + +.. automodule:: sire.stream + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_System.rst b/doc/source/api/index_api_Sire_System.rst new file mode 100644 index 000000000..32d1d8645 --- /dev/null +++ b/doc/source/api/index_api_Sire_System.rst @@ -0,0 +1,8 @@ +====================== +sire.system API Detail +====================== + +.. automodule:: sire.system + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Units.rst b/doc/source/api/index_api_Sire_Units.rst new file mode 100644 index 000000000..5ea587ab7 --- /dev/null +++ b/doc/source/api/index_api_Sire_Units.rst @@ -0,0 +1,8 @@ +===================== +sire.units API Detail +===================== + +.. automodule:: sire.units + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/api/index_api_Sire_Vol.rst b/doc/source/api/index_api_Sire_Vol.rst new file mode 100644 index 000000000..61bccca9c --- /dev/null +++ b/doc/source/api/index_api_Sire_Vol.rst @@ -0,0 +1,8 @@ +=================== +sire.vol API Detail +=================== + +.. automodule:: sire.vol + +.. toctree:: + :maxdepth: 1 diff --git a/doc/source/changelog.rst b/doc/source/changelog.rst new file mode 100644 index 000000000..6b64f3970 --- /dev/null +++ b/doc/source/changelog.rst @@ -0,0 +1,6 @@ +========= +Changelog +========= + +This will be updated to start from the refurbished version of Sire. + diff --git a/doc/source/conf.py b/doc/source/conf.py new file mode 100644 index 000000000..9a4e9974c --- /dev/null +++ b/doc/source/conf.py @@ -0,0 +1,377 @@ +# -*- coding: utf-8 -*- +# +# Sire documentation build configuration file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. +from __future__ import print_function + +import sire +import sys +import glob +import os + +# -- General configuration ----------------------------------------------- +# Add any Sphinx extension module names here, as strings. +# They can be extensions +# coming with Sphinx (named 'sphinx.ext.*') or your custom ones. + +extensions = [ + 'sphinx.ext.autodoc', + 'sphinx.ext.viewcode', + 'sphinx.ext.autosummary', + 'sphinx.ext.napoleon', + 'sphinx.ext.mathjax', + 'sphinxcontrib.programoutput', + 'sphinx_issues', +] + +# Github repo +issues_github_path = 'michellab/Sire' + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +# source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'Sire' +copyright = u'2006-2022' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# +# The short X.Y version. + +branch = os.getenv("SIRE_BRANCH", None) + +if branch is None: + version = sire.__version__.split("+")[0] + # The full version, including alpha/beta/rc tags. + release = sire.__version__ + branch = sire.__branch__ + revisionid = sire.__revisionid__ + repository = sire.__repository__ +else: + version = os.getenv("SIRE_VERSION") + release = os.getenv("SIRE_RELEASE") + revisionid = os.getenv("SIRE_REVISIONID") + repository = os.getenv("SIRE_REPOSITORY") + +print(f"repository = {repository}") +print(f"branch = {branch}") +print(f"revisionid = {revisionid}") +print(f"version = {version} : RELEASE = {release}") + +# Replace all "|SireVersion|" with the version number +rst_epilog = f".. |SireVersion| replace:: {version}" + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +language = 'en' + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +# today = '' +# Else, today_fmt is used as the format for a strftime call. +# today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build', '*_test*'] + +# The reST default role (used for this markup: `text`) to use for all documents. +default_role = "autolink" + +# If true, '()' will be appended to :func: etc. cross-reference text. +add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + + +# -- options for mathjax +# note there is no protocol given here to avoid mixing http with https +# see: http://docs.mathjax.org/en/latest/start.html#secure-cdn-access +mathjax_path = ("https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.2/MathJax.js?" + "config=TeX-AMS-MML_HTMLorMML") + +# -- Options for HTML output --------------------------------------------- + +# theme +html_theme = 'furo' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +html_theme_options = { + "sidebar_hide_name": True +} + +# pngmath_latex_preamble = r""" +# \usepackage{color} +# \definecolor{textgray}{RGB}{51,51,51} +# \color{textgray} +# """ +# pngmath_use_preview = True +# pngmath_dvipng_args = ['-gamma 1.5', '-D 96', '-bg Transparent'] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +html_title = "Sire Molecular Modelling" + +# A shorter title for the navigation bar. Default is the same as html_title. +html_short_title = "Sire" + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +html_logo = "images/logo.svg" + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = ['_static'] + +html_css_files = [] +html_js_files = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {'**': ['sourcelink.html', 'globaltoc.html']} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +html_show_sourcelink = False + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +html_show_sphinx = False + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +html_show_copyright = False + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'SireDoc' + + +# -- Options for LaTeX output -------------------------------------------- + +latex_elements = { + # The paper size ('letterpaper' or 'a4paper'). + # 'papersize': 'letterpaper', + + # The font size ('10pt', '11pt' or '12pt'). + # 'pointsize': '10pt', + + # Additional stuff for the LaTeX preamble. + 'preamble': r"\usepackage{amsmath,amssymb}", +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, author, documentclass [howto/manual]). +latex_documents = [ + ('index', 'sire.tex', u'Sire Documentation', + u'Michel Lab', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output -------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'Sire', u'Sire Documentation', + [""], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------ + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'Sire', u'Sire Documentation', + "", 'Sire', + 'Sire molecular simulation framework.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# ----------------------------------------------------------------------------- +# Autosummary +# ----------------------------------------------------------------------------- + +autosummary_generate = True +autodoc_default_options = { + 'members': None, # Include all members (methods). + 'special-members': None, + 'exclude-members': '__dict__,__weakref__' # Exclude "standard" methods. +} + +# spell checking +spelling_lang = 'en_US' +spelling_word_list_filename = 'spelling_wordlist.txt' +spelling_show_suggestions = True + + +# try to exclude deprecated +def skip_deprecated(app, what, name, obj, skip, options): + if hasattr(obj, "func_dict") and "__deprecated__" in obj.func_dict: + print("skipping " + name) + return True + return skip or False + + +def setup(app): + app.connect('autodoc-skip-member', skip_deprecated) + try: + from sphinx.ext.autosummary import Autosummary + from sphinx.ext.autosummary import get_documenter + from docutils.parsers.rst import directives + from sphinx.util.inspect import safe_getattr + import re + + class AutoAutoSummary(Autosummary): + + option_spec = { + 'methods': directives.unchanged, + 'attributes': directives.unchanged + } + + required_arguments = 1 + + @staticmethod + def get_members(obj, typ, include_public=None): + if not include_public: + include_public = [] + items = [] + for name in dir(obj): + try: + documenter = get_documenter( + app, safe_getattr(obj, name), obj) + except AttributeError: + continue + if documenter.objtype == typ: + items.append(name) + public = [ + x for x in items if x in include_public or not x.startswith('_')] + return public, items + + def run(self): + clazz = self.arguments[0] + try: + (module_name, class_name) = clazz.rsplit('.', 1) + m = __import__(module_name, globals(), + locals(), [class_name]) + c = getattr(m, class_name) + if 'methods' in self.options: + _, methods = self.get_members( + c, 'method', ['__init__']) + + self.content = ["~%s.%s" % ( + clazz, method) for method in methods if not method.startswith('_')] + if 'attributes' in self.options: + _, attribs = self.get_members(c, 'attribute') + self.content = ["~%s.%s" % ( + clazz, attrib) for attrib in attribs if not attrib.startswith('_')] + finally: + return super(AutoAutoSummary, self).run() + + app.add_directive('autoautosummary', AutoAutoSummary) + except BaseException as e: + raise e + + +# Napoleon settings +napoleon_google_docstring = True +napoleon_numpy_docstring = True +napoleon_include_private_with_doc = False +napoleon_include_special_with_doc = False +napoleon_use_admonition_for_examples = False +napoleon_use_admonition_for_notes = False +napoleon_use_admonition_for_references = False +napoleon_use_ivar = True +napoleon_use_param = True +napoleon_use_rtype = True diff --git a/doc/source/contributing.rst b/doc/source/contributing.rst new file mode 100644 index 000000000..d2db4c0f2 --- /dev/null +++ b/doc/source/contributing.rst @@ -0,0 +1,39 @@ +============ +Contributing +============ + +We welcome all helpful contributions to improving the quality of +Sire. Ways you can help include; + +* Finding and fixing documentation bugs and typos +* Creating more tests and adding them to the pytest library in the + `SireUnitsTests `__ + repository. +* Taking on some of the tasks in the :doc:`snaglist`. +* Porting and testing Sire on different computers +* Writing new features + +We accept pull requests to the devel branch and are happy to discuss +ideas via +`GitHub issues on the repo `__. + +When contributing, please keep in mind our +`code of conduct `__. + +Before contributing we encourage everyone to +:doc:`complete the tutorial `, as this gives a good +grounding in how Sire works and how the code is laid out. If you have +any problems running the tutorial then please +`raise and issue `__. + +Contributing new code +--------------------- + +We welcome developers who want to join us to help reduce bugs and add +new functionality. + +We have a :doc:`very detailed developer guide ` that +we hope will help you get up to speed with development. We strive to +be a helpful, friendly and welcoming community, so if you have any +questions or anything is not clear then please get in touch with +us by `raising an issue `__. diff --git a/doc/source/development.rst b/doc/source/development.rst new file mode 100644 index 000000000..482197814 --- /dev/null +++ b/doc/source/development.rst @@ -0,0 +1,417 @@ +================= +Developer's guide +================= + +The source code for Sire is available on +`GitHub `__. + +Setting up your computer +========================= + +Sire will install everything it needs when you run the +`compile_sire.sh` script in the top-level Sire directory. + +This will automatically download miniconda, and then use that +to install all of Sire's dependencies (including all of +BioSimSpace's dependencies). These include compilers that are +packaged with miniconda. The script will then call cmake +to first compile the core library (corelib), and then all +of the python wrappers. Compilation can take a very long time! + +Virtual environments +-------------------- + +It is recommended that you develop Sire in the miniconda environment +that the `compile_sire.sh` script creates automatically. This will, +by default, be in `$HOME/sire.app`. + +It is worth activating this environment during development and testing, +e.g. via + +.. code-block:: bash + + $ source $HOME/sire.app/bin/activate + +This will update your shell so that all python commands (such as +``python``, ``pip`` etc.) will use the virtual environment. You can +deactivate the environment and return to the "standard" Python using; + +.. code-block:: bash + + $ conda deactivate + +If you no longer want the environment then you can remove it using + +.. code-block:: bash + + rm -rf $HOME/sire.app + +Coding Style +============ + +Sire is written predominantly in C++. This was for speed and memory +efficiency. The Sire C++ objects are wrapped into Python using Py++. + +C++ code style is used for names, with the code written to be strictly +C++ 2014 conformant (although we welcome requests to move to a newer +C++ standard, if this is justifiable). The code is very portable and +should remain so. We ourselves are running production code on X86-64 +and ARM64 processors, on Linux and MacOS. We know of people who have +used Sire on PowerPC and Windows. We are keen to add first-party +support for a Windows Sire build (when we have time!). + +We are in the process of (slowly) improving the ease of use of Sire +by adding a direct Python layer. We aim as much as possible +in this Python layer to follow a +`PEP8 `__ python coding style and +recommend that developers install and use +a linter such as `flake8 `__. + +For ease of installation and support, we require that dependencies are +available in stock Anaconda Python, or on conda-forge. As a last resort, +we will bundle dependencies, although this does make our conda build +more complex. + +With this in mind, we use the following coding conventions: + +Naming +------ + +We follow a Python style naming convention. + +* Packages: Uppercase, singleword (note we are exploring moving to a lowercase style) +* Classes: CamelCase +* Methods: snake_case for pure Python, lowerCamelCase for C++ +* Functions: snake_case for pure Python, lowerCamelCase for C++ +* Variables: snake_case for pure Python, should not be used in C++ (variables should be private) +* Source Files: snake_case with a leading underscore for pure Python, lowerclassname.cpp / lowerclassname.h for C++ + +Functions or variables in Python that are private should be named with a leading +underscore. This prevents them from being prominantly visible in Python's +help and tab completion. Any C++ code should only use private variables, +and should use private or protected as much as possible to reduce the API +of C++ classes. + +Workflow +======== + +Feature branches +---------------- + +First make sure that you are on the development branch of Sire: + +.. code-block:: bash + + git checkout devel + +Now create and switch to a feature branch. This should be prefixed with +*feat*, e.g. + +.. code-block:: bash + + git checkout -b feat-process + +Testing +======= + +When working on your feature it is important to write tests to ensure that it +does what is expected and doesn't break any existing functionality. Tests +should be placed inside the separate `SireUnitTests `__ +repository, creating an appropriately +named sub-directory for any new modules. Add the tests together with +a guard so that they can detect if your new code is available, and will +be skipped if run on an older version of Sire. + +The test suite is intended to be run using +`pytest `__. +When run, ``pytest`` searches for tests in all directories and files +below the current directory, collects the tests together, then runs +them. Pytest uses name matching to locate the tests. Valid names start +or end with *test*\ , e.g.: + +:: + + # Files: + test_file.py file_test.py + +.. code-block:: python + + # Functions: + def test_func(): + # code to perform tests... + return + + def func_test(): + # code to perform tests... + return + +We use the convention of ``test_*`` when naming files and functions. + +Running tests +------------- + +To run the full test suite, go to the `SireUnitTests/unittest` +directory and type: + +.. code-block:: bash + + pytest . + +To run tests for a specific sub-module, e.g. SireMol: + +.. code-block:: bash + + pytest SireMol + +To only run the unit tests in a particular file, e.g.: + +.. code-block:: bash + + pytest SireMol/test_atomselection.py + +To get more detailed information about each test, run pytests using the +*verbose* flag, e.g.: + +.. code-block:: bash + + pytest -v + +More details regarding how to invoke ``pytest`` can be +found `here `__. + +Writing tests +^^^^^^^^^^^^^ + +Basics +"""""" + +Try to keep individual unit tests short and clear. Aim to test one thing, and +test it well. Where possible, try to minimise the use of ``assert`` statements +within a unit test. Since the test will return on the first failed assertion, +additional contextual information may be lost. + +Floating point comparisons +"""""""""""""""""""""""""" + +Make use of the +`approx `__ +function from the ``pytest`` package for performing floating +point comparisons, e.g: + +.. code-block:: python + + from pytest import approx + + assert 0.1 + 0.2 == approx(0.3) + +By default, the ``approx`` function compares the result using a +relative tolerance of 1e-6. This can be changed by passing a keyword +argument to the function, e.g: + +.. code-block:: python + + assert 2 + 3 == approx(7, rel=2) + +Skipping tests +"""""""""""""" + +If you are using +`test-driven development `__ +it might be desirable to write your tests before implementing the functionality, +i.e. you are asserting what the *output* of a function should be, not how it should +be *implemented*. In this case, you can make use of +the ``pytest`` *skip* decorator +to flag that a unit test should be skipped, e.g.: + +.. code-block:: python + + @pytest.mark.skip(reason="Not yet implemented.") + def test_new_feature(): + # A unit test for an, as yet, unimplemented feature. + ... + +Parametrizing tests +""""""""""""""""""" + +Often it is desirable to run a test for a range of different input parameters. +This can be achieved using the ``parametrize`` decorator, e.g.: + +.. code-block:: python + + import pytest + from operator import mul + + @pytest.mark.parametrize("x", [1, 2]) + @pytest.mark.parametrize("y", [3, 4]) + def test_mul(x, y): + """ Test the mul function. """ + assert mul(x, y) == mul(y, x) + +Here the function test_mul is parametrized with two parameters, ``x`` and ``y``. +By marking the test in this manner it will be executed using all possible +parameter pairs ``(x, y)``\ , i.e. ``(1, 3), (1, 4), (2, 3), (2, 4)``. + +Alternatively: + +.. code-block:: python + + import pytest + from operator import sub + @pytest.mark.parametrize("x, y, expected", + [(1, 2, -1), + (7, 3, 4), + (21, 58, -37)]) + def test_sub(x, y, expected): + """ Test the sub function. """ + assert sub(x, y) == -sub(y, x) == expected + +Here we are passing a list containing different parameter sets, with the names +of the parameters matched against the arguments of the test function. + +Testing exceptions +"""""""""""""""""" + +Pytest provides a way of testing your code for known exceptions. For example, +suppose we had a function that raises an ``IndexError``\ : + +.. code-block:: python + + def indexError(): + """ A function that raises an IndexError. """ + a = [] + a[3] + +We could then write a test to validate that the error is thrown as expected: + +.. code-block:: python + + def test_indexError(): + with pytest.raises(IndexError): + indexError() + +Custom attributes +""""""""""""""""" + +It's possible to mark test functions with any attribute you like. For example: + +.. code-block:: python + + @pytest.mark.slow + def test_slow_function(): + """ A unit test that takes a really long time. """ + ... + +Here we have marked the test function with the attribute ``slow`` in order to +indicate that it takes a while to run. From the command line it is possible +to run or skip tests with a particular mark. + +.. code-block:: bash + + pytest mypkg -m "slow" # only run the slow tests + pytest mypkg -m "not slow" # skip the slow tests + +The custom attribute can just be a label, as in this case, or could be your +own function decorator. + +Continuous integration and delivery +----------------------------------- + +We use GitHub Actions to run a full continuous integration (CI) +on all pull requests to devel and +main, and all pushes to devel and main. We will not merge a pull +request until all tests pass. We only accept pull requests to devel. +We only allow pull requests from devel to main. In addition to CI, +we also perform a build of the website on pushes to devel and tags +to main. Finally, we have set up +continuous delivery (CD) on pushes to main and devel, which +build the conda packages and website. + +Documentation +============= + +Sire is fully documented using a combination of hand-written files +(in the ``doc`` folder) and auto-generated api documentation created from +`NumPy `__ style docstrings. +See `here `__ +for details. The documentation is automatically built using +`Sphinx `__ whenever a commit is pushed to devel +that contains the tag "SOMETHING". + +To build the documentation locally you will first need to install some +additional packages. + +.. code-block:: bash + + pip install sphinx sphinx_issues sphinx_rtd_theme + +Then move to the ``doc`` directory and run: + +.. code-block:: bash + + make html + +When finished, point your browser to ``build/html/index.html``. + +Committing +========== + +If you create new tests, please make sure that they pass locally before +commiting. When happy, commit your changes, e.g. + +.. code-block:: bash + + git commit -a -m "Implementation and test for new feature." + +Remember that it is better to make small changes and commit frequently. + +If your edits don't change the Sire source code, or documentation, +e.g. fixing typos, then please add ``ci skip`` to your commit message, e.g. + +.. code-block:: bash + + git commit -a -m "Updating docs [ci skip]" + +This will avoid unnecessarily running the +`GitHub Actions `__, e.g. +building a new Sire package, updating the website, etc. +(the GitHub actions are configured in the file +``.github/workflows/main.yaml``). To this end, we +have provided a git hook that will append ``[ci skip]`` if the commit only +modifies files in a blacklist that is specified in the file ``.ciignore`` +(analagous to the ``.gitignore`` used to ignore untracked files). To enable +the hook, simply copy it into the ``.git/hooks`` directory: + +.. code-block:: bash + + cp git_hooks/commit-msg .git/hooks + +Any additional files or paths that shouldn't trigger a re-build can be added +to the ``.ciignore`` file. + +Next, push your changes to the remote server, e.g. + +.. code-block:: bash + + # Push to the feature branch on the main MetaWards repo, if you have access. + git push origin feature + + # Push to the feature branch your own fork. + git push fork feature + +When the feature is complete, create a *pull request* on GitHub so that the +changes can be merged back into the development branch. +For information, see the documentation +`here `__. + +Thanks +====== + +First, thanks to you for your interest in Sire and for reading this +far. We hope you enjoy having a play with the code and having a go +at adding new functionality, fixing bugs, writing docs etc. + +We would also like to thank Lester Hedges and the +`BioSimSpace `__ team who provided great advice +to set up the above, and from whose +`GitHub repo `__ +most of the procedures, scripts and documentation above is derived. diff --git a/doc/source/features.rst b/doc/source/features.rst new file mode 100644 index 000000000..a8895d182 --- /dev/null +++ b/doc/source/features.rst @@ -0,0 +1,6 @@ +======== +Features +======== + +Page providing a list of features of Sire. + diff --git a/doc/source/images/logo.svg b/doc/source/images/logo.svg new file mode 100644 index 000000000..67cf1228c --- /dev/null +++ b/doc/source/images/logo.svg @@ -0,0 +1 @@ +siremolecularmodelling \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst new file mode 100644 index 000000000..a532fac7e --- /dev/null +++ b/doc/source/index.rst @@ -0,0 +1,94 @@ +======================== +Sire Molecular Modelling +======================== + +Sire is a complete molecular modelling and prototyping package. +It can be used for loading, editing, simulating and generally +manipulating molecules. + +Features +======== + +.. toctree:: + :maxdepth: 1 + + features + +Installation +============ + +.. toctree:: + :maxdepth: 1 + + install + +Quick Start Guide +================= + +.. toctree:: + :maxdepth: 1 + + quickstart/index + +Tutorial +======== + +.. toctree:: + :maxdepth: 3 + + tutorial/index + +Getting help +============ + +.. toctree:: + :maxdepth: 1 + + support + +Contributing +============ + +.. toctree:: + :maxdepth: 1 + + contributing + roadmap + packaging + development + snaglist + +Documentation +============= + +.. toctree:: + :maxdepth: 3 + + api/index + +Changelog +========= + +.. toctree:: + :maxdepth: 2 + + changelog + history + +Acknowledgements +================ +.. toctree:: + :maxdepth: 1 + + acknowledgements + +Citation +======== + +Citation instructions... + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` diff --git a/doc/source/install.rst b/doc/source/install.rst new file mode 100644 index 000000000..dc63fcc51 --- /dev/null +++ b/doc/source/install.rst @@ -0,0 +1,6 @@ +=============== +Installing Sire +=============== + +Instructions on how to install Sire... + diff --git a/doc/source/packaging.rst b/doc/source/packaging.rst new file mode 100644 index 000000000..655dc5283 --- /dev/null +++ b/doc/source/packaging.rst @@ -0,0 +1,65 @@ +================== +Packaging releases +================== + +Sire is now fully tested and deployed using GitHub actions. +The development process should be; + +* New features are developed on feature branches, called ``feature-{feature}``, + either in the `main Sire repository `__ + for authorised developers, or in personal forks for + new developers. +* Bug fixes or issue fixes are developed on fix branches, called + ``fix-issue-{number}`` (again in either the main repository or forks). +* Pull requests are issued from these branches to ``devel``. All merge conflicts + must be fixed in the branch and all tests must pass before the pull + request can be merged into ``devel``. NOTE THAT ONLY AUTHORISED + DEVELOPERS CAN ACCEPT THE PULL REQUEST. Authorised developers will + review the pull request as quickly as they can. They will be greatly + helped if the feature is accompanied with tests, examples and/or tutorial + instructions. + +The result of this is that "devel" should contain the fully-working and +tested, and most up-to-date version of ``Sire``. However, this +version should not be used for production runs. + +.. note:: + + The group of developers authorised to have access to the + `main Sire repository `__ + and to accept pull requests is not fixed, + and will evolve over time. If you wish to join this group then + please complete the tutorial and then demostrate your commitment + by submitting good issues and pull requests from + a personal fork of the repository. Please get in touch if you find + this difficult, or follow + `this workshop `__ if you need + to learn how to use Git, GitHub, feature branching, merging, pull + requests etc. + +Defining a release +------------------ + +We will release ``Sire`` regularly. Releases aim to be backwards +compatible and capable of being used for production runs, at least for +the functionality that is fully described in the tutorial. + +.. note:: + + It is the job of the release manager (currently + `lohedges `__) to decide when it is time + to create a new release. If you are interested in helping join the release + management group then please feel free to get in touch. + +Creating a release +------------------ + +To create a release accept a pull request from devel into main. This +will automatically trigger the GitHub Action to build the conda packages +for the platforms and python versions that we currently support. +These will be pushed automatically to conda-forge. + +Please remember to update the :doc:`changelog` with details about this release. This +should include the link at the top of the release that shows the commit +differences between versions. This can be easily copied from a previous +release and updated. diff --git a/doc/source/quickstart/index.rst b/doc/source/quickstart/index.rst new file mode 100644 index 000000000..f318773a4 --- /dev/null +++ b/doc/source/quickstart/index.rst @@ -0,0 +1,8 @@ +================= +Quick Start Guide +================= + +Doing something with Sire in a few minutes. + +Load a molecule, make some changes, save it back out again. + diff --git a/doc/source/roadmap.rst b/doc/source/roadmap.rst new file mode 100644 index 000000000..3b11e2039 --- /dev/null +++ b/doc/source/roadmap.rst @@ -0,0 +1,33 @@ +======= +Roadmap +======= + +Sire is a well established foundational package for other software, +such as `BioSimSpace `__. + +It hasn't had many major changes since active development switched over +to BioSimSpace. We plan now to make Sire easier to use. We will do this +by adding lots of tutorials, and simplifying the API so that it is +easier to do what you want, without having to learn a lot of classes. + +Sire does have a few rough edges. These reflect its history as a +prototyping code, in which many new molecular simulation ideas were +developed and deployed over 10-15 years. Our plan now is to smooth +those rough edges, and work to clean away dead code or little-used +functionality. + +This should leave Sire as an excellent tool for loading, editing, +manipulating and performing calculations on molecules. We will retain +the molecular simulation parts, as these may be useful for someone +in the future. But, predominantly, we will focus Sire as a flexible +and powerful tool for loading and manipulating molecules, and as a +useful companion tool to BioSimSpace. + +If you would like to suggest features that should be +added to the roadmap then please +`raise a feature request here `_. + +More details about individual feature branches, which contain the new +features being actively worked on, is available on the +`GitHub issues `_ +page. diff --git a/doc/source/snaglist.rst b/doc/source/snaglist.rst new file mode 100644 index 000000000..3a6924d0b --- /dev/null +++ b/doc/source/snaglist.rst @@ -0,0 +1,17 @@ +========= +Snag list +========= + +Below is a series of snags with the code that we'd like to fix, but +currently lack the personpower to tackle now. If you'd like to +try and fix one of the below then get in touch with us by +`raising an issue `__, +or forking the repo and issuing a pull request when you are done. + +Ideally let us know so that we can create a feature branch for your +work, so that no-one else duplicates your effort. + +Snags +----- + +* Lots needs doing as part of the code modernisation programme! diff --git a/doc/source/support.rst b/doc/source/support.rst new file mode 100644 index 000000000..a50c08a90 --- /dev/null +++ b/doc/source/support.rst @@ -0,0 +1,5 @@ +=================== +How to ask for help +=================== + +Support options diff --git a/doc/source/tutorial/index.rst b/doc/source/tutorial/index.rst new file mode 100644 index 000000000..2cba8ce19 --- /dev/null +++ b/doc/source/tutorial/index.rst @@ -0,0 +1,34 @@ +======== +Tutorial +======== + +This tutorial will take you through most aspects of running, understanding, +analysing and customising Sire. The tutorial is designed to be run +through in order. + +This tutorial assumes that you have installed Sire following +:doc:`the instructions here <../install>`, and have activated +the Anaconda / miniconda Python environment into which Sire was +installed. You can test this by starting python and typing + +>>> import sire as sr + +If ``sire`` imports without error, then everything is working. + +If you can't import ``sire``, or have any other problems, then +please :doc:`ask for support. <../support>` + +Getting Started +--------------- + +.. toctree:: + :maxdepth: 2 + + index_part01 + index_part02 + +Intermediate Topics +------------------- + +Advanced Topics +--------------- diff --git a/doc/source/tutorial/index_part01.rst b/doc/source/tutorial/index_part01.rst new file mode 100644 index 000000000..5c8703ceb --- /dev/null +++ b/doc/source/tutorial/index_part01.rst @@ -0,0 +1,26 @@ +=========================== +Part 1 - Loading and Saving +=========================== + +Sire is Python library that is designed to make it easier for you +to build and manipulate molecular systems. + +This tutorial assumes that you have installed ``sire`` following +:doc:`the instructions here. <../../install>`, and have activated +the Anaconda / miniconda Python environment into which Sire was +installed. + +.. warning:: + + This tutorial is written for ``sire`` version |SireVersion| or + higher. If you are using an older version then please upgrade. + +.. toctree:: + :maxdepth: 1 + + part01/01_importing_sire + part01/02_loading_a_molecule + part01/03_simple_indexing + part01/04_saving_a_molecule + part01/05_loading_from_multiple_files + part01/06_supported_file_formats diff --git a/doc/source/tutorial/index_part02.rst b/doc/source/tutorial/index_part02.rst new file mode 100644 index 000000000..090baa026 --- /dev/null +++ b/doc/source/tutorial/index_part02.rst @@ -0,0 +1,55 @@ +=============================== +Part 2 - Indexing and Searching +=============================== + +The core of ``sire`` are the various :class:`~sire.mol.MoleculeView`-derived +classes, such as :class:`~sire.mol.Atom`, :class:`~sire.mol.Residue`, +:class:`~sire.mol.Chain`, :class:`~sire.mol.Segment` and +:class:`~sire.mol.Molecule`, amongst others. + +These can all be considered as containers for molecular information. +:class:`~sire.mol.Atom` is a container for atomic information, +:class:`~sire.mol.Molecule` is a container for molecular information etc. + +We access this information by indexing or searching these containers, +which we will learn how to do in this part of the tutorial. + +First, let's load up an example protein, +``7SA1`` from the `PDB `__ + +>>> import sire as sr +>>> mols = sr.load("7SA1") +Downloading from 'https://files.rcsb.org/download/7SA1.pdb.gz'... +7SA1.pdb.gz +Unzipping './7SA1.pdb.gz'... +>>> mol = mols[0] +>>> print(mol) +Molecule( 7SA1:2 num_atoms=11728 num_residues=1518 ) + +.. note:: + +``sire`` automatically downloads and unpacks structures from the PDB. Just +put in the PDB code as the argument to :func:`sire.load`. + +Molecules are constructed as atoms, which be can be (optionally) arranged +into residues, chains and segments. We can get the number of each using + +>>> print(f"The number of atoms is {mol.num_atoms()}") +The number of atoms is 11728 +>>> print(f"The number of residues is {mol.num_residues()}") +The number of residues is 1518 +>>> print(f"The number of chains is {mol.num_chains()}") +The number of chains is 4 +>>> print(f"The number of segments is {mol.num_segments()}") +The number of segments is 0 + +.. toctree:: + :maxdepth: 1 + + part02/01_indexing_atoms + part02/02_indexing_residues + part02/03_indexing_chains + part02/04_indexing_segments + part02/05_indexing_molecules + part02/06_indexing_bonds + part02/07_searching diff --git a/doc/source/tutorial/part01/01_importing_sire.rst b/doc/source/tutorial/part01/01_importing_sire.rst new file mode 100644 index 000000000..2abe53a72 --- /dev/null +++ b/doc/source/tutorial/part01/01_importing_sire.rst @@ -0,0 +1,22 @@ +============== +Importing sire +============== + +Start a Python session (e.g. an interactive python console or a +Jupyter notebook). + +You import ``sire`` by typing + +>>> import sire + +.. note:: + + Note how this tutorial uses ``>>>`` to show a command that you should + type into an interactive Python session, such as an ipython console or + Jupyter notebook + +As a convention, we will import the :mod:`sire` Python module under the alias +``sr`` to reduce the amount of typing. We will use ``sr`` throughout this tutorial to +mean :mod:`sire`. + +>>> import sire as sr diff --git a/doc/source/tutorial/part01/02_loading_a_molecule.rst b/doc/source/tutorial/part01/02_loading_a_molecule.rst new file mode 100644 index 000000000..3f78a2a41 --- /dev/null +++ b/doc/source/tutorial/part01/02_loading_a_molecule.rst @@ -0,0 +1,31 @@ +================== +Loading a molecule +================== + +We load molecules using the :func:`sire.load` function. This accepts either +a filename, a URL, or a `PDB code `__. + +For example, let's load a cholesterol molecule from +`https://siremol.org/m/cholesterol.sdf `__. + +>>> mols = sr.load("https://siremol.org/m/cholesterol.sdf") +Downloading from 'https://siremol.org/m/cholesterol.sdf'... + +>>> print(mols) +System( name=cholesterol num_molecules=1 num_residues=1 num_atoms=74 ) + +Molecules are loaded into a :class:`~sire.system.System`. You can see how +many molecules have been loaded using the :func:`~sire.mol.Molecule.num_molecules` +function; + +>>> print(mols.num_molecules()) +1 + +In this case, one molecule has been loaded. You can access this molecule via; + +>>> mol = mols[0] +>>> print(mol) +Molecule( MOL:2 num_atoms=74 num_residues=1 ) + +This shows that the molecule is called ``MOL`` and has molecule number 2. +It contains 74 atoms in 1 residue. diff --git a/doc/source/tutorial/part01/03_simple_indexing.rst b/doc/source/tutorial/part01/03_simple_indexing.rst new file mode 100644 index 000000000..fa46288bd --- /dev/null +++ b/doc/source/tutorial/part01/03_simple_indexing.rst @@ -0,0 +1,93 @@ +=============== +Simple indexing +=============== + +There are many ways to view the atoms in the molecule. One is to use +the index, e.g. + +>>> atom = mol[0] +>>> print(atom) +Atom( C : 1 ) + +or + +>>> atom = mol.atom(0) +>>> print(atom) +Atom( C : 1 ) + +would access the first atom in the molecule. The :func:`~sire.mol.Molecule.num_atoms` +function returns the total number of atoms. + +>>> print(mol.num_atoms()) +74 + +You can loop over all of the atoms via the `.atoms()` function e.g. + +>>> for atom in mol.atoms(): +... print(atom) +Atom( C:1 [ -0.02, 1.53, 0.01] ) +Atom( C:2 [ 0.00, -0.00, 0.00] ) +Atom( C:3 [ 0.66, -0.52, 1.29] ) +Atom( C:4 [ 1.42, 2.06, -0.00] ) +Atom( C:5 [ 2.16, 1.44, 1.17] ) +Atom( C:6 [ 2.81, 2.24, 1.98] ) +Atom( C:7 [ 3.58, 1.75, 3.17] ) +Atom( C:8 [ 4.02, 0.30, 2.93] ) +etc. + +You can also loop over a slice of atoms, e.g. + +>>> for atom in mol[0:5]: +... print(atom) +Atom( C:1 [ -0.02, 1.53, 0.01] ) +Atom( C:2 [ 0.00, -0.00, 0.00] ) +Atom( C:3 [ 0.66, -0.52, 1.29] ) +Atom( C:4 [ 1.42, 2.06, -0.00] ) +Atom( C:5 [ 2.16, 1.44, 1.17] ) + +or + +>>> for atom in mol.atoms(range(0, 5)): +... print(atom) +Atom( C:1 [ -0.02, 1.53, 0.01] ) +Atom( C:2 [ 0.00, -0.00, 0.00] ) +Atom( C:3 [ 0.66, -0.52, 1.29] ) +Atom( C:4 [ 1.42, 2.06, -0.00] ) +Atom( C:5 [ 2.16, 1.44, 1.17] ) + +or + +>>> for atom in mol.atoms([0, 2, 5, 8]): +... print(atom) +Atom( C:1 [ -0.02, 1.53, 0.01] ) +Atom( C:3 [ 0.66, -0.52, 1.29] ) +Atom( C:6 [ 2.81, 2.24, 1.98] ) +Atom( C:9 [ 4.65, -0.26, 4.19] ) + +Molecules can be divided into residues, chains and segments. A residue +is a collection of atoms, a chain is a collection of residues, and a segment +is an arbitrary, but often-larger collection of atoms within a molecule. + +You can access residues, chains and segments in similar ways to accessing +atoms, e.g. + +>>> res = mol.residue(0) +>>> print(res) +Residue( MOL:1 num_atoms=74 ) + +>>> for res in mol.residues(): +... print(res) +Residue( MOL:1 num_atoms=74 ) + +You access atoms in a residue, chain or segment in a similar way, e.g. + +>>> res = mol.residue(0) +>>> atom = res.atom(0) +>>> print(atom) +Atom( C:1 [ -0.02, 1.53, 0.01] ) + +>>> for atom in res.atoms([0, 2, 4]): +... print(atom) +Atom( C:1 [ -0.02, 1.53, 0.01] ) +Atom( C:3 [ 0.66, -0.52, 1.29] ) +Atom( C:5 [ 2.16, 1.44, 1.17] ) diff --git a/doc/source/tutorial/part01/04_saving_a_molecule.rst b/doc/source/tutorial/part01/04_saving_a_molecule.rst new file mode 100644 index 000000000..797ce8a57 --- /dev/null +++ b/doc/source/tutorial/part01/04_saving_a_molecule.rst @@ -0,0 +1,30 @@ +================= +Saving a molecule +================= + +You save molecules using the :func:`sire.save` function; + +>>> sr.save(mol, "cholesterol.pdb") +['/path/to/cholesterol.pdb'] + +``sire`` will automatically try to guess the file format from the file +extension. In this case, the molecule is saved in PDB format. + +You can specify the format using the ``format`` argument. + +>>> sr.save(mol, "cholesterol", format="mol2") +['/path/to/cholesterol.mol2'] + +Note how the file format extension has been added automatically, and +that the full path to the file that was written is returned. + +You can specify multiple file formats, and thus write to multiple +files, e.g. + +>>> sr.save(mol, "cholesterol", format=["mol2", "pdb"]) +['/path/to/cholesterol.mol2', '/path/to/cholesterol.pdb'] + +or you can specify the filenames directly, e.g. + +>>> sr.save(mol, ["chol.pdb", "chol.mol2"]) +['/path/to/chol.pdb', '/path/to/chol.mol2'] diff --git a/doc/source/tutorial/part01/05_loading_from_multiple_files.rst b/doc/source/tutorial/part01/05_loading_from_multiple_files.rst new file mode 100644 index 000000000..11281946b --- /dev/null +++ b/doc/source/tutorial/part01/05_loading_from_multiple_files.rst @@ -0,0 +1,54 @@ +=========================== +Loading from multiple files +=========================== + +It is often the case that molecular information needs to be read from +multiple files, e.g. a separate topology and coordinate file. + +You load from multiple files simply by passing multiple filenames and/or +URLs to :func:`sire.load`. + +>>> mols = sr.load("https://siremol.org/m/ala.top", +... "https://siremol.org/m/ala.crd") +Downloading from 'https://siremol.org/m/ala.top'... +Downloading from 'https://siremol.org/m/ala.crd'... + +>>> print(mols) +System( name=ACE num_molecules=631 num_residues=633 num_atoms=1912 ) + +You can pass in the filenames as multiple arguments or as a list, +whichever you find easiest. + +>>> mols = sr.load(["https://siremol.org/m/ala.top", +... "https://siremol.org/m/ala.crd"]) + +If the files or URLs have a common base, then you can save some typing +by using :func:`sire.expand`, e.g. + +>>> mols = sr.load(sr.expand("https://siremol.org/m", +... "ala.top", "ala.crd")) + +or + +>>> mols = sr.load(sr.expand(sr.tutorial_url, +... ["ala.top", "ala.crd"])) + +.. note:: + + `sr.tutorial_url` expands to the base URL for tutorial files + (https://siremol.org/m). It is worth using this variable for + the tutorial as it auto-completes and will reduce errors. + +If you are loading files, you can also make use of glob expressions +(wildcard expansions), e.g. + +>>> mols = sr.load("ala.*") + +.. note:: + + This line loads the `ala.top` and `ala.crd` files that + were downloaded by the above lines. This is because Sire downloads + files at URLs to the current directory. You can tell it to use + a different directory by passing that in via the `directory` + argument, e.g. `sr.load(sr.expand(sr.tutorial_url,"cholesterol.sdf"), directory="tmp")`. + The directory will be created automatically if it doesn't exist. diff --git a/doc/source/tutorial/part01/06_supported_file_formats.rst b/doc/source/tutorial/part01/06_supported_file_formats.rst new file mode 100644 index 000000000..d762264bf --- /dev/null +++ b/doc/source/tutorial/part01/06_supported_file_formats.rst @@ -0,0 +1,71 @@ +====================== +Supported file formats +====================== + +``sire`` supports reading and writing to many common molecular file formats. +You can print the list of supported formats using + +.. code-block:: python + + >>> print(sr.supported_formats()) + + ## Parser Gro87 ## + Supports files: gro + Gromacs Gro87 structure format files. + ################## + + ## Parser GroTop ## + Supports files: top + Gromacs Topology format files. + ################### + + ## Parser MOL2 ## + Supports files: mol2 + Sybyl Mol2 format files. + ################# + + ## Parser PDB ## + Supports files: pdb + Protein Data Bank (PDB) format files. + ################ + + ## Parser PRM7 ## + Supports files: prm7, prm, top7, top, prmtop7, prmtop + Amber topology/parameter format files supported from Amber 7 upwards. + ################# + + ## Parser PSF ## + Supports files: psf + Charmm PSF format files. + ################ + + ## Parser RST ## + Supports files: rst, crd, trj, traj + Amber coordinate/velocity binary (netcdf) restart/trajectory files supported since Amber 9, now default since Amber 16. + ################ + + ## Parser RST7 ## + Supports files: rst7, rst, crd7, crd + Amber coordinate/velocity text (ascii) restart files supported from Amber 7 upwards. + ################# + + ## Parser SDF ## + Supports files: sdf, mol + Structure Data File (SDF) format files. + ################ + + ## Parser SUPPLEMENTARY ## + Supports files: * + Files that are supplementary to a lead parser. + ########################## + +Symmetric Input / Output +------------------------ + +One of our design principles is that molecular file input and output +is symmetrical. This means that ``sire`` can read in and write out the same +amount of information from a file (i.e. it can always read what it writes). + +Another design principle is that information should not be lost. As much +as possible, ``sire`` will load and preserve all information it can +read from a molecular file. diff --git a/doc/source/tutorial/part02/01_indexing_atoms.rst b/doc/source/tutorial/part02/01_indexing_atoms.rst new file mode 100644 index 000000000..87302f64d --- /dev/null +++ b/doc/source/tutorial/part02/01_indexing_atoms.rst @@ -0,0 +1,667 @@ +============== +Indexing Atoms +============== + +You can get an atom from any container by indexing it, as you would +a Python list. + +>>> print(mol[0]) +Atom( N:1 [ -54.07, 11.27, 41.93] ) + +would get the first atom in the container, while + +>>> print(mol[-1]) +Atom( O:11732 [ 4.73, 5.03, 46.82] ) + +gets the last atom. + +Passing in an index of an atom that doesn't exist results in an +``IndexError`` exception being raised, e.g. + +>>> print(mol[100000]) +--------------------------------------------------------------------------- +IndexError Traceback (most recent call last) +Input In [32], in () +----> 1 print(mol[100000]) + +File ~/sire.app/lib/python3.8/site-packages/sire/mol/__init__.py:414, in __fixed__getitem__(obj, key) + 412 return obj.residue(key) + 413 else: +--> 414 return obj.atom(key) + 415 else: + 416 if __is_chain_class(obj): + +IndexError: SireError::invalid_index: No item at index 100000. Index range is from -11728 to 11727. (call Sire.Error.get_last_error_details() for more info) + +You can request multiple atoms by using a slice, e.g. + +>>> print(mol[0:10]) +Selector( size=10 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +2: Atom( C:3 [ -56.06, 9.95, 42.55] ) +3: Atom( O:4 [ -57.04, 9.73, 41.82] ) +4: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +5: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +6: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +7: Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +8: Atom( N:9 [ -55.50, 9.04, 43.36] ) +9: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +) + +gives the first 10 atoms, while + +>>> print(mol[9::-1]) +Selector( size=10 +0: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +1: Atom( N:9 [ -55.50, 9.04, 43.36] ) +2: Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +3: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +4: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +5: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +6: Atom( O:4 [ -57.04, 9.73, 41.82] ) +7: Atom( C:3 [ -56.06, 9.95, 42.55] ) +8: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +9: Atom( N:1 [ -54.07, 11.27, 41.93] ) +) + +gives the first 10 atoms in reverse order. + +The returned :class:`~sire.mol.Selector_Atom_` is itself a +molecular container, which has all of the same indexing and +other functions as :class:`~sire.mol.Atom` et al. + +>>> print(mol[0:10][-1:4:-1]) +Selector( size=5 +0: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +1: Atom( N:9 [ -55.50, 9.04, 43.36] ) +2: Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +3: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +4: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +) + +gets the 6th to 10th atoms in reverse order. + +You can also pass in a list of indicies of atoms. + +>>> print(mol[[0, 2, 4, 6, 8]]) +Selector( size=5 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( C:3 [ -56.06, 9.95, 42.55] ) +2: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +3: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +4: Atom( N:9 [ -55.50, 9.04, 43.36] ) +) + +This gives the atoms at indicies 0, 2, 4, 6, and 8. + +This indexing is a shorthand for calling the :func:`~sire.mol.Atom.atom` +(for single) and :func:`~sire.mol.Atom.atoms` (for multiple) atom functions, +which are available on all of the molecular container types. + +You can call these directly, e.g. + +>>> print(mol.atom(0)) +Atom( N:1 [ -54.07, 11.27, 41.93] ) + +>>> print(mol.atoms([0, 2, 4, 6, 8])) +Selector( size=5 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( C:3 [ -56.06, 9.95, 42.55] ) +2: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +3: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +4: Atom( N:9 [ -55.50, 9.04, 43.36] ) +) + +The :func:`~sire.mol.Atom.atom` function is guaranteed to always return +either a single atom, or raise an exception if this is not possible. + +The :func:`~sire.mol.Atom.atoms` function will return either a single +atom or a selector of atoms, or raise an exception if this is not possible. + +Accessing by name +----------------- + +So far we have been accessing the molecular containers by index, as if +they were Python lists. We can also treat the molecular containers +like Python dictionaries, and get atoms by their name. + +For example, to get the atoms called "C" we would use + +>>> print(mol["C"]) +Selector( size=1494 +0: Atom( C:3 [ -56.06, 9.95, 42.55] ) +1: Atom( C:11 [ -56.14, 7.05, 42.06] ) +2: Atom( C:18 [ -54.61, 4.90, 40.03] ) +3: Atom( C:26 [ -54.80, 2.14, 38.44] ) +4: Atom( C:35 [ -53.58, -0.34, 36.88] ) +... +1489: Atom( C:11625 [ 23.84, -6.28, 31.63] ) +1490: Atom( C:11630 [ 26.57, -5.11, 30.71] ) +1491: Atom( C:11637 [ 28.49, -2.95, 31.83] ) +1492: Atom( C:11646 [ 30.02, -0.22, 31.11] ) +1493: Atom( C:11654 [ 32.09, -0.82, 34.12] ) +) + +Note that there are multiple atoms in this molecule called "C", hence +several are returned. This would raise an exception if you called +the shorthand :func:`~sire.mol.Atom.atom` function with this name, + +>>> print(mol.atom("C")) +--------------------------------------------------------------------------- +KeyError Traceback (most recent call last) +Input In [10], in () +----> 1 mol.atom("C") + +KeyError: "SireMol::duplicate_atom: More than one atom matches the ID +AtomName('C') (number of matches is 1494). +(call Sire.Error.get_last_error_details() for more info)" + +A ``KeyError`` exception has been raised because there are multiple +atoms in this protein that are called "C" and Sire does not know which +one you want. + +In this case, you would have to use the shorthand +:func:`~sire.mol.Atom.atoms` function. + +>>> print(mol.atoms("C")) +Selector( size=1494 +0: Atom( C:3 [ -56.06, 9.95, 42.55] ) +1: Atom( C:11 [ -56.14, 7.05, 42.06] ) +2: Atom( C:18 [ -54.61, 4.90, 40.03] ) +3: Atom( C:26 [ -54.80, 2.14, 38.44] ) +4: Atom( C:35 [ -53.58, -0.34, 36.88] ) +... +1489: Atom( C:11625 [ 23.84, -6.28, 31.63] ) +1490: Atom( C:11630 [ 26.57, -5.11, 30.71] ) +1491: Atom( C:11637 [ 28.49, -2.95, 31.83] ) +1492: Atom( C:11646 [ 30.02, -0.22, 31.11] ) +1493: Atom( C:11654 [ 32.09, -0.82, 34.12] ) +) + +.. note:: + + Using the index operator (``mol["C"]``) is easiest, as it will always + do the right thing. Use the :func:`~sire.mol.Atom.atom` and + :func:`~sire.mol.Atom.atoms` functions only when you want to + ensure that the container will return atoms. + +As before, the returned :class:`~sire.mol.Selector_Atom_` is itself a container, +and so also has its own ``.atom()``, ``.atoms()`` and indexing functions, e.g. + +>>> print(mol["C"][0]) +Atom( C:3 [ -56.06, 9.95, 42.55] ) + +gives the atom at the index 0 in the container of atoms that are called "C", +and + +>>> print(mol("C")[-1]) +Atom( C:11654 [ 32.09, -0.82, 34.12] ) + +gives the last atom in the container of atoms that are called "C". + +Asking for an atom that doesn't exist will result in a ``KeyError`` +exception being raised. + +>>> print(mol["X"]) +--------------------------------------------------------------------------- +KeyError Traceback (most recent call last) +Input In [24], in () +----> 1 print(mol["X"]) + +File ~/sire.app/lib/python3.8/site-packages/Sire/Mol/__init__.py:419, in __fixed__getitem__(obj, key) + 417 return obj.residues(key) + 418 else: +--> 419 return obj.atoms(key) + +File ~/sire.app/lib/python3.8/site-packages/Sire/Mol/__init__.py:428, in __fixed__atoms__(obj, idx) + 426 return obj.__orig__atoms(list(idx)) + 427 else: +--> 428 return obj.__orig__atoms(idx) + +KeyError: 'SireMol::missing_atom: There is no atom called "X" in the layout "{c4d51f89-f4f7-4e0c-854d-da27affe1baf}". (call Sire.Error.get_last_error_details() for more info)' + +Searching by number +------------------- + +So far, we have identified atoms by their index or by their name. There is +a third way to identify atoms. This is by their atom number. The atom number +is an identifying number that is assigned to atoms, typically via an +atom number column in the input file. We can look up atoms by number +using a search string. + +>>> print(mol["atomnum 1"]) +Atom( N:1 [ -54.07, 11.27, 41.93] ) + +Here, ``atomnum 1`` is a search string that looks for atoms with number 1. + +.. note:: + + Note how the name ``N`` and number ``1`` of the atom are printed + out, along with its coordinates. + +This search string is very powerful. For example, you can search for +atoms that have a number that is less than 10. + +>>> print(mol["atomnum < 10"]) +Selector( size=9 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +2: Atom( C:3 [ -56.06, 9.95, 42.55] ) +3: Atom( O:4 [ -57.04, 9.73, 41.82] ) +4: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +5: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +6: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +7: Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +8: Atom( N:9 [ -55.50, 9.04, 43.36] ) +) + +You can combine search strings with logical operators (e.g. ``and``, +``or`` and ``not``). + +>>> print(mol["atomnum >= 5 and atomnum < 10"]) +Selector( size=5 +0: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +1: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +2: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +3: Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +4: Atom( N:9 [ -55.50, 9.04, 43.36] ) +) + +and can also search for multiple atom numbers + +>>> print(mol["atomnum 1, 3, 5, 7"]) +Selector( size=4 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( C:3 [ -56.06, 9.95, 42.55] ) +2: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +3: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +) + +or ranges of atom numbers + +>>> print(mol["atomnum 1:5"]) +Selector( size=5 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +2: Atom( C:3 [ -56.06, 9.95, 42.55] ) +3: Atom( O:4 [ -57.04, 9.73, 41.82] ) +4: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +) + +or ranges with steps, e.g. + +>>> print(mol["atomnum 1:91:10"]) +Selector( size=10 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( C:11 [ -56.14, 7.05, 42.06] ) +2: Atom( CG:21 [ -54.57, 8.40, 38.40] ) +3: Atom( CE:31 [ -58.18, 0.27, 42.14] ) +4: Atom( C:41 [ -52.69, -3.63, 36.40] ) +5: Atom( OD1:51 [ -47.78, -5.70, 36.23] ) +6: Atom( CB:61 [ -52.91, 17.54, 38.36] ) +7: Atom( C:71 [ -56.03, 16.00, 33.41] ) +8: Atom( CB:81 [ -52.48, 16.28, 32.24] ) +9: Atom( OG:91 [ -55.67, 10.80, 30.06] ) +) + +.. note:: + + Search number ranges are inclusive of both ends. Also note + that the results appear in the order the atoms match from their + molecular container, not the order of the numbers (range) in the search + string. So ``mol["atomnum 10:1:-1"]`` would not reverse the atoms. + The search string asks for any atoms that have a number between 10 and 1. + +You can even mix combinations of multiple atom numbers and ranges! + +>>> print(mol["atomnum 1:3, 7:10, 20, 30"]) +Selector( size=9 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +2: Atom( C:3 [ -56.06, 9.95, 42.55] ) +3: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +4: Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +5: Atom( N:9 [ -55.50, 9.04, 43.36] ) +6: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +7: Atom( CB:20 [ -53.99, 7.18, 39.13] ) +8: Atom( CD:30 [ -57.70, -0.34, 40.83] ) +) + +Searching by name +----------------- + +You can include atom names (``atomname``) in the search string. + +>>> print(mol["atomname CA"]) +Selector( size=1494 +0: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +1: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +2: Atom( CA:17 [ -54.99, 6.39, 39.98] ) +3: Atom( CA:25 [ -55.33, 2.58, 39.80] ) +4: Atom( CA:34 [ -52.97, 1.03, 37.19] ) +... +1489: Atom( CA:11624 [ 22.43, -6.30, 32.21] ) +1490: Atom( CA:11629 [ 25.36, -5.51, 29.89] ) +1491: Atom( CA:11636 [ 27.51, -3.84, 32.59] ) +1492: Atom( CA:11645 [ 28.74, -0.85, 30.58] ) +1493: Atom( CA:11653 [ 31.65, -0.00, 32.91] ) +) + +can search for multiple atom names + +>>> print(mol["atomname CA, C, N"]) +Selector( size=4482 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +2: Atom( C:3 [ -56.06, 9.95, 42.55] ) +3: Atom( N:9 [ -55.50, 9.04, 43.36] ) +4: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +... +4477: Atom( CA:11645 [ 28.74, -0.85, 30.58] ) +4478: Atom( C:11646 [ 30.02, -0.22, 31.11] ) +4479: Atom( N:11652 [ 30.40, -0.51, 32.35] ) +4480: Atom( CA:11653 [ 31.65, -0.00, 32.91] ) +4481: Atom( C:11654 [ 32.09, -0.82, 34.12] ) +) + +.. note:: + + The atoms will appear in the order they match from their + molecular container, not the order the atom names appear + in the search string. + +and can use mixtures of any identifiers, e.g. + +>>> print(mol["atomnum > 1000 and atomname N"]) +Selector( size=1369 +0: Atom( N:1005 [ -30.70, -11.17, 28.73] ) +1: Atom( N:1014 [ -32.11, -10.01, 25.69] ) +2: Atom( N:1023 [ -32.43, -11.41, 22.41] ) +3: Atom( N:1027 [ -32.33, -11.69, 18.84] ) +4: Atom( N:1038 [ -35.13, -10.12, 17.49] ) +... +1364: Atom( N:11623 [ 22.09, -7.64, 32.65] ) +1365: Atom( N:11628 [ 24.07, -5.44, 30.61] ) +1366: Atom( N:11635 [ 26.39, -4.38, 31.81] ) +1367: Atom( N:11644 [ 28.07, -1.72, 31.54] ) +1368: Atom( N:11652 [ 30.40, -0.51, 32.35] ) +) + +Searching by wildcards (glob matching) +-------------------------------------- + +You can use wildcards (`glob matching `__) +when searching for atom names. + +>>> print(mol["atomname /c*/i"]) +Selector( size=7440 +0: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +1: Atom( C:3 [ -56.06, 9.95, 42.55] ) +2: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +3: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +4: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +... +7435: Atom( C2:11705 [ 10.05, 21.52, 30.16] ) +7436: Atom( C3:11706 [ 9.26, 22.77, 30.56] ) +7437: Atom( C4:11708 [ 8.69, 22.56, 31.97] ) +7438: Atom( C5:11709 [ 7.74, 23.65, 32.46] ) +7439: Atom( C6:11712 [ 8.10, 23.00, 29.56] ) +) + +The wildcard search must be placed between backslashes (``/``). The +``i`` at the end instructs Sire to do a case-insensitive search. + +Wildcard searching is very powerful. For example, here we search for +all atoms that are called ``N`` something number. + +>>> print(mol["atomname /N?[0-9]/"]) +Selector( size=378 +0: Atom( NE2:100 [ -58.70, 18.42, 26.32] ) +1: Atom( ND2:157 [ -56.54, 0.31, 26.32] ) +2: Atom( NH1:277 [ -41.15, 21.58, 37.21] ) +3: Atom( NH2:278 [ -39.20, 22.44, 36.34] ) +4: Atom( ND1:285 [ -44.10, 18.72, 31.40] ) +... +373: Atom( NH2:11530 [ 11.73, 18.45, 35.06] ) +374: Atom( NE2:11555 [ 18.10, 6.67, 34.31] ) +375: Atom( NH1:11573 [ 11.37, 5.05, 33.21] ) +376: Atom( NH2:11574 [ 12.54, 6.84, 34.03] ) +377: Atom( ND2:11651 [ 25.41, 0.07, 29.66] ) +) + +More information about the glob matching syntax can be found +on its `wikipedia page `__. + +This is implemented by `QRegularExpression's wildCardToRegularExpression function `__. + +Searching by element +-------------------- + +The search strings are very powerful, and are described in more detail in a +:doc:`later chapter `. One cool feature is that you can +search for atoms by their element. + +>>> print(mol["element C"]) +Selector( size=7440 +0: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +1: Atom( C:3 [ -56.06, 9.95, 42.55] ) +2: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +3: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +4: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +... +7435: Atom( C2:11705 [ 10.05, 21.52, 30.16] ) +7436: Atom( C3:11706 [ 9.26, 22.77, 30.56] ) +7437: Atom( C4:11708 [ 8.69, 22.56, 31.97] ) +7438: Atom( C5:11709 [ 7.74, 23.65, 32.46] ) +7439: Atom( C6:11712 [ 8.10, 23.00, 29.56] ) +) + +You can use either the element's symbol, or its full name + +>>> print(mol["element nitrogen"]) +Selector( size=2018 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( N:9 [ -55.50, 9.04, 43.36] ) +2: Atom( N:16 [ -55.01, 6.94, 41.35] ) +3: Atom( N:24 [ -55.57, 4.01, 39.78] ) +4: Atom( NZ:32 [ -59.38, -0.44, 42.67] ) +... +2013: Atom( N:11628 [ 24.07, -5.44, 30.61] ) +2014: Atom( N:11635 [ 26.39, -4.38, 31.81] ) +2015: Atom( N:11644 [ 28.07, -1.72, 31.54] ) +2016: Atom( ND2:11651 [ 25.41, 0.07, 29.66] ) +2017: Atom( N:11652 [ 30.40, -0.51, 32.35] ) +) + +or search for multiple elements at a time + +>>> print(mol["element C, O, N"]) +Selector( size=11660 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +2: Atom( C:3 [ -56.06, 9.95, 42.55] ) +3: Atom( O:4 [ -57.04, 9.73, 41.82] ) +4: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +... +11655: Atom( O:11728 [ -4.73, 43.02, 37.18] ) +11656: Atom( O:11729 [ 28.91, -18.15, 61.95] ) +11657: Atom( O:11730 [ 5.57, 7.38, 35.58] ) +11658: Atom( O:11731 [ 24.49, -20.60, 42.83] ) +11659: Atom( O:11732 [ 4.73, 5.03, 46.82] ) +) + +Uniquely identifying atoms +-------------------------- + +It is often useful to have a unique identifier for an atom in a molecule. +The name and number can't do this, as it is possible that many atoms +could have the same name, and/or the same number. + +To solve this, Sire uses the index of the atom in the molecule as its +unique identifier. This index is called ``atomidx``, and can also be +used in searches. + +>>> print(mol["atomidx 0"]) +Atom( N:1 [ -54.07, 11.27, 41.93] ) + +This has printed the first atom in the molecule. + +You can get an atom's index using the :func:`~sire.mol.Atom.index` function. + +>>> print(mol["atomidx 0"].index()) +AtomIdx(0) + +.. warning:: + + Be careful searching with ``atomidx``. This is the unique + index of the atom within its parent molecule, not the index + of the atom in a container. So ``mol[5:10]["atomidx 0"]`` would + raise a KeyError as the first atom in the molecule is not + contained in the slice of atoms 5 to 9. + +Atom identifying types +---------------------- + +Another way to index atoms is to use the atom indexing types, i.e. +:class:`~sire.mol.AtomIdx`, :class:`~sire.mol.AtomName` and +:class:`~sire.mol.AtomNum`. The easiest way to create these is +by using the function :func:`sire.atomid`. + +>>> print(mol[sr.atomid("CA")]) +Selector( size=1494 +0: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +1: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +2: Atom( CA:17 [ -54.99, 6.39, 39.98] ) +3: Atom( CA:25 [ -55.33, 2.58, 39.80] ) +4: Atom( CA:34 [ -52.97, 1.03, 37.19] ) +... +1489: Atom( CA:11624 [ 22.43, -6.30, 32.21] ) +1490: Atom( CA:11629 [ 25.36, -5.51, 29.89] ) +1491: Atom( CA:11636 [ 27.51, -3.84, 32.59] ) +1492: Atom( CA:11645 [ 28.74, -0.85, 30.58] ) +1493: Atom( CA:11653 [ 31.65, -0.00, 32.91] ) +) + +This returns the atoms called "CA", as ``sr.atomid("CA")`` has created +an :class:`~sire.mol.AtomName` object. + +>>> print(sr.atomid("CA")) +AtomName('CA') + +This function will create an :class:`~sire.mol.AtomNum` if it is passed +an integer, e.g. + +>>> print(sr.atomid(1)) +AtomNum(1) +>>> print(mol[sr.atomid(1)]) +Atom( N:1 [ -54.07, 11.27, 41.93] ) + +You can set both a name and a number by passing in two arguments, e.g. + +>>> print(mol[sr.atomid("CA", 10)]) +Atom( CA:10 [ -56.02, 7.64, 43.47] ) +>>> print(mol[sr.atomid(name="CA", num=10)]) +Atom( CA:10 [ -56.02, 7.64, 43.47] ) + +Iterating over atoms +-------------------- + +The :class:`~sire.mol.Selector_Atom_` class is iterable, meaning that +it can be used in loops. + +>>> for atom in mol["atomnum < 10"]: +... print(atom) +Atom( N:1 [ -54.07, 11.27, 41.93] ) +Atom( CA:2 [ -55.43, 11.35, 42.54] ) +Atom( C:3 [ -56.06, 9.95, 42.55] ) +Atom( O:4 [ -57.04, 9.73, 41.82] ) +Atom( CB:5 [ -56.32, 12.33, 41.76] ) +Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +Atom( N:9 [ -55.50, 9.04, 43.36] ) + +Counting atoms +-------------- + +You can find all of the names of the atoms using + +>>> print(mol.atoms().names()) +[AtomName('N'), AtomName('CA'), AtomName('C'), AtomName('O'), + AtomName('CB'), AtomName('CG1'), AtomName('CG2'), AtomName('CD1'), + AtomName('N'), AtomName('CA')....] + +The set of names used can be found via a Python set, e.g. + +>>> print(set(mol.atoms().names())) +{AtomName('CE1'), AtomName('CE2'), AtomName('CE3'), AtomName('OE1'), + AtomName('OE2'), AtomName('CZ2'), AtomName('CZ3'), AtomName('NE'), + AtomName('NH1'), AtomName('NH2'), AtomName('ND1'), AtomName('ND2'), + AtomName('O1'), AtomName('C'), AtomName('O2'), AtomName('O4'), + AtomName('O3'), AtomName('O5'), AtomName('O7'), AtomName('O6'), + AtomName('NZ'), AtomName('CG1'), AtomName('N'), AtomName('O'), + AtomName('CG2'), AtomName('SD'), AtomName('C1'), AtomName('C2'), + AtomName('SG'), AtomName('C3'), AtomName('C4'), AtomName('C5'), + AtomName('OG'), AtomName('OG1'), AtomName('OH'), AtomName('NE2'), + AtomName('NE1'), AtomName('CA'), AtomName('CB'), AtomName('CD'), + AtomName('CE'), AtomName('C6'), AtomName('CG'), AtomName('CH2'), + AtomName('CD1'), AtomName('CD2'), AtomName('CZ'), AtomName('OD1'), + AtomName('OD2')} + +You can use this to count the number of atoms that have each name. + +>>> for name in set(mol.atoms().names()): +... print(name, len(mol.atoms(name))) +AtomName('CE1') 128 +AtomName('CE2') 110 +AtomName('CE3') 24 +AtomName('OE1') 139 +AtomName('OE2') 107 +AtomName('CZ2') 24 +AtomName('CZ3') 24 +AtomName('NE') 100 +AtomName('NH1') 100 +AtomName('NH2') 100 +AtomName('ND1') 42 +AtomName('ND2') 38 +AtomName('O1') 6 +AtomName('C') 1494 +AtomName('O2') 6 +AtomName('O4') 6 +AtomName('O3') 2 +AtomName('O5') 2 +AtomName('O7') 2 +AtomName('O6') 2 +AtomName('NZ') 46 +AtomName('CG1') 138 +AtomName('N') 1494 +AtomName('O') 1512 +AtomName('CG2') 226 +AtomName('SD') 20 +AtomName('C1') 6 +AtomName('C2') 6 +AtomName('SG') 48 +AtomName('C3') 6 +AtomName('C4') 6 +AtomName('C5') 2 +AtomName('OG') 102 +AtomName('OG1') 88 +AtomName('OH') 22 +AtomName('NE2') 74 +AtomName('NE1') 24 +AtomName('CA') 1494 +AtomName('CB') 1426 +AtomName('CD') 375 +AtomName('CE') 66 +AtomName('C6') 2 +AtomName('CG') 895 +AtomName('CH2') 24 +AtomName('CD1') 400 +AtomName('CD2') 378 +AtomName('CZ') 186 +AtomName('OD1') 122 +AtomName('OD2') 84 + +You could do something similar using the :func:`~sire.mol.Selector_Atom_.numbers` +function to get the numbers of all of the atoms. diff --git a/doc/source/tutorial/part02/02_indexing_residues.rst b/doc/source/tutorial/part02/02_indexing_residues.rst new file mode 100644 index 000000000..79f61a05e --- /dev/null +++ b/doc/source/tutorial/part02/02_indexing_residues.rst @@ -0,0 +1,469 @@ +================= +Indexing Residues +================= + +Residues are collections of atoms. They typically represent an amino +acid residue in a protein. Residues are implemented via the +:class:`~sire.mol.Residue` class, which itself is a molecular container +for :class:`~sire.mol.Atom` objects. An atom can only belong to one +residue at a time (and they don't need to be assigned to a residue). + +You can access residues in a molecule container using the +:func:`~sire.mol.Residue.residue` and :func:`~sire.mol.Residue.residues` +functions, which are available on all of the molecular container types. + +>>> print(mol.residue(0)) +Residue( ILE:6 num_atoms=8 ) + +gives the molecule at index 0, while + +>>> print(mol.residues("ALA")) +Selector( size=155 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:30 num_atoms=5 ) +2: Residue( ALA:53 num_atoms=5 ) +3: Residue( ALA:65 num_atoms=5 ) +4: Residue( ALA:85 num_atoms=5 ) +... +150: Residue( ALA:578 num_atoms=5 ) +151: Residue( ALA:584 num_atoms=5 ) +152: Residue( ALA:593 num_atoms=5 ) +153: Residue( ALA:646 num_atoms=5 ) +154: Residue( ALA:691 num_atoms=5 ) +) + +returns all residues that are named "ALA". + +The :func:`~sire.mol.Residue.residue` will raise a KeyError if more than +one residue matches the search. + +>>> print(mol.residue("ALA")) +--------------------------------------------------------------------------- +KeyError Traceback (most recent call last) +Input In [33], in () +----> 1 print(mol.residue("ALA")) + +KeyError: "SireMol::duplicate_residue: More than one residue matches the ID ResName('ALA') (number of matches is 155). (call Sire.Error.get_last_error_details() for more info)" + +You can slice residues using the ``range`` function, e.g. + +>>> print(mol.residues(range(0, 10))) +Selector( size=10 +0: Residue( ILE:6 num_atoms=8 ) +1: Residue( VAL:7 num_atoms=7 ) +2: Residue( LEU:8 num_atoms=8 ) +3: Residue( LYS:9 num_atoms=9 ) +4: Residue( SER:10 num_atoms=6 ) +5: Residue( SER:11 num_atoms=6 ) +6: Residue( ASP:12 num_atoms=8 ) +7: Residue( GLY:13 num_atoms=4 ) +8: Residue( VAL:22 num_atoms=7 ) +9: Residue( ALA:23 num_atoms=5 ) +) + +The result, a :class:`~sire.mol.Selector_Residue_` is also a molecular +container, and can be used like :class:`~sire.mol.Selector_Atom_`. + +>>> print(mol.residues("ALA")[0:5]) +Selector( size=5 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:30 num_atoms=5 ) +2: Residue( ALA:53 num_atoms=5 ) +3: Residue( ALA:65 num_atoms=5 ) +4: Residue( ALA:85 num_atoms=5 ) +) + +gives the first 5 residues named "ALA". + +Searching for residues +---------------------- + +You can also search for residues, using their name (``resname``), +their number (``resnum``) and/or their index in their parent +molecule (``residx``). + +>>> print(mol.residues("resnum 5")) +Selector( size=2 +0: Residue( GLU:5 num_atoms=9 ) +1: Residue( GLU:5 num_atoms=9 ) +) + +.. note:: + + There are two residues with number 5 as there are multiple chains + in this protein. Note also how the residue's name (GLU) and + number (5) are printed in its output. + +You can use the residue search string in a molecular container's index +operator too! + +>>> print(mol["resnum 5"]) +Selector( size=2 +0: Residue( GLU:5 num_atoms=9 ) +1: Residue( GLU:5 num_atoms=9 ) +) + +and you can combine it with atom identifiers, e.g. + +>>> print(mol["resname ALA and atomname CA"]) +Selector( size=155 +0: Atom( CA:65 [ -54.77, 13.35, 37.26] ) +1: Atom( CA:117 [ -62.33, 13.58, 32.15] ) +2: Atom( CA:204 [ -45.04, 6.02, 36.66] ) +3: Atom( CA:306 [ -47.63, 28.39, 36.61] ) +4: Atom( CA:352 [ -34.57, 20.94, 29.60] ) +... +150: Atom( CA:10774 [ -4.40, 7.58, 14.84] ) +151: Atom( CA:10816 [ -1.17, 9.47, 25.09] ) +152: Atom( CA:10886 [ 9.70, -11.41, 19.28] ) +153: Atom( CA:11247 [ 14.11, 2.16, 14.69] ) +154: Atom( CA:11624 [ 22.43, -6.30, 32.21] ) +) + +You can also search for multiple residue names or numbers. + +>>> print(mol["resname ALA, ARG"]) +Selector( size=255 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:30 num_atoms=5 ) +2: Residue( ALA:53 num_atoms=5 ) +3: Residue( ARG:61 num_atoms=11 ) +4: Residue( ALA:65 num_atoms=5 ) +... +250: Residue( ARG:652 num_atoms=11 ) +251: Residue( ARG:657 num_atoms=11 ) +252: Residue( ARG:680 num_atoms=11 ) +253: Residue( ARG:685 num_atoms=11 ) +254: Residue( ALA:691 num_atoms=5 ) +) + +>>> print(mol["resnum 5, 7, 9"]) +Selector( size=10 +0: Residue( VAL:7 num_atoms=7 ) +1: Residue( LYS:9 num_atoms=9 ) +2: Residue( GLU:5 num_atoms=9 ) +3: Residue( VAL:7 num_atoms=7 ) +4: Residue( GLU:9 num_atoms=9 ) +5: Residue( VAL:7 num_atoms=7 ) +6: Residue( LYS:9 num_atoms=9 ) +7: Residue( GLU:5 num_atoms=9 ) +8: Residue( VAL:7 num_atoms=7 ) +9: Residue( GLU:9 num_atoms=9 ) +) + +>>> print(mol["resnum 201:204"]) +Selector( size=9 +0: Residue( LEU:201 num_atoms=8 ) +1: Residue( ARG:202 num_atoms=11 ) +2: Residue( GLU:203 num_atoms=9 ) +3: Residue( LEU:204 num_atoms=8 ) +4: Residue( LEU:201 num_atoms=8 ) +5: Residue( ARG:202 num_atoms=11 ) +6: Residue( GLU:203 num_atoms=9 ) +7: Residue( LEU:204 num_atoms=8 ) +8: Residue( PEG:201 num_atoms=7 ) +) + +Wildcard (glob) searching is also supported for residue names. + +>>> print(mol["resname /ala/i"]) +Selector( size=155 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:30 num_atoms=5 ) +2: Residue( ALA:53 num_atoms=5 ) +3: Residue( ALA:65 num_atoms=5 ) +4: Residue( ALA:85 num_atoms=5 ) +... +150: Residue( ALA:578 num_atoms=5 ) +151: Residue( ALA:584 num_atoms=5 ) +152: Residue( ALA:593 num_atoms=5 ) +153: Residue( ALA:646 num_atoms=5 ) +154: Residue( ALA:691 num_atoms=5 ) +) + +>>> print(mol["resname /HI?/"]) +Selector( size=42 +0: Residue( HIS:62 num_atoms=10 ) +1: Residue( HIS:27 num_atoms=10 ) +2: Residue( HIS:39 num_atoms=10 ) +3: Residue( HIS:75 num_atoms=10 ) +4: Residue( HIS:84 num_atoms=10 ) +... +37: Residue( HIS:638 num_atoms=10 ) +38: Residue( HIS:639 num_atoms=10 ) +39: Residue( HIS:662 num_atoms=10 ) +40: Residue( HIS:666 num_atoms=10 ) +41: Residue( HIS:668 num_atoms=10 ) +) + +This last search is particularly useful for proteins, as it is common +for histidine residues to have different names depending on protonation +state (e.g. "HIS", "HIP", "HIE" or "HID"). + +Finding the atoms in a residue +------------------------------ + +Because both :class:`~sire.mol.Residue` and :class:`~sire.mol.Selector_Residue_` +are molecular containers, they also have their own +:func:`~sire.mol.Residue.atom` and :func:`~sire.mol.Residue.atoms` functions, +which behave as you would expect. + +>>> print(mol["resname ALA"].atoms("CA")) +Selector( size=155 +0: Atom( CA:65 [ -54.77, 13.35, 37.26] ) +1: Atom( CA:117 [ -62.33, 13.58, 32.15] ) +2: Atom( CA:204 [ -45.04, 6.02, 36.66] ) +3: Atom( CA:306 [ -47.63, 28.39, 36.61] ) +4: Atom( CA:352 [ -34.57, 20.94, 29.60] ) +... +150: Atom( CA:10774 [ -4.40, 7.58, 14.84] ) +151: Atom( CA:10816 [ -1.17, 9.47, 25.09] ) +152: Atom( CA:10886 [ 9.70, -11.41, 19.28] ) +153: Atom( CA:11247 [ 14.11, 2.16, 14.69] ) +154: Atom( CA:11624 [ 22.43, -6.30, 32.21] ) +) + +You can get all of the atoms in a residue by calling the +:func:`~sire.mol.Residue.atoms` function without any arguments. + +>>> mol["residx 0"].atoms() +Selector( size=8 +0: Atom( N:1 [ -54.07, 11.27, 41.93] ) +1: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +2: Atom( C:3 [ -56.06, 9.95, 42.55] ) +3: Atom( O:4 [ -57.04, 9.73, 41.82] ) +4: Atom( CB:5 [ -56.32, 12.33, 41.76] ) +5: Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +6: Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +7: Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +) + +Another route is to use the ``atoms in`` phrase in a search string, e.g. + +>>> print(mol["atoms in resname ALA"]) +Selector( size=775 +0: Atom( N:64 [ -54.11, 14.36, 38.13] ) +1: Atom( CA:65 [ -54.77, 13.35, 37.26] ) +2: Atom( C:66 [ -55.92, 14.01, 36.49] ) +3: Atom( O:67 [ -57.09, 13.65, 36.74] ) +4: Atom( CB:68 [ -55.25, 12.19, 38.09] ) +... +770: Atom( N:11623 [ 22.09, -7.64, 32.65] ) +771: Atom( CA:11624 [ 22.43, -6.30, 32.21] ) +772: Atom( C:11625 [ 23.84, -6.28, 31.63] ) +773: Atom( O:11626 [ 24.72, -7.01, 32.08] ) +774: Atom( CB:11627 [ 22.32, -5.30, 33.36] ) +) + +This has returned all of the atoms in residues that are called "ALA". + +You can get the residues that match atoms using ``residues with``, e.g. + +>>> print(mol["residues with atomname CA"]) +Selector( size=1494 +0: Residue( ILE:6 num_atoms=8 ) +1: Residue( VAL:7 num_atoms=7 ) +2: Residue( LEU:8 num_atoms=8 ) +3: Residue( LYS:9 num_atoms=9 ) +4: Residue( SER:10 num_atoms=6 ) +... +1489: Residue( ALA:691 num_atoms=5 ) +1490: Residue( PRO:692 num_atoms=7 ) +1491: Residue( GLU:693 num_atoms=9 ) +1492: Residue( ASN:694 num_atoms=8 ) +1493: Residue( ASP:695 num_atoms=8 ) +) + +This has returned all of the residues that contain an atom called "CA". + +Another way to do this would be to call the :func:`~sire.mol.Selected_Atom_.residues` +function on the molecular container, e.g. + +>>> print(mol["CA"].residues()) +Selector( size=1494 +0: Residue( ILE:6 num_atoms=8 ) +1: Residue( VAL:7 num_atoms=7 ) +2: Residue( LEU:8 num_atoms=8 ) +3: Residue( LYS:9 num_atoms=9 ) +4: Residue( SER:10 num_atoms=6 ) +... +1489: Residue( ALA:691 num_atoms=5 ) +1490: Residue( PRO:692 num_atoms=7 ) +1491: Residue( GLU:693 num_atoms=9 ) +1492: Residue( ASN:694 num_atoms=8 ) +1493: Residue( ASP:695 num_atoms=8 ) +) + +Uniquely identifying a residue +------------------------------ + +You uniquely identify a residue in a molecule using its residue index +(``residx``). You can get the index of a residue in a molecule by +calling its :func:`~sire.mol.Residue.index` function. + +>>> print(mol.residue(0).index()) +ResIdx(0) + +.. warning:: + + Be careful indexing by residue index. This is the index of the residue + that uniquely identifies it within its parent molecule. It is not the + index of the residue in an arbitrary molecular container. + +Residue identifying types +------------------------- + +Another way to index residues is to use the residue indexing types, i.e. +:class:`~sire.mol.ResIdx`, :class:`~sire.mol.ResName` and +:class:`~sire.mol.ResNum`. The easiest way to create these is +by using the function :func:`sire.resid`. + +>>> print(mol[sr.resid("ALA")]) +Selector( size=155 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:30 num_atoms=5 ) +2: Residue( ALA:53 num_atoms=5 ) +3: Residue( ALA:65 num_atoms=5 ) +4: Residue( ALA:85 num_atoms=5 ) +... +150: Residue( ALA:578 num_atoms=5 ) +151: Residue( ALA:584 num_atoms=5 ) +152: Residue( ALA:593 num_atoms=5 ) +153: Residue( ALA:646 num_atoms=5 ) +154: Residue( ALA:691 num_atoms=5 ) +) + +This returns the residues called "ALA", as ``sr.resid("ALA")`` has created +an :class:`~sire.mol.ResName` object. + +>>> print(sr.resid("ALA")) +ResName('ALA') + +This function will create an :class:`~sire.mol.ResNum` if it is passed +an integer, e.g. + +>>> print(sr.resid(5)) +ResNum(5) +>>> print(mol[sr.resid(5)]) +Selector( size=2 +0: Residue( GLU:5 num_atoms=9 ) +1: Residue( GLU:5 num_atoms=9 ) +) + +You can set both a name and a number by passing in two arguments, e.g. + +>>> print(mol[sr.resid("ALA", 23)]) +Selector( size=2 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:23 num_atoms=5 ) +) +>>> print(mol[sr.resid(name="ALA", num=23)]) +Selector( size=2 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:23 num_atoms=5 ) +) + +Iterating over residues +----------------------- + +The :class:`~sire.mol.Selector_Residue_` class is iterable, meaning that +it can be used in loops. + +>>> for res in mol["resname ALA and resnum < 30"]: +... print(res) +Residue( ALA:23 num_atoms=5 ) +Residue( ALA:16 num_atoms=5 ) +Residue( ALA:21 num_atoms=5 ) +Residue( ALA:23 num_atoms=5 ) +Residue( ALA:16 num_atoms=5 ) + +This is particulary useful when combined with looping over the +atoms in the residues. + +>>> for res in mol["residx < 3"]: +... for atom in res["atomname C, CA"]: +... print(res, atom) +Residue( ILE:6 num_atoms=8 ) Atom( CA:2 [ -55.43, 11.35, 42.54] ) +Residue( ILE:6 num_atoms=8 ) Atom( C:3 [ -56.06, 9.95, 42.55] ) +Residue( VAL:7 num_atoms=7 ) Atom( CA:10 [ -56.02, 7.64, 43.47] ) +Residue( VAL:7 num_atoms=7 ) Atom( C:11 [ -56.14, 7.05, 42.06] ) +Residue( LEU:8 num_atoms=8 ) Atom( CA:17 [ -54.99, 6.39, 39.98] ) +Residue( LEU:8 num_atoms=8 ) Atom( C:18 [ -54.61, 4.90, 40.03] ) + +Counting residues +----------------- + +Similar to how you did for atom, you can find the set of residue names +via + +>>> print(set(mol.residues().names())) +{ResName('ALA'), + ResName('ARG'), + ResName('ASN'), + ResName('ASP'), + ResName('CIT'), + ResName('CYS'), + ResName('GLN'), + ResName('GLU'), + ResName('GLY'), + ResName('HIS'), + ResName('HOH'), + ResName('ILE'), + ResName('LEU'), + ResName('LYS'), + ResName('MET'), + ResName('PEG'), + ResName('PHE'), + ResName('PRO'), + ResName('SER'), + ResName('THR'), + ResName('TRP'), + ResName('TYR'), + ResName('VAL')} + +And you can count how many of each residue using; + +>>> for name in set(mol.residues().names()): +... print(name, len(mol.residues(name))) +ResName('VAL') 74 +ResName('ILE') 64 +ResName('GLN') 32 +ResName('PRO') 90 +ResName('GLU') 107 +ResName('TRP') 24 +ResName('GLY') 68 +ResName('CYS') 48 +ResName('HOH') 18 +ResName('CIT') 2 +ResName('ARG') 100 +ResName('MET') 20 +ResName('SER') 102 +ResName('PHE') 64 +ResName('ASN') 38 +ResName('THR') 88 +ResName('ASP') 84 +ResName('LYS') 46 +ResName('TYR') 22 +ResName('HIS') 42 +ResName('PEG') 4 +ResName('ALA') 155 +ResName('LEU') 226 + +This can be a convenient way of finding the residue names of different +ligands or cofactors that are bound to the molecule. + +You could do a similar thing for residue numbers, e.g. + +>>> for number in set(mol.residues().numbers()): +... print(number, len(mol.residues(number))) +ResNum(5) 2 +ResNum(6) 4 +ResNum(7) 4 +ResNum(8) 4 +ResNum(9) 4 +ResNum(10) 4 +ResNum(11) 4 +ResNum(12) 4 +ResNum(13) 4 +ResNum(14) 2 +... diff --git a/doc/source/tutorial/part02/03_indexing_chains.rst b/doc/source/tutorial/part02/03_indexing_chains.rst new file mode 100644 index 000000000..1db2562f1 --- /dev/null +++ b/doc/source/tutorial/part02/03_indexing_chains.rst @@ -0,0 +1,376 @@ +=============== +Indexing Chains +=============== + +Chains are collections of residues. They typically represent a single +chain in a protein. Chains are implemented via the :class:`~sire.mol.Chain` +class, which itself is a molecular container for +:class:`~sire.mol.Residue` objects. A residue can only belong to one +chain at a time (and residues do not need to be assigned to chains). + +You can access the chains in a molecule container using the +:func:`~sire.mol.Chain.chain` and :func:`~sire.mol.Chain.chains` functions, +which are available on all of the molecular container types. + +>>> print(mol.chain(0)) +Chain( A num_residues=123 num_atoms=985) + +gives the chain at index 0, while + +>>> print(mol.chain("B")) +Chain( B num_residues=638 num_atoms=4881) + +gives the chain called "B", and + +>>> print(mol.chains()) +Selector( size=4 +0: Chain( A num_residues=123 num_atoms=985) +1: Chain( B num_residues=638 num_atoms=4881) +2: Chain( C num_residues=126 num_atoms=1000) +3: Chain( D num_residues=631 num_atoms=4862) +) + +returns all of the chains. + +Like all other containers, you can slice the function call or result, +so both + +>>> print(mol.chains(range(3,-1,-1))) +Selector( size=4 +0: Chain( D num_residues=631 num_atoms=4862) +1: Chain( C num_residues=126 num_atoms=1000) +2: Chain( B num_residues=638 num_atoms=4881) +3: Chain( A num_residues=123 num_atoms=985) +) + +>>> print(mol.chains()[3:-1:-1]) +Selector( size=4 +0: Chain( D num_residues=631 num_atoms=4862) +1: Chain( C num_residues=126 num_atoms=1000) +2: Chain( B num_residues=638 num_atoms=4881) +3: Chain( A num_residues=123 num_atoms=985) +) + +slice to get the four chains in reverse order. + +Search for chains +----------------- + +You can also search for chains, using their name (``chainname``), +and/or their index in their parent molecule (``chainidx``). + +>>> print(mol.chain("chainname A")) +Chain( A num_residues=123 num_atoms=985) + +>>> print(mol.chain("chainidx 1")) +Chain( B num_residues=638 num_atoms=4881) + +.. note:: + + Unlike atoms and residues, chains do not have a number. They + are identified only by their index in their parent molecule, or + their name + +You can use the chain search string in a molecular container's index +operator too! + +>>> print(mol["chainname A"]) +Chain( A num_residues=123 num_atoms=985) + +and you can combine it with residue and/or atom identifiers, e.g. + +>>> print(mol["chainname A and resname ALA"]) +Selector( size=11 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:30 num_atoms=5 ) +2: Residue( ALA:53 num_atoms=5 ) +3: Residue( ALA:65 num_atoms=5 ) +4: Residue( ALA:85 num_atoms=5 ) +... +6: Residue( ALA:96 num_atoms=5 ) +7: Residue( ALA:104 num_atoms=5 ) +8: Residue( ALA:105 num_atoms=5 ) +9: Residue( ALA:122 num_atoms=5 ) +10: Residue( ALA:158 num_atoms=5 ) +) + +>>> print(mol["chainname A and element O"]) +Selector( size=197 +0: Atom( O:4 [ -57.04, 9.73, 41.82] ) +1: Atom( O:12 [ -57.27, 6.71, 41.66] ) +2: Atom( O:19 [ -53.43, 4.61, 40.31] ) +3: Atom( O:27 [ -55.45, 2.35, 37.41] ) +4: Atom( O:36 [ -54.71, -0.60, 37.34] ) +... +192: Atom( OE1:977 [ -30.32, 17.02, 0.48] ) +193: Atom( OE2:978 [ -31.39, 15.27, -0.31] ) +194: Atom( O1:11662 [ -40.43, -8.92, 3.99] ) +195: Atom( O2:11664 [ -40.18, -8.25, 0.56] ) +196: Atom( O4:11667 [ -42.40, -9.39, -2.03] ) +) + +You can also search for multiple chain names + +>>> print(mol["chainname A, B"]) +Selector( size=2 +0: Chain( A num_residues=123 num_atoms=985) +1: Chain( B num_residues=638 num_atoms=4881) +) + +Wildcard (glob) searching is also supported for chain names + +>>> print(mol["chainname /[cd]/i"]) +Selector( size=2 +0: Chain( C num_residues=126 num_atoms=1000) +1: Chain( D num_residues=631 num_atoms=4862) +) + +Finding the residues in a chain +------------------------------- + +Because both :class:`~sire.mol.Chain` and :class:`~sire.mol.Selector_Chain_` +are molecular containers, they also have their own +:func:`~sire.mol.Residue.residue` and :func:`~sire.mol.Residue.residues` functions, +which behave as you would expect. + +>>> print(mol["chainname A"].residue(sr.resid("ALA", 25))) +print(mol["chainname A"].residue(sr.resid("ALA", 23))) + +You can get all of the residues in a chain by calling the +:func:`~sire.mol.Chain.residues` function without any arguments, + +>>> print(mol["chainname A"].residues()) +Selector( size=123 +0: Residue( ILE:6 num_atoms=8 ) +1: Residue( VAL:7 num_atoms=7 ) +2: Residue( LEU:8 num_atoms=8 ) +3: Residue( LYS:9 num_atoms=9 ) +4: Residue( SER:10 num_atoms=6 ) +... +118: Residue( TRP:157 num_atoms=14 ) +119: Residue( ALA:158 num_atoms=5 ) +120: Residue( PHE:159 num_atoms=11 ) +121: Residue( GLU:160 num_atoms=9 ) +122: Residue( PEG:801 num_atoms=7 ) +) + +In addition, the index operator for chains searches by default for residues, +not for atoms. Thus + +>>> print(mol["chainname A"][0]) +Residue( ILE:6 num_atoms=8 ) + +gives the first *residue* in chain "A", not the first atom. Similarly + +>>> print(mol["chainname A"]["ALA"]) +Selector( size=11 +0: Residue( ALA:23 num_atoms=5 ) +1: Residue( ALA:30 num_atoms=5 ) +2: Residue( ALA:53 num_atoms=5 ) +3: Residue( ALA:65 num_atoms=5 ) +4: Residue( ALA:85 num_atoms=5 ) +... +6: Residue( ALA:96 num_atoms=5 ) +7: Residue( ALA:104 num_atoms=5 ) +8: Residue( ALA:105 num_atoms=5 ) +9: Residue( ALA:122 num_atoms=5 ) +10: Residue( ALA:158 num_atoms=5 ) +) + +searches for the *residues* called "ALA", not the atoms called "ALA". +This is because chains are containers for residues, not containers for atoms. + +Another route is to use ``residues in`` in the search string. + +>>> print(mol["residues in chainname B"]) +Selector( size=123 +0: Residue( ILE:6 num_atoms=8 ) +1: Residue( VAL:7 num_atoms=7 ) +2: Residue( LEU:8 num_atoms=8 ) +3: Residue( LYS:9 num_atoms=9 ) +4: Residue( SER:10 num_atoms=6 ) +... +118: Residue( TRP:157 num_atoms=14 ) +119: Residue( ALA:158 num_atoms=5 ) +120: Residue( PHE:159 num_atoms=11 ) +121: Residue( GLU:160 num_atoms=9 ) +122: Residue( PEG:801 num_atoms=7 ) +) + +or, go from residues to chains using ``chains with`` + +>>> print(mol["chains with resname ALA"]) +Selector( size=4 +0: Chain( A num_residues=123 num_atoms=985) +1: Chain( B num_residues=638 num_atoms=4881) +2: Chain( C num_residues=126 num_atoms=1000) +3: Chain( D num_residues=631 num_atoms=4862) +) + +Finding the atoms in a chain +---------------------------- + +You can still get the atoms in a chain by calling the +:func:`~sire.mol.Chain.atom` and :func:`~sire.mol.Chain.atoms` functions. + +>>> print(mol["chainidx 0"].atoms("CA")) +Selector( size=122 +0: Atom( CA:2 [ -55.43, 11.35, 42.54] ) +1: Atom( CA:10 [ -56.02, 7.64, 43.47] ) +2: Atom( CA:17 [ -54.99, 6.39, 39.98] ) +3: Atom( CA:25 [ -55.33, 2.58, 39.80] ) +4: Atom( CA:34 [ -52.97, 1.03, 37.19] ) +... +117: Atom( CA:932 [ -35.65, 13.78, -7.21] ) +118: Atom( CA:941 [ -38.64, 16.18, -7.49] ) +119: Atom( CA:955 [ -38.15, 18.05, -4.20] ) +120: Atom( CA:960 [ -35.38, 20.38, -3.07] ) +121: Atom( CA:971 [ -33.67, 19.61, 0.23] ) +) + +>>> print(mol["chainname B"].atom(0)) +Atom( N:980 [ -31.52, -13.85, 36.51] ) + +Calling the :func:`~sire.mol.Chain.atoms` function without any arguments +returns all of the atoms in the chain. + +>>> print(mol["chainname C"].atoms()) +Selector( size=1000 +0: Atom( N:5824 [ -29.76, 20.54, 63.08] ) +1: Atom( CA:5825 [ -30.98, 21.16, 63.60] ) +2: Atom( C:5826 [ -31.03, 22.64, 63.24] ) +3: Atom( O:5827 [ -30.95, 23.01, 62.07] ) +4: Atom( CB:5828 [ -31.07, 20.98, 65.13] ) +... +995: Atom( O2:11698 [ 8.19, 41.99, 41.66] ) +996: Atom( C3:11699 [ 7.27, 42.05, 42.71] ) +997: Atom( C4:11700 [ 5.85, 42.13, 42.15] ) +998: Atom( O4:11701 [ 4.93, 42.21, 43.20] ) +999: Atom( O:11726 [ -2.64, 40.59, 37.49] ) +) + +Another route is to use the ``atoms in`` phrase in the search string, + +>>> print(mol["atoms in chainname B"]) +Selector( size=4881 +0: Atom( N:980 [ -31.52, -13.85, 36.51] ) +1: Atom( CA:981 [ -32.98, -13.85, 36.21] ) +2: Atom( C:982 [ -33.24, -13.01, 34.96] ) +3: Atom( O:983 [ -33.85, -13.54, 34.01] ) +4: Atom( CB:984 [ -33.76, -13.31, 37.41] ) +... +4876: Atom( O:11721 [ -33.17, 25.70, 2.16] ) +4877: Atom( O:11722 [ -44.37, 53.10, -15.15] ) +4878: Atom( O:11723 [ -39.25, 59.56, -5.85] ) +4879: Atom( O:11724 [ -52.78, 63.80, 12.56] ) +4880: Atom( O:11725 [ -36.82, 45.49, 3.24] ) +) + +and to use ``chains with`` to go from atoms to chains. + +>>> print(mol["chains with atomname CA"]) +Selector( size=4 +0: Chain( A num_residues=123 num_atoms=985) +1: Chain( B num_residues=638 num_atoms=4881) +2: Chain( C num_residues=126 num_atoms=1000) +3: Chain( D num_residues=631 num_atoms=4862) +) + +Uniquely identifying a chain +---------------------------- + +You uniquely identify a chain in a molecule using its chain index +(``chainidx``). You can get the index of a chain in a molecule by +calling its :func:`~sire.mol.Chain.index` function. + +>>> print(mol.chain(0).index()) +ChainIdx(0) + +.. warning:: + + Be careful indexing by chain index. This is the index of the chain + that uniquely identifies it within its parent molecule. It is not the + index of the chain in an arbitrary molecular container. + +Chain identifying types +----------------------- + +Another way to index chains is to use the chain identifying types, i.e. +:class:`~sire.mol.ChainName` and :class:`~sire.mol.ChainIdx`. The +easiest way to create these is by using the function +:func:`sire.chainid`. + +Use strings to create :class:`~sire.mol.ChainName` objects, + +>>> print(sr.chainid("A")) +ChainName('A') +>>> print(mol[sr.chainid("A")]) +Chain( A num_residues=123 num_atoms=985) + +and integers to create :class:`~sire.mol.ChainIdx` objects. + +>>> print(sr.chainid(0)) +ChainIdx(0) +>>> print(mol[sr.chainid(0)]) +Chain( A num_residues=123 num_atoms=985) + +You can set both a name and an index by passing in two arguments. + +>>> print(mol[sr.chainid("A", 0)]) +Chain( A num_residues=123 num_atoms=985) +>>> print(mol[sr.chainid(name="A", idx=0)]) +Chain( A num_residues=123 num_atoms=985) + +Iterating over chains +--------------------- + +The :class:`~sire.mol.Selector_Chain_` class is iterable, meaning that +it can be used in loops. + +>>> for chain in mol.chains(): +... print(chain) +Chain( A num_residues=123 num_atoms=985) +Chain( B num_residues=638 num_atoms=4881) +Chain( C num_residues=126 num_atoms=1000) +Chain( D num_residues=631 num_atoms=4862) + +This is particulary useful when combined with looping over the +residues and/or atoms in the residues. + +>>> for chain in mol.chains(): +... for residue in chain.residues(): +... print(chain, residue) +Chain( A num_residues=123 num_atoms=985) Residue( ILE:6 num_atoms=8 ) +Chain( A num_residues=123 num_atoms=985) Residue( VAL:7 num_atoms=7 ) +Chain( A num_residues=123 num_atoms=985) Residue( LEU:8 num_atoms=8 ) +Chain( A num_residues=123 num_atoms=985) Residue( LYS:9 num_atoms=9 ) +Chain( A num_residues=123 num_atoms=985) Residue( SER:10 num_atoms=6 ) +Chain( A num_residues=123 num_atoms=985) Residue( SER:11 num_atoms=6 ) +Chain( A num_residues=123 num_atoms=985) Residue( ASP:12 num_atoms=8 ) +Chain( A num_residues=123 num_atoms=985) Residue( GLY:13 num_atoms=4 ) +... +Chain( D num_residues=631 num_atoms=4862) Residue( HOH:905 num_atoms=1 ) +Chain( D num_residues=631 num_atoms=4862) Residue( HOH:906 num_atoms=1 ) + +>>> for chain in mol["chainname A, B"]: +... for atom in chain["element C"]: +... print(chain, atom.residue(), atom) +Chain( A num_residues=123 num_atoms=985) Residue( ILE:6 num_atoms=8 ) Atom( CA:2 [ -55.43, 11.35, 42.54] ) +Chain( A num_residues=123 num_atoms=985) Residue( ILE:6 num_atoms=8 ) Atom( C:3 [ -56.06, 9.95, 42.55] ) +Chain( A num_residues=123 num_atoms=985) Residue( ILE:6 num_atoms=8 ) Atom( CB:5 [ -56.32, 12.33, 41.76] ) +Chain( A num_residues=123 num_atoms=985) Residue( ILE:6 num_atoms=8 ) Atom( CG1:6 [ -55.68, 13.72, 41.72] ) +Chain( A num_residues=123 num_atoms=985) Residue( ILE:6 num_atoms=8 ) Atom( CG2:7 [ -57.70, 12.40, 42.39] ) +Chain( A num_residues=123 num_atoms=985) Residue( ILE:6 num_atoms=8 ) Atom( CD1:8 [ -55.42, 14.31, 43.09] ) +... +Chain( B num_residues=638 num_atoms=4881) Residue( CIT:803 num_atoms=13 ) Atom( C4:11688 [ -28.14, 10.72, -2.13] ) +Chain( B num_residues=638 num_atoms=4881) Residue( CIT:803 num_atoms=13 ) Atom( C5:11689 [ -28.94, 10.62, -3.43] ) +Chain( B num_residues=638 num_atoms=4881) Residue( CIT:803 num_atoms=13 ) Atom( C6:11692 [ -27.91, 9.78, 0.15] ) + +Finding all chain names +----------------------- + +You can find the names of all chains using the :class:`~sire.mol.Select_Chain_.names` +function. + +>>> print(mol.chains().names()) +[ChainName('A'), ChainName('B'), ChainName('C'), ChainName('D')] diff --git a/doc/source/tutorial/part02/04_indexing_segments.rst b/doc/source/tutorial/part02/04_indexing_segments.rst new file mode 100644 index 000000000..acfd5a629 --- /dev/null +++ b/doc/source/tutorial/part02/04_indexing_segments.rst @@ -0,0 +1,298 @@ +================= +Indexing Segments +================= + +Segments are collections of atoms, sometimes non-contiguously collections +of atoms. They typically represent a user-defined segment within a molecule +or protein. An atom can only belong to one segment at a time. Atoms do +not need to be assigned to segments. Segments are implemented via the +:class:`~sire.mol.Segment` class, which is itself a molecular container +for :class:`~sire.mol.Atom` objects. + +You can access the segments in a molecule container using the +:func:`~sire.mol.Segment.segment` and :func:`~sire.mol.Segment.segments` functions, +which are available on all of the molecular container types. + +Not many molecules have named segments, so first let's load a molecule +that does. + +>>> mols = sr.load(sr.expand(sr.tutorial_url, "alanin.psf")) +Downloading from 'https://siremol.org/m/alanin.psf'... +>>> mol = mols[0] + +This molecule contains only a single segment called "MAIN". + +>>> print(mol.segments()) +Selector( size=1 +0: Segment( MAIN num_atoms=66 ) +) +>>> print(mol.segment(0)) +Segment( MAIN num_atoms=66 ) +>>> print(mol.segment("MAIN")) +Segment( MAIN num_atoms=66 ) + +Search for segments +------------------- + +You can search for segments using their name (``segname``) or their +index (``segidx``). + +>>> print(mol.segments("segname MAIN")) +Selector( size=1 +0: Segment( MAIN num_atoms=66 ) +) +>>> print(mol.segment("segidx 0")) +Segment( MAIN num_atoms=66 ) + +.. note:: + + Unlike atoms and residues, segments do not have a number. They + are identified only by their index in their parent molecule, or + their name + +You can do a segment search via the containers index operator too! + +>>> print(mol["segname MAIN"]) +Molecule( alanin:2 num_atoms=66 num_residues=12 ) + +.. note:: + + Sire will automatically convert a result from a search string + called via the index operator to the largest matching view. + In this case, the single segment contains all of the atoms + of the whole molecule. So Sire has converted the result up + to the whole molecule view. + +You can combine the search string with chain, residue and/or atom search +terms too. + +>>> print(mol["segname MAIN and atomname C"]) +Selector( size=11 +0: Atom( C:2 ) +1: Atom( C:8 ) +2: Atom( C:14 ) +3: Atom( C:20 ) +4: Atom( C:26 ) +... +6: Atom( C:38 ) +7: Atom( C:44 ) +8: Atom( C:50 ) +9: Atom( C:56 ) +10: Atom( C:62 ) +) + +>>> print(mol["segname MAIN and resname ACE"]) +Residue( ACE:1 num_atoms=3 ) + +As for other types, you can search for multiple segment names using +a comma, and can do wildcard (glob) searching too! + +>>> print(mol.segment("segname /M*/")) +Segment( MAIN num_atoms=66 ) + +Finding the atoms in a segment +------------------------------ + +Because both :class:`~sire.mol.Segment` and :class:`~sire.mol.Selector_Segment_` +are molecular containers, they also have their own +:func:`~sire.mol.Segment.atom` and :func:`~sire.mol.Segment.atoms` functions, +which behave as you would expect. + +>>> print(mol["segname MAIN"].atoms("C")) +Selector( size=11 +0: Atom( C:2 ) +1: Atom( C:8 ) +2: Atom( C:14 ) +3: Atom( C:20 ) +4: Atom( C:26 ) +... +6: Atom( C:38 ) +7: Atom( C:44 ) +8: Atom( C:50 ) +9: Atom( C:56 ) +10: Atom( C:62 ) +) + +You can also use ``atoms in``, ``chains in`` or ``residues in`` to get the +atoms, residues or chains in a segment. + +>>> print(mol["residues in segname MAIN"]) +Selector( size=12 +0: Residue( ACE:1 num_atoms=3 ) +1: Residue( ALA:2 num_atoms=6 ) +2: Residue( ALA:3 num_atoms=6 ) +3: Residue( ALA:4 num_atoms=6 ) +4: Residue( ALA:5 num_atoms=6 ) +... +7: Residue( ALA:8 num_atoms=6 ) +8: Residue( ALA:9 num_atoms=6 ) +9: Residue( ALA:10 num_atoms=6 ) +10: Residue( ALA:11 num_atoms=6 ) +11: Residue( CBX:12 num_atoms=3 ) +) + +>>> print(mol["atoms in segname MAIN"]) +Selector( size=66 +0: Atom( CA:1 ) +1: Atom( C:2 ) +2: Atom( O:3 ) +3: Atom( N:4 ) +4: Atom( H:5 ) +... +61: Atom( C:62 ) +62: Atom( O:63 ) +63: Atom( N:64 ) +64: Atom( H:65 ) +65: Atom( CA:66 ) +) + +A ``KeyError`` will be raised if there are no residues or chains within +a segment, e.g. + +>>> print(mol["chains within segname MAIN"]) +--------------------------------------------------------------------------- +KeyError Traceback (most recent call last) +Input In [24], in () +----> 1 print(mol["chains in segname MAIN"]) + +File ~/sire.app/lib/python3.8/site-packages/Sire/Mol/__init__.py:462, in __fixed__getitem__(obj, key) + 458 elif type(key) is str: + 459 # is this a search object - if so, then return whatever is + 460 # most relevant from the search + 461 try: +--> 462 return __from_select_result(obj.search(key)) + 463 except SyntaxError: + 464 pass + +KeyError: 'SireMol::missing_chain: This view does not contain any chains. (call Sire.Error.get_last_error_details() for more info)' + +You can go to segments from atoms or residues using ``segments with``, e.g. + +>>> print(mol["segments with atomname C"]) +Molecule( 2.137 : num_atoms=66, num_residues=12 ) + +Finding the atoms, residues or chains in a segment +-------------------------------------------------- + +Like all molecular containers, you can find the contained atoms, +residues or chains by calling the appropriate functions; + +>>> print(mol["segname MAIN"].atoms()) +Selector( size=66 +0: Atom( CA:1 ) +1: Atom( C:2 ) +2: Atom( O:3 ) +3: Atom( N:4 ) +4: Atom( H:5 ) +... +61: Atom( C:62 ) +62: Atom( O:63 ) +63: Atom( N:64 ) +64: Atom( H:65 ) +65: Atom( CA:66 ) +) + +>>> print(mol["segidx 0"].residues()) +Selector( size=12 +0: Residue( ACE:1 num_atoms=3 ) +1: Residue( ALA:2 num_atoms=6 ) +2: Residue( ALA:3 num_atoms=6 ) +3: Residue( ALA:4 num_atoms=6 ) +4: Residue( ALA:5 num_atoms=6 ) +... +7: Residue( ALA:8 num_atoms=6 ) +8: Residue( ALA:9 num_atoms=6 ) +9: Residue( ALA:10 num_atoms=6 ) +10: Residue( ALA:11 num_atoms=6 ) +11: Residue( CBX:12 num_atoms=3 ) +) + +Uniquely identifying a segment +------------------------------ + +You uniquely identify a segment in a molecule using its segment index +(``segidx``). You can get the index of a segment in a molecule by +calling its :func:`~sire.mol.Segment.index` function. + +>>> print(mol.segment(0).index()) +SegIdx(0) + +.. warning:: + + Be careful indexing by segment index. This is the index of the segment + that uniquely identifies it within its parent molecule. It is not the + index of the segment in an arbitrary molecular container. + +Segment identifying types +------------------------- + +Another way to index segments is to use the segment identifying types, i.e. +:class:`~sire.mol.SegName` and :class:`~sire.mol.SegIdx`. The +easiest way to create these is by using the function +:func:`sire.segid`. + +Use strings to create :class:`~sire.mol.SegName` objects, + +>>> print(sr.segid("MAIN")) +SegName('MAIN') +>>> print(mol[sr.segid("MAIN")]) +Segment( MAIN num_atoms=66 ) + +and integers to create :class:`~sire.mol.SegIdx` objects. + +>>> print(sr.segid(0)) +SegIdx(0) +>>> print(mol[sr.segid(0)]) +Segment( MAIN num_atoms=66 ) + +You can set both a name and an index by passing in two arguments. + +>>> print(mol[sr.segid("MAIN", 0)]) +Segment( MAIN num_atoms=66 ) +>>> print(mol[sr.segid(name="MAIN", idx=0)]) +Segment( MAIN num_atoms=66 ) + +.. note:: + + Sire will return the Segment from an index operator if a segment + identifying type is used as the index. This is slightly different + behaviour to how the search string operates. In practice though, + all molecular container classes behave in the same way, so you will + often not notice or need to know which molecular container class + has been returned. + +Iterating over segments +----------------------- + +The :class:`~sire.mol.Selector_Segment_` class is iterable, meaning that +it can be used in loops. + +>>> for segment in mol.segments(): +... print(segment) +Segment( MAIN num_atoms=66 ) + +This is particularly helpful when combined with loops over the atoms in +a segment. + +>>> for segment in mol.segments(): +... for atom in segment.atoms("element carbon"): +... print(segment, atom.residue(), atom) +Segment( MAIN num_atoms=66 ) Residue( ACE:1 num_atoms=3 ) Atom( CA:1 ) +Segment( MAIN num_atoms=66 ) Residue( ACE:1 num_atoms=3 ) Atom( C:2 ) +Segment( MAIN num_atoms=66 ) Residue( ALA:2 num_atoms=6 ) Atom( CA:6 ) +Segment( MAIN num_atoms=66 ) Residue( ALA:2 num_atoms=6 ) Atom( CB:7 ) +Segment( MAIN num_atoms=66 ) Residue( ALA:2 num_atoms=6 ) Atom( C:8 ) +Segment( MAIN num_atoms=66 ) Residue( ALA:3 num_atoms=6 ) Atom( CA:12 ) +Segment( MAIN num_atoms=66 ) Residue( ALA:3 num_atoms=6 ) Atom( CB:13 ) +... +Segment( MAIN num_atoms=66 ) Residue( ALA:11 num_atoms=6 ) Atom( C:62 ) +Segment( MAIN num_atoms=66 ) Residue( CBX:12 num_atoms=3 ) Atom( CA:66 ) + +Finding all segment names +------------------------- + +You can find the names of all segments using the :class:`~sire.mol.Select_Segment_.names` +function. + +>>> print(mol.segments().names()) +[SegName('MAIN')] diff --git a/doc/source/tutorial/part02/05_indexing_molecules.rst b/doc/source/tutorial/part02/05_indexing_molecules.rst new file mode 100644 index 000000000..b111767e7 --- /dev/null +++ b/doc/source/tutorial/part02/05_indexing_molecules.rst @@ -0,0 +1,459 @@ +================== +Indexing Molecules +================== + +Molecules are collections of atoms that (at least notionally) should all +be bonded to each other and represent the concept of a molecule in a +chemical system. + +A molecule is a molecular container for atoms, residues, chains and +segments, and is implemented via the :class:`sire.mol.Molecule` class. +At a minimum, a :class:`sire.mol.Molecule` contains at least one +:class:`sire.mol.Atom`. There +is no requirement for this atom to be placed into a residue, chain +or segment, and so it is possible for a molecule to have zero +residues, chains or segments. + +There are several classes in ``sire`` that can act as molecular containers +for molecule objects. You have already encountered one, which is the +:class:`~sire.system.System` class, into which the molecules were first +loaded. + +For example, load up the ``aladip`` system; + +>>> import sire as sr +>>> mols = sr.load(sr.expand(sr.tutorial_url, ["ala.top", "ala.crd"])) +>>> print(mols) +System( name=ACE num_molecules=631 num_residues=633 num_atoms=1912 ) + +This has loaded 631 molecules. You can access molecules by their index +in the system by simple index; + +>>> print(mols[0]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) + +or by their name + +>>> print(mols["ACE"]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) + +You can also index via a range + +>>> print(mols[0:10]) +SelectorMol( size=10 +0: Molecule( ACE:2 num_atoms=22 num_residues=3 ) +1: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +5: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +6: Molecule( WAT:8 num_atoms=3 num_residues=1 ) +7: Molecule( WAT:9 num_atoms=3 num_residues=1 ) +8: Molecule( WAT:10 num_atoms=3 num_residues=1 ) +9: Molecule( WAT:11 num_atoms=3 num_residues=1 ) +) + +or via a list of indicies + +>>> print(mols[ [0, 2, 4, 6] ]) +SelectorMol( size=4 +0: Molecule( ACE:2 num_atoms=22 num_residues=3 ) +1: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:8 num_atoms=3 num_residues=1 ) +) + +If multiple molecules are returned, then the result is held in a +:class:`~sire.mol.SelectorMol` class. This is also a molecular container, +and can be used in the same way as all other molecular containers. For example, + +>>> print(mols["WAT"][0]) +Molecule( WAT:3 num_atoms=3 num_residues=1 ) + +gives the first molecule called ``WAT``. + +You can achieve the same result using the :func:`~sire.system.System.molecule` +and :func:`~sire.system.System.molecules` functions. + +>>> print(mols.molecule(0)) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) +>>> print(mols.molecules(range(0, 10))) +SelectorMol( size=10 +0: Molecule( ACE:2 num_atoms=22 num_residues=3 ) +1: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +5: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +6: Molecule( WAT:8 num_atoms=3 num_residues=1 ) +7: Molecule( WAT:9 num_atoms=3 num_residues=1 ) +8: Molecule( WAT:10 num_atoms=3 num_residues=1 ) +9: Molecule( WAT:11 num_atoms=3 num_residues=1 ) +) +>>> print(mols.molecules("WAT").molecule(0)) +Molecule( WAT:3 num_atoms=3 num_residues=1 ) + +Search for molecules +-------------------- + +You can search for a molecule in a molecule container via their +name (``molname``) or number (``molnum``). + +>>> print(mols["molname ACE"]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) +>>> print(mols["molnum 2"]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) +>>> print(mols["molidx 0"]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) +>>> print(mols["molname WAT"]) +SelectorMol( size=630 +0: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +... +625: Molecule( WAT:628 num_atoms=3 num_residues=1 ) +626: Molecule( WAT:629 num_atoms=3 num_residues=1 ) +627: Molecule( WAT:630 num_atoms=3 num_residues=1 ) +628: Molecule( WAT:631 num_atoms=3 num_residues=1 ) +629: Molecule( WAT:632 num_atoms=3 num_residues=1 ) +) + +.. note:: + + Note how the name and number of the molecule are printed out, + e.g. ``ACE:2`` is for the molecule called ``ACE`` with number ``2``. + +You can also search by the index in the molecular container (``molidx``), +e.g. + +>>> print(mols["molidx > 50"]) +SelectorMol( size=580 +0: Molecule( WAT:53 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:54 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:55 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:56 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:57 num_atoms=3 num_residues=1 ) +... +575: Molecule( WAT:628 num_atoms=3 num_residues=1 ) +576: Molecule( WAT:629 num_atoms=3 num_residues=1 ) +577: Molecule( WAT:630 num_atoms=3 num_residues=1 ) +578: Molecule( WAT:631 num_atoms=3 num_residues=1 ) +579: Molecule( WAT:632 num_atoms=3 num_residues=1 ) +) + +.. note:: + + The ``molidx`` is the index of the molecule in its parent container. + This will depend on which container the search is performed with. + This is different to ``atomidx``, ``residx`` etc, which are unique + identifying indicies of the atom, residue etc in their parent molecule. + +You can combine the search with other identifiers, e.g. + +>>> print(mols["molname WAT and molnum 3"]) +Molecule( WAT:3 num_atoms=3 num_residues=1 ) + +and can search for multiple names or numbers + +>>> print(mols["molname ACE, WAT"]) +SelectorMol( size=631 +0: Molecule( ACE:2 num_atoms=22 num_residues=3 ) +1: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +... +626: Molecule( WAT:628 num_atoms=3 num_residues=1 ) +627: Molecule( WAT:629 num_atoms=3 num_residues=1 ) +628: Molecule( WAT:630 num_atoms=3 num_residues=1 ) +629: Molecule( WAT:631 num_atoms=3 num_residues=1 ) +630: Molecule( WAT:632 num_atoms=3 num_residues=1 ) +) +>>> print(mols["molnum 5:10, 30, 40"]) +SelectorMol( size=8 +0: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:8 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:9 num_atoms=3 num_residues=1 ) +5: Molecule( WAT:10 num_atoms=3 num_residues=1 ) +6: Molecule( WAT:30 num_atoms=3 num_residues=1 ) +7: Molecule( WAT:40 num_atoms=3 num_residues=1 ) +) + +Wildcard (glob) searching is also supported for molecule names. + +>>> print(mols["molname /A*/"]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) +>>> print(mols["molname /wat/i"]) +SelectorMol( size=630 +0: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +... +625: Molecule( WAT:628 num_atoms=3 num_residues=1 ) +626: Molecule( WAT:629 num_atoms=3 num_residues=1 ) +627: Molecule( WAT:630 num_atoms=3 num_residues=1 ) +628: Molecule( WAT:631 num_atoms=3 num_residues=1 ) +629: Molecule( WAT:632 num_atoms=3 num_residues=1 ) +) + +Finding atoms, residues, chains and segments in a molecule +---------------------------------------------------------- + +Because both :class:`~sire.system.System` and :class:`~sire.mol.SelectorMol` +are molecular containers, they both have their own +:func:`~sire.mol.SelectorMol.atom`, :func:`~sire.mol.SelectorMol.atoms`, +:func:`~sire.mol.SelectorMol.residue`, :func:`~sire.mol.SelectorMol.residues`, +etc functions for accessing atoms, residues, chains or segments across +multiple molecules. + +For example, you can get all of the atoms that are oxygens using + +>>> print(mols.atoms("element O")) +SireMol::SelectorM( size=632 +0: MolNum(2) Atom( O:6 [ 19.19, 5.44, 14.76] ) +1: MolNum(2) Atom( O:16 [ 14.94, 3.17, 15.88] ) +2: MolNum(3) Atom( O:23 [ 25.64, 8.50, 22.42] ) +3: MolNum(4) Atom( O:26 [ 22.83, 8.93, 4.14] ) +4: MolNum(5) Atom( O:29 [ 9.96, 24.84, 23.52] ) +... +627: MolNum(628) Atom( O:1898 [ 22.40, 11.84, 10.08] ) +628: MolNum(629) Atom( O:1901 [ 0.63, 8.69, 19.94] ) +629: MolNum(630) Atom( O:1904 [ 18.69, 22.12, 9.35] ) +630: MolNum(631) Atom( O:1907 [ 21.65, 7.88, 9.79] ) +631: MolNum(632) Atom( O:1910 [ 9.25, 13.73, 2.29] ) +) + +or, even easier, + +>>> print(mols["element O"]) +SireMol::SelectorM( size=632 +0: MolNum(2) Atom( O:6 [ 19.19, 5.44, 14.76] ) +1: MolNum(2) Atom( O:16 [ 14.94, 3.17, 15.88] ) +2: MolNum(3) Atom( O:23 [ 25.64, 8.50, 22.42] ) +3: MolNum(4) Atom( O:26 [ 22.83, 8.93, 4.14] ) +4: MolNum(5) Atom( O:29 [ 9.96, 24.84, 23.52] ) +... +627: MolNum(628) Atom( O:1898 [ 22.40, 11.84, 10.08] ) +628: MolNum(629) Atom( O:1901 [ 0.63, 8.69, 19.94] ) +629: MolNum(630) Atom( O:1904 [ 18.69, 22.12, 9.35] ) +630: MolNum(631) Atom( O:1907 [ 21.65, 7.88, 9.79] ) +631: MolNum(632) Atom( O:1910 [ 9.25, 13.73, 2.29] ) +) + +The result is a :class:`~sire.mol.SelectorM_Atom_`. This is a multi-molecule +version of :class:`~sire.mol.Selector_Atom_`, which behaves in an identical +way. + +This works for residues too! + +>>> print(mols.residues("WAT")) +SireMol::SelectorM( size=630 +0: MolNum(3) Residue( WAT:4 num_atoms=3 ) +1: MolNum(4) Residue( WAT:5 num_atoms=3 ) +2: MolNum(5) Residue( WAT:6 num_atoms=3 ) +3: MolNum(6) Residue( WAT:7 num_atoms=3 ) +4: MolNum(7) Residue( WAT:8 num_atoms=3 ) +... +625: MolNum(628) Residue( WAT:629 num_atoms=3 ) +626: MolNum(629) Residue( WAT:630 num_atoms=3 ) +627: MolNum(630) Residue( WAT:631 num_atoms=3 ) +628: MolNum(631) Residue( WAT:632 num_atoms=3 ) +629: MolNum(632) Residue( WAT:633 num_atoms=3 ) +) +>>> print(mols["resname WAT"]) +SelectorMol( size=630 +0: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +... +625: Molecule( WAT:628 num_atoms=3 num_residues=1 ) +626: Molecule( WAT:629 num_atoms=3 num_residues=1 ) +627: Molecule( WAT:630 num_atoms=3 num_residues=1 ) +628: Molecule( WAT:631 num_atoms=3 num_residues=1 ) +629: Molecule( WAT:632 num_atoms=3 num_residues=1 ) +) + +.. note:: + + Note how the index operator will convert the result of the search to + the largest possible container (in this case, ``Molecule``), while + the ``.residues`` function will always return the result as a + set of ``Residue`` objects. + +Another route is to use the ``atoms in``, ``residues in``, ``chains in``, or +``segments in`` phrases in the search, e.g. + +>>> print(mols["atoms in molname ACE"]) +Selector( size=22 +0: Atom( HH31:1 [ 18.45, 3.49, 12.44] ) +1: Atom( CH3:2 [ 18.98, 3.45, 13.39] ) +2: Atom( HH32:3 [ 20.05, 3.63, 13.29] ) +3: Atom( HH33:4 [ 18.80, 2.43, 13.73] ) +4: Atom( C:5 [ 18.48, 4.55, 14.35] ) +... +17: Atom( H:18 [ 15.34, 5.45, 17.96] ) +18: Atom( CH3:19 [ 13.83, 3.94, 18.35] ) +19: Atom( HH31:20 [ 14.35, 3.41, 19.15] ) +20: Atom( HH32:21 [ 13.19, 4.59, 18.94] ) +21: Atom( HH33:22 [ 13.21, 3.33, 17.69] ) +) + +.. note:: + + Note how the index operator will return a single molecule ``Selector_Atom_`` + when only a single molecule matches the search. + +>>> print(mols["residues in molnum 10:20"]) +SelectorMol( size=11 +0: Molecule( WAT:10 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:11 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:12 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:13 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:14 num_atoms=3 num_residues=1 ) +... +6: Molecule( WAT:16 num_atoms=3 num_residues=1 ) +7: Molecule( WAT:17 num_atoms=3 num_residues=1 ) +8: Molecule( WAT:18 num_atoms=3 num_residues=1 ) +9: Molecule( WAT:19 num_atoms=3 num_residues=1 ) +10: Molecule( WAT:20 num_atoms=3 num_residues=1 ) +) + +You can also go back to the containing molecule using ``molecules with``, + +>>> print(mols["molecules with element C"]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) +>>> print(mols["molecules with resname /wat/i"]) +SelectorMol( size=630 +0: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +... +625: Molecule( WAT:628 num_atoms=3 num_residues=1 ) +626: Molecule( WAT:629 num_atoms=3 num_residues=1 ) +627: Molecule( WAT:630 num_atoms=3 num_residues=1 ) +628: Molecule( WAT:631 num_atoms=3 num_residues=1 ) +629: Molecule( WAT:632 num_atoms=3 num_residues=1 ) +) + +This last search is particularly useful if you are looking for a protein +or for a ligand molecule in a system. In these cases, you could look for +``molecules with resname /ala/i`` or ``molecules with resname /lig/i``. + +Uniquely identifying a molecule +------------------------------- + +Molecules are uniquely identified by their molecule number. This is a number +that ``sire`` assigns to molecules when they are loaded. ``sire`` ensures +that each molecule that it loads will have its own unique number. You have +no control over the number, and should not assume that the number will be +the same every time you run your script. The number is the count of the +molecules that have been loaded during a ``sire`` session, e.g. molecule +number 2 refers to the second molecule that has been loaded. You can assume +that the first molecule loaded from a file will have the smallest molecule +number. + +You can get all of the numbers of the molecules in a container using + +>>> print(mols.numbers()) +[MolNum(2), MolNum(3), MolNum(4), MolNum(5)... MolNum(632)] + +.. note:: + + You can use ``mols.names()`` to get all of the molecule names. + +``sire`` uses the molecule number as it is the only identifier that can +be guaranteed to be unique in the program. Molecules can be moved and copied +into multiple containers, and its index will depend on its container. +Molecule names are assigned from the file, and multiple molecules can +have the same name. + +Molecule identifying types +-------------------------- + +Another way to index molecules is to use the molecule identifying types, i.e. +:class:`~sire.mol.MolName`, :class:`~sire.mol.MolNum` and +:class:`~sire.mol.MolIdx`. The easiest way to create these is via the +function :func:`sire.molid`. + +>>> print(mols[sr.molid("ACE")]) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) + +This returns the molecule called "ACE", as ``sr.molid("ACE")`` has created +an :class:`~sire.mol.MolName` object. + +>>> print(sr.molid("ACE")) +MolName('ACE') + +This function will create an :class:`~sire.mol.MolNum` if it is passed +an integer, e.g. + +>>> print(sr.molid(5)) +MolNum(5) +>>> print(mols[sr.molid(5)]) +Molecule( WAT:5 num_atoms=3 num_residues=1 ) + +You can set both a name and a number by passing in two arguments, e.g. + +>>> print(mols[sr.molid("WAT", 5)]) +Molecule( WAT:5 num_atoms=3 num_residues=1 ) + +Iterating over molecules +------------------------ + +The :class:`~sire.mol.SelectorMol` and :class:`~sire.system.System` classes +are iterable, meaning that they can be used in loops. + +>>> for mol in mols["molname WAT and molnum < 10"]: +... print(mol) +Molecule( WAT:3 num_atoms=3 num_residues=1 ) +Molecule( WAT:4 num_atoms=3 num_residues=1 ) +Molecule( WAT:5 num_atoms=3 num_residues=1 ) +Molecule( WAT:6 num_atoms=3 num_residues=1 ) +Molecule( WAT:7 num_atoms=3 num_residues=1 ) +Molecule( WAT:8 num_atoms=3 num_residues=1 ) +Molecule( WAT:9 num_atoms=3 num_residues=1 ) + +This is particulary useful when combined with looping over the +atoms or residues in the molecules. + +>>> for mol in mols["molidx < 3"]: +... for atom in mol["element O"]: +... print(mol, atom) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) Atom( O:6 [ 19.19, 5.44, 14.76] ) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) Atom( O:16 [ 14.94, 3.17, 15.88] ) +Molecule( WAT:3 num_atoms=3 num_residues=1 ) Atom( O:23 [ 25.64, 8.50, 22.42] ) +Molecule( WAT:4 num_atoms=3 num_residues=1 ) Atom( O:26 [ 22.83, 8.93, 4.14] ) + +Smart search terms +------------------ + +There are a few smart search terms that can help find molecules. + +The most useful is perhaps ``water``. This searches for molecules that +contain one oxygen atom, two hydrogen atoms and any number of null +element (dummy) atoms. + +>>> print(mols["water"]) +SelectorMol( size=630 +0: Molecule( WAT:3 num_atoms=3 num_residues=1 ) +1: Molecule( WAT:4 num_atoms=3 num_residues=1 ) +2: Molecule( WAT:5 num_atoms=3 num_residues=1 ) +3: Molecule( WAT:6 num_atoms=3 num_residues=1 ) +4: Molecule( WAT:7 num_atoms=3 num_residues=1 ) +... +625: Molecule( WAT:628 num_atoms=3 num_residues=1 ) +626: Molecule( WAT:629 num_atoms=3 num_residues=1 ) +627: Molecule( WAT:630 num_atoms=3 num_residues=1 ) +628: Molecule( WAT:631 num_atoms=3 num_residues=1 ) +629: Molecule( WAT:632 num_atoms=3 num_residues=1 ) +) diff --git a/doc/source/tutorial/part02/06_indexing_bonds.rst b/doc/source/tutorial/part02/06_indexing_bonds.rst new file mode 100644 index 000000000..5292cd6e8 --- /dev/null +++ b/doc/source/tutorial/part02/06_indexing_bonds.rst @@ -0,0 +1,432 @@ +============== +Indexing Bonds +============== + +Bonds represent the chemical bonds between atoms in a molecule. A +:class:`~sire.mol.Bond` is a molecular container that contains the +two atoms that make up the bond. + +For example, let's look at the ``aladip`` system again. + +>>> import sire as sr +>>> mols = sr.load(sr.expand(sr.tutorial_url, ["ala.top", "ala.crd"])) +>>> mol = mols[0] +>>> print(mol) +Molecule( ACE:2 num_atoms=22 num_residues=3 ) + +We can get all of the bonds using the :func:`~sire.mol.Molecule.bonds` +function. + +>>> print(mol.bonds()) +SelectorBond( size=21 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => C:5 ) +2: Bond( CH3:2 => HH32:3 ) +3: Bond( CH3:2 => HH33:4 ) +4: Bond( C:5 => O:6 ) +... +16: Bond( N:17 => H:18 ) +17: Bond( N:17 => CH3:19 ) +18: Bond( CH3:19 => HH32:21 ) +19: Bond( CH3:19 => HH33:22 ) +20: Bond( CH3:19 => HH31:20 ) +) + +The result (a :class:`~sire.mol.SelectorBond`) is a molecular container +for bonds. Like all molecular containers, it can be indexed, + +>>> print(mol.bonds()[0]) +Bond( HH31:1 => CH3:2 ) + +sliced + +>>> print(mol.bonds()[0:5]) +SelectorBond( size=5 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => C:5 ) +2: Bond( CH3:2 => HH32:3 ) +3: Bond( CH3:2 => HH33:4 ) +4: Bond( C:5 => O:6 ) +) + +or accessed by a list of indicies + +>>> print(mol.bonds()[ [0, 2, 4, 6, 8] ]) +SelectorBond( size=5 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => C:5 ) +2: Bond( C:5 => O:6 ) +3: Bond( N:7 => H:8 ) +4: Bond( CA:9 => HA:10 ) +) + +The :class:`~sire.mol.Bond` object is also a molecular container, so can +be indexed, searched and sliced just like any other container. + +>>> bond = mol.bonds()[0] +>>> print(bond[0]) +Atom( HH31:1 [ 18.45, 3.49, 12.44] ) +>>> print(bond[1]) +Atom( CH3:2 [ 18.98, 3.45, 13.39] ) + +Accessing bonds by atom +----------------------- + +You can also find bonds by looking for their constituent atoms. +For example, + +>>> print(mol.bonds("atomnum 1", "atomnum 2")) +SelectorBond( size=1 +0: Bond( HH31:1 => CH3:2 ) +) + +Returns the bonds between atoms with numbers 1 and 2. If there are no +bonds that match, then an empty list is returned. + +>>> print(mol.bonds("atomnum 1", "atomnum 5")) +SelectorBond::empty + +If you are sure that there is only a single bond that matches, then you can use the +:func:`~sire.mol.Molecule.bond` function + +>>> print(mol.bond("atomnum 1", "atomnum 2")) +Bond( HH31:1 => CH3:2 ) + +This will raise a ``KeyError`` if multiple bonds match, or if no bonds +match. + +You can use any valid atom identifier to identify the atoms. This includes +search strings, e.g. finding all of the bonds between carbon and hydrogen +atoms. + +>>> print(mol.bonds("element C", "element H")) +SelectorBond( size=10 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH32:3 ) +2: Bond( CH3:2 => HH33:4 ) +3: Bond( CA:9 => HA:10 ) +4: Bond( CB:11 => HB1:12 ) +5: Bond( CB:11 => HB2:13 ) +6: Bond( CB:11 => HB3:14 ) +7: Bond( CH3:19 => HH31:20 ) +8: Bond( CH3:19 => HH32:21 ) +9: Bond( CH3:19 => HH33:22 ) +) + +or using the atom identifying types + +>>> print(mol.bonds(sr.atomid("HH31", 1), sr.atomid("CH3", 2))) +SelectorBond( size=1 +0: Bond( HH31:1 => CH3:2 ) +) + +or using complex search strings, here finding the bonds between +atoms in two residues + +>>> print(mol.bonds("atoms in residx 0", "atoms in residx 1")) +SelectorBond( size=1 +0: Bond( C:5 => N:7 ) +) + +or mixing and matching searches + +>>> print(mol.bonds(sr.atomid("C", 5), "element N")) +SelectorBond( size=1 +0: Bond( C:5 => N:7 ) +) + +Passing in a single atom identifier will return all of the bonds +that involve that atom (or atoms). + +>>> print(mol.bonds("atomnum 2")) +SelectorBond( size=4 +0: Bond( CH3:2 => C:5 ) +1: Bond( HH31:1 => CH3:2 ) +2: Bond( CH3:2 => HH32:3 ) +3: Bond( CH3:2 => HH33:4 ) +) + +This has returned all of the bonds that involve atom number 2, while + +>>> print(mol.bonds("element C")) +SelectorBond( size=19 +0: Bond( CH3:2 => HH33:4 ) +1: Bond( CH3:2 => C:5 ) +2: Bond( HH31:1 => CH3:2 ) +3: Bond( CH3:2 => HH32:3 ) +4: Bond( C:5 => O:6 ) +... +14: Bond( C:15 => N:17 ) +15: Bond( CH3:19 => HH31:20 ) +16: Bond( CH3:19 => HH32:21 ) +17: Bond( CH3:19 => HH33:22 ) +18: Bond( N:17 => CH3:19 ) +) + +gets all of the bonds that involve carbon. + +Accessing bonds by residue +-------------------------- + +You can also access bonds by residue, by passing in residue identifiers. +Passing in two residues identifiers, such as here + +>>> print(mol.bonds("residx 0", "residx 1")) +SelectorBond( size=1 +0: Bond( C:5 => N:7 ) +) + +gives all of the bonds that are between those two residues. + +While passing in a single residue identifier + +>>> print(mol.bonds("residx 0")) +SelectorBond( size=6 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH33:4 ) +2: Bond( CH3:2 => C:5 ) +3: Bond( CH3:2 => HH32:3 ) +4: Bond( C:5 => O:6 ) +5: Bond( C:5 => N:7 ) +) + +gives all of the bonds that involve atoms in this residue (including the +bonds to other residues). + +If you want the bonds that are contained *only* within the residue, then +use the ``bonds`` function on that residue, + +>>> print(mol["residx 0"].bonds()) +SelectorBond( size=5 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH33:4 ) +2: Bond( CH3:2 => C:5 ) +3: Bond( CH3:2 => HH32:3 ) +4: Bond( C:5 => O:6 ) +) + +Calling the ``bonds`` function on any molecular container will return the +bonds that involve only the atoms that are fully contained in that container. + +.. note:: + + We have shown searching for bonds by residue. You can also search + for bonds by chain or segment if your molecule has chains or + segments. So ``print(mol.bonds("chainidx 0", "chainidx 1"))`` + would print the bonds between the first two chains. + +Searching for bonds +------------------- + +You can use search terms to look for bonds. Use ``bonds in X`` to +search for bonds within whatever matches ``X``, e.g. + +>>> print(mol["bonds in residx 0"]) +SelectorBond( size=5 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH33:4 ) +2: Bond( CH3:2 => C:5 ) +3: Bond( CH3:2 => HH32:3 ) +4: Bond( C:5 => O:6 ) +) + +.. note:: + + ``bonds in`` returns only those bonds whose atoms are wholly + contained within whatever matches. So, in this case, these are only + the bonds within the first residue. It doesn't include the bond + from this residue to another residue. + +If you want bonds that involve any atom in ``X`` then use +``bonds with X``, e.g. + +>>> print(mol["bonds with residx 0"]) +SelectorBond( size=6 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH32:3 ) +2: Bond( CH3:2 => HH33:4 ) +3: Bond( CH3:2 => C:5 ) +4: Bond( C:5 => O:6 ) +5: Bond( C:5 => N:7 ) +) + +or + +>>> print(mol["bonds with atomnum 2"]) +SelectorBond( size=4 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH32:3 ) +2: Bond( CH3:2 => HH33:4 ) +3: Bond( CH3:2 => C:5 ) +) + +or + +>>> print(mol["bonds with element C"]) +SelectorBond( size=19 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => C:5 ) +2: Bond( CH3:2 => HH32:3 ) +3: Bond( CH3:2 => HH33:4 ) +4: Bond( C:5 => O:6 ) +... +14: Bond( C:15 => N:17 ) +15: Bond( N:17 => CH3:19 ) +16: Bond( CH3:19 => HH31:20 ) +17: Bond( CH3:19 => HH32:21 ) +18: Bond( CH3:19 => HH33:22 ) +) + +You can find bonds to something using ``bonds to X``, e.g. + +>>> print(mol["bonds to resnum 1"]) +SelectorBond( size=1 +0: Bond( C:5 => N:7 ) +) + +>>> print(mol["bonds to atomnum 2"]) +SelectorBond( size=4 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH32:3 ) +2: Bond( CH3:2 => HH33:4 ) +3: Bond( CH3:2 => C:5 ) +) + +>>> print(mol["bonds to element carbon"]) +SelectorBond( size=16 +0: Bond( HH31:1 => CH3:2 ) +1: Bond( CH3:2 => HH32:3 ) +2: Bond( CH3:2 => HH33:4 ) +3: Bond( C:5 => O:6 ) +4: Bond( C:5 => N:7 ) +... +11: Bond( C:15 => N:17 ) +12: Bond( N:17 => CH3:19 ) +13: Bond( CH3:19 => HH31:20 ) +14: Bond( CH3:19 => HH32:21 ) +15: Bond( CH3:19 => HH33:22 ) +) + +.. note:: + + Note that ``bonds to`` excludes bonds that are in the selection. This means + that ``bonds to element carbon`` excludes carbon-carbon bonds. If you want + all bonds involving carbon, then use ``bonds with element carbon``. + +You can search for bonds between two groups, using +``bond from X to Y``, + +>>> print(mol["bonds from resnum 1 to resnum 2"]) +SelectorBond( size=1 +0: Bond( C:5 => N:7 ) +) + +>>> print(mol["bonds from element carbon to element carbon"]) +SelectorBond( size=3 +0: Bond( CH3:2 => C:5 ) +1: Bond( CA:9 => CB:11 ) +2: Bond( CA:9 => C:15 ) +) + +>>> print(mol["bonds from atomnum 1 to atomnum 2"]) +SelectorBond( size=1 +0: Bond( HH31:1 => CH3:2 ) +) + +And, like all molecule containers, you can perform searches in any +container across any number of molecules, e.g. + +>>> print(mols["bonds from element O to element H"]) +SelectorMBond( size=1260 +0: MolNum(3) Bond( O:23 => H1:24 ) +1: MolNum(3) Bond( O:23 => H2:25 ) +2: MolNum(4) Bond( O:26 => H1:27 ) +3: MolNum(4) Bond( O:26 => H2:28 ) +4: MolNum(5) Bond( O:29 => H1:30 ) +... +1255: MolNum(630) Bond( O:1904 => H2:1906 ) +1256: MolNum(631) Bond( O:1907 => H1:1908 ) +1257: MolNum(631) Bond( O:1907 => H2:1909 ) +1258: MolNum(632) Bond( O:1910 => H1:1911 ) +1259: MolNum(632) Bond( O:1910 => H2:1912 ) +) + +.. note:: + + This has returned a :class:`~sire.mm.SelectorMBond`, which is the + multi-molecule version of the :class:`~sire.mm.SelectorBond` + container. + +Uniquely identifying a bond +--------------------------- + +Bonds are identified by their :class:`~sire.mol.BondID`. This is a pair +of :class:`~sire.mol.AtomID` identifiers, one for each of the two +atoms to be identified. While the atom identifier can be any type, +it is best to use atom indexes, as these uniquely identify atoms in +a molecule. A :class:`~sire.mol.BondID` comprised of two +:class:`~sire.mol.AtomIdx` identifiers will uniquely identify a single +bond. + +You can easily construct a :class:`~sire.mol.BondID` using the +:func:`sire.bondid` function, e.g. + +>>> print(sr.bondid(0, 1)) +Bond( AtomIdx(0), AtomIdx(1) ) + +constructs a :class:`~sire.mol.BondID` from atom indexes, + +>>> print(sr.bondid("O", "H1")) +Bond( AtomName('O'), AtomName('H1') ) + +constructs one from atom names, and + +>>> print(sr.bondid(sr.atomid(1), sr.atomid(2))) +Bond( AtomNum(1), AtomNum(2) ) + +constructs one from atom numbers. + +You can mix and match the IDs if you want. + +You can then use the :class:`~sire.mol.BondID` to index, just like +any other identifier class. + +>>> print(mols[sr.bondid("O", "H1")]) +SelectorMBond( size=630 +0: MolNum(3) Bond( O:23 => H1:24 ) +1: MolNum(4) Bond( O:26 => H1:27 ) +2: MolNum(5) Bond( O:29 => H1:30 ) +3: MolNum(6) Bond( O:32 => H1:33 ) +4: MolNum(7) Bond( O:35 => H1:36 ) +... +625: MolNum(628) Bond( O:1898 => H1:1899 ) +626: MolNum(629) Bond( O:1901 => H1:1902 ) +627: MolNum(630) Bond( O:1904 => H1:1905 ) +628: MolNum(631) Bond( O:1907 => H1:1908 ) +629: MolNum(632) Bond( O:1910 => H1:1911 ) +) + +gives all of the bonds between the atoms called ``O`` and ``H1`` in +all molecules, while + +>>> print(mols[0][sr.bondid(0, 1)]) +Bond( HH31:1 => CH3:2 ) + +gives just the bond between the first and second atoms in the first molecule, and + +>>> print(mols[sr.bondid(0, 1)]) +SelectorMBond( size=631 +0: MolNum(2) Bond( HH31:1 => CH3:2 ) +1: MolNum(3) Bond( O:23 => H1:24 ) +2: MolNum(4) Bond( O:26 => H1:27 ) +3: MolNum(5) Bond( O:29 => H1:30 ) +4: MolNum(6) Bond( O:32 => H1:33 ) +... +626: MolNum(628) Bond( O:1898 => H1:1899 ) +627: MolNum(629) Bond( O:1901 => H1:1902 ) +628: MolNum(630) Bond( O:1904 => H1:1905 ) +629: MolNum(631) Bond( O:1907 => H1:1908 ) +630: MolNum(632) Bond( O:1910 => H1:1911 ) +) + +gives the bond between the first and second atoms in each molecule. diff --git a/doc/source/tutorial/part02/07_searching.rst b/doc/source/tutorial/part02/07_searching.rst new file mode 100644 index 000000000..e245b99ed --- /dev/null +++ b/doc/source/tutorial/part02/07_searching.rst @@ -0,0 +1,671 @@ +========= +Searching +========= + +Sire has a powerful search system. You have already used this to search +for atoms, residues etc by their name, number, index or element. +It is even more powerful, supporting searching by other metadata or +properties. + +To explore this, let's load up the ``kigaki`` system. + +>>> import sire as sr +>>> mols = sr.load(sr.expand(sr.tutorial_url, ["kigaki.gro", "kigaki.top"])) + +Searching by count +------------------ + +You can search for all atoms in the loaded molecules using + +>>> print(mols["atoms"]) +SireMol::SelectorM( size=11120 +0: MolNum(6) Atom( N:1 [ 23.28, 13.14, 22.39] ) +1: MolNum(6) Atom( H1:2 [ 22.66, 13.10, 21.60] ) +2: MolNum(6) Atom( H2:3 [ 23.57, 14.09, 22.53] ) +3: MolNum(6) Atom( H3:4 [ 24.08, 12.57, 22.21] ) +4: MolNum(6) Atom( CA:5 [ 22.58, 12.65, 23.60] ) +... +11115: MolNum(3622) Atom( CL:11116 [ 30.22, 39.31, 33.39] ) +11116: MolNum(3623) Atom( CL:11117 [ 40.21, 0.35, 38.95] ) +11117: MolNum(3624) Atom( CL:11118 [ 42.28, 19.12, 17.40] ) +11118: MolNum(3625) Atom( CL:11119 [ 47.26, 45.20, 12.38] ) +11119: MolNum(3626) Atom( CL:11120 [ 42.51, 39.80, 21.90] ) +) + +or all bonds + +>>> print(mols["bonds"]) +SelectorBond( size=301 +0: Bond( N:1 => CA:5 ) +1: Bond( N:1 => H1:2 ) +2: Bond( N:1 => H2:3 ) +3: Bond( N:1 => H3:4 ) +4: Bond( CA:5 => HA:6 ) +... +296: Bond( CD:294 => HD2:296 ) +297: Bond( C:298 => O:299 ) +298: Bond( C:298 => N:300 ) +299: Bond( N:300 => H2:302 ) +300: Bond( N:300 => H1:301 ) +) + +(and you could do the same for `residues`, `chains`, `segments` or +`molecules`). + +You can search for things that match specified numbers of atoms, residues +etc using `count( X )`. This counts the number of things within the +contained search, e.g. + +>>> print(mols["count(atoms) == 3"]) +SireMol::SelectorM( size=10797 +0: MolNum(7) Atom( OW:303 [ 2.30, 6.28, 1.13] ) +1: MolNum(7) Atom( HW1:304 [ 1.37, 6.26, 1.50] ) +2: MolNum(7) Atom( HW2:305 [ 2.31, 5.89, 0.21] ) +3: MolNum(8) Atom( OW:306 [ 2.25, 2.75, 9.96] ) +4: MolNum(8) Atom( HW1:307 [ 2.60, 2.58, 10.88] ) +... +10792: MolNum(3604) Atom( HW1:11095 [ 41.82, 40.76, 41.82] ) +10793: MolNum(3604) Atom( HW2:11096 [ 41.13, 41.08, 43.27] ) +10794: MolNum(3605) Atom( OW:11097 [ 37.63, 48.01, 40.24] ) +10795: MolNum(3605) Atom( HW1:11098 [ 38.62, 47.90, 40.15] ) +10796: MolNum(3605) Atom( HW2:11099 [ 37.23, 47.15, 40.56] ) +) + +This has given all of the atoms in all of the molecules where the number +of atoms was equal to 3. Typically you would want the molecules which +had this number of atoms. You can search for them using + +>>> print(mols["molecules with count(atoms) == 3"]) +SelectorMol( size=3599 +0: Molecule( SOL:7 num_atoms=3 num_residues=1 ) +1: Molecule( SOL:8 num_atoms=3 num_residues=1 ) +2: Molecule( SOL:9 num_atoms=3 num_residues=1 ) +3: Molecule( SOL:10 num_atoms=3 num_residues=1 ) +4: Molecule( SOL:11 num_atoms=3 num_residues=1 ) +... +3594: Molecule( SOL:3601 num_atoms=3 num_residues=1 ) +3595: Molecule( SOL:3602 num_atoms=3 num_residues=1 ) +3596: Molecule( SOL:3603 num_atoms=3 num_residues=1 ) +3597: Molecule( SOL:3604 num_atoms=3 num_residues=1 ) +3598: Molecule( SOL:3605 num_atoms=3 num_residues=1 ) +) + +Any comparison operator and any type of search is allowed, e.g. you can find all +molecules with more than 5 residues using + +>>> print(mols["molecules with count(residues) > 5"]) +Molecule( Protein:6 num_atoms=302 num_residues=19 ) + +or all residues with more than 10 atoms + +THIS DOESN'T WORK, BUT IT SHOULD + +>>> print(mols["residues with count(atoms) > 10"]) +XXX + +Searching by property +--------------------- + +You can search for atoms, residues, molecules etc by some of +their properties. Currently supported properties are mass, coordinates and charge. + +Searching by mass +----------------- + +For example; + +>>> print(mols["atom mass < 2"]) +SireMol::SelectorM( size=7370 +0: MolNum(6) Atom( H1:2 [ 22.66, 13.10, 21.60] ) +1: MolNum(6) Atom( H2:3 [ 23.57, 14.09, 22.53] ) +2: MolNum(6) Atom( H3:4 [ 24.08, 12.57, 22.21] ) +3: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +4: MolNum(6) Atom( HB1:8 [ 23.66, 13.69, 25.02] ) +... +7365: MolNum(3603) Atom( HW2:11093 [ 45.51, 47.49, 46.51] ) +7366: MolNum(3604) Atom( HW1:11095 [ 41.82, 40.76, 41.82] ) +7367: MolNum(3604) Atom( HW2:11096 [ 41.13, 41.08, 43.27] ) +7368: MolNum(3605) Atom( HW1:11098 [ 38.62, 47.90, 40.15] ) +7369: MolNum(3605) Atom( HW2:11099 [ 37.23, 47.15, 40.56] ) +) + +which can be shortened to + +>>> print(mols["mass < 2"]) +SireMol::SelectorM( size=7370 +0: MolNum(6) Atom( H1:2 [ 22.66, 13.10, 21.60] ) +1: MolNum(6) Atom( H2:3 [ 23.57, 14.09, 22.53] ) +2: MolNum(6) Atom( H3:4 [ 24.08, 12.57, 22.21] ) +3: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +4: MolNum(6) Atom( HB1:8 [ 23.66, 13.69, 25.02] ) +... +7365: MolNum(3603) Atom( HW2:11093 [ 45.51, 47.49, 46.51] ) +7366: MolNum(3604) Atom( HW1:11095 [ 41.82, 40.76, 41.82] ) +7367: MolNum(3604) Atom( HW2:11096 [ 41.13, 41.08, 43.27] ) +7368: MolNum(3605) Atom( HW1:11098 [ 38.62, 47.90, 40.15] ) +7369: MolNum(3605) Atom( HW2:11099 [ 37.23, 47.15, 40.56] ) +) + +will find all atoms that have a mass of less than `2 g mol-1`. You can +add the units, e.g. + +>>> print(mols["mass < 2 g_per_mol"]) +SireMol::SelectorM( size=7370 +0: MolNum(6) Atom( H1:2 [ 22.66, 13.10, 21.60] ) +1: MolNum(6) Atom( H2:3 [ 23.57, 14.09, 22.53] ) +2: MolNum(6) Atom( H3:4 [ 24.08, 12.57, 22.21] ) +3: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +4: MolNum(6) Atom( HB1:8 [ 23.66, 13.69, 25.02] ) +... +7365: MolNum(3603) Atom( HW2:11093 [ 45.51, 47.49, 46.51] ) +7366: MolNum(3604) Atom( HW1:11095 [ 41.82, 40.76, 41.82] ) +7367: MolNum(3604) Atom( HW2:11096 [ 41.13, 41.08, 43.27] ) +7368: MolNum(3605) Atom( HW1:11098 [ 38.62, 47.90, 40.15] ) +7369: MolNum(3605) Atom( HW2:11099 [ 37.23, 47.15, 40.56] ) +) + +can use any comparison you want, e.g. + +>>> print(mols["mass >= 16"]) +SireMol::SelectorM( size=3638 +0: MolNum(6) Atom( O:24 [ 21.52, 14.78, 23.75] ) +1: MolNum(6) Atom( O:43 [ 19.51, 14.27, 26.56] ) +2: MolNum(6) Atom( O:50 [ 19.97, 18.72, 26.98] ) +3: MolNum(6) Atom( O:60 [ 22.63, 18.62, 24.67] ) +4: MolNum(6) Atom( O:82 [ 26.57, 19.61, 26.69] ) +... +3633: MolNum(3622) Atom( CL:11116 [ 30.22, 39.31, 33.39] ) +3634: MolNum(3623) Atom( CL:11117 [ 40.21, 0.35, 38.95] ) +3635: MolNum(3624) Atom( CL:11118 [ 42.28, 19.12, 17.40] ) +3636: MolNum(3625) Atom( CL:11119 [ 47.26, 45.20, 12.38] ) +3637: MolNum(3626) Atom( CL:11120 [ 42.51, 39.80, 21.90] ) +) + +and also search for larger units by mass, e.g. finding all residues +that are greater than `100 g_per_mol` + +>>> print(mols["residue mass > 50 g_per_mol"]) +Selector( size=18 +0: Residue( LYS:1 num_atoms=24 ) +1: Residue( ILE:2 num_atoms=19 ) +2: Residue( GLY:3 num_atoms=7 ) +3: Residue( ALA:4 num_atoms=10 ) +4: Residue( LYS:5 num_atoms=22 ) +... +13: Residue( ILE:14 num_atoms=19 ) +14: Residue( GLY:15 num_atoms=7 ) +15: Residue( ALA:16 num_atoms=10 ) +16: Residue( LYS:17 num_atoms=22 ) +17: Residue( ILE:18 num_atoms=19 ) +) + +or molecules that are less than `20 g_per_mol` + +>>> print(mols["molecule mass < 20 g_per_mol"]) +SelectorMol( size=3599 +0: Molecule( SOL:7 num_atoms=3 num_residues=1 ) +1: Molecule( SOL:8 num_atoms=3 num_residues=1 ) +2: Molecule( SOL:9 num_atoms=3 num_residues=1 ) +3: Molecule( SOL:10 num_atoms=3 num_residues=1 ) +4: Molecule( SOL:11 num_atoms=3 num_residues=1 ) +... +3594: Molecule( SOL:3601 num_atoms=3 num_residues=1 ) +3595: Molecule( SOL:3602 num_atoms=3 num_residues=1 ) +3596: Molecule( SOL:3603 num_atoms=3 num_residues=1 ) +3597: Molecule( SOL:3604 num_atoms=3 num_residues=1 ) +3598: Molecule( SOL:3605 num_atoms=3 num_residues=1 ) +) + +or bonds where the two atoms in the bond have a total mass of greater than +25 g_per_mol + +>>> print(mols["bond mass > 25 g_per_mol"]) +SelectorBond( size=60 +0: Bond( N:1 => CA:5 ) +1: Bond( CE:16 => NZ:19 ) +2: Bond( C:23 => O:24 ) +3: Bond( C:23 => N:25 ) +4: Bond( N:25 => CA:27 ) +... +55: Bond( C:279 => O:280 ) +56: Bond( C:279 => N:281 ) +57: Bond( N:281 => CA:283 ) +58: Bond( C:298 => N:300 ) +59: Bond( C:298 => O:299 ) +) + +Writing + +>>> print(mols["mass 1.008"]) +SireMol::SelectorM( size=7370 +0: MolNum(6) Atom( H1:2 [ 22.66, 13.10, 21.60] ) +1: MolNum(6) Atom( H2:3 [ 23.57, 14.09, 22.53] ) +2: MolNum(6) Atom( H3:4 [ 24.08, 12.57, 22.21] ) +3: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +4: MolNum(6) Atom( HB1:8 [ 23.66, 13.69, 25.02] ) +... +7365: MolNum(3603) Atom( HW2:11093 [ 45.51, 47.49, 46.51] ) +7366: MolNum(3604) Atom( HW1:11095 [ 41.82, 40.76, 41.82] ) +7367: MolNum(3604) Atom( HW2:11096 [ 41.13, 41.08, 43.27] ) +7368: MolNum(3605) Atom( HW1:11098 [ 38.62, 47.90, 40.15] ) +7369: MolNum(3605) Atom( HW2:11099 [ 37.23, 47.15, 40.56] ) +) + +is equivalent to writing + +>>> print(mol["mass =~ 1.008"]) +SireMol::SelectorM( size=7370 +0: MolNum(6) Atom( H1:2 [ 22.66, 13.10, 21.60] ) +1: MolNum(6) Atom( H2:3 [ 23.57, 14.09, 22.53] ) +2: MolNum(6) Atom( H3:4 [ 24.08, 12.57, 22.21] ) +3: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +4: MolNum(6) Atom( HB1:8 [ 23.66, 13.69, 25.02] ) +... +7365: MolNum(3603) Atom( HW2:11093 [ 45.51, 47.49, 46.51] ) +7366: MolNum(3604) Atom( HW1:11095 [ 41.82, 40.76, 41.82] ) +7367: MolNum(3604) Atom( HW2:11096 [ 41.13, 41.08, 43.27] ) +7368: MolNum(3605) Atom( HW1:11098 [ 38.62, 47.90, 40.15] ) +7369: MolNum(3605) Atom( HW2:11099 [ 37.23, 47.15, 40.56] ) +) + +where `=~` means "approximately equal to". The +`pytest algorithm `__ +is used for approximate comparison. You can get the epsilon for +comparison via + +>>> print(sr.search.get_approx_epsilon()) +1e-06 + +and set it via + +>>> sr.search.set_approx_epsilon(1e-6) + +Searching by charge +------------------- + +You can also do the same thing with charge, e.g. + +>>> print(mols["charge > 0"]) +SireMol::SelectorM( size=7411 +0: MolNum(6) Atom( N:1 [ 23.28, 13.14, 22.39] ) +1: MolNum(6) Atom( H1:2 [ 22.66, 13.10, 21.60] ) +2: MolNum(6) Atom( H2:3 [ 23.57, 14.09, 22.53] ) +3: MolNum(6) Atom( H3:4 [ 24.08, 12.57, 22.21] ) +4: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +... +7406: MolNum(3608) Atom( NA:11102 [ 9.73, 27.52, 34.34] ) +7407: MolNum(3609) Atom( NA:11103 [ 14.34, 30.50, 37.65] ) +7408: MolNum(3610) Atom( NA:11104 [ 10.83, 47.08, 0.87] ) +7409: MolNum(3611) Atom( NA:11105 [ 37.64, 24.06, 29.76] ) +7410: MolNum(3612) Atom( NA:11106 [ 45.27, 32.64, 46.48] ) +) + +gives all of the positively charged atoms, while + +>>> print(mols["charge < -0.5"]) +SireMol::SelectorM( size=3631 +0: MolNum(6) Atom( O:24 [ 21.52, 14.78, 23.75] ) +1: MolNum(6) Atom( O:43 [ 19.51, 14.27, 26.56] ) +2: MolNum(6) Atom( O:50 [ 19.97, 18.72, 26.98] ) +3: MolNum(6) Atom( O:60 [ 22.63, 18.62, 24.67] ) +4: MolNum(6) Atom( O:82 [ 26.57, 19.61, 26.69] ) +... +3626: MolNum(3622) Atom( CL:11116 [ 30.22, 39.31, 33.39] ) +3627: MolNum(3623) Atom( CL:11117 [ 40.21, 0.35, 38.95] ) +3628: MolNum(3624) Atom( CL:11118 [ 42.28, 19.12, 17.40] ) +3629: MolNum(3625) Atom( CL:11119 [ 47.26, 45.20, 12.38] ) +3630: MolNum(3626) Atom( CL:11120 [ 42.51, 39.80, 21.90] ) +) + +gives all of the atoms whose charges are less than -0.5. + +The units are unit electron charges, which you can specify, + +>>> print(mols["charge > 0.5 e"]) +SireMol::SelectorM( size=25 +0: MolNum(6) Atom( C:23 [ 21.37, 13.56, 23.79] ) +1: MolNum(6) Atom( C:42 [ 19.00, 14.64, 25.50] ) +2: MolNum(6) Atom( C:49 [ 19.98, 17.58, 26.53] ) +3: MolNum(6) Atom( C:59 [ 22.96, 18.55, 25.85] ) +4: MolNum(6) Atom( C:81 [ 26.04, 20.38, 25.89] ) +... +20: MolNum(3608) Atom( NA:11102 [ 9.73, 27.52, 34.34] ) +21: MolNum(3609) Atom( NA:11103 [ 14.34, 30.50, 37.65] ) +22: MolNum(3610) Atom( NA:11104 [ 10.83, 47.08, 0.87] ) +23: MolNum(3611) Atom( NA:11105 [ 37.64, 24.06, 29.76] ) +24: MolNum(3612) Atom( NA:11106 [ 45.27, 32.64, 46.48] ) +) + +You can also use the same `residue`, `molecule` etc terms to search +based on the total charge on a residue, molecule etc. + +>>> print(mols["residue charge 0"]) +SireMol::SelectorM( size=3612 +0: MolNum(6) Residue( ILE:2 num_atoms=19 ) +1: MolNum(6) Residue( GLY:3 num_atoms=7 ) +2: MolNum(6) Residue( ALA:4 num_atoms=10 ) +3: MolNum(6) Residue( ILE:6 num_atoms=19 ) +4: MolNum(6) Residue( ILE:8 num_atoms=19 ) +... +3607: MolNum(3601) Residue( SOL:3614 num_atoms=3 ) +3608: MolNum(3602) Residue( SOL:3615 num_atoms=3 ) +3609: MolNum(3603) Residue( SOL:3616 num_atoms=3 ) +3610: MolNum(3604) Residue( SOL:3617 num_atoms=3 ) +3611: MolNum(3605) Residue( SOL:3618 num_atoms=3 ) +) + +finds all of the neutral residues, and + +>>> print(mols["bond charge < -0.5"]) +SelectorBond( size=5 +0: Bond( N:61 => CA:63 ) +1: Bond( N:102 => CA:104 ) +2: Bond( N:160 => CA:162 ) +3: Bond( N:201 => CA:203 ) +4: Bond( N:259 => CA:261 ) +) + +finds all of the bonds where the total charge on the two atoms is +less than `-0.5 e`. + +Searching by coordinates +------------------------ + +To search by coordinates, you can look for atoms that are within +specified distances of points or other atoms. For example, + +>>> print(mols["atoms within 2.0 angstrom of element C"]) +SireMol::SelectorM( size=268 +0: MolNum(6) Atom( N:1 [ 23.28, 13.14, 22.39] ) +1: MolNum(6) Atom( CA:5 [ 22.58, 12.65, 23.60] ) +2: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +3: MolNum(6) Atom( CB:7 [ 23.52, 12.72, 24.79] ) +4: MolNum(6) Atom( HB1:8 [ 23.66, 13.69, 25.02] ) +... +263: MolNum(6) Atom( C:298 [ 20.38, 27.34, 16.01] ) +264: MolNum(6) Atom( O:299 [ 19.53, 26.50, 15.69] ) +265: MolNum(6) Atom( N:300 [ 20.91, 28.17, 15.12] ) +266: MolNum(271) Atom( HW1:1096 [ 17.33, 10.51, 26.59] ) +267: MolNum(827) Atom( HW1:2764 [ 14.66, 29.74, 19.60] ) +) + +finds all atoms that are within `2 angstrom` of any carbon atom. +The default unit of distance is angstrom, so you could also write + +>>> print(mols["atoms within 2 of element C"]) +SireMol::SelectorM( size=268 +0: MolNum(6) Atom( N:1 [ 23.28, 13.14, 22.39] ) +1: MolNum(6) Atom( CA:5 [ 22.58, 12.65, 23.60] ) +2: MolNum(6) Atom( HA:6 [ 22.30, 11.70, 23.49] ) +3: MolNum(6) Atom( CB:7 [ 23.52, 12.72, 24.79] ) +4: MolNum(6) Atom( HB1:8 [ 23.66, 13.69, 25.02] ) +... +263: MolNum(6) Atom( C:298 [ 20.38, 27.34, 16.01] ) +264: MolNum(6) Atom( O:299 [ 19.53, 26.50, 15.69] ) +265: MolNum(6) Atom( N:300 [ 20.91, 28.17, 15.12] ) +266: MolNum(271) Atom( HW1:1096 [ 17.33, 10.51, 26.59] ) +267: MolNum(827) Atom( HW1:2764 [ 14.66, 29.74, 19.60] ) +) + +.. note:: + + Note that we used `atoms` in this search rather than `atom`. Both are + equivalent and can be used interchangeably. In this case, it feels better + to write `atoms within` rather than `atom within`, but both will + do the same thing. + +You can also search by residue or other units, such as + +>>> print(mols["residues within 3 angstrom of resnum 1"]) +SireMol::SelectorM( size=18 +0: MolNum(6) Residue( LYS:1 num_atoms=24 ) +1: MolNum(6) Residue( ILE:2 num_atoms=19 ) +2: MolNum(6) Residue( ALA:4 num_atoms=10 ) +3: MolNum(1604) Residue( SOL:1617 num_atoms=3 ) +4: MolNum(1624) Residue( SOL:1637 num_atoms=3 ) +... +13: MolNum(1769) Residue( SOL:1782 num_atoms=3 ) +14: MolNum(1781) Residue( SOL:1794 num_atoms=3 ) +15: MolNum(1800) Residue( SOL:1813 num_atoms=3 ) +16: MolNum(1809) Residue( SOL:1822 num_atoms=3 ) +17: MolNum(1812) Residue( SOL:1825 num_atoms=3 ) +) + +returns all residues where any atom in that residue is within +`3 angstrom` of any atom in the residue with `resnum 1`. + +You can also search for atoms within a point in space, e.g. + +>>> print(mols["atoms within 5.0 of (0, 0, 0)"]) +SireMol::SelectorM( size=9 +0: MolNum(82) Atom( OW:528 [ 2.97, 0.35, 1.71] ) +1: MolNum(82) Atom( HW1:529 [ 3.46, 1.19, 1.50] ) +2: MolNum(82) Atom( HW2:530 [ 3.59, -0.30, 2.16] ) +3: MolNum(183) Atom( OW:831 [ 0.75, 3.45, 0.33] ) +4: MolNum(183) Atom( HW1:832 [ -0.17, 3.17, 0.04] ) +5: MolNum(183) Atom( HW2:833 [ 1.06, 4.22, -0.23] ) +6: MolNum(185) Atom( OW:837 [ 0.72, 1.66, 3.18] ) +7: MolNum(185) Atom( HW1:838 [ 0.55, 2.49, 2.64] ) +8: MolNum(185) Atom( HW2:839 [ 1.62, 1.29, 2.96] ) +) + +finds all atoms within `5 angstroms` of the point `(0, 0, 0)`, while + +>>> print(mols["molecules within 5.0 of (0, 0, 0)"]) +SelectorMol( size=3 +0: Molecule( SOL:82 num_atoms=3 num_residues=1 ) +1: Molecule( SOL:183 num_atoms=3 num_residues=1 ) +2: Molecule( SOL:185 num_atoms=3 num_residues=1 ) +) + +finds all molecules which have any atom that is within `5 angstroms` +of the point `(0, 0, 0)`. + +Searching by molecule type +-------------------------- + +There are some high-level search terms that provide quick access +to searches for common types of molecules. + +>>> print(mols["water"]) +SelectorMol( size=3599 +0: Molecule( SOL:7 num_atoms=3 num_residues=1 ) +1: Molecule( SOL:8 num_atoms=3 num_residues=1 ) +2: Molecule( SOL:9 num_atoms=3 num_residues=1 ) +3: Molecule( SOL:10 num_atoms=3 num_residues=1 ) +4: Molecule( SOL:11 num_atoms=3 num_residues=1 ) +... +3594: Molecule( SOL:3601 num_atoms=3 num_residues=1 ) +3595: Molecule( SOL:3602 num_atoms=3 num_residues=1 ) +3596: Molecule( SOL:3603 num_atoms=3 num_residues=1 ) +3597: Molecule( SOL:3604 num_atoms=3 num_residues=1 ) +3598: Molecule( SOL:3605 num_atoms=3 num_residues=1 ) +) + +returns all water molecules. These are searched for by finding all molecules +that contain one oxygen, two hydrogens and any number of null (dummy) +atoms. + +You can combine this with other searches, e.g. + +>>> print(mols["water and element O"]) +SireMol::SelectorM( size=3599 +0: MolNum(7) Atom( OW:303 [ 2.30, 6.28, 1.13] ) +1: MolNum(8) Atom( OW:306 [ 2.25, 2.75, 9.96] ) +2: MolNum(9) Atom( OW:309 [ 0.19, 3.68, 6.47] ) +3: MolNum(10) Atom( OW:312 [ 5.69, 12.75, 11.65] ) +4: MolNum(11) Atom( OW:315 [ 15.55, 15.11, 7.03] ) +... +3594: MolNum(3601) Atom( OW:11085 [ 49.49, 40.49, 41.73] ) +3595: MolNum(3602) Atom( OW:11088 [ 43.18, 44.69, 43.76] ) +3596: MolNum(3603) Atom( OW:11091 [ 45.83, 46.80, 45.85] ) +3597: MolNum(3604) Atom( OW:11094 [ 41.52, 41.48, 42.44] ) +3598: MolNum(3605) Atom( OW:11097 [ 37.63, 48.01, 40.24] ) +) + +gives all of the oxygen atoms in water molecules. + +There is a similar search term to find protein molecules. + +>>> print(mols["protein"]) +Molecule( Protein:6 num_atoms=302 num_residues=19 ) + +This returns all molecules that contain at least 5 residues that have +names that are in a set of protein residue names. + +You can get the set of protein residue names using; + +>>> print(sr.search.get_protein_residue_names()) +['hip', 'his', 'tyr', 'ile', 'trp', 'ala', 'pro', 'glh', 'ash', + 'lys', 'ser', 'gln', 'arg', 'asn', 'asp', 'cys', 'met', 'phe', + 'leu', 'glu', 'hid', 'hie', 'cyx', 'gly', 'val', 'thr'] + +Names are matched ignoring case, so `ALA` will be identified as a +protein residue. You can set protein residue names using + +>>> sr.search.set_protein_residue_names(["ala", "ash"]) +>>> print(sr.search.get_protein_residue_names()) +['ala', 'ash'] + +You can reset the names using + +>>> sr.search.set_protein_residue_names( +... ['hip', 'his', 'tyr', 'ile', 'trp', 'ala', 'pro', 'glh', 'ash', +... 'lys', 'ser', 'gln', 'arg', 'asn', 'asp', 'cys', 'met', 'phe', +... 'leu', 'glu', 'hid', 'hie', 'cyx', 'gly', 'val', 'thr'] + +Similarly, you can get the minimum number of protein residues to match +using + +>>> print(sr.search.get_min_protein_residues()) +5 + +and can set it via + +>>> sr.search.set_min_protein_residues(5) + +Searching by custom tokens +-------------------------- + +It is common when searching that you will have a term that you will +want to repeat. For example, you can match proteins using `protein`, +and water molecules using `water`. You could thus match all +other molecules using + +>>> print(mols["not (protein or water)"]) +SelectorMol( size=21 +0: Molecule( NA:3606 num_atoms=1 num_residues=1 ) +1: Molecule( NA:3607 num_atoms=1 num_residues=1 ) +2: Molecule( NA:3608 num_atoms=1 num_residues=1 ) +3: Molecule( NA:3609 num_atoms=1 num_residues=1 ) +4: Molecule( NA:3610 num_atoms=1 num_residues=1 ) +... +16: Molecule( CL:3622 num_atoms=1 num_residues=1 ) +17: Molecule( CL:3623 num_atoms=1 num_residues=1 ) +18: Molecule( CL:3624 num_atoms=1 num_residues=1 ) +19: Molecule( CL:3625 num_atoms=1 num_residues=1 ) +20: Molecule( CL:3626 num_atoms=1 num_residues=1 ) +) + +You can create your own search token that represents this search +using :func:`sire.search.set_token`, e.g. + +>>> sr.search.set_token("other", "not (protein or water)") + +This creates the token `other` that represents the search +`not (protein or water)`. You can now use `other` as a search term, e.g. + +>>> print(mols["other"]) +SelectorMol( size=21 +0: Molecule( NA:3606 num_atoms=1 num_residues=1 ) +1: Molecule( NA:3607 num_atoms=1 num_residues=1 ) +2: Molecule( NA:3608 num_atoms=1 num_residues=1 ) +3: Molecule( NA:3609 num_atoms=1 num_residues=1 ) +4: Molecule( NA:3610 num_atoms=1 num_residues=1 ) +... +16: Molecule( CL:3622 num_atoms=1 num_residues=1 ) +17: Molecule( CL:3623 num_atoms=1 num_residues=1 ) +18: Molecule( CL:3624 num_atoms=1 num_residues=1 ) +19: Molecule( CL:3625 num_atoms=1 num_residues=1 ) +20: Molecule( CL:3626 num_atoms=1 num_residues=1 ) +) + +This enables you to more easily find all of the positive and negative ions, +e.g. + +>>> print(mols["other and charge > 0"]) +SelectorMol( size=7 +0: Molecule( NA:3606 num_atoms=1 num_residues=1 ) +1: Molecule( NA:3607 num_atoms=1 num_residues=1 ) +2: Molecule( NA:3608 num_atoms=1 num_residues=1 ) +3: Molecule( NA:3609 num_atoms=1 num_residues=1 ) +4: Molecule( NA:3610 num_atoms=1 num_residues=1 ) +5: Molecule( NA:3611 num_atoms=1 num_residues=1 ) +6: Molecule( NA:3612 num_atoms=1 num_residues=1 ) +) + +Tokens can build on one another, e.g. + +>>> sr.search.set_token("positive_ions", "other and charge > 0") +>>> print(mols["positive_ions"]) +SelectorMol( size=7 +0: Molecule( NA:3606 num_atoms=1 num_residues=1 ) +1: Molecule( NA:3607 num_atoms=1 num_residues=1 ) +2: Molecule( NA:3608 num_atoms=1 num_residues=1 ) +3: Molecule( NA:3609 num_atoms=1 num_residues=1 ) +4: Molecule( NA:3610 num_atoms=1 num_residues=1 ) +5: Molecule( NA:3611 num_atoms=1 num_residues=1 ) +6: Molecule( NA:3612 num_atoms=1 num_residues=1 ) +) + +You can find out what a token refers to via +:func:`sire.search.get_token`, e.g. + +>>> print(sr.search.get_token("positive_ions")) +({ other => not ((protein or water)) } and charge > 0 |e|) + +Note how the `other` token has been expanded into its parts. +This is because the token is expanded when it is created. +This means that the token is unaffected by what you do to +the `other` token, e.g. deleting it via + +>>> sr.search.delete_token("other") + +will not affect `positive_ions` + +>>> print(mols["positive_ions"]) +SelectorMol( size=7 +0: Molecule( NA:3606 num_atoms=1 num_residues=1 ) +1: Molecule( NA:3607 num_atoms=1 num_residues=1 ) +2: Molecule( NA:3608 num_atoms=1 num_residues=1 ) +3: Molecule( NA:3609 num_atoms=1 num_residues=1 ) +4: Molecule( NA:3610 num_atoms=1 num_residues=1 ) +5: Molecule( NA:3611 num_atoms=1 num_residues=1 ) +6: Molecule( NA:3612 num_atoms=1 num_residues=1 ) +) + +Indexing within searches +------------------------ + +It is often the case that multiple items will match your search. You +can request only a sub-set by indexing your search, e.g. + +>>> print(mols["{positive_ions}[0]"]) +Molecule( NA:3606 num_atoms=1 num_residues=1 ) + +returns the first item that matched the custom `positive_ions` token +you created above. + +Indexing can be used with any search term. The general format is +`{search_term}[index]`. The index behaves like a python index, so can +be negative indexed or sliced, e.g. + +>>> print(mols["{positive_ions}[-1]"]) +Molecule( NA:3612 num_atoms=1 num_residues=1 ) + +>>> print(mols["{positive_ions}[0:6:2]"]) +SelectorMol( size=3 +0: Molecule( NA:3606 num_atoms=1 num_residues=1 ) +1: Molecule( NA:3608 num_atoms=1 num_residues=1 ) +2: Molecule( NA:3610 num_atoms=1 num_residues=1 ) +) diff --git a/doc/winbuild.bat b/doc/winbuild.bat new file mode 100644 index 000000000..b5c71cd1d --- /dev/null +++ b/doc/winbuild.bat @@ -0,0 +1,3 @@ +if not exist "build\html\NUL" mkdir "build\html" +if not exist "build\doctrees\NUL" mkdir "build\doctrees" +sphinx-build -b html -d build\doctrees -j8 -v source build\html \ No newline at end of file diff --git a/docker/sire-generate-wrappers/Dockerfile b/docker/sire-generate-wrappers/Dockerfile index c43f18449..b4ed37642 100644 --- a/docker/sire-generate-wrappers/Dockerfile +++ b/docker/sire-generate-wrappers/Dockerfile @@ -13,9 +13,12 @@ RUN apt-get update && apt-get -y upgrade \ WORKDIR /root -RUN conda install make clang clangdev llvmdev cmake && \ - conda clean -a -f -y && \ - pip install pyplusplus pygccxml fuzzywuzzy python-Levenshtein && \ +RUN conda install make clang clangdev llvmdev cmake + +RUN conda install -c conda-forge python-levenshtein && \ + conda clean -a -f -y + +RUN pip install pyplusplus pygccxml fuzzywuzzy && \ rm -fr ~/.cache/pip /tmp* RUN git clone https://github.com/CastXML/CastXML && \ @@ -28,8 +31,12 @@ RUN git clone https://github.com/CastXML/CastXML && \ cd $HOME && \ rm -rf CastXML +# Need to fix an exception that is raised on Apple M1 +COPY scanner.py /opt/conda/lib/python3.9/site-packages/pygccxml/parser + COPY includes.tar.bz2 /opt/conda COPY generate_wrappers /usr/bin +COPY unpack_headers /usr/bin RUN chmod a+x /usr/bin/generate_wrappers COPY bashrc /root/.bashrc COPY push_wrappers /usr/bin diff --git a/docker/sire-generate-wrappers/README.md b/docker/sire-generate-wrappers/README.md index c6572721c..ffc280b62 100644 --- a/docker/sire-generate-wrappers/README.md +++ b/docker/sire-generate-wrappers/README.md @@ -21,23 +21,23 @@ this; ``` Unable to find image 'siremol/sire-generate-wrappers:latest' locally -Trying to pull repository docker.io/siremol/sire-generate-wrappers ... +Trying to pull repository docker.io/siremol/sire-generate-wrappers ... latest: Pulling from docker.io/siremol/sire-generate-wrappers -a2abf6c4d29d: Pull complete -c256cb8a03f5: Pull complete -96470ebef4ad: Pull complete -fe843007773c: Pull complete -13f39c13126f: Pull complete -0470e7ed57ae: Pull complete -5363ab184b58: Pull complete -d719333d5423: Pull complete -29c0367973b3: Pull complete -4642f7c70ef4: Pull complete -b70e0e58d6c8: Pull complete +a2abf6c4d29d: Pull complete +c256cb8a03f5: Pull complete +96470ebef4ad: Pull complete +fe843007773c: Pull complete +13f39c13126f: Pull complete +0470e7ed57ae: Pull complete +5363ab184b58: Pull complete +d719333d5423: Pull complete +29c0367973b3: Pull complete +4642f7c70ef4: Pull complete +b70e0e58d6c8: Pull complete Digest: sha256:a8a4513655dd43cebac306f77ac85a3fd953802759029bc771fe51db058eea95 Status: Downloaded newer image for siremol/sire-generate-wrappers:latest (base) root:~# -```` +``` ## Generating the wrappers @@ -55,7 +55,7 @@ would type (base) root:~# generate_wrappers --branch devel ``` -This will run in parallel, but be aware that this can take +This will run in parallel, but be aware that this can take a long time! ## Checking the wrappers @@ -67,24 +67,24 @@ folder and run commands manually if there are any problems. You can check which wrappers were changed by running `git status` in any of the wrapper directories. -## Pushing the wrappers to GitHub +## Pushing the wrappers to GitHub -You can push your new wrappers back to GitHub by +You can push your new wrappers back to GitHub by typing the command; ``` (base) root:~# push_wrappers --name "{YOUR NAME}" --email "{YOUR EMAIL}" ``` -where `${YOUR NAME}` is your real name, as on GitHub, and +where `${YOUR NAME}` is your real name, as on GitHub, and `${YOUR EMAIL}` is your real email. Note that you should put these in double quotes. -This will use `git config` to set those values, before +This will use `git config` to set those values, before running `git add` in `$HOME/Sire`, and then running `git commit` and `git push`. -The `git push` command will ask you for your GitHub +The `git push` command will ask you for your GitHub username and password. Your new wrappers will be pushed if these are entered and are correct. @@ -92,16 +92,58 @@ Assuming everything has worked, then congratulations! You have successfully generated and pushed your new Sire Python wrappers. +## Using the container against an external Sire directory + +You may wish to use this container to create wrappers for +a Sire directory on your computer. To do this, you can mount +the Sire directory into the container via + +``` +docker run -it -v /path/to/Sire:/root/Sire siremol/sire-generate-wrappers +``` + +This will make your Sire directory (in `/path/to/Sire`) available in the +container as `/root/Sire`. You can now generate wrappers in the +container that will write directly to your real local Sire directory +(and so can be compiled, tested and pushed to GitHub from there). + +Once in the container, you need to run `unpack_headers` to unpack the +headers. + +``` +(base) root:~# unpack_headers +``` + +You can now change into the Sire directory and generate wrappers as you +need, e.g. + +``` +(base) root:~# cd Sire/wrapper +(base) root:~/Sire/wrapper# python AutoGenerate/scanheaders.py ~/Sire/corelib/src/libs/ . +(base) root:~/Sire/wrapper# cd Search +(base) root:~/Sire/wrapper/Search# python ../AutoGenerate/create_wrappers.py +``` + +would regenerate the wrappers for the `Search` module. Note that this +will be slower than working entirely in the container due to the slowness +of translating between the container's filesystem and the host's +filesystem. But it is useful for iterative development as it avoids +you needing to push and pull changes via git. + +Be very careful doing this, as the git version in the container is not +going to be the same as on your local computer. Also be careful not +to run `generate_wrappers` as this will delete your local Sire container. + ## Creating the sire-generate-wrappers container -You only need to read here if you want to create the +You only need to read here if you want to create the sire-generate-wrappers container yourself. First, you must have a working installation on Sire on your computer. This is needed so that we can copy the header files from this installation into the container. We will assume that Sire is installed -in `$HOME/sire.app`. +in `$HOME/sire.app`. Next, you must navigate to this directory, e.g. @@ -111,7 +153,7 @@ cd $HOME/Sire/docker/sire-generate-wrappers (assuming Sire was cloned to `$HOME/Sire`) -Create the `includes.tar.bz2` file by running the +Create the `includes.tar.bz2` file by running the `create_includes_tarball` script via; ``` @@ -135,8 +177,8 @@ and the follow the rest of the instructions. ## Removing all docker containers -Sometimes you will want to remove ALL docker containers -from your computer. You can do this via these two +Sometimes you will want to remove ALL docker containers +from your computer. You can do this via these two commands; ``` diff --git a/docker/sire-generate-wrappers/generate_wrappers b/docker/sire-generate-wrappers/generate_wrappers index 3118fe7cb..49feda476 100755 --- a/docker/sire-generate-wrappers/generate_wrappers +++ b/docker/sire-generate-wrappers/generate_wrappers @@ -41,7 +41,7 @@ then rm -rf Sire fi -echo "Checking out Sire..." +echo "Checking out sire..." git clone --branch $BRANCH https://github.com/michellab/Sire echo "Changing into the wrapper directory..." diff --git a/docker/sire-generate-wrappers/scanner.py b/docker/sire-generate-wrappers/scanner.py new file mode 100644 index 000000000..e12bc40e8 --- /dev/null +++ b/docker/sire-generate-wrappers/scanner.py @@ -0,0 +1,738 @@ +# Copyright 2014-2017 Insight Software Consortium. +# Copyright 2004-2009 Roman Yakovenko. +# Distributed under the Boost Software License, Version 1.0. +# See http://www.boost.org/LICENSE_1_0.txt + +import os +import pprint +import xml.sax +import xml.sax.handler +from .. import utils +from .. import declarations + +# XML_NN - XML Node Name +# XML_AN - XML Attribute Name +XML_AN_ABSTRACT = "abstract" +XML_AN_ACCESS = "access" +XML_AN_ALIGN = "align" +XML_AN_ARTIFICIAL = "artificial" +XML_AN_ATTACHED = "attached" +XML_AN_ATTRIBUTES = "attributes" +XML_AN_BASE_TYPE = "basetype" +XML_AN_BASES = "bases" +XML_AN_BEGIN_COLUMN = "begin_column" +XML_AN_BEGIN_LINE = "begin_line" +XML_AN_BEGIN_OFFSET = "begin_offset" +XML_AN_BITS = "bits" +XML_AN_COMMENT = "comment" +XML_AN_CONST = "const" +XML_AN_CONTEXT = "context" +XML_AN_CVS_REVISION = "cvs_revision" +XML_AN_CASTXML_FORMAT = "format" +XML_AN_DEFAULT = "default" +XML_AN_DEPRECATION = "deprecation" +XML_AN_END_COLUMN = "end_column" +XML_AN_END_LINE = "end_line" +XML_AN_END_OFFSET = "end_offset" +XML_AN_EXPLICIT = "explicit" +XML_AN_EXTERN = "extern" +XML_AN_FILE = "file" +XML_AN_ID = "id" +XML_AN_INCOMPLETE = "incomplete" +XML_AN_INIT = "init" +XML_AN_INLINE = "inline" +XML_AN_LINE = "line" +XML_AN_MANGLED = "mangled" +XML_AN_MAX = "max" +XML_AN_MEMBERS = "members" +XML_AN_MUTABLE = "mutable" +XML_AN_NAME = "name" +XML_AN_OFFSET = "offset" +XML_AN_OVERRIDES = "overrides" +XML_AN_PURE_VIRTUAL = "pure_virtual" +XML_AN_RESTRICT = "restrict" +XML_AN_RETURNS = "returns" +XML_AN_SIZE = "size" +XML_AN_STATIC = "static" +XML_AN_THROW = "throw" +XML_AN_TYPE = "type" +XML_AN_VIRTUAL = "virtual" +XML_AN_VOLATILE = "volatile" +XML_NN_ARGUMENT = "Argument" +XML_NN_ARRAY_TYPE = "ArrayType" +XML_NN_CASTING_OPERATOR = "Converter" +XML_NN_CLASS = "Class" +XML_NN_COMMENT = "Comment" +XML_NN_CONSTRUCTOR = "Constructor" +XML_NN_CV_QUALIFIED_TYPE = "CvQualifiedType" +XML_NN_DESTRUCTOR = "Destructor" +XML_NN_ELLIPSIS = "Ellipsis" +XML_NN_ENUMERATION = "Enumeration" +XML_NN_ENUMERATION_VALUE = "EnumValue" +XML_NN_FIELD = "Field" +XML_NN_FILE = "File" +XML_NN_FUNCTION = "Function" +XML_NN_FUNCTION_TYPE = "FunctionType" +XML_NN_FUNDAMENTAL_TYPE = "FundamentalType" +XML_NN_FREE_OPERATOR = "OperatorFunction" +XML_NN_GCC_XML = "GCC_XML" +XML_NN_CASTXML = "CastXML" +XML_NN_MEMBER_OPERATOR = "OperatorMethod" +XML_NN_METHOD = "Method" +XML_NN_METHOD_TYPE = "MethodType" +XML_NN_NAMESPACE = "Namespace" +XML_NN_OFFSET_TYPE = "OffsetType" +XML_NN_POINTER_TYPE = "PointerType" +XML_NN_REFERENCE_TYPE = "ReferenceType" +XML_NN_ELABORATED_TYPE = "ElaboratedType" +XML_NN_ROOT = "GCC_XML" +XML_NN_STRUCT = "Struct" +XML_NN_TYPEDEF = "Typedef" +XML_NN_UNION = "Union" +XML_NN_VARIABLE = "Variable" + + +class scanner_t(xml.sax.handler.ContentHandler): + + def __init__(self, xml_file, decl_factory, config, *args): + xml.sax.handler.ContentHandler.__init__(self, *args) + self.logger = utils.loggers.cxx_parser + self.xml_file = xml_file + self.config = config + self.__readers = { + XML_NN_FILE: self.__read_file, + XML_NN_NAMESPACE: self.__read_namespace, + XML_NN_ENUMERATION: self.__read_enumeration, + XML_NN_ENUMERATION_VALUE: self.__read_enumeration_value, + XML_NN_ARRAY_TYPE: self.__read_array_type, + XML_NN_CV_QUALIFIED_TYPE: self.__read_cv_qualified_type, + XML_NN_POINTER_TYPE: self.__read_pointer_type, + XML_NN_REFERENCE_TYPE: self.__read_reference_type, + XML_NN_ELABORATED_TYPE: self.__read_elaborated_type, + XML_NN_FUNDAMENTAL_TYPE: self.__read_fundamental_type, + XML_NN_ARGUMENT: self.__read_argument, + XML_NN_FUNCTION_TYPE: self.__read_function_type, + XML_NN_METHOD_TYPE: self.__read_method_type, + XML_NN_OFFSET_TYPE: self.__read_offset_type, + XML_NN_TYPEDEF: self.__read_typedef, + XML_NN_VARIABLE: self.__read_variable, + XML_NN_CLASS: self.__read_class, + XML_NN_STRUCT: self.__read_struct, + XML_NN_UNION: self.__read_union, + XML_NN_FIELD: self.__read_field, + XML_NN_CASTING_OPERATOR: self.__read_casting_operator, + XML_NN_COMMENT: self.__read_comment, + XML_NN_CONSTRUCTOR: self.__read_constructor, + XML_NN_DESTRUCTOR: self.__read_destructor, + XML_NN_FUNCTION: self.__read_function, + XML_NN_FREE_OPERATOR: self.__read_free_operator, + XML_NN_MEMBER_OPERATOR: self.__read_member_operator, + XML_NN_METHOD: self.__read_method, + XML_NN_GCC_XML: self.__read_version, + XML_NN_CASTXML: self.__read_version, + XML_NN_ELLIPSIS: self.__read_ellipsis} + self.deep_declarations = [ + XML_NN_CASTING_OPERATOR, + XML_NN_CONSTRUCTOR, + XML_NN_DESTRUCTOR, + XML_NN_ENUMERATION, + XML_NN_FILE, + XML_NN_COMMENT, + XML_NN_FUNCTION, + XML_NN_FREE_OPERATOR, + XML_NN_MEMBER_OPERATOR, + XML_NN_METHOD, + XML_NN_FUNCTION_TYPE, + XML_NN_METHOD_TYPE] + + assert isinstance(decl_factory, declarations.decl_factory_t) + self.__decl_factory = decl_factory + + # mapping from id -> decl + self.__declarations = {} + # list of all read declarations + self.__calldefs = [] + # list of enums I need later + self.__enums = [] + # mapping of id -> comment decl + self.__comments = {} + # mapping from id -> type + self.__types = {} + # mapping from id -> file + self.__files = {} + # mapping between decl id -> access + self.__access = {} + # mapping between file decl_id -> text + self.__files_text = {} + # current object under construction + self.__inst = None + # mapping from id to members + self.__members = {} + + self.__mangled_suffix = ' *INTERNAL* ' + self.__mangled_suffix_len = len(self.__mangled_suffix) + + # These fields are generated by clang, and have no location. + # Just set an empty location for them. + # bug #19: gp_offset, fp_offset, overflow_arg_area, reg_save_area + # bug #32: isa, flags, str and length were added in llvm 3.9 + self.__name_attrs_to_skip = [ + "gp_offset", + "fp_offset", + "overflow_arg_area", + "reg_save_area", + "isa", + "flags", + "str", + "length", + ] + + self.__xml_generator_from_xml_file = None + + @property + def xml_generator_from_xml_file(self): + """ + Configuration object containing information about the xml generator + read from the xml file. + + Returns: + utils.xml_generators: configuration object + """ + return self.__xml_generator_from_xml_file + + def read(self): + xml.sax.parse(self.xml_file, self) + + def _handle_comment(self, declaration): + comm_decl = self.__comments.get(declaration.comment) + if comm_decl: + # First acquire file_name placeholder + file_decl = comm_decl.location.file_name + # If first encounter: + # Find real name and read it into memory + if file_decl not in self.__files_text: + src_name = self.__files.get(file_decl) + with open(src_name, "r") as file: + line_list = file.readlines() + self.__files_text[file_decl] = line_list + comment_text = [] + # Capture file text for parsing + file_text = self.__files_text.get(file_decl) + # Use lines and columns to capture only comment text + for indx in range(comm_decl.begin_line - 1, comm_decl.end_line): + # Col data only different on the last line + end_idx = -1 + strt_idx = comm_decl.begin_column - 1 + if indx == comm_decl.end_line - 1: + end_idx = comm_decl.end_column + comm_line = file_text[indx] + comm_line = comm_line[ + strt_idx:end_idx + ] + # Remove newlines from end of string + comm_line = comm_line.rstrip("\n") + comment_text.append(comm_line) + comm_decl.text = comment_text + return comm_decl + else: + return declarations.comment.comment_t() + + def endDocument(self): + # updating membership + members_mapping = {} + for gccxml_id, members in self.__members.items(): + decl = self.__declarations.get(gccxml_id) + if not decl or not isinstance(decl, declarations.scopedef_t): + continue + members_mapping[id(decl)] = members + self.__members = members_mapping + for gccxml_id, decl in self.__declarations.items(): + if not isinstance(decl.comment, declarations.comment.comment_t): + decl.comment = self._handle_comment(decl) + if isinstance(decl, declarations.calldef_t) and decl.overrides: + overrides_decl = self.__declarations.get(decl.overrides) + decl.overrides = overrides_decl + + def declarations(self): + return self.__declarations + + def calldefs(self): + return self.__calldefs + + def enums(self): + return self.__enums + + def types(self): + return self.__types + + def files(self): + return self.__files + + def access(self): + return self.__access + + def members(self): + return self.__members + + def startElement(self, name, attrs): + + try: + if name not in self.__readers: + return + obj = self.__readers[name](attrs) + if not obj: + return # it means that we worked on internals + # for example EnumValue of function argument + if name in self.deep_declarations: + self.__inst = obj + self.__read_access(attrs) + element_id = attrs.get(XML_AN_ID) + + # With CastXML and clang some __va_list_tag declarations are + # present in the tree: we do not want to have these in the tree. + # With llvm 3.9 there is a __NSConstantString(_tag) in the tree + # We hide these declarations by default + rm1 = "f1" not in self.config.flags + names = [ + "__va_list_tag", + "__NSConstantString_tag", + "__NSConstantString"] + + if isinstance(obj, declarations.declaration_t): + + if rm1 and str(obj.name) in names: + return + + self.__update_membership(attrs) + self.__declarations[element_id] = obj + if not isinstance(obj, declarations.namespace_t): + self.__read_location(obj, attrs, self.__name_attrs_to_skip) + if isinstance(obj, declarations.class_t): + self.__read_bases(obj, attrs) + self.__read_artificial(obj, attrs) + self.__read_deprecation(obj, attrs) + self.__read_mangled(obj, attrs) + self.__read_attributes(obj, attrs) + + elif isinstance(obj, declarations.type_t): + + self.__types[element_id] = obj + self.__read_byte_size(obj, attrs) + self.__read_byte_align(obj, attrs) + + elif isinstance(obj, declarations.comment.comment_t): + self.__comments[element_id] = obj + self.__update_membership(attrs) + self.__read_attributes(obj, attrs) + + elif utils.is_str(obj): + + self.__files[element_id] = os.path.normpath(obj) + + else: + self.logger.warning( + 'Unknown object type has been found.' + + ' Please report this bug to pygccxml development team.') + except Exception as error: + msg = ( + 'error occured, while parsing element with name "%s" ' + + 'and attrs "%s".') + msg = msg + os.linesep + 'Error: %s.' % str(error) + self.logger.error(msg, name, pprint.pformat(list(attrs.keys()))) + raise + + def endElement(self, name): + if name in self.deep_declarations: + self.__inst = None + + @staticmethod + def __read_location(decl, attrs, to_skip): + if "name" in attrs and attrs["name"] in to_skip: + decl.location = declarations.location_t('', -1) + else: + if XML_AN_BEGIN_LINE in attrs: + line_number = attrs[XML_AN_BEGIN_LINE] + else: + try: + line_number = attrs[XML_AN_LINE] + except Exception as e: + print(e) + return + + decl.location = declarations.location_t( + file_name=attrs[XML_AN_FILE], + line=int(line_number)) + + def __update_membership(self, attrs): + parent = attrs.get(XML_AN_CONTEXT) + if not parent: + return + if parent not in self.__members: + self.__members[parent] = [] + self.__members[parent].append(attrs[XML_AN_ID]) + + @staticmethod + def __read_members(decl, attrs): + decl.declarations = attrs.get(XML_AN_MEMBERS, "") + + @staticmethod + def __read_bases(decl, attrs): + decl.bases = attrs.get(XML_AN_BASES, "") + + @staticmethod + def __read_artificial(decl, attrs): + decl.is_artificial = attrs.get(XML_AN_ARTIFICIAL, False) + + def __read_mangled(self, decl, attrs): + mangled = attrs.get(XML_AN_MANGLED) + # the following patch is defined here for performance reasons + if isinstance(mangled, bytes) and \ + mangled.endswith(self.__mangled_suffix): + mangled = mangled[:self.__mangled_suffix_len] + decl.mangled = mangled + + def __read_deprecation(self, decl, attrs): + deprecation = attrs.get(XML_AN_DEPRECATION) + # the following patch is defined here for performance reasons + if isinstance(deprecation, str): + decl.deprecation = deprecation + + def __read_attributes(self, decl, attrs): + attribute = attrs.get(XML_AN_ATTRIBUTES) + if attribute is not None and \ + self.config.compiler == "msvc" and \ + "f2" not in self.config.flags: + if attribute == "__thiscall__": + return + if "__thiscall__" in attribute: + attribute = attribute.replace("__thiscall__ ", "") + decl.attributes = attribute + + def __read_access(self, attrs): + self.__access[attrs[XML_AN_ID]] = \ + attrs.get(XML_AN_ACCESS, declarations.ACCESS_TYPES.PUBLIC) + + @staticmethod + def __read_byte_size(decl, attrs): + """Using duck typing to set the size instead of in constructor""" + size = attrs.get(XML_AN_SIZE, 0) + # Make sure the size is in bytes instead of bits + decl.byte_size = int(size) / 8 + + @staticmethod + def __read_byte_offset(decl, attrs): + """Using duck typing to set the offset instead of in constructor""" + offset = attrs.get(XML_AN_OFFSET, 0) + # Make sure the size is in bytes instead of bits + decl.byte_offset = int(offset) / 8 + + @staticmethod + def __read_byte_align(decl, attrs): + """Using duck typing to set the alignment""" + align = attrs.get(XML_AN_ALIGN, 0) + # Make sure the size is in bytes instead of bits + decl.byte_align = int(align) / 8 + + def __read_root(self, attrs): + pass + + @staticmethod + def __read_file(attrs): + return attrs.get(XML_AN_NAME, '') + + def __read_namespace(self, attrs): + ns_name = attrs.get(XML_AN_NAME, '') + if '.' in ns_name: + # if '.' in namespace then this is mangled namespace + # -> in c++ namespace{...} + # that is almost true: gcc mangale name using top file name. + # almost all files has '.' in name + ns_name = '' + decl = self.__decl_factory.create_namespace(name=ns_name) + if attrs.get(XML_AN_COMMENT) is not None: + decl.comment = attrs.get(XML_AN_COMMENT) + return decl + + def __read_enumeration(self, attrs): + enum_name = attrs.get(XML_AN_NAME, '') + if '$_' in enum_name or '._' in enum_name: + # it means that this is unnamed enum. in c++ enum{ x }; + enum_name = '' + decl = self.__decl_factory.create_enumeration(name=enum_name) + if attrs.get(XML_AN_COMMENT) is not None: + decl.comment = attrs.get(XML_AN_COMMENT) + self.__read_byte_size(decl, attrs) + self.__read_byte_align(decl, attrs) + self.__enums.append(decl) + return decl + + def __read_enumeration_value(self, attrs): + name = attrs.get(XML_AN_NAME, '') + num = int(attrs[XML_AN_INIT]) + self.__inst.append_value(name, num) + + @staticmethod + def __guess_int_value(value_as_str): + # returns instance of int or None + # if gcc compiled the code, than it is correct! + numeric_suffix_letters = 'UuLlFf' + for s in numeric_suffix_letters: + value_as_str = value_as_str.replace(s, '') + try: + return int(value_as_str) + except ValueError: + try: + return int(value_as_str, 16) + except ValueError: + return None + + def __read_array_type(self, attrs): + type_ = attrs[XML_AN_TYPE] + size = self.__guess_int_value(attrs.get(XML_AN_MAX, '')) + if size is None: + size = declarations.array_t.SIZE_UNKNOWN + # The following warning is pretty useless, as it cant say what the + # problematic declaration is. + # msg = 'unable to find out array size from expression + # "%s"' % attrs[ XML_AN_MAX ] + # warnings.warn( msg ) + return declarations.array_t(type_, size + 1) + + @staticmethod + def __read_cv_qualified_type(attrs): + if XML_AN_CONST in attrs and XML_AN_VOLATILE in attrs: + return declarations.volatile_t( + declarations.const_t(attrs[XML_AN_TYPE])) + elif XML_AN_CONST in attrs: + return declarations.const_t(attrs[XML_AN_TYPE]) + elif XML_AN_VOLATILE in attrs: + return declarations.volatile_t(attrs[XML_AN_TYPE]) + elif XML_AN_RESTRICT in attrs: + return declarations.restrict_t(attrs[XML_AN_TYPE]) + else: + assert 0 + + @staticmethod + def __read_pointer_type(attrs): + return declarations.pointer_t(attrs[XML_AN_TYPE]) + + @staticmethod + def __read_reference_type(attrs): + return declarations.reference_t(attrs[XML_AN_TYPE]) + + @staticmethod + def __read_elaborated_type(attrs): + return declarations.elaborated_t(attrs[XML_AN_TYPE]) + + @staticmethod + def __read_fundamental_type(attrs): + try: + return declarations.FUNDAMENTAL_TYPES[attrs.get(XML_AN_NAME, '')] + except KeyError: + return None + # This code chokes on atomic_int_type in Boost 1.54 + # (and higher, probably). + # It seems ok to just silently ignore this error. + # raise RuntimeError(( + # "pygccxml error: unable to find fundamental type with " + + # "name '%s'.") % attrs.get( XML_AN_NAME, '' ) ) + + def __read_offset_type(self, attrs): + base = attrs[XML_AN_BASE_TYPE] + type_ = attrs[XML_AN_TYPE] + return declarations.pointer_t( + declarations.member_variable_type_t( + class_inst=base, + variable_type=type_)) + + def __read_argument(self, attrs): + if isinstance(self.__inst, declarations.calldef_type_t): + self.__inst.arguments_types.append(attrs[XML_AN_TYPE]) + else: + argument = declarations.argument_t() + argument.name = attrs.get( + XML_AN_NAME, + 'arg%d' % len( + self.__inst.arguments)) + argument.decl_type = attrs[XML_AN_TYPE] + argument.default_value = attrs.get(XML_AN_DEFAULT) + self.__read_attributes(argument, attrs) + self.__inst.arguments.append(argument) + + def __read_ellipsis(self, attrs): + if isinstance(self.__inst, declarations.calldef_type_t): + self.__inst.arguments_types.append('...') + else: + argument = declarations.argument_t(decl_type='...') + self.__inst.arguments.append(argument) + + def __read_calldef(self, calldef, attrs, is_declaration): + # destructor for example doesn't have return type + calldef.return_type = attrs.get(XML_AN_RETURNS) + if is_declaration: + self.__calldefs.append(calldef) + calldef.name = attrs.get(XML_AN_NAME, '') + calldef.has_extern = attrs.get(XML_AN_EXTERN, False) + calldef.has_inline = bool(attrs.get(XML_AN_INLINE, "") == "1") + throw_stmt = attrs.get(XML_AN_THROW) + if None is throw_stmt: + calldef.does_throw = True + calldef.exceptions = [] + elif throw_stmt == "": + calldef.does_throw = False + calldef.exceptions = [] + else: + calldef.does_throw = True + calldef.exceptions = throw_stmt.split() + if attrs.get(XML_AN_COMMENT) is not None: + calldef.comment = attrs.get(XML_AN_COMMENT) + + def __read_member_function(self, calldef, attrs, is_declaration): + self.__read_calldef(calldef, attrs, is_declaration) + calldef.has_const = attrs.get(XML_AN_CONST, False) + if is_declaration: + calldef.has_static = attrs.get(XML_AN_STATIC, False) + if XML_AN_PURE_VIRTUAL in attrs: + calldef.virtuality = declarations.VIRTUALITY_TYPES.PURE_VIRTUAL + elif XML_AN_VIRTUAL in attrs: + calldef.virtuality = declarations.VIRTUALITY_TYPES.VIRTUAL + else: + calldef.virtuality = declarations.VIRTUALITY_TYPES.NOT_VIRTUAL + if XML_AN_OVERRIDES in attrs: + calldef.overrides = attrs.get(XML_AN_OVERRIDES) + else: + calldef.class_inst = attrs[XML_AN_BASE_TYPE] + + def __read_function_type(self, attrs): + answer = declarations.free_function_type_t() + self.__read_calldef(answer, attrs, False) + return answer + + def __read_method_type(self, attrs): + answer = declarations.member_function_type_t() + self.__read_member_function(answer, attrs, False) + return answer + + def __read_typedef(self, attrs): + return self.__decl_factory.create_typedef( + name=attrs.get( + XML_AN_NAME, + ''), + decl_type=attrs[XML_AN_TYPE]) + + def __read_variable(self, attrs): + type_qualifiers = declarations.type_qualifiers_t() + type_qualifiers.has_mutable = attrs.get(XML_AN_MUTABLE, False) + type_qualifiers.has_static = attrs.get(XML_AN_STATIC, False) + type_qualifiers.has_extern = attrs.get(XML_AN_EXTERN, False) + bits = attrs.get(XML_AN_BITS) + if bits: + bits = int(bits) + decl = self.__decl_factory.create_variable( + name=attrs.get( + XML_AN_NAME, + ''), + decl_type=attrs[XML_AN_TYPE], + type_qualifiers=type_qualifiers, + value=attrs.get( + XML_AN_INIT), + bits=bits) + self.__read_byte_offset(decl, attrs) + if attrs.get(XML_AN_COMMENT) is not None: + decl.comment = attrs.get(XML_AN_COMMENT) + return decl + + __read_field = __read_variable # just a synonym + + def __read_class_impl(self, class_type, attrs): + name = attrs.get(XML_AN_NAME, '') + if '$' in name or '.' in name: + name = '' + if XML_AN_INCOMPLETE in attrs: + decl = self.__decl_factory.create_class_declaration(name=name) + else: + decl = self.__decl_factory.create_class( + name=name, + class_type=class_type) + decl.is_abstract = bool(attrs.get(XML_AN_ABSTRACT, False)) + self.__read_byte_size(decl, attrs) + self.__read_byte_align(decl, attrs) + if attrs.get(XML_AN_COMMENT) is not None: + decl.comment = attrs.get(XML_AN_COMMENT) + return decl + + def __read_class(self, attrs): + return self.__read_class_impl(declarations.CLASS_TYPES.CLASS, attrs) + + def __read_struct(self, attrs): + return self.__read_class_impl(declarations.CLASS_TYPES.STRUCT, attrs) + + def __read_union(self, attrs): + return self.__read_class_impl(declarations.CLASS_TYPES.UNION, attrs) + + def __read_casting_operator(self, attrs): + operator = self.__decl_factory.create_casting_operator() + self.__read_member_function(operator, attrs, True) + return operator + + def __read_comment(self, attrs): + comment = self.__decl_factory.create_comment() + comment.begin_line = int(attrs.get(XML_AN_BEGIN_LINE)) + comment.end_line = int(attrs.get(XML_AN_END_LINE)) + comment.begin_offset = int(attrs.get(XML_AN_BEGIN_OFFSET)) + comment.end_offset = int(attrs.get(XML_AN_END_OFFSET)) + comment.begin_column = int(attrs.get(XML_AN_BEGIN_COLUMN)) + comment.end_column = int(attrs.get(XML_AN_END_COLUMN)) + self.__read_location(comment, attrs, self.__name_attrs_to_skip) + return comment + + def __read_constructor(self, attrs): + constructor = self.__decl_factory.create_constructor() + self.__read_member_function(constructor, attrs, True) + constructor.explicit = attrs.get(XML_AN_EXPLICIT, False) + return constructor + + def __read_function(self, attrs): + gfunction = self.__decl_factory.create_free_function() + self.__read_calldef(gfunction, attrs, True) + return gfunction + + def __read_method(self, attrs): + mfunction = self.__decl_factory.create_member_function() + self.__read_member_function(mfunction, attrs, True) + return mfunction + + def __read_destructor(self, attrs): + destructor = self.__decl_factory.create_destructor() + self.__read_member_function(destructor, attrs, True) + destructor.name = '~' + destructor.name + return destructor + + def __read_free_operator(self, attrs): + operator = self.__decl_factory.create_free_operator() + self.__read_member_function(operator, attrs, True) + self.__update_operator_name(operator) + return operator + + def __read_member_operator(self, attrs): + operator = self.__decl_factory.create_member_operator() + self.__read_member_function(operator, attrs, True) + self.__update_operator_name(operator) + return operator + + def __read_version(self, attrs): + castxml_format = attrs.get(XML_AN_CASTXML_FORMAT) + gccxml_cvs_revision = None + if castxml_format is None: + gccxml_cvs_revision = attrs.get(XML_AN_CVS_REVISION) + xml_generator = utils.xml_generators( + utils.loggers.cxx_parser, gccxml_cvs_revision, castxml_format) + utils.xml_output_version = gccxml_cvs_revision + self.__xml_generator_from_xml_file = xml_generator + + @staticmethod + def __update_operator_name(operator): + space = "" + if "new" in operator.name or "delete" in operator.name: + space = " " + operator.name = "operator" + space + operator.name diff --git a/docker/sire-generate-wrappers/unpack_headers b/docker/sire-generate-wrappers/unpack_headers new file mode 100755 index 000000000..a3200102e --- /dev/null +++ b/docker/sire-generate-wrappers/unpack_headers @@ -0,0 +1,14 @@ +#!/bin/bash + +cd $HOME + +echo "Unpacking headers" + +if [[ -f "/opt/conda/includes.tar.bz2" ]] +then + echo "Extracting headers for Sire dependencies" + cd /opt/conda && \ + tar -jxvf includes.tar.bz2 && \ + rm includes.tar.bz2 && \ + cd $HOME +fi diff --git a/recipes/fkcombu/LICENSE b/recipes/fkcombu/LICENSE deleted file mode 100644 index 529b0dab5..000000000 --- a/recipes/fkcombu/LICENSE +++ /dev/null @@ -1,24 +0,0 @@ -Copyright (c) 2018, Takeshi Kawabata -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: -* Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -* Neither the name of the Institute for Protein Research, Osaka University - nor the names of its contributors may be used to endorse or promote products - derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL Takeshi Kawabata BE LIABLE FOR ANY -DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/recipes/fkcombu/build.sh b/recipes/fkcombu/build.sh deleted file mode 100644 index 2c09cb50d..000000000 --- a/recipes/fkcombu/build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -if [ "$(uname)" == "Linux" ]; then - # Update the C compiler on Linux. - sed -i "s#gcc#$CC#g" Makefile.fkcombu -else - # Ignore implicit function declaration errors on macOS. - sed -i.bak -e "s#Wall#Wno-implicit-function-declaration#g" Makefile.fkcombu -fi - -# Build FKCOMBU. -make -f Makefile.fkcombu - -# Copy the FKCOMBU executable to the bin directory. -mkdir ${PREFIX}/bin -cp -a ../fkcombu ${PREFIX}/bin diff --git a/recipes/fkcombu/meta.yaml b/recipes/fkcombu/meta.yaml deleted file mode 100644 index dc6dc1890..000000000 --- a/recipes/fkcombu/meta.yaml +++ /dev/null @@ -1,35 +0,0 @@ -{% set name = "fkcombu" %} -{% set version = "2020.04.14" %} - -package: - name: {{ name }} - version: {{ version }} - -source: - url: https://pdbj.org/kcombu/cgi-bin/dwnld_src_file.cgi?filename=kcombu-src-20200414.tar.gz - sha256: 2394029273667260817ff14ff0ed9e38cd3fd9f0756a48456c55a53c47a39d75 - -build: - number: 0 - -requirements: - build: - - {{ compiler('c') }} - - make - -test: - commands: - - test -f $PREFIX/bin/fkcombu - -about: - home: https://pdbj.org/kcombu/doc/README_fkcombu.html - license: BSD-3-Clause - license_file: '{{ environ["RECIPE_DIR"] }}/LICENSE' - summary: A tool for flexible transformation of a target molecule onto a reference molecule. - dev_url: https://pdbj.org/kcombu/doc/README_fkcombu.html - doc_url: https://pdbj.org/kcombu/doc/README_fkcombu.html - description: A tool for flexible transformation of a target molecule onto a reference molecule. - -extra: - recipe-maintainers: - - lohedges diff --git a/recipes/libcpuid/LICENSE b/recipes/libcpuid/LICENSE deleted file mode 100644 index 57c8443fd..000000000 --- a/recipes/libcpuid/LICENSE +++ /dev/null @@ -1,23 +0,0 @@ -opyright 2008 Veselin Georgiev, -anrieffNOSPAM @ mgail_DOT.com (convert to gmail) - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR -IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. -IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT -NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF -THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/recipes/libcpuid/bld.bat b/recipes/libcpuid/bld.bat deleted file mode 100644 index 6b389bbd8..000000000 --- a/recipes/libcpuid/bld.bat +++ /dev/null @@ -1,14 +0,0 @@ -setlocal EnableDelayedExpansion - -mkdir build -cd build - -cmake -GNinja ^ - -D CMAKE_INSTALL_PREFIX:PATH="%LIBRARY_PREFIX%" ^ - -D CMAKE_PREFIX_PATH:PATH="%LIBRARY_PREFIX%" ^ - -D CMAKE_BUILD_TYPE:STRING=Release ^ - .. -if errorlevel 1 exit 1 - -ninja install -if errorlevel 1 exit 1 diff --git a/recipes/libcpuid/build.sh b/recipes/libcpuid/build.sh deleted file mode 100644 index e67047678..000000000 --- a/recipes/libcpuid/build.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env bash - -set -ex - -mkdir build -cd build - -cmake ${CMAKE_ARGS} \ - -DCMAKE_BUILD_TYPE:STRING=Release \ - -GNinja \ - .. - -cmake --build . - -cmake --install . diff --git a/recipes/libcpuid/meta.yaml b/recipes/libcpuid/meta.yaml deleted file mode 100644 index 5d161ac2b..000000000 --- a/recipes/libcpuid/meta.yaml +++ /dev/null @@ -1,39 +0,0 @@ -{% set name = "libcpuid" %} -{% set version = "0.5.1" %} - -package: - name: {{ name }} - version: {{ version }} - -source: - url: https://github.com/anrieff/{{ name }}/archive/v{{ version }}.tar.gz - sha256: 36d62842ef43c749c0ba82237b10ede05b298d79a0e39ef5fd1115ba1ff8e126 - -build: - number: 0 - run_exports: - - {{ pin_subpackage("libcpuid", exact=True) }} - -requirements: - build: - - {{ compiler('c') }} - - {{ compiler('cxx') }} - - cmake - - ninja - -test: - commands: - - test -f $PREFIX/lib/libcpuid$SHLIB_EXT # [unix] - -about: - home: http://libcpuid.sourceforge.net - license: BSD-2-Clause - license_file: '{{ environ["RECIPE_DIR"] }}/LICENSE' - summary: A small C library for x86 CPU detection and feature extraction. - dev_url: https://github.com/anrieff/libcpuid - doc_url: http://libcpuid.sourceforge.net/doxy - description: A small C library for x86 CPU detection and feature extraction. - -extra: - recipe-maintainers: - - lohedges diff --git a/recipes/sire/bld.bat b/recipes/sire/bld.bat new file mode 100644 index 000000000..bf8184a65 --- /dev/null +++ b/recipes/sire/bld.bat @@ -0,0 +1 @@ +python setup.py install --skip-deps diff --git a/recipes/sire/build.sh b/recipes/sire/build.sh index a58da8772..61ae33381 100644 --- a/recipes/sire/build.sh +++ b/recipes/sire/build.sh @@ -2,31 +2,5 @@ # Build script for Sire conda-forge package. -set -ex +python setup.py install --skip-deps -# Make the build directories. -mkdir -p build/corelib -mkdir -p build/wrapper - -# Build and install the core library. -cd build/corelib -cmake ${CMAKE_ARGS} \ - -D ANACONDA_BUILD=ON \ - -D ANACONDA_BASE=${PREFIX} \ - -D BUILD_NCORES=$CPU_COUNT \ - -D SIRE_DISABLE_AVX=ON \ - -D SIRE_DISABLE_AVX512F=ON \ - ../../corelib -cmake --build . --target install -- VERBOSE=1 -j$CPU_COUNT - -# Build and install the Python wrappers. -cd ../wrapper -cmake ${CMAKE_ARGS} \ - -D ANACONDA_BUILD=ON \ - -D ANACONDA_BASE=${PREFIX} \ - -D BUILD_NCORES=$CPU_COUNT \ - ../../wrapper -cmake --build . --target install -- VERBOSE=1 -j$CPU_COUNT - -# Remove the redundant files in the pkgs directory. -rm -r ${PREFIX}/pkgs/sire-* diff --git a/recipes/sire/template.yaml b/recipes/sire/template.yaml index 1ccc1e2c6..c51dfc631 100644 --- a/recipes/sire/template.yaml +++ b/recipes/sire/template.yaml @@ -2,96 +2,57 @@ package: name: {{ name }} - version: SIRE_VERSION + version: {{ GIT_DESCRIBE_TAG }} source: git_url: https://github.com/michellab/Sire.git git_tag: SIRE_BRANCH - patches: conda_build.patch build: - number: SIRE_BUILD - skip: true # [win] + number: {{ GIT_DESCRIBE_NUMBER }} requirements: build: - {{ compiler('c') }} - {{ compiler('cxx') }} - - cmake - - git - - make - - sysroot_linux-64 2.17 # [linux] + SIRE_BUILD_REQUIREMENTS host: - - boost - - gsl - - libcblas - - libcpuid - - libnetcdf - - openmm - python - - qt - - tbb-devel - - tbb -# Add BioSimSpace run dependencies so Sire dependencies -# are resolved in a compatible way. - - configargparse - - fkcombu - - lomap2 - - mdtraj - - mdanalysis - - nglview - - openff-toolkit-base - - parmed - - py3dmol - - pydot - - pygtail - - pypdb - - pytest - - pyyaml - - rdkit - - watchdog + SIRE_RUN_REQUIREMENTS + SIRE_BSS_REQUIREMENTS run: - - boost - - gsl - - libcblas - - libcpuid - - libnetcdf - - openmm - - pymbar - - pyqt - python - - qt + SIRE_RUN_REQUIREMENTS test: script_env: - SIRE_DONT_PHONEHOME - - SIRE_SILENT_PHONEHOME requires: - - git - - nose - pytest imports: - - Sire - - Sire.Analysis - - Sire.Base - - Sire.CAS - - Sire.Cluster - - Sire.Error - - Sire.FF - - Sire.ID - - Sire.IO - - Sire.Maths - - Sire.MM - - Sire.Mol - - Sire.Move - - Sire.Qt - - Sire.Squire - - Sire.Stream - - Sire.System - - Sire.Units - - Sire.Vol + - sire + - sire.analysis + - sire.base + - sire.cas + - sire.cluster + - sire.error + - sire.ff + - sire.id + - sire.io + - sire.maths + - sire.mm + - sire.mol + - sire.move + - sire.qt + - sire.squire + - sire.stream + - sire.system + - sire.units + - sire.vol + source_files: + - tests commands: - - sire_test + - pytest tests about: home: https://github.com/michellab/Sire diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 000000000..9e0425cdd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,10 @@ +boost +gsl +lazy_import +libcblas +libnetcdf +openmm +pymbar<4 +qt +tbb +tbb-devel diff --git a/requirements_bss.txt b/requirements_bss.txt new file mode 100644 index 000000000..e88897a62 --- /dev/null +++ b/requirements_bss.txt @@ -0,0 +1,15 @@ +configargparse +kcombu_bss +lomap2 +mdtraj +mdanalysis +nglview +openff-toolkit-base +parmed +py3dmol +pydot +pygtail +pypdb +pyyaml +rdkit +watchdog diff --git a/requirements_build.txt b/requirements_build.txt new file mode 100644 index 000000000..c69d97044 --- /dev/null +++ b/requirements_build.txt @@ -0,0 +1,11 @@ +cmake +git + +make ; sys_platform == "darwin" +libtool ; sys_platform == "darwin" + +make ; sys_platform == "linux" +libtool ; sys_platform == "linux" +sysroot_linux-64==2.17 ; sys_platform == "linux" + +cmake diff --git a/setup.py b/setup.py new file mode 100644 index 000000000..5b0055a92 --- /dev/null +++ b/setup.py @@ -0,0 +1,729 @@ +""" +Installation script for Sire + +This assumes that the python that is used to execute this script +is the conda / miniconda / miniforge environment into +which you want to install Sire. + +USAGE: + + python setup.py install_requires : Will install all of the dependencies + + python setup.py build : Will install requires and will then + compile sire (takes a long time!) + + python setup.py install : Will build sire and will then install + + python setup.py install_module : Will only install the Python module + +You can use `--skip-deps` to skip the installation of the conda dependencies +You can use `--skip-build` to skip the building of the corelib and wrappers +""" + +import sys +import os +import platform +import subprocess +import shutil +import glob + +# Debug - we need to print out all of the environment variables +# for key, value in os.environ.items(): +# print(f"{key}\n{value}\n") + +# We can only run this script from the sire directory +curdir = os.path.abspath(".") + +if os.path.abspath(os.path.dirname(sys.argv[0])) != curdir: + print("You can only run this script from the sire directory") + sys.exit(-1) + +# We need to import the 'parse_requirements' function to get the list +# of requirements +sys.path.insert(0, os.path.join(curdir, "actions")) +from parse_requirements import parse_requirements + +# Next we need to verify that this is a Python that is part of a +# conda installation + +# Find the path to the conda or mamba executable +conda_base = os.path.abspath(os.path.dirname(sys.executable)) + +if os.path.basename(conda_base) == "bin": + conda_base = os.path.dirname(conda_base) + +python_exe = None +conda = None + +if "CONDA_EXE" in os.environ: + conda = os.environ["CONDA_EXE"] +else: + conda = None + +if "CONDA_DEFAULT_ENV" in os.environ: + conda_env = os.environ["CONDA_DEFAULT_ENV"] +else: + conda_env = None + +if os.path.exists(os.path.join(conda_base, "python.exe")): + # Windows + conda_bin = os.path.join(conda_base, "Library", "bin") + python_exe = os.path.join(conda_base, "python.exe") + + if conda is None: + conda = os.path.join(conda_base, "Scripts", "conda.exe") +elif os.path.exists(os.path.join(conda_base, "bin", "python")): + # MacOS and Linux + conda_bin = os.path.join(conda_base, "bin") + python_exe = os.path.join(conda_bin, "python") + + if conda is None: + conda = os.path.join(conda_bin, "conda") +else: + print("Cannot find a 'python' binary in directory '%s'. " + "Are you running this script using the python executable " + "from a valid miniconda or anaconda installation?" % conda_base) + sys.exit(-1) + + +def find_mamba(): + """Find mamba""" + if conda.endswith(".exe"): + m = os.path.join(os.path.dirname(conda), "mamba.exe") + else: + m = os.path.join(os.path.dirname(conda), "mamba") + + if os.path.exists(m): + return m + else: + return None + + +mamba = find_mamba() + +# Get the build operating system and processor +is_linux = False +is_windows = False +is_macos = False +platform_name = platform.system() +machine = platform.machine() + +if machine in ["aarch64", "arm64"]: + machine = "arm64" +elif machine in ["x86_64", "AMD64"]: + machine = "x86_64" +else: + print(f"Unrecognised architecture ({machine}). Compile at your own risk.") + +exe_suffix = "" +if platform_name == "Linux": + platform_name = "linux" + is_linux = True +elif platform_name == "Darwin": + platform_name = "macos" + is_macos = True +elif platform_name == "Windows": + platform_name = "windows" + exe_suffix = ".exe" + is_windows = True +else: + print("Unrecognised build platform: %s" % platform_name) + print("We cannot compile sire.") + sys.exit(-1) + +platform_string = f"{platform_name}_{machine}" + + +def parse_args(): + import argparse + import multiprocessing + parser=argparse.ArgumentParser() + + ncores = multiprocessing.cpu_count() + + if ncores % 2 == 0: + npycores = int(ncores / 2) + else: + npycores = int((ncores + 1) / 2) + + parser.add_argument("-C", "--corelib", action="append", nargs=1, + metavar=("PARAMETER=VALUE",), default=[], + help="pass CMake definitions for corelib") + parser.add_argument("-W", "--wrapper", action="append", nargs=1, + metavar=("PARAMETER=VALUE",), default=[], + help="pass CMake definitions for wrapper") + parser.add_argument("-G", "--generator", action="append", nargs=1, + metavar=("GENERATOR",), default=[], + help="pass CMake generator") + parser.add_argument("-n", "--ncores", action="store", type=int, nargs=1, + metavar=("N_CORES",), default=[ncores], + help="Number of CPU cores used for compiling corelib " + "(defaults to all available on the current system)") + parser.add_argument("-N", "--npycores", action="store", type=int, nargs=1, + metavar=("N_PYTHON_CORES",), default=[npycores], + help="Number of CPU cores used for compiling Python wrappers " + "(defaults to the number of CPU cores used for compiling corelib)") + parser.add_argument("--install-bss-deps", action="store_true", default=False, + help="Install BioSimSpace's dependencies too. This helps ensure " + "compatibility between Sire's and BioSimSpace's dependencies.") + parser.add_argument("--skip-deps", action="store_true", default=False, + help="Skip the installation of the dependencies (only use if you know " + "that they are already installed)") + parser.add_argument("--skip-build", action="store_true", default=False, + help="Skip the build of the C++ code (only use if you know that " + "the C++ code is already built)") + parser.add_argument("action", nargs="*", + help="Should be one of 'install_requires', 'build', 'install' or 'install_module'.\n" + "\n [install_requires] : Just install the conda dependencies.\n" + " [build] : 'install_requires' plus compile and install corelib, and just compile the wrappers.\n" + " [install] : 'build' plus install the wrappers and install the module.\n" + " [install_module] : Just install the module (no compilation or conda dependencies)." + ) + return parser.parse_args() + + +_installed_deps = None + +def _get_installed(conda: str): + """Return the list of installed conda dependencies""" + global _installed_deps + + if _installed_deps is None: + p = subprocess.Popen([conda, "list"], stdout=subprocess.PIPE) + _installed_deps = str(p.stdout.read()) + + return _installed_deps + + +def is_installed(dep: str, conda: str) -> bool: + """Return whether or not the passed dependency is installed""" + installed = _get_installed(conda=conda) + return installed.find(dep) != -1 + + +def _add_to_dependencies(dependencies, lines): + import re + + for line in lines: + line = line.lstrip().rstrip() + + words = re.split("[<>]*=", line) + + if len(words) > 0: + package = words[0] + dependencies[package] = line + + +_is_conda_prepped = False + +def conda_install(dependencies, install_bss_reqs=False): + """Install the passed list of dependencies using conda""" + + conda_exe = conda + + global _is_conda_prepped + + if not _is_conda_prepped: + if install_bss_reqs: + cmd = "%s config --prepend channels michellab/label/dev" % conda_exe + print("Activating michellab channel channel using: '%s'" % cmd) + status = subprocess.run(cmd.split()) + if status.returncode != 0: + print("Failed to add michellab channel!") + sys.exit(-1) + + print("\nSetting channel priorities to favour conda-forge") + cmd = "%s config --prepend channels conda-forge" % conda_exe + print("Activating conda-forge channel using: '%s'" % cmd) + status = subprocess.run(cmd.split()) + if status.returncode != 0: + print("Failed to add conda-forge channel!") + sys.exit(-1) + + cmd = "%s config --set channel_priority strict" % conda_exe + print("Setting channel priority to strict using: '%s'" % cmd) + status = subprocess.run(cmd.split()) + if status.returncode != 0: + print("Failed to set channel priority!") + sys.exit(-1) + + _is_conda_prepped = True + + if mamba is None: + conda_install = [conda, "install", "--yes"] + else: + conda_install = [mamba, "install", "--yes"] + + cmd = [*conda_install, *dependencies] + print("\nInstalling packages using: '%s'" % " ".join(cmd)) + status = subprocess.run(cmd) + + if status.returncode != 0: + if mamba is not None: + # try with conda, as mamba was broken? + conda_install = [conda, "install", "--yes"] + cmd = [*conda_install, *dependencies] + print("\nTrying again using: '%s'" % " ".join(cmd)) + status = subprocess.run(cmd) + + if status.returncode != 0: + print("Something went wrong installing dependencies!") + sys.exit(-1) + + +def install_requires(install_bss_reqs=False): + """Installs all of the dependencies. This can safely be called + multiple times, as it will cache the result to prevent future + installs taking too long + """ + print(f"Installing requirements for {platform_string}") + + if not os.path.exists(conda): + print("\nSire can only be installed into a conda or miniconda environment.") + print("Please install conda, miniconda, miniforge or similar, then " + "activate the conda environment, then rerun this installation " + "script.") + sys.exit(-1) + + reqs = parse_requirements("requirements.txt") + build_reqs = parse_requirements("requirements_build.txt") + + if install_bss_reqs: + bss_reqs = parse_requirements("requirements_bss.txt") + reqs = reqs + bss_reqs + + print("\nUsing dependencies:") + dependencies = build_reqs + reqs + + for dep in dependencies: + print(dep) + + global mamba + + if mamba is None: + # install mamba first! + conda_install(["mamba"]) + mamba = find_mamba() + + conda_install(dependencies, install_bss_reqs) + + +def add_default_cmake_defs(cmake_defs, ncores): + for a in ("ANACONDA_BASE=%s" % conda_base.replace("\\", "/"), + "BUILD_NCORES=%s" % ncores): + found = False + for d in cmake_defs: + if (a in d[0]): + found = True + break + if (not found): + cmake_defs.append([a]) + + if is_macos: + # don't compile with AVX as the resulting binaries won't + # work on M1 macs + cmake_defs.append(["SIRE_DISABLE_AVX=ON"]) + cmake_defs.append(["SIRE_DISABLE_AVX512F=ON"]) + + +def make_cmd(ncores, install = False): + if is_windows: + action = "INSTALL" if install else "ALL_BUILD" + make_args = "%s -- /m:%s /p:Configuration=Release /p:Platform=x64" % (action, ncores) + else: + action = "install" if install else "all" + make_args = "%s -- VERBOSE=1 -j %s" % (action, ncores) + + return make_args.split() + + +def _get_build_ext(): + if "CONDA_BUILD" in os.environ and os.environ["CONDA_BUILD"] == "1": + return "conda_build" + else: + if conda_env is not None: + ext = "_" + conda_env.replace(" ", "_").replace(".", "_") + else: + ext = "" + + return os.path.basename(conda_base.replace(" ", "_").replace(".", "_")) + ext + + +def _get_bin_dir(): + if "CONDA_BUILD" in os.environ and os.environ["CONDA_BUILD"] == "1": + bindir = os.environ["BUILD_PREFIX"] + + if is_windows: + return os.path.join(bindir, "Library", "bin") + else: + return os.path.join(bindir, "bin") + else: + return conda_bin + + +def build(ncores: int = 1, npycores: int = 1, + coredefs=[], pydefs=[]): + print("\nCompiling the C++ code") + + CC=None + CXX=None + + cmake = "cmake" + + if is_windows: + cmake = f"{cmake}.exe" + + bindir = _get_bin_dir() + cmake = os.path.join(bindir, cmake) + + if "CONDA_BUILD" in os.environ and os.environ["CONDA_BUILD"] == "1": + conda_build = True + else: + os.environ["CONDA_BUILD"] = "0" + conda_build = False + + # get the compilers + if conda_build: + print("This is a conda build") + CXX = os.environ["CXX"] + CC = os.environ["CC"] + + # make sure that these compilers are in the path + CXX_bin = shutil.which(CXX) + CC_bin = shutil.which(CC) + + print(f"{CXX} => {CXX_bin}") + print(f"{CC} => {CC_bin}") + + if CXX_bin is None or CC_bin is None: + print("Cannot find the compilers requested by conda-build in the PATH") + print("Please check that the compilers are installed and available.") + sys.exit(-1) + + # use the full paths, in case CMake struggles + CXX = CXX_bin + CC = CC_bin + + elif is_macos: + try: + CXX = glob.glob(os.path.join(bindir, "clang++"))[0] + CC = glob.glob(os.path.join(bindir, "clang"))[0] + except: + print("Cannot find the conda clang++ binaries!") + print("Please install these, e.g. via") + print("conda install clang clangxx") + sys.exit(-1) + elif is_linux: + try: + CXX = glob.glob(os.path.join(bindir, "*-g++"))[0] + CC = glob.glob(os.path.join(bindir, "*-gcc"))[0] + except: + print("Cannot find the conda g++ binaries!") + print("Please install these, e.g. via") + print("conda install gcc gxx") + sys.exit(-1) + + print(f"Using compilers {CC} | {CXX}") + + # Make sure all of the above output is printed to the screen + # before we start running any actual compilation + sys.stdout.flush() + + # Now that the dependencies are installed, the next step + # is to use cmake to build the corelib and wrapper in the build/corelib + # and build/wrapper directories + + # change into the build/corelib directory + OLDPWD = os.getcwd() + + build_ext = _get_build_ext() + + build_dir = os.path.abspath("build") + + coredir = os.path.join(build_dir, f"{build_ext}_corelib") + + if not os.path.exists(coredir): + os.makedirs(coredir) + + if not os.path.isdir(coredir): + print("SOMETHING IS WRONG. %s is not a directory?" % coredir) + sys.exit(-1) + + os.chdir(coredir) + + if os.path.exists("CMakeCache.txt"): + # we have run cmake in this directory before. Run it again. + status = subprocess.run([cmake, "."]) + else: + # this is the first time we are running cmake + sourcedir = os.path.join(os.path.dirname(os.path.dirname( + os.getcwd())), "corelib") + + if not os.path.exists(os.path.join(sourcedir, "CMakeLists.txt")): + print("SOMETHING IS WRONG. There is no file %s" % os.path.join(sourcedir, "CMakeLists.txt")) + sys.exit(-1) + + for a in ("NetCDF_ROOT_DIR", "OPENMM_ROOT_DIR"): + for i, d in enumerate(args.corelib): + if (a in d[0]): + v = args.corelib.pop(i)[0] + if (not a in os.environ): + os.environ[a] = v.split("=")[-1] + + add_default_cmake_defs(args.corelib, ncores) + + cmake_cmd = [cmake, *sum([["-D", d[0]] for d in args.corelib], []), + *sum([["-G", g[0]] for g in args.generator], []), + sourcedir] + + if (CC): + os.environ["CC"] = CC + if (CXX): + os.environ["CXX"] = CXX + + print(" ".join(cmake_cmd)) + sys.stdout.flush() + status = subprocess.run(cmake_cmd) + + if status.returncode != 0: + print("SOMETHING WENT WRONG WHEN USING CMAKE ON CORELIB!") + print("\n== OUTPUT LOG ==") + try: + for line in open("CMakeFiles/CMakeOutput.log").readlines(): + print(line.strip()) + except Exception as e: + print(e) + + print("\n== ERROR LOG ==") + try: + for line in open("CMakeFiles/CMakeError.log").readlines(): + print(line.strip()) + except Exception as e: + print(e) + + sys.exit(-1) + + # Now that cmake has run, we can compile and install corelib + ###### + ###### Compiling and installing corelib + ###### + # Compile and install, as need to install to compile the wrappers + make_args = make_cmd(ncores, True) + + print("NOW RUNNING \"%s\" --build . --target %s" % (cmake, " ".join(make_args))) + sys.stdout.flush() + status = subprocess.run([cmake, "--build", ".", "--target", *make_args]) + + if status.returncode != 0: + print("SOMETHING WENT WRONG WHEN COMPILING CORELIB!") + sys.exit(-1) + + ###### + ###### Compiling wrapper + ###### + + # Make sure that the Python in conda is used + pydefs.append([f"PYTHON_EXECUTABLE={python_exe}"]) + + os.chdir(OLDPWD) + + wrapperdir = os.path.join(build_dir, f"{build_ext}_wrapper") + + if not os.path.exists(wrapperdir): + os.makedirs(wrapperdir) + + if not os.path.isdir(wrapperdir): + print("SOMETHING IS WRONG. %s is not a directory?" % wrapperdir) + sys.exit(-1) + + os.chdir(wrapperdir) + + if os.path.exists("CMakeCache.txt"): + # we have run cmake in this directory before. Run it again. + status = subprocess.run([cmake, "."]) + else: + # this is the first time we are running cmake + sourcedir = os.path.join(os.path.dirname(os.path.dirname( + os.getcwd())), "wrapper") + + if not os.path.exists(os.path.join(sourcedir, "CMakeLists.txt")): + print("SOMETHING IS WRONG. There is no file %s" % os.path.join(sourcedir, "CMakeLists.txt")) + sys.exit(-1) + + add_default_cmake_defs(args.wrapper, npycores) + + cmake_cmd = [cmake, *sum([["-D", d[0]] for d in args.wrapper], []), + *sum([["-G", g[0]] for g in args.generator], []), + sourcedir] + + print(" ".join(cmake_cmd)) + sys.stdout.flush() + status = subprocess.run(cmake_cmd) + + if status.returncode != 0: + print("SOMETHING WENT WRONG WHEN USING CMAKE ON WRAPPER!") + sys.exit(-1) + + # Just compile the wrappers + make_args = make_cmd(npycores, False) + + print("NOW RUNNING \"%s\" --build . --target %s" % (cmake, " ".join(make_args))) + sys.stdout.flush() + status = subprocess.run([cmake, "--build", ".", "--target", *make_args]) + + if status.returncode != 0: + print("SOMETHING WENT WRONG WHEN COMPILING THE WRAPPERS!") + sys.exit(-1) + + os.chdir(OLDPWD) + + +def install_module(ncores: int = 1): + print("\nInstalling the module") + + OLDPWD = os.getcwd() + + build_ext = _get_build_ext() + + build_dir = os.path.abspath("build") + + cmake = "cmake" + + if is_windows: + cmake = f"{cmake}.exe" + + bindir = _get_bin_dir() + cmake = os.path.join(bindir, cmake) + + moduledir = os.path.join(build_dir, f"{build_ext}_module") + + if not os.path.exists(moduledir): + os.makedirs(moduledir) + + if not os.path.isdir(moduledir): + print("SOMETHING IS WRONG. %s is not a directory?" % moduledir) + sys.exit(-1) + + os.chdir(moduledir) + + if os.path.exists("CMakeCache.txt"): + # we have run cmake in this directory before. Run it again. + status = subprocess.run([cmake, "."]) + else: + # this is the first time we are running cmake + sourcedir = os.path.join(os.path.dirname(os.path.dirname( + os.getcwd())), "src", "sire") + + if not os.path.exists(os.path.join(sourcedir, "CMakeLists.txt")): + print("SOMETHING IS WRONG. There is no file %s" % os.path.join(sourcedir, "CMakeLists.txt")) + sys.exit(-1) + + add_default_cmake_defs(args.wrapper, ncores) + cmake_cmd = [cmake, *sum([["-D", d[0]] for d in args.wrapper], []), + *sum([["-G", g[0]] for g in args.generator], []), + sourcedir] + print(" ".join(cmake_cmd)) + sys.stdout.flush() + status = subprocess.run(cmake_cmd) + + if status.returncode != 0: + print("SOMETHING WENT WRONG WHEN USING CMAKE ON MODULE!") + sys.exit(-1) + + make_args = make_cmd(ncores, True) + + # Now that cmake has run, we can compile and install wrapper + print("NOW RUNNING \"%s\" --build . --target %s" % (cmake, " ".join(make_args))) + sys.stdout.flush() + status = subprocess.run([cmake, "--build", ".", "--target", *make_args]) + + if status.returncode != 0: + print("SOMETHING WENT WRONG WHEN COMPILING WRAPPER!") + sys.exit(-1) + + +def install(ncores: int = 1, npycores: int = 1): + print("\nInstalling sire") + + OLDPWD = os.getcwd() + + build_ext = _get_build_ext() + + build_dir = os.path.abspath("build") + + wrapperdir = os.path.join(build_dir, f"{build_ext}_wrapper") + + cmake = "cmake" + + if is_windows: + cmake = f"{cmake}.exe" + + bindir = _get_bin_dir() + cmake = os.path.join(bindir, cmake) + + if not os.path.exists(wrapperdir): + os.makedirs(wrapperdir) + + if not os.path.isdir(wrapperdir): + print("SOMETHING IS WRONG. %s is not a directory?" % wrapperdir) + sys.exit(-1) + + os.chdir(wrapperdir) + + # Now install the wrappers + make_args = make_cmd(npycores, True) + + print("NOW RUNNING \"%s\" --build . --target %s" % (cmake, " ".join(make_args))) + sys.stdout.flush() + status = subprocess.run([cmake, "--build", ".", "--target", *make_args]) + + if status.returncode != 0: + print("SOMETHING WENT WRONG WHEN COMPILING THE WRAPPERS!") + sys.exit(-1) + + os.chdir(OLDPWD) + + install_module(ncores=ncores) + + +if __name__ == "__main__": + args = parse_args() + + if len(args.action) != 1: + print("Please use either 'install_requires', 'build' or 'install'") + sys.exit(-1) + + install_bss = args.install_bss_deps + + action = args.action[0] + + if is_windows and (args.generator is None or len(args.generator) == 0): + #args.generator = [["Visual Studio 17 2022"]] + args.generator = [["Visual Studio 15 2017 Win64"]] # preferred VC version for conda + + if action == "install": + if not (args.skip_deps or args.skip_build): + install_requires(install_bss_reqs=install_bss) + + if not args.skip_build: + build(ncores=args.ncores[0], npycores=args.npycores[0], + coredefs=args.corelib, pydefs=args.wrapper) + + install(ncores=args.ncores[0], npycores=args.npycores[0]) + + elif action == "build": + if not args.skip_deps: + install_requires(install_bss_reqs=install_bss) + + build(ncores=args.ncores[0], npycores=args.npycores[0], + coredefs=args.corelib, pydefs=args.wrapper) + + elif action == "install_requires": + install_requires(install_bss_reqs=install_bss) + + elif action == "install_module": + install_module(ncores=args.ncores[0]) + + else: + print(f"Unrecognised action '{action}'. Please use 'install_requires', " + "'build', 'install' or 'install_module'") diff --git a/src/sire/CMakeLists.txt b/src/sire/CMakeLists.txt new file mode 100644 index 000000000..36c965088 --- /dev/null +++ b/src/sire/CMakeLists.txt @@ -0,0 +1,121 @@ +################################ +# +# CMake Project file for sire +# +################################ + +cmake_minimum_required(VERSION 3.3.0 FATAL_ERROR) +cmake_policy(VERSION 3.3) + +## Read the version number (so we can set it once in one place) +file (STRINGS "../../version.txt" SIRE_VERSION) + +string(REGEX MATCH "([0-9]*).([0-9]*).([0-9]*)" _ ${SIRE_VERSION}) + +set (S_VERSION_MAJOR ${CMAKE_MATCH_1}) +set (S_VERSION_MINOR ${CMAKE_MATCH_2}) +set (S_VERSION_PATCH ${CMAKE_MATCH_3}) + +message( STATUS "Building Sire Python Module ${SIRE_VERSION}") + +# use loose loop syntax in CMakeLists files +set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE ) + +message( STATUS "Building into an existing conda installation..." ) +# Where is anaconda installed +set( ANACONDA_BASE "$ENV{HOME}/miniconda3" CACHE PATH + "Install directory for conda (python3)" ) + +# Make sure that there is a python3 executable in the bin directory +if ( NOT EXISTS "${ANACONDA_BASE}/bin/python3" AND + NOT EXISTS "${ANACONDA_BASE}/python.exe" AND + NOT EXISTS "${PYTHON_EXECUTABLE}" ) + message( FATAL_ERROR "Cannot find ${ANACONDA_BASE}/bin/python3, ${ANACONDA_BASE}/python.exe " + "or ${PYTHON_EXECUTABLE}." + "Please set the full path to the conda " + "installation directory." ) +endif() + +set( SIRE_APP "${ANACONDA_BASE}/pkgs/sire-${SIRE_VERSION}" CACHE PATH + "Install directory for Sire within the conda distribution" ) + +message( STATUS "Using SIRE_APP = ${SIRE_APP}" ) + +set( SIRE_INCLUDE_DIR "${SIRE_APP}/include/Sire" ) + +set( CONDA_INCLUDE_DIR "${ANACONDA_BASE}/include" ) +message( STATUS "Using CONDA_INCLUDE_DIR = ${CONDA_INCLUDE_DIR}" ) + +set ( SIRE_COMP_CMAKE "${SIRE_INCLUDE_DIR}/cmake/SireCompileVariables.cmake" ) + +# Look for the "SireCompileVariables.cmake" file in the install directory +if (EXISTS "${SIRE_COMP_CMAKE}") + include( "${SIRE_COMP_CMAKE}" ) +else() + message( FATAL_ERROR "You don't appear to have built corelib into this " + "Anaconda/Miniconda directory. Please build corelib first. " + "(there should be a file called ${SIRE_COMP_CMAKE})" ) +endif() + +# name the project (no language support as just Python modules) +project (SireModule NONE) + +message( STATUS "PROJECT COMPLETED" ) + +# Absolutely can't run cmake in the source directory! +if ( CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR ) + message( FATAL_ERROR "You must run CMake in a different directory to the source!" ) +endif ( CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR ) + +if (NOT SIRE_FOUND_PYTHON) + # Need to find python before we can install the Python module + find_package( PythonLibs 3.7 REQUIRED ) +endif() + +message(STATUS "SIRE_INSTALL_PREFIX ${SIRE_INSTALL_PREFIX}") + +set(CMAKE_INSTALL_PREFIX "${SIRE_INSTALL_PREFIX}" CACHE INTERNAL + "Prefix prepended to install directories" FORCE ) + +# set the location to install the python modules +include( "build/cmake/install_python.cmake" ) +set (SIRE_PYTHON "${PYTHON_SITE_DIR}") + +message( STATUS "Installing Python wrappers to ${SIRE_PYTHON}") + +# Recurse into the module subdirectories +add_subdirectory (config) +add_subdirectory (utils) +add_subdirectory (qt) +add_subdirectory (error) +add_subdirectory (analysis) +add_subdirectory (base) +add_subdirectory (cas) +add_subdirectory (cluster) +add_subdirectory (ff) +add_subdirectory (id) +add_subdirectory (io) +add_subdirectory (maths) +add_subdirectory (mm) +add_subdirectory (mol) +add_subdirectory (move) +add_subdirectory (search) +add_subdirectory (stream) +add_subdirectory (squire) +add_subdirectory (system) +add_subdirectory (units) +add_subdirectory (vol) + +install( FILES __init__.py _load.py _thumbsup.py _pythonize.py + DESTINATION ${SIRE_PYTHON}/sire + ) + +# These commands are used to create an 'uninstall' target +# (this is copied from the vtk.org wiki) +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/cmake_uninstall.cmake.in" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" + IMMEDIATE @ONLY) + +add_custom_target(uninstall + "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") diff --git a/src/sire/__init__.py b/src/sire/__init__.py new file mode 100644 index 000000000..4605040ba --- /dev/null +++ b/src/sire/__init__.py @@ -0,0 +1,468 @@ +""" +.. currentmodule:: sire + +This is the sire module. + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + load + save + atomid + chainid + molid + resid + segid + thumbs_up + disable_thumbs_up + get_thumbs_up_info + +""" + +__all__ = [ "load", "save", + "atomid", "resid", "chainid", + "segid", "molid", "thumbs_up", + "get_thumbs_up_info", "disable_thumbs_up" ] + + +def _fix_openmm_path(): + """We need to fix the OpenMM path on Windows, because the DLL + is not where we would expect it to be + """ + import sys + + if sys.platform != "win32": + return + + import os + import glob + + condadir = os.path.dirname(sys.executable) + + # The DLL is put in libdir, but other DLLs are put in bindir + libdir = os.path.join(condadir, "Library", "lib") + bindir = os.path.join(condadir, "Library", "bin") + openmm_files = glob.glob(os.path.join(libdir, "OpenMM*.dll")) + + need_path = False + + for file in openmm_files: + binfile = os.path.join(bindir, os.path.basename(file)) + + if not os.path.exists(binfile): + # We do need to add bindir to the PATH + need_path = True + break + + if need_path: + # importing openmm should add this path + try: + import openmm + except Exception: + print("OpenMM import failed!") + # Copy the files + try: + for file in openmm_files: + binfile = os.path.join(bindir, os.path.basename(file)) + + if not os.path.exists(binfile): + # copy the file into the right place + import shutil + shutil.copy(file, binfile) + except Exception: + print("Could not resolve OpenMM library location. This may cause issues later.") + + # also add it manually here + try: + os.add_dll_directory(libdir) + except Exception: + # os.add_dll_directory is not available on old Python (3.7) + pass + + +_fix_openmm_path() + + +def molid(num: int = None, name: str = None, idx: int = None, + case_sensitive: bool = True): + """Construct an identifer for a Molecule from the passed + name, number and index. + + Args: + name (str, optional): The molecule name. Defaults to None. + num (int, optional): The molecule number. Defaults to None. + idx (int, optional): The molecule index. Defaults to None. + case_sensitive (bool): Whether or not the name is case sensitive + + Returns: + MolID : The returned molecule identifier + """ + ID = None + + if type(num) is str: + # used in unnamed argument mode + if name is None: + name = num + num = None + elif type(name) is int: + (num, name) = (name, num) + else: + raise TypeError("The number cannot be a string.") + + from .mol import MolName, MolNum, MolIdx + + if name is not None: + if case_sensitive: + from .id import CaseSensitive + cs = CaseSensitive + else: + from .id import CaseInsensitive + cs = CaseInsensitive + + ID = MolName(name, cs) + + if num is not None: + if ID is None: + ID = MolNum(num) + else: + ID = ID + MolNum(num) + + if idx is not None: + if ID is None: + ID = MolIdx(idx) + else: + ID = ID + MolIdx(idx) + + if ID is None: + return MolIdx() + else: + return ID + + +def atomid(num: int = None, name: str = None, idx: int = None, + case_sensitive=True): + """Construct an identifer for an Atom from the passed + name, number and index. + + Args: + name (str, optional): The atom name. Defaults to None. + num (int, optional): The atom number. Defaults to None. + idx (int, optional): The atom index. Defaults to None. + case_sensitive (bool): Whether the name is case sensitive or not + + Returns: + AtomID : The returned atom identifier + """ + ID = None + + if type(num) is str: + # used in unnamed argument mode + if name is None: + name = num + num = None + elif type(name) is int: + (num, name) = (name, num) + else: + raise TypeError("The number cannot be a string.") + + from .mol import AtomName, AtomNum, AtomIdx + + if name is not None: + if case_sensitive: + from .id import CaseSensitive + cs = CaseSensitive + else: + from .id import CaseInsensitive + cs = CaseInsensitive + + ID = AtomName(name, cs) + + if num is not None: + if ID is None: + ID = AtomNum(num) + else: + ID = ID + AtomNum(num) + + if idx is not None: + if ID is None: + ID = AtomIdx(idx) + else: + ID = ID + AtomIdx(idx) + + if ID is None: + return AtomIdx() + else: + return ID + + +def resid(num: int = None, name: str = None, idx: int = None, + case_sensitive=True): + """Construct an identifer for a Residue from the passed + name, number and index. + + Args: + name (str, optional): The residue name. Defaults to None. + number (int, optional): The residue number. Defaults to None. + index (int, optional): The residue index. Defaults to None. + case_sensitive (bool): Whether or not the name is case sensitive + + Returns: + ResID : The returned atom identifier + """ + ID = None + + if type(num) is str: + # used in unnamed argument mode + if name is None: + name = num + num = None + elif type(name) is int: + (num, name) = (name, num) + else: + raise TypeError("The number cannot be a string.") + + from .mol import ResName, ResNum, ResIdx + + if name is not None: + if case_sensitive: + from .id import CaseSensitive + cs = CaseSensitive + else: + from .id import CaseInsensitive + cs = CaseInsensitive + + ID = ResName(name, cs) + + if num is not None: + if ID is None: + ID = ResNum(num) + else: + ID = ID + ResNum(num) + + if idx is not None: + if ID is None: + ID = ResIdx(idx) + else: + ID = ID + ResIdx(idx) + + if ID is None: + return ResIdx() + else: + return ID + + +def chainid(idx: int = None, name: str = None, + case_sensitive:bool = True): + """Construct an identifer for a Chain from the passed + name and index. + + Args: + name (str, optional): The chain name. Defaults to None. + index (int, optional): The chain index. Defaults to None. + case_sensitive (bool): Whether or not the name is case sensitive + + Returns: + ChainID : The returned chain identifier + """ + ID = None + + if type(idx) is str: + # used in unnamed argument mode + if name is None: + name = idx + idx = None + elif type(name) is int: + (idx, name) = (name, idx) + else: + raise TypeError("The index cannot be a string.") + + from .mol import ChainName, ChainIdx + + if name is not None: + if case_sensitive: + from .id import CaseSensitive + cs = CaseSensitive + else: + from .id import CaseInsensitive + cs = CaseInsensitive + + ID = ChainName(name, cs) + + if idx is not None: + if ID is None: + ID = ChainIdx(idx) + else: + ID = ID + ChainIdx(idx) + + if ID is None: + return ChainIdx() + else: + return ID + + +def segid(idx: int = None, name: str = None, + case_sensitive: bool = True): + """Construct an identifer for a Segment from the passed + name and index. + + Args: + name (str, optional): The segment name. Defaults to None. + index (int, optional): The segment index. Defaults to None. + case_sensitive (bool): Whether or not the name is case sensitive + + Returns: + SegID : The returned chain identifier + """ + ID = None + + if type(idx) is str: + # used in unnamed argument mode + if name is None: + name = idx + idx = None + elif type(name) is int: + (idx, name) = (name, idx) + else: + raise TypeError("The index cannot be a string.") + + from .mol import SegName, SegIdx + + if name is not None: + if case_sensitive: + from .id import CaseSensitive + cs = CaseSensitive + else: + from .id import CaseInsensitive + cs = CaseInsensitive + + ID = SegName(name, cs) + + if idx is not None: + if ID is None: + ID = SegIdx(idx) + else: + ID = ID + SegIdx(idx) + + if ID is None: + return SegIdx() + else: + return ID + + +def bondid(atom0, atom1, case_sensitive: bool = True): + """Construct an identifier for a Bond from the passed + identifiers for the two atoms. + + The atom identifiers can be: + + * integers - in this case they are treated as Atom indexes + * strings - in this case they are treated as Atom names + * AtomIDs - these are AtomIDs created via, e.g. the atomid function. + + Args: + atom0 (int, str, AtomID): The identifier for the first atom. + atom1 (int, str, AtomID): The identifier for the second atom. + case_sensitive: Whether or not the name is case sensitive + + Returns: + BondID: The returned bond identifier + """ + + def _convert(id): + if type(id) is int: + from .mol import AtomIdx + return AtomIdx(id) + elif type(id) is str: + if case_sensitive: + from .id import CaseSensitive + cs = CaseSensitive + else: + from .id import CaseInsensitive + cs = CaseInsensitive + + from .mol import AtomName + return AtomName(id, cs) + else: + from .mol import AtomID + + if AtomID in type(id).mro(): + return id + else: + return atomid(id) + + from .mol import BondID + return BondID(_convert(atom0), _convert(atom1)) + + +from . import config + +__version__ = config.__version__ + +__branch__ = config.sire_repository_branch +__repository__ = config.sire_repository_url +__revisionid__ = config.sire_repository_version[0:7] + +_can_lazy_import = False + +try: + import lazy_import as _lazy_import + _lazy_import.logging.disable(_lazy_import.logging.DEBUG) + + # ignore warnings, as a lot are printed from the frozenlib + import warnings + warnings.filterwarnings('ignore') + _can_lazy_import = True + +except Exception as e: + print("Lazy import disabled") + print(e) + _can_lazy_import = False + +#_can_lazy_import = False + +# Lazy import the modules for speed, and also to prevent pythonizing them +# if the users wants to run in legacy mode +if _can_lazy_import: + analysis = _lazy_import.lazy_module("sire.analysis") + base = _lazy_import.lazy_module("sire.base") + cas = _lazy_import.lazy_module("sire.cas") + cluster = _lazy_import.lazy_module("sire.cluster") + error = _lazy_import.lazy_module("sire.error") + ff = _lazy_import.lazy_module("sire.ff") + id = _lazy_import.lazy_module("sire.id") + io = _lazy_import.lazy_module("sire.io") + maths = _lazy_import.lazy_module("sire.maths") + mm = _lazy_import.lazy_module("sire.mm") + mol = _lazy_import.lazy_module("sire.mol") + move = _lazy_import.lazy_module("sire.move") + qt = _lazy_import.lazy_module("sire.qt") + search = _lazy_import.lazy_module("sire.search") + squire = _lazy_import.lazy_module("sire.squire") + stream = _lazy_import.lazy_module("sire.stream") + units = _lazy_import.lazy_module("sire.units") + vol = _lazy_import.lazy_module("sire.vol") + +def _version_string(): + """Return a nicely formatted string that describes the current Sire version""" + from .base import get_release_version, get_repository_branch, \ + get_repository_version_is_clean + + from .config import sire_repository_version + + return """Sire %s [%s|%s, %s]""" % \ + (get_release_version(), + get_repository_branch(), + sire_repository_version[0:7], + ["unclean", "clean"][get_repository_version_is_clean()]) + +config.version_string = _version_string + +### Here are the functions and other data that form the public API +### of Sire + +from ._pythonize import * +from ._load import * +from ._thumbsup import * diff --git a/src/sire/_load.py b/src/sire/_load.py new file mode 100644 index 000000000..b6412de73 --- /dev/null +++ b/src/sire/_load.py @@ -0,0 +1,465 @@ + +from typing import Union as _Union +from typing import List as _List + +__all__ = ["load", "save", "create", "smiles", "expand", + "tutorial_url", "load_test_files", "supported_formats"] + + +tutorial_url = "https://siremol.org/m" + +_range = range + + +def supported_formats(): + """Return a string that describes all of the molecular file formats + that are supported by Sire + """ + from .io import MoleculeParser + return MoleculeParser.supportedFormats() + + +def _create_dir(directory): + import os + + if not os.path.exists(directory): + os.makedirs(directory) + + if not os.path.isdir(directory): + raise IOError(f"{directory} is not a directory!") + + +def _get_gromacs_dir(): + import os + + if "GROMACS_HOME" in os.environ: + gromacs_dir = os.environ["GROMACS_HOME"] + if os.path.exists(gromacs_dir) and os.path.isdir(gromacs_dir): + return gromacs_dir + + from .config import share_directory + + gromacs_dir = os.path.join(share_directory, "gromacs") + + if os.path.exists(gromacs_dir): + return gromacs_dir + + # it doesn't exist, so we need to download it + gromacs_tbz2 = os.path.join(share_directory, "gromacs.tar.bz2") + + if not os.path.exists(gromacs_tbz2): + try: + import urllib.request + urllib.request.urlretrieve(f"{tutorial_url}/gromacs.tar.bz2", + gromacs_tbz2) + except Exception: + # we cannot download - just give up + return None + + if not os.path.exists(gromacs_tbz2): + return None + + try: + import tarfile + t = tarfile.open(gromacs_tbz2, "r|bz2") + t.extractall(path=share_directory) + except Exception: + return None + + if os.path.exists(gromacs_dir): + return gromacs_dir + else: + return None + + +def _resolve_path(path, directory, silent=False): + import os + + if os.path.exists(path) and os.path.isfile(path): + if path.endswith(".gz"): + # unzip the file first + unzipped = path[0:-3] + + if os.path.exists(unzipped) and os.path.isfile(unzipped): + if not silent: + print(f"Using cached unzipped file '{unzipped}'...") + return [os.path.abspath(unzipped)] + + _create_dir(directory) + unzipped = os.path.join(directory, os.path.basename(path)[0:-3]) + if os.path.exists(unzipped) and os.path.isfile(unzipped): + if not silent: + print(f"Using cached unzipped file '{unzipped}'...") + return [os.path.abspath(unzipped)] + + if not silent: + print(f"Unzipping '{path}'...") + + import gzip + import shutil + with gzip.open(path, 'rb') as f_in: + with open(unzipped, 'wb') as f_out: + shutil.copyfileobj(f_in, f_out) + + return [os.path.abspath(unzipped)] + + elif path.endswith(".bz2"): + # unzip the file first + unzipped = path[0:-4] + + if os.path.exists(unzipped) and os.path.isfile(unzipped): + if not silent: + print(f"Using cached unzipped file '{unzipped}'...") + return [os.path.abspath(unzipped)] + + _create_dir(directory) + unzipped = os.path.join(directory, os.path.basename(path)[0:-4]) + if os.path.exists(unzipped) and os.path.isfile(unzipped): + if not silent: + print(f"Using cached unzipped file '{unzipped}'...") + return [os.path.abspath(unzipped)] + + if not silent: + print(f"Unzipping '{path}'...") + + import bz2 + import shutil + with bz2.open(path, 'rb') as f_in: + with open(unzipped, 'wb') as f_out: + shutil.copyfileobj(f_in, f_out) + + return [os.path.abspath(unzipped)] + + else: + return [os.path.abspath(path)] + + if path.startswith("http"): + # try to download this from the internet + _create_dir(directory) + filename = os.path.join(directory, path.split("/")[-1]) + + if os.path.exists(filename): + if os.path.isfile(filename): + if not silent: + print(f"Using cached download of '{path}'...") + return _resolve_path(filename, directory=directory, silent=silent) + else: + raise IOError( + f"Cannot overwrite {filename} as it is an " + "existing directory!") + + if not silent: + print(f"Downloading from '{path}'...") + + if not filename.endswith(".bz2"): + # try the bz2 file first + try: + import urllib.request + urllib.request.urlretrieve(f"{path}.bz2", f"{filename}.bz2") + have_downloaded_file = True + filename = f"{filename}.bz2" + except Exception as e: + have_downloaded_file = False + else: + have_downloaded_file = False + + if not have_downloaded_file: + try: + import urllib.request + urllib.request.urlretrieve(path, filename) + except Exception as e: + raise IOError(f"Unable to download '{path}': {e}") + + if os.path.exists(filename) and os.path.isfile(filename): + return _resolve_path(filename, directory=directory, silent=silent) + else: + raise IOError(f"Downloaded file does not exist? {filename}") + else: + if len(path) == 4: + # the first character should be a number + try: + int(path[0]) + is_code = True + except Exception: + is_code = False + + if is_code: + code = path.lower() + # https://files.rcsb.org/download/4hhb.pdb.gz + return _resolve_path(f"https://files.rcsb.org/download/{path}.pdb.gz", + directory=directory, silent=silent) + + # this may be a globbed path + import glob + + matches = glob.glob(path) + + if len(matches) > 0: + paths = [] + for match in matches: + paths += _resolve_path(match, directory=directory, silent=silent) + + return paths + + raise IOError(f"Cannot find file '{path}'") + + +def expand(base: str, path: _Union[str, _List[str]], *args, **kwargs): + """Expand the set of paths with the supplied base. + + Args: + base (str): + The base to be prepended to all paths + + path (str or list[str]): + The filename (or names) that will be prepended + with the base. + + suffix (str): + A suffix to attach to all files, e.g. ".bz2" + + Returns: + list[str]: + The list of expanded filenames or URLs + + Examples: + >>> expand("https://siremol.org/m", "urea.gro", "urea.top") + ["https://siremol.org/m/urea.gro", "https://siremol.org/n/urea.top"] + + >>> expand("input", ["ala.top", "ala.crd"]) + ["input/ala.top", "input/ala.crd"] + """ + if "suffix" in kwargs: + suffix = kwargs["suffix"] + else: + suffix = None + + if type(path) is not list: + paths = [path] + else: + paths = path + + for arg in args: + paths.append(arg) + + expanded = [] + + if base.startswith("http"): + join = lambda x, y: f"{x}/{y}" + else: + import os + join = os.path.join + + for path in paths: + if suffix is None: + expanded.append(join(base, path)) + else: + expanded.append(join(base, f"{path}{suffix}")) + + return expanded + + +def load(path: _Union[str, _List[str]], *args, **kwargs): + """Load the molecular system at 'path'. This can be a filename + of a URL. If it is a URL, then the file will be downloaded + to the current directory and loaded from there. + + Args: + path (str or list[str]): + The filename (or names) or the URL or URLS of the molecular + system to load. This allows multiple paths to be input + as some molecular file formats split molecular information + across multiple files. Multiple paths can also be passed + as multiple arguments to this function. + + log (dict): + Optional dictionary that you can pass in that will be populated + with any error messages or warnings from the parsers as they + attempt to load in the molecular data. This can be helpful + in diagnosing why your file wasn't loaded. + + directory (str): + Optional directory which will be used when creating any + files (e.g. as a download from a URL or which unzipping files) + + Returns: + sire.system.System: + The molecules that have been loaded are returned as + a sire.system.System + + Examples: + >>> mols = load("caffeine.pdb") + + >>> mols = load(["ala.crd", "ala.top"]) + + >>> mols = load("ala.crd", "ala.top") + + >>> mols = load("https://something") + + >>> log = [] + >>> mols = load("caffeine.pdb", log=log) + Exception + (look at 'log' to find out what went wrong in detail) + """ + if type(path) is not list: + paths = [path] + else: + paths = path + + for arg in args: + paths.append(arg) + + if "log" in kwargs: + log = kwargs["log"] + else: + log = {} + + if "directory" in kwargs: + directory = kwargs["directory"] + else: + directory = "." + + if "silent" in kwargs: + silent = kwargs["silent"] + else: + silent = False + + p = [] + + for i in range(0, len(paths)): + # resolve the paths, downloading as needed + p += _resolve_path(paths[i], directory=directory, silent=silent) + + paths = p + + if len(paths) == 0: + raise IOError("No valid files specified. Nothing to load?") + + from .io import load_molecules + return load_molecules(paths, map={"GROMACS_PATH":_get_gromacs_dir()}) + + +def save(molecules, filename: str, format: _Union[str, _List[str]]=None, + log={}) -> _List[str]: + """Save the passed molecules to a file called 'filename'. If the format + is not specified, then the format will be guessed from the + filename. If the format is specified, and is a list, then multiple + files will be written, one for each specified format. + + Args: + molecules (:class:`sire.system.System`, :class:`sire.mol.Molecule`, List[:class:`sire.mol.Molecule`] etc.) + The molecule (or molecules) that should be written to the file. + This can be anything that can be converted to a :class:`sire.system.System`, + i.e. a single :class:`~sire.mol.Molecule` (or :class:`~sire.mol.MoleculeView`), or a list of + Molecules (or MoleculeViews) + + filename (str): + The name of the file to which to write the file. Extensions + will be automatically added if they are needed to match + the formats of the file (or files) that are written. + + format (str or list(str)): + The format (or formats) that should be used to write the + file (or files). If the format isn't specified, then it + will be guessed from the extension used for `filename`. + If this doesn't have an extension, then it will be guessed + based on the formats used to load the molecule originally. + If it still isn't available, then PDB will be used. + + log (dict): + Optional dictionary that you can pass in that will be populated + with any error messages or warnings from the parsers as they + attempt to write the molecular data. This can be helpful + in diagnosing why your file wasn't saved. + + Returns: + list[str]: + The absolute paths/name(s) of the files that have been written. + + Examples: + >>> save(molecules, "molecules.pdb") + ["/path/to/molecules.pdb"] + + >>> save([mol1, mol2, mol3], "molecules.sdf") + ["/path/to/molecules.sdf"] + + >>> save(mols, "ala", format=["top", "crd"]) + ["/path/to/ala.top", "/path/to/ala.crd"] + + >>> log = {} + >>> save(mols, "broken.top", log=log) + Exception + (look at `log` to find in detail what went wrong) + """ + from .io import MoleculeParser + from .base import PropertyMap, StringProperty + + p = PropertyMap() + + if format is not None: + if type(format) is str: + format = [format] + + p.set("fileformat", StringProperty(",".join(format))) + + if molecules.what() != "SireSystem::System": + from .system import System + from .mol import MoleculeGroup + s = System() + m = MoleculeGroup("all") + m.add(molecules) + s.add(m) + molecules = s + + return MoleculeParser.save(molecules, filename, map=p) + + +def load_test_files(files: _Union[_List[str], str], *args): + """Load the passed files that are part of the unit testing + and return the resulting molecules. This will cache the files + into a directory called "../cache" so that downloads can be shared + between tests. You should only need this function if you + are writing unit tests. + + Args: + files (str or list[str]) + The list of files to load from the tutorial website. This + will automatically add on the tutorial URL and compression suffix + + Returns: + sire.system.System + The loaded molecules + """ + if not type(files) is list: + files = [files] + + for arg in args: + files.append(arg) + + import os + d = os.path.abspath(os.path.curdir) + + if (d.endswith("tests")): + # we are running in the tests directory, so cache downloads here + cache_dir = os.path.join(d, "cache") + else: + d2 = os.path.split(d)[0] + if d2.endswith("tests"): + # we are a subdirectory of the parent directory + cache_dir = os.path.join(d2, "cache") + else: + cache_dir = os.path.join(d, "cache") + + files = expand(tutorial_url, files, suffix=".bz2") + return load(files, directory=cache_dir, silent=True) + + +def create(args): + """Create a Molecule from the passed arguments + """ + pass + + +def smiles(args): + """Create a Molecule from the passed smiles string""" + pass diff --git a/src/sire/_pythonize.py b/src/sire/_pythonize.py new file mode 100644 index 000000000..298969475 --- /dev/null +++ b/src/sire/_pythonize.py @@ -0,0 +1,349 @@ + +__all__ = ["use_old_api", "use_new_api", "use_mixed_api"] + + +def _upper_split(data): + """Thanks to this stackoverflow post for the inspiration + https://stackoverflow.com/questions/7322028/how-to-replace-uppercase-with-underscore + """ + buff = '' + for item in data: + if item.isupper(): + if buff: + if buff == "An" or buff == "A": + buff = '' + else: + yield buff + buff = '' + + buff += item + + yield buff + + +def _pythonize(C, delete_old: bool=True) -> None: + """Pythonize the passed class. This will rename the functions + so that they better match the Python style + (changing mixedCase function names into underscore_case) + + This makes the change with full awareness of the naming + convention used in sire. This includes changing + cutGroup to cutgroup and typeName to typename, + and nSomething to num_something. This ignores functions + that start with an underscore. + + Note that this changes the API of the class globally. + All objects created from this class (and to be created) + will now have the new API. The old API is deleted. + + Args: + C + The Class type to be pythonized + + delete_old: bool (defaults to True) + Whether or not to remove the old function name. + + Returns: + None + """ + if type(C) is list: + for CLS in C: + _pythonize(CLS) + return + + import re + + for attr in dir(C): + if attr.startswith("_"): + continue + + new_attr = attr + + # change typeName into typename + if attr == "typeName": + new_attr = "typename" + + # change 'cutGroup' into 'cutgroup' + new_attr = new_attr.replace("utGroup", "utgroup") + + if new_attr.startswith("asAn"): + new_attr = new_attr.replace("asAn", "as") + elif new_attr.startswith("asA"): + new_attr = new_attr.replace("asA", "as") + elif new_attr.startswith("isAn"): + new_attr = new_attr.replace("isAn", "is") + elif new_attr.startswith("isA"): + new_attr = new_attr.replace("isA", "is") + + # change 'ID()' into 'id()' + if new_attr == "ID": + new_attr = "id" + + # change all caps into lowercase + if new_attr.isupper(): + new_attr = new_attr.lower() + + # change nSomething into num_somthing + m = re.match("^n([A-Z])[a-z]", new_attr) + + if m: + new_attr = f"num_{m.groups()[0].lower()}{new_attr[2:]}" + + # now change anyCapitalLetter into any_capital_letter + new_attr = "_".join(_upper_split(new_attr)).lower() + + if new_attr != attr: + try: + setattr(C, new_attr, getattr(C, attr)) + + if delete_old: + delattr(C, attr) + except Exception: + # this is a base-class function + pass + + # need to do this in all of the bases too + #for B in C.mro(): + # try: + # setattr(B, new_attr, getattr(B, attr)) + # + # if delete_old: + # delattr(B, attr) + # except Exception: + # # this is not in the base class + # pass + + +def _pythonize_modules(modules, delete_old: bool = True): + """Pythonize all classes in the passed module""" + + for MOD in modules: + import inspect + + try: + for (key, cls) in inspect.getmembers(MOD, inspect.isclass): + _pythonize(cls, delete_old=delete_old) + except Exception as e: + print(e) + print(f"Failed to pythonize {MOD}") + + +_is_using_old_api = None +_is_using_new_api = None + + +def use_mixed_api(support_old_module_names: bool = False): + """Load Sire using both the new (python-style) and old APIs. This + is useful for migrating old scripts as a temporary porting option. + You can start writing functions using the new API, safe in the + knowledge that the old API functions will still work. + + Do aim to finish your port though, else you will forever have + a duplicated API (e.g. have both X.nAtoms() and X.num_atoms() etc.) + """ + global _is_using_new_api, _is_using_old_api + + if _is_using_old_api and _is_using_new_api: + # don't need to do this twice + return + + if _is_using_old_api or _is_using_new_api: + msg = "Cannot import sire using the mixed API as either the old " \ + "or new APIs have already been activated." + print(msg) + + raise ImportError(msg) + + # First, bring in the old API + if support_old_module_names: + print("Loading Sire with support for old module names.") + print("Note that this can cause problems with classes importing twice.") + use_old_api() + else: + _is_using_old_api = True + + # Now, bring in the new API + _is_using_new_api = True + + # call Pythonize on all of the new modules + from . import move, io, system, squire, mm, ff, mol, \ + analysis, base, cas, cluster, error, \ + id, maths, qt, stream, units, vol + + _pythonize_modules([analysis._Analysis, + base._Base, + cas._CAS, + cluster._Cluster, + error._Error, + ff._FF, + id._ID, + io._IO, + maths._Maths, + mm._MM, + mol._Mol, + move._Move, + qt._Qt, + squire._Squire, + stream._Stream, + system._System, + units._Units, + vol._Vol], delete_old=False) + + +def use_new_api(): + """Load Sire using the new (python-style) API. This will be called + automatically when you load any of the new Python modules, so you + shouldn't need to call this yourself. + """ + global _is_using_new_api, _is_using_old_api + + if _is_using_new_api: + # already done + return + + if _is_using_old_api: + msg = "Cannot import sire using the new API as the old API has " \ + "already been activated. Both APIs cannot be active at " \ + "the same time." + print(msg) + + raise ImportError(msg) + + _is_using_new_api = True + + # call Pythonize on all of the new modules + from . import move, io, system, squire, mm, ff, mol, \ + analysis, base, cas, cluster, error, \ + id, maths, qt, stream, units, vol + + _pythonize_modules([analysis._Analysis, + base._Base, + cas._CAS, + cluster._Cluster, + error._Error, + ff._FF, + id._ID, + io._IO, + maths._Maths, + mm._MM, + mol._Mol, + move._Move, + qt._Qt, + squire._Squire, + stream._Stream, + system._System, + units._Units, + vol._Vol]) + + +def use_old_api(): + """Load Sire using the old (C++-style) API. This is for + compatibility reasons for old code only. This should + not be used with new code + """ + global _is_using_old_api, _is_using_new_api + + if _is_using_new_api: + raise ImportError( + "Cannot import Sire using the old API as the new API has " + "already been activated. Both APIs cannot be active at " + "the same time.") + + if _is_using_old_api: + # already active + return + + _is_using_old_api = True + + from . import legacy + + # set up the meta-importer with these modules - thanks to this post + # for all of the info + # https://dev.to/dangerontheranger/dependency-injection-with-import-hooks-in-python-3-5hap + import importlib.abc + import importlib.machinery + import sys + import types + + class DependencyInjectorLoader(importlib.abc.Loader): + def __init__(self): + self._services = {} + self._dummy_module = types.ModuleType("Sire") + self._dummy_module.__path__ = [] + + def provide(self, service_name, module): + """Register a service as provided via the given module + A service is any Python object in this context - an imported module, + a class, etc.""" + self._services[service_name] = module + + def provides(self, fullname): + if fullname in self._services: + return True + else: + return False + + def create_module(self, spec): + """Create the given module from the supplied module spec + Under the hood, this module returns a service or a dummy module, + depending on whether Python is still importing one of the names listed + in _COMMON_PREFIX. + """ + service_name = spec.name + + if service_name not in self._services: + # return our dummy module since at this point we're loading + # *something* along the lines of "myapp.virtual" that's not + # a service + return self._dummy_module + + module = self._services[service_name] + return module + + def exec_module(self, module): + """Execute the given module in its own namespace + This method is required to be present by importlib.abc.Loader, + but since we know our module object is already fully-formed, + this method merely no-ops. + """ + pass + + + class DependencyInjectorFinder(importlib.abc.MetaPathFinder): + def __init__(self, loader): + # we'll write the loader in a minute, hang tight + self._loader = loader + + def find_spec(self, fullname, path, target=None): + """Attempt to locate the requested module + fullname is the fully-qualified name of the module, + path is set to __path__ for sub-modules/packages, or None otherwise. + target can be a module object, but is unused in this example. + """ + if self._loader.provides(fullname): + return self._gen_spec(fullname) + + def _gen_spec(self, fullname): + spec = importlib.machinery.ModuleSpec(fullname, self._loader) + return spec + + + class DependencyInjector: + """ + Convenience wrapper for DependencyInjectorLoader and DependencyInjectorFinder. + """ + def __init__(self): + self._loader = DependencyInjectorLoader() + self._finder = DependencyInjectorFinder(self._loader) + + def install(self): + sys.meta_path.append(self._finder) + + def provide(self, service_name, module): + self._loader.provide(service_name, module) + + injector = DependencyInjector() + + # Use 'legacy' as a stand-in for Sire + injector.provide("Sire", legacy) + injector.install() diff --git a/src/sire/_thumbsup.py b/src/sire/_thumbsup.py new file mode 100644 index 000000000..e7629662e --- /dev/null +++ b/src/sire/_thumbsup.py @@ -0,0 +1,165 @@ + +__all__ = ["thumbs_up", "disable_thumbs_up", + "get_thumbs_up_info"] + +def _get_deny_filename(): + from pathlib import Path + return Path.joinpath(Path.home(), ".sire_no_thumbs_up.txt") + + +def _is_thumbs_up_denied(): + """Return whether or not thumbs up are denied""" + import os + + if "SIRE_DONT_PHONEHOME" in os.environ and \ + os.environ["SIRE_DONT_PHONEHOME"] != "0": + return True + elif os.path.exists(_get_deny_filename()): + return True + else: + return False + + +def disable_thumbs_up(): + """Permanently disable thumbs up. This will write a file + into your home directory called '.sire_no_thumbs_up.txt'. + If this file exists, then thumbs up are denied and + no data will be sent to siremol.org. + + The only way to re-enable thumbs up is to remove + the $HOME/.sire_no_thumbs_up.txt file. + """ + if not _is_thumbs_up_denied(): + with open(_get_deny_filename(), "w") as FILE: + FILE.write("Sire's thumbs up is disabled.\n" + "Remove this file if you want to re-enable it.") + +_thumbs_up_data = None + + +def get_thumbs_up_info(): + """Return the info that will be sent to siremol.org if you call + the thumbs_up() function. This will return nothing if you + have disabled thumbs up using the 'disable_thumbs_up()' function. + """ + if _is_thumbs_up_denied(): + return None + + global _thumbs_up_data + + if _thumbs_up_data is not None: + return _thumbs_up_data + + import sire + import sire.legacy + from sire.legacy.Base import CPUID + import os + import sys + import platform + + id = CPUID() + + data = {} + + # get information about the processor + data["processor"] = id.brand() + data["vendor"] = id.vendor() + data["clockspeed"] = id.clockSpeed() + data["numcores"] = id.numCores() + + # get information about the operating system + data["platform"] = platform.system() + + if platform.system().startswith("Darwin"): + data["OS"] = platform.mac_ver()[0] + elif platform.system().startswith("Linux"): + ld = platform.linux_distribution() + data["OS"] = "%s (%s %s)" % (ld[0],ld[1],ld[2]) + elif platform.system().startswith("Windows"): + ld = platform.win32_ver() + data["OS"] = "%s (%s %s)" % (ld[0],ld[1],ld[2]) + else: + data["OS"] = "unknown" + + u = platform.uname() + data["uname"] = "%s | %s | %s | %s" % (u.system,u.release,u.machine,u.processor) + + # get information about the version of Sire + data["version"] = sire.__version__ + data["repository"] = sire.config.sire_repository_url + data["repository_version"] = sire.config.sire_repository_version + + # now get information about which Sire app is running + import sys as _sys + # get the executable name, but make sure we don't get the path + # (as it may contain sensitive user information) + data["executable"] = os.path.basename( _sys.executable ) + + # Was Sire was imported as part of BioSimSpace? + # If so, then rename the executable. + if "BioSimSpace" in sys.modules: + data["executable"] = "BioSimSpace" + + _thumbs_up_data = data + + return _thumbs_up_data + + +_sent_usage_data = None + + +def thumbs_up(): + """Give Sire a thumbs up! This will send a small amount of data + to siremol.org to let us know that you like Sire, and what + operating system and version of Sire you are using. + + (you can see all of the information that would be sent + by calling "get_thumbs_up_info()") + + You can get more information about what is sent and why + this is useful to us by visiting https://siremol.org/thumbs_up + + You can permanently disable thumbs_up() on your computer by + calling "disable_thumbs_up()". This will write a small + file to your home directory that will tell Sire to not + allow any more thumbs_up data to be sent. + """ + global _sent_usage_data + + if _sent_usage_data is not None: + # silently return - we will only send one thumbs up per run + return + + data = get_thumbs_up_info() + + if data is None: + # we aren't allowed to send anything + return + + try: + import json + import os + + import http.client as htc + import urllib.parse as parse + + params = parse.urlencode({'data' : json.dumps(data)}) + headers = {"Content-type": "application/x-www-form-urlencoded", + "Accept": "text/plain"} + + _sent_usage_data = data + + conn = htc.HTTPSConnection("siremol.org") + conn.request("POST", "/phonehome/postusagestats.php", params, headers) + + # Next time this breaks, remember to uncomment the below lines so that + # we can inspect the response code and error from the server... + + #r1 = conn.getresponse() + #print(r1.status, r1.reason) + #print(r1.read()) + + except Exception: + # something went wrong - just ignore the error + # and cancel the phone home + return diff --git a/src/sire/analysis/CMakeLists.txt b/src/sire/analysis/CMakeLists.txt new file mode 100644 index 000000000..fb7fa6dde --- /dev/null +++ b/src/sire/analysis/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.analysis +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/analysis ) diff --git a/src/sire/analysis/__init__.py b/src/sire/analysis/__init__.py new file mode 100644 index 000000000..9d96fd4d4 --- /dev/null +++ b/src/sire/analysis/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.analysis + +""" + +from ..legacy import Analysis as _Analysis + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/base/CMakeLists.txt b/src/sire/base/CMakeLists.txt new file mode 100644 index 000000000..5e8fe3856 --- /dev/null +++ b/src/sire/base/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.base +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/base ) diff --git a/src/sire/base/__init__.py b/src/sire/base/__init__.py new file mode 100644 index 000000000..1d8340fbd --- /dev/null +++ b/src/sire/base/__init__.py @@ -0,0 +1,14 @@ +""" +.. currentmodule:: sire.base + +""" + +from ..legacy import Base as _Base + +from .. import use_new_api as _use_new_api +_use_new_api() + +Property = _Base.Property +Properties = _Base.Properties + +wrap = _Base.wrap diff --git a/src/sire/build/cmake/cmake_uninstall.cmake.in b/src/sire/build/cmake/cmake_uninstall.cmake.in new file mode 100644 index 000000000..fcdba7231 --- /dev/null +++ b/src/sire/build/cmake/cmake_uninstall.cmake.in @@ -0,0 +1,23 @@ +# COPIED FROM http://www.vtk.org/Wiki/CMake_FAQ#Does_CMake.27s_.22make_install.22_support_DESTDIR.3F + +IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +STRING(REGEX REPLACE "\n" ";" files "${files}") +FOREACH(file ${files}) + MESSAGE(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"") + IF(EXISTS "$ENV{DESTDIR}${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF(NOT "${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"") + ENDIF(NOT "${rm_retval}" STREQUAL 0) + ELSE(EXISTS "$ENV{DESTDIR}${file}") + MESSAGE(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.") + ENDIF(EXISTS "$ENV{DESTDIR}${file}") +ENDFOREACH(file) diff --git a/src/sire/build/cmake/install_python.cmake b/src/sire/build/cmake/install_python.cmake new file mode 100644 index 000000000..5fe1b33a7 --- /dev/null +++ b/src/sire/build/cmake/install_python.cmake @@ -0,0 +1,63 @@ +if (NOT DEFINED PYTHON_EXECUTABLE) + # we will just use the python that comes with anaconda + if (MSYS) + set (PYTHON_EXECUTABLE "${ANACONDA_BASE}/python" ) + elseif (MSVC) + set (PYTHON_EXECUTABLE "${ANACONDA_BASE}/python.exe" ) + else() + set (PYTHON_EXECUTABLE "${ANACONDA_BASE}/bin/python3" ) + endif() +endif() + +find_package( PythonInterp REQUIRED ) + +set( PYTHON_VERSION "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}" ) + +unset(PYTHON_LIBRARY CACHE) + +# sys.abiflags is an empty string for Python >= 3.8 +if (${PYTHON_VERSION} LESS 3.8) + set(PYTHON_ABIFLAGS "m") +else() + set(PYTHON_ABIFLAGS "") +endif() + +if (MSVC) + find_library( PYTHON_LIBRARY + NAMES python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR}.lib + PATHS ${ANACONDA_BASE}/libs NO_DEFAULT_PATH ) +else() + find_library( PYTHON_LIBRARY + NAMES python${PYTHON_VERSION}${PYTHON_ABIFLAGS} + PATHS ${ANACONDA_BASE}/lib NO_DEFAULT_PATH ) +endif() + +if (NOT PYTHON_LIBRARY) + message( FATAL_ERROR "Where is the python library that comes with anaconda? " + "It cannot be found. Please check that your anaconda " + "installation is complete." ) +endif() + +set( PYTHON_LIBRARIES "${PYTHON_LIBRARY}" ) +if (CMAKE_GENERATOR MATCHES "Visual Studio") # MSBuild + set( PYTHON_SITE_DIR "../../lib/site-packages" ) +else() + set( PYTHON_SITE_DIR "../../lib/python${PYTHON_VERSION}/site-packages" ) +endif() + +if(CMAKE_GENERATOR MATCHES "Visual Studio") # MSBuild + set( PYTHON_MODULE_EXTENSION ".pyd" ) +else() + set( PYTHON_MODULE_EXTENSION ".so" ) + get_filename_component(PYTHON_INCLUDE_DIR "${PYTHON_LIBRARY}" DIRECTORY) + get_filename_component(PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}" DIRECTORY) + set( PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}/include") + if (NOT MSVC) + set( PYTHON_INCLUDE_DIR "${PYTHON_INCLUDE_DIR}/python${PYTHON_VERSION}${PYTHON_ABIFLAGS}" ) + endif() +endif() + +message( STATUS "Using anaconda/miniconda python in ${PYTHON_LIBRARIES} | ${PYTHON_INCLUDE_DIR}" ) +message( STATUS "Python modules will be installed to ${PYTHON_SITE_DIR}" ) + +set( SIRE_FOUND_PYTHON TRUE ) diff --git a/src/sire/cas/CMakeLists.txt b/src/sire/cas/CMakeLists.txt new file mode 100644 index 000000000..770595ba4 --- /dev/null +++ b/src/sire/cas/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.cas +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/cas ) diff --git a/src/sire/cas/__init__.py b/src/sire/cas/__init__.py new file mode 100644 index 000000000..2024f5afb --- /dev/null +++ b/src/sire/cas/__init__.py @@ -0,0 +1,12 @@ +""" +.. currentmodule:: sire.cas + +""" + +from ..legacy import CAS as _CAS + +from .. import use_new_api as _use_new_api +_use_new_api() + +Symbol = _CAS.Symbol +Expression = _CAS.Expression diff --git a/src/sire/cluster/CMakeLists.txt b/src/sire/cluster/CMakeLists.txt new file mode 100644 index 000000000..6ebae43b4 --- /dev/null +++ b/src/sire/cluster/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.cluster +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/cluster ) diff --git a/src/sire/cluster/__init__.py b/src/sire/cluster/__init__.py new file mode 100644 index 000000000..811960d0b --- /dev/null +++ b/src/sire/cluster/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.cluster + +""" + +from ..legacy import Cluster as _Cluster + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/config/CMakeLists.txt b/src/sire/config/CMakeLists.txt new file mode 100644 index 000000000..3c99ecedf --- /dev/null +++ b/src/sire/config/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.config +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/config ) diff --git a/src/sire/config/__init__.py b/src/sire/config/__init__.py new file mode 100644 index 000000000..5672be5ba --- /dev/null +++ b/src/sire/config/__init__.py @@ -0,0 +1,11 @@ +""" +.. currentmodule:: sire.config + +This provides configuration data for this installation of sire +""" + +from ..legacy import Config as _Config + +__version__ = _Config.__version__ + +from ..legacy.Config import * diff --git a/src/sire/error/CMakeLists.txt b/src/sire/error/CMakeLists.txt new file mode 100644 index 000000000..2ffdfafc6 --- /dev/null +++ b/src/sire/error/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.error +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/error ) diff --git a/src/sire/error/__init__.py b/src/sire/error/__init__.py new file mode 100644 index 000000000..5aa9561cb --- /dev/null +++ b/src/sire/error/__init__.py @@ -0,0 +1,12 @@ +""" +.. currentmodule:: sire.error + +""" + +from ..legacy import Error as _Error + +from .. import use_new_api as _use_new_api +_use_new_api() + +from ..legacy.Error import get_last_error_details + diff --git a/src/sire/ff/CMakeLists.txt b/src/sire/ff/CMakeLists.txt new file mode 100644 index 000000000..8574bacaa --- /dev/null +++ b/src/sire/ff/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.ff +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/ff ) diff --git a/src/sire/ff/__init__.py b/src/sire/ff/__init__.py new file mode 100644 index 000000000..71446ef3f --- /dev/null +++ b/src/sire/ff/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.ff + +""" + +from ..legacy import FF as _FF + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/id/CMakeLists.txt b/src/sire/id/CMakeLists.txt new file mode 100644 index 000000000..19cc69d98 --- /dev/null +++ b/src/sire/id/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.id +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/id ) diff --git a/src/sire/id/__init__.py b/src/sire/id/__init__.py new file mode 100644 index 000000000..80e7a40a0 --- /dev/null +++ b/src/sire/id/__init__.py @@ -0,0 +1,12 @@ +""" +.. currentmodule:: sire.id + +""" + +from ..legacy import ID as _ID + +from .. import use_new_api as _use_new_api +_use_new_api() + +CaseSensitive = _ID.CaseSensitive +CaseInsensitive = _ID.CaseInsensitive diff --git a/src/sire/io/CMakeLists.txt b/src/sire/io/CMakeLists.txt new file mode 100644 index 000000000..c3de1bda7 --- /dev/null +++ b/src/sire/io/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.io +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/io ) diff --git a/src/sire/io/__init__.py b/src/sire/io/__init__.py new file mode 100644 index 000000000..b0468f018 --- /dev/null +++ b/src/sire/io/__init__.py @@ -0,0 +1,15 @@ +""" +.. currentmodule:: sire.io + +""" + +from ..legacy import IO as _IO +from .. import use_new_api as _use_new_api +_use_new_api() + +from .. import system as _system + +def load_molecules(*args, **kwargs): + from ..legacy.IO import load_molecules as _load_molecules + from ..system import System + return System(_load_molecules(*args, **kwargs)) diff --git a/src/sire/maths/CMakeLists.txt b/src/sire/maths/CMakeLists.txt new file mode 100644 index 000000000..ab5e7ca11 --- /dev/null +++ b/src/sire/maths/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.maths +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/maths ) diff --git a/src/sire/maths/__init__.py b/src/sire/maths/__init__.py new file mode 100644 index 000000000..fc7b13fc8 --- /dev/null +++ b/src/sire/maths/__init__.py @@ -0,0 +1,13 @@ +""" +.. currentmodule:: sire.maths + + +""" + +from ..legacy import Maths as _Maths + +from .. import use_new_api as _use_new_api +_use_new_api() + +Vector = _Maths.Vector + diff --git a/src/sire/mm/CMakeLists.txt b/src/sire/mm/CMakeLists.txt new file mode 100644 index 000000000..7396885f0 --- /dev/null +++ b/src/sire/mm/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.mm +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/mm ) diff --git a/src/sire/mm/__init__.py b/src/sire/mm/__init__.py new file mode 100644 index 000000000..b7677b305 --- /dev/null +++ b/src/sire/mm/__init__.py @@ -0,0 +1,13 @@ +""" +.. currentmodule:: sire.mm + +""" + +from ..legacy import MM as _MM + +from .. import use_new_api as _use_new_api +_use_new_api() + +Bond = _MM.Bond +SelectorBond = _MM.SelectorBond +SelectorMBond = _MM.SelectorMBond diff --git a/src/sire/mol/CMakeLists.txt b/src/sire/mol/CMakeLists.txt new file mode 100644 index 000000000..14397564d --- /dev/null +++ b/src/sire/mol/CMakeLists.txt @@ -0,0 +1,14 @@ +######################################## +# +# sire.mol +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + _cursor.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/mol ) diff --git a/src/sire/mol/__init__.py b/src/sire/mol/__init__.py new file mode 100644 index 000000000..2b236c352 --- /dev/null +++ b/src/sire/mol/__init__.py @@ -0,0 +1,465 @@ +""" +.. currentmodule:: sire.mol + +""" + +from ..legacy import Mol as _Mol +from .. import use_new_api as _use_new_api +_use_new_api() + +from ..legacy import Base as _Base + +from ..legacy.Mol import AtomName, AtomNum, AtomIdx, AtomID, \ + ResName, ResNum, ResIdx, ResID, \ + ChainName, ChainIdx, ChainID, \ + SegName, SegIdx, SegID, \ + CGName, CGIdx, CGID, \ + MolName, MolNum, MolIdx, MolID, \ + BondID, AngleID, DihedralID, ImproperID, \ + Atom, Selector_Atom_, SelectorM_Atom_, \ + CutGroup, Selector_CutGroup_, SelectorM_CutGroup_, \ + Residue, Selector_Residue_, SelectorM_Residue_, \ + Chain, Selector_Chain_, SelectorM_Chain_, \ + Segment, Selector_Segment_, SelectorM_Segment_, \ + Molecule, SelectorMol, \ + MoleculeView, Select + +# Here I will define some functions that make accessing +# things from moleculeviews more convenient +def __is_molecule_class(obj): + mro = type(obj).mro() + + return Molecule in mro or \ + SelectorMol in mro + + +def __is_bond_class(obj): + mro = type(obj).mro() + + from sire.mm import Bond, SelectorBond + + return Bond in mro or \ + SelectorBond in mro + + +def __is_atom_class(obj): + mro = type(obj).mro() + + return Atom in mro or \ + Selector_Atom_ in mro or \ + SelectorM_Atom_ in mro + + +def __is_residue_class(obj): + mro = type(obj).mro() + + return Residue in mro or \ + Selector_Residue_ in mro or \ + SelectorM_Residue_ in mro + + +def __is_chain_class(obj): + mro = type(obj).mro() + + return Chain in mro or \ + Selector_Chain_ in mro or \ + SelectorM_Chain_ in mro + + +def __is_segment_class(obj): + mro = type(obj).mro() + + return Segment in mro or \ + Selector_Segment_ in mro or \ + SelectorM_Segment_ in mro + + +def __is_cutgroup_class(obj): + mro = type(obj).mro() + + return CutGroup in mro or \ + Selector_CutGroup_ in mro or \ + SelectorM_CutGroup_ in mro + + +def __is_selector_class(obj): + t = obj.what() + return t.find("SireMol::Selector") != -1 or \ + t.find("SireMM::Selector") != -1 + + +def __is_list_class(obj): + if type(obj) is list: + return True + else: + try: + return obj.what().find("::Selector") != -1 + except Exception: + return False + + +def __fix_obj(obj): + """This is needed because MolViewPtr objects that hold Selector_T_ types + do not convert properly. + """ + w = obj.what() + + if w == Molecule.typename(): + return obj + elif w == Selector_Atom_.typename(): + return obj.atoms() + elif w == Selector_Residue_.typename(): + return obj.residues() + elif w == Selector_Chain_.typename(): + return obj.chains() + elif w == Selector_Segment_.typename(): + return obj.segments() + elif w == Selector_CutGroup_.typename(): + return obj.cutgroups() + else: + return obj + + +def __from_select_result(obj): + """Convert the passed SelectResult from a search into the + most appropriate MoleculeView-derived class + """ + if hasattr(obj, "listCount") and not hasattr(obj, "list_count"): + # Sometimes the SelectResult hasn't been converted, i.e. because + # it has come from an old api or mixed version of Sire, or + # BioSimSpace has done something weird... + raise SystemError( + "Something has gone wrong with sire. Despite being loaded " + "with the new or mixed API, it is being passed the object " + f"'{obj}' of type {type(obj)} which only has the old API active. " + "Has Sire been loaded with support for old module names?") + + if obj.list_count() == 0: + raise KeyError("Nothing matched the search.") + + typ = obj.get_common_type() + + if obj.list_count() == 1: + obj = __fix_obj(obj.list_at(0)) + + if obj.what() == "SireMM::SelectorBond": + if obj.count() == 1: + obj = obj[0] + elif obj.what() != typ: + if typ == Molecule.typename(): + return obj.molecule() + elif typ == Segment.typename(): + return obj.segments(auto_reduce=True) + elif typ == Chain.typename(): + return obj.chains(auto_reduce=True) + elif typ == Residue.typename(): + return obj.residues(auto_reduce=True) + elif typ == Atom.typename(): + return obj.atoms(auto_reduce=True) + + return obj + + if typ == Molecule.typename(): + return SelectorMol(obj) + elif typ == Atom.typename(): + return SelectorM_Atom_(obj) + elif typ == Residue.typename(): + return SelectorM_Residue_(obj) + elif typ == Chain.typename(): + return SelectorM_Chain_(obj) + elif typ == Segment.typename(): + return SelectorM_Segment_(obj) + elif typ == CutGroup.typename(): + return SelectorM_CutGroup_(obj) + else: + from ..mm import SelectorBond, SelectorMBond + if SelectorBond in type(obj.list_at(0)).mro(): + return SelectorMBond(obj) + else: + # return this as a raw list + return obj.to_list() + + +def __select_call__(obj, molecules, map={}): + """Search for the desired objects in the passed molecules, + optionally passing in a property map to identify the properties + """ + from ..system import System + if type(molecules) is System: + molecules = molecules._system + + return __from_select_result(obj.__orig_call__(molecules, map)) + + +if not hasattr(Select, "__orig_call__"): + Select.__orig_call__ = Select.__call__ + Select.__call__ = __select_call__ + + +def __fixed__getitem__(obj, key): + if type(key) is int: + if __is_selector_class(obj): + return obj.__orig__getitem__(key) + elif __is_chain_class(obj): + return obj.residue(key) + else: + return obj.atom(key) + elif type(key) is str: + # is this a search object - if so, then return whatever is + # most relevant from the search + try: + return __from_select_result(obj.search(key)) + except SyntaxError: + pass + elif AtomID in type(key).mro(): + return obj.atoms(key, auto_reduce=True) + elif ResID in type(key).mro(): + return obj.residues(key, auto_reduce=True) + elif ChainID in type(key).mro(): + return obj.chains(key, auto_reduce=True) + elif SegID in type(key).mro(): + return obj.segments(key, auto_reduce=True) + elif BondID in type(key).mro(): + return obj.bonds(key, auto_reduce=True) + + if __is_selector_class(obj): + return obj.__orig__getitem__(key) + elif __is_chain_class(obj): + return obj.residues(key, auto_reduce=True) + else: + return obj.atoms(key, auto_reduce=True) + + +def __fixed__atoms__(obj, idx=None, auto_reduce=False): + if idx is None: + result = obj.__orig__atoms() + elif type(idx) is range: + result = obj.__orig__atoms(list(idx)) + else: + result = obj.__orig__atoms(idx) + + if auto_reduce and len(result) == 1: + return result[0] + else: + return result + + +def __fixed__bonds__(obj, idx=None, idx1=None, auto_reduce=False): + if idx is None and idx1 is not None: + idx = idx1 + idx1 = None + + if hasattr(obj, "molecules"): + # this is a multi-molecule container + from ..mm import SelectorMBond + C = SelectorMBond + def _fromBondID(obj, bondid): + return SelectorMBond(obj.to_select_result(), bondid) + else: + from ..mm import SelectorBond + C = SelectorBond + def _fromBondID(obj, bondid): + return SelectorBond(obj, bondid) + + if idx is None: + result = C(obj) + elif idx1 is None: + if BondID in type(idx).mro(): + result = _fromBondID(obj, idx) + else: + result = C(obj.atoms(idx)) + else: + result = C(obj.atoms(idx), obj.atoms(idx1)) + + if auto_reduce and len(result) == 1: + return result[0] + else: + return result + + +def __fixed__bond__(obj, idx=None, idx1=None): + bonds = __fixed__bonds__(obj, idx, idx1, auto_reduce=False) + + if len(bonds) == 0: + raise KeyError("There is no matching bond in this view.") + elif len(bonds) > 1: + raise KeyError( + f"More than one bond matches. Number of matches is {len(bonds)}.") + + return bonds[0] + + +def __fixed__residues__(obj, idx=None, auto_reduce=False): + + if idx is None: + result = obj.__orig__residues() + elif type(idx) is range: + result = obj.__orig__residues(list(idx)) + else: + result = obj.__orig__residues(idx) + + if auto_reduce and len(result) == 1: + return result[0] + else: + return result + + +def __fixed__chains__(obj, idx=None, auto_reduce=False): + if idx is None: + result = obj.__orig__chains() + elif type(idx) is range: + result = obj.__orig__chains(list(idx)) + else: + result = obj.__orig__chains(idx) + + if auto_reduce and len(result) == 1: + return result[0] + else: + return result + + +def __fixed__segments__(obj, idx=None, auto_reduce=False): + if idx is None: + result = obj.__orig__segments() + elif type(idx) is range: + result = obj.__orig__segments(list(idx)) + else: + result = obj.__orig__segments(idx) + + if auto_reduce and len(result) == 1: + return result[0] + else: + return result + + +def __fixed__molecules__(obj, idx=None, auto_reduce=False): + if idx is None: + result = obj.__orig__molecules() + elif type(idx) is range: + result = obj.__orig__molecules(list(idx)) + else: + result = obj.__orig__molecules(idx) + + if auto_reduce and len(result) == 1: + return result[0] + else: + return result + + +def __fix_getitem(C): + if not hasattr(C, "__orig__getitem__"): + C.__orig__getitem__ = C.__getitem__ + + if not hasattr(C, "__orig__atoms"): + C.__orig__atoms = C.atoms + + if not hasattr(C, "__orig__residues"): + C.__orig__residues = C.residues + + if not hasattr(C, "__orig__chains"): + C.__orig__chains = C.chains + + if not hasattr(C, "__orig__segments"): + C.__orig__segments = C.segments + + C.__getitem__ = __fixed__getitem__ + C.atoms = __fixed__atoms__ + C.residues = __fixed__residues__ + C.chains = __fixed__chains__ + C.segments = __fixed__segments__ + + C.count = C.__len__ + C.size = C.__len__ + + if hasattr(C, "molecules"): + if not hasattr(C, "__orig__molecules"): + C.__orig__molecules = C.molecules + + C.molecules = __fixed__molecules__ + + C.bonds = __fixed__bonds__ + C.bond = __fixed__bond__ + +from ..mm import Bond as _Bond +from ..mm import SelectorBond as _SelectorBond +from ..mm import SelectorMBond as _SelectorMBond + +try: + _Bond.__len__ = _Bond.nAtoms + Residue.__len__ = Residue.nAtoms + Chain.__len__ = Chain.nResidues + Segment.__len__ = Segment.nAtoms + CutGroup.__len__ = CutGroup.nAtoms + Molecule.__len__ = Molecule.nAtoms +except AttributeError: + _Bond.__len__ = _Bond.num_atoms + Residue.__len__ = Residue.num_atoms + Chain.__len__ = Chain.num_residues + Segment.__len__ = Segment.num_atoms + CutGroup.__len__ = CutGroup.num_atoms + Molecule.__len__ = Molecule.num_atoms + +for C in [Atom, CutGroup, Residue, Chain, Segment, Molecule, + Selector_Atom_, Selector_Residue_, + Selector_Chain_, Selector_Segment_, + Selector_CutGroup_, + SelectorMol, SelectorM_Atom_, SelectorM_Residue_, + SelectorM_Chain_, SelectorM_Segment_, + SelectorM_CutGroup_, + _Bond, _SelectorBond, _SelectorMBond]: + __fix_getitem(C) + +MoleculeView.coordinates = lambda x : x.property("coordinates") +Atom.element = lambda x : x.property("element") +Atom.x = lambda x : x.property("coordinates").x() +Atom.y = lambda x : x.property("coordinates").y() +Atom.z = lambda x : x.property("coordinates").z() + +def _add_evals(obj): + obj.mass = lambda x : x.evaluate().mass() + obj.charge = lambda x : x.evaluate().charge() + +for C in [MoleculeView, SelectorMol, SelectorM_Atom_, + SelectorM_Residue_, SelectorM_Chain_, + SelectorM_CutGroup_, SelectorM_Segment_, + _Bond, _SelectorBond, _SelectorMBond]: + _add_evals(C) + +def _get_atom_mass(x): + if x.has_property("mass"): + return x.property("mass") + elif x.has_property("element"): + return x.property("element").mass() + else: + return 0 + +Atom.mass = _get_atom_mass + +def _get_atom_charge(x): + if x.has_property("charge"): + return x.property("charge") + elif x.has_property("formal_charge"): + return x.property("formal_charge") + else: + return 0 + +Atom.charge = _get_atom_charge + +Molecule.connectivity = lambda x : x.property("connectivity") + +#### Here are some extra classes / functions defined as part of the +#### public API + +from ._cursor import * + +def _cursor(view): + """Return a Cursor that can be used to edit the properties + of this view + """ + return Cursor(view) + +Atom.cursor = _cursor +Residue.cursor = _cursor +Chain.cursor = _cursor +Segment.cursor = _cursor +Molecule.cursor = _cursor diff --git a/src/sire/mol/_cursor.py b/src/sire/mol/_cursor.py new file mode 100644 index 000000000..cfc4a0092 --- /dev/null +++ b/src/sire/mol/_cursor.py @@ -0,0 +1,563 @@ + +__all__ = ["Cursor"] + + +class _CursorData: + """This is the shared data class that holds all of the data + for a Cursor. This is held by all Cursors that are derived + from the same object, meaning that multiple Cursors + can share the same molecule editor. Note that the + Cursor is not thread-safe (unlike the underlying + system used by Sire) + """ + def __init__(self, molecule = None, + connectivity_property: str="connectivity"): + if molecule is None: + self.molecule = None + else: + self.molecule = molecule.molecule().edit() + + self.connectivity_property = connectivity_property + + try: + self.connectivity = self.molecule.property( + self.connectivity_property).edit() + except Exception: + # the molecule doesn't have a connectivity. Create one for it + from ..legacy.Mol import CovalentBondHunter + hunter = CovalentBondHunter() + + try: + self.connectivity = hunter(self.molecule) + self.molecule.set_property(self.connectivity_property, + self.connectivity) + self.connectivity = self.connectivity.edit() + except Exception: + pass + + def remove_bond_property(self, bond, key): + self.connectivity.remove_property(bond, key) + self.molecule.set_property(self.connectivity_property, + self.connectivity.commit()) + + def set_bond_property(self, bond, key, value): + self.connectivity.set_property(bond, key, value) + self.molecule.set_property(self.connectivity_property, + self.connectivity.commit()) + + def set_bond_properties(self, bond, values): + for key in values.keys(): + self.connectivity.set_property(bond, key, values[key]) + + self.molecule.set_property(self.connectivity_property, + self.connectivity.commit()) + + def update(self, view): + try: + return self.molecule[view.index()] + except Exception: + return self.molecule + + +class Cursor: + """This class provides a cursor that can be used to navigate through + and edit the properties of Molecules. This makes the whole + getting and setting of properties more pythonic in writing + style, while also saving some typing. + """ + def __init__(self, molecule = None, bond = None, + connectivity_property: str="connectivity"): + """Construct the Cursor to explore and edit the + properties of the passed MoleculeView. + + Note that you normally don't call this yourself. + Instead, you would create a Cursor by calling + the `.cursor()` function on the molecule view + itself. + + Examples: + >>> cursor = mol.cursor() + >>> cursor["cat"] = "meow" + >>> mol = cursor.commit() + """ + self._d = _CursorData(molecule=molecule, + connectivity_property=connectivity_property) + self._view = self._d.update(molecule) + self._bond = bond + + def _update(self): + self._view = self._d.update(self._view) + + def __str__(self): + if self._d.molecule is None: + return "Cursor::null" + else: + return f"Cursor({self.type()}:{self.id()})" + + def __repr__(self): + return self.__str__() + + def __delitem__(self, key): + self._update() + + if self._bond is None: + self._d.molecule.remove_property(key) + else: + self._d.remove_bond_property(self._bond, key) + + self._update() + + def __contains__(self, key): + self._update() + + if self._bond is None: + return self._view.has_property(key) + else: + return self._d.connectivity.has_property(self._bond, key) + + def __getitem__(self, key): + self._update() + + if self._bond is None: + return self._view.property(key) + else: + return self._d.connectivity.property(self._bond, key) + + def __setitem__(self, key, value): + self._update() + + if self._bond is None: + self._view.set_property(key, value) + self._d.molecule = self._view.molecule() + else: + self._d.set_bond_property(self._bond, key, value) + + self._update() + + def set(self, values): + """Set all of the properties from the passed dictionary of values""" + self._update() + + if self._bond is None: + self._d.set_bond_properties(self._bond, values) + else: + for key in values.keys(): + self._connectivity.set_property(self._bond, key, values[key]) + + self._molecule.set_property(self._connectivity_property, + self._connectivity.commit()) + + self._update() + + def bonds(self): + """Return cursors for all of the bonds in this + view or, if 'id' is supplied, the bonds in this + view that match 'id' + """ + self._update() + + cursors = [] + + from ..mm import SelectorBond + bonds = SelectorBond(self._view, {"connectivity": self._d.connectivity_property}) + + for bond in bonds: + c = Cursor() + c._d = self._d + c._view = self._d.molecule + c._bond = bond.id() + cursors.append(c) + + return cursors + + def atoms(self, id=None): + """Return cursors for all of atoms in this view, + of, if 'id' is supplied, the atoms in this view + that match 'id' + """ + self._update() + + cursors = [] + + if id is None: + atoms = self._view.atoms() + else: + atoms = self._view.atoms(id) + + for atom in atoms: + c = Cursor() + c._d = self._d + c._view = self._d.molecule.atom(atom.index()) + cursors.append(c) + + return cursors + + def residues(self, id=None): + """Return cursors for all of residues in this view, + of, if 'id' is supplied, the residues in this view + that match 'id' + """ + self._update() + + cursors = [] + + if id is None: + residues = self._view.residues() + else: + residues = self._view.residues(id) + + for residue in residues: + c = Cursor() + c._d = self._d + c._view = self._d.molecule.residue(residue.index()) + cursors.append(c) + + return cursors + + def chains(self, id=None): + """Return cursors for all of chains in this view, + of, if 'id' is supplied, the chains in this view + that match 'id' + """ + self._update() + + cursors = [] + + if id is None: + chains = self._view.chains() + else: + chains = self._view.chains(id) + + for chain in chains: + c = Cursor() + c._d = self._d + c._view = self._d.molecule.chain(chain.index()) + cursors.append(c) + + return cursors + + def segments(self, id=None): + """Return cursors for all of segments in this view, + of, if 'id' is supplied, the segments in this view + that match 'id' + """ + self._update() + + cursors = [] + + if id is None: + segments = self._view.segments() + else: + segments = self._view.segments(id) + + for segment in segments: + c = Cursor() + c._d = self._d + c._view = self._d.molecule.segment(segment.index()) + cursors.append(c) + + return cursors + + def atom(self, i): + """Return the atom in the molecule that matches the passed ID""" + self._update() + + c = Cursor() + c._d = self._d + c._view = self._view.atom(i) + c._update() + + return c + + def residue(self, i=None): + """Return the atom in the molecule that matches the passed ID. + If 'i' is None, then this returns the residue that contains + this atom (if this is an atom) + """ + if i is None: + try: + c = Cursor() + c._d = self._d + c._view = self._view.residue() + c._update() + return c + except Exception: + raise TypeError( + f"There is no residue that contains {self.type()}:{self.id()}" + ) + + self._update() + + c = Cursor() + c._d = self._d + c._view = c._view.residue(i) + c._update() + + return c + + def chain(self, i=None): + """Return the chain in the molecule that matches the passed ID. + If 'i' is None, then this returns the residue that contains + this atom (if this is an atom)""" + if i is None: + try: + c = Cursor() + c._d = self._d + c._view = self._view.chain() + c._update() + return c + except Exception: + raise TypeError( + f"There is no chain that contains {self.type()}:{self.id()}" + ) + + self._update() + + c = Cursor() + c._d = self._d + c._view = self._view.chain(i) + c._update() + + return c + + def segment(self, i=None): + """Return the segment in the molecule that matches the passed ID. + If 'i' is None, then this returns the residue that contains + this atom (if this is an atom)""" + if i is None: + try: + c = Cursor() + c._d = self._d + c._view = self._view.segment() + c._update() + return c + except Exception: + raise TypeError( + f"There is no segment that contains {self.type()}:{self.id()}" + ) + + self._update() + + c = Cursor() + c._d = self._d + c._view = self._view.segment(i) + c._update() + + return c + + def molecule(self): + """Return the molecule""" + self._update() + + c = Cursor() + c._d = self._d + c._view = self._d.molecule + return c + + def bond(self, bond, connectivity_property="connectivity"): + """Return the Cursor for the specified bond. This will + use the specified connectivity property to locate + the connectivity that defines the bonds in this molecule + """ + self._update() + + c = Cursor() + c._d = self._d + c._view = self._d.molecule + c._bond = bond + + return c + + def parent(self): + """Return the cursor of the parent object (e.g. parent residue + of the atom, parent chain of the residue, parent molecule + of the bond etc. This will return the Cursor for the whole + molecule if there isn't a suitable parent + """ + t = self.type() + + c = Cursor() + c._d = self._d + + c._view = c._d.molecule + + # The parent of an Atom is a Residue (if it is in one), and + # the parent of a Residue is a Chain (if it is in one). + # If this fails, then the parent is the Molecule + try: + if t == "atom": + c._view = self._view.residue() + elif t == "residue": + c._view = self._view.chain() + except Exception: + pass + + c._update() + + return c + + def name(self): + """Return the name of the current view""" + self._update() + + if self._bond is not None: + raise TypeError("A bond does not have a name!") + + return self._view.name() + + def number(self): + """Return the number of the current view""" + self._update() + + if self._bond is not None: + raise TypeError("A bond does not have a number!") + + try: + return self._view.number() + except Exception: + raise TypeError(f"A {self._view.what()} does not have a number!") + + def index(self): + """Return the index of the current view (e.g. AtomIdx, ResIdx etc)""" + self._update() + + if self._bond is not None: + raise TypeError("A bond does not have an index!") + + return self._view.index() + + def id(self): + """Return the ID of this view (e.g. AtomIdx, MolNum, BondID)""" + self._update() + + if self._bond is not None: + return self._bond + + try: + return self._view.index() + except Exception: + # objects without an index (e.g. molecule) use a number for their ID + return self._view.number() + + def type(self): + """Return the type of this Cursor (e.g. 'atom', 'bond', + 'residue', 'chain', 'segment' or 'molecule') + """ + if self.is_bond(): + return "bond" + + w = self._view.what() + + if w.find("Atom") != -1: + return "atom" + elif w.find("Res") != -1: + return "residue" + elif w.find("Chain") != -1: + return "chain" + elif w.find("Seg") != -1: + return "segment" + elif w.find("Mol") != -1: + return "molecule" + else: + raise TypeError(f"Cannot identify cursor type {w}") + + def is_molecule(self): + """Return whether this is pointing to a Molecule""" + return self.type() == "molecule" + + def is_bond(self): + """Return whether this is pointing to a Bond""" + self._update() + + return self._bond is not None + + def is_atom(self): + """Return whether this is pointing to an Atom""" + return self.type() == "atom" + + def is_residue(self): + """Return whether this is pointing to a Residue""" + return self.type() == "residue" + + def is_chain(self): + """Return whether this is pointing to a Chain""" + return self.type() == "chain" + + def is_segment(self): + """Return whether this is pointing to a Segment""" + return self.type() == "segment" + + def commit(self): + """Commit all of the changes and return the newly + edited molecule (or MoleculeView) + """ + self._update() + + mol = self._d.molecule.commit() + + if self._bond is None: + try: + return mol[self._view.index()] + except Exception: + return mol + else: + from ..mm import Bond + return Bond(self._d.molecule, self._bond.atom0(), self._bond.atom1()) + + def keys(self): + self._update() + + if self._bond is None: + return self._view.property_keys() + else: + return self._d.connectivity.property_keys(self._bond) + + def values(self): + self._update() + + try: + if self._bond is None: + return self._view.property_values() + else: + return self._d.connectivity.property_values(self._bond) + except Exception: + vals = [] + + for key in self.keys(): + vals.append(self.__getitem__(key)) + + return vals + + def items(self): + self._update() + + if self._bond is None: + keys = self._view.property_keys() + items = [] + + for key in keys: + items.append((key, self._view.property(key))) + else: + keys = self._d.connectivity.property_keys(self._bond) + items = [] + + for key in keys: + items.append((key, self._d.connectivity.property(self._bond, + key))) + + return items + + def properties(self): + """Return the sire.base.Properties object for the properties + of the current view + """ + from ..base import Properties + p = Properties() + + if self._bond is None: + for key in self.keys(): + p[key] = self.__getitem__(key) + else: + return self._d.connectivity.properties(self._bond) + + return p diff --git a/src/sire/move/CMakeLists.txt b/src/sire/move/CMakeLists.txt new file mode 100644 index 000000000..dd178f91b --- /dev/null +++ b/src/sire/move/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.move +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/move ) diff --git a/src/sire/move/__init__.py b/src/sire/move/__init__.py new file mode 100644 index 000000000..f488e7919 --- /dev/null +++ b/src/sire/move/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.move + +""" + +from ..legacy import Move as _Move + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/qt/CMakeLists.txt b/src/sire/qt/CMakeLists.txt new file mode 100644 index 000000000..246085e3f --- /dev/null +++ b/src/sire/qt/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.qt +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/qt ) diff --git a/src/sire/qt/__init__.py b/src/sire/qt/__init__.py new file mode 100644 index 000000000..0abde41e3 --- /dev/null +++ b/src/sire/qt/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.qt + +""" + +from ..legacy import Qt as _Qt + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/search/CMakeLists.txt b/src/sire/search/CMakeLists.txt new file mode 100644 index 000000000..382c0969b --- /dev/null +++ b/src/sire/search/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.search +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/search ) diff --git a/src/sire/search/__init__.py b/src/sire/search/__init__.py new file mode 100644 index 000000000..05f9e43da --- /dev/null +++ b/src/sire/search/__init__.py @@ -0,0 +1,15 @@ +""" +.. currentmodule:: sire.search + +""" + +from ..legacy import Search as _Search + +from .. import use_new_api as _use_new_api +_use_new_api() + +from ..legacy.Search import approx_equal, \ + set_approx_epsilon, get_approx_epsilon, \ + get_min_protein_residues, set_min_protein_residues, \ + get_protein_residue_names, set_protein_residue_names, \ + set_token, has_token, get_token, delete_token, delete_all_tokens diff --git a/src/sire/squire/CMakeLists.txt b/src/sire/squire/CMakeLists.txt new file mode 100644 index 000000000..fc36c2ea9 --- /dev/null +++ b/src/sire/squire/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.squire +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/squire ) diff --git a/src/sire/squire/__init__.py b/src/sire/squire/__init__.py new file mode 100644 index 000000000..117b1ae90 --- /dev/null +++ b/src/sire/squire/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.squire + +""" + +from ..legacy import Squire as _Squire + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/stream/CMakeLists.txt b/src/sire/stream/CMakeLists.txt new file mode 100644 index 000000000..045dea85c --- /dev/null +++ b/src/sire/stream/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.stream +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/stream ) diff --git a/src/sire/stream/__init__.py b/src/sire/stream/__init__.py new file mode 100644 index 000000000..f77cd8324 --- /dev/null +++ b/src/sire/stream/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.stream + +""" + +from ..legacy import Stream as _Stream + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/system/CMakeLists.txt b/src/sire/system/CMakeLists.txt new file mode 100644 index 000000000..696897e12 --- /dev/null +++ b/src/sire/system/CMakeLists.txt @@ -0,0 +1,14 @@ +######################################## +# +# sire.system +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + _system.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/system ) diff --git a/src/sire/system/__init__.py b/src/sire/system/__init__.py new file mode 100644 index 000000000..356436e94 --- /dev/null +++ b/src/sire/system/__init__.py @@ -0,0 +1,12 @@ +""" +.. currentmodule:: sire.system + +""" + +from ..legacy import System as _System +from .. import use_new_api as _use_new_api +_use_new_api() + +from .. import mol as _mol + +from ._system import * diff --git a/src/sire/system/_system.py b/src/sire/system/_system.py new file mode 100644 index 000000000..ad46463e1 --- /dev/null +++ b/src/sire/system/_system.py @@ -0,0 +1,138 @@ + +__all__ = ["System"] + + +class System: + def __init__(self, system=None): + from ..legacy.System import System as _System + + if system is None: + self._system = _System() + else: + if _System not in type(system).mro(): + raise TypeError( + "You can only construct from a sire.legacy.System.System, " + f"not a {type(system)}") + + self._system = system + + self._molecules = None + + def __copy__(self, other): + if type(other) is not System: + raise TypeError(f"Cannot copy a {type(other)} to a System") + + self._system = other._system.clone() + self._molecules = None + + def __deepcopy__(self, other): + self.__copy__(other) + + def __str__(self): + return str(self._system) + + def __repr__(self): + return self.__str__() + + def __getitem__(self, key): + return self.molecules()[key] + + def clone(self): + s = System() + s._system = self._system.clone() + return s + + def count(self): + return self.__len__() + + def size(self): + return self.__len__() + + def __len__(self): + return len(self.molecules()) + + def num_atoms(self): + return self._system.num_atoms() + + def num_residues(self): + return self._system.num_residues() + + def num_chains(self): + return self._system.num_chains() + + def num_segments(self): + return self._system.num_segments() + + def num_molecules(self): + return self._system.num_molecules() + + def names(self): + return self.molecules().names() + + def numbers(self): + return self.molecules().numbers() + + def molecules(self, key=None): + if self._molecules is not None: + if key is None: + return self._molecules + else: + return self._molecules.molecules(key) + + import sire.mol + self._molecules = sire.mol.SelectorMol(self._system) + + if self._molecules.num_atoms() != self._system.num_atoms(): + # oh dear - this is an edge case where the System does + # not contain complete molecules. We need to extract + # the molecules and re-add them + raise NotImplementedError( + "sire.system.System does not yet support Systems that hold " + "partial molecule!. Let us know that you have hit this " + "bug and we will add support." + ) + + return self.molecules(key) + + def segments(self, key=None): + if key is None: + return self.molecules().segments() + else: + return self.molecules().segments(key) + + def chains(self, key=None): + if key is None: + return self.molecules().chains() + else: + return self.molecules().chains(key) + + def residues(self, key=None): + if key is None: + return self.molecules().residues() + else: + return self.molecules().residues(key) + + def atoms(self, key=None): + if key is None: + return self.molecules().atoms() + else: + return self.molecules().atoms(key) + + def molecule(self, key): + return self.molecules().molecule(key) + + def segment(self, key): + return self.molecules().segment(key) + + def chain(self, key): + return self.molecules().chain(key) + + def residue(self, key): + return self.molecules().residue(key) + + def atom(self, key): + return self.molecules().atom(key) + + def update(self, value): + self._molecules = None + self._system.update(value) diff --git a/src/sire/units/CMakeLists.txt b/src/sire/units/CMakeLists.txt new file mode 100644 index 000000000..0f80d0b0c --- /dev/null +++ b/src/sire/units/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.units +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/units ) diff --git a/src/sire/units/__init__.py b/src/sire/units/__init__.py new file mode 100644 index 000000000..a2b06f953 --- /dev/null +++ b/src/sire/units/__init__.py @@ -0,0 +1,11 @@ +""" +.. currentmodule:: sire.units + +""" + +from ..legacy import Units as _Units + +from .. import use_new_api as _use_new_api +_use_new_api() + +from ..legacy.Units import * diff --git a/src/sire/utils/CMakeLists.txt b/src/sire/utils/CMakeLists.txt new file mode 100644 index 000000000..ddef6463f --- /dev/null +++ b/src/sire/utils/CMakeLists.txt @@ -0,0 +1,14 @@ +########################################### +# +# Set of utility (util) scripts / functions +# +########################################### + +# Add your script to this list +set ( SCRIPTS + __init__.py + _try_import.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/utils ) diff --git a/src/sire/utils/__init__.py b/src/sire/utils/__init__.py new file mode 100644 index 000000000..58bae04ab --- /dev/null +++ b/src/sire/utils/__init__.py @@ -0,0 +1,9 @@ +""" +.. currentmodule:: sire.utils + +""" + +from ._try_import import * + +from .. import use_new_api as _use_new_api +_use_new_api() diff --git a/src/sire/utils/_try_import.py b/src/sire/utils/_try_import.py new file mode 100644 index 000000000..0a748b990 --- /dev/null +++ b/src/sire/utils/_try_import.py @@ -0,0 +1,176 @@ + +__all__ = ["try_import", "try_import_from"] + +_module_to_package = {} + + +def _install_package(name, package_registry): + """Internal function used to install the module + called 'name', using the passed 'package_registry' + to find the package that contains the package + that contains this module""" + + # get the directory containing the python executable, + # we will assume this will also contain 'conda', 'pip' + # or 'easy_install' + from os.path import realpath, dirname + from os import system + from sys import executable + + binpath = dirname( realpath(executable) ) + + # ensure that we have the root package name + try: + package = name.split(".")[0] + except: + package = name + + if package in package_registry: + package = package_registry[name] + + try: + print("\nTrying to install %s from package %s using %s/conda...\n" \ + % (name,package,binpath)) + ok = system("%s/conda install %s -y" % (binpath,package)) + + if ok == 0: + # installed ok + return + except: + pass + + try: + print("\nTrying to install %s from package %s using %s/pip...\n" \ + % (name,package,binpath)) + ok = system("%s/pip install %s" % (binpath,package)) + + if ok == 0: + # installed ok + return + except: + pass + + try: + print("\nTrying to install %s from package %s using %s/easy_install...\n" \ + % (name,package,binpath)) + ok = system("%s/easy_install %s" % (binpath,package)) + + if ok == 0: + # installed ok + return + except: + pass + + print("\nWARNING: Unable to install '%s' from package '%s'\n" \ + % (name,package)) + + return + + +def try_import(name, package_registry=_module_to_package): + """Try to import the module called 'name', returning + the loaded module as an argument. If the module + is not available, then it looks up the name of + the package to install using "package_registry" + (or if this is not available, using just the name + of the module). This will then be installed using + "conda", then "pip" then "easy_install" (first one + that works will return). + + For example, use this via + + sys = try_import("sys") + mdtraj = try_import("mdtraj") + + Note that you can also rename modules, e.g. by using + + md = try_import("mdtraj") + + Note that you should use try_import_from if you + want only specific symbols, e.g. + + (argv, stdout) = try_import_from("sys", ["argv","stdout"]) + """ + + try: + mod = __import__(name) + return mod + except: + pass + + if not (package_registry is None): + _install_package(name, package_registry) + return try_import(name, package_registry=None) + + raise ImportError("Failed to install module %s" % name) + + +def try_import_from(name, fromlist, package_registry=_module_to_package): + """Try to import from the module called 'name' the passed symbol + (or list of symbols) contained in 'fromlist', returning + the symbol (or list of symbols). + + If the module cannot be loaded, then the package containing + the module is looked up in 'module_to_package' (or just guessed + from the name if it does not exist in 'module_to_package'. + An attempt is made to load the package, using first conda, + then pip, then easy_install. + + Example usage: + + Mol = try_import_from("Sire", "Mol") + (argv,stdout = try_import_from("sys", ["argv", "stdout"]) + mapReduce = try_import_from("scoop.Futures", "mapReduce") + ut = try_import_from("mdtraj", "utils") + """ + + if isinstance(fromlist, str): + # we are importing only a single module - put + # this string into a list for the user + fromlist = [fromlist] + + try: + nsyms = len(fromlist) + except: + return try_import(name, package_registry) + + if nsyms == 0: + # just import the entire module + return try_import(name, package_registry) + + is_loaded = False + + try: + mod = __import__(name, globals(), locals(), fromlist) + is_loaded = True + except: + is_loaded = False + + if not is_loaded: + if not (package_registry is None): + _install_package(name, package_registry) + return try_import_from(name, fromlist, package_registry=None) + else: + raise ImportError("Failed to install module '%s'" % name) + + if nsyms == 1: + try: + return getattr(mod, fromlist[0]) + except: + raise ImportError("Cannot find the symbol '%s' in module '%s'" \ + % (fromlist[0],name) ) + else: + ret = [] + missing_symbols = [] + + for sym in fromlist: + try: + ret.append( getattr(mod, sym) ) + except: + missing_symbols.append(sym) + + if len(missing_symbols) > 0: + raise ImportError("Cannot find the following symbols in module '%s' : [ %s ]" \ + % (name, ", ".join(missing_symbols))) + + return ret diff --git a/src/sire/vol/CMakeLists.txt b/src/sire/vol/CMakeLists.txt new file mode 100644 index 000000000..9673e5413 --- /dev/null +++ b/src/sire/vol/CMakeLists.txt @@ -0,0 +1,13 @@ +######################################## +# +# sire.vol +# +######################################## + +# Add your script to this list +set ( SCRIPTS + __init__.py + ) + +# installation +install( FILES ${SCRIPTS} DESTINATION ${SIRE_PYTHON}/sire/vol ) diff --git a/src/sire/vol/__init__.py b/src/sire/vol/__init__.py new file mode 100644 index 000000000..8e7f81d19 --- /dev/null +++ b/src/sire/vol/__init__.py @@ -0,0 +1,11 @@ +""" +.. currentmodule:: sire.vol + +""" + +from ..legacy import Vol as _Vol + +from .. import use_new_api as _use_new_api +_use_new_api() + +PeriodicBox = _Vol.PeriodicBox diff --git a/tests/base/test_wrap.py b/tests/base/test_wrap.py new file mode 100644 index 000000000..ed801cb40 --- /dev/null +++ b/tests/base/test_wrap.py @@ -0,0 +1,56 @@ + +import sire as sr + +def _assert_array_equal( array0, array1 ): + assert( len(array0) == len(array1) ) + + for i in range(0, len(array0)): + assert( array0[i] == array1[i] ) + +def test_wrap(verbose=False): + from sire.base import wrap + + water = sr.load_test_files("water.pdb")[0] + + center = water.evaluate().center() + + dblarray = [ 1.0,2,3,4,5 ] + intarray = [ 1,2,3,4,5 ] + vecarray = [ sr.maths.Vector(1), sr.maths.Vector(2), sr.maths.Vector(3) ] + strarray = [ "cat", "dog", "fish" ] + x = sr.cas.Symbol("x") + f = (x+5)**2 + mixarray = [ x, f, 5.3, "hello", sr.mol.Molecule(), [f, "cat", sr.vol.PeriodicBox()] ] + + water = water.edit().set_property("center", wrap(center)) \ + .set_property("dblarray", wrap(dblarray)) \ + .set_property("intarray", wrap(intarray)) \ + .set_property("vecarray", wrap(vecarray)) \ + .set_property("strarray", wrap(strarray)) \ + .set_property("type", wrap("ligand")) \ + .set_property("alpha", wrap(0.5)) \ + .set_property("copies", wrap(1)) \ + .set_property("mix", wrap(mixarray)).commit() + + assert water.property("center").value() == center + _assert_array_equal( water.property("dblarray").value(), dblarray ) + _assert_array_equal( water.property("intarray").value(), intarray ) + _assert_array_equal( water.property("vecarray").value(), vecarray ) + _assert_array_equal( water.property("strarray").value(), strarray ) + assert water.property("type").value() == "ligand" + assert water.property("alpha").value() == 0.5 + assert water.property("copies").value() == 1 + + p = water.property("mix") + + assert sr.cas.Expression(x) == p[0].value() + assert f == p[1].value() + assert p[2].value() == 5.3 + assert p[3].value() == "hello" + assert p[4] == sr.mol.Molecule() + assert p[5][0].value() == f + assert p[5][1].value() == "cat" + assert p[5][2] == sr.vol.PeriodicBox() + +if __name__ == "__main__": + test_wrap(True) diff --git a/tests/biosimspace/test_select.py b/tests/biosimspace/test_select.py new file mode 100644 index 000000000..69c316e68 --- /dev/null +++ b/tests/biosimspace/test_select.py @@ -0,0 +1,23 @@ + +import sire as sr +sr.use_mixed_api() + +import sire.legacy.Mol + +import pytest + +@pytest.fixture(scope="session") +def ala_mols(): + import sire as sr + return sr.load_test_files("ala.top", "ala.crd") + + +def test_selector_wrap(ala_mols): + mols = ala_mols + + # These will fail if importing Sire under a mixed + # api and then importing sire.legacy modules causes + # an issue + print(mols["atoms within 2 of element C"]) + + res = mols["resnum 1"] diff --git a/tests/mm/test_index_bonds.py b/tests/mm/test_index_bonds.py new file mode 100644 index 000000000..09c1ceee4 --- /dev/null +++ b/tests/mm/test_index_bonds.py @@ -0,0 +1,76 @@ + +import sire as sr +import pytest + +def _assert_same_bonds(b0, b1): + assert len(b0) == len(b1) + + for bond0 in b0: + same = False + + for bond1 in b1: + if bond0 == bond1: + same = True + break + + if not same: + print(f"Not the same!\n{b0}\n{b1}") + assert False + + +def test_index_bonds(): + mols = sr.load_test_files("ala.top", "ala.crd") + + mol = mols[0] + + assert len(mol["bonds in resnum 1"]) == 5 + assert len(mol["bonds with resnum 1"]) == 6 + + _assert_same_bonds(mol["bonds in resnum 1"], mol["resnum 1"].bonds()) + _assert_same_bonds(mol["bonds with resnum 1"], mol.bonds("resnum 1")) + + cx = mol["bonds to element C"] + ccx = mol["bonds with element C"] + cc = mol["bonds from element C to element C"] + + assert len(cc) + len(cx) == len(ccx) + + assert len(cc) == 3 + assert len(cx) == 16 + assert len(ccx) == 19 + + _assert_same_bonds(ccx["bonds from element C to element C"], cc) + + +def test_index_mols_bonds(): + mols = sr.load_test_files("ala.top", "ala.crd") + + bnds = mols["bonds from element O to element H"] + + assert len(bnds) == 2 * (mols.num_molecules() - 1) + assert len(bnds) == 1260 # just in case something else failed! + + assert bnds.num_molecules() == mols.num_molecules() - 1 + assert bnds.num_atoms() == bnds.num_molecules() * 3 + + assert len(mols[sr.bondid(0, 1)]) == mols.num_molecules() + + for bond in mols[sr.bondid(0, 1)]: + assert bond.atom0().index().value() == 0 + assert bond.atom1().index().value() == 1 + + assert len(mols[sr.bondid("O", "H1")]) == mols.num_molecules() - 1 + + for bond in mols[sr.bondid("O", "H1")]: + assert bond.atom0().name().value() in ["O", "H1"] + assert bond.atom1().name().value() in ["O", "H1"] + + # mols[1:] are the water molecules + assert mols["bonds from element O to element H"].mass().value() == \ + pytest.approx((mols[1:]["element O"].mass() + mols[1:]["element H"].mass()).value(), 0.0001) + +if __name__ == "__main__": + test_index_bonds() + test_index_mols_bonds() + + diff --git a/tests/mol/test_complex_indexing.py b/tests/mol/test_complex_indexing.py new file mode 100644 index 000000000..5e3464d3c --- /dev/null +++ b/tests/mol/test_complex_indexing.py @@ -0,0 +1,443 @@ + +import pytest + +@pytest.fixture(scope="session") +def ala_mols(): + import sire as sr + return sr.load_test_files("ala.top", "ala.crd") + + +@pytest.fixture(scope="session") +def p38_mols(): + import sire as sr + return sr.load_test_files("p38.pdb") + + +@pytest.fixture(scope="session") +def alanin_mols(): + import sire as sr + return sr.load_test_files("alanin.psf") + + +def test_distance_searching(ala_mols): + mols = ala_mols + + # these are the searches in the tutorial - check the sizes are correct + assert len(mols["atoms within 2 of element C"]) == 21 + assert len(mols["residues within 3 angstrom of resnum 1"]) == 14 + assert len(mols["atoms within 5.0 of (0, 0, 0)"]) == 6 + assert len(mols["molecules within 5.0 of (0, 0, 0)"]) == 2 + + + +def test_bond_property_searching(ala_mols): + mols = ala_mols.clone() + + cursor = mols[0].cursor() + + b = cursor.bonds()[0] + + b["is_perturbable"] = True + b["test property"] = "cat goes meow" + b["number"] = 312.1 + + mols.update(cursor.commit()) + + bond = mols[0].bond(b.id()) + + assert mols["bond property is_perturbable"] == bond + assert mols["bond property 'test property' == 'cat goes meow'"] == bond + assert mols["bond property number > 312"] == bond + + +def test_res_property_searching(ala_mols): + mols = ala_mols.clone() + + res = mols[0]["residx 0"] + + mols.update(res.edit() + .set_property("is_perturbable", True) + .set_property("test property", "cat goes meow") + .set_property("number", -3.5).molecule().commit() + ) + + assert mols["residue property is_perturbable"] == mols[0]["residx 0"] + assert mols["residue property 'test property' == 'cat goes meow'"] == mols[0]["residx 0"] + assert mols["residue property number < -3.4"] == mols[0]["residx 0"] + + +def test_atom_property_searching(ala_mols): + mols = ala_mols.clone() + + mols.update(mols[0][0].edit().set_property("is_perturbable", True).molecule().commit()) + mols.update(mols[0][1].edit().set_property("test property", "cat goes meow").molecule().commit()) + mols.update(mols[0][2].edit().set_property("is_perturbable", True).molecule().commit()) + mols.update(mols[0][3].edit().set_property("number", 5.4).molecule().commit()) + + assert mols["atom property is_perturbable"] == mols[0][ [0,2] ] + assert mols["atom property 'test property' == 'cat goes meow'"] == mols[0][1] + assert mols["atom property number > 5.3"] == mols[0][3] + assert len(mols["atom property number < 5.4"]) == mols[0].num_atoms() - 1 + + + +def test_property_searching(ala_mols): + mols = ala_mols.clone() + + mols.update(mols[0].edit() + .set_property("test property", "cat goes meow") + .set_property("is_perturbable", True) + .set_property("false_property", False) + .set_property("number", 5.4) + .set_property("val", -42) + .commit()) + + assert mols["property 'test property' == 'cat goes meow'"] == mols[0] + + assert mols["property is_perturbable"] == mols[0] + assert mols["property is_perturbable == true"] == mols[0] + assert mols["property false_property == off"] == mols[0] + assert mols["property number == 5.4"] == mols[0] + assert mols["property number =~ 5.4"] == mols[0] + assert mols["property number > 3"] == mols[0] + assert mols["property number < 6"] == mols[0] + assert mols["property val == -42"] == mols[0] + assert mols["property val < 0"] == mols[0] + assert mols["property val >= -42"] == mols[0] + + with pytest.raises(KeyError): + mols["property number > 5.4"] + + with pytest.raises(KeyError): + mols["property false_property == True"] + + with pytest.raises(KeyError): + mols["property val > 0"] + + +def test_basic_indexing(ala_mols): + mols = ala_mols + import sire as sr + + assert len(mols["atomname CH3"]) == 2 + assert len(mols[sr.atomid("CH3")]) == 2 + + with pytest.raises(KeyError): + mols[sr.atomid("ch3")] + + assert len(mols[sr.atomid("ch3", case_sensitive=False)]) == 2 + + with pytest.raises(KeyError): + mols["atomname ch3"] + + assert len(mols["atomname /ch3/i"]) == 2 + assert len(mols["atomname /CH*/"]) == 2 + + assert len(mols["atomidx 0"]) == mols.num_molecules() + assert len(mols["atomidx 0,1"]) == 2 * mols.num_molecules() + assert len(mols["atomidx 0:3"]) == 3 * mols.num_molecules() + assert len(mols["atomidx 0:4"]) == 4 + (3 * (mols.num_molecules()-1)) + + assert len(mols["atomnum 1"]) == 1 + assert len(mols["atomnum 1,2"]) == 2 + + assert len(mols["atoms in *"]) == mols.num_atoms() + assert len(mols["residues in *"]) == mols.num_residues() + + +def test_search_indexing(ala_mols): + mols = ala_mols + + assert mols["{element C}[0]"] == mols["element C"][0] + assert mols["{element C}[-1]"] == mols["element C"][-1] + assert mols["{element C}[0:2]"] == mols["element C"][0:2] + assert mols["{element C}[2:0:-1]"] == mols["element C"][2:0:-1] + + +def test_logical_indexing(ala_mols): + mols = ala_mols + + assert len(mols["element C or element O"]) == len(mols["element C"]) + len(mols["element O"]) + + assert len(mols["resname ALA or resname ACE"]) == len(mols["resname ALA,ACE"]) + + assert len(mols["not resname ALA"]) == mols.num_residues() - 1 + + assert len(mols["resname ALA and element C"]) == len(mols["resname ALA"]["element C"]) + + assert mols["resname ALA and element C"] == mols["element C and resname ALA"] + + assert len(mols["not molidx 0"]) == mols.num_molecules() - 1 + + assert len(mols["atomname HH31 or atomname HH32 or atomname HH33"]) == len(mols["atomname HH31, HH32, HH33"]) + + assert len(mols["(element C or element O) and (element O or element H)"]) == len(mols["element O"]) + + assert len(mols["not element C"]) == len(mols["element H or element O or element N"]) + + assert len(mols["(not element C) and (not element O) and (not element H)"]) == len(mols["element N"]) + +def test_complex_indexing(p38_mols): + import sire as sr + + mols = p38_mols + mol = mols[0] + + assert mols[f"molname {mol.name().value()}"] == mol + assert mols["molidx 0"] == mol + assert mols[f"molnum {mol.number().value()}"] == mol + + assert mol.atom(0).index() == sr.mol.AtomIdx(0) + assert mol[0] == mol.atom(0) + + with pytest.raises(KeyError): + mol.atom("CA") + + s = mol.atoms("CA") + + assert len(s) == 351 + assert type(s) is not list + assert s.what() == "SireMol::Selector" + + assert s[0].name().value() == "CA" + assert mol[s[0].index()].index() == s[0].index() + + assert s == mol["atomname CA"] + assert s == mol["CA"] + assert s == mol[sr.atomid("CA")] + + s = mol.residues("resnum <= 10") + + assert len(s) == 10 + assert type(s) is not list + assert s.what() == "SireMol::Selector" + + assert s[0].name().value() == "GLU" + + for i in range(0, 10): + assert s[i].number().value() == i+1 + + assert s == mol["resnum <= 10"] + assert s == mol["resnum 1, 2, 3, 4, 5, 6, 7, 8, 9, 10"] + + assert mol["atoms in resnum 1"] == mol.residue(0).atoms() + + s = mol["residues with atomname HZ"] + + assert len(s) == 13 + + for res in s: + assert res.name().value() == "PHE" + assert res["HZ"].name().value() == "HZ" + assert res.atom("HZ").residue() == res + + from sire.mol import AtomName, AtomNum + + names = [AtomName('N'), AtomName('CA'), AtomName('C'), AtomName('O'), AtomName('CB')] + + assert mol[0:5].names() == names + assert mol[4::-1].names() == names[4::-1] + + numbers = [AtomNum(7), AtomNum(9), AtomNum(11)] + + assert mol[6:12:2].numbers() == numbers + assert mol[10:4:-2].numbers() == numbers[2::-1] + + with pytest.raises(KeyError): + mol["X"] + + with pytest.raises(IndexError): + mol[10000] + + s = mol["resnum >= 5 and resnum <= 10"] + + assert len(s) == 6 + + for i in range(0, 6): + assert s[i].number().value() == i+5 + + s = mol[sr.resid(idx=0)]["atomname C, CA"] + + assert len(s) == 2 + + assert s["CA"].name().value() == "CA" + assert s["C"].name().value() == "C" + + count = 0 + + for res in mol["residx < 3"]: + for atom in res["atomname C, N"]: + count += 1 + + assert count == 6 + + +def test_single_select_is_right(alanin_mols): + import sire as sr + mols = alanin_mols + + mol = mols[0] + + assert len(mol.segments()) == 1 + assert mol.segments().names()[0] == mol.segment(0).name() + + assert mol.segments("MAIN")[0].what() == sr.mol.Segment.typename() + assert mol.segment("MAIN").what() == sr.mol.Segment.typename() + assert mol["segname MAIN"].what() == sr.mol.Molecule.typename() + + +def test_sizes_correct(ala_mols): + mols = ala_mols + + assert len(mols) == mols.count() + assert len(mols) == mols.size() + assert len(mols) == mols.num_molecules() + + for mol in mols: + assert len(mol) == mol.count() + assert len(mol) == mol.size() + assert len(mol) == mol.num_atoms() + + for res in mol.residues(): + assert len(res) == res.count() + assert len(res) == res.size() + assert len(res) == res.num_atoms() + + +def test_search_terms(ala_mols): + mols = ala_mols + + for atom in mols["mass >= 16 g_per_mol"]: + assert atom.mass().value() >= 16.0 + + for atom in mols["charge < 0"]: + assert atom.charge().value() < 0 + + for atom in mols["mass >= 16 and charge < 0"]: + assert atom.charge().value() < 0 + assert atom.mass().value() >= 16 + + check_mass = mols[0][0].mass().value() + + atoms = mols[0][f"mass >= {check_mass-0.001} and mass <= {check_mass+0.001}"] + + assert len(atoms) > 0 + + for atom in atoms: + assert atom.mass().value() == pytest.approx(check_mass) + + atoms = mols[0][f"mass =~ {check_mass}"] + + assert len(atoms) > 0 + + for atom in atoms: + assert atom.mass().value() == pytest.approx(check_mass) + + check_charge = mols[0][1].charge().value() + + atoms = mols[0][f"charge >= {check_charge-0.001} and charge <= {check_charge+0.001}"] + + assert len(atoms) > 0 + + for atom in atoms: + assert atom.charge().value() == pytest.approx(check_charge) + + atoms = mols[0][f"charge =~ {check_charge}"] + + assert len(atoms) > 0 + + for atom in atoms: + assert atom.charge().value() == pytest.approx(check_charge) + + import sire.search + old_eps = sire.search.get_approx_epsilon() + + sire.search.set_approx_epsilon(1e-130) + + #with pytest.raises(KeyError): + # print(mols[0][f"charge =~ {check_charge}"]) + + sire.search.set_approx_epsilon(old_eps) + + assert sire.search.get_approx_epsilon() == old_eps + + +def test_in_searches(ala_mols): + mols = ala_mols + + assert len(mols["atoms in *"]) == mols.num_atoms() + assert len(mols["residues in *"]) == mols.num_residues() + + assert len(mols["atoms in resname ACE"]) == mols["resname ACE"].num_atoms() + assert len(mols["atoms in (molecules with count(element O) > 1)"]) == mols[0].num_atoms() + assert len(mols["atoms in (molecules with resname ALA)"]) == mols[0].num_atoms() + assert len(mols["(atoms in molecules) with resname ALA"]) == mols["resname ALA"].num_atoms() + + assert mols["atoms in molidx 0"] == mols[0]["atoms"] + assert mols["atoms in molidx -1"] == mols[-1]["atoms"] + + # check precedence - want "atoms in molecules with resname ALA" to + # be "atoms in (molecules with resname ALA)" + assert mols["atoms in molecules with resname ALA"] == mols["atoms in (molecules with resname ALA)"] + + +def test_with_searches(ala_mols): + mols = ala_mols + + import sire as sr + + for mol in mols["molecules with count(atoms) >= 3"]: + assert(mol.num_atoms() >= 3) + + for res in mols["residues with count(atoms) >= 3"]: + assert(res.num_atoms() >= 3) + + # single residue match + res = mols["residues with count(atoms) > 6"] + + assert res.name().value() == "ALA" + assert res.num_atoms() > 6 + + for atom in mols["atoms with resname ALA"]: + assert atom.residue().name().value() == "ALA" + + assert len(mols["residues with element C"]) == 3 + + # find the one molecule with two oxygens + assert len(mols["molecules with count(element O) > 1"]["element O"]) == 2 + + # there are no residues that contain more than one oxygen + with pytest.raises(KeyError): + mols["residues with count(element O) > 1"] + + # all but one molecule contains at one oxygen + assert len(mols["molecules with count(element O) == 1"]) == len(mols)-1 + + assert mols["atoms with molidx 0"] == mols[0]["atoms"] + assert mols["atoms with molidx -1"] == mols[-1]["atoms"] + + +def test_all_searches(ala_mols): + mols = ala_mols + + assert len(mols["atoms"]) == 1912 + assert len(mols["residues"]) == 633 + + assert len(mols["atoms in *"]) == 1912 + assert len(mols["residues in *"]) == 633 + + assert len(mols["atoms in molidx 0"]) == 22 + assert len(mols["residues in molidx 0"]) == 3 + + assert len(mols["all"]) == mols.num_molecules() + + +def test_count_searches(ala_mols): + mols = ala_mols + + for mol in mols["molecules with count(atoms) == 3"]: + assert mol.num_atoms() == 3 + + mol = mols["molecules with count(residues) == 3"] + assert mol.num_residues() == 3 + diff --git a/tests/units/test_pickling.py b/tests/units/test_pickling.py new file mode 100644 index 000000000..e636b456f --- /dev/null +++ b/tests/units/test_pickling.py @@ -0,0 +1,30 @@ + + +def _get_dims(u): + return [u.angle(), u.charge(), u.length(), u.mass(), + u.quantity(), u.temperature(), u.time()] + + +def test_pickling(): + import pickle + from sire.units import kcal_per_mol, nanometer2 + + a = kcal_per_mol / nanometer2 + + a_dims = _get_dims(a) + + s = pickle.dumps(a) + b = pickle.loads(s) + + b_dims = _get_dims(b) + + assert a_dims == b_dims + + c = b / a + + assert _get_dims(c) == [0, 0, 0, 0, 0, 0, 0] + + +if __name__ == "__main__": + test_pickling() + diff --git a/version.txt b/version.txt new file mode 100644 index 000000000..97dbabeb3 --- /dev/null +++ b/version.txt @@ -0,0 +1 @@ +2023.0.0 diff --git a/wrapper/Analysis/Bennetts.pypp.cpp b/wrapper/Analysis/Bennetts.pypp.cpp index f5effcd70..d2071fd89 100644 --- a/wrapper/Analysis/Bennetts.pypp.cpp +++ b/wrapper/Analysis/Bennetts.pypp.cpp @@ -33,6 +33,8 @@ SireAnalysis::Bennetts __copy__(const SireAnalysis::Bennetts &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Bennetts_class(){ @@ -53,6 +55,7 @@ void register_Bennetts_class(){ "add" , add_function_value , ( bp::arg("windows"), bp::arg("forwards_ratios"), bp::arg("backwards_ratios") ) + , bp::release_gil_policy() , "Add the data for the next iteration, which contains the ratios for the passed windows,\nwith forwards_ratios containing the free energy from each window to the next window,\nand backwards_ratios containing the free energy from the previous window to each window" ); } @@ -65,6 +68,7 @@ void register_Bennetts_class(){ "add" , add_function_value , ( bp::arg("ratios") ) + , bp::release_gil_policy() , "Add the data for the next iteration" ); } @@ -77,6 +81,7 @@ void register_Bennetts_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the deltas for the ith iteration" ); } @@ -88,6 +93,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Remove all values from the histogram" ); } @@ -99,6 +105,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -110,6 +117,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return the values of all windows" ); } @@ -122,6 +130,7 @@ void register_Bennetts_class(){ "merge" , merge_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Merge the deltas for iterations start->end" ); } @@ -134,6 +143,7 @@ void register_Bennetts_class(){ "merge" , merge_function_value , ( bp::arg("indicies") ) + , bp::release_gil_policy() , "Merge the deltas at the passed indicies" ); } @@ -145,6 +155,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "nIterations" , nIterations_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -156,6 +167,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the number of lambda values (windows)" ); } @@ -167,6 +179,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the total number of samples in the simulation" ); } @@ -178,6 +191,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "nWindows" , nWindows_function_value + , bp::release_gil_policy() , "Return the number of windows" ); } @@ -216,6 +230,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "ratios" , ratios_function_value + , bp::release_gil_policy() , "Return the deltas for all iterations" ); } @@ -228,6 +243,7 @@ void register_Bennetts_class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the data for iteration i" ); } @@ -240,6 +256,7 @@ void register_Bennetts_class(){ "removeRange" , removeRange_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Remove every iteration from start to end (inclusively)" ); } @@ -252,6 +269,7 @@ void register_Bennetts_class(){ "rollingAverage" , rollingAverage_function_value , ( bp::arg("niterations") ) + , bp::release_gil_policy() , "Return a list of Gradients that represents the rolling average over niterations\niterations over this TI data set. If this data set contains 100 iterations, and\nwe calculate the rolling average over 50 iterations, then the returned Gradients\nwill be the average from 1-50, then 2-51, 3-52.....51-100" ); } @@ -264,6 +282,7 @@ void register_Bennetts_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("windows"), bp::arg("forwards_ratios"), bp::arg("backwards_ratios") ) + , bp::release_gil_policy() , "Set the deltas for the ith iteration" ); } @@ -276,6 +295,7 @@ void register_Bennetts_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("ratios") ) + , bp::release_gil_policy() , "Set the deltas for the ith iteration" ); } @@ -287,6 +307,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -298,6 +319,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -309,6 +331,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -320,6 +343,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -331,6 +355,7 @@ void register_Bennetts_class(){ Bennetts_exposer.def( "windows" , windows_function_value + , bp::release_gil_policy() , "Return the value of all windows" ); } diff --git a/wrapper/Analysis/BennettsRatios.pypp.cpp b/wrapper/Analysis/BennettsRatios.pypp.cpp index be315b92b..e3c2a4870 100644 --- a/wrapper/Analysis/BennettsRatios.pypp.cpp +++ b/wrapper/Analysis/BennettsRatios.pypp.cpp @@ -33,6 +33,8 @@ SireAnalysis::BennettsRatios __copy__(const SireAnalysis::BennettsRatios &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BennettsRatios_class(){ { //::SireAnalysis::BennettsRatios @@ -49,6 +51,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "backwardsData" , backwardsData_function_value + , bp::release_gil_policy() , "Return the raw data for the backwards ratios" ); } @@ -60,6 +63,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "backwardsRatios" , backwardsRatios_function_value + , bp::release_gil_policy() , "Return the raw data for the backwards ratios" ); } @@ -71,6 +75,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "constants" , constants_function_value + , bp::release_gil_policy() , "Return the constants for each set of Bennetts acceptance ratios. This\nreturns the lambda value of the from window, together with the constant\nused for the numerator from this window to the next window (which must\nbe the same as the constant used for the denominator for the next window\nback to this window)" ); } @@ -82,6 +87,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "denominators" , denominators_function_value + , bp::release_gil_policy() , "Return the denominators for the Bennetts acceptance ratio. This returns the\nlambda value of the previous window, together with the Bennetts ratio for the\nenergy difference from this window to the previous window" ); } @@ -93,6 +99,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "forwardsData" , forwardsData_function_value + , bp::release_gil_policy() , "Return the raw data for the fowards ratios" ); } @@ -104,6 +111,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "forwardsRatios" , forwardsRatios_function_value + , bp::release_gil_policy() , "Return the raw data for the fowards ratios" ); } @@ -115,6 +123,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "integrate" , integrate_function_value + , bp::release_gil_policy() , "Integrate (sum) the deltas across the windows to return the PMF" ); } @@ -126,6 +135,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -137,6 +147,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return the lambda values for all of the windows" ); } @@ -149,6 +160,7 @@ void register_BennettsRatios_class(){ "merge" , merge_function_value , ( bp::arg("deltas") ) + , bp::release_gil_policy() , "Merge together all of the passed BennettsRatios into a single object" ); } @@ -160,6 +172,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the number of lambda values (windows)" ); } @@ -171,6 +184,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the total number of samples in the deltas" ); } @@ -182,6 +196,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "nWindows" , nWindows_function_value + , bp::release_gil_policy() , "Return the number of windows" ); } @@ -193,6 +208,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "numerators" , numerators_function_value + , bp::release_gil_policy() , "Return the numerators for the Bennetts acceptance ratio. This returns the\nlambda value of the from window, together with the Bennetts ratio for the\nenergy difference from this window to the next window" ); } @@ -220,6 +236,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "Integrate (sum) the deltas across the windows to return the PMF" ); } @@ -231,6 +248,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature at which the Bennetts deltas were all collected" ); } @@ -242,6 +260,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -253,6 +272,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -264,6 +284,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "Return the values between windows. This returns the value of lambda of the from\nwindow, and the difference in free energy between this and the next window" ); } @@ -275,6 +296,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -286,6 +308,7 @@ void register_BennettsRatios_class(){ BennettsRatios_exposer.def( "windows" , windows_function_value + , bp::release_gil_policy() , "Return the values of all of the windows" ); } diff --git a/wrapper/Analysis/CMakeAutogenFile.txt b/wrapper/Analysis/CMakeAutogenFile.txt index a640ff263..016336ca2 100644 --- a/wrapper/Analysis/CMakeAutogenFile.txt +++ b/wrapper/Analysis/CMakeAutogenFile.txt @@ -1,16 +1,16 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - TIPMF.pypp.cpp + Bennetts.pypp.cpp BennettsRatios.pypp.cpp - FEP.pypp.cpp + ComponentGradients.pypp.cpp DataPoint.pypp.cpp + FEP.pypp.cpp + FEPDeltas.pypp.cpp Gradients.pypp.cpp - ComponentGradients.pypp.cpp PMF.pypp.cpp - Bennetts.pypp.cpp - FEPDeltas.pypp.cpp TI.pypp.cpp TIComponents.pypp.cpp + TIPMF.pypp.cpp SireAnalysis_containers.cpp SireAnalysis_registrars.cpp ) diff --git a/wrapper/Analysis/CMakeLists.txt b/wrapper/Analysis/CMakeLists.txt index ac71b18b9..7a9813a72 100644 --- a/wrapper/Analysis/CMakeLists.txt +++ b/wrapper/Analysis/CMakeLists.txt @@ -23,7 +23,7 @@ include(CMakeAutogenFile.txt) set ( WRAPANALYSIS_SOURCES _Analysis.main.cpp - + ${PYPP_SOURCES} ) @@ -39,18 +39,18 @@ set_target_properties (Analysis PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Analysis SirePython SIRE_SireAnalysis - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Analysis" "_init_Analysis" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Analysis ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Analysis ) install( TARGETS Analysis LIBRARY DESTINATION ${INSTALLDIR} @@ -59,6 +59,6 @@ install( TARGETS Analysis ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Analysis/ComponentGradients.pypp.cpp b/wrapper/Analysis/ComponentGradients.pypp.cpp index 6825e49ce..b33dcba90 100644 --- a/wrapper/Analysis/ComponentGradients.pypp.cpp +++ b/wrapper/Analysis/ComponentGradients.pypp.cpp @@ -25,6 +25,8 @@ SireAnalysis::ComponentGradients __copy__(const SireAnalysis::ComponentGradients #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ComponentGradients_class(){ { //::SireAnalysis::ComponentGradients @@ -42,6 +44,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "conserveMemory" , conserveMemory_function_value + , bp::release_gil_policy() , "This function reduces the memory used by this object by ensuring that\nthe FreeEnergyMonitor at each lambda value uses the copy of the\nmolecules used at the first lambda value" ); } @@ -54,6 +57,7 @@ void register_ComponentGradients_class(){ "conserveMemory" , conserveMemory_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "This function conserves memory by copying in all of the shared molecule\ndata etc. from other into this object" ); } @@ -66,6 +70,7 @@ void register_ComponentGradients_class(){ "coulombGradientsAt" , coulombGradientsAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the set of coulomb free energy gradients for the ith free energy component" ); } @@ -78,6 +83,7 @@ void register_ComponentGradients_class(){ "coulombValues" , coulombValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the actual values of the coulomb free energy gradients of the ith component" ); } @@ -89,6 +95,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "data" , data_function_value + , bp::release_gil_policy() , "Return the raw data for all of the free energy components" ); } @@ -100,6 +107,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "deltaLambda" , deltaLambda_function_value + , bp::release_gil_policy() , "Return the value of delta lambda used to approximate the free energy gradients" ); } @@ -112,6 +120,7 @@ void register_ComponentGradients_class(){ "gradientsAt" , gradientsAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the set of free energy gradients for the ith free energy component" ); } @@ -124,6 +133,7 @@ void register_ComponentGradients_class(){ "integrate" , integrate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Integrate the free energy gradients of the ith component\nand return the resulting PMF" ); } @@ -136,6 +146,7 @@ void register_ComponentGradients_class(){ "integrate" , integrate_function_value , ( bp::arg("i"), bp::arg("order") ) + , bp::release_gil_policy() , "Integrate the free energy gradients of the ith component to order order and\nreturn the resulting PMF" ); } @@ -148,6 +159,7 @@ void register_ComponentGradients_class(){ "integrate" , integrate_function_value , ( bp::arg("i"), bp::arg("range_min"), bp::arg("range_max") ) + , bp::release_gil_policy() , "Integrate the free energy gradients of the ith component between the range\nrange_min to range_max, and return the resulting PMF" ); } @@ -160,6 +172,7 @@ void register_ComponentGradients_class(){ "integrate" , integrate_function_value , ( bp::arg("i"), bp::arg("range_min"), bp::arg("range_max"), bp::arg("order") ) + , bp::release_gil_policy() , "Integrate the free energy gradients of the ith component to order order\nbetween the range range_min to range_max and return the resulting PMF" ); } @@ -172,6 +185,7 @@ void register_ComponentGradients_class(){ "integrateCoulomb" , integrateCoulomb_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Integrate the coulomb free energy gradients of the ith component\nand return the resulting PMF" ); } @@ -184,6 +198,7 @@ void register_ComponentGradients_class(){ "integrateCoulomb" , integrateCoulomb_function_value , ( bp::arg("i"), bp::arg("order") ) + , bp::release_gil_policy() , "Integrate the coulomb free energy gradients of the ith component to order order and\nreturn the resulting PMF" ); } @@ -196,6 +211,7 @@ void register_ComponentGradients_class(){ "integrateCoulomb" , integrateCoulomb_function_value , ( bp::arg("i"), bp::arg("range_min"), bp::arg("range_max") ) + , bp::release_gil_policy() , "Integrate the coulomb free energy gradients of the ith component between the range\nrange_min to range_max, and return the resulting PMF" ); } @@ -208,6 +224,7 @@ void register_ComponentGradients_class(){ "integrateCoulomb" , integrateCoulomb_function_value , ( bp::arg("i"), bp::arg("range_min"), bp::arg("range_max"), bp::arg("order") ) + , bp::release_gil_policy() , "Integrate the coulomb free energy gradients of the ith component to order order\nbetween the range range_min to range_max and return the resulting PMF" ); } @@ -220,6 +237,7 @@ void register_ComponentGradients_class(){ "integrateLJ" , integrateLJ_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Integrate the LJ free energy gradients of the ith component\nand return the resulting PMF" ); } @@ -232,6 +250,7 @@ void register_ComponentGradients_class(){ "integrateLJ" , integrateLJ_function_value , ( bp::arg("i"), bp::arg("order") ) + , bp::release_gil_policy() , "Integrate the LJ free energy gradients of the ith component to order order and\nreturn the resulting PMF" ); } @@ -244,6 +263,7 @@ void register_ComponentGradients_class(){ "integrateLJ" , integrateLJ_function_value , ( bp::arg("i"), bp::arg("range_min"), bp::arg("range_max") ) + , bp::release_gil_policy() , "Integrate the LJ free energy gradients of the ith component between the range\nrange_min to range_max, and return the resulting PMF" ); } @@ -256,6 +276,7 @@ void register_ComponentGradients_class(){ "integrateLJ" , integrateLJ_function_value , ( bp::arg("i"), bp::arg("range_min"), bp::arg("range_max"), bp::arg("order") ) + , bp::release_gil_policy() , "Integrate the LJ free energy gradients of the ith component to order order\nbetween the range range_min to range_max and return the resulting PMF" ); } @@ -268,6 +289,7 @@ void register_ComponentGradients_class(){ "isCompatible" , isCompatible_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this set of gradients is compatible with the ones\nprovided in other" ); } @@ -279,6 +301,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this set is empty" ); } @@ -290,6 +313,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return the lambda values over which all of the components were collected" ); } @@ -302,6 +326,7 @@ void register_ComponentGradients_class(){ "ljGradientsAt" , ljGradientsAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the set of LJ free energy gradients for the ith free energy component" ); } @@ -314,6 +339,7 @@ void register_ComponentGradients_class(){ "ljValues" , ljValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the actual values of the LJ free energy gradients of the ith component" ); } @@ -326,6 +352,7 @@ void register_ComponentGradients_class(){ "merge" , merge_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Merge together all of the passed gradients. Note that they must all be compatible\nwith one another, otherwise an exception will be raised" ); } @@ -337,6 +364,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "nComponents" , nComponents_function_value + , bp::release_gil_policy() , "Return the number of free energy components (number of molecule views whose\nfree energy of interaction was recorded)" ); } @@ -348,6 +376,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the number of lambda values over which the free energy components have\nbeen recorded" ); } @@ -359,6 +388,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the number of samples used to form all of the average components" ); } @@ -386,6 +416,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature at which all of the components were collected" ); } @@ -397,6 +428,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -408,6 +440,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -420,6 +453,7 @@ void register_ComponentGradients_class(){ "values" , values_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the actual values of the free energy gradients of the ith component" ); } @@ -432,6 +466,7 @@ void register_ComponentGradients_class(){ "viewAt" , viewAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith view that corresponds to the ith free energy component.\nNote that this returns the view in the numerically first (lowest) lambda\nvalue. Use viewAt(int i, double lamval) if you want to specify the lambda\nvalue from which you want to extract the view." ); } @@ -444,6 +479,7 @@ void register_ComponentGradients_class(){ "viewAt" , viewAt_function_value , ( bp::arg("i"), bp::arg("lamval") ) + , bp::release_gil_policy() , "Return the ith view from lambda value lamval that corresponds to the\nith free energy component." ); } @@ -455,6 +491,7 @@ void register_ComponentGradients_class(){ ComponentGradients_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Analysis/DataPoint.pypp.cpp b/wrapper/Analysis/DataPoint.pypp.cpp index 516ade2db..21961afb9 100644 --- a/wrapper/Analysis/DataPoint.pypp.cpp +++ b/wrapper/Analysis/DataPoint.pypp.cpp @@ -29,6 +29,8 @@ SireAnalysis::DataPoint __copy__(const SireAnalysis::DataPoint &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DataPoint_class(){ { //::SireAnalysis::DataPoint @@ -48,6 +50,7 @@ void register_DataPoint_class(){ "equalWithinError" , equalWithinError_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this data point is equal to the other, within\nthe error range of the two points" ); } @@ -60,6 +63,7 @@ void register_DataPoint_class(){ "equalWithinMaxError" , equalWithinMaxError_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this data point in equal to the other, within\nthe maximum error range of the two points" ); } @@ -72,6 +76,7 @@ void register_DataPoint_class(){ "equalWithinMinError" , equalWithinMinError_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this data point in equal to the other, within\nthe minimum error range of the two points" ); } @@ -83,6 +88,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "hasError" , hasError_function_value + , bp::release_gil_policy() , "Return whether or not this data point has any error" ); } @@ -94,6 +100,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "hasErrorRange" , hasErrorRange_function_value + , bp::release_gil_policy() , "Return whether or not this data point has an error range" ); } @@ -105,6 +112,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "hasXError" , hasXError_function_value + , bp::release_gil_policy() , "Return whether or not there is any error in the x value" ); } @@ -116,6 +124,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "hasXErrorRange" , hasXErrorRange_function_value + , bp::release_gil_policy() , "Return whether or not there is an error range on the x value" ); } @@ -127,6 +136,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "hasYError" , hasYError_function_value + , bp::release_gil_policy() , "Return whether or not there is any error in the y value" ); } @@ -138,6 +148,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "hasYErrorRange" , hasYErrorRange_function_value + , bp::release_gil_policy() , "Return whether or not there is an error range on the x value" ); } @@ -164,6 +175,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -175,6 +187,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -186,6 +199,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -197,6 +211,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "x" , x_function_value + , bp::release_gil_policy() , "Return the x value of the point" ); } @@ -208,6 +223,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "xError" , xError_function_value + , bp::release_gil_policy() , "Return the error on the x value. This is the average\nof the minimum and maximum error" ); } @@ -219,6 +235,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "xMaxError" , xMaxError_function_value + , bp::release_gil_policy() , "Return the maximum size of the error on the x value" ); } @@ -230,6 +247,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "xMinError" , xMinError_function_value + , bp::release_gil_policy() , "Return the minimum size of the error on the x value" ); } @@ -241,6 +259,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "y" , y_function_value + , bp::release_gil_policy() , "Return the y value of the point" ); } @@ -252,6 +271,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "yError" , yError_function_value + , bp::release_gil_policy() , "Return the error on the y value. This is the average\nof the minimum and maximum error" ); } @@ -263,6 +283,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "yMaxError" , yMaxError_function_value + , bp::release_gil_policy() , "Return the maximum size of the error on the y value" ); } @@ -274,6 +295,7 @@ void register_DataPoint_class(){ DataPoint_exposer.def( "yMinError" , yMinError_function_value + , bp::release_gil_policy() , "Return the minimum size of the error on the y value" ); } diff --git a/wrapper/Analysis/FEP.pypp.cpp b/wrapper/Analysis/FEP.pypp.cpp index 952028673..d27986a6e 100644 --- a/wrapper/Analysis/FEP.pypp.cpp +++ b/wrapper/Analysis/FEP.pypp.cpp @@ -29,6 +29,8 @@ SireAnalysis::FEP __copy__(const SireAnalysis::FEP &other){ return SireAnalysis: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_FEP_class(){ @@ -50,6 +52,7 @@ void register_FEP_class(){ "add" , add_function_value , ( bp::arg("windows"), bp::arg("deltas") ) + , bp::release_gil_policy() , "Add the data for the next iteration, which contains the deltas for the passed windows,\nwith the free energy being for each window to the next window" ); } @@ -62,6 +65,7 @@ void register_FEP_class(){ "add" , add_function_value , ( bp::arg("windows"), bp::arg("forwards_deltas"), bp::arg("backwards_deltas") ) + , bp::release_gil_policy() , "Add the data for the next iteration, which contains the deltas for the passed windows,\nwith forwards_deltas containing the free energy from each window to the next window,\nand backwards_deltas containing the free energy from the previous window to each window" ); } @@ -74,6 +78,7 @@ void register_FEP_class(){ "add" , add_function_value , ( bp::arg("deltas") ) + , bp::release_gil_policy() , "Add the data for the next iteration" ); } @@ -86,6 +91,7 @@ void register_FEP_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the deltas for the ith iteration" ); } @@ -97,6 +103,7 @@ void register_FEP_class(){ FEP_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Remove all values from the histogram" ); } @@ -108,6 +115,7 @@ void register_FEP_class(){ FEP_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -119,6 +127,7 @@ void register_FEP_class(){ FEP_exposer.def( "deltas" , deltas_function_value + , bp::release_gil_policy() , "Return the deltas for all iterations" ); } @@ -130,6 +139,7 @@ void register_FEP_class(){ FEP_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return the values of all windows" ); } @@ -142,6 +152,7 @@ void register_FEP_class(){ "merge" , merge_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Merge the deltas for iterations start->end" ); } @@ -154,6 +165,7 @@ void register_FEP_class(){ "merge" , merge_function_value , ( bp::arg("indicies") ) + , bp::release_gil_policy() , "Merge the deltas at the passed indicies" ); } @@ -165,6 +177,7 @@ void register_FEP_class(){ FEP_exposer.def( "nIterations" , nIterations_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -176,6 +189,7 @@ void register_FEP_class(){ FEP_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the number of lambda values (windows)" ); } @@ -187,6 +201,7 @@ void register_FEP_class(){ FEP_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the total number of samples in the simulation" ); } @@ -198,6 +213,7 @@ void register_FEP_class(){ FEP_exposer.def( "nWindows" , nWindows_function_value + , bp::release_gil_policy() , "Return the number of windows" ); } @@ -237,6 +253,7 @@ void register_FEP_class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the data for iteration i" ); } @@ -249,6 +266,7 @@ void register_FEP_class(){ "removeRange" , removeRange_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Remove every iteration from start to end (inclusively)" ); } @@ -261,6 +279,7 @@ void register_FEP_class(){ "rollingAverage" , rollingAverage_function_value , ( bp::arg("niterations") ) + , bp::release_gil_policy() , "Return a list of Gradients that represents the rolling average over niterations\niterations over this TI data set. If this data set contains 100 iterations, and\nwe calculate the rolling average over 50 iterations, then the returned Gradients\nwill be the average from 1-50, then 2-51, 3-52.....51-100" ); } @@ -273,6 +292,7 @@ void register_FEP_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("windows"), bp::arg("deltas") ) + , bp::release_gil_policy() , "Set the deltas for the ith iteration" ); } @@ -285,6 +305,7 @@ void register_FEP_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("windows"), bp::arg("forwards_deltas"), bp::arg("backwards_deltas") ) + , bp::release_gil_policy() , "Set the deltas for the ith iteration" ); } @@ -297,6 +318,7 @@ void register_FEP_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("deltas") ) + , bp::release_gil_policy() , "Set the deltas for the ith iteration" ); } @@ -308,6 +330,7 @@ void register_FEP_class(){ FEP_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -319,6 +342,7 @@ void register_FEP_class(){ FEP_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -330,6 +354,7 @@ void register_FEP_class(){ FEP_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -341,6 +366,7 @@ void register_FEP_class(){ FEP_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -352,6 +378,7 @@ void register_FEP_class(){ FEP_exposer.def( "windows" , windows_function_value + , bp::release_gil_policy() , "Return the value of all windows" ); } diff --git a/wrapper/Analysis/FEPDeltas.pypp.cpp b/wrapper/Analysis/FEPDeltas.pypp.cpp index c4d82a2cb..bfa3c0619 100644 --- a/wrapper/Analysis/FEPDeltas.pypp.cpp +++ b/wrapper/Analysis/FEPDeltas.pypp.cpp @@ -29,6 +29,8 @@ SireAnalysis::FEPDeltas __copy__(const SireAnalysis::FEPDeltas &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FEPDeltas_class(){ { //::SireAnalysis::FEPDeltas @@ -46,6 +48,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "backwardsData" , backwardsData_function_value + , bp::release_gil_policy() , "Return the raw data for the backwards deltas" ); } @@ -57,6 +60,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "backwardsDeltas" , backwardsDeltas_function_value + , bp::release_gil_policy() , "Return the raw data for the backwards deltas" ); } @@ -68,6 +72,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "backwardsValues" , backwardsValues_function_value + , bp::release_gil_policy() , "Return the backwards deltas. This returns the lambda value of the from window,\ntogether with the free energy delta" ); } @@ -79,6 +84,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "forwardsData" , forwardsData_function_value + , bp::release_gil_policy() , "Return the raw data for the fowards deltas" ); } @@ -90,6 +96,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "forwardsDeltas" , forwardsDeltas_function_value + , bp::release_gil_policy() , "Return the raw data for the fowards deltas" ); } @@ -101,6 +108,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "forwardsValues" , forwardsValues_function_value + , bp::release_gil_policy() , "Return the forwards deltas. This returns the lambda value of the from window,\ntogether with the value of the free energy delta" ); } @@ -112,6 +120,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "integrate" , integrate_function_value + , bp::release_gil_policy() , "Integrate (sum) the deltas across the windows to return the PMF" ); } @@ -123,6 +132,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -134,6 +144,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return the lambda values for all of the windows" ); } @@ -146,6 +157,7 @@ void register_FEPDeltas_class(){ "merge" , merge_function_value , ( bp::arg("deltas") ) + , bp::release_gil_policy() , "Merge together all of the passed FEPDeltas into a single object" ); } @@ -157,6 +169,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the number of lambda values (windows)" ); } @@ -168,6 +181,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the total number of samples in the deltas" ); } @@ -179,6 +193,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "nWindows" , nWindows_function_value + , bp::release_gil_policy() , "Return the number of windows" ); } @@ -206,6 +221,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "Integrate (sum) the deltas across the windows to return the PMF" ); } @@ -217,6 +233,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "sumBackwards" , sumBackwards_function_value + , bp::release_gil_policy() , "Integrate (sum) the backwards deltas across the windows to return the PMF" ); } @@ -228,6 +245,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "sumBackwardsTaylor" , sumBackwardsTaylor_function_value + , bp::release_gil_policy() , "Integrate (sum) the backwards Taylor expansions across the windows to return the PMF" ); } @@ -239,6 +257,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "sumForwards" , sumForwards_function_value + , bp::release_gil_policy() , "Integrate (sum) the forwards deltas across the windows to return the PMF" ); } @@ -250,6 +269,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "sumForwardsTaylor" , sumForwardsTaylor_function_value + , bp::release_gil_policy() , "Integrate (sum) the forwards taylor expansions across the windows to return the PMF" ); } @@ -261,6 +281,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature at which the FEP deltas were all collected" ); } @@ -272,6 +293,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -283,6 +305,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -294,6 +317,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "Return the values between windows. This returns the average of the\nforwards and backwards values" ); } @@ -305,6 +329,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -316,6 +341,7 @@ void register_FEPDeltas_class(){ FEPDeltas_exposer.def( "windows" , windows_function_value + , bp::release_gil_policy() , "Return the values of all of the windows" ); } diff --git a/wrapper/Analysis/Gradients.pypp.cpp b/wrapper/Analysis/Gradients.pypp.cpp index 94636225e..ebd5f79c0 100644 --- a/wrapper/Analysis/Gradients.pypp.cpp +++ b/wrapper/Analysis/Gradients.pypp.cpp @@ -31,6 +31,8 @@ SireAnalysis::Gradients __copy__(const SireAnalysis::Gradients &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Gradients_class(){ { //::SireAnalysis::Gradients @@ -50,6 +52,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "analyticData" , analyticData_function_value + , bp::release_gil_policy() , "Return the raw data for the analytic gradients" ); } @@ -62,6 +65,7 @@ void register_Gradients_class(){ "backwards" , backwards_function_value , ( bp::arg("lam") ) + , bp::release_gil_policy() , "Return the backwards gradient for the passed lambda value" ); } @@ -73,6 +77,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "backwardsData" , backwardsData_function_value + , bp::release_gil_policy() , "Return the raw data for the backwards free energy gradients" ); } @@ -84,6 +89,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "backwardsValues" , backwardsValues_function_value + , bp::release_gil_policy() , "Return the values of the backwards gradients as data points. This returns the\naverage backwards gradient for each lambda value, together with the\nstandard error at the 90% confidence level" ); } @@ -95,6 +101,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "deltaLambda" , deltaLambda_function_value + , bp::release_gil_policy() , "Return the value of delta lambda. This will be zero if these are\npure TI gradients" ); } @@ -107,6 +114,7 @@ void register_Gradients_class(){ "forwards" , forwards_function_value , ( bp::arg("lam") ) + , bp::release_gil_policy() , "Return the forwards gradient for the passed lambda value" ); } @@ -118,6 +126,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "forwardsData" , forwardsData_function_value + , bp::release_gil_policy() , "Return the raw data for the forwards free energy gradients" ); } @@ -129,6 +138,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "forwardsValues" , forwardsValues_function_value + , bp::release_gil_policy() , "Return the values of the forwards gradients as data points. This returns the\naverage forwards gradient for each lambda value, together with the\nstandard error at the 90% confidence level" ); } @@ -141,6 +151,7 @@ void register_Gradients_class(){ "gradient" , gradient_function_value , ( bp::arg("lam") ) + , bp::release_gil_policy() , "Return the gradient at the passed lambda value. This is the\naverage of the forwards and backwards gradient if finite difference\nis used" ); } @@ -152,6 +163,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "integrate" , integrate_function_value + , bp::release_gil_policy() , "Integrate these gradients between 0 and 1 using a polynomial of\norder ngradients-2 and return them as a potential of mean force (PMF)" ); } @@ -164,6 +176,7 @@ void register_Gradients_class(){ "integrate" , integrate_function_value , ( bp::arg("order") ) + , bp::release_gil_policy() , "Integrate these gradients between 0 and 1 using a polynomial\nof passed order and return them as a potential of mean force (PMF)" ); } @@ -176,6 +189,7 @@ void register_Gradients_class(){ "integrate" , integrate_function_value , ( bp::arg("range_min"), bp::arg("range_max") ) + , bp::release_gil_policy() , "Integrate these gradients between range_min to range_max using\na polynomial of order 10 and return them as a potential of mean force (PMF)" ); } @@ -188,6 +202,7 @@ void register_Gradients_class(){ "integrate" , integrate_function_value , ( bp::arg("range_min"), bp::arg("range_max"), bp::arg("order") ) + , bp::release_gil_policy() , "Integrate these gradients between range_min to range_max using\na polynomial of passed order and return them as a potential of mean force (PMF)" ); } @@ -199,6 +214,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -210,6 +226,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "keys" , keys_function_value + , bp::release_gil_policy() , "Return the (sorted) list of all lambda values" ); } @@ -221,6 +238,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return the (sorted) list of the lambda values" ); } @@ -233,6 +251,7 @@ void register_Gradients_class(){ "merge" , merge_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Merge together the passed list of Gradients into a single object.\nNote that all of the passed gradients must be compatible, e.g.\nhave the same temperature and delta lambda values" ); } @@ -244,6 +263,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the total number of lambda values" ); } @@ -255,6 +275,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the total number of samples used to calculate these gradients" ); } @@ -294,6 +315,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature at which the gradients were collected" ); } @@ -305,6 +327,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -316,6 +339,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -327,6 +351,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "Return the values of the gradients as data points. This returns the\naverage of the forwards and backwards gradients, with errors calculated\nbased on both the difference between the forwards and backwards values,\nand the 90% confidence level of the average of gradients" ); } @@ -338,6 +363,7 @@ void register_Gradients_class(){ Gradients_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Analysis/PMF.pypp.cpp b/wrapper/Analysis/PMF.pypp.cpp index 1be18ed10..b8c7fe0c0 100644 --- a/wrapper/Analysis/PMF.pypp.cpp +++ b/wrapper/Analysis/PMF.pypp.cpp @@ -29,6 +29,8 @@ SireAnalysis::PMF __copy__(const SireAnalysis::PMF &other){ return SireAnalysis: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PMF_class(){ { //::SireAnalysis::PMF @@ -45,6 +47,7 @@ void register_PMF_class(){ PMF_exposer.def( "deltaG" , deltaG_function_value + , bp::release_gil_policy() , "Return the total free energy change along the PMF (difference in\nfree energy of the end-points)" ); } @@ -56,6 +59,7 @@ void register_PMF_class(){ PMF_exposer.def( "error" , error_function_value + , bp::release_gil_policy() , "Return the error on the total free energy calculation" ); } @@ -67,6 +71,7 @@ void register_PMF_class(){ PMF_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this PMF is empty (has not values)" ); } @@ -93,6 +98,7 @@ void register_PMF_class(){ PMF_exposer.def( "rangeMax" , rangeMax_function_value + , bp::release_gil_policy() , "Return the maximum x-value of the PMF" ); } @@ -104,6 +110,7 @@ void register_PMF_class(){ PMF_exposer.def( "rangeMin" , rangeMin_function_value + , bp::release_gil_policy() , "Return the minimum x-value of the PMF" ); } @@ -115,6 +122,7 @@ void register_PMF_class(){ PMF_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -126,6 +134,7 @@ void register_PMF_class(){ PMF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +146,7 @@ void register_PMF_class(){ PMF_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "Return the raw data for the PMF" ); } @@ -148,6 +158,7 @@ void register_PMF_class(){ PMF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Analysis/SireAnalysis_registrars.cpp b/wrapper/Analysis/SireAnalysis_registrars.cpp index 198a79f49..8bb4704b1 100644 --- a/wrapper/Analysis/SireAnalysis_registrars.cpp +++ b/wrapper/Analysis/SireAnalysis_registrars.cpp @@ -5,27 +5,27 @@ #include "Helpers/version_error_impl.h" +#include "bennetts.h" +#include "fep.h" #include "ti.h" #include "ticomponents.h" -#include "fep.h" -#include "bennetts.h" #include "Helpers/objectregistry.hpp" void register_SireAnalysis_objects() { + ObjectRegistry::registerConverterFor< SireAnalysis::BennettsRatios >(); + ObjectRegistry::registerConverterFor< SireAnalysis::Bennetts >(); + ObjectRegistry::registerConverterFor< SireAnalysis::FEP >(); + ObjectRegistry::registerConverterFor< SireAnalysis::FEPDeltas >(); + ObjectRegistry::registerConverterFor< SireAnalysis::DataPoint >(); + ObjectRegistry::registerConverterFor< SireAnalysis::PMF >(); ObjectRegistry::registerConverterFor< SireAnalysis::Gradients >(); ObjectRegistry::registerConverterFor< SireAnalysis::TI >(); ObjectRegistry::registerConverterFor< SireAnalysis::TIPMF >(); ObjectRegistry::registerConverterFor< SireAnalysis::TIComponents >(); ObjectRegistry::registerConverterFor< SireAnalysis::ComponentGradients >(); - ObjectRegistry::registerConverterFor< SireAnalysis::FEP >(); - ObjectRegistry::registerConverterFor< SireAnalysis::FEPDeltas >(); - ObjectRegistry::registerConverterFor< SireAnalysis::DataPoint >(); - ObjectRegistry::registerConverterFor< SireAnalysis::PMF >(); - ObjectRegistry::registerConverterFor< SireAnalysis::BennettsRatios >(); - ObjectRegistry::registerConverterFor< SireAnalysis::Bennetts >(); } diff --git a/wrapper/Analysis/TI.pypp.cpp b/wrapper/Analysis/TI.pypp.cpp index d7b3b7c28..74c652f9b 100644 --- a/wrapper/Analysis/TI.pypp.cpp +++ b/wrapper/Analysis/TI.pypp.cpp @@ -31,6 +31,8 @@ SireAnalysis::TI __copy__(const SireAnalysis::TI &other){ return SireAnalysis::T #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_TI_class(){ @@ -51,6 +53,7 @@ void register_TI_class(){ "add" , add_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Add the passed free energy gradients to the TI calculation. The gradients\nare in a dictionary, indexed by lambda value, and are analytic TI gradients" ); } @@ -63,6 +66,7 @@ void register_TI_class(){ "add" , add_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Add the passed free energy gradients to the TI calculation. The gradients\nare in a dictionary, indexed by lambda value, and are pure TI gradients,\ni.e. they have been calculated exactly with an infinitesimal delta lambda" ); } @@ -75,6 +79,7 @@ void register_TI_class(){ "add" , add_function_value , ( bp::arg("gradients"), bp::arg("delta_lambda") ) + , bp::release_gil_policy() , "Add the passed free energy gradients to the TI calcualtion. The gradients\nare in a dictionary, indexed by lambda value, and are the raw free energies\ncalculated via the zwanzig equation as part of a finite-difference TI calculation.\nThe value of delta lambda used must also be passed (so that we can then divide\neach gradient by delta lambda to get an approximation of the gradient)" ); } @@ -87,6 +92,7 @@ void register_TI_class(){ "add" , add_function_value , ( bp::arg("forwards"), bp::arg("backwards"), bp::arg("delta_lambda") ) + , bp::release_gil_policy() , "Add the passed free energy gradients to the TI calculation. The gradients\nare in dictionaries, indexed by lambda values, and are the raw forwards and\nbackwards free energies calculated via the zwanzig equation as part of\na finite-difference TI calculation (backwards gradients calculated as the\nfree energy from lambda-delta_lambda -> lambda, while forwards gradients calculated as the\ndifference between lambda -> lambda+delta_lambda). The value of delta lambda\nmust be passed (so that we can then divide each gradient by delta lambda to get\nan approximation of the true gradient)" ); } @@ -99,6 +105,7 @@ void register_TI_class(){ "add" , add_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Add the passed free energy gradients to the TI calculation. The gradients\nare in a dictionary, indexed by lambda value, and are analytic TI gradients" ); } @@ -111,6 +118,7 @@ void register_TI_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the free energy gradient data for the ith iteration. This returns\na tuple of the forwards gradients, backwards gradients and the value\nof delta lambda. Note that for pure TI calculations, the forwards and\nbackwards gradients will be equal and the value of delta lambda will be 0" ); } @@ -122,6 +130,7 @@ void register_TI_class(){ TI_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Remove all values from the histogram" ); } @@ -133,6 +142,7 @@ void register_TI_class(){ TI_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -144,6 +154,7 @@ void register_TI_class(){ TI_exposer.def( "gradients" , gradients_function_value + , bp::release_gil_policy() , "Return the raw list of gradients" ); } @@ -155,6 +166,7 @@ void register_TI_class(){ TI_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return all values of lambda that have data. The values are returned\nin numerical order" ); } @@ -167,6 +179,7 @@ void register_TI_class(){ "merge" , merge_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Merge (average) together the gradients from iteration start to iteration\nend inclusive" ); } @@ -179,6 +192,7 @@ void register_TI_class(){ "merge" , merge_function_value , ( bp::arg("indicies") ) + , bp::release_gil_policy() , "Merge together the gradients from the iterations with the passed indicies" ); } @@ -190,6 +204,7 @@ void register_TI_class(){ TI_exposer.def( "nIterations" , nIterations_function_value + , bp::release_gil_policy() , "Return the number of iterations (number of sets of gradients that have been added)" ); } @@ -201,6 +216,7 @@ void register_TI_class(){ TI_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the number of lambda values" ); } @@ -212,6 +228,7 @@ void register_TI_class(){ TI_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the total number of samples in this calculation" ); } @@ -251,6 +268,7 @@ void register_TI_class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the data for iteration i. This sets the data equal to Gradients()" ); } @@ -263,6 +281,7 @@ void register_TI_class(){ "removeRange" , removeRange_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Remove every iteration from start to end (inclusively). This sets\nthe data equal to Gradients()" ); } @@ -275,6 +294,7 @@ void register_TI_class(){ "rollingAverage" , rollingAverage_function_value , ( bp::arg("niterations") ) + , bp::release_gil_policy() , "Return a list of Gradients that represents the rolling average over niterations\niterations over this TI data set. If this data set contains 100 iterations, and\nwe calculate the rolling average over 50 iterations, then the returned Gradients\nwill be the average from 1-50, then 2-51, 3-52.....51-100" ); } @@ -287,6 +307,7 @@ void register_TI_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("gradients") ) + , bp::release_gil_policy() , "Set the gradients for the ith iteration equal to gradients. These\nare analytic TI gradients" ); } @@ -299,6 +320,7 @@ void register_TI_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("gradients") ) + , bp::release_gil_policy() , "Set the gradients for the ith iteration equal to gradients. These\nmust be pure TI gradients, with no associated delta lambda value" ); } @@ -311,6 +333,7 @@ void register_TI_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("gradients"), bp::arg("delta_lambda") ) + , bp::release_gil_policy() , "Set the gradients for the ith iteration equal to gradients. These\nare finite difference TI gradients, which are the raw zwanzig\nfree energies together with the passed value of delta lambda" ); } @@ -323,6 +346,7 @@ void register_TI_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("forwards"), bp::arg("backwards"), bp::arg("delta_lambda") ) + , bp::release_gil_policy() , "Set the gradients for the ith iteration to the passed forwards\nand backwards finite difference TI values (together with associated\ndelta lambda). The forwards gradients should be the raw zwanzig\nvalues from lambda -> lambda+delta_lambda, while the backwards\ngradients should be the raw zwanzig values from lambda-delta_lambda -> lambda" ); } @@ -335,6 +359,7 @@ void register_TI_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("gradients") ) + , bp::release_gil_policy() , "Set the gradients for the ith iteration equal to gradients. These\nare analytic TI gradients" ); } @@ -346,6 +371,7 @@ void register_TI_class(){ TI_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -357,6 +383,7 @@ void register_TI_class(){ TI_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -368,6 +395,7 @@ void register_TI_class(){ TI_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -379,6 +407,7 @@ void register_TI_class(){ TI_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Analysis/TIComponents.pypp.cpp b/wrapper/Analysis/TIComponents.pypp.cpp index a2b61ff24..a7431a4e9 100644 --- a/wrapper/Analysis/TIComponents.pypp.cpp +++ b/wrapper/Analysis/TIComponents.pypp.cpp @@ -25,6 +25,8 @@ SireAnalysis::TIComponents __copy__(const SireAnalysis::TIComponents &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_TIComponents_class(){ @@ -45,6 +47,7 @@ void register_TIComponents_class(){ "add" , add_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Add the passed set of component gradients. Note that these must be compatible\nwith any that are already in this set" ); } @@ -57,6 +60,7 @@ void register_TIComponents_class(){ "add" , add_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Add the passed set of component gradients. Note that these must be compatible\nwith any that are already in this set" ); } @@ -69,6 +73,7 @@ void register_TIComponents_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith set of ComponentGradients" ); } @@ -80,6 +85,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Remove all values from the histogram" ); } @@ -91,6 +97,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "conserveMemory" , conserveMemory_function_value + , bp::release_gil_policy() , "Conserve memory by sharing as much data as possible between the different iterations" ); } @@ -102,6 +109,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "conservesMemory" , conservesMemory_function_value + , bp::release_gil_policy() , "Whether or not this object conserves memory" ); } @@ -113,6 +121,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -124,6 +133,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "gradients" , gradients_function_value + , bp::release_gil_policy() , "Return the raw list of component gradients" ); } @@ -135,6 +145,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "lambdaValues" , lambdaValues_function_value + , bp::release_gil_policy() , "Return a list of all lambda values that contain data" ); } @@ -147,6 +158,7 @@ void register_TIComponents_class(){ "merge" , merge_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Merge (average) together the gradients from iteration start to iteration\nend inclusive" ); } @@ -159,6 +171,7 @@ void register_TIComponents_class(){ "merge" , merge_function_value , ( bp::arg("indicies") ) + , bp::release_gil_policy() , "Merge together the gradients from the iterations with the passed indicies" ); } @@ -170,6 +183,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "nComponents" , nComponents_function_value + , bp::release_gil_policy() , "Return the number of components in this collection (number of views)" ); } @@ -181,6 +195,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "nIterations" , nIterations_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -192,6 +207,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "nLambdaValues" , nLambdaValues_function_value + , bp::release_gil_policy() , "Return the number of lambda values" ); } @@ -203,6 +219,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the total number of samples" ); } @@ -242,6 +259,7 @@ void register_TIComponents_class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the data for iteration i. This sets the data equal to ComponentGradients()" ); } @@ -254,6 +272,7 @@ void register_TIComponents_class(){ "removeRange" , removeRange_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Remove every iteration from start to end (inclusively). This sets\nthe data equal to ComponentGradients()" ); } @@ -266,6 +285,7 @@ void register_TIComponents_class(){ "rollingAverage" , rollingAverage_function_value , ( bp::arg("niterations") ) + , bp::release_gil_policy() , "Return a list of Gradients that represents the rolling average over niterations\niterations over this TI data set. If this data set contains 100 iterations, and\nwe calculate the rolling average over 50 iterations, then the returned Gradients\nwill be the average from 1-50, then 2-51, 3-52.....51-100" ); } @@ -278,6 +298,7 @@ void register_TIComponents_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("gradients") ) + , bp::release_gil_policy() , "Set the gradients for the ith iteration. Note that these must be compatible\nwith the gradients of the other iterations" ); } @@ -290,6 +311,7 @@ void register_TIComponents_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("gradients") ) + , bp::release_gil_policy() , "Set the gradients for the ith iteration. Note that these must be compatible\nwith the gradients of the other iterations" ); } @@ -301,6 +323,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of iterations" ); } @@ -312,6 +335,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -323,6 +347,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -334,6 +359,7 @@ void register_TIComponents_class(){ TIComponents_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Analysis/TIPMF.pypp.cpp b/wrapper/Analysis/TIPMF.pypp.cpp index 11fa40070..df97177d5 100644 --- a/wrapper/Analysis/TIPMF.pypp.cpp +++ b/wrapper/Analysis/TIPMF.pypp.cpp @@ -31,6 +31,8 @@ SireAnalysis::TIPMF __copy__(const SireAnalysis::TIPMF &other){ return SireAnaly #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TIPMF_class(){ { //::SireAnalysis::TIPMF @@ -49,6 +51,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "dropEndPoints" , dropEndPoints_function_value + , bp::release_gil_policy() , "Return a copy of the PMF where the gradients at the end points\n(the first and last gradients) have been removed. This can be used\nto estimate the effect of end-point error" ); } @@ -60,6 +63,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "gradients" , gradients_function_value + , bp::release_gil_policy() , "Return the raw gradients used to calculate the PMF" ); } @@ -71,6 +75,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "integral" , integral_function_value + , bp::release_gil_policy() , "Return the free energy calculated using integration of the\npolynomial fitted to the gradients" ); } @@ -97,6 +102,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "order" , order_function_value + , bp::release_gil_policy() , "Return the order (number of polynomials) used to integrate\nthe gradients to get the PMF" ); } @@ -108,6 +114,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "quadrature" , quadrature_function_value + , bp::release_gil_policy() , "Return the free energy calculated using trapezium quadrature\nfrom the raw gradients" ); } @@ -119,6 +126,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "rangeMax" , rangeMax_function_value + , bp::release_gil_policy() , "Return the maximum value of the range of integration" ); } @@ -130,6 +138,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "rangeMin" , rangeMin_function_value + , bp::release_gil_policy() , "Return the minimum value of the range of integration" ); } @@ -142,6 +151,7 @@ void register_TIPMF_class(){ "setGradients" , setGradients_function_value , ( bp::arg("gradients") ) + , bp::release_gil_policy() , "Set the raw gradients to be integrated" ); } @@ -154,6 +164,7 @@ void register_TIPMF_class(){ "setOrder" , setOrder_function_value , ( bp::arg("order") ) + , bp::release_gil_policy() , "Set the order (number of polynomials) to fit the gradients for\nPMF integration" ); } @@ -166,6 +177,7 @@ void register_TIPMF_class(){ "setRange" , setRange_function_value , ( bp::arg("min_x"), bp::arg("max_x") ) + , bp::release_gil_policy() , "Set the range of integration" ); } @@ -177,6 +189,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "smoothedGradients" , smoothedGradients_function_value + , bp::release_gil_policy() , "Return the smoothed (fitted) gradients used to calculate the PMF" ); } @@ -188,6 +201,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -199,6 +213,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -210,6 +225,7 @@ void register_TIPMF_class(){ TIPMF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Analysis/__init__.py b/wrapper/Analysis/__init__.py index 123a3b6c1..b37bf5abd 100644 --- a/wrapper/Analysis/__init__.py +++ b/wrapper/Analysis/__init__.py @@ -1,12 +1,27 @@ -############################# -## -## The Soiree module -## -## (C) Christopher Woods -## - -import Sire.Maths -import Sire.CAS -import Sire.Units - -from Sire.Analysis._Analysis import * +""" +.. currentmodule:: sire.legacy.Analysis + +Classes +========= + +.. autosummary:: + :toctree: generated/ + + Bennetts + ComponentGradients + DataPoint + FEP + FEPDeltas + Gradients + PMF + TI + TIComponents + TIPMF + +""" + +from .. import Maths as _Maths +from .. import CAS as _CAS +from .. import Units as _Units + +from ._Analysis import * diff --git a/wrapper/AutoGenerate/create_wrappers.py b/wrapper/AutoGenerate/create_wrappers.py index 55dacb3d8..4606130a5 100644 --- a/wrapper/AutoGenerate/create_wrappers.py +++ b/wrapper/AutoGenerate/create_wrappers.py @@ -1,7 +1,7 @@ #################################################### # # This script uses Py++ to create the Python -# wrappers for Sire. This script should be run +# wrappers for sire. This script should be run # in a directory that contains the results # of scanheaders.py # @@ -283,6 +283,41 @@ def is_copy_constructor(f): return False +def _call_with_release_gil(f): + if f.call_policies is None or f.call_policies.is_default(): + # we cannot hold the GIL for a function that has default arguments. + # This is because the default arguments will be deleted by python + # before the GIL is restored, leading to a crash + + for arg in f.arguments: + if arg.default_value: + print(f"Skipping GIL for {f} as argument {arg} is not default. {arg.default_value}") + return + + f.call_policies = call_policies.custom_call_policies( "bp::release_gil_policy" ) + +def call_all_with_released_gil(c): + """Make sure that all functions in this class are called with + the gil released + """ + try: + funs = c.member_functions() + except Exception: + return + + for f in funs: + _call_with_release_gil(f) + +def call_with_released_gil(c, func_name): + """Make sure that the gil is released when calling this function""" + try: + funs = c.member_functions(func_name) + except Exception: + return + + for f in funs: + _call_with_release_gil(f) + def export_class(mb, classname, aliases, includes, special_code, auto_str_function=True): """Do all the work necessary to allow the class called 'classname' to be exported, using the supplied aliases, and using the @@ -327,7 +362,7 @@ def export_class(mb, classname, aliases, includes, special_code, auto_str_functi for f in funs: if has_clone_function(f.return_type): f.call_policies = call_policies.custom_call_policies( \ - "bp::return_value_policy", \ + "bp::return_value_policy", \ "Helpers/clone_const_reference.hpp" ) #also add any operator[] or operator() functions @@ -341,7 +376,7 @@ def export_class(mb, classname, aliases, includes, special_code, auto_str_functi if (str(f).find("[]") != -1) or (str(f).find("()") != -1): if has_clone_function(f.return_type): f.call_policies = call_policies.custom_call_policies( \ - "bp::return_value_policy", \ + "bp::return_value_policy", \ "Helpers/clone_const_reference.hpp" ) #remove any declarations that return a pointer to something @@ -450,6 +485,11 @@ def export_class(mb, classname, aliases, includes, special_code, auto_str_functi c.add_registration_code("def( \"__str__\", &pvt_get_name)") c.add_registration_code("def( \"__repr__\", &pvt_get_name)") + # call all functions while releasing the gil + call_all_with_released_gil(c) + + c.add_declaration_code( "#include \"Helpers/release_gil_policy.hpp\"" ) + #is there a "count" or "size" function for this class? if has_function(c, "size"): c.add_declaration_code( "#include \"Helpers/len.hpp\"" ) @@ -613,10 +653,10 @@ def fixMB(mb): # All of the headers must be installed in the sire.app/include directory dir = os.path.dirname(sys.executable) - qtdir = "/usr/include/x86_64-linux-gnu/qt5" #"%s/../include/qt" % os.path.abspath(dir) + qtdir = "%s/../include/qt" % os.path.abspath(dir) boostdir = "%s/../include" % os.path.abspath(dir) gsldir = boostdir - openmm_include_dir = "/usr/local/openmm/include" + openmm_include_dir = boostdir need_input = False @@ -669,7 +709,7 @@ def fixMB(mb): cflags = "-m64 -fPIC -std=c++14", include_paths = sire_include_dirs + qt_include_dirs + boost_include_dirs + gsl_include_dirs, - define_symbols = ["GCCXML_PARSE", + define_symbols = ["GCCXML_PARSE", "__PIC__", "SIRE_ALWAYS_INLINE=inline", "SIRE_SKIP_INLINE_FUNCTIONS", "SIREN_SKIP_INLINE_FUNCTIONS", @@ -689,7 +729,7 @@ def fixMB(mb): include_paths = sire_include_dirs + qt_include_dirs + boost_include_dirs + gsl_include_dirs + openmm_include_dirs, - define_symbols = ["GCCXML_PARSE", + define_symbols = ["GCCXML_PARSE", "__PIC__", "SIRE_USE_OPENMM", "SIRE_ALWAYS_INLINE=inline", "SIRE_SKIP_INLINE_FUNCTIONS", diff --git a/wrapper/AutoGenerate/scanheaders.py b/wrapper/AutoGenerate/scanheaders.py index 8e7b5752b..a0f820230 100644 --- a/wrapper/AutoGenerate/scanheaders.py +++ b/wrapper/AutoGenerate/scanheaders.py @@ -1,7 +1,7 @@ ########################################## # # This script scans all of the header -# files in a specified directory to +# files in a specified directory to # get the list of classes that should # be exposed in Python # @@ -25,7 +25,7 @@ def getFiles(dir, pattern): return trimmed_files def getIncludes(file, lines): - + includes = { "\"%s\"" % file : 1 } for line in lines: @@ -46,7 +46,7 @@ def getDependencies(dir, file): try: #is there a corresponding .cpp file? file_cpp = re.sub(r"h(p*)$", "cpp", file) - + lines = open("%s/%s" % (dir,file_cpp), "r").readlines() return getIncludes(file, lines) @@ -56,7 +56,7 @@ def getDependencies(dir, file): try: #is there a corresponding .c file? file_c = re.sub(r"h(p*)$", "c", file) - + lines = open("%s/%s" % (dir,file_c), "r").readlines() return getIncludes(file, lines) @@ -78,14 +78,14 @@ def properties(self): def addDependency(self, headerfile, dir, module_dir): deps = getDependencies(dir, headerfile) + getDependencies(module_dir, headerfile) - + for dep in deps: self._dependencies[dep] = 1 def dependencies(self): return list(self._dependencies.keys()) -skip_metatypes = [ "QVariant", +skip_metatypes = [ "QVariant", "SireCAS::ExpressionBase", "SireMaths::Rational", "SireCluster::Node", @@ -110,7 +110,7 @@ def addFunction(self, func): def addMetaType(self, classname): #don't register some types if classname in skip_metatypes: - return + return self._metatypes.append(classname) @@ -275,9 +275,9 @@ def scanFiles(dir, module_dir, atom_properties, cg_properties, res_properties, chain_properties, seg_properties, bead_properties): """Scan the header files in the passed directory to get information - about all of the exposed classes, returning a list of all of + about all of the exposed classes, returning a list of all of the classes that are being exposed, and placing meta information - into the directory 'module_dir'""" + into the directory 'module_dir'""" h_files = getFiles(dir, "*.h") + getFiles(module_dir, "*.h") hpp_files = getFiles(dir, "*.hpp") + getFiles(module_dir, "*.hpp") @@ -461,7 +461,7 @@ def scanFiles(dir, module_dir, atom_properties, cg_properties, return exposed_classes if __name__ == "__main__": - + modules = { "Analysis" : "SireAnalysis", "Base" : "SireBase", "CAS" : "SireCAS", @@ -473,16 +473,17 @@ def scanFiles(dir, module_dir, atom_properties, cg_properties, "MM" : "SireMM", "Mol" : "SireMol", "Move" : "SireMove", + "Search" : "SireSearch", "Squire" : "Squire", "Stream" : "SireStream", "System" : "SireSystem", "Units" : "SireUnits", "Vol" : "SireVol" } - + if len(sys.argv) < 3: print("USAGE: python scanheaders.py input_path output_path") sys.exit(-1) - + siredir = sys.argv[1] outdir = sys.argv[2] @@ -496,7 +497,7 @@ def scanFiles(dir, module_dir, atom_properties, cg_properties, bead_properties = Properties() for module in modules: - + try: os.makedirs( "%s/%s" % (outdir,module) ) except: @@ -513,7 +514,7 @@ def scanFiles(dir, module_dir, atom_properties, cg_properties, module_classes = scanFiles( "%s/%s" % (siredir,modules[module]), "%s/%s" % (outdir,module), atom_properties, cg_properties, res_properties, - chain_properties, seg_properties, bead_properties ) + chain_properties, seg_properties, bead_properties ) for clas in module_classes: exposed_classes[clas] = 1 diff --git a/wrapper/Base/Array2DBase.pypp.cpp b/wrapper/Base/Array2DBase.pypp.cpp index 034482cba..330249f50 100644 --- a/wrapper/Base/Array2DBase.pypp.cpp +++ b/wrapper/Base/Array2DBase.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireBase::Array2DBase&){ return "SireBase::Array2DBase";} +#include "Helpers/release_gil_policy.hpp" + void register_Array2DBase_class(){ { //::SireBase::Array2DBase @@ -36,6 +38,7 @@ void register_Array2DBase_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_Array2DBase_class(){ "checkedOffset" , checkedOffset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -60,6 +64,7 @@ void register_Array2DBase_class(){ "map" , map_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -71,6 +76,7 @@ void register_Array2DBase_class(){ Array2DBase_exposer.def( "nColumns" , nColumns_function_value + , bp::release_gil_policy() , "" ); } @@ -82,6 +88,7 @@ void register_Array2DBase_class(){ Array2DBase_exposer.def( "nRows" , nRows_function_value + , bp::release_gil_policy() , "" ); } @@ -94,6 +101,7 @@ void register_Array2DBase_class(){ "offset" , offset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/Array2D_double_.pypp.cpp b/wrapper/Base/Array2D_double_.pypp.cpp index 178a9582f..29f7bdc39 100644 --- a/wrapper/Base/Array2D_double_.pypp.cpp +++ b/wrapper/Base/Array2D_double_.pypp.cpp @@ -23,6 +23,8 @@ SireBase::Array2D __copy__(const SireBase::Array2D &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Array2D_double__class(){ { //::SireBase::Array2D< double > @@ -100,6 +102,7 @@ void register_Array2D_double__class(){ "redimension" , redimension_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "" ); } @@ -113,6 +116,7 @@ void register_Array2D_double__class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +130,7 @@ void register_Array2D_double__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -138,6 +143,7 @@ void register_Array2D_double__class(){ Array2D_double__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -150,6 +156,7 @@ void register_Array2D_double__class(){ Array2D_double__exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/ArrayProperty_QString_.pypp.cpp b/wrapper/Base/ArrayProperty_QString_.pypp.cpp index e719a05f0..75991b447 100644 --- a/wrapper/Base/ArrayProperty_QString_.pypp.cpp +++ b/wrapper/Base/ArrayProperty_QString_.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ArrayProperty_QString__class(){ @@ -45,6 +47,7 @@ void register_ArrayProperty_QString__class(){ "append" , append_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -58,6 +61,7 @@ void register_ArrayProperty_QString__class(){ "append" , append_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -70,6 +74,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "array" , array_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArrayProperty_QString__class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +114,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +127,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "empty" , empty_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +141,7 @@ void register_ArrayProperty_QString__class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -145,6 +155,7 @@ void register_ArrayProperty_QString__class(){ "insert" , insert_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -157,6 +168,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +182,7 @@ void register_ArrayProperty_QString__class(){ "move" , move_function_value , ( bp::arg("from"), bp::arg("to") ) + , bp::release_gil_policy() , "" ); } @@ -195,6 +208,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "pop_back" , pop_back_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +221,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "pop_front" , pop_front_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +235,7 @@ void register_ArrayProperty_QString__class(){ "prepend" , prepend_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +249,7 @@ void register_ArrayProperty_QString__class(){ "push_back" , push_back_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +263,7 @@ void register_ArrayProperty_QString__class(){ "push_front" , push_front_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +277,7 @@ void register_ArrayProperty_QString__class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -271,6 +290,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "removeFirst" , removeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -283,6 +303,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "removeLast" , removeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -296,6 +317,7 @@ void register_ArrayProperty_QString__class(){ "replace" , replace_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +330,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -321,6 +344,7 @@ void register_ArrayProperty_QString__class(){ "swap" , swap_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -334,6 +358,7 @@ void register_ArrayProperty_QString__class(){ "swap" , swap_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +372,7 @@ void register_ArrayProperty_QString__class(){ "takeAt" , takeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -359,6 +385,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "takeFirst" , takeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -371,6 +398,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "takeLast" , takeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -383,6 +411,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "toList" , toList_function_value + , bp::release_gil_policy() , "" ); } @@ -395,6 +424,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -407,6 +437,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -419,6 +450,7 @@ void register_ArrayProperty_QString__class(){ ArrayProperty_QString__exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/ArrayProperty_double_.pypp.cpp b/wrapper/Base/ArrayProperty_double_.pypp.cpp index 7e887727b..fd4d57e13 100644 --- a/wrapper/Base/ArrayProperty_double_.pypp.cpp +++ b/wrapper/Base/ArrayProperty_double_.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ArrayProperty_double__class(){ @@ -45,6 +47,7 @@ void register_ArrayProperty_double__class(){ "append" , append_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -58,6 +61,7 @@ void register_ArrayProperty_double__class(){ "append" , append_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -70,6 +74,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "array" , array_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArrayProperty_double__class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +114,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +127,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "empty" , empty_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +141,7 @@ void register_ArrayProperty_double__class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -145,6 +155,7 @@ void register_ArrayProperty_double__class(){ "insert" , insert_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -157,6 +168,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +182,7 @@ void register_ArrayProperty_double__class(){ "move" , move_function_value , ( bp::arg("from"), bp::arg("to") ) + , bp::release_gil_policy() , "" ); } @@ -195,6 +208,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "pop_back" , pop_back_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +221,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "pop_front" , pop_front_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +235,7 @@ void register_ArrayProperty_double__class(){ "prepend" , prepend_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +249,7 @@ void register_ArrayProperty_double__class(){ "push_back" , push_back_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +263,7 @@ void register_ArrayProperty_double__class(){ "push_front" , push_front_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +277,7 @@ void register_ArrayProperty_double__class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -271,6 +290,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "removeFirst" , removeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -283,6 +303,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "removeLast" , removeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -296,6 +317,7 @@ void register_ArrayProperty_double__class(){ "replace" , replace_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +330,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -321,6 +344,7 @@ void register_ArrayProperty_double__class(){ "swap" , swap_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -334,6 +358,7 @@ void register_ArrayProperty_double__class(){ "swap" , swap_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +372,7 @@ void register_ArrayProperty_double__class(){ "takeAt" , takeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -359,6 +385,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "takeFirst" , takeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -371,6 +398,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "takeLast" , takeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -383,6 +411,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "toList" , toList_function_value + , bp::release_gil_policy() , "" ); } @@ -395,6 +424,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -407,6 +437,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -419,6 +450,7 @@ void register_ArrayProperty_double__class(){ ArrayProperty_double__exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/ArrayProperty_int_.pypp.cpp b/wrapper/Base/ArrayProperty_int_.pypp.cpp index 48ab226ab..01b0b794d 100644 --- a/wrapper/Base/ArrayProperty_int_.pypp.cpp +++ b/wrapper/Base/ArrayProperty_int_.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ArrayProperty_int__class(){ @@ -45,6 +47,7 @@ void register_ArrayProperty_int__class(){ "append" , append_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -58,6 +61,7 @@ void register_ArrayProperty_int__class(){ "append" , append_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -70,6 +74,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "array" , array_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArrayProperty_int__class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +114,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +127,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "empty" , empty_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +141,7 @@ void register_ArrayProperty_int__class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -145,6 +155,7 @@ void register_ArrayProperty_int__class(){ "insert" , insert_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -157,6 +168,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +182,7 @@ void register_ArrayProperty_int__class(){ "move" , move_function_value , ( bp::arg("from"), bp::arg("to") ) + , bp::release_gil_policy() , "" ); } @@ -195,6 +208,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "pop_back" , pop_back_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +221,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "pop_front" , pop_front_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +235,7 @@ void register_ArrayProperty_int__class(){ "prepend" , prepend_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +249,7 @@ void register_ArrayProperty_int__class(){ "push_back" , push_back_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +263,7 @@ void register_ArrayProperty_int__class(){ "push_front" , push_front_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +277,7 @@ void register_ArrayProperty_int__class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -271,6 +290,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "removeFirst" , removeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -283,6 +303,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "removeLast" , removeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -296,6 +317,7 @@ void register_ArrayProperty_int__class(){ "replace" , replace_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +330,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -321,6 +344,7 @@ void register_ArrayProperty_int__class(){ "swap" , swap_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -334,6 +358,7 @@ void register_ArrayProperty_int__class(){ "swap" , swap_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +372,7 @@ void register_ArrayProperty_int__class(){ "takeAt" , takeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -359,6 +385,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "takeFirst" , takeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -371,6 +398,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "takeLast" , takeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -383,6 +411,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "toList" , toList_function_value + , bp::release_gil_policy() , "" ); } @@ -395,6 +424,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -407,6 +437,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -419,6 +450,7 @@ void register_ArrayProperty_int__class(){ ArrayProperty_int__exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/BooleanProperty.pypp.cpp b/wrapper/Base/BooleanProperty.pypp.cpp index d5b743d4e..98edeab63 100644 --- a/wrapper/Base/BooleanProperty.pypp.cpp +++ b/wrapper/Base/BooleanProperty.pypp.cpp @@ -25,6 +25,8 @@ SireBase::BooleanProperty __copy__(const SireBase::BooleanProperty &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BooleanProperty_class(){ { //::SireBase::BooleanProperty @@ -43,6 +45,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -65,6 +69,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "" ); } @@ -76,6 +81,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +93,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +105,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +117,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +129,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -146,6 +156,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +168,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -168,6 +180,7 @@ void register_BooleanProperty_class(){ BooleanProperty_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return this number cast as a double" ); } diff --git a/wrapper/Base/CMakeAutogenFile.txt b/wrapper/Base/CMakeAutogenFile.txt index 2acaabd2c..3ed299643 100644 --- a/wrapper/Base/CMakeAutogenFile.txt +++ b/wrapper/Base/CMakeAutogenFile.txt @@ -1,64 +1,64 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - Property.pypp.cpp - PackedArray2D_QString_.pypp.cpp - PackedArray2D_QVariant_Array.pypp.cpp - LowerCaseString.pypp.cpp - PackedArray2D_IntegerArrayProperty_Array.pypp.cpp - PackedArray2D_StringArrayProperty_Array.pypp.cpp - CombineProperties.pypp.cpp - PropertyName.pypp.cpp - PackedArray2D_int_.pypp.cpp - TrigArray2DBase.pypp.cpp - TimeProperty.pypp.cpp Array2DBase.pypp.cpp - TrimString.pypp.cpp + Array2D_double_.pypp.cpp + ArrayProperty_QString_.pypp.cpp + ArrayProperty_double_.pypp.cpp ArrayProperty_int_.pypp.cpp + BooleanProperty.pypp.cpp + CPUID.pypp.cpp ChunkedVector_double_.pypp.cpp - NoMangling.pypp.cpp + CombineProperties.pypp.cpp DoubleArrayProperty.pypp.cpp - VariantProperty.pypp.cpp - Array2D_double_.pypp.cpp - StringProperty.pypp.cpp - TempDir.pypp.cpp - MemInfo.pypp.cpp - ArrayProperty_QString_.pypp.cpp - PackedArray2D_QVariant_.pypp.cpp + FlopsMark.pypp.cpp Incremint.pypp.cpp - PackedArray2D_IntegerArrayProperty.pypp.cpp - NumberProperty.pypp.cpp - NullProperty.pypp.cpp - ArrayProperty_double_.pypp.cpp - LinkToProperty.pypp.cpp - PropertyList.pypp.cpp - UpperCaseString.pypp.cpp - UnitTest.pypp.cpp - PackedArray2D_double_.pypp.cpp - SimpleRange.pypp.cpp - PackedArray2D_QString_Array.pypp.cpp - PackedArray2D_PropertyList_Array.pypp.cpp - _Base_free_functions.pypp.cpp - PackedArray2D_DoubleArrayProperty_Array.pypp.cpp + IntegerArrayProperty.pypp.cpp LengthProperty.pypp.cpp - vector_less__double__greater_.pypp.cpp - FlopsMark.pypp.cpp - CPUID.pypp.cpp - Range.pypp.cpp - PropertyMap.pypp.cpp - Properties.pypp.cpp - TrigArray2D_double_.pypp.cpp - Process.pypp.cpp + LinkToProperty.pypp.cpp + LowerCaseString.pypp.cpp + MajorMinorVersion.pypp.cpp + MemInfo.pypp.cpp + NoMangling.pypp.cpp + NullProperty.pypp.cpp + NumberProperty.pypp.cpp PackedArray2D_DoubleArrayProperty.pypp.cpp - StringArrayProperty.pypp.cpp - PackedArray2D_StringArrayProperty.pypp.cpp + PackedArray2D_DoubleArrayProperty_Array.pypp.cpp + PackedArray2D_IntegerArrayProperty.pypp.cpp + PackedArray2D_IntegerArrayProperty_Array.pypp.cpp PackedArray2D_PropertyList.pypp.cpp - StringMangler.pypp.cpp - MajorMinorVersion.pypp.cpp + PackedArray2D_PropertyList_Array.pypp.cpp + PackedArray2D_QString_.pypp.cpp + PackedArray2D_QString_Array.pypp.cpp + PackedArray2D_QVariant_.pypp.cpp + PackedArray2D_QVariant_Array.pypp.cpp + PackedArray2D_StringArrayProperty.pypp.cpp + PackedArray2D_StringArrayProperty_Array.pypp.cpp + PackedArray2D_double_.pypp.cpp PackedArray2D_double_Array.pypp.cpp - IntegerArrayProperty.pypp.cpp - BooleanProperty.pypp.cpp + PackedArray2D_int_.pypp.cpp PackedArray2D_int_Array.pypp.cpp + Process.pypp.cpp + Properties.pypp.cpp + Property.pypp.cpp + PropertyList.pypp.cpp + PropertyMap.pypp.cpp + PropertyName.pypp.cpp + Range.pypp.cpp + SimpleRange.pypp.cpp + StringArrayProperty.pypp.cpp + StringMangler.pypp.cpp + StringProperty.pypp.cpp + TempDir.pypp.cpp + TimeProperty.pypp.cpp + TrigArray2DBase.pypp.cpp + TrigArray2D_double_.pypp.cpp + TrimString.pypp.cpp + UnitTest.pypp.cpp + UpperCaseString.pypp.cpp + VariantProperty.pypp.cpp Version.pypp.cpp + _Base_free_functions.pypp.cpp + vector_less__double__greater_.pypp.cpp SireBase_containers.cpp SireBase_properties.cpp SireBase_registrars.cpp diff --git a/wrapper/Base/CMakeLists.txt b/wrapper/Base/CMakeLists.txt index 4595b7823..4f873d37f 100644 --- a/wrapper/Base/CMakeLists.txt +++ b/wrapper/Base/CMakeLists.txt @@ -21,8 +21,9 @@ include(CMakeAutogenFile.txt) # Define the sources in SireBase set ( WRAPBASE_SOURCES + autoconvert_Slice.cpp _Base.main.cpp - + ${PYPP_SOURCES} ) @@ -30,7 +31,7 @@ set ( WRAPBASE_SOURCES # Create the library that holds all of the class wrappers add_library (Base ${WRAPBASE_SOURCES}) -set_target_properties (Base +set_target_properties (Base PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -38,19 +39,19 @@ set_target_properties (Base PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Base SirePython SIRE_SireBase SIRE_SireCAS - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Base" "_init_Base" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Base ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Base ) install( TARGETS Base LIBRARY DESTINATION ${INSTALLDIR} @@ -59,6 +60,6 @@ install( TARGETS Base ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Base/CPUID.pypp.cpp b/wrapper/Base/CPUID.pypp.cpp index 044922d42..a1f575430 100644 --- a/wrapper/Base/CPUID.pypp.cpp +++ b/wrapper/Base/CPUID.pypp.cpp @@ -23,6 +23,8 @@ SireBase::CPUID __copy__(const SireBase::CPUID &other){ return SireBase::CPUID(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CPUID_class(){ { //::SireBase::CPUID @@ -38,6 +40,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "brand" , brand_function_value + , bp::release_gil_policy() , "Return the Brand string for this CPU" ); } @@ -49,6 +52,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "clockSpeed" , clockSpeed_function_value + , bp::release_gil_policy() , "Return the clockspeed of this processor. A value of -1 is returned\nif this is not known" ); } @@ -60,6 +64,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "numCores" , numCores_function_value + , bp::release_gil_policy() , "Return the number of cores of this processor. A value of 1 is returned\nif this is not known (as we must have at least 1 core)" ); } @@ -86,6 +91,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "supportableFeatures" , supportableFeatures_function_value + , bp::release_gil_policy() , "Return the list of all searchable supportable features" ); } @@ -97,6 +103,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "supportedFeatures" , supportedFeatures_function_value + , bp::release_gil_policy() , "Return the list of all features supported on this CPU" ); } @@ -109,6 +116,7 @@ void register_CPUID_class(){ "supports" , supports_function_value , ( bp::arg("feature") ) + , bp::release_gil_policy() , "Returns whether or not the CPU supports the passed feature.\nNote that the passed feature must be one of the strings\nas returned by supportableFeatures" ); } @@ -120,6 +128,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "supportsAVX" , supportsAVX_function_value + , bp::release_gil_policy() , "Return whether or not this processor supports AVX vector instructions" ); } @@ -131,6 +140,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "supportsSSE2" , supportsSSE2_function_value + , bp::release_gil_policy() , "Return whether or not this processor supports SSE2 vector instructions" ); } @@ -142,6 +152,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -153,6 +164,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -164,6 +176,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "vendor" , vendor_function_value + , bp::release_gil_policy() , "Return the Vendor string for this CPU" ); } @@ -175,6 +188,7 @@ void register_CPUID_class(){ CPUID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/ChunkedVector_double_.pypp.cpp b/wrapper/Base/ChunkedVector_double_.pypp.cpp index 3dcb8c2d5..9b4d1e770 100644 --- a/wrapper/Base/ChunkedVector_double_.pypp.cpp +++ b/wrapper/Base/ChunkedVector_double_.pypp.cpp @@ -19,6 +19,8 @@ SireBase::ChunkedVector __copy__(const SireBase::ChunkedVector&){ return "SireBase::ChunkedVector";} +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ChunkedVector_double__class(){ @@ -82,6 +84,7 @@ void register_ChunkedVector_double__class(){ "append" , append_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -108,6 +111,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "capacity" , capacity_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +124,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +137,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_ChunkedVector_double__class(){ "count" , count_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -158,6 +165,7 @@ void register_ChunkedVector_double__class(){ "fromList" , fromList_function_value , ( bp::arg("list") ) + , bp::release_gil_policy() , "" ); } @@ -171,6 +179,7 @@ void register_ChunkedVector_double__class(){ "fromStdVector" , fromStdVector_function_value , ( bp::arg("vector") ) + , bp::release_gil_policy() , "" ); } @@ -184,6 +193,7 @@ void register_ChunkedVector_double__class(){ "fromVector" , fromVector_function_value , ( bp::arg("vector") ) + , bp::release_gil_policy() , "" ); } @@ -196,6 +206,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -253,6 +264,7 @@ void register_ChunkedVector_double__class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -266,6 +278,7 @@ void register_ChunkedVector_double__class(){ "remove" , remove_function_value , ( bp::arg("i"), bp::arg("count") ) + , bp::release_gil_policy() , "" ); } @@ -279,6 +292,7 @@ void register_ChunkedVector_double__class(){ "reserve" , reserve_function_value , ( bp::arg("count") ) + , bp::release_gil_policy() , "" ); } @@ -292,6 +306,7 @@ void register_ChunkedVector_double__class(){ "resize" , resize_function_value , ( bp::arg("count") ) + , bp::release_gil_policy() , "" ); } @@ -304,6 +319,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -316,6 +332,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "squeeze" , squeeze_function_value + , bp::release_gil_policy() , "" ); } @@ -328,6 +345,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "toList" , toList_function_value + , bp::release_gil_policy() , "" ); } @@ -340,6 +358,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "toStdVector" , toStdVector_function_value + , bp::release_gil_policy() , "" ); } @@ -352,6 +371,7 @@ void register_ChunkedVector_double__class(){ ChunkedVector_double__exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -365,6 +385,7 @@ void register_ChunkedVector_double__class(){ "value" , value_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -378,6 +399,7 @@ void register_ChunkedVector_double__class(){ "value" , value_function_value , ( bp::arg("i"), bp::arg("default_value") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/CombineProperties.pypp.cpp b/wrapper/Base/CombineProperties.pypp.cpp index 82a238b36..6e2c71a7c 100644 --- a/wrapper/Base/CombineProperties.pypp.cpp +++ b/wrapper/Base/CombineProperties.pypp.cpp @@ -24,6 +24,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CombineProperties_class(){ @@ -53,7 +55,7 @@ void register_CombineProperties_class(){ CombineProperties_exposer.def( "combinedProperty" , combinedProperty_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the combined property. This will be null if this property\nhas not been updated, or if there are no properties to combine" ); } @@ -65,6 +67,7 @@ void register_CombineProperties_class(){ CombineProperties_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of properties that are combined together\nto form this property" ); } @@ -76,6 +79,7 @@ void register_CombineProperties_class(){ CombineProperties_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty (has no properties)" ); } @@ -87,6 +91,7 @@ void register_CombineProperties_class(){ CombineProperties_exposer.def( "nSources" , nSources_function_value + , bp::release_gil_policy() , "Return the number of properties that are combined together\nto form this property" ); } @@ -111,6 +116,7 @@ void register_CombineProperties_class(){ CombineProperties_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of properties that are combined together\nto form this property" ); } @@ -122,6 +128,7 @@ void register_CombineProperties_class(){ CombineProperties_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this combination" ); } @@ -133,6 +140,7 @@ void register_CombineProperties_class(){ CombineProperties_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_CombineProperties_class(){ "updateFrom" , updateFrom_function_value , ( bp::arg("properties") ) + , bp::release_gil_policy() , "Update this combined property by fetching the necessary\nproperties to combine from properties\n\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } diff --git a/wrapper/Base/DoubleArrayProperty.pypp.cpp b/wrapper/Base/DoubleArrayProperty.pypp.cpp index 29190eb6c..c62f66f0f 100644 --- a/wrapper/Base/DoubleArrayProperty.pypp.cpp +++ b/wrapper/Base/DoubleArrayProperty.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -33,6 +35,8 @@ SireBase::DoubleArrayProperty __copy__(const SireBase::DoubleArrayProperty &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_DoubleArrayProperty_class(){ @@ -55,6 +59,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -66,6 +71,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +83,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +95,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "asAnArray" , asAnArray_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +107,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -110,6 +119,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -121,6 +131,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +143,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +155,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +183,7 @@ void register_DoubleArrayProperty_class(){ DoubleArrayProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/FlopsMark.pypp.cpp b/wrapper/Base/FlopsMark.pypp.cpp index db70bf0e4..09eb22009 100644 --- a/wrapper/Base/FlopsMark.pypp.cpp +++ b/wrapper/Base/FlopsMark.pypp.cpp @@ -21,6 +21,8 @@ SireBase::FlopsMark __copy__(const SireBase::FlopsMark &other){ return SireBase: const char* pvt_get_name(const SireBase::FlopsMark&){ return "SireBase::FlopsMark";} +#include "Helpers/release_gil_policy.hpp" + void register_FlopsMark_class(){ { //::SireBase::FlopsMark @@ -36,6 +38,7 @@ void register_FlopsMark_class(){ FlopsMark_exposer.def( "benchmark" , benchmark_function_value + , bp::release_gil_policy() , "Perform a simple benchmark to work out what the realistic maximum\nFLOPS count for this processor (compiled with this compiler)\nif a mixture of additions, products and sqrts are used" ); } @@ -47,6 +50,7 @@ void register_FlopsMark_class(){ FlopsMark_exposer.def( "benchmarkProduct" , benchmarkProduct_function_value + , bp::release_gil_policy() , "Perform a simple benchmark to work out what the realistic maximum\nFLOPS count for this processor (compiled with this compiler)\nif a mixture of additions and products are used" ); } @@ -58,6 +62,7 @@ void register_FlopsMark_class(){ FlopsMark_exposer.def( "benchmarkQuotient" , benchmarkQuotient_function_value + , bp::release_gil_policy() , "Perform a simple benchmark to work out what the realistic maximum\nFLOPS count for this processor (compiled with this compiler)\nif a mixture of additions and divides are used" ); } @@ -69,6 +74,7 @@ void register_FlopsMark_class(){ FlopsMark_exposer.def( "benchmarkSum" , benchmarkSum_function_value + , bp::release_gil_policy() , "Perform a simple benchmark to work out what the realistic maximum\nFLOPS count for this processor (compiled with this compiler)\nif only additions are used" ); } @@ -80,6 +86,7 @@ void register_FlopsMark_class(){ FlopsMark_exposer.def( "nFlops" , nFlops_function_value + , bp::release_gil_policy() , "Return the total number of flops from all threads up to this point" ); } @@ -91,6 +98,7 @@ void register_FlopsMark_class(){ FlopsMark_exposer.def( "nThreads" , nThreads_function_value + , bp::release_gil_policy() , "Return the total number of threads that contributed to this\nflop count" ); } @@ -129,6 +137,7 @@ void register_FlopsMark_class(){ "threadFlops" , threadFlops_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return a FlopsMark object that contains just the information\nfor the ith thread\nThrow: SireError::invalid_index\n" ); } diff --git a/wrapper/Base/Incremint.pypp.cpp b/wrapper/Base/Incremint.pypp.cpp index 695549bac..5f0df4790 100644 --- a/wrapper/Base/Incremint.pypp.cpp +++ b/wrapper/Base/Incremint.pypp.cpp @@ -15,6 +15,8 @@ SireBase::Incremint __copy__(const SireBase::Incremint &other){ return SireBase: const char* pvt_get_name(const SireBase::Incremint&){ return "SireBase::Incremint";} +#include "Helpers/release_gil_policy.hpp" + void register_Incremint_class(){ { //::SireBase::Incremint @@ -30,6 +32,7 @@ void register_Incremint_class(){ Incremint_exposer.def( "increment" , increment_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/IntegerArrayProperty.pypp.cpp b/wrapper/Base/IntegerArrayProperty.pypp.cpp index 22057c0af..583f8b44b 100644 --- a/wrapper/Base/IntegerArrayProperty.pypp.cpp +++ b/wrapper/Base/IntegerArrayProperty.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -33,6 +35,8 @@ SireBase::IntegerArrayProperty __copy__(const SireBase::IntegerArrayProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntegerArrayProperty_class(){ @@ -55,6 +59,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -66,6 +71,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +83,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +95,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "asAnArray" , asAnArray_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +107,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -110,6 +119,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -121,6 +131,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +143,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +155,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +183,7 @@ void register_IntegerArrayProperty_class(){ IntegerArrayProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/LengthProperty.pypp.cpp b/wrapper/Base/LengthProperty.pypp.cpp index 02f381668..f0d3c0c55 100644 --- a/wrapper/Base/LengthProperty.pypp.cpp +++ b/wrapper/Base/LengthProperty.pypp.cpp @@ -27,6 +27,8 @@ SireBase::LengthProperty __copy__(const SireBase::LengthProperty &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LengthProperty_class(){ { //::SireBase::LengthProperty @@ -59,6 +61,7 @@ void register_LengthProperty_class(){ LengthProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +73,7 @@ void register_LengthProperty_class(){ LengthProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +85,7 @@ void register_LengthProperty_class(){ LengthProperty_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return this number cast as a double" ); } diff --git a/wrapper/Base/LinkToProperty.pypp.cpp b/wrapper/Base/LinkToProperty.pypp.cpp index 228497a44..a823ab9b3 100644 --- a/wrapper/Base/LinkToProperty.pypp.cpp +++ b/wrapper/Base/LinkToProperty.pypp.cpp @@ -22,6 +22,8 @@ SireBase::LinkToProperty __copy__(const SireBase::LinkToProperty &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LinkToProperty_class(){ { //::SireBase::LinkToProperty @@ -39,7 +41,7 @@ void register_LinkToProperty_class(){ LinkToProperty_exposer.def( "filter" , filter_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return any filter for this link (this is null if there is no filter)" ); } @@ -51,6 +53,7 @@ void register_LinkToProperty_class(){ LinkToProperty_exposer.def( "isFiltered" , isFiltered_function_value + , bp::release_gil_policy() , "Return whether or not this link is filtered" ); } @@ -89,6 +92,7 @@ void register_LinkToProperty_class(){ LinkToProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this link" ); } @@ -100,6 +104,7 @@ void register_LinkToProperty_class(){ LinkToProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/LowerCaseString.pypp.cpp b/wrapper/Base/LowerCaseString.pypp.cpp index 197f647ab..3a62a9aeb 100644 --- a/wrapper/Base/LowerCaseString.pypp.cpp +++ b/wrapper/Base/LowerCaseString.pypp.cpp @@ -23,6 +23,8 @@ SireBase::LowerCaseString __copy__(const SireBase::LowerCaseString &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LowerCaseString_class(){ { //::SireBase::LowerCaseString @@ -39,6 +41,7 @@ void register_LowerCaseString_class(){ "mangle" , mangle_function_value , ( bp::arg("input") ) + , bp::release_gil_policy() , "Mangle the string - remove all initial and trailing spaces" ); } @@ -65,6 +68,7 @@ void register_LowerCaseString_class(){ LowerCaseString_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/MajorMinorVersion.pypp.cpp b/wrapper/Base/MajorMinorVersion.pypp.cpp index 374c61718..34d5d85a2 100644 --- a/wrapper/Base/MajorMinorVersion.pypp.cpp +++ b/wrapper/Base/MajorMinorVersion.pypp.cpp @@ -22,6 +22,8 @@ SireBase::MajorMinorVersion __copy__(const SireBase::MajorMinorVersion &other){ const char* pvt_get_name(const SireBase::MajorMinorVersion&){ return "SireBase::MajorMinorVersion";} +#include "Helpers/release_gil_policy.hpp" + void register_MajorMinorVersion_class(){ { //::SireBase::MajorMinorVersion @@ -39,6 +41,7 @@ void register_MajorMinorVersion_class(){ MajorMinorVersion_exposer.def( "incrementMajor" , incrementMajor_function_value + , bp::release_gil_policy() , "Increment the major version number - this resets the\nminor version number to 0" ); } @@ -50,6 +53,7 @@ void register_MajorMinorVersion_class(){ MajorMinorVersion_exposer.def( "incrementMinor" , incrementMinor_function_value + , bp::release_gil_policy() , "Increment the minor version number" ); } @@ -61,6 +65,7 @@ void register_MajorMinorVersion_class(){ MajorMinorVersion_exposer.def( "majorVersion" , majorVersion_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +77,7 @@ void register_MajorMinorVersion_class(){ MajorMinorVersion_exposer.def( "minorVersion" , minorVersion_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +104,7 @@ void register_MajorMinorVersion_class(){ MajorMinorVersion_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +116,7 @@ void register_MajorMinorVersion_class(){ MajorMinorVersion_exposer.def( "version" , version_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -121,6 +128,7 @@ void register_MajorMinorVersion_class(){ MajorMinorVersion_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/MemInfo.pypp.cpp b/wrapper/Base/MemInfo.pypp.cpp index 770f19394..3f6fbfd2a 100644 --- a/wrapper/Base/MemInfo.pypp.cpp +++ b/wrapper/Base/MemInfo.pypp.cpp @@ -29,6 +29,8 @@ SireBase::MemInfo __copy__(const SireBase::MemInfo &other){ return SireBase::Mem #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MemInfo_class(){ { //::SireBase::MemInfo @@ -44,6 +46,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "allocatedBytes" , allocatedBytes_function_value + , bp::release_gil_policy() , "Return the total number of bytes allocated to this process by\nmemory subsystem (only on the heap - this ignores the stack and\nany memory allocated within libraries). Note that fragmentation\nmay mean that not all of this memory is in use." ); } @@ -55,6 +58,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "mMappedBytes" , mMappedBytes_function_value + , bp::release_gil_policy() , "Return the total number of bytes that have been allocated via\nmmap to this process by the memory subsystem. This total is included\nwithin allocatedBytes, therefore allocatedBytes() - mMappedBytes()\nwill return the number of bytes that have not been allocated\nvia mmap" ); } @@ -103,6 +107,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "stopMonitoring" , stopMonitoring_function_value + , bp::release_gil_policy() , "Stop monitoring the memory of this process" ); } @@ -114,6 +119,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "takeMeasurement" , takeMeasurement_function_value + , bp::release_gil_policy() , "Take a measurement of the current memory usage of the process" ); } @@ -125,6 +131,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string containing details of the memory usage. This is\na platform dependent string, but can be useful to print to the user" ); } @@ -136,6 +143,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "totalSystemMemory" , totalSystemMemory_function_value + , bp::release_gil_policy() , "Return the total number of bytes of system memory\n(actual memory, not virtual memory). To ensure we dont page,\nwe have to ensure that this processes memory usage is below\nthe total system memory" ); } @@ -147,6 +155,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "totalVirtualMemory" , totalVirtualMemory_function_value + , bp::release_gil_policy() , "Return the total number of bytes of virtual memory available on this system\n(this includes system memory)" ); } @@ -158,6 +167,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "usedBytes" , usedBytes_function_value + , bp::release_gil_policy() , "Return the total number of bytes in use by the program. This number\nwill be less than or equal to the number of bytes returned by allocatedBytes.\nThis will be less if memory fragmentation means that pages of memory are\nnot able to be returned to the operating system when they are freed\nby the program" ); } @@ -169,6 +179,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "usedSystemMemory" , usedSystemMemory_function_value + , bp::release_gil_policy() , "Return the total amount of system memory in use.\n(actual memory, not virtual memory)" ); } @@ -180,6 +191,7 @@ void register_MemInfo_class(){ MemInfo_exposer.def( "usedVirtualMemory" , usedVirtualMemory_function_value + , bp::release_gil_policy() , "Return the total amount of virtual memory in use.\n(includes system memory)" ); } diff --git a/wrapper/Base/NoMangling.pypp.cpp b/wrapper/Base/NoMangling.pypp.cpp index 589098143..09f81f33f 100644 --- a/wrapper/Base/NoMangling.pypp.cpp +++ b/wrapper/Base/NoMangling.pypp.cpp @@ -23,6 +23,8 @@ SireBase::NoMangling __copy__(const SireBase::NoMangling &other){ return SireBas #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NoMangling_class(){ { //::SireBase::NoMangling @@ -39,6 +41,7 @@ void register_NoMangling_class(){ "mangle" , mangle_function_value , ( bp::arg("input") ) + , bp::release_gil_policy() , "Mangle the string - remove all initial and trailing spaces" ); } @@ -65,6 +68,7 @@ void register_NoMangling_class(){ NoMangling_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/NullProperty.pypp.cpp b/wrapper/Base/NullProperty.pypp.cpp index 1187d3219..6b0711b49 100644 --- a/wrapper/Base/NullProperty.pypp.cpp +++ b/wrapper/Base/NullProperty.pypp.cpp @@ -31,6 +31,8 @@ SireBase::NullProperty __copy__(const SireBase::NullProperty &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullProperty_class(){ { //::SireBase::NullProperty @@ -46,6 +48,7 @@ void register_NullProperty_class(){ NullProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -57,6 +60,7 @@ void register_NullProperty_class(){ NullProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/NumberProperty.pypp.cpp b/wrapper/Base/NumberProperty.pypp.cpp index 8987851ac..d3cebc6f6 100644 --- a/wrapper/Base/NumberProperty.pypp.cpp +++ b/wrapper/Base/NumberProperty.pypp.cpp @@ -27,6 +27,8 @@ SireBase::NumberProperty __copy__(const SireBase::NumberProperty &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NumberProperty_class(){ { //::SireBase::NumberProperty @@ -46,6 +48,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -57,6 +60,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -68,6 +72,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +96,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +108,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -112,6 +120,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "" ); } @@ -123,6 +132,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -149,6 +159,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "toDouble" , toDouble_function_value + , bp::release_gil_policy() , "Return this number cast as a double" ); } @@ -160,6 +171,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "toInt" , toInt_function_value + , bp::release_gil_policy() , "Return this number cast as an integer" ); } @@ -171,6 +183,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +195,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -193,6 +207,7 @@ void register_NumberProperty_class(){ NumberProperty_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return this number cast as a double" ); } diff --git a/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp b/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp index 0870e15d7..7eb34b105 100644 --- a/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp +++ b/wrapper/Base/PackedArray2D_DoubleArrayProperty.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_DoubleArrayProperty_class(){ @@ -41,6 +43,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +85,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +140,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +167,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +193,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "nArrays" , nArrays_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +206,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +220,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "nValues" , nValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -264,6 +278,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -277,6 +292,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "removeAll" , removeAll_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "" ); } @@ -289,6 +305,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -301,6 +318,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +331,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "toQVectorVector" , toQVectorVector_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +344,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +357,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ PackedArray2D_DoubleArrayProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -350,6 +371,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +385,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -376,6 +399,7 @@ void register_PackedArray2D_DoubleArrayProperty_class(){ "updateAll" , updateAll_function_value , ( bp::arg("idxs"), bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp b/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp index 3f80783e1..7d1a7af1a 100644 --- a/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_DoubleArrayProperty_Array.pypp.cpp @@ -17,6 +17,8 @@ SireBase::detail::PackedArray2D_Array __copy__(co #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_DoubleArrayProperty_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ PackedArray2D_DoubleArrayProperty_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ PackedArray2D_DoubleArrayProperty_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ PackedArray2D_DoubleArrayProperty_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ PackedArray2D_DoubleArrayProperty_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ PackedArray2D_DoubleArrayProperty_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ PackedArray2D_DoubleArrayProperty_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_DoubleArrayProperty_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp b/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp index 96f85b7b0..4374daf53 100644 --- a/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp +++ b/wrapper/Base/PackedArray2D_IntegerArrayProperty.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_IntegerArrayProperty_class(){ @@ -41,6 +43,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +85,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +140,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +167,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +193,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "nArrays" , nArrays_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +206,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +220,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "nValues" , nValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -264,6 +278,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -277,6 +292,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "removeAll" , removeAll_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "" ); } @@ -289,6 +305,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -301,6 +318,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +331,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "toQVectorVector" , toQVectorVector_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +344,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +357,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ PackedArray2D_IntegerArrayProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -350,6 +371,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +385,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -376,6 +399,7 @@ void register_PackedArray2D_IntegerArrayProperty_class(){ "updateAll" , updateAll_function_value , ( bp::arg("idxs"), bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp b/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp index 6c75b982b..3489daca7 100644 --- a/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_IntegerArrayProperty_Array.pypp.cpp @@ -17,6 +17,8 @@ SireBase::detail::PackedArray2D_Array __copy__(c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_IntegerArrayProperty_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ PackedArray2D_IntegerArrayProperty_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ PackedArray2D_IntegerArrayProperty_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ PackedArray2D_IntegerArrayProperty_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ PackedArray2D_IntegerArrayProperty_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ PackedArray2D_IntegerArrayProperty_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ PackedArray2D_IntegerArrayProperty_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_IntegerArrayProperty_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp b/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp index e186060eb..9affc8930 100644 --- a/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp +++ b/wrapper/Base/PackedArray2D_PropertyList.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase::PackedA #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_PropertyList_class(){ @@ -41,6 +43,7 @@ void register_PackedArray2D_PropertyList_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_PackedArray2D_PropertyList_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_PackedArray2D_PropertyList_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +85,7 @@ void register_PackedArray2D_PropertyList_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_PackedArray2D_PropertyList_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +140,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +167,7 @@ void register_PackedArray2D_PropertyList_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +193,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "nArrays" , nArrays_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +206,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +220,7 @@ void register_PackedArray2D_PropertyList_class(){ "nValues" , nValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -264,6 +278,7 @@ void register_PackedArray2D_PropertyList_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -277,6 +292,7 @@ void register_PackedArray2D_PropertyList_class(){ "removeAll" , removeAll_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "" ); } @@ -289,6 +305,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -301,6 +318,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +331,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "toQVectorVector" , toQVectorVector_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +344,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +357,7 @@ void register_PackedArray2D_PropertyList_class(){ PackedArray2D_PropertyList_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -350,6 +371,7 @@ void register_PackedArray2D_PropertyList_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +385,7 @@ void register_PackedArray2D_PropertyList_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -376,6 +399,7 @@ void register_PackedArray2D_PropertyList_class(){ "updateAll" , updateAll_function_value , ( bp::arg("idxs"), bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp b/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp index d89bc8f49..ecb3d54eb 100644 --- a/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_PropertyList_Array.pypp.cpp @@ -17,6 +17,8 @@ SireBase::detail::PackedArray2D_Array __copy__(const Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_PropertyList_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ PackedArray2D_PropertyList_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ PackedArray2D_PropertyList_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ PackedArray2D_PropertyList_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ PackedArray2D_PropertyList_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ PackedArray2D_PropertyList_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ PackedArray2D_PropertyList_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_PropertyList_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_QString_.pypp.cpp b/wrapper/Base/PackedArray2D_QString_.pypp.cpp index 3b1416cd9..52b9baa3c 100644 --- a/wrapper/Base/PackedArray2D_QString_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_QString_.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_QString__class(){ @@ -41,6 +43,7 @@ void register_PackedArray2D_QString__class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_PackedArray2D_QString__class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_PackedArray2D_QString__class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +85,7 @@ void register_PackedArray2D_QString__class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_PackedArray2D_QString__class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +140,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +167,7 @@ void register_PackedArray2D_QString__class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +193,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "nArrays" , nArrays_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +206,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +220,7 @@ void register_PackedArray2D_QString__class(){ "nValues" , nValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -264,6 +278,7 @@ void register_PackedArray2D_QString__class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -277,6 +292,7 @@ void register_PackedArray2D_QString__class(){ "removeAll" , removeAll_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "" ); } @@ -289,6 +305,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -301,6 +318,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +331,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "toQVectorVector" , toQVectorVector_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +344,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +357,7 @@ void register_PackedArray2D_QString__class(){ PackedArray2D_QString__exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -350,6 +371,7 @@ void register_PackedArray2D_QString__class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +385,7 @@ void register_PackedArray2D_QString__class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -376,6 +399,7 @@ void register_PackedArray2D_QString__class(){ "updateAll" , updateAll_function_value , ( bp::arg("idxs"), bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp b/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp index 95f6e9d96..4d673258f 100644 --- a/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_QString_Array.pypp.cpp @@ -17,6 +17,8 @@ SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_QString_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_QString_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_QString_Array_class(){ PackedArray2D_QString_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_QString_Array_class(){ PackedArray2D_QString_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_QString_Array_class(){ PackedArray2D_QString_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_QString_Array_class(){ PackedArray2D_QString_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_QString_Array_class(){ PackedArray2D_QString_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_QString_Array_class(){ PackedArray2D_QString_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_QString_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp b/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp index 7430c3e34..d0473d8dc 100644 --- a/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_QVariant_.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D __copy__(const SireBase::detail: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_QVariant_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_QVariant_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_QVariant_Array_class(){ PackedArray2D_QVariant_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_QVariant_Array_class(){ PackedArray2D_QVariant_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_QVariant_Array_class(){ PackedArray2D_QVariant_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_QVariant_Array_class(){ PackedArray2D_QVariant_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_QVariant_Array_class(){ PackedArray2D_QVariant_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_QVariant_Array_class(){ PackedArray2D_QVariant_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_QVariant_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp b/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp index 371e29fee..130ff6899 100644 --- a/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp +++ b/wrapper/Base/PackedArray2D_StringArrayProperty.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_StringArrayProperty_class(){ @@ -41,6 +43,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +85,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +140,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +167,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +193,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "nArrays" , nArrays_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +206,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +220,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "nValues" , nValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -264,6 +278,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -277,6 +292,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "removeAll" , removeAll_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "" ); } @@ -289,6 +305,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -301,6 +318,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +331,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "toQVectorVector" , toQVectorVector_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +344,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +357,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ PackedArray2D_StringArrayProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -350,6 +371,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +385,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -376,6 +399,7 @@ void register_PackedArray2D_StringArrayProperty_class(){ "updateAll" , updateAll_function_value , ( bp::arg("idxs"), bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp b/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp index 507a93450..38c424b6f 100644 --- a/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_StringArrayProperty_Array.pypp.cpp @@ -17,6 +17,8 @@ SireBase::detail::PackedArray2D_Array __copy__(co #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_StringArrayProperty_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ PackedArray2D_StringArrayProperty_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ PackedArray2D_StringArrayProperty_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ PackedArray2D_StringArrayProperty_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ PackedArray2D_StringArrayProperty_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ PackedArray2D_StringArrayProperty_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ PackedArray2D_StringArrayProperty_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_StringArrayProperty_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_double_.pypp.cpp b/wrapper/Base/PackedArray2D_double_.pypp.cpp index 66173b3d2..c74d9052a 100644 --- a/wrapper/Base/PackedArray2D_double_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_double_.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_double__class(){ @@ -41,6 +43,7 @@ void register_PackedArray2D_double__class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_PackedArray2D_double__class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_PackedArray2D_double__class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +85,7 @@ void register_PackedArray2D_double__class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_PackedArray2D_double__class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +140,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +167,7 @@ void register_PackedArray2D_double__class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +193,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "nArrays" , nArrays_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +206,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +220,7 @@ void register_PackedArray2D_double__class(){ "nValues" , nValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -264,6 +278,7 @@ void register_PackedArray2D_double__class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -277,6 +292,7 @@ void register_PackedArray2D_double__class(){ "removeAll" , removeAll_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "" ); } @@ -289,6 +305,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -301,6 +318,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +331,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "toQVectorVector" , toQVectorVector_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +344,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +357,7 @@ void register_PackedArray2D_double__class(){ PackedArray2D_double__exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -350,6 +371,7 @@ void register_PackedArray2D_double__class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +385,7 @@ void register_PackedArray2D_double__class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -376,6 +399,7 @@ void register_PackedArray2D_double__class(){ "updateAll" , updateAll_function_value , ( bp::arg("idxs"), bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_double_Array.pypp.cpp b/wrapper/Base/PackedArray2D_double_Array.pypp.cpp index 9936d4913..0d026b48a 100644 --- a/wrapper/Base/PackedArray2D_double_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_double_Array.pypp.cpp @@ -17,6 +17,8 @@ SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::P #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_double_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_double_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_double_Array_class(){ PackedArray2D_double_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_double_Array_class(){ PackedArray2D_double_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_double_Array_class(){ PackedArray2D_double_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_double_Array_class(){ PackedArray2D_double_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_double_Array_class(){ PackedArray2D_double_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_double_Array_class(){ PackedArray2D_double_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_double_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_int_.pypp.cpp b/wrapper/Base/PackedArray2D_int_.pypp.cpp index 4cea5a0ec..5aeb3dee1 100644 --- a/wrapper/Base/PackedArray2D_int_.pypp.cpp +++ b/wrapper/Base/PackedArray2D_int_.pypp.cpp @@ -17,6 +17,8 @@ SireBase::PackedArray2D __copy__(const SireBase::PackedArray2D &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_int__class(){ @@ -41,6 +43,7 @@ void register_PackedArray2D_int__class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_PackedArray2D_int__class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_PackedArray2D_int__class(){ "append" , append_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +85,7 @@ void register_PackedArray2D_int__class(){ "append" , append_function_value , ( bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_PackedArray2D_int__class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +140,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +153,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +167,7 @@ void register_PackedArray2D_int__class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +193,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "nArrays" , nArrays_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +206,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +220,7 @@ void register_PackedArray2D_int__class(){ "nValues" , nValues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -264,6 +278,7 @@ void register_PackedArray2D_int__class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -277,6 +292,7 @@ void register_PackedArray2D_int__class(){ "removeAll" , removeAll_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "" ); } @@ -289,6 +305,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -301,6 +318,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +331,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "toQVectorVector" , toQVectorVector_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +344,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +357,7 @@ void register_PackedArray2D_int__class(){ PackedArray2D_int__exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -350,6 +371,7 @@ void register_PackedArray2D_int__class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +385,7 @@ void register_PackedArray2D_int__class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "" ); } @@ -376,6 +399,7 @@ void register_PackedArray2D_int__class(){ "updateAll" , updateAll_function_value , ( bp::arg("idxs"), bp::arg("arrays") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PackedArray2D_int_Array.pypp.cpp b/wrapper/Base/PackedArray2D_int_Array.pypp.cpp index 64d73eb10..67f6b5193 100644 --- a/wrapper/Base/PackedArray2D_int_Array.pypp.cpp +++ b/wrapper/Base/PackedArray2D_int_Array.pypp.cpp @@ -17,6 +17,8 @@ SireBase::detail::PackedArray2D_Array __copy__(const SireBase::detail::Pack #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PackedArray2D_int_Array_class(){ @@ -39,6 +41,7 @@ void register_PackedArray2D_int_Array_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PackedArray2D_int_Array_class(){ PackedArray2D_int_Array_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_PackedArray2D_int_Array_class(){ PackedArray2D_int_Array_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_PackedArray2D_int_Array_class(){ PackedArray2D_int_Array_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_PackedArray2D_int_Array_class(){ PackedArray2D_int_Array_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_PackedArray2D_int_Array_class(){ PackedArray2D_int_Array_exposer.def( "toQVector" , toQVector_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +177,7 @@ void register_PackedArray2D_int_Array_class(){ PackedArray2D_int_Array_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +191,7 @@ void register_PackedArray2D_int_Array_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/Process.pypp.cpp b/wrapper/Base/Process.pypp.cpp index 1610d7f9b..476da68bf 100644 --- a/wrapper/Base/Process.pypp.cpp +++ b/wrapper/Base/Process.pypp.cpp @@ -15,6 +15,8 @@ SireBase::Process __copy__(const SireBase::Process &other){ return SireBase::Pro const char* pvt_get_name(const SireBase::Process&){ return "SireBase::Process";} +#include "Helpers/release_gil_policy.hpp" + void register_Process_class(){ { //::SireBase::Process @@ -30,6 +32,7 @@ void register_Process_class(){ Process_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not this process has finished running" ); } @@ -41,6 +44,7 @@ void register_Process_class(){ Process_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not the process exited in error" ); } @@ -52,6 +56,7 @@ void register_Process_class(){ Process_exposer.def( "isRunning" , isRunning_function_value + , bp::release_gil_policy() , "Return whether or not the job is running" ); } @@ -63,6 +68,7 @@ void register_Process_class(){ Process_exposer.def( "kill" , kill_function_value + , bp::release_gil_policy() , "Kill this process" ); } @@ -74,6 +80,7 @@ void register_Process_class(){ Process_exposer.def( "killAll" , killAll_function_value + , bp::release_gil_policy() , "Use this function to kill all of the jobs that are currently running" ); } @@ -101,6 +108,7 @@ void register_Process_class(){ "run" , run_function_value , ( bp::arg("command") ) + , bp::release_gil_policy() , "Run the command command and return a Process object that can be\nused to monitor the command" ); } @@ -113,6 +121,7 @@ void register_Process_class(){ "run" , run_function_value , ( bp::arg("command"), bp::arg("stdout_file"), bp::arg("stderr_file") ) + , bp::release_gil_policy() , "Run the command command and return a Process object that can be\nused to monitor the command. Stdout and stderr of the running\nprocess are redirected to the user specified files." ); } @@ -125,6 +134,7 @@ void register_Process_class(){ "run" , run_function_value , ( bp::arg("command"), bp::arg("arg") ) + , bp::release_gil_policy() , "Run the command command with the solitary argument arg" ); } @@ -137,6 +147,7 @@ void register_Process_class(){ "run" , run_function_value , ( bp::arg("command"), bp::arg("arg"), bp::arg("stdout_file"), bp::arg("stderr_file") ) + , bp::release_gil_policy() , "Run the command command with the solitary argument arg.\nStdout and stderr of the running process are redirected to\nthe user specified files." ); } @@ -149,6 +160,7 @@ void register_Process_class(){ "run" , run_function_value , ( bp::arg("command"), bp::arg("arguments") ) + , bp::release_gil_policy() , "Run the command command with the arguments arguments, and\nreturn a Process object that can be used to query and control the\njob" ); } @@ -161,6 +173,7 @@ void register_Process_class(){ "run" , run_function_value , ( bp::arg("command"), bp::arg("arguments"), bp::arg("stdout_file"), bp::arg("stderr_file") ) + , bp::release_gil_policy() , "Run the command command with the arguments arguments, and\nreturn a Process object that can be used to query and control the\njob. Stdout and stderr of the running process are redirected to\nthe user specified files." ); } @@ -172,6 +185,7 @@ void register_Process_class(){ Process_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +197,7 @@ void register_Process_class(){ Process_exposer.def( "wait" , wait_function_value + , bp::release_gil_policy() , "Wait until the process has finished" ); } @@ -195,6 +210,7 @@ void register_Process_class(){ "wait" , wait_function_value , ( bp::arg("ms") ) + , bp::release_gil_policy() , "Wait until the process has finished, or until ms milliseconds have passed.\nThis returns whether or not the process has finished" ); } @@ -206,6 +222,7 @@ void register_Process_class(){ Process_exposer.def( "wasKilled" , wasKilled_function_value + , bp::release_gil_policy() , "Return whether or not the process was killed" ); } @@ -217,6 +234,7 @@ void register_Process_class(){ Process_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/Properties.pypp.cpp b/wrapper/Base/Properties.pypp.cpp index 8bc683b39..56a1bfbed 100644 --- a/wrapper/Base/Properties.pypp.cpp +++ b/wrapper/Base/Properties.pypp.cpp @@ -32,6 +32,8 @@ SireBase::Properties __copy__(const SireBase::Properties &other){ return SireBas #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Properties_class(){ @@ -75,6 +77,7 @@ void register_Properties_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this contains the metadata at metakey metakey" ); } @@ -87,6 +90,7 @@ void register_Properties_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this set contains the metadata property for the\nproperty key with metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -99,6 +103,7 @@ void register_Properties_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this set contains a property with key key\nThrow: SireBase::missing_property\n" ); } @@ -110,6 +115,7 @@ void register_Properties_class(){ Properties_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear this object of all properties and metadata" ); } @@ -121,6 +127,7 @@ void register_Properties_class(){ Properties_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of properties in this set" ); } @@ -133,6 +140,7 @@ void register_Properties_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not this contains the metadata with metakey metakey" ); } @@ -145,6 +153,7 @@ void register_Properties_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not the property with key key contains some\nmetadata with the metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -157,6 +166,7 @@ void register_Properties_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not this contains a property with key key" ); } @@ -168,6 +178,7 @@ void register_Properties_class(){ Properties_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether this is empty (has no values)" ); } @@ -180,7 +191,7 @@ void register_Properties_class(){ "metadata" , metadata_function_value , ( bp::arg("metakey") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata at metakey metakey - note that if metakey\nspecifies a value rather than a source, then the value contained\nin the metakey is returned.\nThrow: SireBase::missing_property\n" ); } @@ -193,7 +204,7 @@ void register_Properties_class(){ "metadata" , metadata_function_value , ( bp::arg("metakey"), bp::arg("default_value") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata at metakey metakey - note that if metakey\nspecifies a value rather than a source, then the value contained\nin the metakey is returned. If there is no such metadata, and no\nvalue is contained in the metakey, then default_value is\nreturned" ); } @@ -206,7 +217,7 @@ void register_Properties_class(){ "metadata" , metadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata at metakey metakey that is associated with\nthe property at key key.\nThrow: SireBase::missing_property\n" ); } @@ -219,7 +230,7 @@ void register_Properties_class(){ "metadata" , metadata_function_value , ( bp::arg("key"), bp::arg("metakey"), bp::arg("default_value") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata at metakey metakey that is associated with\nthe property at key key, or default_value if there is no\nsuch metadata.\n" ); } @@ -231,6 +242,7 @@ void register_Properties_class(){ Properties_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the list of metadata keys" ); } @@ -243,6 +255,7 @@ void register_Properties_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the list of metadata keys for the property with key key\nThrow: SireBase::missing_property\n" ); } @@ -255,6 +268,7 @@ void register_Properties_class(){ "metadataType" , metadataType_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return the type name of the metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -267,6 +281,7 @@ void register_Properties_class(){ "metadataType" , metadataType_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return the type name of the metadata at metakey metakey\nfor the property at key key\nThrow: SireBase::missing_property\n" ); } @@ -278,6 +293,7 @@ void register_Properties_class(){ Properties_exposer.def( "nProperties" , nProperties_function_value + , bp::release_gil_policy() , "Return the number of properties in this set" ); } @@ -305,7 +321,7 @@ void register_Properties_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -318,7 +334,7 @@ void register_Properties_class(){ "property" , property_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the property with key key - note that if\nkey specifies a value rather than a source, then the\nvalue contained in the key is returned\nThrow: SireBase::missing_property\n" ); } @@ -331,7 +347,7 @@ void register_Properties_class(){ "property" , property_function_value , ( bp::arg("key"), bp::arg("default_value") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the property with key key - note that if\nkey specifies a value rather than a source, then the\nvalue contained in the key is returned. If no such source\nexists, and there is no value in the key, then\ndefault_value is returned" ); } @@ -343,6 +359,7 @@ void register_Properties_class(){ Properties_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys for all of the properties in this set" ); } @@ -355,6 +372,7 @@ void register_Properties_class(){ "propertyType" , propertyType_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the type name of the property at key key\nThrow: SireBase::missing_property\n" ); } @@ -366,6 +384,7 @@ void register_Properties_class(){ Properties_exposer.def( "removeAllMetadata" , removeAllMetadata_function_value + , bp::release_gil_policy() , "Remove all of the top-level metadata" ); } @@ -378,6 +397,7 @@ void register_Properties_class(){ "removeAllMetadata" , removeAllMetadata_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Remove all of the metadata associated with the property at\nkey key" ); } @@ -390,6 +410,7 @@ void register_Properties_class(){ "removeMetadata" , removeMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Remove the metadata at metakey metakey" ); } @@ -402,6 +423,7 @@ void register_Properties_class(){ "removeMetadata" , removeMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Remove the metadata at metakey metakey for the\nproperty at key key" ); } @@ -414,6 +436,7 @@ void register_Properties_class(){ "removeProperty" , removeProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Remove the property with key key and all of its metadata" ); } @@ -426,6 +449,7 @@ void register_Properties_class(){ "setMetadata" , setMetadata_function_value , ( bp::arg("metakey"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the metadata at metakey metakey to have the value value.\nThis replaces any existing metadata with this metakey" ); } @@ -438,6 +462,7 @@ void register_Properties_class(){ "setMetadata" , setMetadata_function_value , ( bp::arg("key"), bp::arg("metakey"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the metadata at metakey metakey for the property at key key.\nThis replaces any existing metadata for this keymetakey pair" ); } @@ -450,6 +475,7 @@ void register_Properties_class(){ "setProperty" , setProperty_function_value , ( bp::arg("key"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -462,6 +488,7 @@ void register_Properties_class(){ "setProperty" , setProperty_function_value , ( bp::arg("key"), bp::arg("value"), bp::arg("clear_metadata") ) + , bp::release_gil_policy() , "Set the property at key key to have the value value. This\nreplaces any existing property at this key, and removes any\nexisting metadata is clear_metadata is true" ); } @@ -473,6 +500,7 @@ void register_Properties_class(){ Properties_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of properties in this set" ); } @@ -484,6 +512,7 @@ void register_Properties_class(){ Properties_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this set of properties" ); } @@ -495,6 +524,7 @@ void register_Properties_class(){ Properties_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/Property.pypp.cpp b/wrapper/Base/Property.pypp.cpp index 6388b8507..baef4d69d 100644 --- a/wrapper/Base/Property.pypp.cpp +++ b/wrapper/Base/Property.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Property_class(){ { //::SireBase::Property @@ -43,6 +45,7 @@ void register_Property_class(){ Property_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "Return this property converted to a bool. This throws an invalid\ncast if this is not possible" ); } @@ -54,6 +57,7 @@ void register_Property_class(){ Property_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "Return this property converted to a double. This throws an invalid\ncast if this is not possible" ); } @@ -65,6 +69,7 @@ void register_Property_class(){ Property_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "Return this property converted to a string. This throws an invalid\ncast if this is not possible" ); } @@ -76,6 +81,7 @@ void register_Property_class(){ Property_exposer.def( "asAnArray" , asAnArray_function_value + , bp::release_gil_policy() , "Return this property converted to an array property. By default, this\nautomatically puts this property into a PropertyList and returns that" ); } @@ -87,6 +93,7 @@ void register_Property_class(){ Property_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "Return this property converted to an integer. This throws an invalid\ncast if this is not possible" ); } @@ -99,6 +106,7 @@ void register_Property_class(){ "copy" , copy_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -111,6 +119,7 @@ void register_Property_class(){ "equals" , equals_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -122,6 +131,7 @@ void register_Property_class(){ Property_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "Return whether or not this property holds a bool (or can convert\nto a bool)" ); } @@ -133,6 +143,7 @@ void register_Property_class(){ Property_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "Return whether or not this property holds a double (or can convert\nto a double)" ); } @@ -144,6 +155,7 @@ void register_Property_class(){ Property_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "Return whether or not this property holds a string (or can convert\nto a string)" ); } @@ -155,6 +167,7 @@ void register_Property_class(){ Property_exposer.def( "isAnArray" , isAnArray_function_value + , bp::release_gil_policy() , "Return whether or not this is an array property (or can convert to an\narray property)" ); } @@ -166,6 +179,7 @@ void register_Property_class(){ Property_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "Return whether or not this property holds an integer (or can convert\nto an integer)" ); } @@ -178,6 +192,7 @@ void register_Property_class(){ "load" , load_function_value , ( bp::arg("ds") ) + , bp::release_gil_policy() , "" ); } @@ -202,6 +217,7 @@ void register_Property_class(){ "save" , save_function_value , ( bp::arg("ds") ) + , bp::release_gil_policy() , "" ); } @@ -213,6 +229,7 @@ void register_Property_class(){ Property_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Default toString() function for properties - it would\nhelp if all properties output something more sensible" ); } @@ -224,6 +241,7 @@ void register_Property_class(){ Property_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -235,6 +253,7 @@ void register_Property_class(){ Property_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PropertyList.pypp.cpp b/wrapper/Base/PropertyList.pypp.cpp index 0a28cf80f..fd3563f5f 100644 --- a/wrapper/Base/PropertyList.pypp.cpp +++ b/wrapper/Base/PropertyList.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -34,6 +36,8 @@ SireBase::PropertyList __copy__(const SireBase::PropertyList &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PropertyList_class(){ @@ -59,6 +63,7 @@ void register_PropertyList_class(){ "append" , append_function_value , ( bp::arg("property") ) + , bp::release_gil_policy() , "Add the passed property onto the end of this list" ); } @@ -71,6 +76,7 @@ void register_PropertyList_class(){ "append" , append_function_value , ( bp::arg("props") ) + , bp::release_gil_policy() , "Append the list of properties onto the end of this list" ); } @@ -82,6 +88,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "array" , array_function_value + , bp::release_gil_policy() , "" ); } @@ -93,6 +100,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +112,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -115,6 +124,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "" ); } @@ -126,6 +136,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -138,7 +149,7 @@ void register_PropertyList_class(){ "at" , at_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the element at index i" ); } @@ -150,6 +161,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Clear the list" ); } @@ -161,6 +173,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of elements in the list" ); } @@ -172,6 +185,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "empty" , empty_function_value + , bp::release_gil_policy() , "Return whether or not the list is empty" ); } @@ -184,6 +198,7 @@ void register_PropertyList_class(){ "insert" , insert_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Insert the passed value at index i" ); } @@ -195,6 +210,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -206,6 +222,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -217,6 +234,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "" ); } @@ -228,6 +246,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +258,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not the list is empty" ); } @@ -263,6 +283,7 @@ void register_PropertyList_class(){ "move" , move_function_value , ( bp::arg("from"), bp::arg("to") ) + , bp::release_gil_policy() , "Move an element of the list from index from to index to" ); } @@ -291,7 +312,7 @@ void register_PropertyList_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -303,6 +324,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "pop_back" , pop_back_function_value + , bp::release_gil_policy() , "Pop off an element from the back of the list" ); } @@ -314,6 +336,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "pop_front" , pop_front_function_value + , bp::release_gil_policy() , "Pop off an element from the front of the list" ); } @@ -326,6 +349,7 @@ void register_PropertyList_class(){ "prepend" , prepend_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Prepend the passed property to the beginning of the list" ); } @@ -338,6 +362,7 @@ void register_PropertyList_class(){ "push_back" , push_back_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Push the passed value onto the back of the list" ); } @@ -350,6 +375,7 @@ void register_PropertyList_class(){ "push_front" , push_front_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Push the passed value onto the front of the list" ); } @@ -362,6 +388,7 @@ void register_PropertyList_class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the item at index i" ); } @@ -373,6 +400,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "removeFirst" , removeFirst_function_value + , bp::release_gil_policy() , "Remove the first element from the list" ); } @@ -384,6 +412,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "removeLast" , removeLast_function_value + , bp::release_gil_policy() , "Remove the last element from the list" ); } @@ -396,6 +425,7 @@ void register_PropertyList_class(){ "replace" , replace_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Replace the element at index i with value" ); } @@ -407,6 +437,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of elements in the list" ); } @@ -419,6 +450,7 @@ void register_PropertyList_class(){ "swap" , swap_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Swap this list with other" ); } @@ -431,6 +463,7 @@ void register_PropertyList_class(){ "swap" , swap_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Swap elements i and j" ); } @@ -443,6 +476,7 @@ void register_PropertyList_class(){ "takeAt" , takeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Take the element at index i" ); } @@ -454,6 +488,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "takeFirst" , takeFirst_function_value + , bp::release_gil_policy() , "Take the first element" ); } @@ -465,6 +500,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "takeLast" , takeLast_function_value + , bp::release_gil_policy() , "Take the last element" ); } @@ -476,6 +512,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "toList" , toList_function_value + , bp::release_gil_policy() , "Return this as a QList" ); } @@ -487,6 +524,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -498,6 +536,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return this as a QVector" ); } @@ -509,6 +548,7 @@ void register_PropertyList_class(){ PropertyList_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -521,6 +561,7 @@ void register_PropertyList_class(){ "value" , value_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the value at index i, or a null property if this is\nan invalid index" ); } @@ -533,6 +574,7 @@ void register_PropertyList_class(){ "value" , value_function_value , ( bp::arg("i"), bp::arg("default_value") ) + , bp::release_gil_policy() , "Return the value at index i or default_value if this is an invalid index" ); } diff --git a/wrapper/Base/PropertyMap.pypp.cpp b/wrapper/Base/PropertyMap.pypp.cpp index 1b577d424..4c8d0abd9 100644 --- a/wrapper/Base/PropertyMap.pypp.cpp +++ b/wrapper/Base/PropertyMap.pypp.cpp @@ -23,6 +23,8 @@ SireBase::PropertyMap __copy__(const SireBase::PropertyMap &other){ return SireB #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PropertyMap_class(){ { //::SireBase::PropertyMap @@ -40,6 +42,7 @@ void register_PropertyMap_class(){ PropertyMap_exposer.def( "isDefault" , isDefault_function_value + , bp::release_gil_policy() , "Return whether or not this map is default - if it is,\nthen it doesnt specify any properties" ); } @@ -104,6 +107,7 @@ void register_PropertyMap_class(){ "set" , set_function_value , ( bp::arg("name"), bp::arg("source") ) + , bp::release_gil_policy() , "Set the property called name to have the source or value\nin source. This replaces any existing source or value\nfor any existing property of this name in this map" ); } @@ -116,6 +120,7 @@ void register_PropertyMap_class(){ "specified" , specified_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this map specifies the source or value\nof the property called name" ); } @@ -128,6 +133,7 @@ void register_PropertyMap_class(){ "specified" , specified_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this map specifies the source or value\nof the property called name" ); } @@ -140,6 +146,7 @@ void register_PropertyMap_class(){ "specified" , specified_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this map specifies the source or value\nof the property called name" ); } @@ -151,6 +158,7 @@ void register_PropertyMap_class(){ PropertyMap_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this PropertyMap" ); } @@ -162,6 +170,7 @@ void register_PropertyMap_class(){ PropertyMap_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -173,6 +182,7 @@ void register_PropertyMap_class(){ PropertyMap_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/PropertyName.pypp.cpp b/wrapper/Base/PropertyName.pypp.cpp index 3985ee256..a63859247 100644 --- a/wrapper/Base/PropertyName.pypp.cpp +++ b/wrapper/Base/PropertyName.pypp.cpp @@ -24,6 +24,8 @@ SireBase::PropertyName __copy__(const SireBase::PropertyName &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PropertyName_class(){ { //::SireBase::PropertyName @@ -43,6 +45,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "hasDefaultValue" , hasDefaultValue_function_value + , bp::release_gil_policy() , "Return whether or not this has a default value" ); } @@ -54,6 +57,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "hasSource" , hasSource_function_value + , bp::release_gil_policy() , "Return whether or not the source has been set" ); } @@ -65,6 +69,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "hasValue" , hasValue_function_value + , bp::release_gil_policy() , "Return whether or not the value has been set" ); } @@ -76,6 +81,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether this property is null" ); } @@ -87,6 +93,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "none" , none_function_value + , bp::release_gil_policy() , "Return a PropertyName that says that this property is not set" ); } @@ -125,6 +132,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this propertyname" ); } @@ -136,6 +144,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,7 +156,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "value" , value_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the property - this is only valid\nif .hasValue() is true" ); } @@ -159,6 +168,7 @@ void register_PropertyName_class(){ PropertyName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/Range.pypp.cpp b/wrapper/Base/Range.pypp.cpp index 7acb6d4e2..3c21b2616 100644 --- a/wrapper/Base/Range.pypp.cpp +++ b/wrapper/Base/Range.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Range_class(){ { //::SireBase::Range @@ -34,6 +36,7 @@ void register_Range_class(){ Range_exposer.def( "atEnd" , atEnd_function_value + , bp::release_gil_policy() , "" ); } @@ -46,6 +49,7 @@ void register_Range_class(){ "create" , create_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the range that represents the single value i" ); } @@ -58,6 +62,7 @@ void register_Range_class(){ "create" , create_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Return the range that represents the range from [start,end)" ); } @@ -70,6 +75,7 @@ void register_Range_class(){ "create" , create_function_value , ( bp::arg("start"), bp::arg("end"), bp::arg("increment") ) + , bp::release_gil_policy() , "Return the range that represents the range from [start,end,increment)" ); } @@ -81,6 +87,7 @@ void register_Range_class(){ Range_exposer.def( "hasNext" , hasNext_function_value + , bp::release_gil_policy() , "" ); } @@ -92,6 +99,7 @@ void register_Range_class(){ Range_exposer.def( "next" , next_function_value + , bp::release_gil_policy() , "" ); } @@ -103,7 +111,7 @@ void register_Range_class(){ Range_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return a null simple range for null" ); } @@ -116,6 +124,7 @@ void register_Range_class(){ "populate" , populate_function_value , ( bp::arg("nitems") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/SimpleRange.pypp.cpp b/wrapper/Base/SimpleRange.pypp.cpp index fdc45a418..b5f3fd26f 100644 --- a/wrapper/Base/SimpleRange.pypp.cpp +++ b/wrapper/Base/SimpleRange.pypp.cpp @@ -25,6 +25,8 @@ SireBase::SimpleRange __copy__(const SireBase::SimpleRange &other){ return SireB #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SimpleRange_class(){ { //::SireBase::SimpleRange @@ -42,6 +44,7 @@ void register_SimpleRange_class(){ SimpleRange_exposer.def( "atEnd" , atEnd_function_value + , bp::release_gil_policy() , "Return whether or not this range is at its end" ); } @@ -53,6 +56,7 @@ void register_SimpleRange_class(){ SimpleRange_exposer.def( "next" , next_function_value + , bp::release_gil_policy() , "Return the next value in the range" ); } @@ -80,6 +84,7 @@ void register_SimpleRange_class(){ "populate" , populate_function_value , ( bp::arg("nvalues") ) + , bp::release_gil_policy() , "Return a copy of this range that is populate with passed number of values" ); } @@ -91,6 +96,7 @@ void register_SimpleRange_class(){ SimpleRange_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -102,6 +108,7 @@ void register_SimpleRange_class(){ SimpleRange_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +120,7 @@ void register_SimpleRange_class(){ SimpleRange_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/SireBase_containers.cpp b/wrapper/Base/SireBase_containers.cpp index 59986da61..72ccfed05 100644 --- a/wrapper/Base/SireBase_containers.cpp +++ b/wrapper/Base/SireBase_containers.cpp @@ -45,6 +45,7 @@ #include "SireBase/propertylist.h" #include "SireBase/numberproperty.h" #include "SireBase/stringproperty.h" +#include "SireBase/properties.h" #include "SireCAS/expressionproperty.h" @@ -315,6 +316,8 @@ void register_SireBase_containers() register_PropertyList(); + register_list< QList< Properties > >(); + #if QT_VERSION >= QT_VERSION_CHECK(4, 2, 0) register_dict< QHash >(); diff --git a/wrapper/Base/SireBase_properties.cpp b/wrapper/Base/SireBase_properties.cpp index 6a7e58bd5..ff70c9dc3 100644 --- a/wrapper/Base/SireBase_properties.cpp +++ b/wrapper/Base/SireBase_properties.cpp @@ -4,15 +4,6 @@ #include "Base/convertproperty.hpp" #include "SireBase_properties.h" -#include "SireStream/datastream.h" -#include "range.h" -#include "ranges.h" -#include "range.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "stringmangler.h" -#include -#include "stringmangler.h" #include "SireError/errors.h" #include "SireError/getbacktrace.h" #include "SireStream/datastream.h" @@ -22,9 +13,18 @@ #include #include #include "property.h" +#include "SireStream/datastream.h" +#include "range.h" +#include "ranges.h" +#include "range.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "stringmangler.h" +#include +#include "stringmangler.h" void register_SireBase_properties() { + register_property_container< SireBase::PropertyPtr, SireBase::Property >(); register_property_container< SireBase::RangePtr, SireBase::Range >(); register_property_container< SireBase::StringManglerPtr, SireBase::StringMangler >(); - register_property_container< SireBase::PropertyPtr, SireBase::Property >(); } diff --git a/wrapper/Base/SireBase_registrars.cpp b/wrapper/Base/SireBase_registrars.cpp index 52f68a96b..d0c2c49b2 100644 --- a/wrapper/Base/SireBase_registrars.cpp +++ b/wrapper/Base/SireBase_registrars.cpp @@ -5,20 +5,20 @@ #include "Helpers/version_error_impl.h" +#include "booleanproperty.h" #include "cpuid.h" -#include "propertylist.h" -#include "majorminorversion.h" #include "lengthproperty.h" -#include "stringproperty.h" -#include "ranges.h" -#include "stringmangler.h" +#include "linktoproperty.h" +#include "majorminorversion.h" +#include "numberproperty.h" #include "properties.h" -#include "propertymap.h" #include "property.h" -#include "booleanproperty.h" +#include "propertylist.h" +#include "propertymap.h" +#include "ranges.h" +#include "stringmangler.h" +#include "stringproperty.h" #include "timeproperty.h" -#include "linktoproperty.h" -#include "numberproperty.h" #include "variantproperty.h" #include "Helpers/objectregistry.hpp" @@ -26,28 +26,28 @@ void register_SireBase_objects() { + ObjectRegistry::registerConverterFor< SireBase::BooleanProperty >(); ObjectRegistry::registerConverterFor< SireBase::CPUID >(); + ObjectRegistry::registerConverterFor< SireBase::LengthProperty >(); + ObjectRegistry::registerConverterFor< SireBase::LinkToProperty >(); + ObjectRegistry::registerConverterFor< SireBase::MajorMinorVersion >(); + ObjectRegistry::registerConverterFor< SireBase::Version >(); + ObjectRegistry::registerConverterFor< SireBase::NumberProperty >(); + ObjectRegistry::registerConverterFor< SireBase::Properties >(); + ObjectRegistry::registerConverterFor< SireBase::NullProperty >(); ObjectRegistry::registerConverterFor< SireBase::DoubleArrayProperty >(); ObjectRegistry::registerConverterFor< SireBase::IntegerArrayProperty >(); ObjectRegistry::registerConverterFor< SireBase::StringArrayProperty >(); ObjectRegistry::registerConverterFor< SireBase::PropertyList >(); - ObjectRegistry::registerConverterFor< SireBase::MajorMinorVersion >(); - ObjectRegistry::registerConverterFor< SireBase::Version >(); - ObjectRegistry::registerConverterFor< SireBase::LengthProperty >(); - ObjectRegistry::registerConverterFor< SireBase::StringProperty >(); + ObjectRegistry::registerConverterFor< SireBase::PropertyName >(); + ObjectRegistry::registerConverterFor< SireBase::PropertyMap >(); ObjectRegistry::registerConverterFor< SireBase::SimpleRange >(); ObjectRegistry::registerConverterFor< SireBase::NoMangling >(); ObjectRegistry::registerConverterFor< SireBase::TrimString >(); ObjectRegistry::registerConverterFor< SireBase::UpperCaseString >(); ObjectRegistry::registerConverterFor< SireBase::LowerCaseString >(); - ObjectRegistry::registerConverterFor< SireBase::Properties >(); - ObjectRegistry::registerConverterFor< SireBase::PropertyName >(); - ObjectRegistry::registerConverterFor< SireBase::PropertyMap >(); - ObjectRegistry::registerConverterFor< SireBase::NullProperty >(); - ObjectRegistry::registerConverterFor< SireBase::BooleanProperty >(); + ObjectRegistry::registerConverterFor< SireBase::StringProperty >(); ObjectRegistry::registerConverterFor< SireBase::TimeProperty >(); - ObjectRegistry::registerConverterFor< SireBase::LinkToProperty >(); - ObjectRegistry::registerConverterFor< SireBase::NumberProperty >(); ObjectRegistry::registerConverterFor< SireBase::VariantProperty >(); } diff --git a/wrapper/Base/StringArrayProperty.pypp.cpp b/wrapper/Base/StringArrayProperty.pypp.cpp index 079b018f5..641b317c4 100644 --- a/wrapper/Base/StringArrayProperty.pypp.cpp +++ b/wrapper/Base/StringArrayProperty.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -33,6 +35,8 @@ SireBase::StringArrayProperty __copy__(const SireBase::StringArrayProperty &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_StringArrayProperty_class(){ @@ -55,6 +59,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -66,6 +71,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +83,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +95,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "asAnArray" , asAnArray_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +107,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -110,6 +119,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -121,6 +131,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +143,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +155,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +183,7 @@ void register_StringArrayProperty_class(){ StringArrayProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/StringMangler.pypp.cpp b/wrapper/Base/StringMangler.pypp.cpp index 48b91b46c..00b3dbf8c 100644 --- a/wrapper/Base/StringMangler.pypp.cpp +++ b/wrapper/Base/StringMangler.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_StringMangler_class(){ { //::SireBase::StringMangler @@ -36,6 +38,7 @@ void register_StringMangler_class(){ "mangle" , mangle_function_value , ( bp::arg("input") ) + , bp::release_gil_policy() , "" ); } @@ -71,6 +74,7 @@ void register_StringMangler_class(){ StringMangler_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/StringProperty.pypp.cpp b/wrapper/Base/StringProperty.pypp.cpp index d8b0cd731..489b5aeb7 100644 --- a/wrapper/Base/StringProperty.pypp.cpp +++ b/wrapper/Base/StringProperty.pypp.cpp @@ -31,6 +31,8 @@ SireBase::StringProperty __copy__(const SireBase::StringProperty &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_StringProperty_class(){ { //::SireBase::StringProperty @@ -49,6 +51,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +63,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -71,6 +75,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "" ); } @@ -82,6 +87,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +111,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -115,6 +123,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "" ); } @@ -126,6 +135,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -152,6 +162,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -163,6 +174,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -174,6 +186,7 @@ void register_StringProperty_class(){ StringProperty_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return the actual string" ); } diff --git a/wrapper/Base/TempDir.pypp.cpp b/wrapper/Base/TempDir.pypp.cpp index 4d1cab6d4..fffdfcd04 100644 --- a/wrapper/Base/TempDir.pypp.cpp +++ b/wrapper/Base/TempDir.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TempDir_class(){ { //::SireBase::TempDir @@ -37,6 +39,7 @@ void register_TempDir_class(){ TempDir_exposer.def( "doNotDelete" , doNotDelete_function_value + , bp::release_gil_policy() , "Tell the TempDir not to delete the directory when this object\nis deleted - this can be used when you are debugging to prevent\nthe directory from disappearing" ); } @@ -48,6 +51,7 @@ void register_TempDir_class(){ TempDir_exposer.def( "path" , path_function_value + , bp::release_gil_policy() , "This returns the complete path to the temporary directory" ); } @@ -59,6 +63,7 @@ void register_TempDir_class(){ TempDir_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this TempDir" ); } @@ -70,6 +75,7 @@ void register_TempDir_class(){ TempDir_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +87,7 @@ void register_TempDir_class(){ TempDir_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/TimeProperty.pypp.cpp b/wrapper/Base/TimeProperty.pypp.cpp index d562d5446..24f437450 100644 --- a/wrapper/Base/TimeProperty.pypp.cpp +++ b/wrapper/Base/TimeProperty.pypp.cpp @@ -27,6 +27,8 @@ SireBase::TimeProperty __copy__(const SireBase::TimeProperty &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TimeProperty_class(){ { //::SireBase::TimeProperty @@ -59,6 +61,7 @@ void register_TimeProperty_class(){ TimeProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +73,7 @@ void register_TimeProperty_class(){ TimeProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +85,7 @@ void register_TimeProperty_class(){ TimeProperty_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return this number cast as a Time" ); } diff --git a/wrapper/Base/TrigArray2DBase.pypp.cpp b/wrapper/Base/TrigArray2DBase.pypp.cpp index 9d47a03e3..1e0b26038 100644 --- a/wrapper/Base/TrigArray2DBase.pypp.cpp +++ b/wrapper/Base/TrigArray2DBase.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireBase::TrigArray2DBase&){ return "SireBase::TrigArray2DBase";} +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_TrigArray2DBase_class(){ @@ -38,6 +40,7 @@ void register_TrigArray2DBase_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -50,6 +53,7 @@ void register_TrigArray2DBase_class(){ "checkedOffset" , checkedOffset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_TrigArray2DBase_class(){ TrigArray2DBase_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +78,7 @@ void register_TrigArray2DBase_class(){ "map" , map_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -84,6 +90,7 @@ void register_TrigArray2DBase_class(){ TrigArray2DBase_exposer.def( "nColumns" , nColumns_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +102,7 @@ void register_TrigArray2DBase_class(){ TrigArray2DBase_exposer.def( "nRows" , nRows_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +115,7 @@ void register_TrigArray2DBase_class(){ "offset" , offset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -118,6 +127,7 @@ void register_TrigArray2DBase_class(){ TrigArray2DBase_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/TrigArray2D_double_.pypp.cpp b/wrapper/Base/TrigArray2D_double_.pypp.cpp index d801cfde9..1c8aac352 100644 --- a/wrapper/Base/TrigArray2D_double_.pypp.cpp +++ b/wrapper/Base/TrigArray2D_double_.pypp.cpp @@ -23,6 +23,8 @@ SireBase::TrigArray2D __copy__(const SireBase::TrigArray2D &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_TrigArray2D_double__class(){ @@ -102,6 +104,7 @@ void register_TrigArray2D_double__class(){ "redimension" , redimension_function_value , ( bp::arg("dimension") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +118,7 @@ void register_TrigArray2D_double__class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +132,7 @@ void register_TrigArray2D_double__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -140,6 +145,7 @@ void register_TrigArray2D_double__class(){ TrigArray2D_double__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -152,6 +158,7 @@ void register_TrigArray2D_double__class(){ TrigArray2D_double__exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/TrimString.pypp.cpp b/wrapper/Base/TrimString.pypp.cpp index e24521c2a..9f115acea 100644 --- a/wrapper/Base/TrimString.pypp.cpp +++ b/wrapper/Base/TrimString.pypp.cpp @@ -23,6 +23,8 @@ SireBase::TrimString __copy__(const SireBase::TrimString &other){ return SireBas #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TrimString_class(){ { //::SireBase::TrimString @@ -39,6 +41,7 @@ void register_TrimString_class(){ "mangle" , mangle_function_value , ( bp::arg("input") ) + , bp::release_gil_policy() , "Mangle the string - remove all initial and trailing spaces" ); } @@ -65,6 +68,7 @@ void register_TrimString_class(){ TrimString_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/UnitTest.pypp.cpp b/wrapper/Base/UnitTest.pypp.cpp index 02c55ec21..5f80630d1 100644 --- a/wrapper/Base/UnitTest.pypp.cpp +++ b/wrapper/Base/UnitTest.pypp.cpp @@ -21,6 +21,8 @@ SireBase::UnitTest __copy__(const SireBase::UnitTest &other){ return SireBase::U const char* pvt_get_name(const SireBase::UnitTest&){ return "SireBase::UnitTest";} +#include "Helpers/release_gil_policy.hpp" + void register_UnitTest_class(){ { //::SireBase::UnitTest @@ -36,6 +38,7 @@ void register_UnitTest_class(){ UnitTest_exposer.def( "errorString" , errorString_function_value + , bp::release_gil_policy() , "Return the error string" ); } @@ -47,6 +50,7 @@ void register_UnitTest_class(){ UnitTest_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of the test" ); } @@ -82,6 +86,7 @@ void register_UnitTest_class(){ UnitTest_exposer.def( "runTime" , runTime_function_value + , bp::release_gil_policy() , "Return the time taken to run the test, in nanoseconds" ); } @@ -93,6 +98,7 @@ void register_UnitTest_class(){ UnitTest_exposer.def( "tests" , tests_function_value + , bp::release_gil_policy() , "Return all of the tests that have been registered" ); } @@ -104,6 +110,7 @@ void register_UnitTest_class(){ UnitTest_exposer.def( "wasError" , wasError_function_value + , bp::release_gil_policy() , "Return whether or not the test was an error" ); } @@ -115,6 +122,7 @@ void register_UnitTest_class(){ UnitTest_exposer.def( "wasSuccessful" , wasSuccessful_function_value + , bp::release_gil_policy() , "Return whether or not the test was successful" ); } diff --git a/wrapper/Base/UpperCaseString.pypp.cpp b/wrapper/Base/UpperCaseString.pypp.cpp index 55ea79e37..8f4a5e89a 100644 --- a/wrapper/Base/UpperCaseString.pypp.cpp +++ b/wrapper/Base/UpperCaseString.pypp.cpp @@ -23,6 +23,8 @@ SireBase::UpperCaseString __copy__(const SireBase::UpperCaseString &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_UpperCaseString_class(){ { //::SireBase::UpperCaseString @@ -39,6 +41,7 @@ void register_UpperCaseString_class(){ "mangle" , mangle_function_value , ( bp::arg("input") ) + , bp::release_gil_policy() , "Mangle the string - remove all initial and trailing spaces" ); } @@ -65,6 +68,7 @@ void register_UpperCaseString_class(){ UpperCaseString_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/VariantProperty.pypp.cpp b/wrapper/Base/VariantProperty.pypp.cpp index e85a9c5fc..9d9d8d051 100644 --- a/wrapper/Base/VariantProperty.pypp.cpp +++ b/wrapper/Base/VariantProperty.pypp.cpp @@ -23,6 +23,8 @@ SireBase::VariantProperty __copy__(const SireBase::VariantProperty &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VariantProperty_class(){ { //::SireBase::VariantProperty @@ -42,6 +44,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "Return the property converted to a string" ); } @@ -53,6 +56,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "Return the property converted to a string" ); } @@ -64,6 +68,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "asAString" , asAString_function_value + , bp::release_gil_policy() , "Return the property converted to a string" ); } @@ -75,6 +80,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "Return the property converted to a string" ); } @@ -86,6 +92,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "convertToBool" , convertToBool_function_value + , bp::release_gil_policy() , "Return the variant property converted to a bool using the QVariant conversion function" ); } @@ -97,6 +104,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "convertToDouble" , convertToDouble_function_value + , bp::release_gil_policy() , "Return the variant property converted to a double using the QVariant conversion function" ); } @@ -108,6 +116,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "convertToInt" , convertToInt_function_value + , bp::release_gil_policy() , "Return the variant property converted to an integer using the QVariant conversion function" ); } @@ -119,6 +128,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "convertToString" , convertToString_function_value + , bp::release_gil_policy() , "Return the variant property converted to a string using the QVariant conversion function" ); } @@ -130,6 +140,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "Return whether or not this can be converted to a bool" ); } @@ -141,6 +152,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "Return whether or not this can be converted to a double" ); } @@ -152,6 +164,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "isAString" , isAString_function_value + , bp::release_gil_policy() , "Return whether or not this can be converted to a string" ); } @@ -163,6 +176,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "Return whether or not this can be converted to an integer" ); } @@ -202,6 +216,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "String operator" ); } @@ -213,6 +228,7 @@ void register_VariantProperty_class(){ VariantProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/Version.pypp.cpp b/wrapper/Base/Version.pypp.cpp index 735ba16b4..2d8f48000 100644 --- a/wrapper/Base/Version.pypp.cpp +++ b/wrapper/Base/Version.pypp.cpp @@ -23,6 +23,8 @@ SireBase::Version __copy__(const SireBase::Version &other){ return SireBase::Ver #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Version_class(){ { //::SireBase::Version @@ -38,6 +40,7 @@ void register_Version_class(){ Version_exposer.def( "majorVersion" , majorVersion_function_value + , bp::release_gil_policy() , "" ); } @@ -49,6 +52,7 @@ void register_Version_class(){ Version_exposer.def( "minorVersion" , minorVersion_function_value + , bp::release_gil_policy() , "" ); } @@ -75,6 +79,7 @@ void register_Version_class(){ Version_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this version number" ); } @@ -86,6 +91,7 @@ void register_Version_class(){ Version_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +103,7 @@ void register_Version_class(){ Version_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Base/_Base.main.cpp b/wrapper/Base/_Base.main.cpp index 18945c197..c11e7fb56 100644 --- a/wrapper/Base/_Base.main.cpp +++ b/wrapper/Base/_Base.main.cpp @@ -147,6 +147,10 @@ namespace bp = boost::python; #include +#include "SireBase/slice.h" + +void autoconvert_Slice(); + BOOST_PYTHON_MODULE(_Base){ register_SireBase_objects(); @@ -290,6 +294,8 @@ BOOST_PYTHON_MODULE(_Base){ bp::implicitly_convertible< SireBase::StringArrayProperty, SireBase::PropertyList >(); + autoconvert_Slice(); + register_free_functions(); } diff --git a/wrapper/Base/_Base_free_functions.pypp.cpp b/wrapper/Base/_Base_free_functions.pypp.cpp index 385011b36..bd5bf7d0d 100644 --- a/wrapper/Base/_Base_free_functions.pypp.cpp +++ b/wrapper/Base/_Base_free_functions.pypp.cpp @@ -225,6 +225,118 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + +#include "numberproperty.h" + +#include "propertylist.h" + +#include "stringproperty.h" + +#include "tostring.h" + +#include "variantproperty.h" + +#include "propertylist.h" + +#include "SireError/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "arrayproperty.hpp" + +#include "booleanproperty.h" + +#include "numberproperty.h" + +#include "propertylist.h" + +#include "stringproperty.h" + +#include "tostring.h" + +#include "variantproperty.h" + +#include "propertylist.h" + +#include "SireError/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "arrayproperty.hpp" + +#include "booleanproperty.h" + +#include "numberproperty.h" + +#include "propertylist.h" + +#include "stringproperty.h" + +#include "tostring.h" + +#include "variantproperty.h" + +#include "propertylist.h" + +#include "SireError/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "arrayproperty.hpp" + +#include "booleanproperty.h" + +#include "numberproperty.h" + +#include "propertylist.h" + +#include "stringproperty.h" + +#include "tostring.h" + +#include "variantproperty.h" + +#include "propertylist.h" + +#include "SireError/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "arrayproperty.hpp" + +#include "booleanproperty.h" + +#include "numberproperty.h" + +#include "propertylist.h" + +#include "stringproperty.h" + +#include "tostring.h" + +#include "variantproperty.h" + +#include "propertylist.h" + +#include "SireError/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "arrayproperty.hpp" + +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -245,6 +357,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -265,6 +379,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -285,6 +401,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -305,6 +423,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -325,6 +445,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -345,6 +467,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -365,6 +489,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -385,6 +511,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -405,6 +533,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -425,6 +555,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -445,6 +577,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -465,6 +599,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -485,6 +621,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -505,6 +643,8 @@ namespace bp = boost::python; #include "arrayproperty.hpp" +#include "booleanproperty.h" + #include "numberproperty.h" #include "propertylist.h" @@ -756,6 +896,71 @@ void register_free_functions(){ } + { //::SireBase::wrap + + typedef ::SireBase::PropertyPtr ( *wrap_function_type )( ::qint32 ); + wrap_function_type wrap_function_value( &::SireBase::wrap ); + + bp::def( + "wrap" + , wrap_function_value + , ( bp::arg("value") ) + , "" ); + + } + + { //::SireBase::wrap + + typedef ::SireBase::PropertyPtr ( *wrap_function_type )( ::qint64 ); + wrap_function_type wrap_function_value( &::SireBase::wrap ); + + bp::def( + "wrap" + , wrap_function_value + , ( bp::arg("value") ) + , "" ); + + } + + { //::SireBase::wrap + + typedef ::SireBase::PropertyPtr ( *wrap_function_type )( ::quint32 ); + wrap_function_type wrap_function_value( &::SireBase::wrap ); + + bp::def( + "wrap" + , wrap_function_value + , ( bp::arg("value") ) + , "" ); + + } + + { //::SireBase::wrap + + typedef ::SireBase::PropertyPtr ( *wrap_function_type )( ::quint64 ); + wrap_function_type wrap_function_value( &::SireBase::wrap ); + + bp::def( + "wrap" + , wrap_function_value + , ( bp::arg("value") ) + , "" ); + + } + + { //::SireBase::wrap + + typedef ::SireBase::PropertyPtr ( *wrap_function_type )( bool ); + wrap_function_type wrap_function_value( &::SireBase::wrap ); + + bp::def( + "wrap" + , wrap_function_value + , ( bp::arg("value") ) + , "" ); + + } + { //::SireBase::wrap typedef ::SireBase::PropertyPtr ( *wrap_function_type )( ::QList< SireBase::PropPtr< SireBase::Property > > const & ); diff --git a/wrapper/Base/__init__.py b/wrapper/Base/__init__.py index eb3c84ae1..b6a4e90c3 100644 --- a/wrapper/Base/__init__.py +++ b/wrapper/Base/__init__.py @@ -1,25 +1,63 @@ -############################# -## -## The SireBase module -## -## This contains some base classes -## that don't fit anywhere else. -## -## This module may be removed -## as I find homes for some of -## these classes -## -## (C) Christopher Woods -## - -from Sire.Base._Base import * +""" +.. currentmodule:: sire.legacy.Base + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + Property + Properties + PropertyList + PropertyMap + PropertyName + Range + SimpleRange + TempDir + TimeProperty + TrimString + UpperCaseString + VariantProperty + Version + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + findExe + getBinDir + getBundledLibDir + getInstallDir + getLibDir + getReleaseVersion + getRepositoryBranch + getRepositoryURL + getRepositoryVersion + getRepositoryVersionIsClean + getShareDir + getSireDir + increment + wrap +""" + +from ._Base import * _wrap_functions = [] _base_wrap = wrap def wrap(value): - # First, try to wrap the python concrete classes + """Wrap the passed value into a :class:`~sire.base.Property` + object. This works recursively, wrapping all items in + a container, such that the returned value is derived + from :class:`~sire.base.Property` and can be passed to + the C++ code in sire. Note that you normally don't + need to call this yourself, as wrapping is handled + automatically. + """ if isinstance(value, bool): return BooleanProperty(value) diff --git a/wrapper/Base/autoconvert_Slice.cpp b/wrapper/Base/autoconvert_Slice.cpp new file mode 100644 index 000000000..1fc828476 --- /dev/null +++ b/wrapper/Base/autoconvert_Slice.cpp @@ -0,0 +1,114 @@ +/********************************************\ + * + * Sire - Molecular Simulation Framework + * + * Copyright (C) 2006 Christopher Woods + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * For full details of the license please see the COPYING file + * that should have come with this distribution. + * + * You can contact the authors via the developer's mailing list + * at http://siremol.org + * +\*********************************************/ + +#include + +#include + +#include "SireBase/slice.h" + +#include "SireError/errors.h" + +#include "Helpers/release_gil_policy.hpp" + +#include + +using namespace boost::python; + +/** This function convert a python string or unicode to a QChar */ +void Slice_from_python_slice(PyObject* obj_ptr, + converter::rvalue_from_python_stage1_data* data) +{ + auto raii = boost::python::release_gil_policy::acquire_gil(); + if ( PySlice_Check(obj_ptr) ) + { + Py_ssize_t start, stop, step; + int ok = PySlice_Unpack(obj_ptr, &start, &stop, &step); + + if (ok != 0) + throw SireError::assertation_failed( + QObject::tr("Cannot unpack the slice! %1").arg(ok), CODELOC ); + + void* storage = ((converter::rvalue_from_python_storage*) data)->storage.bytes; + + if (stop == 9223372036854775807L) + { + // magic number used when the end value has not been set + new (storage) SireBase::Slice( SireBase::Slice::fromStart(start, step)); + } + else + { + if (stop == -9223372036854775808L) + { + stop = SireBase::Slice::unset(); + } + + new (storage) SireBase::Slice( SireBase::Slice::fromStartStop(start, stop, step)); + } + + data->convertible = storage; + } +} + +/** The actual struct used to control the conversion */ +struct Slice_from_python +{ + Slice_from_python() + { + converter::registry::push_back( &convertible, + &construct, + type_id() ); + } + + /** Can the python object pointed to by 'obj_ptr' be converted + to a Slice? + */ + static void* convertible(PyObject* obj_ptr) + { + auto raii = boost::python::release_gil_policy::acquire_gil(); + if ( PySlice_Check(obj_ptr) ) + { + return obj_ptr; + } + else + return 0; + } + + /** Perform the actual conversion */ + static void construct( PyObject* obj_ptr, + converter::rvalue_from_python_stage1_data* data) + { + Slice_from_python_slice(obj_ptr, data); + } +}; + +void autoconvert_Slice() +{ + //code to get a Slice from a python object + Slice_from_python(); +} diff --git a/wrapper/Base/special_code.py b/wrapper/Base/special_code.py index a805ac888..528a98023 100644 --- a/wrapper/Base/special_code.py +++ b/wrapper/Base/special_code.py @@ -15,7 +15,7 @@ def fix_Array2D(c): ("SireBase::IntegerArrayProperty", "SireBase::StringArrayProperty"), ("SireBase::IntegerArrayProperty", "SireBase::DoubleArrayProperty"), ("SireBase::IntegerArrayProperty", "SireBase::PropertyList"), - ("SireBase::StringArrayProperty", "SireBase::PropertyList") ] + ("SireBase::StringArrayProperty", "SireBase::PropertyList") ] def fixMB(mb): mb.add_declaration_code( "#include \"SireBase/propertymap.h\"" ) @@ -24,4 +24,7 @@ def fixMB(mb): mb.add_declaration_code( "#include \"SireBase/lengthproperty.h\"" ) mb.add_declaration_code( "#include \"SireBase/propertylist.h\"" ) mb.add_declaration_code( "#include " ) + mb.add_declaration_code( "#include \"SireBase/slice.h\"" ) + mb.add_declaration_code( "void autoconvert_Slice();") + mb.add_registration_code( "autoconvert_Slice();") diff --git a/wrapper/CAS/Abs.pypp.cpp b/wrapper/CAS/Abs.pypp.cpp index e1f6ac280..ed91c0e0c 100644 --- a/wrapper/CAS/Abs.pypp.cpp +++ b/wrapper/CAS/Abs.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Abs __copy__(const SireCAS::Abs &other){ return SireCAS::Abs(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Abs_class(){ { //::SireCAS::Abs @@ -44,6 +46,7 @@ void register_Abs_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Abs_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Abs_class(){ Abs_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Abs_class(){ Abs_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/AlwaysFalse.pypp.cpp b/wrapper/CAS/AlwaysFalse.pypp.cpp index e55065d29..19b734fc8 100644 --- a/wrapper/CAS/AlwaysFalse.pypp.cpp +++ b/wrapper/CAS/AlwaysFalse.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::AlwaysFalse __copy__(const SireCAS::AlwaysFalse &other){ return SireCAS #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AlwaysFalse_class(){ { //::SireCAS::AlwaysFalse @@ -54,6 +56,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "AlwaysFalse is always false" ); } @@ -65,6 +68,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "AlwaysFalse is never true" ); } @@ -76,6 +80,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "False has no children" ); } @@ -88,6 +93,7 @@ void register_AlwaysFalse_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "False is never true" ); } @@ -100,6 +106,7 @@ void register_AlwaysFalse_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "False is never true" ); } @@ -112,6 +119,7 @@ void register_AlwaysFalse_class(){ "evaluateCondition" , evaluateCondition_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "False is never true" ); } @@ -124,6 +132,7 @@ void register_AlwaysFalse_class(){ "evaluateCondition" , evaluateCondition_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "False is never true" ); } @@ -136,6 +145,7 @@ void register_AlwaysFalse_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "False cannot be expanded" ); } @@ -147,6 +157,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "There are no functions in false" ); } @@ -158,6 +169,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash false" ); } @@ -169,6 +181,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "False is never complex" ); } @@ -180,6 +193,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "False is always simple" ); } @@ -191,6 +205,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Truth is always constant" ); } @@ -203,6 +218,7 @@ void register_AlwaysFalse_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "This is not a function of anything" ); } @@ -214,6 +230,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "False is never empty" ); } @@ -241,6 +258,7 @@ void register_AlwaysFalse_class(){ "simplify" , simplify_function_value , ( bp::arg("options") ) + , bp::release_gil_policy() , "This cannot be further simplified" ); } @@ -253,6 +271,7 @@ void register_AlwaysFalse_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "There is no substituting false" ); } @@ -264,6 +283,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "There are no symbols in false" ); } @@ -275,6 +295,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of truth" ); } @@ -286,6 +307,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +319,7 @@ void register_AlwaysFalse_class(){ AlwaysFalse_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/AlwaysTrue.pypp.cpp b/wrapper/CAS/AlwaysTrue.pypp.cpp index 95c8d246e..5a5f3a46e 100644 --- a/wrapper/CAS/AlwaysTrue.pypp.cpp +++ b/wrapper/CAS/AlwaysTrue.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::AlwaysTrue __copy__(const SireCAS::AlwaysTrue &other){ return SireCAS:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AlwaysTrue_class(){ { //::SireCAS::AlwaysTrue @@ -54,6 +56,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "AlwaysTrue is never false" ); } @@ -65,6 +68,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "AlwaysTrue is always true" ); } @@ -76,6 +80,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "The truth has no children" ); } @@ -88,6 +93,7 @@ void register_AlwaysTrue_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Truth is always true" ); } @@ -100,6 +106,7 @@ void register_AlwaysTrue_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Truth is always true" ); } @@ -112,6 +119,7 @@ void register_AlwaysTrue_class(){ "evaluateCondition" , evaluateCondition_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Truth is always true" ); } @@ -124,6 +132,7 @@ void register_AlwaysTrue_class(){ "evaluateCondition" , evaluateCondition_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Truth is always true" ); } @@ -136,6 +145,7 @@ void register_AlwaysTrue_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "The truth cannot be expanded" ); } @@ -147,6 +157,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "There are no functions in truth" ); } @@ -158,6 +169,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash truth" ); } @@ -169,6 +181,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Truth is never complex" ); } @@ -180,6 +193,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Truth is always simple" ); } @@ -191,6 +205,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Truth is always constant" ); } @@ -203,6 +218,7 @@ void register_AlwaysTrue_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "This is not a function of anything" ); } @@ -214,6 +230,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Truth is never empty" ); } @@ -241,6 +258,7 @@ void register_AlwaysTrue_class(){ "simplify" , simplify_function_value , ( bp::arg("options") ) + , bp::release_gil_policy() , "This cannot be further simplified" ); } @@ -253,6 +271,7 @@ void register_AlwaysTrue_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "There is no substituting the truth" ); } @@ -264,6 +283,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "There are no symbols in truth" ); } @@ -275,6 +295,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of truth" ); } @@ -286,6 +307,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +319,7 @@ void register_AlwaysTrue_class(){ AlwaysTrue_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcCos.pypp.cpp b/wrapper/CAS/ArcCos.pypp.cpp index f0d68a9d0..97492c75f 100644 --- a/wrapper/CAS/ArcCos.pypp.cpp +++ b/wrapper/CAS/ArcCos.pypp.cpp @@ -31,6 +31,8 @@ SireCAS::ArcCos __copy__(const SireCAS::ArcCos &other){ return SireCAS::ArcCos(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcCos_class(){ { //::SireCAS::ArcCos @@ -48,6 +50,7 @@ void register_ArcCos_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -60,6 +63,7 @@ void register_ArcCos_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -72,6 +76,7 @@ void register_ArcCos_class(){ ArcCos_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArcCos_class(){ ArcCos_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcCosh.pypp.cpp b/wrapper/CAS/ArcCosh.pypp.cpp index 75700ec5a..a82b30277 100644 --- a/wrapper/CAS/ArcCosh.pypp.cpp +++ b/wrapper/CAS/ArcCosh.pypp.cpp @@ -35,6 +35,8 @@ SireCAS::ArcCosh __copy__(const SireCAS::ArcCosh &other){ return SireCAS::ArcCos #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcCosh_class(){ { //::SireCAS::ArcCosh @@ -52,6 +54,7 @@ void register_ArcCosh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -64,6 +67,7 @@ void register_ArcCosh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -76,6 +80,7 @@ void register_ArcCosh_class(){ ArcCosh_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_ArcCosh_class(){ ArcCosh_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcCot.pypp.cpp b/wrapper/CAS/ArcCot.pypp.cpp index 29244391e..e55fa95c6 100644 --- a/wrapper/CAS/ArcCot.pypp.cpp +++ b/wrapper/CAS/ArcCot.pypp.cpp @@ -31,6 +31,8 @@ SireCAS::ArcCot __copy__(const SireCAS::ArcCot &other){ return SireCAS::ArcCot(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcCot_class(){ { //::SireCAS::ArcCot @@ -48,6 +50,7 @@ void register_ArcCot_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -60,6 +63,7 @@ void register_ArcCot_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -72,6 +76,7 @@ void register_ArcCot_class(){ ArcCot_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArcCot_class(){ ArcCot_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcCoth.pypp.cpp b/wrapper/CAS/ArcCoth.pypp.cpp index 8b1910c27..3d73efbda 100644 --- a/wrapper/CAS/ArcCoth.pypp.cpp +++ b/wrapper/CAS/ArcCoth.pypp.cpp @@ -35,6 +35,8 @@ SireCAS::ArcCoth __copy__(const SireCAS::ArcCoth &other){ return SireCAS::ArcCot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcCoth_class(){ { //::SireCAS::ArcCoth @@ -52,6 +54,7 @@ void register_ArcCoth_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -64,6 +67,7 @@ void register_ArcCoth_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -76,6 +80,7 @@ void register_ArcCoth_class(){ ArcCoth_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_ArcCoth_class(){ ArcCoth_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcCsc.pypp.cpp b/wrapper/CAS/ArcCsc.pypp.cpp index 19709adda..363017b49 100644 --- a/wrapper/CAS/ArcCsc.pypp.cpp +++ b/wrapper/CAS/ArcCsc.pypp.cpp @@ -31,6 +31,8 @@ SireCAS::ArcCsc __copy__(const SireCAS::ArcCsc &other){ return SireCAS::ArcCsc(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcCsc_class(){ { //::SireCAS::ArcCsc @@ -48,6 +50,7 @@ void register_ArcCsc_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -60,6 +63,7 @@ void register_ArcCsc_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -72,6 +76,7 @@ void register_ArcCsc_class(){ ArcCsc_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArcCsc_class(){ ArcCsc_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcCsch.pypp.cpp b/wrapper/CAS/ArcCsch.pypp.cpp index 39ddb2cff..fdd2bf484 100644 --- a/wrapper/CAS/ArcCsch.pypp.cpp +++ b/wrapper/CAS/ArcCsch.pypp.cpp @@ -35,6 +35,8 @@ SireCAS::ArcCsch __copy__(const SireCAS::ArcCsch &other){ return SireCAS::ArcCsc #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcCsch_class(){ { //::SireCAS::ArcCsch @@ -52,6 +54,7 @@ void register_ArcCsch_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -64,6 +67,7 @@ void register_ArcCsch_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -76,6 +80,7 @@ void register_ArcCsch_class(){ ArcCsch_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_ArcCsch_class(){ ArcCsch_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcSec.pypp.cpp b/wrapper/CAS/ArcSec.pypp.cpp index 579754f6b..456426593 100644 --- a/wrapper/CAS/ArcSec.pypp.cpp +++ b/wrapper/CAS/ArcSec.pypp.cpp @@ -31,6 +31,8 @@ SireCAS::ArcSec __copy__(const SireCAS::ArcSec &other){ return SireCAS::ArcSec(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcSec_class(){ { //::SireCAS::ArcSec @@ -48,6 +50,7 @@ void register_ArcSec_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -60,6 +63,7 @@ void register_ArcSec_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -72,6 +76,7 @@ void register_ArcSec_class(){ ArcSec_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArcSec_class(){ ArcSec_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcSech.pypp.cpp b/wrapper/CAS/ArcSech.pypp.cpp index 59a9093f6..641157e0e 100644 --- a/wrapper/CAS/ArcSech.pypp.cpp +++ b/wrapper/CAS/ArcSech.pypp.cpp @@ -35,6 +35,8 @@ SireCAS::ArcSech __copy__(const SireCAS::ArcSech &other){ return SireCAS::ArcSec #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcSech_class(){ { //::SireCAS::ArcSech @@ -52,6 +54,7 @@ void register_ArcSech_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -64,6 +67,7 @@ void register_ArcSech_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -76,6 +80,7 @@ void register_ArcSech_class(){ ArcSech_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_ArcSech_class(){ ArcSech_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcSin.pypp.cpp b/wrapper/CAS/ArcSin.pypp.cpp index cd1f47e21..a56e7091e 100644 --- a/wrapper/CAS/ArcSin.pypp.cpp +++ b/wrapper/CAS/ArcSin.pypp.cpp @@ -31,6 +31,8 @@ SireCAS::ArcSin __copy__(const SireCAS::ArcSin &other){ return SireCAS::ArcSin(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcSin_class(){ { //::SireCAS::ArcSin @@ -48,6 +50,7 @@ void register_ArcSin_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -60,6 +63,7 @@ void register_ArcSin_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -72,6 +76,7 @@ void register_ArcSin_class(){ ArcSin_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArcSin_class(){ ArcSin_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcSinh.pypp.cpp b/wrapper/CAS/ArcSinh.pypp.cpp index 20bceb502..472e47f66 100644 --- a/wrapper/CAS/ArcSinh.pypp.cpp +++ b/wrapper/CAS/ArcSinh.pypp.cpp @@ -35,6 +35,8 @@ SireCAS::ArcSinh __copy__(const SireCAS::ArcSinh &other){ return SireCAS::ArcSin #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcSinh_class(){ { //::SireCAS::ArcSinh @@ -52,6 +54,7 @@ void register_ArcSinh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -64,6 +67,7 @@ void register_ArcSinh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -76,6 +80,7 @@ void register_ArcSinh_class(){ ArcSinh_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_ArcSinh_class(){ ArcSinh_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcTan.pypp.cpp b/wrapper/CAS/ArcTan.pypp.cpp index 77e90d04a..afd41d490 100644 --- a/wrapper/CAS/ArcTan.pypp.cpp +++ b/wrapper/CAS/ArcTan.pypp.cpp @@ -31,6 +31,8 @@ SireCAS::ArcTan __copy__(const SireCAS::ArcTan &other){ return SireCAS::ArcTan(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcTan_class(){ { //::SireCAS::ArcTan @@ -48,6 +50,7 @@ void register_ArcTan_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -60,6 +63,7 @@ void register_ArcTan_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -72,6 +76,7 @@ void register_ArcTan_class(){ ArcTan_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_ArcTan_class(){ ArcTan_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ArcTanh.pypp.cpp b/wrapper/CAS/ArcTanh.pypp.cpp index 6983993ec..440027b01 100644 --- a/wrapper/CAS/ArcTanh.pypp.cpp +++ b/wrapper/CAS/ArcTanh.pypp.cpp @@ -35,6 +35,8 @@ SireCAS::ArcTanh __copy__(const SireCAS::ArcTanh &other){ return SireCAS::ArcTan #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ArcTanh_class(){ { //::SireCAS::ArcTanh @@ -52,6 +54,7 @@ void register_ArcTanh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -64,6 +67,7 @@ void register_ArcTanh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -76,6 +80,7 @@ void register_ArcTanh_class(){ ArcTanh_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_ArcTanh_class(){ ArcTanh_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/CMakeAutogenFile.txt b/wrapper/CAS/CMakeAutogenFile.txt index 206de3212..3744e8a18 100644 --- a/wrapper/CAS/CMakeAutogenFile.txt +++ b/wrapper/CAS/CMakeAutogenFile.txt @@ -1,71 +1,71 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - Conditional.pypp.cpp - LessThan.pypp.cpp - Tan.pypp.cpp - AlwaysTrue.pypp.cpp - IntegrationConstant.pypp.cpp - Condition.pypp.cpp + Abs.pypp.cpp AlwaysFalse.pypp.cpp + AlwaysTrue.pypp.cpp + ArcCos.pypp.cpp ArcCosh.pypp.cpp - Ln.pypp.cpp - Product.pypp.cpp - PowerFunction.pypp.cpp - RealPower.pypp.cpp - Tanh.pypp.cpp - Max.pypp.cpp + ArcCot.pypp.cpp + ArcCoth.pypp.cpp + ArcCsc.pypp.cpp ArcCsch.pypp.cpp - Exp.pypp.cpp ArcSec.pypp.cpp - ArcCsc.pypp.cpp - EqualTo.pypp.cpp - ExpressionProperty.pypp.cpp - IntegerPower.pypp.cpp - ArcSinh.pypp.cpp - Cot.pypp.cpp ArcSech.pypp.cpp - LessOrEqualThan.pypp.cpp - SymbolComplex.pypp.cpp + ArcSin.pypp.cpp + ArcSinh.pypp.cpp + ArcTan.pypp.cpp + ArcTanh.pypp.cpp ComplexPower.pypp.cpp - SymbolExpression.pypp.cpp - Values.pypp.cpp - Csc.pypp.cpp - Coth.pypp.cpp - PowerConstant.pypp.cpp + ComplexValues.pypp.cpp + Condition.pypp.cpp + Conditional.pypp.cpp + Constant.pypp.cpp Cos.pypp.cpp - Symbol.pypp.cpp - Sum.pypp.cpp - DoubleFunc.pypp.cpp - ArcCos.pypp.cpp Cosh.pypp.cpp - Identities.pypp.cpp - Power.pypp.cpp - Sinh.pypp.cpp - ComplexValues.pypp.cpp + Cot.pypp.cpp + Coth.pypp.cpp + Csc.pypp.cpp Csch.pypp.cpp - Constant.pypp.cpp - ArcSin.pypp.cpp - ArcCot.pypp.cpp - Sech.pypp.cpp - I.pypp.cpp - Factor.pypp.cpp - Abs.pypp.cpp + DoubleFunc.pypp.cpp + EqualTo.pypp.cpp + ExBase.pypp.cpp + Exp.pypp.cpp Expression.pypp.cpp - Min.pypp.cpp - RationalPower.pypp.cpp ExpressionBase.pypp.cpp - NotEqualTo.pypp.cpp + ExpressionProperty.pypp.cpp + Factor.pypp.cpp GreaterOrEqualThan.pypp.cpp - _CAS_free_functions.pypp.cpp + GreaterThan.pypp.cpp + I.pypp.cpp + Identities.pypp.cpp + IntegerPower.pypp.cpp + IntegrationConstant.pypp.cpp + LessOrEqualThan.pypp.cpp + LessThan.pypp.cpp + Ln.pypp.cpp + Max.pypp.cpp + Min.pypp.cpp + NotEqualTo.pypp.cpp + Power.pypp.cpp + PowerConstant.pypp.cpp + PowerFunction.pypp.cpp + Product.pypp.cpp + RationalPower.pypp.cpp + RealPower.pypp.cpp + Sec.pypp.cpp + Sech.pypp.cpp Sin.pypp.cpp - ArcTan.pypp.cpp SingleFunc.pypp.cpp + Sinh.pypp.cpp + Sum.pypp.cpp + Symbol.pypp.cpp + SymbolComplex.pypp.cpp + SymbolExpression.pypp.cpp SymbolValue.pypp.cpp - ArcTanh.pypp.cpp - ExBase.pypp.cpp - Sec.pypp.cpp - GreaterThan.pypp.cpp - ArcCoth.pypp.cpp + Tan.pypp.cpp + Tanh.pypp.cpp + Values.pypp.cpp + _CAS_free_functions.pypp.cpp SireCAS_containers.cpp SireCAS_registrars.cpp ) diff --git a/wrapper/CAS/CMakeLists.txt b/wrapper/CAS/CMakeLists.txt index a288571ea..afc2965a3 100644 --- a/wrapper/CAS/CMakeLists.txt +++ b/wrapper/CAS/CMakeLists.txt @@ -23,7 +23,7 @@ include(CMakeAutogenFile.txt) set ( WRAPCAS_SOURCES _CAS.main.cpp - + ${PYPP_SOURCES} ) @@ -31,7 +31,7 @@ set ( WRAPCAS_SOURCES # Create the library that holds all of the class wrappers add_library (CAS ${WRAPCAS_SOURCES}) -set_target_properties (CAS +set_target_properties (CAS PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -39,15 +39,15 @@ set_target_properties (CAS PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (CAS SirePython SIRE_SireCAS - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/CAS ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/CAS ) install( TARGETS CAS LIBRARY DESTINATION ${INSTALLDIR} @@ -56,6 +56,6 @@ install( TARGETS CAS ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/CAS/ComplexPower.pypp.cpp b/wrapper/CAS/ComplexPower.pypp.cpp index 6dc6af939..38c31971e 100644 --- a/wrapper/CAS/ComplexPower.pypp.cpp +++ b/wrapper/CAS/ComplexPower.pypp.cpp @@ -37,6 +37,8 @@ SireCAS::ComplexPower __copy__(const SireCAS::ComplexPower &other){ return SireC #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ComplexPower_class(){ { //::SireCAS::ComplexPower @@ -54,6 +56,7 @@ void register_ComplexPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -66,6 +69,7 @@ void register_ComplexPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -77,6 +81,7 @@ void register_ComplexPower_class(){ ComplexPower_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this power" ); } @@ -88,6 +93,7 @@ void register_ComplexPower_class(){ ComplexPower_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_ComplexPower_class(){ ComplexPower_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_ComplexPower_class(){ ComplexPower_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +130,7 @@ void register_ComplexPower_class(){ ComplexPower_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ComplexValues.pypp.cpp b/wrapper/CAS/ComplexValues.pypp.cpp index 8408396fc..993a3b5d8 100644 --- a/wrapper/CAS/ComplexValues.pypp.cpp +++ b/wrapper/CAS/ComplexValues.pypp.cpp @@ -23,6 +23,8 @@ SireCAS::ComplexValues __copy__(const SireCAS::ComplexValues &other){ return Sir const char* pvt_get_name(const SireCAS::ComplexValues&){ return "SireCAS::ComplexValues";} +#include "Helpers/release_gil_policy.hpp" + void register_ComplexValues_class(){ { //::SireCAS::ComplexValues @@ -52,6 +54,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0") ) + , bp::release_gil_policy() , "" ); } @@ -64,6 +67,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -76,6 +80,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -88,6 +93,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -100,6 +106,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -112,6 +119,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -124,6 +132,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -136,6 +145,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6"), bp::arg("symval7") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -148,6 +158,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6"), bp::arg("symval7"), bp::arg("symval8") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -160,6 +171,7 @@ void register_ComplexValues_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6"), bp::arg("symval7"), bp::arg("symval8"), bp::arg("symval9") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -172,6 +184,7 @@ void register_ComplexValues_class(){ "set" , set_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -183,6 +196,7 @@ void register_ComplexValues_class(){ ComplexValues_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -195,6 +209,7 @@ void register_ComplexValues_class(){ "value" , value_function_value , ( bp::arg("sym") ) + , bp::release_gil_policy() , "Return the value of the Symbol with ID id, or 0.0 if there is no such symbol" ); } @@ -218,6 +233,7 @@ void register_ComplexValues_class(){ ComplexValues_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Condition.pypp.cpp b/wrapper/CAS/Condition.pypp.cpp index f833dfa77..959d7cc75 100644 --- a/wrapper/CAS/Condition.pypp.cpp +++ b/wrapper/CAS/Condition.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Condition_class(){ { //::SireCAS::Condition @@ -51,6 +53,7 @@ void register_Condition_class(){ Condition_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "" ); } @@ -62,6 +65,7 @@ void register_Condition_class(){ Condition_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +77,7 @@ void register_Condition_class(){ Condition_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return all of the child expressions in this condition" ); } @@ -84,6 +89,7 @@ void register_Condition_class(){ Condition_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "The complex conjugate of a condition is the condition" ); } @@ -96,6 +102,7 @@ void register_Condition_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Differentiate this expression" ); } @@ -108,6 +115,7 @@ void register_Condition_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this expression - this returns 1 if it is true, else it\nreturns 0 if it is false" ); } @@ -120,6 +128,7 @@ void register_Condition_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this expression - this returns 1 if it is true, else\nit returns 0 if it is false" ); } @@ -132,6 +141,7 @@ void register_Condition_class(){ "evaluateCondition" , evaluateCondition_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evalute this condition, returning whether or not it is true or false" ); } @@ -144,6 +154,7 @@ void register_Condition_class(){ "evaluateCondition" , evaluateCondition_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evalute this condition, returning whether or not it is true or false" ); } @@ -156,6 +167,7 @@ void register_Condition_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Expand this condition into factors of the passed symbol" ); } @@ -167,6 +179,7 @@ void register_Condition_class(){ Condition_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return the functions in this expression" ); } @@ -178,6 +191,7 @@ void register_Condition_class(){ Condition_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash this condition" ); } @@ -190,6 +204,7 @@ void register_Condition_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Integrate this expression" ); } @@ -201,6 +216,7 @@ void register_Condition_class(){ Condition_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether or not this is a complex condition" ); } @@ -212,6 +228,7 @@ void register_Condition_class(){ Condition_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Return whether or not this is a compound expression" ); } @@ -223,6 +240,7 @@ void register_Condition_class(){ Condition_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant" ); } @@ -235,6 +253,7 @@ void register_Condition_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Return whether or not this function is a function of symbol" ); } @@ -246,6 +265,7 @@ void register_Condition_class(){ Condition_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is null" ); } @@ -294,6 +314,7 @@ void register_Condition_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute in the passed identities" ); } @@ -305,6 +326,7 @@ void register_Condition_class(){ Condition_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return the symbols used in this expression" ); } @@ -316,6 +338,7 @@ void register_Condition_class(){ Condition_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this expression" ); } @@ -327,6 +350,7 @@ void register_Condition_class(){ Condition_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Conditional.pypp.cpp b/wrapper/CAS/Conditional.pypp.cpp index 85e165898..aabf4af4e 100644 --- a/wrapper/CAS/Conditional.pypp.cpp +++ b/wrapper/CAS/Conditional.pypp.cpp @@ -40,6 +40,8 @@ SireCAS::Conditional __copy__(const SireCAS::Conditional &other){ return SireCAS #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Conditional_class(){ { //::SireCAS::Conditional @@ -56,6 +58,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the children of this expression" ); } @@ -67,7 +70,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "condition" , condition_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the condition" ); } @@ -79,6 +82,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the complex conjugate of this expression" ); } @@ -91,6 +95,7 @@ void register_Conditional_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this expression" ); } @@ -103,6 +108,7 @@ void register_Conditional_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this expression for the passed values" ); } @@ -115,6 +121,7 @@ void register_Conditional_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this expresion for the passed values" ); } @@ -127,6 +134,7 @@ void register_Conditional_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Expand this expression in terms of symbol" ); } @@ -150,6 +158,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return the functions used in this expression" ); } @@ -161,6 +170,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash this conditional" ); } @@ -173,6 +183,7 @@ void register_Conditional_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the integral of this expression" ); } @@ -184,6 +195,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Is this a complex expression?" ); } @@ -195,6 +207,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Is this a compound expression?" ); } @@ -206,6 +219,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is constant" ); } @@ -218,6 +232,7 @@ void register_Conditional_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Return whether or not this is a function of symbol" ); } @@ -229,6 +244,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is null" ); } @@ -256,6 +272,7 @@ void register_Conditional_class(){ "series" , series_function_value , ( bp::arg("symbol"), bp::arg("n") ) + , bp::release_gil_policy() , "Return the series expansion of this product with respect to symbol, to order n" ); } @@ -280,6 +297,7 @@ void register_Conditional_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute identities into this expression" ); } @@ -291,6 +309,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return the symbols used in this expression" ); } @@ -302,6 +321,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this conditional" ); } @@ -325,6 +345,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -336,6 +357,7 @@ void register_Conditional_class(){ Conditional_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Constant.pypp.cpp b/wrapper/CAS/Constant.pypp.cpp index 281941b86..23e151961 100644 --- a/wrapper/CAS/Constant.pypp.cpp +++ b/wrapper/CAS/Constant.pypp.cpp @@ -37,6 +37,8 @@ SireCAS::Constant __copy__(const SireCAS::Constant &other){ return SireCAS::Cons #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Constant_class(){ { //::SireCAS::Constant @@ -52,6 +54,7 @@ void register_Constant_class(){ Constant_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "No children in a constant" ); } @@ -64,6 +67,7 @@ void register_Constant_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Differential of a constant is zero" ); } @@ -76,6 +80,7 @@ void register_Constant_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluation of a constant is 1" ); } @@ -88,6 +93,7 @@ void register_Constant_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluation of a constant is 1" ); } @@ -100,6 +106,7 @@ void register_Constant_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_Constant_class(){ Constant_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "No functions in a constant" ); } @@ -122,6 +130,7 @@ void register_Constant_class(){ Constant_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash a constant" ); } @@ -134,6 +143,7 @@ void register_Constant_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Integral of a constant is = constantsymbol + C" ); } @@ -147,6 +157,7 @@ void register_Constant_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Cant substitute into a constant" ); } @@ -158,6 +169,7 @@ void register_Constant_class(){ Constant_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "No symbols in a constant" ); } @@ -169,6 +181,7 @@ void register_Constant_class(){ Constant_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this constant (actually an empty string)" ); } @@ -180,6 +193,7 @@ void register_Constant_class(){ Constant_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -191,6 +205,7 @@ void register_Constant_class(){ Constant_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Cos.pypp.cpp b/wrapper/CAS/Cos.pypp.cpp index c70803538..0b5696e2e 100644 --- a/wrapper/CAS/Cos.pypp.cpp +++ b/wrapper/CAS/Cos.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Cos __copy__(const SireCAS::Cos &other){ return SireCAS::Cos(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Cos_class(){ { //::SireCAS::Cos @@ -44,6 +46,7 @@ void register_Cos_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Cos_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Cos_class(){ Cos_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Cos_class(){ Cos_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Cosh.pypp.cpp b/wrapper/CAS/Cosh.pypp.cpp index 44bb3380b..5a0775350 100644 --- a/wrapper/CAS/Cosh.pypp.cpp +++ b/wrapper/CAS/Cosh.pypp.cpp @@ -29,6 +29,8 @@ SireCAS::Cosh __copy__(const SireCAS::Cosh &other){ return SireCAS::Cosh(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Cosh_class(){ { //::SireCAS::Cosh @@ -46,6 +48,7 @@ void register_Cosh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -58,6 +61,7 @@ void register_Cosh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -70,6 +74,7 @@ void register_Cosh_class(){ Cosh_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +86,7 @@ void register_Cosh_class(){ Cosh_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Cot.pypp.cpp b/wrapper/CAS/Cot.pypp.cpp index c5fef93e6..1ae42c020 100644 --- a/wrapper/CAS/Cot.pypp.cpp +++ b/wrapper/CAS/Cot.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Cot __copy__(const SireCAS::Cot &other){ return SireCAS::Cot(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Cot_class(){ { //::SireCAS::Cot @@ -44,6 +46,7 @@ void register_Cot_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Cot_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Cot_class(){ Cot_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Cot_class(){ Cot_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Coth.pypp.cpp b/wrapper/CAS/Coth.pypp.cpp index 29ba4cdb7..ff8bc8b27 100644 --- a/wrapper/CAS/Coth.pypp.cpp +++ b/wrapper/CAS/Coth.pypp.cpp @@ -29,6 +29,8 @@ SireCAS::Coth __copy__(const SireCAS::Coth &other){ return SireCAS::Coth(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Coth_class(){ { //::SireCAS::Coth @@ -46,6 +48,7 @@ void register_Coth_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -58,6 +61,7 @@ void register_Coth_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -70,6 +74,7 @@ void register_Coth_class(){ Coth_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +86,7 @@ void register_Coth_class(){ Coth_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Csc.pypp.cpp b/wrapper/CAS/Csc.pypp.cpp index 1828b52e1..6f10ea176 100644 --- a/wrapper/CAS/Csc.pypp.cpp +++ b/wrapper/CAS/Csc.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Csc __copy__(const SireCAS::Csc &other){ return SireCAS::Csc(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Csc_class(){ { //::SireCAS::Csc @@ -44,6 +46,7 @@ void register_Csc_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Csc_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Csc_class(){ Csc_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Csc_class(){ Csc_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Csch.pypp.cpp b/wrapper/CAS/Csch.pypp.cpp index a8d08ad4d..24005fc86 100644 --- a/wrapper/CAS/Csch.pypp.cpp +++ b/wrapper/CAS/Csch.pypp.cpp @@ -29,6 +29,8 @@ SireCAS::Csch __copy__(const SireCAS::Csch &other){ return SireCAS::Csch(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Csch_class(){ { //::SireCAS::Csch @@ -46,6 +48,7 @@ void register_Csch_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -58,6 +61,7 @@ void register_Csch_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -70,6 +74,7 @@ void register_Csch_class(){ Csch_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +86,7 @@ void register_Csch_class(){ Csch_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/DoubleFunc.pypp.cpp b/wrapper/CAS/DoubleFunc.pypp.cpp index eb989c795..244169a4a 100644 --- a/wrapper/CAS/DoubleFunc.pypp.cpp +++ b/wrapper/CAS/DoubleFunc.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DoubleFunc_class(){ { //::SireCAS::DoubleFunc @@ -41,6 +43,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the child expression of this function" ); } @@ -52,6 +55,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the conjugate of this function" ); } @@ -64,6 +68,7 @@ void register_DoubleFunc_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this function with respect to symbol" ); } @@ -76,6 +81,7 @@ void register_DoubleFunc_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -87,6 +93,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return the functions used in this function" ); } @@ -98,6 +105,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a has for the function" ); } @@ -110,6 +118,7 @@ void register_DoubleFunc_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the integral of this function with respect to symbol" ); } @@ -121,6 +130,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether this is complex" ); } @@ -132,6 +142,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "A function is not compound" ); } @@ -143,6 +154,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is constant" ); } @@ -155,6 +167,7 @@ void register_DoubleFunc_class(){ "isFunction" , isFunction_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return if this is a function of symbol" ); } @@ -180,6 +193,7 @@ void register_DoubleFunc_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute into this expression" ); } @@ -191,6 +205,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return the symbols used in this function" ); } @@ -202,6 +217,7 @@ void register_DoubleFunc_class(){ DoubleFunc_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this function" ); } diff --git a/wrapper/CAS/EqualTo.pypp.cpp b/wrapper/CAS/EqualTo.pypp.cpp index 7bc4596bb..9e4c403b6 100644 --- a/wrapper/CAS/EqualTo.pypp.cpp +++ b/wrapper/CAS/EqualTo.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::EqualTo __copy__(const SireCAS::EqualTo &other){ return SireCAS::EqualT #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_EqualTo_class(){ { //::SireCAS::EqualTo @@ -55,6 +57,7 @@ void register_EqualTo_class(){ EqualTo_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be false. Note that this doesnt try\ntoo hard, so some things that are always false may not\nbe reported here as being always false, e.g. x > x + 1" ); } @@ -66,6 +69,7 @@ void register_EqualTo_class(){ EqualTo_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be true. Note that this doesnt try\ntoo hard, so some things that are always true may not\nbe reported here as being always true, e.g. x + 1 > x" ); } @@ -92,6 +96,7 @@ void register_EqualTo_class(){ EqualTo_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +108,7 @@ void register_EqualTo_class(){ EqualTo_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ExBase.pypp.cpp b/wrapper/CAS/ExBase.pypp.cpp index 02cc0f151..cdec53e9b 100644 --- a/wrapper/CAS/ExBase.pypp.cpp +++ b/wrapper/CAS/ExBase.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ExBase_class(){ { //::SireCAS::ExBase @@ -45,6 +47,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the child expressions of this Expression" ); } @@ -56,6 +59,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the complex conjugate of this expression" ); } @@ -68,6 +72,7 @@ void register_ExBase_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return an expression that the differential of this ExBase\nwith respect to symbol. Note an exception may\nbe thrown if this ExBase cannot be differentiated.\nThrow: SireCAS::unavailable_differential\n" ); } @@ -80,6 +85,7 @@ void register_ExBase_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this ExBase using values values. Any\nmissing symbols are assumed to equal zero.\n\nNote that an exception will be thrown if the result of the\nevaluation of this, or one of its children, is complex.\n\nThrow: SireMaths::domain_error\n" ); } @@ -92,6 +98,7 @@ void register_ExBase_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this ExBase using the complex values values.\nAny missing symbols are assumed to equal zero." ); } @@ -104,6 +111,7 @@ void register_ExBase_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Rearrange this expression into the form\nm x^i + n x^j + ... + constant\nand return the factors and powers of x\n\nThrow: SireCAS::rearrangement_error\n" ); } @@ -115,6 +123,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return the set of Functions that appear in this ExBase" ); } @@ -126,6 +135,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this object - return a combination of the\nidentifying magic for the class and a hash for its contents." ); } @@ -138,6 +148,7 @@ void register_ExBase_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the indefinite integral of this ExBase with respect to\nsymbol. This is not guaranteed to work() and will return an\nexpression of the form Sum( integral(exbase) + integral_constant ).\nIf it doesnt work then an exception will be throw.\nThrow: SireCAS::unavailable_integral\n" ); } @@ -149,6 +160,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether or not this expression contains any complex (imaginary)\nparts" ); } @@ -160,6 +172,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Return whether or not this is a compound expression, and thus as such\nrequires brackets placed around it when it is printed. Examples include\nSum, Product and Power. For most other functions it is safe to leave\nthis as false." ); } @@ -171,6 +184,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant expression (does not\ndepend on any symbols)" ); } @@ -183,6 +197,7 @@ void register_ExBase_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Return whether or not this is a function of the passed Symbol" ); } @@ -211,6 +226,7 @@ void register_ExBase_class(){ "series" , series_function_value , ( bp::arg("symbol"), bp::arg("n") ) + , bp::release_gil_policy() , "Return a series expansion of this expression with respect to\nsymbol, if possible, to order\nn. This is not guaranteed to work, and will return this expression\nunchanged if it doesnt work. If it is expanded, then a series\nwill be returned, together with an estimate of the error (e.g. O(x^2))" ); } @@ -235,6 +251,7 @@ void register_ExBase_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Return an expression that has the identities in identities\nsubstituted into this expression" ); } @@ -246,6 +263,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return the set of Symbols that appear in this ExBase" ); } @@ -257,6 +275,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "toOpenMMString" , toOpenMMString_function_value + , bp::release_gil_policy() , "Return a string representation of this object in the OpenMM syntax" ); } @@ -268,6 +287,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this object" ); } @@ -279,6 +299,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the name of this class type" ); } @@ -290,6 +311,7 @@ void register_ExBase_class(){ ExBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the name of the type of this ExBase object" ); } diff --git a/wrapper/CAS/Exp.pypp.cpp b/wrapper/CAS/Exp.pypp.cpp index 112cb270b..fc8492f8a 100644 --- a/wrapper/CAS/Exp.pypp.cpp +++ b/wrapper/CAS/Exp.pypp.cpp @@ -25,6 +25,8 @@ SireCAS::Exp __copy__(const SireCAS::Exp &other){ return SireCAS::Exp(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Exp_class(){ { //::SireCAS::Exp @@ -41,6 +43,7 @@ void register_Exp_class(){ Exp_exposer.def( "core" , core_function_value + , bp::release_gil_policy() , "Return the core of this power" ); } @@ -53,6 +56,7 @@ void register_Exp_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Differentiatial of e^x is e^x" ); } @@ -65,6 +69,7 @@ void register_Exp_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this expression at values" ); } @@ -77,6 +82,7 @@ void register_Exp_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluate" ); } @@ -88,6 +94,7 @@ void register_Exp_class(){ Exp_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this Exp function" ); } @@ -100,6 +107,7 @@ void register_Exp_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Integral of e^x is e^x + c" ); } @@ -112,6 +120,7 @@ void register_Exp_class(){ Exp_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "Return the power of this power" ); } @@ -123,6 +132,7 @@ void register_Exp_class(){ Exp_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this function" ); } @@ -134,6 +144,7 @@ void register_Exp_class(){ Exp_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +156,7 @@ void register_Exp_class(){ Exp_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Expression.pypp.cpp b/wrapper/CAS/Expression.pypp.cpp index 449d1d5df..0ef40dbec 100644 --- a/wrapper/CAS/Expression.pypp.cpp +++ b/wrapper/CAS/Expression.pypp.cpp @@ -49,6 +49,8 @@ SireCAS::Expression __copy__(const SireCAS::Expression &other){ return SireCAS:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Expression_class(){ { //::SireCAS::Expression @@ -71,6 +73,7 @@ void register_Expression_class(){ "add" , add_function_value , ( bp::arg("ex") ) + , bp::release_gil_policy() , "Return this expression added to ex" ); } @@ -83,6 +86,7 @@ void register_Expression_class(){ "add" , add_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return this expression added to val" ); } @@ -95,6 +99,7 @@ void register_Expression_class(){ "add" , add_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return this expression added to val" ); } @@ -118,6 +123,7 @@ void register_Expression_class(){ Expression_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the child expressions that make up this expression" ); } @@ -129,6 +135,7 @@ void register_Expression_class(){ Expression_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the complex conjugate of this expression" ); } @@ -140,6 +147,7 @@ void register_Expression_class(){ Expression_exposer.def( "cubed" , cubed_function_value + , bp::release_gil_policy() , "Return the cube of this expression" ); } @@ -176,6 +184,7 @@ void register_Expression_class(){ "divide" , divide_function_value , ( bp::arg("ex") ) + , bp::release_gil_policy() , "Return an expression that is this ex" ); } @@ -188,6 +197,7 @@ void register_Expression_class(){ "divide" , divide_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return an expression that is this divided by val" ); } @@ -200,6 +210,7 @@ void register_Expression_class(){ "divide" , divide_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return an expression that is divided by the complex number z" ); } @@ -212,6 +223,7 @@ void register_Expression_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate the numerical value of this expression, using the values\nsupplied in values. Any unidentified symbols or functions are\nassumed to be equal to zero. Note that this only performs real-arithmetic,\nso an exception will be thrown if any part of this expression generates\na complex result.\nThrow: SireMaths::domain_error\n" ); } @@ -224,6 +236,7 @@ void register_Expression_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate the numerical value of this expression using complex\narithmetic. Any unidentified symbols or functions are assumed\nto be equal to zero.\n" ); } @@ -236,6 +249,7 @@ void register_Expression_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the factors and powers for the symbol symbol, given the values of the\nother symbols in values. This attempts to rearrange this equation\nso that it is of the form m symbol^i + n symbol^j ... + constant,\nand it returns the values of m,i, n,j etc..\nNote that this will fail if such a rearrangement is not possible\nThrow: SireCAS::rearrangement_error\n" ); } @@ -247,6 +261,7 @@ void register_Expression_class(){ Expression_exposer.def( "factor" , factor_function_value + , bp::release_gil_policy() , "Return the factor of this expression" ); } @@ -258,6 +273,7 @@ void register_Expression_class(){ Expression_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return all of the functions used in this expression" ); } @@ -269,6 +285,7 @@ void register_Expression_class(){ Expression_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -281,6 +298,7 @@ void register_Expression_class(){ "integ" , integ_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Synonym for integrate" ); } @@ -293,6 +311,7 @@ void register_Expression_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Integrate this expression with respect to symbol and return the\nresulting expression.\nThrow: SireCAS::unavailable_integral\n" ); } @@ -304,6 +323,7 @@ void register_Expression_class(){ Expression_exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "Return 1 expression" ); } @@ -315,6 +335,7 @@ void register_Expression_class(){ Expression_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether or not this expression has complex parts" ); } @@ -326,6 +347,7 @@ void register_Expression_class(){ Expression_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Return whether or not this is a compound expression (contains more\nthan a single expression, e.g. Sum, Product or PowerFunction)" ); } @@ -337,6 +359,7 @@ void register_Expression_class(){ Expression_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this expression is constant for all values" ); } @@ -349,6 +372,7 @@ void register_Expression_class(){ "isFunction" , isFunction_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return whether or not this is a function of symbol" ); } @@ -360,6 +384,7 @@ void register_Expression_class(){ Expression_exposer.def( "isZero" , isZero_function_value + , bp::release_gil_policy() , "Return whether or not this expression is equal to 0 for all values" ); } @@ -372,6 +397,7 @@ void register_Expression_class(){ "multiply" , multiply_function_value , ( bp::arg("ex") ) + , bp::release_gil_policy() , "Return an expression that is this multiplied by ex" ); } @@ -384,6 +410,7 @@ void register_Expression_class(){ "multiply" , multiply_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return an expression that is this multipled by val" ); } @@ -396,6 +423,7 @@ void register_Expression_class(){ "multiply" , multiply_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return an expression that is this multiplied by the complex value z" ); } @@ -407,6 +435,7 @@ void register_Expression_class(){ Expression_exposer.def( "negate" , negate_function_value + , bp::release_gil_policy() , "Return the negative of this expression" ); } @@ -459,6 +488,7 @@ void register_Expression_class(){ "pow" , pow_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return this expression raised to the power n" ); } @@ -471,6 +501,7 @@ void register_Expression_class(){ "pow" , pow_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return this expression raised to a real number power" ); } @@ -483,6 +514,7 @@ void register_Expression_class(){ "pow" , pow_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return this expresssion raised to a complex power" ); } @@ -495,6 +527,7 @@ void register_Expression_class(){ "pow" , pow_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return this expression raised to the rational power n" ); } @@ -507,6 +540,7 @@ void register_Expression_class(){ "pow" , pow_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return this expression raised to a function" ); } @@ -519,6 +553,7 @@ void register_Expression_class(){ "root" , root_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return the nth root of this expression" ); } @@ -531,6 +566,7 @@ void register_Expression_class(){ "series" , series_function_value , ( bp::arg("symbol"), bp::arg("order") ) + , bp::release_gil_policy() , "Return a series expansion of this function with respect to symbol\nup to order n. If an expansion is not possible, then this just\nreturns this expression" ); } @@ -554,6 +590,7 @@ void register_Expression_class(){ Expression_exposer.def( "squared" , squared_function_value + , bp::release_gil_policy() , "Return the square of this expression" ); } @@ -566,6 +603,7 @@ void register_Expression_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Return an expression whereby the identities in identities have\nbeen substituted into this expression" ); } @@ -578,6 +616,7 @@ void register_Expression_class(){ "subtract" , subtract_function_value , ( bp::arg("ex") ) + , bp::release_gil_policy() , "Return an expression that is this - ex" ); } @@ -590,6 +629,7 @@ void register_Expression_class(){ "subtract" , subtract_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return an expression that is this - val" ); } @@ -602,6 +642,7 @@ void register_Expression_class(){ "subtract" , subtract_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Return an expression that is this - val" ); } @@ -613,6 +654,7 @@ void register_Expression_class(){ Expression_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the symbols used in this expression" ); } @@ -624,6 +666,7 @@ void register_Expression_class(){ Expression_exposer.def( "toOpenMMString" , toOpenMMString_function_value + , bp::release_gil_policy() , "Return a string representation of this expression in the OpenMM syntax" ); } @@ -635,6 +678,7 @@ void register_Expression_class(){ Expression_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this expression" ); } @@ -646,6 +690,7 @@ void register_Expression_class(){ Expression_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -657,6 +702,7 @@ void register_Expression_class(){ Expression_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/ExpressionBase.pypp.cpp b/wrapper/CAS/ExpressionBase.pypp.cpp index 04f56c2b8..4befa1e21 100644 --- a/wrapper/CAS/ExpressionBase.pypp.cpp +++ b/wrapper/CAS/ExpressionBase.pypp.cpp @@ -35,6 +35,8 @@ SireCAS::ExpressionBase __copy__(const SireCAS::ExpressionBase &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ExpressionBase_class(){ { //::SireCAS::ExpressionBase @@ -51,6 +53,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the child expressions of this Expression" ); } @@ -62,6 +65,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the complex conjugate of this expression" ); } @@ -74,6 +78,7 @@ void register_ExpressionBase_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return an expression that the differential of this expression\nwith respect to symbol. Note an exception may\nbe thrown if this cannot be differentiated.\nThrow: SireCAS::unavailable_differential\n" ); } @@ -86,6 +91,7 @@ void register_ExpressionBase_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this ExBase using values values. Any\nmissing symbols are assumed to equal zero.\nNote that an exception will be thrown if the result of the\nevaluation of this, or one of its children, is complex.\nThrow: SireMaths::math_error\nThrow: SireMaths::domain_error\n" ); } @@ -98,6 +104,7 @@ void register_ExpressionBase_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this ExBase using the complex values values.\nAny missing symbols are assumed to equal zero.\nThrow: SireMaths::math_error\n" ); } @@ -110,6 +117,7 @@ void register_ExpressionBase_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the factors and powers for the symbol symbol, given the values of the\nother symbols in values. This attempts to rearrange this equation\nso that it is of the form m symbol^i + n symbol^j ... + constant,\nand it returns the values of m,i, n,j etc..\nNote that this will fail if such a rearrangement is not possible\nThrow: SireCAS::rearrangement_error\n" ); } @@ -121,6 +129,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return the set of Functions that appear in this ExBase" ); } @@ -132,6 +141,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this object - return a combination of the\nidentifying magic for the class and a hash for its contents." ); } @@ -144,6 +154,7 @@ void register_ExpressionBase_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the indefinite integral of this expression with respect to\nsymbol. This is not guaranteed to work() and will return an\nexpression of the form Sum( integral(exbase) + integral_constant ).\nIf it doesnt work then an exception will be throw.\nThrow: SireCAS::unavailable_integral\n" ); } @@ -155,6 +166,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether or not this expression contains any complex (imaginary)\nparts" ); } @@ -166,6 +178,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Return whether or not this is a compound expression, and thus as such\nrequires brackets placed around it when it is printed. Examples include\nSum, Product and Power. For most other functions it is safe to leave\nthis as false." ); } @@ -177,6 +190,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant expression (does not\ndepend on any symbols)" ); } @@ -189,6 +203,7 @@ void register_ExpressionBase_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Return whether or not this is a function of the passed Symbol" ); } @@ -229,6 +244,7 @@ void register_ExpressionBase_class(){ "series" , series_function_value , ( bp::arg("symbol"), bp::arg("n") ) + , bp::release_gil_policy() , "Return a series expansion of this expression with respect to\nsymbol, if possible, to order\nn. This is not guaranteed to work, and will return this expression\nunchanged if it doesnt work. If it is expanded, then a series\nwill be returned, together with an estimate of the error (e.g. O(x^2))" ); } @@ -253,6 +269,7 @@ void register_ExpressionBase_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Return an expression that has the identities in identities\nsubstituted into this expression" ); } @@ -264,6 +281,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return the set of Symbols that appear in this ExBase" ); } @@ -275,6 +293,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "toOpenMMString" , toOpenMMString_function_value + , bp::release_gil_policy() , "" ); } @@ -286,6 +305,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this object" ); } @@ -297,6 +317,7 @@ void register_ExpressionBase_class(){ ExpressionBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the name of the type of this ExBase object" ); } diff --git a/wrapper/CAS/ExpressionProperty.pypp.cpp b/wrapper/CAS/ExpressionProperty.pypp.cpp index d422ff92e..f3c084ef1 100644 --- a/wrapper/CAS/ExpressionProperty.pypp.cpp +++ b/wrapper/CAS/ExpressionProperty.pypp.cpp @@ -29,6 +29,8 @@ SireCAS::ExpressionProperty __copy__(const SireCAS::ExpressionProperty &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ExpressionProperty_class(){ { //::SireCAS::ExpressionProperty @@ -46,6 +48,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "asABoolean" , asABoolean_function_value + , bp::release_gil_policy() , "Return this number cast as a boolean" ); } @@ -57,6 +60,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "asADouble" , asADouble_function_value + , bp::release_gil_policy() , "Return this number cast as a double" ); } @@ -68,6 +72,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "asAnInteger" , asAnInteger_function_value + , bp::release_gil_policy() , "Return this number cast as an integer" ); } @@ -79,6 +84,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "isABoolean" , isABoolean_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +96,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "isADouble" , isADouble_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +108,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "isAnInteger" , isAnInteger_function_value + , bp::release_gil_policy() , "" ); } @@ -127,6 +135,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -138,6 +147,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -149,6 +159,7 @@ void register_ExpressionProperty_class(){ ExpressionProperty_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return this number cast as a double" ); } diff --git a/wrapper/CAS/Factor.pypp.cpp b/wrapper/CAS/Factor.pypp.cpp index cdf114337..0cd75fc0d 100644 --- a/wrapper/CAS/Factor.pypp.cpp +++ b/wrapper/CAS/Factor.pypp.cpp @@ -38,6 +38,8 @@ SireCAS::Factor __copy__(const SireCAS::Factor &other){ return SireCAS::Factor(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Factor_class(){ { //::SireCAS::Factor @@ -94,7 +96,7 @@ void register_Factor_class(){ Factor_exposer.def( "symbol" , symbol_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -106,6 +108,7 @@ void register_Factor_class(){ Factor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/GreaterOrEqualThan.pypp.cpp b/wrapper/CAS/GreaterOrEqualThan.pypp.cpp index 42bd1b287..cb879c814 100644 --- a/wrapper/CAS/GreaterOrEqualThan.pypp.cpp +++ b/wrapper/CAS/GreaterOrEqualThan.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::GreaterOrEqualThan __copy__(const SireCAS::GreaterOrEqualThan &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GreaterOrEqualThan_class(){ { //::SireCAS::GreaterOrEqualThan @@ -55,6 +57,7 @@ void register_GreaterOrEqualThan_class(){ GreaterOrEqualThan_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be false. Note that this doesnt try\ntoo hard, so some things that are always false may not\nbe reported here as being always false, e.g. x > x + 1" ); } @@ -66,6 +69,7 @@ void register_GreaterOrEqualThan_class(){ GreaterOrEqualThan_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be true. Note that this doesnt try\ntoo hard, so some things that are always true may not\nbe reported here as being always true, e.g. x + 1 > x" ); } @@ -92,6 +96,7 @@ void register_GreaterOrEqualThan_class(){ GreaterOrEqualThan_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +108,7 @@ void register_GreaterOrEqualThan_class(){ GreaterOrEqualThan_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/GreaterThan.pypp.cpp b/wrapper/CAS/GreaterThan.pypp.cpp index b1bdf300a..6b0435da7 100644 --- a/wrapper/CAS/GreaterThan.pypp.cpp +++ b/wrapper/CAS/GreaterThan.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::GreaterThan __copy__(const SireCAS::GreaterThan &other){ return SireCAS #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GreaterThan_class(){ { //::SireCAS::GreaterThan @@ -55,6 +57,7 @@ void register_GreaterThan_class(){ GreaterThan_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be false. Note that this doesnt try\ntoo hard, so some things that are always false may not\nbe reported here as being always false, e.g. x > x + 1" ); } @@ -66,6 +69,7 @@ void register_GreaterThan_class(){ GreaterThan_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be true. Note that this doesnt try\ntoo hard, so some things that are always true may not\nbe reported here as being always true, e.g. x + 1 > x" ); } @@ -92,6 +96,7 @@ void register_GreaterThan_class(){ GreaterThan_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +108,7 @@ void register_GreaterThan_class(){ GreaterThan_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/I.pypp.cpp b/wrapper/CAS/I.pypp.cpp index 0e5102c3d..5163e3c76 100644 --- a/wrapper/CAS/I.pypp.cpp +++ b/wrapper/CAS/I.pypp.cpp @@ -25,6 +25,8 @@ SireCAS::I __copy__(const SireCAS::I &other){ return SireCAS::I(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_I_class(){ { //::SireCAS::I @@ -40,6 +42,7 @@ void register_I_class(){ I_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the complex conjugate of i (-i)" ); } @@ -52,6 +55,7 @@ void register_I_class(){ "evaluate" , evaluate_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Cannot evaluate i as a real number, so throw a domain error" ); } @@ -64,6 +68,7 @@ void register_I_class(){ "evaluate" , evaluate_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Evaluate this as a complex number - return i" ); } @@ -75,6 +80,7 @@ void register_I_class(){ I_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this expression" ); } @@ -86,6 +92,7 @@ void register_I_class(){ I_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "I is definitely complex :-)" ); } @@ -98,6 +105,7 @@ void register_I_class(){ I_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -109,6 +117,7 @@ void register_I_class(){ I_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +129,7 @@ void register_I_class(){ I_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Identities.pypp.cpp b/wrapper/CAS/Identities.pypp.cpp index 92b70b9e3..f5289e771 100644 --- a/wrapper/CAS/Identities.pypp.cpp +++ b/wrapper/CAS/Identities.pypp.cpp @@ -25,6 +25,8 @@ SireCAS::Identities __copy__(const SireCAS::Identities &other){ return SireCAS:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Identities_class(){ { //::SireCAS::Identities @@ -53,6 +55,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -77,6 +81,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -89,6 +94,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2"), bp::arg("symex3") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -101,6 +107,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2"), bp::arg("symex3"), bp::arg("symex4") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -113,6 +120,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2"), bp::arg("symex3"), bp::arg("symex4"), bp::arg("symex5") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -125,6 +133,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2"), bp::arg("symex3"), bp::arg("symex4"), bp::arg("symex5"), bp::arg("symex6") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -137,6 +146,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2"), bp::arg("symex3"), bp::arg("symex4"), bp::arg("symex5"), bp::arg("symex6"), bp::arg("symex7") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -149,6 +159,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2"), bp::arg("symex3"), bp::arg("symex4"), bp::arg("symex5"), bp::arg("symex6"), bp::arg("symex7"), bp::arg("symex8") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -161,6 +172,7 @@ void register_Identities_class(){ "add" , add_function_value , ( bp::arg("symex0"), bp::arg("symex1"), bp::arg("symex2"), bp::arg("symex3"), bp::arg("symex4"), bp::arg("symex5"), bp::arg("symex6"), bp::arg("symex7"), bp::arg("symex8"), bp::arg("symex9") ) + , bp::release_gil_policy() , "Add the passed expressions" ); } @@ -173,6 +185,7 @@ void register_Identities_class(){ "contains" , contains_function_value , ( bp::arg("sym") ) + , bp::release_gil_policy() , "Return whether or not this set of identities contains an identity for\nthe symbol symbol" ); } @@ -185,6 +198,7 @@ void register_Identities_class(){ "contains" , contains_function_value , ( bp::arg("func") ) + , bp::release_gil_policy() , "Return whether or not this set of identities contains an identity for\nthe function func (or one of its relations)" ); } @@ -197,6 +211,7 @@ void register_Identities_class(){ "expression" , expression_function_value , ( bp::arg("sym") ) + , bp::release_gil_policy() , "Return the associated expression for symbol, or an expression containing\nthis symbol if there is no such expression" ); } @@ -209,6 +224,7 @@ void register_Identities_class(){ "function" , function_function_value , ( bp::arg("func") ) + , bp::release_gil_policy() , "Return the actual form of the function func stored in this set of\nidentities, or the null function if it is not present here" ); } @@ -235,6 +251,7 @@ void register_Identities_class(){ "set" , set_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the Symbol symbol equal to expression" ); } @@ -246,6 +263,7 @@ void register_Identities_class(){ Identities_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return a list of the symbols that are present in this set" ); } @@ -257,6 +275,7 @@ void register_Identities_class(){ Identities_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -268,6 +287,7 @@ void register_Identities_class(){ Identities_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -279,6 +299,7 @@ void register_Identities_class(){ Identities_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/IntegerPower.pypp.cpp b/wrapper/CAS/IntegerPower.pypp.cpp index 82c92574b..fdb2c486f 100644 --- a/wrapper/CAS/IntegerPower.pypp.cpp +++ b/wrapper/CAS/IntegerPower.pypp.cpp @@ -37,6 +37,8 @@ SireCAS::IntegerPower __copy__(const SireCAS::IntegerPower &other){ return SireC #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IntegerPower_class(){ { //::SireCAS::IntegerPower @@ -54,6 +56,7 @@ void register_IntegerPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -66,6 +69,7 @@ void register_IntegerPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -77,6 +81,7 @@ void register_IntegerPower_class(){ IntegerPower_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this power" ); } @@ -89,6 +94,7 @@ void register_IntegerPower_class(){ IntegerPower_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_IntegerPower_class(){ IntegerPower_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_IntegerPower_class(){ IntegerPower_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/IntegrationConstant.pypp.cpp b/wrapper/CAS/IntegrationConstant.pypp.cpp index 8bbc4114a..8840199eb 100644 --- a/wrapper/CAS/IntegrationConstant.pypp.cpp +++ b/wrapper/CAS/IntegrationConstant.pypp.cpp @@ -21,6 +21,8 @@ SireCAS::IntegrationConstant __copy__(const SireCAS::IntegrationConstant &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IntegrationConstant_class(){ { //::SireCAS::IntegrationConstant @@ -36,6 +38,7 @@ void register_IntegrationConstant_class(){ IntegrationConstant_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this object" ); } @@ -48,6 +51,7 @@ void register_IntegrationConstant_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Cannot integrate an expression containing an integration constant. This\nis to prevent integration constants from multiple integrations from\nappearing in the expression." ); } @@ -60,6 +64,7 @@ void register_IntegrationConstant_class(){ IntegrationConstant_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -71,6 +76,7 @@ void register_IntegrationConstant_class(){ IntegrationConstant_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/LessOrEqualThan.pypp.cpp b/wrapper/CAS/LessOrEqualThan.pypp.cpp index 425b6f462..32f9e7155 100644 --- a/wrapper/CAS/LessOrEqualThan.pypp.cpp +++ b/wrapper/CAS/LessOrEqualThan.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::LessOrEqualThan __copy__(const SireCAS::LessOrEqualThan &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LessOrEqualThan_class(){ { //::SireCAS::LessOrEqualThan @@ -55,6 +57,7 @@ void register_LessOrEqualThan_class(){ LessOrEqualThan_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be false. Note that this doesnt try\ntoo hard, so some things that are always false may not\nbe reported here as being always false, e.g. x > x + 1" ); } @@ -66,6 +69,7 @@ void register_LessOrEqualThan_class(){ LessOrEqualThan_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be true. Note that this doesnt try\ntoo hard, so some things that are always true may not\nbe reported here as being always true, e.g. x + 1 > x" ); } @@ -92,6 +96,7 @@ void register_LessOrEqualThan_class(){ LessOrEqualThan_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +108,7 @@ void register_LessOrEqualThan_class(){ LessOrEqualThan_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/LessThan.pypp.cpp b/wrapper/CAS/LessThan.pypp.cpp index 1f03358cc..fb67d8780 100644 --- a/wrapper/CAS/LessThan.pypp.cpp +++ b/wrapper/CAS/LessThan.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::LessThan __copy__(const SireCAS::LessThan &other){ return SireCAS::Less #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LessThan_class(){ { //::SireCAS::LessThan @@ -55,6 +57,7 @@ void register_LessThan_class(){ LessThan_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be false. Note that this doesnt try\ntoo hard, so some things that are always false may not\nbe reported here as being always false, e.g. x + 1 < x" ); } @@ -66,6 +69,7 @@ void register_LessThan_class(){ LessThan_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be true. Note that this doesnt try\ntoo hard, so some things that are always true may not\nbe reported here as being always true, e.g. x < x + 1" ); } @@ -92,6 +96,7 @@ void register_LessThan_class(){ LessThan_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +108,7 @@ void register_LessThan_class(){ LessThan_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Ln.pypp.cpp b/wrapper/CAS/Ln.pypp.cpp index ce62d06ec..330afca24 100644 --- a/wrapper/CAS/Ln.pypp.cpp +++ b/wrapper/CAS/Ln.pypp.cpp @@ -25,6 +25,8 @@ SireCAS::Ln __copy__(const SireCAS::Ln &other){ return SireCAS::Ln(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Ln_class(){ { //::SireCAS::Ln @@ -42,6 +44,7 @@ void register_Ln_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -54,6 +57,7 @@ void register_Ln_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -66,6 +70,7 @@ void register_Ln_class(){ Ln_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +82,7 @@ void register_Ln_class(){ Ln_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Max.pypp.cpp b/wrapper/CAS/Max.pypp.cpp index 83f4d4c92..4e5b7e5c9 100644 --- a/wrapper/CAS/Max.pypp.cpp +++ b/wrapper/CAS/Max.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Max __copy__(const SireCAS::Max &other){ return SireCAS::Max(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Max_class(){ { //::SireCAS::Max @@ -44,6 +46,7 @@ void register_Max_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Max_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Max_class(){ Max_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Max_class(){ Max_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Min.pypp.cpp b/wrapper/CAS/Min.pypp.cpp index 13d9d925b..9f99a74f8 100644 --- a/wrapper/CAS/Min.pypp.cpp +++ b/wrapper/CAS/Min.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Min __copy__(const SireCAS::Min &other){ return SireCAS::Min(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Min_class(){ { //::SireCAS::Min @@ -44,6 +46,7 @@ void register_Min_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Min_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Min_class(){ Min_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Min_class(){ Min_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/NotEqualTo.pypp.cpp b/wrapper/CAS/NotEqualTo.pypp.cpp index 4476504bb..3558c7418 100644 --- a/wrapper/CAS/NotEqualTo.pypp.cpp +++ b/wrapper/CAS/NotEqualTo.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::NotEqualTo __copy__(const SireCAS::NotEqualTo &other){ return SireCAS:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NotEqualTo_class(){ { //::SireCAS::NotEqualTo @@ -55,6 +57,7 @@ void register_NotEqualTo_class(){ NotEqualTo_exposer.def( "alwaysFalse" , alwaysFalse_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be false. Note that this doesnt try\ntoo hard, so some things that are always false may not\nbe reported here as being always false, e.g. x > x + 1" ); } @@ -66,6 +69,7 @@ void register_NotEqualTo_class(){ NotEqualTo_exposer.def( "alwaysTrue" , alwaysTrue_function_value + , bp::release_gil_policy() , "Return whether or not we can be absolutely sure that this\ncondition will always be true. Note that this doesnt try\ntoo hard, so some things that are always true may not\nbe reported here as being always true, e.g. x + 1 > x" ); } @@ -92,6 +96,7 @@ void register_NotEqualTo_class(){ NotEqualTo_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +108,7 @@ void register_NotEqualTo_class(){ NotEqualTo_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Power.pypp.cpp b/wrapper/CAS/Power.pypp.cpp index b8c2f9525..800cd5918 100644 --- a/wrapper/CAS/Power.pypp.cpp +++ b/wrapper/CAS/Power.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::Power __copy__(const SireCAS::Power &other){ return SireCAS::Power(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Power_class(){ { //::SireCAS::Power @@ -55,6 +57,7 @@ void register_Power_class(){ Power_exposer.def( "core" , core_function_value + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_Power_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power - this could be dodgy for negative bases with\nnon-integer powers" ); } @@ -79,6 +83,7 @@ void register_Power_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power - this could be dodgy for negative bases with\nnon-integer powers" ); } @@ -90,6 +95,7 @@ void register_Power_class(){ Power_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this power" ); } @@ -101,6 +107,7 @@ void register_Power_class(){ Power_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +120,7 @@ void register_Power_class(){ Power_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "" ); } @@ -124,6 +132,7 @@ void register_Power_class(){ Power_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -135,6 +144,7 @@ void register_Power_class(){ Power_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/PowerConstant.pypp.cpp b/wrapper/CAS/PowerConstant.pypp.cpp index 63b7f30e1..6b0993d71 100644 --- a/wrapper/CAS/PowerConstant.pypp.cpp +++ b/wrapper/CAS/PowerConstant.pypp.cpp @@ -37,6 +37,8 @@ SireCAS::PowerConstant __copy__(const SireCAS::PowerConstant &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PowerConstant_class(){ { //::SireCAS::PowerConstant @@ -53,6 +55,7 @@ void register_PowerConstant_class(){ PowerConstant_exposer.def( "core" , core_function_value + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_PowerConstant_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -77,6 +81,7 @@ void register_PowerConstant_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -88,6 +93,7 @@ void register_PowerConstant_class(){ PowerConstant_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this power" ); } @@ -100,6 +106,7 @@ void register_PowerConstant_class(){ PowerConstant_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_PowerConstant_class(){ PowerConstant_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +130,7 @@ void register_PowerConstant_class(){ PowerConstant_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/PowerFunction.pypp.cpp b/wrapper/CAS/PowerFunction.pypp.cpp index 8f1e5766f..70b098ee2 100644 --- a/wrapper/CAS/PowerFunction.pypp.cpp +++ b/wrapper/CAS/PowerFunction.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PowerFunction_class(){ { //::SireCAS::PowerFunction @@ -51,6 +53,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the child expressions of this Power - this contains the core() and the power()" ); } @@ -62,6 +65,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "core" , core_function_value + , bp::release_gil_policy() , "" ); } @@ -74,6 +78,7 @@ void register_PowerFunction_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this expression with respect to symbol" ); } @@ -86,6 +91,7 @@ void register_PowerFunction_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -97,6 +103,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +116,7 @@ void register_PowerFunction_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the integral of this power with respect to symbol" ); } @@ -120,6 +128,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "" ); } @@ -131,6 +140,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant" ); } @@ -143,6 +153,7 @@ void register_PowerFunction_class(){ "isFunction" , isFunction_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return whether this is a function of symbol" ); } @@ -154,6 +165,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "" ); } @@ -165,6 +177,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "reduce" , reduce_function_value + , bp::release_gil_policy() , "Reduce this Power to a simplified expression (if possible)" ); } @@ -177,6 +190,7 @@ void register_PowerFunction_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Return this expression with the supplied substitutions" ); } @@ -188,6 +202,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -199,6 +214,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "toOpenMMString" , toOpenMMString_function_value + , bp::release_gil_policy() , "Return a string representation of this power in the OpenMM syntax" ); } @@ -210,6 +226,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this power" ); } @@ -221,6 +238,7 @@ void register_PowerFunction_class(){ PowerFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Product.pypp.cpp b/wrapper/CAS/Product.pypp.cpp index 37b74243f..887ff41a6 100644 --- a/wrapper/CAS/Product.pypp.cpp +++ b/wrapper/CAS/Product.pypp.cpp @@ -47,6 +47,8 @@ SireCAS::Product __copy__(const SireCAS::Product &other){ return SireCAS::Produc #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Product_class(){ { //::SireCAS::Product @@ -64,6 +66,7 @@ void register_Product_class(){ Product_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the child expressions of this product" ); } @@ -75,6 +78,7 @@ void register_Product_class(){ Product_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the complex conjugate of this product" ); } @@ -86,6 +90,7 @@ void register_Product_class(){ Product_exposer.def( "denominator" , denominator_function_value + , bp::release_gil_policy() , "Return the Product of expressions on the denominator of this Product" ); } @@ -98,6 +103,7 @@ void register_Product_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this product..." ); } @@ -110,6 +116,7 @@ void register_Product_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this product" ); } @@ -122,6 +129,7 @@ void register_Product_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this product" ); } @@ -134,6 +142,7 @@ void register_Product_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -145,6 +154,7 @@ void register_Product_class(){ Product_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return all of the functions used in this product" ); } @@ -156,6 +166,7 @@ void register_Product_class(){ Product_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this product" ); } @@ -168,6 +179,7 @@ void register_Product_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Need to write integral of a product..." ); } @@ -179,6 +191,7 @@ void register_Product_class(){ Product_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether or not this Product contains any complex terms" ); } @@ -190,6 +203,7 @@ void register_Product_class(){ Product_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Return whether or not this is compound (requires brackets when printing)" ); } @@ -201,6 +215,7 @@ void register_Product_class(){ Product_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether this is a constant" ); } @@ -213,6 +228,7 @@ void register_Product_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Return whether or not this is a function of symbol" ); } @@ -224,6 +240,7 @@ void register_Product_class(){ Product_exposer.def( "numerator" , numerator_function_value + , bp::release_gil_policy() , "Return the Product of expressions on the numerator of this Product" ); } @@ -236,6 +253,7 @@ void register_Product_class(){ Product_exposer.def( "reduce" , reduce_function_value + , bp::release_gil_policy() , "Reduce a Product down to a simple form. This will not attempt to collapse\ncommon factors - if you want to do this then call the collapse function." ); } @@ -248,6 +266,7 @@ void register_Product_class(){ "series" , series_function_value , ( bp::arg("symbol"), bp::arg("n") ) + , bp::release_gil_policy() , "Return the series expansion of this product with respect to symbol, to order n" ); } @@ -272,6 +291,7 @@ void register_Product_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Return the product with the identities in identities substituted in" ); } @@ -283,6 +303,7 @@ void register_Product_class(){ Product_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the symbols used in this product" ); } @@ -294,6 +315,7 @@ void register_Product_class(){ Product_exposer.def( "toOpenMMString" , toOpenMMString_function_value + , bp::release_gil_policy() , "Return a string representation of this Product in the OpenMM syntax" ); } @@ -305,6 +327,7 @@ void register_Product_class(){ Product_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this Product" ); } @@ -316,6 +339,7 @@ void register_Product_class(){ Product_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -327,6 +351,7 @@ void register_Product_class(){ Product_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/RationalPower.pypp.cpp b/wrapper/CAS/RationalPower.pypp.cpp index 6ac807ba7..1c5987998 100644 --- a/wrapper/CAS/RationalPower.pypp.cpp +++ b/wrapper/CAS/RationalPower.pypp.cpp @@ -37,6 +37,8 @@ SireCAS::RationalPower __copy__(const SireCAS::RationalPower &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RationalPower_class(){ { //::SireCAS::RationalPower @@ -54,6 +56,7 @@ void register_RationalPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -66,6 +69,7 @@ void register_RationalPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -77,6 +81,7 @@ void register_RationalPower_class(){ RationalPower_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this power" ); } @@ -89,6 +94,7 @@ void register_RationalPower_class(){ RationalPower_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_RationalPower_class(){ RationalPower_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_RationalPower_class(){ RationalPower_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/RealPower.pypp.cpp b/wrapper/CAS/RealPower.pypp.cpp index 092ca7aed..5fcb37393 100644 --- a/wrapper/CAS/RealPower.pypp.cpp +++ b/wrapper/CAS/RealPower.pypp.cpp @@ -37,6 +37,8 @@ SireCAS::RealPower __copy__(const SireCAS::RealPower &other){ return SireCAS::Re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RealPower_class(){ { //::SireCAS::RealPower @@ -54,6 +56,7 @@ void register_RealPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -66,6 +69,7 @@ void register_RealPower_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this power" ); } @@ -77,6 +81,7 @@ void register_RealPower_class(){ RealPower_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this power" ); } @@ -89,6 +94,7 @@ void register_RealPower_class(){ RealPower_exposer.def( "power" , power_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_RealPower_class(){ RealPower_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_RealPower_class(){ RealPower_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Sec.pypp.cpp b/wrapper/CAS/Sec.pypp.cpp index f7cfbb3e0..16fb9cfcd 100644 --- a/wrapper/CAS/Sec.pypp.cpp +++ b/wrapper/CAS/Sec.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Sec __copy__(const SireCAS::Sec &other){ return SireCAS::Sec(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Sec_class(){ { //::SireCAS::Sec @@ -44,6 +46,7 @@ void register_Sec_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Sec_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Sec_class(){ Sec_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Sec_class(){ Sec_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Sech.pypp.cpp b/wrapper/CAS/Sech.pypp.cpp index 0996b03b2..266b6cafb 100644 --- a/wrapper/CAS/Sech.pypp.cpp +++ b/wrapper/CAS/Sech.pypp.cpp @@ -29,6 +29,8 @@ SireCAS::Sech __copy__(const SireCAS::Sech &other){ return SireCAS::Sech(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Sech_class(){ { //::SireCAS::Sech @@ -46,6 +48,7 @@ void register_Sech_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -58,6 +61,7 @@ void register_Sech_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -70,6 +74,7 @@ void register_Sech_class(){ Sech_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +86,7 @@ void register_Sech_class(){ Sech_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Sin.pypp.cpp b/wrapper/CAS/Sin.pypp.cpp index 8b8060516..7186b1503 100644 --- a/wrapper/CAS/Sin.pypp.cpp +++ b/wrapper/CAS/Sin.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Sin __copy__(const SireCAS::Sin &other){ return SireCAS::Sin(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Sin_class(){ { //::SireCAS::Sin @@ -44,6 +46,7 @@ void register_Sin_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Sin_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Sin_class(){ Sin_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Sin_class(){ Sin_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/SingleFunc.pypp.cpp b/wrapper/CAS/SingleFunc.pypp.cpp index 4faf1fcb6..5cc7c38da 100644 --- a/wrapper/CAS/SingleFunc.pypp.cpp +++ b/wrapper/CAS/SingleFunc.pypp.cpp @@ -25,6 +25,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SingleFunc_class(){ { //::SireCAS::SingleFunc @@ -51,6 +53,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the child expression of this function" ); } @@ -62,6 +65,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the conjugate of this function" ); } @@ -74,6 +78,7 @@ void register_SingleFunc_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this function with respect to symbol" ); } @@ -86,6 +91,7 @@ void register_SingleFunc_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -97,6 +103,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return the functions used in this function" ); } @@ -108,6 +115,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +128,7 @@ void register_SingleFunc_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the integral of this function with respect to symbol" ); } @@ -131,6 +140,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether this is complex" ); } @@ -142,6 +152,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "A function is not compound" ); } @@ -153,6 +164,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is constant" ); } @@ -165,6 +177,7 @@ void register_SingleFunc_class(){ "isFunction" , isFunction_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return if this is a function of symbol" ); } @@ -190,6 +203,7 @@ void register_SingleFunc_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute into this expression" ); } @@ -201,6 +215,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return the symbols used in this function" ); } @@ -212,6 +227,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "toOpenMMString" , toOpenMMString_function_value + , bp::release_gil_policy() , "Return a string representation of this function in the OpenMM syntax" ); } @@ -223,6 +239,7 @@ void register_SingleFunc_class(){ SingleFunc_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this function" ); } diff --git a/wrapper/CAS/Sinh.pypp.cpp b/wrapper/CAS/Sinh.pypp.cpp index 091c3a82e..04b8050e7 100644 --- a/wrapper/CAS/Sinh.pypp.cpp +++ b/wrapper/CAS/Sinh.pypp.cpp @@ -29,6 +29,8 @@ SireCAS::Sinh __copy__(const SireCAS::Sinh &other){ return SireCAS::Sinh(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Sinh_class(){ { //::SireCAS::Sinh @@ -46,6 +48,7 @@ void register_Sinh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -58,6 +61,7 @@ void register_Sinh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -70,6 +74,7 @@ void register_Sinh_class(){ Sinh_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +86,7 @@ void register_Sinh_class(){ Sinh_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/SireCAS_registrars.cpp b/wrapper/CAS/SireCAS_registrars.cpp index c6fd4037b..90cd29a54 100644 --- a/wrapper/CAS/SireCAS_registrars.cpp +++ b/wrapper/CAS/SireCAS_registrars.cpp @@ -5,45 +5,62 @@ #include "Helpers/version_error_impl.h" -#include "sum.h" -#include "power.h" -#include "minmax.h" -#include "hyperbolicfuncs.h" -#include "invhyperbolicfuncs.h" -#include "invtrigfuncs.h" -#include "product.h" +#include "abs.h" #include "complexvalues.h" +#include "conditional.h" +#include "constant.h" #include "exp.h" +#include "expression.h" #include "expressionproperty.h" +#include "function.h" +#include "functionsignature.h" +#include "hyperbolicfuncs.h" #include "i.h" -#include "expression.h" -#include "symbol.h" -#include "conditional.h" #include "identities.h" -#include "values.h" -#include "constant.h" #include "integrationconstant.h" -#include "abs.h" -#include "functionsignature.h" -#include "function.h" +#include "invhyperbolicfuncs.h" +#include "invtrigfuncs.h" +#include "minmax.h" +#include "power.h" #include "powerconstant.h" +#include "product.h" +#include "sum.h" +#include "symbol.h" #include "trigfuncs.h" +#include "values.h" #include "Helpers/objectregistry.hpp" void register_SireCAS_objects() { - ObjectRegistry::registerConverterFor< SireCAS::Sum >(); - ObjectRegistry::registerConverterFor< SireCAS::Power >(); - ObjectRegistry::registerConverterFor< SireCAS::Min >(); - ObjectRegistry::registerConverterFor< SireCAS::Max >(); + ObjectRegistry::registerConverterFor< SireCAS::Abs >(); + ObjectRegistry::registerConverterFor< SireCAS::ComplexValues >(); + ObjectRegistry::registerConverterFor< SireCAS::Conditional >(); + ObjectRegistry::registerConverterFor< SireCAS::GreaterThan >(); + ObjectRegistry::registerConverterFor< SireCAS::LessThan >(); + ObjectRegistry::registerConverterFor< SireCAS::GreaterOrEqualThan >(); + ObjectRegistry::registerConverterFor< SireCAS::LessOrEqualThan >(); + ObjectRegistry::registerConverterFor< SireCAS::EqualTo >(); + ObjectRegistry::registerConverterFor< SireCAS::NotEqualTo >(); + ObjectRegistry::registerConverterFor< SireCAS::AlwaysTrue >(); + ObjectRegistry::registerConverterFor< SireCAS::AlwaysFalse >(); + ObjectRegistry::registerConverterFor< SireCAS::Constant >(); + ObjectRegistry::registerConverterFor< SireCAS::Exp >(); + ObjectRegistry::registerConverterFor< SireCAS::Ln >(); + ObjectRegistry::registerConverterFor< SireCAS::Expression >(); + ObjectRegistry::registerConverterFor< SireCAS::ExpressionProperty >(); + ObjectRegistry::registerConverterFor< SireCAS::Function >(); + ObjectRegistry::registerConverterFor< SireCAS::FunctionSignature >(); ObjectRegistry::registerConverterFor< SireCAS::Cosh >(); ObjectRegistry::registerConverterFor< SireCAS::Sinh >(); ObjectRegistry::registerConverterFor< SireCAS::Tanh >(); ObjectRegistry::registerConverterFor< SireCAS::Csch >(); ObjectRegistry::registerConverterFor< SireCAS::Sech >(); ObjectRegistry::registerConverterFor< SireCAS::Coth >(); + ObjectRegistry::registerConverterFor< SireCAS::I >(); + ObjectRegistry::registerConverterFor< SireCAS::Identities >(); + ObjectRegistry::registerConverterFor< SireCAS::IntegrationConstant >(); ObjectRegistry::registerConverterFor< SireCAS::ArcCosh >(); ObjectRegistry::registerConverterFor< SireCAS::ArcSinh >(); ObjectRegistry::registerConverterFor< SireCAS::ArcTanh >(); @@ -56,41 +73,24 @@ void register_SireCAS_objects() ObjectRegistry::registerConverterFor< SireCAS::ArcCsc >(); ObjectRegistry::registerConverterFor< SireCAS::ArcSec >(); ObjectRegistry::registerConverterFor< SireCAS::ArcCot >(); - ObjectRegistry::registerConverterFor< SireCAS::Product >(); - ObjectRegistry::registerConverterFor< SireCAS::ComplexValues >(); - ObjectRegistry::registerConverterFor< SireCAS::Exp >(); - ObjectRegistry::registerConverterFor< SireCAS::Ln >(); - ObjectRegistry::registerConverterFor< SireCAS::ExpressionProperty >(); - ObjectRegistry::registerConverterFor< SireCAS::I >(); - ObjectRegistry::registerConverterFor< SireCAS::Expression >(); - ObjectRegistry::registerConverterFor< SireCAS::Symbol >(); - ObjectRegistry::registerConverterFor< SireCAS::Conditional >(); - ObjectRegistry::registerConverterFor< SireCAS::GreaterThan >(); - ObjectRegistry::registerConverterFor< SireCAS::LessThan >(); - ObjectRegistry::registerConverterFor< SireCAS::GreaterOrEqualThan >(); - ObjectRegistry::registerConverterFor< SireCAS::LessOrEqualThan >(); - ObjectRegistry::registerConverterFor< SireCAS::EqualTo >(); - ObjectRegistry::registerConverterFor< SireCAS::NotEqualTo >(); - ObjectRegistry::registerConverterFor< SireCAS::AlwaysTrue >(); - ObjectRegistry::registerConverterFor< SireCAS::AlwaysFalse >(); - ObjectRegistry::registerConverterFor< SireCAS::Identities >(); - ObjectRegistry::registerConverterFor< SireCAS::Values >(); - ObjectRegistry::registerConverterFor< SireCAS::Constant >(); - ObjectRegistry::registerConverterFor< SireCAS::IntegrationConstant >(); - ObjectRegistry::registerConverterFor< SireCAS::Abs >(); - ObjectRegistry::registerConverterFor< SireCAS::FunctionSignature >(); - ObjectRegistry::registerConverterFor< SireCAS::Function >(); + ObjectRegistry::registerConverterFor< SireCAS::Min >(); + ObjectRegistry::registerConverterFor< SireCAS::Max >(); + ObjectRegistry::registerConverterFor< SireCAS::Power >(); ObjectRegistry::registerConverterFor< SireCAS::PowerConstant >(); ObjectRegistry::registerConverterFor< SireCAS::IntegerPower >(); ObjectRegistry::registerConverterFor< SireCAS::RationalPower >(); ObjectRegistry::registerConverterFor< SireCAS::RealPower >(); ObjectRegistry::registerConverterFor< SireCAS::ComplexPower >(); + ObjectRegistry::registerConverterFor< SireCAS::Product >(); + ObjectRegistry::registerConverterFor< SireCAS::Sum >(); + ObjectRegistry::registerConverterFor< SireCAS::Symbol >(); ObjectRegistry::registerConverterFor< SireCAS::Cos >(); ObjectRegistry::registerConverterFor< SireCAS::Sin >(); ObjectRegistry::registerConverterFor< SireCAS::Tan >(); ObjectRegistry::registerConverterFor< SireCAS::Csc >(); ObjectRegistry::registerConverterFor< SireCAS::Sec >(); ObjectRegistry::registerConverterFor< SireCAS::Cot >(); + ObjectRegistry::registerConverterFor< SireCAS::Values >(); } diff --git a/wrapper/CAS/Sum.pypp.cpp b/wrapper/CAS/Sum.pypp.cpp index 0ffaa99a8..a00524e1f 100644 --- a/wrapper/CAS/Sum.pypp.cpp +++ b/wrapper/CAS/Sum.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::Sum __copy__(const SireCAS::Sum &other){ return SireCAS::Sum(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Sum_class(){ { //::SireCAS::Sum @@ -56,6 +58,7 @@ void register_Sum_class(){ Sum_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return all of the child expressions in this Sum" ); } @@ -67,6 +70,7 @@ void register_Sum_class(){ Sum_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the conjugate of this sum" ); } @@ -79,6 +83,7 @@ void register_Sum_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this Sum with respect to symbol." ); } @@ -91,6 +96,7 @@ void register_Sum_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate the Sum for the values values. Any missing values are assumed to be\nequal to zero." ); } @@ -103,6 +109,7 @@ void register_Sum_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate the Sum for the values values. Any missing values are assumed to be\nequal to zero." ); } @@ -115,6 +122,7 @@ void register_Sum_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +134,7 @@ void register_Sum_class(){ Sum_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "Return all of the functions involved in this sum (and all expressions in this sum)" ); } @@ -137,6 +146,7 @@ void register_Sum_class(){ Sum_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for the Sum" ); } @@ -149,6 +159,7 @@ void register_Sum_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the integral of this Sum with respect to symbol. The integral of\na sum is the sum of the integrals" ); } @@ -160,6 +171,7 @@ void register_Sum_class(){ Sum_exposer.def( "isComplex" , isComplex_function_value + , bp::release_gil_policy() , "Return whether or not this function contains any complex parts" ); } @@ -171,6 +183,7 @@ void register_Sum_class(){ Sum_exposer.def( "isCompound" , isCompound_function_value + , bp::release_gil_policy() , "Return whether or not this is compound (needs brakets when printed)" ); } @@ -182,6 +195,7 @@ void register_Sum_class(){ Sum_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "Return whether or not this is constant" ); } @@ -194,6 +208,7 @@ void register_Sum_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Return whether or not this is a function of symbol" ); } @@ -206,6 +221,7 @@ void register_Sum_class(){ Sum_exposer.def( "reduce" , reduce_function_value + , bp::release_gil_policy() , "Reduce a Sum down to a simple form. This replaces the Sum with a single expression\nor a constant if this is no longer a Sum. It does not collapse together common\nfactors - use collapse() if you want to do this" ); } @@ -218,6 +234,7 @@ void register_Sum_class(){ "series" , series_function_value , ( bp::arg("symbol"), bp::arg("n") ) + , bp::release_gil_policy() , "Return a series expansion of this sum about symbol to order n" ); } @@ -242,6 +259,7 @@ void register_Sum_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Return an expression that is this expression with identities substituted in" ); } @@ -253,6 +271,7 @@ void register_Sum_class(){ Sum_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the symbols involved in this sum (and all expressions in this sum)" ); } @@ -264,6 +283,7 @@ void register_Sum_class(){ Sum_exposer.def( "toOpenMMString" , toOpenMMString_function_value + , bp::release_gil_policy() , "Return a string representation of the sum" ); } @@ -275,6 +295,7 @@ void register_Sum_class(){ Sum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the sum" ); } @@ -286,6 +307,7 @@ void register_Sum_class(){ Sum_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +319,7 @@ void register_Sum_class(){ Sum_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Symbol.pypp.cpp b/wrapper/CAS/Symbol.pypp.cpp index 3e3f5d181..8cea6a1ad 100644 --- a/wrapper/CAS/Symbol.pypp.cpp +++ b/wrapper/CAS/Symbol.pypp.cpp @@ -39,6 +39,8 @@ SireCAS::Symbol __copy__(const SireCAS::Symbol &other){ return SireCAS::Symbol(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Symbol_class(){ { //::SireCAS::Symbol @@ -56,6 +58,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "ID" , ID_function_value + , bp::release_gil_policy() , "Return the unique ID number of the symbol" ); } @@ -67,6 +70,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "There are no child expressions in a symbol" ); } @@ -79,6 +83,7 @@ void register_Symbol_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Differentiate this symbol with respect to sym. This returns 1.0 if this\nis sym, else it returns 0.0" ); } @@ -91,6 +96,7 @@ void register_Symbol_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this symbol - returns the value of the symbol in values if\nit is present, else it returns 0.0" ); } @@ -103,6 +109,7 @@ void register_Symbol_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this symbol - returns the value of the symbol in values if\nit is present, else it returns 0" ); } @@ -115,6 +122,7 @@ void register_Symbol_class(){ "expand" , expand_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +134,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "functions" , functions_function_value + , bp::release_gil_policy() , "This is not a function" ); } @@ -137,6 +146,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash a symbol" ); } @@ -149,6 +159,7 @@ void register_Symbol_class(){ "integrate" , integrate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Integrate this symbol with respect to sym. If sym == this, then\nreturn 0.5 sym^2, else return this sym" ); } @@ -160,6 +171,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "isConstant" , isConstant_function_value + , bp::release_gil_policy() , "A symbol is by definition not constant" ); } @@ -172,6 +184,7 @@ void register_Symbol_class(){ "isFunction" , isFunction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Is this a function of symbol" ); } @@ -183,6 +196,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not the symbol is null" ); } @@ -230,6 +244,7 @@ void register_Symbol_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Return the expression that matches this symbol in identities - or return\nan expression holding only this symbol if it does no exist in identities" ); } @@ -241,6 +256,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return this symbol" ); } @@ -252,6 +268,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this symbol" ); } @@ -263,6 +280,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -274,6 +292,7 @@ void register_Symbol_class(){ Symbol_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/SymbolComplex.pypp.cpp b/wrapper/CAS/SymbolComplex.pypp.cpp index b7bd6e9e4..928ebafdc 100644 --- a/wrapper/CAS/SymbolComplex.pypp.cpp +++ b/wrapper/CAS/SymbolComplex.pypp.cpp @@ -15,6 +15,8 @@ SireCAS::SymbolComplex __copy__(const SireCAS::SymbolComplex &other){ return Sir const char* pvt_get_name(const SireCAS::SymbolComplex&){ return "SireCAS::SymbolComplex";} +#include "Helpers/release_gil_policy.hpp" + void register_SymbolComplex_class(){ { //::SireCAS::SymbolComplex @@ -31,6 +33,7 @@ void register_SymbolComplex_class(){ SymbolComplex_exposer.def( "ID" , ID_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/SymbolExpression.pypp.cpp b/wrapper/CAS/SymbolExpression.pypp.cpp index 8961d56a4..ca0cf0404 100644 --- a/wrapper/CAS/SymbolExpression.pypp.cpp +++ b/wrapper/CAS/SymbolExpression.pypp.cpp @@ -22,6 +22,8 @@ SireCAS::SymbolExpression __copy__(const SireCAS::SymbolExpression &other){ retu const char* pvt_get_name(const SireCAS::SymbolExpression&){ return "SireCAS::SymbolExpression";} +#include "Helpers/release_gil_policy.hpp" + void register_SymbolExpression_class(){ { //::SireCAS::SymbolExpression @@ -48,7 +50,7 @@ void register_SymbolExpression_class(){ SymbolExpression_exposer.def( "function" , function_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol as a function - this is only safe\nif isFunction() returns true" ); } @@ -60,6 +62,7 @@ void register_SymbolExpression_class(){ SymbolExpression_exposer.def( "isFunction" , isFunction_function_value + , bp::release_gil_policy() , "Return whether or not this is a function" ); } @@ -71,7 +74,7 @@ void register_SymbolExpression_class(){ SymbolExpression_exposer.def( "symbol" , symbol_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol" ); } diff --git a/wrapper/CAS/SymbolValue.pypp.cpp b/wrapper/CAS/SymbolValue.pypp.cpp index 3bec961de..d2f39a75f 100644 --- a/wrapper/CAS/SymbolValue.pypp.cpp +++ b/wrapper/CAS/SymbolValue.pypp.cpp @@ -17,6 +17,8 @@ SireCAS::SymbolValue __copy__(const SireCAS::SymbolValue &other){ return SireCAS const char* pvt_get_name(const SireCAS::SymbolValue&){ return "SireCAS::SymbolValue";} +#include "Helpers/release_gil_policy.hpp" + void register_SymbolValue_class(){ { //::SireCAS::SymbolValue @@ -31,6 +33,7 @@ void register_SymbolValue_class(){ SymbolValue_exposer.def( "ID" , ID_function_value + , bp::release_gil_policy() , "" ); } @@ -42,6 +45,7 @@ void register_SymbolValue_class(){ SymbolValue_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Tan.pypp.cpp b/wrapper/CAS/Tan.pypp.cpp index b51e680c4..cef7c9ee4 100644 --- a/wrapper/CAS/Tan.pypp.cpp +++ b/wrapper/CAS/Tan.pypp.cpp @@ -27,6 +27,8 @@ SireCAS::Tan __copy__(const SireCAS::Tan &other){ return SireCAS::Tan(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Tan_class(){ { //::SireCAS::Tan @@ -44,6 +46,7 @@ void register_Tan_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -56,6 +59,7 @@ void register_Tan_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -68,6 +72,7 @@ void register_Tan_class(){ Tan_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_Tan_class(){ Tan_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Tanh.pypp.cpp b/wrapper/CAS/Tanh.pypp.cpp index a285a69ae..012b33359 100644 --- a/wrapper/CAS/Tanh.pypp.cpp +++ b/wrapper/CAS/Tanh.pypp.cpp @@ -29,6 +29,8 @@ SireCAS::Tanh __copy__(const SireCAS::Tanh &other){ return SireCAS::Tanh(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Tanh_class(){ { //::SireCAS::Tanh @@ -46,6 +48,7 @@ void register_Tanh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Evaluate this function" ); } @@ -58,6 +61,7 @@ void register_Tanh_class(){ "evaluate" , evaluate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Complex evaluation" ); } @@ -70,6 +74,7 @@ void register_Tanh_class(){ Tanh_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +86,7 @@ void register_Tanh_class(){ Tanh_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/Values.pypp.cpp b/wrapper/CAS/Values.pypp.cpp index 54027e488..3bfa6266f 100644 --- a/wrapper/CAS/Values.pypp.cpp +++ b/wrapper/CAS/Values.pypp.cpp @@ -23,6 +23,8 @@ SireCAS::Values __copy__(const SireCAS::Values &other){ return SireCAS::Values(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Values_class(){ @@ -53,6 +55,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -77,6 +81,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -89,6 +94,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -101,6 +107,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -113,6 +120,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -125,6 +133,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -137,6 +146,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6"), bp::arg("symval7") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -149,6 +159,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6"), bp::arg("symval7"), bp::arg("symval8") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -161,6 +172,7 @@ void register_Values_class(){ "add" , add_function_value , ( bp::arg("symval0"), bp::arg("symval1"), bp::arg("symval2"), bp::arg("symval3"), bp::arg("symval4"), bp::arg("symval5"), bp::arg("symval6"), bp::arg("symval7"), bp::arg("symval8"), bp::arg("symval9") ) + , bp::release_gil_policy() , "Add the passed values" ); } @@ -173,6 +185,7 @@ void register_Values_class(){ "contains" , contains_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -184,6 +197,7 @@ void register_Values_class(){ Values_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -195,6 +209,7 @@ void register_Values_class(){ Values_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -206,6 +221,7 @@ void register_Values_class(){ Values_exposer.def( "keys" , keys_function_value + , bp::release_gil_policy() , "Return a list of the symbols that are present in this set" ); } @@ -244,6 +260,7 @@ void register_Values_class(){ "remove" , remove_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Remove the value for the symbol symbol" ); } @@ -256,6 +273,7 @@ void register_Values_class(){ "remove" , remove_function_value , ( bp::arg("symbolid") ) + , bp::release_gil_policy() , "Remove the value for the symbol with ID symbolid" ); } @@ -268,6 +286,7 @@ void register_Values_class(){ "reserve" , reserve_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "" ); } @@ -280,6 +299,7 @@ void register_Values_class(){ "set" , set_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -292,6 +312,7 @@ void register_Values_class(){ "set" , set_function_value , ( bp::arg("it") ) + , bp::release_gil_policy() , "Set the value of the symbolvalue pair pointed to by the\niterator it in this set" ); } @@ -303,6 +324,7 @@ void register_Values_class(){ Values_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return a list of the symbols that are present in this set" ); } @@ -314,6 +336,7 @@ void register_Values_class(){ Values_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of these values" ); } @@ -325,6 +348,7 @@ void register_Values_class(){ Values_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +361,7 @@ void register_Values_class(){ "value" , value_function_value , ( bp::arg("sym") ) + , bp::release_gil_policy() , "Return the value of the Symbol with ID id, or 0.0 if there is no such symbol" ); } @@ -360,6 +385,7 @@ void register_Values_class(){ Values_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/CAS/_CAS_free_functions.pypp.cpp b/wrapper/CAS/_CAS_free_functions.pypp.cpp index c3a8bab0d..52958cd84 100644 --- a/wrapper/CAS/_CAS_free_functions.pypp.cpp +++ b/wrapper/CAS/_CAS_free_functions.pypp.cpp @@ -79,6 +79,26 @@ namespace bp = boost::python; #include "expression.h" +#include "SireCAS/errors.h" + +#include "SireStream/datastream.h" + +#include "complexvalues.h" + +#include "exbase.h" + +#include "expression.h" + +#include "expressionbase.h" + +#include "functions.h" + +#include "identities.h" + +#include "values.h" + +#include "exbase.h" + #include "SireMaths/complex.h" #include "SireMaths/maths.h" @@ -731,26 +751,6 @@ namespace bp = boost::python; #include "expression.h" -#include "SireCAS/errors.h" - -#include "SireStream/datastream.h" - -#include "complexvalues.h" - -#include "exbase.h" - -#include "expression.h" - -#include "expressionbase.h" - -#include "functions.h" - -#include "identities.h" - -#include "values.h" - -#include "exbase.h" - #include "SireMaths/complex.h" #include "SireMaths/maths.h" diff --git a/wrapper/CAS/__init__.py b/wrapper/CAS/__init__.py index 1deba85be..f0d0e3fcb 100644 --- a/wrapper/CAS/__init__.py +++ b/wrapper/CAS/__init__.py @@ -1,27 +1,160 @@ -############################# -## -## The SireCAS library. -## -## This module provides a basic CAS (computer algebra system) -## This can be used to provide user-defined functions which -## can be used to calculate energies and forces, or just -## for your own amusement :-) -## - -import Sire.Maths +""" +.. currentmodule:: sire.legacy.CAS + +This module provides a basic CAS (computer algebra system) +This can be used to provide user-defined functions which +can be used to calculate energies and forces. + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + Abs + AlwaysFalse + AlwaysTrue + ArcCos + ArcCot + ArcCoth + ArcCsc + ArcCsch + ArcSec + ArcSech + ArcSin + ArcSinh + ArcTan + ArcTanh + ComplexPower + ComplexValues + Condition + Conditional + Constant + Cos + Cosh + Cot + Coth + Csc + Csch + DoubleFunc + EqualTo + Exp + Expression + Factor + GreaterOrEqualThan + GreaterThan + I + Identities + IntegerPower + IntegrationConstant + LessOrEqualThan + LessThan + Ln + Max + Min + NotEqualTo + Power + PowerConstant + PowerFunction + Product + RationalPower + RealPower + Sec + Sech + Sin + Sinh + Sum + Symbol + SymbolComplex + SymbolExpression + SymbolValue + Tan + Tanh + Values + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + cbrt + pow + sqrt + +""" + +from .. import Maths # Import all of the Qt classes -import Sire.Qt -import Sire.Base +from .. import Qt as _Qt +from .. import Base as _Base # Import all of the classes and functions from the C++ library -from Sire.CAS._CAS import * +from ._CAS import * # Now define some pure Python functions and classes that are part of # this library... -wrap = Sire.Base._add_wrap_function(wrap) +wrap = _Base._add_wrap_function(wrap) #enable ** operator for exbase types ExBase.__pow__ = pow Expression.__pow__ = pow + + +# Define some oft-used Symbols, so that they can be +# accessed as sire.cas.x, or "from sire.cas import r, theta, lam" +x = Symbol("x") +y = Symbol("y") +z = Symbol("z") +r = Symbol("r") +theta = Symbol("theta") +phi = Symbol("phi") +lam = Symbol("lambda") + +from typing import List as _List +from typing import Union as _Union + + +def create_symbols(symbols: _Union[str,_List[str]], *args) -> _List[Symbol]: + """Create symbols for each of the passed strings + + Args: + symbols (str or list[str]): + The list of symbols to create. This can be passed in + as a single string, list, or several arguments. + + Returns: + Symbol or list(Symbol): + The list of created symbols, or a single Symbol if only + a single name is passed. + + Examples: + >>> (x, y, z) = create_symbols(["x", "y", "z"]) + + >>> (x, y, z) = create_symbols("x", "y", "z") + + >>> (r, theta, phi) = create_symbols("r", "theta", "phi") + + >>> lam = create_symbol("lam") + """ + + if type(symbols) is not list: + s = [symbols] + else: + import copy + s = copy.copy(symbols) + + for arg in args: + s.append(arg) + + symbols = [] + + for symbol in s: + symbols.append(Symbol(str(symbol))) + + if len(symbols) == 1: + return symbols[0] + else: + return symbols diff --git a/wrapper/CMakeLists.txt b/wrapper/CMakeLists.txt index 2647712d2..03bb866da 100644 --- a/wrapper/CMakeLists.txt +++ b/wrapper/CMakeLists.txt @@ -3,49 +3,30 @@ # CMake Project file for Sire #  Python 3 wrappers # -# (C) Christopher Woods -# ################################ -# project version -set (SIRE_VERSION_MAJOR "2022") -set (SIRE_VERSION_MINOR "2") -set (SIRE_VERSION_PATCH "0") +# require cmake >= 3.3.0 (released in 2018) +cmake_minimum_required(VERSION 3.3.0 FATAL_ERROR) +cmake_policy(VERSION 3.3) + +# Read the version number (so we can set it once in one place) +file (STRINGS "../version.txt" SIRE_VERSION) + +string(REGEX MATCH "([0-9]*).([0-9]*).([0-9]*)" _ ${SIRE_VERSION}) -set (SIRE_VERSION "${SIRE_VERSION_MAJOR}.${SIRE_VERSION_MINOR}.${SIRE_VERSION_PATCH}") +set (S_VERSION_MAJOR ${CMAKE_MATCH_1}) +set (S_VERSION_MINOR ${CMAKE_MATCH_2}) +set (S_VERSION_PATCH ${CMAKE_MATCH_3}) + +message( STATUS "Building Sire Wrappers ${SIRE_VERSION}") ############ ############ SETTING INITIAL SIRE VARIABLES ############ -# require cmake >= 2.8.11.2 -cmake_minimum_required(VERSION 3.3.0 FATAL_ERROR) -cmake_policy(VERSION 2.8) - # use loose loop syntax in CMakeLists files set( CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE ) -if(COMMAND CMAKE_POLICY) - if (POLICY CMP0025) - cmake_policy(SET CMP0025 NEW) # Anaconda clang is called Clang, not AppleClang - endif() - if (POLICY CMP0042) - cmake_policy(SET CMP0042 OLD) # managing OS X @rpath manually - endif() - if (POLICY CMP0048) - cmake_policy(SET CMP0048 OLD) # want to manage versions myself! - endif() - if (POLICY CMP0028) - cmake_policy(SET CMP0028 OLD) # Qt has colons in names, which new cmake hates - endif() - if (POLICY CMP0045) - cmake_policy(SET CMP0045 OLD) # Allow non-existant targets with -NOTFOUND - endif() - if (POLICY CMP0020) - cmake_policy(SET CMP0020 NEW) # Automatically link to qtmain on windows - endif() -endif() - # Get rid of install messages (too verbose!) set( CMAKE_INSTALL_MESSAGE "NEVER" ) @@ -68,90 +49,82 @@ if (NCORES EQUAL 0) endif() message(STATUS "Configuring on a machine with number of cores = ${NCORES}") -# Option to compile and install into an anaconda or miniconda directory -option( ANACONDA_BUILD "Build into an existing anaconda/miniconda installation" OFF ) - -if ( ANACONDA_BUILD ) - message( STATUS "Building into an existing Anaconda/Miniconda installation..." ) - # Where is anaconda installed - set( ANACONDA_BASE "$ENV{HOME}/miniconda3" CACHE PATH - "Install directory for Anaconda/Miniconda (python3)" ) - - # Make sure that there is a python3 executable in the bin directory - if ( NOT EXISTS "${ANACONDA_BASE}/bin/python3" AND - NOT EXISTS "${ANACONDA_BASE}/python.exe" AND - NOT EXISTS "${PYTHON_EXECUTABLE}" ) - message( FATAL_ERROR "Cannot find ${ANACONDA_BASE}/bin/python3, ${ANACONDA_BASE}/python.exe " - "or ${PYTHON_EXECUTABLE}." - "Please set the full path to the Anaconda or Miniconda " - "installation directory." ) - endif() +message( STATUS "Building into an existing conda installation..." ) - set( SIRE_APP "${ANACONDA_BASE}/pkgs/sire-${SIRE_VERSION}" CACHE PATH - "Install directory for Sire within the Anaconda/Miniconda distribution" ) -#elseif( WIN32 OR WIN64 ) -# # This should be MSYS2/MINGW64, so use the location of cmake to find the location -# # of the Sire installation -# message(STATUS "Compiling on windows using MSYS2/MINGW64...") -# set( MINGW_BASE "C:/msys64/mingw64" CACHE PATH "MSYS MINGW64 root directory" ) -# get_filename_component(MINGW_CMAKE_BIN ${CMAKE_COMMAND} DIRECTORY) -# get_filename_component(MINGW_CMAKE_ROOT ${MINGW_CMAKE_BIN} DIRECTORY) -# message(STATUS "Using cmake ${CMAKE_COMMAND} from MING64 base ${MINGW_CMAKE_ROOT}") -# -# set( MINGW_BASE "${MINGW_CMAKE_ROOT}") -# set( SIRE_APP "${MINGW_BASE}" ) +# Where is anaconda installed +set( ANACONDA_BASE "$ENV{HOME}/miniconda3" CACHE PATH + "Install directory for conda (python3)" ) -else() - #�Option to set the install directory of Sire - if (NOT DEFINED SIRE_APP) - set( SIRE_APP "$ENV{HOME}/sire.app" CACHE PATH - "The full path to the sire.app installed Sire application." ) - endif() +# Make sure that there is a python3 executable in the bin directory +if ( NOT EXISTS "${ANACONDA_BASE}/bin/python3" AND + NOT EXISTS "${ANACONDA_BASE}/python.exe" AND + NOT EXISTS "${PYTHON_EXECUTABLE}" ) + message( FATAL_ERROR "Cannot find ${ANACONDA_BASE}/bin/python3, ${ANACONDA_BASE}/python.exe " + "or ${PYTHON_EXECUTABLE}." + "Please set the full path to the Anaconda or Miniconda " + "installation directory." ) endif() +set( SIRE_APP "${ANACONDA_BASE}/pkgs/sire-${SIRE_VERSION}" CACHE PATH + "Install directory for Sire within the conda distribution" ) + message( STATUS "Using SIRE_APP = ${SIRE_APP}" ) set( SIRE_INCLUDE_DIR "${SIRE_APP}/include/Sire" ) +set( CONDA_INCLUDE_DIR "${ANACONDA_BASE}/include" ) +message( STATUS "Using CONDA_INCLUDE_DIR = ${CONDA_INCLUDE_DIR}" ) + set ( SIRE_COMP_CMAKE "${SIRE_INCLUDE_DIR}/cmake/SireCompileVariables.cmake" ) # Look for the "SireCompileVariables.cmake" file in the install directory if (EXISTS "${SIRE_COMP_CMAKE}") include( "${SIRE_COMP_CMAKE}" ) else() - if (ANACONDA_BUILD) - message( FATAL_ERROR "You don't appear to have built corelib into this" - "Anaconda/Miniconda directory. Please build corelib first." - "(there should be a file called ${SIRE_COMP_CMAKE})" ) - else() - message( STATUS "You need to provide the full path to sire.app and check that it contains the file ${SIRE_COMP_CMAKE}" ) - message( FATAL_ERROR "Do this by running 'cmake -DSIRE_APP=/path/to/sire.app /path/to/python/source'" ) - endif() + message( FATAL_ERROR "You don't appear to have built corelib into this " + "conda directory. Please build corelib first." + "(there should be a file called ${SIRE_COMP_CMAKE})" ) endif() -if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) - set (SLASH_HYPHEN "/") -else() - set (SLASH_HYPHEN "-") -endif() - -# Now set the C++, C and Fortran compilers to be used to compile the wrappers +# Now set the C++ and C compilers to be used to compile the wrappers # These have to be the same as used to compile corelib set(CMAKE_C_COMPILER "${SIRE_C_COMPILER}") set(CMAKE_CXX_COMPILER "${SIRE_CXX_COMPILER}") message( STATUS "Setting C compiler to ${SIRE_C_COMPILER} and C++ compiler to ${SIRE_CXX_COMPILER}" ) +if ("$ENV{CONDA_BUILD}" STREQUAL "1") + message( STATUS "Compiling as part of a conda-build") +else() + # conda can set incorrect CXX flags (i.e. -mtune=haswell on MacOS M1!) + # If is safer to completely unset these flags, except for on a conda build + unset(ENV{CXXFLAGS}) + unset(ENV{DEBUG_CXXFLAGS}) + unset(ENV{CFLAGS}) + unset(ENV{DEBUG_CFLAGS}) +endif() + # name the project project (SirePython CXX C) -message( STATUS "PROJECT COMPLETED" ) +# make sure that libraries are not found in any system directories +# This is because everything will be linked to from the conda directory +set (CMAKE_IGNORE_PATH) +foreach (_prefix, /usr /opt /usr/local /usr/local/Frameworks ) + list(APPEND CMAKE_IGNORE_PATH ${_prefix}/include ${_prefix}/lib ${_prefix}/lib64) +endforeach() + +# Absolutely can't run cmake in the source directory! +if ( CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR ) + message( FATAL_ERROR "You must run CMake in a different directory to the source!" ) +endif ( CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR ) set(CMAKE_INSTALL_PREFIX "${SIRE_INSTALL_PREFIX}" CACHE INTERNAL "Prefix prepended to install directories" FORCE ) message( STATUS "Sire will be compiled and installed to directory ${CMAKE_INSTALL_PREFIX}" ) +# We will be managing RPATH ourselves set( CMAKE_SKIP_RPATH FALSE ) set (CMAKE_SKIP_BUILD_RPATH FALSE) @@ -163,20 +136,15 @@ if (APPLE) # Add the two passed directories to the @rpaths to search for libraries. @executable_path # is the directory containing the executable, so the libraries are included in - # @exeutable_path/../${SIRE_LIBS} and @exeutable_path/../${SIRE_BUNDLED_LIBS} - set (SIRE_INSTALL_RPATH "@executable_path/../${SIRE_LIBS}:@executable_path/../${SIRE_BUNDLED_LIBS}") + # @exeutable_path/../${SIRE_LIBS} + set (SIRE_INSTALL_RPATH "@executable_path/../${SIRE_LIBS}") else() - set (SIRE_INSTALL_RPATH "\$ORIGIN/../${SIRE_LIBS}:\$ORIGIN/../${SIRE_BUNDLED_LIBS}:\$ORIGIN/../../../../../${SIRE_LIBS}:\$ORIGIN/../../../../../${SIRE_BUNDLED_LIBS}") + set (SIRE_INSTALL_RPATH "\$ORIGIN/../${SIRE_LIBS}:\$ORIGIN/../../../../../${SIRE_LIBS}") endif() set (CMAKE_INSTALL_RPATH "${SIRE_INSTALL_RPATH}") set (CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) -# Absolutely can't run cmake in the source directory! -if ( CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR ) - message( FATAL_ERROR "You must run CMake in a different directory to the source!" ) -endif ( CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR ) - # Path to the project's extra cmake files set (CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/build/cmake) @@ -192,14 +160,13 @@ message( STATUS "Sire root = ${SIRE_INSTALL_PREFIX}" ) message( STATUS "Header files in ${SIRE_INCLUDE_DIR}" ) message( STATUS "Libraries in ${SIRE_INSTALL_PREFIX}/${SIRE_LIBS}" ) -set ( SIRE_STRIP_COMMAND "${CMAKE_STRIP} ${SIRE_STRIP_OPTIONS}" ) - configure_file( "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/cmake_strip.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_strip" IMMEDIATE @ONLY) set ( CMAKE_STRIP "${CMAKE_CURRENT_BINARY_DIR}/cmake_strip" ) +set ( SIRE_STRIP_COMMAND "${CMAKE_STRIP} ${SIRE_STRIP_OPTIONS}" ) # Make sure that we are using the same compiler as that used to compile Sire option (SIRE_CHECK_COMPILER "Turn off to skip the compiler check" ON) @@ -251,23 +218,69 @@ endif() include_directories (BEFORE ${SIRE_INCLUDE_DIR}) include_directories (BEFORE ${CMAKE_CURRENT_SOURCE_DIR}) include_directories (BEFORE ${CMAKE_CURRENT_BINARY_DIR}) -set (TBB_INCLUDE_DIR "/usr/include/tbb") + if (TBB_INCLUDE_DIR) include_directories (${TBB_INCLUDE_DIR}) message( STATUS "Using TBB from ${TBB_INCLUDE_DIR}") endif() + if (SIRE_GSL_INCLUDE_PATH) include_directories (${SIRE_GSL_INCLUDE_PATH}) endif() -if (DEFINED SIRE_APP) - # For some reason, when using the conda GNU compilers, CMake stripped - # "${SIRE_APP}/include" from the directories searched for header files - # If this happens, uncomment the following line - # unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES) - include_directories( "${SIRE_APP}/include" "${SIRE_APP}/Library/include" ) + +if(CMAKE_GENERATOR MATCHES "Visual Studio") # MSBuild + # Everything we need to do on Windows to allow the wrappers to + # build using Visual Studio + + # Thanks to this project who have a solution to the tbb12 link + # issue on Windows + # https://fossies.org/linux/opencv/cmake/OpenCVFindLAPACK.cmake + + # We may have tbb.lib for 'tbb' target, but not 'tbb12.lib' + message(STATUS "Adding tbb12 to ignore list") + set(SIRE_IGNORE_DEFAULTLIB_TBB "tbb12.lib") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:${SIRE_IGNORE_DEFAULTLIB_TBB}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:${SIRE_IGNORE_DEFAULTLIB_TBB}") + + message(STATUS "Turning on bigobj") # needed to link _Mol.pyd + add_compile_options("/bigobj") endif() -# MUST build shared libraries +# Conda can mess up our include paths. This makes sure that every +# directory is included directly, including testing that the +# CONDA include directory is working +include_directories( "${SIRE_APP}/include" "${SIRE_APP}/Library/include" ) +include_directories(BEFORE ${CONDA_INCLUDE_DIR}) + +message(STATUS "Checking if conda/include is a hidden include...") +include(CheckCXXSourceRuns) +get_property(CMAKE_REQUIRED_INCLUDES DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES) +message(STATUS "${CMAKE_REQUIRED_INCLUDES}") + check_cxx_source_runs(" + + #include \"tbb/tbb.h\" + + int main() + { + return 0; + }" IS_CONDA_INCLUDE_WORKING) + +if (IS_CONDA_INCLUDE_WORKING) + message(STATUS "-Iconda/include is used correctly.") + + if (APPLE) + message(STATUS "...but, MacOS still causes issues where conda/include is removed.") + message(STATUS "Unsetting CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES so that conda/include is not hidden.") + unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES) + endif() + +else() + # Things don't work, so we need to switch off implicit include directories + unset(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES) + message(STATUS "Unsetting CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES so that conda/include is not hidden.") +endif() + +# The wrappers MUST be built as shared libraries set (BUILD_SHARED_LIBS ON) # Uncomment for more verbose compiling/linking @@ -279,6 +292,8 @@ message( STATUS "Compiling the python wrappers using a SMALL build." ) set( CMAKE_C_FLAGS ${SIRE_C_FLAGS_SMALL} ) set( CMAKE_CXX_FLAGS ${SIRE_CXX_FLAGS_SMALL} ) +message( STATUS "SMALL: ${SIRE_CXX_FLAGS_SMALL}") + if (SIRE_HAS_CPP_LIB) message(STATUS "Using libc++ in place of libstdc++") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++") @@ -308,93 +323,26 @@ else() endif() endif() -if (APPLE) - # Also need to add '-undefined dynamic_lookup' so that we can build - # modules that can be imported by a python that has statically linked libPython - set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup" ) -endif() - -message( STATUS "CMAKE_SYSTEM_NAME == ${CMAKE_SYSTEM_NAME}" ) -message( STATUS "CMAKE_C_COMPILER == ${CMAKE_C_COMPILER}" ) -message( STATUS "CMAKE_CXX_COMPILER == ${CMAKE_CXX_COMPILER}" ) -message( STATUS "C compiler flags == ${CMAKE_C_FLAGS}" ) -message( STATUS "C++ compiler flags == ${CMAKE_CXX_FLAGS}" ) -message( STATUS "Shared library flags == ${CMAKE_SHARED_LINKER_FLAGS}" ) -message( STATUS "Static library flags == ${CMAKE_STATIC_LINKER_FLAGS}" ) -message( STATUS "Executable link flags == ${CMAKE_EXE_LINKER_FLAGS}" ) - -# Option to disable all bundles -option( SIRE_PYTHON_ENABLE_BUNDLING "Allow Sire Python to use bundled libraries and python interpreter" ON ) - -# Fine-grain control of bundling each dependency -option( SIRE_BUNDLE_PYTHON "Whether Sire should use its bundled copy of Python 3" ON ) -option( SIRE_BUNDLE_BOOST_PYTHON "Whether Sire should use its bundled copy of boost::python" ON ) - -if ( SIRE_PYTHON_ENABLE_BUNDLING ) - if (MSYS) - message( STATUS "Building a bundled msys Sire (using msys python)" ) - else() - message( STATUS "Sire Python will be compiled to use its own copy of bundled libraries." ) - endif() - - set( BUNDLE_BUILDDIR "${CMAKE_BINARY_DIR}/build_bundled" ) - - # We want to install the bundled libs directly into the sire.app directory - set( BUNDLE_STAGEDIR "${SIRE_APP}/${SIRE_BUNDLED_DIR}" ) - - if (NOT EXISTS "${BUNDLE_BUILDDIR}") - file(MAKE_DIRECTORY ${BUNDLE_BUILDDIR}) - endif() - - if (NOT EXISTS "${BUNDLE_STAGEDIR}") - file(MAKE_DIRECTORY ${BUNDLE_STAGEDIR}) - endif() - - if (NOT EXISTS "${BUNDLE_STAGEDIR}/lib") - file(MAKE_DIRECTORY ${BUNDLE_STAGEDIR}/lib) - endif() - - if (NOT EXISTS "${BUNDLE_STAGEDIR}/include") - file(MAKE_DIRECTORY ${BUNDLE_STAGEDIR}/include) - endif() - - if ( SIRE_BUNDLE_PYTHON ) - include( "bundled/install_python.cmake" ) - endif() - - if (NOT SIRE_FOUND_PYTHON) - # Need to find python before we compile the boost python wrappers - find_package( PythonLibs 3.2 REQUIRED ) - endif() - - if ( SIRE_BUNDLE_BOOST_PYTHON ) - include( "bundled/install_boost_python.cmake" ) - endif() +# Now lets find Python... +set(Python3_ROOT_DIR "${ANACONDA_BASE}") +set(Python3_FIND_STRATEGY "LOCATION") +set(Python3_USE_STATIC_LIBS False) - if ( NOT ${BUNDLE_STAGEDIR} STREQUAL ${CMAKE_INSTALL_PREFIX} ) - # All of the bundled objects are built into the directory ${CMAKE_BINARY_DIR}/bundled - # This directory must be installed into the sire.app/ directory - install( DIRECTORY ${BUNDLE_STAGEDIR} - DESTINATION ${CMAKE_INSTALL_PREFIX} - USE_SOURCE_PERMISSIONS ) - endif() -endif() +find_package( Python3 COMPONENTS Interpreter Development REQUIRED ) -if (NOT ${SIRE_FOUND_PYTHON}) - find_package( PythonLibs 3.2 REQUIRED ) -endif() +set( PYTHON_LIBRARY "${Python3_LIBRARIES}") # need this on MacOS +set( PYTHON_LIBRARIES "${Python3_LIBRARIES}") +set( PYTHON_SITE_DIR "${Python3_SITELIB}") +set( PYTHON_VERSION "${Python3_VERSION}") +set( PYTHON_INCLUDE_DIR "${Python3_INCLUDE_DIRS}") -if (NOT PYTHON_MODULE_EXTENSION) - if (WIN32) - set( PYTHON_MODULE_EXTENSION ".pyd" ) - else() - set( PYTHON_MODULE_EXTENSION ".so" ) - endif() +if (WIN32) + set( PYTHON_MODULE_EXTENSION ".pyd" ) +else() + set( PYTHON_MODULE_EXTENSION ".so" ) endif() -if (NOT PYTHON_LIBRARIES) - set( PYTHON_LIBRARIES "${PYTHON_LIBRARY}" ) -endif() +message( STATUS "Python paths ${PYTHON_LIBRARIES} | ${PYTHON_INCLUDE_DIR} | ${PYTHON_SITE_DIR} | ${PYTHON_MODULE_EXTENSION}" ) # Don't link against libPython on macOS! Since the conda-forge Python interpreter # statically links libPython you'll end up with duplicate symbols. @@ -402,49 +350,81 @@ if (APPLE) set( PYTHON_LIBRARIES "" ) endif() -if (NOT ${SIRE_FOUND_BOOST_PYTHON}) - # Sire depends on >= boost 1.31 - all libraries must be dynamically linked - # (else we could end up with multiple boost::python libraries linked, which - #  causes problems for RTTI and exceptions) - set (BOOST_ALL_DYN_LINK "YES") - find_package( Boost 1.31 COMPONENTS python REQUIRED ) - set ( BOOST_PYTHON_LIBRARY "${Boost_PYTHON_LIBRARY}" ) - set ( BOOST_PYTHON_HEADERS "${Boost_INCLUDE_DIR}" ) +if (APPLE) + # Also on MacOS need to add '-undefined dynamic_lookup' so that we can build + # modules that can be imported by a python that has statically linked libPython + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -undefined dynamic_lookup" ) + + # Need to remove anything other than `-O1` or `-Oz` from Python < 3.9 + # X86 builds on MacOS as these causes crashes with boost_python + if ((Python3_VERSION_MINOR LESS 9) AND NOT (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")) + message( STATUS "Disabling '-O3' : ${CMAKE_SYSTEM_PROCESSOR}") + string( REPLACE "-O2" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ) + string( REPLACE "-O2" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ) + string( REPLACE "-O3" "" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ) + string( REPLACE "-O3" "" CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ) + string( REPLACE "-Os" "-Oz" CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} ) + string( REPLACE "-Os" "-Oz" CMAKE_C_FLAGS ${CMAKE_C_FLAGS} ) + endif() + endif() -set (PYTHON_LIBRARIES "/usr/lib/x86_64-linux-gnu/libpython3.8.so") -set (PYTHON_INCLUDE_DIR "/usr/include/python3.8") -set (BOOST_PYTHON_LIBRARY "/usr/local/lib/libboost_python38.so") -set (BOOST_PYTHON_HEADERS "/usr/local/include/boost") +message( STATUS "CMAKE_SYSTEM_NAME == ${CMAKE_SYSTEM_NAME}" ) +message( STATUS "CMAKE_SYSTEM_PROCESSOR == ${CMAKE_SYSTEM_PROCESSOR}") +message( STATUS "CMAKE_C_COMPILER == ${CMAKE_C_COMPILER}" ) +message( STATUS "CMAKE_CXX_COMPILER == ${CMAKE_CXX_COMPILER}" ) +message( STATUS "C compiler flags == ${CMAKE_C_FLAGS}" ) +message( STATUS "C++ compiler flags == ${CMAKE_CXX_FLAGS}" ) +message( STATUS "Shared library flags == ${CMAKE_SHARED_LINKER_FLAGS}" ) +message( STATUS "Static library flags == ${CMAKE_STATIC_LINKER_FLAGS}" ) +message( STATUS "Executable link flags == ${CMAKE_EXE_LINKER_FLAGS}" ) + +# All boost python libraries must be dynamically linked +# (else we could end up with multiple boost::python libraries linked, which +#  causes problems for RTTI, implicit converters and exceptions) +set (Boost_USE_STATIC_LIBS OFF) +set (Boost_USE_STATIC_RUNTIME OFF) +set (Boost_DEBUG ON) # this gives a nice print out in the cmake list to debug how boost is found and linked +find_package( Boost 1.7 COMPONENTS python REQUIRED ) -message( STATUS "Python paths ${PYTHON_LIBRARIES} | ${PYTHON_INCLUDE_DIR} | ${PYTHON_SITE_DIR}" ) include_directories( ${PYTHON_INCLUDE_DIR} ) -include_directories( "${BOOST_PYTHON_HEADERS}" ) -message( STATUS "boost::python library ${BOOST_PYTHON_LIBRARY} | ${BOOST_PYTHON_HEADERS}" ) +message( STATUS "boost::python library ${Boost_LIBRARIES}" ) # set the location to install the python modules set (SIRE_PYTHON "${PYTHON_SITE_DIR}") -# Use the same Qt library as was used to build corelib -if (DEFINED Qt5Core_DIR) - message( STATUS "Looking for Qt5Core in directory ${Qt5Core_DIR}" ) - find_package( Qt5Core ) -endif() +# Use the same Qt library as was used to build corelib - this can get +# unset a lot, hence why we keep checking it and updating + +# look for Qt5 in the system - this should be found from conda +find_package( Qt5Core REQUIRED ) + get_target_property(QT5_LOCATION Qt5::Core LOCATION) +get_filename_component(SIRE_QT5CORE_DIR ${QT5_LOCATION} PATH) + if (QT5_LOCATION MATCHES NOTFOUND) message( STATUS "Looking for Qt5Core in directory ${SIRE_QT5CORE_DIR}" ) set( Qt5Core_DIR "${SIRE_QT5CORE_DIR}/cmake/Qt5Core" ) find_package( Qt5Core REQUIRED ) endif() + get_target_property(QT5_LOCATION Qt5::Core LOCATION) message( STATUS "Using Qt5Core in ${QT5_LOCATION}" ) if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" ) - add_compile_options("/EHsc") - add_compile_options("/permissive-") + message( STATUS "Adding useful MSVC compiler options" ) + add_compile_options("/EHsc") # exceptions are only thrown from C++ throw calls + add_compile_options("/permissive-") # disable MSVC's permissive mode - ensures code is standards conforming endif() +if (NOT DEFINED ${SIRE_VERSION}) + message( STATUS "Strange, SIRE_VERSION has been unset. Resetting it.") + set (SIRE_VERSION "${S_VERSION_MAJOR}.${S_VERSION_MINOR}.${S_VERSION_PATCH}") +endif() + +message( STATUS "SIRE VERSION IS ${SIRE_VERSION}") + # Add the helper library add_subdirectory (Helpers) @@ -462,19 +442,23 @@ add_subdirectory (Maths) add_subdirectory (MM) add_subdirectory (Mol) add_subdirectory (Move) +add_subdirectory (Search) add_subdirectory (Stream) add_subdirectory (Squire) add_subdirectory (System) add_subdirectory (Units) add_subdirectory (Vol) -#also compile Sire's python executable +# also compile Sire's python executable add_subdirectory (python) +# and some additional tools used for e.g. waterswap or nautillus add_subdirectory (Tools) +# Need to install the dunder for Sire. All C++ wrappers are +# now placed into the sire/legacy folder. install( FILES __init__.py - DESTINATION ${SIRE_PYTHON}/Sire + DESTINATION ${SIRE_PYTHON}/sire/legacy ) # Finally, write the version header file and finish off the component dependencies file diff --git a/wrapper/Cluster/AbortPacket.pypp.cpp b/wrapper/Cluster/AbortPacket.pypp.cpp index 65e090b7f..9e446d8b8 100644 --- a/wrapper/Cluster/AbortPacket.pypp.cpp +++ b/wrapper/Cluster/AbortPacket.pypp.cpp @@ -27,6 +27,8 @@ SireCluster::AbortPacket __copy__(const SireCluster::AbortPacket &other){ return const char* pvt_get_name(const SireCluster::AbortPacket&){ return "SireCluster::AbortPacket";} +#include "Helpers/release_gil_policy.hpp" + void register_AbortPacket_class(){ { //::SireCluster::AbortPacket @@ -42,6 +44,7 @@ void register_AbortPacket_class(){ AbortPacket_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the work has finished" ); } @@ -66,6 +69,7 @@ void register_AbortPacket_class(){ AbortPacket_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_AbortPacket_class(){ AbortPacket_exposer.def( "wasAborted" , wasAborted_function_value + , bp::release_gil_policy() , "Return whether or not this was aborted (it obviously was)" ); } @@ -88,6 +93,7 @@ void register_AbortPacket_class(){ AbortPacket_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Cluster/CMakeAutogenFile.txt b/wrapper/Cluster/CMakeAutogenFile.txt index a7aff5cc8..7c6dcdda3 100644 --- a/wrapper/Cluster/CMakeAutogenFile.txt +++ b/wrapper/Cluster/CMakeAutogenFile.txt @@ -1,15 +1,15 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - WorkTest.pypp.cpp - Nodes.pypp.cpp + AbortPacket.pypp.cpp Cluster.pypp.cpp - Promise.pypp.cpp + ErrorPacket.pypp.cpp Node.pypp.cpp - WorkPacketBase.pypp.cpp - AbortPacket.pypp.cpp + Nodes.pypp.cpp + Promise.pypp.cpp ThisThread.pypp.cpp - ErrorPacket.pypp.cpp WorkPacket.pypp.cpp + WorkPacketBase.pypp.cpp + WorkTest.pypp.cpp SireCluster_containers.cpp SireCluster_registrars.cpp ) diff --git a/wrapper/Cluster/CMakeLists.txt b/wrapper/Cluster/CMakeLists.txt index e9e3824b4..adf385138 100644 --- a/wrapper/Cluster/CMakeLists.txt +++ b/wrapper/Cluster/CMakeLists.txt @@ -43,18 +43,18 @@ set_target_properties (Cluster PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Cluster SirePython SIRE_SireCluster - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Cluster" "_init_Cluster" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Cluster ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Cluster ) install( TARGETS Cluster LIBRARY DESTINATION ${INSTALLDIR} @@ -63,6 +63,6 @@ install( TARGETS Cluster ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Cluster/Cluster.pypp.cpp b/wrapper/Cluster/Cluster.pypp.cpp index d497ca69c..c5ec12e1a 100644 --- a/wrapper/Cluster/Cluster.pypp.cpp +++ b/wrapper/Cluster/Cluster.pypp.cpp @@ -35,6 +35,8 @@ SireCluster::Cluster __copy__(const SireCluster::Cluster &other){ return SireClu const char* pvt_get_name(const SireCluster::Cluster&){ return "SireCluster::Cluster";} +#include "Helpers/release_gil_policy.hpp" + void register_Cluster_class(){ { //::SireCluster::Cluster @@ -49,6 +51,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "UIDs" , UIDs_function_value + , bp::release_gil_policy() , "Return the list of all of the UIDs of all of the nodes\nin this entire cluster" ); } @@ -60,6 +63,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "getAllNodes" , getAllNodes_function_value + , bp::release_gil_policy() , "Try to get hold of all of the nodes that are available on this\ncluster" ); } @@ -72,6 +76,7 @@ void register_Cluster_class(){ "getAllNodes" , getAllNodes_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Try to get hold of all of the nodes that are available on this\ncluster (within the specified timeout)" ); } @@ -83,6 +88,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "getCount" , getCount_function_value + , bp::release_gil_policy() , "Return the number of processes - this is either the\nsize of the MPI group, or it is 1" ); } @@ -94,6 +100,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "getNode" , getNode_function_value + , bp::release_gil_policy() , "Return a Nodes object that contains just a single node.\nThis doesnt block - it just grabs the first available\nnode, and if there are none available then it returns\nimmediately, returning an empty Nodes object" ); } @@ -106,6 +113,7 @@ void register_Cluster_class(){ "getNode" , getNode_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Return a Nodes object that contains just a single node.\nThis blocks until a Node is available, or until timeout\nmilliseconds has passed (use negative timeout to wait forever).\nThere are some cases where a Node is just not available, in which\ncase an empty Nodes object will be returned\n" ); } @@ -118,6 +126,7 @@ void register_Cluster_class(){ "getNode" , getNode_function_value , ( bp::arg("uid") ) + , bp::release_gil_policy() , "Return a Nodes object that contains the node with UID uid.\nThere are some cases where a Node is just not available, in which\ncase an empty Nodes object will be returned.\nThrow: SireError::unavailable_resource\n" ); } @@ -130,6 +139,7 @@ void register_Cluster_class(){ "getNode" , getNode_function_value , ( bp::arg("uid"), bp::arg("timeout") ) + , bp::release_gil_policy() , "Return a Nodes object that contains the node with UID uid.\nThis blocks until the Node is available, or until timeout\nmilliseconds has passed (use negative timeout to wait forever).\nThere are some cases where a Node is just not available, in which\ncase an empty Nodes object will be returned.\nThrow: SireError::unavailable_resource\n" ); } @@ -142,6 +152,7 @@ void register_Cluster_class(){ "getNodes" , getNodes_function_value , ( bp::arg("nnodes") ) + , bp::release_gil_policy() , "Return a Nodes object containing up to nnodes nodes. This function\nwill do its best, but you may end with less than you asked for\n(or even none at all)." ); } @@ -154,6 +165,7 @@ void register_Cluster_class(){ "getNodes" , getNodes_function_value , ( bp::arg("nnodes"), bp::arg("timeout") ) + , bp::release_gil_policy() , "Return a Nodes object containing up to nnodes nodes. This function\nwill do its best, but you may end with less than you asked for\n(or even none at all). It is a bad idea to ask for more nodes\nthan there are backends using an infinite timeout..." ); } @@ -166,6 +178,7 @@ void register_Cluster_class(){ "getNodes" , getNodes_function_value , ( bp::arg("uids") ) + , bp::release_gil_policy() , "Return a Nodes object that contains as many of the nodes with\nUIDs from uids as possible, within the time allowed. Note that\nthis may not give you all of the nodes (it may give you none).\nThrow: SireError::unavailable_resource\n" ); } @@ -178,6 +191,7 @@ void register_Cluster_class(){ "getNodes" , getNodes_function_value , ( bp::arg("uids"), bp::arg("timeout") ) + , bp::release_gil_policy() , "Return a Nodes object that contains as many of the nodes with\nUIDs from uids as possible, within the time allowed. Note that\nthis may not give you all of the nodes (it may give you none).\nThrow: SireError::unavailable_resource\n" ); } @@ -189,6 +203,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "getRank" , getRank_function_value + , bp::release_gil_policy() , "Return the rank of the process - this is either the\nrank of this process in the MPI group, or it is 0" ); } @@ -201,6 +216,7 @@ void register_Cluster_class(){ "isLocal" , isLocal_function_value , ( bp::arg("uid") ) + , bp::release_gil_policy() , "Return whether or not the backend with unique ID uid\nis local to this process" ); } @@ -212,6 +228,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "isRunning" , isRunning_function_value + , bp::release_gil_policy() , "Return whether or not the cluster is running" ); } @@ -223,6 +240,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "localUIDs" , localUIDs_function_value + , bp::release_gil_policy() , "Return the list of all of the UIDs of the local nodes\n(the nodes that exist in this address space)" ); } @@ -234,6 +252,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "shutdown" , shutdown_function_value + , bp::release_gil_policy() , "Shutdown this cluster" ); } @@ -257,6 +276,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "supportsMPI" , supportsMPI_function_value + , bp::release_gil_policy() , "Return whether or not this cluster supports MPI\n(this is true if MPI is available, and there is more than\none MPI process)" ); } @@ -268,6 +288,7 @@ void register_Cluster_class(){ Cluster_exposer.def( "wait" , wait_function_value + , bp::release_gil_policy() , "Wait for the global cluster to stop running" ); } diff --git a/wrapper/Cluster/ErrorPacket.pypp.cpp b/wrapper/Cluster/ErrorPacket.pypp.cpp index 2f4f04f0c..4e3188333 100644 --- a/wrapper/Cluster/ErrorPacket.pypp.cpp +++ b/wrapper/Cluster/ErrorPacket.pypp.cpp @@ -27,6 +27,8 @@ SireCluster::ErrorPacket __copy__(const SireCluster::ErrorPacket &other){ return const char* pvt_get_name(const SireCluster::ErrorPacket&){ return "SireCluster::ErrorPacket";} +#include "Helpers/release_gil_policy.hpp" + void register_ErrorPacket_class(){ { //::SireCluster::ErrorPacket @@ -43,6 +45,7 @@ void register_ErrorPacket_class(){ ErrorPacket_exposer.def( "approximatePacketSize" , approximatePacketSize_function_value + , bp::release_gil_policy() , "Return the approximate maximum size (in bytes) of the WorkPacket. This\ndoesnt have to exact (or indeed accurate) - it is used\nto help the WorkPacket::pack() function reserve enough\nspace when serialising this packet to a binary array.\nThe only penalty of getting this wrong is that youll\neither allocate too much space, or be reallocating while\nthe packet is being written" ); } @@ -54,6 +57,7 @@ void register_ErrorPacket_class(){ ErrorPacket_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the work has finished" ); } @@ -65,6 +69,7 @@ void register_ErrorPacket_class(){ ErrorPacket_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not this is an error" ); } @@ -89,6 +94,7 @@ void register_ErrorPacket_class(){ ErrorPacket_exposer.def( "throwError" , throwError_function_value + , bp::release_gil_policy() , "Throw the error associated with this packet" ); } @@ -100,6 +106,7 @@ void register_ErrorPacket_class(){ ErrorPacket_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_ErrorPacket_class(){ ErrorPacket_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Cluster/Node.pypp.cpp b/wrapper/Cluster/Node.pypp.cpp index f1eb33cbb..be9a153df 100644 --- a/wrapper/Cluster/Node.pypp.cpp +++ b/wrapper/Cluster/Node.pypp.cpp @@ -31,6 +31,8 @@ SireCluster::Node __copy__(const SireCluster::Node &other){ return SireCluster:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Node_class(){ { //::SireCluster::Node @@ -46,6 +48,7 @@ void register_Node_class(){ Node_exposer.def( "UID" , UID_function_value + , bp::release_gil_policy() , "Return the unique ID of the Node" ); } @@ -57,6 +60,7 @@ void register_Node_class(){ Node_exposer.def( "abortJob" , abortJob_function_value + , bp::release_gil_policy() , "Abort any running job on this node - this does not block" ); } @@ -68,6 +72,7 @@ void register_Node_class(){ Node_exposer.def( "forceRelease" , forceRelease_function_value + , bp::release_gil_policy() , "Force the release of this node. This aborts any running\njobs on this node and returns it to the Nodes home, or\nback to the Cluster pool if this is homeless. This will\nrelease the node even if there are other references to it,\nwho may be querying or waiting for it. This is not thread-safe,\nbut may be necessary if you have lost a reference and\nyou need to send this node back" ); } @@ -79,6 +84,7 @@ void register_Node_class(){ Node_exposer.def( "isHomeless" , isHomeless_function_value + , bp::release_gil_policy() , "Return whether or not this Node object is homeless\n(is not part of any Nodes set). A homeless node can\nfinish any job that has started, but it is not allowed\nto start any more jobs" ); } @@ -90,6 +96,7 @@ void register_Node_class(){ Node_exposer.def( "isLocal" , isLocal_function_value + , bp::release_gil_policy() , "Return whether or not this node is local to this process" ); } @@ -101,6 +108,7 @@ void register_Node_class(){ Node_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this node is null" ); } @@ -112,6 +120,7 @@ void register_Node_class(){ Node_exposer.def( "nodes" , nodes_function_value + , bp::release_gil_policy() , "Return the nodes object that this node belongs to. In some rare\ncircumstances this node may be homeless, in which case\nan empty set of nodes will be returned" ); } @@ -138,6 +147,7 @@ void register_Node_class(){ Node_exposer.def( "progress" , progress_function_value + , bp::release_gil_policy() , "Return the progress of the Node on the current WorkPacket" ); } @@ -149,6 +159,7 @@ void register_Node_class(){ Node_exposer.def( "release" , release_function_value + , bp::release_gil_policy() , "Release this node - this returns the node to its parent\nNodes object, or back to the Cluster pool if this node\nis homeless. Note that this will only return the node if this\nis the only reference to this node. This returns whether\nor not this node was returned" ); } @@ -161,6 +172,7 @@ void register_Node_class(){ "startJob" , startJob_function_value , ( bp::arg("workpacket") ) + , bp::release_gil_policy() , "Start the job in the WorkPacket workpacket on this node\nand return a Promise that will contain the calculated\nresult. This will autodelete the node.\nThis is useful if this is the only workpacket\nthat you want to run on the node, as this will allow\nthe node to automatically be returned to the free-queue\nonce if has finished.\nThrow: SireError::unavailable_resource\n" ); } @@ -173,6 +185,7 @@ void register_Node_class(){ "startJob" , startJob_function_value , ( bp::arg("workpacket"), bp::arg("autodelete") ) + , bp::release_gil_policy() , "Start the job in the WorkPacket workpacket on this node\nand return a Promise that will contain the calculated\nresult. This will autodelete the node if autodelete\nis true. This is useful if this is the only workpacket\nthat you want to run on the node, as this will allow\nthe node to automatically be returned to the free-queue\nonce if has finished.\nThrow: SireError::unavailable_resource\n" ); } @@ -184,6 +197,7 @@ void register_Node_class(){ Node_exposer.def( "stopJob" , stopJob_function_value + , bp::release_gil_policy() , "Stop any running job on this node - this does not block" ); } @@ -195,6 +209,7 @@ void register_Node_class(){ Node_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this node" ); } @@ -206,6 +221,7 @@ void register_Node_class(){ Node_exposer.def( "wait" , wait_function_value + , bp::release_gil_policy() , "Wait for the Node to stop work" ); } @@ -218,6 +234,7 @@ void register_Node_class(){ "wait" , wait_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Wait for the Node to stop work (or until timeout milliseconds\nhave passed) - this returns whether or not the Node has stopped\nwork" ); } diff --git a/wrapper/Cluster/Nodes.pypp.cpp b/wrapper/Cluster/Nodes.pypp.cpp index ad4398130..c3efa213b 100644 --- a/wrapper/Cluster/Nodes.pypp.cpp +++ b/wrapper/Cluster/Nodes.pypp.cpp @@ -47,6 +47,8 @@ SireCluster::Nodes __copy__(const SireCluster::Nodes &other){ return SireCluster #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Nodes_class(){ @@ -65,6 +67,7 @@ void register_Nodes_class(){ "add" , add_function_value , ( bp::arg("node") ) + , bp::release_gil_policy() , "Add the node node to this set. This will be added as a busy\nNode (as obviously someone is holding onto it) This does\nnothing if this node is already part of this set" ); } @@ -77,6 +80,7 @@ void register_Nodes_class(){ "add" , add_function_value , ( bp::arg("nodes") ) + , bp::release_gil_policy() , "Add all of the nodes in nodes to this set" ); } @@ -88,6 +92,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "addNode" , addNode_function_value + , bp::release_gil_policy() , "Try to add one more node to this set by taking a node from the\npool - this only looks for immediately available nodes, and may\nnot work" ); } @@ -100,6 +105,7 @@ void register_Nodes_class(){ "addNode" , addNode_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Try to add one more node to this set by taking a node from the\npool - this only tries to find an available node for\ntimeout milliseconds, and so it may fail" ); } @@ -112,6 +118,7 @@ void register_Nodes_class(){ "addNodes" , addNodes_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Try to add up to n nodes to this set, by taking the nodes\nfrom the pool - this only looks for immediately available\nnodes, so you may get less than n (you may even get zero)" ); } @@ -124,6 +131,7 @@ void register_Nodes_class(){ "addNodes" , addNodes_function_value , ( bp::arg("n"), bp::arg("timeout") ) + , bp::release_gil_policy() , "Try to add up to n nodes to this set, by taking the nodes\nfrom the pool - this only looks for available\nnodes for timeout milliseconds, so you may get less\nthan n (you may even get zero)" ); } @@ -135,6 +143,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "borrowThisThread" , borrowThisThread_function_value + , bp::release_gil_policy() , "Let this Nodes scheduler borrow this thread to run WorkPackets.\nTechnically, this doesnt use the current thread, but instead\ncreates a duplicate, so you are still able to use your thread.\nHowever, you should avoid doing anything compute intensive in\nyour thread while the Node has borrowed it, as otherwise you\nrisk using more CPU than is available.\nThis returns a ThisThread holder that is used to ask the Nodes\nobject to return this thread when the ThisThread object is\ndeleted, or when ThisThread::reclaim() is called.\n" ); } @@ -146,6 +155,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the total number of nodes available" ); } @@ -157,6 +167,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "getAllNodes" , getAllNodes_function_value + , bp::release_gil_policy() , "Return all of the nodes - this blocks until all of the\nnodes are available. Remember that this will return an\nempty list if there are no nodes.\n" ); } @@ -169,6 +180,7 @@ void register_Nodes_class(){ "getAllNodes" , getAllNodes_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Try to get all the nodes, within the time timeout.\nIf this fails, then no nodes are returned" ); } @@ -180,6 +192,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "getNode" , getNode_function_value + , bp::release_gil_policy() , "Return a free node - this blocks until a free node\nis available. In certain circumstances this will fail\nand return a null Node (e.g. at program shutdown, or\nif all nodes are removed from this set)\n" ); } @@ -192,6 +205,7 @@ void register_Nodes_class(){ "getNode" , getNode_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Try to get a free node - giving only timeout milliseconds\nto get that node. This returns a null node if the call\nis unsuccessful" ); } @@ -204,6 +218,7 @@ void register_Nodes_class(){ "getNodes" , getNodes_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return n free nodes - this blocks until all of the\nnodes are available. In some circumstances this will fail,\ne.g. if there arent enough nodes to fulfill this request\n" ); } @@ -216,6 +231,7 @@ void register_Nodes_class(){ "getNodes" , getNodes_function_value , ( bp::arg("n"), bp::arg("timeout") ) + , bp::release_gil_policy() , "Try to get n free nodes, within the time timeout.\nIf this fails, then no nodes are returned" ); } @@ -227,6 +243,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty (contains no nodes)" ); } @@ -238,6 +255,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "nBusy" , nBusy_function_value + , bp::release_gil_policy() , "Return the number of busy nodes" ); } @@ -249,6 +267,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "nFree" , nFree_function_value + , bp::release_gil_policy() , "Return the number of free nodes" ); } @@ -260,6 +279,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "nNodes" , nNodes_function_value + , bp::release_gil_policy() , "Return the total number of nodes available" ); } @@ -287,6 +307,7 @@ void register_Nodes_class(){ "remove" , remove_function_value , ( bp::arg("node") ) + , bp::release_gil_policy() , "Remove the node node from this set. This doesnt abort\nthe job running on the node, but the node will be automatically\nreturned to the Cluster pool once it is destroyed.\nThis does nothing if this node isnt in this set.\n" ); } @@ -298,6 +319,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "Remove all nodes from this set - this aborts any running\njobs, then disconnects from all of the backends.\nNote that this does not block" ); } @@ -309,6 +331,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of these nodes" ); } @@ -320,6 +343,7 @@ void register_Nodes_class(){ Nodes_exposer.def( "waitUntilAllFree" , waitUntilAllFree_function_value + , bp::release_gil_policy() , "Wait until all of the nodes are free" ); } @@ -332,6 +356,7 @@ void register_Nodes_class(){ "waitUntilAllFree" , waitUntilAllFree_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Wait until all of the nodes are free, or until\ntimeout milliseconds have passed - this returns\nwhether or not all of the nodes are free" ); } diff --git a/wrapper/Cluster/Promise.pypp.cpp b/wrapper/Cluster/Promise.pypp.cpp index 6b6c09e30..a54f0238e 100644 --- a/wrapper/Cluster/Promise.pypp.cpp +++ b/wrapper/Cluster/Promise.pypp.cpp @@ -31,6 +31,8 @@ SireCluster::Promise __copy__(const SireCluster::Promise &other){ return SireClu const char* pvt_get_name(const SireCluster::Promise&){ return "SireCluster::Promise";} +#include "Helpers/release_gil_policy.hpp" + void register_Promise_class(){ { //::SireCluster::Promise @@ -46,6 +48,7 @@ void register_Promise_class(){ Promise_exposer.def( "abort" , abort_function_value + , bp::release_gil_policy() , "Abort this job" ); } @@ -57,6 +60,7 @@ void register_Promise_class(){ Promise_exposer.def( "input" , input_function_value + , bp::release_gil_policy() , "Return the WorkPacket in the state it was in at the\nstart of the job. You can use this to restart jobs that\nfailed in error, or were aborted, or if you just want\nto try to run the job again" ); } @@ -68,6 +72,7 @@ void register_Promise_class(){ Promise_exposer.def( "interimResult" , interimResult_function_value + , bp::release_gil_policy() , "Return an interim result of the calculation" ); } @@ -79,6 +84,7 @@ void register_Promise_class(){ Promise_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not the result is an error.\nThis blocks until the result is available" ); } @@ -90,6 +96,7 @@ void register_Promise_class(){ Promise_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this promise is null" ); } @@ -101,6 +108,7 @@ void register_Promise_class(){ Promise_exposer.def( "isRunning" , isRunning_function_value + , bp::release_gil_policy() , "Return whether or not the calculation is still in progress" ); } @@ -127,6 +135,7 @@ void register_Promise_class(){ Promise_exposer.def( "progress" , progress_function_value + , bp::release_gil_policy() , "Return the progress of the calculation" ); } @@ -138,6 +147,7 @@ void register_Promise_class(){ Promise_exposer.def( "result" , result_function_value + , bp::release_gil_policy() , "Return the result of the work - this blocks until\nthe work has completed" ); } @@ -149,6 +159,7 @@ void register_Promise_class(){ Promise_exposer.def( "stop" , stop_function_value + , bp::release_gil_policy() , "Stop this job" ); } @@ -160,6 +171,7 @@ void register_Promise_class(){ Promise_exposer.def( "throwError" , throwError_function_value + , bp::release_gil_policy() , "Throw any errors associated with this promise - does\nnothing if there is no error" ); } @@ -171,6 +183,7 @@ void register_Promise_class(){ Promise_exposer.def( "wait" , wait_function_value + , bp::release_gil_policy() , "Wait for the job to have completed" ); } @@ -183,6 +196,7 @@ void register_Promise_class(){ "wait" , wait_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Wait until the job has completed, or until timeout milliseconds\nhas passed. This returns whether or not the job has finished" ); } @@ -194,6 +208,7 @@ void register_Promise_class(){ Promise_exposer.def( "wasAborted" , wasAborted_function_value + , bp::release_gil_policy() , "Return whether or not the job was aborted.\nIf it was, then you can rerun the job using\nthe initial state of the WorkPacket stored in\nthis Promise. This blocks until a result is available" ); } @@ -205,6 +220,7 @@ void register_Promise_class(){ Promise_exposer.def( "wasStopped" , wasStopped_function_value + , bp::release_gil_policy() , "Return whether or not the job was stopped.\nThis blocks until a result is available" ); } diff --git a/wrapper/Cluster/ThisThread.pypp.cpp b/wrapper/Cluster/ThisThread.pypp.cpp index 0ea1d39a5..c3f26e43f 100644 --- a/wrapper/Cluster/ThisThread.pypp.cpp +++ b/wrapper/Cluster/ThisThread.pypp.cpp @@ -47,6 +47,8 @@ SireCluster::ThisThread __copy__(const SireCluster::ThisThread &other){ return S const char* pvt_get_name(const SireCluster::ThisThread&){ return "SireCluster::ThisThread";} +#include "Helpers/release_gil_policy.hpp" + void register_ThisThread_class(){ { //::SireCluster::ThisThread @@ -76,6 +78,7 @@ void register_ThisThread_class(){ ThisThread_exposer.def( "reclaim" , reclaim_function_value + , bp::release_gil_policy() , "Reclaim this thread" ); } diff --git a/wrapper/Cluster/WorkPacket.pypp.cpp b/wrapper/Cluster/WorkPacket.pypp.cpp index 289c0e361..20bc54f84 100644 --- a/wrapper/Cluster/WorkPacket.pypp.cpp +++ b/wrapper/Cluster/WorkPacket.pypp.cpp @@ -28,6 +28,8 @@ SireCluster::WorkPacket __copy__(const SireCluster::WorkPacket &other){ return S const char* pvt_get_name(const SireCluster::WorkPacket&){ return "SireCluster::WorkPacket";} +#include "Helpers/release_gil_policy.hpp" + void register_WorkPacket_class(){ { //::SireCluster::WorkPacket @@ -44,6 +46,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "abort" , abort_function_value + , bp::release_gil_policy() , "Abort the work" ); } @@ -55,7 +58,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "base" , base_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return a reference to the underlying Worker object" ); } @@ -67,6 +70,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the work has finished (or is in an\nerror state, or was aborted) - essentially, is there any\nmore of this work packet to run?" ); } @@ -78,6 +82,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not this work is in an error state" ); } @@ -89,6 +94,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is the null (empty) work packet" ); } @@ -113,6 +119,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "pack" , pack_function_value + , bp::release_gil_policy() , "Pack this WorkPacket into a binary array" ); } @@ -124,6 +131,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "progress" , progress_function_value + , bp::release_gil_policy() , "Return the current progress of the calculation (percentage)" ); } @@ -135,6 +143,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "runChunk" , runChunk_function_value + , bp::release_gil_policy() , "" ); } @@ -146,6 +155,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "shouldPack" , shouldPack_function_value + , bp::release_gil_policy() , "Return whether or not we should pack this WorkPacket when\nwe are storing it." ); } @@ -157,6 +167,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "throwError" , throwError_function_value + , bp::release_gil_policy() , "Throw any error associated with this WorkPacket\n(this does nothing if there is no error)" ); } @@ -168,6 +179,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -180,6 +192,7 @@ void register_WorkPacket_class(){ "unpack" , unpack_function_value , ( bp::arg("data") ) + , bp::release_gil_policy() , "Unpack a WorkPacket from the passed binary data. This binary\ndata MUST have been created by WorkPacket::pack()" ); } @@ -191,6 +204,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "wasAborted" , wasAborted_function_value + , bp::release_gil_policy() , "Return whether or not the work was aborted" ); } @@ -202,6 +216,7 @@ void register_WorkPacket_class(){ WorkPacket_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Cluster/WorkPacketBase.pypp.cpp b/wrapper/Cluster/WorkPacketBase.pypp.cpp index 46d39d1f1..0c7945618 100644 --- a/wrapper/Cluster/WorkPacketBase.pypp.cpp +++ b/wrapper/Cluster/WorkPacketBase.pypp.cpp @@ -25,6 +25,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireCluster::WorkPacketBase&){ return "SireCluster::WorkPacketBase";} +#include "Helpers/release_gil_policy.hpp" + void register_WorkPacketBase_class(){ { //::SireCluster::WorkPacketBase @@ -39,6 +41,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "approximatePacketSize" , approximatePacketSize_function_value + , bp::release_gil_policy() , "Return the approximate maximum size (in bytes) of the WorkPacket. This\ndoesnt have to exact (or indeed accurate) - it is used\nto help the WorkPacket::pack() function reserve enough\nspace when serialising this packet to a binary array.\nThe only penalty of getting this wrong is that youll\neither allocate too much space, or be reallocating while\nthe packet is being written" ); } @@ -50,6 +53,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not this is an Error WorkPacket" ); } @@ -72,6 +77,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "progress" , progress_function_value + , bp::release_gil_policy() , "Return the current progress of the work (percentage)" ); } @@ -83,6 +89,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "runChunk" , runChunk_function_value + , bp::release_gil_policy() , "Perform one chunk of the calculation - Any exceptions are\ncaught in WorkPacket::runChunk, where that are converted\ninto an ErrorPacket" ); } @@ -94,6 +101,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "shouldPack" , shouldPack_function_value + , bp::release_gil_policy() , "Return whether or not this work packet should be stored\nas a binary array - this is used by Promise to work out\nhow to store the initial WorkPacket state. Only large\npackets should be binary packed (as they are then\ncompressed)" ); } @@ -105,6 +113,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "throwError" , throwError_function_value + , bp::release_gil_policy() , "Throw the error, if this is in an error state" ); } @@ -116,6 +125,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -127,6 +137,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "wasAborted" , wasAborted_function_value + , bp::release_gil_policy() , "Whether or not the job has been aborted" ); } @@ -138,6 +149,7 @@ void register_WorkPacketBase_class(){ WorkPacketBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Cluster/WorkTest.pypp.cpp b/wrapper/Cluster/WorkTest.pypp.cpp index 852b198db..4f15f6775 100644 --- a/wrapper/Cluster/WorkTest.pypp.cpp +++ b/wrapper/Cluster/WorkTest.pypp.cpp @@ -27,6 +27,8 @@ SireCluster::WorkTest __copy__(const SireCluster::WorkTest &other){ return SireC const char* pvt_get_name(const SireCluster::WorkTest&){ return "SireCluster::WorkTest";} +#include "Helpers/release_gil_policy.hpp" + void register_WorkTest_class(){ { //::SireCluster::WorkTest @@ -43,6 +45,7 @@ void register_WorkTest_class(){ WorkTest_exposer.def( "approximatePacketSize" , approximatePacketSize_function_value + , bp::release_gil_policy() , "Return the approximate maximum size (in bytes) of the WorkPacket. This\ndoesnt have to exact (or indeed accurate) - it is used\nto help the WorkPacket::pack() function reserve enough\nspace when serialising this packet to a binary array.\nThe only penalty of getting this wrong is that youll\neither allocate too much space, or be reallocating while\nthe packet is being written" ); } @@ -54,6 +57,7 @@ void register_WorkTest_class(){ WorkTest_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the work has finished" ); } @@ -78,6 +82,7 @@ void register_WorkTest_class(){ WorkTest_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_WorkTest_class(){ WorkTest_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Cluster/__init__.py b/wrapper/Cluster/__init__.py index 2c423ed4f..6a9ca31a6 100644 --- a/wrapper/Cluster/__init__.py +++ b/wrapper/Cluster/__init__.py @@ -5,5 +5,5 @@ ## (C) Christopher Woods ## -from Sire.Cluster._Cluster import * +from ._Cluster import * diff --git a/wrapper/Error/CMakeLists.txt b/wrapper/Error/CMakeLists.txt index 8360485c3..a52378f73 100644 --- a/wrapper/Error/CMakeLists.txt +++ b/wrapper/Error/CMakeLists.txt @@ -24,7 +24,7 @@ set ( ERROR_SOURCES # Create the library that holds all of the class wrappers add_library (Error ${ERROR_SOURCES}) -set_target_properties (Error +set_target_properties (Error PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -32,11 +32,11 @@ set_target_properties (Error PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Error SirePython SIRE_SireError - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) @@ -44,7 +44,7 @@ include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Error" "_init_Error" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Error ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Error ) install( TARGETS Error LIBRARY DESTINATION ${INSTALLDIR} @@ -53,6 +53,6 @@ install( TARGETS Error ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Error/__init__.py b/wrapper/Error/__init__.py index 318e2efec..1f16c2418 100644 --- a/wrapper/Error/__init__.py +++ b/wrapper/Error/__init__.py @@ -1,16 +1,41 @@ -############################# -## -## The SireError module -## -## (C) Christopher Woods -## +""" +.. currentmodule:: sire.legacy.Error -import Sire.Qt +This module is used to map between Sire's C++ exceptions and +standard Python exceptions. -from Sire.Error._Error import * + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + get_back_trace + print_error + get_last_error_details + +""" + +from .. import Qt as _Qt + +from ._Error import * __old_printError = printError def printError(e): __old_printError( str(e) ) +def get_back_trace(): + """Print the current backtrace (including the C++ part)""" + return getBackTrace() + +def print_error(e): + """Print the passed error""" + printError(e) + +# we are going to start by disabling the exception backtraces. +# These are only really needed by developers, and slow some things +# down. If you are a developer, than call +# enable_backtrace_exceptions() anywhere to re-enable them +disable_backtrace_exceptions() diff --git a/wrapper/Error/wrap_SireError.cpp b/wrapper/Error/wrap_SireError.cpp index c8851ed9d..e93ff3d77 100644 --- a/wrapper/Error/wrap_SireError.cpp +++ b/wrapper/Error/wrap_SireError.cpp @@ -42,6 +42,8 @@ namespace SireError void export_exceptions(); +QHash get_last_error_details(); + void export_SireError() { export_exceptions(); @@ -54,6 +56,8 @@ void export_SireError() boost::python::def( "printError", printError_value ); } + + boost::python::def( "get_last_error_details", &get_last_error_details ); } } diff --git a/wrapper/Error/wrap_exceptions.cpp b/wrapper/Error/wrap_exceptions.cpp index 05656b0cf..c8d25fcfc 100644 --- a/wrapper/Error/wrap_exceptions.cpp +++ b/wrapper/Error/wrap_exceptions.cpp @@ -32,28 +32,173 @@ #include "SireError/exception.h" #include "SireError/errors.h" +#include "SireMol/errors.h" +#include "SireMol/parser.h" +#include "SireMol/core.h" +#include "SireBase/errors.h" + +#include "Helpers/release_gil_policy.hpp" using namespace boost::python; #include +#include +#include namespace SireError { -void out_of_range( const SireError::invalid_index &ex ) +typedef QHash LastErrorType; + +Q_GLOBAL_STATIC( LastErrorType, lastError ); + +Q_GLOBAL_STATIC( QMutex, lastErrorMutex ); + +void set_last_error(const SireError::exception &e) +{ + LastErrorType d; + + QString bt; + + if (e.trace().isEmpty()) + bt = QObject::tr("Backtrace disabled. Call sire.error.enable_backtrace_exceptions() to re-enable."); + else + bt = e.trace().join("\n"); + + d["type"] = e.what(); + d["from"] = e.from(); + d["backtrace"] = bt; + d["where"] = e.where(); + d["why"] = e.why(); + d["pid"] = e.pid(); + + QMutexLocker lkr( lastErrorMutex() ); + + lastError()->operator=(d); +} + +LastErrorType get_last_error_details() +{ + QMutexLocker lkr( lastErrorMutex() ); + + LastErrorType d = *(lastError()); + + lkr.unlock(); + + return d; +} + +QString get_exception_string(const SireError::exception &e) +{ + set_last_error(e); + return QString("%1: %2 (call sire.error.get_last_error_details() for more info)").arg(e.what()).arg(e.why()); +} + +void index_error( const SireError::exception &ex ) +{ + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_IndexError, + get_exception_string(ex).toUtf8()); +} + +void key_error( const SireError::exception &ex ) +{ + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_KeyError, + get_exception_string(ex).toUtf8()); +} + +void assertion_error( const SireError::exception &ex ) +{ + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_AssertionError, + get_exception_string(ex).toUtf8()); +} + +void type_error( const SireError::exception &ex ) +{ + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_TypeError, + get_exception_string(ex).toUtf8()); +} + +void input_output_error( const SireError::exception &ex ) +{ + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_IOError, + get_exception_string(ex).toUtf8()); +} + +void syntax_error( const SireError::exception &ex ) { - PyErr_SetString(PyExc_StopIteration,ex.toString().toUtf8()); + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_SyntaxError, + get_exception_string(ex).toUtf8()); } void exception_translator( const SireError::exception &ex ) { - PyErr_SetString(PyExc_UserWarning,ex.toString().toUtf8()); + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_UserWarning, + get_exception_string(ex).toUtf8()); +} + +void std_exception_translator( const std::exception &ex ) +{ + boost::python::release_gil_policy::acquire_gil_no_raii(); + PyErr_SetString(PyExc_UserWarning, + QString("%1").arg(ex.what()).toUtf8()); +} + +SireError::FastExceptionFlag *fast_exception_flag(0); + +void enable_backtrace_exceptions() +{ + // python will hold the GIL when calling this function + // so it should be safe + if (fast_exception_flag) + { + delete fast_exception_flag; + fast_exception_flag = 0; + } +} + +void disable_backtrace_exceptions() +{ + if (fast_exception_flag) + return; + + fast_exception_flag = new SireError::FastExceptionFlag( + SireError::exception::enableFastExceptions()); } void export_exceptions() { + def("enable_backtrace_exceptions", &enable_backtrace_exceptions); + def("disable_backtrace_exceptions", &disable_backtrace_exceptions); + + register_exception_translator(&std_exception_translator); register_exception_translator(&exception_translator); - register_exception_translator(&out_of_range); + register_exception_translator(&index_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&key_error); + register_exception_translator(&assertion_error); + register_exception_translator(&type_error); + register_exception_translator(&type_error); + register_exception_translator(&input_output_error); + register_exception_translator(&input_output_error); + register_exception_translator(&syntax_error); } } diff --git a/wrapper/FF/AtomPoint.pypp.cpp b/wrapper/FF/AtomPoint.pypp.cpp index 1be69546a..02bcf6ff9 100644 --- a/wrapper/FF/AtomPoint.pypp.cpp +++ b/wrapper/FF/AtomPoint.pypp.cpp @@ -40,6 +40,8 @@ SireFF::AtomPoint __copy__(const SireFF::AtomPoint &other){ return SireFF::AtomP #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomPoint_class(){ { //::SireFF::AtomPoint @@ -57,6 +59,7 @@ void register_AtomPoint_class(){ "addForce" , addForce_function_value , ( bp::arg("molforces"), bp::arg("force") ) + , bp::release_gil_policy() , "Add the force acting on this atom to the passed table (if it is\nthe table for the molecule containing the atom" ); } @@ -69,6 +72,7 @@ void register_AtomPoint_class(){ "addForce" , addForce_function_value , ( bp::arg("forces"), bp::arg("force") ) + , bp::release_gil_policy() , "Add the force acting on this atom to the passed table (if it contains\nthe table for the molecule containing the atom" ); } @@ -80,7 +84,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "atom" , atom_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the actual atom" ); } @@ -93,6 +97,7 @@ void register_AtomPoint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Does this point require information from the molecule with number molnum" ); } @@ -105,6 +110,7 @@ void register_AtomPoint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Does this point require information from the molecule with ID molid" ); } @@ -116,6 +122,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "isExtraMoleculePoint" , isExtraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an extramolecular point (it is independent\nof the coordinates of atoms in any molecule, i.e. it is just a point in space)" ); } @@ -127,6 +134,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "isInterMoleculePoint" , isInterMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an intermolecular point (it depends on\ncoordinates of atoms from than one molecule)" ); } @@ -138,6 +146,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "isIntraMoleculePoint" , isIntraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether this is an intramolecular point (it depends on coordinates\nof atoms in just one molecule)" ); } @@ -149,6 +158,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the molecules needed to get this point" ); } @@ -160,6 +170,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules needed to get this point" ); } @@ -186,6 +197,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -197,6 +209,7 @@ void register_AtomPoint_class(){ AtomPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -209,6 +222,7 @@ void register_AtomPoint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this point, returning whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -221,6 +235,7 @@ void register_AtomPoint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update this point, returning whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -233,6 +248,7 @@ void register_AtomPoint_class(){ "update" , update_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Update this point, returning whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -245,6 +261,7 @@ void register_AtomPoint_class(){ "update" , update_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Update this point, returning whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -257,6 +274,7 @@ void register_AtomPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the passed forcetable" ); } @@ -269,6 +287,7 @@ void register_AtomPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in molecules" ); } @@ -281,6 +300,7 @@ void register_AtomPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the group molgroup" ); } @@ -293,6 +313,7 @@ void register_AtomPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the groups in molgroups" ); } @@ -305,6 +326,7 @@ void register_AtomPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Return whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -317,6 +339,7 @@ void register_AtomPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -329,6 +352,7 @@ void register_AtomPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -341,6 +365,7 @@ void register_AtomPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not this changes\nthe location of this point\nThrow: SireBase::missing_property\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } diff --git a/wrapper/FF/CMakeAutogenFile.txt b/wrapper/FF/CMakeAutogenFile.txt index 5ec74c227..b02fa701c 100644 --- a/wrapper/FF/CMakeAutogenFile.txt +++ b/wrapper/FF/CMakeAutogenFile.txt @@ -1,40 +1,40 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - PotentialTable.pypp.cpp + AtomPoint.pypp.cpp + Center.pypp.cpp + CenterOfGeometry.pypp.cpp + CenterOfMass.pypp.cpp EnergyTable.pypp.cpp + FF.pypp.cpp + FF3D.pypp.cpp + FFComponent.pypp.cpp + FFDetail.pypp.cpp + FFID.pypp.cpp + FFIdx.pypp.cpp FFMolGroup.pypp.cpp + FFName.pypp.cpp + FieldTable.pypp.cpp + ForceFields.pypp.cpp + ForceTable.pypp.cpp + G1FF.pypp.cpp G2FF.pypp.cpp - FFID.pypp.cpp - CenterOfGeometry.pypp.cpp + GridFieldTable.pypp.cpp + GridPotentialTable.pypp.cpp + IDAndSet_FFID_.pypp.cpp + IDOrSet_FFID_.pypp.cpp + MolEnergyTable.pypp.cpp + MolFieldTable.pypp.cpp + MolForceTable.pypp.cpp MolPotentialTable.pypp.cpp + NullFF.pypp.cpp + NullProbe.pypp.cpp + Point.pypp.cpp PointRef.pypp.cpp - FieldTable.pypp.cpp - Center.pypp.cpp - MolForceTable.pypp.cpp + PotentialTable.pypp.cpp Probe.pypp.cpp - IDOrSet_FFID_.pypp.cpp - FFDetail.pypp.cpp - GridPotentialTable.pypp.cpp - NullProbe.pypp.cpp - AtomPoint.pypp.cpp - MolFieldTable.pypp.cpp SingleComponent.pypp.cpp - Point.pypp.cpp - ForceFields.pypp.cpp - NullFF.pypp.cpp - CenterOfMass.pypp.cpp - FFName.pypp.cpp - ForceTable.pypp.cpp - FFComponent.pypp.cpp Specify_FFID_.pypp.cpp - IDAndSet_FFID_.pypp.cpp VectorPoint.pypp.cpp - FFIdx.pypp.cpp - FF3D.pypp.cpp - G1FF.pypp.cpp - GridFieldTable.pypp.cpp - FF.pypp.cpp - MolEnergyTable.pypp.cpp SireFF_containers.cpp SireFF_properties.cpp SireFF_registrars.cpp diff --git a/wrapper/FF/CMakeLists.txt b/wrapper/FF/CMakeLists.txt index ee642b63e..7d0df5211 100644 --- a/wrapper/FF/CMakeLists.txt +++ b/wrapper/FF/CMakeLists.txt @@ -6,7 +6,7 @@ # Third Party dependencies of this module include_directories( ${BOOST_INCLUDE_DIR} - ${PYTHON_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} ${SIRE_GSL_INCLUDE_PATH} ) # Sire include paths @@ -23,7 +23,7 @@ include(CMakeAutogenFile.txt) set ( WRAPFF_SOURCES _FF.main.cpp - + ${PYPP_SOURCES} ) @@ -31,7 +31,7 @@ set ( WRAPFF_SOURCES # Create the library that holds all of the class wrappers add_library (FF ${WRAPFF_SOURCES}) -set_target_properties (FF +set_target_properties (FF PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -39,18 +39,18 @@ set_target_properties (FF PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (FF SirePython SIRE_SireFF - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_FF" "_init_FF" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/FF ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/FF ) install( TARGETS FF LIBRARY DESTINATION ${INSTALLDIR} @@ -59,6 +59,6 @@ install( TARGETS FF ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/FF/Center.pypp.cpp b/wrapper/FF/Center.pypp.cpp index ac1445775..f2f309ab0 100644 --- a/wrapper/FF/Center.pypp.cpp +++ b/wrapper/FF/Center.pypp.cpp @@ -39,6 +39,8 @@ SireFF::Center __copy__(const SireFF::Center &other){ return SireFF::Center(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Center_class(){ { //::SireFF::Center @@ -57,6 +59,7 @@ void register_Center_class(){ "addForce" , addForce_function_value , ( bp::arg("molforces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force acting on this point from the\nmolecule whose forces are in molforces and add the\nforce onto the table" ); } @@ -69,6 +72,7 @@ void register_Center_class(){ "addForce" , addForce_function_value , ( bp::arg("forces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force into the forces acting on\nthe molecules that contribute to this point and add those\nforces onto the table forces" ); } @@ -81,6 +85,7 @@ void register_Center_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not the molecule with number molnum is\nneeded to generate this point" ); } @@ -93,6 +98,7 @@ void register_Center_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this molecule with ID molid is\nneeded to generate this point" ); } @@ -104,6 +110,7 @@ void register_Center_class(){ Center_exposer.def( "isExtraMoleculePoint" , isExtraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an extramolecular point (it is independent\nof the coordinates of atoms in any molecule, i.e. it is just a point in space)" ); } @@ -115,6 +122,7 @@ void register_Center_class(){ Center_exposer.def( "isInterMoleculePoint" , isInterMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an intermolecular point (it depends on\ncoordinates of atoms from than one molecule)" ); } @@ -126,6 +134,7 @@ void register_Center_class(){ Center_exposer.def( "isIntraMoleculePoint" , isIntraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether this is an intramolecular point (it depends on coordinates\nof atoms in just one molecule)" ); } @@ -137,6 +146,7 @@ void register_Center_class(){ Center_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return all of the molecules used to generate this point" ); } @@ -148,6 +158,7 @@ void register_Center_class(){ Center_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules needed to generate this point" ); } @@ -175,6 +186,7 @@ void register_Center_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space - if there is more than one molecule, then this\npoint can only be used with a cartesian, non-periodic space" ); } @@ -186,6 +198,7 @@ void register_Center_class(){ Center_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -197,6 +210,7 @@ void register_Center_class(){ Center_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -209,6 +223,7 @@ void register_Center_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -221,6 +236,7 @@ void register_Center_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -233,6 +249,7 @@ void register_Center_class(){ "update" , update_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -245,6 +262,7 @@ void register_Center_class(){ "update" , update_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -257,6 +275,7 @@ void register_Center_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the passed forcetable" ); } @@ -269,6 +288,7 @@ void register_Center_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in molecules" ); } @@ -281,6 +301,7 @@ void register_Center_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the group molgroup" ); } @@ -293,6 +314,7 @@ void register_Center_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the groups in molgroups" ); } @@ -305,6 +327,7 @@ void register_Center_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Return whether or not the passed molecule would change this point" ); } @@ -317,6 +340,7 @@ void register_Center_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } @@ -329,6 +353,7 @@ void register_Center_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } @@ -341,6 +366,7 @@ void register_Center_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } diff --git a/wrapper/FF/CenterOfGeometry.pypp.cpp b/wrapper/FF/CenterOfGeometry.pypp.cpp index a6dd77843..08d6dc1fa 100644 --- a/wrapper/FF/CenterOfGeometry.pypp.cpp +++ b/wrapper/FF/CenterOfGeometry.pypp.cpp @@ -39,6 +39,8 @@ SireFF::CenterOfGeometry __copy__(const SireFF::CenterOfGeometry &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CenterOfGeometry_class(){ { //::SireFF::CenterOfGeometry @@ -57,6 +59,7 @@ void register_CenterOfGeometry_class(){ "addForce" , addForce_function_value , ( bp::arg("molforces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force acting on this point from the\nmolecule whose forces are in molforces and add the\nforce onto the table" ); } @@ -69,6 +72,7 @@ void register_CenterOfGeometry_class(){ "addForce" , addForce_function_value , ( bp::arg("forces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force into the forces acting on\nthe molecules that contribute to this point and add those\nforces onto the table forces" ); } @@ -81,6 +85,7 @@ void register_CenterOfGeometry_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not the molecule with number molnum is\nneeded to generate this point" ); } @@ -93,6 +98,7 @@ void register_CenterOfGeometry_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this molecule with ID molid is\nneeded to generate this point" ); } @@ -104,6 +110,7 @@ void register_CenterOfGeometry_class(){ CenterOfGeometry_exposer.def( "isExtraMoleculePoint" , isExtraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an extramolecular point (it is independent\nof the coordinates of atoms in any molecule, i.e. it is just a point in space)" ); } @@ -115,6 +122,7 @@ void register_CenterOfGeometry_class(){ CenterOfGeometry_exposer.def( "isInterMoleculePoint" , isInterMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an intermolecular point (it depends on\ncoordinates of atoms from than one molecule)" ); } @@ -126,6 +134,7 @@ void register_CenterOfGeometry_class(){ CenterOfGeometry_exposer.def( "isIntraMoleculePoint" , isIntraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether this is an intramolecular point (it depends on coordinates\nof atoms in just one molecule)" ); } @@ -137,6 +146,7 @@ void register_CenterOfGeometry_class(){ CenterOfGeometry_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return all of the molecules used to generate this point" ); } @@ -148,6 +158,7 @@ void register_CenterOfGeometry_class(){ CenterOfGeometry_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules needed to generate this point" ); } @@ -175,6 +186,7 @@ void register_CenterOfGeometry_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used by this point - a CenterOfGeometry cannot\nbe calculated for periodic or non-cartesian spaces if there\nis more than one molecule" ); } @@ -186,6 +198,7 @@ void register_CenterOfGeometry_class(){ CenterOfGeometry_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -197,6 +210,7 @@ void register_CenterOfGeometry_class(){ CenterOfGeometry_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -209,6 +223,7 @@ void register_CenterOfGeometry_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -221,6 +236,7 @@ void register_CenterOfGeometry_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -233,6 +249,7 @@ void register_CenterOfGeometry_class(){ "update" , update_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -245,6 +262,7 @@ void register_CenterOfGeometry_class(){ "update" , update_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -257,6 +275,7 @@ void register_CenterOfGeometry_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the passed forcetable" ); } @@ -269,6 +288,7 @@ void register_CenterOfGeometry_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in molecules" ); } @@ -281,6 +301,7 @@ void register_CenterOfGeometry_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the group molgroup" ); } @@ -293,6 +314,7 @@ void register_CenterOfGeometry_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the groups in molgroups" ); } @@ -305,6 +327,7 @@ void register_CenterOfGeometry_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Return whether or not the passed molecule would change this point" ); } @@ -317,6 +340,7 @@ void register_CenterOfGeometry_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } @@ -329,6 +353,7 @@ void register_CenterOfGeometry_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } @@ -341,6 +366,7 @@ void register_CenterOfGeometry_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } diff --git a/wrapper/FF/CenterOfMass.pypp.cpp b/wrapper/FF/CenterOfMass.pypp.cpp index 5b36256e7..6e45bc50c 100644 --- a/wrapper/FF/CenterOfMass.pypp.cpp +++ b/wrapper/FF/CenterOfMass.pypp.cpp @@ -39,6 +39,8 @@ SireFF::CenterOfMass __copy__(const SireFF::CenterOfMass &other){ return SireFF: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CenterOfMass_class(){ { //::SireFF::CenterOfMass @@ -57,6 +59,7 @@ void register_CenterOfMass_class(){ "addForce" , addForce_function_value , ( bp::arg("molforces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force acting on this point from the\nmolecule whose forces are in molforces and add the\nforce onto the table" ); } @@ -69,6 +72,7 @@ void register_CenterOfMass_class(){ "addForce" , addForce_function_value , ( bp::arg("forces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force into the forces acting on\nthe molecules that contribute to this point and add those\nforces onto the table forces" ); } @@ -81,6 +85,7 @@ void register_CenterOfMass_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not the molecule with number molnum is\nneeded to generate this point" ); } @@ -93,6 +98,7 @@ void register_CenterOfMass_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this molecule with ID molid is\nneeded to generate this point" ); } @@ -104,6 +110,7 @@ void register_CenterOfMass_class(){ CenterOfMass_exposer.def( "isExtraMoleculePoint" , isExtraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an extramolecular point (it is independent\nof the coordinates of atoms in any molecule, i.e. it is just a point in space)" ); } @@ -115,6 +122,7 @@ void register_CenterOfMass_class(){ CenterOfMass_exposer.def( "isInterMoleculePoint" , isInterMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an intermolecular point (it depends on\ncoordinates of atoms from than one molecule)" ); } @@ -126,6 +134,7 @@ void register_CenterOfMass_class(){ CenterOfMass_exposer.def( "isIntraMoleculePoint" , isIntraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether this is an intramolecular point (it depends on coordinates\nof atoms in just one molecule)" ); } @@ -137,6 +146,7 @@ void register_CenterOfMass_class(){ CenterOfMass_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return all of the molecules used to generate this point" ); } @@ -148,6 +158,7 @@ void register_CenterOfMass_class(){ CenterOfMass_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules needed to generate this point" ); } @@ -175,6 +186,7 @@ void register_CenterOfMass_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used by this point - a CenterOfGeometry cannot\nbe calculated for periodic or non-cartesian spaces if there\nis more than one molecule" ); } @@ -186,6 +198,7 @@ void register_CenterOfMass_class(){ CenterOfMass_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -197,6 +210,7 @@ void register_CenterOfMass_class(){ CenterOfMass_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -209,6 +223,7 @@ void register_CenterOfMass_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -221,6 +236,7 @@ void register_CenterOfMass_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -233,6 +249,7 @@ void register_CenterOfMass_class(){ "update" , update_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -245,6 +262,7 @@ void register_CenterOfMass_class(){ "update" , update_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Update the molecules used to create this point" ); } @@ -257,6 +275,7 @@ void register_CenterOfMass_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the passed forcetable" ); } @@ -269,6 +288,7 @@ void register_CenterOfMass_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in molecules" ); } @@ -281,6 +301,7 @@ void register_CenterOfMass_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the group molgroup" ); } @@ -293,6 +314,7 @@ void register_CenterOfMass_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not this point uses data from any of the\nmolecules in the groups in molgroups" ); } @@ -305,6 +327,7 @@ void register_CenterOfMass_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Return whether or not the passed molecule would change this point" ); } @@ -317,6 +340,7 @@ void register_CenterOfMass_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } @@ -329,6 +353,7 @@ void register_CenterOfMass_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } @@ -341,6 +366,7 @@ void register_CenterOfMass_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Return whether or not the passed molecules would change this point" ); } diff --git a/wrapper/FF/EnergyTable.pypp.cpp b/wrapper/FF/EnergyTable.pypp.cpp index 7a2168216..65ba231eb 100644 --- a/wrapper/FF/EnergyTable.pypp.cpp +++ b/wrapper/FF/EnergyTable.pypp.cpp @@ -33,6 +33,8 @@ SireFF::EnergyTable __copy__(const SireFF::EnergyTable &other){ return SireFF::E const char* pvt_get_name(const SireFF::EnergyTable&){ return "SireFF::EnergyTable";} +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_EnergyTable_class(){ @@ -52,6 +54,7 @@ void register_EnergyTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the contents of the table other onto this table. This will only\nadd the forces for the molecules grids that are in both tables" ); } @@ -64,6 +67,7 @@ void register_EnergyTable_class(){ "add" , add_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto all of the atom grid points in this table" ); } @@ -76,6 +80,7 @@ void register_EnergyTable_class(){ "assertContainsTableFor" , assertContainsTableFor_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Assert that this forcetable contains a table for the\nforces for the molecule at number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -101,6 +106,7 @@ void register_EnergyTable_class(){ "containsTable" , containsTable_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "" ); } @@ -112,6 +118,7 @@ void register_EnergyTable_class(){ EnergyTable_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -124,6 +131,7 @@ void register_EnergyTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the force at all atom and grid points by value" ); } @@ -161,6 +169,7 @@ void register_EnergyTable_class(){ "indexOf" , indexOf_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the index of the molecule with number molnum in this table\nThrow: SireMol::missing_molecule\n" ); } @@ -173,6 +182,7 @@ void register_EnergyTable_class(){ "initialiseTable" , initialiseTable_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Initialise all of the forces for the table for the molecule\nwith number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -184,6 +194,7 @@ void register_EnergyTable_class(){ EnergyTable_exposer.def( "initialiseTables" , initialiseTables_function_value + , bp::release_gil_policy() , "Initialise all of the tables - this resets all of the forces\nback to zero" ); } @@ -195,6 +206,7 @@ void register_EnergyTable_class(){ EnergyTable_exposer.def( "molNums" , molNums_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +219,7 @@ void register_EnergyTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the force at all atom and grid points by value" ); } @@ -254,6 +267,7 @@ void register_EnergyTable_class(){ "setAll" , setAll_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Set the force at all atom and grid points equal to force" ); } @@ -266,6 +280,7 @@ void register_EnergyTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the contents of the table other from this table. This will only\nsubtract the forces for the molecules grids that are in both tables" ); } @@ -278,6 +293,7 @@ void register_EnergyTable_class(){ "subtract" , subtract_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from all of the atom grid points in this table" ); } @@ -289,6 +305,7 @@ void register_EnergyTable_class(){ EnergyTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -300,6 +317,7 @@ void register_EnergyTable_class(){ EnergyTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FF.pypp.cpp b/wrapper/FF/FF.pypp.cpp index 50be193d2..6cfb3d704 100644 --- a/wrapper/FF/FF.pypp.cpp +++ b/wrapper/FF/FF.pypp.cpp @@ -52,6 +52,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_FF_class(){ @@ -81,6 +83,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecule viewed in molview to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nNote that if this molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version of molview\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -93,6 +96,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the views of the molecule viewed in molviews to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nNote that if this molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version of molview\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -105,6 +109,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add all of the molecules in molecules to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nNote that if a molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version in molecules\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -117,6 +122,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add all of the molecules in the group molgroup to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nNote that if a molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version in molecules\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -129,6 +135,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the passed view of the molecule to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -141,6 +148,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the passed views of the molecule to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -153,6 +161,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the passed molecules to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -165,6 +174,7 @@ void register_FF_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecules in the passed MoleculeGroup to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -177,6 +187,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecule viewed in molview to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nThis only adds the view to groups that dont already contain it.\nNote that if this molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version of molview\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -189,6 +200,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the views of the molecule viewed in molviews to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nThis only adds views to groups that dont already contain them.\nNote that if this molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version of molview\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -201,6 +213,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add all of the molecules in molecules to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nThis only adds molecules to groups that dont already contain them.\nNote that if a molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version in molecules\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -213,6 +226,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add all of the molecules in the group molgroup to the forcefield groups\nidentified by mgid using the supplied map to find the properties\nof the molecule that contain the forcefield parameters\nThis only adds molecules to groups that dont already contain them.\nNote that if a molecule exists already in this forcefield, then\nthe version of the molecule that is in this forcefield will be used,\nnot the version in molecules\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -225,6 +239,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the passed view of the molecule to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nOnly add this view to groups that dont already contain\nthis view (the whole view, not part of it)\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -237,6 +252,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the passed views of the molecule to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nOnly add views to groups that dont already contain\nthem (the whole view, not part of it, and can add some views)\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -249,6 +265,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the passed molecules to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nOnly add the views of molecules to groups that dont already contain\nthem (the whole view, not part of it)\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -261,6 +278,7 @@ void register_FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecules in the passed MoleculeGroup to the molecule groups\nidentified by mgid using the default properties to\nfind the parameters needed by this forcefield\nOnly add the views of molecules to groups that dont already contain\nthem (the whole view, not part of it)\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -272,7 +290,7 @@ void register_FF_class(){ FF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return an object that describes all of the components\nof this forcefield (complete with SireCAS::Symbols to\nuniquely ID each component)" ); } @@ -285,6 +303,7 @@ void register_FF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains a property\ncalled name" ); } @@ -297,6 +316,7 @@ void register_FF_class(){ "energies" , energies_function_value , ( bp::arg("components") ) + , bp::release_gil_policy() , "Return the values of the specified energy components" ); } @@ -308,6 +328,7 @@ void register_FF_class(){ FF_exposer.def( "energies" , energies_function_value + , bp::release_gil_policy() , "Return the values of all of the energy components of this forcefield" ); } @@ -319,6 +340,7 @@ void register_FF_class(){ FF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "Return the energy of this forcefield in its current state" ); } @@ -331,6 +353,7 @@ void register_FF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return the energy of the forcefield component represented\nby the passed symbol\nThrow: SireFF::missing_component\n" ); } @@ -342,6 +365,7 @@ void register_FF_class(){ FF_exposer.def( "isClean" , isClean_function_value + , bp::release_gil_policy() , "" ); } @@ -353,6 +377,7 @@ void register_FF_class(){ FF_exposer.def( "isDirty" , isDirty_function_value + , bp::release_gil_policy() , "" ); } @@ -364,6 +389,7 @@ void register_FF_class(){ FF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell the forcefield that it has to recalculate everything from\nscratch" ); } @@ -375,7 +401,7 @@ void register_FF_class(){ FF_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this forcefield" ); } @@ -414,7 +440,7 @@ void register_FF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the property that has the name name\n\nThrow: SireBase::missing_property\n" ); } @@ -426,6 +452,7 @@ void register_FF_class(){ FF_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the names of all of the properties available to this forcefield" ); } @@ -438,6 +465,7 @@ void register_FF_class(){ "remove" , remove_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the view molview from the specified groups in this\nforcefield. Note that this only removes the specific view\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -450,6 +478,7 @@ void register_FF_class(){ "remove" , remove_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views of the molecule in molviews from the specified\ngroups in this forcefield. Note that this only removes the specific view\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in these\nviews from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -462,6 +491,7 @@ void register_FF_class(){ "remove" , remove_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views of the molecules in molecules from the specified\ngroups in this forcefield. Note that this only removes the specific view\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in these\nviews from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -474,6 +504,7 @@ void register_FF_class(){ "remove" , remove_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views of the molecules in the molecule group molgroup f\nfrom the specified groups in this forcefield. Note that this only\nremoves the specific view (and indeed only the first copy of this view\nif there are duplicates) - it does not remove the atoms in these\nviews from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -486,6 +517,7 @@ void register_FF_class(){ "remove" , remove_function_value , ( bp::arg("molnum"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Completely remove the molecule with number molnum from the\nforcefield groups identified by mgid\nThrow: SireMol::missing_group\n" ); } @@ -498,6 +530,7 @@ void register_FF_class(){ "remove" , remove_function_value , ( bp::arg("molnums"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the molecules whose numbers are in molnums\nfrom all of the forcefield groups identified by mgid\nThrow: SireMol::missing_group\n" ); } @@ -510,6 +543,7 @@ void register_FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Completely remove all of the molecules from the groups identified\nby mgid\nThrow: SireMol::missing_group\n" ); } @@ -522,6 +556,7 @@ void register_FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the view molview from the specified groups in this\nforcefield. Note that this only removes the specific view\n(and indeed all copies of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -534,6 +569,7 @@ void register_FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views of the molecule in molviews from the specified\ngroups in this forcefield. Note that this only removes the specific view\n(and indeed all copies of this view if there\nare duplicates) - it does not remove the atoms in these\nviews from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -546,6 +582,7 @@ void register_FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views of the molecules in molecules from the specified\ngroups in this forcefield. Note that this only removes the specific view\n(and indeed all copies of this view if there\nare duplicates) - it does not remove the atoms in these\nviews from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -558,6 +595,7 @@ void register_FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views of the molecules in the molecule group molgroup f\nfrom the specified groups in this forcefield. Note that this only\nremoves the specific view (and indeed all copies of this view\nif there are duplicates) - it does not remove the atoms in these\nviews from all of the other views\nThrow: SireMol::missing_group\n" ); } @@ -570,6 +608,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview") ) + , bp::release_gil_policy() , "Set the contents of this forcefield to just contain molview,\nusing the default locations to find the properties that contain\nthe forcefield parameters for this molecule\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -582,6 +621,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview") ) + , bp::release_gil_policy() , "Set the contents of this forcefield to the molecule views in molviews,\nusing the default locations to find the properties that contain\nthe forcefield parameters for this molecule\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -594,6 +634,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules") ) + , bp::release_gil_policy() , "Set the contents of this forcefield to the molecules molecules,\nusing the default locations to find the properties that contain\nthe forcefield parameters for this molecule\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -606,6 +647,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the contents of this forcefield to contains the molecules in molgroup,\nusing the default locations to find the properties that contain\nthe forcefield parameters for this molecule\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -618,6 +660,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the forcefield groups identified by mgid\nso that they only contain the molecule viewed in molview.\nThis will use the version of the molecule that exists already\nin this forcefield, not the version in molview\nThis will use the supplied map to find the property names\nof the parameters required by this forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -630,6 +673,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the forcefield groups identified by mgid\nso that they only contain the molecule views in molviews.\nThis will use the version of the molecule that exists already\nin this forcefield, not the version in molview\nThis will use the supplied map to find the property names\nof the parameters required by this forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -642,6 +686,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the forcefield groups identified by mgid\nso that they only contain the molecules in molecules.\nThis will use the version of the molecule that exists already\nin this forcefield, not the version in molview\nThis will use the supplied map to find the property names\nof the parameters required by this forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -654,6 +699,7 @@ void register_FF_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the forcefield groups identified by mgid\nso that they only contain the molecules contained in molgroup.\nThis will use the version of the molecule that exists already\nin this forcefield, not the version in molview\nThis will use the supplied map to find the property names\nof the parameters required by this forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -666,6 +712,7 @@ void register_FF_class(){ "setName" , setName_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Set the name of this forcefield" ); } @@ -678,6 +725,7 @@ void register_FF_class(){ "setName" , setName_function_value , ( bp::arg("mgid"), bp::arg("name") ) + , bp::release_gil_policy() , "Set the name of the forcefield groups identified by mgid\nThrow: SireMol::missing_group\n" ); } @@ -690,6 +738,7 @@ void register_FF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the property with name name to have the value value\n\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -701,6 +750,7 @@ void register_FF_class(){ FF_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this forcefield" ); } @@ -712,6 +762,7 @@ void register_FF_class(){ FF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -771,6 +822,7 @@ void register_FF_class(){ FF_exposer.def( "version" , version_function_value + , bp::release_gil_policy() , "Return the version number of this copy of the forcefield" ); } @@ -782,6 +834,7 @@ void register_FF_class(){ FF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the class name of the forcefield" ); } diff --git a/wrapper/FF/FF3D.pypp.cpp b/wrapper/FF/FF3D.pypp.cpp index 3b3e25775..f6fc8ebb5 100644 --- a/wrapper/FF/FF3D.pypp.cpp +++ b/wrapper/FF/FF3D.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireFF::FF3D&){ return "SireFF::FF3D";} +#include "Helpers/release_gil_policy.hpp" + void register_FF3D_class(){ { //::SireFF::FF3D @@ -173,6 +175,7 @@ void register_FF3D_class(){ FF3D_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FFComponent.pypp.cpp b/wrapper/FF/FFComponent.pypp.cpp index c5b691d4c..9c340b3dc 100644 --- a/wrapper/FF/FFComponent.pypp.cpp +++ b/wrapper/FF/FFComponent.pypp.cpp @@ -24,6 +24,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FFComponent_class(){ { //::SireFF::FFComponent @@ -38,6 +40,7 @@ void register_FFComponent_class(){ FFComponent_exposer.def( "componentName" , componentName_function_value + , bp::release_gil_policy() , "Return the name of the component of the potential energy\nsurface that this symbol represents" ); } @@ -49,6 +52,7 @@ void register_FFComponent_class(){ FFComponent_exposer.def( "forceFieldName" , forceFieldName_function_value + , bp::release_gil_policy() , "Return the name of the forcefield that owns this component" ); } @@ -60,6 +64,7 @@ void register_FFComponent_class(){ FFComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -71,7 +76,7 @@ void register_FFComponent_class(){ FFComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -83,6 +88,7 @@ void register_FFComponent_class(){ FFComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -94,6 +100,7 @@ void register_FFComponent_class(){ FFComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FFDetail.pypp.cpp b/wrapper/FF/FFDetail.pypp.cpp index 05d74bfa3..a1fa768c9 100644 --- a/wrapper/FF/FFDetail.pypp.cpp +++ b/wrapper/FF/FFDetail.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FFDetail_class(){ { //::SireFF::FFDetail @@ -42,6 +44,7 @@ void register_FFDetail_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that this forcefield is compatible with other" ); } @@ -53,6 +56,7 @@ void register_FFDetail_class(){ FFDetail_exposer.def( "forcefields" , forcefields_function_value + , bp::release_gil_policy() , "Return a list of all of the forcefields that have been registered" ); } @@ -65,6 +69,7 @@ void register_FFDetail_class(){ "get" , get_function_value , ( bp::arg("forcefield") ) + , bp::release_gil_policy() , "Return the forcefield that has been registered with this name. This\nreturns a null property if there is no property with this name" ); } @@ -77,6 +82,7 @@ void register_FFDetail_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +94,7 @@ void register_FFDetail_class(){ FFDetail_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is null" ); } @@ -99,6 +106,7 @@ void register_FFDetail_class(){ FFDetail_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of the forcefield" ); } @@ -125,6 +133,7 @@ void register_FFDetail_class(){ FFDetail_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return all of the properties of this forcefield type" ); } @@ -136,6 +145,7 @@ void register_FFDetail_class(){ FFDetail_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FFID.pypp.cpp b/wrapper/FF/FFID.pypp.cpp index 7529028c2..2c6a1c789 100644 --- a/wrapper/FF/FFID.pypp.cpp +++ b/wrapper/FF/FFID.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FFID_class(){ { //::SireFF::FFID @@ -42,6 +44,7 @@ void register_FFID_class(){ "map" , map_function_value , ( bp::arg("ffields") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +96,7 @@ void register_FFID_class(){ FFID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FFIdx.pypp.cpp b/wrapper/FF/FFIdx.pypp.cpp index eeaea7473..8e2775a33 100644 --- a/wrapper/FF/FFIdx.pypp.cpp +++ b/wrapper/FF/FFIdx.pypp.cpp @@ -21,6 +21,8 @@ SireFF::FFIdx __copy__(const SireFF::FFIdx &other){ return SireFF::FFIdx(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FFIdx_class(){ { //::SireFF::FFIdx @@ -37,6 +39,7 @@ void register_FFIdx_class(){ FFIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_FFIdx_class(){ FFIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +64,7 @@ void register_FFIdx_class(){ "map" , map_function_value , ( bp::arg("ffields") ) + , bp::release_gil_policy() , "Short cut function to map this index to the index of the\nmatching forcefield in the passed ForceFields object\nThrow: SireError::invalid_index\n" ); } @@ -71,6 +76,7 @@ void register_FFIdx_class(){ FFIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_FFIdx_class(){ FFIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +113,7 @@ void register_FFIdx_class(){ FFIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +125,7 @@ void register_FFIdx_class(){ FFIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FFMolGroup.pypp.cpp b/wrapper/FF/FFMolGroup.pypp.cpp index 8f81d983f..1e3ec62ec 100644 --- a/wrapper/FF/FFMolGroup.pypp.cpp +++ b/wrapper/FF/FFMolGroup.pypp.cpp @@ -44,6 +44,8 @@ SireFF::FFMolGroup __copy__(const SireFF::FFMolGroup &other){ return SireFF::FFM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FFMolGroup_class(){ { //::SireFF::FFMolGroup @@ -61,6 +63,7 @@ void register_FFMolGroup_class(){ FFMolGroup_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +76,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -85,6 +89,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -97,6 +102,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -109,6 +115,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -121,6 +128,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +141,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -145,6 +154,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -157,6 +167,7 @@ void register_FFMolGroup_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -169,6 +180,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -181,6 +193,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -193,6 +206,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -205,6 +219,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -217,6 +232,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -229,6 +245,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -241,6 +258,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -253,6 +271,7 @@ void register_FFMolGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -264,7 +283,7 @@ void register_FFMolGroup_class(){ FFMolGroup_exposer.def( "forceField" , forceField_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield that contains this molecule group" ); } @@ -276,6 +295,7 @@ void register_FFMolGroup_class(){ FFMolGroup_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this group in the parent forcefield" ); } @@ -287,6 +307,7 @@ void register_FFMolGroup_class(){ FFMolGroup_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "" ); } @@ -325,6 +346,7 @@ void register_FFMolGroup_class(){ "remove" , remove_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -337,6 +359,7 @@ void register_FFMolGroup_class(){ "remove" , remove_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -349,6 +372,7 @@ void register_FFMolGroup_class(){ "remove" , remove_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -361,6 +385,7 @@ void register_FFMolGroup_class(){ "remove" , remove_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -373,6 +398,7 @@ void register_FFMolGroup_class(){ "remove" , remove_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "" ); } @@ -385,6 +411,7 @@ void register_FFMolGroup_class(){ "remove" , remove_function_value , ( bp::arg("molnums") ) + , bp::release_gil_policy() , "" ); } @@ -397,6 +424,7 @@ void register_FFMolGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -409,6 +437,7 @@ void register_FFMolGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -421,6 +450,7 @@ void register_FFMolGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -433,6 +463,7 @@ void register_FFMolGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -444,6 +475,7 @@ void register_FFMolGroup_class(){ FFMolGroup_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "" ); } @@ -456,6 +488,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -468,6 +501,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -480,6 +514,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +527,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -504,6 +540,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -516,6 +553,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -528,6 +566,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -540,6 +579,7 @@ void register_FFMolGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -552,6 +592,7 @@ void register_FFMolGroup_class(){ "setName" , setName_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Set the name of this molecule group" ); } @@ -563,6 +604,7 @@ void register_FFMolGroup_class(){ FFMolGroup_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -610,6 +652,7 @@ void register_FFMolGroup_class(){ FFMolGroup_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FFName.pypp.cpp b/wrapper/FF/FFName.pypp.cpp index f6b9cd983..2c8183297 100644 --- a/wrapper/FF/FFName.pypp.cpp +++ b/wrapper/FF/FFName.pypp.cpp @@ -21,6 +21,8 @@ SireFF::FFName __copy__(const SireFF::FFName &other){ return SireFF::FFName(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FFName_class(){ { //::SireFF::FFName @@ -38,6 +40,7 @@ void register_FFName_class(){ FFName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -49,6 +52,7 @@ void register_FFName_class(){ FFName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_FFName_class(){ "map" , map_function_value , ( bp::arg("ffields") ) + , bp::release_gil_policy() , "Map this name to the index of the matching forcefield in the\npassed ForceFields object\nThrow: SireFF::missing_forcefield\n" ); } @@ -88,6 +93,7 @@ void register_FFName_class(){ FFName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +105,7 @@ void register_FFName_class(){ FFName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -110,6 +117,7 @@ void register_FFName_class(){ FFName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/FieldTable.pypp.cpp b/wrapper/FF/FieldTable.pypp.cpp index b6fd5fa86..17832e9e7 100644 --- a/wrapper/FF/FieldTable.pypp.cpp +++ b/wrapper/FF/FieldTable.pypp.cpp @@ -35,6 +35,8 @@ SireFF::FieldTable __copy__(const SireFF::FieldTable &other){ return SireFF::Fie const char* pvt_get_name(const SireFF::FieldTable&){ return "SireFF::FieldTable";} +#include "Helpers/release_gil_policy.hpp" + void register_FieldTable_class(){ { //::SireFF::FieldTable @@ -56,6 +58,7 @@ void register_FieldTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the contents of the table other onto this table. This will only\nadd the fields for the molecules grids that are in both tables" ); } @@ -68,6 +71,7 @@ void register_FieldTable_class(){ "add" , add_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Add the field field onto all of the atom grid points in this table" ); } @@ -80,6 +84,7 @@ void register_FieldTable_class(){ "assertContainsTableFor" , assertContainsTableFor_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Assert that this contains a table for the molecule with number molnum\nThrow: SireError::unavailable_resource\n" ); } @@ -92,6 +97,7 @@ void register_FieldTable_class(){ "assertContainsTableFor" , assertContainsTableFor_function_value , ( bp::arg("grid") ) + , bp::release_gil_policy() , "Assert that this contains a table for the passed grid\nThrow: SireError::unavailable_resource\n" ); } @@ -130,6 +136,7 @@ void register_FieldTable_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this contains a table for the passed grid" ); } @@ -142,6 +149,7 @@ void register_FieldTable_class(){ "contains" , contains_function_value , ( bp::arg("grid") ) + , bp::release_gil_policy() , "Return whether or not this contains a table for the passed grid" ); } @@ -154,6 +162,7 @@ void register_FieldTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the field at all atom and grid points by value" ); } @@ -204,6 +213,7 @@ void register_FieldTable_class(){ "indexOf" , indexOf_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the index of the molecule with number molnum in this table\nThrow: SireMol::missing_molecule\n" ); } @@ -216,6 +226,7 @@ void register_FieldTable_class(){ "initialiseTable" , initialiseTable_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Initialise the table for the molecule with number molnum" ); } @@ -228,6 +239,7 @@ void register_FieldTable_class(){ "initialiseTable" , initialiseTable_function_value , ( bp::arg("grid") ) + , bp::release_gil_policy() , "Initialise the table for the grid grid" ); } @@ -239,6 +251,7 @@ void register_FieldTable_class(){ FieldTable_exposer.def( "initialiseTables" , initialiseTables_function_value + , bp::release_gil_policy() , "Initialise all of the tables to have a zero field" ); } @@ -250,6 +263,7 @@ void register_FieldTable_class(){ FieldTable_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this table is empty" ); } @@ -261,6 +275,7 @@ void register_FieldTable_class(){ FieldTable_exposer.def( "molNums" , molNums_function_value + , bp::release_gil_policy() , "" ); } @@ -273,6 +288,7 @@ void register_FieldTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the field at all atom and grid points by value" ); } @@ -284,6 +300,7 @@ void register_FieldTable_class(){ FieldTable_exposer.def( "nGrids" , nGrids_function_value + , bp::release_gil_policy() , "" ); } @@ -295,6 +312,7 @@ void register_FieldTable_class(){ FieldTable_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "" ); } @@ -342,6 +360,7 @@ void register_FieldTable_class(){ "setAll" , setAll_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Set the field at all atom and grid points equal to field" ); } @@ -354,6 +373,7 @@ void register_FieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the contents of the table other from this table. This will only\nsubtract the fields for the molecules grids that are in both tables" ); } @@ -366,6 +386,7 @@ void register_FieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Subtract the field field from all of the atom grid points in this table" ); } @@ -377,6 +398,7 @@ void register_FieldTable_class(){ FieldTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -388,6 +410,7 @@ void register_FieldTable_class(){ FieldTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/ForceFields.pypp.cpp b/wrapper/FF/ForceFields.pypp.cpp index 9f6e28751..39c8a1650 100644 --- a/wrapper/FF/ForceFields.pypp.cpp +++ b/wrapper/FF/ForceFields.pypp.cpp @@ -84,6 +84,8 @@ SireFF::ForceFields __copy__(const SireFF::ForceFields &other){ return SireFF::F #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ForceFields_class(){ @@ -104,6 +106,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Ensure that any forcefields that are using temporary workspace have that accepted" ); } @@ -116,6 +119,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("forcefield") ) + , bp::release_gil_policy() , "Add the forcefield forcefield to this set. This will raise\nan exception if this forcefield (or one with the same name)\nis already present in this set. Note that if the added\nforcefield will be updated to contain the versions of\nany molecules that are already present in any of the\nother forcefields.\nThrow: SireFF::duplicate_forcefield\nThrow: SireMol::duplicate_group\n" ); } @@ -128,6 +132,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecule view molview to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -140,6 +145,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the views of the molecule in molviews to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -152,6 +158,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecules in molecules to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -164,6 +171,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecules in the molecule group molgroup to the molecule\ngroups identified by mgid, using the supplied property map to find the\nproperties required for the forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -176,6 +184,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecule view molview to the molecule groups identified\nby mgid, using the default locations to find any properties\nrequired by the forcefields.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -188,6 +197,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecule views in molviews to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -200,6 +210,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecules in molecules to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -212,6 +223,7 @@ void register_ForceFields_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecules in the molecule group molgroup to the molecule\ngroups identified by mgid, using the supplied property map to\nfind the properties required for the forcefield\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -224,6 +236,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecule view molview to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield. This only adds the view to groups\nthat dont already contain this view.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -236,6 +249,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecule views in molviews to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield. This only adds the view to groups\nthat dont already contain this view.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -248,6 +262,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecules in molecules to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield. This only adds the view to groups\nthat dont already contain this view.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -260,6 +275,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecules in the molecule group molgroup to the molecule\ngroups identified by mgid, using the supplied property map to\nfind the properties required for the forcefield. This only adds the\nview to groups that dont already contain this view.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -272,6 +288,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecule view molview to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield. Only views that arent already in\nthe forcefield are added.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -284,6 +301,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecule views in molviews to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield. Only views that arent already in\nthe forcefield are added.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -296,6 +314,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecules in molecules to the molecule groups identified\nby mgid, using the supplied property map to find the properties\nrequired for the forcefield. Only views that arent already in\nthe forcefield are added.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -308,6 +327,7 @@ void register_ForceFields_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecules in the molecule group molgroup to the molecule\ngroups identified by mgid, using the supplied property map to\nfind the properties required for the forcefield. Only views that\narent already in the forcefield are added.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_parameter\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -320,7 +340,7 @@ void register_ForceFields_class(){ "at" , at_function_value , ( bp::arg("ffname") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield with name ffname\nThrow: SireFF::missing_forcefield\n" ); } @@ -333,7 +353,7 @@ void register_ForceFields_class(){ "at" , at_function_value , ( bp::arg("ffidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield at index ffidx\nThrow: SireError::invalid_index\n" ); } @@ -346,7 +366,7 @@ void register_ForceFields_class(){ "at" , at_function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield with ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -359,7 +379,7 @@ void register_ForceFields_class(){ "at" , at_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "overloading MolGroupsBase virtual functions" ); } @@ -371,6 +391,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "builtinProperties" , builtinProperties_function_value + , bp::release_gil_policy() , "Return all of the built-in properties of the forcefields in this set" ); } @@ -383,7 +404,7 @@ void register_ForceFields_class(){ "builtinProperty" , builtinProperty_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the built-in property at name. This will by-pass any\nuser-supplied property with this name, and will raise an\nexception if there is no built-in property with this name\nThrow: SireBase::missing_property\n" ); } @@ -396,6 +417,7 @@ void register_ForceFields_class(){ "componentExpression" , componentExpression_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the expression for the constant or energy component\nrepresented by symbol\nThrow: SireFF::missing_component\n" ); } @@ -408,6 +430,7 @@ void register_ForceFields_class(){ "componentExpressions" , componentExpressions_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Return all of the expressions for the constant or energy\ncomponents whose symbols are in symbols\nThrow: SireFF::missing_component\n" ); } @@ -419,6 +442,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "componentExpressions" , componentExpressions_function_value + , bp::release_gil_policy() , "Return all of the constant and energy expressions attached\nto these forcefields" ); } @@ -430,6 +454,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "componentSymbols" , componentSymbols_function_value + , bp::release_gil_policy() , "Return the symbols representing all of the constant and energy components" ); } @@ -442,6 +467,7 @@ void register_ForceFields_class(){ "componentValue" , componentValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the energy or constant component associated with the symbol symbol\nThrow: SireFF::missing_component\n" ); } @@ -454,6 +480,7 @@ void register_ForceFields_class(){ "componentValues" , componentValues_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Return the values of the energy or constant components whose\nsymbols are in symbols\nThrow: SireFF::missing_component\n" ); } @@ -465,6 +492,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "componentValues" , componentValues_function_value + , bp::release_gil_policy() , "Return the values of all energy and constant components" ); } @@ -477,7 +505,7 @@ void register_ForceFields_class(){ "compoundProperty" , compoundProperty_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the raw compound property with name name - this returns\nthe property representing the link, or the combined property,\nand raises an exception if a compound property with this name\ndoes not exist\nThrow: SireBase::missing_property\n" ); } @@ -490,6 +518,7 @@ void register_ForceFields_class(){ "constant" , constant_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return the value associated with the constant component component\nThrow: SireFF::missing_component\n" ); } @@ -501,6 +530,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "constantComponents" , constantComponents_function_value + , bp::release_gil_policy() , "Synonym for ForceFields::constants()" ); } @@ -513,6 +543,7 @@ void register_ForceFields_class(){ "constantExpression" , constantExpression_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the expression for the constant component symbol\nThrow: SireFF::missing_component\n" ); } @@ -525,6 +556,7 @@ void register_ForceFields_class(){ "constantExpressions" , constantExpressions_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Return the expressions for the constant components in symbols\nThrow: SireFF::missing_component\n" ); } @@ -536,6 +568,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "constantExpressions" , constantExpressions_function_value + , bp::release_gil_policy() , "Return all of the constant expressions in the forcefields" ); } @@ -547,6 +580,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "constantSymbols" , constantSymbols_function_value + , bp::release_gil_policy() , "Return the symbols representing the constant forcefield components" ); } @@ -558,6 +592,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "constants" , constants_function_value + , bp::release_gil_policy() , "Return the values of all constant components in the forcefields" ); } @@ -570,6 +605,7 @@ void register_ForceFields_class(){ "constants" , constants_function_value , ( bp::arg("components") ) + , bp::release_gil_policy() , "Return the constant values associated with the constant components\nin components\nThrow: SireFF::missing_component\n" ); } @@ -582,6 +618,7 @@ void register_ForceFields_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields contain the property\nwith name name" ); } @@ -594,6 +631,7 @@ void register_ForceFields_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("ffid"), bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields that match the ID ffid\ncontain the property with name name\nNote that because this operates on the level of individual forcefields,\nit can only return built-in properties, and ignores any\nuser-supplied properties\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -606,6 +644,7 @@ void register_ForceFields_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields contain the property\nwith name name" ); } @@ -618,6 +657,7 @@ void register_ForceFields_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("ffid"), bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields that match the ID ffid\ncontain the property with name name\nNote that because this operates on the level of individual forcefields,\nit can only return built-in properties, and ignores any\nuser-supplied properties\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -629,6 +669,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "energies" , energies_function_value + , bp::release_gil_policy() , "Return the energies of all of the energy components of all of the forcefields,\nconstants and expressions" ); } @@ -641,6 +682,7 @@ void register_ForceFields_class(){ "energies" , energies_function_value , ( bp::arg("components") ) + , bp::release_gil_policy() , "Return the energies of all of the energy components whose symbols are\nlisted in components\nThrow: SireFF::missing_component\n" ); } @@ -652,6 +694,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "Return the energy of this set of forcefields. This uses the supplied\ntotal energy function to calculate the energy, if one exists,\nor it just calculates the sum of the total energies of all of the\ncontained forcefields" ); } @@ -664,6 +707,7 @@ void register_ForceFields_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return the energy associated with the symbol component. This component\nmay either be a component of one of the constituent forcefields,\nor it may represent a function of the forcefield components\nThrow: SireFF::missing_component\n" ); } @@ -699,6 +743,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "energyComponents" , energyComponents_function_value + , bp::release_gil_policy() , "Synonym for ForceFields::energies()" ); } @@ -711,6 +756,7 @@ void register_ForceFields_class(){ "energyExpression" , energyExpression_function_value , ( bp::arg("expression") ) + , bp::release_gil_policy() , "Return the energy expression for the symbol component\nThrow: SireFF::missing_component\n" ); } @@ -723,6 +769,7 @@ void register_ForceFields_class(){ "energyExpressions" , energyExpressions_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Return the energy expressions for the components whose\nsymbols are in symbols\nThrow: SireFF::missing_component\n" ); } @@ -734,6 +781,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "energyExpressions" , energyExpressions_function_value + , bp::release_gil_policy() , "Return all of the energy expressions in this forcefield" ); } @@ -745,6 +793,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "energySymbols" , energySymbols_function_value + , bp::release_gil_policy() , "Return all of the symbols that represent energy components" ); } @@ -757,6 +806,7 @@ void register_ForceFields_class(){ "ffIdx" , ffIdx_function_value , ( bp::arg("ffname") ) + , bp::release_gil_policy() , "Return the index of the forcefield with name ffname\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\n" ); } @@ -769,6 +819,7 @@ void register_ForceFields_class(){ "ffIdx" , ffIdx_function_value , ( bp::arg("ffidx") ) + , bp::release_gil_policy() , "Simple function that allows a shortcut for ffIdx(FFIdx)\nThrow: SireError::invalid_index\n" ); } @@ -781,6 +832,7 @@ void register_ForceFields_class(){ "ffIdx" , ffIdx_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return the FFIdx of the forcefield that matches the ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -793,7 +845,7 @@ void register_ForceFields_class(){ "ffName" , ffName_function_value , ( bp::arg("ffname") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Simple function that short cuts ffName(FFName)\nThrow: SireFF::missing_forcefield\n" ); } @@ -806,7 +858,7 @@ void register_ForceFields_class(){ "ffName" , ffName_function_value , ( bp::arg("ffidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the forcefield at index ffidx\nThrow: SireError::invalid_index\n" ); } @@ -819,7 +871,7 @@ void register_ForceFields_class(){ "ffName" , ffName_function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the forcefield that matches the ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -831,6 +883,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "ffNames" , ffNames_function_value + , bp::release_gil_policy() , "Return a list of all of the forcefield names, ordered in the same\norder as the forcefields appear in this set" ); } @@ -843,6 +896,7 @@ void register_ForceFields_class(){ "ffNames" , ffNames_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return the names of all of the forcefields that match the ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -927,7 +981,7 @@ void register_ForceFields_class(){ "forceField" , forceField_function_value , ( bp::arg("ffname") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield with name ffname\nThrow: SireFF::missing_forcefield\n" ); } @@ -940,7 +994,7 @@ void register_ForceFields_class(){ "forceField" , forceField_function_value , ( bp::arg("ffidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield at index ffidx\nThrow: SireError::invalid_index\n" ); } @@ -953,7 +1007,7 @@ void register_ForceFields_class(){ "forceField" , forceField_function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield with ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -966,7 +1020,7 @@ void register_ForceFields_class(){ "forceField" , forceField_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield that contains the molecule group with\nnumber mgnum\nThrow: SireMol::missing_group\n" ); } @@ -991,6 +1045,7 @@ void register_ForceFields_class(){ "forceFields" , forceFields_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return the list of all forcefields that match the ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -1003,6 +1058,7 @@ void register_ForceFields_class(){ "forceFieldsWithProperty" , forceFieldsWithProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the list of all forcefields that contain a property with name name\nNote that because this operates on the level of individual forcefields,\nit can only return built-in properties, and ignores any\nuser-supplied properties\nThrow: SireBase::missing_property\n" ); } @@ -1015,6 +1071,7 @@ void register_ForceFields_class(){ "forceFieldsWithProperty" , forceFieldsWithProperty_function_value , ( bp::arg("ffid"), bp::arg("name") ) + , bp::release_gil_policy() , "Return the list of forcefields that match the ID ffid and that\ncontain the property with name name\nNote that because this operates on the level of individual forcefields,\nit can only return built-in properties, and ignores any\nuser-supplied properties\nThrow: SireFF::missing_forcefield\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\n" ); } @@ -1027,6 +1084,7 @@ void register_ForceFields_class(){ "hasComponent" , hasComponent_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return whether or not there is a constant or energy component with symbol symbol" ); } @@ -1039,6 +1097,7 @@ void register_ForceFields_class(){ "hasConstantComponent" , hasConstantComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not there is a constant component in the\nforcefield expressions with symbol component" ); } @@ -1051,6 +1110,7 @@ void register_ForceFields_class(){ "hasEnergyComponent" , hasEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not the forcefields have an energy component\nwith symbol component" ); } @@ -1063,6 +1123,7 @@ void register_ForceFields_class(){ "isBuiltinProperty" , isBuiltinProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not the property name exists and is a builtin\nproperty of one of the forcefields in this set" ); } @@ -1074,6 +1135,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "isClean" , isClean_function_value + , bp::release_gil_policy() , "Return whether or not all of the forcefields in this set are clean\n(there have been no changes since the last energy evaluation)" ); } @@ -1086,6 +1148,7 @@ void register_ForceFields_class(){ "isCompoundProperty" , isCompoundProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not the property name exists and is a compound\nproperty (either a link or a combined property)" ); } @@ -1098,6 +1161,7 @@ void register_ForceFields_class(){ "isConstantComponent" , isConstantComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not the forcefield component component\nis a constant component\nThrow: SireFF::missing_component\n" ); } @@ -1109,6 +1173,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "isDirty" , isDirty_function_value + , bp::release_gil_policy() , "Return whether or not any of the forcefields in this set are dirty\n(the molecules have changed since the last energy calculation)" ); } @@ -1121,6 +1186,7 @@ void register_ForceFields_class(){ "isEnergyComponent" , isEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not the forcefield component component\nis an energy component\nThrow: SireFF::missing_component\n" ); } @@ -1133,6 +1199,7 @@ void register_ForceFields_class(){ "isUserProperty" , isUserProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not the property name exists and is a user\nsupplied property (either a compound property or an extra\nForceFields property)" ); } @@ -1157,6 +1224,7 @@ void register_ForceFields_class(){ "map" , map_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "" ); } @@ -1169,6 +1237,7 @@ void register_ForceFields_class(){ "map" , map_function_value , ( bp::arg("ffidx") ) + , bp::release_gil_policy() , "" ); } @@ -1181,6 +1250,7 @@ void register_ForceFields_class(){ "map" , map_function_value , ( bp::arg("ffname") ) + , bp::release_gil_policy() , "" ); } @@ -1192,6 +1262,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell all of the forcefields that they must now recalculate their\nenergies from scratch. This is a good way to debug the forcefields,\nbut may also speed up cases where you know in advance that you will\nbe moving most (or all) of the molecules between energy calculations" ); } @@ -1203,6 +1274,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "nForceFields" , nForceFields_function_value + , bp::release_gil_policy() , "Return the number of forcefields in this set" ); } @@ -1214,6 +1286,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "names" , names_function_value + , bp::release_gil_policy() , "Return a list of all of the forcefield names, ordered in the same\norder as the forcefields appear in this set" ); } @@ -1225,6 +1298,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not these forcefields are using any temporary workspace that needs\nto be accepted" ); } @@ -1252,7 +1326,7 @@ void register_ForceFields_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("ffname") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1265,7 +1339,7 @@ void register_ForceFields_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("ffidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1278,7 +1352,7 @@ void register_ForceFields_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1338,6 +1412,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return all of the properties in all of the forcefields. This will raise\nan error if there are properties with the same name in different\nforcefields that have different values.\nThrow: SireBase::duplicate_property\n" ); } @@ -1350,6 +1425,7 @@ void register_ForceFields_class(){ "properties" , properties_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return all of the properties in all of the forcefields identified by\nthe ID ffid. This will raise an error if there are properties with\nthe same name in different forcefields that have different values.\nNote that because this operates on the level of individual forcefields,\nit can only return built-in properties, and ignores any\nuser-supplied properties\nThrow: SireBase::duplicate_property\n" ); } @@ -1362,7 +1438,7 @@ void register_ForceFields_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the property with name name. This returns\nthe property if it exists in at least one forcefield, and\nif all occurances of the property have the same value\nThrow: SireBase::duplicate_property\nThrow: SireBase::missing_property\n" ); } @@ -1375,7 +1451,7 @@ void register_ForceFields_class(){ "property" , property_function_value , ( bp::arg("ffid"), bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the property name in the forcefields identified\nby the ID ffid\nNote that because this operates on the level of individual forcefields,\nit can only return built-in properties, and ignores any\nuser-supplied properties\nThrow: SireBase::duplicate_property\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireBase::missing_property\n" ); } @@ -1387,6 +1463,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the names of all of the properties in all of the forcefields" ); } @@ -1399,6 +1476,7 @@ void register_ForceFields_class(){ "propertyKeys" , propertyKeys_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return the names of all of the properties in the forcefields\nidentified by the ID ffid\nNote that because this operates on the level of individual forcefields,\nit can only return built-in properties, and ignores any\nuser-supplied properties\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -1411,6 +1489,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("ffidx") ) + , bp::release_gil_policy() , "Remove the forcefield at index ffidx from this set\nThrow: SireError::invalid_index\n" ); } @@ -1423,6 +1502,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("ffname") ) + , bp::release_gil_policy() , "Remove the forcefield with name ffname.\nThrow: SireFF::missing_forcefield\n" ); } @@ -1435,6 +1515,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Remove the forcefield(s) that match the ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -1447,6 +1528,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the view molview from the specified groups in this\nforcefield. Note that this only removes the specific view\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1459,6 +1541,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views in molviews from the specified groups in this\nforcefield. Note that this only removes the specific views\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1471,6 +1554,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove them molecules in molecules from the specified groups in this\nforcefield. Note that this only removes the specific views\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1483,6 +1567,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views in the molecule group molgroup from the specified\ngroups in this forcefield. Note that this only removes the specific views\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1495,6 +1580,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("molnum"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all views of the molecule with number molnum from the molecule\ngroups identified by mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1507,6 +1593,7 @@ void register_ForceFields_class(){ "remove" , remove_function_value , ( bp::arg("molnums"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the molecules whose numbers are in molnums from\nall of the molecule groups identified by the ID mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1519,6 +1606,7 @@ void register_ForceFields_class(){ "removeAll" , removeAll_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the molecule views that are contained in the molecule\ngroups identified by the ID mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1531,6 +1619,7 @@ void register_ForceFields_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the view in molview from the specified\ngroups in this forcefield. Note that this only removes the specific views\n- it does not remove the atoms in this view from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1543,6 +1632,7 @@ void register_ForceFields_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the views in molviews from the specified\ngroups in this forcefield. Note that this only removes the specific views\n- it does not remove the atoms in this view from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1555,6 +1645,7 @@ void register_ForceFields_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the molecules in molecules from the specified\ngroups in this forcefield. Note that this only removes the specific views\n- it does not remove the atoms in this view from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1567,6 +1658,7 @@ void register_ForceFields_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the molecules in the molecule group molgroup\nfrom the specified groups in this forcefield. Note that this only removes\nthe specific views - it does not remove the atoms in this view from all\nof the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1578,6 +1670,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "removeAllForceFields" , removeAllForceFields_function_value + , bp::release_gil_policy() , "Remove all of the forcefields from this set" ); } @@ -1590,6 +1683,7 @@ void register_ForceFields_class(){ "removeProperty" , removeProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Remove the property with name name. Note that this can only\nremove user-level properties - it cannot remove built-in properties\nof the forcefields. This does nothing if there is no user-level\nproperty with this name" ); } @@ -1602,6 +1696,7 @@ void register_ForceFields_class(){ "setComponent" , setComponent_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the component represented by the symbol symbol equal to the\nvalue value. This replaces any existing component with this value.\nNote that an exception will be raised if you try to replace a component\nthat exists in one of the constituent forcefields.\nThis is a convenient shorthand for ForceFields::setConstantComponent(symbol, value)\nThrow: SireFF::duplicate_component\n" ); } @@ -1614,6 +1709,7 @@ void register_ForceFields_class(){ "setComponent" , setComponent_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the component represented by the symbol symbol equal to the expression\ncontained in expression. This replaces any existing constant or\nenergy component with this expression.\nNote that this expression must only involve terms that are linear in\nforcefield components, and there may be no products of forcefield\ncomponents (i.e. each term of the expression must have dimensions\nof energy)\nNote that an exception will be raised if you try to replace a\ncomponent that exists in one of the constituent forcefields\nThis is a convenient short-hand for\nForceFields::setEnergyComponent(symbol,expression)\nThrow: SireFF::duplicate_component\n" ); } @@ -1626,6 +1722,7 @@ void register_ForceFields_class(){ "setConstantComponent" , setConstantComponent_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the constant component represented by the symbol symbol equal to the\nvalue value. This replaces any existing constant or energy component with\nthis value. Note that an exception will be raised if you try to replace a component\nthat exists in one of the constituent forcefields.\nThrow: SireFF::duplicate_component\n" ); } @@ -1638,6 +1735,7 @@ void register_ForceFields_class(){ "setConstantComponent" , setConstantComponent_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the constant component represented by the symbol symbol equal to the\nexpression expression. This replaces any existing constant or energy component with\nthis value.\nNote that this expression must only involve constants, or other constant\ncomponents. A constant expression may not depend on a forcefield energy\nNote that an exception will be raised if you try to replace a component\nthat exists in one of the constituent forcefields.\nThrow: SireFF::duplicate_component\n" ); } @@ -1650,6 +1748,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the view of the molecule in molview.\nThe passed property map is used to find any properties that are\nneeded by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1662,6 +1761,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the views of the molecule in molviews.\nThe passed property map is used to find any properties that are\nneeded by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1674,6 +1774,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the molecules in molecules.\nThe passed property map is used to find any properties that are\nneeded by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1686,6 +1787,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the molecules in the group molgroup.\nThe passed property map is used to find any properties that are\nneeded by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1698,6 +1800,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the view of the molecule in molview.\nProperties required by the forcefields are searched for in the\ndefault properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1710,6 +1813,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molviews") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the views of the molecule in molviews.\nProperties required by the forcefields are searched for in the\ndefault properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1722,6 +1826,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the molecules in molecules.\nProperties required by the forcefields are searched for in the\ndefault properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1734,6 +1839,7 @@ void register_ForceFields_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the contents of the molecule groups identified by the ID mgid\nso that they only contain the molecules in the molecule group molgroup.\nProperties required by the forcefields are searched for in the\ndefault properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1746,6 +1852,7 @@ void register_ForceFields_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the component represented by the symbol symbol equal to the expression\ncontained in expression. This replaces any existing constant or\nenergy component with this expression.\nNote that this expression must only involve terms that are linear in\nforcefield components, and there may be no products of forcefield\ncomponents (i.e. each term of the expression must have dimensions\nof energy)\nNote that an exception will be raised if you try to replace a\ncomponent that exists in one of the constituent forcefields\nThrow: SireFF::duplicate_component\n" ); } @@ -1758,6 +1865,7 @@ void register_ForceFields_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the property name to have the value value in all of the\nforcefields contained in this set\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -1770,6 +1878,7 @@ void register_ForceFields_class(){ "setProperty" , setProperty_function_value , ( bp::arg("ffid"), bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the built-in property name to have the value value in all of the forcefields\nin this set that match the ID ffid\nNote that because this operates on the level of individual forcefields,\nit operates only on built-in properties, not on user-supplied properties\nNote also that if this breaks any links or combined properties then\nthe broken links and combined properties (including all those that\ndepend on them) will be removed\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\nThrow: SireError::invalid_cast\n" ); } @@ -1781,6 +1890,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this set" ); } @@ -1792,7 +1902,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "totalComponent" , totalComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the total energy component" ); } @@ -1804,6 +1914,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -1851,6 +1962,7 @@ void register_ForceFields_class(){ ForceFields_exposer.def( "userProperties" , userProperties_function_value + , bp::release_gil_policy() , "Return all of the user-supplied properties in this set of forcefields" ); } @@ -1863,7 +1975,7 @@ void register_ForceFields_class(){ "userProperty" , userProperty_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the user-supplied property at name. This raises an\nexception if there is no user-supplied property with this name\nThrow: SireBase::missing_property\n" ); } diff --git a/wrapper/FF/ForceTable.pypp.cpp b/wrapper/FF/ForceTable.pypp.cpp index 6c3e0f9fa..b8b988d5e 100644 --- a/wrapper/FF/ForceTable.pypp.cpp +++ b/wrapper/FF/ForceTable.pypp.cpp @@ -33,6 +33,8 @@ SireFF::ForceTable __copy__(const SireFF::ForceTable &other){ return SireFF::For const char* pvt_get_name(const SireFF::ForceTable&){ return "SireFF::ForceTable";} +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ForceTable_class(){ @@ -52,6 +54,7 @@ void register_ForceTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the contents of the table other onto this table. This will only\nadd the forces for the molecules grids that are in both tables" ); } @@ -64,6 +67,7 @@ void register_ForceTable_class(){ "add" , add_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto all of the atom grid points in this table" ); } @@ -76,6 +80,7 @@ void register_ForceTable_class(){ "assertContainsTableFor" , assertContainsTableFor_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Assert that this forcetable contains a table for the\nforces for the molecule at number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -101,6 +106,7 @@ void register_ForceTable_class(){ "containsTable" , containsTable_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "" ); } @@ -112,6 +118,7 @@ void register_ForceTable_class(){ ForceTable_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -124,6 +131,7 @@ void register_ForceTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the force at all atom and grid points by value" ); } @@ -161,6 +169,7 @@ void register_ForceTable_class(){ "indexOf" , indexOf_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the index of the molecule with number molnum in this table\nThrow: SireMol::missing_molecule\n" ); } @@ -173,6 +182,7 @@ void register_ForceTable_class(){ "initialiseTable" , initialiseTable_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Initialise all of the forces for the table for the molecule\nwith number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -184,6 +194,7 @@ void register_ForceTable_class(){ ForceTable_exposer.def( "initialiseTables" , initialiseTables_function_value + , bp::release_gil_policy() , "Initialise all of the tables - this resets all of the forces\nback to zero" ); } @@ -195,6 +206,7 @@ void register_ForceTable_class(){ ForceTable_exposer.def( "molNums" , molNums_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +219,7 @@ void register_ForceTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the force at all atom and grid points by value" ); } @@ -254,6 +267,7 @@ void register_ForceTable_class(){ "setAll" , setAll_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Set the force at all atom and grid points equal to force" ); } @@ -266,6 +280,7 @@ void register_ForceTable_class(){ "setTable" , setTable_function_value , ( bp::arg("molnum"), bp::arg("table") ) + , bp::release_gil_policy() , "" ); } @@ -278,6 +293,7 @@ void register_ForceTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the contents of the table other from this table. This will only\nsubtract the forces for the molecules grids that are in both tables" ); } @@ -290,6 +306,7 @@ void register_ForceTable_class(){ "subtract" , subtract_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from all of the atom grid points in this table" ); } @@ -301,6 +318,7 @@ void register_ForceTable_class(){ ForceTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -312,6 +330,7 @@ void register_ForceTable_class(){ ForceTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/G1FF.pypp.cpp b/wrapper/FF/G1FF.pypp.cpp index 6ee64c2fe..8441fc320 100644 --- a/wrapper/FF/G1FF.pypp.cpp +++ b/wrapper/FF/G1FF.pypp.cpp @@ -40,6 +40,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_G1FF_class(){ @@ -56,6 +58,7 @@ void register_G1FF_class(){ G1FF_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the forcefield that the last move was accepted. This tells the\nforcefield to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -68,6 +71,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +84,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -92,6 +97,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -104,6 +110,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -116,6 +123,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +136,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -140,6 +149,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +162,7 @@ void register_G1FF_class(){ "add" , add_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -164,6 +175,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -176,6 +188,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -188,6 +201,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -200,6 +214,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -212,6 +227,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -224,6 +240,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -236,6 +253,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -248,6 +266,7 @@ void register_G1FF_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -260,6 +279,7 @@ void register_G1FF_class(){ "assertContains" , assertContains_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Assert that this forcefield contains the group with number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -272,7 +292,7 @@ void register_G1FF_class(){ "at" , at_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group with number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -284,6 +304,7 @@ void register_G1FF_class(){ G1FF_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield is using temporary workspace that needs\nto be accepted" ); } @@ -296,6 +317,7 @@ void register_G1FF_class(){ "remove" , remove_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +330,7 @@ void register_G1FF_class(){ "remove" , remove_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -320,6 +343,7 @@ void register_G1FF_class(){ "remove" , remove_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -332,6 +356,7 @@ void register_G1FF_class(){ "remove" , remove_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -344,6 +369,7 @@ void register_G1FF_class(){ "remove" , remove_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "" ); } @@ -356,6 +382,7 @@ void register_G1FF_class(){ "remove" , remove_function_value , ( bp::arg("molnums") ) + , bp::release_gil_policy() , "" ); } @@ -367,6 +394,7 @@ void register_G1FF_class(){ G1FF_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "" ); } @@ -379,6 +407,7 @@ void register_G1FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -391,6 +420,7 @@ void register_G1FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -403,6 +433,7 @@ void register_G1FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -415,6 +446,7 @@ void register_G1FF_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -427,6 +459,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -439,6 +472,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -451,6 +485,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -463,6 +498,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -475,6 +511,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -487,6 +524,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -499,6 +537,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -511,6 +550,7 @@ void register_G1FF_class(){ "setContents" , setContents_function_value , ( bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/G2FF.pypp.cpp b/wrapper/FF/G2FF.pypp.cpp index c3ec0a87c..fe6d39f00 100644 --- a/wrapper/FF/G2FF.pypp.cpp +++ b/wrapper/FF/G2FF.pypp.cpp @@ -44,6 +44,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_G2FF_class(){ @@ -60,6 +62,7 @@ void register_G2FF_class(){ G2FF_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the forcefield that the last move was accepted. This tells the\nforcefield to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -72,6 +75,7 @@ void register_G2FF_class(){ "assertContains" , assertContains_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Assert that this forcefield contains the group with number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -84,7 +88,7 @@ void register_G2FF_class(){ "at" , at_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group with number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -96,6 +100,7 @@ void register_G2FF_class(){ G2FF_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield is using any temporary workspace\nthat needs to be accepted" ); } diff --git a/wrapper/FF/GridFieldTable.pypp.cpp b/wrapper/FF/GridFieldTable.pypp.cpp index ccb88c467..b9d935fd6 100644 --- a/wrapper/FF/GridFieldTable.pypp.cpp +++ b/wrapper/FF/GridFieldTable.pypp.cpp @@ -36,6 +36,8 @@ SireFF::GridFieldTable __copy__(const SireFF::GridFieldTable &other){ return Sir const char* pvt_get_name(const SireFF::GridFieldTable&){ return "SireFF::GridFieldTable";} +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GridFieldTable_class(){ @@ -55,6 +57,7 @@ void register_GridFieldTable_class(){ "add" , add_function_value , ( bp::arg("ipoint"), bp::arg("field") ) + , bp::release_gil_policy() , "Add the field field onto the field for the ipointth grid point\nThrow: SireError::invalid_index\n" ); } @@ -67,6 +70,7 @@ void register_GridFieldTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the field in other onto that for this table - this only\nadds the field if the two grids are identical" ); } @@ -79,6 +83,7 @@ void register_GridFieldTable_class(){ "add" , add_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Add the field field to all of the points in this table" ); } @@ -103,6 +108,7 @@ void register_GridFieldTable_class(){ GridFieldTable_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of grid points (and thus field values)" ); } @@ -115,6 +121,7 @@ void register_GridFieldTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the field at all of the points in this table by value" ); } @@ -126,7 +133,7 @@ void register_GridFieldTable_class(){ GridFieldTable_exposer.def( "grid" , grid_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the grid that contains the points at which the field is\nevaluated - the order of points in the grid is the same as the order\nof field values in this table" ); } @@ -138,6 +145,7 @@ void register_GridFieldTable_class(){ GridFieldTable_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "Initialise the field at each grid point to equal 0" ); } @@ -150,6 +158,7 @@ void register_GridFieldTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the field at all of the points in this table by value" ); } @@ -161,6 +170,7 @@ void register_GridFieldTable_class(){ GridFieldTable_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of grid points (and thus field values)" ); } @@ -234,6 +244,7 @@ void register_GridFieldTable_class(){ "setAll" , setAll_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Set the field at all of the points in this table equal to field" ); } @@ -246,6 +257,7 @@ void register_GridFieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("ipoint"), bp::arg("field") ) + , bp::release_gil_policy() , "Subtract the field field from the field for the ipointth grid point\nThrow: SireError::invalid_index\n" ); } @@ -258,6 +270,7 @@ void register_GridFieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the field in other from that for this table - this only\nsubtracts the field if the two grids are identical" ); } @@ -270,6 +283,7 @@ void register_GridFieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Subtract the field field from all of the points in this table" ); } @@ -281,6 +295,7 @@ void register_GridFieldTable_class(){ GridFieldTable_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return the array of field values - the order is the same\nas the order of points in the grid" ); } @@ -292,6 +307,7 @@ void register_GridFieldTable_class(){ GridFieldTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/GridPotentialTable.pypp.cpp b/wrapper/FF/GridPotentialTable.pypp.cpp index a2caa5ec2..a83c6f601 100644 --- a/wrapper/FF/GridPotentialTable.pypp.cpp +++ b/wrapper/FF/GridPotentialTable.pypp.cpp @@ -36,6 +36,8 @@ SireFF::GridPotentialTable __copy__(const SireFF::GridPotentialTable &other){ re const char* pvt_get_name(const SireFF::GridPotentialTable&){ return "SireFF::GridPotentialTable";} +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GridPotentialTable_class(){ @@ -55,6 +57,7 @@ void register_GridPotentialTable_class(){ "add" , add_function_value , ( bp::arg("ipoint"), bp::arg("potential") ) + , bp::release_gil_policy() , "Add the potential potential onto the potential for the ipointth grid point\nThrow: SireError::invalid_index\n" ); } @@ -67,6 +70,7 @@ void register_GridPotentialTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the potential in other onto that for this table - this only\nadds the potential if the two grids are identical" ); } @@ -79,6 +83,7 @@ void register_GridPotentialTable_class(){ "add" , add_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Add the potential potential to all of the points in this table" ); } @@ -103,6 +108,7 @@ void register_GridPotentialTable_class(){ GridPotentialTable_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of grid points (and thus potential values)" ); } @@ -115,6 +121,7 @@ void register_GridPotentialTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the potential at all of the points in this table by value" ); } @@ -126,7 +133,7 @@ void register_GridPotentialTable_class(){ GridPotentialTable_exposer.def( "grid" , grid_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the grid that contains the points at which the potential is\nevaluated - the order of points in the grid is the same as the order\nof potential values in this table" ); } @@ -138,6 +145,7 @@ void register_GridPotentialTable_class(){ GridPotentialTable_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "Initialise the potential at each grid point to equal 0" ); } @@ -150,6 +158,7 @@ void register_GridPotentialTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the potential at all of the points in this table by value" ); } @@ -161,6 +170,7 @@ void register_GridPotentialTable_class(){ GridPotentialTable_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of grid points (and thus potential values)" ); } @@ -234,6 +244,7 @@ void register_GridPotentialTable_class(){ "setAll" , setAll_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Set the potential at all of the points in this table equal to potential" ); } @@ -246,6 +257,7 @@ void register_GridPotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("ipoint"), bp::arg("potential") ) + , bp::release_gil_policy() , "Subtract the potential potential from the potential for the ipointth grid point\nThrow: SireError::invalid_index\n" ); } @@ -258,6 +270,7 @@ void register_GridPotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the potential in other from that for this table - this only\nsubtracts the potential if the two grids are identical" ); } @@ -270,6 +283,7 @@ void register_GridPotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Subtract the potential potential from all of the points in this table" ); } @@ -281,6 +295,7 @@ void register_GridPotentialTable_class(){ GridPotentialTable_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return the array of potential values - the order is the same\nas the order of points in the grid" ); } @@ -292,6 +307,7 @@ void register_GridPotentialTable_class(){ GridPotentialTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/IDAndSet_FFID_.pypp.cpp b/wrapper/FF/IDAndSet_FFID_.pypp.cpp index 366f2eb33..fa7a0dfbd 100644 --- a/wrapper/FF/IDAndSet_FFID_.pypp.cpp +++ b/wrapper/FF/IDAndSet_FFID_.pypp.cpp @@ -27,6 +27,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDAndSet_FFID__class(){ { //::SireID::IDAndSet< SireFF::FFID > @@ -60,6 +62,7 @@ void register_IDAndSet_FFID__class(){ IDAndSet_FFID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +75,7 @@ void register_IDAndSet_FFID__class(){ IDAndSet_FFID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +89,7 @@ void register_IDAndSet_FFID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +136,7 @@ void register_IDAndSet_FFID__class(){ IDAndSet_FFID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +149,7 @@ void register_IDAndSet_FFID__class(){ IDAndSet_FFID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_IDAndSet_FFID__class(){ IDAndSet_FFID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/IDOrSet_FFID_.pypp.cpp b/wrapper/FF/IDOrSet_FFID_.pypp.cpp index 3675e975a..3a16dcd6e 100644 --- a/wrapper/FF/IDOrSet_FFID_.pypp.cpp +++ b/wrapper/FF/IDOrSet_FFID_.pypp.cpp @@ -27,6 +27,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDOrSet_FFID__class(){ { //::SireID::IDOrSet< SireFF::FFID > @@ -60,6 +62,7 @@ void register_IDOrSet_FFID__class(){ IDOrSet_FFID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +75,7 @@ void register_IDOrSet_FFID__class(){ IDOrSet_FFID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +89,7 @@ void register_IDOrSet_FFID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +136,7 @@ void register_IDOrSet_FFID__class(){ IDOrSet_FFID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +149,7 @@ void register_IDOrSet_FFID__class(){ IDOrSet_FFID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_IDOrSet_FFID__class(){ IDOrSet_FFID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/MolEnergyTable.pypp.cpp b/wrapper/FF/MolEnergyTable.pypp.cpp index 077671723..0174e1eae 100644 --- a/wrapper/FF/MolEnergyTable.pypp.cpp +++ b/wrapper/FF/MolEnergyTable.pypp.cpp @@ -33,6 +33,8 @@ SireFF::MolEnergyTable __copy__(const SireFF::MolEnergyTable &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MolEnergyTable_class(){ @@ -52,6 +54,7 @@ void register_MolEnergyTable_class(){ "add" , add_function_value , ( bp::arg("cgatomidx"), bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto this table. This ignores\nforces calculated for atoms that are in CutGroups that are\nnot in this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -64,6 +67,7 @@ void register_MolEnergyTable_class(){ "add" , add_function_value , ( bp::arg("selected_atoms"), bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto this table for all of the atoms\nin selected_atoms. This ignores forces calculated for atoms\nthat are in CutGroups that are not in this table - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -76,6 +80,7 @@ void register_MolEnergyTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the forces contained in other onto this force table. This will only\nadd the forces for CutGroups that are in both tables" ); } @@ -88,6 +93,7 @@ void register_MolEnergyTable_class(){ "add" , add_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto all of the atom points in this table" ); } @@ -100,6 +106,7 @@ void register_MolEnergyTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the force at all atom points by value" ); } @@ -111,6 +118,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "Initialise this table - this resets all of the forces back to zero" ); } @@ -123,6 +131,7 @@ void register_MolEnergyTable_class(){ "map" , map_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -134,6 +143,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "molNum" , molNum_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +168,7 @@ void register_MolEnergyTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the force at all atom points by value" ); } @@ -169,6 +180,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -180,6 +192,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "nSelectedCutGroups" , nSelectedCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +240,7 @@ void register_MolEnergyTable_class(){ "selected" , selected_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -238,6 +252,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -250,6 +265,7 @@ void register_MolEnergyTable_class(){ "setAll" , setAll_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Set all of the forces at the atom points equal to force" ); } @@ -262,6 +278,7 @@ void register_MolEnergyTable_class(){ "subtract" , subtract_function_value , ( bp::arg("cgatomidx"), bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from this table. This ignores\nforces calculated for atoms that are in CutGroups that are\nnot in this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -274,6 +291,7 @@ void register_MolEnergyTable_class(){ "subtract" , subtract_function_value , ( bp::arg("selected_atoms"), bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from this table for all of the atoms\nin selected_atoms. This ignores forces calculated for atoms\nthat are in CutGroups that are not in this table - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -286,6 +304,7 @@ void register_MolEnergyTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the forces contained in other from this force table. This will only\nsubtract the forces for CutGroups that are in both tables" ); } @@ -298,6 +317,7 @@ void register_MolEnergyTable_class(){ "subtract" , subtract_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from all of the atom points in this table" ); } @@ -309,6 +329,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return an array of all of the forces on the atoms, in CGAtomIdx order" ); } @@ -321,6 +342,7 @@ void register_MolEnergyTable_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return an array of all of the forces on the atoms selected in selection\nThrow: SireError::incompatible_error\n" ); } @@ -332,6 +354,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -343,6 +366,7 @@ void register_MolEnergyTable_class(){ MolEnergyTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/MolFieldTable.pypp.cpp b/wrapper/FF/MolFieldTable.pypp.cpp index 8592bba21..1a41b805c 100644 --- a/wrapper/FF/MolFieldTable.pypp.cpp +++ b/wrapper/FF/MolFieldTable.pypp.cpp @@ -35,6 +35,8 @@ SireFF::MolFieldTable __copy__(const SireFF::MolFieldTable &other){ return SireF #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MolFieldTable_class(){ @@ -54,6 +56,7 @@ void register_MolFieldTable_class(){ "add" , add_function_value , ( bp::arg("cgatomidx"), bp::arg("field") ) + , bp::release_gil_policy() , "Add the field field onto this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -66,6 +69,7 @@ void register_MolFieldTable_class(){ "add" , add_function_value , ( bp::arg("selected_atoms"), bp::arg("field") ) + , bp::release_gil_policy() , "Add the field field onto this table for all of the atoms\nin selected_atoms - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -78,6 +82,7 @@ void register_MolFieldTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the fields contained in other onto this field table. This will only\nadd the fields for CutGroups that are in both tables" ); } @@ -90,6 +95,7 @@ void register_MolFieldTable_class(){ "add" , add_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Add the field field onto all of the atom points in this table" ); } @@ -102,6 +108,7 @@ void register_MolFieldTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the field at all atom points by value" ); } @@ -113,6 +120,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "Initialise this table - this clears all of the fields, resetting them to zero" ); } @@ -125,6 +133,7 @@ void register_MolFieldTable_class(){ "map" , map_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +145,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "molNum" , molNum_function_value + , bp::release_gil_policy() , "" ); } @@ -160,6 +170,7 @@ void register_MolFieldTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the field at all atom points by value" ); } @@ -171,6 +182,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +194,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "nSelectedCutGroups" , nSelectedCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -229,6 +242,7 @@ void register_MolFieldTable_class(){ "selected" , selected_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -240,6 +254,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -252,6 +267,7 @@ void register_MolFieldTable_class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set all of the fields at the atom points equal to field" ); } @@ -264,6 +280,7 @@ void register_MolFieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("cgatomidx"), bp::arg("field") ) + , bp::release_gil_policy() , "Subtract the field field from this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -276,6 +293,7 @@ void register_MolFieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("selected_atoms"), bp::arg("field") ) + , bp::release_gil_policy() , "Subtract the field field from this table for all of the atoms\nin selected_atoms - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -288,6 +306,7 @@ void register_MolFieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the fields contained in other from this field table. This will only\nsubtract the fields for CutGroups that are in both tables" ); } @@ -300,6 +319,7 @@ void register_MolFieldTable_class(){ "subtract" , subtract_function_value , ( bp::arg("field") ) + , bp::release_gil_policy() , "Subtract the field field from all of the atom points in this table" ); } @@ -311,6 +331,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return all of the fields in this table in a single array" ); } @@ -323,6 +344,7 @@ void register_MolFieldTable_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return an array of all of the fields at the location of\nthe atoms selected in selection\nThrow: SireError::incompatible_error\n" ); } @@ -334,6 +356,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -345,6 +368,7 @@ void register_MolFieldTable_class(){ MolFieldTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/MolForceTable.pypp.cpp b/wrapper/FF/MolForceTable.pypp.cpp index af77c013a..657a75a37 100644 --- a/wrapper/FF/MolForceTable.pypp.cpp +++ b/wrapper/FF/MolForceTable.pypp.cpp @@ -33,6 +33,8 @@ SireFF::MolForceTable __copy__(const SireFF::MolForceTable &other){ return SireF #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MolForceTable_class(){ @@ -52,6 +54,7 @@ void register_MolForceTable_class(){ "add" , add_function_value , ( bp::arg("cgatomidx"), bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto this table. This ignores\nforces calculated for atoms that are in CutGroups that are\nnot in this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -64,6 +67,7 @@ void register_MolForceTable_class(){ "add" , add_function_value , ( bp::arg("selected_atoms"), bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto this table for all of the atoms\nin selected_atoms. This ignores forces calculated for atoms\nthat are in CutGroups that are not in this table - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -76,6 +80,7 @@ void register_MolForceTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the forces contained in other onto this force table. This will only\nadd the forces for CutGroups that are in both tables" ); } @@ -88,6 +93,7 @@ void register_MolForceTable_class(){ "add" , add_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Add the force force onto all of the atom points in this table" ); } @@ -100,6 +106,7 @@ void register_MolForceTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the force at all atom points by value" ); } @@ -111,6 +118,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "Initialise this table - this resets all of the forces back to zero" ); } @@ -123,6 +131,7 @@ void register_MolForceTable_class(){ "map" , map_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -134,6 +143,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "molNum" , molNum_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +168,7 @@ void register_MolForceTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the force at all atom points by value" ); } @@ -169,6 +180,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -180,6 +192,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "nSelectedCutGroups" , nSelectedCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +240,7 @@ void register_MolForceTable_class(){ "selected" , selected_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -238,6 +252,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -250,6 +265,7 @@ void register_MolForceTable_class(){ "setAll" , setAll_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Set all of the forces at the atom points equal to force" ); } @@ -262,6 +278,7 @@ void register_MolForceTable_class(){ "subtract" , subtract_function_value , ( bp::arg("cgatomidx"), bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from this table. This ignores\nforces calculated for atoms that are in CutGroups that are\nnot in this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -274,6 +291,7 @@ void register_MolForceTable_class(){ "subtract" , subtract_function_value , ( bp::arg("selected_atoms"), bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from this table for all of the atoms\nin selected_atoms. This ignores forces calculated for atoms\nthat are in CutGroups that are not in this table - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -286,6 +304,7 @@ void register_MolForceTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the forces contained in other from this force table. This will only\nsubtract the forces for CutGroups that are in both tables" ); } @@ -298,6 +317,7 @@ void register_MolForceTable_class(){ "subtract" , subtract_function_value , ( bp::arg("force") ) + , bp::release_gil_policy() , "Subtract the force force from all of the atom points in this table" ); } @@ -309,6 +329,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return an array of all of the forces on the atoms, in CGAtomIdx order" ); } @@ -321,6 +342,7 @@ void register_MolForceTable_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return an array of all of the forces on the atoms selected in selection\nThrow: SireError::incompatible_error\n" ); } @@ -332,6 +354,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -343,6 +366,7 @@ void register_MolForceTable_class(){ MolForceTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/MolPotentialTable.pypp.cpp b/wrapper/FF/MolPotentialTable.pypp.cpp index 834c2f656..e187206f4 100644 --- a/wrapper/FF/MolPotentialTable.pypp.cpp +++ b/wrapper/FF/MolPotentialTable.pypp.cpp @@ -35,6 +35,8 @@ SireFF::MolPotentialTable __copy__(const SireFF::MolPotentialTable &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MolPotentialTable_class(){ @@ -54,6 +56,7 @@ void register_MolPotentialTable_class(){ "add" , add_function_value , ( bp::arg("cgatomidx"), bp::arg("potential") ) + , bp::release_gil_policy() , "Add the potential potential onto this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -66,6 +69,7 @@ void register_MolPotentialTable_class(){ "add" , add_function_value , ( bp::arg("selected_atoms"), bp::arg("potential") ) + , bp::release_gil_policy() , "Add the potential potential onto this table for all of the atoms\nin selected_atoms - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -78,6 +82,7 @@ void register_MolPotentialTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the potentials contained in other onto this potential table. This will only\nadd the potentials for CutGroups that are in both tables" ); } @@ -90,6 +95,7 @@ void register_MolPotentialTable_class(){ "add" , add_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Add the potential potential onto all of the atom points in this table" ); } @@ -102,6 +108,7 @@ void register_MolPotentialTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the potential at all atom points by value" ); } @@ -113,6 +120,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "Initialise this table - this clears all of the potentials, resetting them to zero" ); } @@ -125,6 +133,7 @@ void register_MolPotentialTable_class(){ "map" , map_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +145,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "molNum" , molNum_function_value + , bp::release_gil_policy() , "" ); } @@ -160,6 +170,7 @@ void register_MolPotentialTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the potential at all atom points by value" ); } @@ -171,6 +182,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +194,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "nSelectedCutGroups" , nSelectedCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -229,6 +242,7 @@ void register_MolPotentialTable_class(){ "selected" , selected_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -240,6 +254,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -252,6 +267,7 @@ void register_MolPotentialTable_class(){ "setAll" , setAll_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Set all of the potentials at the atom points equal to potential" ); } @@ -264,6 +280,7 @@ void register_MolPotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("cgatomidx"), bp::arg("potential") ) + , bp::release_gil_policy() , "Subtract the potential potential from this table - this returns whether or not the\natom is in this table\nThrow: SireError::invalid_index\n" ); } @@ -276,6 +293,7 @@ void register_MolPotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("selected_atoms"), bp::arg("potential") ) + , bp::release_gil_policy() , "Subtract the potential potential from this table for all of the atoms\nin selected_atoms - this returns whether\nor not any selected atoms are in this table\nThrow: SireError::incompatible_error\n" ); } @@ -288,6 +306,7 @@ void register_MolPotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the potentials contained in other from this potential table. This will only\nsubtract the potentials for CutGroups that are in both tables" ); } @@ -300,6 +319,7 @@ void register_MolPotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Subtract the potential potential from all of the atom points in this table" ); } @@ -311,6 +331,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return all of the potentials in this table in a single array" ); } @@ -323,6 +344,7 @@ void register_MolPotentialTable_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return an array of all of the potentials at the location of\nthe atoms selected in selection\nThrow: SireError::incompatible_error\n" ); } @@ -334,6 +356,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -345,6 +368,7 @@ void register_MolPotentialTable_class(){ MolPotentialTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/NullFF.pypp.cpp b/wrapper/FF/NullFF.pypp.cpp index 934d3d30a..c9c74f2ba 100644 --- a/wrapper/FF/NullFF.pypp.cpp +++ b/wrapper/FF/NullFF.pypp.cpp @@ -42,6 +42,8 @@ SireFF::NullFF __copy__(const SireFF::NullFF &other){ return SireFF::NullFF(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_NullFF_class(){ @@ -59,6 +61,7 @@ void register_NullFF_class(){ NullFF_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "" ); } @@ -71,7 +74,7 @@ void register_NullFF_class(){ "at" , at_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -83,7 +86,7 @@ void register_NullFF_class(){ NullFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -96,6 +99,7 @@ void register_NullFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +111,7 @@ void register_NullFF_class(){ NullFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -118,6 +123,7 @@ void register_NullFF_class(){ NullFF_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "" ); } @@ -157,7 +163,7 @@ void register_NullFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -170,6 +176,7 @@ void register_NullFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -181,6 +188,7 @@ void register_NullFF_class(){ NullFF_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +200,7 @@ void register_NullFF_class(){ NullFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/NullProbe.pypp.cpp b/wrapper/FF/NullProbe.pypp.cpp index 49bad4386..5c7e2a817 100644 --- a/wrapper/FF/NullProbe.pypp.cpp +++ b/wrapper/FF/NullProbe.pypp.cpp @@ -21,6 +21,8 @@ SireFF::NullProbe __copy__(const SireFF::NullProbe &other){ return SireFF::NullP #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullProbe_class(){ { //::SireFF::NullProbe @@ -51,6 +53,7 @@ void register_NullProbe_class(){ NullProbe_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/Point.pypp.cpp b/wrapper/FF/Point.pypp.cpp index f75ab6c92..43e6e1c6b 100644 --- a/wrapper/FF/Point.pypp.cpp +++ b/wrapper/FF/Point.pypp.cpp @@ -38,6 +38,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Point_class(){ { //::SireFF::Point @@ -53,6 +55,7 @@ void register_Point_class(){ "addForce" , addForce_function_value , ( bp::arg("molforces"), bp::arg("force") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_Point_class(){ "addForce" , addForce_function_value , ( bp::arg("forces"), bp::arg("force") ) + , bp::release_gil_policy() , "" ); } @@ -77,6 +81,7 @@ void register_Point_class(){ "areIntraMoleculePoints" , areIntraMoleculePoints_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Return whether or not the points point0 and point1 are\nboth within the same molecule (so together are intra-molecule points)" ); } @@ -89,6 +94,7 @@ void register_Point_class(){ "areIntraMoleculePoints" , areIntraMoleculePoints_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2") ) + , bp::release_gil_policy() , "Return whether or not the points point0, point1 and point2 are\nwithin the same molecule (so together are intra-molecule points)" ); } @@ -101,6 +107,7 @@ void register_Point_class(){ "areIntraMoleculePoints" , areIntraMoleculePoints_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3") ) + , bp::release_gil_policy() , "Return whether or not the points point0, point1, point2 and point3 are\nwithin the same molecule (so together are intra-molecule points)" ); } @@ -113,6 +120,7 @@ void register_Point_class(){ "areIntraMoleculePoints" , areIntraMoleculePoints_function_value , ( bp::arg("points") ) + , bp::release_gil_policy() , "Return whether or not the points in points are all\nwithin the same molecule (so together are intra-molecule points)" ); } @@ -125,6 +133,7 @@ void register_Point_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "" ); } @@ -137,6 +146,7 @@ void register_Point_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "" ); } @@ -148,6 +158,7 @@ void register_Point_class(){ Point_exposer.def( "isExtraMoleculePoint" , isExtraMoleculePoint_function_value + , bp::release_gil_policy() , "" ); } @@ -159,6 +170,7 @@ void register_Point_class(){ Point_exposer.def( "isInterMoleculePoint" , isInterMoleculePoint_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +182,7 @@ void register_Point_class(){ Point_exposer.def( "isIntraMoleculePoint" , isIntraMoleculePoint_function_value + , bp::release_gil_policy() , "" ); } @@ -181,6 +194,7 @@ void register_Point_class(){ Point_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +206,7 @@ void register_Point_class(){ Point_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "" ); } @@ -240,6 +255,7 @@ void register_Point_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the 3D space in which this point is calculated\n(although note that this 3D point, like the molecules,\nexists in the infinite cartesian space)" ); } @@ -251,7 +267,7 @@ void register_Point_class(){ Point_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the 3D space in which this point is calculated\n(although note that this 3D point, like the molecules,\nexists in the infinite cartesian space)" ); } @@ -263,6 +279,7 @@ void register_Point_class(){ Point_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -275,6 +292,7 @@ void register_Point_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "" ); } @@ -287,6 +305,7 @@ void register_Point_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -299,6 +318,7 @@ void register_Point_class(){ "update" , update_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -311,6 +331,7 @@ void register_Point_class(){ "update" , update_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -323,6 +344,7 @@ void register_Point_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "" ); } @@ -335,6 +357,7 @@ void register_Point_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +370,7 @@ void register_Point_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -359,6 +383,7 @@ void register_Point_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -371,6 +396,7 @@ void register_Point_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "" ); } @@ -383,6 +409,7 @@ void register_Point_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -395,6 +422,7 @@ void register_Point_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -407,6 +435,7 @@ void register_Point_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/PointRef.pypp.cpp b/wrapper/FF/PointRef.pypp.cpp index f17fa4782..6b9faa13d 100644 --- a/wrapper/FF/PointRef.pypp.cpp +++ b/wrapper/FF/PointRef.pypp.cpp @@ -37,6 +37,8 @@ SireFF::PointRef __copy__(const SireFF::PointRef &other){ return SireFF::PointRe const char* pvt_get_name(const SireFF::PointRef&){ return "SireFF::PointRef";} +#include "Helpers/release_gil_policy.hpp" + void register_PointRef_class(){ { //::SireFF::PointRef @@ -55,6 +57,7 @@ void register_PointRef_class(){ "addForce" , addForce_function_value , ( bp::arg("molforces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force acting on this point from the\nmolecule whose forces are in molforces and add the\nforce onto the table" ); } @@ -67,6 +70,7 @@ void register_PointRef_class(){ "addForce" , addForce_function_value , ( bp::arg("forces"), bp::arg("force") ) + , bp::release_gil_policy() , "Decompose the force force into the forces acting on\nthe molecules that contribute to this point and add those\nforces onto the table forces" ); } diff --git a/wrapper/FF/PotentialTable.pypp.cpp b/wrapper/FF/PotentialTable.pypp.cpp index 0ea2b02e1..cd051e788 100644 --- a/wrapper/FF/PotentialTable.pypp.cpp +++ b/wrapper/FF/PotentialTable.pypp.cpp @@ -35,6 +35,8 @@ SireFF::PotentialTable __copy__(const SireFF::PotentialTable &other){ return Sir const char* pvt_get_name(const SireFF::PotentialTable&){ return "SireFF::PotentialTable";} +#include "Helpers/release_gil_policy.hpp" + void register_PotentialTable_class(){ { //::SireFF::PotentialTable @@ -56,6 +58,7 @@ void register_PotentialTable_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the contents of the table other onto this table. This will only\nadd the potentials for the molecules grids that are in both tables" ); } @@ -68,6 +71,7 @@ void register_PotentialTable_class(){ "add" , add_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Add the potential potential onto all of the atom grid points in this table" ); } @@ -80,6 +84,7 @@ void register_PotentialTable_class(){ "assertContainsTableFor" , assertContainsTableFor_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Assert that this contains a table for the molecule with number molnum\nThrow: SireError::unavailable_resource\n" ); } @@ -92,6 +97,7 @@ void register_PotentialTable_class(){ "assertContainsTableFor" , assertContainsTableFor_function_value , ( bp::arg("grid") ) + , bp::release_gil_policy() , "Assert that this contains a table for the passed grid\nThrow: SireError::unavailable_resource\n" ); } @@ -130,6 +136,7 @@ void register_PotentialTable_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this contains a table for the passed grid" ); } @@ -142,6 +149,7 @@ void register_PotentialTable_class(){ "contains" , contains_function_value , ( bp::arg("grid") ) + , bp::release_gil_policy() , "Return whether or not this contains a table for the passed grid" ); } @@ -154,6 +162,7 @@ void register_PotentialTable_class(){ "divide" , divide_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Divide the potential at all atom and grid points by value" ); } @@ -204,6 +213,7 @@ void register_PotentialTable_class(){ "indexOf" , indexOf_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the index of the molecule with number molnum in this table\nThrow: SireMol::missing_molecule\n" ); } @@ -216,6 +226,7 @@ void register_PotentialTable_class(){ "initialiseTable" , initialiseTable_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Initialise the table for the molecule with number molnum" ); } @@ -228,6 +239,7 @@ void register_PotentialTable_class(){ "initialiseTable" , initialiseTable_function_value , ( bp::arg("grid") ) + , bp::release_gil_policy() , "Initialise the table for the grid grid" ); } @@ -239,6 +251,7 @@ void register_PotentialTable_class(){ PotentialTable_exposer.def( "initialiseTables" , initialiseTables_function_value + , bp::release_gil_policy() , "Initialise all of the tables to have a zero potential" ); } @@ -250,6 +263,7 @@ void register_PotentialTable_class(){ PotentialTable_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this table is empty" ); } @@ -261,6 +275,7 @@ void register_PotentialTable_class(){ PotentialTable_exposer.def( "molNums" , molNums_function_value + , bp::release_gil_policy() , "" ); } @@ -273,6 +288,7 @@ void register_PotentialTable_class(){ "multiply" , multiply_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Multiply the potential at all atom and grid points by value" ); } @@ -284,6 +300,7 @@ void register_PotentialTable_class(){ PotentialTable_exposer.def( "nGrids" , nGrids_function_value + , bp::release_gil_policy() , "" ); } @@ -295,6 +312,7 @@ void register_PotentialTable_class(){ PotentialTable_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "" ); } @@ -342,6 +360,7 @@ void register_PotentialTable_class(){ "setAll" , setAll_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Set the potential at all atom and grid points equal to potential" ); } @@ -354,6 +373,7 @@ void register_PotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Subtract the contents of the table other from this table. This will only\nsubtract the potentials for the molecules grids that are in both tables" ); } @@ -366,6 +386,7 @@ void register_PotentialTable_class(){ "subtract" , subtract_function_value , ( bp::arg("potential") ) + , bp::release_gil_policy() , "Subtract the potential potential from all of the atom grid points in this table" ); } @@ -377,6 +398,7 @@ void register_PotentialTable_class(){ PotentialTable_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -388,6 +410,7 @@ void register_PotentialTable_class(){ PotentialTable_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/Probe.pypp.cpp b/wrapper/FF/Probe.pypp.cpp index ed0e3fe77..6c943dce3 100644 --- a/wrapper/FF/Probe.pypp.cpp +++ b/wrapper/FF/Probe.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Probe_class(){ { //::SireFF::Probe @@ -34,7 +36,7 @@ void register_Probe_class(){ Probe_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -46,6 +48,7 @@ void register_Probe_class(){ Probe_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/SingleComponent.pypp.cpp b/wrapper/FF/SingleComponent.pypp.cpp index aeb3a2683..4f2b820bd 100644 --- a/wrapper/FF/SingleComponent.pypp.cpp +++ b/wrapper/FF/SingleComponent.pypp.cpp @@ -26,6 +26,8 @@ SireFF::SingleComponent __copy__(const SireFF::SingleComponent &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SingleComponent_class(){ { //::SireFF::SingleComponent @@ -44,6 +46,7 @@ void register_SingleComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Change the energy in the forcefield ff by delta" ); } @@ -56,6 +59,7 @@ void register_SingleComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Set the energy in the forcefield ff to equal to the passed SingleEnergy" ); } @@ -67,6 +71,7 @@ void register_SingleComponent_class(){ SingleComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -78,7 +83,7 @@ void register_SingleComponent_class(){ SingleComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -90,6 +95,7 @@ void register_SingleComponent_class(){ SingleComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +107,7 @@ void register_SingleComponent_class(){ SingleComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/SireFF_properties.cpp b/wrapper/FF/SireFF_properties.cpp index 8b366fcb0..ff2830a24 100644 --- a/wrapper/FF/SireFF_properties.cpp +++ b/wrapper/FF/SireFF_properties.cpp @@ -18,10 +18,6 @@ #include #include #include "forcefield.h" -#include "SireError/errors.h" -#include "SireStream/datastream.h" -#include "probe.h" -#include "probe.h" #include "SireMol/evaluator.h" #include "SireMol/mgidx.h" #include "SireMol/molecule.h" @@ -35,9 +31,13 @@ #include "point.h" #include #include "point.h" +#include "SireError/errors.h" +#include "SireStream/datastream.h" +#include "probe.h" +#include "probe.h" void register_SireFF_properties() { register_property_container< SireFF::FFPtr, SireFF::FF >(); - register_property_container< SireFF::ProbePtr, SireFF::Probe >(); register_property_container< SireFF::PointPtr, SireFF::Point >(); + register_property_container< SireFF::ProbePtr, SireFF::Probe >(); } diff --git a/wrapper/FF/SireFF_registrars.cpp b/wrapper/FF/SireFF_registrars.cpp index 901c5b20d..aed365c6a 100644 --- a/wrapper/FF/SireFF_registrars.cpp +++ b/wrapper/FF/SireFF_registrars.cpp @@ -5,60 +5,60 @@ #include "Helpers/version_error_impl.h" -#include "ffidx.h" #include "energytable.h" -#include "ffmolgroup.h" -#include "ffname.h" -#include "forcetable.h" #include "ffcomponent.h" #include "ffidentifier.h" +#include "ffidx.h" +#include "ffmolgroup.h" +#include "ffname.h" #include "ffparameters.h" -#include "forcefield.h" #include "fieldtable.h" -#include "probe.h" -#include "potentialtable.h" -#include "point.h" -#include "patches.h" +#include "forcefield.h" #include "forcefields.h" +#include "forcetable.h" #include "patch.h" +#include "patches.h" +#include "point.h" +#include "potentialtable.h" +#include "probe.h" #include "Helpers/objectregistry.hpp" void register_SireFF_objects() { - ObjectRegistry::registerConverterFor< SireFF::FFIdx >(); ObjectRegistry::registerConverterFor< SireFF::EnergyTable >(); ObjectRegistry::registerConverterFor< SireFF::MolEnergyTable >(); - ObjectRegistry::registerConverterFor< SireFF::FFMolGroup >(); - ObjectRegistry::registerConverterFor< SireFF::FFName >(); - ObjectRegistry::registerConverterFor< SireFF::ForceTable >(); - ObjectRegistry::registerConverterFor< SireFF::MolForceTable >(); ObjectRegistry::registerConverterFor< SireFF::SingleComponent >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); ObjectRegistry::registerConverterFor< SireFF::FFIdentifier >(); + ObjectRegistry::registerConverterFor< SireFF::FFIdx >(); + ObjectRegistry::registerConverterFor< SireFF::FFMolGroup >(); + ObjectRegistry::registerConverterFor< SireFF::FFName >(); ObjectRegistry::registerConverterFor< SireFF::NullFFParameters >(); ObjectRegistry::registerConverterFor< SireFF::NullFFParametersArray >(); - ObjectRegistry::registerConverterFor< SireFF::NullFF >(); ObjectRegistry::registerConverterFor< SireFF::FieldTable >(); ObjectRegistry::registerConverterFor< SireFF::GridFieldTable >(); ObjectRegistry::registerConverterFor< SireFF::MolFieldTable >(); - ObjectRegistry::registerConverterFor< SireFF::NullProbe >(); - ObjectRegistry::registerConverterFor< SireFF::PotentialTable >(); - ObjectRegistry::registerConverterFor< SireFF::GridPotentialTable >(); - ObjectRegistry::registerConverterFor< SireFF::MolPotentialTable >(); + ObjectRegistry::registerConverterFor< SireFF::NullFF >(); + ObjectRegistry::registerConverterFor< SireFF::ForceFields >(); + ObjectRegistry::registerConverterFor< SireFF::ForceTable >(); + ObjectRegistry::registerConverterFor< SireFF::MolForceTable >(); + ObjectRegistry::registerConverterFor< SireFF::Patch >(); + ObjectRegistry::registerConverterFor< SireFF::FFBead >(); + ObjectRegistry::registerConverterFor< SireFF::FFBeadChange >(); + ObjectRegistry::registerConverterFor< SireFF::Patches >(); ObjectRegistry::registerConverterFor< SireFF::AtomPoint >(); ObjectRegistry::registerConverterFor< SireFF::VectorPoint >(); ObjectRegistry::registerConverterFor< SireFF::Center >(); ObjectRegistry::registerConverterFor< SireFF::CenterOfGeometry >(); ObjectRegistry::registerConverterFor< SireFF::CenterOfMass >(); - ObjectRegistry::registerConverterFor< SireFF::FFBead >(); - ObjectRegistry::registerConverterFor< SireFF::FFBeadChange >(); - ObjectRegistry::registerConverterFor< SireFF::Patches >(); - ObjectRegistry::registerConverterFor< SireFF::ForceFields >(); - ObjectRegistry::registerConverterFor< SireFF::Patch >(); + ObjectRegistry::registerConverterFor< SireFF::PotentialTable >(); + ObjectRegistry::registerConverterFor< SireFF::GridPotentialTable >(); + ObjectRegistry::registerConverterFor< SireFF::MolPotentialTable >(); + ObjectRegistry::registerConverterFor< SireFF::NullProbe >(); } diff --git a/wrapper/FF/Specify_FFID_.pypp.cpp b/wrapper/FF/Specify_FFID_.pypp.cpp index 075893b63..03e88219a 100644 --- a/wrapper/FF/Specify_FFID_.pypp.cpp +++ b/wrapper/FF/Specify_FFID_.pypp.cpp @@ -27,6 +27,8 @@ SireID::Specify __copy__(const SireID::Specify &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Specify_FFID__class(){ { //::SireID::Specify< SireFF::FFID > @@ -47,6 +49,7 @@ void register_Specify_FFID__class(){ Specify_FFID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -59,6 +62,7 @@ void register_Specify_FFID__class(){ Specify_FFID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +76,7 @@ void register_Specify_FFID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +185,7 @@ void register_Specify_FFID__class(){ Specify_FFID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +198,7 @@ void register_Specify_FFID__class(){ Specify_FFID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -204,6 +211,7 @@ void register_Specify_FFID__class(){ Specify_FFID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/FF/VectorPoint.pypp.cpp b/wrapper/FF/VectorPoint.pypp.cpp index 13f305772..ce044d52d 100644 --- a/wrapper/FF/VectorPoint.pypp.cpp +++ b/wrapper/FF/VectorPoint.pypp.cpp @@ -39,6 +39,8 @@ SireFF::VectorPoint __copy__(const SireFF::VectorPoint &other){ return SireFF::V #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VectorPoint_class(){ { //::SireFF::VectorPoint @@ -56,6 +58,7 @@ void register_VectorPoint_class(){ "addForce" , addForce_function_value , ( bp::arg("molforces"), bp::arg("force") ) + , bp::release_gil_policy() , "No forces on a point" ); } @@ -68,6 +71,7 @@ void register_VectorPoint_class(){ "addForce" , addForce_function_value , ( bp::arg("forces"), bp::arg("force") ) + , bp::release_gil_policy() , "No forces on a point" ); } @@ -80,6 +84,7 @@ void register_VectorPoint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -92,6 +97,7 @@ void register_VectorPoint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -103,6 +109,7 @@ void register_VectorPoint_class(){ VectorPoint_exposer.def( "isExtraMoleculePoint" , isExtraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an extramolecular point (it is independent\nof the coordinates of atoms in any molecule, i.e. it is just a point in space)" ); } @@ -114,6 +121,7 @@ void register_VectorPoint_class(){ VectorPoint_exposer.def( "isInterMoleculePoint" , isInterMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether or not this is an intermolecular point (it depends on\ncoordinates of atoms from than one molecule)" ); } @@ -125,6 +133,7 @@ void register_VectorPoint_class(){ VectorPoint_exposer.def( "isIntraMoleculePoint" , isIntraMoleculePoint_function_value + , bp::release_gil_policy() , "Return whether this is an intramolecular point (it depends on coordinates\nof atoms in just one molecule)" ); } @@ -136,6 +145,7 @@ void register_VectorPoint_class(){ VectorPoint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -147,6 +157,7 @@ void register_VectorPoint_class(){ VectorPoint_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -173,6 +184,7 @@ void register_VectorPoint_class(){ VectorPoint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -184,6 +196,7 @@ void register_VectorPoint_class(){ VectorPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -196,6 +209,7 @@ void register_VectorPoint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } @@ -208,6 +222,7 @@ void register_VectorPoint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } @@ -220,6 +235,7 @@ void register_VectorPoint_class(){ "update" , update_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } @@ -232,6 +248,7 @@ void register_VectorPoint_class(){ "update" , update_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } @@ -244,6 +261,7 @@ void register_VectorPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -256,6 +274,7 @@ void register_VectorPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -268,6 +287,7 @@ void register_VectorPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -280,6 +300,7 @@ void register_VectorPoint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "No molecules are needed to create this point" ); } @@ -292,6 +313,7 @@ void register_VectorPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } @@ -304,6 +326,7 @@ void register_VectorPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } @@ -316,6 +339,7 @@ void register_VectorPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } @@ -328,6 +352,7 @@ void register_VectorPoint_class(){ "wouldUpdate" , wouldUpdate_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "A VectorPoint is not updatable" ); } diff --git a/wrapper/FF/__init__.py b/wrapper/FF/__init__.py index 5f75ee924..56b9d1f20 100644 --- a/wrapper/FF/__init__.py +++ b/wrapper/FF/__init__.py @@ -1,16 +1,47 @@ -############################# -## -## The SireFF library. -## -## This contains all of the classes that are used to -## provide a forcefield (energy+forces) for molecules. -## +""" +.. currentmodule:: sire.legacy.FF -import Sire.Mol -import Sire.CAS +Classes +======= + +.. autosummary:: + :toctree: generated/ + + AtomPoint + Center + CenterOfGeometry + CenterOfMass + EnergyTable + FF + FF3D + FFComponent + FFID + FFIdx + FFMolGroup + FFName + FieldTable + ForceTable + G1FF + G2FF + GridFieldTable + GridPotentialTable + MolEnergyTable + MolFieldTable + MolForceTable + MolPotentialTable + Point + PointRef + Probe + SingleComponent + VectorPoint + +""" + +from .. import Mol as _Mol +from .. import CAS as _CAS # Import all of the classes and functions from the C++ library -from Sire.FF._FF import * +from ._FF import * # Now define some pure Python functions and classes that are part of # the module diff --git a/wrapper/Helpers/CMakeLists.txt b/wrapper/Helpers/CMakeLists.txt index 02dc7a0df..7bba26784 100644 --- a/wrapper/Helpers/CMakeLists.txt +++ b/wrapper/Helpers/CMakeLists.txt @@ -21,22 +21,25 @@ set ( WRAPHELPERS_SOURCES objectregistry.hpp objectregistry.cpp + release_gil_policy.hpp + release_gil_policy.cpp + ) # Create the library that holds all of the class wrappers add_library (SirePython ${WRAPHELPERS_SOURCES}) -set_target_properties (SirePython +set_target_properties (SirePython PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} ) - + target_link_libraries (SirePython SIRE_SireCluster SIRE_SireStream SIRE_SireError - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ) diff --git a/wrapper/Helpers/clone_const_reference.hpp b/wrapper/Helpers/clone_const_reference.hpp index 723399e59..c88148496 100644 --- a/wrapper/Helpers/clone_const_reference.hpp +++ b/wrapper/Helpers/clone_const_reference.hpp @@ -1,7 +1,7 @@ #ifndef CLONE_CONST_REFERENCE_HPP #define CLONE_CONST_REFERENCE_HPP -/** This return policy copies the returned pointer or reference using the +/** This return policy copies the returned pointer or reference using the object's .clone() function, and it then manages the new cloned object. This is a useful alternative to copy_const_reference if you are working with a polymorphic hierarchy of classes that span across @@ -16,6 +16,8 @@ #include #include +#include "release_gil_policy.hpp" + namespace boost { namespace python @@ -29,6 +31,8 @@ struct make_clone_reference_holder template static PyObject* execute(T* p) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + if (p == 0) return python::detail::none(); else @@ -42,7 +46,7 @@ struct make_clone_reference_holder { PyErr_Clear(); - //failed as the derived type is not wrapped. Instead, + //failed as the derived type is not wrapped. Instead, //return a python wrapper to the base type boost::python::object obj( p->clone() ); return boost::python::incref( obj.ptr() ); diff --git a/wrapper/Helpers/convertdict.hpp b/wrapper/Helpers/convertdict.hpp index 93e40c360..f22b6c889 100644 --- a/wrapper/Helpers/convertdict.hpp +++ b/wrapper/Helpers/convertdict.hpp @@ -34,6 +34,8 @@ #include #include +#include "Helpers/release_gil_policy.hpp" + namespace bp = boost::python; SIRE_BEGIN_HEADER @@ -57,6 +59,8 @@ struct from_py_dict to a QVector where all of the elements are of type 'T' */ static void* convertible(PyObject* obj_ptr) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + //is this a dict type? if ( PyDict_Check(obj_ptr) ) { @@ -73,7 +77,7 @@ struct from_py_dict bp::tuple item = bp::extract(items[i])(); if ( not (bp::extract(item[0]).check() and - bp::extract(item[1]).check()) ) + bp::extract(item[1]).check()) ) { //either the key of value is wrong return 0; @@ -94,33 +98,36 @@ struct from_py_dict PyObject* obj_ptr, bp::converter::rvalue_from_python_stage1_data* data) { - //convert the PyObject to a boost::python::dict - bp::dict d( bp::handle<>(bp::borrowed(obj_ptr)) ); + auto raii = boost::python::release_gil_policy::acquire_gil(); + { + //convert the PyObject to a boost::python::dict + bp::dict d( bp::handle<>(bp::borrowed(obj_ptr)) ); - //locate the storage space for the result - void* storage = - ( (bp::converter::rvalue_from_python_storage*)data )->storage.bytes; + //locate the storage space for the result + void* storage = + ( (bp::converter::rvalue_from_python_storage*)data )->storage.bytes; - //create the container - new (storage) C(); + //create the container + new (storage) C(); - C *container = static_cast(storage); + C *container = static_cast(storage); - //add all of the elements from the dict - do this by converting - //to a list and then extracting each item - bp::list items = d.items(); + //add all of the elements from the dict - do this by converting + //to a list and then extracting each item + bp::list items = d.items(); - int nitems = bp::extract(items.attr("__len__")())(); + int nitems = bp::extract(items.attr("__len__")())(); - for (int i=0; i(items[i])(); + for (int i=0; i(items[i])(); - container->insert( bp::extract(item[0])(), - bp::extract(item[1])() ); - } + container->insert( bp::extract(item[0])(), + bp::extract(item[1])() ); + } - data->convertible = storage; + data->convertible = storage; + } } }; @@ -129,17 +136,20 @@ struct to_py_dict { static PyObject* convert(const C &cpp_dict) { - bp::dict python_dict; - - //add all items to the python dictionary - for (typename C::const_iterator it = cpp_dict.begin(); - it != cpp_dict.end(); - ++it) + auto raii = boost::python::release_gil_policy::acquire_gil(); { - python_dict[it.key()] = it.value(); - } + bp::dict python_dict; - return bp::incref( python_dict.ptr() ); + //add all items to the python dictionary + for (typename C::const_iterator it = cpp_dict.begin(); + it != cpp_dict.end(); + ++it) + { + python_dict[it.key()] = it.value(); + } + + return bp::incref( python_dict.ptr() ); + } } }; diff --git a/wrapper/Helpers/convertlist.hpp b/wrapper/Helpers/convertlist.hpp index 4c5ca2e14..c8ccc4391 100644 --- a/wrapper/Helpers/convertlist.hpp +++ b/wrapper/Helpers/convertlist.hpp @@ -34,6 +34,8 @@ #include #include +#include "Helpers/release_gil_policy.hpp" + namespace bp = boost::python; SIRE_BEGIN_HEADER @@ -59,6 +61,8 @@ struct from_py_list to a QVector where all of the elements are of type 'T' */ static void* convertible(PyObject* obj_ptr) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + //is this a tuple type? if ( PyTuple_Check(obj_ptr) ) { @@ -108,6 +112,8 @@ struct from_py_list PyObject* obj_ptr, bp::converter::rvalue_from_python_stage1_data* data) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + if (PyTuple_Check(obj_ptr)) { //convert the PyObject to a boost::python::object @@ -164,17 +170,20 @@ struct to_py_list { static PyObject* convert(const C &cpp_list) { - bp::list python_list; - - //add all items to the python dictionary - for (typename C::const_iterator it = cpp_list.begin(); - it != cpp_list.end(); - ++it) + auto raii = boost::python::release_gil_policy::acquire_gil(); { - python_list.append(*it); - } + bp::list python_list; - return bp::incref( python_list.ptr() ); + //add all items to the python dictionary + for (typename C::const_iterator it = cpp_list.begin(); + it != cpp_list.end(); + ++it) + { + python_list.append(*it); + } + + return bp::incref( python_list.ptr() ); + } } }; diff --git a/wrapper/Helpers/convertset.hpp b/wrapper/Helpers/convertset.hpp index 1afef37a0..140f1a94d 100644 --- a/wrapper/Helpers/convertset.hpp +++ b/wrapper/Helpers/convertset.hpp @@ -34,6 +34,8 @@ #include #include +#include "Helpers/release_gil_policy.hpp" + namespace bp = boost::python; SIRE_BEGIN_HEADER @@ -57,6 +59,8 @@ struct from_py_set to a QVector where all of the elements are of type 'T' */ static void* convertible(PyObject* obj_ptr) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + //is this a tuple type? if ( PyTuple_Check(obj_ptr) ) { @@ -106,6 +110,8 @@ struct from_py_set PyObject* obj_ptr, bp::converter::rvalue_from_python_stage1_data* data) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + if (PyTuple_Check(obj_ptr)) { //convert the PyObject to a boost::python::object @@ -162,17 +168,20 @@ struct to_py_set { static PyObject* convert(const C &cpp_set) { - bp::list python_set; - - //add all items to the python dictionary - for (typename C::const_iterator it = cpp_set.begin(); - it != cpp_set.end(); - ++it) + auto raii = boost::python::release_gil_policy::acquire_gil(); { - python_set.append(*it); - } + bp::list python_set; - return bp::incref( python_set.ptr() ); + //add all items to the python dictionary + for (typename C::const_iterator it = cpp_set.begin(); + it != cpp_set.end(); + ++it) + { + python_set.append(*it); + } + + return bp::incref( python_set.ptr() ); + } } }; @@ -182,7 +191,7 @@ void register_set() bp::to_python_converter< C, to_py_set >(); typedef typename C::value_type value_type; - + bp::converter::registry::push_back( &from_py_set::convertible, &from_py_set::construct, bp::type_id() ); @@ -192,7 +201,7 @@ template void register_set() { bp::to_python_converter< C, to_py_set >(); - + bp::converter::registry::push_back( &from_py_set::convertible, &from_py_set::construct, bp::type_id() ); diff --git a/wrapper/Helpers/convertsharedpointer.hpp b/wrapper/Helpers/convertsharedpointer.hpp index 9da5c5e5c..9026675e2 100644 --- a/wrapper/Helpers/convertsharedpointer.hpp +++ b/wrapper/Helpers/convertsharedpointer.hpp @@ -33,6 +33,8 @@ namespace bp = boost::python; #include "SireBase/sharedpolypointer.hpp" +#include "Helpers/release_gil_policy.hpp" + SIRE_BEGIN_HEADER using SireBase::SharedPolyPointer; @@ -42,6 +44,7 @@ struct to_base_object { static PyObject* convert(const P &object_container) { + auto raii = boost::python::release_gil_policy::acquire_gil(); return bp::incref( object( SireBase::SharedPolyPointer(object_container.base()) ).ptr() ); } }; diff --git a/wrapper/Helpers/objectregistry.cpp b/wrapper/Helpers/objectregistry.cpp index 52d7379f0..578d19ad8 100644 --- a/wrapper/Helpers/objectregistry.cpp +++ b/wrapper/Helpers/objectregistry.cpp @@ -21,7 +21,7 @@ ObjectRegistry::ObjectRegistry() ObjectRegistry::~ObjectRegistry() {} -void ObjectRegistry::throwExtractionError(const object &obj, +void ObjectRegistry::throwExtractionError(const object &obj, const QString &type_name) const { throw SireError::program_bug( QObject::tr( @@ -30,7 +30,7 @@ void ObjectRegistry::throwExtractionError(const object &obj, .arg(type_name), CODELOC ); } -object ObjectRegistry::getObjects( +object ObjectRegistry::getObjects( const QList< boost::tuple,QString> > &objects ) { if (objects.isEmpty()) @@ -41,18 +41,18 @@ object ObjectRegistry::getObjects( else if (objects.count() == 1) { const boost::tuple,QString> &obj = objects[0]; - + if (obj.get<0>().get() == 0 or obj.get<1>().isEmpty()) //again, nothing return object(); - + return getConverter(obj.get<1>()).convertFromVoid(obj.get<0>().get()); } else { //place the objects into a list boost::python::list l; - + for (int i=0; i,QString> &obj = objects[i]; @@ -61,10 +61,10 @@ object ObjectRegistry::getObjects( //nothing l.append( object() ); else - l.append( + l.append( getConverter(obj.get<1>()).convertFromVoid(obj.get<0>().get()) ); } - + //return the tuple version of this list return boost::python::tuple( l ); } @@ -82,7 +82,7 @@ object ObjectRegistry::load(const QString &filename) namespace bp = boost::python; -boost::tuple,QString> +boost::tuple,QString> ObjectRegistry::getObjectFromPython(const object &obj) { object result = obj.attr("what")(); @@ -104,7 +104,7 @@ ObjectRegistry::getObjectFromPython(const object &obj) type_name ); } -QList< boost::tuple,QString> > +QList< boost::tuple,QString> > ObjectRegistry::getObjectsFromPython(const object &obj) { PyObject *obj_ptr = obj.ptr(); @@ -114,9 +114,9 @@ ObjectRegistry::getObjectsFromPython(const object &obj) if ( PyTuple_Check(obj_ptr) ) { bp::tuple t( bp::handle<>(bp::borrowed(obj_ptr)) ); - + int n = PyTuple_Size(obj_ptr); - + for (int i=0; i(bp::borrowed(obj_ptr)) ); - + int n = PyList_Size(obj_ptr); - + for (int i=0; i,QString> > + QList< boost::tuple,QString> > objects_t = getObjectsFromPython(obj); - + return SireStream::detail::streamDataSave(objects_t); } void ObjectRegistry::save(const object &obj, const QString &filename) { - QList< boost::tuple,QString> > + QList< boost::tuple,QString> > objects_t = getObjectsFromPython(obj); - + SireStream::detail::streamDataSave(objects_t, filename); } Q_GLOBAL_STATIC( QMutex, registryMutex ); - + typedef QHash< QString,ObjectRegistry* > ObjectRegistryType; Q_GLOBAL_STATIC( ObjectRegistryType, objectRegistry ); static ObjectRegistryType& getRegistry() -{ +{ ObjectRegistryType *registry = objectRegistry(); - + if (registry == 0) std::abort(); @@ -177,7 +177,7 @@ void ObjectRegistry::registerConverter(const char *type_name, const ObjectRegistry &converter) { QMutexLocker lkr( registryMutex() ); - getRegistry().insert( type_name, converter.clone() ); + getRegistry().insert( type_name, converter.clone() ); } const ObjectRegistry& ObjectRegistry::getConverter(const QString &type_name) @@ -194,10 +194,10 @@ const ObjectRegistry& ObjectRegistry::getConverter(const QString &type_name) } const ObjectRegistry *registry = *(getRegistry().constFind(type_name)); - + if (registry == 0) throw SireError::program_bug( QObject::tr( - "How did the registry become null for %1?").arg(type_name), + "How did the registry become null for %1?").arg(type_name), CODELOC ); return *registry; diff --git a/wrapper/Helpers/pair.hpp b/wrapper/Helpers/pair.hpp index cda37784c..b52212bb5 100644 --- a/wrapper/Helpers/pair.hpp +++ b/wrapper/Helpers/pair.hpp @@ -34,6 +34,8 @@ #include #include +#include "Helpers/release_gil_policy.hpp" + namespace bp = boost::python; SIRE_BEGIN_HEADER @@ -57,6 +59,8 @@ struct from_py_pair to a QVector where all of the elements are of type 'T' */ static void* convertible(PyObject* obj_ptr) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + //is this a tuple type? if ( PyTuple_Check(obj_ptr) ) { @@ -110,6 +114,8 @@ struct from_py_pair PyObject* obj_ptr, bp::converter::rvalue_from_python_stage1_data* data) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + if (PyTuple_Check(obj_ptr)) { //convert the PyObject to a boost::python::object @@ -158,9 +164,12 @@ struct to_py_pair { static PyObject* convert(const std::pair &cpp_pair) { - bp::tuple python_tuple = bp::make_tuple( cpp_pair.first, cpp_pair.second ); + auto raii = boost::python::release_gil_policy::acquire_gil(); + { + bp::tuple python_tuple = bp::make_tuple( cpp_pair.first, cpp_pair.second ); - return bp::incref( python_tuple.ptr() ); + return bp::incref( python_tuple.ptr() ); + } } }; diff --git a/wrapper/Helpers/release_gil_policy.cpp b/wrapper/Helpers/release_gil_policy.cpp new file mode 100644 index 000000000..3ed7d4a5c --- /dev/null +++ b/wrapper/Helpers/release_gil_policy.cpp @@ -0,0 +1,136 @@ + +#include "release_gil_policy.hpp" + +#include "SireError/getbacktrace.h" + +#include + +#define SIRE_DISABLE_GIL_POLICY 1 +//#define SIRE_PRINT_GIL_STATUS 1 + +boost::python::detail::GilHolder::GilHolder() : thread_state(0) +{ + #ifndef SIRE_DISABLE_GIL_POLICY + #ifdef SIRE_PRINT_GIL_STATUS + qDebug() << "--RELEASE GIL"; + //for (const auto &bt : SireError::getBackTrace()) + //{ + // qDebug() << bt; + //} + #endif + thread_state = PyEval_SaveThread(); + #endif +} + +boost::python::detail::GilHolder::~GilHolder() +{ + #ifndef SIRE_DISABLE_GIL_POLICY + if (thread_state) + { + if (_Py_IsFinalizing()) + { + qDebug() << "FINALIZING!"; + } + else + { + #ifdef SIRE_PRINT_GIL_STATUS + qDebug() << "--ACQUIRE GIL"; + #endif + PyEval_RestoreThread(thread_state); + } + } + #endif +} + +boost::python::detail::GilRaiiData::GilRaiiData() +{} + +boost::python::detail::GilRaiiData::~GilRaiiData() +{ + #ifndef SIRE_DISABLE_GIL_POLICY + if (boost::python::release_gil_policy::gil.hasLocalData()) + { + qDebug() << "WARNING - DOUBLE HOLD GIL - POTENTIAL FOR DEADLOCK!"; + } + else + { + boost::python::release_gil_policy::gil.setLocalData(new boost::python::detail::GilHolder()); + } + #endif +} + +boost::python::GilRaii::GilRaii(bool acquired) +{ + #ifndef SIRE_DISABLE_GIL_POLICY + if (acquired) + { + d.reset(new boost::python::detail::GilRaiiData()); + } + #endif +} + +boost::python::GilRaii::~GilRaii() +{} + +/** Acquire the GIL, returning a RAII object which will release + * the GIL when it is destroyed + */ +boost::python::GilRaii boost::python::release_gil_policy::acquire_gil() +{ + #ifdef SIRE_DISABLE_GIL_POLICY + return boost::python::GilRaii(false); + #else + if (gil.hasLocalData()) + { + gil.setLocalData(0); + return GilRaii(true); + } + else + { + return GilRaii(false); + } + #endif +} + +/** Acquire the GIL without handling via a RAII object */ +void boost::python::release_gil_policy::acquire_gil_no_raii() +{ + #ifndef SIRE_DISABLE_GIL_POLICY + if (gil.hasLocalData()) + { + gil.setLocalData(0); + } + #endif +} + +/** Release the GIL without handling via a RAII object. You will + need to match this with a call to re-acquire the GIL before + you go back to Python +*/ +void boost::python::release_gil_policy::release_gil_no_raii() +{ + #ifndef SIRE_DISABLE_GIL_POLICY + if (boost::python::release_gil_policy::gil.hasLocalData()) + { + qDebug() << "WARNING - DOUBLE HOLD GIL - POTENTIAL FOR DEADLOCK!"; + return; + } + + boost::python::release_gil_policy::gil.setLocalData(new boost::python::detail::GilHolder()); + #endif +} + +void boost::python::release_gil_policy::_precall() +{ + gil.setLocalData(new detail::GilHolder()); +} + +void boost::python::release_gil_policy::_postcall() +{ + if (gil.hasLocalData()) + { + gil.setLocalData(0); + } +} + +QThreadStorage boost::python::release_gil_policy::gil; diff --git a/wrapper/Helpers/release_gil_policy.hpp b/wrapper/Helpers/release_gil_policy.hpp new file mode 100644 index 000000000..1d731f147 --- /dev/null +++ b/wrapper/Helpers/release_gil_policy.hpp @@ -0,0 +1,84 @@ +#ifndef _HELPERS_RELEASE_GIL_POLICY_HPP_ +#define _HELPERS_RELEASE_GIL_POLICY_HPP_ + +#include "boost/python.hpp" + +#include +#include + +#include + +#include "sireglobal.h" + +namespace boost { + namespace python { + + namespace detail { + class SIRE_EXPORT GilHolder + { + public: + GilHolder(); + + ~GilHolder(); + + private: + PyThreadState *thread_state; + }; + + class SIRE_EXPORT GilRaiiData + { + public: + GilRaiiData(); + ~GilRaiiData(); + }; + } + + class SIRE_EXPORT GilRaii + { + public: + GilRaii(bool acquired=true); + ~GilRaii(); + private: + std::shared_ptr d; + }; + + class SIRE_EXPORT release_gil_policy + { + friend class detail::GilRaiiData; + + public: + template + static bool precall(ArgumentPackage const&) + { + _precall(); + return true; + } + + template + static PyObject* postcall(ArgumentPackage const&, PyObject* result) + { + _postcall(); + return result; + } + + static GilRaii acquire_gil(); + static void acquire_gil_no_raii(); + static void release_gil_no_raii(); + + typedef default_result_converter result_converter; + typedef PyObject* argument_package; + + template + struct extract_return_type : mpl::front + {}; + + private: + static void _precall(); + static void _postcall(); + + static QThreadStorage gil; + }; + } +} + +#endif diff --git a/wrapper/Helpers/tuples.hpp b/wrapper/Helpers/tuples.hpp index 19885f973..610402254 100644 --- a/wrapper/Helpers/tuples.hpp +++ b/wrapper/Helpers/tuples.hpp @@ -95,6 +95,8 @@ * **/ +#include "Helpers/release_gil_policy.hpp" + namespace boost{ namespace python{ namespace details{ @@ -114,11 +116,14 @@ struct to_py_tuple{ typedef mpl::int_< tuples::length< TTuple >::value > length_type; static PyObject* convert(const TTuple& c_tuple){ - list values; - //add all c_tuple items to "values" list - convert_impl( c_tuple, values, mpl::int_< 0 >(), length_type() ); - //create Python tuple from the list - return incref( python::tuple( values ).ptr() ); + auto raii = boost::python::release_gil_policy::acquire_gil(); + { + list values; + //add all c_tuple items to "values" list + convert_impl( c_tuple, values, mpl::int_< 0 >(), length_type() ); + //create Python tuple from the list + return incref( python::tuple( values ).ptr() ); + } } private: @@ -147,56 +152,68 @@ struct from_py_sequence{ static long len(object const& obj) { - long result = PyObject_Length(obj.ptr()); - if (PyErr_Occurred()) throw_error_already_set(); - return result; + auto raii = boost::python::release_gil_policy::acquire_gil(); + { + long result = PyObject_Length(obj.ptr()); + if (PyErr_Occurred()) throw_error_already_set(); + return result; + } } static void* convertible(PyObject* py_obj){ - - if( !PySequence_Check( py_obj ) ){ - return 0; - } - - if( !PyObject_HasAttrString( py_obj, "__len__" ) ){ - return 0; - } - - python::object py_sequence( handle<>( borrowed( py_obj ) ) ); - - if( tuples::length< TTuple >::value != from_py_sequence::len( py_sequence ) ){ - return 0; - } - - if( convertible_impl( py_sequence, mpl::int_< 0 >(), length_type() ) ){ - return py_obj; - } - else{ - return 0; + auto raii = boost::python::release_gil_policy::acquire_gil(); + { + if( !PySequence_Check( py_obj ) ){ + return 0; + } + + if( !PyObject_HasAttrString( py_obj, "__len__" ) ){ + return 0; + } + + python::object py_sequence( handle<>( borrowed( py_obj ) ) ); + + if( tuples::length< TTuple >::value != from_py_sequence::len( py_sequence ) ){ + return 0; + } + + if( convertible_impl( py_sequence, mpl::int_< 0 >(), length_type() ) ){ + return py_obj; + } + else{ + return 0; + } } } static void construct( PyObject* py_obj, converter::rvalue_from_python_stage1_data* data){ - typedef converter::rvalue_from_python_storage storage_t; - storage_t* the_storage = reinterpret_cast( data ); - void* memory_chunk = the_storage->storage.bytes; - TTuple* c_tuple = new (memory_chunk) TTuple(); - data->convertible = memory_chunk; - - python::object py_sequence( handle<>( borrowed( py_obj ) ) ); - construct_impl( py_sequence, *c_tuple, mpl::int_< 0 >(), length_type() ); + // need to re-acquire the GIL when creating new objects + auto raii = boost::python::release_gil_policy::acquire_gil(); + { + typedef converter::rvalue_from_python_storage storage_t; + storage_t* the_storage = reinterpret_cast( data ); + void* memory_chunk = the_storage->storage.bytes; + TTuple* c_tuple = new (memory_chunk) TTuple(); + data->convertible = memory_chunk; + + python::object py_sequence( handle<>( borrowed( py_obj ) ) ); + construct_impl( py_sequence, *c_tuple, mpl::int_< 0 >(), length_type() ); + } } static TTuple to_c_tuple( PyObject* py_obj ){ - if( !convertible( py_obj ) ){ - throw std::runtime_error( "Unable to construct boost::tuples::tuple from Python object!" ); + auto raii = boost::python::release_gil_policy::acquire_gil(); + { + if( !convertible( py_obj ) ){ + throw std::runtime_error( "Unable to construct boost::tuples::tuple from Python object!" ); + } + TTuple c_tuple; + python::object py_sequence( handle<>( borrowed( py_obj ) ) ); + construct_impl( py_sequence, c_tuple, mpl::int_< 0 >(), length_type() ); + return c_tuple; } - TTuple c_tuple; - python::object py_sequence( handle<>( borrowed( py_obj ) ) ); - construct_impl( py_sequence, c_tuple, mpl::int_< 0 >(), length_type() ); - return c_tuple; } private: diff --git a/wrapper/ID/CMakeAutogenFile.txt b/wrapper/ID/CMakeAutogenFile.txt index 70e344b38..af2fac2ac 100644 --- a/wrapper/ID/CMakeAutogenFile.txt +++ b/wrapper/ID/CMakeAutogenFile.txt @@ -1,10 +1,10 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES ID.pypp.cpp + Index.pypp.cpp + IndexBase.pypp.cpp Name.pypp.cpp Number.pypp.cpp - IndexBase.pypp.cpp - Index.pypp.cpp _ID_enumerations.pypp.cpp SireID_registrars.cpp ) diff --git a/wrapper/ID/CMakeLists.txt b/wrapper/ID/CMakeLists.txt index 9afa47766..f86e84f04 100644 --- a/wrapper/ID/CMakeLists.txt +++ b/wrapper/ID/CMakeLists.txt @@ -22,7 +22,7 @@ include(CMakeAutogenFile.txt) set ( WRAPID_SOURCES _ID.main.cpp - + ${PYPP_SOURCES} ) @@ -30,7 +30,7 @@ set ( WRAPID_SOURCES # Create the library that holds all of the class wrappers add_library (ID ${WRAPID_SOURCES}) -set_target_properties (ID +set_target_properties (ID PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -38,18 +38,18 @@ set_target_properties (ID PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (ID SirePython SIRE_SireID - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_ID" "_init_ID" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/ID ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/ID ) install( TARGETS ID LIBRARY DESTINATION ${INSTALLDIR} @@ -58,6 +58,6 @@ install( TARGETS ID ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/ID/ID.pypp.cpp b/wrapper/ID/ID.pypp.cpp index e434645c4..0c5f87984 100644 --- a/wrapper/ID/ID.pypp.cpp +++ b/wrapper/ID/ID.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ID_class(){ { //::SireID::ID @@ -33,6 +35,7 @@ void register_ID_class(){ ID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this ID object - this allows\nthis object to be used as a key in a dictionary" ); } @@ -44,6 +47,7 @@ void register_ID_class(){ ID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this ID is null" ); } @@ -57,6 +61,7 @@ void register_ID_class(){ ID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -68,6 +73,7 @@ void register_ID_class(){ ID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +85,7 @@ void register_ID_class(){ ID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the type name of this ID object." ); } diff --git a/wrapper/ID/Index.pypp.cpp b/wrapper/ID/Index.pypp.cpp index af93140e3..8e8174788 100644 --- a/wrapper/ID/Index.pypp.cpp +++ b/wrapper/ID/Index.pypp.cpp @@ -23,6 +23,8 @@ SireID::Index __copy__(const SireID::Index &other){ return SireID::Index(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Index_class(){ { //::SireID::Index @@ -38,6 +40,7 @@ void register_Index_class(){ Index_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -49,6 +52,7 @@ void register_Index_class(){ Index_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +64,7 @@ void register_Index_class(){ Index_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/ID/IndexBase.pypp.cpp b/wrapper/ID/IndexBase.pypp.cpp index eb05210af..b25846398 100644 --- a/wrapper/ID/IndexBase.pypp.cpp +++ b/wrapper/ID/IndexBase.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireID::IndexBase&){ return "SireID::IndexBase";} +#include "Helpers/release_gil_policy.hpp" + void register_IndexBase_class(){ { //::SireID::IndexBase @@ -35,6 +37,7 @@ void register_IndexBase_class(){ IndexBase_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash this Index" ); } @@ -46,6 +49,7 @@ void register_IndexBase_class(){ IndexBase_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether this is a null index - a null\nindex is one that equals std::numeric_limits::min(),\nwhich should be -21474833648 for a 32bit integer" ); } @@ -58,6 +62,7 @@ void register_IndexBase_class(){ "map" , map_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Map this index into the container of n elements - this\nmaps the index (with negative indexing, e.g. -1 is the last\nelement), and throws an exception if the index is out\nof the bounds of the array\nThrow: SireError::invalid_index\n" ); } @@ -69,6 +74,7 @@ void register_IndexBase_class(){ IndexBase_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "Return the null index" ); } @@ -80,6 +86,7 @@ void register_IndexBase_class(){ IndexBase_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return the raw value of this index" ); } diff --git a/wrapper/ID/Name.pypp.cpp b/wrapper/ID/Name.pypp.cpp index b3048399d..a6adcb358 100644 --- a/wrapper/ID/Name.pypp.cpp +++ b/wrapper/ID/Name.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireID::Name&){ return "SireID::Name";} +#include "Helpers/release_gil_policy.hpp" + void register_Name_class(){ { //::SireID::Name @@ -29,6 +31,7 @@ void register_Name_class(){ Name_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -40,6 +43,7 @@ void register_Name_class(){ Name_exposer.def( "isCaseSensitive" , isCaseSensitive_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +55,7 @@ void register_Name_class(){ Name_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -62,6 +67,7 @@ void register_Name_class(){ Name_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/ID/Number.pypp.cpp b/wrapper/ID/Number.pypp.cpp index 780d523e2..691c8571b 100644 --- a/wrapper/ID/Number.pypp.cpp +++ b/wrapper/ID/Number.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireID::Number&){ return "SireID::Number";} +#include "Helpers/release_gil_policy.hpp" + void register_Number_class(){ { //::SireID::Number @@ -29,6 +31,7 @@ void register_Number_class(){ Number_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -40,6 +43,7 @@ void register_Number_class(){ Number_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +55,7 @@ void register_Number_class(){ Number_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -62,6 +67,7 @@ void register_Number_class(){ Number_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/ID/SireID_registrars.cpp b/wrapper/ID/SireID_registrars.cpp index 4b926e595..27ccdea0e 100644 --- a/wrapper/ID/SireID_registrars.cpp +++ b/wrapper/ID/SireID_registrars.cpp @@ -5,16 +5,16 @@ #include "Helpers/version_error_impl.h" -#include "index.h" #include "identifier.h" +#include "index.h" #include "Helpers/objectregistry.hpp" void register_SireID_objects() { - ObjectRegistry::registerConverterFor< SireID::Index >(); ObjectRegistry::registerConverterFor< SireID::Identifier >(); + ObjectRegistry::registerConverterFor< SireID::Index >(); } diff --git a/wrapper/ID/__init__.py b/wrapper/ID/__init__.py index 9c675d5a8..24dd6b60e 100644 --- a/wrapper/ID/__init__.py +++ b/wrapper/ID/__init__.py @@ -1,15 +1,24 @@ -############################# -## -## The SireID library. -## -## This module provides the bases for the ID classes -## +""" +.. currentmodule:: sire.legacy.ID + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + ID + Index + Name + Number + +""" # Import all of the Qt classes -import Sire.Qt +from .. import Qt as _Qt # Import all of the classes and functions from the C++ library -from Sire.ID._ID import * +from ._ID import * # Now define some pure Python functions and classes that are part of # this library... diff --git a/wrapper/IO/Amber.pypp.cpp b/wrapper/IO/Amber.pypp.cpp index 7cd4bb9ce..89f227038 100644 --- a/wrapper/IO/Amber.pypp.cpp +++ b/wrapper/IO/Amber.pypp.cpp @@ -91,6 +91,8 @@ SireIO::Amber __copy__(const SireIO::Amber &other){ return SireIO::Amber(other); const char* pvt_get_name(const SireIO::Amber&){ return "SireIO::Amber";} +#include "Helpers/release_gil_policy.hpp" + void register_Amber_class(){ { //::SireIO::Amber @@ -106,6 +108,7 @@ void register_Amber_class(){ Amber_exposer.def( "coulomb14Factor" , coulomb14Factor_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +120,7 @@ void register_Amber_class(){ Amber_exposer.def( "lj14Factor" , lj14Factor_function_value + , bp::release_gil_policy() , "" ); } @@ -156,6 +160,7 @@ void register_Amber_class(){ "set14Factors" , set14Factors_function_value , ( bp::arg("coul_14"), bp::arg("lj_14") ) + , bp::release_gil_policy() , "" ); } @@ -167,6 +172,7 @@ void register_Amber_class(){ Amber_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -178,6 +184,7 @@ void register_Amber_class(){ Amber_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/AmberPrm.pypp.cpp b/wrapper/IO/AmberPrm.pypp.cpp index 629fb0823..867dfd69c 100644 --- a/wrapper/IO/AmberPrm.pypp.cpp +++ b/wrapper/IO/AmberPrm.pypp.cpp @@ -127,6 +127,8 @@ SireIO::AmberPrm __copy__(const SireIO::AmberPrm &other){ return SireIO::AmberPr #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AmberPrm_class(){ { //::SireIO::AmberPrm @@ -152,6 +154,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "assertSane" , assertSane_function_value + , bp::release_gil_policy() , "Run through all of the data that has been read and perform a series\nof tests that will see if the prm7 data is sane. If any test fails,\nthen an exception will be thrown" ); } @@ -163,6 +166,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "The AmberPrm cannot follow another lead parsers." ); } @@ -175,6 +179,7 @@ void register_AmberPrm_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed filename" ); } @@ -187,6 +192,7 @@ void register_AmberPrm_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed set of lines" ); } @@ -199,6 +205,7 @@ void register_AmberPrm_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed SireSystem::System" ); } @@ -211,6 +218,7 @@ void register_AmberPrm_class(){ "flagType" , flagType_function_value , ( bp::arg("flag") ) + , bp::release_gil_policy() , "Return the flag type for the data associated with the passed flag.\nThis returns UNKNOWN if this is not known" ); } @@ -222,6 +230,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "flags" , flags_function_value + , bp::release_gil_policy() , "Return all of the flags that are held in this file" ); } @@ -234,6 +243,7 @@ void register_AmberPrm_class(){ "floatData" , floatData_function_value , ( bp::arg("flag") ) + , bp::release_gil_policy() , "Return the float data for the passed flag. This returns an empty\nlist if there is no data associated with this flag. This raises\nan invalid_cast error if data exists, but it is the wrong type" ); } @@ -245,6 +255,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "forcefield" , forcefield_function_value + , bp::release_gil_policy() , "Return the forcefield for the molecules in this file" ); } @@ -256,6 +267,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -267,6 +279,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -278,6 +291,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that AmberPrm files are normally associated with" ); } @@ -314,6 +328,7 @@ void register_AmberPrm_class(){ "intData" , intData_function_value , ( bp::arg("flag") ) + , bp::release_gil_policy() , "Return the integer data for the passed flag. This returns an empty\nlist if there is no data associated with this flag. This raises\nan invalid_cast error if data exists, but it is the wrong type" ); } @@ -325,6 +340,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "The AmberPrm parser is a lead parser - it is capable alone\nof creating the System." ); } @@ -337,6 +353,7 @@ void register_AmberPrm_class(){ "linesForFlag" , linesForFlag_function_value , ( bp::arg("flag") ) + , bp::release_gil_policy() , "Return the lines that correspond to the passed flag. This returns an\nempty list of there are no lines associated with the passed flag" ); } @@ -348,6 +365,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nAngles" , nAngles_function_value + , bp::release_gil_policy() , "Return the number of angles" ); } @@ -359,6 +377,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nAnglesNoHydrogen" , nAnglesNoHydrogen_function_value + , bp::release_gil_policy() , "Return the number of angles without hydrogen" ); } @@ -370,6 +389,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nAnglesWithHydrogen" , nAnglesWithHydrogen_function_value + , bp::release_gil_policy() , "Return the number of angles containing hydrogen" ); } @@ -381,6 +401,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the total number of atoms in the file" ); } @@ -393,6 +414,7 @@ void register_AmberPrm_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("molidx") ) + , bp::release_gil_policy() , "Return the total number of atoms in the ith molecule in the file" ); } @@ -404,6 +426,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nBonds" , nBonds_function_value + , bp::release_gil_policy() , "Return the total number of bonds" ); } @@ -415,6 +438,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nBondsNoHydrogen" , nBondsNoHydrogen_function_value + , bp::release_gil_policy() , "Return the number of bonds no containing hydrogen" ); } @@ -426,6 +450,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nBondsWithHydrogen" , nBondsWithHydrogen_function_value + , bp::release_gil_policy() , "Return the number of bonds including hydrogen" ); } @@ -437,6 +462,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nDihedrals" , nDihedrals_function_value + , bp::release_gil_policy() , "Return the number of dihedrals" ); } @@ -448,6 +474,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nDihedralsNoHydrogen" , nDihedralsNoHydrogen_function_value + , bp::release_gil_policy() , "Return the number of dihedrals without hydrogen" ); } @@ -459,6 +486,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nDihedralsWithHydrogen" , nDihedralsWithHydrogen_function_value + , bp::release_gil_policy() , "Return the number of dihedrals containing hydrogen" ); } @@ -470,6 +498,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nExcluded" , nExcluded_function_value + , bp::release_gil_policy() , "Return the number of excluded atoms" ); } @@ -481,6 +510,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules in the file" ); } @@ -492,6 +522,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of residues" ); } @@ -503,6 +534,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "nTypes" , nTypes_function_value + , bp::release_gil_policy() , "Return the number of distinct atom types" ); } @@ -542,6 +574,7 @@ void register_AmberPrm_class(){ "stringData" , stringData_function_value , ( bp::arg("flag") ) + , bp::release_gil_policy() , "Return the string data for the passed flag. This returns an empty\nlist if there is no data associated with this flag. This raises\nan invalid_cast error if data exists, but it is the wrong type" ); } @@ -553,6 +586,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "title" , title_function_value + , bp::release_gil_policy() , "Return the title of the parameter file" ); } @@ -564,6 +598,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this object" ); } @@ -575,6 +610,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -586,6 +622,7 @@ void register_AmberPrm_class(){ AmberPrm_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/AmberRst.pypp.cpp b/wrapper/IO/AmberRst.pypp.cpp index c9cde9941..e08da9839 100644 --- a/wrapper/IO/AmberRst.pypp.cpp +++ b/wrapper/IO/AmberRst.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; #include "SireMol/atomvelocities.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -63,6 +65,8 @@ SireIO::AmberRst __copy__(const SireIO::AmberRst &other){ return SireIO::AmberRs #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AmberRst_class(){ @@ -83,6 +87,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "boxAngles" , boxAngles_function_value + , bp::release_gil_policy() , "Return the parsed box angles, or Vector(0) if there is no space information.\nIf there are multiple frames, then only the first frame is returned" ); } @@ -95,6 +100,7 @@ void register_AmberRst_class(){ "boxAngles" , boxAngles_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the box angles of the ith frame from the file" ); } @@ -106,6 +112,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "boxDimensions" , boxDimensions_function_value + , bp::release_gil_policy() , "Return the parsed box dimensions, or Vector(0) if there is no space information.\nIf there are multiple frames, then only the first frame is returned" ); } @@ -118,6 +125,7 @@ void register_AmberRst_class(){ "boxDimensions" , boxDimensions_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the box dimensions of the ith\n frame from the file" ); } @@ -130,6 +138,7 @@ void register_AmberRst_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed filename" ); } @@ -142,6 +151,7 @@ void register_AmberRst_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed set of lines" ); } @@ -154,6 +164,7 @@ void register_AmberRst_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed SireSystem::System" ); } @@ -165,6 +176,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "coordinates" , coordinates_function_value + , bp::release_gil_policy() , "Return the parsed coordinate data. If there are multiple frames,\nthen only the first frame is returned" ); } @@ -177,6 +189,7 @@ void register_AmberRst_class(){ "coordinates" , coordinates_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the coordinates of the ith frame from the file" ); } @@ -188,6 +201,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of frames in the file" ); } @@ -199,6 +213,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "createdFromRestart" , createdFromRestart_function_value + , bp::release_gil_policy() , "Return whether or not this was created from a restart (.rst) file" ); } @@ -210,6 +225,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "createdFromTrajectory" , createdFromTrajectory_function_value + , bp::release_gil_policy() , "Return whether or not this was created from a trajectory (.trj) file" ); } @@ -221,6 +237,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "creatorApplication" , creatorApplication_function_value + , bp::release_gil_policy() , "Return the application that created the file that has been parsed" ); } @@ -232,6 +249,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "forces" , forces_function_value + , bp::release_gil_policy() , "Return the parsed force data. If there are multiple frames,\nthen only the first frame is returned" ); } @@ -244,6 +262,7 @@ void register_AmberRst_class(){ "forces" , forces_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the forces of the ith frame from the file" ); } @@ -255,6 +274,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -266,6 +286,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -277,6 +298,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that AmberRst files will typically use" ); } @@ -288,6 +310,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "formatVersion" , formatVersion_function_value + , bp::release_gil_policy() , "Return the version of the file format that was parsed" ); } @@ -299,6 +322,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "hasCoordinates" , hasCoordinates_function_value + , bp::release_gil_policy() , "Return whether or not this restart file provides coordinates" ); } @@ -310,6 +334,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "hasForces" , hasForces_function_value + , bp::release_gil_policy() , "Return whether or not this restart file also provides forces" ); } @@ -321,6 +346,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "hasVelocities" , hasVelocities_function_value + , bp::release_gil_policy() , "Return whether or not this restart file also provides velocities" ); } @@ -332,6 +358,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "isTextFile" , isTextFile_function_value + , bp::release_gil_policy() , "This is not a text file" ); } @@ -343,6 +370,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms whose data are contained in this restart file" ); } @@ -354,6 +382,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "nFrames" , nFrames_function_value + , bp::release_gil_policy() , "Return the number of frames that have been loaded from the file" ); } @@ -393,6 +422,7 @@ void register_AmberRst_class(){ "parse" , parse_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Parse from the passed file" ); } @@ -404,6 +434,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of frames in the file" ); } @@ -415,6 +446,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "time" , time_function_value + , bp::release_gil_policy() , "Return the current time of the simulation from which this restart\nfile was written. Returns 0 if there is no time set. If there are\nmultiple frames, then the time of the first frame is returned" ); } @@ -427,6 +459,7 @@ void register_AmberRst_class(){ "time" , time_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the time of the ith frame from the file" ); } @@ -438,6 +471,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "title" , title_function_value + , bp::release_gil_policy() , "Return the title of the file" ); } @@ -449,6 +483,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -460,6 +495,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -471,6 +507,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "velocities" , velocities_function_value + , bp::release_gil_policy() , "Return the parsed coordinate data. If there are multiple frames,\nthen only the first frame is returned" ); } @@ -483,6 +520,7 @@ void register_AmberRst_class(){ "velocities" , velocities_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the velocities of the ith frame from the file" ); } @@ -494,6 +532,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "warnings" , warnings_function_value + , bp::release_gil_policy() , "Return any warnings that were triggered during parsing" ); } @@ -505,6 +544,7 @@ void register_AmberRst_class(){ AmberRst_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -517,6 +557,7 @@ void register_AmberRst_class(){ "writeToFile" , writeToFile_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Write this AmberRst to a file called filename. This will write out\nthe data in this object to the Amber NetCDF format" ); } diff --git a/wrapper/IO/AmberRst7.pypp.cpp b/wrapper/IO/AmberRst7.pypp.cpp index eb172e13c..57a4c803a 100644 --- a/wrapper/IO/AmberRst7.pypp.cpp +++ b/wrapper/IO/AmberRst7.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "SireMol/atomvelocities.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -53,6 +55,8 @@ SireIO::AmberRst7 __copy__(const SireIO::AmberRst7 &other){ return SireIO::Amber #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AmberRst7_class(){ { //::SireIO::AmberRst7 @@ -71,6 +75,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "boxAngles" , boxAngles_function_value + , bp::release_gil_policy() , "Return the parsed box angles" ); } @@ -82,6 +87,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "boxDimensions" , boxDimensions_function_value + , bp::release_gil_policy() , "Return the parsed box dimensions" ); } @@ -94,6 +100,7 @@ void register_AmberRst7_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed filename" ); } @@ -106,6 +113,7 @@ void register_AmberRst7_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed set of lines" ); } @@ -118,6 +126,7 @@ void register_AmberRst7_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed SireSystem::System" ); } @@ -129,6 +138,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "coordinates" , coordinates_function_value + , bp::release_gil_policy() , "Return the parsed coordinate data" ); } @@ -140,6 +150,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -151,6 +162,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -162,6 +174,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that RST7 files will typically have" ); } @@ -173,6 +186,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "hasVelocities" , hasVelocities_function_value + , bp::release_gil_policy() , "Return whether or not this restart file also provides velocities" ); } @@ -184,6 +198,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms whose coordinates are contained in this restart file" ); } @@ -211,6 +226,7 @@ void register_AmberRst7_class(){ "parse" , parse_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Parse from the passed file" ); } @@ -222,6 +238,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "time" , time_function_value + , bp::release_gil_policy() , "Return the current time of the simulation from which this restart\nfile was written in picoseconds.\nThis is a negative number if the time has not been set" ); } @@ -233,6 +250,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "title" , title_function_value + , bp::release_gil_policy() , "Return the title of the file" ); } @@ -244,6 +262,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -255,6 +274,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -266,6 +286,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "velocities" , velocities_function_value + , bp::release_gil_policy() , "Return the parsed coordinate data" ); } @@ -277,6 +298,7 @@ void register_AmberRst7_class(){ AmberRst7_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/CMakeAutogenFile.txt b/wrapper/IO/CMakeAutogenFile.txt index 424d20bdb..2fae1333c 100644 --- a/wrapper/IO/CMakeAutogenFile.txt +++ b/wrapper/IO/CMakeAutogenFile.txt @@ -1,38 +1,38 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - TinkerParameters.pypp.cpp - GroSystem.pypp.cpp - NullIO.pypp.cpp - PDB.pypp.cpp - PerturbationsTemplate.pypp.cpp - PDBParameters.pypp.cpp - TrajectoryMonitor.pypp.cpp - GroTop.pypp.cpp - Tinker.pypp.cpp + Amber.pypp.cpp + AmberPrm.pypp.cpp + AmberRst.pypp.cpp + AmberRst7.pypp.cpp + CharmmPSF.pypp.cpp Cube.pypp.cpp - ProtoMS.pypp.cpp + FlexibilityLibrary.pypp.cpp + FlexibilityTemplate.pypp.cpp Gro87.pypp.cpp - CharmmPSF.pypp.cpp - PDB2.pypp.cpp - PerturbationsLibrary.pypp.cpp - Mol2.pypp.cpp GroAtom.pypp.cpp - AmberRst7.pypp.cpp + GroMolType.pypp.cpp + GroSystem.pypp.cpp + GroTop.pypp.cpp IOBase.pypp.cpp - MoleculeParser.pypp.cpp - Supplementary.pypp.cpp - _IO_free_functions.pypp.cpp IOParametersBase.pypp.cpp - FlexibilityTemplate.pypp.cpp - AmberPrm.pypp.cpp - AmberRst.pypp.cpp + Mol2.pypp.cpp + MoleculeParser.pypp.cpp + NullIO.pypp.cpp + NullParser.pypp.cpp + PDB.pypp.cpp + PDB2.pypp.cpp + PDBParameters.pypp.cpp + PerturbationsLibrary.pypp.cpp + PerturbationsTemplate.pypp.cpp + ProtoMS.pypp.cpp + ProtoMSParameters.pypp.cpp SDF.pypp.cpp - GroMolType.pypp.cpp + Supplementary.pypp.cpp + Tinker.pypp.cpp + TinkerParameters.pypp.cpp + TrajectoryMonitor.pypp.cpp ZmatrixMaker.pypp.cpp - ProtoMSParameters.pypp.cpp - NullParser.pypp.cpp - Amber.pypp.cpp - FlexibilityLibrary.pypp.cpp + _IO_free_functions.pypp.cpp SireIO_containers.cpp SireIO_properties.cpp SireIO_registrars.cpp diff --git a/wrapper/IO/CMakeLists.txt b/wrapper/IO/CMakeLists.txt index 535d38abf..2ba45d694 100644 --- a/wrapper/IO/CMakeLists.txt +++ b/wrapper/IO/CMakeLists.txt @@ -6,7 +6,7 @@ # Third Party dependencies of this module include_directories( ${BOOST_INCLUDE_DIR} - ${PYTHON_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} ${SIRE_GSL_INCLUDE_PATH} ) # Sire include paths @@ -23,7 +23,8 @@ include(CMakeAutogenFile.txt) set ( WRAPIO_SOURCES _IO.main.cpp - + _IO_load.cpp + ${PYPP_SOURCES} ) @@ -39,18 +40,18 @@ set_target_properties (IO PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (IO SirePython SIRE_SireIO - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_IO" "_init_IO" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/IO ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/IO ) install( TARGETS IO LIBRARY DESTINATION ${INSTALLDIR} @@ -59,6 +60,6 @@ install( TARGETS IO ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/IO/CharmmPSF.pypp.cpp b/wrapper/IO/CharmmPSF.pypp.cpp index 002011681..d63f77cfe 100644 --- a/wrapper/IO/CharmmPSF.pypp.cpp +++ b/wrapper/IO/CharmmPSF.pypp.cpp @@ -41,6 +41,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -73,6 +75,8 @@ SireIO::CharmmPSF __copy__(const SireIO::CharmmPSF &other){ return SireIO::Charm #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CharmmPSF_class(){ { //::SireIO::CharmmPSF @@ -91,6 +95,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "Return whether or not this parser can follow another lead parser, and add\ndata to an existing molecular system. The CharmmPSF parser cannot follow." ); } @@ -103,6 +108,7 @@ void register_CharmmPSF_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\nfile using the passed properties" ); } @@ -115,6 +121,7 @@ void register_CharmmPSF_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\ntext lines using the passed properties" ); } @@ -127,6 +134,7 @@ void register_CharmmPSF_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by extract all necessary\ndata from the passed SireSystem::System using the specified properties" ); } @@ -138,6 +146,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -149,6 +158,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -160,6 +170,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that these files are normally associated with" ); } @@ -171,6 +182,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "Return whether or not this is a lead parser. The lead parser is responsible\nfor starting the process of turning the parsed file into the System. There\nmust be one and one-only lead parser in a set of parsers creating a System" ); } @@ -182,6 +194,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nAngles" , nAngles_function_value + , bp::release_gil_policy() , "Return the number of angle records." ); } @@ -194,6 +207,7 @@ void register_CharmmPSF_class(){ "nAngles" , nAngles_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of angles in molecule i." ); } @@ -205,6 +219,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atom records." ); } @@ -217,6 +232,7 @@ void register_CharmmPSF_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of atoms in molecule i." ); } @@ -228,6 +244,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nBonds" , nBonds_function_value + , bp::release_gil_policy() , "Return the number of bond records." ); } @@ -240,6 +257,7 @@ void register_CharmmPSF_class(){ "nBonds" , nBonds_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of bonds in molecule i." ); } @@ -251,6 +269,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nCrossTerms" , nCrossTerms_function_value + , bp::release_gil_policy() , "Return the number of cross-term records." ); } @@ -263,6 +282,7 @@ void register_CharmmPSF_class(){ "nCrossTerms" , nCrossTerms_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of cross-terms in molecule i." ); } @@ -274,6 +294,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nDihedrals" , nDihedrals_function_value + , bp::release_gil_policy() , "Return the number of dihedral records." ); } @@ -286,6 +307,7 @@ void register_CharmmPSF_class(){ "nDihedrals" , nDihedrals_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of dihedrals in molecule i." ); } @@ -297,6 +319,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nImpropers" , nImpropers_function_value + , bp::release_gil_policy() , "Return the number of improper records." ); } @@ -309,6 +332,7 @@ void register_CharmmPSF_class(){ "nImpropers" , nImpropers_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of impropers in molecule i." ); } @@ -320,6 +344,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules." ); } @@ -331,6 +356,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "nNonBondedExclusions" , nNonBondedExclusions_function_value + , bp::release_gil_policy() , "Return the number of non-bonded exclusion records." ); } @@ -343,6 +369,7 @@ void register_CharmmPSF_class(){ "nNonBondedExclusions" , nNonBondedExclusions_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of non-bonded exclusions in molecule i." ); } @@ -369,6 +396,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "toLines" , toLines_function_value + , bp::release_gil_policy() , "Convert the parsed data to a collection of PSF record lines." ); } @@ -380,6 +408,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this parser" ); } @@ -391,6 +420,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -402,6 +432,7 @@ void register_CharmmPSF_class(){ CharmmPSF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } diff --git a/wrapper/IO/Cube.pypp.cpp b/wrapper/IO/Cube.pypp.cpp index 9b3db5d10..0718f5adc 100644 --- a/wrapper/IO/Cube.pypp.cpp +++ b/wrapper/IO/Cube.pypp.cpp @@ -33,6 +33,8 @@ SireIO::Cube __copy__(const SireIO::Cube &other){ return SireIO::Cube(other); } const char* pvt_get_name(const SireIO::Cube&){ return "SireIO::Cube";} +#include "Helpers/release_gil_policy.hpp" + void register_Cube_class(){ { //::SireIO::Cube diff --git a/wrapper/IO/FlexibilityLibrary.pypp.cpp b/wrapper/IO/FlexibilityLibrary.pypp.cpp index 69ef61f75..c8d0f017e 100644 --- a/wrapper/IO/FlexibilityLibrary.pypp.cpp +++ b/wrapper/IO/FlexibilityLibrary.pypp.cpp @@ -53,6 +53,8 @@ SireIO::FlexibilityLibrary __copy__(const SireIO::FlexibilityLibrary &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FlexibilityLibrary_class(){ { //::SireIO::FlexibilityLibrary @@ -70,6 +72,7 @@ void register_FlexibilityLibrary_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the templates in other into this library" ); } @@ -82,6 +85,7 @@ void register_FlexibilityLibrary_class(){ "getFlexibility" , getFlexibility_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Generate the Flexibility property for the atoms in the passed molecule view" ); } @@ -107,6 +111,7 @@ void register_FlexibilityLibrary_class(){ "loadTemplates" , loadTemplates_function_value , ( bp::arg("file") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_FlexibilityLibrary_class(){ "setTemplate" , setTemplate_function_value , ( bp::arg("key"), bp::arg("tmplate") ) + , bp::release_gil_policy() , "Set the template associated with the passed key" ); } @@ -146,6 +152,7 @@ void register_FlexibilityLibrary_class(){ FlexibilityLibrary_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/FlexibilityTemplate.pypp.cpp b/wrapper/IO/FlexibilityTemplate.pypp.cpp index cc8ab3a21..405ea1eb9 100644 --- a/wrapper/IO/FlexibilityTemplate.pypp.cpp +++ b/wrapper/IO/FlexibilityTemplate.pypp.cpp @@ -53,6 +53,8 @@ SireIO::FlexibilityTemplate __copy__(const SireIO::FlexibilityTemplate &other){ const char* pvt_get_name(const SireIO::FlexibilityTemplate&){ return "SireIO::FlexibilityTemplate";} +#include "Helpers/release_gil_policy.hpp" + void register_FlexibilityTemplate_class(){ { //::SireIO::FlexibilityTemplate @@ -94,6 +96,7 @@ void register_FlexibilityTemplate_class(){ "getDelta" , getDelta_function_value , ( bp::arg("bondid") ) + , bp::release_gil_policy() , "" ); } @@ -106,6 +109,7 @@ void register_FlexibilityTemplate_class(){ "getDelta" , getDelta_function_value , ( bp::arg("angleid") ) + , bp::release_gil_policy() , "" ); } @@ -118,6 +122,7 @@ void register_FlexibilityTemplate_class(){ "getDelta" , getDelta_function_value , ( bp::arg("dihedralid") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +146,7 @@ void register_FlexibilityTemplate_class(){ FlexibilityTemplate_exposer.def( "getMaximumAngleVar" , getMaximumAngleVar_function_value + , bp::release_gil_policy() , "" ); } @@ -152,6 +158,7 @@ void register_FlexibilityTemplate_class(){ FlexibilityTemplate_exposer.def( "getMaximumBondVar" , getMaximumBondVar_function_value + , bp::release_gil_policy() , "" ); } @@ -163,6 +170,7 @@ void register_FlexibilityTemplate_class(){ FlexibilityTemplate_exposer.def( "getMaximumDihedralVar" , getMaximumDihedralVar_function_value + , bp::release_gil_policy() , "" ); } @@ -174,6 +182,7 @@ void register_FlexibilityTemplate_class(){ FlexibilityTemplate_exposer.def( "getName" , getName_function_value + , bp::release_gil_policy() , "" ); } @@ -185,6 +194,7 @@ void register_FlexibilityTemplate_class(){ FlexibilityTemplate_exposer.def( "getRotation" , getRotation_function_value + , bp::release_gil_policy() , "" ); } @@ -196,6 +206,7 @@ void register_FlexibilityTemplate_class(){ FlexibilityTemplate_exposer.def( "getTranslation" , getTranslation_function_value + , bp::release_gil_policy() , "" ); } @@ -223,6 +234,7 @@ void register_FlexibilityTemplate_class(){ "setAngleDelta" , setAngleDelta_function_value , ( bp::arg("angleid"), bp::arg("delta") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +247,7 @@ void register_FlexibilityTemplate_class(){ "setBondDelta" , setBondDelta_function_value , ( bp::arg("bondid"), bp::arg("delta") ) + , bp::release_gil_policy() , "" ); } @@ -247,6 +260,7 @@ void register_FlexibilityTemplate_class(){ "setDihedralDelta" , setDihedralDelta_function_value , ( bp::arg("dihedralid"), bp::arg("delta") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +273,7 @@ void register_FlexibilityTemplate_class(){ "setMaximumAngleVar" , setMaximumAngleVar_function_value , ( bp::arg("maxvar") ) + , bp::release_gil_policy() , "" ); } @@ -271,6 +286,7 @@ void register_FlexibilityTemplate_class(){ "setMaximumBondVar" , setMaximumBondVar_function_value , ( bp::arg("maxvar") ) + , bp::release_gil_policy() , "" ); } @@ -283,6 +299,7 @@ void register_FlexibilityTemplate_class(){ "setMaximumDihedralVar" , setMaximumDihedralVar_function_value , ( bp::arg("maxvar") ) + , bp::release_gil_policy() , "" ); } @@ -295,6 +312,7 @@ void register_FlexibilityTemplate_class(){ "setRotation" , setRotation_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "" ); } @@ -307,6 +325,7 @@ void register_FlexibilityTemplate_class(){ "setTranslation" , setTranslation_function_value , ( bp::arg("distance") ) + , bp::release_gil_policy() , "" ); } @@ -318,6 +337,7 @@ void register_FlexibilityTemplate_class(){ FlexibilityTemplate_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/Gro87.pypp.cpp b/wrapper/IO/Gro87.pypp.cpp index 86c39e33f..4d5af6a21 100644 --- a/wrapper/IO/Gro87.pypp.cpp +++ b/wrapper/IO/Gro87.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "SireMol/atomvelocities.h" +#include "SireMol/core.h" + #include "SireMol/errors.h" #include "SireMol/mgname.h" @@ -67,6 +69,8 @@ SireIO::Gro87 __copy__(const SireIO::Gro87 &other){ return SireIO::Gro87(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Gro87_class(){ @@ -87,6 +91,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "atomNames" , atomNames_function_value + , bp::release_gil_policy() , "Return the names of all of the atoms, in the same order as the coordinates" ); } @@ -98,6 +103,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "atomNumbers" , atomNumbers_function_value + , bp::release_gil_policy() , "Return the numbers of all of the atoms. These are in the same order\nas the coordinates" ); } @@ -109,6 +115,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "boxV1" , boxV1_function_value + , bp::release_gil_policy() , "Return the box V1 vector for the first frame" ); } @@ -121,6 +128,7 @@ void register_Gro87_class(){ "boxV1" , boxV1_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the box V1 vector for the frame frame" ); } @@ -132,6 +140,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "boxV2" , boxV2_function_value + , bp::release_gil_policy() , "Return the box V2 vector for the first frame" ); } @@ -144,6 +153,7 @@ void register_Gro87_class(){ "boxV2" , boxV2_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the box V2 vector for the frame frame" ); } @@ -155,6 +165,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "boxV3" , boxV3_function_value + , bp::release_gil_policy() , "Return the box V3 vector for the first frame" ); } @@ -167,6 +178,7 @@ void register_Gro87_class(){ "boxV3" , boxV3_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the box V3 vector for the frame frame" ); } @@ -178,6 +190,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "Gro87 can be a lead parser as well as a follower" ); } @@ -190,6 +203,7 @@ void register_Gro87_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\nfile using the passed properties" ); } @@ -202,6 +216,7 @@ void register_Gro87_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\ntext lines using the passed properties" ); } @@ -214,6 +229,7 @@ void register_Gro87_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by extract all necessary\ndata from the passed SireSystem::System using the specified properties" ); } @@ -225,6 +241,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "coordinates" , coordinates_function_value + , bp::release_gil_policy() , "Return the coordinates of the atoms for the first frame of the trajectory" ); } @@ -237,6 +254,7 @@ void register_Gro87_class(){ "coordinates" , coordinates_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the coordinates of the atoms at frame frame" ); } @@ -248,6 +266,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of frames in the file" ); } @@ -259,6 +278,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -270,6 +290,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -281,6 +302,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that these files are normally associated with" ); } @@ -292,6 +314,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "hasCoordinates" , hasCoordinates_function_value + , bp::release_gil_policy() , "Return whether or not this file contained coordinate data" ); } @@ -303,6 +326,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "hasVelocities" , hasVelocities_function_value + , bp::release_gil_policy() , "Return whether or not this file contained velocity data" ); } @@ -314,6 +338,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "Gro87 can be a lead parser as well as a follower" ); } @@ -325,6 +350,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms whose data is contained in this file" ); } @@ -336,6 +362,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "nFrames" , nFrames_function_value + , bp::release_gil_policy() , "Return the number of frames of the trajectory loaded from the file" ); } @@ -347,6 +374,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of unique residues in this file" ); } @@ -385,6 +413,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "residueNames" , residueNames_function_value + , bp::release_gil_policy() , "Return the residue name for each atom (one per atom), in the same\norder as the coordinates" ); } @@ -396,6 +425,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "residueNumbers" , residueNumbers_function_value + , bp::release_gil_policy() , "Return the residue number for each atom (one per atom), in the same\norder as the coordinates" ); } @@ -407,6 +437,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of frames in the file" ); } @@ -418,6 +449,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "time" , time_function_value + , bp::release_gil_policy() , "Return the current time of the simulation from which this coordinate\nfile was written. Returns 0 if there is no time set. If there are\nmultiple frames, then the time of the first frame is returned" ); } @@ -430,6 +462,7 @@ void register_Gro87_class(){ "time" , time_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the time for the structure at the specified frame" ); } @@ -441,6 +474,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "title" , title_function_value + , bp::release_gil_policy() , "Return the title of the file" ); } @@ -452,6 +486,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this parser" ); } @@ -463,6 +498,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -474,6 +510,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "velocities" , velocities_function_value + , bp::release_gil_policy() , "Return the velocities of the atoms for the first frame of the trajectory" ); } @@ -486,6 +523,7 @@ void register_Gro87_class(){ "velocities" , velocities_function_value , ( bp::arg("frame") ) + , bp::release_gil_policy() , "Return the velocities of the atoms at frame frame" ); } @@ -497,6 +535,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "warnings" , warnings_function_value + , bp::release_gil_policy() , "Return the warnings encountered when parsing the file. This\nis empty if everything was ok" ); } @@ -508,6 +547,7 @@ void register_Gro87_class(){ Gro87_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } diff --git a/wrapper/IO/GroAtom.pypp.cpp b/wrapper/IO/GroAtom.pypp.cpp index c62741281..af616334a 100644 --- a/wrapper/IO/GroAtom.pypp.cpp +++ b/wrapper/IO/GroAtom.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/errors.h" #include "SireMol/molecule.h" @@ -77,6 +79,8 @@ SireIO::GroAtom __copy__(const SireIO::GroAtom &other){ return SireIO::GroAtom(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GroAtom_class(){ { //::SireIO::GroAtom @@ -92,6 +96,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "atomType" , atomType_function_value + , bp::release_gil_policy() , "Return the atom type of this atom" ); } @@ -103,6 +108,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "bondType" , bondType_function_value + , bp::release_gil_policy() , "Return the bond type of this atom. This is normally the same as the atom type" ); } @@ -114,6 +120,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "charge" , charge_function_value + , bp::release_gil_policy() , "Return the charge on this atom" ); } @@ -125,6 +132,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "chargeGroup" , chargeGroup_function_value + , bp::release_gil_policy() , "Return the charge group of this atom" ); } @@ -136,6 +144,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this atom is null" ); } @@ -147,6 +156,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "mass" , mass_function_value + , bp::release_gil_policy() , "Return the mass of this atom" ); } @@ -158,6 +168,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of the atom" ); } @@ -169,6 +180,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the number of the atom" ); } @@ -195,6 +207,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "residueName" , residueName_function_value + , bp::release_gil_policy() , "Return the name of the residue that contains this atom" ); } @@ -206,6 +219,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "residueNumber" , residueNumber_function_value + , bp::release_gil_policy() , "Return the number of the residue that contains this atom" ); } @@ -218,6 +232,7 @@ void register_GroAtom_class(){ "setAtomType" , setAtomType_function_value , ( bp::arg("atomtype") ) + , bp::release_gil_policy() , "Set the atom type and bond type of this atom. To set\nthe bond type separately, you need to set it after calling\nthis function" ); } @@ -230,6 +245,7 @@ void register_GroAtom_class(){ "setBondType" , setBondType_function_value , ( bp::arg("bondtype") ) + , bp::release_gil_policy() , "Set the bond type of this atom" ); } @@ -242,6 +258,7 @@ void register_GroAtom_class(){ "setCharge" , setCharge_function_value , ( bp::arg("charge") ) + , bp::release_gil_policy() , "Set the charge on this atom" ); } @@ -254,6 +271,7 @@ void register_GroAtom_class(){ "setChargeGroup" , setChargeGroup_function_value , ( bp::arg("grp") ) + , bp::release_gil_policy() , "Set the charge group of this atom" ); } @@ -266,6 +284,7 @@ void register_GroAtom_class(){ "setMass" , setMass_function_value , ( bp::arg("mass") ) + , bp::release_gil_policy() , "Set the mass of this atom" ); } @@ -278,6 +297,7 @@ void register_GroAtom_class(){ "setName" , setName_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Set the name of this atom" ); } @@ -290,6 +310,7 @@ void register_GroAtom_class(){ "setNumber" , setNumber_function_value , ( bp::arg("number") ) + , bp::release_gil_policy() , "Set the number of this atom" ); } @@ -302,6 +323,7 @@ void register_GroAtom_class(){ "setResidueName" , setResidueName_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Set the name of the residue containing this atom" ); } @@ -314,6 +336,7 @@ void register_GroAtom_class(){ "setResidueNumber" , setResidueNumber_function_value , ( bp::arg("number") ) + , bp::release_gil_policy() , "Set the number of the residue containing this atom" ); } @@ -325,6 +348,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -336,6 +360,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -347,6 +372,7 @@ void register_GroAtom_class(){ GroAtom_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/GroMolType.pypp.cpp b/wrapper/IO/GroMolType.pypp.cpp index 7163de808..14e2db97e 100644 --- a/wrapper/IO/GroMolType.pypp.cpp +++ b/wrapper/IO/GroMolType.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/errors.h" #include "SireMol/molecule.h" @@ -77,6 +79,8 @@ SireIO::GroMolType __copy__(const SireIO::GroMolType &other){ return SireIO::Gro #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GroMolType_class(){ { //::SireIO::GroMolType @@ -178,6 +182,7 @@ void register_GroMolType_class(){ "addWarning" , addWarning_function_value , ( bp::arg("warning") ) + , bp::release_gil_policy() , "Add a warning that has been generated while parsing or creatig this object" ); } @@ -333,6 +338,7 @@ void register_GroMolType_class(){ GroMolType_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this object is null" ); } @@ -344,6 +350,7 @@ void register_GroMolType_class(){ GroMolType_exposer.def( "isPerturbable" , isPerturbable_function_value + , bp::release_gil_policy() , "Return whether or not this molecule is perturbable." ); } @@ -403,6 +410,7 @@ void register_GroMolType_class(){ GroMolType_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of this moleculetype" ); } @@ -454,7 +462,7 @@ void register_GroMolType_class(){ "setAtoms" , setAtoms_function_value , ( bp::arg("atoms"), bp::arg("is_lambda1")=(bool)(false) ) - , "Set the atoms to the passed vector" ); + , "" ); } { //::SireIO::GroMolType::setNExcludedAtoms @@ -478,6 +486,7 @@ void register_GroMolType_class(){ "setName" , setName_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Set the name of this moleculetype" ); } @@ -501,6 +510,7 @@ void register_GroMolType_class(){ GroMolType_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string form for this object" ); } @@ -512,6 +522,7 @@ void register_GroMolType_class(){ GroMolType_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -523,6 +534,7 @@ void register_GroMolType_class(){ GroMolType_exposer.def( "warnings" , warnings_function_value + , bp::release_gil_policy() , "Return any warnings associated with this moleculetype" ); } @@ -534,6 +546,7 @@ void register_GroMolType_class(){ GroMolType_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/GroSystem.pypp.cpp b/wrapper/IO/GroSystem.pypp.cpp index 42ac1879e..30e5843fe 100644 --- a/wrapper/IO/GroSystem.pypp.cpp +++ b/wrapper/IO/GroSystem.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/errors.h" #include "SireMol/molecule.h" @@ -77,6 +79,8 @@ SireIO::GroSystem __copy__(const SireIO::GroSystem &other){ return SireIO::GroSy #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GroSystem_class(){ @@ -108,6 +112,7 @@ void register_GroSystem_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the molecule type of the ith molecule" ); } @@ -119,6 +124,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of molecules in the system" ); } @@ -130,6 +136,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is an empty system (no molecules)" ); } @@ -141,6 +148,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is a null GroSystem" ); } @@ -152,6 +160,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules in the system" ); } @@ -163,6 +172,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of the system" ); } @@ -202,6 +212,7 @@ void register_GroSystem_class(){ "setName" , setName_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Set the name of the system" ); } @@ -213,6 +224,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of molecules in the system" ); } @@ -224,6 +236,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this system" ); } @@ -235,6 +248,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -246,6 +260,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "uniqueTypes" , uniqueTypes_function_value + , bp::release_gil_policy() , "Return the list of unique molecule types held in the system" ); } @@ -257,6 +272,7 @@ void register_GroSystem_class(){ GroSystem_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/GroTop.pypp.cpp b/wrapper/IO/GroTop.pypp.cpp index e496bd742..49ca344f0 100644 --- a/wrapper/IO/GroTop.pypp.cpp +++ b/wrapper/IO/GroTop.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/errors.h" #include "SireMol/molecule.h" @@ -77,6 +79,8 @@ SireIO::GroTop __copy__(const SireIO::GroTop &other){ return SireIO::GroTop(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GroTop_class(){ { //::SireIO::GroTop @@ -96,6 +100,7 @@ void register_GroTop_class(){ "angle" , angle_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("atm2"), bp::arg("func") ) + , bp::release_gil_policy() , "Return the angle potential data for the passed triple of atoms. This only returns\nthe most recently inserted parameter for these atoms. Use angles if you want\nto allow for multiple return values" ); } @@ -107,6 +112,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "anglePotentials" , anglePotentials_function_value + , bp::release_gil_policy() , "Return the angle potentials loaded from this file" ); } @@ -119,6 +125,7 @@ void register_GroTop_class(){ "angles" , angles_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("atm2"), bp::arg("func") ) + , bp::release_gil_policy() , "Return the angle potential data for the passed triple of atoms. This returns\na list of all associated parameters" ); } @@ -131,6 +138,7 @@ void register_GroTop_class(){ "atomType" , atomType_function_value , ( bp::arg("atm") ) + , bp::release_gil_policy() , "Return the atom type data for the passed atom type. This returns\nnull data if it is not present" ); } @@ -142,6 +150,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "atomTypes" , atomTypes_function_value + , bp::release_gil_policy() , "Return the atom types loaded from this file" ); } @@ -154,6 +163,7 @@ void register_GroTop_class(){ "bond" , bond_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("func") ) + , bp::release_gil_policy() , "Return the bond potential data for the passed pair of atoms. This only returns\nthe most recently inserted parameter for this pair. Use bonds if you want\nto allow for multiple return values" ); } @@ -165,6 +175,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "bondPotentials" , bondPotentials_function_value + , bp::release_gil_policy() , "Return the bond potentials loaded from this file" ); } @@ -177,6 +188,7 @@ void register_GroTop_class(){ "bonds" , bonds_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("func") ) + , bp::release_gil_policy() , "Return the bond potential data for the passed pair of atoms. This returns\na list of all associated parameters" ); } @@ -188,6 +200,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "Return whether or not this parser can follow another lead parser, and add\ndata to an existing molecular system. The GroTop parser cannot follow." ); } @@ -199,6 +212,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "combiningRules" , combiningRules_function_value + , bp::release_gil_policy() , "Return the combining rules to use for the molecules in this file" ); } @@ -211,6 +225,7 @@ void register_GroTop_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\nfile using the passed properties" ); } @@ -223,6 +238,7 @@ void register_GroTop_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\ntext lines using the passed properties" ); } @@ -235,6 +251,7 @@ void register_GroTop_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by extract all necessary\ndata from the passed SireSystem::System using the specified properties" ); } @@ -247,6 +264,7 @@ void register_GroTop_class(){ "dihedral" , dihedral_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("atm2"), bp::arg("atm3"), bp::arg("func") ) + , bp::release_gil_policy() , "Return the dihedral potential data for the passed quad of atoms. This only returns\nthe most recently inserted parameter for these atoms. Use dihedrals if you want\nto allow for multiple return values" ); } @@ -258,6 +276,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "dihedralPotentials" , dihedralPotentials_function_value + , bp::release_gil_policy() , "Return the dihedral potentials loaded from this file" ); } @@ -270,6 +289,7 @@ void register_GroTop_class(){ "dihedrals" , dihedrals_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("atm2"), bp::arg("atm3"), bp::arg("func") ) + , bp::release_gil_policy() , "Return the dihedral potential data for the passed quad of atoms. This returns\na list of all associated parameters" ); } @@ -281,6 +301,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -292,6 +313,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -303,6 +325,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that these files are normally associated with" ); } @@ -314,6 +337,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "fudgeLJ" , fudgeLJ_function_value + , bp::release_gil_policy() , "Return the Lennard Jones fudge factor for the molecules in this file" ); } @@ -325,6 +349,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "fudgeQQ" , fudgeQQ_function_value + , bp::release_gil_policy() , "Return the electrostatic fudge factor for the molecules in this file" ); } @@ -336,6 +361,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "generateNonBondedPairs" , generateNonBondedPairs_function_value + , bp::release_gil_policy() , "Return whether or not the non-bonded pairs should be automatically generated\nfor the molecules in this file" ); } @@ -347,6 +373,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "groSystem" , groSystem_function_value + , bp::release_gil_policy() , "Return the Gromacs System that describes the list of molecules that should\nbe contained" ); } @@ -382,6 +409,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "Return whether or not this is a lead parser. The lead parser is responsible\nfor starting the process of turning the parsed file into the System. There\nmust be one and one-only lead parser in a set of parsers creating a System" ); } @@ -394,6 +422,7 @@ void register_GroTop_class(){ "moleculeType" , moleculeType_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the moleculetype with name name. This returns an invalid (empty)\nGroMolType if one with this name does not exist" ); } @@ -405,6 +434,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "moleculeTypes" , moleculeTypes_function_value + , bp::release_gil_policy() , "Return all of the moleculetypes that have been loaded from this file" ); } @@ -416,6 +446,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "nonBondedFunctionType" , nonBondedFunctionType_function_value + , bp::release_gil_policy() , "Return the non-bonded function type for the molecules in this file" ); } @@ -442,6 +473,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "postprocessedLines" , postprocessedLines_function_value + , bp::release_gil_policy() , "Public function used to return the list of post-processed lines" ); } @@ -453,6 +485,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this parser" ); } @@ -464,6 +497,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -475,6 +509,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "warnings" , warnings_function_value + , bp::release_gil_policy() , "Return all of the warnings that were raised when parsing the file" ); } @@ -486,6 +521,7 @@ void register_GroTop_class(){ GroTop_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } diff --git a/wrapper/IO/IOBase.pypp.cpp b/wrapper/IO/IOBase.pypp.cpp index 6f24309ca..b59a9f09a 100644 --- a/wrapper/IO/IOBase.pypp.cpp +++ b/wrapper/IO/IOBase.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IOBase_class(){ { //::SireIO::IOBase @@ -43,6 +45,7 @@ void register_IOBase_class(){ IOBase_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "Return the global null IOBase object (a PDB writer)" ); } @@ -150,6 +153,7 @@ void register_IOBase_class(){ IOBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/IOParametersBase.pypp.cpp b/wrapper/IO/IOParametersBase.pypp.cpp index 745079153..ce3b46cc6 100644 --- a/wrapper/IO/IOParametersBase.pypp.cpp +++ b/wrapper/IO/IOParametersBase.pypp.cpp @@ -31,6 +31,8 @@ SireIO::IOParametersBase __copy__(const SireIO::IOParametersBase &other){ return const char* pvt_get_name(const SireIO::IOParametersBase&){ return "SireIO::IOParametersBase";} +#include "Helpers/release_gil_policy.hpp" + void register_IOParametersBase_class(){ { //::SireIO::IOParametersBase diff --git a/wrapper/IO/Mol2.pypp.cpp b/wrapper/IO/Mol2.pypp.cpp index f3bd9cd34..ae92f1477 100644 --- a/wrapper/IO/Mol2.pypp.cpp +++ b/wrapper/IO/Mol2.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "SireMol/atomelements.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -45,6 +47,8 @@ SireIO::Mol2 __copy__(const SireIO::Mol2 &other){ return SireIO::Mol2(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Mol2_class(){ { //::SireIO::Mol2 @@ -63,6 +67,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "" ); } @@ -75,6 +80,7 @@ void register_Mol2_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\nfile using the passed properties" ); } @@ -87,6 +93,7 @@ void register_Mol2_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\ntext lines using the passed properties" ); } @@ -99,6 +106,7 @@ void register_Mol2_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by extract all necessary\ndata from the passed SireSystem::System using the specified properties" ); } @@ -110,6 +118,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -121,6 +130,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -132,6 +142,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that these files are normally associated with" ); } @@ -143,6 +154,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +167,7 @@ void register_Mol2_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of atoms in a specific molecule." ); } @@ -166,6 +179,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the total number of atoms in all molecules." ); } @@ -178,6 +192,7 @@ void register_Mol2_class(){ "nBonds" , nBonds_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of bonds in a specific molecule." ); } @@ -189,6 +204,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "nBonds" , nBonds_function_value + , bp::release_gil_policy() , "Return the total number of bonds in all molecules." ); } @@ -200,6 +216,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "nMolAtoms" , nMolAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in each molecule." ); } @@ -211,6 +228,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "nMolBonds" , nMolBonds_function_value + , bp::release_gil_policy() , "Return the number of bonds in each molecule." ); } @@ -222,6 +240,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "nMolSubstructures" , nMolSubstructures_function_value + , bp::release_gil_policy() , "Return the number of substructures in each molecule." ); } @@ -233,6 +252,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules in the system." ); } @@ -245,6 +265,7 @@ void register_Mol2_class(){ "nSubstructures" , nSubstructures_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of substructures in a specific molecule." ); } @@ -256,6 +277,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "nSubstructures" , nSubstructures_function_value + , bp::release_gil_policy() , "Return the total number of substructures in all molecules." ); } @@ -282,6 +304,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "toLines" , toLines_function_value + , bp::release_gil_policy() , "Convert the the parsed data to a collection of Mol2 record lines." ); } @@ -293,6 +316,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this parser" ); } @@ -304,6 +328,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -315,6 +340,7 @@ void register_Mol2_class(){ Mol2_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } diff --git a/wrapper/IO/MoleculeParser.pypp.cpp b/wrapper/IO/MoleculeParser.pypp.cpp index fd31511a7..b49cdd614 100644 --- a/wrapper/IO/MoleculeParser.pypp.cpp +++ b/wrapper/IO/MoleculeParser.pypp.cpp @@ -49,6 +49,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MoleculeParser_class(){ { //::SireIO::MoleculeParser @@ -63,6 +65,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "Return whether or not this parser can follow a lead parser and add data\nto an existing molecular system. By default, all parsers can follow." ); } @@ -75,6 +78,7 @@ void register_MoleculeParser_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -87,6 +91,7 @@ void register_MoleculeParser_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -99,6 +104,7 @@ void register_MoleculeParser_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -110,6 +116,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "disableParallel" , disableParallel_function_value + , bp::release_gil_policy() , "Disable code to parse files in parallel - parsing will happen in serial" ); } @@ -121,6 +128,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "enableParallel" , enableParallel_function_value + , bp::release_gil_policy() , "Enable code to parse files in parallel" ); } @@ -132,6 +140,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +152,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the unique name of this format. This should be a short\nstring in capital letters that will identify the format within\nthe program, e.g. PRM7, RST7, PDB3 etc." ); } @@ -154,6 +164,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffix (or suffixes) given to files that support this format.\nThe first suffix is the preferred on to use" ); } @@ -165,6 +176,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "isBinaryFile" , isBinaryFile_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +188,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -187,6 +200,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "Return whether or not this is a lead parser. The lead parser is responsible\nfor starting the process of turning the parsed file into the System. There\nmust be one and one-only lead parser in a set of parsers creating a System" ); } @@ -198,6 +212,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "isTextFile" , isTextFile_function_value + , bp::release_gil_policy() , "" ); } @@ -221,7 +236,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "load" , load_function_value - , ( bp::arg("filename"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Synonym for MoleculeParser::read" ); } @@ -233,7 +249,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "load" , load_function_value - , ( bp::arg("file1"), bp::arg("file2"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("file1"), bp::arg("file2"), bp::arg("map") ) + , bp::release_gil_policy() , "Synonym for MoleculeParser::read" ); } @@ -245,7 +262,47 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "load" , load_function_value - , ( bp::arg("filenames"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("filenames"), bp::arg("map") ) + , bp::release_gil_policy() + , "Synonym for MoleculeParser::read" ); + + } + { //::SireIO::MoleculeParser::load + + typedef ::SireSystem::System ( *load_function_type )( ::QString const & ); + load_function_type load_function_value( &::SireIO::MoleculeParser::load ); + + MoleculeParser_exposer.def( + "load" + , load_function_value + , ( bp::arg("filename") ) + , bp::release_gil_policy() + , "Synonym for MoleculeParser::read" ); + + } + { //::SireIO::MoleculeParser::load + + typedef ::SireSystem::System ( *load_function_type )( ::QString const &,::QString const & ); + load_function_type load_function_value( &::SireIO::MoleculeParser::load ); + + MoleculeParser_exposer.def( + "load" + , load_function_value + , ( bp::arg("file1"), bp::arg("file2") ) + , bp::release_gil_policy() + , "Synonym for MoleculeParser::read" ); + + } + { //::SireIO::MoleculeParser::load + + typedef ::SireSystem::System ( *load_function_type )( ::QStringList const & ); + load_function_type load_function_value( &::SireIO::MoleculeParser::load ); + + MoleculeParser_exposer.def( + "load" + , load_function_value + , ( bp::arg("filenames") ) + , bp::release_gil_policy() , "Synonym for MoleculeParser::read" ); } @@ -269,7 +326,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "parse" , parse_function_value - , ( bp::arg("filename"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Parse the passed set of files, returning the resulting Parsers" ); } @@ -281,7 +339,34 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "parse" , parse_function_value - , ( bp::arg("filenames"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("filenames"), bp::arg("map") ) + , bp::release_gil_policy() + , "Parse the passed set of files, returning the resulting Parsers" ); + + } + { //::SireIO::MoleculeParser::parse + + typedef ::SireIO::MoleculeParserPtr ( *parse_function_type )( ::QString const & ); + parse_function_type parse_function_value( &::SireIO::MoleculeParser::parse ); + + MoleculeParser_exposer.def( + "parse" + , parse_function_value + , ( bp::arg("filename") ) + , bp::release_gil_policy() + , "Parse the passed set of files, returning the resulting Parsers" ); + + } + { //::SireIO::MoleculeParser::parse + + typedef ::QList< SireBase::PropPtr< SireIO::MoleculeParser > > ( *parse_function_type )( ::QStringList const & ); + parse_function_type parse_function_value( &::SireIO::MoleculeParser::parse ); + + MoleculeParser_exposer.def( + "parse" + , parse_function_value + , ( bp::arg("filenames") ) + , bp::release_gil_policy() , "Parse the passed set of files, returning the resulting Parsers" ); } @@ -293,7 +378,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "read" , read_function_value - , ( bp::arg("filename"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Read the files with passed filenames, returning the System contained therein.\nNote that all of the files must be connected to the same system\n(i.e. it could be the Amber Parm and Rst file)" ); } @@ -305,7 +391,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "read" , read_function_value - , ( bp::arg("file1"), bp::arg("file2"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("file1"), bp::arg("file2"), bp::arg("map") ) + , bp::release_gil_policy() , "Read the two passed files, returning the System contained therein. The two\nfiles must refer to the same System, i.e. they could be a parameter + coordinate file" ); } @@ -317,7 +404,47 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "read" , read_function_value - , ( bp::arg("filenames"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("filenames"), bp::arg("map") ) + , bp::release_gil_policy() + , "Read the files with passed filenames, returning the System contained therein.\nNote that all of the files must be connected to the same system\n(i.e. it could be the Amber Parm and Rst file)" ); + + } + { //::SireIO::MoleculeParser::read + + typedef ::SireSystem::System ( *read_function_type )( ::QString const & ); + read_function_type read_function_value( &::SireIO::MoleculeParser::read ); + + MoleculeParser_exposer.def( + "read" + , read_function_value + , ( bp::arg("filename") ) + , bp::release_gil_policy() + , "Read the files with passed filenames, returning the System contained therein.\nNote that all of the files must be connected to the same system\n(i.e. it could be the Amber Parm and Rst file)" ); + + } + { //::SireIO::MoleculeParser::read + + typedef ::SireSystem::System ( *read_function_type )( ::QString const &,::QString const & ); + read_function_type read_function_value( &::SireIO::MoleculeParser::read ); + + MoleculeParser_exposer.def( + "read" + , read_function_value + , ( bp::arg("file1"), bp::arg("file2") ) + , bp::release_gil_policy() + , "Read the two passed files, returning the System contained therein. The two\nfiles must refer to the same System, i.e. they could be a parameter + coordinate file" ); + + } + { //::SireIO::MoleculeParser::read + + typedef ::SireSystem::System ( *read_function_type )( ::QStringList const & ); + read_function_type read_function_value( &::SireIO::MoleculeParser::read ); + + MoleculeParser_exposer.def( + "read" + , read_function_value + , ( bp::arg("filenames") ) + , bp::release_gil_policy() , "Read the files with passed filenames, returning the System contained therein.\nNote that all of the files must be connected to the same system\n(i.e. it could be the Amber Parm and Rst file)" ); } @@ -329,7 +456,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "save" , save_function_value - , ( bp::arg("system"), bp::arg("filename"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("system"), bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Synonym of MoleculeParser::write" ); } @@ -341,7 +469,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "save" , save_function_value - , ( bp::arg("system"), bp::arg("file1"), bp::arg("file2"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("system"), bp::arg("file1"), bp::arg("file2"), bp::arg("map") ) + , bp::release_gil_policy() , "Synonym of MoleculeParser::write" ); } @@ -353,7 +482,47 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "save" , save_function_value - , ( bp::arg("system"), bp::arg("filenames"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("system"), bp::arg("filenames"), bp::arg("map") ) + , bp::release_gil_policy() + , "Synonym of MoleculeParser::write" ); + + } + { //::SireIO::MoleculeParser::save + + typedef ::QStringList ( *save_function_type )( ::SireSystem::System const &,::QString const & ); + save_function_type save_function_value( &::SireIO::MoleculeParser::save ); + + MoleculeParser_exposer.def( + "save" + , save_function_value + , ( bp::arg("system"), bp::arg("filename") ) + , bp::release_gil_policy() + , "Synonym of MoleculeParser::write" ); + + } + { //::SireIO::MoleculeParser::save + + typedef ::QStringList ( *save_function_type )( ::SireSystem::System const &,::QString const &,::QString const & ); + save_function_type save_function_value( &::SireIO::MoleculeParser::save ); + + MoleculeParser_exposer.def( + "save" + , save_function_value + , ( bp::arg("system"), bp::arg("file1"), bp::arg("file2") ) + , bp::release_gil_policy() + , "Synonym of MoleculeParser::write" ); + + } + { //::SireIO::MoleculeParser::save + + typedef ::QStringList ( *save_function_type )( ::SireSystem::System const &,::QStringList const & ); + save_function_type save_function_value( &::SireIO::MoleculeParser::save ); + + MoleculeParser_exposer.def( + "save" + , save_function_value + , ( bp::arg("system"), bp::arg("filenames") ) + , bp::release_gil_policy() , "Synonym of MoleculeParser::write" ); } @@ -365,6 +534,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "score" , score_function_value + , bp::release_gil_policy() , "" ); } @@ -377,6 +547,7 @@ void register_MoleculeParser_class(){ "setUseParallel" , setUseParallel_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to parse files in parallel or serial" ); } @@ -388,6 +559,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "supportedFormats" , supportedFormats_function_value + , bp::release_gil_policy() , "This returns a human readable set of lines describing the formats supported\nby MoleculeParser. Each line is formatted as extension : description where\nextension is the unique extension of the file used by MoleculeParser, and\ndescription is a description of the file format" ); } @@ -399,7 +571,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "toSystem" , toSystem_function_value - , ( bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("map") ) + , bp::release_gil_policy() , "Return the System that is constructed from the data in this parser" ); } @@ -411,7 +584,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "toSystem" , toSystem_function_value - , ( bp::arg("other"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("other"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the System that is constructed from the data in the two\npassed parsers (i.e. representing a topology and a coordinate file)" ); } @@ -423,7 +597,46 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "toSystem" , toSystem_function_value - , ( bp::arg("others"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("others"), bp::arg("map") ) + , bp::release_gil_policy() + , "Return the System that is constructed from the information in the passed\nparsers. This will parse the information in order, meaning that data contained\nin earlier parsers may be overwritten by data from later parsers" ); + + } + { //::SireIO::MoleculeParser::toSystem + + typedef ::SireSystem::System ( ::SireIO::MoleculeParser::*toSystem_function_type)( ) const; + toSystem_function_type toSystem_function_value( &::SireIO::MoleculeParser::toSystem ); + + MoleculeParser_exposer.def( + "toSystem" + , toSystem_function_value + , bp::release_gil_policy() + , "Return the System that is constructed from the data in this parser" ); + + } + { //::SireIO::MoleculeParser::toSystem + + typedef ::SireSystem::System ( ::SireIO::MoleculeParser::*toSystem_function_type)( ::SireIO::MoleculeParser const & ) const; + toSystem_function_type toSystem_function_value( &::SireIO::MoleculeParser::toSystem ); + + MoleculeParser_exposer.def( + "toSystem" + , toSystem_function_value + , ( bp::arg("other") ) + , bp::release_gil_policy() + , "Return the System that is constructed from the data in the two\npassed parsers (i.e. representing a topology and a coordinate file)" ); + + } + { //::SireIO::MoleculeParser::toSystem + + typedef ::SireSystem::System ( ::SireIO::MoleculeParser::*toSystem_function_type)( ::QList< SireBase::PropPtr< SireIO::MoleculeParser > > const & ) const; + toSystem_function_type toSystem_function_value( &::SireIO::MoleculeParser::toSystem ); + + MoleculeParser_exposer.def( + "toSystem" + , toSystem_function_value + , ( bp::arg("others") ) + , bp::release_gil_policy() , "Return the System that is constructed from the information in the passed\nparsers. This will parse the information in order, meaning that data contained\nin earlier parsers may be overwritten by data from later parsers" ); } @@ -435,6 +648,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -446,6 +660,7 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "usesParallel" , usesParallel_function_value + , bp::release_gil_policy() , "" ); } @@ -457,7 +672,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "write" , write_function_value - , ( bp::arg("system"), bp::arg("filename"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("system"), bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Save the passed System to the file called filename. First, the fileformat\nproperty is looked at in map. This is used to set the format(s) of\nthe files that are written (comma-separated list).\nIf this does not exist, then the extension of the\nfile is used to work out which format to use. If no extension is given,\nthen the System will be queried to find out its preferred format (normally\nthe format it was loaded with), via its fileformat property\n(again, comma separated list).\nIf their preferred format results in multiple files, then\nmultiple files will be written. This returns the full pathnames to\nall of the files that are written\n" ); } @@ -469,7 +685,8 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "write" , write_function_value - , ( bp::arg("system"), bp::arg("file1"), bp::arg("file2"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("system"), bp::arg("file1"), bp::arg("file2"), bp::arg("map") ) + , bp::release_gil_policy() , "Extension of MoleculeParser::write which allows you to specify two filenames.\nThe same rules to locate the fileformats are now used, except now only two\nfiles are permitted to be written" ); } @@ -481,7 +698,47 @@ void register_MoleculeParser_class(){ MoleculeParser_exposer.def( "write" , write_function_value - , ( bp::arg("system"), bp::arg("filenames"), bp::arg("map")=SireBase::PropertyMap() ) + , ( bp::arg("system"), bp::arg("filenames"), bp::arg("map") ) + , bp::release_gil_policy() + , "Extension of MoleculeParser::write which allows many filenames.\nThe same rules to locate the fileformats are now used, except that now only\nthe number of files written must match the number of filenames" ); + + } + { //::SireIO::MoleculeParser::write + + typedef ::QStringList ( *write_function_type )( ::SireSystem::System const &,::QString const & ); + write_function_type write_function_value( &::SireIO::MoleculeParser::write ); + + MoleculeParser_exposer.def( + "write" + , write_function_value + , ( bp::arg("system"), bp::arg("filename") ) + , bp::release_gil_policy() + , "Save the passed System to the file called filename. First, the fileformat\nproperty is looked at in map. This is used to set the format(s) of\nthe files that are written (comma-separated list).\nIf this does not exist, then the extension of the\nfile is used to work out which format to use. If no extension is given,\nthen the System will be queried to find out its preferred format (normally\nthe format it was loaded with), via its fileformat property\n(again, comma separated list).\nIf their preferred format results in multiple files, then\nmultiple files will be written. This returns the full pathnames to\nall of the files that are written\n" ); + + } + { //::SireIO::MoleculeParser::write + + typedef ::QStringList ( *write_function_type )( ::SireSystem::System const &,::QString const &,::QString const & ); + write_function_type write_function_value( &::SireIO::MoleculeParser::write ); + + MoleculeParser_exposer.def( + "write" + , write_function_value + , ( bp::arg("system"), bp::arg("file1"), bp::arg("file2") ) + , bp::release_gil_policy() + , "Extension of MoleculeParser::write which allows you to specify two filenames.\nThe same rules to locate the fileformats are now used, except now only two\nfiles are permitted to be written" ); + + } + { //::SireIO::MoleculeParser::write + + typedef ::QStringList ( *write_function_type )( ::SireSystem::System const &,::QStringList const & ); + write_function_type write_function_value( &::SireIO::MoleculeParser::write ); + + MoleculeParser_exposer.def( + "write" + , write_function_value + , ( bp::arg("system"), bp::arg("filenames") ) + , bp::release_gil_policy() , "Extension of MoleculeParser::write which allows many filenames.\nThe same rules to locate the fileformats are now used, except that now only\nthe number of files written must match the number of filenames" ); } @@ -494,6 +751,7 @@ void register_MoleculeParser_class(){ "writeToFile" , writeToFile_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Write the parsed data back to the file called filename. This will\noverwrite the file if it exists already, so be careful" ); } diff --git a/wrapper/IO/NullIO.pypp.cpp b/wrapper/IO/NullIO.pypp.cpp index ab55f4c9f..f0f585363 100644 --- a/wrapper/IO/NullIO.pypp.cpp +++ b/wrapper/IO/NullIO.pypp.cpp @@ -33,6 +33,8 @@ SireIO::NullIO __copy__(const SireIO::NullIO &other){ return SireIO::NullIO(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullIO_class(){ { //::SireIO::NullIO @@ -63,6 +65,7 @@ void register_NullIO_class(){ NullIO_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/NullParser.pypp.cpp b/wrapper/IO/NullParser.pypp.cpp index b56712d56..d89f426c4 100644 --- a/wrapper/IO/NullParser.pypp.cpp +++ b/wrapper/IO/NullParser.pypp.cpp @@ -51,6 +51,8 @@ SireIO::NullParser __copy__(const SireIO::NullParser &other){ return SireIO::Nul #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullParser_class(){ { //::SireIO::NullParser @@ -67,6 +69,7 @@ void register_NullParser_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed filename" ); } @@ -79,6 +82,7 @@ void register_NullParser_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed set of lines" ); } @@ -91,6 +95,7 @@ void register_NullParser_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed SireSystem::System" ); } @@ -102,6 +107,7 @@ void register_NullParser_class(){ NullParser_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -113,6 +119,7 @@ void register_NullParser_class(){ NullParser_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "" ); } @@ -175,6 +182,7 @@ void register_NullParser_class(){ NullParser_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/PDB.pypp.cpp b/wrapper/IO/PDB.pypp.cpp index 878e0577e..f3a0d1f5a 100644 --- a/wrapper/IO/PDB.pypp.cpp +++ b/wrapper/IO/PDB.pypp.cpp @@ -89,6 +89,8 @@ SireIO::PDB __copy__(const SireIO::PDB &other){ return SireIO::PDB(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PDB_class(){ { //::SireIO::PDB @@ -131,6 +133,7 @@ void register_PDB_class(){ PDB_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -142,6 +145,7 @@ void register_PDB_class(){ PDB_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/PDB2.pypp.cpp b/wrapper/IO/PDB2.pypp.cpp index 1e1107591..d08839d8f 100644 --- a/wrapper/IO/PDB2.pypp.cpp +++ b/wrapper/IO/PDB2.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "SireMol/atomelements.h" +#include "SireMol/core.h" + #include "SireMol/errors.h" #include "SireMol/molecule.h" @@ -51,6 +53,8 @@ SireIO::PDB2 __copy__(const SireIO::PDB2 &other){ return SireIO::PDB2(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PDB2_class(){ { //::SireIO::PDB2 @@ -70,6 +74,7 @@ void register_PDB2_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\nfile using the passed properties" ); } @@ -82,6 +87,7 @@ void register_PDB2_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\ntext lines using the passed properties" ); } @@ -94,6 +100,7 @@ void register_PDB2_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by extract all necessary\ndata from the passed SireSystem::System using the specified properties" ); } @@ -105,6 +112,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -116,6 +124,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -127,6 +136,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that these files are normally associated with" ); } @@ -138,6 +148,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "Return whether or not this is a lead parser. The lead parser is responsible\nfor starting the process of turning the parsed file into the System. There\nmust be one and one-only lead parser in a set of parsers creating a System" ); } @@ -149,6 +160,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the total number of atoms." ); } @@ -161,6 +173,7 @@ void register_PDB2_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of atoms in molecule i." ); } @@ -172,6 +185,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "Return the total number of chains." ); } @@ -184,6 +198,7 @@ void register_PDB2_class(){ "nChains" , nChains_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of chains in molecule i." ); } @@ -195,6 +210,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of models (molecules)." ); } @@ -206,6 +222,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the total number of residues." ); } @@ -218,6 +235,7 @@ void register_PDB2_class(){ "nResidues" , nResidues_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of residues in molecule i." ); } @@ -256,6 +274,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this parser" ); } @@ -267,6 +286,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -278,6 +298,7 @@ void register_PDB2_class(){ PDB2_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -290,6 +311,7 @@ void register_PDB2_class(){ "writeVelocityFile" , writeVelocityFile_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Write a velocity file in PDB format. This can be used as a restart for NAMD simulations." ); } diff --git a/wrapper/IO/PDBParameters.pypp.cpp b/wrapper/IO/PDBParameters.pypp.cpp index a3c6ede9b..24089cf57 100644 --- a/wrapper/IO/PDBParameters.pypp.cpp +++ b/wrapper/IO/PDBParameters.pypp.cpp @@ -87,6 +87,8 @@ SireIO::PDBParameters __copy__(const SireIO::PDBParameters &other){ return SireI const char* pvt_get_name(const SireIO::PDBParameters&){ return "SireIO::PDBParameters";} +#include "Helpers/release_gil_policy.hpp" + void register_PDBParameters_class(){ { //::SireIO::PDBParameters diff --git a/wrapper/IO/PerturbationsLibrary.pypp.cpp b/wrapper/IO/PerturbationsLibrary.pypp.cpp index 74eebecf9..3d6ef7f69 100644 --- a/wrapper/IO/PerturbationsLibrary.pypp.cpp +++ b/wrapper/IO/PerturbationsLibrary.pypp.cpp @@ -79,6 +79,8 @@ SireIO::PerturbationsLibrary __copy__(const SireIO::PerturbationsLibrary &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PerturbationsLibrary_class(){ { //::SireIO::PerturbationsLibrary @@ -96,6 +98,7 @@ void register_PerturbationsLibrary_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the templates in other into this library" ); } @@ -108,6 +111,7 @@ void register_PerturbationsLibrary_class(){ "applyTemplate" , applyTemplate_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Generate the perturbations property and associated properties for the passed molecule" ); } @@ -133,6 +137,7 @@ void register_PerturbationsLibrary_class(){ "loadTemplates" , loadTemplates_function_value , ( bp::arg("file") ) + , bp::release_gil_policy() , "" ); } @@ -161,6 +166,7 @@ void register_PerturbationsLibrary_class(){ "setTemplate" , setTemplate_function_value , ( bp::arg("key"), bp::arg("tmplate") ) + , bp::release_gil_policy() , "Set the template associated with the passed key" ); } @@ -172,6 +178,7 @@ void register_PerturbationsLibrary_class(){ PerturbationsLibrary_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/PerturbationsTemplate.pypp.cpp b/wrapper/IO/PerturbationsTemplate.pypp.cpp index 035e2a1e9..16f7ccf14 100644 --- a/wrapper/IO/PerturbationsTemplate.pypp.cpp +++ b/wrapper/IO/PerturbationsTemplate.pypp.cpp @@ -79,6 +79,8 @@ SireIO::PerturbationsTemplate __copy__(const SireIO::PerturbationsTemplate &othe const char* pvt_get_name(const SireIO::PerturbationsTemplate&){ return "SireIO::PerturbationsTemplate";} +#include "Helpers/release_gil_policy.hpp" + void register_PerturbationsTemplate_class(){ { //::SireIO::PerturbationsTemplate @@ -95,6 +97,7 @@ void register_PerturbationsTemplate_class(){ PerturbationsTemplate_exposer.def( "getAngles" , getAngles_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +109,7 @@ void register_PerturbationsTemplate_class(){ PerturbationsTemplate_exposer.def( "getBonds" , getBonds_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +121,7 @@ void register_PerturbationsTemplate_class(){ PerturbationsTemplate_exposer.def( "getDihedrals" , getDihedrals_function_value + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_PerturbationsTemplate_class(){ "getFinalAngleK" , getFinalAngleK_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_PerturbationsTemplate_class(){ "getFinalAngleT" , getFinalAngleT_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_PerturbationsTemplate_class(){ "getFinalBondK" , getFinalBondK_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +173,7 @@ void register_PerturbationsTemplate_class(){ "getFinalBondR" , getFinalBondR_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "" ); } @@ -177,6 +186,7 @@ void register_PerturbationsTemplate_class(){ "getFinalCharge" , getFinalCharge_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "" ); } @@ -189,6 +199,7 @@ void register_PerturbationsTemplate_class(){ "getFinalDihParams" , getFinalDihParams_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "" ); } @@ -201,6 +212,7 @@ void register_PerturbationsTemplate_class(){ "getFinalImpParams" , getFinalImpParams_function_value , ( bp::arg("improper") ) + , bp::release_gil_policy() , "" ); } @@ -213,6 +225,7 @@ void register_PerturbationsTemplate_class(){ "getFinalLJ" , getFinalLJ_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "" ); } @@ -225,6 +238,7 @@ void register_PerturbationsTemplate_class(){ "getFinalType" , getFinalType_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "" ); } @@ -236,6 +250,7 @@ void register_PerturbationsTemplate_class(){ PerturbationsTemplate_exposer.def( "getImpropers" , getImpropers_function_value + , bp::release_gil_policy() , "" ); } @@ -248,6 +263,7 @@ void register_PerturbationsTemplate_class(){ "getInitAngleK" , getInitAngleK_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "" ); } @@ -260,6 +276,7 @@ void register_PerturbationsTemplate_class(){ "getInitAngleT" , getInitAngleT_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +289,7 @@ void register_PerturbationsTemplate_class(){ "getInitBondK" , getInitBondK_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +302,7 @@ void register_PerturbationsTemplate_class(){ "getInitBondR" , getInitBondR_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "" ); } @@ -296,6 +315,7 @@ void register_PerturbationsTemplate_class(){ "getInitCharge" , getInitCharge_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +328,7 @@ void register_PerturbationsTemplate_class(){ "getInitDihParams" , getInitDihParams_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "" ); } @@ -320,6 +341,7 @@ void register_PerturbationsTemplate_class(){ "getInitImpParams" , getInitImpParams_function_value , ( bp::arg("improper") ) + , bp::release_gil_policy() , "" ); } @@ -332,6 +354,7 @@ void register_PerturbationsTemplate_class(){ "getInitLJ" , getInitLJ_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "" ); } @@ -344,6 +367,7 @@ void register_PerturbationsTemplate_class(){ "getInitType" , getInitType_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "" ); } @@ -355,6 +379,7 @@ void register_PerturbationsTemplate_class(){ PerturbationsTemplate_exposer.def( "getName" , getName_function_value + , bp::release_gil_policy() , "" ); } @@ -382,6 +407,7 @@ void register_PerturbationsTemplate_class(){ "setFinalAngleK" , setFinalAngleK_function_value , ( bp::arg("angle"), bp::arg("k") ) + , bp::release_gil_policy() , "" ); } @@ -394,6 +420,7 @@ void register_PerturbationsTemplate_class(){ "setFinalAngleT" , setFinalAngleT_function_value , ( bp::arg("angle"), bp::arg("r") ) + , bp::release_gil_policy() , "" ); } @@ -406,6 +433,7 @@ void register_PerturbationsTemplate_class(){ "setFinalBondK" , setFinalBondK_function_value , ( bp::arg("bond"), bp::arg("k") ) + , bp::release_gil_policy() , "" ); } @@ -418,6 +446,7 @@ void register_PerturbationsTemplate_class(){ "setFinalBondR" , setFinalBondR_function_value , ( bp::arg("bond"), bp::arg("r") ) + , bp::release_gil_policy() , "" ); } @@ -430,6 +459,7 @@ void register_PerturbationsTemplate_class(){ "setFinalCharge" , setFinalCharge_function_value , ( bp::arg("atomname"), bp::arg("atomcharge") ) + , bp::release_gil_policy() , "" ); } @@ -442,6 +472,7 @@ void register_PerturbationsTemplate_class(){ "setFinalDihParams" , setFinalDihParams_function_value , ( bp::arg("dihedral"), bp::arg("params") ) + , bp::release_gil_policy() , "" ); } @@ -454,6 +485,7 @@ void register_PerturbationsTemplate_class(){ "setFinalImpParams" , setFinalImpParams_function_value , ( bp::arg("improper"), bp::arg("params") ) + , bp::release_gil_policy() , "" ); } @@ -466,6 +498,7 @@ void register_PerturbationsTemplate_class(){ "setFinalLJ" , setFinalLJ_function_value , ( bp::arg("atomname"), bp::arg("atomlj") ) + , bp::release_gil_policy() , "" ); } @@ -478,6 +511,7 @@ void register_PerturbationsTemplate_class(){ "setFinalType" , setFinalType_function_value , ( bp::arg("atomname"), bp::arg("atype") ) + , bp::release_gil_policy() , "" ); } @@ -490,6 +524,7 @@ void register_PerturbationsTemplate_class(){ "setInitAngleK" , setInitAngleK_function_value , ( bp::arg("angle"), bp::arg("k") ) + , bp::release_gil_policy() , "" ); } @@ -502,6 +537,7 @@ void register_PerturbationsTemplate_class(){ "setInitAngleT" , setInitAngleT_function_value , ( bp::arg("angle"), bp::arg("r") ) + , bp::release_gil_policy() , "" ); } @@ -514,6 +550,7 @@ void register_PerturbationsTemplate_class(){ "setInitBondK" , setInitBondK_function_value , ( bp::arg("bond"), bp::arg("k") ) + , bp::release_gil_policy() , "" ); } @@ -526,6 +563,7 @@ void register_PerturbationsTemplate_class(){ "setInitBondR" , setInitBondR_function_value , ( bp::arg("bond"), bp::arg("r") ) + , bp::release_gil_policy() , "" ); } @@ -538,6 +576,7 @@ void register_PerturbationsTemplate_class(){ "setInitCharge" , setInitCharge_function_value , ( bp::arg("atomname"), bp::arg("atomcharge") ) + , bp::release_gil_policy() , "" ); } @@ -550,6 +589,7 @@ void register_PerturbationsTemplate_class(){ "setInitDihParams" , setInitDihParams_function_value , ( bp::arg("dihedral"), bp::arg("params") ) + , bp::release_gil_policy() , "" ); } @@ -562,6 +602,7 @@ void register_PerturbationsTemplate_class(){ "setInitImpParams" , setInitImpParams_function_value , ( bp::arg("improper"), bp::arg("params") ) + , bp::release_gil_policy() , "" ); } @@ -574,6 +615,7 @@ void register_PerturbationsTemplate_class(){ "setInitLJ" , setInitLJ_function_value , ( bp::arg("atomname"), bp::arg("atomlj") ) + , bp::release_gil_policy() , "" ); } @@ -586,6 +628,7 @@ void register_PerturbationsTemplate_class(){ "setInitType" , setInitType_function_value , ( bp::arg("atomname"), bp::arg("atype") ) + , bp::release_gil_policy() , "" ); } @@ -597,6 +640,7 @@ void register_PerturbationsTemplate_class(){ PerturbationsTemplate_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/ProtoMS.pypp.cpp b/wrapper/IO/ProtoMS.pypp.cpp index ae176c41a..81a3b0611 100644 --- a/wrapper/IO/ProtoMS.pypp.cpp +++ b/wrapper/IO/ProtoMS.pypp.cpp @@ -95,6 +95,8 @@ SireIO::ProtoMS __copy__(const SireIO::ProtoMS &other){ return SireIO::ProtoMS(o const char* pvt_get_name(const SireIO::ProtoMS&){ return "SireIO::ProtoMS";} +#include "Helpers/release_gil_policy.hpp" + void register_ProtoMS_class(){ { //::SireIO::ProtoMS @@ -114,6 +116,7 @@ void register_ProtoMS_class(){ "addParameterFile" , addParameterFile_function_value , ( bp::arg("paramfile") ) + , bp::release_gil_policy() , "Add a parameter file to the list of files which will be used\nto parameterise the molecules" ); } @@ -125,6 +128,7 @@ void register_ProtoMS_class(){ ProtoMS_exposer.def( "parameterFiles" , parameterFiles_function_value + , bp::release_gil_policy() , "Return the list of parameter files which will be used to\nparameterise the molecules, in the order that they will\nbe read" ); } @@ -137,6 +141,7 @@ void register_ProtoMS_class(){ "parameterisationCommandFile" , parameterisationCommandFile_function_value , ( bp::arg("molecule"), bp::arg("type") ) + , bp::release_gil_policy() , "Return the command file used to run ProtoMS on the passed molecule as the passed type" ); } @@ -185,6 +190,7 @@ void register_ProtoMS_class(){ "setExecutable" , setExecutable_function_value , ( bp::arg("protoms") ) + , bp::release_gil_policy() , "Set the path to the ProtoMS executable that will be used\nto parameterise the molecules" ); } @@ -196,6 +202,7 @@ void register_ProtoMS_class(){ ProtoMS_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +214,7 @@ void register_ProtoMS_class(){ ProtoMS_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/ProtoMSParameters.pypp.cpp b/wrapper/IO/ProtoMSParameters.pypp.cpp index f8e2e4306..f74332397 100644 --- a/wrapper/IO/ProtoMSParameters.pypp.cpp +++ b/wrapper/IO/ProtoMSParameters.pypp.cpp @@ -93,6 +93,8 @@ SireIO::ProtoMSParameters __copy__(const SireIO::ProtoMSParameters &other){ retu const char* pvt_get_name(const SireIO::ProtoMSParameters&){ return "SireIO::ProtoMSParameters";} +#include "Helpers/release_gil_policy.hpp" + void register_ProtoMSParameters_class(){ { //::SireIO::ProtoMSParameters diff --git a/wrapper/IO/SDF.pypp.cpp b/wrapper/IO/SDF.pypp.cpp index 75f0205ee..c1460c03f 100644 --- a/wrapper/IO/SDF.pypp.cpp +++ b/wrapper/IO/SDF.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/errors.h" #include "SireMol/molecule.h" @@ -71,6 +73,8 @@ SireIO::SDF __copy__(const SireIO::SDF &other){ return SireIO::SDF(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SDF_class(){ { //::SireIO::SDF @@ -89,6 +93,7 @@ void register_SDF_class(){ SDF_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "The SDF cannot follow another lead parsers." ); } @@ -101,6 +106,7 @@ void register_SDF_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\nfile using the passed properties" ); } @@ -113,6 +119,7 @@ void register_SDF_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\ntext lines using the passed properties" ); } @@ -125,6 +132,7 @@ void register_SDF_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by extract all necessary\ndata from the passed SireSystem::System using the specified properties" ); } @@ -136,6 +144,7 @@ void register_SDF_class(){ SDF_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -147,6 +156,7 @@ void register_SDF_class(){ SDF_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -158,6 +168,7 @@ void register_SDF_class(){ SDF_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that these files are normally associated with" ); } @@ -169,6 +180,7 @@ void register_SDF_class(){ SDF_exposer.def( "isLead" , isLead_function_value + , bp::release_gil_policy() , "Return whether or not this is a lead parser. The lead parser is responsible\nfor starting the process of turning the parsed file into the System. There\nmust be one and one-only lead parser in a set of parsers creating a System" ); } @@ -180,6 +192,7 @@ void register_SDF_class(){ SDF_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the total number of atoms." ); } @@ -192,6 +205,7 @@ void register_SDF_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the number of atoms in molecule i." ); } @@ -203,6 +217,7 @@ void register_SDF_class(){ SDF_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules loaded in this file" ); } @@ -229,6 +244,7 @@ void register_SDF_class(){ SDF_exposer.def( "parseWarnings" , parseWarnings_function_value + , bp::release_gil_policy() , "Return any warnings raised when parsing this file" ); } @@ -240,6 +256,7 @@ void register_SDF_class(){ SDF_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this parser" ); } @@ -251,6 +268,7 @@ void register_SDF_class(){ SDF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -262,6 +280,7 @@ void register_SDF_class(){ SDF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } diff --git a/wrapper/IO/SireIO_properties.cpp b/wrapper/IO/SireIO_properties.cpp index e7d022ea5..b347580b2 100644 --- a/wrapper/IO/SireIO_properties.cpp +++ b/wrapper/IO/SireIO_properties.cpp @@ -4,6 +4,16 @@ #include "Base/convertproperty.hpp" #include "SireIO_properties.h" +#include "SireError/errors.h" +#include "SireMol/cuttingfunction.h" +#include "SireMol/molecule.h" +#include "SireMol/molidx.h" +#include "SireMol/mover.hpp" +#include "SireStream/datastream.h" +#include "iobase.h" +#include +#include +#include "iobase.h" #include "SireBase/booleanproperty.h" #include "SireBase/parallel.h" #include "SireBase/stringproperty.h" @@ -23,18 +33,8 @@ #include #include #include "moleculeparser.h" -#include "SireError/errors.h" -#include "SireMol/cuttingfunction.h" -#include "SireMol/molecule.h" -#include "SireMol/molidx.h" -#include "SireMol/mover.hpp" -#include "SireStream/datastream.h" -#include "iobase.h" -#include -#include -#include "iobase.h" void register_SireIO_properties() { - register_property_container< SireIO::MoleculeParserPtr, SireIO::MoleculeParser >(); register_property_container< SireIO::IOPtr, SireIO::IOBase >(); + register_property_container< SireIO::MoleculeParserPtr, SireIO::MoleculeParser >(); } diff --git a/wrapper/IO/SireIO_registrars.cpp b/wrapper/IO/SireIO_registrars.cpp index af9226a19..5b65b9834 100644 --- a/wrapper/IO/SireIO_registrars.cpp +++ b/wrapper/IO/SireIO_registrars.cpp @@ -5,25 +5,25 @@ #include "Helpers/version_error_impl.h" -#include "charmmpsf.h" -#include "pdb.h" #include "amber.h" -#include "moleculeparser.h" -#include "mol2.h" -#include "pdb2.h" -#include "tinker.h" -#include "protoms.h" -#include "perturbationslibrary.h" +#include "amberprm.h" #include "amberrst.h" +#include "amberrst7.h" +#include "charmmpsf.h" #include "flexibilitylibrary.h" #include "gro87.h" #include "grotop.h" -#include "amberrst7.h" -#include "sdf.h" #include "iobase.h" -#include "trajectorymonitor.h" +#include "mol2.h" +#include "moleculeparser.h" +#include "pdb.h" +#include "pdb2.h" +#include "perturbationslibrary.h" +#include "protoms.h" +#include "sdf.h" #include "supplementary.h" -#include "amberprm.h" +#include "tinker.h" +#include "trajectorymonitor.h" #include "zmatrixmaker.h" #include "Helpers/objectregistry.hpp" @@ -31,37 +31,37 @@ void register_SireIO_objects() { + ObjectRegistry::registerConverterFor< SireIO::Amber >(); + ObjectRegistry::registerConverterFor< SireIO::AmberPrm >(); + ObjectRegistry::registerConverterFor< SireIO::AmberRst >(); + ObjectRegistry::registerConverterFor< SireIO::AmberRst7 >(); ObjectRegistry::registerConverterFor< SireIO::PSFAtom >(); ObjectRegistry::registerConverterFor< SireIO::CharmmParam >(); ObjectRegistry::registerConverterFor< SireIO::CharmmPSF >(); - ObjectRegistry::registerConverterFor< SireIO::PDB >(); - ObjectRegistry::registerConverterFor< SireIO::Amber >(); - ObjectRegistry::registerConverterFor< SireIO::NullParser >(); + ObjectRegistry::registerConverterFor< SireIO::FlexibilityLibrary >(); + ObjectRegistry::registerConverterFor< SireIO::FlexibilityTemplate >(); + ObjectRegistry::registerConverterFor< SireIO::Gro87 >(); + ObjectRegistry::registerConverterFor< SireIO::GroTop >(); + ObjectRegistry::registerConverterFor< SireIO::GroMolType >(); + ObjectRegistry::registerConverterFor< SireIO::GroAtom >(); + ObjectRegistry::registerConverterFor< SireIO::GroSystem >(); + ObjectRegistry::registerConverterFor< SireIO::NullIO >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Atom >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Bond >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Molecule >(); ObjectRegistry::registerConverterFor< SireIO::Mol2Substructure >(); ObjectRegistry::registerConverterFor< SireIO::Mol2 >(); + ObjectRegistry::registerConverterFor< SireIO::NullParser >(); + ObjectRegistry::registerConverterFor< SireIO::PDB >(); ObjectRegistry::registerConverterFor< SireIO::PDBAtom >(); ObjectRegistry::registerConverterFor< SireIO::PDB2 >(); - ObjectRegistry::registerConverterFor< SireIO::Tinker >(); - ObjectRegistry::registerConverterFor< SireIO::ProtoMS >(); ObjectRegistry::registerConverterFor< SireIO::PerturbationsLibrary >(); ObjectRegistry::registerConverterFor< SireIO::PerturbationsTemplate >(); - ObjectRegistry::registerConverterFor< SireIO::AmberRst >(); - ObjectRegistry::registerConverterFor< SireIO::FlexibilityLibrary >(); - ObjectRegistry::registerConverterFor< SireIO::FlexibilityTemplate >(); - ObjectRegistry::registerConverterFor< SireIO::Gro87 >(); - ObjectRegistry::registerConverterFor< SireIO::GroTop >(); - ObjectRegistry::registerConverterFor< SireIO::GroMolType >(); - ObjectRegistry::registerConverterFor< SireIO::GroAtom >(); - ObjectRegistry::registerConverterFor< SireIO::GroSystem >(); - ObjectRegistry::registerConverterFor< SireIO::AmberRst7 >(); + ObjectRegistry::registerConverterFor< SireIO::ProtoMS >(); ObjectRegistry::registerConverterFor< SireIO::SDF >(); - ObjectRegistry::registerConverterFor< SireIO::NullIO >(); - ObjectRegistry::registerConverterFor< SireIO::TrajectoryMonitor >(); ObjectRegistry::registerConverterFor< SireIO::Supplementary >(); - ObjectRegistry::registerConverterFor< SireIO::AmberPrm >(); + ObjectRegistry::registerConverterFor< SireIO::Tinker >(); + ObjectRegistry::registerConverterFor< SireIO::TrajectoryMonitor >(); ObjectRegistry::registerConverterFor< SireIO::ZmatrixMaker >(); } diff --git a/wrapper/IO/Supplementary.pypp.cpp b/wrapper/IO/Supplementary.pypp.cpp index 0c100746c..9dfb803a9 100644 --- a/wrapper/IO/Supplementary.pypp.cpp +++ b/wrapper/IO/Supplementary.pypp.cpp @@ -27,6 +27,8 @@ SireIO::Supplementary __copy__(const SireIO::Supplementary &other){ return SireI #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Supplementary_class(){ { //::SireIO::Supplementary @@ -44,6 +46,7 @@ void register_Supplementary_class(){ Supplementary_exposer.def( "canFollow" , canFollow_function_value + , bp::release_gil_policy() , "Return whether or not this parser can follow another lead parser, and add\ndata to an existing molecular system. The Supplementary parser cannot follow." ); } @@ -56,6 +59,7 @@ void register_Supplementary_class(){ "construct" , construct_function_value , ( bp::arg("filename"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\nfile using the passed properties" ); } @@ -68,6 +72,7 @@ void register_Supplementary_class(){ "construct" , construct_function_value , ( bp::arg("lines"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the parser that has been constructed by reading in the passed\ntext lines using the passed properties" ); } @@ -80,6 +85,7 @@ void register_Supplementary_class(){ "construct" , construct_function_value , ( bp::arg("system"), bp::arg("map") ) + , bp::release_gil_policy() , "Return this parser constructed from the passed SireSystem::System" ); } @@ -91,6 +97,7 @@ void register_Supplementary_class(){ Supplementary_exposer.def( "formatDescription" , formatDescription_function_value + , bp::release_gil_policy() , "Return a description of the file format" ); } @@ -102,6 +109,7 @@ void register_Supplementary_class(){ Supplementary_exposer.def( "formatName" , formatName_function_value + , bp::release_gil_policy() , "Return the format name that is used to identify this file format within Sire" ); } @@ -113,6 +121,7 @@ void register_Supplementary_class(){ Supplementary_exposer.def( "formatSuffix" , formatSuffix_function_value + , bp::release_gil_policy() , "Return the suffixes that these files are normally associated with" ); } @@ -139,6 +148,7 @@ void register_Supplementary_class(){ Supplementary_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this parser" ); } @@ -150,6 +160,7 @@ void register_Supplementary_class(){ Supplementary_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } @@ -161,6 +172,7 @@ void register_Supplementary_class(){ Supplementary_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "Return the C++ name for this class" ); } diff --git a/wrapper/IO/Tinker.pypp.cpp b/wrapper/IO/Tinker.pypp.cpp index 282b8156f..1b0e6ca2b 100644 --- a/wrapper/IO/Tinker.pypp.cpp +++ b/wrapper/IO/Tinker.pypp.cpp @@ -43,6 +43,8 @@ SireIO::Tinker __copy__(const SireIO::Tinker &other){ return SireIO::Tinker(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Tinker_class(){ { //::SireIO::Tinker @@ -59,6 +61,7 @@ void register_Tinker_class(){ "loadParameters" , loadParameters_function_value , ( bp::arg("prmfile") ) + , bp::release_gil_policy() , "Load the parameter file prmfile into this reader. This will allow\nthe reader to parameterise the molecules as they are being read" ); } @@ -97,6 +100,7 @@ void register_Tinker_class(){ Tinker_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/TinkerParameters.pypp.cpp b/wrapper/IO/TinkerParameters.pypp.cpp index 74f3f0674..b5e8cc541 100644 --- a/wrapper/IO/TinkerParameters.pypp.cpp +++ b/wrapper/IO/TinkerParameters.pypp.cpp @@ -41,6 +41,8 @@ SireIO::TinkerParameters __copy__(const SireIO::TinkerParameters &other){ return const char* pvt_get_name(const SireIO::TinkerParameters&){ return "SireIO::TinkerParameters";} +#include "Helpers/release_gil_policy.hpp" + void register_TinkerParameters_class(){ { //::SireIO::TinkerParameters diff --git a/wrapper/IO/TrajectoryMonitor.pypp.cpp b/wrapper/IO/TrajectoryMonitor.pypp.cpp index ef0b0cb98..740c0e601 100644 --- a/wrapper/IO/TrajectoryMonitor.pypp.cpp +++ b/wrapper/IO/TrajectoryMonitor.pypp.cpp @@ -41,6 +41,8 @@ SireIO::TrajectoryMonitor __copy__(const SireIO::TrajectoryMonitor &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TrajectoryMonitor_class(){ { //::SireIO::TrajectoryMonitor @@ -60,6 +62,7 @@ void register_TrajectoryMonitor_class(){ TrajectoryMonitor_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all statistics - this will clear all frames of the trajectory" ); } @@ -72,6 +75,7 @@ void register_TrajectoryMonitor_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Monitor the system, writing an additional frame of the trajectory\nto this monitor" ); } @@ -99,6 +103,7 @@ void register_TrajectoryMonitor_class(){ "setTempDir" , setTempDir_function_value , ( bp::arg("tempdir") ) + , bp::release_gil_policy() , "Set the temporary directory used to store the trajectory as it\nis being monitored during the simulation" ); } @@ -110,6 +115,7 @@ void register_TrajectoryMonitor_class(){ TrajectoryMonitor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +128,7 @@ void register_TrajectoryMonitor_class(){ "writeToDisk" , writeToDisk_function_value , ( bp::arg("file_template") ) + , bp::release_gil_policy() , "Write the trajectory to disk, using the file template file_template.\nThis writes each frame to a separate file, numbering them sequentially\nfrom 0, replacing XXXXXX with the frame number" ); } diff --git a/wrapper/IO/ZmatrixMaker.pypp.cpp b/wrapper/IO/ZmatrixMaker.pypp.cpp index 07a02c023..2d0597719 100644 --- a/wrapper/IO/ZmatrixMaker.pypp.cpp +++ b/wrapper/IO/ZmatrixMaker.pypp.cpp @@ -53,6 +53,8 @@ SireIO::ZmatrixMaker __copy__(const SireIO::ZmatrixMaker &other){ return SireIO: const char* pvt_get_name(const SireIO::ZmatrixMaker&){ return "SireIO::ZmatrixMaker";} +#include "Helpers/release_gil_policy.hpp" + void register_ZmatrixMaker_class(){ { //::SireIO::ZmatrixMaker @@ -68,6 +70,7 @@ void register_ZmatrixMaker_class(){ "applyTemplates" , applyTemplates_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Add the property z-matrix to molecule" ); } @@ -80,6 +83,7 @@ void register_ZmatrixMaker_class(){ "loadTemplates" , loadTemplates_function_value , ( bp::arg("templatesfile") ) + , bp::release_gil_policy() , "Read the contents of an input file to create a set of ZmatrixResidues" ); } @@ -91,6 +95,7 @@ void register_ZmatrixMaker_class(){ ZmatrixMaker_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -102,6 +107,7 @@ void register_ZmatrixMaker_class(){ ZmatrixMaker_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/IO/_IO.main.cpp b/wrapper/IO/_IO.main.cpp index 62764ef7b..579272e02 100644 --- a/wrapper/IO/_IO.main.cpp +++ b/wrapper/IO/_IO.main.cpp @@ -79,6 +79,8 @@ namespace bp = boost::python; #include "SireIO_properties.h" +#include "_IO_load.h" + BOOST_PYTHON_MODULE(_IO){ register_SireIO_objects(); @@ -150,6 +152,8 @@ BOOST_PYTHON_MODULE(_IO){ register_SireIO_properties(); + register_SireIO_load_function(); + register_free_functions(); } diff --git a/wrapper/IO/_IO_free_functions.pypp.cpp b/wrapper/IO/_IO_free_functions.pypp.cpp index e20fd4cb0..896f81da4 100644 --- a/wrapper/IO/_IO_free_functions.pypp.cpp +++ b/wrapper/IO/_IO_free_functions.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -47,6 +49,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -77,6 +81,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -107,6 +113,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -137,6 +145,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -167,6 +177,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -197,6 +209,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -227,6 +241,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -257,6 +273,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -287,6 +305,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -317,6 +337,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -347,6 +369,40 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + +#include "SireMol/mgname.h" + +#include "SireMol/moleditor.h" + +#include "SireMol/molidx.h" + +#include "SireSystem/system.h" + +#include "SireUnits/units.h" + +#include "SireVol/periodicbox.h" + +#include "SireVol/triclinicbox.h" + +#include "biosimspace.h" + +#include "moleculeparser.h" + +#include "biosimspace.h" + +#include "SireBase/getinstalldir.h" + +#include "SireError/errors.h" + +#include "SireMol/atomelements.h" + +#include "SireMol/atommasses.h" + +#include "SireMol/connectivity.h" + +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/moleditor.h" @@ -521,7 +577,20 @@ void register_free_functions(){ "updateCoordinatesAndVelocities" , updateCoordinatesAndVelocities_function_value , ( bp::arg("system0"), bp::arg("system1"), bp::arg("molecule_mapping"), bp::arg("is_lambda1")=(bool const)(false), bp::arg("map0")=SireBase::PropertyMap(), bp::arg("map1")=SireBase::PropertyMap() ) - , "Update the coordinates and velocities of system0 with those from\nsystem1.\n\nPar:am system0\nThe reference system.\n\nPar:am system1\nThe updated system, where molecules may not be in the same order.\n\nPar:am map0\nA dictionary of user-defined molecular property names for system0.\n\nPar:am map1\nA dictionary of user-defined molecular property names for system1.\n\nRetval: system, mapping\nThe system with updated coordinates and velocities and a mapping\nbetween the molecule indices in both systems.\n" ); + , "Update the coordinates and velocities of system0 with those from\nsystem1.\nPar:am system0\nThe reference system.\nPar:am system1\nThe updated system, where molecules may not be in the same order.\nPar:am map0\nA dictionary of user-defined molecular property names for system0.\nPar:am map1\nA dictionary of user-defined molecular property names for system1.\nRetval: system, mapping\nThe system with updated coordinates and velocities and a mapping\nbetween the molecule indices in both systems.\n" ); + + } + + { //::SireIO::updateCoordinatesAndVelocities + + typedef ::boost::tuples::tuple< SireSystem::System, QHash< SireMol::MolIdx, SireMol::MolIdx >, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type > ( *updateCoordinatesAndVelocities_function_type )( ::SireSystem::System const &,::SireSystem::System const &,::SireSystem::System const &,::QHash< SireMol::MolIdx, SireMol::MolIdx > const &,bool const,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ); + updateCoordinatesAndVelocities_function_type updateCoordinatesAndVelocities_function_value( &::SireIO::updateCoordinatesAndVelocities ); + + bp::def( + "updateCoordinatesAndVelocities" + , updateCoordinatesAndVelocities_function_value + , ( bp::arg("original_system"), bp::arg("renumbered_system"), bp::arg("updated_system"), bp::arg("molecule_mapping"), bp::arg("is_lambda1")=(bool const)(false), bp::arg("map0")=SireBase::PropertyMap(), bp::arg("map1")=SireBase::PropertyMap() ) + , "Update the coordinates and velocities of original_system with those from\nupdated_system.\n\nPar:am system_original\nThe original system.\n\nPar:am system_renumbered\nThe original system, atoms and residues have been renumbered to be\nunique and in ascending order.\n\nPar:am system_updated\nThe updated system, where molecules may not be in the same order.\n\nPar:am map0\nA dictionary of user-defined molecular property names for system0.\n\nPar:am map1\nA dictionary of user-defined molecular property names for system1.\n\nRetval: system, mapping\nThe system with updated coordinates and velocities and a mapping\nbetween the molecule indices in both systems.\n" ); } diff --git a/wrapper/IO/_IO_load.cpp b/wrapper/IO/_IO_load.cpp new file mode 100644 index 000000000..a48d45da9 --- /dev/null +++ b/wrapper/IO/_IO_load.cpp @@ -0,0 +1,156 @@ + +#include "Python.h" +#include "boost/python.hpp" + +#include "SireSystem/system.h" + +#include "SireBase/propertymap.h" +#include "SireBase/propertylist.h" + +#include "SireIO/moleculeparser.h" + +#include "SireMol/moleculegroup.h" +#include "SireMol/bondhunter.h" +#include "SireMol/connectivity.h" +#include "SireMol/molecule.h" +#include "SireMol/moleditor.h" +#include "SireMol/element.h" +#include "SireMol/atomelements.h" +#include "SireMol/core.h" + +#include "Helpers/release_gil_policy.hpp" + +#include + +#include + +using namespace SireBase; +using namespace SireIO; +using namespace SireSystem; +using namespace SireMol; + +System load_molecules(const QStringList &files, + const PropertyMap &map=PropertyMap()) +{ + boost::python::release_gil_policy::release_gil_no_raii(); + + try + { + auto mols = MoleculeParser::load(files, map); + + // get the name of this system - if it doesn't exist, then + // infer it from the filename + auto name = mols.name().value(); + + if (name == "") + { + // get the name from the first file + name = QFileInfo(files[0]).baseName(); + } + + // This is an opinionated loader - we must have atom elements + // and a connectivity defined + auto grp = MoleculeGroup("all"); + + int n = 0; + + for (const auto &molnum : mols.molNums()) + { + auto mol = mols[molnum].molecule(); + + if (not mol.hasProperty("element")) + { + auto editor = mol.edit(); + + for (int i=0; i() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/AngleParameterName.pypp.cpp b/wrapper/MM/AngleParameterName.pypp.cpp index 68313aece..cd4498d03 100644 --- a/wrapper/MM/AngleParameterName.pypp.cpp +++ b/wrapper/MM/AngleParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::AngleParameterName __copy__(const SireMM::AngleParameterName &other){ re const char* pvt_get_name(const SireMM::AngleParameterName&){ return "SireMM::AngleParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_AngleParameterName_class(){ { //::SireMM::AngleParameterName diff --git a/wrapper/MM/AngleRestraint.pypp.cpp b/wrapper/MM/AngleRestraint.pypp.cpp index b8866be3b..8cf0fa620 100644 --- a/wrapper/MM/AngleRestraint.pypp.cpp +++ b/wrapper/MM/AngleRestraint.pypp.cpp @@ -40,6 +40,8 @@ SireMM::AngleRestraint __copy__(const SireMM::AngleRestraint &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AngleRestraint_class(){ { //::SireMM::AngleRestraint @@ -57,6 +59,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "Return the built-in symbols of this restraint" ); } @@ -68,6 +71,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "builtinValues" , builtinValues_function_value + , bp::release_gil_policy() , "Return the values of the built-in symbols of this restraint" ); } @@ -80,6 +84,7 @@ void register_AngleRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith number molnum" ); } @@ -92,6 +97,7 @@ void register_AngleRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith ID molid" ); } @@ -116,6 +122,7 @@ void register_AngleRestraint_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this restraint with respect to\nthe symbol symbol\nThrow: SireCAS::unavailable_differential\n" ); } @@ -152,6 +159,7 @@ void register_AngleRestraint_class(){ "halfHarmonic" , halfHarmonic_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("angle"), bp::arg("force_constant") ) + , bp::release_gil_policy() , "Return a distance restraint that applied a half-harmonic potential\nbetween the points point0 and point1 above a distance distance\nusing a force constant force_constant" ); } @@ -164,6 +172,7 @@ void register_AngleRestraint_class(){ "harmonic" , harmonic_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("force_constant") ) + , bp::release_gil_policy() , "Return a distance restraint that applies a harmonic potential between\nthe points point0 and point1 using a force constant force_constant" ); } @@ -175,6 +184,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the molecules used in this restraint" ); } @@ -186,6 +196,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "This restraint involves three points" ); } @@ -213,7 +224,7 @@ void register_AngleRestraint_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point" ); } @@ -225,7 +236,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point" ); } @@ -237,7 +248,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point" ); } @@ -249,7 +260,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third point" ); } @@ -262,6 +273,7 @@ void register_AngleRestraint_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used to evaluate the energy of this restraint\nThrow: SireVol::incompatible_space\n" ); } @@ -273,7 +285,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "theta" , theta_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the angle between the points (theta)" ); } @@ -285,6 +297,7 @@ void register_AngleRestraint_class(){ AngleRestraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +310,7 @@ void register_AngleRestraint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from moldata\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -309,6 +323,7 @@ void register_AngleRestraint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -321,6 +336,7 @@ void register_AngleRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nthat are in the forcetable forcetable" ); } @@ -333,6 +349,7 @@ void register_AngleRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nin molecules" ); } diff --git a/wrapper/MM/AngleSymbols.pypp.cpp b/wrapper/MM/AngleSymbols.pypp.cpp index 0a5db989d..80b50b298 100644 --- a/wrapper/MM/AngleSymbols.pypp.cpp +++ b/wrapper/MM/AngleSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::AngleSymbols __copy__(const SireMM::AngleSymbols &other){ return SireMM: const char* pvt_get_name(const SireMM::AngleSymbols&){ return "SireMM::AngleSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_AngleSymbols_class(){ { //::SireMM::AngleSymbols @@ -50,7 +52,7 @@ void register_AngleSymbols_class(){ AngleSymbols_exposer.def( "theta" , theta_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbols representing the angle (theta)" ); } diff --git a/wrapper/MM/AtomFunction.pypp.cpp b/wrapper/MM/AtomFunction.pypp.cpp index 60492be4b..7a4933c61 100644 --- a/wrapper/MM/AtomFunction.pypp.cpp +++ b/wrapper/MM/AtomFunction.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::AtomFunction&){ return "SireMM::AtomFunction";} +#include "Helpers/release_gil_policy.hpp" + void register_AtomFunction_class(){ { //::SireMM::AtomFunction diff --git a/wrapper/MM/AtomFunctions.pypp.cpp b/wrapper/MM/AtomFunctions.pypp.cpp index c380ff680..a83b0feb9 100644 --- a/wrapper/MM/AtomFunctions.pypp.cpp +++ b/wrapper/MM/AtomFunctions.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomFunctions_class(){ { //::SireMM::AtomFunctions @@ -38,6 +40,7 @@ void register_AtomFunctions_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this property is compatible with the molecule\nwhose layout information is in molinfo" ); } diff --git a/wrapper/MM/AtomLJs.pypp.cpp b/wrapper/MM/AtomLJs.pypp.cpp index 99b5468d7..6a50a07f5 100644 --- a/wrapper/MM/AtomLJs.pypp.cpp +++ b/wrapper/MM/AtomLJs.pypp.cpp @@ -19,6 +19,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty< #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomLJs_class(){ @@ -59,6 +61,7 @@ void register_AtomLJs_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -72,6 +75,7 @@ void register_AtomLJs_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -113,6 +117,7 @@ void register_AtomLJs_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_AtomLJs_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +145,7 @@ void register_AtomLJs_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -151,6 +158,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -164,6 +172,7 @@ void register_AtomLJs_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -177,6 +186,7 @@ void register_AtomLJs_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -190,6 +200,7 @@ void register_AtomLJs_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -231,6 +242,7 @@ void register_AtomLJs_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -244,6 +256,7 @@ void register_AtomLJs_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -257,6 +270,7 @@ void register_AtomLJs_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -270,6 +284,7 @@ void register_AtomLJs_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -282,6 +297,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -295,6 +311,7 @@ void register_AtomLJs_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +325,7 @@ void register_AtomLJs_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -320,6 +338,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -333,6 +352,7 @@ void register_AtomLJs_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -345,6 +365,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -429,6 +450,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -441,6 +463,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -453,6 +476,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -465,6 +489,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -478,6 +503,7 @@ void register_AtomLJs_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -490,6 +516,7 @@ void register_AtomLJs_class(){ AtomLJs_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/AtomPairs_CLJScaleFactor_.pypp.cpp b/wrapper/MM/AtomPairs_CLJScaleFactor_.pypp.cpp index 7bc5cd86a..104de1017 100644 --- a/wrapper/MM/AtomPairs_CLJScaleFactor_.pypp.cpp +++ b/wrapper/MM/AtomPairs_CLJScaleFactor_.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomPairs_CLJScaleFactor__class(){ { //::SireMM::AtomPairs< SireMM::CLJScaleFactor > @@ -162,6 +164,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -174,6 +177,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ AtomPairs_CLJScaleFactor__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -186,6 +190,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ AtomPairs_CLJScaleFactor__exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -198,6 +203,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ AtomPairs_CLJScaleFactor__exposer.def( "nGroups" , nGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -339,6 +345,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "reserve" , reserve_function_value , ( bp::arg("dim_x"), bp::arg("dim_y") ) + , bp::release_gil_policy() , "" ); } @@ -352,6 +359,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -365,6 +373,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -378,6 +387,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -391,6 +401,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -404,6 +415,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -417,6 +429,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -430,6 +443,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("cgid1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -443,6 +457,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -456,6 +471,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("cgid1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -468,6 +484,7 @@ void register_AtomPairs_CLJScaleFactor__class(){ AtomPairs_CLJScaleFactor__exposer.def( "squeeze" , squeeze_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/AtomPairs_CoulombScaleFactor_.pypp.cpp b/wrapper/MM/AtomPairs_CoulombScaleFactor_.pypp.cpp index bc9912951..ccd4769a0 100644 --- a/wrapper/MM/AtomPairs_CoulombScaleFactor_.pypp.cpp +++ b/wrapper/MM/AtomPairs_CoulombScaleFactor_.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomPairs_CoulombScaleFactor__class(){ { //::SireMM::AtomPairs< SireMM::CoulombScaleFactor > @@ -162,6 +164,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -174,6 +177,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ AtomPairs_CoulombScaleFactor__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -186,6 +190,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ AtomPairs_CoulombScaleFactor__exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -198,6 +203,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ AtomPairs_CoulombScaleFactor__exposer.def( "nGroups" , nGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -339,6 +345,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "reserve" , reserve_function_value , ( bp::arg("dim_x"), bp::arg("dim_y") ) + , bp::release_gil_policy() , "" ); } @@ -352,6 +359,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -365,6 +373,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -378,6 +387,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -391,6 +401,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -404,6 +415,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -417,6 +429,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -430,6 +443,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("cgid1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -443,6 +457,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -456,6 +471,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("cgid1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -468,6 +484,7 @@ void register_AtomPairs_CoulombScaleFactor__class(){ AtomPairs_CoulombScaleFactor__exposer.def( "squeeze" , squeeze_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/AtomPairs_LJScaleFactor_.pypp.cpp b/wrapper/MM/AtomPairs_LJScaleFactor_.pypp.cpp index 5fced0fd0..f1f9507db 100644 --- a/wrapper/MM/AtomPairs_LJScaleFactor_.pypp.cpp +++ b/wrapper/MM/AtomPairs_LJScaleFactor_.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomPairs_LJScaleFactor__class(){ { //::SireMM::AtomPairs< SireMM::LJScaleFactor > @@ -162,6 +164,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -174,6 +177,7 @@ void register_AtomPairs_LJScaleFactor__class(){ AtomPairs_LJScaleFactor__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -186,6 +190,7 @@ void register_AtomPairs_LJScaleFactor__class(){ AtomPairs_LJScaleFactor__exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -198,6 +203,7 @@ void register_AtomPairs_LJScaleFactor__class(){ AtomPairs_LJScaleFactor__exposer.def( "nGroups" , nGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -339,6 +345,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "reserve" , reserve_function_value , ( bp::arg("dim_x"), bp::arg("dim_y") ) + , bp::release_gil_policy() , "" ); } @@ -352,6 +359,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -365,6 +373,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -378,6 +387,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -391,6 +401,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "set" , set_function_value , ( bp::arg("atm0"), bp::arg("atm1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -404,6 +415,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -417,6 +429,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -430,6 +443,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("cgid1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -443,6 +457,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -456,6 +471,7 @@ void register_AtomPairs_LJScaleFactor__class(){ "setAll" , setAll_function_value , ( bp::arg("cgid0"), bp::arg("cgid1"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -468,6 +484,7 @@ void register_AtomPairs_LJScaleFactor__class(){ AtomPairs_LJScaleFactor__exposer.def( "squeeze" , squeeze_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/BendBendComponent.pypp.cpp b/wrapper/MM/BendBendComponent.pypp.cpp index bbc79bc34..41f73d723 100644 --- a/wrapper/MM/BendBendComponent.pypp.cpp +++ b/wrapper/MM/BendBendComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::BendBendComponent __copy__(const SireMM::BendBendComponent &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BendBendComponent_class(){ { //::SireMM::BendBendComponent @@ -39,6 +41,7 @@ void register_BendBendComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("bbnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_BendBendComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("bbnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_BendBendComponent_class(){ BendBendComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_BendBendComponent_class(){ BendBendComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_BendBendComponent_class(){ BendBendComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_BendBendComponent_class(){ BendBendComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/BendBendParameterName.pypp.cpp b/wrapper/MM/BendBendParameterName.pypp.cpp index 7612240d4..4d691dadf 100644 --- a/wrapper/MM/BendBendParameterName.pypp.cpp +++ b/wrapper/MM/BendBendParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::BendBendParameterName __copy__(const SireMM::BendBendParameterName &othe const char* pvt_get_name(const SireMM::BendBendParameterName&){ return "SireMM::BendBendParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_BendBendParameterName_class(){ { //::SireMM::BendBendParameterName diff --git a/wrapper/MM/BendBendSymbols.pypp.cpp b/wrapper/MM/BendBendSymbols.pypp.cpp index 9b62167df..62bc960bc 100644 --- a/wrapper/MM/BendBendSymbols.pypp.cpp +++ b/wrapper/MM/BendBendSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::BendBendSymbols __copy__(const SireMM::BendBendSymbols &other){ return S const char* pvt_get_name(const SireMM::BendBendSymbols&){ return "SireMM::BendBendSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_BendBendSymbols_class(){ { //::SireMM::BendBendSymbols @@ -50,7 +52,7 @@ void register_BendBendSymbols_class(){ BendBendSymbols_exposer.def( "theta012" , theta012_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the angle between atoms 0-1-2, theta_\n{012}" ); } @@ -62,7 +64,7 @@ void register_BendBendSymbols_class(){ BendBendSymbols_exposer.def( "theta213" , theta213_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the angle between atoms 2-1-3, theta_\n{213}" ); } @@ -74,7 +76,7 @@ void register_BendBendSymbols_class(){ BendBendSymbols_exposer.def( "theta310" , theta310_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the angle between atoms 3-1-0, theta_\n{310}" ); } diff --git a/wrapper/MM/Bond.pypp.cpp b/wrapper/MM/Bond.pypp.cpp new file mode 100644 index 000000000..174be2ec2 --- /dev/null +++ b/wrapper/MM/Bond.pypp.cpp @@ -0,0 +1,426 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "Helpers/clone_const_reference.hpp" +#include "Bond.pypp.hpp" + +namespace bp = boost::python; + +#include "SireBase/errors.h" + +#include "SireCAS/expression.h" + +#include "SireCAS/symbol.h" + +#include "SireCAS/values.h" + +#include "SireMol/errors.h" + +#include "SireMol/molecule.h" + +#include "SireMol/mover.hpp" + +#include "SireMol/selector.hpp" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "SireUnits/units.h" + +#include "bond.h" + +#include "selectorbond.h" + +#include "twoatomfunctions.h" + +#include + +#include "bond.h" + +SireMM::Bond __copy__(const SireMM::Bond &other){ return SireMM::Bond(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_Bond_class(){ + + { //::SireMM::Bond + typedef bp::class_< SireMM::Bond, bp::bases< SireMol::MoleculeView, SireBase::Property > > Bond_exposer_t; + Bond_exposer_t Bond_exposer = Bond_exposer_t( "Bond", "This class provides a molecule view to a bond", bp::init< >("") ); + bp::scope Bond_scope( Bond_exposer ); + Bond_exposer.def( bp::init< SireMol::Atom const &, SireMol::Atom const & >(( bp::arg("atom0"), bp::arg("atom1") ), "") ); + Bond_exposer.def( bp::init< SireMol::MoleculeView const &, SireMol::AtomID const &, SireMol::AtomID const & >(( bp::arg("molview"), bp::arg("atom0"), bp::arg("atom1") ), "") ); + Bond_exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::AtomID const &, SireMol::AtomID const & >(( bp::arg("moldata"), bp::arg("atom0"), bp::arg("atom1") ), "") ); + Bond_exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::BondID const & >(( bp::arg("moldata"), bp::arg("bond") ), "") ); + Bond_exposer.def( bp::init< SireMM::Bond const & >(( bp::arg("other") ), "") ); + { //::SireMM::Bond::ID + + typedef ::SireMol::BondID ( ::SireMM::Bond::*ID_function_type)( ) const; + ID_function_type ID_function_value( &::SireMM::Bond::ID ); + + Bond_exposer.def( + "ID" + , ID_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::atom0 + + typedef ::SireMol::Atom ( ::SireMM::Bond::*atom0_function_type)( ) const; + atom0_function_type atom0_function_value( &::SireMM::Bond::atom0 ); + + Bond_exposer.def( + "atom0" + , atom0_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::atom1 + + typedef ::SireMol::Atom ( ::SireMM::Bond::*atom1_function_type)( ) const; + atom1_function_type atom1_function_value( &::SireMM::Bond::atom1 ); + + Bond_exposer.def( + "atom1" + , atom1_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::energy + + typedef ::SireUnits::Dimension::MolarEnergy ( ::SireMM::Bond::*energy_function_type)( ) const; + energy_function_type energy_function_value( &::SireMM::Bond::energy ); + + Bond_exposer.def( + "energy" + , energy_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::energy + + typedef ::SireUnits::Dimension::MolarEnergy ( ::SireMM::Bond::*energy_function_type)( ::SireBase::PropertyMap const & ) const; + energy_function_type energy_function_value( &::SireMM::Bond::energy ); + + Bond_exposer.def( + "energy" + , energy_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::evaluate + + typedef ::SireMol::Evaluator ( ::SireMM::Bond::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMM::Bond::evaluate ); + + Bond_exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::hasMetadata + + typedef bool ( ::SireMM::Bond::*hasMetadata_function_type)( ::SireBase::PropertyName const & ) const; + hasMetadata_function_type hasMetadata_function_value( &::SireMM::Bond::hasMetadata ); + + Bond_exposer.def( + "hasMetadata" + , hasMetadata_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::hasMetadata + + typedef bool ( ::SireMM::Bond::*hasMetadata_function_type)( ::SireBase::PropertyName const &,::SireBase::PropertyName const & ) const; + hasMetadata_function_type hasMetadata_function_value( &::SireMM::Bond::hasMetadata ); + + Bond_exposer.def( + "hasMetadata" + , hasMetadata_function_value + , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::hasProperty + + typedef bool ( ::SireMM::Bond::*hasProperty_function_type)( ::SireBase::PropertyName const & ) const; + hasProperty_function_type hasProperty_function_value( &::SireMM::Bond::hasProperty ); + + Bond_exposer.def( + "hasProperty" + , hasProperty_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::isEmpty + + typedef bool ( ::SireMM::Bond::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMM::Bond::isEmpty ); + + Bond_exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::length + + typedef ::SireUnits::Dimension::Length ( ::SireMM::Bond::*length_function_type)( ) const; + length_function_type length_function_value( &::SireMM::Bond::length ); + + Bond_exposer.def( + "length" + , length_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::length + + typedef ::SireUnits::Dimension::Length ( ::SireMM::Bond::*length_function_type)( ::SireBase::PropertyMap const & ) const; + length_function_type length_function_value( &::SireMM::Bond::length ); + + Bond_exposer.def( + "length" + , length_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::metadataKeys + + typedef ::QStringList ( ::SireMM::Bond::*metadataKeys_function_type)( ) const; + metadataKeys_function_type metadataKeys_function_value( &::SireMM::Bond::metadataKeys ); + + Bond_exposer.def( + "metadataKeys" + , metadataKeys_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::metadataKeys + + typedef ::QStringList ( ::SireMM::Bond::*metadataKeys_function_type)( ::SireBase::PropertyName const & ) const; + metadataKeys_function_type metadataKeys_function_value( &::SireMM::Bond::metadataKeys ); + + Bond_exposer.def( + "metadataKeys" + , metadataKeys_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::move + + typedef ::SireMol::Mover< SireMM::Bond > ( ::SireMM::Bond::*move_function_type)( ) const; + move_function_type move_function_value( &::SireMM::Bond::move ); + + Bond_exposer.def( + "move" + , move_function_value + , bp::release_gil_policy() + , "" ); + + } + Bond_exposer.def( bp::self != bp::self ); + { //::SireMM::Bond::operator= + + typedef ::SireMM::Bond & ( ::SireMM::Bond::*assign_function_type)( ::SireMM::Bond const & ) ; + assign_function_type assign_function_value( &::SireMM::Bond::operator= ); + + Bond_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("bond") ) + , bp::return_self< >() + , "" ); + + } + Bond_exposer.def( bp::self == bp::self ); + { //::SireMM::Bond::potential + + typedef ::SireCAS::Expression ( ::SireMM::Bond::*potential_function_type)( ) const; + potential_function_type potential_function_value( &::SireMM::Bond::potential ); + + Bond_exposer.def( + "potential" + , potential_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::potential + + typedef ::SireCAS::Expression ( ::SireMM::Bond::*potential_function_type)( ::SireBase::PropertyMap const & ) const; + potential_function_type potential_function_value( &::SireMM::Bond::potential ); + + Bond_exposer.def( + "potential" + , potential_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::properties + + typedef ::SireBase::Properties ( ::SireMM::Bond::*properties_function_type)( ) const; + properties_function_type properties_function_value( &::SireMM::Bond::properties ); + + Bond_exposer.def( + "properties" + , properties_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::property + + typedef ::SireBase::Property const & ( ::SireMM::Bond::*property_function_type)( ::SireBase::PropertyName const & ) const; + property_function_type property_function_value( &::SireMM::Bond::property ); + + Bond_exposer.def( + "property" + , property_function_value + , ( bp::arg("key") ) + , bp::return_value_policy() + , "" ); + + } + { //::SireMM::Bond::property + + typedef ::SireBase::Property const & ( ::SireMM::Bond::*property_function_type)( ::SireBase::PropertyName const &,::SireBase::Property const & ) const; + property_function_type property_function_value( &::SireMM::Bond::property ); + + Bond_exposer.def( + "property" + , property_function_value + , ( bp::arg("key"), bp::arg("default_value") ) + , bp::return_value_policy() + , "" ); + + } + { //::SireMM::Bond::propertyKeys + + typedef ::QStringList ( ::SireMM::Bond::*propertyKeys_function_type)( ) const; + propertyKeys_function_type propertyKeys_function_value( &::SireMM::Bond::propertyKeys ); + + Bond_exposer.def( + "propertyKeys" + , propertyKeys_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::selectedAll + + typedef bool ( ::SireMM::Bond::*selectedAll_function_type)( ) const; + selectedAll_function_type selectedAll_function_value( &::SireMM::Bond::selectedAll ); + + Bond_exposer.def( + "selectedAll" + , selectedAll_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::selection + + typedef ::SireMol::AtomSelection ( ::SireMM::Bond::*selection_function_type)( ) const; + selection_function_type selection_function_value( &::SireMM::Bond::selection ); + + Bond_exposer.def( + "selection" + , selection_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMM::Bond::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMM::Bond::toSelector ); + + Bond_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::toString + + typedef ::QString ( ::SireMM::Bond::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMM::Bond::toString ); + + Bond_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMM::Bond::typeName ); + + Bond_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::Bond::what + + typedef char const * ( ::SireMM::Bond::*what_function_type)( ) const; + what_function_type what_function_value( &::SireMM::Bond::what ); + + Bond_exposer.def( + "what" + , what_function_value + , bp::release_gil_policy() + , "" ); + + } + Bond_exposer.staticmethod( "typeName" ); + Bond_exposer.def( "__copy__", &__copy__); + Bond_exposer.def( "__deepcopy__", &__copy__); + Bond_exposer.def( "clone", &__copy__); + Bond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::Bond >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Bond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::Bond >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Bond_exposer.def_pickle(sire_pickle_suite< ::SireMM::Bond >()); + Bond_exposer.def( "__str__", &__str__< ::SireMM::Bond > ); + Bond_exposer.def( "__repr__", &__str__< ::SireMM::Bond > ); + Bond_exposer.def( "__len__", &__len_size< ::SireMM::Bond > ); + } + +} diff --git a/wrapper/MM/Bond.pypp.hpp b/wrapper/MM/Bond.pypp.hpp new file mode 100644 index 000000000..df4671515 --- /dev/null +++ b/wrapper/MM/Bond.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef Bond_hpp__pyplusplus_wrapper +#define Bond_hpp__pyplusplus_wrapper + +void register_Bond_class(); + +#endif//Bond_hpp__pyplusplus_wrapper diff --git a/wrapper/MM/BondComponent.pypp.cpp b/wrapper/MM/BondComponent.pypp.cpp index 4df6094f2..ea25ad78e 100644 --- a/wrapper/MM/BondComponent.pypp.cpp +++ b/wrapper/MM/BondComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::BondComponent __copy__(const SireMM::BondComponent &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BondComponent_class(){ { //::SireMM::BondComponent @@ -39,6 +41,7 @@ void register_BondComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("bondnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_BondComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("bondnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_BondComponent_class(){ BondComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_BondComponent_class(){ BondComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_BondComponent_class(){ BondComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_BondComponent_class(){ BondComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/BondParameterName.pypp.cpp b/wrapper/MM/BondParameterName.pypp.cpp index 48d2de8b1..603a89c00 100644 --- a/wrapper/MM/BondParameterName.pypp.cpp +++ b/wrapper/MM/BondParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::BondParameterName __copy__(const SireMM::BondParameterName &other){ retu const char* pvt_get_name(const SireMM::BondParameterName&){ return "SireMM::BondParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_BondParameterName_class(){ { //::SireMM::BondParameterName diff --git a/wrapper/MM/BondSymbols.pypp.cpp b/wrapper/MM/BondSymbols.pypp.cpp index 36b9c13f6..2a7370a66 100644 --- a/wrapper/MM/BondSymbols.pypp.cpp +++ b/wrapper/MM/BondSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::BondSymbols __copy__(const SireMM::BondSymbols &other){ return SireMM::B const char* pvt_get_name(const SireMM::BondSymbols&){ return "SireMM::BondSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_BondSymbols_class(){ { //::SireMM::BondSymbols @@ -50,7 +52,7 @@ void register_BondSymbols_class(){ BondSymbols_exposer.def( "r" , r_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the vector along the bond (r)" ); } diff --git a/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp b/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp index f1683974f..0d77579ae 100644 --- a/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp +++ b/wrapper/MM/CHARMMSwitchingFunction.pypp.cpp @@ -33,6 +33,8 @@ SireMM::CHARMMSwitchingFunction __copy__(const SireMM::CHARMMSwitchingFunction & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CHARMMSwitchingFunction_class(){ { //::SireMM::CHARMMSwitchingFunction @@ -53,6 +55,7 @@ void register_CHARMMSwitchingFunction_class(){ "dElectrostaticScaleFactor" , dElectrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the derivative of the electrostatic scaling factor as\n" ); } @@ -65,6 +68,7 @@ void register_CHARMMSwitchingFunction_class(){ "dVDWScaleFactor" , dVDWScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the derivative of the vdw scaling factor as\n" ); } @@ -77,6 +81,7 @@ void register_CHARMMSwitchingFunction_class(){ "electrostaticScaleFactor" , electrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the scale factor for the electrostatic interaction for the\n" ); } @@ -103,6 +108,7 @@ void register_CHARMMSwitchingFunction_class(){ CHARMMSwitchingFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this switching function" ); } @@ -114,6 +120,7 @@ void register_CHARMMSwitchingFunction_class(){ CHARMMSwitchingFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -126,6 +133,7 @@ void register_CHARMMSwitchingFunction_class(){ "vdwScaleFactor" , vdwScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the scale factor for the vdw interaction for the\n" ); } diff --git a/wrapper/MM/CLJ14Group.pypp.cpp b/wrapper/MM/CLJ14Group.pypp.cpp index b1477bb32..c8224836f 100644 --- a/wrapper/MM/CLJ14Group.pypp.cpp +++ b/wrapper/MM/CLJ14Group.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; #include "SireMol/atomcoords.h" +#include "SireMol/core.h" + #include "SireMol/editor.hpp" #include "SireMol/mover.hpp" @@ -38,6 +40,8 @@ SireMM::CLJ14Group __copy__(const SireMM::CLJ14Group &other){ return SireMM::CLJ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJ14Group_class(){ { //::SireMM::CLJ14Group @@ -56,6 +60,7 @@ void register_CLJ14Group_class(){ "add" , add_function_value , ( bp::arg("new_molecule") ) + , bp::release_gil_policy() , "Add the passed molecule to this group" ); } @@ -68,6 +73,7 @@ void register_CLJ14Group_class(){ "add" , add_function_value , ( bp::arg("new_selection") ) + , bp::release_gil_policy() , "Add the passed selection onto this group" ); } @@ -79,6 +85,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "combiningRules" , combiningRules_function_value + , bp::release_gil_policy() , "Return the type of combining rules in place" ); } @@ -90,6 +97,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "Calculate and return the coulomb and LJ 14 energy" ); } @@ -101,6 +109,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -112,6 +121,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "isStrict" , isStrict_function_value + , bp::release_gil_policy() , "Return whether or not strict mode is on" ); } @@ -123,7 +133,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "molecule" , molecule_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule that is in this group" ); } @@ -135,6 +145,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Set the flag to say that we must recalculate everything\nfrom scratch" ); } @@ -146,6 +157,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "mustReallyRecalculateFromScratch" , mustReallyRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Set the flag to ensure that the energy is really completely\nrecalculated from scratch" ); } @@ -172,6 +184,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "propertyMap" , propertyMap_function_value + , bp::release_gil_policy() , "Return the property map used to find the properties needed to\ncalculate the 14 energy (coordinates, charge, LJ\nand intrascale)" ); } @@ -183,6 +196,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "recalculatingFromScratch" , recalculatingFromScratch_function_value + , bp::release_gil_policy() , "Return whether or not we are recalculating things from scratch" ); } @@ -195,6 +209,7 @@ void register_CLJ14Group_class(){ "remove" , remove_function_value , ( bp::arg("new_selection") ) + , bp::release_gil_policy() , "Remove the passed selection from the group" ); } @@ -207,6 +222,7 @@ void register_CLJ14Group_class(){ "remove" , remove_function_value , ( bp::arg("new_molecule") ) + , bp::release_gil_policy() , "Remove the passed molecule from this group" ); } @@ -219,6 +235,7 @@ void register_CLJ14Group_class(){ "setArithmeticCombiningRules" , setArithmeticCombiningRules_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off the use of arithmetic combining rules" ); } @@ -231,6 +248,7 @@ void register_CLJ14Group_class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("rules") ) + , bp::release_gil_policy() , "Set the combining rules to rules" ); } @@ -243,6 +261,7 @@ void register_CLJ14Group_class(){ "setGeometricCombiningRules" , setGeometricCombiningRules_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off the use og geometric combining rules" ); } @@ -255,6 +274,7 @@ void register_CLJ14Group_class(){ "setStrict" , setStrict_function_value , ( bp::arg("isstrict") ) + , bp::release_gil_policy() , "Set whether or not strict mode is on. If strict mode is on,\nthen this means that the 1-4 energy is calculated only if both of the\natoms are selected. If strict mode is off, then the 1-4 energy\nis calculated when at least one of the atoms is selected." ); } @@ -266,6 +286,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -277,6 +298,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -289,6 +311,7 @@ void register_CLJ14Group_class(){ "update" , update_function_value , ( bp::arg("new_molecule") ) + , bp::release_gil_policy() , "Update the contained molecule to the newest version" ); } @@ -301,6 +324,7 @@ void register_CLJ14Group_class(){ "updateSelection" , updateSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Update the selection to the new passed value" ); } @@ -312,6 +336,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "usingArithmeticCombiningRules" , usingArithmeticCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not arithmetic combining rules are used" ); } @@ -323,6 +348,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "usingGeometricCombiningRules" , usingGeometricCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not geometric combining rules are used" ); } @@ -334,6 +360,7 @@ void register_CLJ14Group_class(){ CLJ14Group_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -346,6 +373,7 @@ void register_CLJ14Group_class(){ "wouldChangeProperties" , wouldChangeProperties_function_value , ( bp::arg("map") ) + , bp::release_gil_policy() , "Return whether or not the passed property map would change properties that\nare used by this calculation" ); } diff --git a/wrapper/MM/CLJAtom.pypp.cpp b/wrapper/MM/CLJAtom.pypp.cpp index 70b2dcb1d..644e66944 100644 --- a/wrapper/MM/CLJAtom.pypp.cpp +++ b/wrapper/MM/CLJAtom.pypp.cpp @@ -49,6 +49,8 @@ SireMM::CLJAtom __copy__(const SireMM::CLJAtom &other){ return SireMM::CLJAtom(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJAtom_class(){ { //::SireMM::CLJAtom @@ -65,6 +67,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "ID" , ID_function_value + , bp::release_gil_policy() , "Return the ID number for the atom" ); } @@ -88,6 +91,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "charge" , charge_function_value + , bp::release_gil_policy() , "Return the partial charge of the atom" ); } @@ -99,6 +103,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "coordinates" , coordinates_function_value + , bp::release_gil_policy() , "Return the coordinates of the atom" ); } @@ -110,6 +115,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "isDummy" , isDummy_function_value + , bp::release_gil_policy() , "Return whether or not this is a dummy atom (has no ID number)" ); } @@ -121,6 +127,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this atom is null (no information)" ); } @@ -132,6 +139,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "ljParameter" , ljParameter_function_value + , bp::release_gil_policy() , "Return the LJ parameters of the atom" ); } @@ -143,6 +151,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "negate" , negate_function_value + , bp::release_gil_policy() , "Return the negative of this atom - this returns a copy where\nthe reduced charge and reduced epsilon values have been negated" ); } @@ -169,6 +178,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -180,6 +190,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -191,6 +202,7 @@ void register_CLJAtom_class(){ CLJAtom_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJAtoms.pypp.cpp b/wrapper/MM/CLJAtoms.pypp.cpp index b0e57e0d2..951581bb3 100644 --- a/wrapper/MM/CLJAtoms.pypp.cpp +++ b/wrapper/MM/CLJAtoms.pypp.cpp @@ -49,6 +49,8 @@ SireMM::CLJAtoms __copy__(const SireMM::CLJAtoms &other){ return SireMM::CLJAtom #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CLJAtoms_class(){ @@ -95,6 +97,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "IDs" , IDs_function_value + , bp::release_gil_policy() , "Return the IDs of all of the atoms" ); } @@ -107,6 +110,7 @@ void register_CLJAtoms_class(){ "append" , append_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Append the passed atom onto the end of this set. Note that this is not space efficient\nas the atom will be added with a lot of padding" ); } @@ -131,6 +135,7 @@ void register_CLJAtoms_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith atom in the vector" ); } @@ -142,6 +147,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return an array of all of the atoms" ); } @@ -153,6 +159,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "charges" , charges_function_value + , bp::release_gil_policy() , "Return the charges of all of the atoms" ); } @@ -164,6 +171,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "coordinates" , coordinates_function_value + , bp::release_gil_policy() , "Return the coordinates of all of the atoms" ); } @@ -176,6 +184,7 @@ void register_CLJAtoms_class(){ "copyIn" , copyIn_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Copy the contents of other into this vectors, starting at index 0,\nand copying all elements of other" ); } @@ -187,6 +196,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of atoms in this set. Note that vectorisation\nmay mean that the array of atoms has been padded with dummy atoms" ); } @@ -211,6 +221,7 @@ void register_CLJAtoms_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith atom in the vector" ); } @@ -222,6 +233,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "hasDummies" , hasDummies_function_value + , bp::release_gil_policy() , "Return whether or not there are any dummy (or padded) atoms in this set" ); } @@ -233,6 +245,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "idOfDummy" , idOfDummy_function_value + , bp::release_gil_policy() , "Return a MultiFloat of the ID of a dummy atom" ); } @@ -245,6 +258,7 @@ void register_CLJAtoms_class(){ "isDummy" , isDummy_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -256,6 +270,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this array is empty" ); } @@ -267,6 +282,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "isPadded" , isPadded_function_value + , bp::release_gil_policy() , "" ); } @@ -278,6 +294,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "ljParameters" , ljParameters_function_value + , bp::release_gil_policy() , "Return the charges of all of the atoms" ); } @@ -290,6 +307,7 @@ void register_CLJAtoms_class(){ "makeDummy" , makeDummy_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Make the ith atom into a dummy atom (set the atom ID to 0)" ); } @@ -301,6 +319,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "maxCoords" , maxCoords_function_value + , bp::release_gil_policy() , "Return the maximum coordinates of these atoms (ignoring dummies)" ); } @@ -312,6 +331,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "minCoords" , minCoords_function_value + , bp::release_gil_policy() , "Return the minimum coordinates of these atoms (ignoring dummies)" ); } @@ -323,6 +343,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of non-dummy atoms in this set. This is equal to\ncount() - nDummies()" ); } @@ -334,6 +355,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "nDummies" , nDummies_function_value + , bp::release_gil_policy() , "Return the number of dummy (or padded) atoms in this set" ); } @@ -345,6 +367,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "nPadded" , nPadded_function_value + , bp::release_gil_policy() , "" ); } @@ -356,6 +379,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "negate" , negate_function_value + , bp::release_gil_policy() , "Return a copy of these CLJAtoms where the charge and LJ epsilon parameters\nare negated. This will mean that the negative of the energy of these CLJAtoms\nwill be calculated by the CLJFunctions (useful for calculating energy differences)" ); } @@ -434,6 +458,7 @@ void register_CLJAtoms_class(){ "resize" , resize_function_value , ( bp::arg("new_size") ) + , bp::release_gil_policy() , "Resize this collection to hold n atoms. This will add dummy atoms (and padding)\nif necessary, or will delete elements (but keeping dummy padding) if needed" ); } @@ -446,6 +471,7 @@ void register_CLJAtoms_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("atom") ) + , bp::release_gil_policy() , "Overwrite the atom at index i with the data in atom" ); } @@ -458,6 +484,7 @@ void register_CLJAtoms_class(){ "setAllID" , setAllID_function_value , ( bp::arg("idnum") ) + , bp::release_gil_policy() , "Set the ID number of all (non-dummy) atoms to idnum" ); } @@ -470,6 +497,7 @@ void register_CLJAtoms_class(){ "setCharge" , setCharge_function_value , ( bp::arg("i"), bp::arg("charge") ) + , bp::release_gil_policy() , "Set the charge of the ith atom to charge" ); } @@ -482,6 +510,7 @@ void register_CLJAtoms_class(){ "setCoordinates" , setCoordinates_function_value , ( bp::arg("i"), bp::arg("coords") ) + , bp::release_gil_policy() , "Set the coordinates of the ith atom to coords" ); } @@ -494,6 +523,7 @@ void register_CLJAtoms_class(){ "setID" , setID_function_value , ( bp::arg("i"), bp::arg("idnum") ) + , bp::release_gil_policy() , "Set the ID number for the ith atom to idnum" ); } @@ -506,6 +536,7 @@ void register_CLJAtoms_class(){ "setLJParameter" , setLJParameter_function_value , ( bp::arg("i"), bp::arg("ljparam") ) + , bp::release_gil_policy() , "Set the LJ parameter of the ith atom to ljparam" ); } @@ -529,6 +560,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of atoms in this set. Note that vectorisation\nmay mean that the array of atoms has been padded with dummy atoms" ); } @@ -540,6 +572,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "squeeze" , squeeze_function_value + , bp::release_gil_policy() , "Return a squeezed copy of these CLJAtoms whereby all of the\ndummy atoms are removed and atoms squeezed into a single, contiguous space" ); } @@ -551,6 +584,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -562,6 +596,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -573,6 +608,7 @@ void register_CLJAtoms_class(){ CLJAtoms_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJBox.pypp.cpp b/wrapper/MM/CLJBox.pypp.cpp index 0065c7ca4..fd19f2606 100644 --- a/wrapper/MM/CLJBox.pypp.cpp +++ b/wrapper/MM/CLJBox.pypp.cpp @@ -41,6 +41,8 @@ SireMM::CLJBox __copy__(const SireMM::CLJBox &other){ return SireMM::CLJBox(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CLJBox_class(){ @@ -61,6 +63,7 @@ void register_CLJBox_class(){ "add" , add_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Add the passed atoms into this box. This returns the indicies\nof each added atom (in the same order as they were added)" ); } @@ -73,6 +76,7 @@ void register_CLJBox_class(){ "add" , add_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Add the passed atoms into this box. This returns the indicies\nof each added atom (in the same order as they were added)" ); } @@ -85,6 +89,7 @@ void register_CLJBox_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith CLJAtom - this uses the CLJAtoms index, i.e. includes\ndummy atoms and padding" ); } @@ -108,6 +113,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "boxLength" , boxLength_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +125,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the count of the box - this includes dummy atoms and padding" ); } @@ -130,6 +137,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "dimensions" , dimensions_function_value + , bp::release_gil_policy() , "Return the dimensions of this box" ); } @@ -142,6 +150,7 @@ void register_CLJBox_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith CLJAtom - this uses the CLJAtoms index, i.e. includes\ndummy atoms and padding" ); } @@ -165,6 +174,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +186,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in the box. This is equal to the\nnumber of actual atoms (i.e. not including padding or dummy atoms)" ); } @@ -216,6 +227,7 @@ void register_CLJBox_class(){ "remove" , remove_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Remove the atom at index atom from the box" ); } @@ -228,6 +240,7 @@ void register_CLJBox_class(){ "remove" , remove_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Remove the atoms whose indicies are in atoms" ); } @@ -240,6 +253,7 @@ void register_CLJBox_class(){ "remove" , remove_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Remove the atoms at the specified indicies" ); } @@ -251,6 +265,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the count of the box - this includes dummy atoms and padding" ); } @@ -262,6 +277,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "squeeze" , squeeze_function_value + , bp::release_gil_policy() , "Return a copy of this box where the CLJAtoms are squeezed" ); } @@ -274,6 +290,7 @@ void register_CLJBox_class(){ "take" , take_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Remove the atom at index atom, returning the atom removed" ); } @@ -285,6 +302,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -296,6 +314,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -307,6 +326,7 @@ void register_CLJBox_class(){ CLJBox_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJBoxDistance.pypp.cpp b/wrapper/MM/CLJBoxDistance.pypp.cpp index 41ab91dfe..ae521ea3a 100644 --- a/wrapper/MM/CLJBoxDistance.pypp.cpp +++ b/wrapper/MM/CLJBoxDistance.pypp.cpp @@ -41,6 +41,8 @@ SireMM::CLJBoxDistance __copy__(const SireMM::CLJBoxDistance &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJBoxDistance_class(){ { //::SireMM::CLJBoxDistance @@ -57,6 +59,7 @@ void register_CLJBoxDistance_class(){ CLJBoxDistance_exposer.def( "box0" , box0_function_value + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_CLJBoxDistance_class(){ CLJBoxDistance_exposer.def( "box1" , box1_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +83,7 @@ void register_CLJBoxDistance_class(){ CLJBoxDistance_exposer.def( "distance" , distance_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_CLJBoxDistance_class(){ CLJBoxDistance_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -118,6 +124,7 @@ void register_CLJBoxDistance_class(){ CLJBoxDistance_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -129,6 +136,7 @@ void register_CLJBoxDistance_class(){ CLJBoxDistance_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJBoxIndex.pypp.cpp b/wrapper/MM/CLJBoxIndex.pypp.cpp index fc25184e7..9a03201a7 100644 --- a/wrapper/MM/CLJBoxIndex.pypp.cpp +++ b/wrapper/MM/CLJBoxIndex.pypp.cpp @@ -41,6 +41,8 @@ SireMM::CLJBoxIndex __copy__(const SireMM::CLJBoxIndex &other){ return SireMM::C #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJBoxIndex_class(){ { //::SireMM::CLJBoxIndex @@ -58,6 +60,7 @@ void register_CLJBoxIndex_class(){ "box" , box_function_value , ( bp::arg("box_length") ) + , bp::release_gil_policy() , "Return the AABox that describes this box (for a given box length of box_length).\nThe boxes are arranged so that the box at (0,0,0) has its center at (0,0,0) and\nextends to (-0.5length,-0.5length,-0.5length) to (0.5length,0.5length,0.5length)" ); } @@ -69,6 +72,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "boxOnly" , boxOnly_function_value + , bp::release_gil_policy() , "Return a copy of this index that contains only the box index (not the atom index)" ); } @@ -81,6 +85,7 @@ void register_CLJBoxIndex_class(){ "countNonDummies" , countNonDummies_function_value , ( bp::arg("indicies") ) + , bp::release_gil_policy() , "Return the number of non-dummy indicies in the passed array" ); } @@ -93,6 +98,7 @@ void register_CLJBoxIndex_class(){ "createWithBoxLength" , createWithBoxLength_function_value , ( bp::arg("x"), bp::arg("y"), bp::arg("z"), bp::arg("box_length") ) + , bp::release_gil_policy() , "Create the index for the box that contains the point x,y,z in a set of boxes\nof length box_length" ); } @@ -105,6 +111,7 @@ void register_CLJBoxIndex_class(){ "createWithBoxLength" , createWithBoxLength_function_value , ( bp::arg("coords"), bp::arg("box_length") ) + , bp::release_gil_policy() , "Create the index for the box that contains the point x,y,z in a set of boxes\nof length box_length" ); } @@ -117,6 +124,7 @@ void register_CLJBoxIndex_class(){ "createWithInverseBoxLength" , createWithInverseBoxLength_function_value , ( bp::arg("x"), bp::arg("y"), bp::arg("z"), bp::arg("inv_length") ) + , bp::release_gil_policy() , "Create the index for the box that contains the point x,y,z in a set of boxes\nof length 1 inv_box_length" ); } @@ -129,6 +137,7 @@ void register_CLJBoxIndex_class(){ "createWithInverseBoxLength" , createWithInverseBoxLength_function_value , ( bp::arg("coords"), bp::arg("inv_length") ) + , bp::release_gil_policy() , "Create the index for the box that contains the point x,y,z in a set of boxes\nof length 1 inv_box_length" ); } @@ -140,6 +149,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "hasAtomIndex" , hasAtomIndex_function_value + , bp::release_gil_policy() , "" ); } @@ -151,6 +161,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -162,6 +173,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "i" , i_function_value + , bp::release_gil_policy() , "" ); } @@ -173,6 +185,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "" ); } @@ -184,6 +197,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is null" ); } @@ -195,6 +209,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "j" , j_function_value + , bp::release_gil_policy() , "" ); } @@ -206,6 +221,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "k" , k_function_value + , bp::release_gil_policy() , "" ); } @@ -218,6 +234,7 @@ void register_CLJBoxIndex_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the maximum box indicies of the two passed boxes" ); } @@ -230,6 +247,7 @@ void register_CLJBoxIndex_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the minimum box indicies of the two passed boxes" ); } @@ -241,6 +259,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "Return a null CLJBoxIndex" ); } @@ -272,6 +291,7 @@ void register_CLJBoxIndex_class(){ "sameBox" , sameBox_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -283,6 +303,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -294,6 +315,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -305,6 +327,7 @@ void register_CLJBoxIndex_class(){ CLJBoxIndex_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJBoxes.pypp.cpp b/wrapper/MM/CLJBoxes.pypp.cpp index 59dc19422..a4bbd5f7c 100644 --- a/wrapper/MM/CLJBoxes.pypp.cpp +++ b/wrapper/MM/CLJBoxes.pypp.cpp @@ -41,6 +41,8 @@ SireMM::CLJBoxes __copy__(const SireMM::CLJBoxes &other){ return SireMM::CLJBoxe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJBoxes_class(){ { //::SireMM::CLJBoxes @@ -62,6 +64,7 @@ void register_CLJBoxes_class(){ "add" , add_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Add a set of CLJAtoms to the box, returning the indicies of each added atom" ); } @@ -74,6 +77,7 @@ void register_CLJBoxes_class(){ "at" , at_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the atom at the specified index, or a null atom if\nnone such atom exists" ); } @@ -85,6 +89,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return all of the atoms in all of the boxes (these may\nbe returned with a lot of padding)" ); } @@ -97,6 +102,7 @@ void register_CLJBoxes_class(){ "atoms" , atoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return all of the atoms whose indicies are in idxs. The atoms are returned\nin the same order as they appear in idxs" ); } @@ -109,6 +115,7 @@ void register_CLJBoxes_class(){ "boxAt" , boxAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith box" ); } @@ -121,6 +128,7 @@ void register_CLJBoxes_class(){ "boxAt" , boxAt_function_value , ( bp::arg("index") ) + , bp::release_gil_policy() , "Return the box at index index" ); } @@ -133,6 +141,7 @@ void register_CLJBoxes_class(){ "boxAt" , boxAt_function_value , ( bp::arg("coords") ) + , bp::release_gil_policy() , "Return the box that contains the point with coordinates coords" ); } @@ -144,6 +153,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "boxDimensions" , boxDimensions_function_value + , bp::release_gil_policy() , "Return an array containing all occupied box dimensions. This is in the same order\nas the boxes returned by boxes" ); } @@ -156,6 +166,7 @@ void register_CLJBoxes_class(){ "boxDimensionsAt" , boxDimensionsAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the dimensions of the ith box" ); } @@ -168,6 +179,7 @@ void register_CLJBoxes_class(){ "boxDimensionsAt" , boxDimensionsAt_function_value , ( bp::arg("index") ) + , bp::release_gil_policy() , "Return the AABox that describes the boundary of the box at index index" ); } @@ -180,6 +192,7 @@ void register_CLJBoxes_class(){ "boxDimensionsAt" , boxDimensionsAt_function_value , ( bp::arg("coords") ) + , bp::release_gil_policy() , "Return the dimensions of the box that contains the point with coordinates coords" ); } @@ -191,6 +204,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "boxes" , boxes_function_value + , bp::release_gil_policy() , "Return an array containing all occupied boxes. This is in the same order\nas the box dimensions returned by boxDimensions" ); } @@ -203,6 +217,7 @@ void register_CLJBoxes_class(){ "get" , get_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return all of the atoms whose indicies are in idxs. The atoms are returned\nin the same order as they appear in idxs" ); } @@ -215,6 +230,7 @@ void register_CLJBoxes_class(){ "getDistance" , getDistance_function_value , ( bp::arg("box0"), bp::arg("box1") ) + , bp::release_gil_policy() , "Return the distance between the two boxes, assuming they are in an infinite cartesian space" ); } @@ -227,6 +243,7 @@ void register_CLJBoxes_class(){ "getDistance" , getDistance_function_value , ( bp::arg("space"), bp::arg("box0"), bp::arg("box1") ) + , bp::release_gil_policy() , "Return the distance between the two boxes based on the space space" ); } @@ -239,6 +256,7 @@ void register_CLJBoxes_class(){ "getDistance" , getDistance_function_value , ( bp::arg("space"), bp::arg("box0"), bp::arg("box1"), bp::arg("nx"), bp::arg("ny"), bp::arg("nz") ) + , bp::release_gil_policy() , "Return the distance between the two boxes based on the space space, assuming that\none of the boxes covers a volume of nx,ny,nz box lengths above its minimum dimensions" ); } @@ -251,6 +269,7 @@ void register_CLJBoxes_class(){ "getDistances" , getDistances_function_value , ( bp::arg("space"), bp::arg("boxes") ) + , bp::release_gil_policy() , "Return the distances between all of the occupied boxes in boxes\nbased on the space space" ); } @@ -263,6 +282,7 @@ void register_CLJBoxes_class(){ "getDistances" , getDistances_function_value , ( bp::arg("space"), bp::arg("boxes"), bp::arg("cutoff") ) + , bp::release_gil_policy() , "Return the distances between all of the occupied boxes in boxes\nbased on the space space, only returning boxes that are separated\nby distances of less than cutoff" ); } @@ -275,6 +295,7 @@ void register_CLJBoxes_class(){ "getDistances" , getDistances_function_value , ( bp::arg("space"), bp::arg("boxes0"), bp::arg("boxes1") ) + , bp::release_gil_policy() , "Return the distances between all pairs of occupied boxes between the boxes in\nboxes0 and the boxes in boxes1" ); } @@ -287,6 +308,7 @@ void register_CLJBoxes_class(){ "getDistances" , getDistances_function_value , ( bp::arg("space"), bp::arg("boxes0"), bp::arg("boxes1"), bp::arg("cutoff") ) + , bp::release_gil_policy() , "Return the distances between all pairs of occupied boxes between the boxes in\nboxes0 and the boxes in boxes1" ); } @@ -299,6 +321,7 @@ void register_CLJBoxes_class(){ "getDistances" , getDistances_function_value , ( bp::arg("space"), bp::arg("atoms0"), bp::arg("boxes1") ) + , bp::release_gil_policy() , "Return the distances between all the passed atoms and all of the occupied\nboxes in boxes1, returning a set of CLJBoxDistance objects where box0() is 0" ); } @@ -311,6 +334,7 @@ void register_CLJBoxes_class(){ "getDistances" , getDistances_function_value , ( bp::arg("space"), bp::arg("atoms0"), bp::arg("boxes1"), bp::arg("cutoff") ) + , bp::release_gil_policy() , "Return the distances between all the passed atoms and all of the occupied\nboxes in boxes1, returning a set of CLJBoxDistance objects where box0() is 0" ); } @@ -323,6 +347,7 @@ void register_CLJBoxes_class(){ "getitem" , getitem_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the atom at the specified index, or a null atom if\nnone such atom exists" ); } @@ -334,6 +359,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -345,6 +371,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "length" , length_function_value + , bp::release_gil_policy() , "Return the length of each side of each box" ); } @@ -356,6 +383,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in the boxes" ); } @@ -367,6 +395,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "nOccupiedBoxes" , nOccupiedBoxes_function_value + , bp::release_gil_policy() , "Return the number of occupied boxes" ); } @@ -378,6 +407,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "occupiedBoxIndicies" , occupiedBoxIndicies_function_value + , bp::release_gil_policy() , "Return the indicies of all occupied boxes" ); } @@ -430,6 +460,7 @@ void register_CLJBoxes_class(){ "remove" , remove_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Remove the atoms at the specified indicies. This does a rapid remove, i.e.\nit just turns the specified atoms into dummies (which may be overwritten by\nsubsequent add operations). If you want to completely remove the atoms then\nuse remove followed by squeeze. This will turn the atoms into dummies and will\nthen remove all dummy atoms from the boxes" ); } @@ -441,6 +472,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "squeeze" , squeeze_function_value + , bp::release_gil_policy() , "Return a copy of the boxes where all of the CLJAtoms objects have been squeezed,\nand all empty boxes have been removed" ); } @@ -453,6 +485,7 @@ void register_CLJBoxes_class(){ "take" , take_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Remove the atoms at the specified indicies, returning the atoms that are\nremoved. This does a rapid remove, i.e. it just turns the specified atoms into\ndummies (which may be overwritten by subsequent add operations). If you want\nto completely remove the atoms, use take followed by squeeze" ); } @@ -464,6 +497,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -475,6 +509,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -486,6 +521,7 @@ void register_CLJBoxes_class(){ CLJBoxes_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJCalculator.pypp.cpp b/wrapper/MM/CLJCalculator.pypp.cpp index 8a4e29f63..3e83f3173 100644 --- a/wrapper/MM/CLJCalculator.pypp.cpp +++ b/wrapper/MM/CLJCalculator.pypp.cpp @@ -31,6 +31,8 @@ SireMM::CLJCalculator __copy__(const SireMM::CLJCalculator &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJCalculator_class(){ { //::SireMM::CLJCalculator @@ -47,6 +49,7 @@ void register_CLJCalculator_class(){ "calculate" , calculate_function_value , ( bp::arg("func"), bp::arg("boxes") ) + , bp::release_gil_policy() , "Calculate the energy between all of the atoms in the passed CLJBoxes\nusing the passed CLJFunction, returning\nthe coulomb and LJ energy as a tuple (coulomb,lj)" ); } @@ -59,6 +62,7 @@ void register_CLJCalculator_class(){ "calculate" , calculate_function_value , ( bp::arg("funcs"), bp::arg("boxes") ) + , bp::release_gil_policy() , "Calculate the energy between all of the atoms in the passed CLJBoxes\nusing the passed array of CLJFunctions, returning the energies as\na tuple of arrays of the coulomb and LJ energy (coulomb,lj)" ); } @@ -71,6 +75,7 @@ void register_CLJCalculator_class(){ "calculate" , calculate_function_value , ( bp::arg("func"), bp::arg("boxes0"), bp::arg("boxes1") ) + , bp::release_gil_policy() , "Calculate the energy between all of the atoms in the passed two CLJBoxes\nusing the passed CLJFunction, returning\nthe coulomb and LJ energy as a tuple (coulomb,lj)" ); } @@ -83,6 +88,7 @@ void register_CLJCalculator_class(){ "calculate" , calculate_function_value , ( bp::arg("func"), bp::arg("atoms0"), bp::arg("boxes1") ) + , bp::release_gil_policy() , "Calculate the energy between all of the atoms in the atoms0 and atoms1\nusing the passed CLJFunction, returning\nthe coulomb and LJ energy as a tuple (coulomb,lj)" ); } @@ -95,6 +101,7 @@ void register_CLJCalculator_class(){ "calculate" , calculate_function_value , ( bp::arg("funcs"), bp::arg("boxes0"), bp::arg("boxes1") ) + , bp::release_gil_policy() , "Calculate the energy between all of the atoms in the passed two CLJBoxes\nusing the passed array of CLJFunctions, returning the energies as\na tuple of arrays of the coulomb and LJ energy (coulomb,lj)" ); } @@ -107,6 +114,7 @@ void register_CLJCalculator_class(){ "calculate" , calculate_function_value , ( bp::arg("funcs"), bp::arg("atoms0"), bp::arg("boxes1") ) + , bp::release_gil_policy() , "Calculate the energy between all of the atoms in the passed atoms0 and atoms1\nusing the passed array of CLJFunctions, returning the energies as\na tuple of arrays of the coulomb and LJ energy (coulomb,lj)" ); } @@ -133,6 +141,7 @@ void register_CLJCalculator_class(){ CLJCalculator_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +153,7 @@ void register_CLJCalculator_class(){ CLJCalculator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +165,7 @@ void register_CLJCalculator_class(){ CLJCalculator_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJComponent.pypp.cpp b/wrapper/MM/CLJComponent.pypp.cpp index 8b2cc7ad1..b31021c35 100644 --- a/wrapper/MM/CLJComponent.pypp.cpp +++ b/wrapper/MM/CLJComponent.pypp.cpp @@ -20,6 +20,8 @@ SireMM::CLJComponent __copy__(const SireMM::CLJComponent &other){ return SireMM: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJComponent_class(){ { //::SireMM::CLJComponent @@ -38,6 +40,7 @@ void register_CLJComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("cljnrg") ) + , bp::release_gil_policy() , "Change the CLJ components of the forcefield ff by delta" ); } @@ -49,7 +52,7 @@ void register_CLJComponent_class(){ CLJComponent_exposer.def( "coulomb" , coulomb_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -61,7 +64,7 @@ void register_CLJComponent_class(){ CLJComponent_exposer.def( "lj" , lj_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -74,6 +77,7 @@ void register_CLJComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("cljnrg") ) + , bp::release_gil_policy() , "Set the CLJ components of the forcefield ff to the passed values" ); } @@ -85,6 +89,7 @@ void register_CLJComponent_class(){ CLJComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -96,7 +101,7 @@ void register_CLJComponent_class(){ CLJComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -108,6 +113,7 @@ void register_CLJComponent_class(){ CLJComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +125,7 @@ void register_CLJComponent_class(){ CLJComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJCutoffFunction.pypp.cpp b/wrapper/MM/CLJCutoffFunction.pypp.cpp index 44915c1ea..b16e56f8a 100644 --- a/wrapper/MM/CLJCutoffFunction.pypp.cpp +++ b/wrapper/MM/CLJCutoffFunction.pypp.cpp @@ -53,6 +53,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJCutoffFunction_class(){ { //::SireMM::CLJCutoffFunction @@ -68,6 +70,7 @@ void register_CLJCutoffFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -79,6 +82,7 @@ void register_CLJCutoffFunction_class(){ CLJCutoffFunction_exposer.def( "coulombCutoff" , coulombCutoff_function_value + , bp::release_gil_policy() , "Return the coulomb cutoff distance" ); } @@ -90,6 +94,7 @@ void register_CLJCutoffFunction_class(){ CLJCutoffFunction_exposer.def( "hasCutoff" , hasCutoff_function_value + , bp::release_gil_policy() , "Return whether or not this function has a cutoff" ); } @@ -101,6 +106,7 @@ void register_CLJCutoffFunction_class(){ CLJCutoffFunction_exposer.def( "ljCutoff" , ljCutoff_function_value + , bp::release_gil_policy() , "Return the LJ cutoff distance" ); } @@ -112,6 +118,7 @@ void register_CLJCutoffFunction_class(){ CLJCutoffFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties that can be set in this function" ); } @@ -124,6 +131,7 @@ void register_CLJCutoffFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -136,6 +144,7 @@ void register_CLJCutoffFunction_class(){ "setCoulombCutoff" , setCoulombCutoff_function_value , ( bp::arg("distance") ) + , bp::release_gil_policy() , "Set the coulomb cutoff to the specified distance" ); } @@ -148,6 +157,7 @@ void register_CLJCutoffFunction_class(){ "setCutoff" , setCutoff_function_value , ( bp::arg("distance") ) + , bp::release_gil_policy() , "Set the coulomb and LJ cutoff distances to distance" ); } @@ -160,6 +170,7 @@ void register_CLJCutoffFunction_class(){ "setCutoff" , setCutoff_function_value , ( bp::arg("coulomb_cutoff"), bp::arg("lj_cutoff") ) + , bp::release_gil_policy() , "Set the coulomb and LJ cutoff distances to the specified values" ); } @@ -172,6 +183,7 @@ void register_CLJCutoffFunction_class(){ "setLJCutoff" , setLJCutoff_function_value , ( bp::arg("distance") ) + , bp::release_gil_policy() , "Set the LJ cutoff to the specified distance" ); } @@ -184,6 +196,7 @@ void register_CLJCutoffFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the property with name name to value value" ); } @@ -195,6 +208,7 @@ void register_CLJCutoffFunction_class(){ CLJCutoffFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -206,6 +220,7 @@ void register_CLJCutoffFunction_class(){ CLJCutoffFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJDelta.pypp.cpp b/wrapper/MM/CLJDelta.pypp.cpp index 9b736427f..2f40042ad 100644 --- a/wrapper/MM/CLJDelta.pypp.cpp +++ b/wrapper/MM/CLJDelta.pypp.cpp @@ -25,6 +25,8 @@ SireMM::CLJDelta __copy__(const SireMM::CLJDelta &other){ return SireMM::CLJDelt #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJDelta_class(){ { //::SireMM::CLJDelta @@ -41,6 +43,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "ID" , ID_function_value + , bp::release_gil_policy() , "" ); } @@ -53,6 +56,7 @@ void register_CLJDelta_class(){ "assertIdenticalTo" , assertIdenticalTo_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that this CLJDelta is equal to other" ); } @@ -64,6 +68,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "changedAtoms" , changedAtoms_function_value + , bp::release_gil_policy() , "Return difference between the old and new atoms. This returns the change,\nreturning only non-dummy atoms, with the parameters of the old atoms\nnegated so that a delta energy can be calculated easily" ); } @@ -75,6 +80,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this change is empty (has no atoms or no change)" ); } @@ -86,6 +92,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +105,7 @@ void register_CLJDelta_class(){ "merge" , merge_function_value , ( bp::arg("deltas"), bp::arg("count") ) + , bp::release_gil_policy() , "Merge together the changed atoms from the n deltas from the passed array\ninto a tuple of the changed, old and new atoms. The resulting set of changed atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -110,6 +118,7 @@ void register_CLJDelta_class(){ "merge" , merge_function_value , ( bp::arg("deltas") ) + , bp::release_gil_policy() , "Merge together the changed atoms from the passed deltas\ninto a tuple of changed, old and new atoms. The resulting set of changed atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -122,6 +131,7 @@ void register_CLJDelta_class(){ "mergeChanged" , mergeChanged_function_value , ( bp::arg("deltas"), bp::arg("count") ) + , bp::release_gil_policy() , "Merge together the changed atoms from the n deltas from the passed array\ninto a single changed atoms object. The resulting set of changed atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -134,6 +144,7 @@ void register_CLJDelta_class(){ "mergeChanged" , mergeChanged_function_value , ( bp::arg("deltas") ) + , bp::release_gil_policy() , "Merge together the changed atoms from the passed deltas\ninto a single changed atoms object. The resulting set of changed atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -146,6 +157,7 @@ void register_CLJDelta_class(){ "mergeNew" , mergeNew_function_value , ( bp::arg("deltas"), bp::arg("count") ) + , bp::release_gil_policy() , "Merge together the new atoms from the n deltas from the passed array\ninto a single new atoms object. The resulting set of new atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -158,6 +170,7 @@ void register_CLJDelta_class(){ "mergeNew" , mergeNew_function_value , ( bp::arg("deltas") ) + , bp::release_gil_policy() , "Merge together the new atoms from deltas\ninto a single new atoms object. The resulting set of new atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -170,6 +183,7 @@ void register_CLJDelta_class(){ "mergeOld" , mergeOld_function_value , ( bp::arg("deltas"), bp::arg("count") ) + , bp::release_gil_policy() , "Merge together the old atoms from the n deltas from the passed array\ninto a single old atoms object. The resulting set of old atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -182,6 +196,7 @@ void register_CLJDelta_class(){ "mergeOld" , mergeOld_function_value , ( bp::arg("deltas") ) + , bp::release_gil_policy() , "Merge together the old atoms from deltas\ninto a single old atoms object. The resulting set of old atoms will\nthus be able to be used to calculate energy changes from a lot of changed\natoms" ); } @@ -193,6 +208,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "newAtoms" , newAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -204,6 +220,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "oldAtoms" , oldAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -230,6 +247,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -241,6 +259,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -252,6 +271,7 @@ void register_CLJDelta_class(){ CLJDelta_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJExtractor.pypp.cpp b/wrapper/MM/CLJExtractor.pypp.cpp index 43d420dce..cad221759 100644 --- a/wrapper/MM/CLJExtractor.pypp.cpp +++ b/wrapper/MM/CLJExtractor.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "SireMol/atomcoords.h" +#include "SireMol/core.h" + #include "SireMol/editor.hpp" #include "SireMol/mover.hpp" @@ -39,6 +41,8 @@ SireMM::CLJExtractor __copy__(const SireMM::CLJExtractor &other){ return SireMM: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJExtractor_class(){ { //::SireMM::CLJExtractor @@ -65,6 +69,7 @@ void register_CLJExtractor_class(){ "add" , add_function_value , ( bp::arg("new_molecule"), bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Add the extra atoms in new_molecule to the molecule" ); } @@ -77,6 +82,7 @@ void register_CLJExtractor_class(){ "add" , add_function_value , ( bp::arg("new_selection"), bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Add the extra atoms in new_selection to the molecule" ); } @@ -88,6 +94,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "changed" , changed_function_value + , bp::release_gil_policy() , "Return whether or not this molecule has been changed during the move" ); } @@ -99,6 +106,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "chargeProperty" , chargeProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the charges" ); } @@ -111,6 +119,7 @@ void register_CLJExtractor_class(){ "commit" , commit_function_value , ( bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Commit the changes" ); } @@ -122,6 +131,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "coordinatesProperty" , coordinatesProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the coordinates" ); } @@ -133,6 +143,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "extractingByCutGroup" , extractingByCutGroup_function_value + , bp::release_gil_policy() , "Return whether or not atoms are extracted by cutgroup" ); } @@ -144,6 +155,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "extractingByMolecule" , extractingByMolecule_function_value + , bp::release_gil_policy() , "Return whether or not atoms are extracted by molecule" ); } @@ -155,6 +167,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "extractingByResidue" , extractingByResidue_function_value + , bp::release_gil_policy() , "Return whether or not atoms are extracted by residue" ); } @@ -166,6 +179,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "hasChangedAtoms" , hasChangedAtoms_function_value + , bp::release_gil_policy() , "Return whether or not there are any changes to the coordinates, charges\nor LJ properties of the atoms" ); } @@ -177,6 +191,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "idSource" , idSource_function_value + , bp::release_gil_policy() , "Return the source of the ID property for each CLJAtom" ); } @@ -188,6 +203,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this extractor is empty (contains no atoms)" ); } @@ -199,6 +215,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this extractor is null (contains no molecule information)" ); } @@ -210,6 +227,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "ljProperty" , ljProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the LJ parameters" ); } @@ -221,6 +239,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "needsCommitting" , needsCommitting_function_value + , bp::release_gil_policy() , "Return whether or not this extractor needs to be committed (i.e. whether\nor not the molecule has changed in any way)" ); } @@ -232,6 +251,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "newMolecule" , newMolecule_function_value + , bp::release_gil_policy() , "Return the molecule as it exists after the changes have been made" ); } @@ -243,6 +263,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "oldMolecule" , oldMolecule_function_value + , bp::release_gil_policy() , "Return the molecule as it exists before any changes were made" ); } @@ -269,6 +290,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "propertyMap" , propertyMap_function_value + , bp::release_gil_policy() , "Return the property map used to get the names of the coordinates,\ncharge and LJ properties from the molecule" ); } @@ -281,6 +303,7 @@ void register_CLJExtractor_class(){ "remove" , remove_function_value , ( bp::arg("new_selection"), bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Remove the atoms in new_selection from the molecule" ); } @@ -293,6 +316,7 @@ void register_CLJExtractor_class(){ "remove" , remove_function_value , ( bp::arg("new_molecule"), bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Remove the atoms in new_molecule from the molecule" ); } @@ -305,6 +329,7 @@ void register_CLJExtractor_class(){ "removeAll" , removeAll_function_value , ( bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Remove all of the atoms in this view from the molecule" ); } @@ -317,6 +342,7 @@ void register_CLJExtractor_class(){ "revert" , revert_function_value , ( bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Revert the changes" ); } @@ -328,6 +354,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -339,6 +366,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -351,6 +379,7 @@ void register_CLJExtractor_class(){ "update" , update_function_value , ( bp::arg("new_molecule"), bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "Update the molecule, calculating the change in CLJAtoms as a CLJDelta that is\nadded to the passed CLJWorkspace. Any atoms that have changed are removed\nfrom the passed CLJBoxes" ); } @@ -363,6 +392,7 @@ void register_CLJExtractor_class(){ "updateSelection" , updateSelection_function_value , ( bp::arg("selection"), bp::arg("boxes"), bp::arg("workspace") ) + , bp::release_gil_policy() , "This function is used to update the molecule to use only the passed\nselection as the selected atoms" ); } @@ -374,6 +404,7 @@ void register_CLJExtractor_class(){ CLJExtractor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJFunction.pypp.cpp b/wrapper/MM/CLJFunction.pypp.cpp index 4b9ee102c..234c05190 100644 --- a/wrapper/MM/CLJFunction.pypp.cpp +++ b/wrapper/MM/CLJFunction.pypp.cpp @@ -56,6 +56,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJFunction_class(){ { //::SireMM::CLJFunction @@ -76,6 +78,7 @@ void register_CLJFunction_class(){ "calculate" , calculate_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the total energy between atoms, returning the coulomb part as the first\nelement of the tuple and the LJ part as the second" ); } @@ -100,6 +103,7 @@ void register_CLJFunction_class(){ "calculate" , calculate_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the total energy between atoms, returning the coulomb part as the first\nelement of the tuple and the LJ part as the second" ); } @@ -112,6 +116,7 @@ void register_CLJFunction_class(){ "calculate" , calculate_function_value , ( bp::arg("atoms0"), bp::arg("atoms1") ) + , bp::release_gil_policy() , "Return the total energy between atoms0 and atoms1, returning the coulomb part as the first\nelement of the tuple and the LJ part as the second" ); } @@ -124,6 +129,7 @@ void register_CLJFunction_class(){ "calculate" , calculate_function_value , ( bp::arg("atoms0"), bp::arg("atoms1") ) + , bp::release_gil_policy() , "Return the total energy between atoms0 and atoms1, returning the coulomb part as the first\nelement of the tuple and the LJ part as the second" ); } @@ -136,6 +142,7 @@ void register_CLJFunction_class(){ "calculate" , calculate_function_value , ( bp::arg("atoms"), bp::arg("gridinfo") ) + , bp::release_gil_policy() , "Return the potential on the described grid of the passed atoms using\nthis function. This returns an empty grid if this function doesnt support\ngrid calculations" ); } @@ -147,6 +154,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "combiningRules" , combiningRules_function_value + , bp::release_gil_policy() , "Return the combining rules used by the function" ); } @@ -159,6 +167,7 @@ void register_CLJFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property with name name" ); } @@ -171,6 +180,7 @@ void register_CLJFunction_class(){ "coulomb" , coulomb_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the coulomb energy between the atoms in atoms" ); } @@ -195,6 +205,7 @@ void register_CLJFunction_class(){ "coulomb" , coulomb_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the coulomb energy between the atoms in atoms" ); } @@ -207,6 +218,7 @@ void register_CLJFunction_class(){ "coulomb" , coulomb_function_value , ( bp::arg("atoms0"), bp::arg("atoms1") ) + , bp::release_gil_policy() , "Return the coulomb energy between the atoms in atoms0 and in atoms1" ); } @@ -218,6 +230,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "coulombCutoff" , coulombCutoff_function_value + , bp::release_gil_policy() , "Return the coulomb cutoff if this function uses one" ); } @@ -229,6 +242,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "hasCutoff" , hasCutoff_function_value + , bp::release_gil_policy() , "Return whether or not this function uses a cutoff" ); } @@ -240,6 +254,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "isPeriodic" , isPeriodic_function_value + , bp::release_gil_policy() , "Return whether or not the space of the function is periodic" ); } @@ -251,6 +266,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "isSoftened" , isSoftened_function_value + , bp::release_gil_policy() , "Return whether or not this function uses a softened (soft-core) potential" ); } @@ -263,6 +279,7 @@ void register_CLJFunction_class(){ "lj" , lj_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the LJ energy between the atoms in atoms" ); } @@ -287,6 +304,7 @@ void register_CLJFunction_class(){ "lj" , lj_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the LJ energy between the atoms in atoms" ); } @@ -299,6 +317,7 @@ void register_CLJFunction_class(){ "lj" , lj_function_value , ( bp::arg("atoms0"), bp::arg("atoms1") ) + , bp::release_gil_policy() , "Return the LJ energy between the atoms in atoms0 and in atoms1" ); } @@ -310,6 +329,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "ljCutoff" , ljCutoff_function_value + , bp::release_gil_policy() , "Return the LJ cutoff if this function uses one" ); } @@ -322,6 +342,7 @@ void register_CLJFunction_class(){ "multiCalculate" , multiCalculate_function_value , ( bp::arg("funcs"), bp::arg("atoms") ) + , bp::release_gil_policy() , "" ); } @@ -346,6 +367,7 @@ void register_CLJFunction_class(){ "multiCalculate" , multiCalculate_function_value , ( bp::arg("funcs"), bp::arg("atoms") ) + , bp::release_gil_policy() , "" ); } @@ -358,6 +380,7 @@ void register_CLJFunction_class(){ "multiCalculate" , multiCalculate_function_value , ( bp::arg("funcs"), bp::arg("atoms0"), bp::arg("atoms1") ) + , bp::release_gil_policy() , "" ); } @@ -370,6 +393,7 @@ void register_CLJFunction_class(){ "multiCalculate" , multiCalculate_function_value , ( bp::arg("funcs"), bp::arg("atoms0"), bp::arg("atoms1") ) + , bp::release_gil_policy() , "" ); } @@ -453,6 +477,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return all of the configurable properties of this function" ); } @@ -465,6 +490,7 @@ void register_CLJFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -477,6 +503,7 @@ void register_CLJFunction_class(){ "setArithmeticCombiningRules" , setArithmeticCombiningRules_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Tell the function to use arithmetic combining rules for LJ parameters" ); } @@ -489,6 +516,7 @@ void register_CLJFunction_class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("rules") ) + , bp::release_gil_policy() , "Set the combining rules used by the function" ); } @@ -501,6 +529,7 @@ void register_CLJFunction_class(){ "setCoulombCutoff" , setCoulombCutoff_function_value , ( bp::arg("distance") ) + , bp::release_gil_policy() , "Set the coulomb cutoff if this function has a cutoff" ); } @@ -513,6 +542,7 @@ void register_CLJFunction_class(){ "setCutoff" , setCutoff_function_value , ( bp::arg("distance") ) + , bp::release_gil_policy() , "Set the coulomb and LJ cutoff to distance, if this function\nhas a cutoff" ); } @@ -525,6 +555,7 @@ void register_CLJFunction_class(){ "setCutoff" , setCutoff_function_value , ( bp::arg("coulomb_cutoff"), bp::arg("lj_cutoff") ) + , bp::release_gil_policy() , "Set the coulomb and LJ cutoff to the specified values, if this function\nhas a cutoff" ); } @@ -537,6 +568,7 @@ void register_CLJFunction_class(){ "setGeometricCombiningRules" , setGeometricCombiningRules_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Tell the function to use geometric combining rules for LJ parameters" ); } @@ -549,6 +581,7 @@ void register_CLJFunction_class(){ "setLJCutoff" , setLJCutoff_function_value , ( bp::arg("distance") ) + , bp::release_gil_policy() , "Set the LJ cutoff if this function has a cutoff" ); } @@ -561,6 +594,7 @@ void register_CLJFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Return a copy of this function where the property name has been set to\nthe value value\nThrow: SireBase::missing_property\n" ); } @@ -573,6 +607,7 @@ void register_CLJFunction_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used by the function" ); } @@ -584,7 +619,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the space represented by the function" ); } @@ -596,6 +631,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "supportsGridCalculation" , supportsGridCalculation_function_value + , bp::release_gil_policy() , "Return whether or not this function supports calculating potentials on grids" ); } @@ -608,6 +644,7 @@ void register_CLJFunction_class(){ "total" , total_function_value , ( bp::arg("atoms"), bp::arg("cnrg"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Return the total energy between atoms, returning the coulomb part in cnrg\nand the LJ part in ljnrg" ); } @@ -632,6 +669,7 @@ void register_CLJFunction_class(){ "total" , total_function_value , ( bp::arg("atoms"), bp::arg("cnrg"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Return the total energy between atoms, returning the coulomb part in cnrg\nand the LJ part in ljnrg" ); } @@ -644,6 +682,7 @@ void register_CLJFunction_class(){ "total" , total_function_value , ( bp::arg("atoms0"), bp::arg("atoms1"), bp::arg("cnrg"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Return the total energy between atoms0 and atoms1, returning the coulomb part in cnrg\nand the LJ part in ljnrg" ); } @@ -655,6 +694,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -666,6 +706,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "usingArithmeticCombiningRules" , usingArithmeticCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not arithmetic combining rules are used" ); } @@ -677,6 +718,7 @@ void register_CLJFunction_class(){ CLJFunction_exposer.def( "usingGeometricCombiningRules" , usingGeometricCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not geometric combining rules are used" ); } diff --git a/wrapper/MM/CLJGrid.pypp.cpp b/wrapper/MM/CLJGrid.pypp.cpp index 4c502118e..fe5ccfad8 100644 --- a/wrapper/MM/CLJGrid.pypp.cpp +++ b/wrapper/MM/CLJGrid.pypp.cpp @@ -38,6 +38,8 @@ SireMM::CLJGrid __copy__(const SireMM::CLJGrid &other){ return SireMM::CLJGrid(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJGrid_class(){ { //::SireMM::CLJGrid @@ -61,6 +63,7 @@ void register_CLJGrid_class(){ "addFixedAtoms" , addFixedAtoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Add the passed atoms onto the set of fixed atoms" ); } @@ -73,6 +76,7 @@ void register_CLJGrid_class(){ "calculate" , calculate_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the coulomb and LJ energies of the passed atoms with the fixed\natoms added to this grid" ); } @@ -85,6 +89,7 @@ void register_CLJGrid_class(){ "calculate" , calculate_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the coulomb and LJ energies of the passed atoms with the fixed\natoms added to this grid" ); } @@ -96,7 +101,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "cljFunction" , cljFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the function used to calculate the coulomb and LJ energy" ); } @@ -109,6 +114,7 @@ void register_CLJGrid_class(){ "coulomb" , coulomb_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the coulomb energy of the passed atoms interacting with\nthe fixed atoms on this grid" ); } @@ -121,6 +127,7 @@ void register_CLJGrid_class(){ "coulomb" , coulomb_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the coulomb energy of the passed atoms interacting with\nthe fixed atoms on this grid" ); } @@ -132,6 +139,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "disableGrid" , disableGrid_function_value + , bp::release_gil_policy() , "Disable use of the grid" ); } @@ -143,6 +151,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "disableParallelCalculation" , disableParallelCalculation_function_value + , bp::release_gil_policy() , "Disable use of the parallel algorithm for calculating energies" ); } @@ -154,6 +163,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "disableReproducibleCalculation" , disableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn off an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will not be identical)" ); } @@ -165,6 +175,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "enableGrid" , enableGrid_function_value + , bp::release_gil_policy() , "Enable used of the grid - note that the grid may\nstill be disabled if the CLJFunction is not compatible with\nuse of a grid" ); } @@ -176,6 +187,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "enableParallelCalculation" , enableParallelCalculation_function_value + , bp::release_gil_policy() , "Enable use of a parallel multicore algorithm to calculate energies" ); } @@ -187,6 +199,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "enableReproducibleCalculation" , enableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn on an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will be identical)" ); } @@ -198,6 +211,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "fixedAtoms" , fixedAtoms_function_value + , bp::release_gil_policy() , "Return all of the fixed atoms" ); } @@ -209,6 +223,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "functionSupportsGrid" , functionSupportsGrid_function_value + , bp::release_gil_policy() , "Return whether or not the CLJFunction supports use of the grid.\nTo support a grid, the function must intrinsically support the grid,\nand the coulomb cutoff must be much greater than the LJ cutoff" ); } @@ -220,6 +235,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "grid" , grid_function_value + , bp::release_gil_policy() , "Return the grid" ); } @@ -231,6 +247,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "gridBuffer" , gridBuffer_function_value + , bp::release_gil_policy() , "Return the grid buffer" ); } @@ -242,6 +259,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "gridDimensions" , gridDimensions_function_value + , bp::release_gil_policy() , "Return the dimensions of the grid" ); } @@ -253,6 +271,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "gridSpacing" , gridSpacing_function_value + , bp::release_gil_policy() , "Return the grid spacing" ); } @@ -264,6 +283,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "idOfFixedAtom" , idOfFixedAtom_function_value + , bp::release_gil_policy() , "Return the ID number of a fixed atom. All fixed atoms are given this ID, so that\nyou can mask out interactions with them. This is a negative number and unlikely\nto be used by any other part of the code" ); } @@ -275,6 +295,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -287,6 +308,7 @@ void register_CLJGrid_class(){ "lj" , lj_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the LJ energy of the passed atoms interacting with\nthe fixed atoms on this grid" ); } @@ -299,6 +321,7 @@ void register_CLJGrid_class(){ "lj" , lj_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Return the LJ energy of the passed atoms interacting with\nthe fixed atoms on this grid" ); } @@ -310,6 +333,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "nFixedAtoms" , nFixedAtoms_function_value + , bp::release_gil_policy() , "Return the number of fixed atoms" ); } @@ -337,6 +361,7 @@ void register_CLJGrid_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("function") ) + , bp::release_gil_policy() , "Set the function used to calculate the coulomb and LJ energy" ); } @@ -349,6 +374,7 @@ void register_CLJGrid_class(){ "setFixedAtoms" , setFixedAtoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Set the fixed atoms equal to the passed atoms" ); } @@ -361,6 +387,7 @@ void register_CLJGrid_class(){ "setFixedAtoms" , setFixedAtoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Set the fixed atoms equal to the passed atoms" ); } @@ -373,6 +400,7 @@ void register_CLJGrid_class(){ "setGrid" , setGrid_function_value , ( bp::arg("grid") ) + , bp::release_gil_policy() , "Set the grid to be used for the optimised calculation" ); } @@ -385,6 +413,7 @@ void register_CLJGrid_class(){ "setGridBuffer" , setGridBuffer_function_value , ( bp::arg("grid_buffer") ) + , bp::release_gil_policy() , "Set the grid buffer" ); } @@ -397,6 +426,7 @@ void register_CLJGrid_class(){ "setGridDimensions" , setGridDimensions_function_value , ( bp::arg("grid_dimensions") ) + , bp::release_gil_policy() , "Set the dimensions of the grid" ); } @@ -409,6 +439,7 @@ void register_CLJGrid_class(){ "setGridDimensions" , setGridDimensions_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Set the dimensions of the grid so that it encompasses all of the atoms in atoms\n(plus a gridBuffer() buffer around all atoms)" ); } @@ -421,6 +452,7 @@ void register_CLJGrid_class(){ "setGridDimensions" , setGridDimensions_function_value , ( bp::arg("atoms"), bp::arg("grid_spacing") ) + , bp::release_gil_policy() , "Set the dimensions of the grid so that it encompasses all of the atoms in atoms\n(plus a gridBuffer() buffer around all atoms) using a grid with spacing grid_spacing" ); } @@ -433,6 +465,7 @@ void register_CLJGrid_class(){ "setGridDimensions" , setGridDimensions_function_value , ( bp::arg("atoms"), bp::arg("grid_spacing"), bp::arg("buffer") ) + , bp::release_gil_policy() , "Set the dimensions of the grid so that it encompasses all of the atoms in atoms\n(with a buffer of buffer around all atoms) using a grid with spacing grid_spacing" ); } @@ -445,6 +478,7 @@ void register_CLJGrid_class(){ "setGridSpacing" , setGridSpacing_function_value , ( bp::arg("grid_spacing") ) + , bp::release_gil_policy() , "Set the grid spacing" ); } @@ -457,6 +491,7 @@ void register_CLJGrid_class(){ "setUseGrid" , setUseGrid_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off the use of a grid - note that the grid may\nstill be disabled if the CLJFunction is not compatible with\nuse of a grid" ); } @@ -469,6 +504,7 @@ void register_CLJGrid_class(){ "setUseParallelCalculation" , setUseParallelCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off use of a parallel multicore algorithm for calculating\nenergies" ); } @@ -481,6 +517,7 @@ void register_CLJGrid_class(){ "setUseReproducibleCalculation" , setUseReproducibleCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off use of an energy summing algorithm that guarantees the\nsame energy regardless of whether a single core or multicore calculation\nis being performed" ); } @@ -492,6 +529,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -504,6 +542,7 @@ void register_CLJGrid_class(){ "total" , total_function_value , ( bp::arg("atoms"), bp::arg("cnrg"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Calculate the total energy of interaction between the passed atoms and\nall of the atoms added to the grid" ); } @@ -516,6 +555,7 @@ void register_CLJGrid_class(){ "total" , total_function_value , ( bp::arg("atoms"), bp::arg("cnrg"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Calculate the total energy of interaction between the passed atoms and\nall of the atoms added to the grid" ); } @@ -527,6 +567,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -538,6 +579,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "usesGrid" , usesGrid_function_value + , bp::release_gil_policy() , "Return whether or not the grid will be used in the calculation" ); } @@ -549,6 +591,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "usesParallelCalculation" , usesParallelCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a parallel algorithm is being used\nto calculate grid energies" ); } @@ -560,6 +603,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "usesReproducibleCalculation" , usesReproducibleCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a reproducible energy summing algorithm is being\nused to accumulate the energies" ); } @@ -571,6 +615,7 @@ void register_CLJGrid_class(){ CLJGrid_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJGroup.pypp.cpp b/wrapper/MM/CLJGroup.pypp.cpp index 09983cdc4..ca4eba28c 100644 --- a/wrapper/MM/CLJGroup.pypp.cpp +++ b/wrapper/MM/CLJGroup.pypp.cpp @@ -25,6 +25,8 @@ SireMM::CLJGroup __copy__(const SireMM::CLJGroup &other){ return SireMM::CLJGrou #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJGroup_class(){ { //::SireMM::CLJGroup @@ -43,6 +45,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Accept all of the changes in the group. This will ensure that\nall deltas have been removed and all of the atoms are correctly\nadded to the CLJBoxes boxes" ); } @@ -90,6 +93,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "boxLength" , boxLength_function_value + , bp::release_gil_policy() , "Return the size of the box used by CLJBoxes to partition space" ); } @@ -101,6 +105,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "changedAtoms" , changedAtoms_function_value + , bp::release_gil_policy() , "Return the set of all atoms that have changed since the last\ntime accept() was called. This will return an empty set if\nthe workspace was told to mustRecalculateFromScratch()" ); } @@ -112,6 +117,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "changedMolecules" , changedMolecules_function_value + , bp::release_gil_policy() , "Return all of the molecules that have changed since the last time\nthis CLJGroup was accepted" ); } @@ -135,6 +141,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -146,6 +153,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "isSingleIDChange" , isSingleIDChange_function_value + , bp::release_gil_policy() , "Return whether or not the changes since the last time accept()\nwas called all change parts of a molecule that all have the same\nID. If they do, then we only need to use changedAtoms() in the\ndelta energy calculation as the changed atoms dont interact with\neach other. Otherwise, we need mergeChanges() to get the changedAtoms\ntogether with oldAtoms and newAtoms, so that we can calculate the\nchange in energy within changedAtoms() itself as well" ); } @@ -158,6 +166,7 @@ void register_CLJGroup_class(){ "mapForMolecule" , mapForMolecule_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the property map used for the molecule with number molnum" ); } @@ -169,6 +178,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "mergeChanges" , mergeChanges_function_value + , bp::release_gil_policy() , "Return a tuple of (changedAtoms(),oldAtoms(),newAtoms()). This is\nneeded if more than a single ID group has changed and thus we\nneed to calculate the change in interaction within changedAtoms" ); } @@ -180,6 +190,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the current version of all of the molecules in this group" ); } @@ -191,6 +202,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "mustReallyRecalculateFromScratch" , mustReallyRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell the group that calculations will be made completely from scratch,\nand to also re-extract all of the molecules" ); } @@ -202,6 +214,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "mustRecalculateFromScratch" , mustRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell the group that calculations will be made completely from scratch,\nso there is no need to maintain a delta" ); } @@ -213,6 +226,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "nChangedMolecules" , nChangedMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules that have changed since the\nlast time this CLJGroup was accepted" ); } @@ -224,6 +238,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this group needs to be accepted" ); } @@ -235,6 +250,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "newAtoms" , newAtoms_function_value + , bp::release_gil_policy() , "Return the set of all of the new atoms that have changed\nsince the last time accept() was called. This, plus the\nnegative of oldAtoms() will equal changedAtoms()" ); } @@ -246,6 +262,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "oldAtoms" , oldAtoms_function_value + , bp::release_gil_policy() , "Return the set of all of the old atoms that have changed\nsince the last time accept() was called. The negative\nof this plus newAtoms() will equal changedAtoms()" ); } @@ -272,6 +289,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "recalculatingFromScratch" , recalculatingFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -284,6 +302,7 @@ void register_CLJGroup_class(){ "remove" , remove_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Remove the molecule view molview" ); } @@ -296,6 +315,7 @@ void register_CLJGroup_class(){ "remove" , remove_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all of the molecules in molecules from this group" ); } @@ -308,6 +328,7 @@ void register_CLJGroup_class(){ "remove" , remove_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all of the molecules in molecules from this group" ); } @@ -320,6 +341,7 @@ void register_CLJGroup_class(){ "remove" , remove_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Remove the molecule with number molnum from this group" ); } @@ -331,6 +353,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "Remove all molecules from this group" ); } @@ -343,6 +366,7 @@ void register_CLJGroup_class(){ "setBoxLength" , setBoxLength_function_value , ( bp::arg("box_length") ) + , bp::release_gil_policy() , "Set the size of the box used by CLJBoxes to partition space" ); } @@ -354,6 +378,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -365,6 +390,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -377,6 +403,7 @@ void register_CLJGroup_class(){ "update" , update_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Update the molecule in this group to match the version of the molecule molview" ); } @@ -389,6 +416,7 @@ void register_CLJGroup_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update all of the molecules in this group that are in molecules to match\nthe version held in molecules" ); } @@ -401,6 +429,7 @@ void register_CLJGroup_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update all of the molecules in this group that are in molecules to match\nthe version held in molecules" ); } @@ -412,6 +441,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "updatedConnectedGroup" , updatedConnectedGroup_function_value + , bp::release_gil_policy() , "Tell this CLJGroup that atoms in a connected group have been\nupdated. This tells the CLJGroup to remove some of the caching\nthat is used to improve performance, as this caching could cause\nenergy errors when using deltas generated from other CLJGroups" ); } @@ -423,6 +453,7 @@ void register_CLJGroup_class(){ CLJGroup_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJIntraFunction.pypp.cpp b/wrapper/MM/CLJIntraFunction.pypp.cpp index 96744fa26..c0a767e22 100644 --- a/wrapper/MM/CLJIntraFunction.pypp.cpp +++ b/wrapper/MM/CLJIntraFunction.pypp.cpp @@ -53,6 +53,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJIntraFunction_class(){ { //::SireMM::CLJIntraFunction @@ -80,6 +82,7 @@ void register_CLJIntraFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -91,6 +94,7 @@ void register_CLJIntraFunction_class(){ CLJIntraFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties that can be set in this function" ); } @@ -103,6 +107,7 @@ void register_CLJIntraFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -115,6 +120,7 @@ void register_CLJIntraFunction_class(){ "setConnectivity" , setConnectivity_function_value , ( bp::arg("connectivity") ) + , bp::release_gil_policy() , "Set the connectivity used to find the non-bonded pairs" ); } @@ -139,6 +145,7 @@ void register_CLJIntraFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the property with name name to value value" ); } @@ -150,6 +157,7 @@ void register_CLJIntraFunction_class(){ CLJIntraFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJIntraRFFunction.pypp.cpp b/wrapper/MM/CLJIntraRFFunction.pypp.cpp index 5a0b4ef5b..5728131e9 100644 --- a/wrapper/MM/CLJIntraRFFunction.pypp.cpp +++ b/wrapper/MM/CLJIntraRFFunction.pypp.cpp @@ -39,6 +39,8 @@ SireMM::CLJIntraRFFunction __copy__(const SireMM::CLJIntraRFFunction &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJIntraRFFunction_class(){ { //::SireMM::CLJIntraRFFunction @@ -64,6 +66,7 @@ void register_CLJIntraRFFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -75,6 +78,7 @@ void register_CLJIntraRFFunction_class(){ CLJIntraRFFunction_exposer.def( "defaultRFFunction" , defaultRFFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +90,7 @@ void register_CLJIntraRFFunction_class(){ CLJIntraRFFunction_exposer.def( "dielectric" , dielectric_function_value + , bp::release_gil_policy() , "Return the value of the dielectric constant" ); } @@ -112,6 +117,7 @@ void register_CLJIntraRFFunction_class(){ CLJIntraRFFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties of this function" ); } @@ -124,6 +130,7 @@ void register_CLJIntraRFFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -136,6 +143,7 @@ void register_CLJIntraRFFunction_class(){ "setDielectric" , setDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "Set the dielectric constant to dielectric" ); } @@ -148,6 +156,7 @@ void register_CLJIntraRFFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Return a copy of this function where the property name has been set to the\nvalue value" ); } @@ -159,6 +168,7 @@ void register_CLJIntraRFFunction_class(){ CLJIntraRFFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_CLJIntraRFFunction_class(){ CLJIntraRFFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJIntraShiftFunction.pypp.cpp b/wrapper/MM/CLJIntraShiftFunction.pypp.cpp index 5a52ecd61..d6a782cd6 100644 --- a/wrapper/MM/CLJIntraShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJIntraShiftFunction.pypp.cpp @@ -37,6 +37,8 @@ SireMM::CLJIntraShiftFunction __copy__(const SireMM::CLJIntraShiftFunction &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJIntraShiftFunction_class(){ { //::SireMM::CLJIntraShiftFunction @@ -61,6 +63,7 @@ void register_CLJIntraShiftFunction_class(){ CLJIntraShiftFunction_exposer.def( "defaultShiftFunction" , defaultShiftFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_CLJIntraShiftFunction_class(){ CLJIntraShiftFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +102,7 @@ void register_CLJIntraShiftFunction_class(){ CLJIntraShiftFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJNBPairs.pypp.cpp b/wrapper/MM/CLJNBPairs.pypp.cpp index 914b76970..b756e2457 100644 --- a/wrapper/MM/CLJNBPairs.pypp.cpp +++ b/wrapper/MM/CLJNBPairs.pypp.cpp @@ -23,6 +23,8 @@ SireMM::CLJNBPairs __copy__(const SireMM::CLJNBPairs &other){ return SireMM::CLJ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJNBPairs_class(){ { //::SireMM::CLJNBPairs @@ -42,6 +44,7 @@ void register_CLJNBPairs_class(){ CLJNBPairs_exposer.def( "excludedAtoms" , excludedAtoms_function_value + , bp::release_gil_policy() , "Return the IDs of atoms that dont interact with any other atom in\nthe intramolecular non-bonded calculation (their scale factors to all\nother atoms is zero)" ); } @@ -54,6 +57,7 @@ void register_CLJNBPairs_class(){ "excludedAtoms" , excludedAtoms_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the excluded atoms for the atom matching ID atomid. This\nreturns all of the atoms for which the interaction with atomid is\nequal to zero" ); } @@ -65,6 +69,7 @@ void register_CLJNBPairs_class(){ CLJNBPairs_exposer.def( "nExcludedAtoms" , nExcludedAtoms_function_value + , bp::release_gil_policy() , "Return the total number of atoms that are excluded from the internal\nnon-bonded calculation. These are atoms that do not interact with any\nother atoms (e.g. because their nbscl factors to all other atoms in\nthe molecule are zero)" ); } @@ -77,6 +82,7 @@ void register_CLJNBPairs_class(){ "nExcludedAtoms" , nExcludedAtoms_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the number of excluded atoms for the atom matching ID atomid.\nThis returns the number of atoms that do not interact with this atom\nusing a non-bonded potential" ); } @@ -103,6 +109,7 @@ void register_CLJNBPairs_class(){ CLJNBPairs_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -114,6 +121,7 @@ void register_CLJNBPairs_class(){ CLJNBPairs_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJParameterNames.pypp.cpp b/wrapper/MM/CLJParameterNames.pypp.cpp index 314c38da9..0f89ea232 100644 --- a/wrapper/MM/CLJParameterNames.pypp.cpp +++ b/wrapper/MM/CLJParameterNames.pypp.cpp @@ -45,6 +45,8 @@ SireMM::CLJParameterNames __copy__(const SireMM::CLJParameterNames &other){ retu const char* pvt_get_name(const SireMM::CLJParameterNames&){ return "SireMM::CLJParameterNames";} +#include "Helpers/release_gil_policy.hpp" + void register_CLJParameterNames_class(){ { //::SireMM::CLJParameterNames diff --git a/wrapper/MM/CLJParameterNames3D.pypp.cpp b/wrapper/MM/CLJParameterNames3D.pypp.cpp index 520a48e59..0f3b4c89d 100644 --- a/wrapper/MM/CLJParameterNames3D.pypp.cpp +++ b/wrapper/MM/CLJParameterNames3D.pypp.cpp @@ -45,6 +45,8 @@ SireMM::CLJParameterNames3D __copy__(const SireMM::CLJParameterNames3D &other){ const char* pvt_get_name(const SireMM::CLJParameterNames3D&){ return "SireMM::CLJParameterNames3D";} +#include "Helpers/release_gil_policy.hpp" + void register_CLJParameterNames3D_class(){ { //::SireMM::CLJParameterNames3D diff --git a/wrapper/MM/CLJPotentialInterface_InterCLJPotential_.pypp.cpp b/wrapper/MM/CLJPotentialInterface_InterCLJPotential_.pypp.cpp index 93a91e9b2..65a0c5bc2 100644 --- a/wrapper/MM/CLJPotentialInterface_InterCLJPotential_.pypp.cpp +++ b/wrapper/MM/CLJPotentialInterface_InterCLJPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::CLJPotentialInterface&){ return "SireMM::CLJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_CLJPotentialInterface_InterCLJPotential__class(){ { //::SireMM::CLJPotentialInterface< SireMM::InterCLJPotential > @@ -49,6 +51,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +64,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -87,7 +91,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -100,6 +104,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "reactionFieldDielectric" , reactionFieldDielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +118,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("combiningrules") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +132,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +146,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setReactionFieldDielectric" , setReactionFieldDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +160,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("switchelectro") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +174,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -178,6 +188,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -191,6 +202,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setUseAtomisticCutoff" , setUseAtomisticCutoff_function_value , ( bp::arg("switchatomistic") ) + , bp::release_gil_policy() , "" ); } @@ -204,6 +216,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setUseGroupCutoff" , setUseGroupCutoff_function_value , ( bp::arg("switchgroup") ) + , bp::release_gil_policy() , "" ); } @@ -217,6 +230,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ "setUseReactionField" , setUseReactionField_function_value , ( bp::arg("switchrf") ) + , bp::release_gil_policy() , "" ); } @@ -229,6 +243,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "shiftElectrostatics" , shiftElectrostatics_function_value + , bp::release_gil_policy() , "" ); } @@ -241,7 +256,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -254,7 +269,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -267,6 +282,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "useAtomisticCutoff" , useAtomisticCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -279,6 +295,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "useGroupCutoff" , useGroupCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -291,6 +308,7 @@ void register_CLJPotentialInterface_InterCLJPotential__class(){ CLJPotentialInterface_InterCLJPotential__exposer.def( "useReactionField" , useReactionField_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp b/wrapper/MM/CLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp index d702162fb..3c7591446 100644 --- a/wrapper/MM/CLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp +++ b/wrapper/MM/CLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::CLJPotentialInterface&){ return "SireMM::CLJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ { //::SireMM::CLJPotentialInterface< SireMM::InterSoftCLJPotential > @@ -49,6 +51,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +64,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -87,7 +91,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -100,6 +104,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "reactionFieldDielectric" , reactionFieldDielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +118,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("combiningrules") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +132,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +146,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setReactionFieldDielectric" , setReactionFieldDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +160,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("switchelectro") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +174,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -178,6 +188,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -191,6 +202,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setUseAtomisticCutoff" , setUseAtomisticCutoff_function_value , ( bp::arg("switchatomistic") ) + , bp::release_gil_policy() , "" ); } @@ -204,6 +216,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setUseGroupCutoff" , setUseGroupCutoff_function_value , ( bp::arg("switchgroup") ) + , bp::release_gil_policy() , "" ); } @@ -217,6 +230,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ "setUseReactionField" , setUseReactionField_function_value , ( bp::arg("switchrf") ) + , bp::release_gil_policy() , "" ); } @@ -229,6 +243,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "shiftElectrostatics" , shiftElectrostatics_function_value + , bp::release_gil_policy() , "" ); } @@ -241,7 +256,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -254,7 +269,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -267,6 +282,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "useAtomisticCutoff" , useAtomisticCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -279,6 +295,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "useGroupCutoff" , useGroupCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -291,6 +308,7 @@ void register_CLJPotentialInterface_InterSoftCLJPotential__class(){ CLJPotentialInterface_InterSoftCLJPotential__exposer.def( "useReactionField" , useReactionField_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJPotentialInterface_IntraCLJPotential_.pypp.cpp b/wrapper/MM/CLJPotentialInterface_IntraCLJPotential_.pypp.cpp index 3a69e1dd7..e62a8f2a4 100644 --- a/wrapper/MM/CLJPotentialInterface_IntraCLJPotential_.pypp.cpp +++ b/wrapper/MM/CLJPotentialInterface_IntraCLJPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::CLJPotentialInterface&){ return "SireMM::CLJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_CLJPotentialInterface_IntraCLJPotential__class(){ { //::SireMM::CLJPotentialInterface< SireMM::IntraCLJPotential > @@ -49,6 +51,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +64,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -87,7 +91,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -100,6 +104,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "reactionFieldDielectric" , reactionFieldDielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +118,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("combiningrules") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +132,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +146,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setReactionFieldDielectric" , setReactionFieldDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +160,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("switchelectro") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +174,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -178,6 +188,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -191,6 +202,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setUseAtomisticCutoff" , setUseAtomisticCutoff_function_value , ( bp::arg("switchatomistic") ) + , bp::release_gil_policy() , "" ); } @@ -204,6 +216,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setUseGroupCutoff" , setUseGroupCutoff_function_value , ( bp::arg("switchgroup") ) + , bp::release_gil_policy() , "" ); } @@ -217,6 +230,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ "setUseReactionField" , setUseReactionField_function_value , ( bp::arg("switchrf") ) + , bp::release_gil_policy() , "" ); } @@ -229,6 +243,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "shiftElectrostatics" , shiftElectrostatics_function_value + , bp::release_gil_policy() , "" ); } @@ -241,7 +256,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -254,7 +269,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -267,6 +282,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "useAtomisticCutoff" , useAtomisticCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -279,6 +295,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "useGroupCutoff" , useGroupCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -291,6 +308,7 @@ void register_CLJPotentialInterface_IntraCLJPotential__class(){ CLJPotentialInterface_IntraCLJPotential__exposer.def( "useReactionField" , useReactionField_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp b/wrapper/MM/CLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp index b207b14e4..2dfdec346 100644 --- a/wrapper/MM/CLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp +++ b/wrapper/MM/CLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::CLJPotentialInterface&){ return "SireMM::CLJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ { //::SireMM::CLJPotentialInterface< SireMM::IntraSoftCLJPotential > @@ -49,6 +51,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +64,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -87,7 +91,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -100,6 +104,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "reactionFieldDielectric" , reactionFieldDielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +118,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("combiningrules") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +132,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +146,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setReactionFieldDielectric" , setReactionFieldDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +160,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("switchelectro") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +174,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -178,6 +188,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -191,6 +202,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setUseAtomisticCutoff" , setUseAtomisticCutoff_function_value , ( bp::arg("switchatomistic") ) + , bp::release_gil_policy() , "" ); } @@ -204,6 +216,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setUseGroupCutoff" , setUseGroupCutoff_function_value , ( bp::arg("switchgroup") ) + , bp::release_gil_policy() , "" ); } @@ -217,6 +230,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ "setUseReactionField" , setUseReactionField_function_value , ( bp::arg("switchrf") ) + , bp::release_gil_policy() , "" ); } @@ -229,6 +243,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "shiftElectrostatics" , shiftElectrostatics_function_value + , bp::release_gil_policy() , "" ); } @@ -241,7 +256,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -254,7 +269,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -267,6 +282,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "useAtomisticCutoff" , useAtomisticCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -279,6 +295,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "useGroupCutoff" , useGroupCutoff_function_value + , bp::release_gil_policy() , "" ); } @@ -291,6 +308,7 @@ void register_CLJPotentialInterface_IntraSoftCLJPotential__class(){ CLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "useReactionField" , useReactionField_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJProbe.pypp.cpp b/wrapper/MM/CLJProbe.pypp.cpp index 99dac6386..11f50512c 100644 --- a/wrapper/MM/CLJProbe.pypp.cpp +++ b/wrapper/MM/CLJProbe.pypp.cpp @@ -21,6 +21,8 @@ SireMM::CLJProbe __copy__(const SireMM::CLJProbe &other){ return SireMM::CLJProb #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJProbe_class(){ { //::SireMM::CLJProbe @@ -42,6 +44,7 @@ void register_CLJProbe_class(){ CLJProbe_exposer.def( "charge" , charge_function_value + , bp::release_gil_policy() , "" ); } @@ -80,6 +83,7 @@ void register_CLJProbe_class(){ CLJProbe_exposer.def( "reducedCharge" , reducedCharge_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +95,7 @@ void register_CLJProbe_class(){ CLJProbe_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJRFFunction.pypp.cpp b/wrapper/MM/CLJRFFunction.pypp.cpp index da3efcb10..167e57ea5 100644 --- a/wrapper/MM/CLJRFFunction.pypp.cpp +++ b/wrapper/MM/CLJRFFunction.pypp.cpp @@ -39,6 +39,8 @@ SireMM::CLJRFFunction __copy__(const SireMM::CLJRFFunction &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJRFFunction_class(){ { //::SireMM::CLJRFFunction @@ -64,6 +66,7 @@ void register_CLJRFFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -75,6 +78,7 @@ void register_CLJRFFunction_class(){ CLJRFFunction_exposer.def( "defaultRFFunction" , defaultRFFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +90,7 @@ void register_CLJRFFunction_class(){ CLJRFFunction_exposer.def( "dielectric" , dielectric_function_value + , bp::release_gil_policy() , "Return the value of the dielectric constant" ); } @@ -112,6 +117,7 @@ void register_CLJRFFunction_class(){ CLJRFFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties of this function" ); } @@ -124,6 +130,7 @@ void register_CLJRFFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -136,6 +143,7 @@ void register_CLJRFFunction_class(){ "setDielectric" , setDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "Set the dielectric constant to dielectric" ); } @@ -148,6 +156,7 @@ void register_CLJRFFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Return a copy of this function where the property name has been set to the\nvalue value" ); } @@ -159,6 +168,7 @@ void register_CLJRFFunction_class(){ CLJRFFunction_exposer.def( "supportsGridCalculation" , supportsGridCalculation_function_value + , bp::release_gil_policy() , "This function does support calculations using a grid" ); } @@ -170,6 +180,7 @@ void register_CLJRFFunction_class(){ CLJRFFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -181,6 +192,7 @@ void register_CLJRFFunction_class(){ CLJRFFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +204,7 @@ void register_CLJRFFunction_class(){ CLJRFFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJScaleFactor.pypp.cpp b/wrapper/MM/CLJScaleFactor.pypp.cpp index 3299d9f04..eea413a49 100644 --- a/wrapper/MM/CLJScaleFactor.pypp.cpp +++ b/wrapper/MM/CLJScaleFactor.pypp.cpp @@ -23,6 +23,8 @@ SireMM::CLJScaleFactor __copy__(const SireMM::CLJScaleFactor &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJScaleFactor_class(){ { //::SireMM::CLJScaleFactor @@ -54,6 +56,7 @@ void register_CLJScaleFactor_class(){ CLJScaleFactor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_CLJScaleFactor_class(){ CLJScaleFactor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -76,6 +80,7 @@ void register_CLJScaleFactor_class(){ CLJScaleFactor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJShiftFunction.pypp.cpp b/wrapper/MM/CLJShiftFunction.pypp.cpp index e77d73ffa..f679c953b 100644 --- a/wrapper/MM/CLJShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJShiftFunction.pypp.cpp @@ -37,6 +37,8 @@ SireMM::CLJShiftFunction __copy__(const SireMM::CLJShiftFunction &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJShiftFunction_class(){ { //::SireMM::CLJShiftFunction @@ -61,6 +63,7 @@ void register_CLJShiftFunction_class(){ CLJShiftFunction_exposer.def( "defaultShiftFunction" , defaultShiftFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_CLJShiftFunction_class(){ CLJShiftFunction_exposer.def( "supportsGridCalculation" , supportsGridCalculation_function_value + , bp::release_gil_policy() , "This function does support calculations using a grid" ); } @@ -98,6 +102,7 @@ void register_CLJShiftFunction_class(){ CLJShiftFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +114,7 @@ void register_CLJShiftFunction_class(){ CLJShiftFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_CLJShiftFunction_class(){ CLJShiftFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJSoftFunction.pypp.cpp b/wrapper/MM/CLJSoftFunction.pypp.cpp index f11af30f2..4dab19ff0 100644 --- a/wrapper/MM/CLJSoftFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftFunction.pypp.cpp @@ -53,6 +53,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJSoftFunction_class(){ { //::SireMM::CLJSoftFunction @@ -67,6 +69,7 @@ void register_CLJSoftFunction_class(){ CLJSoftFunction_exposer.def( "alpha" , alpha_function_value + , bp::release_gil_policy() , "Return the soft-core alpha value. A value of 0 is a completely hard\npotential, while increasing values of alpha will increasingly soften\nthe potential" ); } @@ -79,6 +82,7 @@ void register_CLJSoftFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -90,6 +94,7 @@ void register_CLJSoftFunction_class(){ CLJSoftFunction_exposer.def( "coulombPower" , coulombPower_function_value + , bp::release_gil_policy() , "Return the soft-core coulomb_power parameter. This is used to soften\nthe electrostatic interactions" ); } @@ -101,6 +106,7 @@ void register_CLJSoftFunction_class(){ CLJSoftFunction_exposer.def( "isSoftened" , isSoftened_function_value + , bp::release_gil_policy() , "Return whether or not this is a softened function" ); } @@ -112,6 +118,7 @@ void register_CLJSoftFunction_class(){ CLJSoftFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties that can be set in this function" ); } @@ -124,6 +131,7 @@ void register_CLJSoftFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -136,6 +144,7 @@ void register_CLJSoftFunction_class(){ "setAlpha" , setAlpha_function_value , ( bp::arg("alpha") ) + , bp::release_gil_policy() , "Set the soft-core alpha parameter" ); } @@ -148,6 +157,7 @@ void register_CLJSoftFunction_class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "Set the soft-core coulomb power parameter" ); } @@ -160,6 +170,7 @@ void register_CLJSoftFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the property with name name to value value" ); } @@ -172,6 +183,7 @@ void register_CLJSoftFunction_class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("shift") ) + , bp::release_gil_policy() , "Set the soft-core shift delta parameter" ); } @@ -183,6 +195,7 @@ void register_CLJSoftFunction_class(){ CLJSoftFunction_exposer.def( "shiftDelta" , shiftDelta_function_value + , bp::release_gil_policy() , "Return the soft-core shift_delta parameter. This is used to soften\nthe LJ interactions" ); } @@ -194,6 +207,7 @@ void register_CLJSoftFunction_class(){ CLJSoftFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJSoftIntraFunction.pypp.cpp b/wrapper/MM/CLJSoftIntraFunction.pypp.cpp index 9d1852345..6499f1ae7 100644 --- a/wrapper/MM/CLJSoftIntraFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftIntraFunction.pypp.cpp @@ -53,6 +53,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJSoftIntraFunction_class(){ { //::SireMM::CLJSoftIntraFunction @@ -67,6 +69,7 @@ void register_CLJSoftIntraFunction_class(){ CLJSoftIntraFunction_exposer.def( "alpha" , alpha_function_value + , bp::release_gil_policy() , "Return the soft-core alpha value. A value of 0 is a completely hard\npotential, while increasing values of alpha will increasingly soften\nthe potential" ); } @@ -79,6 +82,7 @@ void register_CLJSoftIntraFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -90,6 +94,7 @@ void register_CLJSoftIntraFunction_class(){ CLJSoftIntraFunction_exposer.def( "coulombPower" , coulombPower_function_value + , bp::release_gil_policy() , "Return the soft-core coulomb_power parameter. This is used to soften\nthe electrostatic interactions" ); } @@ -101,6 +106,7 @@ void register_CLJSoftIntraFunction_class(){ CLJSoftIntraFunction_exposer.def( "isSoftened" , isSoftened_function_value + , bp::release_gil_policy() , "Return whether or not this is a softened function" ); } @@ -112,6 +118,7 @@ void register_CLJSoftIntraFunction_class(){ CLJSoftIntraFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties that can be set in this function" ); } @@ -124,6 +131,7 @@ void register_CLJSoftIntraFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -136,6 +144,7 @@ void register_CLJSoftIntraFunction_class(){ "setAlpha" , setAlpha_function_value , ( bp::arg("alpha") ) + , bp::release_gil_policy() , "Set the soft-core alpha parameter" ); } @@ -148,6 +157,7 @@ void register_CLJSoftIntraFunction_class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "Set the soft-core coulomb power parameter" ); } @@ -160,6 +170,7 @@ void register_CLJSoftIntraFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the property with name name to value value" ); } @@ -172,6 +183,7 @@ void register_CLJSoftIntraFunction_class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("shift") ) + , bp::release_gil_policy() , "Set the soft-core shift delta parameter" ); } @@ -183,6 +195,7 @@ void register_CLJSoftIntraFunction_class(){ CLJSoftIntraFunction_exposer.def( "shiftDelta" , shiftDelta_function_value + , bp::release_gil_policy() , "Return the soft-core shift_delta parameter. This is used to soften\nthe LJ interactions" ); } @@ -194,6 +207,7 @@ void register_CLJSoftIntraFunction_class(){ CLJSoftIntraFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp b/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp index cf5047f9b..c3a8f2f6e 100644 --- a/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftIntraRFFunction.pypp.cpp @@ -39,6 +39,8 @@ SireMM::CLJSoftIntraRFFunction __copy__(const SireMM::CLJSoftIntraRFFunction &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJSoftIntraRFFunction_class(){ { //::SireMM::CLJSoftIntraRFFunction @@ -64,6 +66,7 @@ void register_CLJSoftIntraRFFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -75,6 +78,7 @@ void register_CLJSoftIntraRFFunction_class(){ CLJSoftIntraRFFunction_exposer.def( "defaultRFFunction" , defaultRFFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +90,7 @@ void register_CLJSoftIntraRFFunction_class(){ CLJSoftIntraRFFunction_exposer.def( "dielectric" , dielectric_function_value + , bp::release_gil_policy() , "Return the value of the dielectric constant" ); } @@ -112,6 +117,7 @@ void register_CLJSoftIntraRFFunction_class(){ CLJSoftIntraRFFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties of this function" ); } @@ -124,6 +130,7 @@ void register_CLJSoftIntraRFFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -136,6 +143,7 @@ void register_CLJSoftIntraRFFunction_class(){ "setDielectric" , setDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "Set the dielectric constant to dielectric" ); } @@ -148,6 +156,7 @@ void register_CLJSoftIntraRFFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Return a copy of this function where the property name has been set to the\nvalue value" ); } @@ -159,6 +168,7 @@ void register_CLJSoftIntraRFFunction_class(){ CLJSoftIntraRFFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_CLJSoftIntraRFFunction_class(){ CLJSoftIntraRFFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp b/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp index 2b12b316f..373e4323a 100644 --- a/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftIntraShiftFunction.pypp.cpp @@ -37,6 +37,8 @@ SireMM::CLJSoftIntraShiftFunction __copy__(const SireMM::CLJSoftIntraShiftFuncti #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJSoftIntraShiftFunction_class(){ { //::SireMM::CLJSoftIntraShiftFunction @@ -61,6 +63,7 @@ void register_CLJSoftIntraShiftFunction_class(){ CLJSoftIntraShiftFunction_exposer.def( "defaultShiftFunction" , defaultShiftFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_CLJSoftIntraShiftFunction_class(){ CLJSoftIntraShiftFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +102,7 @@ void register_CLJSoftIntraShiftFunction_class(){ CLJSoftIntraShiftFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJSoftRFFunction.pypp.cpp b/wrapper/MM/CLJSoftRFFunction.pypp.cpp index dd2d37af8..941ef25a3 100644 --- a/wrapper/MM/CLJSoftRFFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftRFFunction.pypp.cpp @@ -39,6 +39,8 @@ SireMM::CLJSoftRFFunction __copy__(const SireMM::CLJSoftRFFunction &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJSoftRFFunction_class(){ { //::SireMM::CLJSoftRFFunction @@ -64,6 +66,7 @@ void register_CLJSoftRFFunction_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this function contains a property called name" ); } @@ -75,6 +78,7 @@ void register_CLJSoftRFFunction_class(){ CLJSoftRFFunction_exposer.def( "defaultRFFunction" , defaultRFFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +90,7 @@ void register_CLJSoftRFFunction_class(){ CLJSoftRFFunction_exposer.def( "dielectric" , dielectric_function_value + , bp::release_gil_policy() , "Return the value of the dielectric constant" ); } @@ -112,6 +117,7 @@ void register_CLJSoftRFFunction_class(){ CLJSoftRFFunction_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the properties of this function" ); } @@ -124,6 +130,7 @@ void register_CLJSoftRFFunction_class(){ "property" , property_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the value of the property with name name" ); } @@ -136,6 +143,7 @@ void register_CLJSoftRFFunction_class(){ "setDielectric" , setDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "Set the dielectric constant to dielectric" ); } @@ -148,6 +156,7 @@ void register_CLJSoftRFFunction_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Return a copy of this function where the property name has been set to the\nvalue value" ); } @@ -159,6 +168,7 @@ void register_CLJSoftRFFunction_class(){ CLJSoftRFFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +180,7 @@ void register_CLJSoftRFFunction_class(){ CLJSoftRFFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -181,6 +192,7 @@ void register_CLJSoftRFFunction_class(){ CLJSoftRFFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJSoftShiftFunction.pypp.cpp b/wrapper/MM/CLJSoftShiftFunction.pypp.cpp index 76e3f45a6..597204a4a 100644 --- a/wrapper/MM/CLJSoftShiftFunction.pypp.cpp +++ b/wrapper/MM/CLJSoftShiftFunction.pypp.cpp @@ -37,6 +37,8 @@ SireMM::CLJSoftShiftFunction __copy__(const SireMM::CLJSoftShiftFunction &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CLJSoftShiftFunction_class(){ { //::SireMM::CLJSoftShiftFunction @@ -61,6 +63,7 @@ void register_CLJSoftShiftFunction_class(){ CLJSoftShiftFunction_exposer.def( "defaultShiftFunction" , defaultShiftFunction_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_CLJSoftShiftFunction_class(){ CLJSoftShiftFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +102,7 @@ void register_CLJSoftShiftFunction_class(){ CLJSoftShiftFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +114,7 @@ void register_CLJSoftShiftFunction_class(){ CLJSoftShiftFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CLJWorkspace.pypp.cpp b/wrapper/MM/CLJWorkspace.pypp.cpp index ef731f911..fdcfda2ed 100644 --- a/wrapper/MM/CLJWorkspace.pypp.cpp +++ b/wrapper/MM/CLJWorkspace.pypp.cpp @@ -27,6 +27,8 @@ SireMM::CLJWorkspace __copy__(const SireMM::CLJWorkspace &other){ return SireMM: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CLJWorkspace_class(){ @@ -45,6 +47,7 @@ void register_CLJWorkspace_class(){ "accept" , accept_function_value , ( bp::arg("boxes") ) + , bp::release_gil_policy() , "Accept this workspace - this clears the recalc_from_scratch flag as it\nsignals that we have put the CLJBoxes into a sane state" ); } @@ -69,6 +72,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "changedAtoms" , changedAtoms_function_value + , bp::release_gil_policy() , "Merge all of the deltas together into a single set of changed CLJAtoms that\ncan be used for the change in energy calculation" ); } @@ -80,6 +84,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Clear this workspace" ); } @@ -92,6 +97,7 @@ void register_CLJWorkspace_class(){ "commit" , commit_function_value , ( bp::arg("boxes"), bp::arg("delta") ) + , bp::release_gil_policy() , "Commit the changes in the passed delta into the passed CLJBoxes" ); } @@ -103,6 +109,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of deltas" ); } @@ -115,6 +122,7 @@ void register_CLJWorkspace_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith delta" ); } @@ -126,6 +134,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this workspace is empty" ); } @@ -137,6 +146,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "isSingleID" , isSingleID_function_value + , bp::release_gil_policy() , "Return whether or not this workspace contains deltas with a single\nID (a single CLJAtoms ID)" ); } @@ -148,6 +158,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "merge" , merge_function_value + , bp::release_gil_policy() , "Merge all of the deltas together to return the tuple of the\nchanged, old and new atoms. This is equivalent to calling\nchangedAtoms(), oldAtoms() and newAtoms() and placing them\ninto a tuple. This is more efficient than three separate calls" ); } @@ -160,6 +171,7 @@ void register_CLJWorkspace_class(){ "mustRecalculateFromScratch" , mustRecalculateFromScratch_function_value , ( bp::arg("boxes") ) + , bp::release_gil_policy() , "Tell the workspace that we are now recalculating everything from scratch" ); } @@ -171,6 +183,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "nDeltas" , nDeltas_function_value + , bp::release_gil_policy() , "Return the number of deltas in this workspace" ); } @@ -182,6 +195,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this workspace needs accepting" ); } @@ -193,6 +207,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "newAtoms" , newAtoms_function_value + , bp::release_gil_policy() , "Merge all of the new atoms from the deltas together into a single\nset of new CLJAtoms that can be used for the change in energy calculation" ); } @@ -204,6 +219,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "oldAtoms" , oldAtoms_function_value + , bp::release_gil_policy() , "Merge all of the old atoms from the deltas together into a single\nset of old CLJAtoms that can be used for the change in energy calculation" ); } @@ -244,6 +260,7 @@ void register_CLJWorkspace_class(){ "push" , push_function_value , ( bp::arg("boxes"), bp::arg("old_atoms"), bp::arg("new_atoms"), bp::arg("old_delta") ) + , bp::release_gil_policy() , "Push the passed change onto the workspace. This changes the atoms in the\npassed CLJBoxes from their values in old_atoms to their values in the\npassed new_atoms. The last CLJDelta used for these atoms is supplied as\nold_delta, and this returns the new CLJDelta for these atoms." ); } @@ -255,6 +272,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "recalculatingFromScratch" , recalculatingFromScratch_function_value + , bp::release_gil_policy() , "Return whether or not we are recalculating everything from scratch" ); } @@ -267,6 +285,7 @@ void register_CLJWorkspace_class(){ "removeSameIDAtoms" , removeSameIDAtoms_function_value , ( bp::arg("boxes") ) + , bp::release_gil_policy() , "Internal function used to fully remove atoms that have not been\nremoved because they all have the same ID. This is used when the\noptimisation of not removing same ID atoms would break the energy\ncalculation, e.g. if we have multiple CLJGroups and have multiple\nchanged IDs across these groups" ); } @@ -279,6 +298,7 @@ void register_CLJWorkspace_class(){ "revert" , revert_function_value , ( bp::arg("boxes"), bp::arg("delta") ) + , bp::release_gil_policy() , "Revert the changes supplied in the passed delta" ); } @@ -290,6 +310,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of deltas" ); } @@ -301,6 +322,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -312,6 +334,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -323,6 +346,7 @@ void register_CLJWorkspace_class(){ CLJWorkspace_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CMakeAutogenFile.txt b/wrapper/MM/CMakeAutogenFile.txt index 70fa464f3..d08449b04 100644 --- a/wrapper/MM/CMakeAutogenFile.txt +++ b/wrapper/MM/CMakeAutogenFile.txt @@ -1,185 +1,190 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - ChargeParameterName.pypp.cpp - InternalParameterNames3D.pypp.cpp - DihedralRestraint.pypp.cpp - ScaledChargeParameterNames3D.pypp.cpp - InternalParameters3D.pypp.cpp - FourAtomPerturbation.pypp.cpp - CLJBoxDistance.pypp.cpp - IntraGroupSoftCLJFFBase.pypp.cpp - CLJPotentialInterface_InterCLJPotential_.pypp.cpp - GroupInternalParameters.pypp.cpp - RestraintFF.pypp.cpp - InterCoulombFFBase.pypp.cpp - InterGroupSoftCLJFFBase.pypp.cpp - CLJIntraShiftFunction.pypp.cpp AmberAngle.pypp.cpp - CLJGroup.pypp.cpp - InterLJFF.pypp.cpp - IntraLJFFBase.pypp.cpp - InternalPerturbation.pypp.cpp - CLJGrid.pypp.cpp - BondSymbols.pypp.cpp - DihedralSymbols.pypp.cpp - InterGroupCoulombFF.pypp.cpp - NullRestraint.pypp.cpp - InterGroupCLJFFBase.pypp.cpp - RestraintComponent.pypp.cpp - StretchBendTorsionComponent.pypp.cpp - IntraCLJFFBase.pypp.cpp - SoftCLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp - SoftCLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp - InternalParameterNames.pypp.cpp + AmberBond.pypp.cpp + AmberDihPart.pypp.cpp + AmberDihedral.pypp.cpp + AmberNB14.pypp.cpp + AmberParams.pypp.cpp + AngleComponent.pypp.cpp + AngleParameterName.pypp.cpp + AngleRestraint.pypp.cpp + AngleSymbols.pypp.cpp + AtomFunction.pypp.cpp + AtomFunctions.pypp.cpp + AtomLJs.pypp.cpp + AtomPairs_CLJScaleFactor_.pypp.cpp + AtomPairs_CoulombScaleFactor_.pypp.cpp + AtomPairs_LJScaleFactor_.pypp.cpp + BendBendComponent.pypp.cpp BendBendParameterName.pypp.cpp - CLJSoftRFFunction.pypp.cpp - CoulombPotentialInterface_IntraCoulombPotential_.pypp.cpp - LJScaleFactor.pypp.cpp - CLJSoftShiftFunction.pypp.cpp - ImproperParameterName.pypp.cpp - SwitchingFunction.pypp.cpp - GridFF2.pypp.cpp - IntraCLJFF.pypp.cpp - CoulombScaleFactor.pypp.cpp - StretchStretchSymbols.pypp.cpp - CLJCutoffFunction.pypp.cpp - StretchBendTorsionSymbols.pypp.cpp - IntraGroupCLJFF.pypp.cpp - InterFF.pypp.cpp - IntraGroupLJFFBase.pypp.cpp - CLJComponent.pypp.cpp - CLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp - CLJAtoms.pypp.cpp - ScaledLJParameterNames3D.pypp.cpp - FourAtomFunction.pypp.cpp - TripleDistanceRestraint.pypp.cpp + BendBendSymbols.pypp.cpp + Bond.pypp.cpp + BondComponent.pypp.cpp + BondParameterName.pypp.cpp + BondSymbols.pypp.cpp CHARMMSwitchingFunction.pypp.cpp CLJ14Group.pypp.cpp - ThreeAtomFunction.pypp.cpp - BondComponent.pypp.cpp CLJAtom.pypp.cpp - HarmonicSwitchingFunction.pypp.cpp - LJNBPairs.pypp.cpp - Restraint3D.pypp.cpp - AtomPairs_CLJScaleFactor_.pypp.cpp - ThreeAtomPerturbation.pypp.cpp - InterCLJFFBase.pypp.cpp - CLJShiftFunction.pypp.cpp - TwoAtomPerturbation.pypp.cpp - BendBendSymbols.pypp.cpp - DihedralComponent.pypp.cpp - LJProbe.pypp.cpp - InternalFF.pypp.cpp - CLJScaleFactor.pypp.cpp - AtomFunctions.pypp.cpp - InterCLJFF.pypp.cpp - IntraGroupCoulombFF.pypp.cpp - TwoAtomFunction.pypp.cpp - CLJSoftIntraFunction.pypp.cpp - CLJParameterNames.pypp.cpp - CoulombComponent.pypp.cpp + CLJAtoms.pypp.cpp + CLJBox.pypp.cpp + CLJBoxDistance.pypp.cpp + CLJBoxIndex.pypp.cpp + CLJBoxes.pypp.cpp + CLJCalculator.pypp.cpp + CLJComponent.pypp.cpp + CLJCutoffFunction.pypp.cpp + CLJDelta.pypp.cpp CLJExtractor.pypp.cpp + CLJFunction.pypp.cpp + CLJGrid.pypp.cpp + CLJGroup.pypp.cpp + CLJIntraFunction.pypp.cpp CLJIntraRFFunction.pypp.cpp - Intra14Component.pypp.cpp - InternalParameters.pypp.cpp - AmberDihPart.pypp.cpp - ImproperSymbols.pypp.cpp - LJPotentialInterface_IntraLJPotential_.pypp.cpp - AmberDihedral.pypp.cpp - AtomLJs.pypp.cpp - InterLJFFBase.pypp.cpp + CLJIntraShiftFunction.pypp.cpp + CLJNBPairs.pypp.cpp + CLJParameterNames.pypp.cpp + CLJParameterNames3D.pypp.cpp + CLJPotentialInterface_InterCLJPotential_.pypp.cpp + CLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp + CLJPotentialInterface_IntraCLJPotential_.pypp.cpp + CLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp + CLJProbe.pypp.cpp + CLJRFFunction.pypp.cpp + CLJScaleFactor.pypp.cpp + CLJShiftFunction.pypp.cpp CLJSoftFunction.pypp.cpp - IntraSoftCLJFFBase.pypp.cpp + CLJSoftIntraFunction.pypp.cpp + CLJSoftIntraRFFunction.pypp.cpp + CLJSoftIntraShiftFunction.pypp.cpp + CLJSoftRFFunction.pypp.cpp + CLJSoftShiftFunction.pypp.cpp + CLJWorkspace.pypp.cpp + ChargeParameterName.pypp.cpp + ChargeParameterName3D.pypp.cpp + CoulombComponent.pypp.cpp + CoulombNBPairs.pypp.cpp + CoulombPotentialInterface_InterCoulombPotential_.pypp.cpp + CoulombPotentialInterface_IntraCoulombPotential_.pypp.cpp CoulombProbe.pypp.cpp - InterSoftCLJFFBase.pypp.cpp - LJComponent.pypp.cpp - CLJIntraFunction.pypp.cpp - IntraSoftCLJFF.pypp.cpp - GromacsDihedral.pypp.cpp - AmberBond.pypp.cpp - BendBendComponent.pypp.cpp + CoulombScaleFactor.pypp.cpp + DihedralComponent.pypp.cpp + DihedralParameterName.pypp.cpp + DihedralRestraint.pypp.cpp + DihedralSymbols.pypp.cpp + DistanceRestraint.pypp.cpp + DoubleDistanceRestraint.pypp.cpp + FourAtomFunction.pypp.cpp + FourAtomFunctions.pypp.cpp + FourAtomPerturbation.pypp.cpp + GridFF.pypp.cpp + GridFF2.pypp.cpp GromacsAngle.pypp.cpp GromacsAtomType.pypp.cpp - MMDetail.pypp.cpp - TwoAtomFunctions.pypp.cpp + GromacsBond.pypp.cpp + GromacsDihedral.pypp.cpp + GroupInternalParameters.pypp.cpp + HarmonicSwitchingFunction.pypp.cpp ImproperComponent.pypp.cpp - IntraGroupCoulombFFBase.pypp.cpp - CLJBoxes.pypp.cpp - AmberParams.pypp.cpp - InterGroupCoulombFFBase.pypp.cpp - AtomFunction.pypp.cpp - CLJBox.pypp.cpp - AmberNB14.pypp.cpp - MultiCLJComponent.pypp.cpp - CLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp + ImproperParameterName.pypp.cpp + ImproperSymbols.pypp.cpp + InterCLJFF.pypp.cpp + InterCLJFFBase.pypp.cpp InterCoulombFF.pypp.cpp - IntraGroupLJFF.pypp.cpp - IntraLJFF.pypp.cpp - IntraGroupCLJFFBase.pypp.cpp - IntraGroupFF.pypp.cpp - CLJPotentialInterface_IntraCLJPotential_.pypp.cpp - UreyBradleyComponent.pypp.cpp - LJPerturbation.pypp.cpp - StretchStretchParameterName.pypp.cpp - IntraCoulombFF.pypp.cpp - InterSoftCLJFF.pypp.cpp + InterCoulombFFBase.pypp.cpp + InterFF.pypp.cpp + InterGroupCLJFF.pypp.cpp + InterGroupCLJFFBase.pypp.cpp + InterGroupCoulombFF.pypp.cpp + InterGroupCoulombFFBase.pypp.cpp InterGroupFF.pypp.cpp - IntraFF.pypp.cpp + InterGroupLJFF.pypp.cpp + InterGroupLJFFBase.pypp.cpp + InterGroupSoftCLJFF.pypp.cpp + InterGroupSoftCLJFFBase.pypp.cpp + InterLJFF.pypp.cpp + InterLJFFBase.pypp.cpp + InterSoftCLJFF.pypp.cpp + InterSoftCLJFFBase.pypp.cpp + InternalComponent.pypp.cpp + InternalFF.pypp.cpp + InternalParameterNames.pypp.cpp + InternalParameterNames3D.pypp.cpp + InternalParameters.pypp.cpp + InternalParameters3D.pypp.cpp + InternalPerturbation.pypp.cpp + InternalSymbols.pypp.cpp + InternalSymbolsBase.pypp.cpp + Intra14Component.pypp.cpp Intra14CoulombComponent.pypp.cpp - GromacsBond.pypp.cpp + Intra14LJComponent.pypp.cpp + IntraCLJFF.pypp.cpp + IntraCLJFFBase.pypp.cpp + IntraCoulombFF.pypp.cpp + IntraCoulombFFBase.pypp.cpp + IntraFF.pypp.cpp + IntraGroupCLJFF.pypp.cpp + IntraGroupCLJFFBase.pypp.cpp + IntraGroupCoulombFF.pypp.cpp + IntraGroupCoulombFFBase.pypp.cpp + IntraGroupFF.pypp.cpp + IntraGroupLJFF.pypp.cpp + IntraGroupLJFFBase.pypp.cpp IntraGroupSoftCLJFF.pypp.cpp - DoubleDistanceRestraint.pypp.cpp - CLJDelta.pypp.cpp - CLJBoxIndex.pypp.cpp - CLJRFFunction.pypp.cpp - CLJNBPairs.pypp.cpp - InternalComponent.pypp.cpp - FourAtomFunctions.pypp.cpp - CoulombNBPairs.pypp.cpp - UreyBradleyParameterName.pypp.cpp + IntraGroupSoftCLJFFBase.pypp.cpp + IntraLJFF.pypp.cpp + IntraLJFFBase.pypp.cpp + IntraSoftCLJFF.pypp.cpp + IntraSoftCLJFFBase.pypp.cpp + LJComponent.pypp.cpp + LJNBPairs.pypp.cpp + LJParameter.pypp.cpp + LJParameterName.pypp.cpp + LJParameterName3D.pypp.cpp + LJPerturbation.pypp.cpp LJPotentialInterface_InterLJPotential_.pypp.cpp + LJPotentialInterface_IntraLJPotential_.pypp.cpp + LJProbe.pypp.cpp + LJScaleFactor.pypp.cpp + MMDetail.pypp.cpp + Mover_Bond_.pypp.cpp + Mover_SelectorBond_.pypp.cpp + MultiCLJComponent.pypp.cpp NoCutoff.pypp.cpp - CLJProbe.pypp.cpp - LJParameterName.pypp.cpp - ScaledCLJParameterNames3D.pypp.cpp - InterGroupCLJFF.pypp.cpp - LJParameter.pypp.cpp - IntraCoulombFFBase.pypp.cpp - InterGroupLJFF.pypp.cpp - InternalSymbolsBase.pypp.cpp - CLJSoftIntraRFFunction.pypp.cpp - DihedralParameterName.pypp.cpp - CLJWorkspace.pypp.cpp - AtomPairs_CoulombScaleFactor_.pypp.cpp - TestFF.pypp.cpp - ThreeAtomFunctions.pypp.cpp NullCLJFunction.pypp.cpp - StretchBendParameterName.pypp.cpp - AngleRestraint.pypp.cpp - AtomPairs_LJScaleFactor_.pypp.cpp - InterGroupSoftCLJFF.pypp.cpp - CLJParameterNames3D.pypp.cpp - BondParameterName.pypp.cpp - AngleParameterName.pypp.cpp - CLJCalculator.pypp.cpp - CoulombPotentialInterface_InterCoulombPotential_.pypp.cpp - ChargeParameterName3D.pypp.cpp - DistanceRestraint.pypp.cpp - CLJFunction.pypp.cpp - CLJSoftIntraShiftFunction.pypp.cpp - StretchBendSymbols.pypp.cpp - InterGroupLJFFBase.pypp.cpp - LJParameterName3D.pypp.cpp + NullRestraint.pypp.cpp + Restraint.pypp.cpp + Restraint3D.pypp.cpp + RestraintComponent.pypp.cpp + RestraintFF.pypp.cpp + ScaledCLJParameterNames3D.pypp.cpp + ScaledChargeParameterNames3D.pypp.cpp + ScaledLJParameterNames3D.pypp.cpp + SelectorBond.pypp.cpp + SelectorMBond.pypp.cpp SoftCLJComponent.pypp.cpp + SoftCLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp + SoftCLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp StretchBendComponent.pypp.cpp + StretchBendParameterName.pypp.cpp + StretchBendSymbols.pypp.cpp + StretchBendTorsionComponent.pypp.cpp StretchBendTorsionParameterName.pypp.cpp - AngleComponent.pypp.cpp - Intra14LJComponent.pypp.cpp - GridFF.pypp.cpp - InternalSymbols.pypp.cpp - AngleSymbols.pypp.cpp + StretchBendTorsionSymbols.pypp.cpp StretchStretchComponent.pypp.cpp - Restraint.pypp.cpp + StretchStretchParameterName.pypp.cpp + StretchStretchSymbols.pypp.cpp + SwitchingFunction.pypp.cpp + TestFF.pypp.cpp + ThreeAtomFunction.pypp.cpp + ThreeAtomFunctions.pypp.cpp + ThreeAtomPerturbation.pypp.cpp + TripleDistanceRestraint.pypp.cpp + TwoAtomFunction.pypp.cpp + TwoAtomFunctions.pypp.cpp + TwoAtomPerturbation.pypp.cpp + UreyBradleyComponent.pypp.cpp + UreyBradleyParameterName.pypp.cpp SireMM_containers.cpp SireMM_properties.cpp SireMM_registrars.cpp diff --git a/wrapper/MM/CMakeLists.txt b/wrapper/MM/CMakeLists.txt index d57f427b6..e19cb1b26 100644 --- a/wrapper/MM/CMakeLists.txt +++ b/wrapper/MM/CMakeLists.txt @@ -24,7 +24,7 @@ include(CMakeAutogenFile.txt) set ( WRAPMM_SOURCES _MM.main.cpp - + ${PYPP_SOURCES} ) @@ -32,7 +32,7 @@ set ( WRAPMM_SOURCES # Create the library that holds all of the class wrappers add_library (MM ${WRAPMM_SOURCES}) -set_target_properties (MM +set_target_properties (MM PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -40,18 +40,18 @@ set_target_properties (MM PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (MM SirePython SIRE_SireMM - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_MM" "_init_MM" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/MM ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/MM ) install( TARGETS MM LIBRARY DESTINATION ${INSTALLDIR} @@ -60,6 +60,6 @@ install( TARGETS MM ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/MM/ChargeParameterName.pypp.cpp b/wrapper/MM/ChargeParameterName.pypp.cpp index 12d355678..f2602e25c 100644 --- a/wrapper/MM/ChargeParameterName.pypp.cpp +++ b/wrapper/MM/ChargeParameterName.pypp.cpp @@ -43,6 +43,8 @@ SireMM::ChargeParameterName __copy__(const SireMM::ChargeParameterName &other){ const char* pvt_get_name(const SireMM::ChargeParameterName&){ return "SireMM::ChargeParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_ChargeParameterName_class(){ { //::SireMM::ChargeParameterName diff --git a/wrapper/MM/ChargeParameterName3D.pypp.cpp b/wrapper/MM/ChargeParameterName3D.pypp.cpp index b3430f7dd..c1cfce398 100644 --- a/wrapper/MM/ChargeParameterName3D.pypp.cpp +++ b/wrapper/MM/ChargeParameterName3D.pypp.cpp @@ -43,6 +43,8 @@ SireMM::ChargeParameterName3D __copy__(const SireMM::ChargeParameterName3D &othe const char* pvt_get_name(const SireMM::ChargeParameterName3D&){ return "SireMM::ChargeParameterName3D";} +#include "Helpers/release_gil_policy.hpp" + void register_ChargeParameterName3D_class(){ { //::SireMM::ChargeParameterName3D diff --git a/wrapper/MM/CoulombComponent.pypp.cpp b/wrapper/MM/CoulombComponent.pypp.cpp index 135084c33..84b8e9828 100644 --- a/wrapper/MM/CoulombComponent.pypp.cpp +++ b/wrapper/MM/CoulombComponent.pypp.cpp @@ -20,6 +20,8 @@ SireMM::CoulombComponent __copy__(const SireMM::CoulombComponent &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CoulombComponent_class(){ { //::SireMM::CoulombComponent @@ -38,6 +40,7 @@ void register_CoulombComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Change the coulomb component of the energy in the forcefield ff\nby delta" ); } @@ -50,6 +53,7 @@ void register_CoulombComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Set the coulomb component of the energy in the forcefield ff\nto equal to the passed CoulombEnergy" ); } @@ -61,6 +65,7 @@ void register_CoulombComponent_class(){ CoulombComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -72,7 +77,7 @@ void register_CoulombComponent_class(){ CoulombComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -84,6 +89,7 @@ void register_CoulombComponent_class(){ CoulombComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_CoulombComponent_class(){ CoulombComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CoulombNBPairs.pypp.cpp b/wrapper/MM/CoulombNBPairs.pypp.cpp index 3dd423872..7dff4820d 100644 --- a/wrapper/MM/CoulombNBPairs.pypp.cpp +++ b/wrapper/MM/CoulombNBPairs.pypp.cpp @@ -23,6 +23,8 @@ SireMM::CoulombNBPairs __copy__(const SireMM::CoulombNBPairs &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CoulombNBPairs_class(){ { //::SireMM::CoulombNBPairs @@ -69,6 +71,7 @@ void register_CoulombNBPairs_class(){ CoulombNBPairs_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CoulombPotentialInterface_InterCoulombPotential_.pypp.cpp b/wrapper/MM/CoulombPotentialInterface_InterCoulombPotential_.pypp.cpp index 4b4031c99..f36ba9412 100644 --- a/wrapper/MM/CoulombPotentialInterface_InterCoulombPotential_.pypp.cpp +++ b/wrapper/MM/CoulombPotentialInterface_InterCoulombPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::CoulombPotentialInterface&){ return "SireMM::CoulombPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_CoulombPotentialInterface_InterCoulombPotential__class(){ { //::SireMM::CoulombPotentialInterface< SireMM::InterCoulombPotential > @@ -36,6 +38,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ CoulombPotentialInterface_InterCoulombPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -74,7 +78,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -88,6 +92,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -101,6 +106,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("switchelectro") ) + , bp::release_gil_policy() , "" ); } @@ -114,6 +120,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +134,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +147,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ CoulombPotentialInterface_InterCoulombPotential__exposer.def( "shiftElectrostatics" , shiftElectrostatics_function_value + , bp::release_gil_policy() , "" ); } @@ -151,7 +160,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ CoulombPotentialInterface_InterCoulombPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -164,7 +173,7 @@ void register_CoulombPotentialInterface_InterCoulombPotential__class(){ CoulombPotentialInterface_InterCoulombPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } diff --git a/wrapper/MM/CoulombPotentialInterface_IntraCoulombPotential_.pypp.cpp b/wrapper/MM/CoulombPotentialInterface_IntraCoulombPotential_.pypp.cpp index f59a8132a..aff743e1e 100644 --- a/wrapper/MM/CoulombPotentialInterface_IntraCoulombPotential_.pypp.cpp +++ b/wrapper/MM/CoulombPotentialInterface_IntraCoulombPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::CoulombPotentialInterface&){ return "SireMM::CoulombPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ { //::SireMM::CoulombPotentialInterface< SireMM::IntraCoulombPotential > @@ -36,6 +38,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ CoulombPotentialInterface_IntraCoulombPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -74,7 +78,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -88,6 +92,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -101,6 +106,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("switchelectro") ) + , bp::release_gil_policy() , "" ); } @@ -114,6 +120,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +134,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +147,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ CoulombPotentialInterface_IntraCoulombPotential__exposer.def( "shiftElectrostatics" , shiftElectrostatics_function_value + , bp::release_gil_policy() , "" ); } @@ -151,7 +160,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ CoulombPotentialInterface_IntraCoulombPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -164,7 +173,7 @@ void register_CoulombPotentialInterface_IntraCoulombPotential__class(){ CoulombPotentialInterface_IntraCoulombPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } diff --git a/wrapper/MM/CoulombProbe.pypp.cpp b/wrapper/MM/CoulombProbe.pypp.cpp index 3d29ff4d3..fe53b8e22 100644 --- a/wrapper/MM/CoulombProbe.pypp.cpp +++ b/wrapper/MM/CoulombProbe.pypp.cpp @@ -21,6 +21,8 @@ SireMM::CoulombProbe __copy__(const SireMM::CoulombProbe &other){ return SireMM: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CoulombProbe_class(){ { //::SireMM::CoulombProbe @@ -39,6 +41,7 @@ void register_CoulombProbe_class(){ CoulombProbe_exposer.def( "charge" , charge_function_value + , bp::release_gil_policy() , "" ); } @@ -65,6 +68,7 @@ void register_CoulombProbe_class(){ CoulombProbe_exposer.def( "reducedCharge" , reducedCharge_function_value + , bp::release_gil_policy() , "" ); } @@ -76,6 +80,7 @@ void register_CoulombProbe_class(){ CoulombProbe_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/CoulombScaleFactor.pypp.cpp b/wrapper/MM/CoulombScaleFactor.pypp.cpp index a09ee1816..3594061bc 100644 --- a/wrapper/MM/CoulombScaleFactor.pypp.cpp +++ b/wrapper/MM/CoulombScaleFactor.pypp.cpp @@ -23,6 +23,8 @@ SireMM::CoulombScaleFactor __copy__(const SireMM::CoulombScaleFactor &other){ re const char* pvt_get_name(const SireMM::CoulombScaleFactor&){ return "SireMM::CoulombScaleFactor";} +#include "Helpers/release_gil_policy.hpp" + void register_CoulombScaleFactor_class(){ { //::SireMM::CoulombScaleFactor @@ -38,6 +40,7 @@ void register_CoulombScaleFactor_class(){ CoulombScaleFactor_exposer.def( "coulomb" , coulomb_function_value + , bp::release_gil_policy() , "Return the Coulomb parameter scaling factor" ); } @@ -64,6 +67,7 @@ void register_CoulombScaleFactor_class(){ CoulombScaleFactor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -75,6 +79,7 @@ void register_CoulombScaleFactor_class(){ CoulombScaleFactor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/DihedralComponent.pypp.cpp b/wrapper/MM/DihedralComponent.pypp.cpp index 746f716df..70276d848 100644 --- a/wrapper/MM/DihedralComponent.pypp.cpp +++ b/wrapper/MM/DihedralComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::DihedralComponent __copy__(const SireMM::DihedralComponent &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DihedralComponent_class(){ { //::SireMM::DihedralComponent @@ -39,6 +41,7 @@ void register_DihedralComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("dihnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_DihedralComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("dihnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/DihedralParameterName.pypp.cpp b/wrapper/MM/DihedralParameterName.pypp.cpp index 7afc5dcc7..bf5f30e54 100644 --- a/wrapper/MM/DihedralParameterName.pypp.cpp +++ b/wrapper/MM/DihedralParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::DihedralParameterName __copy__(const SireMM::DihedralParameterName &othe const char* pvt_get_name(const SireMM::DihedralParameterName&){ return "SireMM::DihedralParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_DihedralParameterName_class(){ { //::SireMM::DihedralParameterName diff --git a/wrapper/MM/DihedralRestraint.pypp.cpp b/wrapper/MM/DihedralRestraint.pypp.cpp index 134ebc4c8..0421680af 100644 --- a/wrapper/MM/DihedralRestraint.pypp.cpp +++ b/wrapper/MM/DihedralRestraint.pypp.cpp @@ -40,6 +40,8 @@ SireMM::DihedralRestraint __copy__(const SireMM::DihedralRestraint &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DihedralRestraint_class(){ { //::SireMM::DihedralRestraint @@ -57,6 +59,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "Return the built-in symbols for this restraint" ); } @@ -68,6 +71,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "builtinValues" , builtinValues_function_value + , bp::release_gil_policy() , "Return the values of the built-in symbols of this restraint" ); } @@ -80,6 +84,7 @@ void register_DihedralRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith number molnum" ); } @@ -92,6 +97,7 @@ void register_DihedralRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith ID molid" ); } @@ -116,6 +122,7 @@ void register_DihedralRestraint_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this restraint with respect to\nthe symbol symbol\nThrow: SireCAS::unavailable_differential\n" ); } @@ -152,6 +159,7 @@ void register_DihedralRestraint_class(){ "halfHarmonic" , halfHarmonic_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3"), bp::arg("angle"), bp::arg("force_constant") ) + , bp::release_gil_policy() , "Return a distance restraint that applied a half-harmonic potential\nbetween the points point0 and point1 above a distance distance\nusing a force constant force_constant" ); } @@ -164,6 +172,7 @@ void register_DihedralRestraint_class(){ "harmonic" , harmonic_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3"), bp::arg("force_constant") ) + , bp::release_gil_policy() , "Return a distance restraint that applies a harmonic potential between\nthe points point0 and point1 using a force constant force_constant" ); } @@ -175,6 +184,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the molecules used in this restraint" ); } @@ -186,6 +196,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "This restraint involves four points" ); } @@ -212,7 +223,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "phi" , phi_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the dihedral angle between the points (phi)" ); } @@ -225,7 +236,7 @@ void register_DihedralRestraint_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point" ); } @@ -237,7 +248,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point" ); } @@ -249,7 +260,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point" ); } @@ -261,7 +272,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third point" ); } @@ -273,7 +284,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "point3" , point3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the fourth point" ); } @@ -286,6 +297,7 @@ void register_DihedralRestraint_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used to evaluate the energy of this restraint\nThrow: SireVol::incompatible_space\n" ); } @@ -297,6 +309,7 @@ void register_DihedralRestraint_class(){ DihedralRestraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -309,6 +322,7 @@ void register_DihedralRestraint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from moldata\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -321,6 +335,7 @@ void register_DihedralRestraint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -333,6 +348,7 @@ void register_DihedralRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nthat are in the forcetable forcetable" ); } @@ -345,6 +361,7 @@ void register_DihedralRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nin molecules" ); } diff --git a/wrapper/MM/DihedralSymbols.pypp.cpp b/wrapper/MM/DihedralSymbols.pypp.cpp index 95a583feb..e78284819 100644 --- a/wrapper/MM/DihedralSymbols.pypp.cpp +++ b/wrapper/MM/DihedralSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::DihedralSymbols __copy__(const SireMM::DihedralSymbols &other){ return S const char* pvt_get_name(const SireMM::DihedralSymbols&){ return "SireMM::DihedralSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_DihedralSymbols_class(){ { //::SireMM::DihedralSymbols @@ -50,7 +52,7 @@ void register_DihedralSymbols_class(){ DihedralSymbols_exposer.def( "phi" , phi_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the torsion (phi)" ); } diff --git a/wrapper/MM/DistanceRestraint.pypp.cpp b/wrapper/MM/DistanceRestraint.pypp.cpp index bc75f2ed2..d3cd74915 100644 --- a/wrapper/MM/DistanceRestraint.pypp.cpp +++ b/wrapper/MM/DistanceRestraint.pypp.cpp @@ -36,6 +36,8 @@ SireMM::DistanceRestraint __copy__(const SireMM::DistanceRestraint &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DistanceRestraint_class(){ { //::SireMM::DistanceRestraint @@ -53,6 +55,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "Return the built-in symbols of this restraint" ); } @@ -64,6 +67,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "builtinValues" , builtinValues_function_value + , bp::release_gil_policy() , "Return the built-in values of this restraint" ); } @@ -76,6 +80,7 @@ void register_DistanceRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith number molnum" ); } @@ -88,6 +93,7 @@ void register_DistanceRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith ID molid" ); } @@ -112,6 +118,7 @@ void register_DistanceRestraint_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the restraint that is the differential of this restraint\nwith respect to the symbol symbol\nThrow: SireCAS::unavailable_differential\n" ); } @@ -148,6 +155,7 @@ void register_DistanceRestraint_class(){ "halfHarmonic" , halfHarmonic_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("distance"), bp::arg("force_constant") ) + , bp::release_gil_policy() , "Return a distance restraint that applied a half-harmonic potential\nbetween the points point0 and point1 above a distance distance\nusing a force constant force_constant" ); } @@ -160,6 +168,7 @@ void register_DistanceRestraint_class(){ "harmonic" , harmonic_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("force_constant") ) + , bp::release_gil_policy() , "Return a distance restraint that applies a harmonic potential between\nthe points point0 and point1 using a force constant force_constant" ); } @@ -171,6 +180,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the molecules used in this restraint" ); } @@ -182,6 +192,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "This restraint involves two points" ); } @@ -209,7 +220,7 @@ void register_DistanceRestraint_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point" ); } @@ -221,7 +232,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point" ); } @@ -233,7 +244,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point" ); } @@ -245,7 +256,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "r" , r_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\ntwo points (r)" ); } @@ -258,6 +269,7 @@ void register_DistanceRestraint_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used to evaluate the energy of this restraint\nThrow: SireVol::incompatible_space\n" ); } @@ -269,6 +281,7 @@ void register_DistanceRestraint_class(){ DistanceRestraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -281,6 +294,7 @@ void register_DistanceRestraint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from moldata\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -293,6 +307,7 @@ void register_DistanceRestraint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -305,6 +320,7 @@ void register_DistanceRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nthat are in the forcetable forcetable" ); } @@ -317,6 +333,7 @@ void register_DistanceRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nin molecules" ); } diff --git a/wrapper/MM/DoubleDistanceRestraint.pypp.cpp b/wrapper/MM/DoubleDistanceRestraint.pypp.cpp index 604e0a1eb..9f3e1cc5b 100644 --- a/wrapper/MM/DoubleDistanceRestraint.pypp.cpp +++ b/wrapper/MM/DoubleDistanceRestraint.pypp.cpp @@ -36,6 +36,8 @@ SireMM::DoubleDistanceRestraint __copy__(const SireMM::DoubleDistanceRestraint & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DoubleDistanceRestraint_class(){ { //::SireMM::DoubleDistanceRestraint @@ -53,6 +55,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "Return the built in symbols for this restraint" ); } @@ -64,6 +67,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "builtinValues" , builtinValues_function_value + , bp::release_gil_policy() , "Return the built in values for this restraint" ); } @@ -76,6 +80,7 @@ void register_DoubleDistanceRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith number molnum" ); } @@ -88,6 +93,7 @@ void register_DoubleDistanceRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith ID molid" ); } @@ -124,6 +130,7 @@ void register_DoubleDistanceRestraint_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this restraint with respect to the\nsymbol symbol\nThrow: SireCAS::unavailable_differential\n" ); } @@ -159,6 +166,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the molecules used in this restraint" ); } @@ -170,6 +178,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "This restraint involves four points" ); } @@ -197,7 +206,7 @@ void register_DoubleDistanceRestraint_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point" ); } @@ -209,7 +218,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point" ); } @@ -221,7 +230,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point" ); } @@ -233,7 +242,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third point" ); } @@ -245,7 +254,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "point3" , point3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the fourth point" ); } @@ -257,7 +266,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints 0 and 1 (r01)" ); } @@ -269,7 +278,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "r23" , r23_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints 2 and 3 (r23)" ); } @@ -282,6 +291,7 @@ void register_DoubleDistanceRestraint_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used to evaluate the energy of this restraint\nThrow: SireVol::incompatible_space\n" ); } @@ -293,6 +303,7 @@ void register_DoubleDistanceRestraint_class(){ DoubleDistanceRestraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -305,6 +316,7 @@ void register_DoubleDistanceRestraint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from moldata\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -317,6 +329,7 @@ void register_DoubleDistanceRestraint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -329,6 +342,7 @@ void register_DoubleDistanceRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nthat are in the forcetable forcetable" ); } @@ -341,6 +355,7 @@ void register_DoubleDistanceRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nin molecules" ); } diff --git a/wrapper/MM/FourAtomFunction.pypp.cpp b/wrapper/MM/FourAtomFunction.pypp.cpp index 9bb2d7c2d..80cbff60e 100644 --- a/wrapper/MM/FourAtomFunction.pypp.cpp +++ b/wrapper/MM/FourAtomFunction.pypp.cpp @@ -34,6 +34,8 @@ SireMM::FourAtomFunction __copy__(const SireMM::FourAtomFunction &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FourAtomFunction_class(){ { //::SireMM::FourAtomFunction @@ -50,7 +52,7 @@ void register_FourAtomFunction_class(){ FourAtomFunction_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -62,7 +64,7 @@ void register_FourAtomFunction_class(){ FourAtomFunction_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -74,7 +76,7 @@ void register_FourAtomFunction_class(){ FourAtomFunction_exposer.def( "atom2" , atom2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -86,7 +88,7 @@ void register_FourAtomFunction_class(){ FourAtomFunction_exposer.def( "atom3" , atom3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -113,6 +115,7 @@ void register_FourAtomFunction_class(){ FourAtomFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } diff --git a/wrapper/MM/FourAtomFunctions.pypp.cpp b/wrapper/MM/FourAtomFunctions.pypp.cpp index 66971a099..d93a7e1ce 100644 --- a/wrapper/MM/FourAtomFunctions.pypp.cpp +++ b/wrapper/MM/FourAtomFunctions.pypp.cpp @@ -35,6 +35,8 @@ SireMM::FourAtomFunctions __copy__(const SireMM::FourAtomFunctions &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FourAtomFunctions_class(){ { //::SireMM::FourAtomFunctions @@ -53,6 +55,7 @@ void register_FourAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Clear all functions that involve the atom atom\nThrow: SireError::invalid_index\n" ); } @@ -65,6 +68,7 @@ void register_FourAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Clear any function that acts on the atoms identified by atom\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -77,6 +81,7 @@ void register_FourAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Clear any function that acts between the atoms atom0 to atom2\nThrow: SireError::invalid_index\n" ); } @@ -89,6 +94,7 @@ void register_FourAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Clear any function that acts between the atoms atom0 to atom3\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -101,6 +107,7 @@ void register_FourAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("dihedralid") ) + , bp::release_gil_policy() , "Clear the potential that acts over the dihedral identified by dihedralid\nThis clears all matching dihedrals, so 1-2-3-4 and 4-3-2-1\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -113,6 +120,7 @@ void register_FourAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("improperid") ) + , bp::release_gil_policy() , "Clear the potential that acts over the improper identified by improperid\nThis clears all matching impropers, so 1-2-3-4 and 1-2-4-3\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -124,6 +132,7 @@ void register_FourAtomFunctions_class(){ FourAtomFunctions_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear all of the functions from this set" ); } @@ -136,6 +145,7 @@ void register_FourAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\nbetween the atoms atom0 to atom3\nThrow: SireError::invalid_index\n" ); } @@ -148,6 +158,7 @@ void register_FourAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\nbetween the atoms atom0 to atom3\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -160,6 +171,7 @@ void register_FourAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("dihedralid"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\non the dihedral identified by dihedralid\nNote that this searches 1-2-3-4 first, then searches for 4-3-2-1\nif no function is found\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -172,6 +184,7 @@ void register_FourAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("improperid"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\non the improper identified by improperid\nNote that this searches 1-2-3-4 first, then searches for 1-2-4-3\nif no function is found\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -184,6 +197,7 @@ void register_FourAtomFunctions_class(){ "forces" , forces_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force functions acting between the identified\nquads of atoms, for the given symbol" ); } @@ -207,6 +221,7 @@ void register_FourAtomFunctions_class(){ FourAtomFunctions_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty (has no potentials for any internals)" ); } @@ -218,6 +233,7 @@ void register_FourAtomFunctions_class(){ FourAtomFunctions_exposer.def( "nFunctions" , nFunctions_function_value + , bp::release_gil_policy() , "Return the number of functions in this set" ); } @@ -245,6 +261,7 @@ void register_FourAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Return the function acting between the atoms atom0 to atom3.\nThis returns an empty expression if there is no expression between\nthese atoms\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); } @@ -257,6 +274,7 @@ void register_FourAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Return the function acting between the atoms atom0 to atom3.\nThis returns an empty expression if there is no expression between\nthese atoms\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -269,6 +287,7 @@ void register_FourAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("dihedralid") ) + , bp::release_gil_policy() , "Return the function acting on the dihedral identified by dihedralid.\nThis returns an empty expression if there is no expression on\nthis dihedral\nNote that this searches first for 1-2-3-4, then if no function\nis found, it returns the function for 4-3-2-1\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -281,6 +300,7 @@ void register_FourAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("improperid") ) + , bp::release_gil_policy() , "Return the function acting on the improper identified by improperid.\nThis returns an empty expression if there is no expression on\nthis improper\nNote that this searches first for 1-2-3-4, then if no function\nis found, it returns the function for 1-2-4-3\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -292,6 +312,7 @@ void register_FourAtomFunctions_class(){ FourAtomFunctions_exposer.def( "potentials" , potentials_function_value + , bp::release_gil_policy() , "Return the potential energy functions acting between the identified\nquads of atoms" ); } @@ -304,6 +325,7 @@ void register_FourAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used by atoms atom0 to atom3\nto be equal to expression - this replaces any existing expression\nIf you want to add an improper then use\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); } @@ -316,6 +338,7 @@ void register_FourAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used by atoms atom0 to atom3\nto be equal to expression - this replaces any existing expression\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -328,6 +351,7 @@ void register_FourAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("dihedralid"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used for the dihedral identified by dihedralid\nto be equal to expression - this replaces any existing expression\nNote that this will replace any equivalent dihedral, so this will replace\nboth 1-2-3-4 and 4-3-2-1 with the new expression\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -340,6 +364,7 @@ void register_FourAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("improperid"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used for the improper identified by improperid\nto be equal to expression - this replaces any existing expression\nNote that this replaces any existing improper with this function,\ne.g. this replaces both 1-2-3-4 and 1-2-4-3 with this function\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -352,6 +377,7 @@ void register_FourAtomFunctions_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Perform the substitutions contained in identities in all of\nthe expressions in this set. This could be useful if you have\ndefined these expressions with respect to a lambda parameter,\nand now want to set that value of lambda" ); } @@ -363,6 +389,7 @@ void register_FourAtomFunctions_class(){ FourAtomFunctions_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -374,6 +401,7 @@ void register_FourAtomFunctions_class(){ FourAtomFunctions_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/FourAtomPerturbation.pypp.cpp b/wrapper/MM/FourAtomPerturbation.pypp.cpp index e5f304f0c..d3ef5d873 100644 --- a/wrapper/MM/FourAtomPerturbation.pypp.cpp +++ b/wrapper/MM/FourAtomPerturbation.pypp.cpp @@ -10,6 +10,8 @@ namespace bp = boost::python; #include "SireCAS/values.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -36,6 +38,8 @@ SireMM::FourAtomPerturbation __copy__(const SireMM::FourAtomPerturbation &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FourAtomPerturbation_class(){ { //::SireMM::FourAtomPerturbation @@ -55,7 +59,7 @@ void register_FourAtomPerturbation_class(){ FourAtomPerturbation_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first of the four atoms whose potential is being changed" ); } @@ -67,7 +71,7 @@ void register_FourAtomPerturbation_class(){ FourAtomPerturbation_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second of the four atoms whose potential is being changed" ); } @@ -79,7 +83,7 @@ void register_FourAtomPerturbation_class(){ FourAtomPerturbation_exposer.def( "atom2" , atom2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third of the four atoms whose potential is being changed" ); } @@ -91,7 +95,7 @@ void register_FourAtomPerturbation_class(){ FourAtomPerturbation_exposer.def( "atom3" , atom3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the fourth of the four atoms whose potential is being changed" ); } @@ -118,6 +122,7 @@ void register_FourAtomPerturbation_class(){ FourAtomPerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return the properties required or changed by this perturbation" ); } @@ -129,6 +134,7 @@ void register_FourAtomPerturbation_class(){ FourAtomPerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this perturbation" ); } @@ -140,6 +146,7 @@ void register_FourAtomPerturbation_class(){ FourAtomPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -152,6 +159,7 @@ void register_FourAtomPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/MM/GridFF.pypp.cpp b/wrapper/MM/GridFF.pypp.cpp index 8307ca617..4d5834008 100644 --- a/wrapper/MM/GridFF.pypp.cpp +++ b/wrapper/MM/GridFF.pypp.cpp @@ -39,6 +39,8 @@ SireMM::GridFF __copy__(const SireMM::GridFF &other){ return SireMM::GridFF(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GridFF_class(){ @@ -94,6 +96,7 @@ void register_GridFF_class(){ "addFixedAtoms" , addFixedAtoms_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add fixed atoms to the grid. This will copy the fixed atoms from\nthe passed GridFF. This allows multiple grid forcefields to share the\nmemory cost of a shared set of fixed atoms" ); } @@ -105,6 +108,7 @@ void register_GridFF_class(){ GridFF_exposer.def( "buffer" , buffer_function_value + , bp::release_gil_policy() , "Return the buffer size used when building grids" ); } @@ -116,6 +120,7 @@ void register_GridFF_class(){ GridFF_exposer.def( "coulombCutoff" , coulombCutoff_function_value + , bp::release_gil_policy() , "Return the cutoff for the coulomb energy" ); } @@ -127,6 +132,7 @@ void register_GridFF_class(){ GridFF_exposer.def( "ljCutoff" , ljCutoff_function_value + , bp::release_gil_policy() , "Return the cutoff for the LJ energy" ); } @@ -138,6 +144,7 @@ void register_GridFF_class(){ GridFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Ensure that the next energy evaluation is from scratch" ); } @@ -165,6 +172,7 @@ void register_GridFF_class(){ "setBuffer" , setBuffer_function_value , ( bp::arg("buffer") ) + , bp::release_gil_policy() , "Set the buffer when building the grid. This adds a buffer space\naround the grid when it is built, to try to reduce the number of\ntimes it needs to be rebuilt" ); } @@ -177,6 +185,7 @@ void register_GridFF_class(){ "setCoulombCutoff" , setCoulombCutoff_function_value , ( bp::arg("cutoff") ) + , bp::release_gil_policy() , "Set the cutoff for the coulomb energy - this can be greater\nthan the box size as multiple periodic images can be used" ); } @@ -189,6 +198,7 @@ void register_GridFF_class(){ "setGridSpacing" , setGridSpacing_function_value , ( bp::arg("spacing") ) + , bp::release_gil_policy() , "Set the grid spacing (the distance between grid points). The\nsmaller the spacing the more memory is required to hold the grid,\nbut the more accurate the energy" ); } @@ -201,6 +211,7 @@ void register_GridFF_class(){ "setLJCutoff" , setLJCutoff_function_value , ( bp::arg("cutoff") ) + , bp::release_gil_policy() , "Set the cutoff for the LJ energy - this can be greater than\nthe box size as multiple periodic images can be used" ); } @@ -213,6 +224,7 @@ void register_GridFF_class(){ "setReactionFieldDielectric" , setReactionFieldDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "Set the dielectric constant to use with the reaction field potential" ); } @@ -225,6 +237,7 @@ void register_GridFF_class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on or off use of the force shifted potential" ); } @@ -237,6 +250,7 @@ void register_GridFF_class(){ "setUseReactionField" , setUseReactionField_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on or off the use of the reaction field" ); } @@ -248,6 +262,7 @@ void register_GridFF_class(){ GridFF_exposer.def( "spacing" , spacing_function_value + , bp::release_gil_policy() , "Return the spacing between grid points" ); } @@ -259,6 +274,7 @@ void register_GridFF_class(){ GridFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -270,6 +286,7 @@ void register_GridFF_class(){ GridFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/GridFF2.pypp.cpp b/wrapper/MM/GridFF2.pypp.cpp index 165f2eba6..6330f22bd 100644 --- a/wrapper/MM/GridFF2.pypp.cpp +++ b/wrapper/MM/GridFF2.pypp.cpp @@ -45,6 +45,8 @@ SireMM::GridFF2 __copy__(const SireMM::GridFF2 &other){ return SireMM::GridFF2(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GridFF2_class(){ @@ -100,6 +102,7 @@ void register_GridFF2_class(){ "addFixedAtoms" , addFixedAtoms_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add fixed atoms to the grid. This will copy the fixed atoms from\nthe passed GridFF2. This allows multiple grid forcefields to share the\nmemory cost of a shared set of fixed atoms" ); } @@ -111,6 +114,7 @@ void register_GridFF2_class(){ GridFF2_exposer.def( "buffer" , buffer_function_value + , bp::release_gil_policy() , "Return the buffer size used when building grids" ); } @@ -122,6 +126,7 @@ void register_GridFF2_class(){ GridFF2_exposer.def( "coulombCutoff" , coulombCutoff_function_value + , bp::release_gil_policy() , "Return the cutoff for the coulomb energy" ); } @@ -133,6 +138,7 @@ void register_GridFF2_class(){ GridFF2_exposer.def( "ljCutoff" , ljCutoff_function_value + , bp::release_gil_policy() , "Return the cutoff for the LJ energy" ); } @@ -144,6 +150,7 @@ void register_GridFF2_class(){ GridFF2_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Ensure that the next energy evaluation is from scratch" ); } @@ -171,6 +178,7 @@ void register_GridFF2_class(){ "setBuffer" , setBuffer_function_value , ( bp::arg("buffer") ) + , bp::release_gil_policy() , "Set the buffer when building the grid. This adds a buffer space\naround the grid when it is built, to try to reduce the number of\ntimes it needs to be rebuilt" ); } @@ -183,6 +191,7 @@ void register_GridFF2_class(){ "setCoulombCutoff" , setCoulombCutoff_function_value , ( bp::arg("cutoff") ) + , bp::release_gil_policy() , "Set the cutoff for the coulomb energy - this can be greater\nthan the box size as multiple periodic images can be used" ); } @@ -195,6 +204,7 @@ void register_GridFF2_class(){ "setGridSpacing" , setGridSpacing_function_value , ( bp::arg("spacing") ) + , bp::release_gil_policy() , "Set the grid spacing (the distance between grid points). The\nsmaller the spacing the more memory is required to hold the grid,\nbut the more accurate the energy" ); } @@ -207,6 +217,7 @@ void register_GridFF2_class(){ "setLJCutoff" , setLJCutoff_function_value , ( bp::arg("cutoff") ) + , bp::release_gil_policy() , "Set the cutoff for the LJ energy - this can be greater than\nthe box size as multiple periodic images can be used" ); } @@ -219,6 +230,7 @@ void register_GridFF2_class(){ "setReactionFieldDielectric" , setReactionFieldDielectric_function_value , ( bp::arg("dielectric") ) + , bp::release_gil_policy() , "Set the dielectric constant to use with the reaction field potential" ); } @@ -231,6 +243,7 @@ void register_GridFF2_class(){ "setShiftElectrostatics" , setShiftElectrostatics_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on or off use of the force shifted potential" ); } @@ -243,6 +256,7 @@ void register_GridFF2_class(){ "setUseReactionField" , setUseReactionField_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on or off the use of the reaction field" ); } @@ -254,6 +268,7 @@ void register_GridFF2_class(){ GridFF2_exposer.def( "spacing" , spacing_function_value + , bp::release_gil_policy() , "Return the spacing between grid points" ); } @@ -265,6 +280,7 @@ void register_GridFF2_class(){ GridFF2_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -276,6 +292,7 @@ void register_GridFF2_class(){ GridFF2_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/GromacsAngle.pypp.cpp b/wrapper/MM/GromacsAngle.pypp.cpp index 39d139234..6ab5b3399 100644 --- a/wrapper/MM/GromacsAngle.pypp.cpp +++ b/wrapper/MM/GromacsAngle.pypp.cpp @@ -37,6 +37,8 @@ SireMM::GromacsAngle __copy__(const SireMM::GromacsAngle &other){ return SireMM: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GromacsAngle_class(){ @@ -58,6 +60,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "assertResolved" , assertResolved_function_value + , bp::release_gil_policy() , "Assert that the parameters for this angle have been resolved" ); } @@ -70,6 +73,7 @@ void register_GromacsAngle_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith parameter for this angle" ); } @@ -81,6 +85,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of parameters associated with this angle type" ); } @@ -92,6 +97,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "functionType" , functionType_function_value + , bp::release_gil_policy() , "Return the Gromacs ID number for the function type for this angle. See table\n5.5 in the Gromacs manual for information" ); } @@ -103,6 +109,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "functionTypeString" , functionTypeString_function_value + , bp::release_gil_policy() , "Return the string description of the function type for this angle" ); } @@ -114,6 +121,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this bond" ); } @@ -125,6 +133,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "isBondAngleCrossTerm" , isBondAngleCrossTerm_function_value + , bp::release_gil_policy() , "Return whether or not this angle is really a mix of bond and angle terms" ); } @@ -136,6 +145,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "isBondBondCrossTerm" , isBondBondCrossTerm_function_value + , bp::release_gil_policy() , "Return whether or not this angle is really a mix of multiple bond terms" ); } @@ -147,6 +157,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "isHarmonic" , isHarmonic_function_value + , bp::release_gil_policy() , "Return whether or not this is a harmonic angle" ); } @@ -158,6 +169,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "isResolved" , isResolved_function_value + , bp::release_gil_policy() , "Return whether or not the parameters for this angle are resolved" ); } @@ -169,6 +181,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "isSimple" , isSimple_function_value + , bp::release_gil_policy() , "Return whether or not this is a simple angle function, based only on the\nsize of the angle" ); } @@ -180,6 +193,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "needsResolving" , needsResolving_function_value + , bp::release_gil_policy() , "Return whether or not this parameter needs resolving" ); } @@ -222,6 +236,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "Return all of the parameters for this angle" ); } @@ -233,6 +248,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of parameters associated with this angle type" ); } @@ -244,6 +260,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "toAngleTerm" , toAngleTerm_function_value + , bp::release_gil_policy() , "Return only the angle term part of this angle" ); } @@ -256,6 +273,7 @@ void register_GromacsAngle_class(){ "toBondAngleExpression" , toBondAngleExpression_function_value , ( bp::arg("r"), bp::arg("theta") ) + , bp::release_gil_policy() , "Return this function converted to a SireCAS::Expression using the passed symbol\nto represent the bond length (r02) and angle size (t012)" ); } @@ -268,6 +286,7 @@ void register_GromacsAngle_class(){ "toBondBondExpression" , toBondBondExpression_function_value , ( bp::arg("r01"), bp::arg("r12"), bp::arg("r02") ) + , bp::release_gil_policy() , "Return this function converted to a SireCAS::Expression using the passed symbol\nto represent the bond lengths r01, r12 and r02" ); } @@ -279,6 +298,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "toBondTerm" , toBondTerm_function_value + , bp::release_gil_policy() , "Return only the bond term part of this angle" ); } @@ -291,6 +311,7 @@ void register_GromacsAngle_class(){ "toExpression" , toExpression_function_value , ( bp::arg("theta") ) + , bp::release_gil_policy() , "Return this function converted to a SireCAS::Expression using the passed symbol\nto represent the angle size" ); } @@ -302,6 +323,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this angle" ); } @@ -313,6 +335,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -324,6 +347,7 @@ void register_GromacsAngle_class(){ GromacsAngle_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/GromacsAtomType.pypp.cpp b/wrapper/MM/GromacsAtomType.pypp.cpp index e72e8c0b1..c35835cb5 100644 --- a/wrapper/MM/GromacsAtomType.pypp.cpp +++ b/wrapper/MM/GromacsAtomType.pypp.cpp @@ -37,6 +37,8 @@ SireMM::GromacsAtomType __copy__(const SireMM::GromacsAtomType &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GromacsAtomType_class(){ { //::SireMM::GromacsAtomType @@ -62,6 +64,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "atomType" , atomType_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +76,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "bondType" , bondType_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +88,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "charge" , charge_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +100,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "element" , element_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +112,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "hasMassOnly" , hasMassOnly_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +124,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -128,6 +136,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "ljParameter" , ljParameter_function_value + , bp::release_gil_policy() , "" ); } @@ -139,6 +148,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "mass" , mass_function_value + , bp::release_gil_policy() , "" ); } @@ -165,6 +175,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "particleType" , particleType_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +187,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "particleTypeLetter" , particleTypeLetter_function_value + , bp::release_gil_policy() , "Return the single letter that represents the particle type" ); } @@ -187,6 +199,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "particleTypeString" , particleTypeString_function_value + , bp::release_gil_policy() , "Return a string version of the particle type" ); } @@ -199,6 +212,7 @@ void register_GromacsAtomType_class(){ "setElement" , setElement_function_value , ( bp::arg("elem") ) + , bp::release_gil_policy() , "Set the element to the passed value. This is useful if the atomtype section has\ninvalid mass informtion, as is the case for many topology files generted by acpype.\nThis allows us to update the element of the type using the mass from the atoms\nsection.\n" ); } @@ -222,6 +236,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this object" ); } @@ -233,6 +248,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -244,6 +260,7 @@ void register_GromacsAtomType_class(){ GromacsAtomType_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/GromacsBond.pypp.cpp b/wrapper/MM/GromacsBond.pypp.cpp index 26dda4362..0ac908e86 100644 --- a/wrapper/MM/GromacsBond.pypp.cpp +++ b/wrapper/MM/GromacsBond.pypp.cpp @@ -37,6 +37,8 @@ SireMM::GromacsBond __copy__(const SireMM::GromacsBond &other){ return SireMM::G #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GromacsBond_class(){ @@ -58,6 +60,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "assertResolved" , assertResolved_function_value + , bp::release_gil_policy() , "Assert that the parameters for this bond have been resolved" ); } @@ -70,6 +73,7 @@ void register_GromacsBond_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith parameter for this bond" ); } @@ -81,6 +85,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "atomsAreBonded" , atomsAreBonded_function_value + , bp::release_gil_policy() , "Return whether or not this GromacsBond implies that the atoms are actually\nbonded together" ); } @@ -92,6 +97,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of parameters associated with this bond type" ); } @@ -103,6 +109,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "equilibriumLength" , equilibriumLength_function_value + , bp::release_gil_policy() , "Return the equilibrium length of this bond" ); } @@ -114,6 +121,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "functionType" , functionType_function_value + , bp::release_gil_policy() , "Return the Gromacs ID number for the function type for this bond. See table\n5.5 in the Gromacs manual for information" ); } @@ -125,6 +133,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "functionTypeString" , functionTypeString_function_value + , bp::release_gil_policy() , "Return the string description of the function type for this bond" ); } @@ -136,6 +145,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this bond" ); } @@ -147,6 +157,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "isHarmonic" , isHarmonic_function_value + , bp::release_gil_policy() , "Return whether or not this is a harmonic bond" ); } @@ -158,6 +169,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "isResolved" , isResolved_function_value + , bp::release_gil_policy() , "Return whether or not the parameters for this bond are resolved" ); } @@ -169,6 +181,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "isSimple" , isSimple_function_value + , bp::release_gil_policy() , "All Gromacs bonds are simple (just a function of the bond length)" ); } @@ -180,6 +193,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "needsResolving" , needsResolving_function_value + , bp::release_gil_policy() , "Return whether or not this parameter needs resolving" ); } @@ -222,6 +236,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "Return all of the parameters for this bond" ); } @@ -233,6 +248,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of parameters associated with this bond type" ); } @@ -245,6 +261,7 @@ void register_GromacsBond_class(){ "toExpression" , toExpression_function_value , ( bp::arg("R") ) + , bp::release_gil_policy() , "Return this function converted to a SireCAS::Expression using the passed symbol\nto represent the bond length" ); } @@ -256,6 +273,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this bond" ); } @@ -267,6 +285,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -278,6 +297,7 @@ void register_GromacsBond_class(){ GromacsBond_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/GromacsDihedral.pypp.cpp b/wrapper/MM/GromacsDihedral.pypp.cpp index c8ade7758..58b4befde 100644 --- a/wrapper/MM/GromacsDihedral.pypp.cpp +++ b/wrapper/MM/GromacsDihedral.pypp.cpp @@ -37,6 +37,8 @@ SireMM::GromacsDihedral __copy__(const SireMM::GromacsDihedral &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GromacsDihedral_class(){ @@ -58,6 +60,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "assertResolved" , assertResolved_function_value + , bp::release_gil_policy() , "Assert that the parameters for this dihedral have been resolved" ); } @@ -70,6 +73,7 @@ void register_GromacsDihedral_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith parameter for this dihedral" ); } @@ -82,6 +86,7 @@ void register_GromacsDihedral_class(){ "construct" , construct_function_value , ( bp::arg("dihedral"), bp::arg("phi") ) + , bp::release_gil_policy() , "Construct from the passed dihedral, using phi as the symbol for the phi value" ); } @@ -94,6 +99,7 @@ void register_GromacsDihedral_class(){ "constructImproper" , constructImproper_function_value , ( bp::arg("dihedral"), bp::arg("phi") ) + , bp::release_gil_policy() , "Construct from the passed improper, using phi as the symbol for the phi value" ); } @@ -105,6 +111,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of parameters associated with this dihedral type" ); } @@ -116,6 +123,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "functionType" , functionType_function_value + , bp::release_gil_policy() , "Return the Gromacs ID number for the function type for this dihedral. See table\n5.5 in the Gromacs manual for information" ); } @@ -127,6 +135,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "functionTypeString" , functionTypeString_function_value + , bp::release_gil_policy() , "Return the string description of the function type for this dihedral" ); } @@ -138,6 +147,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this bond" ); } @@ -149,6 +159,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "isAngleTorsionCrossTerm" , isAngleTorsionCrossTerm_function_value + , bp::release_gil_policy() , "Return whether or not this dihedral is a angletorsion cross term" ); } @@ -160,6 +171,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "isCosine" , isCosine_function_value + , bp::release_gil_policy() , "Return whether or not this is a cosine-series dihedral" ); } @@ -171,6 +183,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "isImproperAngleTerm" , isImproperAngleTerm_function_value + , bp::release_gil_policy() , "Return whether or not this dihedral is really an improper angle term" ); } @@ -182,6 +195,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "isResolved" , isResolved_function_value + , bp::release_gil_policy() , "Return whether or not the parameters for this dihedral are resolved" ); } @@ -193,6 +207,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "isSimple" , isSimple_function_value + , bp::release_gil_policy() , "Return whether or not this is a simple dihedral function, based only on the\nsize of the torsion" ); } @@ -204,6 +219,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "needsResolving" , needsResolving_function_value + , bp::release_gil_policy() , "Return whether or not this parameter needs resolving" ); } @@ -246,6 +262,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "Return all of the parameters for this dihedral" ); } @@ -257,6 +274,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of parameters associated with this dihedral type" ); } @@ -269,6 +287,7 @@ void register_GromacsDihedral_class(){ "toAngleTorsionExpression" , toAngleTorsionExpression_function_value , ( bp::arg("theta0"), bp::arg("theta1"), bp::arg("phi") ) + , bp::release_gil_policy() , "Return this function converted to a SireCAS::Expression using the passed\nsymbol to represent the torsion (phi) and the angles either side of the\ntorsion (theta0 and theta1)" ); } @@ -281,6 +300,7 @@ void register_GromacsDihedral_class(){ "toExpression" , toExpression_function_value , ( bp::arg("phi") ) + , bp::release_gil_policy() , "Return this function converted to a SireCAS::Expression using the passed symbol\nto represent the torsion size" ); } @@ -293,6 +313,7 @@ void register_GromacsDihedral_class(){ "toImproperExpression" , toImproperExpression_function_value , ( bp::arg("eta") ) + , bp::release_gil_policy() , "Return this function converted to a SireCAS::Expression using the passed\nsymbol to represent the improper angle eta" ); } @@ -304,6 +325,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this dihedral" ); } @@ -315,6 +337,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -326,6 +349,7 @@ void register_GromacsDihedral_class(){ GromacsDihedral_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/GroupInternalParameters.pypp.cpp b/wrapper/MM/GroupInternalParameters.pypp.cpp index 1e4470bcd..da38a8804 100644 --- a/wrapper/MM/GroupInternalParameters.pypp.cpp +++ b/wrapper/MM/GroupInternalParameters.pypp.cpp @@ -37,6 +37,8 @@ SireMM::GroupInternalParameters __copy__(const SireMM::GroupInternalParameters & const char* pvt_get_name(const SireMM::GroupInternalParameters&){ return "SireMM::GroupInternalParameters";} +#include "Helpers/release_gil_policy.hpp" + void register_GroupInternalParameters_class(){ { //::SireMM::GroupInternalParameters @@ -148,6 +150,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "cgIdx0" , cgIdx0_function_value + , bp::release_gil_policy() , "Return the index of the first group" ); } @@ -159,6 +162,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "cgIdx1" , cgIdx1_function_value + , bp::release_gil_policy() , "Return the index of the first group" ); } @@ -170,6 +174,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "cgIdx2" , cgIdx2_function_value + , bp::release_gil_policy() , "Return the index of the first group" ); } @@ -181,6 +186,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "cgIdx3" , cgIdx3_function_value + , bp::release_gil_policy() , "Return the index of the first group" ); } @@ -216,6 +222,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "hasCrossTerms" , hasCrossTerms_function_value + , bp::release_gil_policy() , "Return whether or not this has any cross terms\n(stretch-stretch, stretch-bend, bend-bend, stretch-bend-torsion)" ); } @@ -227,6 +234,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "hasNonPhysicalParameters" , hasNonPhysicalParameters_function_value + , bp::release_gil_policy() , "Return whether or not this has any non-physical parameters\n(Urey-Bradley or improper terms)" ); } @@ -238,6 +246,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "hasPhysicalParameters" , hasPhysicalParameters_function_value + , bp::release_gil_policy() , "Return whether or not this has any physical parameters\n(bond, angle or dihedral)" ); } @@ -285,6 +294,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "isDoubleCutGroup" , isDoubleCutGroup_function_value + , bp::release_gil_policy() , "Return whether or not this group contains parameters from only\ntwo CutGroups" ); } @@ -297,6 +307,7 @@ void register_GroupInternalParameters_class(){ "isDoubleCutGroup" , isDoubleCutGroup_function_value , ( bp::arg("cgidx0"), bp::arg("cgidx1") ) + , bp::release_gil_policy() , "Return whether or not this group contains parameters from\nonly two CutGroups, with indicies cgidx0 and cgidx1" ); } @@ -308,6 +319,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether this group is empty (contains no parameters)" ); } @@ -319,6 +331,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "isQuadrupleCutGroup" , isQuadrupleCutGroup_function_value + , bp::release_gil_policy() , "Return whether or not this group contains parameters from\nfour CutGroups" ); } @@ -331,6 +344,7 @@ void register_GroupInternalParameters_class(){ "isQuadrupleCutGroup" , isQuadrupleCutGroup_function_value , ( bp::arg("cgidx0"), bp::arg("cgidx1"), bp::arg("cgidx2"), bp::arg("cgidx3") ) + , bp::release_gil_policy() , "Return whether or not this group contains parameters from\nfour CutGroups, with indicies cgidx0, cgidx1, cgidx2 and cgidx3" ); } @@ -342,6 +356,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "isSingleCutGroup" , isSingleCutGroup_function_value + , bp::release_gil_policy() , "Return whether or not this group contains parameters from only\na single CutGroup" ); } @@ -354,6 +369,7 @@ void register_GroupInternalParameters_class(){ "isSingleCutGroup" , isSingleCutGroup_function_value , ( bp::arg("cgidx0") ) + , bp::release_gil_policy() , "Return whether or not this group contains parameters from\nonly a single CutGroup, with index cgidx0" ); } @@ -365,6 +381,7 @@ void register_GroupInternalParameters_class(){ GroupInternalParameters_exposer.def( "isTripleCutGroup" , isTripleCutGroup_function_value + , bp::release_gil_policy() , "Return whether or not this group contains parameters from only\nthree CutGroups" ); } @@ -377,6 +394,7 @@ void register_GroupInternalParameters_class(){ "isTripleCutGroup" , isTripleCutGroup_function_value , ( bp::arg("cgidx0"), bp::arg("cgidx1"), bp::arg("cgidx2") ) + , bp::release_gil_policy() , "Return whether or not this group contains parameters from\nthree CutGroups, with indicies cgidx0, cgidx1 and cgidx2" ); } @@ -404,6 +422,7 @@ void register_GroupInternalParameters_class(){ "refersTo" , refersTo_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return whether or not this group contains parameters\nthat involve atoms in the CutGroup at index cgidx" ); } @@ -416,6 +435,7 @@ void register_GroupInternalParameters_class(){ "refersTo" , refersTo_function_value , ( bp::arg("cgidxs") ) + , bp::release_gil_policy() , "Return whether or not this group contains parameters\nthat involve atoms in any of the CutGroups whose indicies are\nin cgidxs" ); } diff --git a/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp b/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp index 6bfebd35c..b00fe267a 100644 --- a/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp +++ b/wrapper/MM/HarmonicSwitchingFunction.pypp.cpp @@ -33,6 +33,8 @@ SireMM::HarmonicSwitchingFunction __copy__(const SireMM::HarmonicSwitchingFuncti #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_HarmonicSwitchingFunction_class(){ { //::SireMM::HarmonicSwitchingFunction @@ -53,6 +55,7 @@ void register_HarmonicSwitchingFunction_class(){ "dElectrostaticScaleFactor" , dElectrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "This throws an exception as the harmonic switching function has\na discontinuous first derivative, so is not suitable for force evaluations\nThrow: SireFF::missing_derivative\n" ); } @@ -65,6 +68,7 @@ void register_HarmonicSwitchingFunction_class(){ "dVDWScaleFactor" , dVDWScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "This throws an exception as the harmonic switching function has\na discontinuous first derivative, so is not suitable for force evaluations\nThrow: SireFF::missing_derivative\n" ); } @@ -77,6 +81,7 @@ void register_HarmonicSwitchingFunction_class(){ "electrostaticScaleFactor" , electrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the scale factor for the electrostatic interaction for the\n" ); } @@ -103,6 +108,7 @@ void register_HarmonicSwitchingFunction_class(){ HarmonicSwitchingFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this switching function" ); } @@ -114,6 +120,7 @@ void register_HarmonicSwitchingFunction_class(){ HarmonicSwitchingFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -126,6 +133,7 @@ void register_HarmonicSwitchingFunction_class(){ "vdwScaleFactor" , vdwScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the scale factor for the vdw interaction for the\n" ); } diff --git a/wrapper/MM/ImproperComponent.pypp.cpp b/wrapper/MM/ImproperComponent.pypp.cpp index 1bc4a6be4..d7b5a78f1 100644 --- a/wrapper/MM/ImproperComponent.pypp.cpp +++ b/wrapper/MM/ImproperComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::ImproperComponent __copy__(const SireMM::ImproperComponent &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ImproperComponent_class(){ { //::SireMM::ImproperComponent @@ -39,6 +41,7 @@ void register_ImproperComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("impnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_ImproperComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("impnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_ImproperComponent_class(){ ImproperComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_ImproperComponent_class(){ ImproperComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_ImproperComponent_class(){ ImproperComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_ImproperComponent_class(){ ImproperComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/ImproperParameterName.pypp.cpp b/wrapper/MM/ImproperParameterName.pypp.cpp index 93c8542f3..282c9f85d 100644 --- a/wrapper/MM/ImproperParameterName.pypp.cpp +++ b/wrapper/MM/ImproperParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::ImproperParameterName __copy__(const SireMM::ImproperParameterName &othe const char* pvt_get_name(const SireMM::ImproperParameterName&){ return "SireMM::ImproperParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_ImproperParameterName_class(){ { //::SireMM::ImproperParameterName diff --git a/wrapper/MM/ImproperSymbols.pypp.cpp b/wrapper/MM/ImproperSymbols.pypp.cpp index 054aefae2..d4fa7973b 100644 --- a/wrapper/MM/ImproperSymbols.pypp.cpp +++ b/wrapper/MM/ImproperSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::ImproperSymbols __copy__(const SireMM::ImproperSymbols &other){ return S const char* pvt_get_name(const SireMM::ImproperSymbols&){ return "SireMM::ImproperSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_ImproperSymbols_class(){ { //::SireMM::ImproperSymbols @@ -50,7 +52,7 @@ void register_ImproperSymbols_class(){ ImproperSymbols_exposer.def( "phi" , phi_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the torsion 0-1-2-3" ); } @@ -62,7 +64,7 @@ void register_ImproperSymbols_class(){ ImproperSymbols_exposer.def( "theta" , theta_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the angle between the improper\nand the plane formed by atoms 1-3" ); } diff --git a/wrapper/MM/InterCLJFF.pypp.cpp b/wrapper/MM/InterCLJFF.pypp.cpp index 111ff2fba..48adb562c 100644 --- a/wrapper/MM/InterCLJFF.pypp.cpp +++ b/wrapper/MM/InterCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B3DFF > _ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterCLJFF_class(){ @@ -38,6 +40,7 @@ void register_InterCLJFF_class(){ InterCLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_InterCLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -183,6 +187,7 @@ void register_InterCLJFF_class(){ InterCLJFF_exposer.def( "packCoordinates" , packCoordinates_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_InterCLJFF_class(){ InterCLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -259,6 +265,7 @@ void register_InterCLJFF_class(){ InterCLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterCLJFFBase.pypp.cpp b/wrapper/MM/InterCLJFFBase.pypp.cpp index 898647815..f9d222e09 100644 --- a/wrapper/MM/InterCLJFFBase.pypp.cpp +++ b/wrapper/MM/InterCLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Inter2BFF > __c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterCLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_InterCLJFFBase_class(){ InterCLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterCLJFFBase_class(){ InterCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterCLJFFBase_class(){ InterCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterCLJFFBase_class(){ InterCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterCoulombFF.pypp.cpp b/wrapper/MM/InterCoulombFF.pypp.cpp index 436d56842..b844ef9cb 100644 --- a/wrapper/MM/InterCoulombFF.pypp.cpp +++ b/wrapper/MM/InterCoulombFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterCoulombFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterCoulombFFBase_class(){ InterCoulombFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterCoulombFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterCoulombFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterCoulombFFBase_class(){ InterCoulombFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterCoulombFFBase_class(){ InterCoulombFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterFF.pypp.cpp b/wrapper/MM/InterFF.pypp.cpp index 7e3f05704..e332dc508 100644 --- a/wrapper/MM/InterFF.pypp.cpp +++ b/wrapper/MM/InterFF.pypp.cpp @@ -56,6 +56,8 @@ SireMM::InterFF __copy__(const SireMM::InterFF &other){ return SireMM::InterFF(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterFF_class(){ @@ -74,6 +76,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the forcefield that the last move was accepted. This tells the\nforcefield to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -110,6 +113,7 @@ void register_InterFF_class(){ "addFixedAtoms" , addFixedAtoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Add the passed atoms as fixed atoms to the forcefield" ); } @@ -121,7 +125,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "cljFunction" , cljFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the function used to calculate the energy" ); } @@ -134,7 +138,7 @@ void register_InterFF_class(){ "cljFunction" , cljFunction_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the CLJFunction associated with the passed key" ); } @@ -146,6 +150,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "cljFunctionKeys" , cljFunctionKeys_function_value + , bp::release_gil_policy() , "Return the keys of all CLJFunctions added to this forcefield" ); } @@ -157,6 +162,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "cljFunctions" , cljFunctions_function_value + , bp::release_gil_policy() , "Return the hash of all CLJFunctions in this forcefield, indexed by their key" ); } @@ -168,7 +174,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy components of this forcefield" ); } @@ -181,6 +187,7 @@ void register_InterFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains the property property" ); } @@ -192,6 +199,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "disableGrid" , disableGrid_function_value + , bp::release_gil_policy() , "Turn off use of the grid" ); } @@ -203,6 +211,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "disableParallelCalculation" , disableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn off use of a multicore parallel calculation of the energy.\nThis may be quicker if you have few atoms in the forcefield,\nor if you are only planning on allocating one core per forcefield" ); } @@ -214,6 +223,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "disableReproducibleCalculation" , disableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn off an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will not be identical)" ); } @@ -225,6 +235,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "enableGrid" , enableGrid_function_value + , bp::release_gil_policy() , "Turn on the use of the grid" ); } @@ -236,6 +247,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "enableParallelCalculation" , enableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn on use of a multicore parallel calculation of the energy.\nThis is on by default, and spreads the energy calculations over\navailable cores" ); } @@ -247,6 +259,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "enableReproducibleCalculation" , enableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn on an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will be identical)" ); } @@ -258,6 +271,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "fixedOnly" , fixedOnly_function_value + , bp::release_gil_policy() , "Return whether or not only the energy between the mobile and fixed\natoms is being calculated" ); } @@ -269,6 +283,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "grid" , grid_function_value + , bp::release_gil_policy() , "Return the grid used to calculate the energy with fixed atoms. This will\nonly be set after the first energy calculation that uses the grid" ); } @@ -280,6 +295,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "gridBuffer" , gridBuffer_function_value + , bp::release_gil_policy() , "Return the buffer used when working out the dimension of the grid" ); } @@ -291,6 +307,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "gridSpacing" , gridSpacing_function_value + , bp::release_gil_policy() , "Return spacing between grid points" ); } @@ -302,6 +319,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Signal that this forcefield must now be recalculated from scratch" ); } @@ -313,6 +331,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "nCLJFunctions" , nCLJFunctions_function_value + , bp::release_gil_policy() , "Return the number of CLJ functions in this forcefield. There should always\nbe at least one" ); } @@ -324,6 +343,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield is using a temporary workspace that\nneeds to be accepted" ); } @@ -363,7 +383,7 @@ void register_InterFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the forcefield property with name name" ); } @@ -375,6 +395,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "removeAllCLJFunctions" , removeAllCLJFunctions_function_value + , bp::release_gil_policy() , "Function to remove all of the CLJFunctions (except for the default function)" ); } @@ -387,6 +408,7 @@ void register_InterFF_class(){ "removeCLJFunctionAt" , removeCLJFunctionAt_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Remove the CLJ function with key key - note that you cannot remove\nthe default CLJ function" ); } @@ -399,6 +421,7 @@ void register_InterFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Function used to set the CLJFunction used to calculate the energy" ); } @@ -411,6 +434,7 @@ void register_InterFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("key"), bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Set the CLJFunction with key key equal to cljfunc" ); } @@ -447,6 +471,7 @@ void register_InterFF_class(){ "setFixedAtoms" , setFixedAtoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Set the fixed atoms equal to atoms" ); } @@ -459,6 +484,7 @@ void register_InterFF_class(){ "setFixedOnly" , setFixedOnly_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not the energy calculation is only between the mobile and\nfixed atoms (i.e. the mobile-mobile interaction is ignored)" ); } @@ -471,6 +497,7 @@ void register_InterFF_class(){ "setGridBuffer" , setGridBuffer_function_value , ( bp::arg("buffer") ) + , bp::release_gil_policy() , "Set the buffer used when using a grid. This is the distance\nadded around the maximum extent of the atoms when working out the\ndimension of the grid" ); } @@ -483,6 +510,7 @@ void register_InterFF_class(){ "setGridSpacing" , setGridSpacing_function_value , ( bp::arg("spacing") ) + , bp::release_gil_policy() , "Set the spacing between grid points" ); } @@ -495,6 +523,7 @@ void register_InterFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the forcefield property called name to the value property. Note that\nthis only affects the default CLJFunction. Additional functions must\nbe configured before adding them to the forcefield, or by using the\nsyntax property_name[cljfunction], e.g. ff.setProperty(space[fwds], Cartesian())\nwould set the space property of the CLJFunction at key fwds to Cartesian()" ); } @@ -507,6 +536,7 @@ void register_InterFF_class(){ "setUseGrid" , setUseGrid_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not a grid is used to optimise energy calculations with the fixed atoms" ); } @@ -519,6 +549,7 @@ void register_InterFF_class(){ "setUseParallelCalculation" , setUseParallelCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to use a multicore parallel algorithm\nto calculate the energy" ); } @@ -531,6 +562,7 @@ void register_InterFF_class(){ "setUseReproducibleCalculation" , setUseReproducibleCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off use of an energy summing algorithm that guarantees the\nsame energy regardless of whether a single core or multicore calculation\nis being performed" ); } @@ -542,6 +574,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -553,6 +586,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "usesGrid" , usesGrid_function_value + , bp::release_gil_policy() , "Return whether or not the grid is used" ); } @@ -564,6 +598,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "usesParallelCalculation" , usesParallelCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a parallel algorithm is used to calculate energies" ); } @@ -575,6 +610,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "usesReproducibleCalculation" , usesReproducibleCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a reproducible energy summing algorithm is being\nused to accumulate the energies" ); } @@ -586,6 +622,7 @@ void register_InterFF_class(){ InterFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterGroupCLJFF.pypp.cpp b/wrapper/MM/InterGroupCLJFF.pypp.cpp index cafe53ee1..a1c4adb18 100644 --- a/wrapper/MM/InterGroupCLJFF.pypp.cpp +++ b/wrapper/MM/InterGroupCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B2G3DFF > #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterGroupCLJFF_class(){ @@ -38,6 +40,7 @@ void register_InterGroupCLJFF_class(){ InterGroupCLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_InterGroupCLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +239,7 @@ void register_InterGroupCLJFF_class(){ InterGroupCLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_InterGroupCLJFF_class(){ InterGroupCLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterGroupCLJFFBase.pypp.cpp b/wrapper/MM/InterGroupCLJFFBase.pypp.cpp index f8788230f..9396f2e5d 100644 --- a/wrapper/MM/InterGroupCLJFFBase.pypp.cpp +++ b/wrapper/MM/InterGroupCLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Inter2B2GFF > _ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterGroupCLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_InterGroupCLJFFBase_class(){ InterGroupCLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterGroupCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterGroupCLJFFBase_class(){ InterGroupCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterGroupCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterGroupCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterGroupCLJFFBase_class(){ InterGroupCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterGroupCLJFFBase_class(){ InterGroupCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterGroupCoulombFF.pypp.cpp b/wrapper/MM/InterGroupCoulombFF.pypp.cpp index 101c6e198..2d2938722 100644 --- a/wrapper/MM/InterGroupCoulombFF.pypp.cpp +++ b/wrapper/MM/InterGroupCoulombFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B2G3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterGroupCoulombFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterGroupCoulombFFBase_class(){ InterGroupCoulombFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterGroupCoulombFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterGroupCoulombFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterGroupCoulombFFBase_class(){ InterGroupCoulombFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterGroupCoulombFFBase_class(){ InterGroupCoulombFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterGroupFF.pypp.cpp b/wrapper/MM/InterGroupFF.pypp.cpp index aaed5bc11..203edf916 100644 --- a/wrapper/MM/InterGroupFF.pypp.cpp +++ b/wrapper/MM/InterGroupFF.pypp.cpp @@ -54,6 +54,8 @@ SireMM::InterGroupFF __copy__(const SireMM::InterGroupFF &other){ return SireMM: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterGroupFF_class(){ @@ -72,6 +74,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the forcefield that the last move was accepted. This tells the\nforcefield to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -108,6 +111,7 @@ void register_InterGroupFF_class(){ "addFixedAtoms" , addFixedAtoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Add the passed atoms as fixed atoms to the forcefield" ); } @@ -119,7 +123,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "cljFunction" , cljFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the function used to calculate the energy" ); } @@ -132,7 +136,7 @@ void register_InterGroupFF_class(){ "cljFunction" , cljFunction_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the CLJFunction associated with the passed key" ); } @@ -144,6 +148,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "cljFunctionKeys" , cljFunctionKeys_function_value + , bp::release_gil_policy() , "Return the keys of all CLJFunctions added to this forcefield" ); } @@ -155,6 +160,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "cljFunctions" , cljFunctions_function_value + , bp::release_gil_policy() , "Return the hash of all CLJFunctions in this forcefield, indexed by their key" ); } @@ -166,7 +172,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy components of this forcefield" ); } @@ -179,6 +185,7 @@ void register_InterGroupFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains the property property" ); } @@ -190,6 +197,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "disableGrid" , disableGrid_function_value + , bp::release_gil_policy() , "Turn off use of the grid" ); } @@ -201,6 +209,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "disableParallelCalculation" , disableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn off use of a multicore parallel calculation of the energy.\nThis may be quicker if you have few atoms in the forcefield,\nor if you are only planning on allocating one core per forcefield" ); } @@ -212,6 +221,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "disableReproducibleCalculation" , disableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn off an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will not be identical)" ); } @@ -223,6 +233,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "enableGrid" , enableGrid_function_value + , bp::release_gil_policy() , "Turn on the use of the grid" ); } @@ -234,6 +245,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "enableParallelCalculation" , enableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn on use of a multicore parallel calculation of the energy.\nThis is on by default, and spreads the energy calculations over\navailable cores" ); } @@ -245,6 +257,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "enableReproducibleCalculation" , enableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn on an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will be identical)" ); } @@ -256,6 +269,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "fixedOnly" , fixedOnly_function_value + , bp::release_gil_policy() , "Return whether or not only the energy between the mobile and fixed\natoms is being calculated" ); } @@ -267,6 +281,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "grid" , grid_function_value + , bp::release_gil_policy() , "Return the grid used to calculate the energy with fixed atoms. This will\nonly be set after the first energy calculation that uses the grid" ); } @@ -278,6 +293,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "gridBuffer" , gridBuffer_function_value + , bp::release_gil_policy() , "Return the buffer used when working out the dimension of the grid" ); } @@ -289,6 +305,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "gridSpacing" , gridSpacing_function_value + , bp::release_gil_policy() , "Return spacing between grid points" ); } @@ -300,6 +317,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Signal that this forcefield must now be recalculated from scratch" ); } @@ -311,6 +329,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "nCLJFunctions" , nCLJFunctions_function_value + , bp::release_gil_policy() , "Return the number of CLJ functions in this forcefield. There should always\nbe at least one" ); } @@ -322,6 +341,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield is using a temporary workspace that\nneeds to be accepted" ); } @@ -361,7 +381,7 @@ void register_InterGroupFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the forcefield property with name name" ); } @@ -373,6 +393,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "removeAllCLJFunctions" , removeAllCLJFunctions_function_value + , bp::release_gil_policy() , "Function to remove all of the CLJFunctions (except for the default function)" ); } @@ -385,6 +406,7 @@ void register_InterGroupFF_class(){ "removeCLJFunctionAt" , removeCLJFunctionAt_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Remove the CLJ function with key key - note that you cannot remove\nthe default CLJ function" ); } @@ -397,6 +419,7 @@ void register_InterGroupFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Function used to set the CLJFunction used to calculate the energy" ); } @@ -409,6 +432,7 @@ void register_InterGroupFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("key"), bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Set the CLJFunction with key key equal to cljfunc" ); } @@ -445,6 +469,7 @@ void register_InterGroupFF_class(){ "setFixedAtoms" , setFixedAtoms_function_value , ( bp::arg("atoms") ) + , bp::release_gil_policy() , "Set the fixed atoms equal to atoms" ); } @@ -457,6 +482,7 @@ void register_InterGroupFF_class(){ "setFixedOnly" , setFixedOnly_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not the energy calculation is only between the mobile and\nfixed atoms (i.e. the mobile-mobile interaction is ignored)" ); } @@ -469,6 +495,7 @@ void register_InterGroupFF_class(){ "setGridBuffer" , setGridBuffer_function_value , ( bp::arg("buffer") ) + , bp::release_gil_policy() , "Set the buffer used when using a grid. This is the distance\nadded around the maximum extent of the atoms when working out the\ndimension of the grid" ); } @@ -481,6 +508,7 @@ void register_InterGroupFF_class(){ "setGridSpacing" , setGridSpacing_function_value , ( bp::arg("spacing") ) + , bp::release_gil_policy() , "Set the spacing between grid points" ); } @@ -493,6 +521,7 @@ void register_InterGroupFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the forcefield property called name to the value property. Note that\nthis only affects the default CLJFunction. Additional functions must\nbe configured before adding them to the forcefield" ); } @@ -505,6 +534,7 @@ void register_InterGroupFF_class(){ "setUseGrid" , setUseGrid_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not a grid is used to optimise energy calculations with the fixed atoms" ); } @@ -517,6 +547,7 @@ void register_InterGroupFF_class(){ "setUseParallelCalculation" , setUseParallelCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to use a multicore parallel algorithm\nto calculate the energy" ); } @@ -529,6 +560,7 @@ void register_InterGroupFF_class(){ "setUseReproducibleCalculation" , setUseReproducibleCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off use of an energy summing algorithm that guarantees the\nsame energy regardless of whether a single core or multicore calculation\nis being performed" ); } @@ -540,6 +572,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -551,6 +584,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "usesGrid" , usesGrid_function_value + , bp::release_gil_policy() , "Return whether or not the grid is used" ); } @@ -562,6 +596,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "usesParallelCalculation" , usesParallelCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a parallel algorithm is used to calculate energies" ); } @@ -573,6 +608,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "usesReproducibleCalculation" , usesReproducibleCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a reproducible energy summing algorithm is being\nused to accumulate the energies" ); } @@ -584,6 +620,7 @@ void register_InterGroupFF_class(){ InterGroupFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterGroupLJFF.pypp.cpp b/wrapper/MM/InterGroupLJFF.pypp.cpp index 626bcce7e..b18bdcb59 100644 --- a/wrapper/MM/InterGroupLJFF.pypp.cpp +++ b/wrapper/MM/InterGroupLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B2G3DFF > _ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterGroupLJFF_class(){ @@ -38,6 +40,7 @@ void register_InterGroupLJFF_class(){ InterGroupLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_InterGroupLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +239,7 @@ void register_InterGroupLJFF_class(){ InterGroupLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_InterGroupLJFF_class(){ InterGroupLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterGroupLJFFBase.pypp.cpp b/wrapper/MM/InterGroupLJFFBase.pypp.cpp index 31c8f4b46..122f4a8e2 100644 --- a/wrapper/MM/InterGroupLJFFBase.pypp.cpp +++ b/wrapper/MM/InterGroupLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Inter2B2GFF > __c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterGroupLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_InterGroupLJFFBase_class(){ InterGroupLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterGroupLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterGroupLJFFBase_class(){ InterGroupLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterGroupLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterGroupLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterGroupLJFFBase_class(){ InterGroupLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterGroupLJFFBase_class(){ InterGroupLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp b/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp index 02c75275b..b16af4d53 100644 --- a/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp +++ b/wrapper/MM/InterGroupSoftCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B2G3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterGroupSoftCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterGroupSoftCLJFFBase_class(){ InterGroupSoftCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterGroupSoftCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterGroupSoftCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterGroupSoftCLJFFBase_class(){ InterGroupSoftCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterGroupSoftCLJFFBase_class(){ InterGroupSoftCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterLJFF.pypp.cpp b/wrapper/MM/InterLJFF.pypp.cpp index 30f99d440..83e6048f7 100644 --- a/wrapper/MM/InterLJFF.pypp.cpp +++ b/wrapper/MM/InterLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B3DFF > __c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterLJFF_class(){ @@ -38,6 +40,7 @@ void register_InterLJFF_class(){ InterLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_InterLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -183,6 +187,7 @@ void register_InterLJFF_class(){ InterLJFF_exposer.def( "packCoordinates" , packCoordinates_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_InterLJFF_class(){ InterLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -259,6 +265,7 @@ void register_InterLJFF_class(){ InterLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterLJFFBase.pypp.cpp b/wrapper/MM/InterLJFFBase.pypp.cpp index cb1ddcea8..6c56517e3 100644 --- a/wrapper/MM/InterLJFFBase.pypp.cpp +++ b/wrapper/MM/InterLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Inter2BFF > __cop #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InterLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_InterLJFFBase_class(){ InterLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterLJFFBase_class(){ InterLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterLJFFBase_class(){ InterLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterLJFFBase_class(){ InterLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InterSoftCLJFF.pypp.cpp b/wrapper/MM/InterSoftCLJFF.pypp.cpp index 1989dfb8f..119ec3c6b 100644 --- a/wrapper/MM/InterSoftCLJFF.pypp.cpp +++ b/wrapper/MM/InterSoftCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Inter2B3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_InterSoftCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_InterSoftCLJFFBase_class(){ InterSoftCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_InterSoftCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_InterSoftCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_InterSoftCLJFFBase_class(){ InterSoftCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_InterSoftCLJFFBase_class(){ InterSoftCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InternalComponent.pypp.cpp b/wrapper/MM/InternalComponent.pypp.cpp index a21ae8c49..2fd5f252b 100644 --- a/wrapper/MM/InternalComponent.pypp.cpp +++ b/wrapper/MM/InternalComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::InternalComponent __copy__(const SireMM::InternalComponent &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_InternalComponent_class(){ { //::SireMM::InternalComponent @@ -38,7 +40,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "angle" , angle_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -50,7 +52,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "bendBend" , bendBend_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -62,7 +64,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "bond" , bond_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -75,6 +77,7 @@ void register_InternalComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Change the internal components of the forcefield ff by delta" ); } @@ -86,7 +89,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "dihedral" , dihedral_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -98,7 +101,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "improper" , improper_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -110,7 +113,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "intra14" , intra14_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -122,7 +125,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "intra14Coulomb" , intra14Coulomb_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -134,7 +137,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "intra14LJ" , intra14LJ_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -147,6 +150,7 @@ void register_InternalComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Set the internal components of the forcefield ff to the passed values" ); } @@ -158,7 +162,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "stretchBend" , stretchBend_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -170,7 +174,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "stretchBendTorsion" , stretchBendTorsion_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -182,7 +186,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "stretchStretch" , stretchStretch_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -194,6 +198,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the components in this set" ); } @@ -205,7 +210,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -217,6 +222,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -228,7 +234,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "ureyBradley" , ureyBradley_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -240,6 +246,7 @@ void register_InternalComponent_class(){ InternalComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InternalFF.pypp.cpp b/wrapper/MM/InternalFF.pypp.cpp index 282511206..d99dc6986 100644 --- a/wrapper/MM/InternalFF.pypp.cpp +++ b/wrapper/MM/InternalFF.pypp.cpp @@ -54,6 +54,8 @@ SireMM::InternalFF __copy__(const SireMM::InternalFF &other){ return SireMM::Int #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_InternalFF_class(){ @@ -72,6 +74,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "combiningRules" , combiningRules_function_value + , bp::release_gil_policy() , "Return the type of combining rules used when calculating the 1-4\nnonbonded energy" ); } @@ -83,7 +86,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -96,6 +99,7 @@ void register_InternalFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether this forcefield contains the property called name" ); } @@ -107,6 +111,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "disable14Calculation" , disable14Calculation_function_value + , bp::release_gil_policy() , "Disable calculation of the 1-4 nonbonded terms" ); } @@ -118,6 +123,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "enable14Calculation" , enable14Calculation_function_value + , bp::release_gil_policy() , "Turn on the calculate of 1-4 nonbonded terms" ); } @@ -129,6 +135,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +148,7 @@ void register_InternalFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -248,6 +256,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "isStrict" , isStrict_function_value + , bp::release_gil_policy() , "" ); } @@ -259,6 +268,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Set it that the forcefield must now be recalculate from scratch" ); } @@ -358,7 +368,7 @@ void register_InternalFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the property with name name\nThrow: SireBase::missing_property\n" ); } @@ -371,6 +381,7 @@ void register_InternalFF_class(){ "setArithmeticCombiningRules" , setArithmeticCombiningRules_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on or off use of arithmetic combining rules when calculating\nthe 1-4 nonbonded energy" ); } @@ -383,6 +394,7 @@ void register_InternalFF_class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("rules") ) + , bp::release_gil_policy() , "Set the combining rules used when calculating the 1-4 nonbonded energy,\nreturning whether or not this changes the forcefield" ); } @@ -395,6 +407,7 @@ void register_InternalFF_class(){ "setGeometricCombiningRules" , setGeometricCombiningRules_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on or off use of geometric combining rules when calculating\nthe 1-4 nonbonded energy" ); } @@ -407,6 +420,7 @@ void register_InternalFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the property name to the value value\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\n" ); } @@ -419,6 +433,7 @@ void register_InternalFF_class(){ "setStrict" , setStrict_function_value , ( bp::arg("isstrict") ) + , bp::release_gil_policy() , "Set whether or not this strictly include terms that\ninvolve only selected atoms. Otherwise this includes\nterms that involve at least one selected atom" ); } @@ -431,6 +446,7 @@ void register_InternalFF_class(){ "setUse14Calculation" , setUse14Calculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on or off the calculation of the 1-4 terms, returning whether\nor not this changes the forcefield" ); } @@ -454,6 +470,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -465,6 +482,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "uses14Calculation" , uses14Calculation_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield also calculates the\n1-4 nonbonded terms" ); } @@ -476,6 +494,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "usingArithmeticCombiningRules" , usingArithmeticCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not arithmetic combining rules are used for the 1-4\nnonbonded energy calculation" ); } @@ -487,6 +506,7 @@ void register_InternalFF_class(){ InternalFF_exposer.def( "usingGeometricCombiningRules" , usingGeometricCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not geometric combining rules are used for the 1-4\nnonbonded energy calculation" ); } diff --git a/wrapper/MM/InternalParameterNames.pypp.cpp b/wrapper/MM/InternalParameterNames.pypp.cpp index 7afa0e2c4..d7d7fd7c9 100644 --- a/wrapper/MM/InternalParameterNames.pypp.cpp +++ b/wrapper/MM/InternalParameterNames.pypp.cpp @@ -51,6 +51,8 @@ SireMM::InternalParameterNames __copy__(const SireMM::InternalParameterNames &ot const char* pvt_get_name(const SireMM::InternalParameterNames&){ return "SireMM::InternalParameterNames";} +#include "Helpers/release_gil_policy.hpp" + void register_InternalParameterNames_class(){ { //::SireMM::InternalParameterNames diff --git a/wrapper/MM/InternalParameterNames3D.pypp.cpp b/wrapper/MM/InternalParameterNames3D.pypp.cpp index cab1bd039..ef51d6303 100644 --- a/wrapper/MM/InternalParameterNames3D.pypp.cpp +++ b/wrapper/MM/InternalParameterNames3D.pypp.cpp @@ -51,6 +51,8 @@ SireMM::InternalParameterNames3D __copy__(const SireMM::InternalParameterNames3D const char* pvt_get_name(const SireMM::InternalParameterNames3D&){ return "SireMM::InternalParameterNames3D";} +#include "Helpers/release_gil_policy.hpp" + void register_InternalParameterNames3D_class(){ { //::SireMM::InternalParameterNames3D diff --git a/wrapper/MM/InternalParameters.pypp.cpp b/wrapper/MM/InternalParameters.pypp.cpp index 699d1b01b..c21533b37 100644 --- a/wrapper/MM/InternalParameters.pypp.cpp +++ b/wrapper/MM/InternalParameters.pypp.cpp @@ -37,6 +37,8 @@ SireMM::InternalParameters __copy__(const SireMM::InternalParameters &other){ re const char* pvt_get_name(const SireMM::InternalParameters&){ return "SireMM::InternalParameters";} +#include "Helpers/release_gil_policy.hpp" + void register_InternalParameters_class(){ { //::SireMM::InternalParameters @@ -54,6 +56,7 @@ void register_InternalParameters_class(){ "addChangedGroups" , addChangedGroups_function_value , ( bp::arg("other"), bp::arg("changed_groups") ) + , bp::release_gil_policy() , "Add the indicies of CutGroups that have changed on to changed_groups" ); } @@ -66,6 +69,7 @@ void register_InternalParameters_class(){ "applyMask" , applyMask_function_value , ( bp::arg("cgidxs") ) + , bp::release_gil_policy() , "Mask this set so that only the parameters for the specified CutGroups are\nincluded in the returned group." ); } @@ -78,6 +82,7 @@ void register_InternalParameters_class(){ "changedAllGroups" , changedAllGroups_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether all of the parameters for all CutGroups have changed\ncompared to other" ); } @@ -90,6 +95,7 @@ void register_InternalParameters_class(){ "getChangedGroups" , getChangedGroups_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the CGIdxs of the CutGroups that have changed from this group\ncompared to the paramters held in other" ); } @@ -114,6 +120,7 @@ void register_InternalParameters_class(){ "groupParameters" , groupParameters_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return the array of all of the parameters that involve the CutGroup with index\ncgidx. This returns an empty array if there are no parameters for this CutGroup" ); } @@ -126,6 +133,7 @@ void register_InternalParameters_class(){ "groupParameters" , groupParameters_function_value , ( bp::arg("cgidxs") ) + , bp::release_gil_policy() , "Return all of the parameters that involve any of the CutGroups whose\nindicies are in cgidxs" ); } @@ -137,6 +145,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasAngleParameters" , hasAngleParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +157,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasBendBendParameters" , hasBendBendParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -159,6 +169,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasBondParameters" , hasBondParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +181,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasCrossTerms" , hasCrossTerms_function_value + , bp::release_gil_policy() , "" ); } @@ -181,6 +193,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasDihedralParameters" , hasDihedralParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +205,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasImproperParameters" , hasImproperParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -203,6 +217,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasNonPhysicalParameters" , hasNonPhysicalParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -214,6 +229,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasPhysicalParameters" , hasPhysicalParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -225,6 +241,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasStretchBendParameters" , hasStretchBendParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -236,6 +253,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasStretchBendTorsionParameters" , hasStretchBendTorsionParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +265,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasStretchStretchParameters" , hasStretchStretchParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -258,6 +277,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "hasUreyBradleyParameters" , hasUreyBradleyParameters_function_value + , bp::release_gil_policy() , "" ); } @@ -269,6 +289,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -307,6 +328,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -318,6 +340,7 @@ void register_InternalParameters_class(){ InternalParameters_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InternalParameters3D.pypp.cpp b/wrapper/MM/InternalParameters3D.pypp.cpp index aec750440..295bfeffc 100644 --- a/wrapper/MM/InternalParameters3D.pypp.cpp +++ b/wrapper/MM/InternalParameters3D.pypp.cpp @@ -37,6 +37,8 @@ SireMM::InternalParameters3D __copy__(const SireMM::InternalParameters3D &other) const char* pvt_get_name(const SireMM::InternalParameters3D&){ return "SireMM::InternalParameters3D";} +#include "Helpers/release_gil_policy.hpp" + void register_InternalParameters3D_class(){ { //::SireMM::InternalParameters3D @@ -54,6 +56,7 @@ void register_InternalParameters3D_class(){ "addChangedGroups" , addChangedGroups_function_value , ( bp::arg("other"), bp::arg("changed_groups") ) + , bp::release_gil_policy() , "Add the changed groups that are different in other compared to this\nto changed_groups" ); } @@ -66,6 +69,7 @@ void register_InternalParameters3D_class(){ "applyMask" , applyMask_function_value , ( bp::arg("cgidxs") ) + , bp::release_gil_policy() , "Mask these parameters so that only the parameters for the CutGroups\nwhose indicies are in cgidxs are contained." ); } @@ -90,6 +94,7 @@ void register_InternalParameters3D_class(){ "changedAllGroups" , changedAllGroups_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not all of the CutGroup have changed compared to other" ); } @@ -102,6 +107,7 @@ void register_InternalParameters3D_class(){ "getChangedGroups" , getChangedGroups_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the indicies of the CutGroups that have changed in other compared\nto this set of parameters" ); } @@ -113,6 +119,7 @@ void register_InternalParameters3D_class(){ InternalParameters3D_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "Return the number of CutGroups in the molecule whose parameters are\ncontained in this object" ); } @@ -140,6 +147,7 @@ void register_InternalParameters3D_class(){ "setAtomicCoordinates" , setAtomicCoordinates_function_value , ( bp::arg("coords") ) + , bp::release_gil_policy() , "Set the coordinates used by these parameters" ); } @@ -151,6 +159,7 @@ void register_InternalParameters3D_class(){ InternalParameters3D_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -162,6 +171,7 @@ void register_InternalParameters3D_class(){ InternalParameters3D_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InternalPerturbation.pypp.cpp b/wrapper/MM/InternalPerturbation.pypp.cpp index a96b5b85c..6f56030cd 100644 --- a/wrapper/MM/InternalPerturbation.pypp.cpp +++ b/wrapper/MM/InternalPerturbation.pypp.cpp @@ -9,6 +9,8 @@ namespace bp = boost::python; #include "SireCAS/values.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -33,6 +35,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_InternalPerturbation_class(){ { //::SireMM::InternalPerturbation @@ -96,6 +100,7 @@ void register_InternalPerturbation_class(){ "recreate" , recreate_function_value , ( bp::arg("expression") ) + , bp::release_gil_policy() , "" ); } @@ -108,6 +113,7 @@ void register_InternalPerturbation_class(){ "recreate" , recreate_function_value , ( bp::arg("expression"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_InternalPerturbation_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +138,7 @@ void register_InternalPerturbation_class(){ InternalPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/InternalSymbols.pypp.cpp b/wrapper/MM/InternalSymbols.pypp.cpp index c9425c4f8..152091f63 100644 --- a/wrapper/MM/InternalSymbols.pypp.cpp +++ b/wrapper/MM/InternalSymbols.pypp.cpp @@ -35,6 +35,8 @@ SireMM::InternalSymbols __copy__(const SireMM::InternalSymbols &other){ return S const char* pvt_get_name(const SireMM::InternalSymbols&){ return "SireMM::InternalSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_InternalSymbols_class(){ { //::SireMM::InternalSymbols diff --git a/wrapper/MM/InternalSymbolsBase.pypp.cpp b/wrapper/MM/InternalSymbolsBase.pypp.cpp index cc193075a..dea4e6a4d 100644 --- a/wrapper/MM/InternalSymbolsBase.pypp.cpp +++ b/wrapper/MM/InternalSymbolsBase.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::InternalSymbolsBase&){ return "SireMM::InternalSymbolsBase";} +#include "Helpers/release_gil_policy.hpp" + void register_InternalSymbolsBase_class(){ { //::SireMM::InternalSymbolsBase diff --git a/wrapper/MM/Intra14Component.pypp.cpp b/wrapper/MM/Intra14Component.pypp.cpp index a93497d47..750f62ab1 100644 --- a/wrapper/MM/Intra14Component.pypp.cpp +++ b/wrapper/MM/Intra14Component.pypp.cpp @@ -22,6 +22,8 @@ SireMM::Intra14Component __copy__(const SireMM::Intra14Component &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Intra14Component_class(){ { //::SireMM::Intra14Component @@ -39,6 +41,7 @@ void register_Intra14Component_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Change the internal components of the forcefield ff by delta" ); } @@ -50,7 +53,7 @@ void register_Intra14Component_class(){ Intra14Component_exposer.def( "coulomb" , coulomb_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -62,7 +65,7 @@ void register_Intra14Component_class(){ Intra14Component_exposer.def( "lj" , lj_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -75,6 +78,7 @@ void register_Intra14Component_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Set the internal components of the forcefield ff to the passed values" ); } @@ -86,6 +90,7 @@ void register_Intra14Component_class(){ Intra14Component_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the components in this set" ); } @@ -97,7 +102,7 @@ void register_Intra14Component_class(){ Intra14Component_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -109,6 +114,7 @@ void register_Intra14Component_class(){ Intra14Component_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_Intra14Component_class(){ Intra14Component_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/Intra14CoulombComponent.pypp.cpp b/wrapper/MM/Intra14CoulombComponent.pypp.cpp index c3deaf907..7e3769455 100644 --- a/wrapper/MM/Intra14CoulombComponent.pypp.cpp +++ b/wrapper/MM/Intra14CoulombComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::Intra14CoulombComponent __copy__(const SireMM::Intra14CoulombComponent & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Intra14CoulombComponent_class(){ { //::SireMM::Intra14CoulombComponent @@ -39,6 +41,7 @@ void register_Intra14CoulombComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_Intra14CoulombComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_Intra14CoulombComponent_class(){ Intra14CoulombComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_Intra14CoulombComponent_class(){ Intra14CoulombComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_Intra14CoulombComponent_class(){ Intra14CoulombComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_Intra14CoulombComponent_class(){ Intra14CoulombComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/Intra14LJComponent.pypp.cpp b/wrapper/MM/Intra14LJComponent.pypp.cpp index 67682871c..27b657c62 100644 --- a/wrapper/MM/Intra14LJComponent.pypp.cpp +++ b/wrapper/MM/Intra14LJComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::Intra14LJComponent __copy__(const SireMM::Intra14LJComponent &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Intra14LJComponent_class(){ { //::SireMM::Intra14LJComponent @@ -39,6 +41,7 @@ void register_Intra14LJComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_Intra14LJComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_Intra14LJComponent_class(){ Intra14LJComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_Intra14LJComponent_class(){ Intra14LJComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_Intra14LJComponent_class(){ Intra14LJComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_Intra14LJComponent_class(){ Intra14LJComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraCLJFF.pypp.cpp b/wrapper/MM/IntraCLJFF.pypp.cpp index 301b56476..f241cb508 100644 --- a/wrapper/MM/IntraCLJFF.pypp.cpp +++ b/wrapper/MM/IntraCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B3DFF > _ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraCLJFF_class(){ @@ -38,6 +40,7 @@ void register_IntraCLJFF_class(){ IntraCLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_IntraCLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +239,7 @@ void register_IntraCLJFF_class(){ IntraCLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_IntraCLJFF_class(){ IntraCLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraCLJFFBase.pypp.cpp b/wrapper/MM/IntraCLJFFBase.pypp.cpp index 9c11cd447..7b9129333 100644 --- a/wrapper/MM/IntraCLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraCLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Intra2BFF > __c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraCLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_IntraCLJFFBase_class(){ IntraCLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraCLJFFBase_class(){ IntraCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraCLJFFBase_class(){ IntraCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraCLJFFBase_class(){ IntraCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraCoulombFF.pypp.cpp b/wrapper/MM/IntraCoulombFF.pypp.cpp index 11fee7c20..9bbd3d796 100644 --- a/wrapper/MM/IntraCoulombFF.pypp.cpp +++ b/wrapper/MM/IntraCoulombFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraCoulombFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraCoulombFFBase_class(){ IntraCoulombFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraCoulombFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraCoulombFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraCoulombFFBase_class(){ IntraCoulombFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraCoulombFFBase_class(){ IntraCoulombFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraFF.pypp.cpp b/wrapper/MM/IntraFF.pypp.cpp index 57c3f527a..ebf3c678b 100644 --- a/wrapper/MM/IntraFF.pypp.cpp +++ b/wrapper/MM/IntraFF.pypp.cpp @@ -56,6 +56,8 @@ SireMM::IntraFF __copy__(const SireMM::IntraFF &other){ return SireMM::IntraFF(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraFF_class(){ @@ -74,6 +76,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the forcefield that the last move was accepted. This tells the\nforcefield to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -110,6 +113,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "cljFunctionKeys" , cljFunctionKeys_function_value + , bp::release_gil_policy() , "Return the keys of all CLJFunctions added to this forcefield" ); } @@ -121,6 +125,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "cljFunctions" , cljFunctions_function_value + , bp::release_gil_policy() , "Return the hash of all CLJFunctions in this forcefield, indexed by their key" ); } @@ -132,7 +137,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy components of this forcefield" ); } @@ -145,6 +150,7 @@ void register_IntraFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains the property property" ); } @@ -156,6 +162,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "disableParallelCalculation" , disableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn off use of a multicore parallel calculation of the energy.\nThis may be quicker if you have few atoms in the forcefield,\nor if you are only planning on allocating one core per forcefield" ); } @@ -167,6 +174,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "disableReproducibleCalculation" , disableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn off an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will not be identical)" ); } @@ -178,6 +186,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "enableParallelCalculation" , enableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn on use of a multicore parallel calculation of the energy.\nThis is on by default, and spreads the energy calculations over\navailable cores" ); } @@ -189,6 +198,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "enableReproducibleCalculation" , enableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn on an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will be identical)" ); } @@ -200,6 +210,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Signal that this forcefield must now be recalculated from scratch" ); } @@ -211,6 +222,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "nCLJFunctions" , nCLJFunctions_function_value + , bp::release_gil_policy() , "Return the number of CLJ functions in this forcefield. There should always\nbe at least one" ); } @@ -222,6 +234,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield is using a temporary workspace that\nneeds to be accepted" ); } @@ -261,7 +274,7 @@ void register_IntraFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the forcefield property with name name" ); } @@ -273,6 +286,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "removeAllCLJFunctions" , removeAllCLJFunctions_function_value + , bp::release_gil_policy() , "Function to remove all of the CLJFunctions (except for the default function)" ); } @@ -285,6 +299,7 @@ void register_IntraFF_class(){ "removeCLJFunctionAt" , removeCLJFunctionAt_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Remove the CLJ function with key key - note that you cannot remove\nthe default CLJ function" ); } @@ -297,6 +312,7 @@ void register_IntraFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Function used to set the CLJIntraFunction used to calculate\nthe intramolecular energy" ); } @@ -309,6 +325,7 @@ void register_IntraFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("key"), bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Set the CLJFunction with key key equal to cljfunc" ); } @@ -321,6 +338,7 @@ void register_IntraFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the forcefield property called name to the value property. Note that\nthis only affects the default CLJFunction. Additional functions must\nbe configured before adding them to the forcefield" ); } @@ -333,6 +351,7 @@ void register_IntraFF_class(){ "setUseParallelCalculation" , setUseParallelCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to use a multicore parallel algorithm\nto calculate the energy" ); } @@ -345,6 +364,7 @@ void register_IntraFF_class(){ "setUseReproducibleCalculation" , setUseReproducibleCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off use of an energy summing algorithm that guarantees the\nsame energy regardless of whether a single core or multicore calculation\nis being performed" ); } @@ -356,6 +376,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -367,6 +388,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "usesParallelCalculation" , usesParallelCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a parallel algorithm is used to calculate energies" ); } @@ -378,6 +400,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "usesReproducibleCalculation" , usesReproducibleCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a reproducible energy summing algorithm is being\nused to accumulate the energies" ); } @@ -389,6 +412,7 @@ void register_IntraFF_class(){ IntraFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraGroupCLJFF.pypp.cpp b/wrapper/MM/IntraGroupCLJFF.pypp.cpp index 0c95941b1..9163de509 100644 --- a/wrapper/MM/IntraGroupCLJFF.pypp.cpp +++ b/wrapper/MM/IntraGroupCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B2G3DFF > #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraGroupCLJFF_class(){ @@ -38,6 +40,7 @@ void register_IntraGroupCLJFF_class(){ IntraGroupCLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_IntraGroupCLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +239,7 @@ void register_IntraGroupCLJFF_class(){ IntraGroupCLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_IntraGroupCLJFF_class(){ IntraGroupCLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp b/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp index d110fbbce..e395af0eb 100644 --- a/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraGroupCLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Intra2B2GFF > _ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraGroupCLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_IntraGroupCLJFFBase_class(){ IntraGroupCLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraGroupCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraGroupCLJFFBase_class(){ IntraGroupCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraGroupCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraGroupCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraGroupCLJFFBase_class(){ IntraGroupCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraGroupCLJFFBase_class(){ IntraGroupCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraGroupCoulombFF.pypp.cpp b/wrapper/MM/IntraGroupCoulombFF.pypp.cpp index 297e36025..1870b1c6e 100644 --- a/wrapper/MM/IntraGroupCoulombFF.pypp.cpp +++ b/wrapper/MM/IntraGroupCoulombFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B2G3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraGroupCoulombFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraGroupCoulombFFBase_class(){ IntraGroupCoulombFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraGroupCoulombFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraGroupCoulombFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraGroupCoulombFFBase_class(){ IntraGroupCoulombFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraGroupCoulombFFBase_class(){ IntraGroupCoulombFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraGroupFF.pypp.cpp b/wrapper/MM/IntraGroupFF.pypp.cpp index 3698a49c9..75f990865 100644 --- a/wrapper/MM/IntraGroupFF.pypp.cpp +++ b/wrapper/MM/IntraGroupFF.pypp.cpp @@ -56,6 +56,8 @@ SireMM::IntraGroupFF __copy__(const SireMM::IntraGroupFF &other){ return SireMM: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraGroupFF_class(){ @@ -74,6 +76,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the forcefield that the last move was accepted. This tells the\nforcefield to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -110,6 +113,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "cljFunctionKeys" , cljFunctionKeys_function_value + , bp::release_gil_policy() , "Return the keys of all CLJFunctions added to this forcefield" ); } @@ -121,6 +125,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "cljFunctions" , cljFunctions_function_value + , bp::release_gil_policy() , "Return the hash of all CLJFunctions in this forcefield, indexed by their key" ); } @@ -132,7 +137,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy components of this forcefield" ); } @@ -145,6 +150,7 @@ void register_IntraGroupFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains the property property" ); } @@ -156,6 +162,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "disableParallelCalculation" , disableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn off use of a multicore parallel calculation of the energy.\nThis may be quicker if you have few atoms in the forcefield,\nor if you are only planning on allocating one core per forcefield" ); } @@ -167,6 +174,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "disableReproducibleCalculation" , disableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn off an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will not be identical)" ); } @@ -178,6 +186,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "enableParallelCalculation" , enableParallelCalculation_function_value + , bp::release_gil_policy() , "Turn on use of a multicore parallel calculation of the energy.\nThis is on by default, and spreads the energy calculations over\navailable cores" ); } @@ -189,6 +198,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "enableReproducibleCalculation" , enableReproducibleCalculation_function_value + , bp::release_gil_policy() , "Turn on an energy summing algorithm that guarantees the same energy\nregardless of whether a single core or multicore calculation is being\nperformed (i.e. rounding errors in both cases will be identical)" ); } @@ -200,6 +210,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Signal that this forcefield must now be recalculated from scratch" ); } @@ -211,6 +222,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "nCLJFunctions" , nCLJFunctions_function_value + , bp::release_gil_policy() , "Return the number of CLJ functions in this forcefield. There should always\nbe at least one" ); } @@ -222,6 +234,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield is using a temporary workspace that\nneeds to be accepted" ); } @@ -261,7 +274,7 @@ void register_IntraGroupFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the forcefield property with name name" ); } @@ -273,6 +286,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "removeAllCLJFunctions" , removeAllCLJFunctions_function_value + , bp::release_gil_policy() , "Function to remove all of the CLJFunctions (except for the default function)" ); } @@ -285,6 +299,7 @@ void register_IntraGroupFF_class(){ "removeCLJFunctionAt" , removeCLJFunctionAt_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Remove the CLJ function with key key - note that you cannot remove\nthe default CLJ function" ); } @@ -297,6 +312,7 @@ void register_IntraGroupFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Function used to set the CLJIntraFunction used to calculate\nthe intramolecular energy" ); } @@ -309,6 +325,7 @@ void register_IntraGroupFF_class(){ "setCLJFunction" , setCLJFunction_function_value , ( bp::arg("key"), bp::arg("cljfunc") ) + , bp::release_gil_policy() , "Set the CLJFunction with key key equal to cljfunc" ); } @@ -321,6 +338,7 @@ void register_IntraGroupFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the forcefield property called name to the value property. Note that\nthis only affects the default CLJFunction. Additional functions must\nbe configured before adding them to the forcefield" ); } @@ -333,6 +351,7 @@ void register_IntraGroupFF_class(){ "setUseParallelCalculation" , setUseParallelCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to use a multicore parallel algorithm\nto calculate the energy" ); } @@ -345,6 +364,7 @@ void register_IntraGroupFF_class(){ "setUseReproducibleCalculation" , setUseReproducibleCalculation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off use of an energy summing algorithm that guarantees the\nsame energy regardless of whether a single core or multicore calculation\nis being performed" ); } @@ -356,6 +376,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -367,6 +388,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "usesParallelCalculation" , usesParallelCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a parallel algorithm is used to calculate energies" ); } @@ -378,6 +400,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "usesReproducibleCalculation" , usesReproducibleCalculation_function_value + , bp::release_gil_policy() , "Return whether or not a reproducible energy summing algorithm is being\nused to accumulate the energies" ); } @@ -389,6 +412,7 @@ void register_IntraGroupFF_class(){ IntraGroupFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraGroupLJFF.pypp.cpp b/wrapper/MM/IntraGroupLJFF.pypp.cpp index f15f3e05a..4da1cbc21 100644 --- a/wrapper/MM/IntraGroupLJFF.pypp.cpp +++ b/wrapper/MM/IntraGroupLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B2G3DFF > _ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraGroupLJFF_class(){ @@ -38,6 +40,7 @@ void register_IntraGroupLJFF_class(){ IntraGroupLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_IntraGroupLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +239,7 @@ void register_IntraGroupLJFF_class(){ IntraGroupLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_IntraGroupLJFF_class(){ IntraGroupLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraGroupLJFFBase.pypp.cpp b/wrapper/MM/IntraGroupLJFFBase.pypp.cpp index 022b9d506..1ae66b061 100644 --- a/wrapper/MM/IntraGroupLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraGroupLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Intra2B2GFF > __c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraGroupLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_IntraGroupLJFFBase_class(){ IntraGroupLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraGroupLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraGroupLJFFBase_class(){ IntraGroupLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraGroupLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraGroupLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraGroupLJFFBase_class(){ IntraGroupLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraGroupLJFFBase_class(){ IntraGroupLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp b/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp index 42406f9bc..22df4c79d 100644 --- a/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp +++ b/wrapper/MM/IntraGroupSoftCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B2G3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraGroupSoftCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraGroupSoftCLJFFBase_class(){ IntraGroupSoftCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraGroupSoftCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraGroupSoftCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraGroupSoftCLJFFBase_class(){ IntraGroupSoftCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraGroupSoftCLJFFBase_class(){ IntraGroupSoftCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraLJFF.pypp.cpp b/wrapper/MM/IntraLJFF.pypp.cpp index 58cf89f34..761add86b 100644 --- a/wrapper/MM/IntraLJFF.pypp.cpp +++ b/wrapper/MM/IntraLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B3DFF > __c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraLJFF_class(){ @@ -38,6 +40,7 @@ void register_IntraLJFF_class(){ IntraLJFF_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_IntraLJFF_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +239,7 @@ void register_IntraLJFF_class(){ IntraLJFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +252,7 @@ void register_IntraLJFF_class(){ IntraLJFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraLJFFBase.pypp.cpp b/wrapper/MM/IntraLJFFBase.pypp.cpp index 46c692559..2fcd2e46b 100644 --- a/wrapper/MM/IntraLJFFBase.pypp.cpp +++ b/wrapper/MM/IntraLJFFBase.pypp.cpp @@ -22,6 +22,8 @@ SireFF::Intra2BFF > __cop #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_IntraLJFFBase_class(){ @@ -41,7 +43,7 @@ void register_IntraLJFFBase_class(){ IntraLJFFBase_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraLJFFBase_class(){ IntraLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraLJFFBase_class(){ IntraLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraLJFFBase_class(){ IntraLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/IntraSoftCLJFF.pypp.cpp b/wrapper/MM/IntraSoftCLJFF.pypp.cpp index 162cfff5e..401e2fe3a 100644 --- a/wrapper/MM/IntraSoftCLJFF.pypp.cpp +++ b/wrapper/MM/IntraSoftCLJFF.pypp.cpp @@ -19,6 +19,8 @@ SireFF::Intra2B3DFF() + , bp::return_value_policy() , "" ); } @@ -55,6 +57,7 @@ void register_IntraSoftCLJFFBase_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +70,7 @@ void register_IntraSoftCLJFFBase_class(){ IntraSoftCLJFFBase_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "" ); } @@ -109,7 +113,7 @@ void register_IntraSoftCLJFFBase_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -123,6 +127,7 @@ void register_IntraSoftCLJFFBase_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +140,7 @@ void register_IntraSoftCLJFFBase_class(){ IntraSoftCLJFFBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +153,7 @@ void register_IntraSoftCLJFFBase_class(){ IntraSoftCLJFFBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/LJComponent.pypp.cpp b/wrapper/MM/LJComponent.pypp.cpp index 5c823494d..d0270efcb 100644 --- a/wrapper/MM/LJComponent.pypp.cpp +++ b/wrapper/MM/LJComponent.pypp.cpp @@ -20,6 +20,8 @@ SireMM::LJComponent __copy__(const SireMM::LJComponent &other){ return SireMM::L #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LJComponent_class(){ { //::SireMM::LJComponent @@ -38,6 +40,7 @@ void register_LJComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Change the LJ component of the energy in the forcefield ff\nby delta" ); } @@ -50,6 +53,7 @@ void register_LJComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("ljnrg") ) + , bp::release_gil_policy() , "Set the LJ component of the energy in the forcefield ff\nto equal to the passed LJEnergy" ); } @@ -61,6 +65,7 @@ void register_LJComponent_class(){ LJComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -72,7 +77,7 @@ void register_LJComponent_class(){ LJComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -84,6 +89,7 @@ void register_LJComponent_class(){ LJComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_LJComponent_class(){ LJComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/LJNBPairs.pypp.cpp b/wrapper/MM/LJNBPairs.pypp.cpp index 1dc155020..b2322921a 100644 --- a/wrapper/MM/LJNBPairs.pypp.cpp +++ b/wrapper/MM/LJNBPairs.pypp.cpp @@ -23,6 +23,8 @@ SireMM::LJNBPairs __copy__(const SireMM::LJNBPairs &other){ return SireMM::LJNBP #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LJNBPairs_class(){ { //::SireMM::LJNBPairs @@ -69,6 +71,7 @@ void register_LJNBPairs_class(){ LJNBPairs_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/LJParameter.pypp.cpp b/wrapper/MM/LJParameter.pypp.cpp index 952c13a39..f01a314ed 100644 --- a/wrapper/MM/LJParameter.pypp.cpp +++ b/wrapper/MM/LJParameter.pypp.cpp @@ -23,6 +23,8 @@ SireMM::LJParameter __copy__(const SireMM::LJParameter &other){ return SireMM::L #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LJParameter_class(){ { //::SireMM::LJParameter @@ -45,6 +47,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "A" , A_function_value + , bp::release_gil_policy() , "Return the LJ A parameter" ); } @@ -56,6 +59,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "B" , B_function_value + , bp::release_gil_policy() , "Return the LJ B parameter" ); } @@ -68,6 +72,7 @@ void register_LJParameter_class(){ "combine" , combine_function_value , ( bp::arg("other"), bp::arg("rules") ) + , bp::release_gil_policy() , "Return the LJParameter that is this parameter combined with other according\nto the passed combining rules" ); } @@ -80,6 +85,7 @@ void register_LJParameter_class(){ "combineArithmetic" , combineArithmetic_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the LJParameter that is this parameter combined with other\nusing arithmetic combining rules" ); } @@ -92,6 +98,7 @@ void register_LJParameter_class(){ "combineGeometric" , combineGeometric_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the LJParameter that is this parameter combined with other\nusing geometric combining rules" ); } @@ -103,6 +110,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "dummy" , dummy_function_value + , bp::release_gil_policy() , "Return a dummy CLJParameter" ); } @@ -114,6 +122,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "epsilon" , epsilon_function_value + , bp::release_gil_policy() , "" ); } @@ -126,6 +135,7 @@ void register_LJParameter_class(){ "fromAAndB" , fromAAndB_function_value , ( bp::arg("a"), bp::arg("b") ) + , bp::release_gil_policy() , "Return a LJ parameter that corresponds to the passed LJ parameters A and B,\nE(r) = A r-12 - B r-6\n" ); } @@ -138,6 +148,7 @@ void register_LJParameter_class(){ "fromRMinAndEpsilon" , fromRMinAndEpsilon_function_value , ( bp::arg("rmin"), bp::arg("epsilon") ) + , bp::release_gil_policy() , "Return a LJ parameter that corresponds to the curve that has a minimum at\nrmin, and a well-depth of epsilon.\nE(r) = 4 epilson [ (sigmar)^12 - (sigmar)^6 ], where\nrmin = 2^(16) sigma\n" ); } @@ -150,6 +161,7 @@ void register_LJParameter_class(){ "fromSigmaAndEpsilon" , fromSigmaAndEpsilon_function_value , ( bp::arg("sigma"), bp::arg("epsilon") ) + , bp::release_gil_policy() , "Return a LJ parameter that corresponds to the passed values of sigma and epsilon,\nE(r) = 4 epsilon [ (sigmar)^12 - (sigmar)^6 ]\n" ); } @@ -161,6 +173,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "isDummy" , isDummy_function_value + , bp::release_gil_policy() , "" ); } @@ -174,6 +187,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "rmin" , rmin_function_value + , bp::release_gil_policy() , "Return the LJ rmin parameter - this is the location of the minimum.\nrmin = 2^(16) sigma\n" ); } @@ -185,6 +199,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "sigma" , sigma_function_value + , bp::release_gil_policy() , "" ); } @@ -196,6 +211,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "sqrtEpsilon" , sqrtEpsilon_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +223,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "sqrtSigma" , sqrtSigma_function_value + , bp::release_gil_policy() , "" ); } @@ -218,6 +235,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the CLJ parameter" ); } @@ -229,6 +247,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -240,6 +259,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +271,7 @@ void register_LJParameter_class(){ LJParameter_exposer.def( "zeroLJ" , zeroLJ_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/LJParameterName.pypp.cpp b/wrapper/MM/LJParameterName.pypp.cpp index cbfbe2a54..b0cb4cf2f 100644 --- a/wrapper/MM/LJParameterName.pypp.cpp +++ b/wrapper/MM/LJParameterName.pypp.cpp @@ -47,6 +47,8 @@ SireMM::LJParameterName __copy__(const SireMM::LJParameterName &other){ return S const char* pvt_get_name(const SireMM::LJParameterName&){ return "SireMM::LJParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_LJParameterName_class(){ { //::SireMM::LJParameterName diff --git a/wrapper/MM/LJParameterName3D.pypp.cpp b/wrapper/MM/LJParameterName3D.pypp.cpp index fce1c8943..cd0e229ff 100644 --- a/wrapper/MM/LJParameterName3D.pypp.cpp +++ b/wrapper/MM/LJParameterName3D.pypp.cpp @@ -47,6 +47,8 @@ SireMM::LJParameterName3D __copy__(const SireMM::LJParameterName3D &other){ retu const char* pvt_get_name(const SireMM::LJParameterName3D&){ return "SireMM::LJParameterName3D";} +#include "Helpers/release_gil_policy.hpp" + void register_LJParameterName3D_class(){ { //::SireMM::LJParameterName3D diff --git a/wrapper/MM/LJPerturbation.pypp.cpp b/wrapper/MM/LJPerturbation.pypp.cpp index dd3637493..3373185b0 100644 --- a/wrapper/MM/LJPerturbation.pypp.cpp +++ b/wrapper/MM/LJPerturbation.pypp.cpp @@ -11,6 +11,8 @@ namespace bp = boost::python; #include "SireCAS/values.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -33,6 +35,8 @@ SireMM::LJPerturbation __copy__(const SireMM::LJPerturbation &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LJPerturbation_class(){ { //::SireMM::LJPerturbation @@ -95,6 +99,7 @@ void register_LJPerturbation_class(){ LJPerturbation_exposer.def( "mapAB" , mapAB_function_value + , bp::release_gil_policy() , "Return whether or not this maps A and B" ); } @@ -106,6 +111,7 @@ void register_LJPerturbation_class(){ LJPerturbation_exposer.def( "mapRMinEpsilon" , mapRMinEpsilon_function_value + , bp::release_gil_policy() , "Return whether or not this maps r_min and epsilon" ); } @@ -117,6 +123,7 @@ void register_LJPerturbation_class(){ LJPerturbation_exposer.def( "mapSigmaEpsilon" , mapSigmaEpsilon_function_value + , bp::release_gil_policy() , "Return whether or not this maps sigma and epsilon" ); } @@ -168,6 +175,7 @@ void register_LJPerturbation_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +188,7 @@ void register_LJPerturbation_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -191,6 +200,7 @@ void register_LJPerturbation_class(){ LJPerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return the properties required or changed by this perturbation" ); } @@ -215,6 +225,7 @@ void register_LJPerturbation_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute the identities in identities in all of the mapping functions\nused by this perturbation. This is useful if, for example, you want to\nswitch from using lambda to control the perturbation to using alpha, e.g.\n" ); } @@ -226,6 +237,7 @@ void register_LJPerturbation_class(){ LJPerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this perturbation" ); } @@ -237,6 +249,7 @@ void register_LJPerturbation_class(){ LJPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -249,6 +262,7 @@ void register_LJPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/MM/LJPotentialInterface_InterLJPotential_.pypp.cpp b/wrapper/MM/LJPotentialInterface_InterLJPotential_.pypp.cpp index fe4af2421..13123eeaa 100644 --- a/wrapper/MM/LJPotentialInterface_InterLJPotential_.pypp.cpp +++ b/wrapper/MM/LJPotentialInterface_InterLJPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::LJPotentialInterface&){ return "SireMM::LJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_LJPotentialInterface_InterLJPotential__class(){ { //::SireMM::LJPotentialInterface< SireMM::InterLJPotential > @@ -49,6 +51,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +64,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ LJPotentialInterface_InterLJPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -87,7 +91,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -101,6 +105,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("combiningrules") ) + , bp::release_gil_policy() , "" ); } @@ -114,6 +119,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +133,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -140,6 +147,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -152,7 +160,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ LJPotentialInterface_InterLJPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -165,7 +173,7 @@ void register_LJPotentialInterface_InterLJPotential__class(){ LJPotentialInterface_InterLJPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } diff --git a/wrapper/MM/LJPotentialInterface_IntraLJPotential_.pypp.cpp b/wrapper/MM/LJPotentialInterface_IntraLJPotential_.pypp.cpp index 965728349..125e56e7f 100644 --- a/wrapper/MM/LJPotentialInterface_IntraLJPotential_.pypp.cpp +++ b/wrapper/MM/LJPotentialInterface_IntraLJPotential_.pypp.cpp @@ -20,6 +20,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::LJPotentialInterface&){ return "SireMM::LJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_LJPotentialInterface_IntraLJPotential__class(){ { //::SireMM::LJPotentialInterface< SireMM::IntraLJPotential > @@ -49,6 +51,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +64,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ LJPotentialInterface_IntraLJPotential__exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -87,7 +91,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -101,6 +105,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("combiningrules") ) + , bp::release_gil_policy() , "" ); } @@ -114,6 +119,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +133,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ "setSpace" , setSpace_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -140,6 +147,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("new_switchfunc") ) + , bp::release_gil_policy() , "" ); } @@ -152,7 +160,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ LJPotentialInterface_IntraLJPotential__exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -165,7 +173,7 @@ void register_LJPotentialInterface_IntraLJPotential__class(){ LJPotentialInterface_IntraLJPotential__exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } diff --git a/wrapper/MM/LJProbe.pypp.cpp b/wrapper/MM/LJProbe.pypp.cpp index 005afbb13..f0d4fe0ae 100644 --- a/wrapper/MM/LJProbe.pypp.cpp +++ b/wrapper/MM/LJProbe.pypp.cpp @@ -21,6 +21,8 @@ SireMM::LJProbe __copy__(const SireMM::LJProbe &other){ return SireMM::LJProbe(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_LJProbe_class(){ { //::SireMM::LJProbe @@ -66,6 +68,7 @@ void register_LJProbe_class(){ LJProbe_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/LJScaleFactor.pypp.cpp b/wrapper/MM/LJScaleFactor.pypp.cpp index 30600a672..97d472c8d 100644 --- a/wrapper/MM/LJScaleFactor.pypp.cpp +++ b/wrapper/MM/LJScaleFactor.pypp.cpp @@ -23,6 +23,8 @@ SireMM::LJScaleFactor __copy__(const SireMM::LJScaleFactor &other){ return SireM const char* pvt_get_name(const SireMM::LJScaleFactor&){ return "SireMM::LJScaleFactor";} +#include "Helpers/release_gil_policy.hpp" + void register_LJScaleFactor_class(){ { //::SireMM::LJScaleFactor @@ -38,6 +40,7 @@ void register_LJScaleFactor_class(){ LJScaleFactor_exposer.def( "lj" , lj_function_value + , bp::release_gil_policy() , "Return the LJ parameter scaling factor" ); } @@ -64,6 +67,7 @@ void register_LJScaleFactor_class(){ LJScaleFactor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -75,6 +79,7 @@ void register_LJScaleFactor_class(){ LJScaleFactor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/MMDetail.pypp.cpp b/wrapper/MM/MMDetail.pypp.cpp index 7412044ec..7ed62195e 100644 --- a/wrapper/MM/MMDetail.pypp.cpp +++ b/wrapper/MM/MMDetail.pypp.cpp @@ -25,6 +25,8 @@ SireMM::MMDetail __copy__(const SireMM::MMDetail &other){ return SireMM::MMDetai #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MMDetail_class(){ { //::SireMM::MMDetail @@ -41,6 +43,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "angleStyle" , angleStyle_function_value + , bp::release_gil_policy() , "Return the angle model used by this forcefield" ); } @@ -52,6 +55,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "bondStyle" , bondStyle_function_value + , bp::release_gil_policy() , "Return the bond model used by this forcefield" ); } @@ -63,6 +67,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "combiningRules" , combiningRules_function_value + , bp::release_gil_policy() , "Return the combining rules for this forcefield" ); } @@ -74,6 +79,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "dihedralStyle" , dihedralStyle_function_value + , bp::release_gil_policy() , "Return the dihedral model uses by this forcefield" ); } @@ -85,6 +91,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "electrostatic14ScaleFactor" , electrostatic14ScaleFactor_function_value + , bp::release_gil_policy() , "Return the electrostatic 1-4 scale factor" ); } @@ -96,6 +103,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "electrostaticStyle" , electrostaticStyle_function_value + , bp::release_gil_policy() , "Return the electrostatic model used by this forcefield" ); } @@ -108,6 +116,7 @@ void register_MMDetail_class(){ "guessFrom" , guessFrom_function_value , ( bp::arg("combrule"), bp::arg("elecstyle"), bp::arg("vdwstyle"), bp::arg("elec14"), bp::arg("vdw14"), bp::arg("bondstyle"), bp::arg("anglestyle"), bp::arg("dihedralstyle") ) + , bp::release_gil_policy() , "Function used to guess the forcefield from the passed set of conditions.\nThis returns a null MMDetail object if we cant guess" ); } @@ -119,6 +128,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "isAmberStyle" , isAmberStyle_function_value + , bp::release_gil_policy() , "Return whether or not this is an Amber-style forcefield. An Amber-style\nforcefield is one that uses only coulombs law between point charges for electrostatics,\nLJ with arithmetic combining rules for vdw, harmonic bonds and angles and a\nset of cosine functions for dihedrals" ); } @@ -131,6 +141,7 @@ void register_MMDetail_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this forcefield is compatible with other" ); } @@ -142,6 +153,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "isOPLS" , isOPLS_function_value + , bp::release_gil_policy() , "Return whether or not this is a GROMACS OPLS force field." ); } @@ -168,6 +180,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string form of this forcefield" ); } @@ -179,6 +192,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -190,6 +204,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesArithmeticCombiningRules" , usesArithmeticCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses arithmetic combining rules" ); } @@ -201,6 +216,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesBuckinghamTerm" , usesBuckinghamTerm_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses the Buckingham vdw model" ); } @@ -212,6 +228,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesCosineDihedrals" , usesCosineDihedrals_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses cosine-series dihedrals" ); } @@ -223,6 +240,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesCoulombCharges" , usesCoulombCharges_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses coulomb charges" ); } @@ -234,6 +252,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesGeometricCombiningRules" , usesGeometricCombiningRules_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses arithmetic combining rules" ); } @@ -245,6 +264,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesHarmonicAngles" , usesHarmonicAngles_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses harmonic angles" ); } @@ -256,6 +276,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesHarmonicBonds" , usesHarmonicBonds_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses harmonic bonds" ); } @@ -267,6 +288,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "usesLJTerm" , usesLJTerm_function_value + , bp::release_gil_policy() , "Return whether or not this forcefield uses the Lennard Jones vdw model" ); } @@ -278,6 +300,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "vdw14ScaleFactor" , vdw14ScaleFactor_function_value + , bp::release_gil_policy() , "Return the vdw 1-4 scale factor" ); } @@ -289,6 +312,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "vdwStyle" , vdwStyle_function_value + , bp::release_gil_policy() , "Return the vdw model used by this forcefield" ); } @@ -300,6 +324,7 @@ void register_MMDetail_class(){ MMDetail_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/Mover_Bond_.pypp.cpp b/wrapper/MM/Mover_Bond_.pypp.cpp new file mode 100644 index 000000000..1aa72685a --- /dev/null +++ b/wrapper/MM/Mover_Bond_.pypp.cpp @@ -0,0 +1,515 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "Mover_Bond_.pypp.hpp" + +namespace bp = boost::python; + +#include "SireBase/errors.h" + +#include "SireCAS/expression.h" + +#include "SireCAS/symbol.h" + +#include "SireCAS/values.h" + +#include "SireMol/errors.h" + +#include "SireMol/molecule.h" + +#include "SireMol/mover.hpp" + +#include "SireMol/selector.hpp" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "SireUnits/units.h" + +#include "bond.h" + +#include "selectorbond.h" + +#include "twoatomfunctions.h" + +#include + +#include "bond.h" + +#include "SireMaths/align.h" + +#include "SireMaths/axisset.h" + +#include "SireMaths/matrix.h" + +#include "SireMaths/quaternion.h" + +#include "SireMaths/rotate.h" + +#include "SireMaths/vectorproperty.h" + +#include "SireMol/errors.h" + +#include "SireUnits/units.h" + +#include "SireVol/coordgroup.h" + +#include "SireVol/space.h" + +#include "angleid.h" + +#include "atomcoords.h" + +#include "atommatcher.h" + +#include "atommatchers.h" + +#include "bondid.h" + +#include "connectivity.h" + +#include "dihedralid.h" + +#include "improperid.h" + +#include "mover.h" + +#include "tostring.h" + +#include "weightfunction.h" + +#include "mover.h" + +SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_Mover_Bond__class(){ + + { //::SireMol::Mover< SireMM::Bond > + typedef bp::class_< SireMol::Mover< SireMM::Bond >, bp::bases< SireMol::MoverBase, SireMM::Bond, SireMol::MoleculeView, SireBase::Property > > Mover_Bond__exposer_t; + Mover_Bond__exposer_t Mover_Bond__exposer = Mover_Bond__exposer_t( "Mover_Bond_", "", bp::init< >("") ); + bp::scope Mover_Bond__scope( Mover_Bond__exposer ); + Mover_Bond__exposer.def( bp::init< SireMM::Bond const & >(( bp::arg("view") ), "") ); + Mover_Bond__exposer.def( bp::init< SireMM::Bond const &, SireMol::AtomSelection const & >(( bp::arg("view"), bp::arg("movable_atoms") ), "") ); + Mover_Bond__exposer.def( bp::init< SireMol::Mover< SireMM::Bond > const & >(( bp::arg("other") ), "") ); + { //::SireMol::Mover< SireMM::Bond >::align + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::Bond >::align ); + + Mover_Bond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::align + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::Bond >::align ); + + Mover_Bond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::align + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::Bond >::align ); + + Mover_Bond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::align + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::Bond >::align ); + + Mover_Bond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::alignTo + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::Bond >::alignTo ); + + Mover_Bond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::alignTo + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::Bond >::alignTo ); + + Mover_Bond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::alignTo + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomSelection const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::Bond >::alignTo ); + + Mover_Bond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("aligning_atoms"), bp::arg("matcher"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::alignTo + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomSelection const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::Bond >::alignTo ); + + Mover_Bond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("aligning_atoms"), bp::arg("matcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::change + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*change_function_type)( ::SireMol::BondID const &,::SireUnits::Dimension::Length,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::Bond >::change ); + + Mover_Bond__exposer.def( + "change" + , change_function_value + , ( bp::arg("bond"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::change + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*change_function_type)( ::SireMol::AngleID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::Bond >::change ); + + Mover_Bond__exposer.def( + "change" + , change_function_value + , ( bp::arg("angle"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::change + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*change_function_type)( ::SireMol::DihedralID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::Bond >::change ); + + Mover_Bond__exposer.def( + "change" + , change_function_value + , ( bp::arg("dihedral"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::change + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*change_function_type)( ::SireMol::BondID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::Bond >::change ); + + Mover_Bond__exposer.def( + "change" + , change_function_value + , ( bp::arg("bond"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::change + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*change_function_type)( ::SireMol::ImproperID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::Bond >::change ); + + Mover_Bond__exposer.def( + "change" + , change_function_value + , ( bp::arg("improper"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::changeFrame + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*changeFrame_function_type)( ::SireMaths::AxisSet const &,::SireMaths::AxisSet const &,::SireBase::PropertyMap const & ) ; + changeFrame_function_type changeFrame_function_value( &::SireMol::Mover< SireMM::Bond >::changeFrame ); + + Mover_Bond__exposer.def( + "changeFrame" + , changeFrame_function_value + , ( bp::arg("from_frame"), bp::arg("to_frame"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::commit + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMM::Bond ( ::SireMol::Mover< SireMM::Bond >::*commit_function_type)( ) const; + commit_function_type commit_function_value( &::SireMol::Mover< SireMM::Bond >::commit ); + + Mover_Bond__exposer.def( + "commit" + , commit_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::mapInto + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*mapInto_function_type)( ::SireMaths::AxisSet const &,::SireBase::PropertyMap const & ) ; + mapInto_function_type mapInto_function_value( &::SireMol::Mover< SireMM::Bond >::mapInto ); + + Mover_Bond__exposer.def( + "mapInto" + , mapInto_function_value + , ( bp::arg("axes"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::operator= + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*assign_function_type)( ::SireMol::Mover< SireMM::Bond > const & ) ; + assign_function_type assign_function_value( &::SireMol::Mover< SireMM::Bond >::operator= ); + + Mover_Bond__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::operator= + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*assign_function_type)( ::SireMM::Bond const & ) ; + assign_function_type assign_function_value( &::SireMol::Mover< SireMM::Bond >::operator= ); + + Mover_Bond__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::rotate + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*rotate_function_type)( ::SireMaths::Quaternion const &,::SireMaths::Vector const &,::SireBase::PropertyMap const & ) ; + rotate_function_type rotate_function_value( &::SireMol::Mover< SireMM::Bond >::rotate ); + + Mover_Bond__exposer.def( + "rotate" + , rotate_function_value + , ( bp::arg("quat"), bp::arg("point"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::rotate + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*rotate_function_type)( ::SireMaths::Matrix const &,::SireMaths::Vector const &,::SireBase::PropertyMap const & ) ; + rotate_function_type rotate_function_value( &::SireMol::Mover< SireMM::Bond >::rotate ); + + Mover_Bond__exposer.def( + "rotate" + , rotate_function_value + , ( bp::arg("rotmat"), bp::arg("point"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::set + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*set_function_type)( ::SireMol::BondID const &,::SireUnits::Dimension::Length,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::Bond >::set ); + + Mover_Bond__exposer.def( + "set" + , set_function_value + , ( bp::arg("bond"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::set + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*set_function_type)( ::SireMol::AngleID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::Bond >::set ); + + Mover_Bond__exposer.def( + "set" + , set_function_value + , ( bp::arg("angle"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::set + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*set_function_type)( ::SireMol::DihedralID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::Bond >::set ); + + Mover_Bond__exposer.def( + "set" + , set_function_value + , ( bp::arg("dihedral"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::set + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*set_function_type)( ::SireMol::ImproperID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::Bond >::set ); + + Mover_Bond__exposer.def( + "set" + , set_function_value + , ( bp::arg("improper"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::setAll + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*setAll_function_type)( ::SireMol::DihedralID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + setAll_function_type setAll_function_value( &::SireMol::Mover< SireMM::Bond >::setAll ); + + Mover_Bond__exposer.def( + "setAll" + , setAll_function_value + , ( bp::arg("dihedral"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::toString + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::QString ( ::SireMol::Mover< SireMM::Bond >::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::Mover< SireMM::Bond >::toString ); + + Mover_Bond__exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::transform + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*transform_function_type)( ::SireMaths::Transform const &,::SireBase::PropertyMap const & ) ; + transform_function_type transform_function_value( &::SireMol::Mover< SireMM::Bond >::transform ); + + Mover_Bond__exposer.def( + "transform" + , transform_function_value + , ( bp::arg("transform"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::translate + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef ::SireMol::Mover< SireMM::Bond > & ( ::SireMol::Mover< SireMM::Bond >::*translate_function_type)( ::SireMaths::Vector const &,::SireBase::PropertyMap const & ) ; + translate_function_type translate_function_value( &::SireMol::Mover< SireMM::Bond >::translate ); + + Mover_Bond__exposer.def( + "translate" + , translate_function_value + , ( bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::Bond >::typeName + + typedef SireMol::Mover< SireMM::Bond > exported_class_t; + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::Mover< SireMM::Bond >::typeName ); + + Mover_Bond__exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + Mover_Bond__exposer.staticmethod( "typeName" ); + Mover_Bond__exposer.def( "__copy__", &__copy__); + Mover_Bond__exposer.def( "__deepcopy__", &__copy__); + Mover_Bond__exposer.def( "clone", &__copy__); + Mover_Bond__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); + Mover_Bond__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); + Mover_Bond__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); + } + +} diff --git a/wrapper/MM/Mover_Bond_.pypp.hpp b/wrapper/MM/Mover_Bond_.pypp.hpp new file mode 100644 index 000000000..8f95f0d3d --- /dev/null +++ b/wrapper/MM/Mover_Bond_.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef Mover_Bond__hpp__pyplusplus_wrapper +#define Mover_Bond__hpp__pyplusplus_wrapper + +void register_Mover_Bond__class(); + +#endif//Mover_Bond__hpp__pyplusplus_wrapper diff --git a/wrapper/MM/Mover_SelectorBond_.pypp.cpp b/wrapper/MM/Mover_SelectorBond_.pypp.cpp new file mode 100644 index 000000000..3e2a3ad31 --- /dev/null +++ b/wrapper/MM/Mover_SelectorBond_.pypp.cpp @@ -0,0 +1,513 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "Mover_SelectorBond_.pypp.hpp" + +namespace bp = boost::python; + +#include "SireBase/errors.h" + +#include "SireBase/slice.h" + +#include "SireCAS/symbol.h" + +#include "SireCAS/values.h" + +#include "SireID/index.h" + +#include "SireMol/molecule.h" + +#include "SireMol/mover.hpp" + +#include "SireMol/selector.hpp" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "SireUnits/units.h" + +#include "selectorbond.h" + +#include "twoatomfunctions.h" + +#include + +#include "selectorbond.h" + +#include "SireMaths/align.h" + +#include "SireMaths/axisset.h" + +#include "SireMaths/matrix.h" + +#include "SireMaths/quaternion.h" + +#include "SireMaths/rotate.h" + +#include "SireMaths/vectorproperty.h" + +#include "SireMol/errors.h" + +#include "SireUnits/units.h" + +#include "SireVol/coordgroup.h" + +#include "SireVol/space.h" + +#include "angleid.h" + +#include "atomcoords.h" + +#include "atommatcher.h" + +#include "atommatchers.h" + +#include "bondid.h" + +#include "connectivity.h" + +#include "dihedralid.h" + +#include "improperid.h" + +#include "mover.h" + +#include "tostring.h" + +#include "weightfunction.h" + +#include "mover.h" + +SireMol::Mover __copy__(const SireMol::Mover &other){ return SireMol::Mover(other); } + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_Mover_SelectorBond__class(){ + + { //::SireMol::Mover< SireMM::SelectorBond > + typedef bp::class_< SireMol::Mover< SireMM::SelectorBond >, bp::bases< SireMol::MoverBase, SireMM::SelectorBond, SireMol::MoleculeView, SireBase::Property > > Mover_SelectorBond__exposer_t; + Mover_SelectorBond__exposer_t Mover_SelectorBond__exposer = Mover_SelectorBond__exposer_t( "Mover_SelectorBond_", "", bp::init< >("") ); + bp::scope Mover_SelectorBond__scope( Mover_SelectorBond__exposer ); + Mover_SelectorBond__exposer.def( bp::init< SireMM::SelectorBond const & >(( bp::arg("view") ), "") ); + Mover_SelectorBond__exposer.def( bp::init< SireMM::SelectorBond const &, SireMol::AtomSelection const & >(( bp::arg("view"), bp::arg("movable_atoms") ), "") ); + Mover_SelectorBond__exposer.def( bp::init< SireMol::Mover< SireMM::SelectorBond > const & >(( bp::arg("other") ), "") ); + { //::SireMol::Mover< SireMM::SelectorBond >::align + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::SelectorBond >::align ); + + Mover_SelectorBond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::align + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::SelectorBond >::align ); + + Mover_SelectorBond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::align + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::SelectorBond >::align ); + + Mover_SelectorBond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::align + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*align_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + align_function_type align_function_value( &::SireMol::Mover< SireMM::SelectorBond >::align ); + + Mover_SelectorBond__exposer.def( + "align" + , align_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::alignTo + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::SelectorBond >::alignTo ); + + Mover_SelectorBond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::alignTo + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::SelectorBond >::alignTo ); + + Mover_SelectorBond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::alignTo + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomSelection const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::SelectorBond >::alignTo ); + + Mover_SelectorBond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("aligning_atoms"), bp::arg("matcher"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::alignTo + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*alignTo_function_type)( ::SireMol::MoleculeView const &,::SireMol::AtomSelection const &,::SireMol::AtomMatcher const &,::SireBase::PropertyMap const &,::SireBase::PropertyMap const & ) ; + alignTo_function_type alignTo_function_value( &::SireMol::Mover< SireMM::SelectorBond >::alignTo ); + + Mover_SelectorBond__exposer.def( + "alignTo" + , alignTo_function_value + , ( bp::arg("other"), bp::arg("aligning_atoms"), bp::arg("matcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::change + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*change_function_type)( ::SireMol::BondID const &,::SireUnits::Dimension::Length,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::SelectorBond >::change ); + + Mover_SelectorBond__exposer.def( + "change" + , change_function_value + , ( bp::arg("bond"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::change + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*change_function_type)( ::SireMol::AngleID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::SelectorBond >::change ); + + Mover_SelectorBond__exposer.def( + "change" + , change_function_value + , ( bp::arg("angle"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::change + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*change_function_type)( ::SireMol::DihedralID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::SelectorBond >::change ); + + Mover_SelectorBond__exposer.def( + "change" + , change_function_value + , ( bp::arg("dihedral"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::change + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*change_function_type)( ::SireMol::BondID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::SelectorBond >::change ); + + Mover_SelectorBond__exposer.def( + "change" + , change_function_value + , ( bp::arg("bond"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::change + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*change_function_type)( ::SireMol::ImproperID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + change_function_type change_function_value( &::SireMol::Mover< SireMM::SelectorBond >::change ); + + Mover_SelectorBond__exposer.def( + "change" + , change_function_value + , ( bp::arg("improper"), bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::changeFrame + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*changeFrame_function_type)( ::SireMaths::AxisSet const &,::SireMaths::AxisSet const &,::SireBase::PropertyMap const & ) ; + changeFrame_function_type changeFrame_function_value( &::SireMol::Mover< SireMM::SelectorBond >::changeFrame ); + + Mover_SelectorBond__exposer.def( + "changeFrame" + , changeFrame_function_value + , ( bp::arg("from_frame"), bp::arg("to_frame"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::commit + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMM::SelectorBond ( ::SireMol::Mover< SireMM::SelectorBond >::*commit_function_type)( ) const; + commit_function_type commit_function_value( &::SireMol::Mover< SireMM::SelectorBond >::commit ); + + Mover_SelectorBond__exposer.def( + "commit" + , commit_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::mapInto + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*mapInto_function_type)( ::SireMaths::AxisSet const &,::SireBase::PropertyMap const & ) ; + mapInto_function_type mapInto_function_value( &::SireMol::Mover< SireMM::SelectorBond >::mapInto ); + + Mover_SelectorBond__exposer.def( + "mapInto" + , mapInto_function_value + , ( bp::arg("axes"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::operator= + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*assign_function_type)( ::SireMol::Mover< SireMM::SelectorBond > const & ) ; + assign_function_type assign_function_value( &::SireMol::Mover< SireMM::SelectorBond >::operator= ); + + Mover_SelectorBond__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::operator= + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*assign_function_type)( ::SireMM::SelectorBond const & ) ; + assign_function_type assign_function_value( &::SireMol::Mover< SireMM::SelectorBond >::operator= ); + + Mover_SelectorBond__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::rotate + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*rotate_function_type)( ::SireMaths::Quaternion const &,::SireMaths::Vector const &,::SireBase::PropertyMap const & ) ; + rotate_function_type rotate_function_value( &::SireMol::Mover< SireMM::SelectorBond >::rotate ); + + Mover_SelectorBond__exposer.def( + "rotate" + , rotate_function_value + , ( bp::arg("quat"), bp::arg("point"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::rotate + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*rotate_function_type)( ::SireMaths::Matrix const &,::SireMaths::Vector const &,::SireBase::PropertyMap const & ) ; + rotate_function_type rotate_function_value( &::SireMol::Mover< SireMM::SelectorBond >::rotate ); + + Mover_SelectorBond__exposer.def( + "rotate" + , rotate_function_value + , ( bp::arg("rotmat"), bp::arg("point"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::set + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*set_function_type)( ::SireMol::BondID const &,::SireUnits::Dimension::Length,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::SelectorBond >::set ); + + Mover_SelectorBond__exposer.def( + "set" + , set_function_value + , ( bp::arg("bond"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::set + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*set_function_type)( ::SireMol::AngleID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::SelectorBond >::set ); + + Mover_SelectorBond__exposer.def( + "set" + , set_function_value + , ( bp::arg("angle"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::set + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*set_function_type)( ::SireMol::DihedralID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::SelectorBond >::set ); + + Mover_SelectorBond__exposer.def( + "set" + , set_function_value + , ( bp::arg("dihedral"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::set + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*set_function_type)( ::SireMol::ImproperID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + set_function_type set_function_value( &::SireMol::Mover< SireMM::SelectorBond >::set ); + + Mover_SelectorBond__exposer.def( + "set" + , set_function_value + , ( bp::arg("improper"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::setAll + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*setAll_function_type)( ::SireMol::DihedralID const &,::SireUnits::Dimension::Angle,::SireBase::PropertyMap const & ) ; + setAll_function_type setAll_function_value( &::SireMol::Mover< SireMM::SelectorBond >::setAll ); + + Mover_SelectorBond__exposer.def( + "setAll" + , setAll_function_value + , ( bp::arg("dihedral"), bp::arg("value"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::toString + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::QString ( ::SireMol::Mover< SireMM::SelectorBond >::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::Mover< SireMM::SelectorBond >::toString ); + + Mover_SelectorBond__exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::transform + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*transform_function_type)( ::SireMaths::Transform const &,::SireBase::PropertyMap const & ) ; + transform_function_type transform_function_value( &::SireMol::Mover< SireMM::SelectorBond >::transform ); + + Mover_SelectorBond__exposer.def( + "transform" + , transform_function_value + , ( bp::arg("transform"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::translate + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef ::SireMol::Mover< SireMM::SelectorBond > & ( ::SireMol::Mover< SireMM::SelectorBond >::*translate_function_type)( ::SireMaths::Vector const &,::SireBase::PropertyMap const & ) ; + translate_function_type translate_function_value( &::SireMol::Mover< SireMM::SelectorBond >::translate ); + + Mover_SelectorBond__exposer.def( + "translate" + , translate_function_value + , ( bp::arg("delta"), bp::arg("map")=SireBase::PropertyMap() ) + , bp::return_self< >() + , "" ); + + } + { //::SireMol::Mover< SireMM::SelectorBond >::typeName + + typedef SireMol::Mover< SireMM::SelectorBond > exported_class_t; + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::Mover< SireMM::SelectorBond >::typeName ); + + Mover_SelectorBond__exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + Mover_SelectorBond__exposer.staticmethod( "typeName" ); + Mover_SelectorBond__exposer.def( "__copy__", &__copy__); + Mover_SelectorBond__exposer.def( "__deepcopy__", &__copy__); + Mover_SelectorBond__exposer.def( "clone", &__copy__); + Mover_SelectorBond__exposer.def( "__str__", &__str__< ::SireMol::Mover > ); + Mover_SelectorBond__exposer.def( "__repr__", &__str__< ::SireMol::Mover > ); + Mover_SelectorBond__exposer.def( "__len__", &__len_size< ::SireMol::Mover > ); + } + +} diff --git a/wrapper/MM/Mover_SelectorBond_.pypp.hpp b/wrapper/MM/Mover_SelectorBond_.pypp.hpp new file mode 100644 index 000000000..7977960f4 --- /dev/null +++ b/wrapper/MM/Mover_SelectorBond_.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef Mover_SelectorBond__hpp__pyplusplus_wrapper +#define Mover_SelectorBond__hpp__pyplusplus_wrapper + +void register_Mover_SelectorBond__class(); + +#endif//Mover_SelectorBond__hpp__pyplusplus_wrapper diff --git a/wrapper/MM/MultiCLJComponent.pypp.cpp b/wrapper/MM/MultiCLJComponent.pypp.cpp index ecfa43e74..24b7710a8 100644 --- a/wrapper/MM/MultiCLJComponent.pypp.cpp +++ b/wrapper/MM/MultiCLJComponent.pypp.cpp @@ -24,6 +24,8 @@ SireMM::MultiCLJComponent __copy__(const SireMM::MultiCLJComponent &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MultiCLJComponent_class(){ @@ -42,6 +44,7 @@ void register_MultiCLJComponent_class(){ "add" , add_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Add new CLJ components with the passed key. This returns the index\nof the new component" ); } @@ -54,6 +57,7 @@ void register_MultiCLJComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("cljnrg") ) + , bp::release_gil_policy() , "Change the energy in the forcefield from the passed cljnrg object" ); } @@ -65,7 +69,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "coulomb" , coulomb_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the default coulomb component" ); } @@ -78,7 +82,7 @@ void register_MultiCLJComponent_class(){ "coulomb" , coulomb_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the coulomb component for the key key" ); } @@ -90,6 +94,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of CLJComponents number of keys" ); } @@ -102,6 +107,7 @@ void register_MultiCLJComponent_class(){ "hasKey" , hasKey_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not there is a function with the associated key" ); } @@ -114,6 +120,7 @@ void register_MultiCLJComponent_class(){ "indexOf" , indexOf_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the index of the component with key key" ); } @@ -125,6 +132,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "keys" , keys_function_value + , bp::release_gil_policy() , "Return all of the keys for the different CLJComponents" ); } @@ -136,7 +144,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "lj" , lj_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the default LJ component" ); } @@ -149,7 +157,7 @@ void register_MultiCLJComponent_class(){ "lj" , lj_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the LJ component for the key key" ); } @@ -161,6 +169,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "nKeys" , nKeys_function_value + , bp::release_gil_policy() , "Return the number of CLJComponents number of keys" ); } @@ -188,6 +197,7 @@ void register_MultiCLJComponent_class(){ "remove" , remove_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Remove the component with key key. This returns the index of the component\nthat was removed, or -1 if there was no such component" ); } @@ -199,6 +209,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "Remove all keys from the index (except default)" ); } @@ -211,6 +222,7 @@ void register_MultiCLJComponent_class(){ "rename" , rename_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return a copy of this MultiCLJComponent that has been renamed for\nthe passed forcefield" ); } @@ -223,6 +235,7 @@ void register_MultiCLJComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("cljnrg") ) + , bp::release_gil_policy() , "Set the energy in the forcefield from the passed cljnrg object" ); } @@ -234,6 +247,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of CLJComponents number of keys" ); } @@ -245,6 +259,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the symbols used by these components" ); } @@ -256,6 +271,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of these components" ); } @@ -267,7 +283,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the default total component" ); } @@ -280,7 +296,7 @@ void register_MultiCLJComponent_class(){ "total" , total_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the total component for the key key" ); } @@ -292,6 +308,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -303,6 +320,7 @@ void register_MultiCLJComponent_class(){ MultiCLJComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/NoCutoff.pypp.cpp b/wrapper/MM/NoCutoff.pypp.cpp index 74a69884b..42dc139d3 100644 --- a/wrapper/MM/NoCutoff.pypp.cpp +++ b/wrapper/MM/NoCutoff.pypp.cpp @@ -33,6 +33,8 @@ SireMM::NoCutoff __copy__(const SireMM::NoCutoff &other){ return SireMM::NoCutof #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NoCutoff_class(){ { //::SireMM::NoCutoff @@ -49,6 +51,7 @@ void register_NoCutoff_class(){ "dElectrostaticScaleFactor" , dElectrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the derivative of the electrostatic scale factor - this\nwill always be 0 as there is no cutoff" ); } @@ -61,6 +64,7 @@ void register_NoCutoff_class(){ "dVDWScaleFactor" , dVDWScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the derivative of the VDW scale factor - this will\nalways be 0 as there is no cutoff" ); } @@ -73,6 +77,7 @@ void register_NoCutoff_class(){ "electrostaticScaleFactor" , electrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the scale factor for the electrostatic energies - this\nwill always be 1.0, as there are no cutoffs" ); } @@ -99,6 +104,7 @@ void register_NoCutoff_class(){ NoCutoff_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this switching function" ); } @@ -110,6 +116,7 @@ void register_NoCutoff_class(){ NoCutoff_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_NoCutoff_class(){ "vdwScaleFactor" , vdwScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the scale factor for the vdw energies - this\nwill always be 1.0, as there are no cutoffs" ); } diff --git a/wrapper/MM/NullCLJFunction.pypp.cpp b/wrapper/MM/NullCLJFunction.pypp.cpp index 15f8bb91e..be8aff473 100644 --- a/wrapper/MM/NullCLJFunction.pypp.cpp +++ b/wrapper/MM/NullCLJFunction.pypp.cpp @@ -55,6 +55,8 @@ SireMM::NullCLJFunction __copy__(const SireMM::NullCLJFunction &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullCLJFunction_class(){ { //::SireMM::NullCLJFunction @@ -85,6 +87,7 @@ void register_NullCLJFunction_class(){ NullCLJFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +99,7 @@ void register_NullCLJFunction_class(){ NullCLJFunction_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/NullRestraint.pypp.cpp b/wrapper/MM/NullRestraint.pypp.cpp index 2c063876d..0bcf091e3 100644 --- a/wrapper/MM/NullRestraint.pypp.cpp +++ b/wrapper/MM/NullRestraint.pypp.cpp @@ -41,6 +41,8 @@ SireMM::NullRestraint __copy__(const SireMM::NullRestraint &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullRestraint_class(){ { //::SireMM::NullRestraint @@ -56,6 +58,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "Return the symbols that are built into this restraint" ); } @@ -67,6 +70,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "builtinValues" , builtinValues_function_value + , bp::release_gil_policy() , "Return the values that are built into this restraint" ); } @@ -79,6 +83,7 @@ void register_NullRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "There are no molecules in the NullRestraint" ); } @@ -91,6 +96,7 @@ void register_NullRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "There are no molecules in the NullRestraint" ); } @@ -103,6 +109,7 @@ void register_NullRestraint_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this restraint with respect to the\nsymbol symbol\nThrow: SireCAS::unavailable_differential\n" ); } @@ -114,6 +121,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "The null restraint has no energy" ); } @@ -150,6 +158,7 @@ void register_NullRestraint_class(){ "getValue" , getValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the value of the symbol symbol in this restraint. This\nraises an exception if this symbol is not used\nThrow: SireCAS::missing_symbol\n" ); } @@ -162,6 +171,7 @@ void register_NullRestraint_class(){ "hasValue" , hasValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return whether or not this restraint has a value for the symbol symbol" ); } @@ -173,6 +183,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "There are no molecules in the NullRestraint" ); } @@ -200,6 +211,7 @@ void register_NullRestraint_class(){ "setValue" , setValue_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value of the symbol symbol in this restraint to value.\nThis does nothing if this symbol is not used in this restraint" ); } @@ -211,6 +223,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the symbols uses by this restraint" ); } @@ -222,6 +235,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this restraint" ); } @@ -233,6 +247,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -245,6 +260,7 @@ void register_NullRestraint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "The null restraint cannot be updated" ); } @@ -257,6 +273,7 @@ void register_NullRestraint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "The null restraint cannot be updated" ); } @@ -268,6 +285,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "userSymbols" , userSymbols_function_value + , bp::release_gil_policy() , "Return the symbols that can be set by the user" ); } @@ -279,6 +297,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "userValues" , userValues_function_value + , bp::release_gil_policy() , "Return the values that have been supplied by the user" ); } @@ -291,6 +310,7 @@ void register_NullRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "There are no molecules in the NullRestraint" ); } @@ -303,6 +323,7 @@ void register_NullRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "There are no molecules in the NullRestraint" ); } @@ -314,6 +335,7 @@ void register_NullRestraint_class(){ NullRestraint_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "Return all of the values of all of the symbols used in this restraint" ); } diff --git a/wrapper/MM/Restraint.pypp.cpp b/wrapper/MM/Restraint.pypp.cpp index 39be4d81c..c05646e6c 100644 --- a/wrapper/MM/Restraint.pypp.cpp +++ b/wrapper/MM/Restraint.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Restraint_class(){ { //::SireMM::Restraint @@ -53,6 +55,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "" ); } @@ -64,6 +67,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "builtinValues" , builtinValues_function_value + , bp::release_gil_policy() , "" ); } @@ -76,6 +80,7 @@ void register_Restraint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +93,7 @@ void register_Restraint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_Restraint_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "" ); } @@ -123,6 +131,7 @@ void register_Restraint_class(){ "getValue" , getValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +144,7 @@ void register_Restraint_class(){ "hasValue" , hasValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "" ); } @@ -146,6 +156,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +181,7 @@ void register_Restraint_class(){ "setValue" , setValue_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -181,6 +193,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +205,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -203,6 +217,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -215,6 +230,7 @@ void register_Restraint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "" ); } @@ -227,6 +243,7 @@ void register_Restraint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -238,6 +255,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "userSymbols" , userSymbols_function_value + , bp::release_gil_policy() , "" ); } @@ -249,6 +267,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "userValues" , userValues_function_value + , bp::release_gil_policy() , "" ); } @@ -261,6 +280,7 @@ void register_Restraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +292,7 @@ void register_Restraint_class(){ Restraint_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/Restraint3D.pypp.cpp b/wrapper/MM/Restraint3D.pypp.cpp index 40c0c3cf1..e8bf507b5 100644 --- a/wrapper/MM/Restraint3D.pypp.cpp +++ b/wrapper/MM/Restraint3D.pypp.cpp @@ -40,6 +40,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Restraint3D_class(){ { //::SireMM::Restraint3D @@ -79,6 +81,7 @@ void register_Restraint3D_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the 3D space in which this restraint operates" ); } @@ -90,7 +93,7 @@ void register_Restraint3D_class(){ Restraint3D_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the 3D space in which this restraint operates" ); } @@ -102,6 +105,7 @@ void register_Restraint3D_class(){ Restraint3D_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -114,6 +118,7 @@ void register_Restraint3D_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_Restraint3D_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/RestraintComponent.pypp.cpp b/wrapper/MM/RestraintComponent.pypp.cpp index 9374027f4..fc408d648 100644 --- a/wrapper/MM/RestraintComponent.pypp.cpp +++ b/wrapper/MM/RestraintComponent.pypp.cpp @@ -20,6 +20,8 @@ SireMM::RestraintComponent __copy__(const SireMM::RestraintComponent &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RestraintComponent_class(){ { //::SireMM::RestraintComponent @@ -38,6 +40,7 @@ void register_RestraintComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Change the restraint component of the energy in the forcefield ff\nby delta" ); } @@ -50,6 +53,7 @@ void register_RestraintComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("nrg") ) + , bp::release_gil_policy() , "Set the restraint component of the energy in the forcefield ff\nto equal to the passed RestraintEnergy" ); } @@ -61,6 +65,7 @@ void register_RestraintComponent_class(){ RestraintComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -72,7 +77,7 @@ void register_RestraintComponent_class(){ RestraintComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -84,6 +89,7 @@ void register_RestraintComponent_class(){ RestraintComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_RestraintComponent_class(){ RestraintComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/RestraintFF.pypp.cpp b/wrapper/MM/RestraintFF.pypp.cpp index d2c87d1a6..e48a6c696 100644 --- a/wrapper/MM/RestraintFF.pypp.cpp +++ b/wrapper/MM/RestraintFF.pypp.cpp @@ -44,6 +44,8 @@ SireMM::RestraintFF __copy__(const SireMM::RestraintFF &other){ return SireMM::R #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_RestraintFF_class(){ @@ -63,6 +65,7 @@ void register_RestraintFF_class(){ "add" , add_function_value , ( bp::arg("restraint") ) + , bp::release_gil_policy() , "Add the passed restraint to this forcefield. This does nothing\nif this restraint is already part of this forcefield. This returns\nwhether or not this changes this forcefield" ); } @@ -74,6 +77,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "Return all of the built-in symbols used by the restraints\nin this forcefield" ); } @@ -85,7 +89,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the components of this forcefield" ); } @@ -98,6 +102,7 @@ void register_RestraintFF_class(){ "contains" , contains_function_value , ( bp::arg("restraint") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains the restraint\nrestraint" ); } @@ -110,6 +115,7 @@ void register_RestraintFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains a property called name" ); } @@ -122,6 +128,7 @@ void register_RestraintFF_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return a copy of this forcefield where all of the restraints\nhave been differentiated with respect to symbol. The returned\nforcefield will contain the same molecules in the same state\nas they are in this forcefield, and will be called\nd(forcefield_name)d(symbol)\n" ); } @@ -230,6 +237,7 @@ void register_RestraintFF_class(){ "getValue" , getValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the value of the user-supplied symbol symbol" ); } @@ -242,6 +250,7 @@ void register_RestraintFF_class(){ "hasValue" , hasValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return whether or not there is a user-supplied value with the\nsymbol symbol" ); } @@ -253,6 +262,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Force recalculation of the restraint energy from scratch" ); } @@ -264,6 +274,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "nRestraints" , nRestraints_function_value + , bp::release_gil_policy() , "Return the number of restraints in this forcefield" ); } @@ -351,7 +362,7 @@ void register_RestraintFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the property called name\nThrow: SireBase::missing_property\n" ); } @@ -364,6 +375,7 @@ void register_RestraintFF_class(){ "remove" , remove_function_value , ( bp::arg("restraint") ) + , bp::release_gil_policy() , "Remove the restraint restraint from this forcefield. This does\nnothing if this restraint is not in this forcefield. This returns\nwhether or not the restraint was removed." ); } @@ -376,6 +388,7 @@ void register_RestraintFF_class(){ "removeRestraintAt" , removeRestraintAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the ith restraint\nThrow: SireError::invalid_index\n" ); } @@ -388,7 +401,7 @@ void register_RestraintFF_class(){ "restraintAt" , restraintAt_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith restraint\nThrow: SireError::index_error\n" ); } @@ -400,6 +413,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "restraints" , restraints_function_value + , bp::release_gil_policy() , "Return the array of all restraints" ); } @@ -412,6 +426,7 @@ void register_RestraintFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the property name to the value property\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -424,6 +439,7 @@ void register_RestraintFF_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used by all of the restraints in this forcefield.\nThrow: SireVol::incompatible_space\n" ); } @@ -436,6 +452,7 @@ void register_RestraintFF_class(){ "setValue" , setValue_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value of the user symbol symbol to the value value.\nThis will only work if there is a restraint in this forcefield\nthat has this symbol. This returns whether or not this\nchanges the forcefield. This raises an exception if you\nare trying to set the value of a built-in symbol\nThrow: SireError::invalid_arg\n" ); } @@ -447,7 +464,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the space used by this forcefield" ); } @@ -459,6 +476,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the symbols used in this forcefield - this includes\nboth the user-supplied symbols and the built-in symbols" ); } @@ -470,6 +488,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -481,6 +500,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "userSymbols" , userSymbols_function_value + , bp::release_gil_policy() , "Return all of the user-supplied symbols for the restraints\nin this forcefield" ); } @@ -492,6 +512,7 @@ void register_RestraintFF_class(){ RestraintFF_exposer.def( "userValues" , userValues_function_value + , bp::release_gil_policy() , "Return all of the values for the user-supplied values in the\nrestraints in this forcefield" ); } diff --git a/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp b/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp index 9eac52e74..cd7f4e4da 100644 --- a/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp +++ b/wrapper/MM/ScaledCLJParameterNames3D.pypp.cpp @@ -45,6 +45,8 @@ SireMM::ScaledCLJParameterNames3D __copy__(const SireMM::ScaledCLJParameterNames const char* pvt_get_name(const SireMM::ScaledCLJParameterNames3D&){ return "SireMM::ScaledCLJParameterNames3D";} +#include "Helpers/release_gil_policy.hpp" + void register_ScaledCLJParameterNames3D_class(){ { //::SireMM::ScaledCLJParameterNames3D diff --git a/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp b/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp index 0a1961d5a..cd0121fbe 100644 --- a/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp +++ b/wrapper/MM/ScaledChargeParameterNames3D.pypp.cpp @@ -43,6 +43,8 @@ SireMM::ScaledChargeParameterNames3D __copy__(const SireMM::ScaledChargeParamete const char* pvt_get_name(const SireMM::ScaledChargeParameterNames3D&){ return "SireMM::ScaledChargeParameterNames3D";} +#include "Helpers/release_gil_policy.hpp" + void register_ScaledChargeParameterNames3D_class(){ { //::SireMM::ScaledChargeParameterNames3D diff --git a/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp b/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp index 3e152c1ff..95a4831bb 100644 --- a/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp +++ b/wrapper/MM/ScaledLJParameterNames3D.pypp.cpp @@ -47,6 +47,8 @@ SireMM::ScaledLJParameterNames3D __copy__(const SireMM::ScaledLJParameterNames3D const char* pvt_get_name(const SireMM::ScaledLJParameterNames3D&){ return "SireMM::ScaledLJParameterNames3D";} +#include "Helpers/release_gil_policy.hpp" + void register_ScaledLJParameterNames3D_class(){ { //::SireMM::ScaledLJParameterNames3D diff --git a/wrapper/MM/SelectorBond.pypp.cpp b/wrapper/MM/SelectorBond.pypp.cpp new file mode 100644 index 000000000..8f20cd7ad --- /dev/null +++ b/wrapper/MM/SelectorBond.pypp.cpp @@ -0,0 +1,650 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorBond.pypp.hpp" + +namespace bp = boost::python; + +#include "SireBase/errors.h" + +#include "SireBase/slice.h" + +#include "SireCAS/symbol.h" + +#include "SireCAS/values.h" + +#include "SireID/index.h" + +#include "SireMol/molecule.h" + +#include "SireMol/mover.hpp" + +#include "SireMol/selector.hpp" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "SireUnits/units.h" + +#include "selectorbond.h" + +#include "twoatomfunctions.h" + +#include + +#include "selectorbond.h" + +SireMM::SelectorBond __copy__(const SireMM::SelectorBond &other){ return SireMM::SelectorBond(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorBond_class(){ + + { //::SireMM::SelectorBond + typedef bp::class_< SireMM::SelectorBond, bp::bases< SireMol::MoleculeView, SireBase::Property > > SelectorBond_exposer_t; + SelectorBond_exposer_t SelectorBond_exposer = SelectorBond_exposer_t( "SelectorBond", "This provides a Selector-style interface for multiple bonds", bp::init< >("") ); + bp::scope SelectorBond_scope( SelectorBond_exposer ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeData const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("molecule"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeView const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("molecule"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeView const &, QList< SireMol::BondID > const & >(( bp::arg("molecule"), bp::arg("bonds") ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::AtomID const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("molecule"), bp::arg("atom"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::AtomID const &, SireMol::AtomID const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("molecule"), bp::arg("atom0"), bp::arg("atom1"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeView const &, SireMol::AtomID const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("molecule"), bp::arg("atom"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeView const &, SireMol::BondID const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("molecule"), bp::arg("atom"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::MoleculeView const &, SireMol::AtomID const &, SireMol::AtomID const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("molecule"), bp::arg("atom0"), bp::arg("atom1"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::Selector< SireMol::Atom > const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("atoms"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMol::Selector< SireMol::Atom > const &, SireMol::Selector< SireMol::Atom > const &, bp::optional< SireBase::PropertyMap const & > >(( bp::arg("atoms0"), bp::arg("atoms1"), bp::arg("map")=SireBase::PropertyMap() ), "") ); + SelectorBond_exposer.def( bp::init< SireMM::SelectorBond const & >(( bp::arg("other") ), "") ); + { //::SireMM::SelectorBond::IDs + + typedef ::QList< SireMol::BondID > ( ::SireMM::SelectorBond::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMM::SelectorBond::IDs ); + + SelectorBond_exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::add + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*add_function_type)( ::SireMM::Bond const & ) const; + add_function_type add_function_value( &::SireMM::SelectorBond::add ); + + SelectorBond_exposer.def( + "add" + , add_function_value + , ( bp::arg("bond") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::add + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*add_function_type)( ::SireMM::SelectorBond const & ) const; + add_function_type add_function_value( &::SireMM::SelectorBond::add ); + + SelectorBond_exposer.def( + "add" + , add_function_value + , ( bp::arg("other") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::count + + typedef int ( ::SireMM::SelectorBond::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMM::SelectorBond::count ); + + SelectorBond_exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::energies + + typedef ::QList< SireUnits::Dimension::PhysUnit< 1, 2, -2, 0, 0, -1, 0 > > ( ::SireMM::SelectorBond::*energies_function_type)( ) const; + energies_function_type energies_function_value( &::SireMM::SelectorBond::energies ); + + SelectorBond_exposer.def( + "energies" + , energies_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::energies + + typedef ::QList< SireUnits::Dimension::PhysUnit< 1, 2, -2, 0, 0, -1, 0 > > ( ::SireMM::SelectorBond::*energies_function_type)( ::SireBase::PropertyMap const & ) const; + energies_function_type energies_function_value( &::SireMM::SelectorBond::energies ); + + SelectorBond_exposer.def( + "energies" + , energies_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::energy + + typedef ::SireUnits::Dimension::MolarEnergy ( ::SireMM::SelectorBond::*energy_function_type)( ) const; + energy_function_type energy_function_value( &::SireMM::SelectorBond::energy ); + + SelectorBond_exposer.def( + "energy" + , energy_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::energy + + typedef ::SireUnits::Dimension::MolarEnergy ( ::SireMM::SelectorBond::*energy_function_type)( ::SireBase::PropertyMap const & ) const; + energy_function_type energy_function_value( &::SireMM::SelectorBond::energy ); + + SelectorBond_exposer.def( + "energy" + , energy_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::evaluate + + typedef ::SireMol::Evaluator ( ::SireMM::SelectorBond::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMM::SelectorBond::evaluate ); + + SelectorBond_exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::hasMetadata + + typedef bool ( ::SireMM::SelectorBond::*hasMetadata_function_type)( ::SireBase::PropertyName const & ) const; + hasMetadata_function_type hasMetadata_function_value( &::SireMM::SelectorBond::hasMetadata ); + + SelectorBond_exposer.def( + "hasMetadata" + , hasMetadata_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::hasMetadata + + typedef bool ( ::SireMM::SelectorBond::*hasMetadata_function_type)( ::SireBase::PropertyName const &,::SireBase::PropertyName const & ) const; + hasMetadata_function_type hasMetadata_function_value( &::SireMM::SelectorBond::hasMetadata ); + + SelectorBond_exposer.def( + "hasMetadata" + , hasMetadata_function_value + , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::hasProperty + + typedef bool ( ::SireMM::SelectorBond::*hasProperty_function_type)( ::SireBase::PropertyName const & ) const; + hasProperty_function_type hasProperty_function_value( &::SireMM::SelectorBond::hasProperty ); + + SelectorBond_exposer.def( + "hasProperty" + , hasProperty_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::intersection + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*intersection_function_type)( ::SireMM::SelectorBond const & ) const; + intersection_function_type intersection_function_value( &::SireMM::SelectorBond::intersection ); + + SelectorBond_exposer.def( + "intersection" + , intersection_function_value + , ( bp::arg("other") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::invert + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*invert_function_type)( ::SireBase::PropertyMap const & ) const; + invert_function_type invert_function_value( &::SireMM::SelectorBond::invert ); + + SelectorBond_exposer.def( + "invert" + , invert_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::invert + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*invert_function_type)( ) const; + invert_function_type invert_function_value( &::SireMM::SelectorBond::invert ); + + SelectorBond_exposer.def( + "invert" + , invert_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::isEmpty + + typedef bool ( ::SireMM::SelectorBond::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMM::SelectorBond::isEmpty ); + + SelectorBond_exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::lengths + + typedef ::QList< SireUnits::Dimension::PhysUnit< 0, 1, 0, 0, 0, 0, 0 > > ( ::SireMM::SelectorBond::*lengths_function_type)( ) const; + lengths_function_type lengths_function_value( &::SireMM::SelectorBond::lengths ); + + SelectorBond_exposer.def( + "lengths" + , lengths_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::lengths + + typedef ::QList< SireUnits::Dimension::PhysUnit< 0, 1, 0, 0, 0, 0, 0 > > ( ::SireMM::SelectorBond::*lengths_function_type)( ::SireBase::PropertyMap const & ) const; + lengths_function_type lengths_function_value( &::SireMM::SelectorBond::lengths ); + + SelectorBond_exposer.def( + "lengths" + , lengths_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::metadataKeys + + typedef ::QStringList ( ::SireMM::SelectorBond::*metadataKeys_function_type)( ) const; + metadataKeys_function_type metadataKeys_function_value( &::SireMM::SelectorBond::metadataKeys ); + + SelectorBond_exposer.def( + "metadataKeys" + , metadataKeys_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::metadataKeys + + typedef ::QStringList ( ::SireMM::SelectorBond::*metadataKeys_function_type)( ::SireBase::PropertyName const & ) const; + metadataKeys_function_type metadataKeys_function_value( &::SireMM::SelectorBond::metadataKeys ); + + SelectorBond_exposer.def( + "metadataKeys" + , metadataKeys_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::move + + typedef ::SireMol::Mover< SireMM::SelectorBond > ( ::SireMM::SelectorBond::*move_function_type)( ) const; + move_function_type move_function_value( &::SireMM::SelectorBond::move ); + + SelectorBond_exposer.def( + "move" + , move_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::nViews + + typedef int ( ::SireMM::SelectorBond::*nViews_function_type)( ) const; + nViews_function_type nViews_function_value( &::SireMM::SelectorBond::nViews ); + + SelectorBond_exposer.def( + "nViews" + , nViews_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorBond_exposer.def( bp::self != bp::self ); + { //::SireMM::SelectorBond::operator() + + typedef ::SireMM::Bond ( ::SireMM::SelectorBond::*__call___function_type)( int ) const; + __call___function_type __call___function_value( &::SireMM::SelectorBond::operator() ); + + SelectorBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator() + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*__call___function_type)( int,int ) const; + __call___function_type __call___function_value( &::SireMM::SelectorBond::operator() ); + + SelectorBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i"), bp::arg("j") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator() + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*__call___function_type)( ::SireBase::Slice const & ) const; + __call___function_type __call___function_value( &::SireMM::SelectorBond::operator() ); + + SelectorBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator() + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*__call___function_type)( ::QList< long long > const & ) const; + __call___function_type __call___function_value( &::SireMM::SelectorBond::operator() ); + + SelectorBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator() + + typedef ::SireMM::SelectorBond ( ::SireMM::SelectorBond::*__call___function_type)( ::SireMol::BondID const & ) const; + __call___function_type __call___function_value( &::SireMM::SelectorBond::operator() ); + + SelectorBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("bond") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator= + + typedef ::SireMM::SelectorBond & ( ::SireMM::SelectorBond::*assign_function_type)( ::SireMM::SelectorBond const & ) ; + assign_function_type assign_function_value( &::SireMM::SelectorBond::operator= ); + + SelectorBond_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("bond") ) + , bp::return_self< >() + , "" ); + + } + SelectorBond_exposer.def( bp::self == bp::self ); + { //::SireMM::SelectorBond::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMM::SelectorBond::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorBond::operator[] ); + + SelectorBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMM::SelectorBond::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorBond::operator[] ); + + SelectorBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMM::SelectorBond::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorBond::operator[] ); + + SelectorBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMM::SelectorBond::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMM::SelectorBond::*__getitem___function_type)( ::SireMol::BondID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorBond::operator[] ); + + SelectorBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("bond") ) + , "" ); + + } + { //::SireMM::SelectorBond::potentials + + typedef ::QList< SireCAS::Expression > ( ::SireMM::SelectorBond::*potentials_function_type)( ) const; + potentials_function_type potentials_function_value( &::SireMM::SelectorBond::potentials ); + + SelectorBond_exposer.def( + "potentials" + , potentials_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::potentials + + typedef ::QList< SireCAS::Expression > ( ::SireMM::SelectorBond::*potentials_function_type)( ::SireBase::PropertyMap const & ) const; + potentials_function_type potentials_function_value( &::SireMM::SelectorBond::potentials ); + + SelectorBond_exposer.def( + "potentials" + , potentials_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::properties + + typedef ::QList< SireBase::Properties > ( ::SireMM::SelectorBond::*properties_function_type)( ) const; + properties_function_type properties_function_value( &::SireMM::SelectorBond::properties ); + + SelectorBond_exposer.def( + "properties" + , properties_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::property + + typedef ::QList< SireBase::PropPtr< SireBase::Property > > ( ::SireMM::SelectorBond::*property_function_type)( ::SireBase::PropertyName const & ) const; + property_function_type property_function_value( &::SireMM::SelectorBond::property ); + + SelectorBond_exposer.def( + "property" + , property_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::property + + typedef ::QList< SireBase::PropPtr< SireBase::Property > > ( ::SireMM::SelectorBond::*property_function_type)( ::SireBase::PropertyName const &,::SireBase::Property const & ) const; + property_function_type property_function_value( &::SireMM::SelectorBond::property ); + + SelectorBond_exposer.def( + "property" + , property_function_value + , ( bp::arg("key"), bp::arg("default_value") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::propertyKeys + + typedef ::QStringList ( ::SireMM::SelectorBond::*propertyKeys_function_type)( ) const; + propertyKeys_function_type propertyKeys_function_value( &::SireMM::SelectorBond::propertyKeys ); + + SelectorBond_exposer.def( + "propertyKeys" + , propertyKeys_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::selectedAll + + typedef bool ( ::SireMM::SelectorBond::*selectedAll_function_type)( ) const; + selectedAll_function_type selectedAll_function_value( &::SireMM::SelectorBond::selectedAll ); + + SelectorBond_exposer.def( + "selectedAll" + , selectedAll_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::selection + + typedef ::SireMol::AtomSelection ( ::SireMM::SelectorBond::*selection_function_type)( ) const; + selection_function_type selection_function_value( &::SireMM::SelectorBond::selection ); + + SelectorBond_exposer.def( + "selection" + , selection_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::size + + typedef int ( ::SireMM::SelectorBond::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMM::SelectorBond::size ); + + SelectorBond_exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::toList + + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMM::SelectorBond::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMM::SelectorBond::toList ); + + SelectorBond_exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMM::SelectorBond::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMM::SelectorBond::toSelector ); + + SelectorBond_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::toString + + typedef ::QString ( ::SireMM::SelectorBond::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMM::SelectorBond::toString ); + + SelectorBond_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMM::SelectorBond::typeName ); + + SelectorBond_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorBond::what + + typedef char const * ( ::SireMM::SelectorBond::*what_function_type)( ) const; + what_function_type what_function_value( &::SireMM::SelectorBond::what ); + + SelectorBond_exposer.def( + "what" + , what_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorBond_exposer.staticmethod( "typeName" ); + SelectorBond_exposer.def( "__copy__", &__copy__); + SelectorBond_exposer.def( "__deepcopy__", &__copy__); + SelectorBond_exposer.def( "clone", &__copy__); + SelectorBond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorBond >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorBond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorBond >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorBond_exposer.def_pickle(sire_pickle_suite< ::SireMM::SelectorBond >()); + SelectorBond_exposer.def( "__str__", &__str__< ::SireMM::SelectorBond > ); + SelectorBond_exposer.def( "__repr__", &__str__< ::SireMM::SelectorBond > ); + SelectorBond_exposer.def( "__len__", &__len_size< ::SireMM::SelectorBond > ); + } + +} diff --git a/wrapper/MM/SelectorBond.pypp.hpp b/wrapper/MM/SelectorBond.pypp.hpp new file mode 100644 index 000000000..e747e8dd1 --- /dev/null +++ b/wrapper/MM/SelectorBond.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorBond_hpp__pyplusplus_wrapper +#define SelectorBond_hpp__pyplusplus_wrapper + +void register_SelectorBond_class(); + +#endif//SelectorBond_hpp__pyplusplus_wrapper diff --git a/wrapper/MM/SelectorMBond.pypp.cpp b/wrapper/MM/SelectorMBond.pypp.cpp new file mode 100644 index 000000000..1e123a332 --- /dev/null +++ b/wrapper/MM/SelectorMBond.pypp.cpp @@ -0,0 +1,1078 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorMBond.pypp.hpp" + +namespace bp = boost::python; + +#include "SireError/errors.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "selectormbond.h" + +#include "selectormbond.h" + +SireMM::SelectorMBond __copy__(const SireMM::SelectorMBond &other){ return SireMM::SelectorMBond(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorMBond_class(){ + + { //::SireMM::SelectorMBond + typedef bp::class_< SireMM::SelectorMBond, bp::bases< SireBase::Property > > SelectorMBond_exposer_t; + SelectorMBond_exposer_t SelectorMBond_exposer = SelectorMBond_exposer_t( "SelectorMBond", "Multi-molecule selector for bonds", bp::init< >("") ); + bp::scope SelectorMBond_scope( SelectorMBond_exposer ); + SelectorMBond_exposer.def( bp::init< SireMM::Bond const & >(( bp::arg("view") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("mols") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("mols") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMol::MolGroupsBase const & >(( bp::arg("mols") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("mols") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMM::SelectorBond const & >(( bp::arg("bonds") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("mols") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMM::SelectorMBond const &, SireBase::Slice const & >(( bp::arg("bonds"), bp::arg("slice") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMM::SelectorMBond const &, QList< long long > const & >(( bp::arg("bonds"), bp::arg("idxs") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMol::SelectResult const &, SireMol::BondID const & >(( bp::arg("mols"), bp::arg("bond") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMol::SelectResult const &, SireBase::PropertyMap const & >(( bp::arg("mols"), bp::arg("map") ), "") ); + SelectorMBond_exposer.def( bp::init< SireMM::SelectorMBond const & >(( bp::arg("other") ), "") ); + { //::SireMM::SelectorMBond::IDs + + typedef ::QList< SireMol::BondID > ( ::SireMM::SelectorMBond::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMM::SelectorMBond::IDs ); + + SelectorMBond_exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atom + + typedef ::SireMol::Atom ( ::SireMM::SelectorMBond::*atom_function_type)( int ) const; + atom_function_type atom_function_value( &::SireMM::SelectorMBond::atom ); + + SelectorMBond_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atom + + typedef ::SireMol::Atom ( ::SireMM::SelectorMBond::*atom_function_type)( ::QString const & ) const; + atom_function_type atom_function_value( &::SireMM::SelectorMBond::atom ); + + SelectorMBond_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atom + + typedef ::SireMol::Atom ( ::SireMM::SelectorMBond::*atom_function_type)( ::SireMol::AtomID const & ) const; + atom_function_type atom_function_value( &::SireMM::SelectorMBond::atom ); + + SelectorMBond_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMM::SelectorMBond::*atoms_function_type)( ) const; + atoms_function_type atoms_function_value( &::SireMM::SelectorMBond::atoms ); + + SelectorMBond_exposer.def( + "atoms" + , atoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMM::SelectorMBond::*atoms_function_type)( int ) const; + atoms_function_type atoms_function_value( &::SireMM::SelectorMBond::atoms ); + + SelectorMBond_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMM::SelectorMBond::*atoms_function_type)( ::SireBase::Slice const & ) const; + atoms_function_type atoms_function_value( &::SireMM::SelectorMBond::atoms ); + + SelectorMBond_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMM::SelectorMBond::*atoms_function_type)( ::QList< long long > const & ) const; + atoms_function_type atoms_function_value( &::SireMM::SelectorMBond::atoms ); + + SelectorMBond_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMM::SelectorMBond::*atoms_function_type)( ::QString const & ) const; + atoms_function_type atoms_function_value( &::SireMM::SelectorMBond::atoms ); + + SelectorMBond_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMM::SelectorMBond::*atoms_function_type)( ::SireMol::AtomID const & ) const; + atoms_function_type atoms_function_value( &::SireMM::SelectorMBond::atoms ); + + SelectorMBond_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chain + + typedef ::SireMol::Chain ( ::SireMM::SelectorMBond::*chain_function_type)( int ) const; + chain_function_type chain_function_value( &::SireMM::SelectorMBond::chain ); + + SelectorMBond_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chain + + typedef ::SireMol::Chain ( ::SireMM::SelectorMBond::*chain_function_type)( ::QString const & ) const; + chain_function_type chain_function_value( &::SireMM::SelectorMBond::chain ); + + SelectorMBond_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chain + + typedef ::SireMol::Chain ( ::SireMM::SelectorMBond::*chain_function_type)( ::SireMol::ChainID const & ) const; + chain_function_type chain_function_value( &::SireMM::SelectorMBond::chain ); + + SelectorMBond_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMM::SelectorMBond::*chains_function_type)( ) const; + chains_function_type chains_function_value( &::SireMM::SelectorMBond::chains ); + + SelectorMBond_exposer.def( + "chains" + , chains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMM::SelectorMBond::*chains_function_type)( int ) const; + chains_function_type chains_function_value( &::SireMM::SelectorMBond::chains ); + + SelectorMBond_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMM::SelectorMBond::*chains_function_type)( ::SireBase::Slice const & ) const; + chains_function_type chains_function_value( &::SireMM::SelectorMBond::chains ); + + SelectorMBond_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMM::SelectorMBond::*chains_function_type)( ::QList< long long > const & ) const; + chains_function_type chains_function_value( &::SireMM::SelectorMBond::chains ); + + SelectorMBond_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMM::SelectorMBond::*chains_function_type)( ::QString const & ) const; + chains_function_type chains_function_value( &::SireMM::SelectorMBond::chains ); + + SelectorMBond_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMM::SelectorMBond::*chains_function_type)( ::SireMol::ChainID const & ) const; + chains_function_type chains_function_value( &::SireMM::SelectorMBond::chains ); + + SelectorMBond_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::count + + typedef int ( ::SireMM::SelectorMBond::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMM::SelectorMBond::count ); + + SelectorMBond_exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMM::SelectorMBond::*cutGroup_function_type)( int ) const; + cutGroup_function_type cutGroup_function_value( &::SireMM::SelectorMBond::cutGroup ); + + SelectorMBond_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMM::SelectorMBond::*cutGroup_function_type)( ::QString const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMM::SelectorMBond::cutGroup ); + + SelectorMBond_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMM::SelectorMBond::*cutGroup_function_type)( ::SireMol::CGID const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMM::SelectorMBond::cutGroup ); + + SelectorMBond_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMM::SelectorMBond::*cutGroups_function_type)( ) const; + cutGroups_function_type cutGroups_function_value( &::SireMM::SelectorMBond::cutGroups ); + + SelectorMBond_exposer.def( + "cutGroups" + , cutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMM::SelectorMBond::*cutGroups_function_type)( int ) const; + cutGroups_function_type cutGroups_function_value( &::SireMM::SelectorMBond::cutGroups ); + + SelectorMBond_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMM::SelectorMBond::*cutGroups_function_type)( ::SireBase::Slice const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMM::SelectorMBond::cutGroups ); + + SelectorMBond_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMM::SelectorMBond::*cutGroups_function_type)( ::QList< long long > const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMM::SelectorMBond::cutGroups ); + + SelectorMBond_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMM::SelectorMBond::*cutGroups_function_type)( ::QString const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMM::SelectorMBond::cutGroups ); + + SelectorMBond_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMM::SelectorMBond::*cutGroups_function_type)( ::SireMol::CGID const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMM::SelectorMBond::cutGroups ); + + SelectorMBond_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::evaluate + + typedef ::SireMol::EvaluatorM ( ::SireMM::SelectorMBond::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMM::SelectorMBond::evaluate ); + + SelectorMBond_exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::isEmpty + + typedef bool ( ::SireMM::SelectorMBond::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMM::SelectorMBond::isEmpty ); + + SelectorMBond_exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecule + + typedef ::SireMol::Molecule ( ::SireMM::SelectorMBond::*molecule_function_type)( int ) const; + molecule_function_type molecule_function_value( &::SireMM::SelectorMBond::molecule ); + + SelectorMBond_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecule + + typedef ::SireMol::Molecule ( ::SireMM::SelectorMBond::*molecule_function_type)( ::QString const & ) const; + molecule_function_type molecule_function_value( &::SireMM::SelectorMBond::molecule ); + + SelectorMBond_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecule + + typedef ::SireMol::Molecule ( ::SireMM::SelectorMBond::*molecule_function_type)( ::SireMol::MolID const & ) ; + molecule_function_type molecule_function_value( &::SireMM::SelectorMBond::molecule ); + + SelectorMBond_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecules + + typedef ::SireMol::SelectorMol ( ::SireMM::SelectorMBond::*molecules_function_type)( ) const; + molecules_function_type molecules_function_value( &::SireMM::SelectorMBond::molecules ); + + SelectorMBond_exposer.def( + "molecules" + , molecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecules + + typedef ::SireMol::SelectorMol ( ::SireMM::SelectorMBond::*molecules_function_type)( int ) const; + molecules_function_type molecules_function_value( &::SireMM::SelectorMBond::molecules ); + + SelectorMBond_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecules + + typedef ::SireMol::SelectorMol ( ::SireMM::SelectorMBond::*molecules_function_type)( ::SireBase::Slice const & ) const; + molecules_function_type molecules_function_value( &::SireMM::SelectorMBond::molecules ); + + SelectorMBond_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecules + + typedef ::SireMol::SelectorMol ( ::SireMM::SelectorMBond::*molecules_function_type)( ::QList< long long > const & ) const; + molecules_function_type molecules_function_value( &::SireMM::SelectorMBond::molecules ); + + SelectorMBond_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecules + + typedef ::SireMol::SelectorMol ( ::SireMM::SelectorMBond::*molecules_function_type)( ::QString const & ) const; + molecules_function_type molecules_function_value( &::SireMM::SelectorMBond::molecules ); + + SelectorMBond_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::molecules + + typedef ::SireMol::SelectorMol ( ::SireMM::SelectorMBond::*molecules_function_type)( ::SireMol::MolID const & ) const; + molecules_function_type molecules_function_value( &::SireMM::SelectorMBond::molecules ); + + SelectorMBond_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::nAtoms + + typedef int ( ::SireMM::SelectorMBond::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMM::SelectorMBond::nAtoms ); + + SelectorMBond_exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::nChains + + typedef int ( ::SireMM::SelectorMBond::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMM::SelectorMBond::nChains ); + + SelectorMBond_exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::nCutGroups + + typedef int ( ::SireMM::SelectorMBond::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMM::SelectorMBond::nCutGroups ); + + SelectorMBond_exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::nMolecules + + typedef int ( ::SireMM::SelectorMBond::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMM::SelectorMBond::nMolecules ); + + SelectorMBond_exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::nResidues + + typedef int ( ::SireMM::SelectorMBond::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMM::SelectorMBond::nResidues ); + + SelectorMBond_exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::nSegments + + typedef int ( ::SireMM::SelectorMBond::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMM::SelectorMBond::nSegments ); + + SelectorMBond_exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorMBond_exposer.def( bp::self != bp::self ); + { //::SireMM::SelectorMBond::operator() + + typedef ::SireMM::Bond ( ::SireMM::SelectorMBond::*__call___function_type)( int ) const; + __call___function_type __call___function_value( &::SireMM::SelectorMBond::operator() ); + + SelectorMBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMM::SelectorMBond::operator() + + typedef ::SireMM::SelectorMBond ( ::SireMM::SelectorMBond::*__call___function_type)( ::SireBase::Slice const & ) const; + __call___function_type __call___function_value( &::SireMM::SelectorMBond::operator() ); + + SelectorMBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMM::SelectorMBond::operator() + + typedef ::SireMM::SelectorMBond ( ::SireMM::SelectorMBond::*__call___function_type)( ::QList< long long > const & ) const; + __call___function_type __call___function_value( &::SireMM::SelectorMBond::operator() ); + + SelectorMBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMM::SelectorMBond::operator() + + typedef ::SireMM::SelectorMBond ( ::SireMM::SelectorMBond::*__call___function_type)( ::SireMol::BondID const & ) const; + __call___function_type __call___function_value( &::SireMM::SelectorMBond::operator() ); + + SelectorMBond_exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMM::SelectorMBond::operator= + + typedef ::SireMM::SelectorMBond & ( ::SireMM::SelectorMBond::*assign_function_type)( ::SireMM::SelectorMBond const & ) ; + assign_function_type assign_function_value( &::SireMM::SelectorMBond::operator= ); + + SelectorMBond_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + SelectorMBond_exposer.def( bp::self == bp::self ); + { //::SireMM::SelectorMBond::operator[] + + typedef ::SireMM::Bond ( ::SireMM::SelectorMBond::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorMBond::operator[] ); + + SelectorMBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMM::SelectorMBond::operator[] + + typedef ::SireMM::SelectorMBond ( ::SireMM::SelectorMBond::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorMBond::operator[] ); + + SelectorMBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMM::SelectorMBond::operator[] + + typedef ::SireMM::SelectorMBond ( ::SireMM::SelectorMBond::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorMBond::operator[] ); + + SelectorMBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMM::SelectorMBond::operator[] + + typedef ::SireMM::SelectorMBond ( ::SireMM::SelectorMBond::*__getitem___function_type)( ::SireMol::BondID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMM::SelectorMBond::operator[] ); + + SelectorMBond_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMM::SelectorMBond::residue + + typedef ::SireMol::Residue ( ::SireMM::SelectorMBond::*residue_function_type)( int ) const; + residue_function_type residue_function_value( &::SireMM::SelectorMBond::residue ); + + SelectorMBond_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residue + + typedef ::SireMol::Residue ( ::SireMM::SelectorMBond::*residue_function_type)( ::QString const & ) const; + residue_function_type residue_function_value( &::SireMM::SelectorMBond::residue ); + + SelectorMBond_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residue + + typedef ::SireMol::Residue ( ::SireMM::SelectorMBond::*residue_function_type)( ::SireMol::ResID const & ) const; + residue_function_type residue_function_value( &::SireMM::SelectorMBond::residue ); + + SelectorMBond_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMM::SelectorMBond::*residues_function_type)( ) const; + residues_function_type residues_function_value( &::SireMM::SelectorMBond::residues ); + + SelectorMBond_exposer.def( + "residues" + , residues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMM::SelectorMBond::*residues_function_type)( int ) const; + residues_function_type residues_function_value( &::SireMM::SelectorMBond::residues ); + + SelectorMBond_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMM::SelectorMBond::*residues_function_type)( ::SireBase::Slice const & ) const; + residues_function_type residues_function_value( &::SireMM::SelectorMBond::residues ); + + SelectorMBond_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMM::SelectorMBond::*residues_function_type)( ::QList< long long > const & ) const; + residues_function_type residues_function_value( &::SireMM::SelectorMBond::residues ); + + SelectorMBond_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMM::SelectorMBond::*residues_function_type)( ::QString const & ) const; + residues_function_type residues_function_value( &::SireMM::SelectorMBond::residues ); + + SelectorMBond_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMM::SelectorMBond::*residues_function_type)( ::SireMol::ResID const & ) const; + residues_function_type residues_function_value( &::SireMM::SelectorMBond::residues ); + + SelectorMBond_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::search + + typedef ::SireMol::SelectResult ( ::SireMM::SelectorMBond::*search_function_type)( ::QString const & ) const; + search_function_type search_function_value( &::SireMM::SelectorMBond::search ); + + SelectorMBond_exposer.def( + "search" + , search_function_value + , ( bp::arg("search_string") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segment + + typedef ::SireMol::Segment ( ::SireMM::SelectorMBond::*segment_function_type)( int ) const; + segment_function_type segment_function_value( &::SireMM::SelectorMBond::segment ); + + SelectorMBond_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segment + + typedef ::SireMol::Segment ( ::SireMM::SelectorMBond::*segment_function_type)( ::QString const & ) const; + segment_function_type segment_function_value( &::SireMM::SelectorMBond::segment ); + + SelectorMBond_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segment + + typedef ::SireMol::Segment ( ::SireMM::SelectorMBond::*segment_function_type)( ::SireMol::SegID const & ) const; + segment_function_type segment_function_value( &::SireMM::SelectorMBond::segment ); + + SelectorMBond_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMM::SelectorMBond::*segments_function_type)( ) const; + segments_function_type segments_function_value( &::SireMM::SelectorMBond::segments ); + + SelectorMBond_exposer.def( + "segments" + , segments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMM::SelectorMBond::*segments_function_type)( int ) const; + segments_function_type segments_function_value( &::SireMM::SelectorMBond::segments ); + + SelectorMBond_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMM::SelectorMBond::*segments_function_type)( ::SireBase::Slice const & ) const; + segments_function_type segments_function_value( &::SireMM::SelectorMBond::segments ); + + SelectorMBond_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMM::SelectorMBond::*segments_function_type)( ::QList< long long > const & ) const; + segments_function_type segments_function_value( &::SireMM::SelectorMBond::segments ); + + SelectorMBond_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMM::SelectorMBond::*segments_function_type)( ::QString const & ) const; + segments_function_type segments_function_value( &::SireMM::SelectorMBond::segments ); + + SelectorMBond_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMM::SelectorMBond::*segments_function_type)( ::SireMol::SegID const & ) const; + segments_function_type segments_function_value( &::SireMM::SelectorMBond::segments ); + + SelectorMBond_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::size + + typedef int ( ::SireMM::SelectorMBond::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMM::SelectorMBond::size ); + + SelectorMBond_exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::toList + + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMM::SelectorMBond::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMM::SelectorMBond::toList ); + + SelectorMBond_exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::toMoleculeGroup + + typedef ::SireMol::MoleculeGroup ( ::SireMM::SelectorMBond::*toMoleculeGroup_function_type)( ) const; + toMoleculeGroup_function_type toMoleculeGroup_function_value( &::SireMM::SelectorMBond::toMoleculeGroup ); + + SelectorMBond_exposer.def( + "toMoleculeGroup" + , toMoleculeGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::toSelectResult + + typedef ::SireMol::SelectResult ( ::SireMM::SelectorMBond::*toSelectResult_function_type)( ) const; + toSelectResult_function_type toSelectResult_function_value( &::SireMM::SelectorMBond::toSelectResult ); + + SelectorMBond_exposer.def( + "toSelectResult" + , toSelectResult_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::toString + + typedef ::QString ( ::SireMM::SelectorMBond::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMM::SelectorMBond::toString ); + + SelectorMBond_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMM::SelectorMBond::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMM::SelectorMBond::typeName ); + + SelectorMBond_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorMBond_exposer.staticmethod( "typeName" ); + SelectorMBond_exposer.def( "__copy__", &__copy__); + SelectorMBond_exposer.def( "__deepcopy__", &__copy__); + SelectorMBond_exposer.def( "clone", &__copy__); + SelectorMBond_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMM::SelectorMBond >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorMBond_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMM::SelectorMBond >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorMBond_exposer.def_pickle(sire_pickle_suite< ::SireMM::SelectorMBond >()); + SelectorMBond_exposer.def( "__str__", &__str__< ::SireMM::SelectorMBond > ); + SelectorMBond_exposer.def( "__repr__", &__str__< ::SireMM::SelectorMBond > ); + SelectorMBond_exposer.def( "__len__", &__len_size< ::SireMM::SelectorMBond > ); + } + +} diff --git a/wrapper/MM/SelectorMBond.pypp.hpp b/wrapper/MM/SelectorMBond.pypp.hpp new file mode 100644 index 000000000..5b9fc1849 --- /dev/null +++ b/wrapper/MM/SelectorMBond.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorMBond_hpp__pyplusplus_wrapper +#define SelectorMBond_hpp__pyplusplus_wrapper + +void register_SelectorMBond_class(); + +#endif//SelectorMBond_hpp__pyplusplus_wrapper diff --git a/wrapper/MM/SireMM_properties.cpp b/wrapper/MM/SireMM_properties.cpp index 5382c3151..d12b7c971 100644 --- a/wrapper/MM/SireMM_properties.cpp +++ b/wrapper/MM/SireMM_properties.cpp @@ -25,16 +25,6 @@ #include "tostring.h" #include #include "cljfunction.h" -#include "SireFF/errors.h" -#include "SireMaths/maths.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireUnits/units.h" -#include "switchingfunction.h" -#include -#include -#include -#include "switchingfunction.h" #include "SireCAS/errors.h" #include "SireCAS/expression.h" #include "SireCAS/symbols.h" @@ -49,10 +39,20 @@ #include "SireStream/shareddatastream.h" #include "restraint.h" #include "restraint.h" +#include "SireFF/errors.h" +#include "SireMaths/maths.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireUnits/units.h" +#include "switchingfunction.h" +#include +#include +#include +#include "switchingfunction.h" void register_SireMM_properties() { register_property_container< SireMM::CLJFunctionPtr, SireMM::CLJFunction >(); - register_property_container< SireMM::SwitchFuncPtr, SireMM::SwitchingFunction >(); register_property_container< SireMM::RestraintPtr, SireMM::Restraint >(); register_property_container< SireMM::Restraint3DPtr, SireMM::Restraint3D >(); + register_property_container< SireMM::SwitchFuncPtr, SireMM::SwitchingFunction >(); } diff --git a/wrapper/MM/SireMM_registrars.cpp b/wrapper/MM/SireMM_registrars.cpp index 65fbf6fbd..67a5ab7e4 100644 --- a/wrapper/MM/SireMM_registrars.cpp +++ b/wrapper/MM/SireMM_registrars.cpp @@ -5,95 +5,141 @@ #include "Helpers/version_error_impl.h" -#include "intrasoftcljff.h" -#include "cljrffunction.h" +#include "amberparams.h" #include "anglerestraint.h" -#include "intraljff.h" -#include "intersoftcljff.h" -#include "multicljcomponent.h" -#include "cljfunction.h" -#include "cljgrid.h" -#include "intracljff.h" -#include "interff.h" -#include "intercoulombff.h" -#include "ljpair.h" -#include "internalcomponent.h" -#include "distancerestraint.h" -#include "cljdelta.h" -#include "gromacsparams.h" +#include "atomljs.h" +#include "bond.h" +#include "clj14group.h" #include "cljatoms.h" -#include "gridff.h" -#include "cljprobe.h" -#include "mmdetail.h" -#include "cljworkspace.h" -#include "internalff.h" #include "cljboxes.h" -#include "restraintcomponent.h" #include "cljcalculator.h" #include "cljcomponent.h" -#include "ljperturbation.h" -#include "switchingfunction.h" -#include "intragroupff.h" -#include "restraintff.h" -#include "intergroupff.h" -#include "internalparameters.h" -#include "intercljff.h" -#include "interljff.h" -#include "cljnbpairs.h" -#include "restraint.h" -#include "amberparams.h" -#include "clj14group.h" +#include "cljdelta.h" #include "cljextractor.h" -#include "gridff2.h" -#include "cljshiftfunction.h" -#include "twoatomfunctions.h" -#include "cljparam.h" -#include "softcljcomponent.h" -#include "intracoulombff.h" -#include "atomljs.h" +#include "cljfunction.h" +#include "cljgrid.h" #include "cljgroup.h" -#include "threeatomfunctions.h" +#include "cljnbpairs.h" +#include "cljparam.h" +#include "cljprobe.h" +#include "cljrffunction.h" +#include "cljshiftfunction.h" +#include "cljworkspace.h" #include "dihedralrestraint.h" -#include "intraff.h" -#include "ljparameter.h" +#include "distancerestraint.h" #include "fouratomfunctions.h" +#include "gridff.h" +#include "gridff2.h" +#include "gromacsparams.h" +#include "intercljff.h" +#include "intercoulombff.h" +#include "interff.h" +#include "intergroupff.h" +#include "interljff.h" +#include "internalcomponent.h" +#include "internalff.h" +#include "internalparameters.h" #include "internalperturbation.h" +#include "intersoftcljff.h" +#include "intracljff.h" +#include "intracoulombff.h" +#include "intraff.h" +#include "intragroupff.h" +#include "intraljff.h" +#include "intrasoftcljff.h" +#include "ljpair.h" +#include "ljparameter.h" +#include "ljperturbation.h" +#include "mmdetail.h" +#include "multicljcomponent.h" +#include "restraint.h" +#include "restraintcomponent.h" +#include "restraintff.h" +#include "selectorbond.h" +#include "selectormbond.h" +#include "softcljcomponent.h" +#include "switchingfunction.h" +#include "threeatomfunctions.h" +#include "twoatomfunctions.h" #include "Helpers/objectregistry.hpp" void register_SireMM_objects() { - ObjectRegistry::registerConverterFor< SireMM::IntraSoftCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::IntraSoftCLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::IntraGroupSoftCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::IntraGroupSoftCLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::AmberParams >(); + ObjectRegistry::registerConverterFor< SireMM::AmberBond >(); + ObjectRegistry::registerConverterFor< SireMM::AmberAngle >(); + ObjectRegistry::registerConverterFor< SireMM::AmberDihPart >(); + ObjectRegistry::registerConverterFor< SireMM::AmberDihedral >(); + ObjectRegistry::registerConverterFor< SireMM::AmberNB14 >(); + ObjectRegistry::registerConverterFor< SireMM::AmberNBDihPart >(); + ObjectRegistry::registerConverterFor< SireMM::AngleRestraint >(); + ObjectRegistry::registerConverterFor< SireMM::AtomLJs >(); + ObjectRegistry::registerConverterFor< SireMM::Bond >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMM::CLJ14Group >(); + ObjectRegistry::registerConverterFor< SireMM::CLJAtom >(); + ObjectRegistry::registerConverterFor< SireMM::CLJAtoms >(); + ObjectRegistry::registerConverterFor< SireMM::CLJBox >(); + ObjectRegistry::registerConverterFor< SireMM::CLJBoxIndex >(); + ObjectRegistry::registerConverterFor< SireMM::CLJBoxes >(); + ObjectRegistry::registerConverterFor< SireMM::CLJBoxDistance >(); + ObjectRegistry::registerConverterFor< SireMM::CLJCalculator >(); + ObjectRegistry::registerConverterFor< SireMM::CoulombComponent >(); + ObjectRegistry::registerConverterFor< SireMM::LJComponent >(); + ObjectRegistry::registerConverterFor< SireMM::CLJComponent >(); + ObjectRegistry::registerConverterFor< SireMM::CLJDelta >(); + ObjectRegistry::registerConverterFor< SireMM::CLJExtractor >(); + ObjectRegistry::registerConverterFor< SireMM::NullCLJFunction >(); + ObjectRegistry::registerConverterFor< SireMM::CLJGrid >(); + ObjectRegistry::registerConverterFor< SireMM::CLJGroup >(); + ObjectRegistry::registerConverterFor< SireMM::CoulombScaleFactor >(); + ObjectRegistry::registerConverterFor< SireMM::LJScaleFactor >(); + ObjectRegistry::registerConverterFor< SireMM::CLJScaleFactor >(); + ObjectRegistry::registerConverterFor< SireMM::CLJNBPairs >(); + ObjectRegistry::registerConverterFor< SireMM::CoulombNBPairs >(); + ObjectRegistry::registerConverterFor< SireMM::LJNBPairs >(); + ObjectRegistry::registerConverterFor< SireMM::CLJParams >(); + ObjectRegistry::registerConverterFor< SireMM::CLJParamsArray >(); + ObjectRegistry::registerConverterFor< SireMM::CoulombProbe >(); + ObjectRegistry::registerConverterFor< SireMM::LJProbe >(); + ObjectRegistry::registerConverterFor< SireMM::CLJProbe >(); ObjectRegistry::registerConverterFor< SireMM::CLJRFFunction >(); ObjectRegistry::registerConverterFor< SireMM::CLJIntraRFFunction >(); ObjectRegistry::registerConverterFor< SireMM::CLJSoftRFFunction >(); ObjectRegistry::registerConverterFor< SireMM::CLJSoftIntraRFFunction >(); - ObjectRegistry::registerConverterFor< SireMM::AngleRestraint >(); - ObjectRegistry::registerConverterFor< SireMM::IntraLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::IntraLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::IntraGroupLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::IntraGroupLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::InterSoftCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::InterSoftCLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::InterGroupSoftCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::InterGroupSoftCLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::MultiCLJComponent >(); - ObjectRegistry::registerConverterFor< SireMM::NullCLJFunction >(); - ObjectRegistry::registerConverterFor< SireMM::CLJGrid >(); - ObjectRegistry::registerConverterFor< SireMM::IntraCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::IntraCLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::IntraGroupCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::IntraGroupCLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::InterFF >(); + ObjectRegistry::registerConverterFor< SireMM::CLJShiftFunction >(); + ObjectRegistry::registerConverterFor< SireMM::CLJIntraShiftFunction >(); + ObjectRegistry::registerConverterFor< SireMM::CLJSoftShiftFunction >(); + ObjectRegistry::registerConverterFor< SireMM::CLJSoftIntraShiftFunction >(); + ObjectRegistry::registerConverterFor< SireMM::CLJWorkspace >(); + ObjectRegistry::registerConverterFor< SireMM::DihedralRestraint >(); + ObjectRegistry::registerConverterFor< SireMM::DistanceRestraint >(); + ObjectRegistry::registerConverterFor< SireMM::DoubleDistanceRestraint >(); + ObjectRegistry::registerConverterFor< SireMM::TripleDistanceRestraint >(); + ObjectRegistry::registerConverterFor< SireMM::HarmonicDistanceForceConstant >(); + ObjectRegistry::registerConverterFor< SireMM::FourAtomFunctions >(); + ObjectRegistry::registerConverterFor< SireMM::GridFF >(); + ObjectRegistry::registerConverterFor< SireMM::GridFF2 >(); + ObjectRegistry::registerConverterFor< SireMM::GromacsAtomType >(); + ObjectRegistry::registerConverterFor< SireMM::GromacsBond >(); + ObjectRegistry::registerConverterFor< SireMM::GromacsAngle >(); + ObjectRegistry::registerConverterFor< SireMM::GromacsDihedral >(); + ObjectRegistry::registerConverterFor< SireMM::InterCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::InterCLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::InterGroupCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::InterGroupCLJFF >(); ObjectRegistry::registerConverterFor< SireMM::InterCoulombFFBase >(); ObjectRegistry::registerConverterFor< SireMM::InterCoulombFF >(); ObjectRegistry::registerConverterFor< SireMM::InterGroupCoulombFFBase >(); ObjectRegistry::registerConverterFor< SireMM::InterGroupCoulombFF >(); - ObjectRegistry::registerConverterFor< SireMM::LJPair >(); + ObjectRegistry::registerConverterFor< SireMM::InterFF >(); + ObjectRegistry::registerConverterFor< SireMM::InterGroupFF >(); + ObjectRegistry::registerConverterFor< SireMM::InterLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::InterLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::InterGroupLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::InterGroupLJFF >(); ObjectRegistry::registerConverterFor< SireMM::BondComponent >(); ObjectRegistry::registerConverterFor< SireMM::AngleComponent >(); ObjectRegistry::registerConverterFor< SireMM::DihedralComponent >(); @@ -107,89 +153,51 @@ void register_SireMM_objects() ObjectRegistry::registerConverterFor< SireMM::Intra14LJComponent >(); ObjectRegistry::registerConverterFor< SireMM::Intra14Component >(); ObjectRegistry::registerConverterFor< SireMM::InternalComponent >(); - ObjectRegistry::registerConverterFor< SireMM::DistanceRestraint >(); - ObjectRegistry::registerConverterFor< SireMM::DoubleDistanceRestraint >(); - ObjectRegistry::registerConverterFor< SireMM::TripleDistanceRestraint >(); - ObjectRegistry::registerConverterFor< SireMM::HarmonicDistanceForceConstant >(); - ObjectRegistry::registerConverterFor< SireMM::CLJDelta >(); - ObjectRegistry::registerConverterFor< SireMM::GromacsAtomType >(); - ObjectRegistry::registerConverterFor< SireMM::GromacsBond >(); - ObjectRegistry::registerConverterFor< SireMM::GromacsAngle >(); - ObjectRegistry::registerConverterFor< SireMM::GromacsDihedral >(); - ObjectRegistry::registerConverterFor< SireMM::CLJAtom >(); - ObjectRegistry::registerConverterFor< SireMM::CLJAtoms >(); - ObjectRegistry::registerConverterFor< SireMM::GridFF >(); - ObjectRegistry::registerConverterFor< SireMM::CoulombProbe >(); - ObjectRegistry::registerConverterFor< SireMM::LJProbe >(); - ObjectRegistry::registerConverterFor< SireMM::CLJProbe >(); - ObjectRegistry::registerConverterFor< SireMM::MMDetail >(); - ObjectRegistry::registerConverterFor< SireMM::CLJWorkspace >(); ObjectRegistry::registerConverterFor< SireMM::InternalFF >(); - ObjectRegistry::registerConverterFor< SireMM::CLJBox >(); - ObjectRegistry::registerConverterFor< SireMM::CLJBoxIndex >(); - ObjectRegistry::registerConverterFor< SireMM::CLJBoxes >(); - ObjectRegistry::registerConverterFor< SireMM::CLJBoxDistance >(); - ObjectRegistry::registerConverterFor< SireMM::RestraintComponent >(); - ObjectRegistry::registerConverterFor< SireMM::CLJCalculator >(); - ObjectRegistry::registerConverterFor< SireMM::CoulombComponent >(); - ObjectRegistry::registerConverterFor< SireMM::LJComponent >(); - ObjectRegistry::registerConverterFor< SireMM::CLJComponent >(); - ObjectRegistry::registerConverterFor< SireMM::LJPerturbation >(); - ObjectRegistry::registerConverterFor< SireMM::NoCutoff >(); - ObjectRegistry::registerConverterFor< SireMM::HarmonicSwitchingFunction >(); - ObjectRegistry::registerConverterFor< SireMM::CHARMMSwitchingFunction >(); - ObjectRegistry::registerConverterFor< SireMM::IntraGroupFF >(); - ObjectRegistry::registerConverterFor< SireMM::RestraintFF >(); - ObjectRegistry::registerConverterFor< SireMM::InterGroupFF >(); ObjectRegistry::registerConverterFor< SireMM::InternalParameters >(); ObjectRegistry::registerConverterFor< SireMM::InternalParameters3D >(); - ObjectRegistry::registerConverterFor< SireMM::InterCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::InterCLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::InterGroupCLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::InterGroupCLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::InterLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::InterLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::InterGroupLJFFBase >(); - ObjectRegistry::registerConverterFor< SireMM::InterGroupLJFF >(); - ObjectRegistry::registerConverterFor< SireMM::CoulombScaleFactor >(); - ObjectRegistry::registerConverterFor< SireMM::LJScaleFactor >(); - ObjectRegistry::registerConverterFor< SireMM::CLJScaleFactor >(); - ObjectRegistry::registerConverterFor< SireMM::CLJNBPairs >(); - ObjectRegistry::registerConverterFor< SireMM::CoulombNBPairs >(); - ObjectRegistry::registerConverterFor< SireMM::LJNBPairs >(); - ObjectRegistry::registerConverterFor< SireMM::NullRestraint >(); - ObjectRegistry::registerConverterFor< SireMM::AmberParams >(); - ObjectRegistry::registerConverterFor< SireMM::AmberBond >(); - ObjectRegistry::registerConverterFor< SireMM::AmberAngle >(); - ObjectRegistry::registerConverterFor< SireMM::AmberDihPart >(); - ObjectRegistry::registerConverterFor< SireMM::AmberDihedral >(); - ObjectRegistry::registerConverterFor< SireMM::AmberNB14 >(); - ObjectRegistry::registerConverterFor< SireMM::AmberNBDihPart >(); - ObjectRegistry::registerConverterFor< SireMM::CLJ14Group >(); - ObjectRegistry::registerConverterFor< SireMM::CLJExtractor >(); - ObjectRegistry::registerConverterFor< SireMM::GridFF2 >(); - ObjectRegistry::registerConverterFor< SireMM::CLJShiftFunction >(); - ObjectRegistry::registerConverterFor< SireMM::CLJIntraShiftFunction >(); - ObjectRegistry::registerConverterFor< SireMM::CLJSoftShiftFunction >(); - ObjectRegistry::registerConverterFor< SireMM::CLJSoftIntraShiftFunction >(); - ObjectRegistry::registerConverterFor< SireMM::TwoAtomFunctions >(); - ObjectRegistry::registerConverterFor< SireMM::CLJParams >(); - ObjectRegistry::registerConverterFor< SireMM::CLJParamsArray >(); - ObjectRegistry::registerConverterFor< SireMM::SoftCLJComponent >(); + ObjectRegistry::registerConverterFor< SireMM::TwoAtomPerturbation >(); + ObjectRegistry::registerConverterFor< SireMM::ThreeAtomPerturbation >(); + ObjectRegistry::registerConverterFor< SireMM::FourAtomPerturbation >(); + ObjectRegistry::registerConverterFor< SireMM::InterSoftCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::InterSoftCLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::InterGroupSoftCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::InterGroupSoftCLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::IntraCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::IntraCLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::IntraGroupCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::IntraGroupCLJFF >(); ObjectRegistry::registerConverterFor< SireMM::IntraCoulombFFBase >(); ObjectRegistry::registerConverterFor< SireMM::IntraCoulombFF >(); ObjectRegistry::registerConverterFor< SireMM::IntraGroupCoulombFFBase >(); ObjectRegistry::registerConverterFor< SireMM::IntraGroupCoulombFF >(); - ObjectRegistry::registerConverterFor< SireMM::AtomLJs >(); - ObjectRegistry::registerConverterFor< SireMM::CLJGroup >(); - ObjectRegistry::registerConverterFor< SireMM::ThreeAtomFunctions >(); - ObjectRegistry::registerConverterFor< SireMM::DihedralRestraint >(); ObjectRegistry::registerConverterFor< SireMM::IntraFF >(); + ObjectRegistry::registerConverterFor< SireMM::IntraGroupFF >(); + ObjectRegistry::registerConverterFor< SireMM::IntraLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::IntraLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::IntraGroupLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::IntraGroupLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::IntraSoftCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::IntraSoftCLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::IntraGroupSoftCLJFFBase >(); + ObjectRegistry::registerConverterFor< SireMM::IntraGroupSoftCLJFF >(); + ObjectRegistry::registerConverterFor< SireMM::LJPair >(); ObjectRegistry::registerConverterFor< SireMM::LJParameter >(); - ObjectRegistry::registerConverterFor< SireMM::FourAtomFunctions >(); - ObjectRegistry::registerConverterFor< SireMM::TwoAtomPerturbation >(); - ObjectRegistry::registerConverterFor< SireMM::ThreeAtomPerturbation >(); - ObjectRegistry::registerConverterFor< SireMM::FourAtomPerturbation >(); + ObjectRegistry::registerConverterFor< SireMM::LJPerturbation >(); + ObjectRegistry::registerConverterFor< SireMM::MMDetail >(); + ObjectRegistry::registerConverterFor< SireMM::MultiCLJComponent >(); + ObjectRegistry::registerConverterFor< SireMM::NullRestraint >(); + ObjectRegistry::registerConverterFor< SireMM::RestraintComponent >(); + ObjectRegistry::registerConverterFor< SireMM::RestraintFF >(); + ObjectRegistry::registerConverterFor< SireMM::SelectorBond >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMM::SelectorMBond >(); + ObjectRegistry::registerConverterFor< SireMM::SoftCLJComponent >(); + ObjectRegistry::registerConverterFor< SireMM::NoCutoff >(); + ObjectRegistry::registerConverterFor< SireMM::HarmonicSwitchingFunction >(); + ObjectRegistry::registerConverterFor< SireMM::CHARMMSwitchingFunction >(); + ObjectRegistry::registerConverterFor< SireMM::ThreeAtomFunctions >(); + ObjectRegistry::registerConverterFor< SireMM::TwoAtomFunctions >(); } diff --git a/wrapper/MM/SoftCLJComponent.pypp.cpp b/wrapper/MM/SoftCLJComponent.pypp.cpp index 71c8ec59c..42b7cf30e 100644 --- a/wrapper/MM/SoftCLJComponent.pypp.cpp +++ b/wrapper/MM/SoftCLJComponent.pypp.cpp @@ -26,6 +26,8 @@ SireMM::SoftCLJComponent __copy__(const SireMM::SoftCLJComponent &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SoftCLJComponent_class(){ { //::SireMM::SoftCLJComponent @@ -44,6 +46,7 @@ void register_SoftCLJComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the energy in the forcefield ff of all of these components by the\nvalues held in delta" ); } @@ -56,6 +59,7 @@ void register_SoftCLJComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the energy in the forcefield ff of all of these components by the\nvalues held in delta" ); } @@ -67,7 +71,7 @@ void register_SoftCLJComponent_class(){ SoftCLJComponent_exposer.def( "coulomb" , coulomb_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component representing the total coulomb energy\nof all of the alpha values" ); } @@ -80,7 +84,7 @@ void register_SoftCLJComponent_class(){ "coulomb" , coulomb_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component representing the coulomb energy of\nthe ith alpha component\nThrow: SireError::invalid_index\n" ); } @@ -92,7 +96,7 @@ void register_SoftCLJComponent_class(){ SoftCLJComponent_exposer.def( "lj" , lj_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component representing the total LJ energy\nof all of the alpha values" ); } @@ -105,7 +109,7 @@ void register_SoftCLJComponent_class(){ "lj" , lj_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component representing the LJ energy of\nthe ith alpha component\nThrow: SireError::invalid_index\n" ); } @@ -117,6 +121,7 @@ void register_SoftCLJComponent_class(){ SoftCLJComponent_exposer.def( "nAlphaValues" , nAlphaValues_function_value + , bp::release_gil_policy() , "" ); } @@ -142,6 +147,7 @@ void register_SoftCLJComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the energy in the forcefield ff of all of these components to the\nvalues held in value" ); } @@ -154,6 +160,7 @@ void register_SoftCLJComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the energy in the forcefield ff of all of these components to the\nvalues held in value" ); } @@ -165,6 +172,7 @@ void register_SoftCLJComponent_class(){ SoftCLJComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "Return all of the symbols associated with these components" ); } @@ -176,7 +184,7 @@ void register_SoftCLJComponent_class(){ SoftCLJComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component representing the total energy of\nall of the alpha values" ); } @@ -189,7 +197,7 @@ void register_SoftCLJComponent_class(){ "total" , total_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component representing the total energy of\nthe ith alpha component\nThrow: SireError::invalid_index\n" ); } @@ -201,6 +209,7 @@ void register_SoftCLJComponent_class(){ SoftCLJComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -212,6 +221,7 @@ void register_SoftCLJComponent_class(){ SoftCLJComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/SoftCLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp b/wrapper/MM/SoftCLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp index 366783bfd..e1bd4bd06 100644 --- a/wrapper/MM/SoftCLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp +++ b/wrapper/MM/SoftCLJPotentialInterface_InterSoftCLJPotential_.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::SoftCLJPotentialInterface&){ return "SireMM::SoftCLJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ { //::SireMM::SoftCLJPotentialInterface< SireMM::InterSoftCLJPotential > @@ -32,6 +34,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ SoftCLJPotentialInterface_InterSoftCLJPotential__exposer.def( "alpha" , alpha_function_value + , bp::release_gil_policy() , "" ); } @@ -45,6 +48,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "alpha" , alpha_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -57,6 +61,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ SoftCLJPotentialInterface_InterSoftCLJPotential__exposer.def( "clearAlphas" , clearAlphas_function_value + , bp::release_gil_policy() , "" ); } @@ -69,6 +74,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ SoftCLJPotentialInterface_InterSoftCLJPotential__exposer.def( "coulombPower" , coulombPower_function_value + , bp::release_gil_policy() , "" ); } @@ -82,6 +88,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "hasAlphaValue" , hasAlphaValue_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -94,6 +101,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ SoftCLJPotentialInterface_InterSoftCLJPotential__exposer.def( "ljPower" , ljPower_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +114,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ SoftCLJPotentialInterface_InterSoftCLJPotential__exposer.def( "nActiveAlphaComponents" , nActiveAlphaComponents_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +128,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "removeAlpha" , removeAlpha_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -132,6 +142,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "setAlpha" , setAlpha_function_value , ( bp::arg("alpha") ) + , bp::release_gil_policy() , "" ); } @@ -145,6 +156,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "setAlpha" , setAlpha_function_value , ( bp::arg("i"), bp::arg("alpha") ) + , bp::release_gil_policy() , "" ); } @@ -158,6 +170,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "" ); } @@ -171,6 +184,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "setLJPower" , setLJPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "" ); } @@ -184,6 +198,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "" ); } @@ -196,6 +211,7 @@ void register_SoftCLJPotentialInterface_InterSoftCLJPotential__class(){ SoftCLJPotentialInterface_InterSoftCLJPotential__exposer.def( "shiftDelta" , shiftDelta_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/SoftCLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp b/wrapper/MM/SoftCLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp index 82b101c8e..bbad26b19 100644 --- a/wrapper/MM/SoftCLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp +++ b/wrapper/MM/SoftCLJPotentialInterface_IntraSoftCLJPotential_.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMM::SoftCLJPotentialInterface&){ return "SireMM::SoftCLJPotentialInterface";} +#include "Helpers/release_gil_policy.hpp" + void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ { //::SireMM::SoftCLJPotentialInterface< SireMM::IntraSoftCLJPotential > @@ -32,6 +34,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ SoftCLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "alpha" , alpha_function_value + , bp::release_gil_policy() , "" ); } @@ -45,6 +48,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "alpha" , alpha_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -57,6 +61,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ SoftCLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "clearAlphas" , clearAlphas_function_value + , bp::release_gil_policy() , "" ); } @@ -69,6 +74,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ SoftCLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "coulombPower" , coulombPower_function_value + , bp::release_gil_policy() , "" ); } @@ -82,6 +88,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "hasAlphaValue" , hasAlphaValue_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -94,6 +101,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ SoftCLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "ljPower" , ljPower_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +114,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ SoftCLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "nActiveAlphaComponents" , nActiveAlphaComponents_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +128,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "removeAlpha" , removeAlpha_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -132,6 +142,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "setAlpha" , setAlpha_function_value , ( bp::arg("alpha") ) + , bp::release_gil_policy() , "" ); } @@ -145,6 +156,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "setAlpha" , setAlpha_function_value , ( bp::arg("i"), bp::arg("alpha") ) + , bp::release_gil_policy() , "" ); } @@ -158,6 +170,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "" ); } @@ -171,6 +184,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "setLJPower" , setLJPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "" ); } @@ -184,6 +198,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "" ); } @@ -196,6 +211,7 @@ void register_SoftCLJPotentialInterface_IntraSoftCLJPotential__class(){ SoftCLJPotentialInterface_IntraSoftCLJPotential__exposer.def( "shiftDelta" , shiftDelta_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/StretchBendComponent.pypp.cpp b/wrapper/MM/StretchBendComponent.pypp.cpp index 51296237f..953d55484 100644 --- a/wrapper/MM/StretchBendComponent.pypp.cpp +++ b/wrapper/MM/StretchBendComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::StretchBendComponent __copy__(const SireMM::StretchBendComponent &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_StretchBendComponent_class(){ { //::SireMM::StretchBendComponent @@ -39,6 +41,7 @@ void register_StretchBendComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("sbnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_StretchBendComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("sbnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_StretchBendComponent_class(){ StretchBendComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_StretchBendComponent_class(){ StretchBendComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_StretchBendComponent_class(){ StretchBendComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_StretchBendComponent_class(){ StretchBendComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/StretchBendParameterName.pypp.cpp b/wrapper/MM/StretchBendParameterName.pypp.cpp index 16df6c75d..148561fdf 100644 --- a/wrapper/MM/StretchBendParameterName.pypp.cpp +++ b/wrapper/MM/StretchBendParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::StretchBendParameterName __copy__(const SireMM::StretchBendParameterName const char* pvt_get_name(const SireMM::StretchBendParameterName&){ return "SireMM::StretchBendParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_StretchBendParameterName_class(){ { //::SireMM::StretchBendParameterName diff --git a/wrapper/MM/StretchBendSymbols.pypp.cpp b/wrapper/MM/StretchBendSymbols.pypp.cpp index 9ccc6a2bc..8f1d29944 100644 --- a/wrapper/MM/StretchBendSymbols.pypp.cpp +++ b/wrapper/MM/StretchBendSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::StretchBendSymbols __copy__(const SireMM::StretchBendSymbols &other){ re const char* pvt_get_name(const SireMM::StretchBendSymbols&){ return "SireMM::StretchBendSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_StretchBendSymbols_class(){ { //::SireMM::StretchBendSymbols @@ -50,7 +52,7 @@ void register_StretchBendSymbols_class(){ StretchBendSymbols_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond length, r_\n{01}" ); } @@ -62,7 +64,7 @@ void register_StretchBendSymbols_class(){ StretchBendSymbols_exposer.def( "r12" , r12_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond length r_\n{12}" ); } @@ -74,7 +76,7 @@ void register_StretchBendSymbols_class(){ StretchBendSymbols_exposer.def( "r21" , r21_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond length, r_\n{21}" ); } @@ -86,7 +88,7 @@ void register_StretchBendSymbols_class(){ StretchBendSymbols_exposer.def( "theta" , theta_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the angle, theta" ); } diff --git a/wrapper/MM/StretchBendTorsionComponent.pypp.cpp b/wrapper/MM/StretchBendTorsionComponent.pypp.cpp index 0998a07c7..a6be78976 100644 --- a/wrapper/MM/StretchBendTorsionComponent.pypp.cpp +++ b/wrapper/MM/StretchBendTorsionComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::StretchBendTorsionComponent __copy__(const SireMM::StretchBendTorsionCom #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_StretchBendTorsionComponent_class(){ { //::SireMM::StretchBendTorsionComponent @@ -39,6 +41,7 @@ void register_StretchBendTorsionComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("sbtnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_StretchBendTorsionComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("sbtnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_StretchBendTorsionComponent_class(){ StretchBendTorsionComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_StretchBendTorsionComponent_class(){ StretchBendTorsionComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_StretchBendTorsionComponent_class(){ StretchBendTorsionComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_StretchBendTorsionComponent_class(){ StretchBendTorsionComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp b/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp index c6405580c..077dd2771 100644 --- a/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp +++ b/wrapper/MM/StretchBendTorsionParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::StretchBendTorsionParameterName __copy__(const SireMM::StretchBendTorsio const char* pvt_get_name(const SireMM::StretchBendTorsionParameterName&){ return "SireMM::StretchBendTorsionParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_StretchBendTorsionParameterName_class(){ { //::SireMM::StretchBendTorsionParameterName diff --git a/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp b/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp index 557833452..025eca50e 100644 --- a/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp +++ b/wrapper/MM/StretchBendTorsionSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::StretchBendTorsionSymbols __copy__(const SireMM::StretchBendTorsionSymbo const char* pvt_get_name(const SireMM::StretchBendTorsionSymbols&){ return "SireMM::StretchBendTorsionSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_StretchBendTorsionSymbols_class(){ { //::SireMM::StretchBendTorsionSymbols @@ -50,7 +52,7 @@ void register_StretchBendTorsionSymbols_class(){ StretchBendTorsionSymbols_exposer.def( "phi" , phi_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the torsion, phi" ); } @@ -62,7 +64,7 @@ void register_StretchBendTorsionSymbols_class(){ StretchBendTorsionSymbols_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond between atoms 0-1, r_\n{01}" ); } @@ -74,7 +76,7 @@ void register_StretchBendTorsionSymbols_class(){ StretchBendTorsionSymbols_exposer.def( "r03" , r03_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the distance from atom 0 to 3, r_\n{03}" ); } @@ -86,7 +88,7 @@ void register_StretchBendTorsionSymbols_class(){ StretchBendTorsionSymbols_exposer.def( "r12" , r12_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond between atoms 1-2, r_\n{12}" ); } @@ -98,7 +100,7 @@ void register_StretchBendTorsionSymbols_class(){ StretchBendTorsionSymbols_exposer.def( "r32" , r32_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond between atoms 3-2, r_\n{32}" ); } @@ -110,7 +112,7 @@ void register_StretchBendTorsionSymbols_class(){ StretchBendTorsionSymbols_exposer.def( "theta012" , theta012_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the angle between atoms 0-1-2, theta_\n{012}" ); } @@ -122,7 +124,7 @@ void register_StretchBendTorsionSymbols_class(){ StretchBendTorsionSymbols_exposer.def( "theta321" , theta321_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the angle between atoms 3-2-1, theta_\n{321}" ); } diff --git a/wrapper/MM/StretchStretchComponent.pypp.cpp b/wrapper/MM/StretchStretchComponent.pypp.cpp index 22a459c71..b8a8b9ab9 100644 --- a/wrapper/MM/StretchStretchComponent.pypp.cpp +++ b/wrapper/MM/StretchStretchComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::StretchStretchComponent __copy__(const SireMM::StretchStretchComponent & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_StretchStretchComponent_class(){ { //::SireMM::StretchStretchComponent @@ -39,6 +41,7 @@ void register_StretchStretchComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("ssnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_StretchStretchComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("ssnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_StretchStretchComponent_class(){ StretchStretchComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_StretchStretchComponent_class(){ StretchStretchComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_StretchStretchComponent_class(){ StretchStretchComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_StretchStretchComponent_class(){ StretchStretchComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/StretchStretchParameterName.pypp.cpp b/wrapper/MM/StretchStretchParameterName.pypp.cpp index d283137c2..3cdf72fcc 100644 --- a/wrapper/MM/StretchStretchParameterName.pypp.cpp +++ b/wrapper/MM/StretchStretchParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::StretchStretchParameterName __copy__(const SireMM::StretchStretchParamet const char* pvt_get_name(const SireMM::StretchStretchParameterName&){ return "SireMM::StretchStretchParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_StretchStretchParameterName_class(){ { //::SireMM::StretchStretchParameterName diff --git a/wrapper/MM/StretchStretchSymbols.pypp.cpp b/wrapper/MM/StretchStretchSymbols.pypp.cpp index b29c3dd3b..0e451152b 100644 --- a/wrapper/MM/StretchStretchSymbols.pypp.cpp +++ b/wrapper/MM/StretchStretchSymbols.pypp.cpp @@ -36,6 +36,8 @@ SireMM::StretchStretchSymbols __copy__(const SireMM::StretchStretchSymbols &othe const char* pvt_get_name(const SireMM::StretchStretchSymbols&){ return "SireMM::StretchStretchSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_StretchStretchSymbols_class(){ { //::SireMM::StretchStretchSymbols @@ -50,7 +52,7 @@ void register_StretchStretchSymbols_class(){ StretchStretchSymbols_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond length r_\n{01}" ); } @@ -62,7 +64,7 @@ void register_StretchStretchSymbols_class(){ StretchStretchSymbols_exposer.def( "r12" , r12_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond length r_\n{12}" ); } @@ -74,7 +76,7 @@ void register_StretchStretchSymbols_class(){ StretchStretchSymbols_exposer.def( "r21" , r21_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the bond length r_\n{21}" ); } diff --git a/wrapper/MM/SwitchingFunction.pypp.cpp b/wrapper/MM/SwitchingFunction.pypp.cpp index b9d4ff59c..991317884 100644 --- a/wrapper/MM/SwitchingFunction.pypp.cpp +++ b/wrapper/MM/SwitchingFunction.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SwitchingFunction_class(){ { //::SireMM::SwitchingFunction @@ -45,6 +47,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "cutoffDistance" , cutoffDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -57,6 +60,7 @@ void register_SwitchingFunction_class(){ "dElectrostaticScaleFactor" , dElectrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the derivative (gradient) of the electrostatic\nscale factor at the distance dist" ); } @@ -69,6 +73,7 @@ void register_SwitchingFunction_class(){ "dVDWScaleFactor" , dVDWScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the derivative (gradient) of the VDW\nscale factor at the distance dist" ); } @@ -80,6 +85,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "electrostaticCutoffDistance" , electrostaticCutoffDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +97,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "electrostaticFeatherDistance" , electrostaticFeatherDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +110,7 @@ void register_SwitchingFunction_class(){ "electrostaticScaleFactor" , electrostaticScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the electrostatic scale factor for the distance dist" ); } @@ -114,6 +122,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "featherDistance" , featherDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +146,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this switching function" ); } @@ -148,6 +158,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -159,6 +170,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "vdwCutoffDistance" , vdwCutoffDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -170,6 +182,7 @@ void register_SwitchingFunction_class(){ SwitchingFunction_exposer.def( "vdwFeatherDistance" , vdwFeatherDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +195,7 @@ void register_SwitchingFunction_class(){ "vdwScaleFactor" , vdwScaleFactor_function_value , ( bp::arg("dist") ) + , bp::release_gil_policy() , "Return the VDW scale factor for the distance dist" ); } diff --git a/wrapper/MM/TestFF.pypp.cpp b/wrapper/MM/TestFF.pypp.cpp index 406fd659c..497a21976 100644 --- a/wrapper/MM/TestFF.pypp.cpp +++ b/wrapper/MM/TestFF.pypp.cpp @@ -33,6 +33,8 @@ SireMM::TestFF __copy__(const SireMM::TestFF &other){ return SireMM::TestFF(othe const char* pvt_get_name(const SireMM::TestFF&){ return "SireMM::TestFF";} +#include "Helpers/release_gil_policy.hpp" + void register_TestFF_class(){ { //::SireMM::TestFF @@ -49,6 +51,7 @@ void register_TestFF_class(){ "add" , add_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -61,6 +64,7 @@ void register_TestFF_class(){ "addFixedAtoms" , addFixedAtoms_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -72,6 +76,7 @@ void register_TestFF_class(){ TestFF_exposer.def( "calculateEnergy" , calculateEnergy_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +102,7 @@ void register_TestFF_class(){ "setCutoff" , setCutoff_function_value , ( bp::arg("coul_cutoff"), bp::arg("lj_cutoff") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/ThreeAtomFunction.pypp.cpp b/wrapper/MM/ThreeAtomFunction.pypp.cpp index 58b166466..22abda112 100644 --- a/wrapper/MM/ThreeAtomFunction.pypp.cpp +++ b/wrapper/MM/ThreeAtomFunction.pypp.cpp @@ -34,6 +34,8 @@ SireMM::ThreeAtomFunction __copy__(const SireMM::ThreeAtomFunction &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ThreeAtomFunction_class(){ { //::SireMM::ThreeAtomFunction @@ -50,7 +52,7 @@ void register_ThreeAtomFunction_class(){ ThreeAtomFunction_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -62,7 +64,7 @@ void register_ThreeAtomFunction_class(){ ThreeAtomFunction_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -74,7 +76,7 @@ void register_ThreeAtomFunction_class(){ ThreeAtomFunction_exposer.def( "atom2" , atom2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -101,6 +103,7 @@ void register_ThreeAtomFunction_class(){ ThreeAtomFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } diff --git a/wrapper/MM/ThreeAtomFunctions.pypp.cpp b/wrapper/MM/ThreeAtomFunctions.pypp.cpp index 14207b84b..f3d3e30c6 100644 --- a/wrapper/MM/ThreeAtomFunctions.pypp.cpp +++ b/wrapper/MM/ThreeAtomFunctions.pypp.cpp @@ -35,6 +35,8 @@ SireMM::ThreeAtomFunctions __copy__(const SireMM::ThreeAtomFunctions &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ThreeAtomFunctions_class(){ { //::SireMM::ThreeAtomFunctions @@ -53,6 +55,7 @@ void register_ThreeAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Clear all functions that involve the atom atom\nThrow: SireError::invalid_index\n" ); } @@ -65,6 +68,7 @@ void register_ThreeAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Clear any function that acts on the atoms identified by atom\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -77,6 +81,7 @@ void register_ThreeAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Clear any function that acts between the atoms atom0 to atom2\nThrow: SireError::invalid_index\n" ); } @@ -89,6 +94,7 @@ void register_ThreeAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Clear any function that acts between the atoms atom0 to atom2\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -101,6 +107,7 @@ void register_ThreeAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("angleid") ) + , bp::release_gil_policy() , "Clear the potential that acts over the angle identified by angleid\nThis clears both 1-2-3 and 3-2-1\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -112,6 +119,7 @@ void register_ThreeAtomFunctions_class(){ ThreeAtomFunctions_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear all of the functions from this set" ); } @@ -124,6 +132,7 @@ void register_ThreeAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\nbetween the atoms atom0 to atom2\nThrow: SireError::invalid_index\n" ); } @@ -136,6 +145,7 @@ void register_ThreeAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\nbetween the atoms atom0 to atom2\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -148,6 +158,7 @@ void register_ThreeAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("angleid"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\non the angle identified by angleid\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -160,6 +171,7 @@ void register_ThreeAtomFunctions_class(){ "forces" , forces_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force functions acting between the identified\ntriples of atoms, for the given symbol" ); } @@ -183,6 +195,7 @@ void register_ThreeAtomFunctions_class(){ ThreeAtomFunctions_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty (has no potentials for any internals)" ); } @@ -194,6 +207,7 @@ void register_ThreeAtomFunctions_class(){ ThreeAtomFunctions_exposer.def( "nFunctions" , nFunctions_function_value + , bp::release_gil_policy() , "Return the number of functions in this set" ); } @@ -221,6 +235,7 @@ void register_ThreeAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Return the function acting between the atoms atom0 to atom2.\nThis returns an empty expression if there is no expression between\nthese atoms\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); } @@ -233,6 +248,7 @@ void register_ThreeAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Return the function acting between the atoms atom0 to atom2.\nThis returns an empty expression if there is no expression between\nthese atoms\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -245,6 +261,7 @@ void register_ThreeAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("angleid") ) + , bp::release_gil_policy() , "Return the function acting on the angle identified by angleid.\nThis returns an empty expression if there is no expression on\nthis angle\nThis search first for the function for 1-2-3, but if that\nis not found, then it returns the function for 3-2-1\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -256,6 +273,7 @@ void register_ThreeAtomFunctions_class(){ ThreeAtomFunctions_exposer.def( "potentials" , potentials_function_value + , bp::release_gil_policy() , "Return the potential energy functions acting between the identified\ntriples of atoms" ); } @@ -268,6 +286,7 @@ void register_ThreeAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used by atoms atom0, atom1 and atom2\nto be equal to expression - this replaces any existing expression\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); } @@ -280,6 +299,7 @@ void register_ThreeAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used by atoms atom0 to atom2\nto be equal to expression - this replaces any existing expression\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -292,6 +312,7 @@ void register_ThreeAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("angleid"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used for the angle identified by angleid\nto be equal to expression - this replaces any existing expression\nThis replaces both 1-2-3 and 3-2-1\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -304,6 +325,7 @@ void register_ThreeAtomFunctions_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Perform the substitutions contained in identities in all of\nthe expressions in this set. This could be useful if you have\ndefined these expressions with respect to a lambda parameter,\nand now want to set that value of lambda" ); } @@ -315,6 +337,7 @@ void register_ThreeAtomFunctions_class(){ ThreeAtomFunctions_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -326,6 +349,7 @@ void register_ThreeAtomFunctions_class(){ ThreeAtomFunctions_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/ThreeAtomPerturbation.pypp.cpp b/wrapper/MM/ThreeAtomPerturbation.pypp.cpp index 4d0fda4a6..f7eb5b7a3 100644 --- a/wrapper/MM/ThreeAtomPerturbation.pypp.cpp +++ b/wrapper/MM/ThreeAtomPerturbation.pypp.cpp @@ -10,6 +10,8 @@ namespace bp = boost::python; #include "SireCAS/values.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -36,6 +38,8 @@ SireMM::ThreeAtomPerturbation __copy__(const SireMM::ThreeAtomPerturbation &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ThreeAtomPerturbation_class(){ { //::SireMM::ThreeAtomPerturbation @@ -55,7 +59,7 @@ void register_ThreeAtomPerturbation_class(){ ThreeAtomPerturbation_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first of the three atoms whose potential is being changed" ); } @@ -67,7 +71,7 @@ void register_ThreeAtomPerturbation_class(){ ThreeAtomPerturbation_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second of the three atoms whose potential is being changed" ); } @@ -79,7 +83,7 @@ void register_ThreeAtomPerturbation_class(){ ThreeAtomPerturbation_exposer.def( "atom2" , atom2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third of the three atoms whose potential is being changed" ); } @@ -106,6 +110,7 @@ void register_ThreeAtomPerturbation_class(){ ThreeAtomPerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return the properties required or changed by this perturbation" ); } @@ -117,6 +122,7 @@ void register_ThreeAtomPerturbation_class(){ ThreeAtomPerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this perturbation" ); } @@ -128,6 +134,7 @@ void register_ThreeAtomPerturbation_class(){ ThreeAtomPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -140,6 +147,7 @@ void register_ThreeAtomPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/MM/TripleDistanceRestraint.pypp.cpp b/wrapper/MM/TripleDistanceRestraint.pypp.cpp index ed8646712..48aa9a18e 100644 --- a/wrapper/MM/TripleDistanceRestraint.pypp.cpp +++ b/wrapper/MM/TripleDistanceRestraint.pypp.cpp @@ -36,6 +36,8 @@ SireMM::TripleDistanceRestraint __copy__(const SireMM::TripleDistanceRestraint & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TripleDistanceRestraint_class(){ { //::SireMM::TripleDistanceRestraint @@ -53,6 +55,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "builtinSymbols" , builtinSymbols_function_value + , bp::release_gil_policy() , "Return the built-in symbols of this restraint" ); } @@ -64,6 +67,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "builtinValues" , builtinValues_function_value + , bp::release_gil_policy() , "Return the values of the built-in symbols of this restraint" ); } @@ -76,6 +80,7 @@ void register_TripleDistanceRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith number molnum" ); } @@ -88,6 +93,7 @@ void register_TripleDistanceRestraint_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this restraint affects the molecule\nwith ID molid" ); } @@ -136,6 +142,7 @@ void register_TripleDistanceRestraint_class(){ "differentiate" , differentiate_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the differential of this restraint with respect to\nthe symbol symbol" ); } @@ -171,6 +178,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the molecules used in this restraint" ); } @@ -182,6 +190,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "This restraint involves six points" ); } @@ -209,7 +218,7 @@ void register_TripleDistanceRestraint_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point" ); } @@ -221,7 +230,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point" ); } @@ -233,7 +242,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point" ); } @@ -245,7 +254,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third point" ); } @@ -257,7 +266,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "point3" , point3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the fourth point" ); } @@ -269,7 +278,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "point4" , point4_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the fifth point" ); } @@ -281,7 +290,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "point5" , point5_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sixth point" ); } @@ -293,7 +302,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints 0 and 1 (r01)" ); } @@ -305,7 +314,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "r23" , r23_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints 2 and 3 (r23)" ); } @@ -317,7 +326,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "r45" , r45_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints 4 and 5 (r45)" ); } @@ -330,6 +339,7 @@ void register_TripleDistanceRestraint_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space used to evaluate the energy of this restraint\nThrow: SireVol::incompatible_space\n" ); } @@ -341,6 +351,7 @@ void register_TripleDistanceRestraint_class(){ TripleDistanceRestraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -353,6 +364,7 @@ void register_TripleDistanceRestraint_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from moldata\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -365,6 +377,7 @@ void register_TripleDistanceRestraint_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the points of this restraint using new molecule data from molecules\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -377,6 +390,7 @@ void register_TripleDistanceRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nthat are in the forcetable forcetable" ); } @@ -389,6 +403,7 @@ void register_TripleDistanceRestraint_class(){ "usesMoleculesIn" , usesMoleculesIn_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this restraint involves any of the molecules\nin molecules" ); } diff --git a/wrapper/MM/TwoAtomFunction.pypp.cpp b/wrapper/MM/TwoAtomFunction.pypp.cpp index 16c217831..020ef05c4 100644 --- a/wrapper/MM/TwoAtomFunction.pypp.cpp +++ b/wrapper/MM/TwoAtomFunction.pypp.cpp @@ -36,6 +36,8 @@ SireMM::TwoAtomFunction __copy__(const SireMM::TwoAtomFunction &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TwoAtomFunction_class(){ { //::SireMM::TwoAtomFunction @@ -52,7 +54,7 @@ void register_TwoAtomFunction_class(){ TwoAtomFunction_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -64,7 +66,7 @@ void register_TwoAtomFunction_class(){ TwoAtomFunction_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -91,6 +93,7 @@ void register_TwoAtomFunction_class(){ TwoAtomFunction_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } diff --git a/wrapper/MM/TwoAtomFunctions.pypp.cpp b/wrapper/MM/TwoAtomFunctions.pypp.cpp index 3ea367bf1..a570b12e5 100644 --- a/wrapper/MM/TwoAtomFunctions.pypp.cpp +++ b/wrapper/MM/TwoAtomFunctions.pypp.cpp @@ -37,6 +37,8 @@ SireMM::TwoAtomFunctions __copy__(const SireMM::TwoAtomFunctions &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TwoAtomFunctions_class(){ { //::SireMM::TwoAtomFunctions @@ -55,6 +57,7 @@ void register_TwoAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Clear all functions that involve the atom atom\nThrow: SireError::invalid_index\n" ); } @@ -67,6 +70,7 @@ void register_TwoAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Clear any function that acts on the atoms identified by atom\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -79,6 +83,7 @@ void register_TwoAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Clear any function that acts between the atoms atom0 and atom1\nThrow: SireError::invalid_index\n" ); } @@ -91,6 +96,7 @@ void register_TwoAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Clear any function that acts between the atoms atom0 and atom1\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -103,6 +109,7 @@ void register_TwoAtomFunctions_class(){ "clear" , clear_function_value , ( bp::arg("bondid") ) + , bp::release_gil_policy() , "Clear the potential that acts over the bond identified by bondid\nNote that this removes both 1-2 and 2-1\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -114,6 +121,7 @@ void register_TwoAtomFunctions_class(){ TwoAtomFunctions_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear all of the functions from this set" ); } @@ -126,6 +134,7 @@ void register_TwoAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\nbetween the atoms atom0 and atom1\nThrow: SireError::invalid_index\n" ); } @@ -138,6 +147,7 @@ void register_TwoAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\nbetween the atoms atom0 and atom1\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -150,6 +160,7 @@ void register_TwoAtomFunctions_class(){ "force" , force_function_value , ( bp::arg("bondid"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force (derivative of the potential with respect to symbol)\non the bond identified by bondid\nThis searches first for the function 1-2, and if that is not\nfound then it returns the function for 2-1\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -162,6 +173,7 @@ void register_TwoAtomFunctions_class(){ "forces" , forces_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the force functions acting between the identified\npairs of atoms, for the given symbol" ); } @@ -185,6 +197,7 @@ void register_TwoAtomFunctions_class(){ TwoAtomFunctions_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty (has no potentials for any internals)" ); } @@ -196,6 +209,7 @@ void register_TwoAtomFunctions_class(){ TwoAtomFunctions_exposer.def( "nFunctions" , nFunctions_function_value + , bp::release_gil_policy() , "This returns the total number of functions in this set" ); } @@ -223,6 +237,7 @@ void register_TwoAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return the function acting between the atoms atom0 and atom1.\nThis returns an empty expression if there is no expression between\nthese atoms\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); } @@ -235,6 +250,7 @@ void register_TwoAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return the function acting between the atoms atom0 and atom1.\nThis returns an empty expression if there is no expression between\nthese atoms\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -247,6 +263,7 @@ void register_TwoAtomFunctions_class(){ "potential" , potential_function_value , ( bp::arg("bondid") ) + , bp::release_gil_policy() , "Return the function acting on the bond identified by bondid.\nThis returns an empty expression if there is no expression on\nthis bond\nThis searches first for the function 1-2, and if that is not\nfound then it returns the function for 2-1\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -258,6 +275,7 @@ void register_TwoAtomFunctions_class(){ TwoAtomFunctions_exposer.def( "potentials" , potentials_function_value + , bp::release_gil_policy() , "Return the potential energy functions acting between the identified\npairs of atoms" ); } @@ -270,6 +288,7 @@ void register_TwoAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used by atoms atom0 and atom1\nto be equal to expression - this replaces any existing expression\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); } @@ -282,6 +301,7 @@ void register_TwoAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used by atoms atom0 and atom1\nto be equal to expression - this replaces any existing expression\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -294,6 +314,7 @@ void register_TwoAtomFunctions_class(){ "set" , set_function_value , ( bp::arg("bondid"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the potential energy function used for the bond identified by bondid\nto be equal to expression - this replaces any existing expression\nNote that this replaces both 1-2 and 2-1\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -306,6 +327,7 @@ void register_TwoAtomFunctions_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Perform the substitutions contained in identities in all of\nthe expressions in this set. This could be useful if you have\ndefined these expressions with respect to a lambda parameter,\nand now want to set that value of lambda" ); } @@ -317,6 +339,7 @@ void register_TwoAtomFunctions_class(){ TwoAtomFunctions_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -328,6 +351,7 @@ void register_TwoAtomFunctions_class(){ TwoAtomFunctions_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/TwoAtomPerturbation.pypp.cpp b/wrapper/MM/TwoAtomPerturbation.pypp.cpp index 9daed3abc..c5c632fea 100644 --- a/wrapper/MM/TwoAtomPerturbation.pypp.cpp +++ b/wrapper/MM/TwoAtomPerturbation.pypp.cpp @@ -10,6 +10,8 @@ namespace bp = boost::python; #include "SireCAS/values.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -36,6 +38,8 @@ SireMM::TwoAtomPerturbation __copy__(const SireMM::TwoAtomPerturbation &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TwoAtomPerturbation_class(){ { //::SireMM::TwoAtomPerturbation @@ -55,7 +59,7 @@ void register_TwoAtomPerturbation_class(){ TwoAtomPerturbation_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first of the two atoms whose potential is being changed" ); } @@ -67,7 +71,7 @@ void register_TwoAtomPerturbation_class(){ TwoAtomPerturbation_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second of the two atoms whose potential is being changed" ); } @@ -94,6 +98,7 @@ void register_TwoAtomPerturbation_class(){ TwoAtomPerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return the properties required or changed by this perturbation" ); } @@ -105,6 +110,7 @@ void register_TwoAtomPerturbation_class(){ TwoAtomPerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this perturbation" ); } @@ -116,6 +122,7 @@ void register_TwoAtomPerturbation_class(){ TwoAtomPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -128,6 +135,7 @@ void register_TwoAtomPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/MM/UreyBradleyComponent.pypp.cpp b/wrapper/MM/UreyBradleyComponent.pypp.cpp index ffd121de8..e74b5c685 100644 --- a/wrapper/MM/UreyBradleyComponent.pypp.cpp +++ b/wrapper/MM/UreyBradleyComponent.pypp.cpp @@ -22,6 +22,8 @@ SireMM::UreyBradleyComponent __copy__(const SireMM::UreyBradleyComponent &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_UreyBradleyComponent_class(){ { //::SireMM::UreyBradleyComponent @@ -39,6 +41,7 @@ void register_UreyBradleyComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("ubnrg") ) + , bp::release_gil_policy() , "Change the component of the energy in the forcefield ff\nby delta" ); } @@ -51,6 +54,7 @@ void register_UreyBradleyComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("ubnrg") ) + , bp::release_gil_policy() , "Set the component of the energy in the forcefield ff\nto be equal to the passed energy" ); } @@ -62,6 +66,7 @@ void register_UreyBradleyComponent_class(){ UreyBradleyComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -73,7 +78,7 @@ void register_UreyBradleyComponent_class(){ UreyBradleyComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -85,6 +90,7 @@ void register_UreyBradleyComponent_class(){ UreyBradleyComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_UreyBradleyComponent_class(){ UreyBradleyComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/MM/UreyBradleyParameterName.pypp.cpp b/wrapper/MM/UreyBradleyParameterName.pypp.cpp index 1e3787e1f..456e6a9f6 100644 --- a/wrapper/MM/UreyBradleyParameterName.pypp.cpp +++ b/wrapper/MM/UreyBradleyParameterName.pypp.cpp @@ -51,6 +51,8 @@ SireMM::UreyBradleyParameterName __copy__(const SireMM::UreyBradleyParameterName const char* pvt_get_name(const SireMM::UreyBradleyParameterName&){ return "SireMM::UreyBradleyParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_UreyBradleyParameterName_class(){ { //::SireMM::UreyBradleyParameterName diff --git a/wrapper/MM/_MM.main.cpp b/wrapper/MM/_MM.main.cpp index ef635b587..5df725c8c 100644 --- a/wrapper/MM/_MM.main.cpp +++ b/wrapper/MM/_MM.main.cpp @@ -45,6 +45,8 @@ #include "BendBendSymbols.pypp.hpp" +#include "Bond.pypp.hpp" + #include "BondComponent.pypp.hpp" #include "BondParameterName.pypp.hpp" @@ -299,6 +301,10 @@ #include "MMDetail.pypp.hpp" +#include "Mover_Bond_.pypp.hpp" + +#include "Mover_SelectorBond_.pypp.hpp" + #include "MultiCLJComponent.pypp.hpp" #include "NoCutoff.pypp.hpp" @@ -321,6 +327,10 @@ #include "ScaledLJParameterNames3D.pypp.hpp" +#include "SelectorBond.pypp.hpp" + +#include "SelectorMBond.pypp.hpp" + #include "SoftCLJComponent.pypp.hpp" #include "SoftCLJPotentialInterface_InterSoftCLJPotential_.pypp.hpp" @@ -512,6 +522,8 @@ BOOST_PYTHON_MODULE(_MM){ register_BendBendSymbols_class(); + register_Bond_class(); + register_BondComponent_class(); register_BondParameterName_class(); @@ -706,6 +718,10 @@ BOOST_PYTHON_MODULE(_MM){ register_ScaledLJParameterNames3D_class(); + register_SelectorBond_class(); + + register_SelectorMBond_class(); + register_SoftCLJComponent_class(); register_StretchBendComponent_class(); @@ -738,8 +754,12 @@ BOOST_PYTHON_MODULE(_MM){ register_UreyBradleyComponent_class(); + register_AtomLJs_class(); + + register_Mover_Bond__class(); + register_SireMM_properties(); - register_AtomLJs_class(); + register_Mover_SelectorBond__class(); } diff --git a/wrapper/MM/__init__.py b/wrapper/MM/__init__.py index f6ae8bcde..74a5b5b3e 100644 --- a/wrapper/MM/__init__.py +++ b/wrapper/MM/__init__.py @@ -1,37 +1,180 @@ -############################# -## -## The SireMM library. -## -## This contains all of the classes that are used to -## provide a molecular mechanics forcefield (partial -## charges, LJ terms, bond, angle, dihedral terms, -## MM parameter database classes etc). It also -## contains all of the MM forcefields. -## - -import Sire.FF -import Sire.CAS +""" +.. currentmodule:: sire.legacy.MM + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + AmberAngle + AmberBond + AmberDihedral + AmberDihPart + AmberNB14 + AngleComponent + AngleParameterName + AngleRestraint + AngleSymbols + AtomFunction + AtomFunctions + AtomLJs + BendBendComponent + BendBendParameterName + BendBendSymbols + BondComponent + BondParameterName + BondSymbols + ChargeParameterName + ChargeParameterName3D + CHARMMSwitchingFunction + CLJ14Group + CLJAtom + CLJAtoms + CLJBox + CLJBoxDistance + CLJBoxes + CLJBoxIndex + CLJCalculator + CLJComponent + CLJCutoffFunction + CLJDelta + CLJExtractor + CLJFunction + CLJGrid + CLJIntraFunction + CLJIntraRFFunction + CLJIntraShiftFunction + CLJNBPairs + CLJParameterNames + CLJParameterNames3D + CLJProbe + CLJRFFunction + CLJScaleFactor + CLJShiftFunction + CLJSoftFunction + CLJSoftIntraFunction + CLJSoftIntraRFFunction + CLJSoftIntraShiftFunction + CLJSoftRFFunction + CLJSoftShiftFunction + CLJWorkspace + CoulombComponent + CoulombNBPairs + CoulombProbe + CoulombScaleFactor + DihedralComponent + DihedralParameterName + DihedralRestraint + DihedralSymbols + DistanceRestraint + DoubleDistanceRestraint + FourAtomFunction + FourAtomFunctions + FourAtomPerturbation + GridFF + GridFF2 + GromacsAngle + GromacsAtomType + GromacsBond + GromacsDihedral + GroupInternalParameters + HarmonicSwitchingFunction + ImproperComponent + ImproperParameterName + ImproperSymbols + InterCLJFF + InterCoulombFF + InterFF + InterGroupCLJFF + InterGroupCoulombFF + InterGroupFF + InterGroupLJFF + InterGroupSoftCLJFF + InterLJFF + InternalComponent + InternalFF + InternalParameterNames + InternalParameters + InternalParameters3D + InternalPerturbation + InternalSymbols + InterSoftCLJFF + Intra14Component + Intra14CoulombComponent + Intra14LJComponent + IntraCLJFF + IntraCoulombFF + IntraFF + IntraGroupCLJFF + IntraGroupCoulombFF + IntraGroupFF + IntraGroupLJFF + IntraGroupSoftCLJFF + IntraLJFF + IntraSoftCLJFF + LJComponent + LJNBPairs + LJParameter + LJParameterName + LJParameterName3D + LJPerturbation + LJProbe + LJScaleFactor + MultiCLJComponent + NoCutoff + Restraint + Restraint3D + RestraintComponent + RestraintFF + ScaledChargeParameterNames3D + ScaledCLJParameterNames3D + ScaledLJParameterNames3D + SoftCLJComponent + StretchBendComponent + StretchBendParameterName + StretchBendSymbols + StretchBendTorsionComponent + StretchBendTorsionParameterName + StretchBendTorsionSymbols + StretchStretchComponent + StretchStretchParameterName + StretchStretchSymbols + SwitchingFunction + TestFF + ThreeAtomFunction + ThreeAtomFunctions + ThreeAtomPerturbation + TripleDistanceRestraint + TwoAtomFunction + TwoAtomFunctions + +""" + +from .. import FF as _FF +from .. import CAS as _CAS +from .. import Mol as _Mol # Import all of the classes and functions from the C++ library -from Sire.MM._MM import * +from ._MM import * -# Now define some pure Python functions and classes that are part of +# Now define some pure Python functions and classes that are part of # this library... # Next define all of the MM forcefield types so that the code can # get them def _createMMTypes(): amberff = MMDetail(name = "amber::ff", - combining_rules = "arithmetic", + combining_rules = "arithmetic", scale14elec = 1.0/1.2, scale14vdw = 0.5, - elecstyle = "coulomb", vdwstyle = "lj", + elecstyle = "coulomb", vdwstyle = "lj", bondstyle = "harmonic", anglestyle = "harmonic", dihedralstyle = "cosine") amberff99 = MMDetail(name = "amber::ff99", - combining_rules = "arithmetic", + combining_rules = "arithmetic", scale14elec = 1.0/1.2, scale14vdw = 0.5, - elecstyle = "coulomb", vdwstyle = "lj", + elecstyle = "coulomb", vdwstyle = "lj", bondstyle = "harmonic", anglestyle = "harmonic", dihedralstyle = "cosine") @@ -69,15 +212,15 @@ def _createMMTypes(): def getForceFields(): """Return the names of the different MM forcefields that are recognised by this program""" - return Sire.FF.FFDetail.forcefields() + return _FF_FFDetail.forcefields() def getForceField(name): """Return the MM forcefield called 'name'""" - return Sire.FF.FFDetail.get(name) + return _FF.FFDetail.get(name) ###### PROPERTY KLUDGE FIX __props = [ AtomLJs ] for __prop in __props: - Sire.Mol._pvt_property_cludge_fix(__prop) + _Mol._pvt_property_cludge_fix(__prop) diff --git a/wrapper/MM/active_headers.h b/wrapper/MM/active_headers.h index b7da6b230..cac2d33fb 100644 --- a/wrapper/MM/active_headers.h +++ b/wrapper/MM/active_headers.h @@ -7,6 +7,7 @@ #include "anglerestraint.h" #include "atomfunctions.h" #include "atomljs.h" +#include "bond.h" #include "clj14group.h" #include "cljatoms.h" #include "cljboxes.h" @@ -56,6 +57,8 @@ #include "restraint.h" #include "restraintcomponent.h" #include "restraintff.h" +#include "selectorbond.h" +#include "selectormbond.h" #include "softcljcomponent.h" #include "switchingfunction.h" #include "testff.h" diff --git a/wrapper/MM/special_code.py b/wrapper/MM/special_code.py index b22ff75f6..55385c7ef 100644 --- a/wrapper/MM/special_code.py +++ b/wrapper/MM/special_code.py @@ -8,8 +8,28 @@ import sys import pickle +active_headers = pickle.load( open("active_headers.data", "rb") ) +mol_headers = pickle.load( open("../Mol/active_headers.data", "rb") ) + from pyplusplus.module_builder import call_policies +def fix_Mover(c): + c.decls("mapInto").call_policies = call_policies.return_self() + c.decls("transform").call_policies = call_policies.return_self() + c.decls("translate").call_policies = call_policies.return_self() + c.decls("rotate").call_policies = call_policies.return_self() + c.decls("transform").call_policies = call_policies.return_self() + c.decls("changeFrame").call_policies = call_policies.return_self() + c.decls("change").call_policies = call_policies.return_self() + c.decls("set").call_policies = call_policies.return_self() + c.decls("setAll").call_policies = call_policies.return_self() + c.decls("alignTo").call_policies = call_policies.return_self() + c.decls("align").call_policies = call_policies.return_self() + + #also include all of the header files included in mover.cpp + for header in mol_headers["mover.h"].dependencies(): + c.add_declaration_code( "#include %s" % header ) + def fix_MolViewProperty(c): c.decls("set").call_policies = call_policies.return_self() @@ -27,4 +47,6 @@ def fix_CLJFunction(c): "SireMM::CLJFunction" : fix_CLJFunction, "SireMM::FourAtomFunctions" : fix_AtomFunctions, "SireMM::ThreeAtomFunctions" : fix_AtomFunctions, - "SireMM::TwoAtomFunctions" : fix_AtomFunctions } + "SireMM::TwoAtomFunctions" : fix_AtomFunctions, + "SireMol::Mover" : fix_Mover, + "SireMol::Mover" : fix_Mover } diff --git a/wrapper/Maths/Accumulator.pypp.cpp b/wrapper/Maths/Accumulator.pypp.cpp index 6b0d82d86..cecfff13b 100644 --- a/wrapper/Maths/Accumulator.pypp.cpp +++ b/wrapper/Maths/Accumulator.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Accumulator_class(){ { //::SireMaths::Accumulator @@ -46,6 +48,7 @@ void register_Accumulator_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the value value onto the sample" ); } @@ -58,6 +61,7 @@ void register_Accumulator_class(){ "accumulate" , accumulate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Accumulate many values" ); } @@ -70,6 +74,7 @@ void register_Accumulator_class(){ "accumulate" , accumulate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Accumulate many values" ); } @@ -81,6 +86,7 @@ void register_Accumulator_class(){ Accumulator_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear the statistics in this accumulator" ); } @@ -92,6 +98,7 @@ void register_Accumulator_class(){ Accumulator_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the number of values that have been sampled" ); } @@ -115,6 +122,7 @@ void register_Accumulator_class(){ Accumulator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Array2D_Matrix_.pypp.cpp b/wrapper/Maths/Array2D_Matrix_.pypp.cpp index 4028ec90f..b10b5374a 100644 --- a/wrapper/Maths/Array2D_Matrix_.pypp.cpp +++ b/wrapper/Maths/Array2D_Matrix_.pypp.cpp @@ -41,6 +41,8 @@ SireBase::Array2D __copy__(const SireBase::Array2D @@ -118,6 +120,7 @@ void register_Array2D_Matrix__class(){ "redimension" , redimension_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +134,7 @@ void register_Array2D_Matrix__class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -144,6 +148,7 @@ void register_Array2D_Matrix__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -156,6 +161,7 @@ void register_Array2D_Matrix__class(){ Array2D_Matrix__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -168,6 +174,7 @@ void register_Array2D_Matrix__class(){ Array2D_Matrix__exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Array2D_NMatrix_.pypp.cpp b/wrapper/Maths/Array2D_NMatrix_.pypp.cpp index ea66a1702..31aeb25e2 100644 --- a/wrapper/Maths/Array2D_NMatrix_.pypp.cpp +++ b/wrapper/Maths/Array2D_NMatrix_.pypp.cpp @@ -31,6 +31,8 @@ SireBase::Array2D __copy__(const SireBase::Array2D @@ -108,6 +110,7 @@ void register_Array2D_NMatrix__class(){ "redimension" , redimension_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "" ); } @@ -121,6 +124,7 @@ void register_Array2D_NMatrix__class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -134,6 +138,7 @@ void register_Array2D_NMatrix__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -146,6 +151,7 @@ void register_Array2D_NMatrix__class(){ Array2D_NMatrix__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +164,7 @@ void register_Array2D_NMatrix__class(){ Array2D_NMatrix__exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Array2D_SireMaths_AccumulatorPtr_.pypp.cpp b/wrapper/Maths/Array2D_SireMaths_AccumulatorPtr_.pypp.cpp index b7eaddae8..2c334abe5 100644 --- a/wrapper/Maths/Array2D_SireMaths_AccumulatorPtr_.pypp.cpp +++ b/wrapper/Maths/Array2D_SireMaths_AccumulatorPtr_.pypp.cpp @@ -35,6 +35,8 @@ SireBase::Array2D > __copy__(const Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Array2D_SireMaths_AccumulatorPtr__class(){ { //::SireBase::Array2D< SireBase::PropPtr< SireMaths::Accumulator > > @@ -112,6 +114,7 @@ void register_Array2D_SireMaths_AccumulatorPtr__class(){ "redimension" , redimension_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "" ); } @@ -125,6 +128,7 @@ void register_Array2D_SireMaths_AccumulatorPtr__class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -138,6 +142,7 @@ void register_Array2D_SireMaths_AccumulatorPtr__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -150,6 +155,7 @@ void register_Array2D_SireMaths_AccumulatorPtr__class(){ Array2D_SireMaths_AccumulatorPtr__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -162,6 +168,7 @@ void register_Array2D_SireMaths_AccumulatorPtr__class(){ Array2D_SireMaths_AccumulatorPtr__exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Array2D_Vector_.pypp.cpp b/wrapper/Maths/Array2D_Vector_.pypp.cpp index 63cc6b67a..3b5ca686f 100644 --- a/wrapper/Maths/Array2D_Vector_.pypp.cpp +++ b/wrapper/Maths/Array2D_Vector_.pypp.cpp @@ -41,6 +41,8 @@ SireBase::Array2D __copy__(const SireBase::Array2D @@ -118,6 +120,7 @@ void register_Array2D_Vector__class(){ "redimension" , redimension_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +134,7 @@ void register_Array2D_Vector__class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -144,6 +148,7 @@ void register_Array2D_Vector__class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -156,6 +161,7 @@ void register_Array2D_Vector__class(){ Array2D_Vector__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -168,6 +174,7 @@ void register_Array2D_Vector__class(){ Array2D_Vector__exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/ArrayProperty_Vector_.pypp.cpp b/wrapper/Maths/ArrayProperty_Vector_.pypp.cpp index 56dac9a76..469e75f5d 100644 --- a/wrapper/Maths/ArrayProperty_Vector_.pypp.cpp +++ b/wrapper/Maths/ArrayProperty_Vector_.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ArrayProperty_Vector__class(){ @@ -37,6 +39,7 @@ void register_ArrayProperty_Vector__class(){ "append" , append_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -50,6 +53,7 @@ void register_ArrayProperty_Vector__class(){ "append" , append_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -62,6 +66,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "array" , array_function_value + , bp::release_gil_policy() , "" ); } @@ -75,6 +80,7 @@ void register_ArrayProperty_Vector__class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -87,6 +93,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +106,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +119,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "empty" , empty_function_value + , bp::release_gil_policy() , "" ); } @@ -124,6 +133,7 @@ void register_ArrayProperty_Vector__class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -137,6 +147,7 @@ void register_ArrayProperty_Vector__class(){ "insert" , insert_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -149,6 +160,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -162,6 +174,7 @@ void register_ArrayProperty_Vector__class(){ "move" , move_function_value , ( bp::arg("from"), bp::arg("to") ) + , bp::release_gil_policy() , "" ); } @@ -187,6 +200,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "pop_back" , pop_back_function_value + , bp::release_gil_policy() , "" ); } @@ -199,6 +213,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "pop_front" , pop_front_function_value + , bp::release_gil_policy() , "" ); } @@ -212,6 +227,7 @@ void register_ArrayProperty_Vector__class(){ "prepend" , prepend_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -225,6 +241,7 @@ void register_ArrayProperty_Vector__class(){ "push_back" , push_back_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -238,6 +255,7 @@ void register_ArrayProperty_Vector__class(){ "push_front" , push_front_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -251,6 +269,7 @@ void register_ArrayProperty_Vector__class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -263,6 +282,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "removeFirst" , removeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -275,6 +295,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "removeLast" , removeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -288,6 +309,7 @@ void register_ArrayProperty_Vector__class(){ "replace" , replace_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -300,6 +322,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -313,6 +336,7 @@ void register_ArrayProperty_Vector__class(){ "swap" , swap_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -326,6 +350,7 @@ void register_ArrayProperty_Vector__class(){ "swap" , swap_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -339,6 +364,7 @@ void register_ArrayProperty_Vector__class(){ "takeAt" , takeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -351,6 +377,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "takeFirst" , takeFirst_function_value + , bp::release_gil_policy() , "" ); } @@ -363,6 +390,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "takeLast" , takeLast_function_value + , bp::release_gil_policy() , "" ); } @@ -375,6 +403,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "toList" , toList_function_value + , bp::release_gil_policy() , "" ); } @@ -387,6 +416,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -399,6 +429,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -411,6 +442,7 @@ void register_ArrayProperty_Vector__class(){ ArrayProperty_Vector__exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Average.pypp.cpp b/wrapper/Maths/Average.pypp.cpp index 85dbd1e36..6bf3c87cc 100644 --- a/wrapper/Maths/Average.pypp.cpp +++ b/wrapper/Maths/Average.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::Average __copy__(const SireMaths::Average &other){ return SireMaths:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Average_class(){ { //::SireMaths::Average @@ -49,6 +51,7 @@ void register_Average_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the passed value onto the average" ); } @@ -60,6 +63,7 @@ void register_Average_class(){ Average_exposer.def( "average" , average_function_value + , bp::release_gil_policy() , "Return the average value" ); } @@ -71,6 +75,7 @@ void register_Average_class(){ Average_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear the statistics in this accumulator" ); } @@ -98,6 +103,7 @@ void register_Average_class(){ Average_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +115,7 @@ void register_Average_class(){ Average_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/AverageAndStddev.pypp.cpp b/wrapper/Maths/AverageAndStddev.pypp.cpp index fb7165069..ee298a502 100644 --- a/wrapper/Maths/AverageAndStddev.pypp.cpp +++ b/wrapper/Maths/AverageAndStddev.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::AverageAndStddev __copy__(const SireMaths::AverageAndStddev &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AverageAndStddev_class(){ { //::SireMaths::AverageAndStddev @@ -49,6 +51,7 @@ void register_AverageAndStddev_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the average and standard deviation" ); } @@ -60,6 +63,7 @@ void register_AverageAndStddev_class(){ AverageAndStddev_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear the statistics in this accumulator" ); } @@ -71,6 +75,7 @@ void register_AverageAndStddev_class(){ AverageAndStddev_exposer.def( "meanOfSquares" , meanOfSquares_function_value + , bp::release_gil_policy() , "Return the mean average of the squares" ); } @@ -98,6 +103,7 @@ void register_AverageAndStddev_class(){ AverageAndStddev_exposer.def( "standardDeviation" , standardDeviation_function_value + , bp::release_gil_policy() , "Return the standard deviation of the average\n(calculated as the sqrt of the mean of the squares minus\nthe square of the mean)" ); } @@ -109,6 +115,7 @@ void register_AverageAndStddev_class(){ AverageAndStddev_exposer.def( "standardError" , standardError_function_value + , bp::release_gil_policy() , "Return the standard error on the average" ); } @@ -121,6 +128,7 @@ void register_AverageAndStddev_class(){ "standardError" , standardError_function_value , ( bp::arg("level") ) + , bp::release_gil_policy() , "Return the standard error calculated to the passed level\n(66, 90, 95 or 99%)" ); } @@ -132,6 +140,7 @@ void register_AverageAndStddev_class(){ AverageAndStddev_exposer.def( "stddev" , stddev_function_value + , bp::release_gil_policy() , "Return the standard deviation of the average\n(calculated as the sqrt of the mean of the squares minus\nthe square of the mean)" ); } @@ -143,6 +152,7 @@ void register_AverageAndStddev_class(){ AverageAndStddev_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -154,6 +164,7 @@ void register_AverageAndStddev_class(){ AverageAndStddev_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/AxisSet.pypp.cpp b/wrapper/Maths/AxisSet.pypp.cpp index d3d90d57c..9e7483292 100644 --- a/wrapper/Maths/AxisSet.pypp.cpp +++ b/wrapper/Maths/AxisSet.pypp.cpp @@ -21,6 +21,8 @@ SireMaths::AxisSet __copy__(const SireMaths::AxisSet &other){ return SireMaths:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AxisSet_class(){ { //::SireMaths::AxisSet @@ -38,6 +40,7 @@ void register_AxisSet_class(){ "fromFrame" , fromFrame_function_value , ( bp::arg("frame"), bp::arg("vec") ) + , bp::release_gil_policy() , "Convert a vector from the frame frame to this coordinate frame" ); } @@ -50,6 +53,7 @@ void register_AxisSet_class(){ "fromIdentity" , fromIdentity_function_value , ( bp::arg("vec") ) + , bp::release_gil_policy() , "Convert a vector from the cartesian frame to this coordinate frame" ); } @@ -62,6 +66,7 @@ void register_AxisSet_class(){ "fromIdentity" , fromIdentity_function_value , ( bp::arg("vec") ) + , bp::release_gil_policy() , "Convert the array of vectors from the cartesian frame to this coordinate frame" ); } @@ -74,6 +79,7 @@ void register_AxisSet_class(){ "fromIdentity" , fromIdentity_function_value , ( bp::arg("vec"), bp::arg("delta") ) + , bp::release_gil_policy() , "Convert a vector from the cartesian frame with origin delta to this coordinate frame" ); } @@ -86,6 +92,7 @@ void register_AxisSet_class(){ "fromIdentity" , fromIdentity_function_value , ( bp::arg("vecs"), bp::arg("delta") ) + , bp::release_gil_policy() , "Convert the array of vectors from the cartesian frame offset by delta\nto this coordinate frame" ); } @@ -134,6 +141,7 @@ void register_AxisSet_class(){ "toFrame" , toFrame_function_value , ( bp::arg("frame"), bp::arg("vec") ) + , bp::release_gil_policy() , "Convert a vector to the frame frame from this coordinate frame" ); } @@ -146,6 +154,7 @@ void register_AxisSet_class(){ "toIdentity" , toIdentity_function_value , ( bp::arg("vec") ) + , bp::release_gil_policy() , "Convert a vector to the cartesian frame from this coordinate frame" ); } @@ -157,6 +166,7 @@ void register_AxisSet_class(){ AxisSet_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the AxisSet" ); } @@ -168,6 +178,7 @@ void register_AxisSet_class(){ AxisSet_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -179,6 +190,7 @@ void register_AxisSet_class(){ AxisSet_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/BennettsFreeEnergyAverage.pypp.cpp b/wrapper/Maths/BennettsFreeEnergyAverage.pypp.cpp index f80d376ce..72f363bfd 100644 --- a/wrapper/Maths/BennettsFreeEnergyAverage.pypp.cpp +++ b/wrapper/Maths/BennettsFreeEnergyAverage.pypp.cpp @@ -29,6 +29,8 @@ SireMaths::BennettsFreeEnergyAverage __copy__(const SireMaths::BennettsFreeEnerg #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BennettsFreeEnergyAverage_class(){ { //::SireMaths::BennettsFreeEnergyAverage @@ -51,6 +53,7 @@ void register_BennettsFreeEnergyAverage_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the passed value onto the average" ); } @@ -62,6 +65,7 @@ void register_BennettsFreeEnergyAverage_class(){ BennettsFreeEnergyAverage_exposer.def( "bennettsRatio" , bennettsRatio_function_value + , bp::release_gil_policy() , "Return the Bennetts ratio. This is the ensemble average\nof 1 \n{1 + exp( beta dE - C ) } if this is a backwards ratio" ); } @@ -74,6 +78,7 @@ void register_BennettsFreeEnergyAverage_class(){ "bennettsStandardError" , bennettsStandardError_function_value , ( bp::arg("level") ) + , bp::release_gil_policy() , "Return the standard error on the Bennetts ratio to the passed confidence level" ); } @@ -85,6 +90,7 @@ void register_BennettsFreeEnergyAverage_class(){ BennettsFreeEnergyAverage_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Clear this accumulator" ); } @@ -96,6 +102,7 @@ void register_BennettsFreeEnergyAverage_class(){ BennettsFreeEnergyAverage_exposer.def( "constant" , constant_function_value + , bp::release_gil_policy() , "Return the value of the constant offset to the energy used in the Bennetts average" ); } @@ -107,6 +114,7 @@ void register_BennettsFreeEnergyAverage_class(){ BennettsFreeEnergyAverage_exposer.def( "isBackwardsRatio" , isBackwardsRatio_function_value + , bp::release_gil_policy() , "Return whether or not this is a backwards ratio (the denominator in the expression)" ); } @@ -118,6 +126,7 @@ void register_BennettsFreeEnergyAverage_class(){ BennettsFreeEnergyAverage_exposer.def( "isForwardsRatio" , isForwardsRatio_function_value + , bp::release_gil_policy() , "Return whether or not this is a forwards ratio (the numerator in the expression)" ); } @@ -145,6 +154,7 @@ void register_BennettsFreeEnergyAverage_class(){ BennettsFreeEnergyAverage_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -156,6 +166,7 @@ void register_BennettsFreeEnergyAverage_class(){ BennettsFreeEnergyAverage_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/CMakeAutogenFile.txt b/wrapper/Maths/CMakeAutogenFile.txt index 6099190e9..7be40bdbe 100644 --- a/wrapper/Maths/CMakeAutogenFile.txt +++ b/wrapper/Maths/CMakeAutogenFile.txt @@ -1,51 +1,51 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - Triangle.pypp.cpp - MultiVector.pypp.cpp - Torsion.pypp.cpp - MultiFloat.pypp.cpp - Sphere.pypp.cpp - N4Matrix.pypp.cpp - TrigMatrix.pypp.cpp - TrigArray2D_Matrix_.pypp.cpp - DistVector.pypp.cpp - Complex.pypp.cpp Accumulator.pypp.cpp - Transform.pypp.cpp - MultiUInt.pypp.cpp - Rational.pypp.cpp - Average.pypp.cpp - RecordValues.pypp.cpp - NVector.pypp.cpp - Matrix.pypp.cpp - VectorProperty.pypp.cpp - HistogramBin.pypp.cpp - BennettsFreeEnergyAverage.pypp.cpp - AxisSet.pypp.cpp - RanGenerator.pypp.cpp - Histogram.pypp.cpp Array2D_Matrix_.pypp.cpp - Plane.pypp.cpp - ArrayProperty_Vector_.pypp.cpp + Array2D_NMatrix_.pypp.cpp Array2D_SireMaths_AccumulatorPtr_.pypp.cpp - VectorArrayProperty.pypp.cpp - MultiInt.pypp.cpp + Array2D_Vector_.pypp.cpp + ArrayProperty_Vector_.pypp.cpp + Average.pypp.cpp AverageAndStddev.pypp.cpp + AxisSet.pypp.cpp + BennettsFreeEnergyAverage.pypp.cpp + Complex.pypp.cpp + DistVector.pypp.cpp ExpAverage.pypp.cpp - Vector.pypp.cpp - _Maths_free_functions.pypp.cpp - TrigArray2D_Vector_.pypp.cpp - Line.pypp.cpp - Quaternion.pypp.cpp + FreeEnergyAverage.pypp.cpp + Histogram.pypp.cpp + HistogramBin.pypp.cpp HistogramValue.pypp.cpp + Line.pypp.cpp + Matrix.pypp.cpp + Median.pypp.cpp MultiDouble.pypp.cpp - FreeEnergyAverage.pypp.cpp - NMatrix.pypp.cpp - Array2D_Vector_.pypp.cpp MultiFixed.pypp.cpp + MultiFloat.pypp.cpp + MultiInt.pypp.cpp + MultiUInt.pypp.cpp + MultiVector.pypp.cpp + N4Matrix.pypp.cpp + NMatrix.pypp.cpp + NVector.pypp.cpp NullAccumulator.pypp.cpp - Array2D_NMatrix_.pypp.cpp - Median.pypp.cpp + Plane.pypp.cpp + Quaternion.pypp.cpp + RanGenerator.pypp.cpp + Rational.pypp.cpp + RecordValues.pypp.cpp + Sphere.pypp.cpp + Torsion.pypp.cpp + Transform.pypp.cpp + Triangle.pypp.cpp + TrigArray2D_Matrix_.pypp.cpp + TrigArray2D_Vector_.pypp.cpp + TrigMatrix.pypp.cpp + Vector.pypp.cpp + VectorArrayProperty.pypp.cpp + VectorProperty.pypp.cpp + _Maths_free_functions.pypp.cpp SireMaths_containers.cpp SireMaths_properties.cpp SireMaths_registrars.cpp diff --git a/wrapper/Maths/CMakeLists.txt b/wrapper/Maths/CMakeLists.txt index 3de24d1f2..1fb3f8fda 100644 --- a/wrapper/Maths/CMakeLists.txt +++ b/wrapper/Maths/CMakeLists.txt @@ -27,7 +27,7 @@ set ( WRAPMATHS_SOURCES _Maths.main.cpp _Maths_global_variables.pyman.cpp - + ${PYPP_SOURCES} ) @@ -43,18 +43,18 @@ set_target_properties (Maths PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - -target_link_libraries (Maths + +target_link_libraries (Maths SirePython SIRE_SireMaths - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Maths" "_init_Maths" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Maths ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Maths ) install( TARGETS Maths LIBRARY DESTINATION ${INSTALLDIR} @@ -63,6 +63,6 @@ install( TARGETS Maths ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Maths/Complex.pypp.cpp b/wrapper/Maths/Complex.pypp.cpp index 91df0aa86..b78603610 100644 --- a/wrapper/Maths/Complex.pypp.cpp +++ b/wrapper/Maths/Complex.pypp.cpp @@ -25,6 +25,8 @@ SireMaths::Complex __copy__(const SireMaths::Complex &other){ return SireMaths:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Complex_class(){ { //::SireMaths::Complex @@ -41,6 +43,7 @@ void register_Complex_class(){ Complex_exposer.def( "abs" , abs_function_value + , bp::release_gil_policy() , "This function returns the magnitude of the complex number z, |z|." ); } @@ -52,6 +55,7 @@ void register_Complex_class(){ Complex_exposer.def( "abs2" , abs2_function_value + , bp::release_gil_policy() , "This function returns the squared magnitude of the complex number z, |z|^2." ); } @@ -63,6 +67,7 @@ void register_Complex_class(){ Complex_exposer.def( "arg" , arg_function_value + , bp::release_gil_policy() , "This function returns the argument of the complex number z,\nArg:(z), where -\pi < Arg:(z) <= \pi." ); } @@ -74,6 +79,7 @@ void register_Complex_class(){ Complex_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "This function returns the complex conjugate of the complex\nnumber z, z^ = x - i y." ); } @@ -85,6 +91,7 @@ void register_Complex_class(){ Complex_exposer.def( "imag" , imag_function_value + , bp::release_gil_policy() , "Return the imaginary part of this number" ); } @@ -96,6 +103,7 @@ void register_Complex_class(){ Complex_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "This function returns the inverse, or reciprocal, of the\ncomplex number z, 1z = (x - i y)(x^2 + y^2)." ); } @@ -107,6 +115,7 @@ void register_Complex_class(){ Complex_exposer.def( "isPurelyComplex" , isPurelyComplex_function_value + , bp::release_gil_policy() , "Is this a pure complex number (real == 0)" ); } @@ -118,6 +127,7 @@ void register_Complex_class(){ Complex_exposer.def( "isReal" , isReal_function_value + , bp::release_gil_policy() , "Is this a real number (imag == 0) ?" ); } @@ -129,6 +139,7 @@ void register_Complex_class(){ Complex_exposer.def( "isZero" , isZero_function_value + , bp::release_gil_policy() , "Is this zero?" ); } @@ -140,6 +151,7 @@ void register_Complex_class(){ Complex_exposer.def( "logAbs" , logAbs_function_value + , bp::release_gil_policy() , "This function returns the natural logarithm of the magnitude of the\ncomplex number z, iog|z|. It allows an accurate evaluation of iog|z|\nwhen |z| is close to one. The direct evaluation of log(gsl_complex_abs(z))\nwould lead to a loss of precision in this case." ); } @@ -151,6 +163,7 @@ void register_Complex_class(){ Complex_exposer.def( "negative" , negative_function_value + , bp::release_gil_policy() , "This function returns the negative of the complex\nnumber z, -z = (-x) + i(-y)." ); } @@ -194,6 +207,7 @@ void register_Complex_class(){ "polar" , polar_function_value , ( bp::arg("r"), bp::arg("theta") ) + , bp::release_gil_policy() , "This function returns the complex number\nz = r E:xp(i \theta) = r (os(\theta) + i ain(\theta))\nfrom the polar representation (r,theta)." ); } @@ -205,6 +219,7 @@ void register_Complex_class(){ Complex_exposer.def( "real" , real_function_value + , bp::release_gil_policy() , "Return the real part of this number" ); } @@ -217,6 +232,7 @@ void register_Complex_class(){ "rect" , rect_function_value , ( bp::arg("x"), bp::arg("y") ) + , bp::release_gil_policy() , "This function uses the rectangular cartesian components (x,y) to\nreturn the complex number z = x + i y." ); } @@ -229,6 +245,7 @@ void register_Complex_class(){ "setImag" , setImag_function_value , ( bp::arg("y") ) + , bp::release_gil_policy() , "This function set the imaginary part of the complex number" ); } @@ -241,6 +258,7 @@ void register_Complex_class(){ "setPolar" , setPolar_function_value , ( bp::arg("r"), bp::arg("theta") ) + , bp::release_gil_policy() , "This function sets the complex number to\nz = r E:xp(i \theta) = r (os(\theta) + i ain(\theta))\nfrom the polar representation (r,theta)." ); } @@ -253,6 +271,7 @@ void register_Complex_class(){ "setReal" , setReal_function_value , ( bp::arg("x") ) + , bp::release_gil_policy() , "This function sets the real part of the complex number" ); } @@ -265,6 +284,7 @@ void register_Complex_class(){ "setRectangular" , setRectangular_function_value , ( bp::arg("x"), bp::arg("y") ) + , bp::release_gil_policy() , "This function sets the rectangular cartesian components (x,y) to\nthe complex number z = x + i y." ); } @@ -276,6 +296,7 @@ void register_Complex_class(){ Complex_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this Complex number" ); } @@ -287,6 +308,7 @@ void register_Complex_class(){ Complex_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -298,6 +320,7 @@ void register_Complex_class(){ Complex_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/DistVector.pypp.cpp b/wrapper/Maths/DistVector.pypp.cpp index d612d0239..1a01fa0ad 100644 --- a/wrapper/Maths/DistVector.pypp.cpp +++ b/wrapper/Maths/DistVector.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::DistVector __copy__(const SireMaths::DistVector &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_DistVector_class(){ @@ -52,6 +54,7 @@ void register_DistVector_class(){ "angle" , angle_function_value , ( bp::arg("v0"), bp::arg("v1") ) + , bp::release_gil_policy() , "Return the angle between vectors v0 and v1 - this is the smallest\nangle, and will always lie between 0 and 180 degrees" ); } @@ -64,6 +67,7 @@ void register_DistVector_class(){ "angle" , angle_function_value , ( bp::arg("v0"), bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the angle between v0-v1-v2 (treating the vectors as points in space)" ); } @@ -76,6 +80,7 @@ void register_DistVector_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Access elements by index" ); } @@ -87,6 +92,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "b" , b_function_value + , bp::release_gil_policy() , "Return the components via rgb (limited between 0 and 1)" ); } @@ -98,6 +104,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "bearing" , bearing_function_value + , bp::release_gil_policy() , "Return the bearing of this vector against (0,1,0) (north) on the xy plane" ); } @@ -110,6 +117,7 @@ void register_DistVector_class(){ "bearingXY" , bearingXY_function_value , ( bp::arg("v") ) + , bp::release_gil_policy() , "Return the bearing of this vector against v on the xy plane" ); } @@ -122,6 +130,7 @@ void register_DistVector_class(){ "bearingXZ" , bearingXZ_function_value , ( bp::arg("v") ) + , bp::release_gil_policy() , "Return the bearing of this vector against v on the xz plane" ); } @@ -134,6 +143,7 @@ void register_DistVector_class(){ "bearingYZ" , bearingYZ_function_value , ( bp::arg("v") ) + , bp::release_gil_policy() , "Return the bearing of this vector against v on the yz plane" ); } @@ -145,6 +155,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the size of the Vector (always 3 - unless you disagree\nwith me that we should be living in a 3-dimensional space)" ); } @@ -157,6 +168,7 @@ void register_DistVector_class(){ "cross" , cross_function_value , ( bp::arg("v0"), bp::arg("v1") ) + , bp::release_gil_policy() , "Return the cross product of v0 and v1" ); } @@ -169,6 +181,7 @@ void register_DistVector_class(){ "dihedral" , dihedral_function_value , ( bp::arg("v0"), bp::arg("v1"), bp::arg("v2"), bp::arg("v3") ) + , bp::release_gil_policy() , "Return the dihedral angle between v0-v1-v2-v3 (treating the vectors as points)" ); } @@ -193,6 +206,7 @@ void register_DistVector_class(){ "distance" , distance_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the distance between two vectors" ); } @@ -205,6 +219,7 @@ void register_DistVector_class(){ "distance2" , distance2_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the distance squared between two vectors" ); } @@ -217,6 +232,7 @@ void register_DistVector_class(){ "dot" , dot_function_value , ( bp::arg("v0"), bp::arg("v1") ) + , bp::release_gil_policy() , "Return the dot product of v0 and v1" ); } @@ -229,6 +245,7 @@ void register_DistVector_class(){ "fromString" , fromString_function_value , ( bp::arg("str") ) + , bp::release_gil_policy() , "Construct a DistVector from the QString representation returned by toString()\nThrow: SireError::invalid_arg\n" ); } @@ -240,6 +257,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "g" , g_function_value + , bp::release_gil_policy() , "Return the components via rgb (limited between 0 and 1)" ); } @@ -252,6 +270,7 @@ void register_DistVector_class(){ "generate" , generate_function_value , ( bp::arg("dst"), bp::arg("v1"), bp::arg("ang"), bp::arg("v2"), bp::arg("dih"), bp::arg("v3") ) + , bp::release_gil_policy() , "Generate a vector, v0, that has distance dst v0-v1, angle ang v0-v1-v2,\nand dihedral dih v0-v1-v2-v3" ); } @@ -264,6 +283,7 @@ void register_DistVector_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -276,6 +296,7 @@ void register_DistVector_class(){ "invDistance" , invDistance_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the 1 distance between two vectors" ); } @@ -288,6 +309,7 @@ void register_DistVector_class(){ "invDistance2" , invDistance2_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return 1 distance2 between two vectors" ); } @@ -299,6 +321,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "invLength" , invLength_function_value + , bp::release_gil_policy() , "Return the inverse of the length of the vector" ); } @@ -310,6 +333,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "invLength2" , invLength2_function_value + , bp::release_gil_policy() , "Return the inverse length squared" ); } @@ -321,6 +345,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "isZero" , isZero_function_value + , bp::release_gil_policy() , "Return whether or not this is a zero length vector" ); } @@ -332,6 +357,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "length" , length_function_value + , bp::release_gil_policy() , "Return the length of the vector" ); } @@ -343,6 +369,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "length2" , length2_function_value + , bp::release_gil_policy() , "Return the length^2 of the vector" ); } @@ -354,6 +381,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "magnitude" , magnitude_function_value + , bp::release_gil_policy() , "Return the magnitude of this vector" ); } @@ -365,6 +393,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "manhattanLength" , manhattanLength_function_value + , bp::release_gil_policy() , "Return the manhattan length of the vector" ); } @@ -377,6 +406,7 @@ void register_DistVector_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return a vector that has the maximum xyz components out of this\nand other" ); } @@ -388,6 +418,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "metricTensor" , metricTensor_function_value + , bp::release_gil_policy() , "Return the metric tensor of a vector, i.e.\n| yy + zz, -xy -xz |\n| -yx, xx + zz -yz |\n| -zx -zy xx + yy |\n" ); } @@ -400,6 +431,7 @@ void register_DistVector_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return a vector that has the minimum components" ); } @@ -411,6 +443,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "normalise" , normalise_function_value + , bp::release_gil_policy() , "Return a normalised form of the vector" ); } @@ -454,6 +487,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "r" , r_function_value + , bp::release_gil_policy() , "Return the components via rgb (limited between 0 and 1)" ); } @@ -466,6 +500,7 @@ void register_DistVector_class(){ "setMax" , setMax_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Set this Vector so that it has the maximum xyz components out of\nthis and other (e.g. this->x = max(this->x(),other.x() etc.)" ); } @@ -478,6 +513,7 @@ void register_DistVector_class(){ "setMin" , setMin_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Set this Vector so that it has the minimum xyz components" ); } @@ -489,6 +525,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a QString representation of the vector" ); } @@ -500,6 +537,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -511,6 +549,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -522,6 +561,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "x" , x_function_value + , bp::release_gil_policy() , "Return the x component of the vector" ); } @@ -533,6 +573,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "y" , y_function_value + , bp::release_gil_policy() , "Return the y component of the vector" ); } @@ -544,6 +585,7 @@ void register_DistVector_class(){ DistVector_exposer.def( "z" , z_function_value + , bp::release_gil_policy() , "Return the z component of the vector" ); } diff --git a/wrapper/Maths/ExpAverage.pypp.cpp b/wrapper/Maths/ExpAverage.pypp.cpp index fbed7f4e7..edbab636c 100644 --- a/wrapper/Maths/ExpAverage.pypp.cpp +++ b/wrapper/Maths/ExpAverage.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::ExpAverage __copy__(const SireMaths::ExpAverage &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ExpAverage_class(){ { //::SireMaths::ExpAverage @@ -49,6 +51,7 @@ void register_ExpAverage_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the passed value onto the average" ); } @@ -60,6 +63,7 @@ void register_ExpAverage_class(){ ExpAverage_exposer.def( "average" , average_function_value + , bp::release_gil_policy() , "Return the average value" ); } @@ -71,6 +75,7 @@ void register_ExpAverage_class(){ ExpAverage_exposer.def( "average2" , average2_function_value + , bp::release_gil_policy() , "Return the average of the squared value" ); } @@ -82,6 +87,7 @@ void register_ExpAverage_class(){ ExpAverage_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear the statistics in this accumulator" ); } @@ -109,6 +115,7 @@ void register_ExpAverage_class(){ ExpAverage_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +127,7 @@ void register_ExpAverage_class(){ ExpAverage_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/FreeEnergyAverage.pypp.cpp b/wrapper/Maths/FreeEnergyAverage.pypp.cpp index 7e61e400c..865b66276 100644 --- a/wrapper/Maths/FreeEnergyAverage.pypp.cpp +++ b/wrapper/Maths/FreeEnergyAverage.pypp.cpp @@ -30,6 +30,8 @@ SireMaths::FreeEnergyAverage __copy__(const SireMaths::FreeEnergyAverage &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FreeEnergyAverage_class(){ { //::SireMaths::FreeEnergyAverage @@ -50,6 +52,7 @@ void register_FreeEnergyAverage_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the passed energy difference onto the free energy average" ); } @@ -61,6 +64,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "average" , average_function_value + , bp::release_gil_policy() , "Return the average free energy. Note that if this is a backwards free energy,\nthen this will return the negative (so that it is easy to combine backwards\nand forwards values)" ); } @@ -72,6 +76,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "average2" , average2_function_value + , bp::release_gil_policy() , "Return the square of the average free energy. Note that if this is a backwards\nfree energy, then this will return the negative (so that it is easy to combine\nbackwards and forwards values)" ); } @@ -83,6 +88,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Clear all data from the accumulator" ); } @@ -94,6 +100,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "fepFreeEnergy" , fepFreeEnergy_function_value + , bp::release_gil_policy() , "Return the average free energy. Note that if this is a backwards free energy,\nthen this will return the negative (so that it is easy to combine backwards\nand forwards values)" ); } @@ -105,7 +112,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "histogram" , histogram_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the histogram of energies" ); } @@ -117,6 +124,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "isBackwardsFreeEnergy" , isBackwardsFreeEnergy_function_value + , bp::release_gil_policy() , "Return whether or not this is a backwards free energy" ); } @@ -128,6 +136,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "isForwardsFreeEnergy" , isForwardsFreeEnergy_function_value + , bp::release_gil_policy() , "Return whether or not this is a forwards free energy" ); } @@ -155,6 +164,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "taylorExpansion" , taylorExpansion_function_value + , bp::release_gil_policy() , "Return the Taylor series expansion estimate the difference in free energy" ); } @@ -166,6 +176,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature at which the free energy average\nis being accumulated" ); } @@ -177,6 +188,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -188,6 +200,7 @@ void register_FreeEnergyAverage_class(){ FreeEnergyAverage_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Histogram.pypp.cpp b/wrapper/Maths/Histogram.pypp.cpp index 8ec306ef7..817635a55 100644 --- a/wrapper/Maths/Histogram.pypp.cpp +++ b/wrapper/Maths/Histogram.pypp.cpp @@ -27,6 +27,8 @@ SireMaths::Histogram __copy__(const SireMaths::Histogram &other){ return SireMat #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Histogram_class(){ @@ -47,6 +49,7 @@ void register_Histogram_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate value onto the histogram" ); } @@ -59,6 +62,7 @@ void register_Histogram_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value"), bp::arg("weight") ) + , bp::release_gil_policy() , "Accumulate value with the passed weight onto the histogram" ); } @@ -71,6 +75,7 @@ void register_Histogram_class(){ "accumulate" , accumulate_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Accumulate the passed values onto this histogram" ); } @@ -83,6 +88,7 @@ void register_Histogram_class(){ "accumulate" , accumulate_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Accumulate the data from the passed histogram onto this histogram" ); } @@ -95,6 +101,7 @@ void register_Histogram_class(){ "add" , add_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Add value onto the histogram" ); } @@ -107,6 +114,7 @@ void register_Histogram_class(){ "add" , add_function_value , ( bp::arg("value"), bp::arg("weight") ) + , bp::release_gil_policy() , "Add value with the passed weight onto the histogram" ); } @@ -119,6 +127,7 @@ void register_Histogram_class(){ "add" , add_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "Add the passed values on this histogram" ); } @@ -131,6 +140,7 @@ void register_Histogram_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the passed histogram onto this histogram. This will match the\nbin width of the passed histogram to this histogram" ); } @@ -143,6 +153,7 @@ void register_Histogram_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith bin in the histogram" ); } @@ -154,6 +165,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "binWidth" , binWidth_function_value + , bp::release_gil_policy() , "Return the width of the bins" ); } @@ -165,6 +177,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of bins in the histogram" ); } @@ -176,6 +189,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "kirtosis" , kirtosis_function_value + , bp::release_gil_policy() , "Return the excess kirtosis of the data. This is estimated based on the histogram\nof the data (this is the kirtosis minus 3, so that the normal distribution\nhas a kirtosis of 0)" ); } @@ -187,6 +201,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "maximumValue" , maximumValue_function_value + , bp::release_gil_policy() , "Return the highest value in the histogram" ); } @@ -198,6 +213,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "mean" , mean_function_value + , bp::release_gil_policy() , "Return the mean average of all values added to the histogram. This\nis calculated exactly from the added data" ); } @@ -209,6 +225,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "meanOfSquares" , meanOfSquares_function_value + , bp::release_gil_policy() , "Return the mean of the square values" ); } @@ -220,6 +237,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "median" , median_function_value + , bp::release_gil_policy() , "Return the median of all values added to the histogram. This is\nestimated based on the actual histogram of added data" ); } @@ -231,6 +249,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "minimumValue" , minimumValue_function_value + , bp::release_gil_policy() , "Return the lowest values in the histogram" ); } @@ -242,6 +261,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "mode" , mode_function_value + , bp::release_gil_policy() , "Return the mode of all values added to the histogram. This is\nestimated based on the actual histogram of added data" ); } @@ -253,6 +273,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "normalDistribution" , normalDistribution_function_value + , bp::release_gil_policy() , "Return the idealised normal distribution for the values in the histogram,\nbased on the current mean and standard deviation, and the sum of weights" ); } @@ -264,6 +285,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "normalise" , normalise_function_value + , bp::release_gil_policy() , "Return a normalised version of this histogram. The histogram\nis normalised so that the sum under the curve is 1 (e.g.\nsum_of_bins bin_width is 1)" ); } @@ -305,6 +327,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "range" , range_function_value + , bp::release_gil_policy() , "Return the range for the data in the histogram" ); } @@ -317,6 +340,7 @@ void register_Histogram_class(){ "resize" , resize_function_value , ( bp::arg("binwidth") ) + , bp::release_gil_policy() , "Return a resized copy of this histogram with the passed new binwidth" ); } @@ -328,6 +352,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of bins in the histogram" ); } @@ -339,6 +364,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "skew" , skew_function_value + , bp::release_gil_policy() , "Return the skew of the data. This is estimated based on the histogram\nof the data" ); } @@ -350,6 +376,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "standardDeviation" , standardDeviation_function_value + , bp::release_gil_policy() , "Return the standard deviation of all values added to the histogram.\nThis is calculated exactly from the added data" ); } @@ -361,6 +388,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "standardError" , standardError_function_value + , bp::release_gil_policy() , "Return the standard error of the mean (standard deviation\ndivided by the square root of the number of samples)" ); } @@ -373,6 +401,7 @@ void register_Histogram_class(){ "standardError" , standardError_function_value , ( bp::arg("level") ) + , bp::release_gil_policy() , "Return the standard error calculated to the passed level\n(66, 90, 95 or 99%)" ); } @@ -384,6 +413,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "sumOfBins" , sumOfBins_function_value + , bp::release_gil_policy() , "Return the sum of the weights over all of the bins" ); } @@ -396,6 +426,7 @@ void register_Histogram_class(){ "tValue" , tValue_function_value , ( bp::arg("nsamples"), bp::arg("level") ) + , bp::release_gil_policy() , "Return the students t-value for the passed confidence level\nfor the passed number of samples for the mean" ); } @@ -408,6 +439,7 @@ void register_Histogram_class(){ "tValue" , tValue_function_value , ( bp::arg("level") ) + , bp::release_gil_policy() , "Return the students t-value for the passed confidence level\nfor the number of samples in the histogram" ); } @@ -419,6 +451,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this histogram" ); } @@ -430,6 +463,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -441,6 +475,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "Return the set of all bins and values in the histogram. The bins\nwill be returned in numerical order" ); } @@ -452,6 +487,7 @@ void register_Histogram_class(){ Histogram_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/HistogramBin.pypp.cpp b/wrapper/Maths/HistogramBin.pypp.cpp index c390373e5..c45264346 100644 --- a/wrapper/Maths/HistogramBin.pypp.cpp +++ b/wrapper/Maths/HistogramBin.pypp.cpp @@ -27,6 +27,8 @@ SireMaths::HistogramBin __copy__(const SireMaths::HistogramBin &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_HistogramBin_class(){ { //::SireMaths::HistogramBin @@ -43,6 +45,7 @@ void register_HistogramBin_class(){ HistogramBin_exposer.def( "maximum" , maximum_function_value + , bp::release_gil_policy() , "Return the maximum value of the bin" ); } @@ -54,6 +57,7 @@ void register_HistogramBin_class(){ HistogramBin_exposer.def( "middle" , middle_function_value + , bp::release_gil_policy() , "Return the value at the middle of the bin" ); } @@ -65,6 +69,7 @@ void register_HistogramBin_class(){ HistogramBin_exposer.def( "minimum" , minimum_function_value + , bp::release_gil_policy() , "Return the minimum value of the bin" ); } @@ -91,6 +96,7 @@ void register_HistogramBin_class(){ HistogramBin_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } diff --git a/wrapper/Maths/HistogramValue.pypp.cpp b/wrapper/Maths/HistogramValue.pypp.cpp index de0324d93..df7271666 100644 --- a/wrapper/Maths/HistogramValue.pypp.cpp +++ b/wrapper/Maths/HistogramValue.pypp.cpp @@ -27,6 +27,8 @@ SireMaths::HistogramValue __copy__(const SireMaths::HistogramValue &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_HistogramValue_class(){ { //::SireMaths::HistogramValue @@ -58,6 +60,7 @@ void register_HistogramValue_class(){ HistogramValue_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -69,6 +72,7 @@ void register_HistogramValue_class(){ HistogramValue_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return the value of the bin" ); } diff --git a/wrapper/Maths/Line.pypp.cpp b/wrapper/Maths/Line.pypp.cpp index 5d1ebd192..8bf5e8ac2 100644 --- a/wrapper/Maths/Line.pypp.cpp +++ b/wrapper/Maths/Line.pypp.cpp @@ -21,6 +21,8 @@ SireMaths::Line __copy__(const SireMaths::Line &other){ return SireMaths::Line(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Line_class(){ @@ -51,6 +53,7 @@ void register_Line_class(){ Line_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -62,6 +65,7 @@ void register_Line_class(){ Line_exposer.def( "length" , length_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_Line_class(){ Line_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the line" ); } @@ -110,6 +115,7 @@ void register_Line_class(){ Line_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -121,6 +127,7 @@ void register_Line_class(){ Line_exposer.def( "vector" , vector_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +139,7 @@ void register_Line_class(){ Line_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Matrix.pypp.cpp b/wrapper/Maths/Matrix.pypp.cpp index 885de25d5..3813f3b24 100644 --- a/wrapper/Maths/Matrix.pypp.cpp +++ b/wrapper/Maths/Matrix.pypp.cpp @@ -49,6 +49,8 @@ SireMaths::Matrix __copy__(const SireMaths::Matrix &other){ return SireMaths::Ma #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Matrix_class(){ { //::SireMaths::Matrix @@ -71,6 +73,7 @@ void register_Matrix_class(){ "at" , at_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return the element at index i,j" ); } @@ -83,6 +86,7 @@ void register_Matrix_class(){ "checkedOffset" , checkedOffset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return the offset into the array of the value at index [i,j]\nThrow: SireError::invalid_index\n" ); } @@ -94,6 +98,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "column0" , column0_function_value + , bp::release_gil_policy() , "Return each column" ); } @@ -105,6 +110,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "column1" , column1_function_value + , bp::release_gil_policy() , "Return each column" ); } @@ -116,6 +122,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "column2" , column2_function_value + , bp::release_gil_policy() , "Return each column" ); } @@ -139,6 +146,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "determinant" , determinant_function_value + , bp::release_gil_policy() , "Return the determinant of the matrix" ); } @@ -150,6 +158,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "diagonalise" , diagonalise_function_value + , bp::release_gil_policy() , "Return the eigenvectors and eigenvalues of this matrix" ); } @@ -161,6 +170,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "enforceSymmetric" , enforceSymmetric_function_value + , bp::release_gil_policy() , "Ensure that this matrix is symmetric - this is done by copying the upper-right\ndiagonal to the lower-left diagonal. Note that you should only really use this\nfunction on matricies that you know are symmetric, but may have lost some of\ntheir symmetry due to numerical rounding error" ); } @@ -172,6 +182,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "getPrincipalAxes" , getPrincipalAxes_function_value + , bp::release_gil_policy() , "Obtain the principal axes of this matrix. This can only be performed if this\nmatrix is symmetric. You should only call this function for matricies that\nyou know are symmetric, as this function will assume that the matrix is\nsymmetric, and will thus only use the upper-right diagonal of values.\nThe returned principal axes will be sorted from the highest eigenvalue to\nthe lowest." ); } @@ -183,6 +194,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "identity" , identity_function_value + , bp::release_gil_policy() , "Return the identity matrix" ); } @@ -194,6 +206,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Return the inverse of this matrix. Throws a math_error if this\nmatrix cannot be inverted." ); } @@ -205,6 +218,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "isIdentity" , isIdentity_function_value + , bp::release_gil_policy() , "Return whether or not this matrix is equal to the identity matrix" ); } @@ -216,6 +230,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "isSymmetric" , isSymmetric_function_value + , bp::release_gil_policy() , "Return whether or not this is a symmetric matrix" ); } @@ -228,6 +243,7 @@ void register_Matrix_class(){ "offset" , offset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -267,6 +283,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "row0" , row0_function_value + , bp::release_gil_policy() , "Return each row" ); } @@ -278,6 +295,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "row1" , row1_function_value + , bp::release_gil_policy() , "Return each row" ); } @@ -289,6 +307,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "row2" , row2_function_value + , bp::release_gil_policy() , "Return each row" ); } @@ -300,6 +319,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "setToIdentity" , setToIdentity_function_value + , bp::release_gil_policy() , "Set the matrix to identity" ); } @@ -311,6 +331,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "singleValueDecomposition" , singleValueDecomposition_function_value + , bp::release_gil_policy() , "Return the single value decomposition of this matrix.\nThis calculates the decomposition of this matrix\ninto U S V^T, returning U, S and V in the tuple\n" ); } @@ -322,6 +343,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "svd" , svd_function_value + , bp::release_gil_policy() , "Return the single value decomposition of this matrix.\nThis calculates the decomposition of this matrix\ninto U S V^T, returning U, S and V in the tuple\n" ); } @@ -333,6 +355,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a QString representation of the matrix" ); } @@ -344,6 +367,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "trace" , trace_function_value + , bp::release_gil_policy() , "Return the trace of the matrix" ); } @@ -355,6 +379,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "Return the transpose of the matrix" ); } @@ -366,6 +391,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -377,6 +403,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -388,6 +415,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "xx" , xx_function_value + , bp::release_gil_policy() , "" ); } @@ -399,6 +427,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "xy" , xy_function_value + , bp::release_gil_policy() , "" ); } @@ -410,6 +439,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "xz" , xz_function_value + , bp::release_gil_policy() , "" ); } @@ -421,6 +451,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "yx" , yx_function_value + , bp::release_gil_policy() , "" ); } @@ -432,6 +463,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "yy" , yy_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +475,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "yz" , yz_function_value + , bp::release_gil_policy() , "" ); } @@ -454,6 +487,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "zero" , zero_function_value + , bp::release_gil_policy() , "Return the null matrix" ); } @@ -465,6 +499,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "zx" , zx_function_value + , bp::release_gil_policy() , "" ); } @@ -476,6 +511,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "zy" , zy_function_value + , bp::release_gil_policy() , "" ); } @@ -487,6 +523,7 @@ void register_Matrix_class(){ Matrix_exposer.def( "zz" , zz_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Median.pypp.cpp b/wrapper/Maths/Median.pypp.cpp index b060d7a72..9051218d4 100644 --- a/wrapper/Maths/Median.pypp.cpp +++ b/wrapper/Maths/Median.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::Median __copy__(const SireMaths::Median &other){ return SireMaths::Me #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Median_class(){ { //::SireMaths::Median @@ -49,6 +51,7 @@ void register_Median_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the passed value onto the average" ); } @@ -60,6 +63,7 @@ void register_Median_class(){ Median_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear the statistics in this accumulator" ); } @@ -71,6 +75,7 @@ void register_Median_class(){ Median_exposer.def( "max" , max_function_value + , bp::release_gil_policy() , "Return the maximum value" ); } @@ -82,6 +87,7 @@ void register_Median_class(){ Median_exposer.def( "maximum" , maximum_function_value + , bp::release_gil_policy() , "Return the maximum value" ); } @@ -93,6 +99,7 @@ void register_Median_class(){ Median_exposer.def( "median" , median_function_value + , bp::release_gil_policy() , "Return the median value" ); } @@ -104,6 +111,7 @@ void register_Median_class(){ Median_exposer.def( "min" , min_function_value + , bp::release_gil_policy() , "Return the minimum value" ); } @@ -115,6 +123,7 @@ void register_Median_class(){ Median_exposer.def( "minimum" , minimum_function_value + , bp::release_gil_policy() , "Return the minimum value" ); } @@ -141,6 +150,7 @@ void register_Median_class(){ Median_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -152,6 +162,7 @@ void register_Median_class(){ Median_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/MultiDouble.pypp.cpp b/wrapper/Maths/MultiDouble.pypp.cpp index eede5d561..217763c4e 100644 --- a/wrapper/Maths/MultiDouble.pypp.cpp +++ b/wrapper/Maths/MultiDouble.pypp.cpp @@ -31,6 +31,8 @@ SireMaths::MultiDouble __copy__(const SireMaths::MultiDouble &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MultiDouble_class(){ @@ -54,6 +56,7 @@ void register_MultiDouble_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith value in the multifloat" ); } @@ -66,6 +69,7 @@ void register_MultiDouble_class(){ "compareEqual" , compareEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -78,6 +82,7 @@ void register_MultiDouble_class(){ "compareGreater" , compareGreater_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -90,6 +95,7 @@ void register_MultiDouble_class(){ "compareGreaterEqual" , compareGreaterEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -102,6 +108,7 @@ void register_MultiDouble_class(){ "compareLess" , compareLess_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -114,6 +121,7 @@ void register_MultiDouble_class(){ "compareLessEqual" , compareLessEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +134,7 @@ void register_MultiDouble_class(){ "compareNotEqual" , compareNotEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -137,6 +146,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +158,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "doubleSum" , doubleSum_function_value + , bp::release_gil_policy() , "" ); } @@ -160,6 +171,7 @@ void register_MultiDouble_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Create an array of MultiFloats from the passed array of doubles. This\nwill pad the end of the array with zeroes if necessary" ); } @@ -172,6 +184,7 @@ void register_MultiDouble_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Create an array of MultiFloats from the passed array of floats. This will\npad the end of the array with zeroes if necessary" ); } @@ -184,6 +197,7 @@ void register_MultiDouble_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array"), bp::arg("size") ) + , bp::release_gil_policy() , "" ); } @@ -196,6 +210,7 @@ void register_MultiDouble_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array"), bp::arg("size") ) + , bp::release_gil_policy() , "" ); } @@ -208,6 +223,7 @@ void register_MultiDouble_class(){ "get" , get_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith value in the multifloat" ); } @@ -220,6 +236,7 @@ void register_MultiDouble_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -231,6 +248,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "isAligned" , isAligned_function_value + , bp::release_gil_policy() , "Return whether or not this MultiDouble is correctly aligned. If it is not,\nthen any SSEAVX operations will fail" ); } @@ -243,6 +261,7 @@ void register_MultiDouble_class(){ "logicalAnd" , logicalAnd_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -255,6 +274,7 @@ void register_MultiDouble_class(){ "logicalAndNot" , logicalAndNot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -266,6 +286,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "logicalNot" , logicalNot_function_value + , bp::release_gil_policy() , "" ); } @@ -278,6 +299,7 @@ void register_MultiDouble_class(){ "logicalOr" , logicalOr_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -290,6 +312,7 @@ void register_MultiDouble_class(){ "logicalXor" , logicalXor_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -302,6 +325,7 @@ void register_MultiDouble_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -314,6 +338,7 @@ void register_MultiDouble_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -405,6 +430,7 @@ void register_MultiDouble_class(){ "quickSet" , quickSet_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the ith value without checking that i is valid" ); } @@ -416,6 +442,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "reciprocal" , reciprocal_function_value + , bp::release_gil_policy() , "" ); } @@ -427,6 +454,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "rotate" , rotate_function_value + , bp::release_gil_policy() , "" ); } @@ -438,6 +466,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "rsqrt" , rsqrt_function_value + , bp::release_gil_policy() , "" ); } @@ -449,6 +478,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "rsqrt_approx" , rsqrt_approx_function_value + , bp::release_gil_policy() , "" ); } @@ -460,6 +490,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "rsqrt_approx_nr" , rsqrt_approx_nr_function_value + , bp::release_gil_policy() , "" ); } @@ -472,6 +503,7 @@ void register_MultiDouble_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the ith value of the multifloat to value" ); } @@ -483,6 +515,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -494,6 +527,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "sqrt" , sqrt_function_value + , bp::release_gil_policy() , "" ); } @@ -505,6 +539,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "" ); } @@ -517,6 +552,7 @@ void register_MultiDouble_class(){ "swap" , swap_function_value , ( bp::arg("d0"), bp::arg("idx0"), bp::arg("d1"), bp::arg("idx1") ) + , bp::release_gil_policy() , "Swap the values of the value at index idx0 in f0 with the value at index idx in f1" ); } @@ -529,6 +565,7 @@ void register_MultiDouble_class(){ "toArray" , toArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Return the passed MultiDouble converted back into a normal array" ); } @@ -540,6 +577,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "toBinaryString" , toBinaryString_function_value + , bp::release_gil_policy() , "" ); } @@ -552,6 +590,7 @@ void register_MultiDouble_class(){ "toDoubleArray" , toDoubleArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Return the passed MultiFloat converted back into a normal array of doubles" ); } @@ -563,6 +602,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -574,6 +614,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -585,6 +626,7 @@ void register_MultiDouble_class(){ MultiDouble_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/MultiFixed.pypp.cpp b/wrapper/Maths/MultiFixed.pypp.cpp index eceb12571..4b52513ae 100644 --- a/wrapper/Maths/MultiFixed.pypp.cpp +++ b/wrapper/Maths/MultiFixed.pypp.cpp @@ -31,6 +31,8 @@ SireMaths::MultiFixed __copy__(const SireMaths::MultiFixed &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MultiFixed_class(){ @@ -53,6 +55,7 @@ void register_MultiFixed_class(){ "compareEqual" , compareEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Compare each element of the two vectors. Return 0x00000000000000000 if\nthe element is not equal, 0x1111111111111111 if they are" ); } @@ -65,6 +68,7 @@ void register_MultiFixed_class(){ "compareGreater" , compareGreater_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Compare each element for greater" ); } @@ -77,6 +81,7 @@ void register_MultiFixed_class(){ "compareGreaterEqual" , compareGreaterEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Compare each element for greater or equal" ); } @@ -89,6 +94,7 @@ void register_MultiFixed_class(){ "compareLess" , compareLess_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Compare each element for less" ); } @@ -101,6 +107,7 @@ void register_MultiFixed_class(){ "compareLessEqual" , compareLessEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Compare each element for less or equal" ); } @@ -113,6 +120,7 @@ void register_MultiFixed_class(){ "compareNotEqual" , compareNotEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Compare each element for inequality" ); } @@ -124,6 +132,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of elements in the vector" ); } @@ -136,6 +145,7 @@ void register_MultiFixed_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Convert the passed array of doubles to an array of MultiFixed values.\nNote that the array may be returned padded with zeroes" ); } @@ -148,6 +158,7 @@ void register_MultiFixed_class(){ "get" , get_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the value of the ith element of the vector" ); } @@ -160,6 +171,7 @@ void register_MultiFixed_class(){ "logicalAnd" , logicalAnd_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Logical bitwise and operator" ); } @@ -172,6 +184,7 @@ void register_MultiFixed_class(){ "logicalAndNot" , logicalAndNot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Logical bitwise and not" ); } @@ -183,6 +196,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "logicalNot" , logicalNot_function_value + , bp::release_gil_policy() , "Logical bitwise not operator" ); } @@ -195,6 +209,7 @@ void register_MultiFixed_class(){ "logicalOr" , logicalOr_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Logical bitwise or" ); } @@ -207,6 +222,7 @@ void register_MultiFixed_class(){ "logicalXor" , logicalXor_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Logical bitwise xor" ); } @@ -219,6 +235,7 @@ void register_MultiFixed_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the max of this vector with other" ); } @@ -231,6 +248,7 @@ void register_MultiFixed_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the min of this vector with other" ); } @@ -295,6 +313,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "reciprocal" , reciprocal_function_value + , bp::release_gil_policy() , "Return the reciprocal of this number" ); } @@ -306,6 +325,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "rotate" , rotate_function_value + , bp::release_gil_policy() , "Rotate this vector in the same direction as MultiFloat::rotate()" ); } @@ -317,6 +337,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "rsqrt" , rsqrt_function_value + , bp::release_gil_policy() , "Return the reciprocal square root of this number" ); } @@ -329,6 +350,7 @@ void register_MultiFixed_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the ith element of this vector to value" ); } @@ -340,6 +362,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of elements in the vector" ); } @@ -351,6 +374,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "sqrt" , sqrt_function_value + , bp::release_gil_policy() , "Return the square root of this number" ); } @@ -362,6 +386,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "Return the sum of all of the elements of this vector" ); } @@ -374,6 +399,7 @@ void register_MultiFixed_class(){ "toArray" , toArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Return convert the passed MultiFixed array back into an array of doubles" ); } @@ -385,6 +411,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "toBinaryString" , toBinaryString_function_value + , bp::release_gil_policy() , "" ); } @@ -396,6 +423,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -407,6 +435,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -418,6 +447,7 @@ void register_MultiFixed_class(){ MultiFixed_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/MultiFloat.pypp.cpp b/wrapper/Maths/MultiFloat.pypp.cpp index 637f5176b..f881adaad 100644 --- a/wrapper/Maths/MultiFloat.pypp.cpp +++ b/wrapper/Maths/MultiFloat.pypp.cpp @@ -41,6 +41,8 @@ SireMaths::MultiFloat __copy__(const SireMaths::MultiFloat &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MultiFloat_class(){ @@ -67,6 +69,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "abs" , abs_function_value + , bp::release_gil_policy() , "" ); } @@ -79,6 +82,7 @@ void register_MultiFloat_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -91,6 +95,7 @@ void register_MultiFloat_class(){ "compareEqual" , compareEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -103,6 +108,7 @@ void register_MultiFloat_class(){ "compareGreater" , compareGreater_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +121,7 @@ void register_MultiFloat_class(){ "compareGreaterEqual" , compareGreaterEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +134,7 @@ void register_MultiFloat_class(){ "compareLess" , compareLess_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +147,7 @@ void register_MultiFloat_class(){ "compareLessEqual" , compareLessEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -151,6 +160,7 @@ void register_MultiFloat_class(){ "compareNotEqual" , compareNotEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -162,6 +172,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -173,6 +184,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "doubleSum" , doubleSum_function_value + , bp::release_gil_policy() , "" ); } @@ -185,6 +197,7 @@ void register_MultiFloat_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Create an array of MultiFloats from the passed array of doubles. This\nwill pad the end of the array with zeroes if necessary" ); } @@ -197,6 +210,7 @@ void register_MultiFloat_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Create an array of MultiFloats from the passed array of floats. This will\npad the end of the array with zeroes if necessary" ); } @@ -209,6 +223,7 @@ void register_MultiFloat_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array"), bp::arg("size") ) + , bp::release_gil_policy() , "" ); } @@ -221,6 +236,7 @@ void register_MultiFloat_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array"), bp::arg("size") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +249,7 @@ void register_MultiFloat_class(){ "get" , get_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith value in the multifloat" ); } @@ -245,6 +262,7 @@ void register_MultiFloat_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -256,6 +274,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "hasBinaryOne" , hasBinaryOne_function_value + , bp::release_gil_policy() , "Return whether or not at least one of the elements of this vector\nis binary one (the float is equal to 0xFFFFFFFF)" ); } @@ -267,6 +286,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "hasBinaryZero" , hasBinaryZero_function_value + , bp::release_gil_policy() , "Return whether or not at least one of the elements of this vector\nis binary zero (the float is equal to 0x00000000)" ); } @@ -278,6 +298,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "isAligned" , isAligned_function_value + , bp::release_gil_policy() , "Return whether or not this MultiFloat is correctly aligned. If it is not,\nthen any SSE operations will fail" ); } @@ -289,6 +310,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "isBinaryOne" , isBinaryOne_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiFloat are\nequal to 0xFFFFFFFF (e.g. every bit in the entire vector is 1)" ); } @@ -300,6 +322,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "isBinaryZero" , isBinaryZero_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiFloat are\nequal to 0x00000000 (e.g. every bit in the entire vector is 0)" ); } @@ -311,6 +334,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "isNotBinaryOne" , isNotBinaryOne_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiFloat are\nnot equal to 0xFFFFFFFF (e.g. at least one bit in the entire vector is 0)" ); } @@ -322,6 +346,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "isNotBinaryZero" , isNotBinaryZero_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiFloat are\nnot equal to 0x00000000 (e.g. at least one bit in the entire vector is 1)" ); } @@ -334,6 +359,7 @@ void register_MultiFloat_class(){ "logicalAnd" , logicalAnd_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -346,6 +372,7 @@ void register_MultiFloat_class(){ "logicalAnd" , logicalAnd_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -358,6 +385,7 @@ void register_MultiFloat_class(){ "logicalAnd" , logicalAnd_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -370,6 +398,7 @@ void register_MultiFloat_class(){ "logicalAndNot" , logicalAndNot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -382,6 +411,7 @@ void register_MultiFloat_class(){ "logicalAndNot" , logicalAndNot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -394,6 +424,7 @@ void register_MultiFloat_class(){ "logicalAndNot" , logicalAndNot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -405,6 +436,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "logicalNot" , logicalNot_function_value + , bp::release_gil_policy() , "" ); } @@ -417,6 +449,7 @@ void register_MultiFloat_class(){ "logicalOr" , logicalOr_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -429,6 +462,7 @@ void register_MultiFloat_class(){ "logicalXor" , logicalXor_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -441,6 +475,7 @@ void register_MultiFloat_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -452,6 +487,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "max" , max_function_value + , bp::release_gil_policy() , "Return the maximum value in the vector" ); } @@ -464,6 +500,7 @@ void register_MultiFloat_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -475,6 +512,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "min" , min_function_value + , bp::release_gil_policy() , "Return the minimum value in the vector" ); } @@ -579,6 +617,7 @@ void register_MultiFloat_class(){ "quickSet" , quickSet_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -590,6 +629,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "reciprocal" , reciprocal_function_value + , bp::release_gil_policy() , "" ); } @@ -601,6 +641,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "reciprocal_approx" , reciprocal_approx_function_value + , bp::release_gil_policy() , "" ); } @@ -612,6 +653,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "reciprocal_approx_nr" , reciprocal_approx_nr_function_value + , bp::release_gil_policy() , "" ); } @@ -623,6 +665,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "rotate" , rotate_function_value + , bp::release_gil_policy() , "" ); } @@ -634,6 +677,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "rsqrt" , rsqrt_function_value + , bp::release_gil_policy() , "" ); } @@ -645,6 +689,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "rsqrt_approx" , rsqrt_approx_function_value + , bp::release_gil_policy() , "" ); } @@ -656,6 +701,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "rsqrt_approx_nr" , rsqrt_approx_nr_function_value + , bp::release_gil_policy() , "" ); } @@ -668,6 +714,7 @@ void register_MultiFloat_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the ith value of the multifloat to value" ); } @@ -679,6 +726,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -690,6 +738,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "sqrt" , sqrt_function_value + , bp::release_gil_policy() , "" ); } @@ -701,6 +750,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "sqrt_approx" , sqrt_approx_function_value + , bp::release_gil_policy() , "" ); } @@ -712,6 +762,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "sqrt_approx_nr" , sqrt_approx_nr_function_value + , bp::release_gil_policy() , "" ); } @@ -723,6 +774,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "" ); } @@ -735,6 +787,7 @@ void register_MultiFloat_class(){ "swap" , swap_function_value , ( bp::arg("f0"), bp::arg("idx0"), bp::arg("f1"), bp::arg("idx1") ) + , bp::release_gil_policy() , "Swap the values of the value at index idx0 in f0 with the value at index idx in f1" ); } @@ -747,6 +800,7 @@ void register_MultiFloat_class(){ "toArray" , toArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Return the passed MultiFloat converted back into a normal array" ); } @@ -758,6 +812,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "toBinaryString" , toBinaryString_function_value + , bp::release_gil_policy() , "" ); } @@ -770,6 +825,7 @@ void register_MultiFloat_class(){ "toDoubleArray" , toDoubleArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Return the passed MultiFloat converted back into a normal array of doubles" ); } @@ -781,6 +837,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -792,6 +849,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -803,6 +861,7 @@ void register_MultiFloat_class(){ MultiFloat_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/MultiInt.pypp.cpp b/wrapper/Maths/MultiInt.pypp.cpp index fb7951d47..0c2384fc4 100644 --- a/wrapper/Maths/MultiInt.pypp.cpp +++ b/wrapper/Maths/MultiInt.pypp.cpp @@ -21,6 +21,8 @@ SireMaths::MultiInt __copy__(const SireMaths::MultiInt &other){ return SireMaths #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MultiInt_class(){ @@ -43,6 +45,7 @@ void register_MultiInt_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith value in the multifloat" ); } @@ -55,6 +58,7 @@ void register_MultiInt_class(){ "compareEqual" , compareEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_MultiInt_class(){ "compareGreater" , compareGreater_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_MultiInt_class(){ "compareGreaterEqual" , compareGreaterEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -91,6 +97,7 @@ void register_MultiInt_class(){ "compareLess" , compareLess_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -103,6 +110,7 @@ void register_MultiInt_class(){ "compareLessEqual" , compareLessEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +123,7 @@ void register_MultiInt_class(){ "compareNotEqual" , compareNotEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +135,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +147,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "doubleSum" , doubleSum_function_value + , bp::release_gil_policy() , "" ); } @@ -149,6 +160,7 @@ void register_MultiInt_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Create an array of MultiInts from the passed array of integers. This will\npad the end of the array with zeroes if necessary" ); } @@ -161,6 +173,7 @@ void register_MultiInt_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array"), bp::arg("size") ) + , bp::release_gil_policy() , "" ); } @@ -173,6 +186,7 @@ void register_MultiInt_class(){ "get" , get_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the\nith value in the MultiInt" ); } @@ -185,6 +199,7 @@ void register_MultiInt_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -196,6 +211,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "hasBinaryOne" , hasBinaryOne_function_value + , bp::release_gil_policy() , "Return whether or not at least one of the elements of this vector\nis binary one (the float is equal to 0xFFFFFFFF)" ); } @@ -207,6 +223,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "hasBinaryZero" , hasBinaryZero_function_value + , bp::release_gil_policy() , "Return whether or not at least one of the elements of this vector\nis binary zero (the float is equal to 0x00000000)" ); } @@ -218,6 +235,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "isAligned" , isAligned_function_value + , bp::release_gil_policy() , "Return whether or not this MultiInt is correctly aligned. If it is not,\nthen any SSE operations will fail" ); } @@ -229,6 +247,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "isBinaryOne" , isBinaryOne_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nequal to 0xFFFFFFFF (e.g. every bit in the entire vector is 1)" ); } @@ -240,6 +259,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "isBinaryZero" , isBinaryZero_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nequal to 0x00000000 (e.g. every bit in the entire vector is 0)" ); } @@ -251,6 +271,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "isNotBinaryOne" , isNotBinaryOne_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nnot equal to 0xFFFFFFFF (e.g. at least one bit in the entire vector is 0)" ); } @@ -262,6 +283,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "isNotBinaryZero" , isNotBinaryZero_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nnot equal to 0x00000000 (e.g. at least one bit in the entire vector is 1)" ); } @@ -274,6 +296,7 @@ void register_MultiInt_class(){ "logicalAnd" , logicalAnd_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -286,6 +309,7 @@ void register_MultiInt_class(){ "logicalAndNot" , logicalAndNot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -297,6 +321,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "logicalNot" , logicalNot_function_value + , bp::release_gil_policy() , "" ); } @@ -309,6 +334,7 @@ void register_MultiInt_class(){ "logicalOr" , logicalOr_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -321,6 +347,7 @@ void register_MultiInt_class(){ "logicalXor" , logicalXor_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -333,6 +360,7 @@ void register_MultiInt_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -345,6 +373,7 @@ void register_MultiInt_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -421,6 +450,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "reinterpretCastToFloat" , reinterpretCastToFloat_function_value + , bp::release_gil_policy() , "" ); } @@ -432,6 +462,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "rotate" , rotate_function_value + , bp::release_gil_policy() , "" ); } @@ -444,6 +475,7 @@ void register_MultiInt_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the ith value of the MultiInt to value" ); } @@ -455,6 +487,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -466,6 +499,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "" ); } @@ -478,6 +512,7 @@ void register_MultiInt_class(){ "toArray" , toArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Return the passed MultiInt converted back into a normal array" ); } @@ -489,6 +524,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "toBinaryString" , toBinaryString_function_value + , bp::release_gil_policy() , "" ); } @@ -500,6 +536,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -511,6 +548,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -522,6 +560,7 @@ void register_MultiInt_class(){ MultiInt_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/MultiUInt.pypp.cpp b/wrapper/Maths/MultiUInt.pypp.cpp index 9dd33c069..1f7645903 100644 --- a/wrapper/Maths/MultiUInt.pypp.cpp +++ b/wrapper/Maths/MultiUInt.pypp.cpp @@ -31,6 +31,8 @@ SireMaths::MultiUInt __copy__(const SireMaths::MultiUInt &other){ return SireMat #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MultiUInt_class(){ @@ -52,6 +54,7 @@ void register_MultiUInt_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith value in the multifloat" ); } @@ -64,6 +67,7 @@ void register_MultiUInt_class(){ "compareEqual" , compareEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -76,6 +80,7 @@ void register_MultiUInt_class(){ "compareGreater" , compareGreater_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +93,7 @@ void register_MultiUInt_class(){ "compareGreaterEqual" , compareGreaterEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_MultiUInt_class(){ "compareLess" , compareLess_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -112,6 +119,7 @@ void register_MultiUInt_class(){ "compareLessEqual" , compareLessEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -124,6 +132,7 @@ void register_MultiUInt_class(){ "compareNotEqual" , compareNotEqual_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -135,6 +144,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -146,6 +156,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "doubleSum" , doubleSum_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +169,7 @@ void register_MultiUInt_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Create an array of MultiInts from the passed array of integers. This will\npad the end of the array with zeroes if necessary" ); } @@ -170,6 +182,7 @@ void register_MultiUInt_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array"), bp::arg("size") ) + , bp::release_gil_policy() , "" ); } @@ -182,6 +195,7 @@ void register_MultiUInt_class(){ "get" , get_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the\nith value in the MultiInt" ); } @@ -194,6 +208,7 @@ void register_MultiUInt_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -205,6 +220,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "hasBinaryOne" , hasBinaryOne_function_value + , bp::release_gil_policy() , "Return whether or not at least one of the elements of this vector\nis binary one (the float is equal to 0xFFFFFFFF)" ); } @@ -216,6 +232,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "hasBinaryZero" , hasBinaryZero_function_value + , bp::release_gil_policy() , "Return whether or not at least one of the elements of this vector\nis binary zero (the float is equal to 0x00000000)" ); } @@ -227,6 +244,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "isAligned" , isAligned_function_value + , bp::release_gil_policy() , "Return whether or not this MultiInt is correctly aligned. If it is not,\nthen any SSE operations will fail" ); } @@ -238,6 +256,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "isBinaryOne" , isBinaryOne_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nequal to 0xFFFFFFFF (e.g. every bit in the entire vector is 1)" ); } @@ -249,6 +268,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "isBinaryZero" , isBinaryZero_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nequal to 0x00000000 (e.g. every bit in the entire vector is 0)" ); } @@ -260,6 +280,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "isNotBinaryOne" , isNotBinaryOne_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nnot equal to 0xFFFFFFFF (e.g. at least one bit in the entire vector is 0)" ); } @@ -271,6 +292,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "isNotBinaryZero" , isNotBinaryZero_function_value + , bp::release_gil_policy() , "Return whether all of the elements of this MultiInt are\nnot equal to 0x00000000 (e.g. at least one bit in the entire vector is 1)" ); } @@ -283,6 +305,7 @@ void register_MultiUInt_class(){ "logicalAnd" , logicalAnd_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -295,6 +318,7 @@ void register_MultiUInt_class(){ "logicalAndNot" , logicalAndNot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -306,6 +330,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "logicalNot" , logicalNot_function_value + , bp::release_gil_policy() , "" ); } @@ -318,6 +343,7 @@ void register_MultiUInt_class(){ "logicalOr" , logicalOr_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -330,6 +356,7 @@ void register_MultiUInt_class(){ "logicalXor" , logicalXor_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -342,6 +369,7 @@ void register_MultiUInt_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -354,6 +382,7 @@ void register_MultiUInt_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -415,6 +444,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "reinterpretCastToFloat" , reinterpretCastToFloat_function_value + , bp::release_gil_policy() , "" ); } @@ -426,6 +456,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "rotate" , rotate_function_value + , bp::release_gil_policy() , "" ); } @@ -438,6 +469,7 @@ void register_MultiUInt_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the ith value of the MultiInt to value" ); } @@ -449,6 +481,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -460,6 +493,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "" ); } @@ -472,6 +506,7 @@ void register_MultiUInt_class(){ "toArray" , toArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Return the passed MultiUInt converted back into a normal array" ); } @@ -483,6 +518,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "toBinaryString" , toBinaryString_function_value + , bp::release_gil_policy() , "" ); } @@ -494,6 +530,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -505,6 +542,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -516,6 +554,7 @@ void register_MultiUInt_class(){ MultiUInt_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/MultiVector.pypp.cpp b/wrapper/Maths/MultiVector.pypp.cpp index a0549e499..fcdf95cb7 100644 --- a/wrapper/Maths/MultiVector.pypp.cpp +++ b/wrapper/Maths/MultiVector.pypp.cpp @@ -31,6 +31,8 @@ SireMaths::MultiVector __copy__(const SireMaths::MultiVector &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MultiVector_class(){ @@ -53,6 +55,7 @@ void register_MultiVector_class(){ "angle" , angle_function_value , ( bp::arg("v0"), bp::arg("v1") ) + , bp::release_gil_policy() , "Return the angle between vectors v0 and v1 - this is the smallest\nangle, and will always lie between 0 and 180 degrees" ); } @@ -65,6 +68,7 @@ void register_MultiVector_class(){ "angle" , angle_function_value , ( bp::arg("v0"), bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the angle between v0-v1-v2 (treating the vectors as points in space)" ); } @@ -77,6 +81,7 @@ void register_MultiVector_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Access the ith vector in the MultiVector" ); } @@ -88,6 +93,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "b" , b_function_value + , bp::release_gil_policy() , "Return the components via rgb (limited between 0 and 1)" ); } @@ -99,6 +105,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "bearing" , bearing_function_value + , bp::release_gil_policy() , "Return the bearing of this vector against (0,1,0) (north) on the xy plane" ); } @@ -111,6 +118,7 @@ void register_MultiVector_class(){ "bearingXY" , bearingXY_function_value , ( bp::arg("v") ) + , bp::release_gil_policy() , "Return the bearing of this vector against v on the xy plane" ); } @@ -123,6 +131,7 @@ void register_MultiVector_class(){ "bearingXZ" , bearingXZ_function_value , ( bp::arg("v") ) + , bp::release_gil_policy() , "Return the bearing of this vector against v on the xz plane" ); } @@ -135,6 +144,7 @@ void register_MultiVector_class(){ "bearingYZ" , bearingYZ_function_value , ( bp::arg("v") ) + , bp::release_gil_policy() , "Return the bearing of this vector against v on the yz plane" ); } @@ -146,6 +156,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of vectors in this MultiVector" ); } @@ -158,6 +169,7 @@ void register_MultiVector_class(){ "cross" , cross_function_value , ( bp::arg("v0"), bp::arg("v1") ) + , bp::release_gil_policy() , "Return the cross product of v0 and v1" ); } @@ -170,6 +182,7 @@ void register_MultiVector_class(){ "dihedral" , dihedral_function_value , ( bp::arg("v0"), bp::arg("v1"), bp::arg("v2"), bp::arg("v3") ) + , bp::release_gil_policy() , "Return the dihedral angle between v0-v1-v2-v3 (treating the vectors as points)" ); } @@ -181,6 +194,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "direction" , direction_function_value + , bp::release_gil_policy() , "Return the unit vector pointing in the direction of this vector" ); } @@ -193,6 +207,7 @@ void register_MultiVector_class(){ "distance" , distance_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the distance between two vectors" ); } @@ -205,6 +220,7 @@ void register_MultiVector_class(){ "distance2" , distance2_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the distance squared between two vectors" ); } @@ -217,6 +233,7 @@ void register_MultiVector_class(){ "dot" , dot_function_value , ( bp::arg("v0"), bp::arg("v1") ) + , bp::release_gil_policy() , "Return the dot product of v0 and v1" ); } @@ -229,6 +246,7 @@ void register_MultiVector_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array"), bp::arg("size") ) + , bp::release_gil_policy() , "Convert the passed array of vectors into an array of MultiVectors" ); } @@ -241,6 +259,7 @@ void register_MultiVector_class(){ "fromArray" , fromArray_function_value , ( bp::arg("array") ) + , bp::release_gil_policy() , "Convert the passed array of vectors into an array of MultiVectors" ); } @@ -252,6 +271,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "g" , g_function_value + , bp::release_gil_policy() , "Return the components via rgb (limited between 0 and 1)" ); } @@ -264,6 +284,7 @@ void register_MultiVector_class(){ "generate" , generate_function_value , ( bp::arg("dst"), bp::arg("v1"), bp::arg("ang"), bp::arg("v2"), bp::arg("dih"), bp::arg("v3") ) + , bp::release_gil_policy() , "Generate a vector, v0, that has distance dst v0-v1, angle ang v0-v1-v2,\nand dihedral dih v0-v1-v2-v3" ); } @@ -276,6 +297,7 @@ void register_MultiVector_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Access the ith vector in the MultiVector" ); } @@ -288,6 +310,7 @@ void register_MultiVector_class(){ "invDistance" , invDistance_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return the 1 distance between two vectors" ); } @@ -300,6 +323,7 @@ void register_MultiVector_class(){ "invDistance2" , invDistance2_function_value , ( bp::arg("v1"), bp::arg("v2") ) + , bp::release_gil_policy() , "Return 1 distance2 between two vectors" ); } @@ -311,6 +335,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "invLength" , invLength_function_value + , bp::release_gil_policy() , "" ); } @@ -322,6 +347,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "invLength2" , invLength2_function_value + , bp::release_gil_policy() , "Return the inverse length squared" ); } @@ -333,6 +359,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "length" , length_function_value + , bp::release_gil_policy() , "" ); } @@ -344,6 +371,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "length2" , length2_function_value + , bp::release_gil_policy() , "" ); } @@ -355,6 +383,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "magnitude" , magnitude_function_value + , bp::release_gil_policy() , "Return the length of this vector" ); } @@ -366,6 +395,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "manhattanLength" , manhattanLength_function_value + , bp::release_gil_policy() , "Return the manhattan length of the vector" ); } @@ -378,6 +408,7 @@ void register_MultiVector_class(){ "max" , max_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return a vector that has the maximum xyz components out of this\nand other" ); } @@ -390,6 +421,7 @@ void register_MultiVector_class(){ "min" , min_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return a vector that has the minimum components" ); } @@ -401,6 +433,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "normalise" , normalise_function_value + , bp::release_gil_policy() , "Return a normalised form of the vector" ); } @@ -441,6 +474,7 @@ void register_MultiVector_class(){ "quickSet" , quickSet_function_value , ( bp::arg("i"), bp::arg("val") ) + , bp::release_gil_policy() , "Quickly set the values of the vector, without checking the index is valid" ); } @@ -452,6 +486,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "r" , r_function_value + , bp::release_gil_policy() , "Return the components via rgb (limited between 0 and 1)" ); } @@ -464,6 +499,7 @@ void register_MultiVector_class(){ "set" , set_function_value , ( bp::arg("x"), bp::arg("y"), bp::arg("z") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -476,6 +512,7 @@ void register_MultiVector_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("val") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -488,6 +525,7 @@ void register_MultiVector_class(){ "setB" , setB_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -500,6 +538,7 @@ void register_MultiVector_class(){ "setG" , setG_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -512,6 +551,7 @@ void register_MultiVector_class(){ "setMax" , setMax_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Set this Vector so that it has the maximum xyz components out of\nthis and other (e.g. this->x = max(this->x(),other.x() etc.)" ); } @@ -524,6 +564,7 @@ void register_MultiVector_class(){ "setMin" , setMin_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Set this Vector so that it has the minimum xyz components" ); } @@ -536,6 +577,7 @@ void register_MultiVector_class(){ "setR" , setR_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -548,6 +590,7 @@ void register_MultiVector_class(){ "setX" , setX_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -560,6 +603,7 @@ void register_MultiVector_class(){ "setY" , setY_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -572,6 +616,7 @@ void register_MultiVector_class(){ "setZ" , setZ_function_value , ( bp::arg("val") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -583,6 +628,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of vectors in this MultiVector" ); } @@ -595,6 +641,7 @@ void register_MultiVector_class(){ "swap" , swap_function_value , ( bp::arg("v0"), bp::arg("idx0"), bp::arg("v1"), bp::arg("idx1") ) + , bp::release_gil_policy() , "Swap the values of the value at index idx0 in f0 with the value at index idx in f1" ); } @@ -606,6 +653,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a QString representation of the vector" ); } @@ -617,6 +665,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -628,6 +677,7 @@ void register_MultiVector_class(){ MultiVector_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/N4Matrix.pypp.cpp b/wrapper/Maths/N4Matrix.pypp.cpp index 346436e16..e23449c1f 100644 --- a/wrapper/Maths/N4Matrix.pypp.cpp +++ b/wrapper/Maths/N4Matrix.pypp.cpp @@ -31,6 +31,8 @@ SireMaths::N4Matrix __copy__(const SireMaths::N4Matrix &other){ return SireMaths #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_N4Matrix_class(){ { //::SireMaths::N4Matrix @@ -52,6 +54,7 @@ void register_N4Matrix_class(){ "add" , add_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("matrix") ) + , bp::release_gil_policy() , "Add the contents of matrix to the sub-matrix view at [i,j]\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -64,6 +67,7 @@ void register_N4Matrix_class(){ "assertNBigColumns" , assertNBigColumns_function_value , ( bp::arg("nbigcolumns") ) + , bp::release_gil_policy() , "Assert that this matrix has nbigcolumns big columns\nThrow: SireError::incompatible_error\n" ); } @@ -76,6 +80,7 @@ void register_N4Matrix_class(){ "assertNBigRows" , assertNBigRows_function_value , ( bp::arg("nbigrows") ) + , bp::release_gil_policy() , "Assert that this matrix has nbigrows big rows\nThrow: SireError::incompatible_error\n" ); } @@ -88,6 +93,7 @@ void register_N4Matrix_class(){ "assertNColumns" , assertNColumns_function_value , ( bp::arg("ncolumns") ) + , bp::release_gil_policy() , "Assert that this matrix has ncolumns columns\nThrow: SireError::incompatible_error\n" ); } @@ -100,6 +106,7 @@ void register_N4Matrix_class(){ "assertNRows" , assertNRows_function_value , ( bp::arg("nrows") ) + , bp::release_gil_policy() , "Assert that this matrix has nrows rows\nThrow: SireError::incompatible_error\n" ); } @@ -112,6 +119,7 @@ void register_N4Matrix_class(){ "assertValidBigColumn" , assertValidBigColumn_function_value , ( bp::arg("j") ) + , bp::release_gil_policy() , "Assert that there is an jth big column\nThrow: SireError::invalid_index\n" ); } @@ -124,6 +132,7 @@ void register_N4Matrix_class(){ "assertValidBigRow" , assertValidBigRow_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that there is an ith big row\nThrow: SireError::invalid_index\n" ); } @@ -136,6 +145,7 @@ void register_N4Matrix_class(){ "assertValidColumn" , assertValidColumn_function_value , ( bp::arg("l") ) + , bp::release_gil_policy() , "Assert that there is an lth column\nThrow: SireError::invalid_index\n" ); } @@ -148,6 +158,7 @@ void register_N4Matrix_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("k"), bp::arg("l") ) + , bp::release_gil_policy() , "Assert that the index [i,j,k,l] is valid for this matrix\nThrow: SireError::invalid_index\n" ); } @@ -160,6 +171,7 @@ void register_N4Matrix_class(){ "assertValidRow" , assertValidRow_function_value , ( bp::arg("k") ) + , bp::release_gil_policy() , "Assert that there is an kth row\nThrow: SireError::invalid_index\n" ); } @@ -172,6 +184,7 @@ void register_N4Matrix_class(){ "checkedOffset" , checkedOffset_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("k"), bp::arg("l") ) + , bp::release_gil_policy() , "Calculate the offset in the 1D array of the value\nat index [i,j,k,l]\nThrow: SireError::invalid_index\n" ); } @@ -183,6 +196,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "memory" , memory_function_value + , bp::release_gil_policy() , "Return the raw QVector memory used by this matrix" ); } @@ -194,6 +208,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "nBigColumns" , nBigColumns_function_value + , bp::release_gil_policy() , "Return the number of big columns in this matrix" ); } @@ -205,6 +220,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "nBigRows" , nBigRows_function_value + , bp::release_gil_policy() , "Return the number of big rows in this matrix" ); } @@ -216,6 +232,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "nColumns" , nColumns_function_value + , bp::release_gil_policy() , "Return the number of columns in this matrix" ); } @@ -227,6 +244,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "nRows" , nRows_function_value + , bp::release_gil_policy() , "Return the number of rows in this matrix" ); } @@ -239,6 +257,7 @@ void register_N4Matrix_class(){ "offset" , offset_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("k"), bp::arg("l") ) + , bp::release_gil_policy() , "" ); } @@ -296,6 +315,7 @@ void register_N4Matrix_class(){ "redimension" , redimension_function_value , ( bp::arg("nbigrows"), bp::arg("nbigcolumns"), bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "Redimension this matrix to have nbigrows big rows,\nnbigcolumns big columns, nrows rows and ncolumns\ncolumns. The contents of this matrix are undefined after\nthis redimension. This function will only reallocate\nmemory if there is not enough memory allocated to store\nthe new matrix. Use this function if you want to use\nthe same piece of memory over and over again for lots\nof different size matricies - just create a matrix with\nthe maximum dimension, then call this redimension function\nwhenever you want to change. It is very fast, as it just\nupdates the internal record of the size of the matrix" ); } @@ -308,6 +328,7 @@ void register_N4Matrix_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("matrix") ) + , bp::release_gil_policy() , "Set the view at [i,j] equal to matrix\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -320,6 +341,7 @@ void register_N4Matrix_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("k"), bp::arg("l"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value at [i,j,k,l] equal to value\nThrow: SireError::invalid_index\n" ); } @@ -332,6 +354,7 @@ void register_N4Matrix_class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set all entries in the matrix to the value value" ); } @@ -344,6 +367,7 @@ void register_N4Matrix_class(){ "subtract" , subtract_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("matrix") ) + , bp::release_gil_policy() , "Subtract the contents of matrix from the sub-matrix view at [i,j]\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -355,6 +379,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this matrix" ); } @@ -366,6 +391,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -378,6 +404,7 @@ void register_N4Matrix_class(){ "view" , view_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return the sub-matrix view at [i,j,k,l]\nThrow: SireError::invalid_index\n" ); } @@ -389,6 +416,7 @@ void register_N4Matrix_class(){ N4Matrix_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/NMatrix.pypp.cpp b/wrapper/Maths/NMatrix.pypp.cpp index 75f52c116..e191825d1 100644 --- a/wrapper/Maths/NMatrix.pypp.cpp +++ b/wrapper/Maths/NMatrix.pypp.cpp @@ -41,6 +41,8 @@ SireMaths::NMatrix __copy__(const SireMaths::NMatrix &other){ return SireMaths:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NMatrix_class(){ { //::SireMaths::NMatrix @@ -66,6 +68,7 @@ void register_NMatrix_class(){ "assertNColumns" , assertNColumns_function_value , ( bp::arg("ncolumns") ) + , bp::release_gil_policy() , "Assert that this matrix has ncolumns columns\nThrow: SireError::incompatible_error\n" ); } @@ -78,6 +81,7 @@ void register_NMatrix_class(){ "assertNRows" , assertNRows_function_value , ( bp::arg("nrows") ) + , bp::release_gil_policy() , "Assert that this matrix has nrows rows\nThrow: SireError::incompatible_error\n" ); } @@ -89,6 +93,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "assertSquare" , assertSquare_function_value + , bp::release_gil_policy() , "Assert that this is a square matrix\nThrow: SireError::incompatible_error\n" ); } @@ -101,6 +106,7 @@ void register_NMatrix_class(){ "assertValidColumn" , assertValidColumn_function_value , ( bp::arg("j") ) + , bp::release_gil_policy() , "Assert that there is an jth column\nThrow: SireError::invalid_index\n" ); } @@ -113,6 +119,7 @@ void register_NMatrix_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Assert that the index [i,j] is valid for this matrix\nThrow: SireError::invalid_index\n" ); } @@ -125,6 +132,7 @@ void register_NMatrix_class(){ "assertValidRow" , assertValidRow_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that there is an ith row\nThrow: SireError::invalid_index\n" ); } @@ -137,6 +145,7 @@ void register_NMatrix_class(){ "checkedOffset" , checkedOffset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Calculate the offset in the 1D array of the value\nat index [i,j]\nThrow: SireError::invalid_index\n" ); } @@ -149,6 +158,7 @@ void register_NMatrix_class(){ "column" , column_function_value , ( bp::arg("j") ) + , bp::release_gil_policy() , "Return a vector containing the contents of the ith row\nThrow: SireError::invalid_index\n" ); } @@ -161,6 +171,7 @@ void register_NMatrix_class(){ "createColumnMajor" , createColumnMajor_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "Construct a matrix with dimension nrows by ncolumns that\nstores the data in column-major order" ); } @@ -173,6 +184,7 @@ void register_NMatrix_class(){ "createRowMajor" , createRowMajor_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "Construct a matrix with dimension nrows by ncolumns that\nstores the data in row-major order" ); } @@ -184,6 +196,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "determinant" , determinant_function_value + , bp::release_gil_policy() , "Return the determinant of this matrix\nThis uses LAPACK under the hood, for speed\nThrow: SireError::incompatible_error\n" ); } @@ -195,6 +208,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "diagonal" , diagonal_function_value + , bp::release_gil_policy() , "Return a vector containing the diagonal of this matrix - this is only\nvalid for a square matrix\nThrow: SireError::incompatible_error\n" ); } @@ -206,6 +220,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "diagonalise" , diagonalise_function_value + , bp::release_gil_policy() , "Return the eigenvalues and eigenvectors of this matrix. This\nuses LAPACK under the hood for speed\nThrow: SireError::incompatible_error\nThrow: SireMaths::domain_error\n" ); } @@ -217,6 +232,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "fullTranspose" , fullTranspose_function_value + , bp::release_gil_policy() , "Fully transpose the data of this matrix" ); } @@ -228,6 +244,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Return the inverse of this matrix\nThis uses LAPACK under the hood, for speed\nThrow: SireError::incompatible_error\nThrow: SireMaths::domain_error\n" ); } @@ -239,6 +256,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "isTransposed" , isTransposed_function_value + , bp::release_gil_policy() , "Return whether or not this is a transposed matrix (data\nis stored in row-major order rather than column-major order)" ); } @@ -250,6 +268,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "memory" , memory_function_value + , bp::release_gil_policy() , "Return the QVector containing the memory of this Matrix" ); } @@ -261,6 +280,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "nColumns" , nColumns_function_value + , bp::release_gil_policy() , "Return the number of columns in this matrix" ); } @@ -272,6 +292,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "nRows" , nRows_function_value + , bp::release_gil_policy() , "Return the number of rows in this matrix" ); } @@ -284,6 +305,7 @@ void register_NMatrix_class(){ "offset" , offset_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -333,6 +355,7 @@ void register_NMatrix_class(){ "redimension" , redimension_function_value , ( bp::arg("nrows"), bp::arg("ncolumns") ) + , bp::release_gil_policy() , "Redimension this matrix to have nrows rows and ncolumns\ncolumns. The contents of this matrix are undefined after\nthis redimension. This function will only reallocate\nmemory if there is not enough memory allocated to store\nthe new matrix. Use this function if you want to use\nthe same piece of memory over and over again for lots\nof different size matricies - just create a matrix with\nthe maximum dimension, then call this redimension function\nwhenever you want to change. It is very fast, as it just\nupdates the internal record of the size of the matrix" ); } @@ -344,6 +367,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectBottomLeftToTopRight" , reflectBottomLeftToTopRight_function_value + , bp::release_gil_policy() , "Copy the contents of the bottom left diagonal to the top\nright diagonal. This sets matrix[i,j] = matrix[j,i]\nThis must be a square matrix.\n1 2 3 1 4 7\n4 5 6 => 4 5 8\n7 8 9 7 8 9\nThrow: SireError::incompatible_error\n" ); } @@ -355,6 +379,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectBottomRightToTopLeft" , reflectBottomRightToTopLeft_function_value + , bp::release_gil_policy() , "Copy the contents of the bottom right diagonal to the top\nleft diagonal. If n == nRows(), then this sets\nmatrix[i,j] = matrix[n-j,n-i]\nThis must be a square matrix.\n1 2 3 9 6 3\n4 5 6 => 8 5 6\n7 8 9 7 8 9\nThrow: SireError::incompatible_error\n" ); } @@ -366,6 +391,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectBottomToTop" , reflectBottomToTop_function_value + , bp::release_gil_policy() , "Reflect the contents of the bottom half to the top\nhalf. If n == nRows(), then this sets\nmatrix[i,j] = matrix[n-i,j]\n1 2 3 7 8 9\n4 5 6 => 4 5 6\n7 8 9 7 8 9\nThrow: SireError::incompatible_error\n" ); } @@ -377,6 +403,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectLeftToRight" , reflectLeftToRight_function_value + , bp::release_gil_policy() , "Reflect the contents of the left half to the right\nhalf. If n == nColumns(), then this sets\nmatrix[i,n-j] = matrix[i,j]\n1 2 3 1 2 1\n4 5 6 => 4 5 4\n7 8 9 7 8 7\nThrow: SireError::incompatible_error\n" ); } @@ -388,6 +415,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectRightToLeft" , reflectRightToLeft_function_value + , bp::release_gil_policy() , "Reflect the contents of the left half to the right\nhalf. If n == nColumns(), then this sets\nmatrix[i,j] = matrix[i,n-j]\n1 2 3 3 2 3\n4 5 6 => 6 5 6\n7 8 9 9 8 9\nThrow: SireError::incompatible_error\n" ); } @@ -399,6 +427,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectTopLeftToBottomRight" , reflectTopLeftToBottomRight_function_value + , bp::release_gil_policy() , "Copy the contents of the top left diagonal to the bottom\nright diagonal. If n == nRows(), then this sets\nmatrix[n-j,n-i] = matrix[i,j]\n1 2 3 1 2 3 [2,1] => [1,0] [0,2] == [0,2]\n4 5 6 => 4 5 2 [1,2] => [0,1] [1,1] == [1,1]\n7 8 9 7 4 1 [2,2] => [0,0] [2,0] == [2,0]\nThis must be a square matrix.\nThrow: SireError::incompatible_error\n" ); } @@ -410,6 +439,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectTopRightToBottomLeft" , reflectTopRightToBottomLeft_function_value + , bp::release_gil_policy() , "Copy the contents of the top right diagonal to the bottom\nleft diagonal. This sets matrix[j,i] = matrix[i,j]\nThis must be a square matrix.\n1 2 3 1 2 3\n4 5 6 => 2 5 6\n7 8 9 3 6 9\nThrow: SireError::incompatible_error\n" ); } @@ -421,6 +451,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "reflectTopToBottom" , reflectTopToBottom_function_value + , bp::release_gil_policy() , "Reflect the contents of the top half to the bottom\nhalf. If n == nRows(), then this sets\nmatrix[n-i,j] = matrix[i,j]\n1 2 3 1 2 3\n4 5 6 => 4 5 6\n7 8 9 1 2 3\nThrow: SireError::incompatible_error\n" ); } @@ -433,6 +464,7 @@ void register_NMatrix_class(){ "row" , row_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return a vector containing the contents of the ith row\nThrow: SireError::invalid_index\n" ); } @@ -445,6 +477,7 @@ void register_NMatrix_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value of [i,j] to value\nThrow: SireError::invalid_index\n" ); } @@ -457,6 +490,7 @@ void register_NMatrix_class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set all entries in the matrix to the value value" ); } @@ -469,6 +503,7 @@ void register_NMatrix_class(){ "setColumn" , setColumn_function_value , ( bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the values of all data in the column j to value\nThrow: SireError::invalid_index\n" ); } @@ -481,6 +516,7 @@ void register_NMatrix_class(){ "setColumn" , setColumn_function_value , ( bp::arg("j"), bp::arg("column") ) + , bp::release_gil_policy() , "Copy the vector column to column j\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -493,6 +529,7 @@ void register_NMatrix_class(){ "setRow" , setRow_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the values of all data in the row i to value\nThrow: SireError::invalid_index\n" ); } @@ -505,6 +542,7 @@ void register_NMatrix_class(){ "setRow" , setRow_function_value , ( bp::arg("i"), bp::arg("row") ) + , bp::release_gil_policy() , "Copy the vector row to row i\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -516,6 +554,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this matrix" ); } @@ -527,6 +566,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "trace" , trace_function_value + , bp::release_gil_policy() , "Return the trace of this matrix - this is only valid for a square matrix\nThrow: SireError::incompatible_error\n" ); } @@ -538,6 +578,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "Return the transpose of this matrix. This is fast, as this\njust toggles a flag to say whether or not the transpose is\nto be used. If you want to fully transpose the data (e.g.\nif you want to directly access the data) the call fullTranspose()" ); } @@ -549,6 +590,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -560,6 +602,7 @@ void register_NMatrix_class(){ NMatrix_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/NVector.pypp.cpp b/wrapper/Maths/NVector.pypp.cpp index b3b781e64..7171c783c 100644 --- a/wrapper/Maths/NVector.pypp.cpp +++ b/wrapper/Maths/NVector.pypp.cpp @@ -29,6 +29,8 @@ SireMaths::NVector __copy__(const SireMaths::NVector &other){ return SireMaths:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_NVector_class(){ @@ -51,6 +53,7 @@ void register_NVector_class(){ "assertNColumns" , assertNColumns_function_value , ( bp::arg("ncolumns") ) + , bp::release_gil_policy() , "Assert that this column vector has ncolumns columns - note\nthat this is a column vector, so only has 1 column\nThrow: SireError::incompatible_error\n" ); } @@ -63,6 +66,7 @@ void register_NVector_class(){ "assertNRows" , assertNRows_function_value , ( bp::arg("nrows") ) + , bp::release_gil_policy() , "Assert that this column vector has nrows rows\nThrow: SireError::incompatible_error\n" ); } @@ -75,6 +79,7 @@ void register_NVector_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that the index i is valid\nThrow: SireError::invalid_index\n" ); } @@ -87,6 +92,7 @@ void register_NVector_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Assert that the index [i,j] is valid\nThrow: SireError::invalid_index\n" ); } @@ -98,6 +104,7 @@ void register_NVector_class(){ NVector_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of values in this vector" ); } @@ -110,6 +117,7 @@ void register_NVector_class(){ "cross" , cross_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the cross product of this vector with other\nThrow: SireError::incompatible_error\nThrow: SireMaths::domain_error\n" ); } @@ -122,6 +130,7 @@ void register_NVector_class(){ "dot" , dot_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the dot product of this vector with other\nThrow: SireError::incompatible_error\n" ); } @@ -133,6 +142,7 @@ void register_NVector_class(){ NVector_exposer.def( "isZero" , isZero_function_value + , bp::release_gil_policy() , "Return whether or not this is a zero vector" ); } @@ -144,6 +154,7 @@ void register_NVector_class(){ NVector_exposer.def( "length" , length_function_value + , bp::release_gil_policy() , "Return the length of this vector" ); } @@ -155,6 +166,7 @@ void register_NVector_class(){ NVector_exposer.def( "length2" , length2_function_value + , bp::release_gil_policy() , "Return the length squared of this vector" ); } @@ -166,6 +178,7 @@ void register_NVector_class(){ NVector_exposer.def( "nColumns" , nColumns_function_value + , bp::release_gil_policy() , "Return the number of columns in this column vector (0 or 1)" ); } @@ -177,6 +190,7 @@ void register_NVector_class(){ NVector_exposer.def( "nRows" , nRows_function_value + , bp::release_gil_policy() , "Return the number of rows in this column vector" ); } @@ -188,6 +202,7 @@ void register_NVector_class(){ NVector_exposer.def( "normalise" , normalise_function_value + , bp::release_gil_policy() , "Normalise this vector\nThrow: SireMaths::domain_error\n" ); } @@ -272,6 +287,7 @@ void register_NVector_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value at [i,0] to value\nThrow: SireError::invalid_index\n" ); } @@ -284,6 +300,7 @@ void register_NVector_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value at [i,j] to value\nThrow: SireError::invalid_index\n" ); } @@ -296,6 +313,7 @@ void register_NVector_class(){ "setAll" , setAll_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set all values in this vector to value" ); } @@ -307,6 +325,7 @@ void register_NVector_class(){ NVector_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of values in this vector" ); } @@ -318,6 +337,7 @@ void register_NVector_class(){ NVector_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "Return the sum of the elements of this vector" ); } @@ -329,6 +349,7 @@ void register_NVector_class(){ NVector_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this vector" ); } @@ -340,6 +361,7 @@ void register_NVector_class(){ NVector_exposer.def( "transpose" , transpose_function_value + , bp::release_gil_policy() , "Return the transpose of this column vector (a row vector, which\nis implemented in this code as a NMatrix)" ); } @@ -351,6 +373,7 @@ void register_NVector_class(){ NVector_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -362,6 +385,7 @@ void register_NVector_class(){ NVector_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/NullAccumulator.pypp.cpp b/wrapper/Maths/NullAccumulator.pypp.cpp index 338919bc3..96565fc7d 100644 --- a/wrapper/Maths/NullAccumulator.pypp.cpp +++ b/wrapper/Maths/NullAccumulator.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::NullAccumulator __copy__(const SireMaths::NullAccumulator &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullAccumulator_class(){ { //::SireMaths::NullAccumulator @@ -49,6 +51,7 @@ void register_NullAccumulator_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the passed value onto the average" ); } @@ -75,6 +78,7 @@ void register_NullAccumulator_class(){ NullAccumulator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Plane.pypp.cpp b/wrapper/Maths/Plane.pypp.cpp index aa50b27e0..35815d66f 100644 --- a/wrapper/Maths/Plane.pypp.cpp +++ b/wrapper/Maths/Plane.pypp.cpp @@ -19,6 +19,8 @@ SireMaths::Plane __copy__(const SireMaths::Plane &other){ return SireMaths::Plan const char* pvt_get_name(const SireMaths::Plane&){ return "SireMaths::Plane";} +#include "Helpers/release_gil_policy.hpp" + void register_Plane_class(){ { //::SireMaths::Plane @@ -37,6 +39,7 @@ void register_Plane_class(){ Plane_exposer.def( "a" , a_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_Plane_class(){ Plane_exposer.def( "b" , b_function_value + , bp::release_gil_policy() , "" ); } @@ -59,6 +63,7 @@ void register_Plane_class(){ Plane_exposer.def( "c" , c_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +75,7 @@ void register_Plane_class(){ Plane_exposer.def( "d" , d_function_value + , bp::release_gil_policy() , "" ); } @@ -82,6 +88,7 @@ void register_Plane_class(){ "distance" , distance_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "" ); } @@ -117,6 +124,7 @@ void register_Plane_class(){ Plane_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -128,6 +136,7 @@ void register_Plane_class(){ Plane_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Quaternion.pypp.cpp b/wrapper/Maths/Quaternion.pypp.cpp index 8d1e616a1..dee5703fd 100644 --- a/wrapper/Maths/Quaternion.pypp.cpp +++ b/wrapper/Maths/Quaternion.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::Quaternion __copy__(const SireMaths::Quaternion &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Quaternion_class(){ { //::SireMaths::Quaternion @@ -51,6 +53,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "conjugate" , conjugate_function_value + , bp::release_gil_policy() , "Return the conjugate of the quaternion" ); } @@ -63,6 +66,7 @@ void register_Quaternion_class(){ "dot" , dot_function_value , ( bp::arg("q") ) + , bp::release_gil_policy() , "Return the dot product of this with another quaternion" ); } @@ -75,6 +79,7 @@ void register_Quaternion_class(){ "fromMatrix" , fromMatrix_function_value , ( bp::arg("m") ) + , bp::release_gil_policy() , "Get from a matrix" ); } @@ -87,6 +92,7 @@ void register_Quaternion_class(){ "fromString" , fromString_function_value , ( bp::arg("str") ) + , bp::release_gil_policy() , "Construct a Vector from the QString representation returned by toString()" ); } @@ -98,6 +104,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "identity" , identity_function_value + , bp::release_gil_policy() , "Return a quaternion that represents the identity matrix" ); } @@ -109,6 +116,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Return the inverse of the quaternion\n- since the length=1 this is the same as the conjugate" ); } @@ -120,6 +128,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "isIdentity" , isIdentity_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +156,7 @@ void register_Quaternion_class(){ "pow" , pow_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return this quaternion raised to the power n" ); } @@ -158,6 +168,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "renormalise" , renormalise_function_value + , bp::release_gil_policy() , "Renormalise the quaternion" ); } @@ -170,6 +181,7 @@ void register_Quaternion_class(){ "rotate" , rotate_function_value , ( bp::arg("p") ) + , bp::release_gil_policy() , "Use this quaternion to rotate p" ); } @@ -182,6 +194,7 @@ void register_Quaternion_class(){ "rotate" , rotate_function_value , ( bp::arg("points") ) + , bp::release_gil_policy() , "Use the quaternion to rotate all of the points in p" ); } @@ -194,6 +207,7 @@ void register_Quaternion_class(){ "slerp" , slerp_function_value , ( bp::arg("q"), bp::arg("lambda") ) + , bp::release_gil_policy() , "Return the spherical linear interpolation (slerp) of this quaternion\nwith another for 0<=lambda<=1, with this quaternion returned\nat lambda=0 and the other returned at lambda=1" ); } @@ -205,6 +219,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "toMatrix" , toMatrix_function_value + , bp::release_gil_policy() , "Convert into a matrix" ); } @@ -216,6 +231,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this Quaternion" ); } @@ -227,6 +243,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -238,6 +255,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "w" , w_function_value + , bp::release_gil_policy() , "" ); } @@ -249,6 +267,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -260,6 +279,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "x" , x_function_value + , bp::release_gil_policy() , "" ); } @@ -271,6 +291,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "y" , y_function_value + , bp::release_gil_policy() , "" ); } @@ -282,6 +303,7 @@ void register_Quaternion_class(){ Quaternion_exposer.def( "z" , z_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/RanGenerator.pypp.cpp b/wrapper/Maths/RanGenerator.pypp.cpp index 9b47d2da0..eaeb1a610 100644 --- a/wrapper/Maths/RanGenerator.pypp.cpp +++ b/wrapper/Maths/RanGenerator.pypp.cpp @@ -41,6 +41,8 @@ SireMaths::RanGenerator __copy__(const SireMaths::RanGenerator &other){ return S const char* pvt_get_name(const SireMaths::RanGenerator&){ return "SireMaths::RanGenerator";} +#include "Helpers/release_gil_policy.hpp" + void register_RanGenerator_class(){ { //::SireMaths::RanGenerator @@ -58,6 +60,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "detach" , detach_function_value + , bp::release_gil_policy() , "Detach from shared storage" ); } @@ -69,6 +72,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "getState" , getState_function_value + , bp::release_gil_policy() , "Return the current state of the random number generator.\nUse this if you truly wish to get reproducible sequences\nof random numbers" ); } @@ -92,6 +96,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "lock" , lock_function_value + , bp::release_gil_policy() , "Take hold of the generator lock. Only you can now generate\nrandom numbers while this lock is held" ); } @@ -103,6 +108,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "locked_rand" , locked_rand_function_value + , bp::release_gil_policy() , "Return a random real number on [0,1]. Should only be called while\nyou hold the generator lock" ); } @@ -115,6 +121,7 @@ void register_RanGenerator_class(){ "locked_rand" , locked_rand_function_value , ( bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random real number on [0,maxval]. Should only be called while\nyou hold the generator lock" ); } @@ -127,6 +134,7 @@ void register_RanGenerator_class(){ "locked_rand" , locked_rand_function_value , ( bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random real number on [minval,maxval]. Should only be called while\nyou hold the generator lock" ); } @@ -138,6 +146,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "locked_randNorm" , locked_randNorm_function_value + , bp::release_gil_policy() , "Return a random number generated from the normal distribution\nwith mean 0 and standard deviation 1. You must hold the generator\nlock when calling this function" ); } @@ -150,6 +159,7 @@ void register_RanGenerator_class(){ "locked_randNorm" , locked_randNorm_function_value , ( bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random number from the normal distribution\nwith supplied mean and variance. You must hold the generator\nlock when calling this function" ); } @@ -161,6 +171,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "locked_vectorOnSphere" , locked_vectorOnSphere_function_value + , bp::release_gil_policy() , "Return a random vector on the unit sphere. You must hold the generator\nlock when calling this function" ); } @@ -173,6 +184,7 @@ void register_RanGenerator_class(){ "locked_vectorOnSphere" , locked_vectorOnSphere_function_value , ( bp::arg("radius") ) + , bp::release_gil_policy() , "Return a random vector on the sphere with radius radius.\nYou must hold the generator lock when calling this function" ); } @@ -185,6 +197,7 @@ void register_RanGenerator_class(){ "nrand" , nrand_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return an array of n random numbers on [0,1]" ); } @@ -197,6 +210,7 @@ void register_RanGenerator_class(){ "nrand" , nrand_function_value , ( bp::arg("n"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return an array of n random numbers on [0,maxval]" ); } @@ -209,6 +223,7 @@ void register_RanGenerator_class(){ "nrand" , nrand_function_value , ( bp::arg("n"), bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return an array of n random numbers on [minval,maxval]" ); } @@ -221,6 +236,7 @@ void register_RanGenerator_class(){ "nrand" , nrand_function_value , ( bp::arg("result") ) + , bp::release_gil_policy() , "Fill the passed array of doubles with random numbers. This replaces each\nvalue in the array with a random number on [0,1]" ); } @@ -233,6 +249,7 @@ void register_RanGenerator_class(){ "nrand" , nrand_function_value , ( bp::arg("result"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Fill the passed array of doubles with random numbers. This replaces each\nvalue in the array with a random number on [0,maxval]" ); } @@ -245,6 +262,7 @@ void register_RanGenerator_class(){ "nrand" , nrand_function_value , ( bp::arg("result"), bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Fill the passed array of doubles with random numbers. This replaces each\nvalue in the array with a random number on [minval,maxval]" ); } @@ -257,6 +275,7 @@ void register_RanGenerator_class(){ "nrandNorm" , nrandNorm_function_value , ( bp::arg("result"), bp::arg("mean"), bp::arg("variance") ) + , bp::release_gil_policy() , "Fill the passed array with random numbers drawn from the normal\ndistribution with supplied mean and variance" ); } @@ -269,6 +288,7 @@ void register_RanGenerator_class(){ "nrandNorm" , nrandNorm_function_value , ( bp::arg("n"), bp::arg("mean"), bp::arg("variance") ) + , bp::release_gil_policy() , "Return an array of N random numbers drawn from the normal distribution with\nsupplied mean and variance" ); } @@ -281,6 +301,7 @@ void register_RanGenerator_class(){ "nvectorOnSphere" , nvectorOnSphere_function_value , ( bp::arg("result") ) + , bp::release_gil_policy() , "Fill the passed array with random vectors on a unit sphere" ); } @@ -293,6 +314,7 @@ void register_RanGenerator_class(){ "nvectorOnSphere" , nvectorOnSphere_function_value , ( bp::arg("result"), bp::arg("radius") ) + , bp::release_gil_policy() , "Fill the passed array with random vectors on a sphere with radius radius" ); } @@ -305,6 +327,7 @@ void register_RanGenerator_class(){ "nvectorOnSphere" , nvectorOnSphere_function_value , ( bp::arg("n") ) + , bp::release_gil_policy() , "Return an array of n random vectors on a unit sphere" ); } @@ -317,6 +340,7 @@ void register_RanGenerator_class(){ "nvectorOnSphere" , nvectorOnSphere_function_value , ( bp::arg("n"), bp::arg("radius") ) + , bp::release_gil_policy() , "Return an array of n random vectors on a sphere of radius radius" ); } @@ -343,6 +367,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "rand" , rand_function_value + , bp::release_gil_policy() , "Return a random real number on [0,1]" ); } @@ -355,6 +380,7 @@ void register_RanGenerator_class(){ "rand" , rand_function_value , ( bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random real number on [0,maxval]" ); } @@ -367,6 +393,7 @@ void register_RanGenerator_class(){ "rand" , rand_function_value , ( bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random real number on [minval,maxval]" ); } @@ -378,6 +405,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "rand53" , rand53_function_value + , bp::release_gil_policy() , "Return a high-precision random real number on [0,1)" ); } @@ -390,6 +418,7 @@ void register_RanGenerator_class(){ "rand53" , rand53_function_value , ( bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a high-precision random real number on [0,1)" ); } @@ -402,6 +431,7 @@ void register_RanGenerator_class(){ "rand53" , rand53_function_value , ( bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a high-precision random real number on [minval,maxval)" ); } @@ -413,6 +443,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "randBool" , randBool_function_value + , bp::release_gil_policy() , "Return a random true or false value" ); } @@ -424,6 +455,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "randInt" , randInt_function_value + , bp::release_gil_policy() , "Return a random 32bit unsigned integer in [0,2^32 - 1]" ); } @@ -436,6 +468,7 @@ void register_RanGenerator_class(){ "randInt" , randInt_function_value , ( bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random 32bit unsigned integer in [0,maxval]" ); } @@ -448,6 +481,7 @@ void register_RanGenerator_class(){ "randInt" , randInt_function_value , ( bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random 32bit integer in [minval,maxval]" ); } @@ -459,6 +493,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "randInt64" , randInt64_function_value + , bp::release_gil_policy() , "Return a random 64bit unsigned integer on [0,2^64 - 1]" ); } @@ -471,6 +506,7 @@ void register_RanGenerator_class(){ "randInt64" , randInt64_function_value , ( bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random 64bit unsigned integer on [0,maxval]" ); } @@ -483,6 +519,7 @@ void register_RanGenerator_class(){ "randInt64" , randInt64_function_value , ( bp::arg("minval"), bp::arg("maxval") ) + , bp::release_gil_policy() , "Return a random 64bit integer on [minval,maxval]" ); } @@ -494,6 +531,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "randNorm" , randNorm_function_value + , bp::release_gil_policy() , "Return a random number generated from the normal distribution\nwith mean 0 and standard deviation 1" ); } @@ -506,6 +544,7 @@ void register_RanGenerator_class(){ "randNorm" , randNorm_function_value , ( bp::arg("mean"), bp::arg("variance") ) + , bp::release_gil_policy() , "Return a random number from the normal distribution\nwith supplied mean and variance." ); } @@ -517,6 +556,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "seed" , seed_function_value + , bp::release_gil_policy() , "See the generator with a new, random seed - this will detach\nthis explicitly shared copy of the generator" ); } @@ -529,6 +569,7 @@ void register_RanGenerator_class(){ "seed" , seed_function_value , ( bp::arg("seed") ) + , bp::release_gil_policy() , "Seed the generator with s - this will detach\nthis explicitly shared copy of the generator" ); } @@ -541,6 +582,7 @@ void register_RanGenerator_class(){ "seed" , seed_function_value , ( bp::arg("seed") ) + , bp::release_gil_policy() , "Seed the generator with seed - this will detach\nthis explicitly shared copy of the generator" ); } @@ -553,6 +595,7 @@ void register_RanGenerator_class(){ "seed" , seed_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Seed the generator with another generator - this\nreally just copies the generator as they are\nall explicit copies of one another" ); } @@ -564,6 +607,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "seedGlobal" , seedGlobal_function_value + , bp::release_gil_policy() , "Seed the global random number generator" ); } @@ -576,6 +620,7 @@ void register_RanGenerator_class(){ "seedGlobal" , seedGlobal_function_value , ( bp::arg("seed") ) + , bp::release_gil_policy() , "Seed the global random number generator" ); } @@ -588,6 +633,7 @@ void register_RanGenerator_class(){ "seedGlobal" , seedGlobal_function_value , ( bp::arg("seed") ) + , bp::release_gil_policy() , "Seed the global random number generator" ); } @@ -600,6 +646,7 @@ void register_RanGenerator_class(){ "seedGlobal" , seedGlobal_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Seed the global random number generator" ); } @@ -612,6 +659,7 @@ void register_RanGenerator_class(){ "setState" , setState_function_value , ( bp::arg("state") ) + , bp::release_gil_policy() , "Load the state into this generator - the state must have\nbeen produced by the getState() function above.\nThis will detach this copy from shared storage.\nThrow: SireError::incompatible_error\n" ); } @@ -623,6 +671,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -634,6 +683,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "unlock" , unlock_function_value + , bp::release_gil_policy() , "Release the generator lock" ); } @@ -645,6 +695,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "vectorOnSphere" , vectorOnSphere_function_value + , bp::release_gil_policy() , "Return a random vector on the unit sphere" ); } @@ -657,6 +708,7 @@ void register_RanGenerator_class(){ "vectorOnSphere" , vectorOnSphere_function_value , ( bp::arg("radius") ) + , bp::release_gil_policy() , "Return a random vector on the sphere with radius radius" ); } @@ -668,6 +720,7 @@ void register_RanGenerator_class(){ RanGenerator_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Rational.pypp.cpp b/wrapper/Maths/Rational.pypp.cpp index 2ef007eab..c4e3fcd0d 100644 --- a/wrapper/Maths/Rational.pypp.cpp +++ b/wrapper/Maths/Rational.pypp.cpp @@ -25,6 +25,8 @@ SireMaths::Rational __copy__(const SireMaths::Rational &other){ return SireMaths #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Rational_class(){ { //::SireMaths::Rational @@ -42,6 +44,7 @@ void register_Rational_class(){ Rational_exposer.def( "denominator" , denominator_function_value + , bp::release_gil_policy() , "" ); } @@ -53,6 +56,7 @@ void register_Rational_class(){ Rational_exposer.def( "numerator" , numerator_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +108,7 @@ void register_Rational_class(){ Rational_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/RecordValues.pypp.cpp b/wrapper/Maths/RecordValues.pypp.cpp index 67f788f06..735c4ed37 100644 --- a/wrapper/Maths/RecordValues.pypp.cpp +++ b/wrapper/Maths/RecordValues.pypp.cpp @@ -33,6 +33,8 @@ SireMaths::RecordValues __copy__(const SireMaths::RecordValues &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_RecordValues_class(){ @@ -51,6 +53,7 @@ void register_RecordValues_class(){ "accumulate" , accumulate_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Accumulate the passed value onto the average" ); } @@ -62,6 +65,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear the statistics in this accumulator" ); } @@ -73,6 +77,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of recorded values" ); } @@ -84,6 +89,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "max" , max_function_value + , bp::release_gil_policy() , "Return the maximum value" ); } @@ -95,6 +101,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "maximum" , maximum_function_value + , bp::release_gil_policy() , "Return the maximum value" ); } @@ -106,6 +113,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "mean" , mean_function_value + , bp::release_gil_policy() , "Return the mean value" ); } @@ -117,6 +125,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "meanOfSquares" , meanOfSquares_function_value + , bp::release_gil_policy() , "Return the mean of the square values" ); } @@ -128,6 +137,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "median" , median_function_value + , bp::release_gil_policy() , "Return the median value" ); } @@ -139,6 +149,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "min" , min_function_value + , bp::release_gil_policy() , "Return the minimum value" ); } @@ -150,6 +161,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "minimum" , minimum_function_value + , bp::release_gil_policy() , "Return the minimum value" ); } @@ -161,6 +173,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "nValues" , nValues_function_value + , bp::release_gil_policy() , "Return the number of recorded values" ); } @@ -187,6 +200,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of recorded values" ); } @@ -198,6 +212,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "standardDeviation" , standardDeviation_function_value + , bp::release_gil_policy() , "Return the standard deviation of the values" ); } @@ -209,6 +224,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "stddev" , stddev_function_value + , bp::release_gil_policy() , "Return the standard deviation of the values" ); } @@ -220,6 +236,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "sum" , sum_function_value + , bp::release_gil_policy() , "Return the sum of all of the values" ); } @@ -231,6 +248,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "sum2" , sum2_function_value + , bp::release_gil_policy() , "Return the sum of the square of all of the values" ); } @@ -242,6 +260,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -253,6 +272,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -264,6 +284,7 @@ void register_RecordValues_class(){ RecordValues_exposer.def( "values" , values_function_value + , bp::release_gil_policy() , "Return the array of all accumulated values" ); } diff --git a/wrapper/Maths/SireMaths_registrars.cpp b/wrapper/Maths/SireMaths_registrars.cpp index 4b2d3c9bb..4e5c9e031 100644 --- a/wrapper/Maths/SireMaths_registrars.cpp +++ b/wrapper/Maths/SireMaths_registrars.cpp @@ -5,61 +5,61 @@ #include "Helpers/version_error_impl.h" -#include "plane.h" -#include "sphere.h" -#include "distvector.h" #include "accumulator.h" -#include "n4matrix.h" -#include "matrix.h" -#include "vectorproperty.h" -#include "nvector.h" -#include "freeenergyaverage.h" -#include "trigmatrix.h" #include "align.h" -#include "triangle.h" #include "axisset.h" -#include "histogram.h" -#include "rangenerator.h" #include "complex.h" +#include "distvector.h" +#include "freeenergyaverage.h" +#include "histogram.h" +#include "line.h" +#include "matrix.h" +#include "n4matrix.h" #include "nmatrix.h" +#include "nvector.h" +#include "plane.h" #include "quaternion.h" +#include "rangenerator.h" +#include "sphere.h" #include "torsion.h" -#include "line.h" +#include "triangle.h" +#include "trigmatrix.h" #include "vector.h" +#include "vectorproperty.h" #include "Helpers/objectregistry.hpp" void register_SireMaths_objects() { - ObjectRegistry::registerConverterFor< SireMaths::Plane >(); - ObjectRegistry::registerConverterFor< SireMaths::Sphere >(); - ObjectRegistry::registerConverterFor< SireMaths::DistVector >(); ObjectRegistry::registerConverterFor< SireMaths::NullAccumulator >(); ObjectRegistry::registerConverterFor< SireMaths::Average >(); ObjectRegistry::registerConverterFor< SireMaths::AverageAndStddev >(); ObjectRegistry::registerConverterFor< SireMaths::ExpAverage >(); ObjectRegistry::registerConverterFor< SireMaths::Median >(); ObjectRegistry::registerConverterFor< SireMaths::RecordValues >(); - ObjectRegistry::registerConverterFor< SireMaths::N4Matrix >(); - ObjectRegistry::registerConverterFor< SireMaths::Matrix >(); - ObjectRegistry::registerConverterFor< SireMaths::VectorProperty >(); - ObjectRegistry::registerConverterFor< SireMaths::VectorArrayProperty >(); - ObjectRegistry::registerConverterFor< SireMaths::NVector >(); - ObjectRegistry::registerConverterFor< SireMaths::FreeEnergyAverage >(); - ObjectRegistry::registerConverterFor< SireMaths::BennettsFreeEnergyAverage >(); - ObjectRegistry::registerConverterFor< SireMaths::TrigMatrix >(); ObjectRegistry::registerConverterFor< SireMaths::Transform >(); - ObjectRegistry::registerConverterFor< SireMaths::Triangle >(); ObjectRegistry::registerConverterFor< SireMaths::AxisSet >(); - ObjectRegistry::registerConverterFor< SireMaths::Histogram >(); - ObjectRegistry::registerConverterFor< SireMaths::RanGenerator >(); ObjectRegistry::registerConverterFor< SireMaths::Complex >(); + ObjectRegistry::registerConverterFor< SireMaths::DistVector >(); + ObjectRegistry::registerConverterFor< SireMaths::FreeEnergyAverage >(); + ObjectRegistry::registerConverterFor< SireMaths::BennettsFreeEnergyAverage >(); + ObjectRegistry::registerConverterFor< SireMaths::Histogram >(); + ObjectRegistry::registerConverterFor< SireMaths::Line >(); + ObjectRegistry::registerConverterFor< SireMaths::Matrix >(); + ObjectRegistry::registerConverterFor< SireMaths::N4Matrix >(); ObjectRegistry::registerConverterFor< SireMaths::NMatrix >(); + ObjectRegistry::registerConverterFor< SireMaths::NVector >(); + ObjectRegistry::registerConverterFor< SireMaths::Plane >(); ObjectRegistry::registerConverterFor< SireMaths::Quaternion >(); + ObjectRegistry::registerConverterFor< SireMaths::RanGenerator >(); + ObjectRegistry::registerConverterFor< SireMaths::Sphere >(); ObjectRegistry::registerConverterFor< SireMaths::Torsion >(); - ObjectRegistry::registerConverterFor< SireMaths::Line >(); + ObjectRegistry::registerConverterFor< SireMaths::Triangle >(); + ObjectRegistry::registerConverterFor< SireMaths::TrigMatrix >(); ObjectRegistry::registerConverterFor< SireMaths::Vector >(); + ObjectRegistry::registerConverterFor< SireMaths::VectorProperty >(); + ObjectRegistry::registerConverterFor< SireMaths::VectorArrayProperty >(); } diff --git a/wrapper/Maths/Sphere.pypp.cpp b/wrapper/Maths/Sphere.pypp.cpp index 0ed81accf..7e6ab0210 100644 --- a/wrapper/Maths/Sphere.pypp.cpp +++ b/wrapper/Maths/Sphere.pypp.cpp @@ -27,6 +27,8 @@ SireMaths::Sphere __copy__(const SireMaths::Sphere &other){ return SireMaths::Sp #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Sphere_class(){ { //::SireMaths::Sphere @@ -57,6 +59,7 @@ void register_Sphere_class(){ "combinedVolume" , combinedVolume_function_value , ( bp::arg("spheres") ) + , bp::release_gil_policy() , "Return the combined volume of the passed array of spheres. This calculates the volume\nanalytically using the inclusionexclusion principle only up to third order\n" ); } @@ -81,6 +84,7 @@ void register_Sphere_class(){ "contains" , contains_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return whether or not this sphere contains the point point\n(returns true even if the point is just on the surface of the sphere)" ); } @@ -93,6 +97,7 @@ void register_Sphere_class(){ "contains" , contains_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this sphere contains other" ); } @@ -105,6 +110,7 @@ void register_Sphere_class(){ "intersectionVolume" , intersectionVolume_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the volume of space formed at the intersection of this sphere with other" ); } @@ -117,6 +123,7 @@ void register_Sphere_class(){ "intersectionVolume" , intersectionVolume_function_value , ( bp::arg("other0"), bp::arg("other1") ) + , bp::release_gil_policy() , "Return the volume of intersection of this sphere with the two other spheres.\nThis returns the volume of space covered by all three spheres." ); } @@ -129,6 +136,7 @@ void register_Sphere_class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this sphere intersects with other" ); } @@ -154,6 +162,7 @@ void register_Sphere_class(){ Sphere_exposer.def( "radius" , radius_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +175,7 @@ void register_Sphere_class(){ "setCenter" , setCenter_function_value , ( bp::arg("center") ) + , bp::release_gil_policy() , "Set the position of the center of this sphere" ); } @@ -178,6 +188,7 @@ void register_Sphere_class(){ "setPosition" , setPosition_function_value , ( bp::arg("position") ) + , bp::release_gil_policy() , "Set the position of the center of this sphere" ); } @@ -190,6 +201,7 @@ void register_Sphere_class(){ "setRadius" , setRadius_function_value , ( bp::arg("radius") ) + , bp::release_gil_policy() , "Set the radius of this sphere" ); } @@ -201,6 +213,7 @@ void register_Sphere_class(){ Sphere_exposer.def( "surfaceArea" , surfaceArea_function_value + , bp::release_gil_policy() , "Return the surface area of this sphere" ); } @@ -212,6 +225,7 @@ void register_Sphere_class(){ Sphere_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -224,6 +238,7 @@ void register_Sphere_class(){ "translate" , translate_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Return a copy of this sphere translated by delta" ); } @@ -235,6 +250,7 @@ void register_Sphere_class(){ Sphere_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -246,6 +262,7 @@ void register_Sphere_class(){ Sphere_exposer.def( "volume" , volume_function_value + , bp::release_gil_policy() , "Return the volume of this sphere" ); } @@ -257,6 +274,7 @@ void register_Sphere_class(){ Sphere_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Torsion.pypp.cpp b/wrapper/Maths/Torsion.pypp.cpp index e3e095813..3c6476718 100644 --- a/wrapper/Maths/Torsion.pypp.cpp +++ b/wrapper/Maths/Torsion.pypp.cpp @@ -21,6 +21,8 @@ SireMaths::Torsion __copy__(const SireMaths::Torsion &other){ return SireMaths:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Torsion_class(){ @@ -38,6 +40,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "angle" , angle_function_value + , bp::release_gil_policy() , "Return the torsion angle of this torsion (the torsion angle 0-1-2-3\naround the 1-2 line)" ); } @@ -62,6 +65,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of points in a torsion (4)" ); } @@ -73,6 +77,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "improperAngle" , improperAngle_function_value + , bp::release_gil_policy() , "Return the improper angle of this torsion (the acute angle between the\nvector 0-1 and the plane formed by 1-2-3)" ); } @@ -84,6 +89,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "line03" , line03_function_value + , bp::release_gil_policy() , "Return the line from point 0 to point 3" ); } @@ -95,6 +101,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "line12" , line12_function_value + , bp::release_gil_policy() , "Return the line from point 1 to point 2" ); } @@ -132,6 +139,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this torsion" ); } @@ -143,6 +151,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "triangle1" , triangle1_function_value + , bp::release_gil_policy() , "Return the triangle around point 1, i.e. point0-point1-point2" ); } @@ -154,6 +163,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "triangle2" , triangle2_function_value + , bp::release_gil_policy() , "Return the triangle around point 2, i.e. point1-point2-point3" ); } @@ -165,6 +175,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +187,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "vector03" , vector03_function_value + , bp::release_gil_policy() , "Return the vector from point 0 to point 3" ); } @@ -187,6 +199,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "vector12" , vector12_function_value + , bp::release_gil_policy() , "Return the vector from point 1 to point 2" ); } @@ -198,6 +211,7 @@ void register_Torsion_class(){ Torsion_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Transform.pypp.cpp b/wrapper/Maths/Transform.pypp.cpp index 763a3e9da..7290734ec 100644 --- a/wrapper/Maths/Transform.pypp.cpp +++ b/wrapper/Maths/Transform.pypp.cpp @@ -37,6 +37,8 @@ SireMaths::Transform __copy__(const SireMaths::Transform &other){ return SireMat #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Transform_class(){ { //::SireMaths::Transform @@ -58,6 +60,7 @@ void register_Transform_class(){ "apply" , apply_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Apply this transformation to the passed point, returning the result" ); } @@ -70,6 +73,7 @@ void register_Transform_class(){ "apply" , apply_function_value , ( bp::arg("points") ) + , bp::release_gil_policy() , "Apply this transformation to all of the passed points, returning the results" ); } @@ -81,6 +85,7 @@ void register_Transform_class(){ Transform_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether this is null (has no transformation)" ); } @@ -92,6 +97,7 @@ void register_Transform_class(){ Transform_exposer.def( "isZero" , isZero_function_value + , bp::release_gil_policy() , "Return whether this is zero (has no transformation)" ); } @@ -142,6 +148,7 @@ void register_Transform_class(){ Transform_exposer.def( "rotationCenter" , rotationCenter_function_value + , bp::release_gil_policy() , "Return the center of rotation" ); } @@ -153,6 +160,7 @@ void register_Transform_class(){ Transform_exposer.def( "rotationMatrix" , rotationMatrix_function_value + , bp::release_gil_policy() , "Return the rotation matrix" ); } @@ -164,6 +172,7 @@ void register_Transform_class(){ Transform_exposer.def( "rotationQuaternion" , rotationQuaternion_function_value + , bp::release_gil_policy() , "Return the rotation matrix as a quaternion" ); } @@ -175,6 +184,7 @@ void register_Transform_class(){ Transform_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -186,6 +196,7 @@ void register_Transform_class(){ Transform_exposer.def( "translationDelta" , translationDelta_function_value + , bp::release_gil_policy() , "Return the amount by which to translate" ); } @@ -197,6 +208,7 @@ void register_Transform_class(){ Transform_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -208,6 +220,7 @@ void register_Transform_class(){ Transform_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/Triangle.pypp.cpp b/wrapper/Maths/Triangle.pypp.cpp index c81f9df6a..6d7373d0c 100644 --- a/wrapper/Maths/Triangle.pypp.cpp +++ b/wrapper/Maths/Triangle.pypp.cpp @@ -23,6 +23,8 @@ SireMaths::Triangle __copy__(const SireMaths::Triangle &other){ return SireMaths #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Triangle_class(){ @@ -41,6 +43,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "angle" , angle_function_value + , bp::release_gil_policy() , "" ); } @@ -52,6 +55,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "angle0" , angle0_function_value + , bp::release_gil_policy() , "" ); } @@ -63,6 +67,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "angle1" , angle1_function_value + , bp::release_gil_policy() , "" ); } @@ -74,6 +79,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "angle2" , angle2_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +104,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +116,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "line0" , line0_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +128,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "line1" , line1_function_value + , bp::release_gil_policy() , "" ); } @@ -131,6 +140,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "line2" , line2_function_value + , bp::release_gil_policy() , "" ); } @@ -168,6 +178,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the triangle" ); } @@ -179,6 +190,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -190,6 +202,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "vector" , vector_function_value + , bp::release_gil_policy() , "" ); } @@ -201,6 +214,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "vector0" , vector0_function_value + , bp::release_gil_policy() , "" ); } @@ -212,6 +226,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "vector1" , vector1_function_value + , bp::release_gil_policy() , "" ); } @@ -223,6 +238,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "vector2" , vector2_function_value + , bp::release_gil_policy() , "" ); } @@ -234,6 +250,7 @@ void register_Triangle_class(){ Triangle_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/TrigArray2D_Matrix_.pypp.cpp b/wrapper/Maths/TrigArray2D_Matrix_.pypp.cpp index dfeb83455..2943e19e5 100644 --- a/wrapper/Maths/TrigArray2D_Matrix_.pypp.cpp +++ b/wrapper/Maths/TrigArray2D_Matrix_.pypp.cpp @@ -41,6 +41,8 @@ SireBase::TrigArray2D __copy__(const SireBase::TrigArray2D __copy__(const SireBase::TrigArray2Dx = max(this->x(),other.x() etc.)" ); } @@ -550,6 +591,7 @@ void register_Vector_class(){ "setMin" , setMin_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Set this Vector so that it has the minimum xyz components" ); } @@ -562,6 +604,7 @@ void register_Vector_class(){ "setR" , setR_function_value , ( bp::arg("x") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -574,6 +617,7 @@ void register_Vector_class(){ "setX" , setX_function_value , ( bp::arg("x") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -586,6 +630,7 @@ void register_Vector_class(){ "setY" , setY_function_value , ( bp::arg("y") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -598,6 +643,7 @@ void register_Vector_class(){ "setZ" , setZ_function_value , ( bp::arg("z") ) + , bp::release_gil_policy() , "Set individual values of the vector" ); } @@ -609,6 +655,7 @@ void register_Vector_class(){ Vector_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a QString representation of the vector" ); } @@ -620,6 +667,7 @@ void register_Vector_class(){ Vector_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -631,6 +679,7 @@ void register_Vector_class(){ Vector_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -642,6 +691,7 @@ void register_Vector_class(){ Vector_exposer.def( "x" , x_function_value + , bp::release_gil_policy() , "" ); } @@ -653,6 +703,7 @@ void register_Vector_class(){ Vector_exposer.def( "y" , y_function_value + , bp::release_gil_policy() , "" ); } @@ -664,6 +715,7 @@ void register_Vector_class(){ Vector_exposer.def( "z" , z_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/VectorArrayProperty.pypp.cpp b/wrapper/Maths/VectorArrayProperty.pypp.cpp index 3da012859..ac42b2283 100644 --- a/wrapper/Maths/VectorArrayProperty.pypp.cpp +++ b/wrapper/Maths/VectorArrayProperty.pypp.cpp @@ -23,6 +23,8 @@ SireMaths::VectorArrayProperty __copy__(const SireMaths::VectorArrayProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_VectorArrayProperty_class(){ @@ -58,6 +60,7 @@ void register_VectorArrayProperty_class(){ VectorArrayProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/VectorProperty.pypp.cpp b/wrapper/Maths/VectorProperty.pypp.cpp index 43ff8be9a..7119fe38f 100644 --- a/wrapper/Maths/VectorProperty.pypp.cpp +++ b/wrapper/Maths/VectorProperty.pypp.cpp @@ -23,6 +23,8 @@ SireMaths::VectorProperty __copy__(const SireMaths::VectorProperty &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_VectorProperty_class(){ @@ -69,6 +71,7 @@ void register_VectorProperty_class(){ VectorProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -80,6 +83,7 @@ void register_VectorProperty_class(){ VectorProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +95,7 @@ void register_VectorProperty_class(){ VectorProperty_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return the actual value of the vector" ); } @@ -102,6 +107,7 @@ void register_VectorProperty_class(){ VectorProperty_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Maths/_Maths_free_functions.pypp.cpp b/wrapper/Maths/_Maths_free_functions.pypp.cpp index a6d9beb5e..697f0674a 100644 --- a/wrapper/Maths/_Maths_free_functions.pypp.cpp +++ b/wrapper/Maths/_Maths_free_functions.pypp.cpp @@ -464,6 +464,19 @@ void register_free_functions(){ } + { //::gamma + + /* typedef double ( *gamma_function_type )( double ); + gamma_function_type gamma_function_value( &::gamma ); + + bp::def( + "gamma" + , gamma_function_value + , ( bp::arg("arg0") ) + , "Obsolete alias for `lgamma." );*/ + + } + { //::SireMaths::getAlignment typedef ::SireMaths::Transform ( *getAlignment_function_type )( ::QVector< SireMaths::Vector > const &,::QVector< SireMaths::Vector > const &,bool ); diff --git a/wrapper/Maths/__init__.py b/wrapper/Maths/__init__.py index b0ae0ff91..a076c7265 100644 --- a/wrapper/Maths/__init__.py +++ b/wrapper/Maths/__init__.py @@ -1,23 +1,87 @@ -############################# -## -## The SireMaths library. -## -## This module provides lots of maths functions and classes, -## including geometric classes (vector, matrix and quaternion) -## and the algabraic maths engine (MathFunc and derivatives) -## - -import Sire.Qt -import Sire.Error -import Sire.Base +""" +.. currentmodule:: sire.legacy.Maths + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + Accumulator + Average + AverageAndStddev + AxisSet + BennettsFreeEnergyAverage + Complex + DistVector + ExpAverage + FreeEnergyAverage + Histogram + HistogramBin + HistogramValue + Line + Matrix + Median + MultiDouble + MultiFixed + MultiFloat + MultiInt + MultiUInt + MultiVector + N4Matrix + NMatrix + NVector + Plane + Quaternion + RanGenerator + Rational + RecordValues + Sphere + Torsion + Transform + Triangle + TrigMatrix + Vector + VectorArrayProperty + VectorProperty + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + gamma + align + boys + brute_force_linear_assignment + calculate_total_cost + getAlignment + getCentroid + getRMSD + get_lowest_total_cost + incomplete_gamma_higher + incomplete_gamma_lower + kabasch + kabaschFit + multi_boys + rotate + solve_linear_assignment + wrap + +""" + +from .. import Qt as _Qt +from .. import Error as _Error +from .. import Base as _Base # Import all of the classes and functions from the C++ library -from Sire.Maths._Maths import * +from ._Maths import * # Now define some pure Python functions and classes that are part of # this library... -wrap = Sire.Base._add_wrap_function(wrap) +wrap = _Base._add_wrap_function(wrap) # No QVector exposed (would have horrible casting bugs) MultiFloat.toArray = staticmethod( MultiFloat.toDoubleArray ) diff --git a/wrapper/Mol/AbsFromMass.pypp.cpp b/wrapper/Mol/AbsFromMass.pypp.cpp index 97f1494be..d871d55f3 100644 --- a/wrapper/Mol/AbsFromMass.pypp.cpp +++ b/wrapper/Mol/AbsFromMass.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; #include "atomselection.h" +#include "core.h" + #include "editor.hpp" #include "evaluator.h" @@ -35,6 +37,8 @@ SireMol::AbsFromMass __copy__(const SireMol::AbsFromMass &other){ return SireMol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AbsFromMass_class(){ { //::SireMol::AbsFromMass @@ -89,6 +93,7 @@ void register_AbsFromMass_class(){ AbsFromMass_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AbsFromNumber.pypp.cpp b/wrapper/Mol/AbsFromNumber.pypp.cpp index b801614a0..382dbea6d 100644 --- a/wrapper/Mol/AbsFromNumber.pypp.cpp +++ b/wrapper/Mol/AbsFromNumber.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; #include "atomselection.h" +#include "core.h" + #include "editor.hpp" #include "evaluator.h" @@ -35,6 +37,8 @@ SireMol::AbsFromNumber __copy__(const SireMol::AbsFromNumber &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AbsFromNumber_class(){ { //::SireMol::AbsFromNumber @@ -89,6 +93,7 @@ void register_AbsFromNumber_class(){ AbsFromNumber_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AmberParameters.pypp.cpp b/wrapper/Mol/AmberParameters.pypp.cpp index 830bfb3fc..e543bfa60 100644 --- a/wrapper/Mol/AmberParameters.pypp.cpp +++ b/wrapper/Mol/AmberParameters.pypp.cpp @@ -35,6 +35,8 @@ SireMol::AmberParameters __copy__(const SireMol::AmberParameters &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AmberParameters_class(){ { //::SireMol::AmberParameters @@ -52,6 +54,7 @@ void register_AmberParameters_class(){ "add" , add_function_value , ( bp::arg("bond"), bp::arg("k"), bp::arg("ro") ) + , bp::release_gil_policy() , "" ); } @@ -64,6 +67,7 @@ void register_AmberParameters_class(){ "add" , add_function_value , ( bp::arg("angle"), bp::arg("k"), bp::arg("theta0") ) + , bp::release_gil_policy() , "" ); } @@ -76,6 +80,7 @@ void register_AmberParameters_class(){ "add" , add_function_value , ( bp::arg("dihedral"), bp::arg("v"), bp::arg("periodicity"), bp::arg("phase") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +93,7 @@ void register_AmberParameters_class(){ "add" , add_function_value , ( bp::arg("improper"), bp::arg("v"), bp::arg("periodicity"), bp::arg("phase") ) + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_AmberParameters_class(){ "add14Pair" , add14Pair_function_value , ( bp::arg("pair"), bp::arg("cscl"), bp::arg("ljscl") ) + , bp::release_gil_policy() , "" ); } @@ -112,6 +119,7 @@ void register_AmberParameters_class(){ "get14PairParams" , get14PairParams_function_value , ( bp::arg("pair") ) + , bp::release_gil_policy() , "" ); } @@ -123,6 +131,7 @@ void register_AmberParameters_class(){ AmberParameters_exposer.def( "getAll14Pairs" , getAll14Pairs_function_value + , bp::release_gil_policy() , "" ); } @@ -134,6 +143,7 @@ void register_AmberParameters_class(){ AmberParameters_exposer.def( "getAllAngles" , getAllAngles_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +155,7 @@ void register_AmberParameters_class(){ AmberParameters_exposer.def( "getAllBonds" , getAllBonds_function_value + , bp::release_gil_policy() , "" ); } @@ -156,6 +167,7 @@ void register_AmberParameters_class(){ AmberParameters_exposer.def( "getAllDihedrals" , getAllDihedrals_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +179,7 @@ void register_AmberParameters_class(){ AmberParameters_exposer.def( "getAllImpropers" , getAllImpropers_function_value + , bp::release_gil_policy() , "" ); } @@ -179,6 +192,7 @@ void register_AmberParameters_class(){ "getParams" , getParams_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "" ); } @@ -191,6 +205,7 @@ void register_AmberParameters_class(){ "getParams" , getParams_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "" ); } @@ -203,6 +218,7 @@ void register_AmberParameters_class(){ "getParams" , getParams_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "" ); } @@ -215,6 +231,7 @@ void register_AmberParameters_class(){ "getParams" , getParams_function_value , ( bp::arg("improper") ) + , bp::release_gil_policy() , "" ); } @@ -239,6 +256,7 @@ void register_AmberParameters_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this flexibility is compatible with the molecule\nwhose info is in molinfo" ); } @@ -266,6 +284,7 @@ void register_AmberParameters_class(){ "remove" , remove_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "" ); } @@ -278,6 +297,7 @@ void register_AmberParameters_class(){ "remove" , remove_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "" ); } @@ -290,6 +310,7 @@ void register_AmberParameters_class(){ "remove" , remove_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "" ); } @@ -302,6 +323,7 @@ void register_AmberParameters_class(){ "remove" , remove_function_value , ( bp::arg("improper") ) + , bp::release_gil_policy() , "" ); } @@ -314,6 +336,7 @@ void register_AmberParameters_class(){ "remove14Pair" , remove14Pair_function_value , ( bp::arg("pair") ) + , bp::release_gil_policy() , "" ); } @@ -325,6 +348,7 @@ void register_AmberParameters_class(){ AmberParameters_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AngleID.pypp.cpp b/wrapper/Mol/AngleID.pypp.cpp index df11ad2d7..51371529d 100644 --- a/wrapper/Mol/AngleID.pypp.cpp +++ b/wrapper/Mol/AngleID.pypp.cpp @@ -34,6 +34,8 @@ SireMol::AngleID __copy__(const SireMol::AngleID &other){ return SireMol::AngleI #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AngleID_class(){ { //::SireMol::AngleID @@ -50,7 +52,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the first atom of the angle" ); } @@ -62,7 +64,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the second atom of the angle" ); } @@ -74,7 +76,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "atom2" , atom2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the third atom of the angle" ); } @@ -86,6 +88,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this ID" ); } @@ -97,6 +100,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether this is a null ID" ); } @@ -109,6 +113,7 @@ void register_AngleID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return the indicies of the three atoms in this angle - this returns\nthem in the order tuple(angle.atom0(),angle.atom1(),angle.atom2())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -121,6 +126,7 @@ void register_AngleID_class(){ "map" , map_function_value , ( bp::arg("mol0info"), bp::arg("mol1info"), bp::arg("mol2info") ) + , bp::release_gil_policy() , "Return the indicies of the three atoms of this angle, between the\ntwo molecules whose data is in mol0info (containing angle.atom0()),\nmol1info (containing angle.atom1()) and mol2info (containing\nangle.atom2())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -132,6 +138,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "mirror" , mirror_function_value + , bp::release_gil_policy() , "Return the mirror of this AngleID - i.e. if this is\nAngleID(atom0, atom1, atom2), this returns\nAngleID(atom2, atom1, atom0).\nThis is useful if you know that AngleID(atom0,atom1,atom2) equals\n" ); } @@ -184,6 +191,7 @@ void register_AngleID_class(){ "size" , size_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1"), bp::arg("mol2data"), bp::arg("map2") ) + , bp::release_gil_policy() , "Return the size of the angle between atom0() in the\nmolecule whose data is in mol0data, atom1() in the\nmolecule whose data is in mol1data and atom2() in\nthe molecule whose data is in mol2data, using map0\nto the find the coordinates property of mol0,\nmap1 to find the coordinates property of mol1\nand map2 to find the coordinates property of mol2\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -195,6 +203,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -231,6 +240,7 @@ void register_AngleID_class(){ "triangle" , triangle_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1"), bp::arg("mol2data"), bp::arg("map2") ) + , bp::release_gil_policy() , "Return the geometric triangle formed by the three atoms,\natom0() in the molecule whose data is in mol0data,\natom1() from mol1data and atom2() from mol2data,\nusing map0 to find the coordinates property of mol0,\nmap1 to find the coordinates property of mol1 and\nmap2 to find the coordinates property of mol2.\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -242,6 +252,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -278,6 +289,7 @@ void register_AngleID_class(){ "vector" , vector_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1"), bp::arg("mol2data"), bp::arg("map2") ) + , bp::release_gil_policy() , "Return the vector that is perpendicular to the plane\nformed by the atoms atom0() in mol0data, atom1() in\nmol1data and atom2() in mol2data, using map0 to find the\ncoordinates property of mol0, map1 to find the\ncoordinates property of mol1 and map2 to find the\ncoordinates property of mol2\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -289,6 +301,7 @@ void register_AngleID_class(){ AngleID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AnglePerturbation.pypp.cpp b/wrapper/Mol/AnglePerturbation.pypp.cpp index 48fb290b4..60e4e1255 100644 --- a/wrapper/Mol/AnglePerturbation.pypp.cpp +++ b/wrapper/Mol/AnglePerturbation.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; #include "SireUnits/units.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -34,6 +36,8 @@ SireMol::AnglePerturbation __copy__(const SireMol::AnglePerturbation &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AnglePerturbation_class(){ { //::SireMol::AnglePerturbation @@ -53,7 +57,7 @@ void register_AnglePerturbation_class(){ AnglePerturbation_exposer.def( "angle" , angle_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID that identifies that angle that will be perturbed" ); } @@ -104,6 +108,7 @@ void register_AnglePerturbation_class(){ AnglePerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -115,6 +120,7 @@ void register_AnglePerturbation_class(){ AnglePerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -127,6 +133,7 @@ void register_AnglePerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/Mol/Atom.pypp.cpp b/wrapper/Mol/Atom.pypp.cpp index c88fe0990..d8a8f1561 100644 --- a/wrapper/Mol/Atom.pypp.cpp +++ b/wrapper/Mol/Atom.pypp.cpp @@ -48,15 +48,9 @@ namespace bp = boost::python; #include "atomljs.h" -#include "atommasses.h" - -#include "atompropertylist.h" - -#include "atomenergies.h" - #include "atombeads.h" -#include "atomradicals.h" +#include "atomcharges.h" #include "SireBase/quickcopy.hpp" @@ -72,15 +66,21 @@ namespace bp = boost::python; #include "atomcoords.h" -#include "atomcharges.h" +#include "atomelements.h" + +#include "atomenergies.h" + +#include "atomforces.h" + +#include "atommasses.h" #include "atompolarisabilities.h" -#include "atomelements.h" +#include "atompropertylist.h" -#include "atomradii.h" +#include "atomradicals.h" -#include "atomforces.h" +#include "atomradii.h" #include "atomvelocities.h" @@ -99,6 +99,48 @@ const SireMM::LJParameter& get_Metadata_SireMM_AtomLJs_function2(const SireMol:: const QString &key, const QString &metakey){ return atom.metadata< SireMM::LJParameter >(key, metakey); } +const SireMol::BeadNum& get_Metadata_SireMol_AtomBeads_function1(const SireMol::Atom &atom, + const QString &metakey){ return atom.metadata< SireMol::BeadNum >(metakey); } + +const SireMol::BeadNum& get_Metadata_SireMol_AtomBeads_function2(const SireMol::Atom &atom, + const QString &key, const QString &metakey){ + return atom.metadata< SireMol::BeadNum >(key, metakey); } + +const SireUnits::Dimension::Charge& get_Metadata_SireMol_AtomCharges_function1(const SireMol::Atom &atom, + const QString &metakey){ return atom.metadata< SireUnits::Dimension::Charge >(metakey); } + +const SireUnits::Dimension::Charge& get_Metadata_SireMol_AtomCharges_function2(const SireMol::Atom &atom, + const QString &key, const QString &metakey){ + return atom.metadata< SireUnits::Dimension::Charge >(key, metakey); } + +const SireMaths::Vector& get_Metadata_SireMol_AtomCoords_function1(const SireMol::Atom &atom, + const QString &metakey){ return atom.metadata< SireMaths::Vector >(metakey); } + +const SireMaths::Vector& get_Metadata_SireMol_AtomCoords_function2(const SireMol::Atom &atom, + const QString &key, const QString &metakey){ + return atom.metadata< SireMaths::Vector >(key, metakey); } + +const SireMol::Element& get_Metadata_SireMol_AtomElements_function1(const SireMol::Atom &atom, + const QString &metakey){ return atom.metadata< SireMol::Element >(metakey); } + +const SireMol::Element& get_Metadata_SireMol_AtomElements_function2(const SireMol::Atom &atom, + const QString &key, const QString &metakey){ + return atom.metadata< SireMol::Element >(key, metakey); } + +const SireUnits::Dimension::MolarEnergy& get_Metadata_SireMol_AtomEnergies_function1(const SireMol::Atom &atom, + const QString &metakey){ return atom.metadata< SireUnits::Dimension::MolarEnergy >(metakey); } + +const SireUnits::Dimension::MolarEnergy& get_Metadata_SireMol_AtomEnergies_function2(const SireMol::Atom &atom, + const QString &key, const QString &metakey){ + return atom.metadata< SireUnits::Dimension::MolarEnergy >(key, metakey); } + +const SireMaths::Vector3D& get_Metadata_SireMol_AtomForces_function1(const SireMol::Atom &atom, + const QString &metakey){ return atom.metadata< SireMaths::Vector3D >(metakey); } + +const SireMaths::Vector3D& get_Metadata_SireMol_AtomForces_function2(const SireMol::Atom &atom, + const QString &key, const QString &metakey){ + return atom.metadata< SireMaths::Vector3D >(key, metakey); } + const SireUnits::Dimension::MolarMass& get_Metadata_SireMol_AtomMasses_function1(const SireMol::Atom &atom, const QString &metakey){ return atom.metadata< SireUnits::Dimension::MolarMass >(metakey); } @@ -106,6 +148,13 @@ const SireUnits::Dimension::MolarMass& get_Metadata_SireMol_AtomMasses_function2 const QString &key, const QString &metakey){ return atom.metadata< SireUnits::Dimension::MolarMass >(key, metakey); } +const SireUnits::Dimension::Volume& get_Metadata_SireMol_AtomPolarisabilities_function1(const SireMol::Atom &atom, + const QString &metakey){ return atom.metadata< SireUnits::Dimension::Volume >(metakey); } + +const SireUnits::Dimension::Volume& get_Metadata_SireMol_AtomPolarisabilities_function2(const SireMol::Atom &atom, + const QString &key, const QString &metakey){ + return atom.metadata< SireUnits::Dimension::Volume >(key, metakey); } + const SireBase::PropertyList& get_Metadata_SireMol_AtomPropertyList_function1(const SireMol::Atom &atom, const QString &metakey){ return atom.metadata< SireBase::PropertyList >(metakey); } @@ -134,20 +183,6 @@ const SireBase::StringArrayProperty& get_Metadata_SireMol_AtomStringArrayPropert const QString &key, const QString &metakey){ return atom.metadata< SireBase::StringArrayProperty >(key, metakey); } -const SireUnits::Dimension::MolarEnergy& get_Metadata_SireMol_AtomEnergies_function1(const SireMol::Atom &atom, - const QString &metakey){ return atom.metadata< SireUnits::Dimension::MolarEnergy >(metakey); } - -const SireUnits::Dimension::MolarEnergy& get_Metadata_SireMol_AtomEnergies_function2(const SireMol::Atom &atom, - const QString &key, const QString &metakey){ - return atom.metadata< SireUnits::Dimension::MolarEnergy >(key, metakey); } - -const SireMol::BeadNum& get_Metadata_SireMol_AtomBeads_function1(const SireMol::Atom &atom, - const QString &metakey){ return atom.metadata< SireMol::BeadNum >(metakey); } - -const SireMol::BeadNum& get_Metadata_SireMol_AtomBeads_function2(const SireMol::Atom &atom, - const QString &key, const QString &metakey){ - return atom.metadata< SireMol::BeadNum >(key, metakey); } - const SireMol::Radical& get_Metadata_SireMol_AtomRadicals_function1(const SireMol::Atom &atom, const QString &metakey){ return atom.metadata< SireMol::Radical >(metakey); } @@ -155,34 +190,6 @@ const SireMol::Radical& get_Metadata_SireMol_AtomRadicals_function2(const SireMo const QString &key, const QString &metakey){ return atom.metadata< SireMol::Radical >(key, metakey); } -const SireMaths::Vector& get_Metadata_SireMol_AtomCoords_function1(const SireMol::Atom &atom, - const QString &metakey){ return atom.metadata< SireMaths::Vector >(metakey); } - -const SireMaths::Vector& get_Metadata_SireMol_AtomCoords_function2(const SireMol::Atom &atom, - const QString &key, const QString &metakey){ - return atom.metadata< SireMaths::Vector >(key, metakey); } - -const SireUnits::Dimension::Charge& get_Metadata_SireMol_AtomCharges_function1(const SireMol::Atom &atom, - const QString &metakey){ return atom.metadata< SireUnits::Dimension::Charge >(metakey); } - -const SireUnits::Dimension::Charge& get_Metadata_SireMol_AtomCharges_function2(const SireMol::Atom &atom, - const QString &key, const QString &metakey){ - return atom.metadata< SireUnits::Dimension::Charge >(key, metakey); } - -const SireUnits::Dimension::Volume& get_Metadata_SireMol_AtomPolarisabilities_function1(const SireMol::Atom &atom, - const QString &metakey){ return atom.metadata< SireUnits::Dimension::Volume >(metakey); } - -const SireUnits::Dimension::Volume& get_Metadata_SireMol_AtomPolarisabilities_function2(const SireMol::Atom &atom, - const QString &key, const QString &metakey){ - return atom.metadata< SireUnits::Dimension::Volume >(key, metakey); } - -const SireMol::Element& get_Metadata_SireMol_AtomElements_function1(const SireMol::Atom &atom, - const QString &metakey){ return atom.metadata< SireMol::Element >(metakey); } - -const SireMol::Element& get_Metadata_SireMol_AtomElements_function2(const SireMol::Atom &atom, - const QString &key, const QString &metakey){ - return atom.metadata< SireMol::Element >(key, metakey); } - const SireUnits::Dimension::Length& get_Metadata_SireMol_AtomRadii_function1(const SireMol::Atom &atom, const QString &metakey){ return atom.metadata< SireUnits::Dimension::Length >(metakey); } @@ -190,13 +197,6 @@ const SireUnits::Dimension::Length& get_Metadata_SireMol_AtomRadii_function2(con const QString &key, const QString &metakey){ return atom.metadata< SireUnits::Dimension::Length >(key, metakey); } -const SireMaths::Vector3D& get_Metadata_SireMol_AtomForces_function1(const SireMol::Atom &atom, - const QString &metakey){ return atom.metadata< SireMaths::Vector3D >(metakey); } - -const SireMaths::Vector3D& get_Metadata_SireMol_AtomForces_function2(const SireMol::Atom &atom, - const QString &key, const QString &metakey){ - return atom.metadata< SireMaths::Vector3D >(key, metakey); } - const SireMaths::Vector3D& get_Metadata_SireMol_AtomVelocities_function1(const SireMol::Atom &atom, const QString &metakey){ return atom.metadata< SireMaths::Vector3D >(metakey); } @@ -238,6 +238,8 @@ SireMol::Atom __copy__(const SireMol::Atom &other){ return SireMol::Atom(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Atom_class(){ @@ -258,6 +260,7 @@ void register_Atom_class(){ "assertContains" , assertContains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Assert that this atom is the atom at index atomidx\nThrow: SireMol::missing_atom\n" ); } @@ -270,6 +273,7 @@ void register_Atom_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this atom has an AtomProperty piece of metadata\nat metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -282,6 +286,7 @@ void register_Atom_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that the property at key key has an AtomProperty\npiece of metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -294,6 +299,7 @@ void register_Atom_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this atom has an AtomProperty at key key\nThrow: SireBase::missing_property\n" ); } @@ -305,7 +311,7 @@ void register_Atom_class(){ Atom_exposer.def( "cgAtomIdx" , cgAtomIdx_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the CGAtomIdx of this atom" ); } @@ -317,6 +323,7 @@ void register_Atom_class(){ Atom_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() , "Return the chain this atom is in\nThrow: SireMol::missing_chain\n" ); } @@ -328,6 +335,7 @@ void register_Atom_class(){ Atom_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() , "Return the CutGroup this atom is in" ); } @@ -339,6 +347,7 @@ void register_Atom_class(){ Atom_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an editor that can be used to edit this atom" ); } @@ -350,6 +359,7 @@ void register_Atom_class(){ Atom_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an evaluator that can be used to evaluate properties\nof this atom" ); } @@ -362,6 +372,7 @@ void register_Atom_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not there is an AtomProperty at metakey metakey" ); } @@ -374,6 +385,7 @@ void register_Atom_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether the metadata at metakey metakey for the property\nat key key is an AtomProperty\nThrow: SireBase::missing_property\n" ); } @@ -386,6 +398,7 @@ void register_Atom_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not there is an AtomProperty at key key" ); } @@ -397,6 +410,7 @@ void register_Atom_class(){ Atom_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index number of this atom in the molecule" ); } @@ -408,6 +422,7 @@ void register_Atom_class(){ Atom_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Is this atom empty?" ); } @@ -419,6 +434,7 @@ void register_Atom_class(){ Atom_exposer.def( "isWithinChain" , isWithinChain_function_value + , bp::release_gil_policy() , "Return whether or not this atom is part of a chain" ); } @@ -430,6 +446,7 @@ void register_Atom_class(){ Atom_exposer.def( "isWithinResidue" , isWithinResidue_function_value + , bp::release_gil_policy() , "Return whether or not this atom is part of a residue" ); } @@ -441,6 +458,7 @@ void register_Atom_class(){ Atom_exposer.def( "isWithinSegment" , isWithinSegment_function_value + , bp::release_gil_policy() , "Return whether or not this atom is part of a segment" ); } @@ -452,6 +470,7 @@ void register_Atom_class(){ Atom_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the metakeys of all AtomProperty metadata" ); } @@ -464,6 +483,7 @@ void register_Atom_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the metakeys of all AtomProperty metadata for\nthe property at key key\nThrow: SireBase::missing_property\n" ); } @@ -475,6 +495,7 @@ void register_Atom_class(){ Atom_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "Return the molecule that contains this atom" ); } @@ -486,6 +507,7 @@ void register_Atom_class(){ Atom_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return a Mover that can be used to move this atom" ); } @@ -497,6 +519,7 @@ void register_Atom_class(){ Atom_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of the atom" ); } @@ -508,6 +531,7 @@ void register_Atom_class(){ Atom_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the number of the atom" ); } @@ -535,6 +559,7 @@ void register_Atom_class(){ "propertyAsProperty" , propertyAsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the specified property as a PropertyPtr" ); } @@ -547,6 +572,7 @@ void register_Atom_class(){ "propertyAsVariant" , propertyAsVariant_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the specified property as a QVariant" ); } @@ -558,6 +584,7 @@ void register_Atom_class(){ Atom_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys of all AtomProperty properties" ); } @@ -569,6 +596,7 @@ void register_Atom_class(){ Atom_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() , "Return the residue that this atom is in\nThrow: SireMol::missing_residue\n" ); } @@ -580,6 +608,7 @@ void register_Atom_class(){ Atom_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() , "Return the segment this atom is in\nThrow: SireMol::missing_segment\n" ); } @@ -591,6 +620,7 @@ void register_Atom_class(){ Atom_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Is this atom a view of the whole (1 atom) molecule?" ); } @@ -602,6 +632,7 @@ void register_Atom_class(){ Atom_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the selected atom" ); } @@ -613,8 +644,21 @@ void register_Atom_class(){ Atom_exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "Return a selector that can change the atom selection" ); + } + { //::SireMol::Atom::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Atom::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Atom::toSelector ); + + Atom_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Atom::toString @@ -624,6 +668,7 @@ void register_Atom_class(){ Atom_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this atom" ); } @@ -635,6 +680,7 @@ void register_Atom_class(){ Atom_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -647,6 +693,7 @@ void register_Atom_class(){ "update" , update_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Update this atom with the passed molecule data.\nThrow: SireError::incompatible_error\n" ); } @@ -654,9 +701,30 @@ void register_Atom_class(){ Atom_exposer.def( "_get_property_SireMM_AtomLJs", &SireMol::Atom::property< SireMM::LJParameter >, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMM_AtomLJs", get_Metadata_SireMM_AtomLJs_function1, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMM_AtomLJs", &get_Metadata_SireMM_AtomLJs_function2, bp::return_value_policy()); + Atom_exposer.def( "_get_property_SireMol_AtomBeads", &SireMol::Atom::property< SireMol::BeadNum >, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomBeads", get_Metadata_SireMol_AtomBeads_function1, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomBeads", &get_Metadata_SireMol_AtomBeads_function2, bp::return_value_policy()); + Atom_exposer.def( "_get_property_SireMol_AtomCharges", &SireMol::Atom::property< SireUnits::Dimension::Charge >, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomCharges", get_Metadata_SireMol_AtomCharges_function1, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomCharges", &get_Metadata_SireMol_AtomCharges_function2, bp::return_value_policy()); + Atom_exposer.def( "_get_property_SireMol_AtomCoords", &SireMol::Atom::property< SireMaths::Vector >, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomCoords", get_Metadata_SireMol_AtomCoords_function1, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomCoords", &get_Metadata_SireMol_AtomCoords_function2, bp::return_value_policy()); + Atom_exposer.def( "_get_property_SireMol_AtomElements", &SireMol::Atom::property< SireMol::Element >, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomElements", get_Metadata_SireMol_AtomElements_function1, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomElements", &get_Metadata_SireMol_AtomElements_function2, bp::return_value_policy()); + Atom_exposer.def( "_get_property_SireMol_AtomEnergies", &SireMol::Atom::property< SireUnits::Dimension::MolarEnergy >, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomEnergies", get_Metadata_SireMol_AtomEnergies_function1, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomEnergies", &get_Metadata_SireMol_AtomEnergies_function2, bp::return_value_policy()); + Atom_exposer.def( "_get_property_SireMol_AtomForces", &SireMol::Atom::property< SireMaths::Vector3D >, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomForces", get_Metadata_SireMol_AtomForces_function1, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomForces", &get_Metadata_SireMol_AtomForces_function2, bp::return_value_policy()); Atom_exposer.def( "_get_property_SireMol_AtomMasses", &SireMol::Atom::property< SireUnits::Dimension::MolarMass >, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomMasses", get_Metadata_SireMol_AtomMasses_function1, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomMasses", &get_Metadata_SireMol_AtomMasses_function2, bp::return_value_policy()); + Atom_exposer.def( "_get_property_SireMol_AtomPolarisabilities", &SireMol::Atom::property< SireUnits::Dimension::Volume >, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomPolarisabilities", get_Metadata_SireMol_AtomPolarisabilities_function1, bp::return_value_policy()); + Atom_exposer.def( "_get_metadata_SireMol_AtomPolarisabilities", &get_Metadata_SireMol_AtomPolarisabilities_function2, bp::return_value_policy()); Atom_exposer.def( "_get_property_SireMol_AtomPropertyList", &SireMol::Atom::property< SireBase::PropertyList >, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomPropertyList", get_Metadata_SireMol_AtomPropertyList_function1, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomPropertyList", &get_Metadata_SireMol_AtomPropertyList_function2, bp::return_value_policy()); @@ -669,33 +737,12 @@ void register_Atom_class(){ Atom_exposer.def( "_get_property_SireMol_AtomStringArrayProperty", &SireMol::Atom::property< SireBase::StringArrayProperty >, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomStringArrayProperty", get_Metadata_SireMol_AtomStringArrayProperty_function1, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomStringArrayProperty", &get_Metadata_SireMol_AtomStringArrayProperty_function2, bp::return_value_policy()); - Atom_exposer.def( "_get_property_SireMol_AtomEnergies", &SireMol::Atom::property< SireUnits::Dimension::MolarEnergy >, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomEnergies", get_Metadata_SireMol_AtomEnergies_function1, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomEnergies", &get_Metadata_SireMol_AtomEnergies_function2, bp::return_value_policy()); - Atom_exposer.def( "_get_property_SireMol_AtomBeads", &SireMol::Atom::property< SireMol::BeadNum >, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomBeads", get_Metadata_SireMol_AtomBeads_function1, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomBeads", &get_Metadata_SireMol_AtomBeads_function2, bp::return_value_policy()); Atom_exposer.def( "_get_property_SireMol_AtomRadicals", &SireMol::Atom::property< SireMol::Radical >, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomRadicals", get_Metadata_SireMol_AtomRadicals_function1, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomRadicals", &get_Metadata_SireMol_AtomRadicals_function2, bp::return_value_policy()); - Atom_exposer.def( "_get_property_SireMol_AtomCoords", &SireMol::Atom::property< SireMaths::Vector >, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomCoords", get_Metadata_SireMol_AtomCoords_function1, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomCoords", &get_Metadata_SireMol_AtomCoords_function2, bp::return_value_policy()); - Atom_exposer.def( "_get_property_SireMol_AtomCharges", &SireMol::Atom::property< SireUnits::Dimension::Charge >, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomCharges", get_Metadata_SireMol_AtomCharges_function1, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomCharges", &get_Metadata_SireMol_AtomCharges_function2, bp::return_value_policy()); - Atom_exposer.def( "_get_property_SireMol_AtomPolarisabilities", &SireMol::Atom::property< SireUnits::Dimension::Volume >, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomPolarisabilities", get_Metadata_SireMol_AtomPolarisabilities_function1, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomPolarisabilities", &get_Metadata_SireMol_AtomPolarisabilities_function2, bp::return_value_policy()); - Atom_exposer.def( "_get_property_SireMol_AtomElements", &SireMol::Atom::property< SireMol::Element >, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomElements", get_Metadata_SireMol_AtomElements_function1, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomElements", &get_Metadata_SireMol_AtomElements_function2, bp::return_value_policy()); Atom_exposer.def( "_get_property_SireMol_AtomRadii", &SireMol::Atom::property< SireUnits::Dimension::Length >, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomRadii", get_Metadata_SireMol_AtomRadii_function1, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomRadii", &get_Metadata_SireMol_AtomRadii_function2, bp::return_value_policy()); - Atom_exposer.def( "_get_property_SireMol_AtomForces", &SireMol::Atom::property< SireMaths::Vector3D >, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomForces", get_Metadata_SireMol_AtomForces_function1, bp::return_value_policy()); - Atom_exposer.def( "_get_metadata_SireMol_AtomForces", &get_Metadata_SireMol_AtomForces_function2, bp::return_value_policy()); Atom_exposer.def( "_get_property_SireMol_AtomVelocities", &SireMol::Atom::property< SireMaths::Vector3D >, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomVelocities", get_Metadata_SireMol_AtomVelocities_function1, bp::return_value_policy()); Atom_exposer.def( "_get_metadata_SireMol_AtomVelocities", &get_Metadata_SireMol_AtomVelocities_function2, bp::return_value_policy()); diff --git a/wrapper/Mol/AtomBeads.pypp.cpp b/wrapper/Mol/AtomBeads.pypp.cpp index e6e74f15c..8140123a2 100644 --- a/wrapper/Mol/AtomBeads.pypp.cpp +++ b/wrapper/Mol/AtomBeads.pypp.cpp @@ -22,6 +22,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty() + , bp::return_value_policy() , "" ); } @@ -116,6 +120,7 @@ void register_AtomBeads_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_AtomBeads_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -142,6 +148,7 @@ void register_AtomBeads_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -154,6 +161,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +175,7 @@ void register_AtomBeads_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +189,7 @@ void register_AtomBeads_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -193,6 +203,7 @@ void register_AtomBeads_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -220,7 +231,7 @@ void register_AtomBeads_class(){ "get" , get_function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -234,6 +245,7 @@ void register_AtomBeads_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -247,6 +259,7 @@ void register_AtomBeads_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -260,6 +273,7 @@ void register_AtomBeads_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -273,6 +287,7 @@ void register_AtomBeads_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -285,6 +300,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -298,6 +314,7 @@ void register_AtomBeads_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -311,6 +328,7 @@ void register_AtomBeads_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -323,6 +341,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -336,6 +355,7 @@ void register_AtomBeads_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -348,6 +368,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -391,7 +412,7 @@ void register_AtomBeads_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -432,6 +453,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -444,6 +466,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -456,6 +479,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -468,6 +492,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -481,6 +506,7 @@ void register_AtomBeads_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -493,6 +519,7 @@ void register_AtomBeads_class(){ AtomBeads_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomCharges.pypp.cpp b/wrapper/Mol/AtomCharges.pypp.cpp index 20f38ebc2..7fc3529d2 100644 --- a/wrapper/Mol/AtomCharges.pypp.cpp +++ b/wrapper/Mol/AtomCharges.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty > __co #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomCharges_class(){ @@ -61,6 +63,7 @@ void register_AtomCharges_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomCharges_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomCharges_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomCharges_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomCharges_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomCharges_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomCharges_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomCharges_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomCharges_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomCharges_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomCharges_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomCharges_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomCharges_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomCharges_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomCharges_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomCharges_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomCharges_class(){ AtomCharges_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomCoords.pypp.cpp b/wrapper/Mol/AtomCoords.pypp.cpp index ac361377a..72cf69e83 100644 --- a/wrapper/Mol/AtomCoords.pypp.cpp +++ b/wrapper/Mol/AtomCoords.pypp.cpp @@ -41,6 +41,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty __copy__(const SireMol::Ato #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomDoubleArrayProperty_class(){ @@ -61,6 +63,7 @@ void register_AtomDoubleArrayProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomDoubleArrayProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomDoubleArrayProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomDoubleArrayProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomDoubleArrayProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomDoubleArrayProperty_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomDoubleArrayProperty_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomDoubleArrayProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomDoubleArrayProperty_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomDoubleArrayProperty_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomDoubleArrayProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomDoubleArrayProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomDoubleArrayProperty_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomDoubleArrayProperty_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomDoubleArrayProperty_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomDoubleArrayProperty_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomDoubleArrayProperty_class(){ AtomDoubleArrayProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomEditor.pypp.cpp b/wrapper/Mol/AtomEditor.pypp.cpp index 47b860bb4..6ddc5211d 100644 --- a/wrapper/Mol/AtomEditor.pypp.cpp +++ b/wrapper/Mol/AtomEditor.pypp.cpp @@ -55,6 +55,8 @@ SireMol::AtomEditor __copy__(const SireMol::AtomEditor &other){ return SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomEditor_class(){ @@ -100,6 +102,7 @@ void register_AtomEditor_class(){ "reindex" , reindex_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Reindex this atom so that it lies at index newidx. Note\nthat if newidx is greater than the number of atoms, then\nthis will move this atom to be the last in the list" ); } @@ -111,6 +114,7 @@ void register_AtomEditor_class(){ AtomEditor_exposer.def( "remove" , remove_function_value + , bp::release_gil_policy() , "Remove this atom from the molecule, returning an editor\nthat can further edit the structure of the molecule" ); } @@ -149,6 +153,7 @@ void register_AtomEditor_class(){ "reparent" , reparent_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Reparent this atom so that it will be placed into the CutGroup\nwith index cgidx - this returns the updated atom in\nan AtomStructureEditor, which is optimised for further\nediting of the molecule structure\nThrow: SireError::invalid_index\n" ); } @@ -161,6 +166,7 @@ void register_AtomEditor_class(){ "reparent" , reparent_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Reparent this atom so that it will be placed into the CutGroup\nwith ID cgid - this returns the updated atom in\nan AtomStructureEditor, which is optimised for further\nediting of the molecule structure\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -173,6 +179,7 @@ void register_AtomEditor_class(){ "reparent" , reparent_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Reparent this atom so that it will be placed into the residue\nwith index residx - this returns the updated atom in\nan AtomStructureEditor, which is optimised for further\nediting of the molecule structure\nThrow: SireError::invalid_index\n" ); } @@ -185,6 +192,7 @@ void register_AtomEditor_class(){ "reparent" , reparent_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Reparent this atom so that it will be placed into the residue\nwith ID resid - this returns the updated atom in\nan AtomStructureEditor, which is optimised for further\nediting of the molecule structure\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -197,6 +205,7 @@ void register_AtomEditor_class(){ "reparent" , reparent_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Reparent this atom so that it will be placed into the segment\nwith index segidx - this returns the updated atom in\nan AtomStructureEditor, which is optimised for further\nediting of the molecule structure\nThrow: SireError::invalid_index\n" ); } @@ -209,6 +218,7 @@ void register_AtomEditor_class(){ "reparent" , reparent_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Reparent this atom so that it will be placed into the segment\nwith ID segid - this returns the updated atom in\nan AtomStructureEditor, which is optimised for further\nediting of the molecule structure\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -220,6 +230,7 @@ void register_AtomEditor_class(){ AtomEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -231,6 +242,7 @@ void register_AtomEditor_class(){ AtomEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -242,6 +254,7 @@ void register_AtomEditor_class(){ AtomEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomEditorBase.pypp.cpp b/wrapper/Mol/AtomEditorBase.pypp.cpp index a8da03631..872d1f979 100644 --- a/wrapper/Mol/AtomEditorBase.pypp.cpp +++ b/wrapper/Mol/AtomEditorBase.pypp.cpp @@ -51,15 +51,9 @@ namespace bp = boost::python; #include "atomljs.h" -#include "atommasses.h" - -#include "atompropertylist.h" - -#include "atomenergies.h" - #include "atombeads.h" -#include "atomradicals.h" +#include "atomcharges.h" #include "SireBase/quickcopy.hpp" @@ -75,15 +69,21 @@ namespace bp = boost::python; #include "atomcoords.h" -#include "atomcharges.h" +#include "atomelements.h" + +#include "atomenergies.h" + +#include "atomforces.h" + +#include "atommasses.h" #include "atompolarisabilities.h" -#include "atomelements.h" +#include "atompropertylist.h" -#include "atomradii.h" +#include "atomradicals.h" -#include "atomforces.h" +#include "atomradii.h" #include "atomvelocities.h" @@ -105,6 +105,66 @@ SireMol::AtomEditorBase& set_Metadata_SireMM_AtomLJs_function2( const QString &key, const QString &metakey, const SireMM::LJParameter &p) { return molview.setMetadata< SireMM::LJParameter >(key, metakey, p); } +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomBeads_function1( + SireMol::AtomEditorBase &molview, + const QString &metakey, const SireMol::BeadNum &p) + { return molview.setMetadata< SireMol::BeadNum >(metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomBeads_function2( + SireMol::AtomEditorBase &molview, + const QString &key, const QString &metakey, const SireMol::BeadNum &p) + { return molview.setMetadata< SireMol::BeadNum >(key, metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCharges_function1( + SireMol::AtomEditorBase &molview, + const QString &metakey, const SireUnits::Dimension::Charge &p) + { return molview.setMetadata< SireUnits::Dimension::Charge >(metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCharges_function2( + SireMol::AtomEditorBase &molview, + const QString &key, const QString &metakey, const SireUnits::Dimension::Charge &p) + { return molview.setMetadata< SireUnits::Dimension::Charge >(key, metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCoords_function1( + SireMol::AtomEditorBase &molview, + const QString &metakey, const SireMaths::Vector &p) + { return molview.setMetadata< SireMaths::Vector >(metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCoords_function2( + SireMol::AtomEditorBase &molview, + const QString &key, const QString &metakey, const SireMaths::Vector &p) + { return molview.setMetadata< SireMaths::Vector >(key, metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomElements_function1( + SireMol::AtomEditorBase &molview, + const QString &metakey, const SireMol::Element &p) + { return molview.setMetadata< SireMol::Element >(metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomElements_function2( + SireMol::AtomEditorBase &molview, + const QString &key, const QString &metakey, const SireMol::Element &p) + { return molview.setMetadata< SireMol::Element >(key, metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomEnergies_function1( + SireMol::AtomEditorBase &molview, + const QString &metakey, const SireUnits::Dimension::MolarEnergy &p) + { return molview.setMetadata< SireUnits::Dimension::MolarEnergy >(metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomEnergies_function2( + SireMol::AtomEditorBase &molview, + const QString &key, const QString &metakey, const SireUnits::Dimension::MolarEnergy &p) + { return molview.setMetadata< SireUnits::Dimension::MolarEnergy >(key, metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomForces_function1( + SireMol::AtomEditorBase &molview, + const QString &metakey, const SireMaths::Vector3D &p) + { return molview.setMetadata< SireMaths::Vector3D >(metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomForces_function2( + SireMol::AtomEditorBase &molview, + const QString &key, const QString &metakey, const SireMaths::Vector3D &p) + { return molview.setMetadata< SireMaths::Vector3D >(key, metakey, p); } + SireMol::AtomEditorBase& set_Metadata_SireMol_AtomMasses_function1( SireMol::AtomEditorBase &molview, const QString &metakey, const SireUnits::Dimension::MolarMass &p) @@ -115,6 +175,16 @@ SireMol::AtomEditorBase& set_Metadata_SireMol_AtomMasses_function2( const QString &key, const QString &metakey, const SireUnits::Dimension::MolarMass &p) { return molview.setMetadata< SireUnits::Dimension::MolarMass >(key, metakey, p); } +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomPolarisabilities_function1( + SireMol::AtomEditorBase &molview, + const QString &metakey, const SireUnits::Dimension::Volume &p) + { return molview.setMetadata< SireUnits::Dimension::Volume >(metakey, p); } + +SireMol::AtomEditorBase& set_Metadata_SireMol_AtomPolarisabilities_function2( + SireMol::AtomEditorBase &molview, + const QString &key, const QString &metakey, const SireUnits::Dimension::Volume &p) + { return molview.setMetadata< SireUnits::Dimension::Volume >(key, metakey, p); } + SireMol::AtomEditorBase& set_Metadata_SireMol_AtomPropertyList_function1( SireMol::AtomEditorBase &molview, const QString &metakey, const SireBase::PropertyList &p) @@ -155,26 +225,6 @@ SireMol::AtomEditorBase& set_Metadata_SireMol_AtomStringArrayProperty_function2( const QString &key, const QString &metakey, const SireBase::StringArrayProperty &p) { return molview.setMetadata< SireBase::StringArrayProperty >(key, metakey, p); } -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomEnergies_function1( - SireMol::AtomEditorBase &molview, - const QString &metakey, const SireUnits::Dimension::MolarEnergy &p) - { return molview.setMetadata< SireUnits::Dimension::MolarEnergy >(metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomEnergies_function2( - SireMol::AtomEditorBase &molview, - const QString &key, const QString &metakey, const SireUnits::Dimension::MolarEnergy &p) - { return molview.setMetadata< SireUnits::Dimension::MolarEnergy >(key, metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomBeads_function1( - SireMol::AtomEditorBase &molview, - const QString &metakey, const SireMol::BeadNum &p) - { return molview.setMetadata< SireMol::BeadNum >(metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomBeads_function2( - SireMol::AtomEditorBase &molview, - const QString &key, const QString &metakey, const SireMol::BeadNum &p) - { return molview.setMetadata< SireMol::BeadNum >(key, metakey, p); } - SireMol::AtomEditorBase& set_Metadata_SireMol_AtomRadicals_function1( SireMol::AtomEditorBase &molview, const QString &metakey, const SireMol::Radical &p) @@ -185,46 +235,6 @@ SireMol::AtomEditorBase& set_Metadata_SireMol_AtomRadicals_function2( const QString &key, const QString &metakey, const SireMol::Radical &p) { return molview.setMetadata< SireMol::Radical >(key, metakey, p); } -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCoords_function1( - SireMol::AtomEditorBase &molview, - const QString &metakey, const SireMaths::Vector &p) - { return molview.setMetadata< SireMaths::Vector >(metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCoords_function2( - SireMol::AtomEditorBase &molview, - const QString &key, const QString &metakey, const SireMaths::Vector &p) - { return molview.setMetadata< SireMaths::Vector >(key, metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCharges_function1( - SireMol::AtomEditorBase &molview, - const QString &metakey, const SireUnits::Dimension::Charge &p) - { return molview.setMetadata< SireUnits::Dimension::Charge >(metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomCharges_function2( - SireMol::AtomEditorBase &molview, - const QString &key, const QString &metakey, const SireUnits::Dimension::Charge &p) - { return molview.setMetadata< SireUnits::Dimension::Charge >(key, metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomPolarisabilities_function1( - SireMol::AtomEditorBase &molview, - const QString &metakey, const SireUnits::Dimension::Volume &p) - { return molview.setMetadata< SireUnits::Dimension::Volume >(metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomPolarisabilities_function2( - SireMol::AtomEditorBase &molview, - const QString &key, const QString &metakey, const SireUnits::Dimension::Volume &p) - { return molview.setMetadata< SireUnits::Dimension::Volume >(key, metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomElements_function1( - SireMol::AtomEditorBase &molview, - const QString &metakey, const SireMol::Element &p) - { return molview.setMetadata< SireMol::Element >(metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomElements_function2( - SireMol::AtomEditorBase &molview, - const QString &key, const QString &metakey, const SireMol::Element &p) - { return molview.setMetadata< SireMol::Element >(key, metakey, p); } - SireMol::AtomEditorBase& set_Metadata_SireMol_AtomRadii_function1( SireMol::AtomEditorBase &molview, const QString &metakey, const SireUnits::Dimension::Length &p) @@ -235,16 +245,6 @@ SireMol::AtomEditorBase& set_Metadata_SireMol_AtomRadii_function2( const QString &key, const QString &metakey, const SireUnits::Dimension::Length &p) { return molview.setMetadata< SireUnits::Dimension::Length >(key, metakey, p); } -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomForces_function1( - SireMol::AtomEditorBase &molview, - const QString &metakey, const SireMaths::Vector3D &p) - { return molview.setMetadata< SireMaths::Vector3D >(metakey, p); } - -SireMol::AtomEditorBase& set_Metadata_SireMol_AtomForces_function2( - SireMol::AtomEditorBase &molview, - const QString &key, const QString &metakey, const SireMaths::Vector3D &p) - { return molview.setMetadata< SireMaths::Vector3D >(key, metakey, p); } - SireMol::AtomEditorBase& set_Metadata_SireMol_AtomVelocities_function1( SireMol::AtomEditorBase &molview, const QString &metakey, const SireMaths::Vector3D &p) @@ -297,6 +297,8 @@ SireMol::AtomEditorBase& set_Metadata_SireMol_AtomVariantProperty_function2( #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomEditorBase_class(){ @@ -314,6 +316,33 @@ void register_AtomEditorBase_class(){ AtomEditorBase_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::atom + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*atom_function_type)( int,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::atom ); + + AtomEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::atom + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::atom ); + + AtomEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -339,6 +368,33 @@ void register_AtomEditorBase_class(){ AtomEditorBase_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::chain + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*chain_function_type)( int,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::chain ); + + AtomEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::chain + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::chain ); + + AtomEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -364,6 +420,33 @@ void register_AtomEditorBase_class(){ AtomEditorBase_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::cutGroup + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::cutGroup ); + + AtomEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::cutGroup + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::cutGroup ); + + AtomEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -389,6 +472,7 @@ void register_AtomEditorBase_class(){ AtomEditorBase_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "" ); } @@ -419,6 +503,110 @@ void register_AtomEditorBase_class(){ , bp::return_self< >() , "" ); + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( int ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( ::QString const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( ::SireMol::AtomID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( ::SireMol::ResID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( ::SireMol::CGID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( ::SireMol::ChainID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( ::SireMol::SegID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("segid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*__getitem___function_type)( ::SireID::Index const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::operator[] ); + + AtomEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::removeMetadata @@ -471,6 +659,33 @@ void register_AtomEditorBase_class(){ AtomEditorBase_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::residue + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*residue_function_type)( int,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::residue ); + + AtomEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::residue + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::residue ); + + AtomEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -496,6 +711,33 @@ void register_AtomEditorBase_class(){ AtomEditorBase_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::segment + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*segment_function_type)( int,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::segment ); + + AtomEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::segment + + typedef SireMol::Editor< SireMol::AtomEditor, SireMol::Atom > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::AtomEditor, SireMol::Atom >::segment ); + + AtomEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -581,10 +823,38 @@ void register_AtomEditorBase_class(){ &SireMol::AtomEditorBase::setProperty< SireMM::LJParameter >, bp::return_self< >() ); AtomEditorBase_exposer.def( "_set_metadata_SireMM_LJParameter", &set_Metadata_SireMM_AtomLJs_function1, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_metadata_SireMM_LJParameter", &set_Metadata_SireMM_AtomLJs_function2, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_property_SireMol_BeadNum", + &SireMol::AtomEditorBase::setProperty< SireMol::BeadNum >, bp::return_self< >() ); + AtomEditorBase_exposer.def( "_set_metadata_SireMol_BeadNum", &set_Metadata_SireMol_AtomBeads_function1, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_metadata_SireMol_BeadNum", &set_Metadata_SireMol_AtomBeads_function2, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_Charge", + &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::Charge >, bp::return_self< >() ); + AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Charge", &set_Metadata_SireMol_AtomCharges_function1, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Charge", &set_Metadata_SireMol_AtomCharges_function2, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_property_SireMaths_Vector", + &SireMol::AtomEditorBase::setProperty< SireMaths::Vector >, bp::return_self< >() ); + AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector", &set_Metadata_SireMol_AtomCoords_function1, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector", &set_Metadata_SireMol_AtomCoords_function2, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_property_SireMol_Element", + &SireMol::AtomEditorBase::setProperty< SireMol::Element >, bp::return_self< >() ); + AtomEditorBase_exposer.def( "_set_metadata_SireMol_Element", &set_Metadata_SireMol_AtomElements_function1, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_metadata_SireMol_Element", &set_Metadata_SireMol_AtomElements_function2, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_MolarEnergy", + &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::MolarEnergy >, bp::return_self< >() ); + AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_MolarEnergy", &set_Metadata_SireMol_AtomEnergies_function1, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_MolarEnergy", &set_Metadata_SireMol_AtomEnergies_function2, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_property_SireMaths_Vector3D_SireUnits_Dimension_Force_", + &SireMol::AtomEditorBase::setProperty< SireMaths::Vector3D >, bp::return_self< >() ); + AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector3D_SireUnits_Dimension_Force_", &set_Metadata_SireMol_AtomForces_function1, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector3D_SireUnits_Dimension_Force_", &set_Metadata_SireMol_AtomForces_function2, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_MolarMass", &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::MolarMass >, bp::return_self< >() ); AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_MolarMass", &set_Metadata_SireMol_AtomMasses_function1, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_MolarMass", &set_Metadata_SireMol_AtomMasses_function2, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_Volume", + &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::Volume >, bp::return_self< >() ); + AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Volume", &set_Metadata_SireMol_AtomPolarisabilities_function1, bp::return_self< >()); + AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Volume", &set_Metadata_SireMol_AtomPolarisabilities_function2, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_property_SireBase_PropertyList", &SireMol::AtomEditorBase::setProperty< SireBase::PropertyList >, bp::return_self< >() ); AtomEditorBase_exposer.def( "_set_metadata_SireBase_PropertyList", &set_Metadata_SireMol_AtomPropertyList_function1, bp::return_self< >()); @@ -601,42 +871,14 @@ void register_AtomEditorBase_class(){ &SireMol::AtomEditorBase::setProperty< SireBase::StringArrayProperty >, bp::return_self< >() ); AtomEditorBase_exposer.def( "_set_metadata_SireBase_StringArrayProperty", &set_Metadata_SireMol_AtomStringArrayProperty_function1, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_metadata_SireBase_StringArrayProperty", &set_Metadata_SireMol_AtomStringArrayProperty_function2, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_MolarEnergy", - &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::MolarEnergy >, bp::return_self< >() ); - AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_MolarEnergy", &set_Metadata_SireMol_AtomEnergies_function1, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_MolarEnergy", &set_Metadata_SireMol_AtomEnergies_function2, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_property_SireMol_BeadNum", - &SireMol::AtomEditorBase::setProperty< SireMol::BeadNum >, bp::return_self< >() ); - AtomEditorBase_exposer.def( "_set_metadata_SireMol_BeadNum", &set_Metadata_SireMol_AtomBeads_function1, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_metadata_SireMol_BeadNum", &set_Metadata_SireMol_AtomBeads_function2, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_property_SireMol_Radical", &SireMol::AtomEditorBase::setProperty< SireMol::Radical >, bp::return_self< >() ); AtomEditorBase_exposer.def( "_set_metadata_SireMol_Radical", &set_Metadata_SireMol_AtomRadicals_function1, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_metadata_SireMol_Radical", &set_Metadata_SireMol_AtomRadicals_function2, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_property_SireMaths_Vector", - &SireMol::AtomEditorBase::setProperty< SireMaths::Vector >, bp::return_self< >() ); - AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector", &set_Metadata_SireMol_AtomCoords_function1, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector", &set_Metadata_SireMol_AtomCoords_function2, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_Charge", - &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::Charge >, bp::return_self< >() ); - AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Charge", &set_Metadata_SireMol_AtomCharges_function1, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Charge", &set_Metadata_SireMol_AtomCharges_function2, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_Volume", - &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::Volume >, bp::return_self< >() ); - AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Volume", &set_Metadata_SireMol_AtomPolarisabilities_function1, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Volume", &set_Metadata_SireMol_AtomPolarisabilities_function2, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_property_SireMol_Element", - &SireMol::AtomEditorBase::setProperty< SireMol::Element >, bp::return_self< >() ); - AtomEditorBase_exposer.def( "_set_metadata_SireMol_Element", &set_Metadata_SireMol_AtomElements_function1, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_metadata_SireMol_Element", &set_Metadata_SireMol_AtomElements_function2, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_property_SireUnits_Dimension_Length", &SireMol::AtomEditorBase::setProperty< SireUnits::Dimension::Length >, bp::return_self< >() ); AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Length", &set_Metadata_SireMol_AtomRadii_function1, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_metadata_SireUnits_Dimension_Length", &set_Metadata_SireMol_AtomRadii_function2, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_property_SireMaths_Vector3D_SireUnits_Dimension_Force_", - &SireMol::AtomEditorBase::setProperty< SireMaths::Vector3D >, bp::return_self< >() ); - AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector3D_SireUnits_Dimension_Force_", &set_Metadata_SireMol_AtomForces_function1, bp::return_self< >()); - AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector3D_SireUnits_Dimension_Force_", &set_Metadata_SireMol_AtomForces_function2, bp::return_self< >()); AtomEditorBase_exposer.def( "_set_property_SireMaths_Vector3D_SireUnits_Dimension_Velocity_", &SireMol::AtomEditorBase::setProperty< SireMaths::Vector3D >, bp::return_self< >() ); AtomEditorBase_exposer.def( "_set_metadata_SireMaths_Vector3D_SireUnits_Dimension_Velocity_", &set_Metadata_SireMol_AtomVelocities_function1, bp::return_self< >()); diff --git a/wrapper/Mol/AtomElements.pypp.cpp b/wrapper/Mol/AtomElements.pypp.cpp index 5e5a027ca..f8ced4114 100644 --- a/wrapper/Mol/AtomElements.pypp.cpp +++ b/wrapper/Mol/AtomElements.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty > __ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomEnergies_class(){ @@ -61,6 +63,7 @@ void register_AtomEnergies_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomEnergies_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomEnergies_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomEnergies_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomEnergies_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomEnergies_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomEnergies_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomEnergies_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomEnergies_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomEnergies_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomEnergies_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomEnergies_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomEnergies_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomEnergies_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomEnergies_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomEnergies_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomEnergies_class(){ AtomEnergies_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomFloatProperty.pypp.cpp b/wrapper/Mol/AtomFloatProperty.pypp.cpp index e21e44532..e0c6a0dd0 100644 --- a/wrapper/Mol/AtomFloatProperty.pypp.cpp +++ b/wrapper/Mol/AtomFloatProperty.pypp.cpp @@ -45,6 +45,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomFloatProperty_class(){ @@ -85,6 +87,7 @@ void register_AtomFloatProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -98,6 +101,7 @@ void register_AtomFloatProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +143,7 @@ void register_AtomFloatProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +157,7 @@ void register_AtomFloatProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +171,7 @@ void register_AtomFloatProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -177,6 +184,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -190,6 +198,7 @@ void register_AtomFloatProperty_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -203,6 +212,7 @@ void register_AtomFloatProperty_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -216,6 +226,7 @@ void register_AtomFloatProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -257,6 +268,7 @@ void register_AtomFloatProperty_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -270,6 +282,7 @@ void register_AtomFloatProperty_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -283,6 +296,7 @@ void register_AtomFloatProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -296,6 +310,7 @@ void register_AtomFloatProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +323,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -321,6 +337,7 @@ void register_AtomFloatProperty_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -334,6 +351,7 @@ void register_AtomFloatProperty_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -346,6 +364,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -359,6 +378,7 @@ void register_AtomFloatProperty_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -371,6 +391,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +476,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +489,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -479,6 +502,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -491,6 +515,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -504,6 +529,7 @@ void register_AtomFloatProperty_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -516,6 +542,7 @@ void register_AtomFloatProperty_class(){ AtomFloatProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomForces.pypp.cpp b/wrapper/Mol/AtomForces.pypp.cpp index 60b4cd3b1..7c84ecbe2 100644 --- a/wrapper/Mol/AtomForces.pypp.cpp +++ b/wrapper/Mol/AtomForces.pypp.cpp @@ -22,6 +22,8 @@ SireMol::AtomProperty > __copy_ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomForces_class(){ @@ -62,6 +64,7 @@ void register_AtomForces_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -75,6 +78,7 @@ void register_AtomForces_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -102,7 +106,7 @@ void register_AtomForces_class(){ "at" , at_function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -116,6 +120,7 @@ void register_AtomForces_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_AtomForces_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -142,6 +148,7 @@ void register_AtomForces_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -154,6 +161,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +175,7 @@ void register_AtomForces_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +189,7 @@ void register_AtomForces_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -193,6 +203,7 @@ void register_AtomForces_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -220,7 +231,7 @@ void register_AtomForces_class(){ "get" , get_function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -234,6 +245,7 @@ void register_AtomForces_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -247,6 +259,7 @@ void register_AtomForces_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -260,6 +273,7 @@ void register_AtomForces_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -273,6 +287,7 @@ void register_AtomForces_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -285,6 +300,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -298,6 +314,7 @@ void register_AtomForces_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -311,6 +328,7 @@ void register_AtomForces_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -323,6 +341,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -336,6 +355,7 @@ void register_AtomForces_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -348,6 +368,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -391,7 +412,7 @@ void register_AtomForces_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -432,6 +453,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -444,6 +466,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -456,6 +479,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -468,6 +492,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -481,6 +506,7 @@ void register_AtomForces_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -493,6 +519,7 @@ void register_AtomForces_class(){ AtomForces_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomID.pypp.cpp b/wrapper/Mol/AtomID.pypp.cpp index 620c189ed..3cb6330fc 100644 --- a/wrapper/Mol/AtomID.pypp.cpp +++ b/wrapper/Mol/AtomID.pypp.cpp @@ -55,6 +55,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomID_class(){ { //::SireMol::AtomID @@ -69,6 +71,7 @@ void register_AtomID_class(){ AtomID_exposer.def( "any" , any_function_value + , bp::release_gil_policy() , "Return an AtomID that matches everything" ); } @@ -80,6 +83,7 @@ void register_AtomID_class(){ AtomID_exposer.def( "chains" , chains_function_value + , bp::release_gil_policy() , "Return a Chain ID that matches chains that contain atoms\nthat match this Atom ID" ); } @@ -91,8 +95,22 @@ void register_AtomID_class(){ AtomID_exposer.def( "cutGroups" , cutGroups_function_value + , bp::release_gil_policy() , "Return a CutGroup ID that matches CutGroups that contain atoms\nthat match this Atom ID" ); + } + { //::SireMol::AtomID::fromString + + typedef ::SireMol::AtomIdentifier ( *fromString_function_type )( ::QString const & ); + fromString_function_type fromString_function_value( &::SireMol::AtomID::fromString ); + + AtomID_exposer.def( + "fromString" + , fromString_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return an AtomID constructed from the passed string" ); + } { //::SireMol::AtomID::inverse @@ -102,6 +120,7 @@ void register_AtomID_class(){ AtomID_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Syntactic sugar for AtomID::invert()" ); } @@ -113,6 +132,7 @@ void register_AtomID_class(){ AtomID_exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "Return the invert (not) of this match" ); } @@ -125,6 +145,7 @@ void register_AtomID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID back to the indicies of the matching atoms in the molecule,\nusing the passed MoleculeInfo to do the mapping" ); } @@ -251,6 +272,7 @@ void register_AtomID_class(){ AtomID_exposer.def( "residues" , residues_function_value + , bp::release_gil_policy() , "Return a Residue ID that matches residues that contain atoms\nthat match this Atom ID" ); } @@ -262,6 +284,7 @@ void register_AtomID_class(){ AtomID_exposer.def( "segments" , segments_function_value + , bp::release_gil_policy() , "Return a Segment ID that matches segments that contain atoms\nthat match this Atom ID" ); } @@ -369,10 +392,12 @@ void register_AtomID_class(){ AtomID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } AtomID_exposer.staticmethod( "any" ); + AtomID_exposer.staticmethod( "fromString" ); AtomID_exposer.staticmethod( "typeName" ); AtomID_exposer.def( "__str__", &__str__< ::SireMol::AtomID > ); AtomID_exposer.def( "__repr__", &__str__< ::SireMol::AtomID > ); diff --git a/wrapper/Mol/AtomIDMatcher.pypp.cpp b/wrapper/Mol/AtomIDMatcher.pypp.cpp index f2c914ed5..a60eb5c08 100644 --- a/wrapper/Mol/AtomIDMatcher.pypp.cpp +++ b/wrapper/Mol/AtomIDMatcher.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -49,6 +51,8 @@ SireMol::AtomIDMatcher __copy__(const SireMol::AtomIDMatcher &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomIDMatcher_class(){ { //::SireMol::AtomIDMatcher @@ -74,6 +78,7 @@ void register_AtomIDMatcher_class(){ AtomIDMatcher_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this matcher is null (cannot be used for matching)" ); } @@ -100,6 +105,7 @@ void register_AtomIDMatcher_class(){ AtomIDMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +117,7 @@ void register_AtomIDMatcher_class(){ AtomIDMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_AtomIDMatcher_class(){ AtomIDMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomIdx.pypp.cpp b/wrapper/Mol/AtomIdx.pypp.cpp index 4ffbbf49f..1705a28a9 100644 --- a/wrapper/Mol/AtomIdx.pypp.cpp +++ b/wrapper/Mol/AtomIdx.pypp.cpp @@ -63,6 +63,8 @@ SireMol::AtomIdx __copy__(const SireMol::AtomIdx &other){ return SireMol::AtomId #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomIdx_class(){ { //::SireMol::AtomIdx @@ -79,6 +81,7 @@ void register_AtomIdx_class(){ AtomIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +93,7 @@ void register_AtomIdx_class(){ AtomIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -102,6 +106,7 @@ void register_AtomIdx_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -113,6 +118,7 @@ void register_AtomIdx_class(){ AtomIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +143,7 @@ void register_AtomIdx_class(){ AtomIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +155,7 @@ void register_AtomIdx_class(){ AtomIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -159,6 +167,7 @@ void register_AtomIdx_class(){ AtomIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomIdxMatcher.pypp.cpp b/wrapper/Mol/AtomIdxMatcher.pypp.cpp index 6abf677a1..913077cc6 100644 --- a/wrapper/Mol/AtomIdxMatcher.pypp.cpp +++ b/wrapper/Mol/AtomIdxMatcher.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -49,6 +51,8 @@ SireMol::AtomIdxMatcher __copy__(const SireMol::AtomIdxMatcher &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomIdxMatcher_class(){ { //::SireMol::AtomIdxMatcher @@ -79,6 +83,7 @@ void register_AtomIdxMatcher_class(){ AtomIdxMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +95,7 @@ void register_AtomIdxMatcher_class(){ AtomIdxMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +107,7 @@ void register_AtomIdxMatcher_class(){ AtomIdxMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomIntProperty.pypp.cpp b/wrapper/Mol/AtomIntProperty.pypp.cpp index 6cb57487e..5e9dc668a 100644 --- a/wrapper/Mol/AtomIntProperty.pypp.cpp +++ b/wrapper/Mol/AtomIntProperty.pypp.cpp @@ -45,6 +45,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomIntProperty_class(){ @@ -85,6 +87,7 @@ void register_AtomIntProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -98,6 +101,7 @@ void register_AtomIntProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +143,7 @@ void register_AtomIntProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +157,7 @@ void register_AtomIntProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +171,7 @@ void register_AtomIntProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -177,6 +184,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -190,6 +198,7 @@ void register_AtomIntProperty_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -203,6 +212,7 @@ void register_AtomIntProperty_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -216,6 +226,7 @@ void register_AtomIntProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -257,6 +268,7 @@ void register_AtomIntProperty_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -270,6 +282,7 @@ void register_AtomIntProperty_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -283,6 +296,7 @@ void register_AtomIntProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -296,6 +310,7 @@ void register_AtomIntProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +323,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -321,6 +337,7 @@ void register_AtomIntProperty_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -334,6 +351,7 @@ void register_AtomIntProperty_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -346,6 +364,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -359,6 +378,7 @@ void register_AtomIntProperty_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -371,6 +391,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +476,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +489,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -479,6 +502,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -491,6 +515,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -504,6 +529,7 @@ void register_AtomIntProperty_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -516,6 +542,7 @@ void register_AtomIntProperty_class(){ AtomIntProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomIntegerArrayProperty.pypp.cpp b/wrapper/Mol/AtomIntegerArrayProperty.pypp.cpp index e2d416462..e4cf673de 100644 --- a/wrapper/Mol/AtomIntegerArrayProperty.pypp.cpp +++ b/wrapper/Mol/AtomIntegerArrayProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty __copy__(const SireMol::At #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomIntegerArrayProperty_class(){ @@ -61,6 +63,7 @@ void register_AtomIntegerArrayProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomIntegerArrayProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomIntegerArrayProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomIntegerArrayProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomIntegerArrayProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomIntegerArrayProperty_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomIntegerArrayProperty_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomIntegerArrayProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomIntegerArrayProperty_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomIntegerArrayProperty_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomIntegerArrayProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomIntegerArrayProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomIntegerArrayProperty_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomIntegerArrayProperty_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomIntegerArrayProperty_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomIntegerArrayProperty_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomIntegerArrayProperty_class(){ AtomIntegerArrayProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomMCSMatcher.pypp.cpp b/wrapper/Mol/AtomMCSMatcher.pypp.cpp index cda0807a5..01c6efa6a 100644 --- a/wrapper/Mol/AtomMCSMatcher.pypp.cpp +++ b/wrapper/Mol/AtomMCSMatcher.pypp.cpp @@ -38,6 +38,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -50,6 +52,8 @@ SireMol::AtomMCSMatcher __copy__(const SireMol::AtomMCSMatcher &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomMCSMatcher_class(){ { //::SireMol::AtomMCSMatcher @@ -73,6 +77,7 @@ void register_AtomMCSMatcher_class(){ AtomMCSMatcher_exposer.def( "isVerbose" , isVerbose_function_value + , bp::release_gil_policy() , "Return whether or not this will report progress to stdout." ); } @@ -84,6 +89,7 @@ void register_AtomMCSMatcher_class(){ AtomMCSMatcher_exposer.def( "matchingLightAtoms" , matchingLightAtoms_function_value + , bp::release_gil_policy() , "Return whether or not this will include light atoms (e.g. hydrogen)\nwhen searching for the maximum common substructure" ); } @@ -110,7 +116,7 @@ void register_AtomMCSMatcher_class(){ AtomMCSMatcher_exposer.def( "preMatcher" , preMatcher_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the prematcher (if any) that is used to pre-match atoms\nbefore the MCS match" ); } @@ -122,6 +128,7 @@ void register_AtomMCSMatcher_class(){ AtomMCSMatcher_exposer.def( "timeout" , timeout_function_value + , bp::release_gil_policy() , "Return the timeout before the MCS match is abandoned" ); } @@ -133,6 +140,7 @@ void register_AtomMCSMatcher_class(){ AtomMCSMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +152,7 @@ void register_AtomMCSMatcher_class(){ AtomMCSMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +164,7 @@ void register_AtomMCSMatcher_class(){ AtomMCSMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomMasses.pypp.cpp b/wrapper/Mol/AtomMasses.pypp.cpp index 32f2b9f9b..6bc36505e 100644 --- a/wrapper/Mol/AtomMasses.pypp.cpp +++ b/wrapper/Mol/AtomMasses.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty > __c #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomMasses_class(){ @@ -61,6 +63,7 @@ void register_AtomMasses_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomMasses_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomMasses_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomMasses_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomMasses_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomMasses_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomMasses_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomMasses_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomMasses_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomMasses_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomMasses_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomMasses_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomMasses_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomMasses_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomMasses_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomMasses_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomMasses_class(){ AtomMasses_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomMatchInverter.pypp.cpp b/wrapper/Mol/AtomMatchInverter.pypp.cpp index 7675e6999..03eeb46ab 100644 --- a/wrapper/Mol/AtomMatchInverter.pypp.cpp +++ b/wrapper/Mol/AtomMatchInverter.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "moleculeview.h" +#include "mover.hpp" + #include "tostring.h" #include "atommatcher.h" @@ -41,6 +43,8 @@ SireMol::AtomMatchInverter __copy__(const SireMol::AtomMatchInverter &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomMatchInverter_class(){ { //::SireMol::AtomMatchInverter @@ -57,6 +61,7 @@ void register_AtomMatchInverter_class(){ AtomMatchInverter_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_AtomMatchInverter_class(){ AtomMatchInverter_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -94,6 +100,7 @@ void register_AtomMatchInverter_class(){ AtomMatchInverter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -105,6 +112,7 @@ void register_AtomMatchInverter_class(){ AtomMatchInverter_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomMatcher.pypp.cpp b/wrapper/Mol/AtomMatcher.pypp.cpp index 00782e5fd..da3ce7167 100644 --- a/wrapper/Mol/AtomMatcher.pypp.cpp +++ b/wrapper/Mol/AtomMatcher.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "moleculeview.h" +#include "mover.hpp" + #include "tostring.h" #include "atommatcher.h" @@ -39,6 +41,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomMatcher_class(){ { //::SireMol::AtomMatcher @@ -54,6 +58,7 @@ void register_AtomMatcher_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the matcher that matches using this matcher, and then other (in that order)" ); } @@ -66,6 +71,7 @@ void register_AtomMatcher_class(){ "changesOrder" , changesOrder_function_value , ( bp::arg("molinfo0"), bp::arg("molinfo1") ) + , bp::release_gil_policy() , "Return whether or not this match changes the order of number of atoms" ); } @@ -78,6 +84,7 @@ void register_AtomMatcher_class(){ "changesOrder" , changesOrder_function_value , ( bp::arg("molview0"), bp::arg("molview1") ) + , bp::release_gil_policy() , "Return whether or not this match changes the order of number of atoms" ); } @@ -90,6 +97,7 @@ void register_AtomMatcher_class(){ "changesOrder" , changesOrder_function_value , ( bp::arg("molview0"), bp::arg("map0"), bp::arg("molview1"), bp::arg("map1") ) + , bp::release_gil_policy() , "Return whether or not this match changes the order or number of viewed atoms" ); } @@ -102,6 +110,7 @@ void register_AtomMatcher_class(){ "changesOrder" , changesOrder_function_value , ( bp::arg("molview0"), bp::arg("molview1"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -113,6 +122,7 @@ void register_AtomMatcher_class(){ AtomMatcher_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this matcher is null (cannot be used for matching)" ); } @@ -125,6 +135,7 @@ void register_AtomMatcher_class(){ "match" , match_function_value , ( bp::arg("molinfo0"), bp::arg("molinfo1") ) + , bp::release_gil_policy() , "Match atoms based only on the data in the MoleculeInfoData of the molecules." ); } @@ -137,6 +148,7 @@ void register_AtomMatcher_class(){ "match" , match_function_value , ( bp::arg("molview0"), bp::arg("map0"), bp::arg("molview1"), bp::arg("map1") ) + , bp::release_gil_policy() , "" ); } @@ -149,6 +161,7 @@ void register_AtomMatcher_class(){ "match" , match_function_value , ( bp::arg("molview0"), bp::arg("molview1") ) + , bp::release_gil_policy() , "Match atoms based only on the data in the MoleculeInfoData of the molecules." ); } @@ -161,6 +174,7 @@ void register_AtomMatcher_class(){ "match" , match_function_value , ( bp::arg("molview0"), bp::arg("molview1"), bp::arg("map") ) + , bp::release_gil_policy() , "" ); } @@ -185,6 +199,7 @@ void register_AtomMatcher_class(){ AtomMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomMultiMatcher.pypp.cpp b/wrapper/Mol/AtomMultiMatcher.pypp.cpp index 7606d5ebb..8dcf61b3f 100644 --- a/wrapper/Mol/AtomMultiMatcher.pypp.cpp +++ b/wrapper/Mol/AtomMultiMatcher.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -49,6 +51,8 @@ SireMol::AtomMultiMatcher __copy__(const SireMol::AtomMultiMatcher &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomMultiMatcher_class(){ { //::SireMol::AtomMultiMatcher @@ -66,6 +70,7 @@ void register_AtomMultiMatcher_class(){ AtomMultiMatcher_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this matcher is null (cannot be used for matching)" ); } @@ -92,6 +97,7 @@ void register_AtomMultiMatcher_class(){ AtomMultiMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +109,7 @@ void register_AtomMultiMatcher_class(){ AtomMultiMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -114,6 +121,7 @@ void register_AtomMultiMatcher_class(){ AtomMultiMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomName.pypp.cpp b/wrapper/Mol/AtomName.pypp.cpp index b5a49f95b..2acca45ae 100644 --- a/wrapper/Mol/AtomName.pypp.cpp +++ b/wrapper/Mol/AtomName.pypp.cpp @@ -63,6 +63,8 @@ SireMol::AtomName __copy__(const SireMol::AtomName &other){ return SireMol::Atom #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomName_class(){ { //::SireMol::AtomName @@ -80,6 +82,7 @@ void register_AtomName_class(){ AtomName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +94,7 @@ void register_AtomName_class(){ AtomName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +107,7 @@ void register_AtomName_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -130,6 +135,7 @@ void register_AtomName_class(){ AtomName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomName_class(){ AtomName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -152,6 +159,7 @@ void register_AtomName_class(){ AtomName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomNameMatcher.pypp.cpp b/wrapper/Mol/AtomNameMatcher.pypp.cpp index 7daada2fd..c0a6620e1 100644 --- a/wrapper/Mol/AtomNameMatcher.pypp.cpp +++ b/wrapper/Mol/AtomNameMatcher.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -49,6 +51,8 @@ SireMol::AtomNameMatcher __copy__(const SireMol::AtomNameMatcher &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomNameMatcher_class(){ { //::SireMol::AtomNameMatcher @@ -79,6 +83,7 @@ void register_AtomNameMatcher_class(){ AtomNameMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +95,7 @@ void register_AtomNameMatcher_class(){ AtomNameMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +107,7 @@ void register_AtomNameMatcher_class(){ AtomNameMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomNum.pypp.cpp b/wrapper/Mol/AtomNum.pypp.cpp index 1b2d7f18e..790bd9dcd 100644 --- a/wrapper/Mol/AtomNum.pypp.cpp +++ b/wrapper/Mol/AtomNum.pypp.cpp @@ -63,6 +63,8 @@ SireMol::AtomNum __copy__(const SireMol::AtomNum &other){ return SireMol::AtomNu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomNum_class(){ { //::SireMol::AtomNum @@ -79,6 +81,7 @@ void register_AtomNum_class(){ AtomNum_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +93,7 @@ void register_AtomNum_class(){ AtomNum_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -102,6 +106,7 @@ void register_AtomNum_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +138,7 @@ void register_AtomNum_class(){ AtomNum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +150,7 @@ void register_AtomNum_class(){ AtomNum_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_AtomNum_class(){ AtomNum_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomPolarisabilities.pypp.cpp b/wrapper/Mol/AtomPolarisabilities.pypp.cpp index c47a522de..4f8dedccb 100644 --- a/wrapper/Mol/AtomPolarisabilities.pypp.cpp +++ b/wrapper/Mol/AtomPolarisabilities.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty > __co #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomPolarisabilities_class(){ @@ -61,6 +63,7 @@ void register_AtomPolarisabilities_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomPolarisabilities_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomPolarisabilities_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomPolarisabilities_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomPolarisabilities_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomPolarisabilities_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomPolarisabilities_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomPolarisabilities_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomPolarisabilities_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomPolarisabilities_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomPolarisabilities_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomPolarisabilities_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomPolarisabilities_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomPolarisabilities_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomPolarisabilities_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomPolarisabilities_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomPolarisabilities_class(){ AtomPolarisabilities_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomProp.pypp.cpp b/wrapper/Mol/AtomProp.pypp.cpp index 805858af8..356b503d1 100644 --- a/wrapper/Mol/AtomProp.pypp.cpp +++ b/wrapper/Mol/AtomProp.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomProp_class(){ { //::SireMol::AtomProp @@ -54,6 +56,7 @@ void register_AtomProp_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -66,6 +69,7 @@ void register_AtomProp_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -78,6 +82,7 @@ void register_AtomProp_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -90,6 +95,7 @@ void register_AtomProp_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -102,6 +108,7 @@ void register_AtomProp_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -114,6 +121,7 @@ void register_AtomProp_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +134,7 @@ void register_AtomProp_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -138,6 +147,7 @@ void register_AtomProp_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -162,6 +172,7 @@ void register_AtomProp_class(){ AtomProp_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomPropertyList.pypp.cpp b/wrapper/Mol/AtomPropertyList.pypp.cpp index 253a2092f..eac42833b 100644 --- a/wrapper/Mol/AtomPropertyList.pypp.cpp +++ b/wrapper/Mol/AtomPropertyList.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProper #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomPropertyList_class(){ @@ -61,6 +63,7 @@ void register_AtomPropertyList_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomPropertyList_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomPropertyList_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomPropertyList_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomPropertyList_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomPropertyList_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomPropertyList_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomPropertyList_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomPropertyList_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomPropertyList_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomPropertyList_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomPropertyList_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomPropertyList_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomPropertyList_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomPropertyList_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomPropertyList_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomPropertyList_class(){ AtomPropertyList_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomRadicals.pypp.cpp b/wrapper/Mol/AtomRadicals.pypp.cpp index 0a6211801..19d4dc5ba 100644 --- a/wrapper/Mol/AtomRadicals.pypp.cpp +++ b/wrapper/Mol/AtomRadicals.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty > __co #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomRadii_class(){ @@ -61,6 +63,7 @@ void register_AtomRadii_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomRadii_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomRadii_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomRadii_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomRadii_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomRadii_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomRadii_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomRadii_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomRadii_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomRadii_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomRadii_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomRadii_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomRadii_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomRadii_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomRadii_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomRadii_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomRadii_class(){ AtomRadii_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomResultMatcher.pypp.cpp b/wrapper/Mol/AtomResultMatcher.pypp.cpp index fd1d41a86..9c9124c3e 100644 --- a/wrapper/Mol/AtomResultMatcher.pypp.cpp +++ b/wrapper/Mol/AtomResultMatcher.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "moleculeview.h" +#include "mover.hpp" + #include "tostring.h" #include "atommatcher.h" @@ -41,6 +43,8 @@ SireMol::AtomResultMatcher __copy__(const SireMol::AtomResultMatcher &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomResultMatcher_class(){ { //::SireMol::AtomResultMatcher @@ -57,6 +61,7 @@ void register_AtomResultMatcher_class(){ AtomResultMatcher_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_AtomResultMatcher_class(){ AtomResultMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -94,6 +100,7 @@ void register_AtomResultMatcher_class(){ AtomResultMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -105,6 +112,7 @@ void register_AtomResultMatcher_class(){ AtomResultMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomSelection.pypp.cpp b/wrapper/Mol/AtomSelection.pypp.cpp index 787b34e7f..982bd3265 100644 --- a/wrapper/Mol/AtomSelection.pypp.cpp +++ b/wrapper/Mol/AtomSelection.pypp.cpp @@ -33,6 +33,8 @@ SireMol::AtomSelection __copy__(const SireMol::AtomSelection &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomSelection_class(){ { //::SireMol::AtomSelection @@ -52,6 +54,7 @@ void register_AtomSelection_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Assert that this selection is compatible with the molecule whose\ndata is in moldata\nThrow: SireError::incompatible_error\n" ); } @@ -64,6 +67,7 @@ void register_AtomSelection_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Assert that this selection is compatible with the molecule viewed\nin molview\nThrow: SireError::incompatible_error\n" ); } @@ -76,6 +80,7 @@ void register_AtomSelection_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Assert that this selection is compatible with the molecule info\nin molinfo\nThrow: SireError::incompatible_error\n" ); } @@ -88,6 +93,7 @@ void register_AtomSelection_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that this selection is compatible with other\nThrow: SireError::incompatible_error\n" ); } @@ -100,6 +106,7 @@ void register_AtomSelection_class(){ "assertSelected" , assertSelected_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Assert that this selection contains the atom at index atomidx\nThrow: SireError::invalid_index\n" ); } @@ -112,6 +119,7 @@ void register_AtomSelection_class(){ "assertSelected" , assertSelected_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Assert that this selection contains all of the atoms identified\nby the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -124,6 +132,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether the atom at index atomidx is selected\nThrow: SireError::invalid_index\n" ); } @@ -136,6 +145,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the CutGroup at\nindex cgidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -148,6 +158,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the residue at\nindex residx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -160,6 +171,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the chain at\nindex chainidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -172,6 +184,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the segments at\nindex segidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -184,6 +197,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether all of the atoms identified by\natomid have been selected\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -196,6 +210,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the CutGroup(s) identified by\ncgid have been selected\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -208,6 +223,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the residue(s) identified by\nresid have been selected\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -220,6 +236,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the chain(s) identified by\nchainid have been selected\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -232,6 +249,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return whether all of the atoms in the segment(s) identified by\nsegid have been selected\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -244,6 +262,7 @@ void register_AtomSelection_class(){ "contains" , contains_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return whether all of the atoms selected in selection are\nselected in this set\nThrow: SireError::incompatible_error\n" ); } @@ -826,6 +845,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not this contains the atom at index atomidx\nThrow: SireError::invalid_index\n" ); } @@ -838,6 +858,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return whether or not the CutGroup at index cgidx contains\nsome atoms that have been selected\nThrow: SireError::invalid_index\n" ); } @@ -850,6 +871,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether or not the residue at index residx contains\nsome atoms that have been selected\nThrow: SireError::invalid_index\n" ); } @@ -862,6 +884,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return whether or not the chain at index chainidx contains\nsome atoms that have been selected\nThrow: SireError::invalid_index\n" ); } @@ -874,6 +897,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return whether or not the segment at index segidx contains\nsome atoms that have been selected\nThrow: SireError::invalid_index\n" ); } @@ -886,6 +910,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not any of the atoms identified\nby atomid have been selected\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -898,6 +923,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return whether or not any of the atoms in the CutGroup(s) identified\nby cgid have been selected\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -910,6 +936,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not any of the atoms in the residue(s) identified\nby resid have been selected\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -922,6 +949,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return whether or not any of the atoms in the chain(s) identified\nby chainid have been selected\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -934,6 +962,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return whether or not any of the atoms in the segment(s) identified\nby segid have been selected\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -946,6 +975,7 @@ void register_AtomSelection_class(){ "intersects" , intersects_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return whether any of the atoms selected in selection\nare also selected in this set\nThrow: SireError::incompatible_error\n" ); } @@ -960,6 +990,30 @@ void register_AtomSelection_class(){ , bp::return_self< >() , "Invert this selection" ); + } + { //::SireMol::AtomSelection::isAtom + + typedef bool ( ::SireMol::AtomSelection::*isAtom_function_type)( ) const; + isAtom_function_type isAtom_function_value( &::SireMol::AtomSelection::isAtom ); + + AtomSelection_exposer.def( + "isAtom" + , isAtom_function_value + , bp::release_gil_policy() + , "Return whether or not this selection represents a single atom" ); + + } + { //::SireMol::AtomSelection::isChain + + typedef bool ( ::SireMol::AtomSelection::*isChain_function_type)( ) const; + isChain_function_type isChain_function_value( &::SireMol::AtomSelection::isChain ); + + AtomSelection_exposer.def( + "isChain" + , isChain_function_value + , bp::release_gil_policy() + , "Return whether or not this selection represents a single Chain" ); + } { //::SireMol::AtomSelection::isCompatibleWith @@ -970,8 +1024,21 @@ void register_AtomSelection_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this selection is compatible with the molecule info\nin molinfo" ); + } + { //::SireMol::AtomSelection::isCutGroup + + typedef bool ( ::SireMol::AtomSelection::*isCutGroup_function_type)( ) const; + isCutGroup_function_type isCutGroup_function_value( &::SireMol::AtomSelection::isCutGroup ); + + AtomSelection_exposer.def( + "isCutGroup" + , isCutGroup_function_value + , bp::release_gil_policy() + , "Return whether or not this selection represents a single CutGroup" ); + } { //::SireMol::AtomSelection::isEmpty @@ -981,8 +1048,21 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return wheter no atoms are selected" ); + } + { //::SireMol::AtomSelection::isMolecule + + typedef bool ( ::SireMol::AtomSelection::*isMolecule_function_type)( ) const; + isMolecule_function_type isMolecule_function_value( &::SireMol::AtomSelection::isMolecule ); + + AtomSelection_exposer.def( + "isMolecule" + , isMolecule_function_value + , bp::release_gil_policy() + , "Return whether or not this selection represents the whole molecule" ); + } { //::SireMol::AtomSelection::isNull @@ -992,8 +1072,33 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is a null selection" ); + } + { //::SireMol::AtomSelection::isResidue + + typedef bool ( ::SireMol::AtomSelection::*isResidue_function_type)( ) const; + isResidue_function_type isResidue_function_value( &::SireMol::AtomSelection::isResidue ); + + AtomSelection_exposer.def( + "isResidue" + , isResidue_function_value + , bp::release_gil_policy() + , "Return whether or not this selection represents a single Residue" ); + + } + { //::SireMol::AtomSelection::isSegment + + typedef bool ( ::SireMol::AtomSelection::*isSegment_function_type)( ) const; + isSegment_function_type isSegment_function_value( &::SireMol::AtomSelection::isSegment ); + + AtomSelection_exposer.def( + "isSegment" + , isSegment_function_value + , bp::release_gil_policy() + , "Return whether or not this selection represents a single Segment" ); + } { //::SireMol::AtomSelection::mask @@ -1276,6 +1381,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the total number of atoms in the molecule" ); } @@ -1287,6 +1393,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "Return the total number of chains in the molecule" ); } @@ -1298,6 +1405,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "Return the total number of CutGroups in the molecule" ); } @@ -1309,6 +1417,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the total number of residues in the molecule" ); } @@ -1320,6 +1429,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "Return the total number of segments in this molecule" ); } @@ -1331,6 +1441,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nSelected" , nSelected_function_value + , bp::release_gil_policy() , "Return the number of selected atoms" ); } @@ -1343,6 +1454,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return the number of atoms selected in the CutGroup at\nindex cgidx" ); } @@ -1355,6 +1467,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether the atom at index atomidx has been selected\nThrow: SireError::invalid_index\n" ); } @@ -1367,6 +1480,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return the number of atoms from the residue at index residx\nthat have been selected\nThrow: SireError::invalid_index\n" ); } @@ -1379,6 +1493,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return the number of atoms from the chain at index chainidx\nthat have been selected\nThrow: SireError::invalid_index\n" ); } @@ -1391,6 +1506,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return the number of atoms from the segment at index segidx\nthat have been selected\nThrow: SireError::invalid_index\n" ); } @@ -1403,6 +1519,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the number of atoms from the CutGroups identified\nby cgid that have been selected\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -1415,6 +1532,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the number of atoms that are identified by\natomid that have been selected\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -1427,6 +1545,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the number of atoms from the residues identified\nby resid that have been selected\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -1439,6 +1558,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the number of atoms from the chain(s) identified\nby chainid that have been selected\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -1451,6 +1571,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the number of atoms from the segment(s)\nidentified by segid that have been selected\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -1463,6 +1584,7 @@ void register_AtomSelection_class(){ "nSelected" , nSelected_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return the number of atoms from the passed selection\nthat have also been selected in this selection\nThrow: SireError::incompatible_error\n" ); } @@ -1474,6 +1596,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nSelectedAtoms" , nSelectedAtoms_function_value + , bp::release_gil_policy() , "Return the total number of selected atoms" ); } @@ -1485,6 +1608,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nSelectedChains" , nSelectedChains_function_value + , bp::release_gil_policy() , "Return the number of chains that have at least one selected atom" ); } @@ -1496,6 +1620,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nSelectedCutGroups" , nSelectedCutGroups_function_value + , bp::release_gil_policy() , "Return the number of CutGroups that have at least\none selected atom" ); } @@ -1507,6 +1632,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nSelectedResidues" , nSelectedResidues_function_value + , bp::release_gil_policy() , "Return the number of residues that contain at\nleast one selected atom" ); } @@ -1518,6 +1644,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "nSelectedSegments" , nSelectedSegments_function_value + , bp::release_gil_policy() , "Return the number of segments that contain at\nleast one selected atom" ); } @@ -2115,6 +2242,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "Return whether or not the atom at index cgatomidx has\nbeen selected\nThrow: SireError::invalid_index\n" ); } @@ -2127,6 +2255,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether the atom at index atomidx has been selected\nThrow: SireError::invalid_index\n" ); } @@ -2139,6 +2268,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether any of the atom(s) identified by the ID atomid\nhave been selected\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -2151,6 +2281,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return whether or not any atom in the CutGroup\nat index cgidx has been selected\nThrow: SireError::invalid_index\n" ); } @@ -2163,6 +2294,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether or not any atoms in the residue\nat index residx has been selected\nThrow: SireError::invalid_index\n" ); } @@ -2175,6 +2307,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return whether or not any atoms in the chain\nat index chainidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2187,6 +2320,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return whether or not any atoms in the segment at\nindex segidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2199,6 +2333,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return whether any atoms in the CutGroup(s) identified\nby cgid have been selected\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -2211,6 +2346,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether any atoms in the residue(s) identified\nby resid have been selected\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -2223,6 +2359,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return whether any atoms in the chain(s) identified\nby chainid have been selected\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -2235,6 +2372,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return whether any atoms in the segment(s) identified\nby segid have been selected\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -2247,6 +2385,7 @@ void register_AtomSelection_class(){ "selected" , selected_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return whether or not any of the atoms selected in selection\nare also selected in this set\nThrow: SireError::incompatible_error\n" ); } @@ -2258,6 +2397,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not all of the atoms are selected" ); } @@ -2270,6 +2410,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the atom at index atomidx is selected\nThrow: SireError::invalid_index\n" ); } @@ -2282,6 +2423,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the CutGroup\nat index cgidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2294,6 +2436,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the residue\nat index residx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2306,6 +2449,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the chain\nat index chainidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2318,6 +2462,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the segment\nat index segidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2330,6 +2475,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms matching the\nID atomid have been selected\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -2342,6 +2488,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the CutGroups matching the\nID cgid have been selected\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -2354,6 +2501,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the residues matching the\nID resid have been selected\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -2366,6 +2514,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the chains matching the\nID atomid have been selected\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -2378,6 +2527,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms in the segments matching the\nID atomid have been selected\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -2390,6 +2540,7 @@ void register_AtomSelection_class(){ "selectedAll" , selectedAll_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return whether or not all of the atoms selected in selection\nhave also been selected in this object\nThrow: SireError::incompatible_error\n" ); } @@ -2401,6 +2552,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedAllAtoms" , selectedAllAtoms_function_value + , bp::release_gil_policy() , "Return whether all atoms have been selected" ); } @@ -2412,6 +2564,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedAllChains" , selectedAllChains_function_value + , bp::release_gil_policy() , "Return whether all chains contain at least\none selected atom" ); } @@ -2423,6 +2576,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedAllCutGroups" , selectedAllCutGroups_function_value + , bp::release_gil_policy() , "Return whether all CutGroups contain at least\none selected atom" ); } @@ -2434,6 +2588,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedAllResidues" , selectedAllResidues_function_value + , bp::release_gil_policy() , "Return whether all residues contain at least\none selected atom" ); } @@ -2445,6 +2600,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedAllSegments" , selectedAllSegments_function_value + , bp::release_gil_policy() , "Return whether all segments contain at least\none selected atom" ); } @@ -2456,6 +2612,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedAtoms" , selectedAtoms_function_value + , bp::release_gil_policy() , "Return the list of indicies of all of the atoms that\nhave been selected" ); } @@ -2468,6 +2625,7 @@ void register_AtomSelection_class(){ "selectedAtoms" , selectedAtoms_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the set of indicies of the atoms in the CutGroup\nat index cgidx that are selected within this CutGroup\nThrow: SireError::invalid_index\n" ); } @@ -2479,6 +2637,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedChains" , selectedChains_function_value + , bp::release_gil_policy() , "Return the list of chains that contain at least one selected atom" ); } @@ -2490,6 +2649,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedCutGroups" , selectedCutGroups_function_value + , bp::release_gil_policy() , "Return the list of indicies of CutGroups that contain at least\none selected atom" ); } @@ -2501,6 +2661,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedNone" , selectedNone_function_value + , bp::release_gil_policy() , "Return whether or not no atoms have been selected" ); } @@ -2513,6 +2674,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether the atom at index atomidx has not been selected\nThrow: SireError::invalid_index\n" ); } @@ -2525,6 +2687,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the CutGroup at\nindex cgidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2537,6 +2700,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the residue at\nindex residx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2549,6 +2713,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the chain at\nindex chainidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2561,6 +2726,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the segment at\nindex segidx have been selected\nThrow: SireError::invalid_index\n" ); } @@ -2573,6 +2739,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether none of the atoms identified by atomid\nhave been selected\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -2585,6 +2752,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the CutGroup(s)\nidentified by cgid have been selected\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -2597,6 +2765,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the residue(s)\nidentified by resid have been selected\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -2609,6 +2778,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the chain(s)\nidentified by chainid have been selected\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -2621,6 +2791,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return whether none of the atoms in the segment(s)\nidentified by segid have been selected\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -2633,6 +2804,7 @@ void register_AtomSelection_class(){ "selectedNone" , selectedNone_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return whether none of the atoms selected in selection have\nbeen selected in this set\nThrow: SireError::incompatible_error\n" ); } @@ -2644,6 +2816,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedResidues" , selectedResidues_function_value + , bp::release_gil_policy() , "Return the list of residues that contain at least one selected atom" ); } @@ -2655,6 +2828,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "selectedSegments" , selectedSegments_function_value + , bp::release_gil_policy() , "Return the list of segments that contain at least one selected atom" ); } @@ -2939,6 +3113,7 @@ void register_AtomSelection_class(){ AtomSelection_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomStringArrayProperty.pypp.cpp b/wrapper/Mol/AtomStringArrayProperty.pypp.cpp index 1f162af88..26363353d 100644 --- a/wrapper/Mol/AtomStringArrayProperty.pypp.cpp +++ b/wrapper/Mol/AtomStringArrayProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::AtomProperty __copy__(const SireMol::Ato #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomStringArrayProperty_class(){ @@ -61,6 +63,7 @@ void register_AtomStringArrayProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_AtomStringArrayProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -115,6 +119,7 @@ void register_AtomStringArrayProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +133,7 @@ void register_AtomStringArrayProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomStringArrayProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_AtomStringArrayProperty_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +188,7 @@ void register_AtomStringArrayProperty_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +202,7 @@ void register_AtomStringArrayProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -233,6 +244,7 @@ void register_AtomStringArrayProperty_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +258,7 @@ void register_AtomStringArrayProperty_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +272,7 @@ void register_AtomStringArrayProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +286,7 @@ void register_AtomStringArrayProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -284,6 +299,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +313,7 @@ void register_AtomStringArrayProperty_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +327,7 @@ void register_AtomStringArrayProperty_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -322,6 +340,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +354,7 @@ void register_AtomStringArrayProperty_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -347,6 +367,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +452,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -443,6 +465,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +478,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +491,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -480,6 +505,7 @@ void register_AtomStringArrayProperty_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -492,6 +518,7 @@ void register_AtomStringArrayProperty_class(){ AtomStringArrayProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomStringProperty.pypp.cpp b/wrapper/Mol/AtomStringProperty.pypp.cpp index 0582b8f8f..36503051c 100644 --- a/wrapper/Mol/AtomStringProperty.pypp.cpp +++ b/wrapper/Mol/AtomStringProperty.pypp.cpp @@ -45,6 +45,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomStringProperty_class(){ @@ -85,6 +87,7 @@ void register_AtomStringProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -98,6 +101,7 @@ void register_AtomStringProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +143,7 @@ void register_AtomStringProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +157,7 @@ void register_AtomStringProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +171,7 @@ void register_AtomStringProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -177,6 +184,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -190,6 +198,7 @@ void register_AtomStringProperty_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -203,6 +212,7 @@ void register_AtomStringProperty_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -216,6 +226,7 @@ void register_AtomStringProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -257,6 +268,7 @@ void register_AtomStringProperty_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -270,6 +282,7 @@ void register_AtomStringProperty_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -283,6 +296,7 @@ void register_AtomStringProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -296,6 +310,7 @@ void register_AtomStringProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +323,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -321,6 +337,7 @@ void register_AtomStringProperty_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -334,6 +351,7 @@ void register_AtomStringProperty_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -346,6 +364,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -359,6 +378,7 @@ void register_AtomStringProperty_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -371,6 +391,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +476,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +489,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -479,6 +502,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -491,6 +515,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -504,6 +529,7 @@ void register_AtomStringProperty_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -516,6 +542,7 @@ void register_AtomStringProperty_class(){ AtomStringProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomStructureEditor.pypp.cpp b/wrapper/Mol/AtomStructureEditor.pypp.cpp index 73ef0f0a6..d73e68f8c 100644 --- a/wrapper/Mol/AtomStructureEditor.pypp.cpp +++ b/wrapper/Mol/AtomStructureEditor.pypp.cpp @@ -56,6 +56,8 @@ SireMol::AtomStructureEditor __copy__(const SireMol::AtomStructureEditor &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomStructureEditor_class(){ { //::SireMol::AtomStructureEditor @@ -73,6 +75,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() , "Return the editor for the chain that contains this atom" ); } @@ -84,6 +87,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit all of the changes, returning the uneditable Atom" ); } @@ -95,6 +99,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() , "Return the editor for the CutGrop that contains this atom" ); } @@ -106,6 +111,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index number of this atom in the molecule" ); } @@ -117,6 +123,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "Return the editor for the molecule that contains this atom" ); } @@ -128,7 +135,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this atom" ); } @@ -140,6 +147,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the number of this atom" ); } @@ -190,6 +198,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "remove" , remove_function_value + , bp::release_gil_policy() , "Completely remove this atom from the molecule and return\na MolStructureEditor that can be used to continue editing\nthe molecule" ); } @@ -305,6 +314,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() , "Return the editor for the residue that contains this atom" ); } @@ -316,6 +326,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() , "Return the editor for the segment that contain this atom" ); } @@ -327,6 +338,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this contains the whole molecule" ); } @@ -338,6 +350,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -349,6 +362,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -360,6 +374,7 @@ void register_AtomStructureEditor_class(){ AtomStructureEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomVariantProperty.pypp.cpp b/wrapper/Mol/AtomVariantProperty.pypp.cpp index e983909a2..009595a31 100644 --- a/wrapper/Mol/AtomVariantProperty.pypp.cpp +++ b/wrapper/Mol/AtomVariantProperty.pypp.cpp @@ -45,6 +45,8 @@ SireMol::AtomProperty __copy__(const SireMol::AtomProperty & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomVariantProperty_class(){ @@ -85,6 +87,7 @@ void register_AtomVariantProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -98,6 +101,7 @@ void register_AtomVariantProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -139,6 +143,7 @@ void register_AtomVariantProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +157,7 @@ void register_AtomVariantProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -165,6 +171,7 @@ void register_AtomVariantProperty_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -177,6 +184,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -190,6 +198,7 @@ void register_AtomVariantProperty_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -203,6 +212,7 @@ void register_AtomVariantProperty_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -216,6 +226,7 @@ void register_AtomVariantProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -257,6 +268,7 @@ void register_AtomVariantProperty_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -270,6 +282,7 @@ void register_AtomVariantProperty_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -283,6 +296,7 @@ void register_AtomVariantProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -296,6 +310,7 @@ void register_AtomVariantProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -308,6 +323,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -321,6 +337,7 @@ void register_AtomVariantProperty_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -334,6 +351,7 @@ void register_AtomVariantProperty_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -346,6 +364,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -359,6 +378,7 @@ void register_AtomVariantProperty_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -371,6 +391,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +476,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +489,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -479,6 +502,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -491,6 +515,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -504,6 +529,7 @@ void register_AtomVariantProperty_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -516,6 +542,7 @@ void register_AtomVariantProperty_class(){ AtomVariantProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomVelocities.pypp.cpp b/wrapper/Mol/AtomVelocities.pypp.cpp index c7f157416..176db455d 100644 --- a/wrapper/Mol/AtomVelocities.pypp.cpp +++ b/wrapper/Mol/AtomVelocities.pypp.cpp @@ -22,6 +22,8 @@ SireMol::AtomProperty > __co #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_AtomVelocities_class(){ @@ -62,6 +64,7 @@ void register_AtomVelocities_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -75,6 +78,7 @@ void register_AtomVelocities_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -102,7 +106,7 @@ void register_AtomVelocities_class(){ "at" , at_function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -116,6 +120,7 @@ void register_AtomVelocities_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_AtomVelocities_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -142,6 +148,7 @@ void register_AtomVelocities_class(){ "copyFrom" , copyFrom_function_value , ( bp::arg("values"), bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -154,6 +161,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +175,7 @@ void register_AtomVelocities_class(){ "divide" , divide_function_value , ( bp::arg("beads") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +189,7 @@ void register_AtomVelocities_class(){ "divideByResidue" , divideByResidue_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -193,6 +203,7 @@ void register_AtomVelocities_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -220,7 +231,7 @@ void register_AtomVelocities_class(){ "get" , get_function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -234,6 +245,7 @@ void register_AtomVelocities_class(){ "getAsProperty" , getAsProperty_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -247,6 +259,7 @@ void register_AtomVelocities_class(){ "getAsVariant" , getAsVariant_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "" ); } @@ -260,6 +273,7 @@ void register_AtomVelocities_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -273,6 +287,7 @@ void register_AtomVelocities_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -285,6 +300,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -298,6 +314,7 @@ void register_AtomVelocities_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -311,6 +328,7 @@ void register_AtomVelocities_class(){ "merge" , merge_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -323,6 +341,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -336,6 +355,7 @@ void register_AtomVelocities_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -348,6 +368,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -391,7 +412,7 @@ void register_AtomVelocities_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("cgatomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -432,6 +453,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -444,6 +466,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -456,6 +479,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -468,6 +492,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "" ); } @@ -481,6 +506,7 @@ void register_AtomVelocities_class(){ "toVector" , toVector_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "" ); } @@ -493,6 +519,7 @@ void register_AtomVelocities_class(){ AtomVelocities_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomsIn_CGID_.pypp.cpp b/wrapper/Mol/AtomsIn_CGID_.pypp.cpp index d3ef20a20..5ccaad16b 100644 --- a/wrapper/Mol/AtomsIn_CGID_.pypp.cpp +++ b/wrapper/Mol/AtomsIn_CGID_.pypp.cpp @@ -55,6 +55,8 @@ SireMol::AtomsIn __copy__(const SireMol::AtomsIn & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomsIn_CGID__class(){ { //::SireMol::AtomsIn< SireMol::CGID > @@ -74,6 +76,7 @@ void register_AtomsIn_CGID__class(){ AtomsIn_CGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +89,7 @@ void register_AtomsIn_CGID__class(){ AtomsIn_CGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_AtomsIn_CGID__class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_AtomsIn_CGID__class(){ AtomsIn_CGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomsIn_CGID__class(){ AtomsIn_CGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomsIn_CGID__class(){ AtomsIn_CGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomsIn_ChainID_.pypp.cpp b/wrapper/Mol/AtomsIn_ChainID_.pypp.cpp index c15f50cd5..904864cdc 100644 --- a/wrapper/Mol/AtomsIn_ChainID_.pypp.cpp +++ b/wrapper/Mol/AtomsIn_ChainID_.pypp.cpp @@ -55,6 +55,8 @@ SireMol::AtomsIn __copy__(const SireMol::AtomsIn @@ -74,6 +76,7 @@ void register_AtomsIn_ChainID__class(){ AtomsIn_ChainID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +89,7 @@ void register_AtomsIn_ChainID__class(){ AtomsIn_ChainID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_AtomsIn_ChainID__class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_AtomsIn_ChainID__class(){ AtomsIn_ChainID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomsIn_ChainID__class(){ AtomsIn_ChainID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomsIn_ChainID__class(){ AtomsIn_ChainID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomsIn_ResID_.pypp.cpp b/wrapper/Mol/AtomsIn_ResID_.pypp.cpp index 6819d990d..4d0c0a14f 100644 --- a/wrapper/Mol/AtomsIn_ResID_.pypp.cpp +++ b/wrapper/Mol/AtomsIn_ResID_.pypp.cpp @@ -59,6 +59,8 @@ SireMol::AtomsIn __copy__(const SireMol::AtomsIn #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomsIn_ResID__class(){ { //::SireMol::AtomsIn< SireMol::ResID > @@ -78,6 +80,7 @@ void register_AtomsIn_ResID__class(){ AtomsIn_ResID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +93,7 @@ void register_AtomsIn_ResID__class(){ AtomsIn_ResID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +107,7 @@ void register_AtomsIn_ResID__class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +138,7 @@ void register_AtomsIn_ResID__class(){ AtomsIn_ResID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +151,7 @@ void register_AtomsIn_ResID__class(){ AtomsIn_ResID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +164,7 @@ void register_AtomsIn_ResID__class(){ AtomsIn_ResID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/AtomsIn_SegID_.pypp.cpp b/wrapper/Mol/AtomsIn_SegID_.pypp.cpp index 132825110..a7c72e41f 100644 --- a/wrapper/Mol/AtomsIn_SegID_.pypp.cpp +++ b/wrapper/Mol/AtomsIn_SegID_.pypp.cpp @@ -55,6 +55,8 @@ SireMol::AtomsIn __copy__(const SireMol::AtomsIn #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AtomsIn_SegID__class(){ { //::SireMol::AtomsIn< SireMol::SegID > @@ -74,6 +76,7 @@ void register_AtomsIn_SegID__class(){ AtomsIn_SegID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +89,7 @@ void register_AtomsIn_SegID__class(){ AtomsIn_SegID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_AtomsIn_SegID__class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_AtomsIn_SegID__class(){ AtomsIn_SegID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_AtomsIn_SegID__class(){ AtomsIn_SegID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_AtomsIn_SegID__class(){ AtomsIn_SegID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Bead.pypp.cpp b/wrapper/Mol/Bead.pypp.cpp index 9bb576cb7..927be695f 100644 --- a/wrapper/Mol/Bead.pypp.cpp +++ b/wrapper/Mol/Bead.pypp.cpp @@ -14,14 +14,28 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "atom.h" + #include "bead.h" #include "beadeditor.h" #include "beads.h" +#include "chain.h" + +#include "cutgroup.h" + #include "mover.hpp" +#include "partialmolecule.h" + +#include "residue.h" + +#include "segment.h" + +#include "selector.hpp" + #include "tostring.h" #include "bead.h" @@ -62,6 +76,8 @@ SireMol::Bead __copy__(const SireMol::Bead &other){ return SireMol::Bead(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Bead_class(){ @@ -81,6 +97,7 @@ void register_Bead_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this bead contains the metadata with key metakey\nThrow: SireBase::missing_property\n" ); } @@ -93,6 +110,7 @@ void register_Bead_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this bead contains the metadata property with key key:metakey\nThrow: SireBase::missing_property\n" ); } @@ -105,6 +123,7 @@ void register_Bead_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this bead contains the property with key key\nThrow: SireBase::missing_property\n" ); } @@ -117,6 +136,7 @@ void register_Bead_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the ith atom in this bead\nThrow: SireError::invalid_index\n" ); } @@ -128,6 +148,7 @@ void register_Bead_class(){ Bead_exposer.def( "atomIdxs" , atomIdxs_function_value + , bp::release_gil_policy() , "Return the list of atom indexes of the atoms in this bead" ); } @@ -139,7 +160,7 @@ void register_Bead_class(){ Bead_exposer.def( "beading" , beading_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the beading function used to bead up the molecule" ); } @@ -151,6 +172,7 @@ void register_Bead_class(){ Bead_exposer.def( "beads" , beads_function_value + , bp::release_gil_policy() , "Return the set of all beads" ); } @@ -163,6 +185,7 @@ void register_Bead_class(){ "contains" , contains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not this bead contains the atom with index atomidx" ); } @@ -175,6 +198,7 @@ void register_Bead_class(){ "contains" , contains_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this bead contains the atom with ID atomid" ); } @@ -186,6 +210,7 @@ void register_Bead_class(){ Bead_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return the editor for this bead" ); } @@ -197,6 +222,7 @@ void register_Bead_class(){ Bead_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return the evaluator for this bead" ); } @@ -209,6 +235,7 @@ void register_Bead_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not this bead had some metadata at metakey" ); } @@ -221,6 +248,7 @@ void register_Bead_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not this bead has some metadata at key:metakey" ); } @@ -233,6 +261,7 @@ void register_Bead_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not this bead has a property called key" ); } @@ -244,6 +273,7 @@ void register_Bead_class(){ Bead_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this bead" ); } @@ -256,6 +286,7 @@ void register_Bead_class(){ "intersects" , intersects_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this bead contains the atom with ID atomid" ); } @@ -267,6 +298,7 @@ void register_Bead_class(){ Bead_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return if this is an empty bead" ); } @@ -278,6 +310,7 @@ void register_Bead_class(){ Bead_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return a list of all of the metadata properties associated with this bead" ); } @@ -290,6 +323,7 @@ void register_Bead_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return a list of all of the metadata properties of the key key that\nare associated with this bead" ); } @@ -301,6 +335,7 @@ void register_Bead_class(){ Bead_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return the mover for this bead" ); } @@ -312,6 +347,7 @@ void register_Bead_class(){ Bead_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this bead" ); } @@ -323,6 +359,7 @@ void register_Bead_class(){ Bead_exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() , "" ); } @@ -361,6 +398,7 @@ void register_Bead_class(){ Bead_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return a list of all of the properties associated with this bead" ); } @@ -372,6 +410,7 @@ void register_Bead_class(){ Bead_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this bead includes all of the atoms in the molecule" ); } @@ -383,8 +422,21 @@ void register_Bead_class(){ Bead_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the selection of atoms that are part of this bead" ); + } + { //::SireMol::Bead::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Bead::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Bead::toSelector ); + + Bead_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Bead::toString @@ -394,6 +446,7 @@ void register_Bead_class(){ Bead_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this bead" ); } @@ -405,6 +458,7 @@ void register_Bead_class(){ Bead_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -417,6 +471,7 @@ void register_Bead_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this bead using the passed molecule data" ); } diff --git a/wrapper/Mol/BeadEditor.pypp.cpp b/wrapper/Mol/BeadEditor.pypp.cpp index 92609ff20..9f2463a9d 100644 --- a/wrapper/Mol/BeadEditor.pypp.cpp +++ b/wrapper/Mol/BeadEditor.pypp.cpp @@ -11,8 +11,22 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "atom.h" + #include "beadeditor.h" +#include "chain.h" + +#include "cutgroup.h" + +#include "mover.hpp" + +#include "residue.h" + +#include "segment.h" + +#include "selector.hpp" + #include "beadeditor.h" SireMol::BeadEditor __copy__(const SireMol::BeadEditor &other){ return SireMol::BeadEditor(other); } @@ -21,6 +35,8 @@ SireMol::BeadEditor __copy__(const SireMol::BeadEditor &other){ return SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_BeadEditor_class(){ @@ -39,6 +55,7 @@ void register_BeadEditor_class(){ BeadEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes" ); } @@ -76,6 +93,7 @@ void register_BeadEditor_class(){ BeadEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -87,6 +105,7 @@ void register_BeadEditor_class(){ BeadEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadEditorBase.pypp.cpp b/wrapper/Mol/BeadEditorBase.pypp.cpp index 6419b1821..68d3e69f5 100644 --- a/wrapper/Mol/BeadEditorBase.pypp.cpp +++ b/wrapper/Mol/BeadEditorBase.pypp.cpp @@ -11,8 +11,22 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "atom.h" + #include "beadeditor.h" +#include "chain.h" + +#include "cutgroup.h" + +#include "mover.hpp" + +#include "residue.h" + +#include "segment.h" + +#include "selector.hpp" + #include "beadeditor.h" #include "beadproperty.hpp" @@ -59,6 +73,8 @@ SireMol::BeadEditorBase& set_Metadata_SireMol_BeadVariantProperty_function2( #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_BeadEditorBase_class(){ @@ -76,6 +92,33 @@ void register_BeadEditorBase_class(){ BeadEditorBase_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::atom + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*atom_function_type)( int,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::atom ); + + BeadEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::atom + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::atom ); + + BeadEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -101,6 +144,33 @@ void register_BeadEditorBase_class(){ BeadEditorBase_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::chain + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*chain_function_type)( int,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::chain ); + + BeadEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::chain + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::chain ); + + BeadEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -126,6 +196,33 @@ void register_BeadEditorBase_class(){ BeadEditorBase_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::cutGroup + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::cutGroup ); + + BeadEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::cutGroup + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::cutGroup ); + + BeadEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -151,6 +248,7 @@ void register_BeadEditorBase_class(){ BeadEditorBase_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "" ); } @@ -181,6 +279,110 @@ void register_BeadEditorBase_class(){ , bp::return_self< >() , "" ); + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( int ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( ::QString const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( ::SireMol::AtomID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( ::SireMol::ResID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( ::SireMol::CGID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( ::SireMol::ChainID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( ::SireMol::SegID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("segid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*__getitem___function_type)( ::SireID::Index const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::operator[] ); + + BeadEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::removeMetadata @@ -233,6 +435,33 @@ void register_BeadEditorBase_class(){ BeadEditorBase_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::residue + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*residue_function_type)( int,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::residue ); + + BeadEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::residue + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::residue ); + + BeadEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -258,6 +487,33 @@ void register_BeadEditorBase_class(){ BeadEditorBase_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::segment + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*segment_function_type)( int,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::segment ); + + BeadEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::segment + + typedef SireMol::Editor< SireMol::BeadEditor, SireMol::Bead > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::BeadEditor, SireMol::Bead >::segment ); + + BeadEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } diff --git a/wrapper/Mol/BeadFloatProperty.pypp.cpp b/wrapper/Mol/BeadFloatProperty.pypp.cpp index 2c4a4f010..7e073fe99 100644 --- a/wrapper/Mol/BeadFloatProperty.pypp.cpp +++ b/wrapper/Mol/BeadFloatProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::BeadProperty __copy__(const SireMol::BeadProperty &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_BeadFloatProperty_class(){ @@ -55,6 +57,7 @@ void register_BeadFloatProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_BeadFloatProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_BeadFloatProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_BeadFloatProperty_class(){ BeadFloatProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_BeadFloatProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -147,6 +154,7 @@ void register_BeadFloatProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +167,7 @@ void register_BeadFloatProperty_class(){ BeadFloatProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +180,7 @@ void register_BeadFloatProperty_class(){ BeadFloatProperty_exposer.def( "nBeads" , nBeads_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +237,7 @@ void register_BeadFloatProperty_class(){ BeadFloatProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +250,7 @@ void register_BeadFloatProperty_class(){ BeadFloatProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +263,7 @@ void register_BeadFloatProperty_class(){ BeadFloatProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +276,7 @@ void register_BeadFloatProperty_class(){ BeadFloatProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadID.pypp.cpp b/wrapper/Mol/BeadID.pypp.cpp index 0004ccc6b..5e1c15d9e 100644 --- a/wrapper/Mol/BeadID.pypp.cpp +++ b/wrapper/Mol/BeadID.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BeadID_class(){ { //::SireMol::BeadID @@ -33,6 +35,7 @@ void register_BeadID_class(){ BeadID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadIdx.pypp.cpp b/wrapper/Mol/BeadIdx.pypp.cpp index 59a7e2e9a..cbd7fb13d 100644 --- a/wrapper/Mol/BeadIdx.pypp.cpp +++ b/wrapper/Mol/BeadIdx.pypp.cpp @@ -27,6 +27,8 @@ SireMol::BeadIdx __copy__(const SireMol::BeadIdx &other){ return SireMol::BeadId #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BeadIdx_class(){ { //::SireMol::BeadIdx @@ -43,6 +45,7 @@ void register_BeadIdx_class(){ BeadIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_BeadIdx_class(){ BeadIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -65,6 +69,7 @@ void register_BeadIdx_class(){ BeadIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +94,7 @@ void register_BeadIdx_class(){ BeadIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_BeadIdx_class(){ BeadIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -111,6 +118,7 @@ void register_BeadIdx_class(){ BeadIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadIntProperty.pypp.cpp b/wrapper/Mol/BeadIntProperty.pypp.cpp index 9f3b725ff..ba5ade23f 100644 --- a/wrapper/Mol/BeadIntProperty.pypp.cpp +++ b/wrapper/Mol/BeadIntProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::BeadProperty __copy__(const SireMol::BeadProperty #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_BeadIntProperty_class(){ @@ -55,6 +57,7 @@ void register_BeadIntProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_BeadIntProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_BeadIntProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_BeadIntProperty_class(){ BeadIntProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_BeadIntProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -147,6 +154,7 @@ void register_BeadIntProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +167,7 @@ void register_BeadIntProperty_class(){ BeadIntProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +180,7 @@ void register_BeadIntProperty_class(){ BeadIntProperty_exposer.def( "nBeads" , nBeads_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +237,7 @@ void register_BeadIntProperty_class(){ BeadIntProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +250,7 @@ void register_BeadIntProperty_class(){ BeadIntProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +263,7 @@ void register_BeadIntProperty_class(){ BeadIntProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +276,7 @@ void register_BeadIntProperty_class(){ BeadIntProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadNum.pypp.cpp b/wrapper/Mol/BeadNum.pypp.cpp index e2f171635..580a2ffc0 100644 --- a/wrapper/Mol/BeadNum.pypp.cpp +++ b/wrapper/Mol/BeadNum.pypp.cpp @@ -27,6 +27,8 @@ SireMol::BeadNum __copy__(const SireMol::BeadNum &other){ return SireMol::BeadNu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BeadNum_class(){ { //::SireMol::BeadNum @@ -43,6 +45,7 @@ void register_BeadNum_class(){ BeadNum_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_BeadNum_class(){ BeadNum_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +89,7 @@ void register_BeadNum_class(){ BeadNum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +101,7 @@ void register_BeadNum_class(){ BeadNum_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +113,7 @@ void register_BeadNum_class(){ BeadNum_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadProp.pypp.cpp b/wrapper/Mol/BeadProp.pypp.cpp index c317be09f..a3b53d9e6 100644 --- a/wrapper/Mol/BeadProp.pypp.cpp +++ b/wrapper/Mol/BeadProp.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BeadProp_class(){ { //::SireMol::BeadProp @@ -31,6 +33,7 @@ void register_BeadProp_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -43,6 +46,7 @@ void register_BeadProp_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -54,7 +58,7 @@ void register_BeadProp_class(){ BeadProp_exposer.def( "beading" , beading_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the beading property used to define the beads in the molecule" ); } @@ -67,6 +71,7 @@ void register_BeadProp_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -79,6 +84,7 @@ void register_BeadProp_class(){ "setBeading" , setBeading_function_value , ( bp::arg("beading") ) + , bp::release_gil_policy() , "Set the beading property used to define the beads in the molecule" ); } @@ -90,6 +96,7 @@ void register_BeadProp_class(){ BeadProp_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadStringProperty.pypp.cpp b/wrapper/Mol/BeadStringProperty.pypp.cpp index 1ab264b4f..971f81e36 100644 --- a/wrapper/Mol/BeadStringProperty.pypp.cpp +++ b/wrapper/Mol/BeadStringProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::BeadProperty __copy__(const SireMol::BeadProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_BeadStringProperty_class(){ @@ -55,6 +57,7 @@ void register_BeadStringProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_BeadStringProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_BeadStringProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_BeadStringProperty_class(){ BeadStringProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_BeadStringProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -147,6 +154,7 @@ void register_BeadStringProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +167,7 @@ void register_BeadStringProperty_class(){ BeadStringProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +180,7 @@ void register_BeadStringProperty_class(){ BeadStringProperty_exposer.def( "nBeads" , nBeads_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +237,7 @@ void register_BeadStringProperty_class(){ BeadStringProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +250,7 @@ void register_BeadStringProperty_class(){ BeadStringProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +263,7 @@ void register_BeadStringProperty_class(){ BeadStringProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +276,7 @@ void register_BeadStringProperty_class(){ BeadStringProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BeadVariantProperty.pypp.cpp b/wrapper/Mol/BeadVariantProperty.pypp.cpp index 26fbff466..2ffce3d9a 100644 --- a/wrapper/Mol/BeadVariantProperty.pypp.cpp +++ b/wrapper/Mol/BeadVariantProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::BeadProperty __copy__(const SireMol::BeadProperty & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_BeadVariantProperty_class(){ @@ -55,6 +57,7 @@ void register_BeadVariantProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_BeadVariantProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_BeadVariantProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_BeadVariantProperty_class(){ BeadVariantProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_BeadVariantProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -147,6 +154,7 @@ void register_BeadVariantProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +167,7 @@ void register_BeadVariantProperty_class(){ BeadVariantProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +180,7 @@ void register_BeadVariantProperty_class(){ BeadVariantProperty_exposer.def( "nBeads" , nBeads_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +237,7 @@ void register_BeadVariantProperty_class(){ BeadVariantProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +250,7 @@ void register_BeadVariantProperty_class(){ BeadVariantProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +263,7 @@ void register_BeadVariantProperty_class(){ BeadVariantProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +276,7 @@ void register_BeadVariantProperty_class(){ BeadVariantProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Beading.pypp.cpp b/wrapper/Mol/Beading.pypp.cpp index eede87923..5ccd4f075 100644 --- a/wrapper/Mol/Beading.pypp.cpp +++ b/wrapper/Mol/Beading.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Beading_class(){ { //::SireMol::Beading @@ -52,6 +54,7 @@ void register_Beading_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -63,6 +66,7 @@ void register_Beading_class(){ Beading_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -74,6 +78,7 @@ void register_Beading_class(){ Beading_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Beads.pypp.cpp b/wrapper/Mol/Beads.pypp.cpp index 765a71248..2abd924fa 100644 --- a/wrapper/Mol/Beads.pypp.cpp +++ b/wrapper/Mol/Beads.pypp.cpp @@ -14,6 +14,8 @@ namespace bp = boost::python; #include "mover.hpp" +#include "partialmolecule.h" + #include "beads.h" SireMol::Beads __copy__(const SireMol::Beads &other){ return SireMol::Beads(other); } @@ -22,6 +24,8 @@ SireMol::Beads __copy__(const SireMol::Beads &other){ return SireMol::Beads(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Beads_class(){ @@ -41,6 +45,7 @@ void register_Beads_class(){ "at" , at_function_value , ( bp::arg("beadidx") ) + , bp::release_gil_policy() , "Return the bead at index beadidx\nThrow: SireError::invalid_index\n" ); } @@ -52,6 +57,7 @@ void register_Beads_class(){ Beads_exposer.def( "atomIdxs" , atomIdxs_function_value + , bp::release_gil_policy() , "Return the indicies of all of the atoms in all of the beads" ); } @@ -64,6 +70,7 @@ void register_Beads_class(){ "atomProperty" , atomProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the atom properties for all of the atoms in the beads, in\nBeadIdxIndex order" ); } @@ -76,6 +83,7 @@ void register_Beads_class(){ "bead" , bead_function_value , ( bp::arg("beadidx") ) + , bp::release_gil_policy() , "Return the bead at index beadidx\nThrow: SireError::invalid_index\n" ); } @@ -87,7 +95,7 @@ void register_Beads_class(){ Beads_exposer.def( "beading" , beading_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the beading function used to create the beads" ); } @@ -100,6 +108,7 @@ void register_Beads_class(){ "contains" , contains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether any of the beads contains the atom with index atomidx" ); } @@ -112,6 +121,7 @@ void register_Beads_class(){ "contains" , contains_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not any of the beads contains the atom with ID atomid" ); } @@ -123,6 +133,7 @@ void register_Beads_class(){ Beads_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of beads" ); } @@ -134,6 +145,7 @@ void register_Beads_class(){ Beads_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an evaluator for all of the beads" ); } @@ -146,6 +158,7 @@ void register_Beads_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "At the moment, the Beads object has no properties or metadata" ); } @@ -158,6 +171,7 @@ void register_Beads_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "At the moment, the Beads object has no properties or metadata" ); } @@ -170,6 +184,7 @@ void register_Beads_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "At the moment, the Beads object has no properties or metadata" ); } @@ -182,6 +197,7 @@ void register_Beads_class(){ "intersects" , intersects_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not any of the beads contains the atom with ID atomid" ); } @@ -193,6 +209,7 @@ void register_Beads_class(){ Beads_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -204,6 +221,7 @@ void register_Beads_class(){ Beads_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "At the moment, the Beads object has no properties or metadata" ); } @@ -216,6 +234,7 @@ void register_Beads_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "At the moment, the Beads object has no properties or metadata" ); } @@ -227,6 +246,7 @@ void register_Beads_class(){ Beads_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return a mover that acts of all of the beads" ); } @@ -238,6 +258,7 @@ void register_Beads_class(){ Beads_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in the beads" ); } @@ -249,6 +270,7 @@ void register_Beads_class(){ Beads_exposer.def( "nBeads" , nBeads_function_value + , bp::release_gil_policy() , "Return the number of beads" ); } @@ -287,6 +309,7 @@ void register_Beads_class(){ Beads_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "At the moment, the Beads object has no properties or metadata" ); } @@ -298,6 +321,7 @@ void register_Beads_class(){ Beads_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not these beads contain all atoms" ); } @@ -309,6 +333,7 @@ void register_Beads_class(){ Beads_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the selection of atoms that are part of the beads" ); } @@ -320,8 +345,21 @@ void register_Beads_class(){ Beads_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of beads" ); + } + { //::SireMol::Beads::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Beads::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Beads::toSelector ); + + Beads_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Beads::toString @@ -331,6 +369,7 @@ void register_Beads_class(){ Beads_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of these beads" ); } @@ -342,6 +381,7 @@ void register_Beads_class(){ Beads_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -354,6 +394,7 @@ void register_Beads_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update these beads with the new molecule data" ); } diff --git a/wrapper/Mol/BondHunter.pypp.cpp b/wrapper/Mol/BondHunter.pypp.cpp index 483eb2570..f095f1988 100644 --- a/wrapper/Mol/BondHunter.pypp.cpp +++ b/wrapper/Mol/BondHunter.pypp.cpp @@ -47,6 +47,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BondHunter_class(){ { //::SireMol::BondHunter @@ -85,6 +87,7 @@ void register_BondHunter_class(){ BondHunter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BondID.pypp.cpp b/wrapper/Mol/BondID.pypp.cpp index d93da4aaa..abb8b79c8 100644 --- a/wrapper/Mol/BondID.pypp.cpp +++ b/wrapper/Mol/BondID.pypp.cpp @@ -32,6 +32,8 @@ SireMol::BondID __copy__(const SireMol::BondID &other){ return SireMol::BondID(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BondID_class(){ { //::SireMol::BondID @@ -48,7 +50,7 @@ void register_BondID_class(){ BondID_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the first atom of the bond" ); } @@ -60,7 +62,7 @@ void register_BondID_class(){ BondID_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the second atom of the bond" ); } @@ -72,6 +74,7 @@ void register_BondID_class(){ BondID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this ID" ); } @@ -83,6 +86,7 @@ void register_BondID_class(){ BondID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether this is a null ID" ); } @@ -119,6 +123,7 @@ void register_BondID_class(){ "length" , length_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1") ) + , bp::release_gil_policy() , "Return the length of the bond from atom0() in the\nmolecule whose data is in mol0data to atom1() in the\nmolecule whose data is in mol1data, using map0\nto the find the coordinates property of mol0 and\nmap1 to find the coordinates property of mol1\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -131,6 +136,7 @@ void register_BondID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return the indicies of the two atoms in this bond - this returns\nthem in the order tuple(bond.atom0(),bond.atom1())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -143,6 +149,7 @@ void register_BondID_class(){ "map" , map_function_value , ( bp::arg("mol0info"), bp::arg("mol1info") ) + , bp::release_gil_policy() , "Return the indicies of the two atoms of this bond, between the\ntwo molecules whose data is in mol0info (containing bond.atom0())\nand mol1info (containing bond.atom1())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -154,6 +161,7 @@ void register_BondID_class(){ BondID_exposer.def( "mirror" , mirror_function_value + , bp::release_gil_policy() , "Return the mirror of this BondID - i.e. if this is\nBond(atom0, atom1), this returns Bond(atom1, atom0).\nThis is useful if you know that Bond(atom0,atom1) equals\n" ); } @@ -206,6 +214,7 @@ void register_BondID_class(){ "size" , size_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1") ) + , bp::release_gil_policy() , "Synonym for BondID::length(const MoleculeData&, const PropertyMap&,\nconst MoleculeData&, const PropertyMap&)\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -217,6 +226,7 @@ void register_BondID_class(){ BondID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -228,6 +238,7 @@ void register_BondID_class(){ BondID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -264,6 +275,7 @@ void register_BondID_class(){ "vector" , vector_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1") ) + , bp::release_gil_policy() , "Return the vector that goes from atom0() in the molecule\nwhose data is in mol0data to atom1() in the molecule\nwhose data is in mol1data, using map0 to find the\ncoordinates property of mol0 and map1 to find the\ncoordinates property of mol1\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -275,6 +287,7 @@ void register_BondID_class(){ BondID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/BondPerturbation.pypp.cpp b/wrapper/Mol/BondPerturbation.pypp.cpp index fcb70888d..7aa8bbf79 100644 --- a/wrapper/Mol/BondPerturbation.pypp.cpp +++ b/wrapper/Mol/BondPerturbation.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; #include "SireUnits/units.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -34,6 +36,8 @@ SireMol::BondPerturbation __copy__(const SireMol::BondPerturbation &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BondPerturbation_class(){ { //::SireMol::BondPerturbation @@ -53,7 +57,7 @@ void register_BondPerturbation_class(){ BondPerturbation_exposer.def( "bond" , bond_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID that identifies that bond that will be perturbed" ); } @@ -104,6 +108,7 @@ void register_BondPerturbation_class(){ BondPerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -115,6 +120,7 @@ void register_BondPerturbation_class(){ BondPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -127,6 +133,7 @@ void register_BondPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/Mol/BondType.pypp.cpp b/wrapper/Mol/BondType.pypp.cpp index 38d565f5c..7086d3306 100644 --- a/wrapper/Mol/BondType.pypp.cpp +++ b/wrapper/Mol/BondType.pypp.cpp @@ -25,6 +25,8 @@ SireMol::BondType __copy__(const SireMol::BondType &other){ return SireMol::Bond #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BondType_class(){ { //::SireMol::BondType @@ -42,6 +44,7 @@ void register_BondType_class(){ BondType_exposer.def( "aromaticBond" , aromaticBond_function_value + , bp::release_gil_policy() , "Return an aromatic bond" ); } @@ -53,6 +56,7 @@ void register_BondType_class(){ BondType_exposer.def( "doubleBond" , doubleBond_function_value + , bp::release_gil_policy() , "Return a double bond" ); } @@ -64,6 +68,7 @@ void register_BondType_class(){ BondType_exposer.def( "isAromatic" , isAromatic_function_value + , bp::release_gil_policy() , "Return whether or not this is an aromatic bond" ); } @@ -75,6 +80,7 @@ void register_BondType_class(){ BondType_exposer.def( "isDefined" , isDefined_function_value + , bp::release_gil_policy() , "Return whether or not the bond type is defined" ); } @@ -86,6 +92,7 @@ void register_BondType_class(){ BondType_exposer.def( "isDouble" , isDouble_function_value + , bp::release_gil_policy() , "Return whether or not this is a double bond" ); } @@ -97,6 +104,7 @@ void register_BondType_class(){ BondType_exposer.def( "isSingle" , isSingle_function_value + , bp::release_gil_policy() , "Return whether or not this is a single bond" ); } @@ -108,6 +116,7 @@ void register_BondType_class(){ BondType_exposer.def( "isTriple" , isTriple_function_value + , bp::release_gil_policy() , "Return whether or not this is a triple bond" ); } @@ -134,6 +143,7 @@ void register_BondType_class(){ BondType_exposer.def( "sdfValue" , sdfValue_function_value + , bp::release_gil_policy() , "Return the SDF-format value for this bond" ); } @@ -145,6 +155,7 @@ void register_BondType_class(){ BondType_exposer.def( "singleBond" , singleBond_function_value + , bp::release_gil_policy() , "Return a single bond" ); } @@ -156,6 +167,7 @@ void register_BondType_class(){ BondType_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +179,7 @@ void register_BondType_class(){ BondType_exposer.def( "tripleBond" , tripleBond_function_value + , bp::release_gil_policy() , "Return a triple bond" ); } @@ -178,6 +191,7 @@ void register_BondType_class(){ BondType_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -189,6 +203,7 @@ void register_BondType_class(){ BondType_exposer.def( "undefinedBond" , undefinedBond_function_value + , bp::release_gil_policy() , "Return an undefined bond" ); } @@ -200,6 +215,7 @@ void register_BondType_class(){ BondType_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return the bond type (uses SDF values, e.g. 0 is undefined,\n1 is single, 2 is double, 3 is triple and 4 is aromatic)\n" ); } diff --git a/wrapper/Mol/CGAtomID.pypp.cpp b/wrapper/Mol/CGAtomID.pypp.cpp index 7099efa9c..aab97a8da 100644 --- a/wrapper/Mol/CGAtomID.pypp.cpp +++ b/wrapper/Mol/CGAtomID.pypp.cpp @@ -31,6 +31,8 @@ SireMol::GroupAtomID __copy__(const SireMol::Gro #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGAtomID_class(){ { //::SireMol::GroupAtomID< SireMol::CGID, SireMol::AtomID > @@ -48,6 +50,7 @@ void register_CGAtomID_class(){ CGAtomID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +63,7 @@ void register_CGAtomID_class(){ CGAtomID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +77,7 @@ void register_CGAtomID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +93,7 @@ void register_CGAtomID_class(){ CGAtomID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_CGAtomID_class(){ CGAtomID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -112,6 +119,7 @@ void register_CGAtomID_class(){ CGAtomID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGAtomIdx.pypp.cpp b/wrapper/Mol/CGAtomIdx.pypp.cpp index 68dae6ea5..0c427a956 100644 --- a/wrapper/Mol/CGAtomIdx.pypp.cpp +++ b/wrapper/Mol/CGAtomIdx.pypp.cpp @@ -23,6 +23,8 @@ SireMol::CGAtomIdx __copy__(const SireMol::CGAtomIdx &other){ return SireMol::CG #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGAtomIdx_class(){ { //::SireMol::CGAtomIdx @@ -39,6 +41,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() , "" ); } @@ -50,6 +53,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +77,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +90,7 @@ void register_CGAtomIdx_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +102,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +130,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -133,6 +142,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +154,7 @@ void register_CGAtomIdx_class(){ CGAtomIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGChainID.pypp.cpp b/wrapper/Mol/CGChainID.pypp.cpp index 53b3f29cc..a4c98d841 100644 --- a/wrapper/Mol/CGChainID.pypp.cpp +++ b/wrapper/Mol/CGChainID.pypp.cpp @@ -19,6 +19,8 @@ SireMol::GroupGroupID __copy__(const SireMol::G #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGChainID_class(){ { //::SireMol::GroupGroupID< SireMol::CGID, SireMol::ChainID > @@ -36,6 +38,7 @@ void register_CGChainID_class(){ CGChainID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_CGChainID_class(){ CGChainID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_CGChainID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -76,6 +81,7 @@ void register_CGChainID_class(){ CGChainID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +94,7 @@ void register_CGChainID_class(){ CGChainID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +107,7 @@ void register_CGChainID_class(){ CGChainID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGEditor.pypp.cpp b/wrapper/Mol/CGEditor.pypp.cpp index e55bb464f..1c2f803d5 100644 --- a/wrapper/Mol/CGEditor.pypp.cpp +++ b/wrapper/Mol/CGEditor.pypp.cpp @@ -49,6 +49,8 @@ SireMol::CGEditor __copy__(const SireMol::CGEditor &other){ return SireMol::CGEd #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CGEditor_class(){ @@ -68,6 +70,7 @@ void register_CGEditor_class(){ "add" , add_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "Add an atom called atomname to this CutGroup and return\nan editor for that atom" ); } @@ -80,6 +83,7 @@ void register_CGEditor_class(){ "add" , add_function_value , ( bp::arg("atomnum") ) + , bp::release_gil_policy() , "Add an atom with number atomnum to this CutGroup and return\nan editor for that atom" ); } @@ -91,6 +95,7 @@ void register_CGEditor_class(){ CGEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the\nupdated CutGroup" ); } @@ -129,6 +134,7 @@ void register_CGEditor_class(){ "reindex" , reindex_function_value , ( bp::arg("index") ) + , bp::release_gil_policy() , "Move this CutGroup to index newidx - this will move it\nto the start or end if this index is out of range" ); } @@ -140,6 +146,7 @@ void register_CGEditor_class(){ CGEditor_exposer.def( "remove" , remove_function_value + , bp::release_gil_policy() , "Complete remove this CutGroup, and return an editor\nfor the molecule that contained it" ); } @@ -152,6 +159,7 @@ void register_CGEditor_class(){ "remove" , remove_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Completely remove all atoms that match the ID atomid from\nthis CutGroup\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -164,6 +172,7 @@ void register_CGEditor_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the ith atom from this CutGroup\nThrow: SireError::invalid_index\n" ); } @@ -188,6 +197,7 @@ void register_CGEditor_class(){ CGEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -200,6 +210,7 @@ void register_CGEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("atomid"), bp::arg("cgid") ) + , bp::release_gil_policy() , "Transfer all atoms that match the ID atomid in this CutGroup\nto the CutGroup that matches the ID cgid\nThrow: SireMol::missing_atom\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -212,6 +223,7 @@ void register_CGEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("i"), bp::arg("cgid") ) + , bp::release_gil_policy() , "Transfer the ith atom of this CutGroup into the CutGroup identified\nby the ID cgid\nThrow: SireError::invalid_index\n" ); } @@ -224,6 +236,7 @@ void register_CGEditor_class(){ "transferAll" , transferAll_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Completely transfer all of the atoms in this CutGroup to\nthe CutGroup that matches the ID cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -235,6 +248,7 @@ void register_CGEditor_class(){ CGEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGEditorBase.pypp.cpp b/wrapper/Mol/CGEditorBase.pypp.cpp index 92135f861..14a205044 100644 --- a/wrapper/Mol/CGEditorBase.pypp.cpp +++ b/wrapper/Mol/CGEditorBase.pypp.cpp @@ -87,6 +87,8 @@ SireMol::CGEditorBase& set_Metadata_SireMol_CGVariantProperty_function2( #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CGEditorBase_class(){ @@ -104,6 +106,33 @@ void register_CGEditorBase_class(){ CGEditorBase_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::atom + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*atom_function_type)( int,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::atom ); + + CGEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::atom + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::atom ); + + CGEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -129,6 +158,33 @@ void register_CGEditorBase_class(){ CGEditorBase_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::chain + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*chain_function_type)( int,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::chain ); + + CGEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::chain + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::chain ); + + CGEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -154,6 +210,33 @@ void register_CGEditorBase_class(){ CGEditorBase_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::cutGroup + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::cutGroup ); + + CGEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::cutGroup + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::cutGroup ); + + CGEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -179,6 +262,7 @@ void register_CGEditorBase_class(){ CGEditorBase_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "" ); } @@ -209,6 +293,110 @@ void register_CGEditorBase_class(){ , bp::return_self< >() , "" ); + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( int ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( ::QString const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( ::SireMol::AtomID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( ::SireMol::ResID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( ::SireMol::CGID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( ::SireMol::ChainID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( ::SireMol::SegID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("segid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*__getitem___function_type)( ::SireID::Index const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::operator[] ); + + CGEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::removeMetadata @@ -261,6 +449,33 @@ void register_CGEditorBase_class(){ CGEditorBase_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::residue + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*residue_function_type)( int,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::residue ); + + CGEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::residue + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::residue ); + + CGEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -286,6 +501,33 @@ void register_CGEditorBase_class(){ CGEditorBase_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::segment + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*segment_function_type)( int,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::segment ); + + CGEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::segment + + typedef SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::CGEditor, SireMol::CutGroup >::segment ); + + CGEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } diff --git a/wrapper/Mol/CGFloatProperty.pypp.cpp b/wrapper/Mol/CGFloatProperty.pypp.cpp index e39cc7022..60c7d2965 100644 --- a/wrapper/Mol/CGFloatProperty.pypp.cpp +++ b/wrapper/Mol/CGFloatProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::CGProperty __copy__(const SireMol::CGProperty &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CGFloatProperty_class(){ @@ -55,6 +57,7 @@ void register_CGFloatProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_CGFloatProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_CGFloatProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_CGFloatProperty_class(){ CGFloatProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_CGFloatProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_CGFloatProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::CGProperty< double >::getAsProperty + + typedef SireMol::CGProperty< double > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::CGProperty< double >::*getAsProperty_function_type)( ::SireMol::CGIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::CGProperty< double >::getAsProperty ); + + CGFloatProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::CGProperty< double >::getAsVariant + + typedef SireMol::CGProperty< double > exported_class_t; + typedef ::QVariant ( ::SireMol::CGProperty< double >::*getAsVariant_function_type)( ::SireMol::CGIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::CGProperty< double >::getAsVariant ); + + CGFloatProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::CGProperty< double >::isCompatibleWith @@ -147,6 +182,7 @@ void register_CGFloatProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_CGFloatProperty_class(){ CGFloatProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_CGFloatProperty_class(){ CGFloatProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_CGFloatProperty_class(){ CGFloatProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_CGFloatProperty_class(){ CGFloatProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_CGFloatProperty_class(){ CGFloatProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_CGFloatProperty_class(){ CGFloatProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGID.pypp.cpp b/wrapper/Mol/CGID.pypp.cpp index 3640a2805..795464b25 100644 --- a/wrapper/Mol/CGID.pypp.cpp +++ b/wrapper/Mol/CGID.pypp.cpp @@ -51,6 +51,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGID_class(){ { //::SireMol::CGID @@ -65,6 +67,7 @@ void register_CGID_class(){ CGID_exposer.def( "any" , any_function_value + , bp::release_gil_policy() , "Return a match for any cutgroup" ); } @@ -77,6 +80,7 @@ void register_CGID_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return a specific atom in the matching residues" ); } @@ -88,6 +92,7 @@ void register_CGID_class(){ CGID_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return the atoms in the matching residues" ); } @@ -100,8 +105,22 @@ void register_CGID_class(){ "atoms" , atoms_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return a range of atoms in the matching residues" ); + } + { //::SireMol::CGID::fromString + + typedef ::SireMol::CGIdentifier ( *fromString_function_type )( ::QString const & ); + fromString_function_type fromString_function_value( &::SireMol::CGID::fromString ); + + CGID_exposer.def( + "fromString" + , fromString_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return an CGID constructed from the passed string" ); + } { //::SireMol::CGID::inverse @@ -111,6 +130,7 @@ void register_CGID_class(){ CGID_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Return the inverse of this match" ); } @@ -122,6 +142,7 @@ void register_CGID_class(){ CGID_exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "Return the inverse of this match" ); } @@ -134,6 +155,7 @@ void register_CGID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID back to the indicies of the CutGroups\nwithin the molecule described by the info in molinfo" ); } @@ -346,10 +368,12 @@ void register_CGID_class(){ CGID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } CGID_exposer.staticmethod( "any" ); + CGID_exposer.staticmethod( "fromString" ); CGID_exposer.staticmethod( "typeName" ); CGID_exposer.def( "__str__", &__str__< ::SireMol::CGID > ); CGID_exposer.def( "__repr__", &__str__< ::SireMol::CGID > ); diff --git a/wrapper/Mol/CGIdx.pypp.cpp b/wrapper/Mol/CGIdx.pypp.cpp index 242f61bb6..6f827c1a3 100644 --- a/wrapper/Mol/CGIdx.pypp.cpp +++ b/wrapper/Mol/CGIdx.pypp.cpp @@ -21,6 +21,8 @@ SireMol::CGIdx __copy__(const SireMol::CGIdx &other){ return SireMol::CGIdx(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGIdx_class(){ { //::SireMol::CGIdx @@ -37,6 +39,7 @@ void register_CGIdx_class(){ CGIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_CGIdx_class(){ CGIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +64,7 @@ void register_CGIdx_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -71,6 +76,7 @@ void register_CGIdx_class(){ CGIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_CGIdx_class(){ CGIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +114,7 @@ void register_CGIdx_class(){ CGIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -118,6 +126,7 @@ void register_CGIdx_class(){ CGIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGIntProperty.pypp.cpp b/wrapper/Mol/CGIntProperty.pypp.cpp index 741966de6..c52e58ca5 100644 --- a/wrapper/Mol/CGIntProperty.pypp.cpp +++ b/wrapper/Mol/CGIntProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::CGProperty __copy__(const SireMol::CGProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CGIntProperty_class(){ @@ -55,6 +57,7 @@ void register_CGIntProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_CGIntProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_CGIntProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_CGIntProperty_class(){ CGIntProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_CGIntProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_CGIntProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::CGProperty< long long >::getAsProperty + + typedef SireMol::CGProperty< long long > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::CGProperty< long long >::*getAsProperty_function_type)( ::SireMol::CGIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::CGProperty< long long >::getAsProperty ); + + CGIntProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::CGProperty< long long >::getAsVariant + + typedef SireMol::CGProperty< long long > exported_class_t; + typedef ::QVariant ( ::SireMol::CGProperty< long long >::*getAsVariant_function_type)( ::SireMol::CGIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::CGProperty< long long >::getAsVariant ); + + CGIntProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::CGProperty< long long >::isCompatibleWith @@ -147,6 +182,7 @@ void register_CGIntProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_CGIntProperty_class(){ CGIntProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_CGIntProperty_class(){ CGIntProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_CGIntProperty_class(){ CGIntProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_CGIntProperty_class(){ CGIntProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_CGIntProperty_class(){ CGIntProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_CGIntProperty_class(){ CGIntProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGName.pypp.cpp b/wrapper/Mol/CGName.pypp.cpp index 9378ac1d6..c8830b9f8 100644 --- a/wrapper/Mol/CGName.pypp.cpp +++ b/wrapper/Mol/CGName.pypp.cpp @@ -59,6 +59,8 @@ SireMol::CGName __copy__(const SireMol::CGName &other){ return SireMol::CGName(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGName_class(){ { //::SireMol::CGName @@ -76,6 +78,7 @@ void register_CGName_class(){ CGName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_CGName_class(){ CGName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_CGName_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_CGName_class(){ CGName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +143,7 @@ void register_CGName_class(){ CGName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +155,7 @@ void register_CGName_class(){ CGName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGProp.pypp.cpp b/wrapper/Mol/CGProp.pypp.cpp index ba9c70b49..ea0726897 100644 --- a/wrapper/Mol/CGProp.pypp.cpp +++ b/wrapper/Mol/CGProp.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGProp_class(){ { //::SireMol::CGProp @@ -30,6 +32,7 @@ void register_CGProp_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -42,6 +45,7 @@ void register_CGProp_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +58,33 @@ void register_CGProp_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::CGProp::getAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::CGProp::*getAsProperty_function_type)( ::SireMol::CGIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::CGProp::getAsProperty ); + + CGProp_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("cgidx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::CGProp::getAsVariant + + typedef ::QVariant ( ::SireMol::CGProp::*getAsVariant_function_type)( ::SireMol::CGIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::CGProp::getAsVariant ); + + CGProp_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +96,7 @@ void register_CGProp_class(){ CGProp_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGResID.pypp.cpp b/wrapper/Mol/CGResID.pypp.cpp index 11947ba86..193dacadf 100644 --- a/wrapper/Mol/CGResID.pypp.cpp +++ b/wrapper/Mol/CGResID.pypp.cpp @@ -19,6 +19,8 @@ SireMol::GroupGroupID __copy__(const SireMol::Gro #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGResID_class(){ { //::SireMol::GroupGroupID< SireMol::CGID, SireMol::ResID > @@ -36,6 +38,7 @@ void register_CGResID_class(){ CGResID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_CGResID_class(){ CGResID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_CGResID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -76,6 +81,7 @@ void register_CGResID_class(){ CGResID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +94,7 @@ void register_CGResID_class(){ CGResID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +107,7 @@ void register_CGResID_class(){ CGResID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGStringProperty.pypp.cpp b/wrapper/Mol/CGStringProperty.pypp.cpp index 74f955fd9..c60fdfd3b 100644 --- a/wrapper/Mol/CGStringProperty.pypp.cpp +++ b/wrapper/Mol/CGStringProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::CGProperty __copy__(const SireMol::CGProperty &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CGStringProperty_class(){ @@ -55,6 +57,7 @@ void register_CGStringProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_CGStringProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_CGStringProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_CGStringProperty_class(){ CGStringProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_CGStringProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_CGStringProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::CGProperty< QString >::getAsProperty + + typedef SireMol::CGProperty< QString > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::CGProperty< QString >::*getAsProperty_function_type)( ::SireMol::CGIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::CGProperty< QString >::getAsProperty ); + + CGStringProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::CGProperty< QString >::getAsVariant + + typedef SireMol::CGProperty< QString > exported_class_t; + typedef ::QVariant ( ::SireMol::CGProperty< QString >::*getAsVariant_function_type)( ::SireMol::CGIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::CGProperty< QString >::getAsVariant ); + + CGStringProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::CGProperty< QString >::isCompatibleWith @@ -147,6 +182,7 @@ void register_CGStringProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_CGStringProperty_class(){ CGStringProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_CGStringProperty_class(){ CGStringProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_CGStringProperty_class(){ CGStringProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_CGStringProperty_class(){ CGStringProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_CGStringProperty_class(){ CGStringProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_CGStringProperty_class(){ CGStringProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGStructureEditor.pypp.cpp b/wrapper/Mol/CGStructureEditor.pypp.cpp index 5a885f2d4..908aea0c9 100644 --- a/wrapper/Mol/CGStructureEditor.pypp.cpp +++ b/wrapper/Mol/CGStructureEditor.pypp.cpp @@ -50,6 +50,8 @@ SireMol::CGStructureEditor __copy__(const SireMol::CGStructureEditor &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGStructureEditor_class(){ { //::SireMol::CGStructureEditor @@ -68,6 +70,7 @@ void register_CGStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "Add an atom called atomname to this CutGroup and return\nan editor for that atom" ); } @@ -80,6 +83,7 @@ void register_CGStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atomnum") ) + , bp::release_gil_policy() , "Add an atom with number atomnum to this CutGroup and return\nan editor for that atom" ); } @@ -92,6 +96,7 @@ void register_CGStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith atom of this CutGroup\nThrow: SireError::invalid_index\n" ); } @@ -104,6 +109,7 @@ void register_CGStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom that matches the ID atomid in\nthis CutGroup\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -115,6 +121,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the\nupdated CutGroup" ); } @@ -126,6 +133,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this CutGroup in the molecule" ); } @@ -137,6 +145,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "Return an editor for the molecule that contains this CutGroup" ); } @@ -148,6 +157,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this CutGroup (could be zero)" ); } @@ -159,7 +169,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this CutGroup" ); } @@ -262,6 +272,7 @@ void register_CGStructureEditor_class(){ "select" , select_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith atom of this CutGroup\nThrow: SireError::invalid_index\n" ); } @@ -274,6 +285,7 @@ void register_CGStructureEditor_class(){ "select" , select_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom that matches the ID atomid in\nthis CutGroup\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -285,6 +297,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Does this hold the entire molecule" ); } @@ -296,6 +309,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -346,6 +360,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -357,6 +372,7 @@ void register_CGStructureEditor_class(){ CGStructureEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGVariantProperty.pypp.cpp b/wrapper/Mol/CGVariantProperty.pypp.cpp index 373e9793c..c2d8b2cde 100644 --- a/wrapper/Mol/CGVariantProperty.pypp.cpp +++ b/wrapper/Mol/CGVariantProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::CGProperty __copy__(const SireMol::CGProperty &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CGVariantProperty_class(){ @@ -55,6 +57,7 @@ void register_CGVariantProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_CGVariantProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_CGVariantProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_CGVariantProperty_class(){ CGVariantProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_CGVariantProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("variant") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_CGVariantProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::CGProperty< QVariant >::getAsProperty + + typedef SireMol::CGProperty< QVariant > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::CGProperty< QVariant >::*getAsProperty_function_type)( ::SireMol::CGIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::CGProperty< QVariant >::getAsProperty ); + + CGVariantProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::CGProperty< QVariant >::getAsVariant + + typedef SireMol::CGProperty< QVariant > exported_class_t; + typedef ::QVariant ( ::SireMol::CGProperty< QVariant >::*getAsVariant_function_type)( ::SireMol::CGIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::CGProperty< QVariant >::getAsVariant ); + + CGVariantProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::CGProperty< QVariant >::isCompatibleWith @@ -147,6 +182,7 @@ void register_CGVariantProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_CGVariantProperty_class(){ CGVariantProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_CGVariantProperty_class(){ CGVariantProperty_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_CGVariantProperty_class(){ CGVariantProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_CGVariantProperty_class(){ CGVariantProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_CGVariantProperty_class(){ CGVariantProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_CGVariantProperty_class(){ CGVariantProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CGsWithAtoms.pypp.cpp b/wrapper/Mol/CGsWithAtoms.pypp.cpp index a1a9ae782..3d59339ba 100644 --- a/wrapper/Mol/CGsWithAtoms.pypp.cpp +++ b/wrapper/Mol/CGsWithAtoms.pypp.cpp @@ -22,6 +22,8 @@ SireMol::CGsWithAtoms __copy__(const SireMol::CGsWithAtoms &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CGsWithAtoms_class(){ { //::SireMol::CGsWithAtoms @@ -38,7 +40,7 @@ void register_CGsWithAtoms_class(){ CGsWithAtoms_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the atom ID" ); } @@ -50,6 +52,7 @@ void register_CGsWithAtoms_class(){ CGsWithAtoms_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this identifier" ); } @@ -61,6 +64,7 @@ void register_CGsWithAtoms_class(){ CGsWithAtoms_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Is this selection null?" ); } @@ -73,6 +77,7 @@ void register_CGsWithAtoms_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the list of indicies of CutGroups that match this ID\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -100,6 +105,7 @@ void register_CGsWithAtoms_class(){ CGsWithAtoms_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representatio of this ID" ); } @@ -111,6 +117,7 @@ void register_CGsWithAtoms_class(){ CGsWithAtoms_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_CGsWithAtoms_class(){ CGsWithAtoms_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CMakeAutogenFile.txt b/wrapper/Mol/CMakeAutogenFile.txt index bf04bd1fe..8f4577f4d 100644 --- a/wrapper/Mol/CMakeAutogenFile.txt +++ b/wrapper/Mol/CMakeAutogenFile.txt @@ -1,257 +1,264 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - MolEditorBase.pypp.cpp - AtomProp.pypp.cpp - Radical.pypp.cpp - MGID.pypp.cpp - SegStructureEditor.pypp.cpp - AtomMatchInverter.pypp.cpp - Specify_SegID_.pypp.cpp - CGFloatProperty.pypp.cpp - AtomIntProperty.pypp.cpp - CGVariantProperty.pypp.cpp + AbsFromMass.pypp.cpp + AbsFromNumber.pypp.cpp + AmberParameters.pypp.cpp + AngleID.pypp.cpp + AnglePerturbation.pypp.cpp + Atom.pypp.cpp + AtomBeads.pypp.cpp + AtomCharges.pypp.cpp AtomCoords.pypp.cpp - Molecule.pypp.cpp - InvertMatch_CGID_.pypp.cpp - AtomsIn_CGID_.pypp.cpp - ResEditor.pypp.cpp - ResNumAtomNameMatcher.pypp.cpp - Specify_AtomID_.pypp.cpp - Specify_CGID_.pypp.cpp - ChainEditor.pypp.cpp - IDOrSet_MolID_.pypp.cpp - IDOrSet_CGID_.pypp.cpp - CGID.pypp.cpp - MatchAll_SegID_.pypp.cpp - Bead.pypp.cpp - NullBeading.pypp.cpp - ResID.pypp.cpp - ChargePerturbation.pypp.cpp - InvertMatch_ChainID_.pypp.cpp - MolResID.pypp.cpp - Stereoscopy.pypp.cpp - DihedralPerturbation.pypp.cpp - Mover_Atom_.pypp.cpp - MGName.pypp.cpp - Mover_Selector_Residue_.pypp.cpp - Mover_Selector_CutGroup_.pypp.cpp - AtomFloatProperty.pypp.cpp - Mover_Molecule_.pypp.cpp - SelectResultMover.pypp.cpp - ChainID.pypp.cpp - BeadFloatProperty.pypp.cpp - BeadNum.pypp.cpp - ResidueCutting.pypp.cpp - IDAndSet_ResID_.pypp.cpp - WeightFunction.pypp.cpp - ImproperID.pypp.cpp - Selector_CutGroup_.pypp.cpp + AtomCutting.pypp.cpp AtomDoubleArrayProperty.pypp.cpp - Mover_Chain_.pypp.cpp - NullBondHunter.pypp.cpp - SegVariantProperty.pypp.cpp - ChainProp.pypp.cpp - Specify_ChainID_.pypp.cpp - Perturbation.pypp.cpp - ResidueBeading.pypp.cpp - Specify_MGID_.pypp.cpp - Selector_Chain_.pypp.cpp - AtomStringArrayProperty.pypp.cpp - IDOrSet_ChainID_.pypp.cpp - SelectResult.pypp.cpp - DihedralID.pypp.cpp - CGEditorBase.pypp.cpp - MolGroupsBase.pypp.cpp - Molecules.pypp.cpp - ChainName.pypp.cpp - MoleculeBeading.pypp.cpp - AtomVelocities.pypp.cpp - SegIdx.pypp.cpp - AtomMasses.pypp.cpp - AtomsIn_ResID_.pypp.cpp - CGAtomIdx.pypp.cpp - Beads.pypp.cpp - ChainIntProperty.pypp.cpp - SegResID.pypp.cpp + AtomEditor.pypp.cpp + AtomEditorBase.pypp.cpp + AtomElements.pypp.cpp AtomEnergies.pypp.cpp - AtomRadicals.pypp.cpp - IDOrSet_AtomID_.pypp.cpp + AtomFloatProperty.pypp.cpp + AtomForces.pypp.cpp + AtomID.pypp.cpp AtomIDMatcher.pypp.cpp - ResStringProperty.pypp.cpp - SegFloatProperty.pypp.cpp - MoleculeGroup.pypp.cpp - ResNum.pypp.cpp - MatchAll_CGID_.pypp.cpp - NullPerturbation.pypp.cpp - MolInfo.pypp.cpp - PerturbationSymbols.pypp.cpp - MolEditor.pypp.cpp - SegEditorBase.pypp.cpp + AtomIdx.pypp.cpp + AtomIdxMatcher.pypp.cpp + AtomIntProperty.pypp.cpp + AtomIntegerArrayProperty.pypp.cpp + AtomMCSMatcher.pypp.cpp + AtomMasses.pypp.cpp + AtomMatchInverter.pypp.cpp + AtomMatcher.pypp.cpp + AtomMultiMatcher.pypp.cpp + AtomName.pypp.cpp + AtomNameMatcher.pypp.cpp AtomNum.pypp.cpp - MolResNum.pypp.cpp - MGIDsAndMaps.pypp.cpp - Specify_ResID_.pypp.cpp - AbsFromNumber.pypp.cpp - ChainStructureEditor.pypp.cpp - ConnectivityBase.pypp.cpp - Atom.pypp.cpp - IDAndSet_SegID_.pypp.cpp AtomPolarisabilities.pypp.cpp - Mover_Beads_.pypp.cpp - IDAndSet_MolID_.pypp.cpp - SegProp.pypp.cpp - ResProp.pypp.cpp - AnglePerturbation.pypp.cpp - AtomsIn_ChainID_.pypp.cpp + AtomProp.pypp.cpp + AtomPropertyList.pypp.cpp + AtomRadicals.pypp.cpp + AtomRadii.pypp.cpp AtomResultMatcher.pypp.cpp - AtomElements.pypp.cpp - SegStringProperty.pypp.cpp - AtomsIn_SegID_.pypp.cpp - ResIdxAtomMCSMatcher.pypp.cpp - AtomBeads.pypp.cpp - Mover_Residue_.pypp.cpp + AtomSelection.pypp.cpp + AtomStringArrayProperty.pypp.cpp + AtomStringProperty.pypp.cpp + AtomStructureEditor.pypp.cpp AtomVariantProperty.pypp.cpp - SegEditor.pypp.cpp - Selector_Residue_.pypp.cpp - ResEditorBase.pypp.cpp - BondPerturbation.pypp.cpp - Perturbations.pypp.cpp - MGNum.pypp.cpp - CGIntProperty.pypp.cpp - AngleID.pypp.cpp - Mover_Selector_Chain_.pypp.cpp - SegName.pypp.cpp - ResIn_ChainID_.pypp.cpp - MolNum.pypp.cpp - MoleculeProperty.pypp.cpp - Segment.pypp.cpp - AtomIdxMatcher.pypp.cpp - ResIntProperty.pypp.cpp - AtomIntegerArrayProperty.pypp.cpp - CGEditor.pypp.cpp - BeadIntProperty.pypp.cpp - ResIdxAtomCoordMatcher.pypp.cpp - ChainFloatProperty.pypp.cpp - AtomNameMatcher.pypp.cpp - Chain.pypp.cpp - GeometryPerturbation.pypp.cpp - MatchAll_ResID_.pypp.cpp - MatchAll_AtomID_.pypp.cpp - AtomEditor.pypp.cpp - ConnectivityEditor.pypp.cpp - MoleculeView.pypp.cpp - IDAndSet_MGID_.pypp.cpp - MolAtomID.pypp.cpp + AtomVelocities.pypp.cpp + AtomsIn_CGID_.pypp.cpp + AtomsIn_ChainID_.pypp.cpp + AtomsIn_ResID_.pypp.cpp + AtomsIn_SegID_.pypp.cpp + Bead.pypp.cpp + BeadEditor.pypp.cpp + BeadEditorBase.pypp.cpp + BeadFloatProperty.pypp.cpp + BeadID.pypp.cpp BeadIdx.pypp.cpp - BondID.pypp.cpp - CGsWithAtoms.pypp.cpp - AtomMatcher.pypp.cpp - AtomIdx.pypp.cpp - Mover_Selector_Atom_.pypp.cpp + BeadIntProperty.pypp.cpp + BeadNum.pypp.cpp + BeadProp.pypp.cpp + BeadStringProperty.pypp.cpp + BeadVariantProperty.pypp.cpp + Beading.pypp.cpp + Beads.pypp.cpp BondHunter.pypp.cpp - IDAndSet_ChainID_.pypp.cpp - ChainAtomID.pypp.cpp - RelFromMass.pypp.cpp - ChainsWithRes.pypp.cpp + BondID.pypp.cpp + BondPerturbation.pypp.cpp BondType.pypp.cpp - ResWithAtoms.pypp.cpp - ChainVariantProperty.pypp.cpp - AtomID.pypp.cpp - Beading.pypp.cpp - SegChainID.pypp.cpp - BeadEditorBase.pypp.cpp - SegIntProperty.pypp.cpp - MolName.pypp.cpp CGAtomID.pypp.cpp - CGProp.pypp.cpp - AtomRadii.pypp.cpp - _Mol_free_functions.pypp.cpp + CGAtomIdx.pypp.cpp + CGChainID.pypp.cpp + CGEditor.pypp.cpp + CGEditorBase.pypp.cpp + CGFloatProperty.pypp.cpp + CGID.pypp.cpp CGIdx.pypp.cpp - AtomCharges.pypp.cpp - SpecifyMol.pypp.cpp - GroupAtomIDBase.pypp.cpp - ResStructureEditor.pypp.cpp - Connectivity.pypp.cpp - GeometryPerturbations.pypp.cpp + CGIntProperty.pypp.cpp + CGName.pypp.cpp + CGProp.pypp.cpp + CGResID.pypp.cpp + CGStringProperty.pypp.cpp CGStructureEditor.pypp.cpp - MatchAll_ChainID_.pypp.cpp - Mover_PartialMolecule_.pypp.cpp - AtomName.pypp.cpp - SegsWithAtoms.pypp.cpp + CGVariantProperty.pypp.cpp + CGsWithAtoms.pypp.cpp + Chain.pypp.cpp + ChainAtomID.pypp.cpp + ChainEditor.pypp.cpp + ChainEditorBase.pypp.cpp + ChainFloatProperty.pypp.cpp + ChainID.pypp.cpp + ChainIdx.pypp.cpp + ChainIntProperty.pypp.cpp + ChainName.pypp.cpp + ChainProp.pypp.cpp ChainResID.pypp.cpp - AbsFromMass.pypp.cpp - SegCGID.pypp.cpp - ResVariantProperty.pypp.cpp - MGIdx.pypp.cpp - AtomCutting.pypp.cpp - MoleculeInfo.pypp.cpp - MoleculeGroups.pypp.cpp - MolIdx.pypp.cpp - AmberParameters.pypp.cpp - AtomStringProperty.pypp.cpp - Mover_CutGroup_.pypp.cpp + ChainStringProperty.pypp.cpp + ChainStructureEditor.pypp.cpp + ChainVariantProperty.pypp.cpp + ChainsWithAtoms.pypp.cpp + ChainsWithRes.pypp.cpp + ChargePerturbation.pypp.cpp + ChemicalBondHunter.pypp.cpp + Connectivity.pypp.cpp + ConnectivityBase.pypp.cpp + ConnectivityEditor.pypp.cpp CovalentBondHunter.pypp.cpp - ResIdx.pypp.cpp - ChainEditorBase.pypp.cpp - MolViewProperty.pypp.cpp + CovalentBondHunterParameters.pypp.cpp + CutGroup.pypp.cpp + CuttingFunction.pypp.cpp + DihedralID.pypp.cpp + DihedralPerturbation.pypp.cpp Element.pypp.cpp - AtomMultiMatcher.pypp.cpp - CGResID.pypp.cpp - ChainStringProperty.pypp.cpp - Velocity3D.pypp.cpp + Evaluator.pypp.cpp + EvaluatorM.pypp.cpp + Force3D.pypp.cpp + GeometryPerturbation.pypp.cpp + GeometryPerturbations.pypp.cpp + GroupAtomIDBase.pypp.cpp IDAndSet_AtomID_.pypp.cpp - BeadID.pypp.cpp + IDAndSet_CGID_.pypp.cpp + IDAndSet_ChainID_.pypp.cpp + IDAndSet_MGID_.pypp.cpp + IDAndSet_MolID_.pypp.cpp + IDAndSet_ResID_.pypp.cpp + IDAndSet_SegID_.pypp.cpp + IDOrSet_AtomID_.pypp.cpp + IDOrSet_CGID_.pypp.cpp + IDOrSet_ChainID_.pypp.cpp IDOrSet_MGID_.pypp.cpp - Mover_Segment_.pypp.cpp - CovalentBondHunterParameters.pypp.cpp - MoverBase.pypp.cpp - MolID.pypp.cpp - ResAtomID.pypp.cpp - Within.pypp.cpp - SegAtomID.pypp.cpp - BeadEditor.pypp.cpp - Evaluator.pypp.cpp - PartialMolecule.pypp.cpp - ResIdxAtomNameMatcher.pypp.cpp + IDOrSet_MolID_.pypp.cpp + IDOrSet_ResID_.pypp.cpp + IDOrSet_SegID_.pypp.cpp + ImproperID.pypp.cpp + InvertMatch_AtomID_.pypp.cpp + InvertMatch_CGID_.pypp.cpp + InvertMatch_ChainID_.pypp.cpp InvertMatch_ResID_.pypp.cpp - NullGeometryPerturbation.pypp.cpp - Mover_Selector_Segment_.pypp.cpp - CGName.pypp.cpp + InvertMatch_SegID_.pypp.cpp + MGID.pypp.cpp + MGIDsAndMaps.pypp.cpp + MGIdx.pypp.cpp + MGName.pypp.cpp + MGNum.pypp.cpp + MatchAll_AtomID_.pypp.cpp + MatchAll_CGID_.pypp.cpp + MatchAll_ChainID_.pypp.cpp + MatchAll_ResID_.pypp.cpp + MatchAll_SegID_.pypp.cpp + MolAtomID.pypp.cpp + MolEditor.pypp.cpp + MolEditorBase.pypp.cpp + MolGroupsBase.pypp.cpp + MolID.pypp.cpp + MolIdx.pypp.cpp + MolInfo.pypp.cpp + MolName.pypp.cpp + MolNum.pypp.cpp + MolResID.pypp.cpp + MolResNum.pypp.cpp MolStructureEditor.pypp.cpp - RelFromNumber.pypp.cpp - InvertMatch_AtomID_.pypp.cpp - AtomPropertyList.pypp.cpp - Selector_Segment_.pypp.cpp - IDOrSet_SegID_.pypp.cpp - Mover_Bead_.pypp.cpp + MolViewProperty.pypp.cpp MolWithResID.pypp.cpp - Select.pypp.cpp - AtomSelection.pypp.cpp - ChainIdx.pypp.cpp - AtomStructureEditor.pypp.cpp - Force3D.pypp.cpp - ChemicalBondHunter.pypp.cpp - IDAndSet_CGID_.pypp.cpp - BeadStringProperty.pypp.cpp - AtomMCSMatcher.pypp.cpp - AtomEditorBase.pypp.cpp - AtomForces.pypp.cpp - InvertMatch_SegID_.pypp.cpp + Molecule.pypp.cpp + MoleculeBeading.pypp.cpp + MoleculeGroup.pypp.cpp + MoleculeGroups.pypp.cpp + MoleculeInfo.pypp.cpp + MoleculeProperty.pypp.cpp + MoleculeView.pypp.cpp + Molecules.pypp.cpp + MoverBase.pypp.cpp + Mover_Atom_.pypp.cpp + Mover_Bead_.pypp.cpp + Mover_Beads_.pypp.cpp + Mover_Chain_.pypp.cpp + Mover_CutGroup_.pypp.cpp + Mover_Molecule_.pypp.cpp + Mover_PartialMolecule_.pypp.cpp + Mover_Residue_.pypp.cpp + Mover_Segment_.pypp.cpp + Mover_Selector_Atom_.pypp.cpp + Mover_Selector_Chain_.pypp.cpp + Mover_Selector_CutGroup_.pypp.cpp + Mover_Selector_Residue_.pypp.cpp + Mover_Selector_Segment_.pypp.cpp + NullBeading.pypp.cpp + NullBondHunter.pypp.cpp + NullGeometryPerturbation.pypp.cpp + NullPerturbation.pypp.cpp + PartialMolecule.pypp.cpp + Perturbation.pypp.cpp + PerturbationSymbols.pypp.cpp + Perturbations.pypp.cpp + Radical.pypp.cpp + RelFromMass.pypp.cpp + RelFromNumber.pypp.cpp + ResAtomID.pypp.cpp + ResEditor.pypp.cpp + ResEditorBase.pypp.cpp + ResFloatProperty.pypp.cpp + ResID.pypp.cpp + ResIdx.pypp.cpp + ResIdxAtomCoordMatcher.pypp.cpp + ResIdxAtomMCSMatcher.pypp.cpp + ResIdxAtomNameMatcher.pypp.cpp + ResIn_ChainID_.pypp.cpp + ResIntProperty.pypp.cpp + ResName.pypp.cpp + ResNum.pypp.cpp + ResNumAtomNameMatcher.pypp.cpp + ResProp.pypp.cpp + ResStringProperty.pypp.cpp + ResStructureEditor.pypp.cpp + ResVariantProperty.pypp.cpp + ResWithAtoms.pypp.cpp + Residue.pypp.cpp + ResidueBeading.pypp.cpp + ResidueCutting.pypp.cpp + SegAtomID.pypp.cpp + SegCGID.pypp.cpp + SegChainID.pypp.cpp + SegEditor.pypp.cpp + SegEditorBase.pypp.cpp + SegFloatProperty.pypp.cpp SegID.pypp.cpp - BeadVariantProperty.pypp.cpp + SegIdx.pypp.cpp + SegIntProperty.pypp.cpp + SegName.pypp.cpp + SegProp.pypp.cpp + SegResID.pypp.cpp + SegStringProperty.pypp.cpp + SegStructureEditor.pypp.cpp + SegVariantProperty.pypp.cpp + Segment.pypp.cpp + SegsWithAtoms.pypp.cpp + Select.pypp.cpp + SelectResult.pypp.cpp + SelectResultMover.pypp.cpp + SelectorM_Atom_.pypp.cpp + SelectorM_Chain_.pypp.cpp + SelectorM_CutGroup_.pypp.cpp + SelectorM_Residue_.pypp.cpp + SelectorM_Segment_.pypp.cpp + SelectorMol.pypp.cpp Selector_Atom_.pypp.cpp - CGChainID.pypp.cpp + Selector_Chain_.pypp.cpp + Selector_CutGroup_.pypp.cpp + Selector_Residue_.pypp.cpp + Selector_Segment_.pypp.cpp + SpecifyMol.pypp.cpp + Specify_AtomID_.pypp.cpp + Specify_CGID_.pypp.cpp + Specify_ChainID_.pypp.cpp + Specify_MGID_.pypp.cpp + Specify_ResID_.pypp.cpp + Specify_SegID_.pypp.cpp + Stereoscopy.pypp.cpp UserBeading.pypp.cpp - BeadProp.pypp.cpp - ChainsWithAtoms.pypp.cpp - CuttingFunction.pypp.cpp - ResFloatProperty.pypp.cpp - Residue.pypp.cpp - CutGroup.pypp.cpp - IDOrSet_ResID_.pypp.cpp + Velocity3D.pypp.cpp VolumeMap.pypp.cpp - CGStringProperty.pypp.cpp - ResName.pypp.cpp + WeightFunction.pypp.cpp + Within.pypp.cpp + _Mol_free_functions.pypp.cpp SireMol_containers.cpp SireMol_properties.cpp SireMol_registrars.cpp diff --git a/wrapper/Mol/CMakeLists.txt b/wrapper/Mol/CMakeLists.txt index 906e993ee..02f5c0b8c 100644 --- a/wrapper/Mol/CMakeLists.txt +++ b/wrapper/Mol/CMakeLists.txt @@ -6,7 +6,7 @@ # Third Party dependencies of this module include_directories( ${BOOST_INCLUDE_DIR} - ${PYTHON_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} ${SIRE_GSL_INCLUDE_PATH} ) # Sire include paths @@ -32,7 +32,7 @@ set ( WRAPMOL_SOURCES # Create the library that holds all of the class wrappers add_library (Mol ${WRAPMOL_SOURCES}) -set_target_properties (Mol +set_target_properties (Mol PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -40,20 +40,20 @@ set_target_properties (Mol PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Mol SirePython SIRE_SireID SIRE_SireMol SIRE_SireMM - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Mol" "_init_Mol" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Mol ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Mol ) install( TARGETS Mol LIBRARY DESTINATION ${INSTALLDIR} @@ -62,6 +62,6 @@ install( TARGETS Mol ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Mol/Chain.pypp.cpp b/wrapper/Mol/Chain.pypp.cpp index 5180c6b3a..becb0bb3e 100644 --- a/wrapper/Mol/Chain.pypp.cpp +++ b/wrapper/Mol/Chain.pypp.cpp @@ -73,6 +73,8 @@ SireMol::Chain __copy__(const SireMol::Chain &other){ return SireMol::Chain(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Chain_class(){ @@ -92,6 +94,7 @@ void register_Chain_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this chain has an ChainProperty piece of metadata\nat metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -104,6 +107,7 @@ void register_Chain_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that the property at key key has an ChainProperty\npiece of metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -116,6 +120,7 @@ void register_Chain_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this chain has an ChainProperty at key key\nThrow: SireBase::missing_property\n" ); } @@ -127,6 +132,7 @@ void register_Chain_class(){ Chain_exposer.def( "atomIdxs" , atomIdxs_function_value + , bp::release_gil_policy() , "Return the indicies of the atoms in this chain, in the\norder that they appear in this chain" ); } @@ -139,6 +145,7 @@ void register_Chain_class(){ "contains" , contains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not this chain contains the atom\nat index atomidx" ); } @@ -151,6 +158,7 @@ void register_Chain_class(){ "contains" , contains_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this chain contains all of\nthe atoms identified by the ID atomid" ); } @@ -163,6 +171,7 @@ void register_Chain_class(){ "contains" , contains_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether or not this chain contains the\nresidue at index residx" ); } @@ -175,6 +184,7 @@ void register_Chain_class(){ "contains" , contains_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not this chain contains all\nof the residues identified by the ID resid" ); } @@ -186,6 +196,7 @@ void register_Chain_class(){ Chain_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an editor that can edit this chain" ); } @@ -197,6 +208,7 @@ void register_Chain_class(){ Chain_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an evaluator that can evaluate properties\nof this chain" ); } @@ -209,6 +221,7 @@ void register_Chain_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not there is a ChainProperty at metakey metakey" ); } @@ -221,6 +234,7 @@ void register_Chain_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether the metadata at metakey metakey for the property\nat key key is a ChainProperty\nThrow: SireBase::missing_property\n" ); } @@ -233,6 +247,7 @@ void register_Chain_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not there is a ChainProperty at key key" ); } @@ -244,6 +259,7 @@ void register_Chain_class(){ Chain_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this chain in the molecule" ); } @@ -256,6 +272,7 @@ void register_Chain_class(){ "intersects" , intersects_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this chain contains some of\nthe atoms identified by the ID atomid" ); } @@ -268,6 +285,7 @@ void register_Chain_class(){ "intersects" , intersects_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not this chain contains some\nof the residues identified by the ID resid" ); } @@ -279,6 +297,7 @@ void register_Chain_class(){ Chain_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Is this chain empty?" ); } @@ -290,6 +309,7 @@ void register_Chain_class(){ Chain_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the metakeys of all ChainProperty metadata" ); } @@ -302,6 +322,7 @@ void register_Chain_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the metakeys of all ChainProperty metadata for\nthe property at key key\nThrow: SireBase::missing_property\n" ); } @@ -313,6 +334,7 @@ void register_Chain_class(){ Chain_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return an object that can move a copy of this chain" ); } @@ -324,6 +346,7 @@ void register_Chain_class(){ Chain_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this Chain" ); } @@ -335,6 +358,7 @@ void register_Chain_class(){ Chain_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of residues in this chain" ); } @@ -346,8 +370,21 @@ void register_Chain_class(){ Chain_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of this chain" ); + } + { //::SireMol::Chain::number + + typedef ::SireMol::ChainIdx ( ::SireMol::Chain::*number_function_type)( ) const; + number_function_type number_function_value( &::SireMol::Chain::number ); + + Chain_exposer.def( + "number" + , number_function_value + , bp::release_gil_policy() + , "Return the number of this chain (same as its index)" ); + } Chain_exposer.def( bp::self != bp::self ); { //::SireMol::Chain::operator= @@ -364,6 +401,80 @@ void register_Chain_class(){ } Chain_exposer.def( bp::self == bp::self ); + { //::SireMol::Chain::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMol::Chain::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Chain::operator[] ); + + Chain_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Chain::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMol::Chain::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Chain::operator[] ); + + Chain_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Chain::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMol::Chain::*__getitem___function_type)( ::SireID::Index const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Chain::operator[] ); + + Chain_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + + } + { //::SireMol::Chain::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMol::Chain::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Chain::operator[] ); + + Chain_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Chain::propertyAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::Chain::*propertyAsProperty_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsProperty_function_type propertyAsProperty_function_value( &::SireMol::Chain::propertyAsProperty ); + + Chain_exposer.def( + "propertyAsProperty" + , propertyAsProperty_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a PropertyPtr" ); + + } + { //::SireMol::Chain::propertyAsVariant + + typedef ::QVariant ( ::SireMol::Chain::*propertyAsVariant_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsVariant_function_type propertyAsVariant_function_value( &::SireMol::Chain::propertyAsVariant ); + + Chain_exposer.def( + "propertyAsVariant" + , propertyAsVariant_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a QVariant" ); + + } { //::SireMol::Chain::propertyKeys typedef ::QStringList ( ::SireMol::Chain::*propertyKeys_function_type)( ) const; @@ -372,6 +483,7 @@ void register_Chain_class(){ Chain_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys of all ChainProperty properties" ); } @@ -395,6 +507,7 @@ void register_Chain_class(){ Chain_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Is this chain the entire molecule?" ); } @@ -406,6 +519,7 @@ void register_Chain_class(){ Chain_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the atoms that are in this chain" ); } @@ -417,8 +531,21 @@ void register_Chain_class(){ Chain_exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "Return a selector that change the selection of chains" ); + } + { //::SireMol::Chain::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Chain::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Chain::toSelector ); + + Chain_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Chain::toString @@ -428,6 +555,7 @@ void register_Chain_class(){ Chain_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this chain" ); } @@ -439,6 +567,7 @@ void register_Chain_class(){ Chain_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -451,6 +580,7 @@ void register_Chain_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this chain with the passed molecule data.\nThrow: SireError::incompatible_error\n" ); } diff --git a/wrapper/Mol/ChainAtomID.pypp.cpp b/wrapper/Mol/ChainAtomID.pypp.cpp index 4d8fa5d20..2b374c39c 100644 --- a/wrapper/Mol/ChainAtomID.pypp.cpp +++ b/wrapper/Mol/ChainAtomID.pypp.cpp @@ -31,6 +31,8 @@ SireMol::GroupAtomID __copy__(const SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainAtomID_class(){ { //::SireMol::GroupAtomID< SireMol::ChainID, SireMol::AtomID > @@ -48,6 +50,7 @@ void register_ChainAtomID_class(){ ChainAtomID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +63,7 @@ void register_ChainAtomID_class(){ ChainAtomID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +77,7 @@ void register_ChainAtomID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +93,7 @@ void register_ChainAtomID_class(){ ChainAtomID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_ChainAtomID_class(){ ChainAtomID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -112,6 +119,7 @@ void register_ChainAtomID_class(){ ChainAtomID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainEditor.pypp.cpp b/wrapper/Mol/ChainEditor.pypp.cpp index f4c06f225..d1d4c863c 100644 --- a/wrapper/Mol/ChainEditor.pypp.cpp +++ b/wrapper/Mol/ChainEditor.pypp.cpp @@ -47,6 +47,8 @@ SireMol::ChainEditor __copy__(const SireMol::ChainEditor &other){ return SireMol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ChainEditor_class(){ @@ -66,6 +68,7 @@ void register_ChainEditor_class(){ "add" , add_function_value , ( bp::arg("resname") ) + , bp::release_gil_policy() , "Add a residue called resname to this Chain and return\nan editor for that residue" ); } @@ -78,6 +81,7 @@ void register_ChainEditor_class(){ "add" , add_function_value , ( bp::arg("atomnum") ) + , bp::release_gil_policy() , "Add a residue with number resnum to this Chain and return\nan editor for that residue" ); } @@ -89,6 +93,7 @@ void register_ChainEditor_class(){ ChainEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the\nupdated Chain" ); } @@ -127,6 +132,7 @@ void register_ChainEditor_class(){ "reindex" , reindex_function_value , ( bp::arg("index") ) + , bp::release_gil_policy() , "Move this Chain to index newidx - this will move it\nto the start or end if this index is out of range" ); } @@ -138,6 +144,7 @@ void register_ChainEditor_class(){ ChainEditor_exposer.def( "remove" , remove_function_value + , bp::release_gil_policy() , "Complete remove this Chain, and return an editor\nfor the molecule that contained it" ); } @@ -150,6 +157,7 @@ void register_ChainEditor_class(){ "remove" , remove_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Remove the atom that matches the ID atomid from this chain\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -162,6 +170,7 @@ void register_ChainEditor_class(){ "remove" , remove_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Completely remove all residues that match the ID resid from\nthis Chain\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -174,6 +183,7 @@ void register_ChainEditor_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the ith residue from this Chain\nThrow: SireError::invalid_index\n" ); } @@ -198,6 +208,7 @@ void register_ChainEditor_class(){ ChainEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this chain" ); } @@ -210,6 +221,7 @@ void register_ChainEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("resid"), bp::arg("chainid") ) + , bp::release_gil_policy() , "Transfer all residues that match the ID resid in this Chain\nto the Chain that matches the ID cgid\nThrow: SireMol::missing_residue\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -222,6 +234,7 @@ void register_ChainEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("i"), bp::arg("chainid") ) + , bp::release_gil_policy() , "Transfer the ith residue of this Chain into the Chain identified\nby the ID cgid\nThrow: SireError::invalid_index\n" ); } @@ -234,6 +247,7 @@ void register_ChainEditor_class(){ "transferAll" , transferAll_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Completely transfer all of the residues in this Chain to\nthe Chain that matches the ID cgid\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -245,6 +259,7 @@ void register_ChainEditor_class(){ ChainEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainEditorBase.pypp.cpp b/wrapper/Mol/ChainEditorBase.pypp.cpp index b35c86d22..c68cd07b1 100644 --- a/wrapper/Mol/ChainEditorBase.pypp.cpp +++ b/wrapper/Mol/ChainEditorBase.pypp.cpp @@ -85,6 +85,8 @@ SireMol::ChainEditorBase& set_Metadata_SireMol_ChainVariantProperty_function2( #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ChainEditorBase_class(){ @@ -102,6 +104,33 @@ void register_ChainEditorBase_class(){ ChainEditorBase_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::atom + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*atom_function_type)( int,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::atom ); + + ChainEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::atom + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::atom ); + + ChainEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -127,6 +156,33 @@ void register_ChainEditorBase_class(){ ChainEditorBase_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::chain + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*chain_function_type)( int,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::chain ); + + ChainEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::chain + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::chain ); + + ChainEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -152,6 +208,33 @@ void register_ChainEditorBase_class(){ ChainEditorBase_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::cutGroup + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::cutGroup ); + + ChainEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::cutGroup + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::cutGroup ); + + ChainEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -177,6 +260,7 @@ void register_ChainEditorBase_class(){ ChainEditorBase_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +291,110 @@ void register_ChainEditorBase_class(){ , bp::return_self< >() , "" ); + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( int ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( ::QString const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( ::SireMol::AtomID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( ::SireMol::ResID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( ::SireMol::CGID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( ::SireMol::ChainID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( ::SireMol::SegID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("segid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*__getitem___function_type)( ::SireID::Index const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::operator[] ); + + ChainEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::removeMetadata @@ -259,6 +447,33 @@ void register_ChainEditorBase_class(){ ChainEditorBase_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::residue + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*residue_function_type)( int,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::residue ); + + ChainEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::residue + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::residue ); + + ChainEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -284,6 +499,33 @@ void register_ChainEditorBase_class(){ ChainEditorBase_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::segment + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*segment_function_type)( int,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::segment ); + + ChainEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::segment + + typedef SireMol::Editor< SireMol::ChainEditor, SireMol::Chain > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::ChainEditor, SireMol::Chain >::segment ); + + ChainEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } diff --git a/wrapper/Mol/ChainFloatProperty.pypp.cpp b/wrapper/Mol/ChainFloatProperty.pypp.cpp index 2a5ebd194..a5110f836 100644 --- a/wrapper/Mol/ChainFloatProperty.pypp.cpp +++ b/wrapper/Mol/ChainFloatProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ChainProperty __copy__(const SireMol::ChainProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ChainFloatProperty_class(){ @@ -55,6 +57,7 @@ void register_ChainFloatProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_ChainFloatProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_ChainFloatProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_ChainFloatProperty_class(){ ChainFloatProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_ChainFloatProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_ChainFloatProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::ChainProperty< double >::getAsProperty + + typedef SireMol::ChainProperty< double > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ChainProperty< double >::*getAsProperty_function_type)( ::SireMol::ChainIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ChainProperty< double >::getAsProperty ); + + ChainFloatProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ChainProperty< double >::getAsVariant + + typedef SireMol::ChainProperty< double > exported_class_t; + typedef ::QVariant ( ::SireMol::ChainProperty< double >::*getAsVariant_function_type)( ::SireMol::ChainIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ChainProperty< double >::getAsVariant ); + + ChainFloatProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ChainProperty< double >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ChainFloatProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ChainFloatProperty_class(){ ChainFloatProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ChainFloatProperty_class(){ ChainFloatProperty_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ChainFloatProperty_class(){ ChainFloatProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ChainFloatProperty_class(){ ChainFloatProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ChainFloatProperty_class(){ ChainFloatProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ChainFloatProperty_class(){ ChainFloatProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainID.pypp.cpp b/wrapper/Mol/ChainID.pypp.cpp index ba2615102..2c740d046 100644 --- a/wrapper/Mol/ChainID.pypp.cpp +++ b/wrapper/Mol/ChainID.pypp.cpp @@ -51,6 +51,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainID_class(){ { //::SireMol::ChainID @@ -65,6 +67,7 @@ void register_ChainID_class(){ ChainID_exposer.def( "any" , any_function_value + , bp::release_gil_policy() , "Return a match for any chains" ); } @@ -77,6 +80,7 @@ void register_ChainID_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return a specific atom in the matching residues" ); } @@ -88,6 +92,7 @@ void register_ChainID_class(){ ChainID_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return the atoms in the matching residues" ); } @@ -100,8 +105,22 @@ void register_ChainID_class(){ "atoms" , atoms_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return a range of atoms in the matching residues" ); + } + { //::SireMol::ChainID::fromString + + typedef ::SireMol::ChainIdentifier ( *fromString_function_type )( ::QString const & ); + fromString_function_type fromString_function_value( &::SireMol::ChainID::fromString ); + + ChainID_exposer.def( + "fromString" + , fromString_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return an AtomID constructed from the passed string" ); + } { //::SireMol::ChainID::inverse @@ -111,6 +130,7 @@ void register_ChainID_class(){ ChainID_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Inverse this match" ); } @@ -122,6 +142,7 @@ void register_ChainID_class(){ ChainID_exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "Inverse this match" ); } @@ -134,6 +155,7 @@ void register_ChainID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID back to the indicies of the chains in the molecule,\nusing the passed MoleculeInfo to do the mapping" ); } @@ -253,6 +275,7 @@ void register_ChainID_class(){ "residue" , residue_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return a specific atom in the matching residues" ); } @@ -264,6 +287,7 @@ void register_ChainID_class(){ ChainID_exposer.def( "residues" , residues_function_value + , bp::release_gil_policy() , "Return the atoms in the matching residues" ); } @@ -276,6 +300,7 @@ void register_ChainID_class(){ "residues" , residues_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return a range of atoms in the matching residues" ); } @@ -383,10 +408,12 @@ void register_ChainID_class(){ ChainID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } ChainID_exposer.staticmethod( "any" ); + ChainID_exposer.staticmethod( "fromString" ); ChainID_exposer.staticmethod( "typeName" ); ChainID_exposer.def( "__str__", &__str__< ::SireMol::ChainID > ); ChainID_exposer.def( "__repr__", &__str__< ::SireMol::ChainID > ); diff --git a/wrapper/Mol/ChainIdx.pypp.cpp b/wrapper/Mol/ChainIdx.pypp.cpp index cbfbc221d..b0e58ba3b 100644 --- a/wrapper/Mol/ChainIdx.pypp.cpp +++ b/wrapper/Mol/ChainIdx.pypp.cpp @@ -59,6 +59,8 @@ SireMol::ChainIdx __copy__(const SireMol::ChainIdx &other){ return SireMol::Chai #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainIdx_class(){ { //::SireMol::ChainIdx @@ -75,6 +77,7 @@ void register_ChainIdx_class(){ ChainIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +89,7 @@ void register_ChainIdx_class(){ ChainIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +102,7 @@ void register_ChainIdx_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -109,6 +114,7 @@ void register_ChainIdx_class(){ ChainIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -133,6 +139,7 @@ void register_ChainIdx_class(){ ChainIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +151,7 @@ void register_ChainIdx_class(){ ChainIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +163,7 @@ void register_ChainIdx_class(){ ChainIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainIntProperty.pypp.cpp b/wrapper/Mol/ChainIntProperty.pypp.cpp index 1d7553a16..eaea64897 100644 --- a/wrapper/Mol/ChainIntProperty.pypp.cpp +++ b/wrapper/Mol/ChainIntProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ChainProperty __copy__(const SireMol::ChainProperty() , "" ); + } + { //::SireMol::ChainProperty< long long >::getAsProperty + + typedef SireMol::ChainProperty< long long > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ChainProperty< long long >::*getAsProperty_function_type)( ::SireMol::ChainIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ChainProperty< long long >::getAsProperty ); + + ChainIntProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ChainProperty< long long >::getAsVariant + + typedef SireMol::ChainProperty< long long > exported_class_t; + typedef ::QVariant ( ::SireMol::ChainProperty< long long >::*getAsVariant_function_type)( ::SireMol::ChainIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ChainProperty< long long >::getAsVariant ); + + ChainIntProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ChainProperty< long long >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ChainIntProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ChainIntProperty_class(){ ChainIntProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ChainIntProperty_class(){ ChainIntProperty_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ChainIntProperty_class(){ ChainIntProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ChainIntProperty_class(){ ChainIntProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ChainIntProperty_class(){ ChainIntProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ChainIntProperty_class(){ ChainIntProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainName.pypp.cpp b/wrapper/Mol/ChainName.pypp.cpp index 8a604ee4e..d4b9939cb 100644 --- a/wrapper/Mol/ChainName.pypp.cpp +++ b/wrapper/Mol/ChainName.pypp.cpp @@ -59,6 +59,8 @@ SireMol::ChainName __copy__(const SireMol::ChainName &other){ return SireMol::Ch #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainName_class(){ { //::SireMol::ChainName @@ -76,6 +78,7 @@ void register_ChainName_class(){ ChainName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_ChainName_class(){ ChainName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_ChainName_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_ChainName_class(){ ChainName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +143,7 @@ void register_ChainName_class(){ ChainName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +155,7 @@ void register_ChainName_class(){ ChainName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainProp.pypp.cpp b/wrapper/Mol/ChainProp.pypp.cpp index 6f1e6501c..cdbdf812f 100644 --- a/wrapper/Mol/ChainProp.pypp.cpp +++ b/wrapper/Mol/ChainProp.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainProp_class(){ { //::SireMol::ChainProp @@ -30,6 +32,7 @@ void register_ChainProp_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -42,6 +45,7 @@ void register_ChainProp_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +58,33 @@ void register_ChainProp_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ChainProp::getAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::ChainProp::*getAsProperty_function_type)( ::SireMol::ChainIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ChainProp::getAsProperty ); + + ChainProp_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("chainidx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ChainProp::getAsVariant + + typedef ::QVariant ( ::SireMol::ChainProp::*getAsVariant_function_type)( ::SireMol::ChainIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ChainProp::getAsVariant ); + + ChainProp_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +96,7 @@ void register_ChainProp_class(){ ChainProp_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainResID.pypp.cpp b/wrapper/Mol/ChainResID.pypp.cpp index 6e8eb1d9d..13a7f4daf 100644 --- a/wrapper/Mol/ChainResID.pypp.cpp +++ b/wrapper/Mol/ChainResID.pypp.cpp @@ -25,6 +25,8 @@ SireMol::ChainResID __copy__(const SireMol::ChainResID &other){ return SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainResID_class(){ { //::SireMol::ChainResID @@ -41,6 +43,7 @@ void register_ChainResID_class(){ ChainResID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -52,6 +55,7 @@ void register_ChainResID_class(){ ChainResID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -64,6 +68,7 @@ void register_ChainResID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -78,6 +83,7 @@ void register_ChainResID_class(){ ChainResID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -89,6 +95,7 @@ void register_ChainResID_class(){ ChainResID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +107,7 @@ void register_ChainResID_class(){ ChainResID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainStringProperty.pypp.cpp b/wrapper/Mol/ChainStringProperty.pypp.cpp index e845c7b51..a81215cc4 100644 --- a/wrapper/Mol/ChainStringProperty.pypp.cpp +++ b/wrapper/Mol/ChainStringProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ChainProperty __copy__(const SireMol::ChainProperty & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ChainStringProperty_class(){ @@ -55,6 +57,7 @@ void register_ChainStringProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_ChainStringProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_ChainStringProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_ChainStringProperty_class(){ ChainStringProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_ChainStringProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_ChainStringProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::ChainProperty< QString >::getAsProperty + + typedef SireMol::ChainProperty< QString > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ChainProperty< QString >::*getAsProperty_function_type)( ::SireMol::ChainIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ChainProperty< QString >::getAsProperty ); + + ChainStringProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ChainProperty< QString >::getAsVariant + + typedef SireMol::ChainProperty< QString > exported_class_t; + typedef ::QVariant ( ::SireMol::ChainProperty< QString >::*getAsVariant_function_type)( ::SireMol::ChainIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ChainProperty< QString >::getAsVariant ); + + ChainStringProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ChainProperty< QString >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ChainStringProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ChainStringProperty_class(){ ChainStringProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ChainStringProperty_class(){ ChainStringProperty_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ChainStringProperty_class(){ ChainStringProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ChainStringProperty_class(){ ChainStringProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ChainStringProperty_class(){ ChainStringProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ChainStringProperty_class(){ ChainStringProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainStructureEditor.pypp.cpp b/wrapper/Mol/ChainStructureEditor.pypp.cpp index de29e0667..f451840d0 100644 --- a/wrapper/Mol/ChainStructureEditor.pypp.cpp +++ b/wrapper/Mol/ChainStructureEditor.pypp.cpp @@ -48,6 +48,8 @@ SireMol::ChainStructureEditor __copy__(const SireMol::ChainStructureEditor &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainStructureEditor_class(){ { //::SireMol::ChainStructureEditor @@ -66,6 +68,7 @@ void register_ChainStructureEditor_class(){ "add" , add_function_value , ( bp::arg("resname") ) + , bp::release_gil_policy() , "Add a residue called resname to this Chain and return\nan editor for that residue" ); } @@ -78,6 +81,7 @@ void register_ChainStructureEditor_class(){ "add" , add_function_value , ( bp::arg("resnum") ) + , bp::release_gil_policy() , "Add a residue with number resnum to this Chain and return\nan editor for that residue" ); } @@ -90,6 +94,7 @@ void register_ChainStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom that matches the ID atomid in\nthis Chain\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -101,6 +106,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the\nupdated Chain" ); } @@ -112,6 +118,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this Chain in the molecule" ); } @@ -123,6 +130,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "Return an editor for the molecule that contains this Chain" ); } @@ -134,6 +142,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this Chain (could be zero)" ); } @@ -145,6 +154,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of residues in this Chain (could be zero)" ); } @@ -156,7 +166,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this Chain" ); } @@ -272,6 +282,7 @@ void register_ChainStructureEditor_class(){ "residue" , residue_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith residue of this Chain\nThrow: SireError::invalid_index\n" ); } @@ -284,6 +295,7 @@ void register_ChainStructureEditor_class(){ "residue" , residue_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return an editor for the residue that matches the ID resid in\nthis chain\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -296,6 +308,7 @@ void register_ChainStructureEditor_class(){ "select" , select_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom that matches the ID atomid in\nthis Chain\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -308,6 +321,7 @@ void register_ChainStructureEditor_class(){ "select" , select_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith residue of this Chain\nThrow: SireError::invalid_index\n" ); } @@ -320,6 +334,7 @@ void register_ChainStructureEditor_class(){ "select" , select_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return an editor for the residue that matches the ID resid in\nthis chain\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -331,6 +346,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this chain is the whole molecule" ); } @@ -342,6 +358,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this chain" ); } @@ -392,6 +409,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -403,6 +421,7 @@ void register_ChainStructureEditor_class(){ ChainStructureEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainVariantProperty.pypp.cpp b/wrapper/Mol/ChainVariantProperty.pypp.cpp index c51e63547..b89dd67d1 100644 --- a/wrapper/Mol/ChainVariantProperty.pypp.cpp +++ b/wrapper/Mol/ChainVariantProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ChainProperty __copy__(const SireMol::ChainProperty #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ChainVariantProperty_class(){ @@ -55,6 +57,7 @@ void register_ChainVariantProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_ChainVariantProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_ChainVariantProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_ChainVariantProperty_class(){ ChainVariantProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_ChainVariantProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_ChainVariantProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::ChainProperty< QVariant >::getAsProperty + + typedef SireMol::ChainProperty< QVariant > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ChainProperty< QVariant >::*getAsProperty_function_type)( ::SireMol::ChainIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ChainProperty< QVariant >::getAsProperty ); + + ChainVariantProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ChainProperty< QVariant >::getAsVariant + + typedef SireMol::ChainProperty< QVariant > exported_class_t; + typedef ::QVariant ( ::SireMol::ChainProperty< QVariant >::*getAsVariant_function_type)( ::SireMol::ChainIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ChainProperty< QVariant >::getAsVariant ); + + ChainVariantProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ChainProperty< QVariant >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ChainVariantProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ChainVariantProperty_class(){ ChainVariantProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ChainVariantProperty_class(){ ChainVariantProperty_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ChainVariantProperty_class(){ ChainVariantProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ChainVariantProperty_class(){ ChainVariantProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ChainVariantProperty_class(){ ChainVariantProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ChainVariantProperty_class(){ ChainVariantProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainsWithAtoms.pypp.cpp b/wrapper/Mol/ChainsWithAtoms.pypp.cpp index 7caa71425..5fb6ce3ef 100644 --- a/wrapper/Mol/ChainsWithAtoms.pypp.cpp +++ b/wrapper/Mol/ChainsWithAtoms.pypp.cpp @@ -22,6 +22,8 @@ SireMol::ChainsWithAtoms __copy__(const SireMol::ChainsWithAtoms &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainsWithAtoms_class(){ { //::SireMol::ChainsWithAtoms @@ -38,7 +40,7 @@ void register_ChainsWithAtoms_class(){ ChainsWithAtoms_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the atom ID" ); } @@ -50,6 +52,7 @@ void register_ChainsWithAtoms_class(){ ChainsWithAtoms_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this identifier" ); } @@ -61,6 +64,7 @@ void register_ChainsWithAtoms_class(){ ChainsWithAtoms_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Is this selection null?" ); } @@ -73,6 +77,7 @@ void register_ChainsWithAtoms_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the list of indicies of chains that match this ID\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -100,6 +105,7 @@ void register_ChainsWithAtoms_class(){ ChainsWithAtoms_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representatio of this ID" ); } @@ -111,6 +117,7 @@ void register_ChainsWithAtoms_class(){ ChainsWithAtoms_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_ChainsWithAtoms_class(){ ChainsWithAtoms_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChainsWithRes.pypp.cpp b/wrapper/Mol/ChainsWithRes.pypp.cpp index 0a22aa79e..fc57fa954 100644 --- a/wrapper/Mol/ChainsWithRes.pypp.cpp +++ b/wrapper/Mol/ChainsWithRes.pypp.cpp @@ -22,6 +22,8 @@ SireMol::ChainsWithRes __copy__(const SireMol::ChainsWithRes &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChainsWithRes_class(){ { //::SireMol::ChainsWithRes @@ -38,6 +40,7 @@ void register_ChainsWithRes_class(){ ChainsWithRes_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this identifier" ); } @@ -49,6 +52,7 @@ void register_ChainsWithRes_class(){ ChainsWithRes_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Is this selection null?" ); } @@ -61,6 +65,7 @@ void register_ChainsWithRes_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the list of indicies of chains that match this ID\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -88,7 +93,7 @@ void register_ChainsWithRes_class(){ ChainsWithRes_exposer.def( "resID" , resID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the residue ID" ); } @@ -100,6 +105,7 @@ void register_ChainsWithRes_class(){ ChainsWithRes_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representatio of this ID" ); } @@ -111,6 +117,7 @@ void register_ChainsWithRes_class(){ ChainsWithRes_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_ChainsWithRes_class(){ ChainsWithRes_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ChargePerturbation.pypp.cpp b/wrapper/Mol/ChargePerturbation.pypp.cpp index 14e4d573c..882cf3e08 100644 --- a/wrapper/Mol/ChargePerturbation.pypp.cpp +++ b/wrapper/Mol/ChargePerturbation.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "mover.hpp" +#include "selector.hpp" + #include "chargeperturbation.h" SireMol::ChargePerturbation __copy__(const SireMol::ChargePerturbation &other){ return SireMol::ChargePerturbation(other); } @@ -29,6 +31,8 @@ SireMol::ChargePerturbation __copy__(const SireMol::ChargePerturbation &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChargePerturbation_class(){ { //::SireMol::ChargePerturbation @@ -61,6 +65,7 @@ void register_ChargePerturbation_class(){ ChargePerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return the properties required or changed by this perturbation" ); } @@ -72,6 +77,7 @@ void register_ChargePerturbation_class(){ ChargePerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +89,7 @@ void register_ChargePerturbation_class(){ ChargePerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +102,7 @@ void register_ChargePerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/Mol/ChemicalBondHunter.pypp.cpp b/wrapper/Mol/ChemicalBondHunter.pypp.cpp index 4af4166e4..13030d2fb 100644 --- a/wrapper/Mol/ChemicalBondHunter.pypp.cpp +++ b/wrapper/Mol/ChemicalBondHunter.pypp.cpp @@ -49,6 +49,8 @@ SireMol::ChemicalBondHunter __copy__(const SireMol::ChemicalBondHunter &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChemicalBondHunter_class(){ { //::SireMol::ChemicalBondHunter @@ -77,6 +79,7 @@ void register_ChemicalBondHunter_class(){ ChemicalBondHunter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Connectivity.pypp.cpp b/wrapper/Mol/Connectivity.pypp.cpp index 4d7ba273c..1b8f6fe70 100644 --- a/wrapper/Mol/Connectivity.pypp.cpp +++ b/wrapper/Mol/Connectivity.pypp.cpp @@ -55,6 +55,8 @@ SireMol::Connectivity __copy__(const SireMol::Connectivity &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Connectivity_class(){ { //::SireMol::Connectivity @@ -74,6 +76,7 @@ void register_Connectivity_class(){ Connectivity_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an editor that can edit a copy of this connectivity" ); } @@ -113,6 +116,7 @@ void register_Connectivity_class(){ Connectivity_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ConnectivityBase.pypp.cpp b/wrapper/Mol/ConnectivityBase.pypp.cpp index 9b5ffb052..5f3cfd7cc 100644 --- a/wrapper/Mol/ConnectivityBase.pypp.cpp +++ b/wrapper/Mol/ConnectivityBase.pypp.cpp @@ -54,6 +54,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ConnectivityBase_class(){ { //::SireMol::ConnectivityBase @@ -69,6 +71,7 @@ void register_ConnectivityBase_class(){ "areAngled" , areAngled_function_value , ( bp::arg("atom0"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Return whether or not the two atoms are angled together" ); } @@ -81,6 +84,7 @@ void register_ConnectivityBase_class(){ "areAngled" , areAngled_function_value , ( bp::arg("atom0"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Return whether or not the two atoms are angled together" ); } @@ -93,6 +97,7 @@ void register_ConnectivityBase_class(){ "areBonded" , areBonded_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return whether or not the two atoms are bonded together" ); } @@ -105,6 +110,7 @@ void register_ConnectivityBase_class(){ "areBonded" , areBonded_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return whether or not the two atoms are bonded together" ); } @@ -117,6 +123,7 @@ void register_ConnectivityBase_class(){ "areConnected" , areConnected_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return whether or not the atoms at indicies atom0 and atom1\nare connected\nThrow: SireError::invalid_index\n" ); } @@ -129,6 +136,7 @@ void register_ConnectivityBase_class(){ "areConnected" , areConnected_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return whether or not the atoms identified by atom0 and atom1\nare connected\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -141,6 +149,7 @@ void register_ConnectivityBase_class(){ "areConnected" , areConnected_function_value , ( bp::arg("res0"), bp::arg("res1") ) + , bp::release_gil_policy() , "Return whether or not the residues at indicies res0 and res1\nare connected\nThrow: SireError::invalid_index\n" ); } @@ -153,6 +162,7 @@ void register_ConnectivityBase_class(){ "areConnected" , areConnected_function_value , ( bp::arg("res0"), bp::arg("res1") ) + , bp::release_gil_policy() , "Return whether the residues identified by res0 and res1 are connected" ); } @@ -165,6 +175,7 @@ void register_ConnectivityBase_class(){ "areConnected" , areConnected_function_value , ( bp::arg("cg0"), bp::arg("cg1") ) + , bp::release_gil_policy() , "Return whether or not the CutGroups at indicies cg0 and cg1 are\nconnected" ); } @@ -177,6 +188,7 @@ void register_ConnectivityBase_class(){ "areConnected" , areConnected_function_value , ( bp::arg("cg0"), bp::arg("cg1") ) + , bp::release_gil_policy() , "Return whether or not the CutGroups at indicies cg0 and cg1 are\nconnected" ); } @@ -189,6 +201,7 @@ void register_ConnectivityBase_class(){ "areDihedraled" , areDihedraled_function_value , ( bp::arg("atom0"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Return whether or not the two atoms are dihedraled together" ); } @@ -201,6 +214,7 @@ void register_ConnectivityBase_class(){ "areDihedraled" , areDihedraled_function_value , ( bp::arg("atom0"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Return whether or not the two atoms are bonded together" ); } @@ -213,6 +227,7 @@ void register_ConnectivityBase_class(){ "assertHasProperty" , assertHasProperty_function_value , ( bp::arg("bond"), bp::arg("key") ) + , bp::release_gil_policy() , "Assert that the specified bond has the specified property" ); } @@ -225,6 +240,7 @@ void register_ConnectivityBase_class(){ "connectionType" , connectionType_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return the connection type of the passed two atoms. This returns;\n" ); } @@ -237,6 +253,7 @@ void register_ConnectivityBase_class(){ "connectionType" , connectionType_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return the connection type of the passed two atoms. This returns;\n" ); } @@ -301,6 +318,7 @@ void register_ConnectivityBase_class(){ "findPath" , findPath_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Find the shortest bonded path between two atoms. This returns an empty\nlist if there is no bonded path between these two atoms" ); } @@ -313,6 +331,7 @@ void register_ConnectivityBase_class(){ "findPath" , findPath_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("max_length") ) + , bp::release_gil_policy() , "Find the shortest bonded path between two atoms where the path has\na maximum length. This returns an empty list if there is no bonded\npath between these two atoms" ); } @@ -325,6 +344,7 @@ void register_ConnectivityBase_class(){ "findPath" , findPath_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return all possible bonded paths between two atoms. This returns an empty\nlist if there are no bonded paths between the two atoms" ); } @@ -337,6 +357,7 @@ void register_ConnectivityBase_class(){ "findPath" , findPath_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("max_length") ) + , bp::release_gil_policy() , "Return all possible bonded paths between two atoms. This returns an empty\nlist if there are no bonded paths between the two atoms where the path has\na maximum length." ); } @@ -349,6 +370,7 @@ void register_ConnectivityBase_class(){ "findPaths" , findPaths_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return all possible bonded paths between two atoms. This returns an empty\nlist if there are no bonded paths between the two atoms" ); } @@ -361,6 +383,7 @@ void register_ConnectivityBase_class(){ "findPaths" , findPaths_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("max_length") ) + , bp::release_gil_policy() , "Return all possible bonded paths between two atoms where the path has\na maximum length. This returns an empty list if there are no bonded\npaths between the two atoms" ); } @@ -373,6 +396,7 @@ void register_ConnectivityBase_class(){ "findPaths" , findPaths_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Find the shortest bonded path between two atoms. This returns an empty\nlist if there is no bonded path between these two atoms" ); } @@ -385,6 +409,7 @@ void register_ConnectivityBase_class(){ "findPaths" , findPaths_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("max_length") ) + , bp::release_gil_policy() , "Find the shortest bonded path between two atoms where the path has\na maximum length. This returns an empty list if there is no bonded\npath between these two atoms" ); } @@ -396,6 +421,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "getAngles" , getAngles_function_value + , bp::release_gil_policy() , "Return a list of angles defined by the connectivity" ); } @@ -408,6 +434,7 @@ void register_ConnectivityBase_class(){ "getAngles" , getAngles_function_value , ( bp::arg("atom0") ) + , bp::release_gil_policy() , "Return a list of angles defined by the connectivity that involve atom0" ); } @@ -420,6 +447,7 @@ void register_ConnectivityBase_class(){ "getAngles" , getAngles_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return a list of angles defined by the connectivity that involve atom0 and atom1" ); } @@ -432,6 +460,7 @@ void register_ConnectivityBase_class(){ "getBondMatrix" , getBondMatrix_function_value , ( bp::arg("order") ) + , bp::release_gil_policy() , "Return a matrix (organised by AtomIdx) that says which atoms are bonded up to\norder order (e.g. if order is two, it returns true for each atom pair that\nare bonded together, if order is three, then true for each atom pair that are\nbonded or angled together, if order is four, then true for each atom pair\nthat are bonded, angled or dihedraled)" ); } @@ -444,6 +473,7 @@ void register_ConnectivityBase_class(){ "getBondMatrix" , getBondMatrix_function_value , ( bp::arg("start"), bp::arg("end") ) + , bp::release_gil_policy() , "Return a matrix (organised by AtomIdx) that says which atoms are bonded between\norder start and order end (e.g. if order is two, it returns true for each atom pair that\nare bonded together, if order is three, then true for each atom pair that are\nbonded or angled together, if order is four, then true for each atom pair\nthat are bonded, angled or dihedraled)" ); } @@ -455,6 +485,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "getBonds" , getBonds_function_value + , bp::release_gil_policy() , "Return the list of bonds present in this connectivity" ); } @@ -467,6 +498,7 @@ void register_ConnectivityBase_class(){ "getBonds" , getBonds_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the list of bonds in the connectivity containing atom" ); } @@ -478,6 +510,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "getDihedrals" , getDihedrals_function_value + , bp::release_gil_policy() , "Return a list of dihedrals defined by the connectivity" ); } @@ -490,6 +523,7 @@ void register_ConnectivityBase_class(){ "getDihedrals" , getDihedrals_function_value , ( bp::arg("atom0") ) + , bp::release_gil_policy() , "Return a list of dihedrals defined by the connectivity that involve atom0" ); } @@ -502,6 +536,7 @@ void register_ConnectivityBase_class(){ "getDihedrals" , getDihedrals_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Return a list of dihedrals defined by the connectivity that involve atom0 and atom1" ); } @@ -514,6 +549,7 @@ void register_ConnectivityBase_class(){ "getDihedrals" , getDihedrals_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Return a list of dihedrals defined by the connectivity that involve atom0, atom1 and atom2" ); } @@ -526,6 +562,7 @@ void register_ConnectivityBase_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("bond"), bp::arg("key") ) + , bp::release_gil_policy() , "Return whether the specified bond has a property at key key" ); } @@ -538,6 +575,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "This function returns whether or not the atom is in a ring." ); } @@ -550,6 +588,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "This function returns whether or not the two passed atoms are connected" ); } @@ -562,6 +601,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "This function returns whether or not the three passed atoms are connected\nvia a ring" ); } @@ -574,6 +614,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "This function returns whether or not the four passed atoms are connected\nvia a same ring" ); } @@ -586,6 +627,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "This function returns whether or not the atom is in a ring" ); } @@ -598,6 +640,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "This function returns whether or not the two passed atoms are connected\nvia a ring" ); } @@ -610,6 +653,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "This function returns whether or not the three passed atoms are connected\nvia a ring" ); } @@ -622,6 +666,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "This function returns whether or not the two passed atoms are connected\nvia a ring" ); } @@ -634,6 +679,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "This function returns whether or not the two atoms in the passed bond\nare both part of the same ring" ); } @@ -646,6 +692,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "This function returns whether or not the three atoms in the passed angle\nare all part of the same ring" ); } @@ -658,6 +705,7 @@ void register_ConnectivityBase_class(){ "inRing" , inRing_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "This function returns whether or not the four atoms in the passed dihedral\nare all part of the same ring" ); } @@ -669,6 +717,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "info" , info_function_value + , bp::release_gil_policy() , "Return the info object that describes the molecule for which this connectivity applies" ); } @@ -681,6 +730,7 @@ void register_ConnectivityBase_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -692,6 +742,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "nConnections" , nConnections_function_value + , bp::release_gil_policy() , "Return the total number of connections between atoms\nin this connectivity object" ); } @@ -704,6 +755,7 @@ void register_ConnectivityBase_class(){ "nConnections" , nConnections_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return the number of connections to the atom at index atomidx\nThrow: SireError::index_error\n" ); } @@ -716,6 +768,7 @@ void register_ConnectivityBase_class(){ "nConnections" , nConnections_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the number of connections to the atom with ID atomid\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -728,6 +781,7 @@ void register_ConnectivityBase_class(){ "nConnections" , nConnections_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return the number of connections to the residue at index residx\nThrow: SireError::invalid_index\n" ); } @@ -740,6 +794,7 @@ void register_ConnectivityBase_class(){ "nConnections" , nConnections_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the number of connections to the residue identified\nby resid\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -752,6 +807,7 @@ void register_ConnectivityBase_class(){ "nConnections" , nConnections_function_value , ( bp::arg("res0"), bp::arg("res1") ) + , bp::release_gil_policy() , "Return the number of atom connections between the residues at\nindicies res0 and res1\nThrow: SireError::invalid_index\n" ); } @@ -764,6 +820,7 @@ void register_ConnectivityBase_class(){ "nConnections" , nConnections_function_value , ( bp::arg("res0"), bp::arg("res1") ) + , bp::release_gil_policy() , "Return the number of atom connections between the residues\nidentified by res0 and res1\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -776,6 +833,7 @@ void register_ConnectivityBase_class(){ "properties" , properties_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the properties of the passed bond" ); } @@ -788,7 +846,7 @@ void register_ConnectivityBase_class(){ "property" , property_function_value , ( bp::arg("bond"), bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the specified property of the specified bond" ); } @@ -801,7 +859,7 @@ void register_ConnectivityBase_class(){ "property" , property_function_value , ( bp::arg("bond"), bp::arg("key"), bp::arg("default_value") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the specified property of the specified bond, or\ndefault_value if such a property is not defined\n" ); } @@ -813,6 +871,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return all of the property keys for all of the bonds" ); } @@ -825,6 +884,7 @@ void register_ConnectivityBase_class(){ "propertyKeys" , propertyKeys_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the property keys for the specified bond" ); } @@ -837,6 +897,7 @@ void register_ConnectivityBase_class(){ "propertyType" , propertyType_function_value , ( bp::arg("bond"), bp::arg("key") ) + , bp::release_gil_policy() , "Return the type of the property for the specified bond at key key" ); } @@ -849,6 +910,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Split this molecule into two parts about the atoms\n" ); } @@ -861,6 +923,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1") ) + , bp::release_gil_policy() , "Split the molecule into two parts about the bond between atom0 and atom1.\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -873,6 +936,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Split the molecule into two parts about the bond bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -885,6 +949,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms of this molecule into two parts about the atoms\n" ); } @@ -897,6 +962,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms of this molecule about the atoms\natom0 and atom1\nThrow: SireMol::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -909,6 +975,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("bond"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms of this molecule into two parts\nabout the bond bond\nThrow: SireError::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -921,6 +988,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Split this molecule into three parts about the atoms\natom0, atom1 and atom2.\n" ); } @@ -933,6 +1001,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2") ) + , bp::release_gil_policy() , "Split the molecule into two parts based on the three supplied atoms\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -945,6 +1014,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Split the molecule into two parts based on the supplied angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -957,6 +1027,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms of this molecule into three parts about the atoms\natom0, atom1 and atom2.\nNote that all three atoms must be contained in the selection or else\na missing_atom exception will be thrown\nAn exception will be thrown if it is not possible to split the molecule\nunambiguously in two, as the angle is part of a ring.\n" ); } @@ -969,6 +1040,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms of the molecule into two groups around the\nthree supplied atoms\nThrow: SireError::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -981,6 +1053,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("angle"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms selected_atoms of this molecule\ninto two parts based on the angle identified in\nangle. This splits the molecule about atom0() and atom2()\nof the angle, ignoring atom atom1().\nThrow: SireError::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -993,6 +1066,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Split this molecule into two parts based on the passed atoms.\nThis splits the molecule between atom0 and atom3, ignoring\natom1 and atom2.\nC1 C4--C5--C6\n\ \nC2 C8--C9\n \ \nC3 C7\n\\nC10--C11\nSplitting C4,C2,C7,C10 will return\n" ); } @@ -1005,6 +1079,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3") ) + , bp::release_gil_policy() , "Split this molecule into two parts based on the passed atoms.\nThis splits the molecule between atom0 and atom3, ignoring\natom1 and atom2.\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -1017,6 +1092,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Split this molecule into two parts based on the dihedral identified in\ndihedral. This splits the molecule about atom0() and atom3()\nof the dihedral, ignoring atoms atom1() and atom2().\nThrow: SireError::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -1029,6 +1105,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms of this molecule into two parts\nbased on the passed atoms.\nThis splits the molecule between atom0 and atom3, ignoring\natom1 and atom2.\nAll four atoms must be selected in selected_atoms or else\na missing_atom exception will be thrown\nC1 C4--C5--C6\n\ \nC2 C8--C9\n \ \nC3 C7\n\\nC10--C11\nSplitting C4,C2,C7,C10 will return\n" ); } @@ -1041,6 +1118,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms selected_atoms of this molecule\ninto two parts based on the passed atoms. This splits\nthe molecule between atom0 and atom3, ignoring atom1 and\natom2.\nThrow: SireError::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -1053,6 +1131,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("dihedral"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms selected_atoms of this molecule\ninto two parts based on the dihedral identified in\ndihedral. This splits the molecule about atom0() and atom3()\nof the dihedral, ignoring atoms atom1() and atom2().\nThrow: SireError::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -1065,6 +1144,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("improper") ) + , bp::release_gil_policy() , "Split this molecule into two parts based on the improper angle\nidentified by improper. This splits the molecule about\nbond between atom0() and atom1() of the improper\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -1077,6 +1157,7 @@ void register_ConnectivityBase_class(){ "split" , split_function_value , ( bp::arg("improper"), bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Split the selected atoms in selected_atoms in this molecule\ninto two parts based on the improper angle\nidentified by improper. This splits the molecule about\nbond between atom0() and atom1() of the improper\nThrow: SireError::incompatible_error\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMol::ring_error\n" ); } @@ -1100,6 +1181,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -1111,6 +1193,7 @@ void register_ConnectivityBase_class(){ ConnectivityBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ConnectivityEditor.pypp.cpp b/wrapper/Mol/ConnectivityEditor.pypp.cpp index c288740f6..856ae1b15 100644 --- a/wrapper/Mol/ConnectivityEditor.pypp.cpp +++ b/wrapper/Mol/ConnectivityEditor.pypp.cpp @@ -55,6 +55,8 @@ SireMol::ConnectivityEditor __copy__(const SireMol::ConnectivityEditor &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ConnectivityEditor_class(){ { //::SireMol::ConnectivityEditor @@ -71,6 +73,7 @@ void register_ConnectivityEditor_class(){ ConnectivityEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Return the editied connectivity" ); } @@ -253,6 +256,7 @@ void register_ConnectivityEditor_class(){ "takeProperty" , takeProperty_function_value , ( bp::arg("bond"), bp::arg("key") ) + , bp::release_gil_policy() , "Take the specified property from the specified bond - this removes\nand returns the property if it exists. If it doesnt, then\na NullProperty is returned\n" ); } @@ -264,6 +268,7 @@ void register_ConnectivityEditor_class(){ ConnectivityEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CovalentBondHunter.pypp.cpp b/wrapper/Mol/CovalentBondHunter.pypp.cpp index 784b92589..d134a6de4 100644 --- a/wrapper/Mol/CovalentBondHunter.pypp.cpp +++ b/wrapper/Mol/CovalentBondHunter.pypp.cpp @@ -49,6 +49,8 @@ SireMol::CovalentBondHunter __copy__(const SireMol::CovalentBondHunter &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CovalentBondHunter_class(){ { //::SireMol::CovalentBondHunter @@ -103,6 +105,7 @@ void register_CovalentBondHunter_class(){ CovalentBondHunter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/CovalentBondHunterParameters.pypp.cpp b/wrapper/Mol/CovalentBondHunterParameters.pypp.cpp index 7cd24ce06..b0af2bbf8 100644 --- a/wrapper/Mol/CovalentBondHunterParameters.pypp.cpp +++ b/wrapper/Mol/CovalentBondHunterParameters.pypp.cpp @@ -47,6 +47,8 @@ SireMol::CovalentBondHunterParameters __copy__(const SireMol::CovalentBondHunter const char* pvt_get_name(const SireMol::CovalentBondHunterParameters&){ return "SireMol::CovalentBondHunterParameters";} +#include "Helpers/release_gil_policy.hpp" + void register_CovalentBondHunterParameters_class(){ { //::SireMol::CovalentBondHunterParameters diff --git a/wrapper/Mol/CutGroup.pypp.cpp b/wrapper/Mol/CutGroup.pypp.cpp index 37ee27f63..04cca8ff7 100644 --- a/wrapper/Mol/CutGroup.pypp.cpp +++ b/wrapper/Mol/CutGroup.pypp.cpp @@ -74,6 +74,8 @@ SireMol::CutGroup __copy__(const SireMol::CutGroup &other){ return SireMol::CutG #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CutGroup_class(){ @@ -93,6 +95,7 @@ void register_CutGroup_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this CutGroup has an CGProperty piece of metadata\nat metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -105,6 +108,7 @@ void register_CutGroup_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that the property at key key has an CGProperty\npiece of metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -117,6 +121,7 @@ void register_CutGroup_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this CutGroup has an CGProperty at key key\nThrow: SireBase::missing_property\n" ); } @@ -141,6 +146,7 @@ void register_CutGroup_class(){ "contains" , contains_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this CutGroup contains all of\nthe atoms that match the ID atomid" ); } @@ -153,6 +159,7 @@ void register_CutGroup_class(){ "contains" , contains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not this CutGroup contains the atom\nat index atomidx in the molecule" ); } @@ -164,6 +171,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an editor that can edit this CutGroup" ); } @@ -175,6 +183,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an evaluator that can evaluate properties\nof this CutGroup" ); } @@ -187,6 +196,7 @@ void register_CutGroup_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not there is a CGProperty at metakey metakey" ); } @@ -199,6 +209,7 @@ void register_CutGroup_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether the metadata at metakey metakey for the property\nat key key is a CGProperty\nThrow: SireBase::missing_property\n" ); } @@ -211,6 +222,7 @@ void register_CutGroup_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not there is a CGProperty at key key" ); } @@ -222,6 +234,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this CutGroup in the molecule" ); } @@ -234,6 +247,7 @@ void register_CutGroup_class(){ "intersects" , intersects_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this CutGroup contains some of\nthe atoms that match the ID atomid" ); } @@ -245,6 +259,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Is this CutGroup empty?" ); } @@ -256,6 +271,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the metakeys of all CGProperty metadata" ); } @@ -268,6 +284,7 @@ void register_CutGroup_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the metakeys of all CGProperty metadata for\nthe property at key key\nThrow: SireBase::missing_property\n" ); } @@ -279,6 +296,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return an object that can move a copy of this CutGroup" ); } @@ -290,6 +308,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this CutGroup" ); } @@ -301,9 +320,21 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this CutGroup" ); + } + { //::SireMol::CutGroup::number + + typedef ::SireMol::CGIdx ( ::SireMol::CutGroup::*number_function_type)( ) const; + number_function_type number_function_value( &::SireMol::CutGroup::number ); + + CutGroup_exposer.def( + "number" + , number_function_value + , bp::release_gil_policy() + , "Return the number of this CutGroup (same as the index)" ); + } CutGroup_exposer.def( bp::self != bp::self ); { //::SireMol::CutGroup::operator= @@ -320,6 +351,32 @@ void register_CutGroup_class(){ } CutGroup_exposer.def( bp::self == bp::self ); + { //::SireMol::CutGroup::propertyAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::CutGroup::*propertyAsProperty_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsProperty_function_type propertyAsProperty_function_value( &::SireMol::CutGroup::propertyAsProperty ); + + CutGroup_exposer.def( + "propertyAsProperty" + , propertyAsProperty_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a PropertyPtr" ); + + } + { //::SireMol::CutGroup::propertyAsVariant + + typedef ::QVariant ( ::SireMol::CutGroup::*propertyAsVariant_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsVariant_function_type propertyAsVariant_function_value( &::SireMol::CutGroup::propertyAsVariant ); + + CutGroup_exposer.def( + "propertyAsVariant" + , propertyAsVariant_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a QVariant" ); + + } { //::SireMol::CutGroup::propertyKeys typedef ::QStringList ( ::SireMol::CutGroup::*propertyKeys_function_type)( ) const; @@ -328,6 +385,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys of all CGProperty properties" ); } @@ -339,6 +397,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Is this CutGroup the whole molecule?" ); } @@ -350,6 +409,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the atoms that are in this CutGroup" ); } @@ -361,8 +421,21 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "Return a selector that can change the selection of CutGroups" ); + } + { //::SireMol::CutGroup::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::CutGroup::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::CutGroup::toSelector ); + + CutGroup_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::CutGroup::toString @@ -372,6 +445,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this CutGroup" ); } @@ -383,6 +457,7 @@ void register_CutGroup_class(){ CutGroup_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -395,6 +470,7 @@ void register_CutGroup_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this CutGroup with the passed molecule data.\nThrow: SireError::incompatible_error\n" ); } diff --git a/wrapper/Mol/CuttingFunction.pypp.cpp b/wrapper/Mol/CuttingFunction.pypp.cpp index 619d6da68..ba59feeed 100644 --- a/wrapper/Mol/CuttingFunction.pypp.cpp +++ b/wrapper/Mol/CuttingFunction.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "residuecutting.h" +#include "selector.hpp" + #include #include "cuttingfunction.h" @@ -29,6 +31,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CuttingFunction_class(){ { //::SireMol::CuttingFunction @@ -79,6 +83,7 @@ void register_CuttingFunction_class(){ CuttingFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/DihedralID.pypp.cpp b/wrapper/Mol/DihedralID.pypp.cpp index b30015ac8..72e210b6f 100644 --- a/wrapper/Mol/DihedralID.pypp.cpp +++ b/wrapper/Mol/DihedralID.pypp.cpp @@ -34,6 +34,8 @@ SireMol::DihedralID __copy__(const SireMol::DihedralID &other){ return SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DihedralID_class(){ { //::SireMol::DihedralID @@ -50,7 +52,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the first atom of the dihedral" ); } @@ -62,7 +64,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the second atom of the dihedral" ); } @@ -74,7 +76,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "atom2" , atom2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the third atom of the dihedral" ); } @@ -86,7 +88,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "atom3" , atom3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the fourth atom of the dihedral" ); } @@ -98,6 +100,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this ID" ); } @@ -109,6 +112,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether this is a null ID" ); } @@ -121,6 +125,7 @@ void register_DihedralID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return the indicies of the four atoms in this dihedral - this returns\nthem in the order\ntuple(dihedral.atom0(),dihedral.atom1(),dihedral.atom2(),dihedral.atom3())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -133,6 +138,7 @@ void register_DihedralID_class(){ "map" , map_function_value , ( bp::arg("mol0info"), bp::arg("mol1info"), bp::arg("mol2info"), bp::arg("mol3info") ) + , bp::release_gil_policy() , "Return the indicies of the four atoms of this dihedral, between the\ntwo molecules whose data is in mol0info (containing dihedral.atom0()),\nmol1info (containing dihedral.atom1()), mol2info (containing\ndihedral.atom2()) and mol3info (containing dihedral.atom3())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -144,6 +150,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "mirror" , mirror_function_value + , bp::release_gil_policy() , "Return the mirror of this DihedralID - i.e. if this is\nDihedralID(atom0, atom1, atom2, atom3), this returns\nDihedralID(atom3, atom2, atom1, atom0).\nThis is useful if you know that DihedralID(atom0,atom1,atom2,atom3) equals\n" ); } @@ -196,6 +203,7 @@ void register_DihedralID_class(){ "size" , size_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1"), bp::arg("mol2data"), bp::arg("map2"), bp::arg("mol3data"), bp::arg("map3") ) + , bp::release_gil_policy() , "Return the size of the dihedral between atom0() in the\nmolecule whose data is in mol0data, atom1() in the\nmolecule whose data is in mol1data, atom2() in\nthe molecule whose data is in mol2data, and\natom3() in the molecule whose data is in mol3data, using map0\nto the find the coordinates property of mol0,\nmap1 to find the coordinates property of mol1,\nmap2 to find the coordinates property of mol2 and\nmap3 to find the coordinates property of mol3\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -207,6 +215,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -243,6 +252,7 @@ void register_DihedralID_class(){ "torsion" , torsion_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1"), bp::arg("mol2data"), bp::arg("map2"), bp::arg("mol3data"), bp::arg("map3") ) + , bp::release_gil_policy() , "Return the geometric torsion formed by the four atoms,\natom0() in the molecule whose data is in mol0data,\natom1() from mol1data, atom2() from mol2data, and\natom3() from mol3data,\nusing map0 to find the coordinates property of mol0,\nmap1 to find the coordinates property of mol1,\nmap2 to find the coordinates property of mol2 and\nmap3 to find the coordinates property of mol3.\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -254,6 +264,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -265,6 +276,7 @@ void register_DihedralID_class(){ DihedralID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/DihedralPerturbation.pypp.cpp b/wrapper/Mol/DihedralPerturbation.pypp.cpp index af3f80e99..6cbcc31da 100644 --- a/wrapper/Mol/DihedralPerturbation.pypp.cpp +++ b/wrapper/Mol/DihedralPerturbation.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; #include "SireUnits/units.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -34,6 +36,8 @@ SireMol::DihedralPerturbation __copy__(const SireMol::DihedralPerturbation &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DihedralPerturbation_class(){ { //::SireMol::DihedralPerturbation @@ -53,7 +57,7 @@ void register_DihedralPerturbation_class(){ DihedralPerturbation_exposer.def( "dihedral" , dihedral_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID that identifies that dihedral that will be perturbed" ); } @@ -104,6 +108,7 @@ void register_DihedralPerturbation_class(){ DihedralPerturbation_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -115,6 +120,7 @@ void register_DihedralPerturbation_class(){ DihedralPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -127,6 +133,7 @@ void register_DihedralPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not this perturbation with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/Mol/Element.pypp.cpp b/wrapper/Mol/Element.pypp.cpp index 999989f5a..6a6635509 100644 --- a/wrapper/Mol/Element.pypp.cpp +++ b/wrapper/Mol/Element.pypp.cpp @@ -17,6 +17,8 @@ SireMol::Element __copy__(const SireMol::Element &other){ return SireMol::Elemen #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Element_class(){ { //::SireMol::Element @@ -36,6 +38,7 @@ void register_Element_class(){ Element_exposer.def( "actinide" , actinide_function_value + , bp::release_gil_policy() , "Return whether or not this is an actinide" ); } @@ -47,6 +50,7 @@ void register_Element_class(){ Element_exposer.def( "alkaliEarthMetal" , alkaliEarthMetal_function_value + , bp::release_gil_policy() , "Return whether or not this is an alkali earth metal (group 2)" ); } @@ -58,6 +62,7 @@ void register_Element_class(){ Element_exposer.def( "alkaliMetal" , alkaliMetal_function_value + , bp::release_gil_policy() , "Return whether or not this is an alkali metal (group 1 or 2)" ); } @@ -69,6 +74,7 @@ void register_Element_class(){ Element_exposer.def( "biological" , biological_function_value + , bp::release_gil_policy() , "Return whether or not this is biological\n(in first three periods and not a noble gas, or a halogen)\n(this does preclude iron, potassium and calcium, which are\nrather biological... :-)" ); } @@ -81,6 +87,7 @@ void register_Element_class(){ "biologicalElement" , biologicalElement_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return a biological element that has been guessed from the passed name.\nNote that if no biological element was guessed, then the nearest\nnon-biological element match is used. A biological element is one that\nis in the first couple of rows (proton number < 18) and is not a noble gas." ); } @@ -92,6 +99,7 @@ void register_Element_class(){ Element_exposer.def( "blue" , blue_function_value + , bp::release_gil_policy() , "Return the blue colour components (0.0->1.0) for\nthe colour of this element" ); } @@ -103,6 +111,7 @@ void register_Element_class(){ Element_exposer.def( "bondOrderRadius" , bondOrderRadius_function_value + , bp::release_gil_policy() , "Return the bond order radius" ); } @@ -114,6 +123,7 @@ void register_Element_class(){ Element_exposer.def( "covalentRadius" , covalentRadius_function_value + , bp::release_gil_policy() , "Return the elements covalent radius" ); } @@ -126,6 +136,7 @@ void register_Element_class(){ "elementWithMass" , elementWithMass_function_value , ( bp::arg("mass") ) + , bp::release_gil_policy() , "Return an element which has the closest mass to mass (in atomic\nmass units, g mol-1)" ); } @@ -137,6 +148,7 @@ void register_Element_class(){ Element_exposer.def( "green" , green_function_value + , bp::release_gil_policy() , "Return the green colour components (0.0->1.0) for\nthe colour of this element" ); } @@ -148,6 +160,7 @@ void register_Element_class(){ Element_exposer.def( "group" , group_function_value + , bp::release_gil_policy() , "Return the group number of this element (IUPAC group, from 1-18)\n(lanthanides and actinides have a group number of 0 - this should\nnot be too big a problem as I would be surprised to hear of anyone\nusing this code to simulate them...)" ); } @@ -159,6 +172,7 @@ void register_Element_class(){ Element_exposer.def( "halogen" , halogen_function_value + , bp::release_gil_policy() , "Return whether or not this is a halogen" ); } @@ -170,6 +184,7 @@ void register_Element_class(){ Element_exposer.def( "lanthanide" , lanthanide_function_value + , bp::release_gil_policy() , "Return whether or not this is a lanthanide" ); } @@ -181,6 +196,7 @@ void register_Element_class(){ Element_exposer.def( "mass" , mass_function_value + , bp::release_gil_policy() , "Return the average mass of this element" ); } @@ -192,6 +208,7 @@ void register_Element_class(){ Element_exposer.def( "maxBonds" , maxBonds_function_value + , bp::release_gil_policy() , "Return the maximum number of simultaneous bonds that this\nelement can form" ); } @@ -203,6 +220,7 @@ void register_Element_class(){ Element_exposer.def( "nProtons" , nProtons_function_value + , bp::release_gil_policy() , "Return the number of protons in the element" ); } @@ -214,6 +232,7 @@ void register_Element_class(){ Element_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of the element in the local language" ); } @@ -225,6 +244,7 @@ void register_Element_class(){ Element_exposer.def( "nobleGas" , nobleGas_function_value + , bp::release_gil_policy() , "Return whether or not this is a noble gas" ); } @@ -255,6 +275,7 @@ void register_Element_class(){ Element_exposer.def( "period" , period_function_value + , bp::release_gil_policy() , "Return the period (the row number) of the element (IUPAC period, from 1-7)" ); } @@ -266,6 +287,7 @@ void register_Element_class(){ Element_exposer.def( "rareEarth" , rareEarth_function_value + , bp::release_gil_policy() , "Return whether or not this is a rare earth element (e.g. a lanthanide or actinide)" ); } @@ -277,6 +299,7 @@ void register_Element_class(){ Element_exposer.def( "red" , red_function_value + , bp::release_gil_policy() , "Return the red colour components (0.0->1.0) for\nthe colour of this element" ); } @@ -288,6 +311,7 @@ void register_Element_class(){ Element_exposer.def( "symbol" , symbol_function_value + , bp::release_gil_policy() , "Return the IUPAC symbol for the element" ); } @@ -299,6 +323,7 @@ void register_Element_class(){ Element_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the Element" ); } @@ -310,6 +335,7 @@ void register_Element_class(){ Element_exposer.def( "transitionMetal" , transitionMetal_function_value + , bp::release_gil_policy() , "Return whether or not this is a transition metal" ); } @@ -321,6 +347,7 @@ void register_Element_class(){ Element_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -332,6 +359,7 @@ void register_Element_class(){ Element_exposer.def( "vdwRadius" , vdwRadius_function_value + , bp::release_gil_policy() , "Return the van der waals radius" ); } @@ -343,6 +371,7 @@ void register_Element_class(){ Element_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Evaluator.pypp.cpp b/wrapper/Mol/Evaluator.pypp.cpp index a0f0464c2..0d2d54ca8 100644 --- a/wrapper/Mol/Evaluator.pypp.cpp +++ b/wrapper/Mol/Evaluator.pypp.cpp @@ -51,6 +51,8 @@ namespace bp = boost::python; #include "connectivity.h" +#include "core.h" + #include "dihedralid.h" #include "editor.hpp" @@ -73,6 +75,8 @@ SireMol::Evaluator __copy__(const SireMol::Evaluator &other){ return SireMol::Ev #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Evaluator_class(){ @@ -119,6 +123,7 @@ void register_Evaluator_class(){ "alignmentAxes" , alignmentAxes_function_value , ( bp::arg("other"), bp::arg("matcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::release_gil_policy() , "" ); } @@ -587,6 +592,7 @@ void register_Evaluator_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -599,6 +605,7 @@ void register_Evaluator_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("arg0"), bp::arg("arg1") ) + , bp::release_gil_policy() , "" ); } @@ -611,6 +618,7 @@ void register_Evaluator_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -622,6 +630,7 @@ void register_Evaluator_class(){ Evaluator_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -717,6 +726,7 @@ void register_Evaluator_class(){ Evaluator_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -729,6 +739,7 @@ void register_Evaluator_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -790,6 +801,7 @@ void register_Evaluator_class(){ Evaluator_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -814,6 +826,7 @@ void register_Evaluator_class(){ "rmsd" , rmsd_function_value , ( bp::arg("other"), bp::arg("map0"), bp::arg("map1") ) + , bp::release_gil_policy() , "Return the root mean square deviation (RMSD) of the atoms in this view against\nthe atoms in other, using the passed property maps to find the required\nproperties" ); } @@ -838,6 +851,7 @@ void register_Evaluator_class(){ "rmsd" , rmsd_function_value , ( bp::arg("other"), bp::arg("atommatcher"), bp::arg("map0"), bp::arg("map1") ) + , bp::release_gil_policy() , "Return the root mean square deviation (RMSD) of the atoms in this view against\nthe atoms in other, using the passed AtomMatcher to match atoms in this\nview against other, and using the passed property maps to find the required\nproperties" ); } @@ -849,6 +863,7 @@ void register_Evaluator_class(){ Evaluator_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this contains the whole molecule" ); } @@ -860,8 +875,21 @@ void register_Evaluator_class(){ Evaluator_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the selected atoms over which the properties\nwill be evaluated" ); + } + { //::SireMol::Evaluator::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Evaluator::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Evaluator::toSelector ); + + Evaluator_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Evaluator::toString @@ -871,6 +899,7 @@ void register_Evaluator_class(){ Evaluator_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this evaluator" ); } @@ -882,6 +911,7 @@ void register_Evaluator_class(){ Evaluator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/EvaluatorM.pypp.cpp b/wrapper/Mol/EvaluatorM.pypp.cpp new file mode 100644 index 000000000..e3cdca4fc --- /dev/null +++ b/wrapper/Mol/EvaluatorM.pypp.cpp @@ -0,0 +1,386 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "EvaluatorM.pypp.hpp" + +namespace bp = boost::python; + +#include "SireBase/errors.h" + +#include "SireError/errors.h" + +#include "SireMaths/accumulator.h" + +#include "SireMaths/axisset.h" + +#include "SireMaths/line.h" + +#include "SireMaths/sphere.h" + +#include "SireMaths/torsion.h" + +#include "SireMaths/triangle.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireUnits/dimensions.h" + +#include "SireUnits/units.h" + +#include "SireVol/coordgroup.h" + +#include "angleid.h" + +#include "atomcharges.h" + +#include "atomcoords.h" + +#include "atomelements.h" + +#include "atommasses.h" + +#include "atommatcher.h" + +#include "atommatchers.h" + +#include "bondid.h" + +#include "connectivity.h" + +#include "core.h" + +#include "dihedralid.h" + +#include "editor.hpp" + +#include "evaluatorm.h" + +#include "molecule.h" + +#include "mover.hpp" + +#include "selectormol.h" + +#include "evaluatorm.h" + +SireMol::EvaluatorM __copy__(const SireMol::EvaluatorM &other){ return SireMol::EvaluatorM(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +void register_EvaluatorM_class(){ + + { //::SireMol::EvaluatorM + typedef bp::class_< SireMol::EvaluatorM, bp::bases< SireBase::Property > > EvaluatorM_exposer_t; + EvaluatorM_exposer_t EvaluatorM_exposer = EvaluatorM_exposer_t( "EvaluatorM", "This is a multi-molecule version of the evaluator class", bp::init< >("") ); + bp::scope EvaluatorM_scope( EvaluatorM_exposer ); + EvaluatorM_exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("mols") ), "") ); + EvaluatorM_exposer.def( bp::init< SireMol::EvaluatorM const & >(( bp::arg("other") ), "") ); + { //::SireMol::EvaluatorM::aaBox + + typedef ::SireVol::AABox ( ::SireMol::EvaluatorM::*aaBox_function_type)( ) const; + aaBox_function_type aaBox_function_value( &::SireMol::EvaluatorM::aaBox ); + + EvaluatorM_exposer.def( + "aaBox" + , aaBox_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::aaBox + + typedef ::SireVol::AABox ( ::SireMol::EvaluatorM::*aaBox_function_type)( ::SireBase::PropertyMap const & ) const; + aaBox_function_type aaBox_function_value( &::SireMol::EvaluatorM::aaBox ); + + EvaluatorM_exposer.def( + "aaBox" + , aaBox_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::boundingSphere + + typedef ::SireMaths::Sphere ( ::SireMol::EvaluatorM::*boundingSphere_function_type)( ) const; + boundingSphere_function_type boundingSphere_function_value( &::SireMol::EvaluatorM::boundingSphere ); + + EvaluatorM_exposer.def( + "boundingSphere" + , boundingSphere_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::boundingSphere + + typedef ::SireMaths::Sphere ( ::SireMol::EvaluatorM::*boundingSphere_function_type)( ::SireBase::PropertyMap const & ) const; + boundingSphere_function_type boundingSphere_function_value( &::SireMol::EvaluatorM::boundingSphere ); + + EvaluatorM_exposer.def( + "boundingSphere" + , boundingSphere_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::center + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*center_function_type)( ) const; + center_function_type center_function_value( &::SireMol::EvaluatorM::center ); + + EvaluatorM_exposer.def( + "center" + , center_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::center + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*center_function_type)( ::SireBase::PropertyMap const & ) const; + center_function_type center_function_value( &::SireMol::EvaluatorM::center ); + + EvaluatorM_exposer.def( + "center" + , center_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::centerOfGeometry + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*centerOfGeometry_function_type)( ) const; + centerOfGeometry_function_type centerOfGeometry_function_value( &::SireMol::EvaluatorM::centerOfGeometry ); + + EvaluatorM_exposer.def( + "centerOfGeometry" + , centerOfGeometry_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::centerOfGeometry + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*centerOfGeometry_function_type)( ::SireBase::PropertyMap const & ) const; + centerOfGeometry_function_type centerOfGeometry_function_value( &::SireMol::EvaluatorM::centerOfGeometry ); + + EvaluatorM_exposer.def( + "centerOfGeometry" + , centerOfGeometry_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::centerOfMass + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*centerOfMass_function_type)( ) const; + centerOfMass_function_type centerOfMass_function_value( &::SireMol::EvaluatorM::centerOfMass ); + + EvaluatorM_exposer.def( + "centerOfMass" + , centerOfMass_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::centerOfMass + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*centerOfMass_function_type)( ::SireBase::PropertyMap const & ) const; + centerOfMass_function_type centerOfMass_function_value( &::SireMol::EvaluatorM::centerOfMass ); + + EvaluatorM_exposer.def( + "centerOfMass" + , centerOfMass_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::centroid + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*centroid_function_type)( ) const; + centroid_function_type centroid_function_value( &::SireMol::EvaluatorM::centroid ); + + EvaluatorM_exposer.def( + "centroid" + , centroid_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::centroid + + typedef ::SireMaths::Vector ( ::SireMol::EvaluatorM::*centroid_function_type)( ::SireBase::PropertyMap const & ) const; + centroid_function_type centroid_function_value( &::SireMol::EvaluatorM::centroid ); + + EvaluatorM_exposer.def( + "centroid" + , centroid_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::charge + + typedef ::SireUnits::Dimension::Charge ( ::SireMol::EvaluatorM::*charge_function_type)( ) const; + charge_function_type charge_function_value( &::SireMol::EvaluatorM::charge ); + + EvaluatorM_exposer.def( + "charge" + , charge_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::charge + + typedef ::SireUnits::Dimension::Charge ( ::SireMol::EvaluatorM::*charge_function_type)( ::SireBase::PropertyMap const & ) const; + charge_function_type charge_function_value( &::SireMol::EvaluatorM::charge ); + + EvaluatorM_exposer.def( + "charge" + , charge_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::isEmpty + + typedef bool ( ::SireMol::EvaluatorM::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::EvaluatorM::isEmpty ); + + EvaluatorM_exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::mass + + typedef ::SireUnits::Dimension::MolarMass ( ::SireMol::EvaluatorM::*mass_function_type)( ) const; + mass_function_type mass_function_value( &::SireMol::EvaluatorM::mass ); + + EvaluatorM_exposer.def( + "mass" + , mass_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::mass + + typedef ::SireUnits::Dimension::MolarMass ( ::SireMol::EvaluatorM::*mass_function_type)( ::SireBase::PropertyMap const & ) const; + mass_function_type mass_function_value( &::SireMol::EvaluatorM::mass ); + + EvaluatorM_exposer.def( + "mass" + , mass_function_value + , ( bp::arg("map") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::nAtoms + + typedef int ( ::SireMol::EvaluatorM::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::EvaluatorM::nAtoms ); + + EvaluatorM_exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::nMolecules + + typedef int ( ::SireMol::EvaluatorM::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMol::EvaluatorM::nMolecules ); + + EvaluatorM_exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + EvaluatorM_exposer.def( bp::self != bp::self ); + { //::SireMol::EvaluatorM::operator= + + typedef ::SireMol::EvaluatorM & ( ::SireMol::EvaluatorM::*assign_function_type)( ::SireMol::EvaluatorM const & ) ; + assign_function_type assign_function_value( &::SireMol::EvaluatorM::operator= ); + + EvaluatorM_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + EvaluatorM_exposer.def( bp::self == bp::self ); + { //::SireMol::EvaluatorM::toString + + typedef ::QString ( ::SireMol::EvaluatorM::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::EvaluatorM::toString ); + + EvaluatorM_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::EvaluatorM::typeName ); + + EvaluatorM_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::EvaluatorM::what + + typedef char const * ( ::SireMol::EvaluatorM::*what_function_type)( ) const; + what_function_type what_function_value( &::SireMol::EvaluatorM::what ); + + EvaluatorM_exposer.def( + "what" + , what_function_value + , bp::release_gil_policy() + , "" ); + + } + EvaluatorM_exposer.staticmethod( "typeName" ); + EvaluatorM_exposer.def( "__copy__", &__copy__); + EvaluatorM_exposer.def( "__deepcopy__", &__copy__); + EvaluatorM_exposer.def( "clone", &__copy__); + EvaluatorM_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::EvaluatorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + EvaluatorM_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::EvaluatorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + EvaluatorM_exposer.def_pickle(sire_pickle_suite< ::SireMol::EvaluatorM >()); + EvaluatorM_exposer.def( "__str__", &__str__< ::SireMol::EvaluatorM > ); + EvaluatorM_exposer.def( "__repr__", &__str__< ::SireMol::EvaluatorM > ); + } + +} diff --git a/wrapper/Mol/EvaluatorM.pypp.hpp b/wrapper/Mol/EvaluatorM.pypp.hpp new file mode 100644 index 000000000..42f052bd8 --- /dev/null +++ b/wrapper/Mol/EvaluatorM.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef EvaluatorM_hpp__pyplusplus_wrapper +#define EvaluatorM_hpp__pyplusplus_wrapper + +void register_EvaluatorM_class(); + +#endif//EvaluatorM_hpp__pyplusplus_wrapper diff --git a/wrapper/Mol/Force3D.pypp.cpp b/wrapper/Mol/Force3D.pypp.cpp index dab0a9e48..66071d7bd 100644 --- a/wrapper/Mol/Force3D.pypp.cpp +++ b/wrapper/Mol/Force3D.pypp.cpp @@ -17,6 +17,8 @@ SireMaths::Vector3D > __cop #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Force3D_class(){ @@ -52,6 +54,7 @@ void register_Force3D_class(){ Force3D_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_Force3D_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -112,6 +116,7 @@ void register_Force3D_class(){ Force3D_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -124,6 +129,7 @@ void register_Force3D_class(){ Force3D_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -136,6 +142,7 @@ void register_Force3D_class(){ Force3D_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/GeometryPerturbation.pypp.cpp b/wrapper/Mol/GeometryPerturbation.pypp.cpp index 093ace28f..82dca327f 100644 --- a/wrapper/Mol/GeometryPerturbation.pypp.cpp +++ b/wrapper/Mol/GeometryPerturbation.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; #include "SireUnits/units.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -31,6 +33,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GeometryPerturbation_class(){ { //::SireMol::GeometryPerturbation @@ -57,6 +61,7 @@ void register_GeometryPerturbation_class(){ GeometryPerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return the properties required or affected by this perturbation" ); } @@ -68,6 +73,7 @@ void register_GeometryPerturbation_class(){ GeometryPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/GeometryPerturbations.pypp.cpp b/wrapper/Mol/GeometryPerturbations.pypp.cpp index ba9b4aedb..2677255a0 100644 --- a/wrapper/Mol/GeometryPerturbations.pypp.cpp +++ b/wrapper/Mol/GeometryPerturbations.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; #include "SireUnits/units.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -33,6 +35,8 @@ SireMol::GeometryPerturbations __copy__(const SireMol::GeometryPerturbations &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GeometryPerturbations_class(){ { //::SireMol::GeometryPerturbations @@ -50,6 +54,7 @@ void register_GeometryPerturbations_class(){ GeometryPerturbations_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return the list of all child perturbations (and children of children)" ); } @@ -76,6 +81,7 @@ void register_GeometryPerturbations_class(){ GeometryPerturbations_exposer.def( "perturbations" , perturbations_function_value + , bp::release_gil_policy() , "Return the geometry perturbations in this collection" ); } @@ -88,6 +94,7 @@ void register_GeometryPerturbations_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function") ) + , bp::release_gil_policy() , "Return a re-created version of this set of perturbations where all child\nperturbations are changed to use the passed mapping function" ); } @@ -100,6 +107,7 @@ void register_GeometryPerturbations_class(){ "recreate" , recreate_function_value , ( bp::arg("map") ) + , bp::release_gil_policy() , "Return a re-created version of this set of perturbations where all child\nperturbations are changed to use the passed property map" ); } @@ -112,6 +120,7 @@ void register_GeometryPerturbations_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function"), bp::arg("map") ) + , bp::release_gil_policy() , "Return a re-created version of this set of perturbations where all child\nperturbations are changed to use the passed mapping function and property map" ); } @@ -123,6 +132,7 @@ void register_GeometryPerturbations_class(){ GeometryPerturbations_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return all of the properties that are needed or affected by\nthese perturbations" ); } @@ -134,6 +144,7 @@ void register_GeometryPerturbations_class(){ GeometryPerturbations_exposer.def( "requiredSymbols" , requiredSymbols_function_value + , bp::release_gil_policy() , "Return all of the symbols that need to be input to these perturbations" ); } @@ -146,6 +157,7 @@ void register_GeometryPerturbations_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute the identities in identities in all of the mapping functions\nused by this perturbation. This is useful if, for example, you want to\nswitch from using lambda to control the perturbation to using alpha, e.g.\n" ); } @@ -158,6 +170,7 @@ void register_GeometryPerturbations_class(){ "substitute" , substitute_function_value , ( bp::arg("old_symbol"), bp::arg("new_symbol") ) + , bp::release_gil_policy() , "" ); } @@ -169,6 +182,7 @@ void register_GeometryPerturbations_class(){ GeometryPerturbations_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -180,6 +194,7 @@ void register_GeometryPerturbations_class(){ GeometryPerturbations_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +207,7 @@ void register_GeometryPerturbations_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not these perturbations with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/Mol/GroupAtomIDBase.pypp.cpp b/wrapper/Mol/GroupAtomIDBase.pypp.cpp index 7b7fe8070..7a0a994a7 100644 --- a/wrapper/Mol/GroupAtomIDBase.pypp.cpp +++ b/wrapper/Mol/GroupAtomIDBase.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GroupAtomIDBase_class(){ { //::SireMol::GroupAtomIDBase diff --git a/wrapper/Mol/IDAndSet_AtomID_.pypp.cpp b/wrapper/Mol/IDAndSet_AtomID_.pypp.cpp index 093ceecdb..58ca34b9b 100644 --- a/wrapper/Mol/IDAndSet_AtomID_.pypp.cpp +++ b/wrapper/Mol/IDAndSet_AtomID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet @@ -92,6 +94,7 @@ void register_IDAndSet_AtomID__class(){ IDAndSet_AtomID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +107,7 @@ void register_IDAndSet_AtomID__class(){ IDAndSet_AtomID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +121,7 @@ void register_IDAndSet_AtomID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -163,6 +168,7 @@ void register_IDAndSet_AtomID__class(){ IDAndSet_AtomID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -175,6 +181,7 @@ void register_IDAndSet_AtomID__class(){ IDAndSet_AtomID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -187,6 +194,7 @@ void register_IDAndSet_AtomID__class(){ IDAndSet_AtomID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDAndSet_CGID_.pypp.cpp b/wrapper/Mol/IDAndSet_CGID_.pypp.cpp index b116f6e43..227fbc9bf 100644 --- a/wrapper/Mol/IDAndSet_CGID_.pypp.cpp +++ b/wrapper/Mol/IDAndSet_CGID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDAndSet_CGID__class(){ { //::SireID::IDAndSet< SireMol::CGID > @@ -88,6 +90,7 @@ void register_IDAndSet_CGID__class(){ IDAndSet_CGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_IDAndSet_CGID__class(){ IDAndSet_CGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +117,7 @@ void register_IDAndSet_CGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +164,7 @@ void register_IDAndSet_CGID__class(){ IDAndSet_CGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +177,7 @@ void register_IDAndSet_CGID__class(){ IDAndSet_CGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +190,7 @@ void register_IDAndSet_CGID__class(){ IDAndSet_CGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDAndSet_ChainID_.pypp.cpp b/wrapper/Mol/IDAndSet_ChainID_.pypp.cpp index 2c20b3dfa..297b13fed 100644 --- a/wrapper/Mol/IDAndSet_ChainID_.pypp.cpp +++ b/wrapper/Mol/IDAndSet_ChainID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet @@ -88,6 +90,7 @@ void register_IDAndSet_ChainID__class(){ IDAndSet_ChainID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_IDAndSet_ChainID__class(){ IDAndSet_ChainID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +117,7 @@ void register_IDAndSet_ChainID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +164,7 @@ void register_IDAndSet_ChainID__class(){ IDAndSet_ChainID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +177,7 @@ void register_IDAndSet_ChainID__class(){ IDAndSet_ChainID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +190,7 @@ void register_IDAndSet_ChainID__class(){ IDAndSet_ChainID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDAndSet_MGID_.pypp.cpp b/wrapper/Mol/IDAndSet_MGID_.pypp.cpp index db700005e..5dc4bf2ce 100644 --- a/wrapper/Mol/IDAndSet_MGID_.pypp.cpp +++ b/wrapper/Mol/IDAndSet_MGID_.pypp.cpp @@ -39,6 +39,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDAndSet_MGID__class(){ { //::SireID::IDAndSet< SireMol::MGID > @@ -72,6 +74,7 @@ void register_IDAndSet_MGID__class(){ IDAndSet_MGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +87,7 @@ void register_IDAndSet_MGID__class(){ IDAndSet_MGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +101,7 @@ void register_IDAndSet_MGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -143,6 +148,7 @@ void register_IDAndSet_MGID__class(){ IDAndSet_MGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +161,7 @@ void register_IDAndSet_MGID__class(){ IDAndSet_MGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +174,7 @@ void register_IDAndSet_MGID__class(){ IDAndSet_MGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDAndSet_MolID_.pypp.cpp b/wrapper/Mol/IDAndSet_MolID_.pypp.cpp index 2eb80231d..a641f5e22 100644 --- a/wrapper/Mol/IDAndSet_MolID_.pypp.cpp +++ b/wrapper/Mol/IDAndSet_MolID_.pypp.cpp @@ -51,6 +51,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDAndSet_MolID__class(){ { //::SireID::IDAndSet< SireMol::MolID > @@ -83,6 +85,7 @@ void register_IDAndSet_MolID__class(){ IDAndSet_MolID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +98,7 @@ void register_IDAndSet_MolID__class(){ IDAndSet_MolID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -108,6 +112,7 @@ void register_IDAndSet_MolID__class(){ "map" , map_function_value , ( bp::arg("mols") ) + , bp::release_gil_policy() , "" ); } @@ -121,6 +126,7 @@ void register_IDAndSet_MolID__class(){ "map" , map_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -134,6 +140,7 @@ void register_IDAndSet_MolID__class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +187,7 @@ void register_IDAndSet_MolID__class(){ IDAndSet_MolID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +200,7 @@ void register_IDAndSet_MolID__class(){ IDAndSet_MolID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -204,6 +213,7 @@ void register_IDAndSet_MolID__class(){ IDAndSet_MolID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDAndSet_ResID_.pypp.cpp b/wrapper/Mol/IDAndSet_ResID_.pypp.cpp index 0beccba82..1f735ff37 100644 --- a/wrapper/Mol/IDAndSet_ResID_.pypp.cpp +++ b/wrapper/Mol/IDAndSet_ResID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDAndSet_ResID__class(){ { //::SireID::IDAndSet< SireMol::ResID > @@ -92,6 +94,7 @@ void register_IDAndSet_ResID__class(){ IDAndSet_ResID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +107,7 @@ void register_IDAndSet_ResID__class(){ IDAndSet_ResID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +121,7 @@ void register_IDAndSet_ResID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -163,6 +168,7 @@ void register_IDAndSet_ResID__class(){ IDAndSet_ResID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -175,6 +181,7 @@ void register_IDAndSet_ResID__class(){ IDAndSet_ResID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -187,6 +194,7 @@ void register_IDAndSet_ResID__class(){ IDAndSet_ResID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDAndSet_SegID_.pypp.cpp b/wrapper/Mol/IDAndSet_SegID_.pypp.cpp index 085c62d7d..bea6ac53e 100644 --- a/wrapper/Mol/IDAndSet_SegID_.pypp.cpp +++ b/wrapper/Mol/IDAndSet_SegID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDAndSet_SegID__class(){ { //::SireID::IDAndSet< SireMol::SegID > @@ -88,6 +90,7 @@ void register_IDAndSet_SegID__class(){ IDAndSet_SegID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_IDAndSet_SegID__class(){ IDAndSet_SegID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +117,7 @@ void register_IDAndSet_SegID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +164,7 @@ void register_IDAndSet_SegID__class(){ IDAndSet_SegID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +177,7 @@ void register_IDAndSet_SegID__class(){ IDAndSet_SegID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +190,7 @@ void register_IDAndSet_SegID__class(){ IDAndSet_SegID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDOrSet_AtomID_.pypp.cpp b/wrapper/Mol/IDOrSet_AtomID_.pypp.cpp index 56e99b377..b3a046abd 100644 --- a/wrapper/Mol/IDOrSet_AtomID_.pypp.cpp +++ b/wrapper/Mol/IDOrSet_AtomID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDOrSet_AtomID__class(){ { //::SireID::IDOrSet< SireMol::AtomID > @@ -92,6 +94,7 @@ void register_IDOrSet_AtomID__class(){ IDOrSet_AtomID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +107,7 @@ void register_IDOrSet_AtomID__class(){ IDOrSet_AtomID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +121,7 @@ void register_IDOrSet_AtomID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -163,6 +168,7 @@ void register_IDOrSet_AtomID__class(){ IDOrSet_AtomID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -175,6 +181,7 @@ void register_IDOrSet_AtomID__class(){ IDOrSet_AtomID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -187,6 +194,7 @@ void register_IDOrSet_AtomID__class(){ IDOrSet_AtomID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDOrSet_CGID_.pypp.cpp b/wrapper/Mol/IDOrSet_CGID_.pypp.cpp index dce7e5203..c807c064a 100644 --- a/wrapper/Mol/IDOrSet_CGID_.pypp.cpp +++ b/wrapper/Mol/IDOrSet_CGID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDOrSet_CGID__class(){ { //::SireID::IDOrSet< SireMol::CGID > @@ -88,6 +90,7 @@ void register_IDOrSet_CGID__class(){ IDOrSet_CGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_IDOrSet_CGID__class(){ IDOrSet_CGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +117,7 @@ void register_IDOrSet_CGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +164,7 @@ void register_IDOrSet_CGID__class(){ IDOrSet_CGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +177,7 @@ void register_IDOrSet_CGID__class(){ IDOrSet_CGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +190,7 @@ void register_IDOrSet_CGID__class(){ IDOrSet_CGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDOrSet_ChainID_.pypp.cpp b/wrapper/Mol/IDOrSet_ChainID_.pypp.cpp index 2dae5aa55..46a626351 100644 --- a/wrapper/Mol/IDOrSet_ChainID_.pypp.cpp +++ b/wrapper/Mol/IDOrSet_ChainID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet @@ -88,6 +90,7 @@ void register_IDOrSet_ChainID__class(){ IDOrSet_ChainID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_IDOrSet_ChainID__class(){ IDOrSet_ChainID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +117,7 @@ void register_IDOrSet_ChainID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +164,7 @@ void register_IDOrSet_ChainID__class(){ IDOrSet_ChainID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +177,7 @@ void register_IDOrSet_ChainID__class(){ IDOrSet_ChainID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +190,7 @@ void register_IDOrSet_ChainID__class(){ IDOrSet_ChainID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDOrSet_MGID_.pypp.cpp b/wrapper/Mol/IDOrSet_MGID_.pypp.cpp index a5eddd02b..f8dad894f 100644 --- a/wrapper/Mol/IDOrSet_MGID_.pypp.cpp +++ b/wrapper/Mol/IDOrSet_MGID_.pypp.cpp @@ -39,6 +39,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDOrSet_MGID__class(){ { //::SireID::IDOrSet< SireMol::MGID > @@ -72,6 +74,7 @@ void register_IDOrSet_MGID__class(){ IDOrSet_MGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +87,7 @@ void register_IDOrSet_MGID__class(){ IDOrSet_MGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +101,7 @@ void register_IDOrSet_MGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -143,6 +148,7 @@ void register_IDOrSet_MGID__class(){ IDOrSet_MGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +161,7 @@ void register_IDOrSet_MGID__class(){ IDOrSet_MGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +174,7 @@ void register_IDOrSet_MGID__class(){ IDOrSet_MGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDOrSet_MolID_.pypp.cpp b/wrapper/Mol/IDOrSet_MolID_.pypp.cpp index 12008bb9e..37e621682 100644 --- a/wrapper/Mol/IDOrSet_MolID_.pypp.cpp +++ b/wrapper/Mol/IDOrSet_MolID_.pypp.cpp @@ -51,6 +51,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDOrSet_MolID__class(){ { //::SireID::IDOrSet< SireMol::MolID > @@ -83,6 +85,7 @@ void register_IDOrSet_MolID__class(){ IDOrSet_MolID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +98,7 @@ void register_IDOrSet_MolID__class(){ IDOrSet_MolID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -108,6 +112,7 @@ void register_IDOrSet_MolID__class(){ "map" , map_function_value , ( bp::arg("mols") ) + , bp::release_gil_policy() , "" ); } @@ -121,6 +126,7 @@ void register_IDOrSet_MolID__class(){ "map" , map_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -134,6 +140,7 @@ void register_IDOrSet_MolID__class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +187,7 @@ void register_IDOrSet_MolID__class(){ IDOrSet_MolID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +200,7 @@ void register_IDOrSet_MolID__class(){ IDOrSet_MolID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -204,6 +213,7 @@ void register_IDOrSet_MolID__class(){ IDOrSet_MolID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDOrSet_ResID_.pypp.cpp b/wrapper/Mol/IDOrSet_ResID_.pypp.cpp index 8819ea597..e74fed59d 100644 --- a/wrapper/Mol/IDOrSet_ResID_.pypp.cpp +++ b/wrapper/Mol/IDOrSet_ResID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDOrSet_ResID__class(){ { //::SireID::IDOrSet< SireMol::ResID > @@ -92,6 +94,7 @@ void register_IDOrSet_ResID__class(){ IDOrSet_ResID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +107,7 @@ void register_IDOrSet_ResID__class(){ IDOrSet_ResID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +121,7 @@ void register_IDOrSet_ResID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -163,6 +168,7 @@ void register_IDOrSet_ResID__class(){ IDOrSet_ResID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -175,6 +181,7 @@ void register_IDOrSet_ResID__class(){ IDOrSet_ResID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -187,6 +194,7 @@ void register_IDOrSet_ResID__class(){ IDOrSet_ResID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/IDOrSet_SegID_.pypp.cpp b/wrapper/Mol/IDOrSet_SegID_.pypp.cpp index a1a6bdaec..937832cdb 100644 --- a/wrapper/Mol/IDOrSet_SegID_.pypp.cpp +++ b/wrapper/Mol/IDOrSet_SegID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDOrSet_SegID__class(){ { //::SireID::IDOrSet< SireMol::SegID > @@ -88,6 +90,7 @@ void register_IDOrSet_SegID__class(){ IDOrSet_SegID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_IDOrSet_SegID__class(){ IDOrSet_SegID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +117,7 @@ void register_IDOrSet_SegID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +164,7 @@ void register_IDOrSet_SegID__class(){ IDOrSet_SegID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +177,7 @@ void register_IDOrSet_SegID__class(){ IDOrSet_SegID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +190,7 @@ void register_IDOrSet_SegID__class(){ IDOrSet_SegID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ImproperID.pypp.cpp b/wrapper/Mol/ImproperID.pypp.cpp index 3d2d08f9d..e135c7a82 100644 --- a/wrapper/Mol/ImproperID.pypp.cpp +++ b/wrapper/Mol/ImproperID.pypp.cpp @@ -34,6 +34,8 @@ SireMol::ImproperID __copy__(const SireMol::ImproperID &other){ return SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ImproperID_class(){ { //::SireMol::ImproperID @@ -50,7 +52,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "atom0" , atom0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the first atom of the improper" ); } @@ -62,7 +64,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "atom1" , atom1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the second atom of the improper" ); } @@ -74,7 +76,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "atom2" , atom2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the third atom of the improper" ); } @@ -86,7 +88,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "atom3" , atom3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the fourth atom of the improper" ); } @@ -99,6 +101,7 @@ void register_ImproperID_class(){ "equivalent" , equivalent_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Are these impropers generally equivalent, i.e. do they contain the same\natom indices. This is useful since the ordering of improper atoms is\ninconsistent between different molecular topology formats.\n" ); } @@ -110,6 +113,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash for this ID" ); } @@ -121,6 +125,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether this is a null ID" ); } @@ -133,6 +138,7 @@ void register_ImproperID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return the indicies of the four atoms in this improper - this returns\nthem in the order\ntuple(improper.atom0(),improper.atom1(),improper.atom2(),improper.atom3())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -145,6 +151,7 @@ void register_ImproperID_class(){ "map" , map_function_value , ( bp::arg("mol0info"), bp::arg("mol1info"), bp::arg("mol2info"), bp::arg("mol3info") ) + , bp::release_gil_policy() , "Return the indicies of the four atoms of this improper, between the\ntwo molecules whose data is in mol0info (containing improper.atom0()),\nmol1info (containing improper.atom1()), mol2info (containing\nimproper.atom2()) and mol3info (containing improper.atom3())\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -197,6 +204,7 @@ void register_ImproperID_class(){ "size" , size_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1"), bp::arg("mol2data"), bp::arg("map2"), bp::arg("mol3data"), bp::arg("map3") ) + , bp::release_gil_policy() , "Return the size of the improper between atom0() in the\nmolecule whose data is in mol0data, atom1() in the\nmolecule whose data is in mol1data, atom2() in\nthe molecule whose data is in mol2data, and\natom3() in the molecule whose data is in mol3data, using map0\nto the find the coordinates property of mol0,\nmap1 to find the coordinates property of mol1,\nmap2 to find the coordinates property of mol2 and\nmap3 to find the coordinates property of mol3\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -208,6 +216,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -244,6 +253,7 @@ void register_ImproperID_class(){ "torsion" , torsion_function_value , ( bp::arg("mol0data"), bp::arg("map0"), bp::arg("mol1data"), bp::arg("map1"), bp::arg("mol2data"), bp::arg("map2"), bp::arg("mol3data"), bp::arg("map3") ) + , bp::release_gil_policy() , "Return the geometric torsion formed by the four atoms,\natom0() in the molecule whose data is in mol0data,\natom1() from mol1data, atom2() from mol2data, and\natom3() from mol3data,\nusing map0 to find the coordinates property of mol0,\nmap1 to find the coordinates property of mol1,\nmap2 to find the coordinates property of mol2 and\nmap3 to find the coordinates property of mol3.\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -255,6 +265,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -266,6 +277,7 @@ void register_ImproperID_class(){ ImproperID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/InvertMatch_AtomID_.pypp.cpp b/wrapper/Mol/InvertMatch_AtomID_.pypp.cpp index 80551b557..584e91dbc 100644 --- a/wrapper/Mol/InvertMatch_AtomID_.pypp.cpp +++ b/wrapper/Mol/InvertMatch_AtomID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::InvertMatch __copy__(const SireID::InvertMatch @@ -76,6 +78,7 @@ void register_InvertMatch_AtomID__class(){ InvertMatch_AtomID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +91,7 @@ void register_InvertMatch_AtomID__class(){ InvertMatch_AtomID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +105,7 @@ void register_InvertMatch_AtomID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +136,7 @@ void register_InvertMatch_AtomID__class(){ InvertMatch_AtomID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +149,7 @@ void register_InvertMatch_AtomID__class(){ InvertMatch_AtomID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_InvertMatch_AtomID__class(){ InvertMatch_AtomID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/InvertMatch_CGID_.pypp.cpp b/wrapper/Mol/InvertMatch_CGID_.pypp.cpp index 99d8738a7..2f091502f 100644 --- a/wrapper/Mol/InvertMatch_CGID_.pypp.cpp +++ b/wrapper/Mol/InvertMatch_CGID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::InvertMatch __copy__(const SireID::InvertMatch @@ -72,6 +74,7 @@ void register_InvertMatch_CGID__class(){ InvertMatch_CGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +87,7 @@ void register_InvertMatch_CGID__class(){ InvertMatch_CGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +101,7 @@ void register_InvertMatch_CGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +132,7 @@ void register_InvertMatch_CGID__class(){ InvertMatch_CGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -139,6 +145,7 @@ void register_InvertMatch_CGID__class(){ InvertMatch_CGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -151,6 +158,7 @@ void register_InvertMatch_CGID__class(){ InvertMatch_CGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/InvertMatch_ChainID_.pypp.cpp b/wrapper/Mol/InvertMatch_ChainID_.pypp.cpp index 670c77596..0a1b613e1 100644 --- a/wrapper/Mol/InvertMatch_ChainID_.pypp.cpp +++ b/wrapper/Mol/InvertMatch_ChainID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::InvertMatch __copy__(const SireID::InvertMatch @@ -72,6 +74,7 @@ void register_InvertMatch_ChainID__class(){ InvertMatch_ChainID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +87,7 @@ void register_InvertMatch_ChainID__class(){ InvertMatch_ChainID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +101,7 @@ void register_InvertMatch_ChainID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +132,7 @@ void register_InvertMatch_ChainID__class(){ InvertMatch_ChainID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -139,6 +145,7 @@ void register_InvertMatch_ChainID__class(){ InvertMatch_ChainID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -151,6 +158,7 @@ void register_InvertMatch_ChainID__class(){ InvertMatch_ChainID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/InvertMatch_ResID_.pypp.cpp b/wrapper/Mol/InvertMatch_ResID_.pypp.cpp index fe13e76d4..24f9d9b30 100644 --- a/wrapper/Mol/InvertMatch_ResID_.pypp.cpp +++ b/wrapper/Mol/InvertMatch_ResID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::InvertMatch __copy__(const SireID::InvertMatch @@ -76,6 +78,7 @@ void register_InvertMatch_ResID__class(){ InvertMatch_ResID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +91,7 @@ void register_InvertMatch_ResID__class(){ InvertMatch_ResID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +105,7 @@ void register_InvertMatch_ResID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +136,7 @@ void register_InvertMatch_ResID__class(){ InvertMatch_ResID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +149,7 @@ void register_InvertMatch_ResID__class(){ InvertMatch_ResID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_InvertMatch_ResID__class(){ InvertMatch_ResID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/InvertMatch_SegID_.pypp.cpp b/wrapper/Mol/InvertMatch_SegID_.pypp.cpp index a9eaf8ea1..94564250c 100644 --- a/wrapper/Mol/InvertMatch_SegID_.pypp.cpp +++ b/wrapper/Mol/InvertMatch_SegID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::InvertMatch __copy__(const SireID::InvertMatch @@ -72,6 +74,7 @@ void register_InvertMatch_SegID__class(){ InvertMatch_SegID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +87,7 @@ void register_InvertMatch_SegID__class(){ InvertMatch_SegID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +101,7 @@ void register_InvertMatch_SegID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -127,6 +132,7 @@ void register_InvertMatch_SegID__class(){ InvertMatch_SegID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -139,6 +145,7 @@ void register_InvertMatch_SegID__class(){ InvertMatch_SegID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -151,6 +158,7 @@ void register_InvertMatch_SegID__class(){ InvertMatch_SegID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MGID.pypp.cpp b/wrapper/Mol/MGID.pypp.cpp index 211035498..db16b9797 100644 --- a/wrapper/Mol/MGID.pypp.cpp +++ b/wrapper/Mol/MGID.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MGID_class(){ { //::SireMol::MGID @@ -50,6 +52,7 @@ void register_MGID_class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -101,6 +104,7 @@ void register_MGID_class(){ MGID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MGIDsAndMaps.pypp.cpp b/wrapper/Mol/MGIDsAndMaps.pypp.cpp index e43d17bab..581444591 100644 --- a/wrapper/Mol/MGIDsAndMaps.pypp.cpp +++ b/wrapper/Mol/MGIDsAndMaps.pypp.cpp @@ -23,6 +23,8 @@ SireMol::MGIDsAndMaps __copy__(const SireMol::MGIDsAndMaps &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MGIDsAndMaps_class(){ @@ -55,6 +57,7 @@ void register_MGIDsAndMaps_class(){ MGIDsAndMaps_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of identifier groups in this set" ); } @@ -66,6 +69,7 @@ void register_MGIDsAndMaps_class(){ MGIDsAndMaps_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is an empty group of groups" ); } @@ -116,6 +120,7 @@ void register_MGIDsAndMaps_class(){ MGIDsAndMaps_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this set of IDs" ); } @@ -127,6 +132,7 @@ void register_MGIDsAndMaps_class(){ MGIDsAndMaps_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MGIdx.pypp.cpp b/wrapper/Mol/MGIdx.pypp.cpp index c7cb83615..13b0f5ade 100644 --- a/wrapper/Mol/MGIdx.pypp.cpp +++ b/wrapper/Mol/MGIdx.pypp.cpp @@ -27,6 +27,8 @@ SireMol::MGIdx __copy__(const SireMol::MGIdx &other){ return SireMol::MGIdx(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MGIdx_class(){ { //::SireMol::MGIdx @@ -43,6 +45,7 @@ void register_MGIdx_class(){ MGIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_MGIdx_class(){ MGIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -66,6 +70,7 @@ void register_MGIdx_class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -77,6 +82,7 @@ void register_MGIdx_class(){ MGIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +107,7 @@ void register_MGIdx_class(){ MGIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -112,6 +119,7 @@ void register_MGIdx_class(){ MGIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -123,6 +131,7 @@ void register_MGIdx_class(){ MGIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MGName.pypp.cpp b/wrapper/Mol/MGName.pypp.cpp index 84aadedf0..7d9032c32 100644 --- a/wrapper/Mol/MGName.pypp.cpp +++ b/wrapper/Mol/MGName.pypp.cpp @@ -27,6 +27,8 @@ SireMol::MGName __copy__(const SireMol::MGName &other){ return SireMol::MGName(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MGName_class(){ { //::SireMol::MGName @@ -44,6 +46,7 @@ void register_MGName_class(){ MGName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -55,6 +58,7 @@ void register_MGName_class(){ MGName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -67,6 +71,7 @@ void register_MGName_class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -94,6 +99,7 @@ void register_MGName_class(){ MGName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -105,6 +111,7 @@ void register_MGName_class(){ MGName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -116,6 +123,7 @@ void register_MGName_class(){ MGName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MGNum.pypp.cpp b/wrapper/Mol/MGNum.pypp.cpp index fd5987b66..5b17d953e 100644 --- a/wrapper/Mol/MGNum.pypp.cpp +++ b/wrapper/Mol/MGNum.pypp.cpp @@ -27,6 +27,8 @@ SireMol::MGNum __copy__(const SireMol::MGNum &other){ return SireMol::MGNum(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MGNum_class(){ { //::SireMol::MGNum @@ -43,6 +45,7 @@ void register_MGNum_class(){ MGNum_exposer.def( "getUniqueNumber" , getUniqueNumber_function_value + , bp::release_gil_policy() , "" ); } @@ -54,6 +57,7 @@ void register_MGNum_class(){ MGNum_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -65,6 +69,7 @@ void register_MGNum_class(){ MGNum_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +82,7 @@ void register_MGNum_class(){ "map" , map_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -108,6 +114,7 @@ void register_MGNum_class(){ MGNum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +126,7 @@ void register_MGNum_class(){ MGNum_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -130,6 +138,7 @@ void register_MGNum_class(){ MGNum_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MatchAll_AtomID_.pypp.cpp b/wrapper/Mol/MatchAll_AtomID_.pypp.cpp index e6f2b3d83..4d00b649d 100644 --- a/wrapper/Mol/MatchAll_AtomID_.pypp.cpp +++ b/wrapper/Mol/MatchAll_AtomID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::MatchAll __copy__(const SireID::MatchAll @@ -75,6 +77,7 @@ void register_MatchAll_AtomID__class(){ MatchAll_AtomID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_MatchAll_AtomID__class(){ MatchAll_AtomID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +104,7 @@ void register_MatchAll_AtomID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -130,6 +135,7 @@ void register_MatchAll_AtomID__class(){ MatchAll_AtomID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -142,6 +148,7 @@ void register_MatchAll_AtomID__class(){ MatchAll_AtomID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -154,6 +161,7 @@ void register_MatchAll_AtomID__class(){ MatchAll_AtomID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MatchAll_CGID_.pypp.cpp b/wrapper/Mol/MatchAll_CGID_.pypp.cpp index c0bdfc79a..facca48f2 100644 --- a/wrapper/Mol/MatchAll_CGID_.pypp.cpp +++ b/wrapper/Mol/MatchAll_CGID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::MatchAll __copy__(const SireID::MatchAll & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MatchAll_CGID__class(){ { //::SireID::MatchAll< SireMol::CGID > @@ -71,6 +73,7 @@ void register_MatchAll_CGID__class(){ MatchAll_CGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +86,7 @@ void register_MatchAll_CGID__class(){ MatchAll_CGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +100,7 @@ void register_MatchAll_CGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_MatchAll_CGID__class(){ MatchAll_CGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -138,6 +144,7 @@ void register_MatchAll_CGID__class(){ MatchAll_CGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -150,6 +157,7 @@ void register_MatchAll_CGID__class(){ MatchAll_CGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MatchAll_ChainID_.pypp.cpp b/wrapper/Mol/MatchAll_ChainID_.pypp.cpp index aaebb3cf3..6131e5baf 100644 --- a/wrapper/Mol/MatchAll_ChainID_.pypp.cpp +++ b/wrapper/Mol/MatchAll_ChainID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::MatchAll __copy__(const SireID::MatchAll @@ -71,6 +73,7 @@ void register_MatchAll_ChainID__class(){ MatchAll_ChainID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +86,7 @@ void register_MatchAll_ChainID__class(){ MatchAll_ChainID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +100,7 @@ void register_MatchAll_ChainID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_MatchAll_ChainID__class(){ MatchAll_ChainID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -138,6 +144,7 @@ void register_MatchAll_ChainID__class(){ MatchAll_ChainID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -150,6 +157,7 @@ void register_MatchAll_ChainID__class(){ MatchAll_ChainID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MatchAll_ResID_.pypp.cpp b/wrapper/Mol/MatchAll_ResID_.pypp.cpp index 8eb4d085b..78d369235 100644 --- a/wrapper/Mol/MatchAll_ResID_.pypp.cpp +++ b/wrapper/Mol/MatchAll_ResID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::MatchAll __copy__(const SireID::MatchAll #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MatchAll_ResID__class(){ { //::SireID::MatchAll< SireMol::ResID > @@ -75,6 +77,7 @@ void register_MatchAll_ResID__class(){ MatchAll_ResID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_MatchAll_ResID__class(){ MatchAll_ResID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +104,7 @@ void register_MatchAll_ResID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -130,6 +135,7 @@ void register_MatchAll_ResID__class(){ MatchAll_ResID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -142,6 +148,7 @@ void register_MatchAll_ResID__class(){ MatchAll_ResID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -154,6 +161,7 @@ void register_MatchAll_ResID__class(){ MatchAll_ResID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MatchAll_SegID_.pypp.cpp b/wrapper/Mol/MatchAll_SegID_.pypp.cpp index 8620cf78c..a25591aea 100644 --- a/wrapper/Mol/MatchAll_SegID_.pypp.cpp +++ b/wrapper/Mol/MatchAll_SegID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::MatchAll __copy__(const SireID::MatchAll #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MatchAll_SegID__class(){ { //::SireID::MatchAll< SireMol::SegID > @@ -71,6 +73,7 @@ void register_MatchAll_SegID__class(){ MatchAll_SegID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +86,7 @@ void register_MatchAll_SegID__class(){ MatchAll_SegID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +100,7 @@ void register_MatchAll_SegID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_MatchAll_SegID__class(){ MatchAll_SegID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -138,6 +144,7 @@ void register_MatchAll_SegID__class(){ MatchAll_SegID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -150,6 +157,7 @@ void register_MatchAll_SegID__class(){ MatchAll_SegID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolAtomID.pypp.cpp b/wrapper/Mol/MolAtomID.pypp.cpp index d8f4a434f..1abf61ef0 100644 --- a/wrapper/Mol/MolAtomID.pypp.cpp +++ b/wrapper/Mol/MolAtomID.pypp.cpp @@ -36,6 +36,8 @@ SireMol::MolAtomID __copy__(const SireMol::MolAtomID &other){ return SireMol::Mo #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolAtomID_class(){ { //::SireMol::MolAtomID @@ -55,7 +57,7 @@ void register_MolAtomID_class(){ MolAtomID_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the AtomID part of this match" ); } @@ -67,6 +69,7 @@ void register_MolAtomID_class(){ MolAtomID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this ID" ); } @@ -78,6 +81,7 @@ void register_MolAtomID_class(){ MolAtomID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is null" ); } @@ -90,6 +94,7 @@ void register_MolAtomID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the indicies of the matching atoms\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -101,7 +106,7 @@ void register_MolAtomID_class(){ MolAtomID_exposer.def( "molID" , molID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the MolID part of this match" ); } @@ -165,6 +170,7 @@ void register_MolAtomID_class(){ MolAtomID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -176,6 +182,7 @@ void register_MolAtomID_class(){ MolAtomID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -187,6 +194,7 @@ void register_MolAtomID_class(){ MolAtomID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolEditor.pypp.cpp b/wrapper/Mol/MolEditor.pypp.cpp index 98989b7f4..960f2f587 100644 --- a/wrapper/Mol/MolEditor.pypp.cpp +++ b/wrapper/Mol/MolEditor.pypp.cpp @@ -45,6 +45,8 @@ SireMol::MolEditor __copy__(const SireMol::MolEditor &other){ return SireMol::Mo #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MolEditor_class(){ @@ -64,6 +66,7 @@ void register_MolEditor_class(){ "add" , add_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Add an atom called name and return an editor that can\nbe used to edit it" ); } @@ -76,6 +79,7 @@ void register_MolEditor_class(){ "add" , add_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Add an atom called name and return an editor that can\nbe used to edit it" ); } @@ -88,6 +92,7 @@ void register_MolEditor_class(){ "add" , add_function_value , ( bp::arg("residue") ) + , bp::release_gil_policy() , "Add a residue called name and return an editor that can\nbe used to edit it" ); } @@ -100,6 +105,7 @@ void register_MolEditor_class(){ "add" , add_function_value , ( bp::arg("residue") ) + , bp::release_gil_policy() , "Add a residue with number number and return an editor that\ncan be used to edit it" ); } @@ -112,6 +118,7 @@ void register_MolEditor_class(){ "add" , add_function_value , ( bp::arg("cutgroup") ) + , bp::release_gil_policy() , "Add a CutGroup called name and return an editor that can\nbe used to edit it" ); } @@ -124,6 +131,7 @@ void register_MolEditor_class(){ "add" , add_function_value , ( bp::arg("chain") ) + , bp::release_gil_policy() , "Add a chain called name and return an editor that can\nbe used to edit it" ); } @@ -136,6 +144,7 @@ void register_MolEditor_class(){ "add" , add_function_value , ( bp::arg("segment") ) + , bp::release_gil_policy() , "Add a segment called name and return an editor that can\nbe used to edit it" ); } @@ -147,6 +156,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit these changes and return a copy of the\nedited molecule" ); } @@ -185,6 +195,7 @@ void register_MolEditor_class(){ "remove" , remove_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Remove all atoms from this molecule that have the ID atomid.\nThis does nothing if there are no atoms with this ID.\nThis returns an editor that can be used to further edit\nthe molecule" ); } @@ -197,6 +208,7 @@ void register_MolEditor_class(){ "remove" , remove_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Remove all CutGroups from this molecule that have the ID atomid.\nThis does nothing if there are no CutGroups with this ID.\nThis returns an editor that can be used to further edit\nthe molecule" ); } @@ -209,6 +221,7 @@ void register_MolEditor_class(){ "remove" , remove_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Remove all residues from this molecule that have the ID atomid.\nThis does nothing if there are no residues with this ID.\nThis returns an editor that can be used to further edit\nthe molecule" ); } @@ -221,6 +234,7 @@ void register_MolEditor_class(){ "remove" , remove_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Remove all chains from this molecule that have the ID atomid.\nThis does nothing if there are no chains with this ID.\nThis returns an editor that can be used to further edit\nthe molecule" ); } @@ -233,6 +247,7 @@ void register_MolEditor_class(){ "remove" , remove_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Remove all segments from this molecule that have the ID atomid.\nThis does nothing if there are no segments with this ID.\nThis returns an editor that can be used to further edit\nthe molecule" ); } @@ -244,6 +259,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "removeAllAtoms" , removeAllAtoms_function_value + , bp::release_gil_policy() , "Remove all atoms from this molecule. This returns an editor that\ncan be used to further edit the structure of this molecule" ); } @@ -255,6 +271,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "removeAllChains" , removeAllChains_function_value + , bp::release_gil_policy() , "Remove all chains from this molecule. This returns an editor that\ncan be used to further edit the structure of this molecule" ); } @@ -266,6 +283,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "removeAllCutGroups" , removeAllCutGroups_function_value + , bp::release_gil_policy() , "Remove all CutGroups from this molecule. This returns an editor that\ncan be used to further edit the structure of this molecule" ); } @@ -277,6 +295,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "removeAllResidues" , removeAllResidues_function_value + , bp::release_gil_policy() , "Remove all residues from this molecule. This returns an editor that\ncan be used to further edit the structure of this molecule" ); } @@ -288,6 +307,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "removeAllSegments" , removeAllSegments_function_value + , bp::release_gil_policy() , "Remove all segments from this molecule. This returns an editor that\ncan be used to further edit the structure of this molecule" ); } @@ -376,6 +396,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -387,6 +408,7 @@ void register_MolEditor_class(){ MolEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolEditorBase.pypp.cpp b/wrapper/Mol/MolEditorBase.pypp.cpp index ae77c6cae..d7f33ba4d 100644 --- a/wrapper/Mol/MolEditorBase.pypp.cpp +++ b/wrapper/Mol/MolEditorBase.pypp.cpp @@ -52,6 +52,8 @@ SireMol::MolEditorBase& set_Metadata_function2( #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MolEditorBase_class(){ @@ -69,6 +71,33 @@ void register_MolEditorBase_class(){ MolEditorBase_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::atom + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*atom_function_type)( int,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::atom ); + + MolEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::atom + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::atom ); + + MolEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -94,6 +123,33 @@ void register_MolEditorBase_class(){ MolEditorBase_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::chain + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*chain_function_type)( int,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::chain ); + + MolEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::chain + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::chain ); + + MolEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -119,6 +175,33 @@ void register_MolEditorBase_class(){ MolEditorBase_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::cutGroup + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::cutGroup ); + + MolEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::cutGroup + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::cutGroup ); + + MolEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -144,6 +227,7 @@ void register_MolEditorBase_class(){ MolEditorBase_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "" ); } @@ -174,6 +258,110 @@ void register_MolEditorBase_class(){ , bp::return_self< >() , "" ); + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( int ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( ::QString const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( ::SireMol::AtomID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( ::SireMol::ResID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( ::SireMol::CGID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( ::SireMol::ChainID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( ::SireMol::SegID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("segid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*__getitem___function_type)( ::SireID::Index const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::operator[] ); + + MolEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::removeMetadata @@ -226,6 +414,33 @@ void register_MolEditorBase_class(){ MolEditorBase_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::residue + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*residue_function_type)( int,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::residue ); + + MolEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::residue + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::residue ); + + MolEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -251,6 +466,33 @@ void register_MolEditorBase_class(){ MolEditorBase_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::segment + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*segment_function_type)( int,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::segment ); + + MolEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::segment + + typedef SireMol::Editor< SireMol::MolEditor, SireMol::Molecule > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::MolEditor, SireMol::Molecule >::segment ); + + MolEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } diff --git a/wrapper/Mol/MolGroupsBase.pypp.cpp b/wrapper/Mol/MolGroupsBase.pypp.cpp index 314d56a7f..b2746fda7 100644 --- a/wrapper/Mol/MolGroupsBase.pypp.cpp +++ b/wrapper/Mol/MolGroupsBase.pypp.cpp @@ -8,6 +8,8 @@ namespace bp = boost::python; +#include "SireBase/slice.h" + #include "SireError/errors.h" #include "SireMol/errors.h" @@ -78,6 +80,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MolGroupsBase_class(){ @@ -94,6 +98,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +111,7 @@ void register_MolGroupsBase_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -118,6 +124,7 @@ void register_MolGroupsBase_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -130,6 +137,7 @@ void register_MolGroupsBase_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -142,6 +150,7 @@ void register_MolGroupsBase_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -154,6 +163,7 @@ void register_MolGroupsBase_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -166,6 +176,7 @@ void register_MolGroupsBase_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -178,6 +189,7 @@ void register_MolGroupsBase_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -190,6 +202,7 @@ void register_MolGroupsBase_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -202,6 +215,7 @@ void register_MolGroupsBase_class(){ "assertContains" , assertContains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Assert that this set contains at least one atom of the\nmolecule with number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -214,6 +228,7 @@ void register_MolGroupsBase_class(){ "assertContains" , assertContains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Assert that this set contains at least one atom of any\nmolecule that is identified by the ID molid\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -226,6 +241,7 @@ void register_MolGroupsBase_class(){ "assertContains" , assertContains_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Assert that this contains the molecule group with number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -238,6 +254,7 @@ void register_MolGroupsBase_class(){ "assertContains" , assertContains_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Assert that this contains at least one molecule group that\nis identified by the ID mgid\nThrow: SireMol:missing_group\nThrow: SireError::invalid_index\n" ); } @@ -250,7 +267,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return all of the views of the molecule with number molnum\nthat are contained in this set of groups. Note that if the\nsame view appears in multiple groups, then it will be returned\nmultiple times in the returned set of views\nThrow: SireMol::missing_molecule\n" ); } @@ -263,7 +280,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("mgidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return a const reference to the group at index mgidx\nThrow: SireError::invalid_index\n" ); } @@ -276,7 +293,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("mgname") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return a const reference to the group in this set\ncalled mgname\nThrow: SireMol::missing_group\nThrow: SireMol::duplicate_group\n" ); } @@ -289,7 +306,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("mgid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return a const reference to the group in this set that\nis identified by mgid\nThrow: SireMol::missing_group\nThrow: SireMol::duplicate_group\nThrow: SireError::invalid_index\n" ); } @@ -302,6 +319,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return all of the views of the molecule with number molnum\nthat are contained in this set of groups. Note that if the\nsame view appears in multiple groups, then it will be returned\nmultiple times in the returned set of views\nThrow: SireMol::missing_molecule\n" ); } @@ -314,6 +332,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return all of the views of the molecule identified by molid\nthat are contained in this set of groups. Note that if the\nsame view appears in multiple groups, then it will be returned\nmultiple times in the returned set of views\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\n" ); } @@ -326,6 +345,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the segment from this set that matches the ID segid.\nThis segment must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -338,6 +358,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the chain from this set that matches the ID chainid.\nThis chain must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -350,6 +371,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the residue from this set that matches the ID resid.\nThis residue must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -362,6 +384,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the CutGroup from this set that matches the ID cgid.\nThis CutGroup must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -374,6 +397,7 @@ void register_MolGroupsBase_class(){ "at" , at_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the atom from this set that matches the ID atomid.\nThis atom must be contained in one of the groups in this set.\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -386,6 +410,7 @@ void register_MolGroupsBase_class(){ "atom" , atom_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the atom that matches the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -398,6 +423,7 @@ void register_MolGroupsBase_class(){ "atoms" , atoms_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return all of the atoms from this set that match the ID atomid.\nThe returned atoms are arranged by molecule, and only one copy\nof each atom is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -410,6 +436,7 @@ void register_MolGroupsBase_class(){ "chain" , chain_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the chain that matches the ID chainid\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -422,6 +449,7 @@ void register_MolGroupsBase_class(){ "chains" , chains_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return all of the chains from this set that match the ID chainid.\nThe returned chains are arranged by molecule, and only one copy\nof each chain is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -434,6 +462,7 @@ void register_MolGroupsBase_class(){ "contains" , contains_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Return whether or not this set contains the group with number mgnum" ); } @@ -446,6 +475,7 @@ void register_MolGroupsBase_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether any of the groups contain any view of the molecule\nwith number molnum" ); } @@ -458,6 +488,7 @@ void register_MolGroupsBase_class(){ "contains" , contains_function_value , ( bp::arg("molnums") ) + , bp::release_gil_policy() , "Return whether any of the groups contains any of the molecules whose\nnumbers are in molnums" ); } @@ -470,6 +501,7 @@ void register_MolGroupsBase_class(){ "contains" , contains_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return whether or not any of the groups contains the view molview" ); } @@ -482,6 +514,7 @@ void register_MolGroupsBase_class(){ "contains" , contains_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Return whether or not this set contains all of the views of\nthe molecule in molviews. The views can be contained in\nmultiple groups." ); } @@ -494,6 +527,7 @@ void register_MolGroupsBase_class(){ "contains" , contains_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this set of groups contains all of the views\nof all of the molecules in molecules. These views can be spread\nover lots of groups" ); } @@ -505,6 +539,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the total number of groups in this set" ); } @@ -517,6 +552,7 @@ void register_MolGroupsBase_class(){ "cutGroup" , cutGroup_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the CutGroup that matches the ID cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -529,6 +565,7 @@ void register_MolGroupsBase_class(){ "cutGroups" , cutGroups_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return all of the CutGroups from this set that match the ID cgid.\nThe returned CutGroups are arranged by molecule, and only one copy\nof each CutGroup is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -541,6 +578,7 @@ void register_MolGroupsBase_class(){ "getGroupNumber" , getGroupNumber_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Get the number of the molecule group whose number is mgnum.\nThis is an obvious function, only provided as a shortcut\nto prevent the MGID function being called if an MGNum is passed.\nThrow: SireMol::missing_group\n" ); } @@ -553,6 +591,7 @@ void register_MolGroupsBase_class(){ "getGroupNumber" , getGroupNumber_function_value , ( bp::arg("mgidx") ) + , bp::release_gil_policy() , "Return the number of the group at index mgidx\nThrow: SireError::invalid_index\n" ); } @@ -565,6 +604,7 @@ void register_MolGroupsBase_class(){ "getGroupNumber" , getGroupNumber_function_value , ( bp::arg("mgname") ) + , bp::release_gil_policy() , "Return the number of the molecule group that is called mgname.\nThrow: SireMol::missing_group\nThrow: SireMol::duplicate_group\n" ); } @@ -577,6 +617,7 @@ void register_MolGroupsBase_class(){ "getGroupNumber" , getGroupNumber_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Return the number of the groups that matches mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -589,6 +630,7 @@ void register_MolGroupsBase_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Simple function that just checks if a molecule with number\nmolnum is in the set, and returns it. This shortcuts\nthe getMoleculeNumber(const MolID&) function in the case\nof MolNums\nThrow: SireMol::missing_molecule\n" ); } @@ -601,6 +643,7 @@ void register_MolGroupsBase_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molidx") ) + , bp::release_gil_policy() , "Return the number of the molecule at index molidx in\nthis set\nThrow: SireError::invalid_index\n" ); } @@ -613,6 +656,7 @@ void register_MolGroupsBase_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molname") ) + , bp::release_gil_policy() , "Return the number of the molecule called molname from this set.\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\n" ); } @@ -625,6 +669,7 @@ void register_MolGroupsBase_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the number of the molecule that matches the ID molid\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\nThrow: SireError::invalid_index\n" ); } @@ -636,6 +681,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "getMoleculeNumbers" , getMoleculeNumbers_function_value + , bp::release_gil_policy() , "Return the list of molecule numbers in molidx order" ); } @@ -648,6 +694,7 @@ void register_MolGroupsBase_class(){ "getMoleculeVersion" , getMoleculeVersion_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the version number of the molecule with number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -660,6 +707,7 @@ void register_MolGroupsBase_class(){ "getMoleculeVersion" , getMoleculeVersion_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the version number of the molecule with ID molid\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\n" ); } @@ -672,7 +720,7 @@ void register_MolGroupsBase_class(){ "group" , group_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that has number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -685,7 +733,7 @@ void register_MolGroupsBase_class(){ "group" , group_function_value , ( bp::arg("mgname") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that has name mgname\nThrow: SireMol::missing_group\nThrow: SireMol::duplicate_group\n" ); } @@ -698,7 +746,7 @@ void register_MolGroupsBase_class(){ "group" , group_function_value , ( bp::arg("mgidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group at index mgidx\nThrow: SireError::invalid_index\n" ); } @@ -711,7 +759,7 @@ void register_MolGroupsBase_class(){ "group" , group_function_value , ( bp::arg("mgid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that matches the ID mgid\nThrow: SireMol::missing_group\nThrow: SireMol::duplicate_group\nThrow: SireError::invalid_index\n" ); } @@ -723,6 +771,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "groupNames" , groupNames_function_value + , bp::release_gil_policy() , "Return a list of the names of all of the groups in this set" ); } @@ -734,6 +783,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "groupNumbers" , groupNumbers_function_value + , bp::release_gil_policy() , "Return a list of the numbers of all of the groups in this set" ); } @@ -745,6 +795,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "groups" , groups_function_value + , bp::release_gil_policy() , "Return a list of all of the molecule groups in this set" ); } @@ -757,6 +808,7 @@ void register_MolGroupsBase_class(){ "groups" , groups_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Obvious shortcut for groups(const MGID&)\nThrow: SireMol::missing_group\n" ); } @@ -769,6 +821,7 @@ void register_MolGroupsBase_class(){ "groups" , groups_function_value , ( bp::arg("mgidx") ) + , bp::release_gil_policy() , "Obvious shortcut for groups(const MGID&)\nThrow: SireMol::invalid_index\n" ); } @@ -781,6 +834,7 @@ void register_MolGroupsBase_class(){ "groups" , groups_function_value , ( bp::arg("mgname") ) + , bp::release_gil_policy() , "Return all of the groups called mgname\nThrow: SireMol::missing_group\n" ); } @@ -793,6 +847,7 @@ void register_MolGroupsBase_class(){ "groups" , groups_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Return all of the groups that match the ID mgid\nThrow: SireMol::missing_group\n" ); } @@ -818,6 +873,7 @@ void register_MolGroupsBase_class(){ "intersects" , intersects_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return whether or not any of the groups in this set contain any\nof the atoms of the view of the molecule in molview" ); } @@ -830,6 +886,7 @@ void register_MolGroupsBase_class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether any of the groups in this set contain any of the\natoms of any of the views of any of the molecules in molecules" ); } @@ -841,6 +898,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this set is empty (contains no groups)" ); } @@ -853,6 +911,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Return the list of numbers of groups that have the number mgnum.\nThis is a simple and obvious function that acts as a shortcut\npreventing map(const MGID&) being called for an MGNum\nThrow: SireMol::missing_group\n" ); } @@ -865,6 +924,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("mgidx") ) + , bp::release_gil_policy() , "Return the list (of only one) molecule group that is at\nindex mgidx\nThrow: SireError::invalid_index\n" ); } @@ -877,6 +937,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("mgname") ) + , bp::release_gil_policy() , "Return the numbers of all groups in this set that are called\nmgname\nThrow: SireMol::missing_group\n" ); } @@ -889,6 +950,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Map the molecule group ID mgid to the list of molecule\ngroup numbers of the groups that match this ID in this set.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -901,6 +963,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Simple function that provides a shortcut for map(const MolID&)\nThrow: SireMol::missing_molecule\n" ); } @@ -913,6 +976,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("molidx") ) + , bp::release_gil_policy() , "Return the number of the molecule at index molidx\nThrow: SireError::invalid_index\n" ); } @@ -925,6 +989,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("molname") ) + , bp::release_gil_policy() , "Return the numbers of all of the molecules that have the\nname molname\nThrow: SireMol::missing_molecule\n" ); } @@ -937,6 +1002,7 @@ void register_MolGroupsBase_class(){ "map" , map_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the numbers of all molecules that match the ID molid\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -949,6 +1015,7 @@ void register_MolGroupsBase_class(){ "mgIdx" , mgIdx_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Return the index of the group with number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -960,6 +1027,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "mgNames" , mgNames_function_value + , bp::release_gil_policy() , "Return the names of all molecule groups in this set" ); } @@ -971,6 +1039,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "mgNums" , mgNums_function_value + , bp::release_gil_policy() , "Return the numbers of all molecule groups in this set" ); } @@ -982,6 +1051,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "molNums" , molNums_function_value + , bp::release_gil_policy() , "Return the list of molecule numbers in molidx order" ); } @@ -994,6 +1064,7 @@ void register_MolGroupsBase_class(){ "molecule" , molecule_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return all of the views of the molecule that has number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -1006,6 +1077,7 @@ void register_MolGroupsBase_class(){ "molecule" , molecule_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return all of the views of the molecule that matches molid\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\n" ); } @@ -1018,6 +1090,7 @@ void register_MolGroupsBase_class(){ "molecules" , molecules_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Obvious shortcut for molecules(const MolID&)\nThrow: SireMol::missing_molecule\n" ); } @@ -1030,6 +1103,7 @@ void register_MolGroupsBase_class(){ "molecules" , molecules_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return all of the molecules that match the ID molid\nThrow: SireMol::missing_molecule\n" ); } @@ -1041,6 +1115,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return the complete set of all molecules in this group. If a view of a\nmolecule appears multiple times in this set then multiple copies of\nthat view will be placed into the returned Molecules object.\nNote that this is a potentially very slow operation" ); } @@ -1053,8 +1128,33 @@ void register_MolGroupsBase_class(){ "molecules" , molecules_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Return the complete set of all molecules in the group(s) that\nmatch the ID mgid. If a view of a molecule appears multiple times\nin this set then multiple copies of that view will be placed into the\nreturned molecules object.\nNote that this is potentially a very slow function\n" ); + } + { //::SireMol::MolGroupsBase::nAtoms + + typedef int ( ::SireMol::MolGroupsBase::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::MolGroupsBase::nAtoms ); + + MolGroupsBase_exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "Return the total number of atoms in this groups in this set" ); + + } + { //::SireMol::MolGroupsBase::nChains + + typedef int ( ::SireMol::MolGroupsBase::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::MolGroupsBase::nChains ); + + MolGroupsBase_exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "Return the total number of chains in this groups in this set" ); + } { //::SireMol::MolGroupsBase::nGroups @@ -1064,6 +1164,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "nGroups" , nGroups_function_value + , bp::release_gil_policy() , "Return the total number of groups in this set" ); } @@ -1075,8 +1176,33 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the total number of molecules in the groups in this set" ); + } + { //::SireMol::MolGroupsBase::nResidues + + typedef int ( ::SireMol::MolGroupsBase::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::MolGroupsBase::nResidues ); + + MolGroupsBase_exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "Return the total number of residues in this groups in this set" ); + + } + { //::SireMol::MolGroupsBase::nSegments + + typedef int ( ::SireMol::MolGroupsBase::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::MolGroupsBase::nSegments ); + + MolGroupsBase_exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "Return the total number of segments in this groups in this set" ); + } { //::SireMol::MolGroupsBase::nViews @@ -1086,6 +1212,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() , "Return the total number of views of molecules in the groups in this set.\nNote that if a view appears multiple times, then it will be counted\nmultiple times" ); } @@ -1098,6 +1225,7 @@ void register_MolGroupsBase_class(){ "nViews" , nViews_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the total number of views of the molecule with number\nmolnum in the groups in this set. If a view appears multiple\ntimes then it will be counted multiple times.\nThrow: SireMol::missing_molecule\n" ); } @@ -1109,6 +1237,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "" ); } @@ -1120,7 +1249,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1133,7 +1262,7 @@ void register_MolGroupsBase_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1146,7 +1275,7 @@ void register_MolGroupsBase_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("mgname") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1159,7 +1288,7 @@ void register_MolGroupsBase_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("mgidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1172,7 +1301,31 @@ void register_MolGroupsBase_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("mgid") ) - , bp::return_value_policy() + , bp::return_value_policy() + , "" ); + + } + { //::SireMol::MolGroupsBase::operator[] + + typedef ::SireMol::ViewsOfMol ( ::SireMol::MolGroupsBase::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::MolGroupsBase::operator[] ); + + MolGroupsBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::MolGroupsBase::operator[] + + typedef ::SireMol::ViewsOfMol ( ::SireMol::MolGroupsBase::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::MolGroupsBase::operator[] ); + + MolGroupsBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) , "" ); } @@ -1259,6 +1412,18 @@ void register_MolGroupsBase_class(){ , ( bp::arg("atomid") ) , "" ); + } + { //::SireMol::MolGroupsBase::operator[] + + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::MolGroupsBase::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::MolGroupsBase::operator[] ); + + MolGroupsBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + } { //::SireMol::MolGroupsBase::remove @@ -1269,6 +1434,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Remove all of the views of all of the molecules in molgroup\nfrom this set. Note that this does not remove the actual molecule\ngroup. If you want to remove the group, then use the\nMolGroupsBase::remove(MGNum) function. Note that this also\nonly removes the first copy of any duplicated views." ); } @@ -1281,6 +1447,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Remove the view of the molecule in molview from all of\nthe groups in this set. This does nothing if this exact\nview is not contained by any of the groups. If a group has\nmultiple copies of this view, then this removes only\nthe first copy." ); } @@ -1293,6 +1460,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Remove the views of the molecule in molviews from all of\nthe groups in this set. This does nothing if none of these\nviews are contained by any of the groups. If a group contains\nmultiple copies of a view, then only the first copy is removed." ); } @@ -1305,6 +1473,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all of the views of all of the molecules in molecules\nfrom all of the groups in this set. If a group contains multiple\ncopies of a view then only the first copy is removed" ); } @@ -1317,6 +1486,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Completely remove all views of the molecule with number\nmolnum from all of the groups from this set. This\ndoes nothing if there are no views of this molecule\nin any of the groups" ); } @@ -1329,6 +1499,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molnums") ) + , bp::release_gil_policy() , "Completely remove all views of the molecules whose numbers\nare in molnums from all of the groups in this set. This\ndoes nothing if there are no views of these molecules in\nany of the groups" ); } @@ -1341,6 +1512,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Remove all molecules that match molid from all groups" ); } @@ -1353,6 +1525,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all groups (and molecules) that match the ID mgid" ); } @@ -1365,6 +1538,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1377,6 +1551,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1389,6 +1564,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1401,6 +1577,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1413,6 +1590,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molnum"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1425,6 +1603,7 @@ void register_MolGroupsBase_class(){ "remove" , remove_function_value , ( bp::arg("molnums"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1437,6 +1616,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Remove all copies of the view of the molecule in molview\nfrom all of the groups in this set. This removes all copies\nof a view (even duplicate copies)" ); } @@ -1449,6 +1629,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Remove all copies of the views of the molecule in molviews\nfrom all of the groups in this set. This removes all\ncopies of the views (even duplicate copies)" ); } @@ -1461,6 +1642,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all copies of all views of all molecules in molecules\nfrom all of the groups in this set. This removes all copies\nof the views (even duplicate copies)" ); } @@ -1473,6 +1655,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Remove all copies of all views of all molecules in the\ngroup molgroup from this set. Note that this removes\nthe molecules, not the group. Note also that all copies\nof the views are removed (even duplicate copies)" ); } @@ -1485,6 +1668,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all copies of the views of the molecule in molviews\nfrom all of the groups in this set. This removes all\ncopies of the views (even duplicate copies)" ); } @@ -1496,6 +1680,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "Completely clear all of the groups in this set" ); } @@ -1508,6 +1693,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1520,6 +1706,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1532,6 +1719,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1544,6 +1732,7 @@ void register_MolGroupsBase_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "" ); } @@ -1556,6 +1745,7 @@ void register_MolGroupsBase_class(){ "residue" , residue_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the residue that matches the ID resid\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -1568,6 +1758,7 @@ void register_MolGroupsBase_class(){ "residues" , residues_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return all of the residues from this set that match the ID resid.\nThe returned residues are arranged by molecule, and only one copy\nof each residue is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -1580,6 +1771,7 @@ void register_MolGroupsBase_class(){ "search" , search_function_value , ( bp::arg("search_string") ) + , bp::release_gil_policy() , "Return the result of searching this object for search_string" ); } @@ -1592,6 +1784,7 @@ void register_MolGroupsBase_class(){ "segment" , segment_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the segment that matches the ID segid\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -1604,6 +1797,7 @@ void register_MolGroupsBase_class(){ "segments" , segments_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return all of the segments from this set that match the ID segid.\nThe returned segments are arranged by molecule, and only one copy\nof each segment is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -1616,7 +1810,7 @@ void register_MolGroupsBase_class(){ "select" , select_function_value , ( bp::arg("mgid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the MoleculeGroup that matches the ID mgid\nThrow: SireMol::missing_group\nThrow: SireMol::duplicate_group\nThrow: SireError::invalid_index\n" ); } @@ -1629,6 +1823,7 @@ void register_MolGroupsBase_class(){ "select" , select_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return all of the views of the molecule with number molnum\nthat are contained in this set of groups. Note that if the\nsame view appears in multiple groups, then it will be returned\nmultiple times in the returned set of views\nThrow: SireMol::missing_molecule\n" ); } @@ -1641,6 +1836,7 @@ void register_MolGroupsBase_class(){ "select" , select_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the segment from this set that matches the ID segid.\nThis segment must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -1653,6 +1849,7 @@ void register_MolGroupsBase_class(){ "select" , select_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the chain from this set that matches the ID chainid.\nThis chain must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -1665,6 +1862,7 @@ void register_MolGroupsBase_class(){ "select" , select_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the residue from this set that matches the ID resid.\nThis residue must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -1677,6 +1875,7 @@ void register_MolGroupsBase_class(){ "select" , select_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the CutGroup from this set that matches the ID cgid.\nThis CutGroup must be wholly contained by one of the groups\nin this set\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -1689,6 +1888,7 @@ void register_MolGroupsBase_class(){ "select" , select_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the atom from this set that matches the ID atomid.\nThis atom must be contained in one of the groups in this set.\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -1700,6 +1900,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "selectAll" , selectAll_function_value + , bp::release_gil_policy() , "Return a list of all of the molecule groups in this set" ); } @@ -1712,6 +1913,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("mgnum") ) + , bp::release_gil_policy() , "Obvious shortcut for select(const MGID&)\nThrow: SireMol::missing_group\n" ); } @@ -1724,6 +1926,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("mgidx") ) + , bp::release_gil_policy() , "Obvious shortcut for select(const MGID&)\nThrow: SireError::invalid_index\n" ); } @@ -1736,6 +1939,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("mgname") ) + , bp::release_gil_policy() , "Return all of the molecule groups that are called mgname\nThrow: SireMol::missing_group\n" ); } @@ -1748,6 +1952,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Return all of the molecule groups that match the ID mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1760,6 +1965,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the views of the molecule(s) that match the molecule ID\nmolid. This returns all views of the molecule in the groups,\nand if a view is contained multiple times, then multiple copies\nof that view will be returned.\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -1772,6 +1978,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return all of the segments from this set that match the ID segid.\nThe returned segments are arranged by molecule, and only one copy\nof each segment is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -1784,6 +1991,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return all of the chains from this set that match the ID chainid.\nThe returned chains are arranged by molecule, and only one copy\nof each chain is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\n" ); } @@ -1796,6 +2004,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return all of the residues from this set that match the ID resid.\nThe returned residues are arranged by molecule, and only one copy\nof each residue is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -1808,6 +2017,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return all of the CutGroups from this set that match the ID cgid.\nThe returned CutGroups are arranged by molecule, and only one copy\nof each CutGroup is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -1820,6 +2030,7 @@ void register_MolGroupsBase_class(){ "selectAll" , selectAll_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return all of the atoms from this set that match the ID atomid.\nThe returned atoms are arranged by molecule, and only one copy\nof each atom is returned, regardless of how many times it appears\nin this set.\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -1832,6 +2043,7 @@ void register_MolGroupsBase_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview") ) + , bp::release_gil_policy() , "" ); } @@ -1844,6 +2056,7 @@ void register_MolGroupsBase_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molviews") ) + , bp::release_gil_policy() , "" ); } @@ -1856,6 +2069,7 @@ void register_MolGroupsBase_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -1868,6 +2082,7 @@ void register_MolGroupsBase_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -1879,6 +2094,7 @@ void register_MolGroupsBase_class(){ MolGroupsBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -1891,6 +2107,7 @@ void register_MolGroupsBase_class(){ "unite" , unite_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Synonym for MolGroupsBase::addIfUnique\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1903,6 +2120,7 @@ void register_MolGroupsBase_class(){ "unite" , unite_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Synonym for MolGroupsBase::addIfUnique\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1915,6 +2133,7 @@ void register_MolGroupsBase_class(){ "unite" , unite_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Synonym for MolGroupsBase::addIfUnique\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1927,6 +2146,7 @@ void register_MolGroupsBase_class(){ "unite" , unite_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Synonym for MolGroupsBase::addIfUnique\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } diff --git a/wrapper/Mol/MolID.pypp.cpp b/wrapper/Mol/MolID.pypp.cpp index 2e06d65c5..ce94a0bae 100644 --- a/wrapper/Mol/MolID.pypp.cpp +++ b/wrapper/Mol/MolID.pypp.cpp @@ -47,6 +47,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolID_class(){ { //::SireMol::MolID @@ -62,6 +64,7 @@ void register_MolID_class(){ "map" , map_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +77,7 @@ void register_MolID_class(){ "map" , map_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -86,6 +90,7 @@ void register_MolID_class(){ "map" , map_function_value , ( bp::arg("molgroupsbase") ) + , bp::release_gil_policy() , "" ); } @@ -141,6 +146,7 @@ void register_MolID_class(){ MolID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolIdx.pypp.cpp b/wrapper/Mol/MolIdx.pypp.cpp index 51a562f14..53763f4fa 100644 --- a/wrapper/Mol/MolIdx.pypp.cpp +++ b/wrapper/Mol/MolIdx.pypp.cpp @@ -31,6 +31,8 @@ SireMol::MolIdx __copy__(const SireMol::MolIdx &other){ return SireMol::MolIdx(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolIdx_class(){ { //::SireMol::MolIdx @@ -47,6 +49,7 @@ void register_MolIdx_class(){ MolIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -58,6 +61,7 @@ void register_MolIdx_class(){ MolIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +74,7 @@ void register_MolIdx_class(){ "map" , map_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -82,6 +87,7 @@ void register_MolIdx_class(){ "map" , map_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -94,6 +100,7 @@ void register_MolIdx_class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -105,6 +112,7 @@ void register_MolIdx_class(){ MolIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -129,6 +137,7 @@ void register_MolIdx_class(){ MolIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -140,6 +149,7 @@ void register_MolIdx_class(){ MolIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -151,6 +161,7 @@ void register_MolIdx_class(){ MolIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolInfo.pypp.cpp b/wrapper/Mol/MolInfo.pypp.cpp index b7075a29b..12adee95f 100644 --- a/wrapper/Mol/MolInfo.pypp.cpp +++ b/wrapper/Mol/MolInfo.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireMol::MolInfo&){ return "SireMol::MolInfo";} +#include "Helpers/release_gil_policy.hpp" + void register_MolInfo_class(){ { //::SireMol::MolInfo @@ -32,6 +34,7 @@ void register_MolInfo_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "" ); } @@ -44,6 +47,7 @@ void register_MolInfo_class(){ "assertSingleAtom" , assertSingleAtom_function_value , ( bp::arg("atomidxs") ) + , bp::release_gil_policy() , "Assert that there is the index for just one atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\n" ); } @@ -56,6 +60,7 @@ void register_MolInfo_class(){ "assertSingleChain" , assertSingleChain_function_value , ( bp::arg("chainidxs") ) + , bp::release_gil_policy() , "Assert that there is the index for just one chain\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\n" ); } @@ -68,6 +73,7 @@ void register_MolInfo_class(){ "assertSingleCutGroup" , assertSingleCutGroup_function_value , ( bp::arg("cgidxs") ) + , bp::release_gil_policy() , "Assert that there is the index for just one CutGroup\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\n" ); } @@ -80,6 +86,7 @@ void register_MolInfo_class(){ "assertSingleResidue" , assertSingleResidue_function_value , ( bp::arg("residxs") ) + , bp::release_gil_policy() , "Assert that there is the index for just one residue\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\n" ); } @@ -92,6 +99,7 @@ void register_MolInfo_class(){ "assertSingleSegment" , assertSingleSegment_function_value , ( bp::arg("segidxs") ) + , bp::release_gil_policy() , "Assert that there is the index for just one segment\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\n" ); } @@ -104,6 +112,7 @@ void register_MolInfo_class(){ "atomIdx" , atomIdx_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "" ); } @@ -116,6 +125,7 @@ void register_MolInfo_class(){ "cgIdx" , cgIdx_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +138,7 @@ void register_MolInfo_class(){ "chainIdx" , chainIdx_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "" ); } @@ -140,6 +151,7 @@ void register_MolInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("cgidx"), bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -152,6 +164,7 @@ void register_MolInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("residx"), bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -164,6 +177,7 @@ void register_MolInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("chainidx"), bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -176,6 +190,7 @@ void register_MolInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("segidx"), bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -187,6 +202,7 @@ void register_MolInfo_class(){ MolInfo_exposer.def( "getAtoms" , getAtoms_function_value + , bp::release_gil_policy() , "" ); } @@ -199,6 +215,7 @@ void register_MolInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "" ); } @@ -211,6 +228,7 @@ void register_MolInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "" ); } @@ -223,6 +241,7 @@ void register_MolInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +254,7 @@ void register_MolInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +266,7 @@ void register_MolInfo_class(){ MolInfo_exposer.def( "getChains" , getChains_function_value + , bp::release_gil_policy() , "" ); } @@ -257,6 +278,7 @@ void register_MolInfo_class(){ MolInfo_exposer.def( "getCutGroups" , getCutGroups_function_value + , bp::release_gil_policy() , "" ); } @@ -269,6 +291,7 @@ void register_MolInfo_class(){ "getResidue" , getResidue_function_value , ( bp::arg("chainidx"), bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -280,6 +303,7 @@ void register_MolInfo_class(){ MolInfo_exposer.def( "getResidues" , getResidues_function_value + , bp::release_gil_policy() , "" ); } @@ -292,6 +316,7 @@ void register_MolInfo_class(){ "getResiduesIn" , getResiduesIn_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "" ); } @@ -303,6 +328,7 @@ void register_MolInfo_class(){ MolInfo_exposer.def( "getSegments" , getSegments_function_value + , bp::release_gil_policy() , "" ); } @@ -315,6 +341,7 @@ void register_MolInfo_class(){ "intersection" , intersection_function_value , ( bp::arg("list0"), bp::arg("list1") ) + , bp::release_gil_policy() , "" ); } @@ -327,6 +354,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -339,6 +367,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("num") ) + , bp::release_gil_policy() , "" ); } @@ -351,6 +380,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); } @@ -363,6 +393,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "" ); } @@ -375,6 +406,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -387,6 +419,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("num") ) + , bp::release_gil_policy() , "" ); } @@ -399,6 +432,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); } @@ -411,6 +445,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "" ); } @@ -423,6 +458,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -435,6 +471,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); } @@ -447,6 +484,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "" ); } @@ -459,6 +497,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -471,6 +510,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); } @@ -483,6 +523,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "" ); } @@ -495,6 +536,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "" ); } @@ -507,6 +549,7 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); } @@ -519,6 +562,67 @@ void register_MolInfo_class(){ "map" , map_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MolInfo::nAtoms + + typedef int ( ::SireMol::MolInfo::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::MolInfo::nAtoms ); + + MolInfo_exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MolInfo::nChains + + typedef int ( ::SireMol::MolInfo::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::MolInfo::nChains ); + + MolInfo_exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MolInfo::nCutGroups + + typedef int ( ::SireMol::MolInfo::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::MolInfo::nCutGroups ); + + MolInfo_exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MolInfo::nResidues + + typedef int ( ::SireMol::MolInfo::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::MolInfo::nResidues ); + + MolInfo_exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MolInfo::nSegments + + typedef int ( ::SireMol::MolInfo::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::MolInfo::nSegments ); + + MolInfo_exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() , "" ); } @@ -531,6 +635,7 @@ void register_MolInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "" ); } @@ -543,6 +648,7 @@ void register_MolInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "" ); } @@ -555,6 +661,7 @@ void register_MolInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "" ); } @@ -567,6 +674,7 @@ void register_MolInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "" ); } @@ -579,6 +687,7 @@ void register_MolInfo_class(){ "parentCutGroup" , parentCutGroup_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "" ); } @@ -591,6 +700,7 @@ void register_MolInfo_class(){ "parentCutGroup" , parentCutGroup_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "" ); } @@ -603,6 +713,7 @@ void register_MolInfo_class(){ "parentResidue" , parentResidue_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "" ); } @@ -615,6 +726,7 @@ void register_MolInfo_class(){ "parentResidue" , parentResidue_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "" ); } @@ -627,6 +739,7 @@ void register_MolInfo_class(){ "parentSegment" , parentSegment_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "" ); } @@ -639,6 +752,7 @@ void register_MolInfo_class(){ "parentSegment" , parentSegment_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "" ); } @@ -651,6 +765,7 @@ void register_MolInfo_class(){ "resIdx" , resIdx_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "" ); } @@ -663,6 +778,7 @@ void register_MolInfo_class(){ "segIdx" , segIdx_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolName.pypp.cpp b/wrapper/Mol/MolName.pypp.cpp index 3b461a39d..fa70f7589 100644 --- a/wrapper/Mol/MolName.pypp.cpp +++ b/wrapper/Mol/MolName.pypp.cpp @@ -31,6 +31,8 @@ SireMol::MolName __copy__(const SireMol::MolName &other){ return SireMol::MolNam #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolName_class(){ { //::SireMol::MolName @@ -48,6 +50,7 @@ void register_MolName_class(){ MolName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -59,6 +62,7 @@ void register_MolName_class(){ MolName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -71,6 +75,7 @@ void register_MolName_class(){ "map" , map_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_MolName_class(){ "map" , map_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_MolName_class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_MolName_class(){ MolName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -133,6 +141,7 @@ void register_MolName_class(){ MolName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +153,7 @@ void register_MolName_class(){ MolName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolNum.pypp.cpp b/wrapper/Mol/MolNum.pypp.cpp index 96f600aae..0fcf428e5 100644 --- a/wrapper/Mol/MolNum.pypp.cpp +++ b/wrapper/Mol/MolNum.pypp.cpp @@ -31,6 +31,8 @@ SireMol::MolNum __copy__(const SireMol::MolNum &other){ return SireMol::MolNum(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolNum_class(){ { //::SireMol::MolNum @@ -47,6 +49,7 @@ void register_MolNum_class(){ MolNum_exposer.def( "getUniqueNumber" , getUniqueNumber_function_value + , bp::release_gil_policy() , "" ); } @@ -58,6 +61,7 @@ void register_MolNum_class(){ MolNum_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -69,6 +73,7 @@ void register_MolNum_class(){ MolNum_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +86,7 @@ void register_MolNum_class(){ "map" , map_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_MolNum_class(){ "map" , map_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -105,6 +112,7 @@ void register_MolNum_class(){ "map" , map_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +144,7 @@ void register_MolNum_class(){ MolNum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -147,6 +156,7 @@ void register_MolNum_class(){ MolNum_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -158,6 +168,7 @@ void register_MolNum_class(){ MolNum_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolResID.pypp.cpp b/wrapper/Mol/MolResID.pypp.cpp index 2ee765776..0c0fe7e69 100644 --- a/wrapper/Mol/MolResID.pypp.cpp +++ b/wrapper/Mol/MolResID.pypp.cpp @@ -36,6 +36,8 @@ SireMol::MolResID __copy__(const SireMol::MolResID &other){ return SireMol::MolR #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolResID_class(){ { //::SireMol::MolResID @@ -56,6 +58,7 @@ void register_MolResID_class(){ MolResID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this ID" ); } @@ -67,6 +70,7 @@ void register_MolResID_class(){ MolResID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is null" ); } @@ -79,6 +83,7 @@ void register_MolResID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the indicies of the matching residues\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -90,7 +95,7 @@ void register_MolResID_class(){ MolResID_exposer.def( "molID" , molID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the MolID part of this match" ); } @@ -118,7 +123,7 @@ void register_MolResID_class(){ MolResID_exposer.def( "resID" , resID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ResID part of this match" ); } @@ -166,6 +171,7 @@ void register_MolResID_class(){ MolResID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -177,6 +183,7 @@ void register_MolResID_class(){ MolResID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -188,6 +195,7 @@ void register_MolResID_class(){ MolResID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolResNum.pypp.cpp b/wrapper/Mol/MolResNum.pypp.cpp index e46bd175c..ea46c3154 100644 --- a/wrapper/Mol/MolResNum.pypp.cpp +++ b/wrapper/Mol/MolResNum.pypp.cpp @@ -36,6 +36,8 @@ SireMol::MolResNum __copy__(const SireMol::MolResNum &other){ return SireMol::Mo #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolResNum_class(){ { //::SireMol::MolResNum @@ -53,6 +55,7 @@ void register_MolResNum_class(){ MolResNum_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this ID" ); } @@ -64,6 +67,7 @@ void register_MolResNum_class(){ MolResNum_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this is null" ); } @@ -76,6 +80,7 @@ void register_MolResNum_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the indicies of the matching residues\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -87,7 +92,7 @@ void register_MolResNum_class(){ MolResNum_exposer.def( "molNum" , molNum_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the MolNum part of this match" ); } @@ -115,7 +120,7 @@ void register_MolResNum_class(){ MolResNum_exposer.def( "resNum" , resNum_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ResNum part of this match" ); } @@ -163,6 +168,7 @@ void register_MolResNum_class(){ MolResNum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -174,6 +180,7 @@ void register_MolResNum_class(){ MolResNum_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -185,6 +192,7 @@ void register_MolResNum_class(){ MolResNum_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolStructureEditor.pypp.cpp b/wrapper/Mol/MolStructureEditor.pypp.cpp index 8c5bc9ea8..3719c5dea 100644 --- a/wrapper/Mol/MolStructureEditor.pypp.cpp +++ b/wrapper/Mol/MolStructureEditor.pypp.cpp @@ -46,6 +46,8 @@ SireMol::MolStructureEditor __copy__(const SireMol::MolStructureEditor &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolStructureEditor_class(){ { //::SireMol::MolStructureEditor @@ -64,6 +66,7 @@ void register_MolStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Add an atom called name to this molecule and return an\neditor for this atom" ); } @@ -76,6 +79,7 @@ void register_MolStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Add an atom called name to this molecule and return an\neditor for this atom" ); } @@ -88,6 +92,7 @@ void register_MolStructureEditor_class(){ "add" , add_function_value , ( bp::arg("residue") ) + , bp::release_gil_policy() , "Add a residue called name to this molecule and return an\neditor for this residue" ); } @@ -100,6 +105,7 @@ void register_MolStructureEditor_class(){ "add" , add_function_value , ( bp::arg("residue") ) + , bp::release_gil_policy() , "Add a residue with number number to this molecule and\nreturn an editor for this residue" ); } @@ -112,6 +118,7 @@ void register_MolStructureEditor_class(){ "add" , add_function_value , ( bp::arg("cutgroup") ) + , bp::release_gil_policy() , "Add a CutGroup called name to this molecule and return an\neditor for this CutGroup" ); } @@ -124,6 +131,7 @@ void register_MolStructureEditor_class(){ "add" , add_function_value , ( bp::arg("chain") ) + , bp::release_gil_policy() , "Add a chain called name to this molecule and return an\neditor for this chain" ); } @@ -136,6 +144,7 @@ void register_MolStructureEditor_class(){ "add" , add_function_value , ( bp::arg("segment") ) + , bp::release_gil_policy() , "Add a segment called name to this molecule and return an\neditor for this segment" ); } @@ -148,6 +157,7 @@ void register_MolStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom at ID atomid\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -160,6 +170,7 @@ void register_MolStructureEditor_class(){ "chain" , chain_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return an editor for the chain at ID chainid\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -171,6 +182,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes and return a Molecule copy" ); } @@ -183,6 +195,7 @@ void register_MolStructureEditor_class(){ "cutGroup" , cutGroup_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return an editor for the CutGroup at ID cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -194,6 +207,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this molecule (may be zero)" ); } @@ -205,6 +219,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "Return the number of chains in this molecule (may be zero)" ); } @@ -216,6 +231,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "Return the number of CutGroups in this molecule (may be zero)" ); } @@ -227,6 +243,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of residues in this molecule (may be zero)" ); } @@ -238,6 +255,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "Return the number of segments in this molecule (may be zero)" ); } @@ -249,7 +267,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this molecule" ); } @@ -261,6 +279,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return this molecules ID number" ); } @@ -475,6 +494,7 @@ void register_MolStructureEditor_class(){ "residue" , residue_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return an editor for the residue at ID resid\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -487,6 +507,7 @@ void register_MolStructureEditor_class(){ "segment" , segment_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return an editor for the segment at ID segid\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -499,6 +520,7 @@ void register_MolStructureEditor_class(){ "select" , select_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom at ID atomid\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -511,6 +533,7 @@ void register_MolStructureEditor_class(){ "select" , select_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return an editor for the CutGroup at ID cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\nThrow: SireError::invalid_index\n" ); } @@ -523,6 +546,7 @@ void register_MolStructureEditor_class(){ "select" , select_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return an editor for the residue at ID resid\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -535,6 +559,7 @@ void register_MolStructureEditor_class(){ "select" , select_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return an editor for the chain at ID chainid\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -547,6 +572,7 @@ void register_MolStructureEditor_class(){ "select" , select_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return an editor for the segment at ID segid\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -558,6 +584,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this is a complete molecule" ); } @@ -569,6 +596,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -580,6 +608,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -591,6 +620,7 @@ void register_MolStructureEditor_class(){ MolStructureEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolViewProperty.pypp.cpp b/wrapper/Mol/MolViewProperty.pypp.cpp index 0133d6141..8c740c4cb 100644 --- a/wrapper/Mol/MolViewProperty.pypp.cpp +++ b/wrapper/Mol/MolViewProperty.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolViewProperty_class(){ { //::SireMol::MolViewProperty @@ -38,6 +40,7 @@ void register_MolViewProperty_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Assert that this property is compatible with the MoleculeInfoData info\nThrow: SireError::incompatible_error\n" ); } @@ -50,6 +53,7 @@ void register_MolViewProperty_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Assert that this property is compatible with the MoleculeInfo info\nThrow: SireError::incompatible_error\n" ); } @@ -62,6 +66,7 @@ void register_MolViewProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this is compatible with the passed molinfo" ); } @@ -74,6 +79,7 @@ void register_MolViewProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this is compatible with the passed molinfo" ); } @@ -86,6 +92,7 @@ void register_MolViewProperty_class(){ "makeCompatibleWith" , makeCompatibleWith_function_value , ( bp::arg("molinfo"), bp::arg("atommatcher") ) + , bp::release_gil_policy() , "Do everything possible to make this property compatible with the\nMoleculeInfoData layout in info - otherwise raise an error\nThrow: SireError::incompatible_error\n" ); } @@ -98,6 +105,7 @@ void register_MolViewProperty_class(){ "makeCompatibleWith" , makeCompatibleWith_function_value , ( bp::arg("molinfo"), bp::arg("map") ) + , bp::release_gil_policy() , "Do everything possible to make this property compatible with the\nMoleculeInfoData layout in info - otherwise raise an error\nThrow: SireError::incompatible_error\n" ); } @@ -110,6 +118,7 @@ void register_MolViewProperty_class(){ "makeCompatibleWith" , makeCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Do everything possible to make this property compatible with the molecule\nviewed in mol - otherwise raise an error\nThrow: SireError::incompatible_error\n" ); } @@ -122,6 +131,7 @@ void register_MolViewProperty_class(){ "makeCompatibleWith" , makeCompatibleWith_function_value , ( bp::arg("mol") ) + , bp::release_gil_policy() , "Do everything possible to make this property compatible with the molecule\nviewed in mol - otherwise raise an error\nThrow: SireError::incompatible_error\n" ); } @@ -134,6 +144,7 @@ void register_MolViewProperty_class(){ "makeCompatibleWith" , makeCompatibleWith_function_value , ( bp::arg("mol"), bp::arg("atommatcher") ) + , bp::release_gil_policy() , "Do everything possible to make this property compatible with the\nMoleculeInfoData layout in info - otherwise raise an error\nThrow: SireError::incompatible_error\n" ); } @@ -146,6 +157,7 @@ void register_MolViewProperty_class(){ "makeCompatibleWith" , makeCompatibleWith_function_value , ( bp::arg("mol"), bp::arg("map") ) + , bp::release_gil_policy() , "Do everything possible to make this property compatible with the\nMoleculeInfoData layout in info - otherwise raise an error\nThrow: SireError::incompatible_error\n" ); } @@ -157,6 +169,7 @@ void register_MolViewProperty_class(){ MolViewProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MolWithResID.pypp.cpp b/wrapper/Mol/MolWithResID.pypp.cpp index 72ef84964..2ea84dc3c 100644 --- a/wrapper/Mol/MolWithResID.pypp.cpp +++ b/wrapper/Mol/MolWithResID.pypp.cpp @@ -32,6 +32,8 @@ SireMol::MolWithResID __copy__(const SireMol::MolWithResID &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolWithResID_class(){ { //::SireMol::MolWithResID @@ -51,6 +53,7 @@ void register_MolWithResID_class(){ MolWithResID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -62,6 +65,7 @@ void register_MolWithResID_class(){ MolWithResID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -74,6 +78,7 @@ void register_MolWithResID_class(){ "map" , map_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "" ); } @@ -86,6 +91,7 @@ void register_MolWithResID_class(){ "map" , map_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -98,6 +104,7 @@ void register_MolWithResID_class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "" ); } @@ -125,7 +132,7 @@ void register_MolWithResID_class(){ MolWithResID_exposer.def( "resID" , resID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the residue ID that is used to find the residue (and thus the molecule)" ); } @@ -137,6 +144,7 @@ void register_MolWithResID_class(){ MolWithResID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +156,7 @@ void register_MolWithResID_class(){ MolWithResID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -159,6 +168,7 @@ void register_MolWithResID_class(){ MolWithResID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Molecule.pypp.cpp b/wrapper/Mol/Molecule.pypp.cpp index c81f098d3..a5950125b 100644 --- a/wrapper/Mol/Molecule.pypp.cpp +++ b/wrapper/Mol/Molecule.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; #include "chain.h" +#include "core.h" + #include "cutgroup.h" #include "evaluator.h" @@ -46,6 +48,8 @@ SireMol::Molecule __copy__(const SireMol::Molecule &other){ return SireMol::Mole #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Molecule_class(){ @@ -66,6 +70,7 @@ void register_Molecule_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this molecule contains some metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -78,6 +83,7 @@ void register_Molecule_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this molecule contains some metadata at metakey metakey\nassociated with the property at key key\nThrow: SireBase::missing_property\n" ); } @@ -90,6 +96,7 @@ void register_Molecule_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this molecule contains a property at key key\nThrow: SireBase::missing_property\n" ); } @@ -101,6 +108,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an Editor that can edit any part of this molecule" ); } @@ -112,6 +120,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an Evaluator that evaluates values using\nall of the atoms in this molecule" ); } @@ -124,6 +133,7 @@ void register_Molecule_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not this molecule posseses metadata with\nmetakey metakey" ); } @@ -136,6 +146,7 @@ void register_Molecule_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not the property of this molecule at\nkey key has metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -148,6 +159,7 @@ void register_Molecule_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not this molecule posseses a property at key key" ); } @@ -159,6 +171,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "info" , info_function_value + , bp::release_gil_policy() , "Return the MoleculeInfo object that holds information about the layout\nof the atoms, residues, chains and segments in the molecule" ); } @@ -170,6 +183,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -182,7 +196,7 @@ void register_Molecule_class(){ "metadata" , metadata_function_value , ( bp::arg("metakey") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata for the metakey metakey\nThrow: SireMol::missing_property\n" ); } @@ -195,7 +209,7 @@ void register_Molecule_class(){ "metadata" , metadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata for the metakey metakey for\nthe property at key key\nThrow: SireBase::missing_property\n" ); } @@ -207,6 +221,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the metakeys of all the metadata in this molecule" ); } @@ -219,6 +234,7 @@ void register_Molecule_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the metakeys for all of the metadata for the property\nat key key\nThrow: SireBase::missing_property\n" ); } @@ -230,6 +246,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return a Mover that moves all of the atoms in\nthis molecule" ); } @@ -241,8 +258,61 @@ void register_Molecule_class(){ Molecule_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this molecule" ); + } + { //::SireMol::Molecule::nAtoms + + typedef int ( ::SireMol::Molecule::*nAtoms_function_type)( ::SireMol::ResID const & ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::Molecule::nAtoms ); + + Molecule_exposer.def( + "nAtoms" + , nAtoms_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return the number of atoms in the identified residue(s)" ); + + } + { //::SireMol::Molecule::nAtoms + + typedef int ( ::SireMol::Molecule::*nAtoms_function_type)( ::SireMol::ChainID const & ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::Molecule::nAtoms ); + + Molecule_exposer.def( + "nAtoms" + , nAtoms_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return the number of atoms in the identified chain(s)" ); + + } + { //::SireMol::Molecule::nAtoms + + typedef int ( ::SireMol::Molecule::*nAtoms_function_type)( ::SireMol::SegID const & ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::Molecule::nAtoms ); + + Molecule_exposer.def( + "nAtoms" + , nAtoms_function_value + , ( bp::arg("seg") ) + , bp::release_gil_policy() + , "Return the number of atoms in the identified segment(s)" ); + + } + { //::SireMol::Molecule::nAtoms + + typedef int ( ::SireMol::Molecule::*nAtoms_function_type)( ::SireMol::CGID const & ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::Molecule::nAtoms ); + + Molecule_exposer.def( + "nAtoms" + , nAtoms_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return the number of atoms in the identified cutgroups(s)" ); + } { //::SireMol::Molecule::nChains @@ -252,6 +322,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "Return the number of chains in this molecule" ); } @@ -263,6 +334,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "Return the number of CutGroups in this molecule" ); } @@ -274,8 +346,22 @@ void register_Molecule_class(){ Molecule_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of residues in this molecule" ); + } + { //::SireMol::Molecule::nResidues + + typedef int ( ::SireMol::Molecule::*nResidues_function_type)( ::SireMol::ChainID const & ) const; + nResidues_function_type nResidues_function_value( &::SireMol::Molecule::nResidues ); + + Molecule_exposer.def( + "nResidues" + , nResidues_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return the number of residues in the identified chain(s)" ); + } { //::SireMol::Molecule::nSegments @@ -285,6 +371,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "Return the number of segments in this molecule" ); } @@ -296,7 +383,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this molecule" ); } @@ -308,6 +395,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the number of this molecule - this is used\nto identify the molecule" ); } @@ -347,7 +435,7 @@ void register_Molecule_class(){ "property" , property_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the property associated with the key key\nThrow: SireMol::missing_property\n" ); } @@ -359,6 +447,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys of all of the properties in this molecule" ); } @@ -370,6 +459,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this is a complete molecule" ); } @@ -381,8 +471,21 @@ void register_Molecule_class(){ Molecule_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return which atoms are selected in this view" ); + } + { //::SireMol::Molecule::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Molecule::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Molecule::toSelector ); + + Molecule_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Molecule::toString @@ -392,6 +495,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this molecule" ); } @@ -403,6 +507,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -415,6 +520,7 @@ void register_Molecule_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this molecule with the passed molecule data.\nThrow: SireError::incompatible_error\n" ); } @@ -426,6 +532,7 @@ void register_Molecule_class(){ Molecule_exposer.def( "version" , version_function_value + , bp::release_gil_policy() , "Return the version number of this molecule - all molecules\nwith the same ID number and version number must be identical" ); } @@ -438,6 +545,7 @@ void register_Molecule_class(){ "version" , version_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the version number of the property at key key.\nAll molecules with the same ID number and same property version\nnumber must have the same value of this property\n(although this says nothing about any metadata associated\nwith this property)\nThrow: SireBase::missing_property\n" ); } diff --git a/wrapper/Mol/MoleculeBeading.pypp.cpp b/wrapper/Mol/MoleculeBeading.pypp.cpp index 68547e3a0..98e22860b 100644 --- a/wrapper/Mol/MoleculeBeading.pypp.cpp +++ b/wrapper/Mol/MoleculeBeading.pypp.cpp @@ -39,6 +39,8 @@ SireMol::MoleculeBeading __copy__(const SireMol::MoleculeBeading &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MoleculeBeading_class(){ { //::SireMol::MoleculeBeading @@ -69,6 +71,7 @@ void register_MoleculeBeading_class(){ MoleculeBeading_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MoleculeGroup.pypp.cpp b/wrapper/Mol/MoleculeGroup.pypp.cpp index 3980d8e22..2b6223c37 100644 --- a/wrapper/Mol/MoleculeGroup.pypp.cpp +++ b/wrapper/Mol/MoleculeGroup.pypp.cpp @@ -24,6 +24,8 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "core.h" + #include "editor.hpp" #include "mgname.h" @@ -66,6 +68,8 @@ SireMol::MoleculeGroup __copy__(const SireMol::MoleculeGroup &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MoleculeGroup_class(){ { //::SireMol::MoleculeGroup @@ -88,6 +92,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the molecule group that the last move was accepted. This tells the\ngroup to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -100,6 +105,7 @@ void register_MoleculeGroup_class(){ "add" , add_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Add the view of the molecule in molview to this group.\nThis adds the view as a duplicate if it already exists\nin this group" ); } @@ -112,6 +118,7 @@ void register_MoleculeGroup_class(){ "add" , add_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Add the views of the molecule in molviews to this group.\nThis adds the views as duplicates if they already exist\nin this group" ); } @@ -124,6 +131,7 @@ void register_MoleculeGroup_class(){ "add" , add_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Add all of the molecules in molecules to this group.\nThis duplicates any molecules that already exist in this\ngroup." ); } @@ -136,6 +144,7 @@ void register_MoleculeGroup_class(){ "add" , add_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Add the molecules in MoleculeGroup to this set. This adds the\nmolecules and views in the same order as they appear in\nMoleculeGroup, adding them as duplicates if they already\nexist in this set. Note that the version of the molecule\nwill be taken from this set." ); } @@ -148,6 +157,7 @@ void register_MoleculeGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Add the view of the molecule in molview to this group.\nThis only adds the view if it does not already exist in\nthis group, and returns whether or not the view was added" ); } @@ -160,6 +170,7 @@ void register_MoleculeGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Add the views of the molecule molviews to this group,\nadding the views only if they dont already exist in this\ngroup. This returns the views that were added successfully\nto this group." ); } @@ -172,6 +183,7 @@ void register_MoleculeGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Add the views of the molecules in molecules to this group. This\nonly adds views that dont already exist in this group. This\nreturns all of the views that were successfully added." ); } @@ -184,6 +196,7 @@ void register_MoleculeGroup_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Add the viewsmolecules in MoleculeGroup to this group, but\nonly if they dont already exist in this group. This has\nthe same action as MoleculeGroup::addIfUnique(molecules), but\nit ensures that the added views are in the same order as\nin MoleculeGroup. This is costly, so if you dont care\nabout the added order, then use\nMoleculeGroup::addIfUnique(MoleculeGroup.molecules()) instead.\nThis returns the added views.\n" ); } @@ -196,6 +209,7 @@ void register_MoleculeGroup_class(){ "assertContains" , assertContains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Assert that this group contains a view of any part of the\nmolecule with number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -208,6 +222,7 @@ void register_MoleculeGroup_class(){ "assertContains" , assertContains_function_value , ( bp::arg("molname") ) + , bp::release_gil_policy() , "Assert that this group contains a molecule called molname\nThrow: SireMol::missing_molecule\n" ); } @@ -272,6 +287,7 @@ void register_MoleculeGroup_class(){ "at" , at_function_value , ( bp::arg("viewidx") ) + , bp::release_gil_policy() , "Return the specified view of the specified molecule in this group.\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -284,6 +300,7 @@ void register_MoleculeGroup_class(){ "at" , at_function_value , ( bp::arg("viewidx") ) + , bp::release_gil_policy() , "Return the view of hte molecule at viewidx\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\nThrow: SireError::invalid_index\n" ); } @@ -296,6 +313,7 @@ void register_MoleculeGroup_class(){ "at" , at_function_value , ( bp::arg("molnum"), bp::arg("viewidx") ) + , bp::release_gil_policy() , "Return the specified view of the specified molecule in this group.\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -308,6 +326,7 @@ void register_MoleculeGroup_class(){ "at" , at_function_value , ( bp::arg("molid"), bp::arg("viewidx") ) + , bp::release_gil_policy() , "Return the specified view of the molecule identified by\nthe ID molid\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\nThrow: SireError::invalid_index\n" ); } @@ -332,6 +351,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this group contains any views of the\nmolecule with number molnum" ); } @@ -344,6 +364,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("molidx") ) + , bp::release_gil_policy() , "Return whether or not this group contains a molecule at index molidx" ); } @@ -356,6 +377,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("molname") ) + , bp::release_gil_policy() , "Return whether or not this group contains any molecules called molname" ); } @@ -368,6 +390,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return whether or not this group contains any molecules that\nmatch the ID molid" ); } @@ -380,6 +403,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return whether or not this group contains any version of\nthe view of the molecule in molview" ); } @@ -392,6 +416,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Return whether or not this group contains all of the views\nof any version of the molecule in molviews" ); } @@ -404,6 +429,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this group contains all of the\nviews of any version of all of the molecules contained\nin molecules" ); } @@ -416,6 +442,7 @@ void register_MoleculeGroup_class(){ "contains" , contains_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Return whether or not this group contains all of the\nviews of any version of all of the molecules contained\nin molecules" ); } @@ -452,6 +479,7 @@ void register_MoleculeGroup_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Obvious function used to shortcut the getMoleculeNumber(const MolID&)\nfunction\nThrow: SireMol::missing_molecule\n" ); } @@ -464,6 +492,7 @@ void register_MoleculeGroup_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molidx") ) + , bp::release_gil_policy() , "Return the number of the molecule at index molidx\nThrow: SireError::invalid_index\n" ); } @@ -476,6 +505,7 @@ void register_MoleculeGroup_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molname") ) + , bp::release_gil_policy() , "Return the number of the molecule with name molname\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\n" ); } @@ -488,6 +518,7 @@ void register_MoleculeGroup_class(){ "getMoleculeNumber" , getMoleculeNumber_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the number of the molecule that matches the ID molid\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\nThrow: SireError::invalid_index\n" ); } @@ -500,6 +531,7 @@ void register_MoleculeGroup_class(){ "getMoleculeVersion" , getMoleculeVersion_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the version number of the molecule with number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -512,6 +544,7 @@ void register_MoleculeGroup_class(){ "getMoleculeVersion" , getMoleculeVersion_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the version number of the molecule with ID molid\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\n" ); } @@ -524,6 +557,7 @@ void register_MoleculeGroup_class(){ "indexOf" , indexOf_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return the index of the view of the molecule viewed in molview. This\nis the index of this specific view, so you use this index with the\nMoleculeGroup::viewAt(int i) function. This returns -1 if this\nview is not in this group" ); } @@ -536,6 +570,7 @@ void register_MoleculeGroup_class(){ "indexOf" , indexOf_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the index of the molecule with number molnum. This is the index\nof the molecule itself, so you use this index with the MoleculeGroup::at(int i)\nfunction. This returns -1 if this molecule isnt in this group.\n" ); } @@ -548,6 +583,7 @@ void register_MoleculeGroup_class(){ "intersects" , intersects_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return whether or not this group contains any version\nof any of the atoms of the molecule in molview" ); } @@ -560,6 +596,7 @@ void register_MoleculeGroup_class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this group contains any version\nof any of the atoms in any of the molecules in molecules" ); } @@ -572,6 +609,7 @@ void register_MoleculeGroup_class(){ "intersects" , intersects_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Return whether or not this group contains any version\nof any of the atoms in any of the molecules contained in\nthe group other" ); } @@ -583,6 +621,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this group is empty" ); } @@ -606,6 +645,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "majorVersion" , majorVersion_function_value + , bp::release_gil_policy() , "Return the major version number of this group. This number\nchanges whenever views are added or removed from this group,\nor when the name of this group changes" ); } @@ -618,6 +658,7 @@ void register_MoleculeGroup_class(){ "map" , map_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Obvious overload that shortcuts the map(const MolID&) function\nThrow: SireMol::missing_molecule\n" ); } @@ -630,6 +671,7 @@ void register_MoleculeGroup_class(){ "map" , map_function_value , ( bp::arg("molidx") ) + , bp::release_gil_policy() , "Return the number of the molecule at index molidx\nThrow: SireError::invalid_index\n" ); } @@ -642,6 +684,7 @@ void register_MoleculeGroup_class(){ "map" , map_function_value , ( bp::arg("molname") ) + , bp::release_gil_policy() , "Return the numbers of the molecules that are called molname\nThrow: SireMol::missing_molecule\n" ); } @@ -654,6 +697,7 @@ void register_MoleculeGroup_class(){ "map" , map_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the numbers of the molecules that match the ID molid\nThrow: SireMol::missing_molecule\nThrow: SireMol::duplicate_molecule\nThrow: SireError::invalid_index\n" ); } @@ -665,6 +709,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "minorVersion" , minorVersion_function_value + , bp::release_gil_policy() , "Return the minor version number of this group. This number\nchanges whenever any of the versions of molecules in this group\nare changed. This number is reset to zero whenever the major\nversion number of this group is changed." ); } @@ -676,6 +721,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "molNames" , molNames_function_value + , bp::release_gil_policy() , "Return the set of all names of the molecules in this group" ); } @@ -688,6 +734,7 @@ void register_MoleculeGroup_class(){ "molNumAt" , molNumAt_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the number of the ith molecule in this group\nThrow: SireError::invalid_index\n" ); } @@ -802,6 +849,7 @@ void register_MoleculeGroup_class(){ "molecules" , molecules_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return all of the molecules that match the ID molid\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -813,9 +861,33 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "molecules" , molecules_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return all views of all of the molecules in this group" ); + } + { //::SireMol::MoleculeGroup::nAtoms + + typedef int ( ::SireMol::MoleculeGroup::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::MoleculeGroup::nAtoms ); + + MoleculeGroup_exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "Return the number of atoms in this group" ); + + } + { //::SireMol::MoleculeGroup::nChains + + typedef int ( ::SireMol::MoleculeGroup::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::MoleculeGroup::nChains ); + + MoleculeGroup_exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "Return the total number of chains in this group" ); + } { //::SireMol::MoleculeGroup::nMolecules @@ -825,8 +897,33 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules in this group" ); + } + { //::SireMol::MoleculeGroup::nResidues + + typedef int ( ::SireMol::MoleculeGroup::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::MoleculeGroup::nResidues ); + + MoleculeGroup_exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "Return the total number of residues in this group" ); + + } + { //::SireMol::MoleculeGroup::nSegments + + typedef int ( ::SireMol::MoleculeGroup::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::MoleculeGroup::nSegments ); + + MoleculeGroup_exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "Return the total number of segments in this group" ); + } { //::SireMol::MoleculeGroup::nViews @@ -836,6 +933,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() , "Return the number of views of molecules in this group -\nthis must always be greater or equal to the number of\nmolecules" ); } @@ -848,6 +946,7 @@ void register_MoleculeGroup_class(){ "nViews" , nViews_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the number of views of the molecule with number molnum\nthat are present in this group.\nThrow: SireMol::missing_molecule\n" ); } @@ -860,6 +959,7 @@ void register_MoleculeGroup_class(){ "nViews" , nViews_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Return the number of views of the molecule(s) that match\nthe ID molid\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -872,6 +972,7 @@ void register_MoleculeGroup_class(){ "nViews" , nViews_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the number of views of the molecule at index idx\nin this group" ); } @@ -883,7 +984,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this group" ); } @@ -895,6 +996,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this molecule group has a temporary workspace that needs accepting" ); } @@ -906,7 +1008,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -918,6 +1020,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the ID number of this group" ); } @@ -1021,6 +1124,7 @@ void register_MoleculeGroup_class(){ "remove" , remove_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Remove the view of the molecule in molview from this set.\nThis only removes the first such view from the set, and\nreturns whether or not any view was removed" ); } @@ -1033,6 +1137,7 @@ void register_MoleculeGroup_class(){ "remove" , remove_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Remove all of the views of the molecule in molviews from this\nset. This only removes the first such view of any duplicates\nfrom this set, and returns the views that were removed" ); } @@ -1045,6 +1150,7 @@ void register_MoleculeGroup_class(){ "remove" , remove_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all of the molecules listed in molecules from this set.\nThis only removes the first of any duplicated views in this set.\nThis returns the viewsmolecules that were successfully removed." ); } @@ -1057,6 +1163,7 @@ void register_MoleculeGroup_class(){ "remove" , remove_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Remove all of the molecules from the group MoleculeGroup from this set.\nThis only removes the first of any duplicated views in this set.\nThis returns the viewsmolecules that were sucessfully removed." ); } @@ -1069,6 +1176,7 @@ void register_MoleculeGroup_class(){ "remove" , remove_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Completely remove all views of the molecule with number molnum\nfrom this group. This returns the views that were removed" ); } @@ -1081,6 +1189,7 @@ void register_MoleculeGroup_class(){ "remove" , remove_function_value , ( bp::arg("molnums") ) + , bp::release_gil_policy() , "Remove all views of the molecules whose numbers are in molnums.\nThis returns the views that were removed." ); } @@ -1093,6 +1202,7 @@ void register_MoleculeGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Remove all copies of the view of the molecule in molview from this\ngroup. This removes all copies if this view is duplicated in this\ngroup, and returns whether or not any views were removed." ); } @@ -1105,6 +1215,7 @@ void register_MoleculeGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Remove all copies of all of the views of the molecule in molviews.\nThis removes all copies of any duplicated views in this group,\nand returns the views that were successfully removed." ); } @@ -1117,6 +1228,7 @@ void register_MoleculeGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all copies of all of the views of the molecules in molecules.\nThis removes all copies of any duplicated views in this group.\nThis returns the moleculesviews that were removed." ); } @@ -1129,6 +1241,7 @@ void register_MoleculeGroup_class(){ "removeAll" , removeAll_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Remove all copies of all of the views of the molecules in the\ngroup MoleculeGroup. This removes all copies of any duplicated\nviews in this group. This returns the moleculesviews that\nwere removed\n" ); } @@ -1140,6 +1253,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "Remove all of the molecules from this group" ); } @@ -1152,6 +1266,7 @@ void register_MoleculeGroup_class(){ "search" , search_function_value , ( bp::arg("search_term") ) + , bp::release_gil_policy() , "Return the result of searching this molecule group with search_term" ); } @@ -1164,6 +1279,7 @@ void register_MoleculeGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Set the contents of this group so that it only contains the\nview molview. This clears any existing contents of this group" ); } @@ -1176,6 +1292,7 @@ void register_MoleculeGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Set the contents of this group so that it only contains the\nviews of the molecule in molviews. This clears any existing\ncontents of this group." ); } @@ -1188,6 +1305,7 @@ void register_MoleculeGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Set the contents of this group to molecules. This clears\nany existing contents of this group." ); } @@ -1200,6 +1318,7 @@ void register_MoleculeGroup_class(){ "setContents" , setContents_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Set the contents of this group so that it equals that\nof the group MoleculeGroup. This sets the contents and\nalso preserves the same order of moleculesviews as\nin MoleculeGroup\n" ); } @@ -1212,6 +1331,7 @@ void register_MoleculeGroup_class(){ "setName" , setName_function_value , ( bp::arg("new_name") ) + , bp::release_gil_policy() , "Change the name of this group" ); } @@ -1223,6 +1343,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "setNewNumber" , setNewNumber_function_value + , bp::release_gil_policy() , "Give this group a new, unique number" ); } @@ -1235,6 +1356,7 @@ void register_MoleculeGroup_class(){ "setNumber" , setNumber_function_value , ( bp::arg("new_number") ) + , bp::release_gil_policy() , "Change the number of this group" ); } @@ -1246,6 +1368,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this MoleculeGroup" ); } @@ -1257,6 +1380,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -1269,6 +1393,7 @@ void register_MoleculeGroup_class(){ "unite" , unite_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Synonym for MoleculeGroup::addIfUnique(molview)" ); } @@ -1281,6 +1406,7 @@ void register_MoleculeGroup_class(){ "unite" , unite_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Synonym for MoleculeGroup::addIfUnique(molviews)" ); } @@ -1293,6 +1419,7 @@ void register_MoleculeGroup_class(){ "unite" , unite_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Synonym for MoleculeGroup::addIfUnique(molecules)" ); } @@ -1305,6 +1432,7 @@ void register_MoleculeGroup_class(){ "unite" , unite_function_value , ( bp::arg("MoleculeGroup") ) + , bp::release_gil_policy() , "Synonym for MoleculeGroup::addIfUnique(MoleculeGroup). The\nfunction MoleculeGroup::addIfUnique(MoleculeGroup.molecules()) is\nquicker if you dont care about the order in which\nthe views are added." ); } @@ -1377,6 +1505,7 @@ void register_MoleculeGroup_class(){ "viewAt" , viewAt_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the view of the molecule at index idx in this group.\nThrow: SireError::invalid_index\n" ); } @@ -1388,6 +1517,7 @@ void register_MoleculeGroup_class(){ MoleculeGroup_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MoleculeGroups.pypp.cpp b/wrapper/Mol/MoleculeGroups.pypp.cpp index 869ce5003..cee996676 100644 --- a/wrapper/Mol/MoleculeGroups.pypp.cpp +++ b/wrapper/Mol/MoleculeGroups.pypp.cpp @@ -8,6 +8,8 @@ namespace bp = boost::python; +#include "SireBase/slice.h" + #include "SireError/errors.h" #include "SireMol/errors.h" @@ -80,6 +82,8 @@ SireMol::MoleculeGroups __copy__(const SireMol::MoleculeGroups &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MoleculeGroups_class(){ @@ -99,6 +103,7 @@ void register_MoleculeGroups_class(){ MoleculeGroups_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell the molecule group that the last move was accepted. This tells the\ngroup to make permanent any temporary changes that were used a workspace\nto avoid memory allocation during a move" ); } @@ -111,6 +116,7 @@ void register_MoleculeGroups_class(){ "add" , add_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Add the molecule group molgroup to this set. This does\nnothing if this group is already in this set. This updates\nthe molecules in molgroup so that they are at the\nsame version as any existing copies of the molecules\nin this set." ); } @@ -123,6 +129,7 @@ void register_MoleculeGroups_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the view of the molecule in molview to the groups\nidentified by mgid. This adds the view as a duplicate\nif it already exists in the group. The version\nof the molecule added is the version already present\nin this set, if it exists.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -135,6 +142,7 @@ void register_MoleculeGroups_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the views of the molecule in molviews to the groups\nidentified by mgid. This adds the view as a duplicate if\nit already exists in a group.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -147,6 +155,7 @@ void register_MoleculeGroups_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add each of the molecules in molecules to the groups\nidentified by mgid. This adds the views as duplicates\nif they exist already in a group. Any molecules that\nalready exist in any of the groups in this set are\nupdated to the versions that are already present\nin this set.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -159,6 +168,7 @@ void register_MoleculeGroups_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the molecules in the group molgroup to the groups\nidentified by mgid. This adds the views as duplicates\nif they already exist, and adds the views in the same\norder as they appear in molgroup. This is slightly less\nefficient than MoleculeGroups::add(const Molecules&), so use\nthat function if you dont care about the order.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -171,6 +181,7 @@ void register_MoleculeGroups_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the view of the molecule in molview to the groups\nidentified by mgid. This only adds the view to a group\nif it doesnt already exist in the group. The version\nof the molecule already present in this set is used if\nsuch a molecule already exists.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -183,6 +194,7 @@ void register_MoleculeGroups_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add the views of the molecule in molviews ot the groups\nidentified by mgid. This only adds views to groups that\ndont already exist in that group, and uses the existing\nversion of the molecule is it already exists in one\nof the groups of this set.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -195,6 +207,7 @@ void register_MoleculeGroups_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Add all of the views of the molecules in molecules to the groups\nidentified by mgid. This only adds views that dont already\nexist in the group, and uses the version of the molecules that already\nexists in one of the groups of this set (if one exists)\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -207,6 +220,7 @@ void register_MoleculeGroups_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "This adds all of the views of the molecules in the group\nmolgroup, in the same order as they exist in this group,\nto all of the groups identified by mgid. This only\nadds views to a group that dont already exist in that\ngroup and uses the existing version of the molecule if\nit exists anywhere in this set.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -219,7 +233,7 @@ void register_MoleculeGroups_class(){ "at" , at_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group with number mgnum\nThrow: SireMol::missing_group\n" ); } @@ -231,6 +245,7 @@ void register_MoleculeGroups_class(){ MoleculeGroups_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not this set of molecule groups is using a temporary\nworkspace and needs accepting" ); } @@ -258,6 +273,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the groups that match the ID mgid from this set. This\ndoes nothing if there are no such groups." ); } @@ -270,6 +286,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Remove the molecules contained in molgroup from this set.\nNote that this does not remove this molecule group itself\n- if you want to remove the molecule group, use\nMoleculeGroups::remove(molgroup.number())" ); } @@ -282,6 +299,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Remove the molecules that match the ID molid from this set.\nThis does nothing if there are no molecules that match this\nID in this set" ); } @@ -294,6 +312,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the view of the molecule in molview from the groups\nidentified by mgid. This only removes the first copy\nof the view from each group, if multiple copies exist.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -306,6 +325,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views of the molecule in molviews from the groups\nidentified by mgid. This only removes the first copy of the\nviews from each group if they exist multiple times.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -318,6 +338,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the views of the molecules in molecules from\nthe groups identified by mgid. This removes only the first\ncopies of the views in each group.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -330,6 +351,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the views of the molecules in the group molgroup from\nthe groups identified by mgid. This removes only the first\ncopies of the views in each group.\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -342,6 +364,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molnum"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all views of the molecule with number molnum from the\ngroups identified by mgid. This does nothing to any groups\nthat dont contain this molecule\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -354,6 +377,7 @@ void register_MoleculeGroups_class(){ "remove" , remove_function_value , ( bp::arg("molnums"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the molecules whose numbers are in molnums from the\ngroups identified by mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -366,6 +390,7 @@ void register_MoleculeGroups_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all copies of the view of the molecule in molview from\nthe groups identified by mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -378,6 +403,7 @@ void register_MoleculeGroups_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all copies of the views of the molecule in molviews from\nthe groups identified by mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -390,6 +416,7 @@ void register_MoleculeGroups_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all copies of the views of the molecules in molecules\nfrom the groups identified by mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -402,6 +429,7 @@ void register_MoleculeGroups_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the views of the molecules in the group molgroup\nfrom the groups identified by mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -414,6 +442,7 @@ void register_MoleculeGroups_class(){ "removeAll" , removeAll_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the molecules from all of the groups identified by\nthe ID mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -426,6 +455,7 @@ void register_MoleculeGroups_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview") ) + , bp::release_gil_policy() , "Set the contents of the groups identified by mgid so that\nthey only contain the view in molview\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -438,6 +468,7 @@ void register_MoleculeGroups_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molviews") ) + , bp::release_gil_policy() , "Set the contents of the groups identified by mgid so that\nthey only contain the views of the molecule in molviews\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -450,6 +481,7 @@ void register_MoleculeGroups_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules") ) + , bp::release_gil_policy() , "Set the contents of the groups identified by mgid so that\nthey contain only the views of the molecules contained in molecules\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -462,6 +494,7 @@ void register_MoleculeGroups_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the contents of the groups identified by mgid so that\nthey contain the same views of the same molecules in the\nsame order as in the group molgroup\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -473,6 +506,7 @@ void register_MoleculeGroups_class(){ MoleculeGroups_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MoleculeInfo.pypp.cpp b/wrapper/Mol/MoleculeInfo.pypp.cpp index 6232d629d..064dbf3b2 100644 --- a/wrapper/Mol/MoleculeInfo.pypp.cpp +++ b/wrapper/Mol/MoleculeInfo.pypp.cpp @@ -28,6 +28,8 @@ SireMol::MoleculeInfo __copy__(const SireMol::MoleculeInfo &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MoleculeInfo_class(){ { //::SireMol::MoleculeInfo @@ -58,6 +60,7 @@ void register_MoleculeInfo_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("selected_atoms") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo is compatible with the passed atom selection" ); } @@ -70,6 +73,7 @@ void register_MoleculeInfo_class(){ "assertCompatibleWith" , assertCompatibleWith_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo is compatible with the passed molecule" ); } @@ -82,6 +86,7 @@ void register_MoleculeInfo_class(){ "assertContains" , assertContains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo contains an atom at the passed index" ); } @@ -94,6 +99,7 @@ void register_MoleculeInfo_class(){ "assertContains" , assertContains_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo contains an atom at the passed index" ); } @@ -106,6 +112,7 @@ void register_MoleculeInfo_class(){ "assertContains" , assertContains_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo contains an atom at the passed index" ); } @@ -118,6 +125,7 @@ void register_MoleculeInfo_class(){ "assertContains" , assertContains_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo contains an atom at the passed index" ); } @@ -130,6 +138,7 @@ void register_MoleculeInfo_class(){ "assertContains" , assertContains_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo contains an atom at the passed index" ); } @@ -142,6 +151,7 @@ void register_MoleculeInfo_class(){ "assertEqualTo" , assertEqualTo_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo is equal to other" ); } @@ -154,6 +164,7 @@ void register_MoleculeInfo_class(){ "assertEqualTo" , assertEqualTo_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that this MoleculeInfo is equal to other" ); } @@ -166,6 +177,7 @@ void register_MoleculeInfo_class(){ "atomIdx" , atomIdx_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the index of the identified atom" ); } @@ -178,6 +190,7 @@ void register_MoleculeInfo_class(){ "atomIdx" , atomIdx_function_value , ( bp::arg("cgatomidx") ) + , bp::release_gil_policy() , "Return the index of the identified atom" ); } @@ -190,7 +203,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdx" , cgAtomIdx_function_value , ( bp::arg("atomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the combined CutGroup AtomIndex of the identified atom" ); } @@ -203,7 +216,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdx" , cgAtomIdx_function_value , ( bp::arg("atomid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the combined CutGroup AtomIndex of the identified atom" ); } @@ -216,6 +229,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of all of the identified atoms" ); } @@ -228,6 +242,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified CutGroups" ); } @@ -240,6 +255,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified residues" ); } @@ -252,6 +268,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified chains" ); } @@ -264,6 +281,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified segments" ); } @@ -276,6 +294,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of all of the identified atoms" ); } @@ -288,6 +307,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified CutGroups" ); } @@ -300,6 +320,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified residues" ); } @@ -312,6 +333,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified chains" ); } @@ -324,6 +346,7 @@ void register_MoleculeInfo_class(){ "cgAtomIdxs" , cgAtomIdxs_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the CGAtomIdxs of the atoms in all of the identified segments" ); } @@ -336,6 +359,7 @@ void register_MoleculeInfo_class(){ "cgIdx" , cgIdx_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the index of the identified CutGroup" ); } @@ -348,6 +372,7 @@ void register_MoleculeInfo_class(){ "cgIdx" , cgIdx_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return the index of the CutGroup that contains the atoms for residue\nwith ID id, if this molecule uses residue cutting. If not, an\nexception is thrown" ); } @@ -360,6 +385,7 @@ void register_MoleculeInfo_class(){ "cgIdx" , cgIdx_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the index of the CutGroup that contains the atoms for residue\nwith ID id, if this molecule uses residue cutting. If not, an\nexception is thrown" ); } @@ -372,6 +398,7 @@ void register_MoleculeInfo_class(){ "chainIdx" , chainIdx_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the index of the identified chain" ); } @@ -384,6 +411,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("residx"), bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the specified residue contains the specified atom" ); } @@ -396,6 +424,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("chainidx"), bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the specified chain contains the specified atom" ); } @@ -408,6 +437,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("segidx"), bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the specified segment contains the specified atom" ); } @@ -420,6 +450,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("cgidx"), bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the specified CutGroup contains the specified atom" ); } @@ -432,6 +463,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("chainidx"), bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether or not the specified chain contains the specified residue" ); } @@ -444,6 +476,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("residx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified residue contains the specified atom" ); } @@ -456,6 +489,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("chainidx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified chain contains the specified atom" ); } @@ -468,6 +502,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("segidx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified segment contains the specified atom" ); } @@ -480,6 +515,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("cgidx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified CutGroup contains the specified atom" ); } @@ -492,6 +528,7 @@ void register_MoleculeInfo_class(){ "contains" , contains_function_value , ( bp::arg("chainidx"), bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not the specified chain contains the specified residue" ); } @@ -516,6 +553,7 @@ void register_MoleculeInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("cgidx"), bp::arg("i") ) + , bp::release_gil_policy() , "Return the index of the ith atom in the specified CutGroup" ); } @@ -528,6 +566,7 @@ void register_MoleculeInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("residx"), bp::arg("i") ) + , bp::release_gil_policy() , "Return the index of the ith atom in the specified residue" ); } @@ -540,6 +579,7 @@ void register_MoleculeInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("chainidx"), bp::arg("i") ) + , bp::release_gil_policy() , "Return the index of the ith atom in the specified chain" ); } @@ -552,6 +592,7 @@ void register_MoleculeInfo_class(){ "getAtom" , getAtom_function_value , ( bp::arg("segidx"), bp::arg("i") ) + , bp::release_gil_policy() , "Return the index of the ith atom in the specified segment" ); } @@ -563,6 +604,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "getAtoms" , getAtoms_function_value + , bp::release_gil_policy() , "Return the indicies of atoms" ); } @@ -588,6 +630,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the indicies of all atoms in the specified residue(s)" ); } @@ -600,6 +643,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("residx"), bp::arg("name") ) + , bp::release_gil_policy() , "Return the indicies of all atoms called name in the specified residue(s)" ); } @@ -612,6 +656,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("resid"), bp::arg("atomname") ) + , bp::release_gil_policy() , "Return the indicies of all atoms called name in the specified residue(s)" ); } @@ -624,6 +669,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return the indicies of all atoms in the specified chain(s)" ); } @@ -636,6 +682,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the indicies of all atoms in the specified chain(s)" ); } @@ -648,6 +695,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("chainidx"), bp::arg("atomname") ) + , bp::release_gil_policy() , "Return the indicies of all atoms called name in the specified residue(s)" ); } @@ -660,6 +708,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("chainid"), bp::arg("atomname") ) + , bp::release_gil_policy() , "Return the indicies of all atoms called name in the specified residue(s)" ); } @@ -685,6 +734,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the indicies of all atoms in the specified CutGroup(s)" ); } @@ -710,6 +760,7 @@ void register_MoleculeInfo_class(){ "getAtomsIn" , getAtomsIn_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the indicies of all atoms in the specified segment(s)" ); } @@ -721,6 +772,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "getChains" , getChains_function_value + , bp::release_gil_policy() , "Return a list of the indicies of all chains" ); } @@ -732,6 +784,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "getCutGroups" , getCutGroups_function_value + , bp::release_gil_policy() , "Return a list of the indicies of all CutGroups" ); } @@ -744,6 +797,7 @@ void register_MoleculeInfo_class(){ "getResidue" , getResidue_function_value , ( bp::arg("chainidx"), bp::arg("i") ) + , bp::release_gil_policy() , "Return the index of the ith residue in the specified chain" ); } @@ -755,6 +809,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "getResidues" , getResidues_function_value + , bp::release_gil_policy() , "Return a list of the indicies of all residues" ); } @@ -780,6 +835,7 @@ void register_MoleculeInfo_class(){ "getResiduesIn" , getResiduesIn_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the indicies of residues in the identified chain(s)" ); } @@ -791,6 +847,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "getSegments" , getSegments_function_value + , bp::release_gil_policy() , "Return a list of the indicies of all segments" ); } @@ -803,6 +860,7 @@ void register_MoleculeInfo_class(){ "intersects" , intersects_function_value , ( bp::arg("residx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified residue contains the specified atom" ); } @@ -815,6 +873,7 @@ void register_MoleculeInfo_class(){ "intersects" , intersects_function_value , ( bp::arg("chainidx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified chain contains the specified atom" ); } @@ -827,6 +886,7 @@ void register_MoleculeInfo_class(){ "intersects" , intersects_function_value , ( bp::arg("segidx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified segment contains the specified atom" ); } @@ -839,6 +899,7 @@ void register_MoleculeInfo_class(){ "intersects" , intersects_function_value , ( bp::arg("cgidx"), bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the specified CutGroup contains the specified atom" ); } @@ -851,6 +912,7 @@ void register_MoleculeInfo_class(){ "intersects" , intersects_function_value , ( bp::arg("chainidx"), bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not the specified chain contains the specified residue" ); } @@ -862,8 +924,21 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "isAtomCutting" , isAtomCutting_function_value + , bp::release_gil_policy() , "Return whether or not atom-based cutting is used for the entire\nmolecule (meaning that there is exactly one cutgroup per atom). This\nis highly unusual, except for single-atom molecules" ); + } + { //::SireMol::MoleculeInfo::isEmpty + + typedef bool ( ::SireMol::MoleculeInfo::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::MoleculeInfo::isEmpty ); + + MoleculeInfo_exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "Return whether or not this is empty (contains no atoms)" ); + } { //::SireMol::MoleculeInfo::isMoleculeCutting @@ -873,6 +948,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "isMoleculeCutting" , isMoleculeCutting_function_value + , bp::release_gil_policy() , "Return whether or not molecule-based cutting is used for the entire\nmolecule (meaning that there is exactly one cutgroup for the whole molecule). This\nis unusual, except for single-residue molecules" ); } @@ -884,6 +960,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "isResidueCutting" , isResidueCutting_function_value + , bp::release_gil_policy() , "Return whether or not residue-based cutting is used for the entire\nmolecule (meaning that there is exactly one cutgroup per residue, and\natoms in a cutgroup are in the same order as atoms in the residue). This\nis the default. Note that a single atom molecule is simultaneously\natom cutting, residue cutting and molecule cutting." ); } @@ -896,6 +973,7 @@ void register_MoleculeInfo_class(){ "isResidueCutting" , isResidueCutting_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether or not residue-based cutting is used for the specifed\nresidue" ); } @@ -908,6 +986,7 @@ void register_MoleculeInfo_class(){ "isResidueCutting" , isResidueCutting_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not residue-based cutting is used for the specifed\nresidue" ); } @@ -920,6 +999,7 @@ void register_MoleculeInfo_class(){ "isWithinChain" , isWithinChain_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the identified atom is held in a chain" ); } @@ -932,6 +1012,7 @@ void register_MoleculeInfo_class(){ "isWithinChain" , isWithinChain_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the identified atom is held in a chain" ); } @@ -944,6 +1025,7 @@ void register_MoleculeInfo_class(){ "isWithinChain" , isWithinChain_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return whether or not the identified residue is held in a chain" ); } @@ -956,6 +1038,7 @@ void register_MoleculeInfo_class(){ "isWithinChain" , isWithinChain_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return whether or not the identified residue is held in a chain" ); } @@ -968,6 +1051,7 @@ void register_MoleculeInfo_class(){ "isWithinResidue" , isWithinResidue_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the identified atom is held in a residue" ); } @@ -980,6 +1064,7 @@ void register_MoleculeInfo_class(){ "isWithinResidue" , isWithinResidue_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the identified atom is held in a residue" ); } @@ -992,6 +1077,7 @@ void register_MoleculeInfo_class(){ "isWithinSegment" , isWithinSegment_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not the identified atom is held in a segment" ); } @@ -1004,6 +1090,7 @@ void register_MoleculeInfo_class(){ "isWithinSegment" , isWithinSegment_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not the identified atom is held in a segment" ); } @@ -1016,6 +1103,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the indicies of the matching residue(s)" ); } @@ -1028,6 +1116,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("num") ) + , bp::release_gil_policy() , "Return the indicies of the matching residue(s)" ); } @@ -1040,6 +1129,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the indicies of the matching residue(s)" ); } @@ -1052,6 +1142,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the indicies of the matching residue(s)" ); } @@ -1064,6 +1155,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the indicies of the matching chain(s)" ); } @@ -1076,6 +1168,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the indicies of the matching chain(s)" ); } @@ -1088,6 +1181,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the indicies of the matching chain(s)" ); } @@ -1100,6 +1194,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the indicies of the matching segment(s)" ); } @@ -1112,6 +1207,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the indicies of the matching segment(s)" ); } @@ -1124,6 +1220,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the indicies of the matching segment(s)" ); } @@ -1136,6 +1233,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the indicies of the matching CutGroup(s)" ); } @@ -1148,6 +1246,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the indicies of the matching CutGroup(s)" ); } @@ -1160,6 +1259,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the indicies of the matching CutGroup(s)" ); } @@ -1172,6 +1272,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return the indicies of the matching atom(s)" ); } @@ -1184,6 +1285,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("num") ) + , bp::release_gil_policy() , "Return the indicies of the matching atom(s)" ); } @@ -1196,6 +1298,7 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the indicies of the matching atom(s)" ); } @@ -1208,8 +1311,230 @@ void register_MoleculeInfo_class(){ "map" , map_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the indicies of the matching atom(s)" ); + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::AtomName const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::AtomNum const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("num") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::AtomIdx const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::AtomID const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::ResIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::ResName const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::ResIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::ResNum const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("num") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::ResIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::ResIdx const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::ResIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::ResID const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::ChainName const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::ChainIdx const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::ChainID const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::SegIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::SegName const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::SegIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::SegIdx const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::SegIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::SegID const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::CGIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::CGName const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::CGIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::CGIdx const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::MoleculeInfo::mapNoThrow + + typedef ::QList< SireMol::CGIdx > ( ::SireMol::MoleculeInfo::*mapNoThrow_function_type)( ::SireMol::CGID const & ) const; + mapNoThrow_function_type mapNoThrow_function_value( &::SireMol::MoleculeInfo::mapNoThrow ); + + MoleculeInfo_exposer.def( + "mapNoThrow" + , mapNoThrow_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::MoleculeInfo::nAtoms @@ -1219,6 +1544,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in the molecule" ); } @@ -1231,6 +1557,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified chain(s)" ); } @@ -1243,6 +1570,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified chain(s)" ); } @@ -1255,6 +1583,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified residue(s)" ); } @@ -1267,6 +1596,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified residue(s)" ); } @@ -1279,6 +1609,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified segment(s)" ); } @@ -1291,6 +1622,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified segment(s)" ); } @@ -1303,6 +1635,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified CutGroup(s)" ); } @@ -1315,6 +1648,7 @@ void register_MoleculeInfo_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("cgidx") ) + , bp::release_gil_policy() , "Return the number of atoms in the identified CutGroup(s)" ); } @@ -1326,6 +1660,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "Return the number of chains in the molecule" ); } @@ -1337,6 +1672,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "Return the number of CutGroups in the molecule" ); } @@ -1348,6 +1684,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of residues in the molecule" ); } @@ -1360,6 +1697,7 @@ void register_MoleculeInfo_class(){ "nResidues" , nResidues_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Return the number of residues in the identified chain(s)" ); } @@ -1372,6 +1710,7 @@ void register_MoleculeInfo_class(){ "nResidues" , nResidues_function_value , ( bp::arg("chainidx") ) + , bp::release_gil_policy() , "Return the number of residues in the identified chain(s)" ); } @@ -1383,6 +1722,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "Return the number of segments in the molecule" ); } @@ -1395,7 +1735,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("chainid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified chain" ); } @@ -1408,7 +1748,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("chainidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified chain" ); } @@ -1421,7 +1761,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("segid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified segment" ); } @@ -1434,7 +1774,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("segidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified segment" ); } @@ -1447,7 +1787,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("resid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified residue" ); } @@ -1460,7 +1800,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("residx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified residue" ); } @@ -1473,7 +1813,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("cgid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified CutGroup" ); } @@ -1486,7 +1826,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("cgidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified CutGroup" ); } @@ -1499,7 +1839,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("atomid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified atom" ); } @@ -1512,7 +1852,7 @@ void register_MoleculeInfo_class(){ "name" , name_function_value , ( bp::arg("atomidx") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the identified atom" ); } @@ -1525,6 +1865,7 @@ void register_MoleculeInfo_class(){ "number" , number_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the number of the identified residue" ); } @@ -1537,6 +1878,7 @@ void register_MoleculeInfo_class(){ "number" , number_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return the number of the identified residue" ); } @@ -1549,6 +1891,7 @@ void register_MoleculeInfo_class(){ "number" , number_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the number of the identified atom" ); } @@ -1561,6 +1904,7 @@ void register_MoleculeInfo_class(){ "number" , number_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return the number of the identified atom" ); } @@ -1588,6 +1932,7 @@ void register_MoleculeInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("residx") ) + , bp::release_gil_policy() , "Return the index of the parent chain of the identified residue" ); } @@ -1600,6 +1945,7 @@ void register_MoleculeInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the index of the parent chain of the identified residue" ); } @@ -1612,6 +1958,7 @@ void register_MoleculeInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return the index of the parent chain of the identified atom" ); } @@ -1624,6 +1971,7 @@ void register_MoleculeInfo_class(){ "parentChain" , parentChain_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the index of the parent chain of the identified atom" ); } @@ -1636,6 +1984,7 @@ void register_MoleculeInfo_class(){ "parentCutGroup" , parentCutGroup_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return the index of the parent CutGroup of the identified atom" ); } @@ -1648,6 +1997,7 @@ void register_MoleculeInfo_class(){ "parentCutGroup" , parentCutGroup_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the index of the parent CutGroup of the identified atom" ); } @@ -1660,6 +2010,7 @@ void register_MoleculeInfo_class(){ "parentResidue" , parentResidue_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return the index of the parent residue of the identified atom" ); } @@ -1672,6 +2023,7 @@ void register_MoleculeInfo_class(){ "parentResidue" , parentResidue_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the index of the parent residue of the identified atom" ); } @@ -1684,6 +2036,7 @@ void register_MoleculeInfo_class(){ "parentSegment" , parentSegment_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return the index of the parent segment of the identified atom" ); } @@ -1696,6 +2049,7 @@ void register_MoleculeInfo_class(){ "parentSegment" , parentSegment_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return the index of the parent segment of the identified atom" ); } @@ -1708,6 +2062,7 @@ void register_MoleculeInfo_class(){ "rename" , rename_function_value , ( bp::arg("atomidx"), bp::arg("newname") ) + , bp::release_gil_policy() , "Return a copy of this MoleculeInfo where the identified atom has been\nrenamed to newname" ); } @@ -1720,6 +2075,7 @@ void register_MoleculeInfo_class(){ "rename" , rename_function_value , ( bp::arg("residx"), bp::arg("newname") ) + , bp::release_gil_policy() , "Return a copy of this MoleculeInfo where the identified residue has been\nrenamed to newname" ); } @@ -1732,6 +2088,7 @@ void register_MoleculeInfo_class(){ "rename" , rename_function_value , ( bp::arg("cgidx"), bp::arg("newname") ) + , bp::release_gil_policy() , "Return a copy of this MoleculeInfo where the identified CutGroup has been\nrenamed to newname" ); } @@ -1744,6 +2101,7 @@ void register_MoleculeInfo_class(){ "rename" , rename_function_value , ( bp::arg("chainidx"), bp::arg("newname") ) + , bp::release_gil_policy() , "Return a copy of this MoleculeInfo where the identified chain has been\nrenamed to newname" ); } @@ -1756,6 +2114,7 @@ void register_MoleculeInfo_class(){ "rename" , rename_function_value , ( bp::arg("segidx"), bp::arg("newname") ) + , bp::release_gil_policy() , "Return a copy of this MoleculeInfo where the identified segment has been\nrenamed to newname" ); } @@ -1768,6 +2127,7 @@ void register_MoleculeInfo_class(){ "renumber" , renumber_function_value , ( bp::arg("atomidx"), bp::arg("newnum") ) + , bp::release_gil_policy() , "Return a copy of this MoleculeInfo where the identified atom has been\nrenumbered to newnum" ); } @@ -1780,6 +2140,7 @@ void register_MoleculeInfo_class(){ "renumber" , renumber_function_value , ( bp::arg("residx"), bp::arg("newnum") ) + , bp::release_gil_policy() , "Return a copy of this MoleculeInfo where the identified residue has been\nrenumbered to newnum" ); } @@ -1792,6 +2153,7 @@ void register_MoleculeInfo_class(){ "resIdx" , resIdx_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Return the index of the identified residue" ); } @@ -1804,6 +2166,7 @@ void register_MoleculeInfo_class(){ "segIdx" , segIdx_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Return the index of the identified segment" ); } @@ -1816,6 +2179,7 @@ void register_MoleculeInfo_class(){ "squeeze" , squeeze_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Use this function to minimise memory usage - this function\ncompares the shared data in this info with other, and where\nthey are equal it copies the data from other, thereby reducing\nwastage caused by duplicated storage\n" ); } @@ -1827,6 +2191,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -1838,6 +2203,7 @@ void register_MoleculeInfo_class(){ MoleculeInfo_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MoleculeProperty.pypp.cpp b/wrapper/Mol/MoleculeProperty.pypp.cpp index a6f30051c..8e38c55a6 100644 --- a/wrapper/Mol/MoleculeProperty.pypp.cpp +++ b/wrapper/Mol/MoleculeProperty.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MoleculeProperty_class(){ { //::SireMol::MoleculeProperty @@ -37,6 +39,7 @@ void register_MoleculeProperty_class(){ MoleculeProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MoleculeView.pypp.cpp b/wrapper/Mol/MoleculeView.pypp.cpp index 607eaf64c..4a7510ae9 100644 --- a/wrapper/Mol/MoleculeView.pypp.cpp +++ b/wrapper/Mol/MoleculeView.pypp.cpp @@ -10,6 +10,8 @@ namespace bp = boost::python; #include "SireBase/errors.h" +#include "SireBase/slice.h" + #include "SireError/errors.h" #include "SireMol/errors.h" @@ -46,6 +48,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MoleculeView_class(){ @@ -63,6 +67,7 @@ void register_MoleculeView_class(){ "assertContains" , assertContains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Assert that this view contains the atom at index atomidx\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -75,6 +80,7 @@ void register_MoleculeView_class(){ "assertHasMetadata" , assertHasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this contains some metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -87,6 +93,7 @@ void register_MoleculeView_class(){ "assertHasMetadata" , assertHasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this contains some metadata at metakey metakey\nfor the property at key key\nThrow: SireBase::missing_property\n" ); } @@ -99,6 +106,7 @@ void register_MoleculeView_class(){ "assertHasProperty" , assertHasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this contains a property at key key\nThrow: SireBase::missing_property\n" ); } @@ -111,6 +119,7 @@ void register_MoleculeView_class(){ "assertSameMolecule" , assertSameMolecule_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that this is a view of the same molecule as other\n(albeit at a different version)\nThrow: SireError::incompatible_error\n" ); } @@ -123,6 +132,7 @@ void register_MoleculeView_class(){ "assertSameMolecule" , assertSameMolecule_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that this view is looking at the molecule whose data is\nin other (albeit perhaps a different version of that molecule)\nThrow: SireError::incompatible_error\n" ); } @@ -135,6 +145,7 @@ void register_MoleculeView_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -147,6 +158,7 @@ void register_MoleculeView_class(){ "at" , at_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +171,7 @@ void register_MoleculeView_class(){ "at" , at_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "" ); } @@ -171,6 +184,7 @@ void register_MoleculeView_class(){ "at" , at_function_value , ( bp::arg("cgid") ) + , bp::release_gil_policy() , "" ); } @@ -183,6 +197,7 @@ void register_MoleculeView_class(){ "at" , at_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "" ); } @@ -195,6 +210,7 @@ void register_MoleculeView_class(){ "at" , at_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "" ); } @@ -207,8 +223,33 @@ void register_MoleculeView_class(){ "at" , at_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); + } + { //::SireMol::MoleculeView::atom + + typedef ::SireMol::Atom ( ::SireMol::MoleculeView::*atom_function_type)( int,::SireBase::PropertyMap const & ) const; + atom_function_type atom_function_value( &::SireMol::MoleculeView::atom ); + + MoleculeView_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the atom in this view that matches the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); + + } + { //::SireMol::MoleculeView::atom + + typedef ::SireMol::Atom ( ::SireMol::MoleculeView::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + atom_function_type atom_function_value( &::SireMol::MoleculeView::atom ); + + MoleculeView_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the atom in this view that matches the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_atom\n" ); + } { //::SireMol::MoleculeView::atom @@ -230,8 +271,57 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() , "Return this view as a Atom - this will only work if\nthis view contains only a single atom\nThrow: SireMol::duplicate_atom\n" ); + } + { //::SireMol::MoleculeView::atoms + + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::MoleculeView::*atoms_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + atoms_function_type atoms_function_value( &::SireMol::MoleculeView::atoms ); + + MoleculeView_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the atoms from this view that match the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::atoms + + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::MoleculeView::*atoms_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; + atoms_function_type atoms_function_value( &::SireMol::MoleculeView::atoms ); + + MoleculeView_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the atoms from this view that match the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::atoms + + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::MoleculeView::*atoms_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; + atoms_function_type atoms_function_value( &::SireMol::MoleculeView::atoms ); + + MoleculeView_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("values"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the atoms from this view that match the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::atoms + + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::MoleculeView::*atoms_function_type)( ::QStringList const &,::SireBase::PropertyMap const & ) const; + atoms_function_type atoms_function_value( &::SireMol::MoleculeView::atoms ); + + MoleculeView_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("names"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the atoms from this view that match the ID atomid\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); + } { //::SireMol::MoleculeView::atoms @@ -253,8 +343,33 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return all of the atoms in this view\nThrow: SireMol::missing_atom\n" ); + } + { //::SireMol::MoleculeView::chain + + typedef ::SireMol::Chain ( ::SireMol::MoleculeView::*chain_function_type)( int,::SireBase::PropertyMap const & ) const; + chain_function_type chain_function_value( &::SireMol::MoleculeView::chain ); + + MoleculeView_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the chain that is involved with this view that matches\nthe ID chainid\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_chain\n" ); + + } + { //::SireMol::MoleculeView::chain + + typedef ::SireMol::Chain ( ::SireMol::MoleculeView::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + chain_function_type chain_function_value( &::SireMol::MoleculeView::chain ); + + MoleculeView_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the chain that is involved with this view that matches\nthe ID chainid\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_chain\n" ); + } { //::SireMol::MoleculeView::chain @@ -276,8 +391,57 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() , "Return the chain that is involved with this view\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\n" ); + } + { //::SireMol::MoleculeView::chains + + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::MoleculeView::*chains_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + chains_function_type chains_function_value( &::SireMol::MoleculeView::chains ); + + MoleculeView_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the chains that are involved with this view that match\nthe ID chainid\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_chain\n" ); + + } + { //::SireMol::MoleculeView::chains + + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::MoleculeView::*chains_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; + chains_function_type chains_function_value( &::SireMol::MoleculeView::chains ); + + MoleculeView_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("values"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the chains that are involved with this view that match\nthe ID chainid\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_chain\n" ); + + } + { //::SireMol::MoleculeView::chains + + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::MoleculeView::*chains_function_type)( ::QStringList const &,::SireBase::PropertyMap const & ) const; + chains_function_type chains_function_value( &::SireMol::MoleculeView::chains ); + + MoleculeView_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("names"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the chains that are involved with this view that match\nthe ID chainid\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_chain\n" ); + + } + { //::SireMol::MoleculeView::chains + + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::MoleculeView::*chains_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; + chains_function_type chains_function_value( &::SireMol::MoleculeView::chains ); + + MoleculeView_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the chains that are involved with this view that match\nthe ID chainid\nThrow: SireMol::missing_chain\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_chain\n" ); + } { //::SireMol::MoleculeView::chains @@ -299,6 +463,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "chains" , chains_function_value + , bp::release_gil_policy() , "Return the chains that are involved with this view\nThrow: SireMol::missing_chain\n" ); } @@ -322,8 +487,33 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of sub-views in this view. Most MoleculeViews are\njust a single view, but some (e.g. ViewsOfMol or Selector) have\nmultiple views" ); + } + { //::SireMol::MoleculeView::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMol::MoleculeView::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::MoleculeView::cutGroup ); + + MoleculeView_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the CutGroup whose atoms are in this view that matches\nthe ID in cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_cutgroup\n" ); + + } + { //::SireMol::MoleculeView::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMol::MoleculeView::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::MoleculeView::cutGroup ); + + MoleculeView_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the CutGroup whose atoms are in this view that matches\nthe ID in cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_cutgroup\n" ); + } { //::SireMol::MoleculeView::cutGroup @@ -345,8 +535,33 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() , "Return the CutGroup that contains the atom(s) in this view\nThrow: SireMol::missing_cutgroup\nThrow: SireMol::duplicate_cutgroup\n" ); + } + { //::SireMol::MoleculeView::cutGroups + + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::MoleculeView::*cutGroups_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::MoleculeView::cutGroups ); + + MoleculeView_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the CutGroups whose atoms are in this view that match\nthe ID in cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::cutGroups + + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::MoleculeView::*cutGroups_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::MoleculeView::cutGroups ); + + MoleculeView_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the CutGroups whose atoms are in this view that match\nthe ID in cgid\nThrow: SireMol::missing_cutgroup\nThrow: SireError::invalid_index\n" ); + } { //::SireMol::MoleculeView::cutGroups @@ -368,6 +583,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "cutGroups" , cutGroups_function_value + , bp::release_gil_policy() , "Return all of the CutGroups that are involved in this view\nThrow: SireMol::missing_cutgroup\n" ); } @@ -392,6 +608,7 @@ void register_MoleculeView_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not this view has the metadata at metakey metakey\n- note that this returns true only if there is some metadata,\nand it fits the view (e.g. is an AtomProperty if this\nis a view of an Atom or group of Atoms)" ); } @@ -404,6 +621,7 @@ void register_MoleculeView_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not this view has the metadata at metakey\nmetakey for the property at key key\n- note that this returns true only if there is some metadata,\nand it fits the view (e.g. is an AtomProperty if this\nis a view of an Atom or group of Atoms)" ); } @@ -416,6 +634,7 @@ void register_MoleculeView_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not this view has the property at key key\n- note that this returns true only if there is a property,\nand it fits the view (e.g. is an AtomProperty if this\nis a view of an Atom or group of Atoms)" ); } @@ -427,6 +646,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this molecule view is empty" ); } @@ -438,6 +658,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this molecule view is null" ); } @@ -450,6 +671,7 @@ void register_MoleculeView_class(){ "isSameMolecule" , isSameMolecule_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this view is of the same molecule as other\n(albeit perhaps a different version of the molecule)" ); } @@ -462,6 +684,7 @@ void register_MoleculeView_class(){ "isSameMolecule" , isSameMolecule_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this view is of the same molecule as other\n(albeit perhaps a different version of the molecule)" ); } @@ -473,6 +696,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "keys" , keys_function_value + , bp::release_gil_policy() , "Synonym for MoleculeView::propertyKeys" ); } @@ -484,6 +708,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the list of metakeys of metadata that fit this view,\ne.g. if this is a view of an atom, or group of atoms, then\nthis returns the metakeys of all AtomProperty derived objects" ); } @@ -496,6 +721,7 @@ void register_MoleculeView_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the list of metakeys of metadata for the\nproperty at key key that fit this view,\ne.g. if this is a view of an atom, or group of atoms, then\nthis returns the metakeys of all AtomProperty derived objects" ); } @@ -508,6 +734,7 @@ void register_MoleculeView_class(){ "metadataType" , metadataType_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return the type of the metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -520,6 +747,7 @@ void register_MoleculeView_class(){ "metadataType" , metadataType_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return the type of the metadata at metakey metakey\nfor the property at key key\nThrow: SireBase::missing_property\n" ); } @@ -531,8 +759,69 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "Return the molecule involved with this view" ); + } + { //::SireMol::MoleculeView::nAtoms + + typedef int ( ::SireMol::MoleculeView::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::MoleculeView::nAtoms ); + + MoleculeView_exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "Return the number of atoms in this view" ); + + } + { //::SireMol::MoleculeView::nChains + + typedef int ( ::SireMol::MoleculeView::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::MoleculeView::nChains ); + + MoleculeView_exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "Return the number of chains in this view" ); + + } + { //::SireMol::MoleculeView::nCutGroups + + typedef int ( ::SireMol::MoleculeView::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::MoleculeView::nCutGroups ); + + MoleculeView_exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "Return the number of CutGroups in this view" ); + + } + { //::SireMol::MoleculeView::nResidues + + typedef int ( ::SireMol::MoleculeView::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::MoleculeView::nResidues ); + + MoleculeView_exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "Return the number of residues in this view" ); + + } + { //::SireMol::MoleculeView::nSegments + + typedef int ( ::SireMol::MoleculeView::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::MoleculeView::nSegments ); + + MoleculeView_exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "Return the number of segments in this view" ); + } { //::SireMol::MoleculeView::nViews @@ -542,6 +831,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() , "Return the number of sub-views in this view. Most MoleculeViews are\njust a single view, but some (e.g. ViewsOfMol or Selector) have\nmultiple views" ); } @@ -553,7 +843,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return a completely null molecule" ); } @@ -568,6 +858,18 @@ void register_MoleculeView_class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::MoleculeView::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMol::MoleculeView::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::MoleculeView::operator[] ); + + MoleculeView_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + } { //::SireMol::MoleculeView::operator[] @@ -640,6 +942,30 @@ void register_MoleculeView_class(){ , ( bp::arg("idx") ) , "" ); + } + { //::SireMol::MoleculeView::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMol::MoleculeView::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::MoleculeView::operator[] ); + + MoleculeView_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::MoleculeView::operator[] + + typedef ::SireMol::MolViewPtr ( ::SireMol::MoleculeView::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::MoleculeView::operator[] ); + + MoleculeView_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + } { //::SireMol::MoleculeView::propertyKeys @@ -649,6 +975,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the list of keys of properties that fit this view,\ne.g. if this is a view of an atom, or group of atoms, then\nthis returns the keys of all AtomProperty derived objects" ); } @@ -661,8 +988,33 @@ void register_MoleculeView_class(){ "propertyType" , propertyType_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the type of the property at key key\nThrow: SireBase::missing_property\n" ); + } + { //::SireMol::MoleculeView::residue + + typedef ::SireMol::Residue ( ::SireMol::MoleculeView::*residue_function_type)( int,::SireBase::PropertyMap const & ) const; + residue_function_type residue_function_value( &::SireMol::MoleculeView::residue ); + + MoleculeView_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the residue from this view that matches the ID resid\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_residue\n" ); + + } + { //::SireMol::MoleculeView::residue + + typedef ::SireMol::Residue ( ::SireMol::MoleculeView::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + residue_function_type residue_function_value( &::SireMol::MoleculeView::residue ); + + MoleculeView_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the residue from this view that matches the ID resid\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_residue\n" ); + } { //::SireMol::MoleculeView::residue @@ -684,8 +1036,57 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() , "Return the residue that is part of this view\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\n" ); + } + { //::SireMol::MoleculeView::residues + + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::MoleculeView::*residues_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + residues_function_type residues_function_value( &::SireMol::MoleculeView::residues ); + + MoleculeView_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the residues from this view that match the ID resid\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::residues + + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::MoleculeView::*residues_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; + residues_function_type residues_function_value( &::SireMol::MoleculeView::residues ); + + MoleculeView_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("values"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the residues from this view that match the ID resid\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::residues + + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::MoleculeView::*residues_function_type)( ::QStringList const &,::SireBase::PropertyMap const & ) const; + residues_function_type residues_function_value( &::SireMol::MoleculeView::residues ); + + MoleculeView_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("names"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the residues from this view that match the ID resid\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::residues + + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::MoleculeView::*residues_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; + residues_function_type residues_function_value( &::SireMol::MoleculeView::residues ); + + MoleculeView_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the residues from this view that match the ID resid\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); + } { //::SireMol::MoleculeView::residues @@ -707,6 +1108,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "residues" , residues_function_value + , bp::release_gil_policy() , "Return all of the residues that are involved with this view\nThrow: SireMol::missing_residue\n" ); } @@ -719,8 +1121,33 @@ void register_MoleculeView_class(){ "search" , search_function_value , ( bp::arg("search_string") ) + , bp::release_gil_policy() , "Return the result of searching this molecule using the passed\nsearch string" ); + } + { //::SireMol::MoleculeView::segment + + typedef ::SireMol::Segment ( ::SireMol::MoleculeView::*segment_function_type)( int,::SireBase::PropertyMap const & ) const; + segment_function_type segment_function_value( &::SireMol::MoleculeView::segment ); + + MoleculeView_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the segment that is involved with this view that matches\nthe ID segid\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_segment\n" ); + + } + { //::SireMol::MoleculeView::segment + + typedef ::SireMol::Segment ( ::SireMol::MoleculeView::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + segment_function_type segment_function_value( &::SireMol::MoleculeView::segment ); + + MoleculeView_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the segment that is involved with this view that matches\nthe ID segid\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\nThrow: SireMol::duplicate_segment\n" ); + } { //::SireMol::MoleculeView::segment @@ -742,8 +1169,57 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() , "Return the segment that is involved with this view\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\n" ); + } + { //::SireMol::MoleculeView::segments + + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::MoleculeView::*segments_function_type)( ::QString const &,::SireBase::PropertyMap const & ) const; + segments_function_type segments_function_value( &::SireMol::MoleculeView::segments ); + + MoleculeView_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the segments that are involved with this view that match\nthe ID segid\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::segments + + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::MoleculeView::*segments_function_type)( ::QList< long long > const &,::SireBase::PropertyMap const & ) const; + segments_function_type segments_function_value( &::SireMol::MoleculeView::segments ); + + MoleculeView_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("values"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the segments that are involved with this view that match\nthe ID segid\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::segments + + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::MoleculeView::*segments_function_type)( ::QStringList const &,::SireBase::PropertyMap const & ) const; + segments_function_type segments_function_value( &::SireMol::MoleculeView::segments ); + + MoleculeView_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("names"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the segments that are involved with this view that match\nthe ID segid\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); + + } + { //::SireMol::MoleculeView::segments + + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::MoleculeView::*segments_function_type)( ::SireBase::Slice const &,::SireBase::PropertyMap const & ) const; + segments_function_type segments_function_value( &::SireMol::MoleculeView::segments ); + + MoleculeView_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice"), bp::arg("map")=SireBase::PropertyMap() ) + , "Return the segments that are involved with this view that match\nthe ID segid\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); + } { //::SireMol::MoleculeView::segments @@ -765,6 +1241,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "segments" , segments_function_value + , bp::release_gil_policy() , "Return the segments that are involved with this view\nThrow: SireMol::missing_segment\n" ); } @@ -848,6 +1325,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selectAll" , selectAll_function_value + , bp::release_gil_policy() , "Return all of the atoms in this view\nThrow: SireMol::missing_atom\n" ); } @@ -907,6 +1385,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selectAllAtoms" , selectAllAtoms_function_value + , bp::release_gil_policy() , "Return all of the atoms in this view\nThrow: SireMol::missing_atom\n" ); } @@ -918,6 +1397,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selectAllChains" , selectAllChains_function_value + , bp::release_gil_policy() , "Return the chains that are involved with this view\nThrow: SireMol::missing_chain\n" ); } @@ -929,6 +1409,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selectAllCutGroups" , selectAllCutGroups_function_value + , bp::release_gil_policy() , "Return all of the CutGroups that are involved in this view\nThrow: SireMol::missing_cutgroup\n" ); } @@ -940,6 +1421,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selectAllResidues" , selectAllResidues_function_value + , bp::release_gil_policy() , "Return all of the residues that are involved with this view\nThrow: SireMol::missing_residue\n" ); } @@ -951,6 +1433,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selectAllSegments" , selectAllSegments_function_value + , bp::release_gil_policy() , "Return the segments that are involved with this view\nThrow: SireMol::missing_segment\n" ); } @@ -962,6 +1445,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this molecule view holds a complete\nview of a molecule" ); } @@ -973,6 +1457,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the atoms that are selected as part of this view" ); } @@ -984,8 +1469,33 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of sub-views in this view. Most MoleculeViews are\njust a single view, but some (e.g. ViewsOfMol or Selector) have\nmultiple views" ); + } + { //::SireMol::MoleculeView::toList + + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::MoleculeView::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::MoleculeView::toList ); + + MoleculeView_exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "Expand this into a list of unit classes. This will return the view itself if\n this is a unit class, e.g. Atom, Residue, Molecule etc.\n This will return a list of unit classes if this is a Selector or\n equivalent type class.\n" ); + + } + { //::SireMol::MoleculeView::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::MoleculeView::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::MoleculeView::toSelector ); + + MoleculeView_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::MoleculeView::toString @@ -995,6 +1505,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this molecule view" ); } @@ -1006,6 +1517,7 @@ void register_MoleculeView_class(){ MoleculeView_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -1018,6 +1530,7 @@ void register_MoleculeView_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this view with a new version of the molecule. You\ncan only update the molecule if it has the same layout UID\n(so same atoms, residues, cutgroups etc.)\nThrow: SireError::incompatible_error\n" ); } diff --git a/wrapper/Mol/Molecules.pypp.cpp b/wrapper/Mol/Molecules.pypp.cpp index c037e5585..551d9d46a 100644 --- a/wrapper/Mol/Molecules.pypp.cpp +++ b/wrapper/Mol/Molecules.pypp.cpp @@ -55,6 +55,8 @@ SireMol::Molecules __copy__(const SireMol::Molecules &other){ return SireMol::Mo #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Molecules_class(){ @@ -76,6 +78,7 @@ void register_Molecules_class(){ "add" , add_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Add the view view to this set of molecules - this\nadds this view even if it already exists in this set" ); } @@ -88,6 +91,7 @@ void register_Molecules_class(){ "add" , add_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Add the views in molviews to this set. This adds\nall of the views, even if they are already present\nin this set." ); } @@ -100,6 +104,7 @@ void register_Molecules_class(){ "add" , add_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Add all of the molecules in molecules to this set.\nThis adds all of the molecules, even if they already\nexist in this set" ); } @@ -112,6 +117,7 @@ void register_Molecules_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Add the view view to this set of molecules - this\nadds this view only if it doesnt already exist in\nthis set - this returns whether or not the view\nwas added" ); } @@ -124,6 +130,7 @@ void register_Molecules_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Add the views in molviews to this set. This only\nadds the views that dont already exist in this set,\nand returns the views that have been added" ); } @@ -136,6 +143,7 @@ void register_Molecules_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Add all of the views of the molecules in molecules to\nthis set, only if they dont already exist in this set.\nThis returns the views that were added to this set." ); } @@ -148,6 +156,7 @@ void register_Molecules_class(){ "assertContains" , assertContains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Assert that this set contains any of the atoms of\nthe molecule with number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -173,6 +182,7 @@ void register_Molecules_class(){ "at" , at_function_value , ( bp::arg("viewidx") ) + , bp::release_gil_policy() , "Return the view of the molecule identified by molviewidx\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -185,6 +195,7 @@ void register_Molecules_class(){ "at" , at_function_value , ( bp::arg("molnum"), bp::arg("idx") ) + , bp::release_gil_policy() , "Return the view at index viewidx of the molecule with number\nmolnum from this set\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -208,6 +219,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Completely clear this set of all views of all molecules" ); } @@ -220,6 +232,7 @@ void register_Molecules_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this set contains any view\nof the molecule at number molnum" ); } @@ -232,6 +245,7 @@ void register_Molecules_class(){ "contains" , contains_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return whether or not this set contains the view molview\n- note that this means that it actually contains this\nspecific view" ); } @@ -244,6 +258,7 @@ void register_Molecules_class(){ "contains" , contains_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Return whether or not this set contains all of the views\nin molviews - note that this means that it actually\ncontains each specific view" ); } @@ -256,6 +271,7 @@ void register_Molecules_class(){ "contains" , contains_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Return whether or not this set contains all of the views\nof all of the molecules in molecules" ); } @@ -267,6 +283,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of molecules in this set" ); } @@ -303,6 +320,7 @@ void register_Molecules_class(){ "intersects" , intersects_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return whether or not this set intersects with the view molview\n- this returns true if any of the atoms in molview are\nalso present in any of the views of that molecule in this set" ); } @@ -315,6 +333,7 @@ void register_Molecules_class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this set intersects with molecules -\nthis returns true if any of the atoms in any of the views\nof any of the molecules in molecules are also present in any\nof the views of any of the molecules in this set" ); } @@ -326,6 +345,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether this set is empty" ); } @@ -349,6 +369,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "molNums" , molNums_function_value + , bp::release_gil_policy() , "Return the numbers of all of the molecules in this set" ); } @@ -373,6 +394,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "nMolecules" , nMolecules_function_value + , bp::release_gil_policy() , "Return the number of molecules in this set" ); } @@ -384,6 +406,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() , "Return the total number of views in this set" ); } @@ -396,6 +419,7 @@ void register_Molecules_class(){ "nViews" , nViews_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the number of views of the molecule with number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -450,6 +474,7 @@ void register_Molecules_class(){ "remove" , remove_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Remove the view molview from this set. This only\nremoves the first copy of this view from this set\n(if multiple copies are present), and returns\nwhether or not a view was removed" ); } @@ -462,6 +487,7 @@ void register_Molecules_class(){ "remove" , remove_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Remove all of the views in molviews from this set. This\nonly removes the first copy of the view if multiple copies\nexist, and returns the views that were successfully removed." ); } @@ -474,6 +500,7 @@ void register_Molecules_class(){ "remove" , remove_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all of the views of all of the molecules in molecules.\nThis only removes the first copy of any views that appear\nmultiple times in this set. This returns all of the views that\nwere successfully removed" ); } @@ -486,6 +513,7 @@ void register_Molecules_class(){ "remove" , remove_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Remove all views of the molecule with number molnum. This\nreturns the views of the molecule in this set, if it exists,\nor an empty set of views if it doesnt exist." ); } @@ -498,6 +526,7 @@ void register_Molecules_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Remove all copies of the view view from this set.\nThis returns whether any views were removed" ); } @@ -510,6 +539,7 @@ void register_Molecules_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Remove all of the views in molviews from this set. This\nremoves all copies of the views if multiple copies exist,\nand returns the views that were successfully removed." ); } @@ -522,6 +552,7 @@ void register_Molecules_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Remove all of the views of all of the molecules in molecules.\nThis removes all copies of any views that appear\nmultiple times in this set. This returns all of the views that\nwere successfully removed" ); } @@ -533,6 +564,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "Remove all views of all molecules from this set. This returns\nwhether or not this changes this set" ); } @@ -544,6 +576,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "removeDuplicates" , removeDuplicates_function_value + , bp::release_gil_policy() , "This removes all duplicated views from this set. This returns\nwhether or not this changes the set (whether or not there\nwere any duplicates)" ); } @@ -556,6 +589,7 @@ void register_Molecules_class(){ "reserve" , reserve_function_value , ( bp::arg("nmolecules") ) + , bp::release_gil_policy() , "Reserve enough space for nmolecules molecules. This\nwill reserve the memory so that reallocations are minimised" ); } @@ -568,6 +602,7 @@ void register_Molecules_class(){ "search" , search_function_value , ( bp::arg("search_string") ) + , bp::release_gil_policy() , "Return the result of searching these molecules with search_string" ); } @@ -579,6 +614,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this set of molecules" ); } @@ -590,6 +626,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -602,6 +639,7 @@ void register_Molecules_class(){ "unite" , unite_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Synonym for Molecules::addIfUnique(molview)" ); } @@ -614,6 +652,7 @@ void register_Molecules_class(){ "unite" , unite_function_value , ( bp::arg("molviews") ) + , bp::release_gil_policy() , "Synonym for Molecules::addIfUnique(molviews)" ); } @@ -626,6 +665,7 @@ void register_Molecules_class(){ "unite" , unite_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Synonym for Molecules::addIfUnique(molecules)" ); } @@ -637,6 +677,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "uniteViews" , uniteViews_function_value + , bp::release_gil_policy() , "Unite all of the views in this set so that each molecule has\nonly a single view that is the union of all of its views.\nReturn whether or not this changes the set." ); } @@ -649,6 +690,7 @@ void register_Molecules_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update the views of the molecule whose data is in moldata\nin this set so that it is at the same version as moldata.\nThis does nothing if this molecule is not in this set.\nThis returns whether or not the molecule was updated" ); } @@ -661,6 +703,7 @@ void register_Molecules_class(){ "update" , update_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Update the views of the molecule viewed by molview\nin this set so that they have the same molecule version\nas molview. This returns whether or not the molecule\nwas updated." ); } @@ -673,6 +716,7 @@ void register_Molecules_class(){ "update" , update_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Update the views in this set so that they have the\nsame molecule versions as the molecules in molecules.\nThis returns the molecules that have been updated." ); } @@ -684,6 +728,7 @@ void register_Molecules_class(){ Molecules_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/MoverBase.pypp.cpp b/wrapper/Mol/MoverBase.pypp.cpp index 8806aa67c..74f3c3ac9 100644 --- a/wrapper/Mol/MoverBase.pypp.cpp +++ b/wrapper/Mol/MoverBase.pypp.cpp @@ -55,6 +55,8 @@ SireMol::MoverBase __copy__(const SireMol::MoverBase &other){ return SireMol::Mo const char* pvt_get_name(const SireMol::MoverBase&){ return "SireMol::MoverBase";} +#include "Helpers/release_gil_policy.hpp" + void register_MoverBase_class(){ { //::SireMol::MoverBase diff --git a/wrapper/Mol/Mover_Atom_.pypp.cpp b/wrapper/Mol/Mover_Atom_.pypp.cpp index dd4b000c2..3a493bb02 100644 --- a/wrapper/Mol/Mover_Atom_.pypp.cpp +++ b/wrapper/Mol/Mover_Atom_.pypp.cpp @@ -93,6 +93,8 @@ SireMol::Mover __copy__(const SireMol::Mover &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Atom__class(){ @@ -309,6 +311,7 @@ void register_Mover_Atom__class(){ Mover_Atom__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -461,6 +464,7 @@ void register_Mover_Atom__class(){ Mover_Atom__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -501,6 +505,7 @@ void register_Mover_Atom__class(){ Mover_Atom__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Bead_.pypp.cpp b/wrapper/Mol/Mover_Bead_.pypp.cpp index ffe987343..aafd03991 100644 --- a/wrapper/Mol/Mover_Bead_.pypp.cpp +++ b/wrapper/Mol/Mover_Bead_.pypp.cpp @@ -13,14 +13,28 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "atom.h" + #include "bead.h" #include "beadeditor.h" #include "beads.h" +#include "chain.h" + +#include "cutgroup.h" + #include "mover.hpp" +#include "partialmolecule.h" + +#include "residue.h" + +#include "segment.h" + +#include "selector.hpp" + #include "tostring.h" #include "bead.h" @@ -73,6 +87,8 @@ SireMol::Mover __copy__(const SireMol::Mover &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Bead__class(){ @@ -289,6 +305,7 @@ void register_Mover_Bead__class(){ Mover_Bead__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -441,6 +458,7 @@ void register_Mover_Bead__class(){ Mover_Bead__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -481,6 +499,7 @@ void register_Mover_Bead__class(){ Mover_Bead__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Beads_.pypp.cpp b/wrapper/Mol/Mover_Beads_.pypp.cpp index d84a16d67..5da81291a 100644 --- a/wrapper/Mol/Mover_Beads_.pypp.cpp +++ b/wrapper/Mol/Mover_Beads_.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; #include "mover.hpp" +#include "partialmolecule.h" + #include "beads.h" #include "SireMaths/align.h" @@ -63,6 +65,8 @@ SireMol::Mover __copy__(const SireMol::Mover &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Beads__class(){ @@ -279,6 +283,7 @@ void register_Mover_Beads__class(){ Mover_Beads__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -431,6 +436,7 @@ void register_Mover_Beads__class(){ Mover_Beads__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -471,6 +477,7 @@ void register_Mover_Beads__class(){ Mover_Beads__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Chain_.pypp.cpp b/wrapper/Mol/Mover_Chain_.pypp.cpp index 904d048ca..6b64d3fbd 100644 --- a/wrapper/Mol/Mover_Chain_.pypp.cpp +++ b/wrapper/Mol/Mover_Chain_.pypp.cpp @@ -85,6 +85,8 @@ SireMol::Mover __copy__(const SireMol::Mover &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Chain__class(){ @@ -301,6 +303,7 @@ void register_Mover_Chain__class(){ Mover_Chain__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -453,6 +456,7 @@ void register_Mover_Chain__class(){ Mover_Chain__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -493,6 +497,7 @@ void register_Mover_Chain__class(){ Mover_Chain__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_CutGroup_.pypp.cpp b/wrapper/Mol/Mover_CutGroup_.pypp.cpp index 3d8085f74..ed7b3b9cb 100644 --- a/wrapper/Mol/Mover_CutGroup_.pypp.cpp +++ b/wrapper/Mol/Mover_CutGroup_.pypp.cpp @@ -85,6 +85,8 @@ SireMol::Mover __copy__(const SireMol::Mover __copy__(const SireMol::Mover __copy__(const SireMol::Mover __copy__(const SireMol::Mover #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Residue__class(){ @@ -303,6 +305,7 @@ void register_Mover_Residue__class(){ Mover_Residue__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -455,6 +458,7 @@ void register_Mover_Residue__class(){ Mover_Residue__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -495,6 +499,7 @@ void register_Mover_Residue__class(){ Mover_Residue__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Segment_.pypp.cpp b/wrapper/Mol/Mover_Segment_.pypp.cpp index 3e99e4ab0..ac1e7ccf6 100644 --- a/wrapper/Mol/Mover_Segment_.pypp.cpp +++ b/wrapper/Mol/Mover_Segment_.pypp.cpp @@ -81,6 +81,8 @@ SireMol::Mover __copy__(const SireMol::Mover #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Segment__class(){ @@ -297,6 +299,7 @@ void register_Mover_Segment__class(){ Mover_Segment__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -449,6 +452,7 @@ void register_Mover_Segment__class(){ Mover_Segment__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -489,6 +493,7 @@ void register_Mover_Segment__class(){ Mover_Segment__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Selector_Atom_.pypp.cpp b/wrapper/Mol/Mover_Selector_Atom_.pypp.cpp index 6ae0a2156..652911667 100644 --- a/wrapper/Mol/Mover_Selector_Atom_.pypp.cpp +++ b/wrapper/Mol/Mover_Selector_Atom_.pypp.cpp @@ -59,6 +59,8 @@ SireMol::Mover > __copy__(const SireMol::Mover< #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Selector_Atom__class(){ @@ -275,6 +277,7 @@ void register_Mover_Selector_Atom__class(){ Mover_Selector_Atom__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -427,6 +430,7 @@ void register_Mover_Selector_Atom__class(){ Mover_Selector_Atom__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +471,7 @@ void register_Mover_Selector_Atom__class(){ Mover_Selector_Atom__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Selector_Chain_.pypp.cpp b/wrapper/Mol/Mover_Selector_Chain_.pypp.cpp index 70f59941f..51debd905 100644 --- a/wrapper/Mol/Mover_Selector_Chain_.pypp.cpp +++ b/wrapper/Mol/Mover_Selector_Chain_.pypp.cpp @@ -59,6 +59,8 @@ SireMol::Mover > __copy__(const SireMol::Mover #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Selector_Chain__class(){ @@ -275,6 +277,7 @@ void register_Mover_Selector_Chain__class(){ Mover_Selector_Chain__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -427,6 +430,7 @@ void register_Mover_Selector_Chain__class(){ Mover_Selector_Chain__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +471,7 @@ void register_Mover_Selector_Chain__class(){ Mover_Selector_Chain__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Selector_CutGroup_.pypp.cpp b/wrapper/Mol/Mover_Selector_CutGroup_.pypp.cpp index f3ddd387b..d4ba9de78 100644 --- a/wrapper/Mol/Mover_Selector_CutGroup_.pypp.cpp +++ b/wrapper/Mol/Mover_Selector_CutGroup_.pypp.cpp @@ -59,6 +59,8 @@ SireMol::Mover > __copy__(const SireMol::Mo #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Selector_CutGroup__class(){ @@ -275,6 +277,7 @@ void register_Mover_Selector_CutGroup__class(){ Mover_Selector_CutGroup__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -427,6 +430,7 @@ void register_Mover_Selector_CutGroup__class(){ Mover_Selector_CutGroup__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +471,7 @@ void register_Mover_Selector_CutGroup__class(){ Mover_Selector_CutGroup__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Selector_Residue_.pypp.cpp b/wrapper/Mol/Mover_Selector_Residue_.pypp.cpp index 584a1e8c8..aaf5871dc 100644 --- a/wrapper/Mol/Mover_Selector_Residue_.pypp.cpp +++ b/wrapper/Mol/Mover_Selector_Residue_.pypp.cpp @@ -59,6 +59,8 @@ SireMol::Mover > __copy__(const SireMol::Mov #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Selector_Residue__class(){ @@ -275,6 +277,7 @@ void register_Mover_Selector_Residue__class(){ Mover_Selector_Residue__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -427,6 +430,7 @@ void register_Mover_Selector_Residue__class(){ Mover_Selector_Residue__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +471,7 @@ void register_Mover_Selector_Residue__class(){ Mover_Selector_Residue__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Mover_Selector_Segment_.pypp.cpp b/wrapper/Mol/Mover_Selector_Segment_.pypp.cpp index 36de35a40..da6fcacbd 100644 --- a/wrapper/Mol/Mover_Selector_Segment_.pypp.cpp +++ b/wrapper/Mol/Mover_Selector_Segment_.pypp.cpp @@ -59,6 +59,8 @@ SireMol::Mover > __copy__(const SireMol::Mov #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Mover_Selector_Segment__class(){ @@ -275,6 +277,7 @@ void register_Mover_Selector_Segment__class(){ Mover_Selector_Segment__exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "" ); } @@ -427,6 +430,7 @@ void register_Mover_Selector_Segment__class(){ Mover_Selector_Segment__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -467,6 +471,7 @@ void register_Mover_Selector_Segment__class(){ Mover_Selector_Segment__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/NullBeading.pypp.cpp b/wrapper/Mol/NullBeading.pypp.cpp index 87116c608..248c8399a 100644 --- a/wrapper/Mol/NullBeading.pypp.cpp +++ b/wrapper/Mol/NullBeading.pypp.cpp @@ -39,6 +39,8 @@ SireMol::NullBeading __copy__(const SireMol::NullBeading &other){ return SireMol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullBeading_class(){ { //::SireMol::NullBeading @@ -69,6 +71,7 @@ void register_NullBeading_class(){ NullBeading_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/NullBondHunter.pypp.cpp b/wrapper/Mol/NullBondHunter.pypp.cpp index d68b6fb5c..04e393abf 100644 --- a/wrapper/Mol/NullBondHunter.pypp.cpp +++ b/wrapper/Mol/NullBondHunter.pypp.cpp @@ -49,6 +49,8 @@ SireMol::NullBondHunter __copy__(const SireMol::NullBondHunter &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullBondHunter_class(){ { //::SireMol::NullBondHunter @@ -76,6 +78,7 @@ void register_NullBondHunter_class(){ NullBondHunter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_NullBondHunter_class(){ NullBondHunter_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/NullGeometryPerturbation.pypp.cpp b/wrapper/Mol/NullGeometryPerturbation.pypp.cpp index ec916539a..234850b38 100644 --- a/wrapper/Mol/NullGeometryPerturbation.pypp.cpp +++ b/wrapper/Mol/NullGeometryPerturbation.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; #include "SireUnits/units.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -33,6 +35,8 @@ SireMol::NullGeometryPerturbation __copy__(const SireMol::NullGeometryPerturbati #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullGeometryPerturbation_class(){ { //::SireMol::NullGeometryPerturbation @@ -64,6 +68,7 @@ void register_NullGeometryPerturbation_class(){ "perturbMolecule" , perturbMolecule_function_value , ( bp::arg("arg0"), bp::arg("arg1") ) + , bp::release_gil_policy() , "" ); } @@ -75,6 +80,7 @@ void register_NullGeometryPerturbation_class(){ NullGeometryPerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +92,7 @@ void register_NullGeometryPerturbation_class(){ NullGeometryPerturbation_exposer.def( "requiredSymbols" , requiredSymbols_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +104,7 @@ void register_NullGeometryPerturbation_class(){ NullGeometryPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +117,7 @@ void register_NullGeometryPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("arg0"), bp::arg("arg1") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/NullPerturbation.pypp.cpp b/wrapper/Mol/NullPerturbation.pypp.cpp index 438783959..aaadaa8e1 100644 --- a/wrapper/Mol/NullPerturbation.pypp.cpp +++ b/wrapper/Mol/NullPerturbation.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -33,6 +35,8 @@ SireMol::NullPerturbation __copy__(const SireMol::NullPerturbation &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullPerturbation_class(){ { //::SireMol::NullPerturbation @@ -63,6 +67,7 @@ void register_NullPerturbation_class(){ NullPerturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "" ); } @@ -74,6 +79,7 @@ void register_NullPerturbation_class(){ NullPerturbation_exposer.def( "requiredSymbols" , requiredSymbols_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +91,7 @@ void register_NullPerturbation_class(){ NullPerturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -97,6 +104,7 @@ void register_NullPerturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/PartialMolecule.pypp.cpp b/wrapper/Mol/PartialMolecule.pypp.cpp index a3c40be2c..af30ddc3d 100644 --- a/wrapper/Mol/PartialMolecule.pypp.cpp +++ b/wrapper/Mol/PartialMolecule.pypp.cpp @@ -50,6 +50,8 @@ SireMol::PartialMolecule __copy__(const SireMol::PartialMolecule &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PartialMolecule_class(){ @@ -69,6 +71,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an evaluator that can evaluate properties\nover all of the atoms in this view" ); } @@ -80,6 +83,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "extract" , extract_function_value + , bp::release_gil_policy() , "Extract a copy of this PartialMolecule which contains only the currently\nselected atoms. This allows the used to pull out parts of a larger molecule,\ne.g. if they want to have only selected residues in a protein and do not\nwant to have to store or manipulate the larger protein molecule" ); } @@ -92,6 +96,7 @@ void register_PartialMolecule_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not this molecule has some metadata\nat the metakey metakey" ); } @@ -104,6 +109,7 @@ void register_PartialMolecule_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not the property at key key has\nsome metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -116,6 +122,7 @@ void register_PartialMolecule_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not this molecule has a property at key key" ); } @@ -127,6 +134,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -139,7 +147,7 @@ void register_PartialMolecule_class(){ "metadata" , metadata_function_value , ( bp::arg("metakey") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata at metakey metakey. Note that this returns the\nmetadata for the molecule - no attempt is made to mask this\nmetadata to match the current selection\nThrow: SireBase::missing_property\n" ); } @@ -152,7 +160,7 @@ void register_PartialMolecule_class(){ "metadata" , metadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the metadata at the metakey metakey for the property\nat key key. Note that this returns the\nmetadata for the molecule - no attempt is made to mask this\nmetadata to match the current selection\nThrow: SireBase::missing_property\n" ); } @@ -164,6 +172,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the keys of all of the metadata contained directly by\nthis molecule" ); } @@ -176,6 +185,7 @@ void register_PartialMolecule_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the keys of all metadata for the property at key key\nThrow: SireBase::missing_property\n" ); } @@ -187,6 +197,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return a mover that can move all of the atoms in this view" ); } @@ -198,6 +209,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this view" ); } @@ -209,6 +221,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "nChains" , nChains_function_value + , bp::release_gil_policy() , "Return the number of chains in this view" ); } @@ -220,6 +233,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "nCutGroups" , nCutGroups_function_value + , bp::release_gil_policy() , "Return the number of CutGroups in this view" ); } @@ -231,6 +245,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "Return the number of residues in this view" ); } @@ -242,6 +257,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "Return the number of segments in this view" ); } @@ -253,7 +269,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this molecule" ); } @@ -265,6 +281,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the identifying number of this molecule" ); } @@ -305,7 +322,7 @@ void register_PartialMolecule_class(){ "property" , property_function_value , ( bp::arg("key") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the property at key key. Note that this returns the\nproperty for the molecule - no attempt is made to mask this\nproperty to match the current selection\nThrow: SireBase::missing_property\n" ); } @@ -317,6 +334,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys of all of the properties contained in this molecule" ); } @@ -328,6 +346,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this contains the entire molecule" ); } @@ -339,8 +358,21 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the atoms that are part of this view" ); + } + { //::SireMol::PartialMolecule::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::PartialMolecule::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::PartialMolecule::toSelector ); + + PartialMolecule_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::PartialMolecule::toString @@ -350,6 +382,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this molecule" ); } @@ -361,6 +394,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "toUnit" , toUnit_function_value + , bp::release_gil_policy() , "Return a copy of this PartialMolecule that has been reduced to its unit\ntype, i.e. if this is a single Atom, this returns the Atom, if this is a single\nresidue, this returns the Residue etc." ); } @@ -372,6 +406,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -383,6 +418,7 @@ void register_PartialMolecule_class(){ PartialMolecule_exposer.def( "version" , version_function_value + , bp::release_gil_policy() , "Return the version number of this molecule - all molecules\nwith the same ID number and version number must be identical" ); } @@ -395,6 +431,7 @@ void register_PartialMolecule_class(){ "version" , version_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the version number of the property at key key.\nAll molecules with the same ID number and same property version\nnumber must have the same value of this property\n(although this says nothing about any metadata associated\nwith this property)\nThrow: SireBase::missing_property\n" ); } diff --git a/wrapper/Mol/Perturbation.pypp.cpp b/wrapper/Mol/Perturbation.pypp.cpp index 865c77c13..2f896919f 100644 --- a/wrapper/Mol/Perturbation.pypp.cpp +++ b/wrapper/Mol/Perturbation.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -31,6 +33,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Perturbation_class(){ { //::SireMol::Perturbation @@ -45,6 +49,7 @@ void register_Perturbation_class(){ Perturbation_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return all of the child perturbations that make up\nthis perturbation" ); } @@ -93,6 +98,7 @@ void register_Perturbation_class(){ "perturb" , perturb_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Perturb the passed molecule, returning the result\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError:incompatible_error\n" ); } @@ -116,6 +122,7 @@ void register_Perturbation_class(){ Perturbation_exposer.def( "recreate" , recreate_function_value + , bp::release_gil_policy() , "Recreate this perturbation - this has the same effect as .clone()" ); } @@ -128,6 +135,7 @@ void register_Perturbation_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function") ) + , bp::release_gil_policy() , "Recreate this perturbation, replacing its current mapping function\nwith mapping_function" ); } @@ -140,6 +148,7 @@ void register_Perturbation_class(){ "recreate" , recreate_function_value , ( bp::arg("map") ) + , bp::release_gil_policy() , "Recreate this perturbation, replacing the current property map with map" ); } @@ -152,6 +161,7 @@ void register_Perturbation_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function"), bp::arg("map") ) + , bp::release_gil_policy() , "Recreate this perturbation, replacing both the mapping function and\nthe property map" ); } @@ -163,6 +173,7 @@ void register_Perturbation_class(){ Perturbation_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "" ); } @@ -174,6 +185,7 @@ void register_Perturbation_class(){ Perturbation_exposer.def( "requiredSymbols" , requiredSymbols_function_value + , bp::release_gil_policy() , "Return all of the symbols that need to be supplied\nto the mapping function (i.e. ignoring symbols().initial()\nand symbols().final() )" ); } @@ -186,6 +198,7 @@ void register_Perturbation_class(){ "substitute" , substitute_function_value , ( bp::arg("old_symbol"), bp::arg("new_symbol") ) + , bp::release_gil_policy() , "Substitute the symbol old_symbol with the symbol new_symbol\nin all of the mapping functions used by this perturbation. This is\nuseful if, for example, you want to switch from using\nlambda to control the perturbation to using alpha, e.g.\n" ); } @@ -198,6 +211,7 @@ void register_Perturbation_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute the identities in identities in all of the mapping functions\nused by this perturbation. This is useful if, for example, you want to\nswitch from using lambda to control the perturbation to using alpha, e.g.\n" ); } @@ -221,6 +235,7 @@ void register_Perturbation_class(){ Perturbation_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -233,6 +248,7 @@ void register_Perturbation_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/PerturbationSymbols.pypp.cpp b/wrapper/Mol/PerturbationSymbols.pypp.cpp index e7b48c400..c3467515a 100644 --- a/wrapper/Mol/PerturbationSymbols.pypp.cpp +++ b/wrapper/Mol/PerturbationSymbols.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -32,6 +34,8 @@ SireMol::PerturbationSymbols __copy__(const SireMol::PerturbationSymbols &other) const char* pvt_get_name(const SireMol::PerturbationSymbols&){ return "SireMol::PerturbationSymbols";} +#include "Helpers/release_gil_policy.hpp" + void register_PerturbationSymbols_class(){ { //::SireMol::PerturbationSymbols @@ -46,7 +50,7 @@ void register_PerturbationSymbols_class(){ PerturbationSymbols_exposer.def( "final" , final_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol used to represent the final state" ); } @@ -58,7 +62,7 @@ void register_PerturbationSymbols_class(){ PerturbationSymbols_exposer.def( "initial" , initial_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol used to represent the initial state" ); } @@ -70,7 +74,7 @@ void register_PerturbationSymbols_class(){ PerturbationSymbols_exposer.def( "Lambda" , Lambda_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol used to represent the driving (reaction)\ncoordinate" ); } diff --git a/wrapper/Mol/Perturbations.pypp.cpp b/wrapper/Mol/Perturbations.pypp.cpp index 292ca3915..43fd1e629 100644 --- a/wrapper/Mol/Perturbations.pypp.cpp +++ b/wrapper/Mol/Perturbations.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "SireStream/shareddatastream.h" +#include "core.h" + #include "geometryperturbation.h" #include "molecule.h" @@ -33,6 +35,8 @@ SireMol::Perturbations __copy__(const SireMol::Perturbations &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Perturbations_class(){ { //::SireMol::Perturbations @@ -50,6 +54,7 @@ void register_Perturbations_class(){ Perturbations_exposer.def( "children" , children_function_value + , bp::release_gil_policy() , "Return a list of all of the children of this perturbation\n(and the children of these children etc.)" ); } @@ -76,6 +81,7 @@ void register_Perturbations_class(){ Perturbations_exposer.def( "perturbations" , perturbations_function_value + , bp::release_gil_policy() , "Return a list of all perturbations performed by this object" ); } @@ -88,6 +94,7 @@ void register_Perturbations_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function") ) + , bp::release_gil_policy() , "Return a re-created version of this set of perturbations where all child\nperturbations are changed to use the passed mapping function" ); } @@ -100,6 +107,7 @@ void register_Perturbations_class(){ "recreate" , recreate_function_value , ( bp::arg("map") ) + , bp::release_gil_policy() , "Return a re-created version of this set of perturbations where all child\nperturbations are changed to use the passed property map" ); } @@ -112,6 +120,7 @@ void register_Perturbations_class(){ "recreate" , recreate_function_value , ( bp::arg("mapping_function"), bp::arg("map") ) + , bp::release_gil_policy() , "Return a re-created version of this set of perturbations where all child\nperturbations are changed to use the passed mapping function and property map" ); } @@ -123,6 +132,7 @@ void register_Perturbations_class(){ Perturbations_exposer.def( "requiredProperties" , requiredProperties_function_value + , bp::release_gil_policy() , "Return all of the properties that are needed or affected by\nthese perturbations" ); } @@ -134,6 +144,7 @@ void register_Perturbations_class(){ Perturbations_exposer.def( "requiredSymbols" , requiredSymbols_function_value + , bp::release_gil_policy() , "Return all of the symbols that need to be input to these perturbations" ); } @@ -146,6 +157,7 @@ void register_Perturbations_class(){ "substitute" , substitute_function_value , ( bp::arg("identities") ) + , bp::release_gil_policy() , "Substitute the identities in identities in all of the mapping functions\nused by this perturbation. This is useful if, for example, you want to\nswitch from using lambda to control the perturbation to using alpha, e.g.\n" ); } @@ -158,6 +170,7 @@ void register_Perturbations_class(){ "substitute" , substitute_function_value , ( bp::arg("old_symbol"), bp::arg("new_symbol") ) + , bp::release_gil_policy() , "" ); } @@ -169,6 +182,7 @@ void register_Perturbations_class(){ Perturbations_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -180,6 +194,7 @@ void register_Perturbations_class(){ Perturbations_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +207,7 @@ void register_Perturbations_class(){ "wouldChange" , wouldChange_function_value , ( bp::arg("molecule"), bp::arg("values") ) + , bp::release_gil_policy() , "Return whether or not these perturbations with the passed values would\nchange the molecule molecule" ); } diff --git a/wrapper/Mol/Radical.pypp.cpp b/wrapper/Mol/Radical.pypp.cpp index 32ee53bb0..21d50e9a7 100644 --- a/wrapper/Mol/Radical.pypp.cpp +++ b/wrapper/Mol/Radical.pypp.cpp @@ -25,6 +25,8 @@ SireMol::Radical __copy__(const SireMol::Radical &other){ return SireMol::Radica #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Radical_class(){ { //::SireMol::Radical @@ -42,6 +44,7 @@ void register_Radical_class(){ Radical_exposer.def( "doublet" , doublet_function_value + , bp::release_gil_policy() , "Return a doublet Radical" ); } @@ -53,6 +56,7 @@ void register_Radical_class(){ Radical_exposer.def( "isDefined" , isDefined_function_value + , bp::release_gil_policy() , "Return whether or not the Radical is defined" ); } @@ -64,6 +68,7 @@ void register_Radical_class(){ Radical_exposer.def( "isDoublet" , isDoublet_function_value + , bp::release_gil_policy() , "Return whether or not this is a doublet" ); } @@ -75,6 +80,7 @@ void register_Radical_class(){ Radical_exposer.def( "isSinglet" , isSinglet_function_value + , bp::release_gil_policy() , "Return whether or not this is a singlet" ); } @@ -86,6 +92,7 @@ void register_Radical_class(){ Radical_exposer.def( "isTriplet" , isTriplet_function_value + , bp::release_gil_policy() , "Return whether or not this is a triplet" ); } @@ -112,6 +119,7 @@ void register_Radical_class(){ Radical_exposer.def( "sdfValue" , sdfValue_function_value + , bp::release_gil_policy() , "Return the SDF-format value for this radical. This returns\n4 if this is a double radical, or 0 otherwise\n" ); } @@ -123,6 +131,7 @@ void register_Radical_class(){ Radical_exposer.def( "singlet" , singlet_function_value + , bp::release_gil_policy() , "Return a single Radical" ); } @@ -134,6 +143,7 @@ void register_Radical_class(){ Radical_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +155,7 @@ void register_Radical_class(){ Radical_exposer.def( "triplet" , triplet_function_value + , bp::release_gil_policy() , "Return a triplet Radical" ); } @@ -156,6 +167,7 @@ void register_Radical_class(){ Radical_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +179,7 @@ void register_Radical_class(){ Radical_exposer.def( "undefined" , undefined_function_value + , bp::release_gil_policy() , "Return an undefined Radical" ); } @@ -178,6 +191,7 @@ void register_Radical_class(){ Radical_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return the radical type. 0 is undefined, 1 is singlet, 2 is doublet\nand 3 is triplet\n" ); } diff --git a/wrapper/Mol/RelFromMass.pypp.cpp b/wrapper/Mol/RelFromMass.pypp.cpp index a425e28b5..da9e71591 100644 --- a/wrapper/Mol/RelFromMass.pypp.cpp +++ b/wrapper/Mol/RelFromMass.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; #include "atomselection.h" +#include "core.h" + #include "editor.hpp" #include "evaluator.h" @@ -35,6 +37,8 @@ SireMol::RelFromMass __copy__(const SireMol::RelFromMass &other){ return SireMol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RelFromMass_class(){ { //::SireMol::RelFromMass @@ -89,6 +93,7 @@ void register_RelFromMass_class(){ RelFromMass_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/RelFromNumber.pypp.cpp b/wrapper/Mol/RelFromNumber.pypp.cpp index 5157be811..831c754ad 100644 --- a/wrapper/Mol/RelFromNumber.pypp.cpp +++ b/wrapper/Mol/RelFromNumber.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; #include "atomselection.h" +#include "core.h" + #include "editor.hpp" #include "evaluator.h" @@ -35,6 +37,8 @@ SireMol::RelFromNumber __copy__(const SireMol::RelFromNumber &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RelFromNumber_class(){ { //::SireMol::RelFromNumber @@ -89,6 +93,7 @@ void register_RelFromNumber_class(){ RelFromNumber_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResAtomID.pypp.cpp b/wrapper/Mol/ResAtomID.pypp.cpp index 5862a05db..fe9791d82 100644 --- a/wrapper/Mol/ResAtomID.pypp.cpp +++ b/wrapper/Mol/ResAtomID.pypp.cpp @@ -31,6 +31,8 @@ SireMol::GroupAtomID __copy__(const SireMol::Gr #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResAtomID_class(){ { //::SireMol::GroupAtomID< SireMol::ResID, SireMol::AtomID > @@ -48,6 +50,7 @@ void register_ResAtomID_class(){ ResAtomID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +63,7 @@ void register_ResAtomID_class(){ ResAtomID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +77,7 @@ void register_ResAtomID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +93,7 @@ void register_ResAtomID_class(){ ResAtomID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_ResAtomID_class(){ ResAtomID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -112,6 +119,7 @@ void register_ResAtomID_class(){ ResAtomID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResEditor.pypp.cpp b/wrapper/Mol/ResEditor.pypp.cpp index 06a610b20..bca5a0e13 100644 --- a/wrapper/Mol/ResEditor.pypp.cpp +++ b/wrapper/Mol/ResEditor.pypp.cpp @@ -47,6 +47,8 @@ SireMol::ResEditor __copy__(const SireMol::ResEditor &other){ return SireMol::Re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ResEditor_class(){ @@ -66,6 +68,7 @@ void register_ResEditor_class(){ "add" , add_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "Add a new atom called name to this residue - this returns\nan editor that can be used to further edit this atom" ); } @@ -78,6 +81,7 @@ void register_ResEditor_class(){ "add" , add_function_value , ( bp::arg("atomnum") ) + , bp::release_gil_policy() , "Add a new atom with the number number to this residue - this\nreturns an editor that can be used to further edit this atom" ); } @@ -89,6 +93,7 @@ void register_ResEditor_class(){ ResEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the updated Residue" ); } @@ -127,6 +132,7 @@ void register_ResEditor_class(){ "reindex" , reindex_function_value , ( bp::arg("index") ) + , bp::release_gil_policy() , "Change the index of this residue to newidx. If this\nis larger than the number of residues in the molecule\nthen this residue is moved to the end" ); } @@ -138,6 +144,7 @@ void register_ResEditor_class(){ ResEditor_exposer.def( "remove" , remove_function_value + , bp::release_gil_policy() , "Completely remove this residue from the molecule - this returns\na MolStructureEditor that can be used to further edit the molecule" ); } @@ -150,6 +157,7 @@ void register_ResEditor_class(){ "remove" , remove_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Remove all atoms with ID atomid from this residue\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -162,6 +170,7 @@ void register_ResEditor_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the ith atom from this residue\nThrow: SireError::invalid_index\n" ); } @@ -200,6 +209,7 @@ void register_ResEditor_class(){ "reparent" , reparent_function_value , ( bp::arg("chainid") ) + , bp::release_gil_policy() , "Move this residue into the chain with ID chainid\nThrow: SireMol::missing_chain\nThrow: SireMol::duplicate_chain\nThrow: SireError::invalid_index\n" ); } @@ -211,6 +221,7 @@ void register_ResEditor_class(){ ResEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -223,6 +234,7 @@ void register_ResEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("atomid"), bp::arg("resid") ) + , bp::release_gil_policy() , "Transfer all atoms that match the ID atomid into the residue that\nmatches the ID resid\nThrow: SireMol::missing_atom\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -235,6 +247,7 @@ void register_ResEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("i"), bp::arg("resid") ) + , bp::release_gil_policy() , "Transfer the ith atom from this residue into the residue that\nmatches the ID resid\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -247,6 +260,7 @@ void register_ResEditor_class(){ "transferAll" , transferAll_function_value , ( bp::arg("resid") ) + , bp::release_gil_policy() , "Transfer all atoms from this residue into the residue with ID resid\nThrow: SireMol::missing_residue\nThrow: SireMol::duplicate_residue\nThrow: SireError::invalid_index\n" ); } @@ -258,6 +272,7 @@ void register_ResEditor_class(){ ResEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResEditorBase.pypp.cpp b/wrapper/Mol/ResEditorBase.pypp.cpp index a4c179e0c..fbe39a545 100644 --- a/wrapper/Mol/ResEditorBase.pypp.cpp +++ b/wrapper/Mol/ResEditorBase.pypp.cpp @@ -85,6 +85,8 @@ SireMol::ResEditorBase& set_Metadata_SireMol_ResVariantProperty_function2( #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ResEditorBase_class(){ @@ -102,6 +104,33 @@ void register_ResEditorBase_class(){ ResEditorBase_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::atom + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*atom_function_type)( int,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::atom ); + + ResEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::atom + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::atom ); + + ResEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -127,6 +156,33 @@ void register_ResEditorBase_class(){ ResEditorBase_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::chain + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*chain_function_type)( int,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::chain ); + + ResEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::chain + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::chain ); + + ResEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -152,6 +208,33 @@ void register_ResEditorBase_class(){ ResEditorBase_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::cutGroup + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::cutGroup ); + + ResEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::cutGroup + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::cutGroup ); + + ResEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -177,6 +260,7 @@ void register_ResEditorBase_class(){ ResEditorBase_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "" ); } @@ -207,6 +291,110 @@ void register_ResEditorBase_class(){ , bp::return_self< >() , "" ); + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( int ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( ::QString const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( ::SireMol::AtomID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( ::SireMol::ResID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( ::SireMol::CGID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( ::SireMol::ChainID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( ::SireMol::SegID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("segid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*__getitem___function_type)( ::SireID::Index const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::operator[] ); + + ResEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::removeMetadata @@ -259,6 +447,33 @@ void register_ResEditorBase_class(){ ResEditorBase_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::residue + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*residue_function_type)( int,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::residue ); + + ResEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::residue + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::residue ); + + ResEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -284,6 +499,33 @@ void register_ResEditorBase_class(){ ResEditorBase_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::segment + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*segment_function_type)( int,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::segment ); + + ResEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::segment + + typedef SireMol::Editor< SireMol::ResEditor, SireMol::Residue > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::ResEditor, SireMol::Residue >::segment ); + + ResEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } diff --git a/wrapper/Mol/ResFloatProperty.pypp.cpp b/wrapper/Mol/ResFloatProperty.pypp.cpp index c852224f9..d157e35dc 100644 --- a/wrapper/Mol/ResFloatProperty.pypp.cpp +++ b/wrapper/Mol/ResFloatProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ResProperty __copy__(const SireMol::ResProperty &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ResFloatProperty_class(){ @@ -55,6 +57,7 @@ void register_ResFloatProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_ResFloatProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_ResFloatProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_ResFloatProperty_class(){ ResFloatProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_ResFloatProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_ResFloatProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::ResProperty< double >::getAsProperty + + typedef SireMol::ResProperty< double > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ResProperty< double >::*getAsProperty_function_type)( ::SireMol::ResIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ResProperty< double >::getAsProperty ); + + ResFloatProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ResProperty< double >::getAsVariant + + typedef SireMol::ResProperty< double > exported_class_t; + typedef ::QVariant ( ::SireMol::ResProperty< double >::*getAsVariant_function_type)( ::SireMol::ResIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ResProperty< double >::getAsVariant ); + + ResFloatProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ResProperty< double >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ResFloatProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ResFloatProperty_class(){ ResFloatProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ResFloatProperty_class(){ ResFloatProperty_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ResFloatProperty_class(){ ResFloatProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ResFloatProperty_class(){ ResFloatProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ResFloatProperty_class(){ ResFloatProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ResFloatProperty_class(){ ResFloatProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResID.pypp.cpp b/wrapper/Mol/ResID.pypp.cpp index 1ac5ff0c0..d1a708612 100644 --- a/wrapper/Mol/ResID.pypp.cpp +++ b/wrapper/Mol/ResID.pypp.cpp @@ -55,6 +55,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResID_class(){ { //::SireMol::ResID @@ -69,6 +71,7 @@ void register_ResID_class(){ ResID_exposer.def( "any" , any_function_value + , bp::release_gil_policy() , "Return a match for all residues" ); } @@ -81,6 +84,7 @@ void register_ResID_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return a specific atom in the matching residues" ); } @@ -92,6 +96,7 @@ void register_ResID_class(){ ResID_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return the atoms in the matching residues" ); } @@ -104,6 +109,7 @@ void register_ResID_class(){ "atoms" , atoms_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return a range of atoms in the matching residues" ); } @@ -115,8 +121,22 @@ void register_ResID_class(){ ResID_exposer.def( "chains" , chains_function_value + , bp::release_gil_policy() , "Return a Chain ID that matches chains that contain residues\nthat match this Residue ID" ); + } + { //::SireMol::ResID::fromString + + typedef ::SireMol::ResIdentifier ( *fromString_function_type )( ::QString const & ); + fromString_function_type fromString_function_value( &::SireMol::ResID::fromString ); + + ResID_exposer.def( + "fromString" + , fromString_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return an ResID constructed from the passed string" ); + } { //::SireMol::ResID::inverse @@ -126,6 +146,7 @@ void register_ResID_class(){ ResID_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Invert this match" ); } @@ -137,6 +158,7 @@ void register_ResID_class(){ ResID_exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "Invert this match" ); } @@ -149,6 +171,7 @@ void register_ResID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID back to the indicies of the residues in the molecule,\nusing the passed MoleculeInfo to do the mapping" ); } @@ -363,10 +386,12 @@ void register_ResID_class(){ ResID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } ResID_exposer.staticmethod( "any" ); + ResID_exposer.staticmethod( "fromString" ); ResID_exposer.staticmethod( "typeName" ); ResID_exposer.def( "__str__", &__str__< ::SireMol::ResID > ); ResID_exposer.def( "__repr__", &__str__< ::SireMol::ResID > ); diff --git a/wrapper/Mol/ResIdx.pypp.cpp b/wrapper/Mol/ResIdx.pypp.cpp index 7940246f6..e415d5601 100644 --- a/wrapper/Mol/ResIdx.pypp.cpp +++ b/wrapper/Mol/ResIdx.pypp.cpp @@ -63,6 +63,8 @@ SireMol::ResIdx __copy__(const SireMol::ResIdx &other){ return SireMol::ResIdx(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResIdx_class(){ { //::SireMol::ResIdx @@ -79,6 +81,7 @@ void register_ResIdx_class(){ ResIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +93,7 @@ void register_ResIdx_class(){ ResIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -102,6 +106,7 @@ void register_ResIdx_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -113,6 +118,7 @@ void register_ResIdx_class(){ ResIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +143,7 @@ void register_ResIdx_class(){ ResIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +155,7 @@ void register_ResIdx_class(){ ResIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -159,6 +167,7 @@ void register_ResIdx_class(){ ResIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResIdxAtomCoordMatcher.pypp.cpp b/wrapper/Mol/ResIdxAtomCoordMatcher.pypp.cpp index 4a0334f72..b050cd236 100644 --- a/wrapper/Mol/ResIdxAtomCoordMatcher.pypp.cpp +++ b/wrapper/Mol/ResIdxAtomCoordMatcher.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -49,6 +51,8 @@ SireMol::ResIdxAtomCoordMatcher __copy__(const SireMol::ResIdxAtomCoordMatcher & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResIdxAtomCoordMatcher_class(){ { //::SireMol::ResIdxAtomCoordMatcher @@ -80,6 +84,7 @@ void register_ResIdxAtomCoordMatcher_class(){ ResIdxAtomCoordMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +96,7 @@ void register_ResIdxAtomCoordMatcher_class(){ ResIdxAtomCoordMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -102,6 +108,7 @@ void register_ResIdxAtomCoordMatcher_class(){ ResIdxAtomCoordMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResIdxAtomMCSMatcher.pypp.cpp b/wrapper/Mol/ResIdxAtomMCSMatcher.pypp.cpp index 13c0aa5fd..30aae7630 100644 --- a/wrapper/Mol/ResIdxAtomMCSMatcher.pypp.cpp +++ b/wrapper/Mol/ResIdxAtomMCSMatcher.pypp.cpp @@ -38,6 +38,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -50,6 +52,8 @@ SireMol::ResIdxAtomMCSMatcher __copy__(const SireMol::ResIdxAtomMCSMatcher &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResIdxAtomMCSMatcher_class(){ { //::SireMol::ResIdxAtomMCSMatcher @@ -73,6 +77,7 @@ void register_ResIdxAtomMCSMatcher_class(){ ResIdxAtomMCSMatcher_exposer.def( "isVerbose" , isVerbose_function_value + , bp::release_gil_policy() , "Return whether or not this report progress to stdout." ); } @@ -84,6 +89,7 @@ void register_ResIdxAtomMCSMatcher_class(){ ResIdxAtomMCSMatcher_exposer.def( "matchingLightAtoms" , matchingLightAtoms_function_value + , bp::release_gil_policy() , "Return whether or not this will include light atoms (e.g. hydrogen)\nwhen searching for the maximum common substructure" ); } @@ -110,7 +116,7 @@ void register_ResIdxAtomMCSMatcher_class(){ ResIdxAtomMCSMatcher_exposer.def( "preMatcher" , preMatcher_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the prematcher (if any) that is used to pre-match atoms\nbefore the MCS match" ); } @@ -122,6 +128,7 @@ void register_ResIdxAtomMCSMatcher_class(){ ResIdxAtomMCSMatcher_exposer.def( "timeout" , timeout_function_value + , bp::release_gil_policy() , "Return the timeout before the MCS match is abandoned" ); } @@ -133,6 +140,7 @@ void register_ResIdxAtomMCSMatcher_class(){ ResIdxAtomMCSMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +152,7 @@ void register_ResIdxAtomMCSMatcher_class(){ ResIdxAtomMCSMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +164,7 @@ void register_ResIdxAtomMCSMatcher_class(){ ResIdxAtomMCSMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResIdxAtomNameMatcher.pypp.cpp b/wrapper/Mol/ResIdxAtomNameMatcher.pypp.cpp index 4746dfc22..d21cb24b3 100644 --- a/wrapper/Mol/ResIdxAtomNameMatcher.pypp.cpp +++ b/wrapper/Mol/ResIdxAtomNameMatcher.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -49,6 +51,8 @@ SireMol::ResIdxAtomNameMatcher __copy__(const SireMol::ResIdxAtomNameMatcher &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResIdxAtomNameMatcher_class(){ { //::SireMol::ResIdxAtomNameMatcher @@ -79,6 +83,7 @@ void register_ResIdxAtomNameMatcher_class(){ ResIdxAtomNameMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +95,7 @@ void register_ResIdxAtomNameMatcher_class(){ ResIdxAtomNameMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +107,7 @@ void register_ResIdxAtomNameMatcher_class(){ ResIdxAtomNameMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResIn_ChainID_.pypp.cpp b/wrapper/Mol/ResIn_ChainID_.pypp.cpp index 807c17126..95cfe14e1 100644 --- a/wrapper/Mol/ResIn_ChainID_.pypp.cpp +++ b/wrapper/Mol/ResIn_ChainID_.pypp.cpp @@ -55,6 +55,8 @@ SireMol::ResIn __copy__(const SireMol::ResIn #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResIn_ChainID__class(){ { //::SireMol::ResIn< SireMol::ChainID > @@ -74,6 +76,7 @@ void register_ResIn_ChainID__class(){ ResIn_ChainID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +89,7 @@ void register_ResIn_ChainID__class(){ ResIn_ChainID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_ResIn_ChainID__class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_ResIn_ChainID__class(){ ResIn_ChainID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_ResIn_ChainID__class(){ ResIn_ChainID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_ResIn_ChainID__class(){ ResIn_ChainID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResIntProperty.pypp.cpp b/wrapper/Mol/ResIntProperty.pypp.cpp index ec9435937..763755c06 100644 --- a/wrapper/Mol/ResIntProperty.pypp.cpp +++ b/wrapper/Mol/ResIntProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ResProperty __copy__(const SireMol::ResProperty & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ResIntProperty_class(){ @@ -55,6 +57,7 @@ void register_ResIntProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_ResIntProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_ResIntProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_ResIntProperty_class(){ ResIntProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_ResIntProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_ResIntProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::ResProperty< long long >::getAsProperty + + typedef SireMol::ResProperty< long long > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ResProperty< long long >::*getAsProperty_function_type)( ::SireMol::ResIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ResProperty< long long >::getAsProperty ); + + ResIntProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ResProperty< long long >::getAsVariant + + typedef SireMol::ResProperty< long long > exported_class_t; + typedef ::QVariant ( ::SireMol::ResProperty< long long >::*getAsVariant_function_type)( ::SireMol::ResIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ResProperty< long long >::getAsVariant ); + + ResIntProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ResProperty< long long >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ResIntProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ResIntProperty_class(){ ResIntProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ResIntProperty_class(){ ResIntProperty_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ResIntProperty_class(){ ResIntProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ResIntProperty_class(){ ResIntProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ResIntProperty_class(){ ResIntProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ResIntProperty_class(){ ResIntProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResName.pypp.cpp b/wrapper/Mol/ResName.pypp.cpp index e193bbc04..cd3df5415 100644 --- a/wrapper/Mol/ResName.pypp.cpp +++ b/wrapper/Mol/ResName.pypp.cpp @@ -63,6 +63,8 @@ SireMol::ResName __copy__(const SireMol::ResName &other){ return SireMol::ResNam #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResName_class(){ { //::SireMol::ResName @@ -80,6 +82,7 @@ void register_ResName_class(){ ResName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +94,7 @@ void register_ResName_class(){ ResName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -103,6 +107,7 @@ void register_ResName_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -130,6 +135,7 @@ void register_ResName_class(){ ResName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_ResName_class(){ ResName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -152,6 +159,7 @@ void register_ResName_class(){ ResName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResNum.pypp.cpp b/wrapper/Mol/ResNum.pypp.cpp index ed71316fe..2c68a83f7 100644 --- a/wrapper/Mol/ResNum.pypp.cpp +++ b/wrapper/Mol/ResNum.pypp.cpp @@ -63,6 +63,8 @@ SireMol::ResNum __copy__(const SireMol::ResNum &other){ return SireMol::ResNum(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResNum_class(){ { //::SireMol::ResNum @@ -79,6 +81,7 @@ void register_ResNum_class(){ ResNum_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +93,7 @@ void register_ResNum_class(){ ResNum_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -102,6 +106,7 @@ void register_ResNum_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -133,6 +138,7 @@ void register_ResNum_class(){ ResNum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +150,7 @@ void register_ResNum_class(){ ResNum_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_ResNum_class(){ ResNum_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResNumAtomNameMatcher.pypp.cpp b/wrapper/Mol/ResNumAtomNameMatcher.pypp.cpp index 1bd383f6b..ee7c90de5 100644 --- a/wrapper/Mol/ResNumAtomNameMatcher.pypp.cpp +++ b/wrapper/Mol/ResNumAtomNameMatcher.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "mover.h" +#include "mover.hpp" + #include "selector.hpp" #include "tostring.h" @@ -49,6 +51,8 @@ SireMol::ResNumAtomNameMatcher __copy__(const SireMol::ResNumAtomNameMatcher &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResNumAtomNameMatcher_class(){ { //::SireMol::ResNumAtomNameMatcher @@ -79,6 +83,7 @@ void register_ResNumAtomNameMatcher_class(){ ResNumAtomNameMatcher_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -90,6 +95,7 @@ void register_ResNumAtomNameMatcher_class(){ ResNumAtomNameMatcher_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -101,6 +107,7 @@ void register_ResNumAtomNameMatcher_class(){ ResNumAtomNameMatcher_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResProp.pypp.cpp b/wrapper/Mol/ResProp.pypp.cpp index 8b2679504..90aeb3d79 100644 --- a/wrapper/Mol/ResProp.pypp.cpp +++ b/wrapper/Mol/ResProp.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResProp_class(){ { //::SireMol::ResProp @@ -30,6 +32,7 @@ void register_ResProp_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -42,6 +45,7 @@ void register_ResProp_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +58,33 @@ void register_ResProp_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ResProp::getAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::ResProp::*getAsProperty_function_type)( ::SireMol::ResIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ResProp::getAsProperty ); + + ResProp_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("residx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ResProp::getAsVariant + + typedef ::QVariant ( ::SireMol::ResProp::*getAsVariant_function_type)( ::SireMol::ResIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ResProp::getAsVariant ); + + ResProp_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("residx") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +96,7 @@ void register_ResProp_class(){ ResProp_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResStringProperty.pypp.cpp b/wrapper/Mol/ResStringProperty.pypp.cpp index 8a132e4b9..26c8c5c49 100644 --- a/wrapper/Mol/ResStringProperty.pypp.cpp +++ b/wrapper/Mol/ResStringProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ResProperty __copy__(const SireMol::ResProperty &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ResStringProperty_class(){ @@ -55,6 +57,7 @@ void register_ResStringProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_ResStringProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_ResStringProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_ResStringProperty_class(){ ResStringProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_ResStringProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_ResStringProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::ResProperty< QString >::getAsProperty + + typedef SireMol::ResProperty< QString > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ResProperty< QString >::*getAsProperty_function_type)( ::SireMol::ResIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ResProperty< QString >::getAsProperty ); + + ResStringProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ResProperty< QString >::getAsVariant + + typedef SireMol::ResProperty< QString > exported_class_t; + typedef ::QVariant ( ::SireMol::ResProperty< QString >::*getAsVariant_function_type)( ::SireMol::ResIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ResProperty< QString >::getAsVariant ); + + ResStringProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ResProperty< QString >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ResStringProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ResStringProperty_class(){ ResStringProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ResStringProperty_class(){ ResStringProperty_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ResStringProperty_class(){ ResStringProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ResStringProperty_class(){ ResStringProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ResStringProperty_class(){ ResStringProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ResStringProperty_class(){ ResStringProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResStructureEditor.pypp.cpp b/wrapper/Mol/ResStructureEditor.pypp.cpp index d6eb328a6..9cf709ac6 100644 --- a/wrapper/Mol/ResStructureEditor.pypp.cpp +++ b/wrapper/Mol/ResStructureEditor.pypp.cpp @@ -48,6 +48,8 @@ SireMol::ResStructureEditor __copy__(const SireMol::ResStructureEditor &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResStructureEditor_class(){ { //::SireMol::ResStructureEditor @@ -66,6 +68,7 @@ void register_ResStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "Add a new atom called name to this residue - this returns\nan editor that can be used to further edit this atom" ); } @@ -78,6 +81,7 @@ void register_ResStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atomnum") ) + , bp::release_gil_policy() , "Add a new atom with the number number to this residue - this\nreturns an editor that can be used to further edit this atom" ); } @@ -90,6 +94,7 @@ void register_ResStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith atom in this residue\nThrow: SireError::invalid_index\n" ); } @@ -102,6 +107,7 @@ void register_ResStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom with ID == atomid in\nthis residue\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -113,6 +119,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() , "Return an editor for the chain that contains this residue" ); } @@ -124,6 +131,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the updated residue" ); } @@ -135,6 +143,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this residue in the molecule" ); } @@ -146,6 +155,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "Return an editor for the molecule that contains this residue" ); } @@ -157,6 +167,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this residue - this may be zero" ); } @@ -168,7 +179,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this residue" ); } @@ -180,6 +191,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the number of this residue" ); } @@ -308,6 +320,7 @@ void register_ResStructureEditor_class(){ "select" , select_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith atom in this residue\nThrow: SireError::invalid_index\n" ); } @@ -320,6 +333,7 @@ void register_ResStructureEditor_class(){ "select" , select_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom with ID == atomid in\nthis residue\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -331,6 +345,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Is this editor editing the entire molecule?" ); } @@ -342,6 +357,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -392,6 +408,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -403,6 +420,7 @@ void register_ResStructureEditor_class(){ ResStructureEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResVariantProperty.pypp.cpp b/wrapper/Mol/ResVariantProperty.pypp.cpp index 4f4e319d5..7a851a71e 100644 --- a/wrapper/Mol/ResVariantProperty.pypp.cpp +++ b/wrapper/Mol/ResVariantProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::ResProperty __copy__(const SireMol::ResProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_ResVariantProperty_class(){ @@ -55,6 +57,7 @@ void register_ResVariantProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_ResVariantProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_ResVariantProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_ResVariantProperty_class(){ ResVariantProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_ResVariantProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_ResVariantProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::ResProperty< QVariant >::getAsProperty + + typedef SireMol::ResProperty< QVariant > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::ResProperty< QVariant >::*getAsProperty_function_type)( ::SireMol::ResIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::ResProperty< QVariant >::getAsProperty ); + + ResVariantProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::ResProperty< QVariant >::getAsVariant + + typedef SireMol::ResProperty< QVariant > exported_class_t; + typedef ::QVariant ( ::SireMol::ResProperty< QVariant >::*getAsVariant_function_type)( ::SireMol::ResIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::ResProperty< QVariant >::getAsVariant ); + + ResVariantProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::ResProperty< QVariant >::isCompatibleWith @@ -147,6 +182,7 @@ void register_ResVariantProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_ResVariantProperty_class(){ ResVariantProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_ResVariantProperty_class(){ ResVariantProperty_exposer.def( "nResidues" , nResidues_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_ResVariantProperty_class(){ ResVariantProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_ResVariantProperty_class(){ ResVariantProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_ResVariantProperty_class(){ ResVariantProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_ResVariantProperty_class(){ ResVariantProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResWithAtoms.pypp.cpp b/wrapper/Mol/ResWithAtoms.pypp.cpp index 39a6f4809..9780635e4 100644 --- a/wrapper/Mol/ResWithAtoms.pypp.cpp +++ b/wrapper/Mol/ResWithAtoms.pypp.cpp @@ -22,6 +22,8 @@ SireMol::ResWithAtoms __copy__(const SireMol::ResWithAtoms &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResWithAtoms_class(){ { //::SireMol::ResWithAtoms @@ -38,7 +40,7 @@ void register_ResWithAtoms_class(){ ResWithAtoms_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the atom ID" ); } @@ -50,6 +52,7 @@ void register_ResWithAtoms_class(){ ResWithAtoms_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this identifier" ); } @@ -61,6 +64,7 @@ void register_ResWithAtoms_class(){ ResWithAtoms_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Is this selection null?" ); } @@ -73,6 +77,7 @@ void register_ResWithAtoms_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the list of indicies of residues that match this ID\nThrow: SireMol::missing_atom\nThrow: SireMol::missing_residue\nThrow: SireError::invalid_index\n" ); } @@ -100,6 +105,7 @@ void register_ResWithAtoms_class(){ ResWithAtoms_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representatio of this ID" ); } @@ -111,6 +117,7 @@ void register_ResWithAtoms_class(){ ResWithAtoms_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_ResWithAtoms_class(){ ResWithAtoms_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Residue.pypp.cpp b/wrapper/Mol/Residue.pypp.cpp index d8d791d31..691c37d54 100644 --- a/wrapper/Mol/Residue.pypp.cpp +++ b/wrapper/Mol/Residue.pypp.cpp @@ -75,6 +75,8 @@ SireMol::Residue __copy__(const SireMol::Residue &other){ return SireMol::Residu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Residue_class(){ @@ -94,6 +96,7 @@ void register_Residue_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this residue contains some residue metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -106,6 +109,7 @@ void register_Residue_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this residue contains some residue metadata\nat metakey metakey for the property at key key\nThrow: SireBase::missing_property\n" ); } @@ -118,6 +122,7 @@ void register_Residue_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this residue contains a residue property at key key\nThrow: SireBase::missing_property\n" ); } @@ -142,6 +147,7 @@ void register_Residue_class(){ "contains" , contains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not this residue contains the atom\nat index atomidx" ); } @@ -154,6 +160,7 @@ void register_Residue_class(){ "contains" , contains_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this residue contains all of\nthe atoms identified by the ID atomid" ); } @@ -165,6 +172,7 @@ void register_Residue_class(){ Residue_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an editor that can be used to edit any of the\natoms of this residue" ); } @@ -176,6 +184,7 @@ void register_Residue_class(){ Residue_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an Evaluator that evaluates values using all of\nthe atoms in the residue" ); } @@ -188,6 +197,7 @@ void register_Residue_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not there is a ResProperty at metakey metakey" ); } @@ -200,6 +210,7 @@ void register_Residue_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether the metadata at metakey metakey for the property\nat key key is a ResProperty\nThrow: SireBase::missing_property\n" ); } @@ -212,6 +223,7 @@ void register_Residue_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not there is a ResProperty at key key" ); } @@ -223,6 +235,7 @@ void register_Residue_class(){ Residue_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this residue in the molecule" ); } @@ -235,6 +248,7 @@ void register_Residue_class(){ "intersects" , intersects_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this residue contains some of\nthe atoms identified by the ID atomid" ); } @@ -246,6 +260,7 @@ void register_Residue_class(){ Residue_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Is this residue empty?" ); } @@ -257,6 +272,7 @@ void register_Residue_class(){ Residue_exposer.def( "isWithinChain" , isWithinChain_function_value + , bp::release_gil_policy() , "Return whether or not this residue is part of a chain" ); } @@ -268,6 +284,7 @@ void register_Residue_class(){ Residue_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the metakeys of all ResProperty metadata" ); } @@ -280,6 +297,7 @@ void register_Residue_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the metakeys of all ResProperty metadata for\nthe property at key key\nThrow: SireBase::missing_property\n" ); } @@ -291,6 +309,7 @@ void register_Residue_class(){ Residue_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return a Mover that moves all of the atoms in this residue" ); } @@ -302,6 +321,7 @@ void register_Residue_class(){ Residue_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this residue" ); } @@ -313,6 +333,7 @@ void register_Residue_class(){ Residue_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of this residue" ); } @@ -324,6 +345,7 @@ void register_Residue_class(){ Residue_exposer.def( "number" , number_function_value + , bp::release_gil_policy() , "Return the number of this residue" ); } @@ -342,6 +364,32 @@ void register_Residue_class(){ } Residue_exposer.def( bp::self == bp::self ); + { //::SireMol::Residue::propertyAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::Residue::*propertyAsProperty_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsProperty_function_type propertyAsProperty_function_value( &::SireMol::Residue::propertyAsProperty ); + + Residue_exposer.def( + "propertyAsProperty" + , propertyAsProperty_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a PropertyPtr" ); + + } + { //::SireMol::Residue::propertyAsVariant + + typedef ::QVariant ( ::SireMol::Residue::*propertyAsVariant_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsVariant_function_type propertyAsVariant_function_value( &::SireMol::Residue::propertyAsVariant ); + + Residue_exposer.def( + "propertyAsVariant" + , propertyAsVariant_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a QVariant" ); + + } { //::SireMol::Residue::propertyKeys typedef ::QStringList ( ::SireMol::Residue::*propertyKeys_function_type)( ) const; @@ -350,6 +398,7 @@ void register_Residue_class(){ Residue_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys of all ResProperty properties" ); } @@ -361,6 +410,7 @@ void register_Residue_class(){ Residue_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Is this residue the entire molecule?" ); } @@ -372,6 +422,7 @@ void register_Residue_class(){ Residue_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the identities of the atoms that are selected as\npart of this residue" ); } @@ -383,8 +434,21 @@ void register_Residue_class(){ Residue_exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "Return a selector that can change the selection of residues" ); + } + { //::SireMol::Residue::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Residue::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Residue::toSelector ); + + Residue_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Residue::toString @@ -394,6 +458,7 @@ void register_Residue_class(){ Residue_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this residue" ); } @@ -405,6 +470,7 @@ void register_Residue_class(){ Residue_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -417,6 +483,7 @@ void register_Residue_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this residue with the passed molecule data.\nThrow: SireError::incompatible_error\n" ); } diff --git a/wrapper/Mol/ResidueBeading.pypp.cpp b/wrapper/Mol/ResidueBeading.pypp.cpp index fb51fa67c..25a9a6c1c 100644 --- a/wrapper/Mol/ResidueBeading.pypp.cpp +++ b/wrapper/Mol/ResidueBeading.pypp.cpp @@ -39,6 +39,8 @@ SireMol::ResidueBeading __copy__(const SireMol::ResidueBeading &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResidueBeading_class(){ { //::SireMol::ResidueBeading @@ -69,6 +71,7 @@ void register_ResidueBeading_class(){ ResidueBeading_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/ResidueCutting.pypp.cpp b/wrapper/Mol/ResidueCutting.pypp.cpp index 32a4579ce..7b4aebaca 100644 --- a/wrapper/Mol/ResidueCutting.pypp.cpp +++ b/wrapper/Mol/ResidueCutting.pypp.cpp @@ -41,6 +41,8 @@ SireMol::ResidueCutting __copy__(const SireMol::ResidueCutting &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ResidueCutting_class(){ { //::SireMol::ResidueCutting @@ -83,6 +85,7 @@ void register_ResidueCutting_class(){ ResidueCutting_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegAtomID.pypp.cpp b/wrapper/Mol/SegAtomID.pypp.cpp index 5eebf23ec..6a3e10872 100644 --- a/wrapper/Mol/SegAtomID.pypp.cpp +++ b/wrapper/Mol/SegAtomID.pypp.cpp @@ -31,6 +31,8 @@ SireMol::GroupAtomID __copy__(const SireMol::Gr #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegAtomID_class(){ { //::SireMol::GroupAtomID< SireMol::SegID, SireMol::AtomID > @@ -48,6 +50,7 @@ void register_SegAtomID_class(){ SegAtomID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +63,7 @@ void register_SegAtomID_class(){ SegAtomID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -73,6 +77,7 @@ void register_SegAtomID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -88,6 +93,7 @@ void register_SegAtomID_class(){ SegAtomID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +106,7 @@ void register_SegAtomID_class(){ SegAtomID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -112,6 +119,7 @@ void register_SegAtomID_class(){ SegAtomID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegCGID.pypp.cpp b/wrapper/Mol/SegCGID.pypp.cpp index 3fb6cbf04..79748de6c 100644 --- a/wrapper/Mol/SegCGID.pypp.cpp +++ b/wrapper/Mol/SegCGID.pypp.cpp @@ -19,6 +19,8 @@ SireMol::GroupGroupID __copy__(const SireMol::Gro #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegCGID_class(){ { //::SireMol::GroupGroupID< SireMol::SegID, SireMol::CGID > @@ -36,6 +38,7 @@ void register_SegCGID_class(){ SegCGID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_SegCGID_class(){ SegCGID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_SegCGID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -76,6 +81,7 @@ void register_SegCGID_class(){ SegCGID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +94,7 @@ void register_SegCGID_class(){ SegCGID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +107,7 @@ void register_SegCGID_class(){ SegCGID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegChainID.pypp.cpp b/wrapper/Mol/SegChainID.pypp.cpp index 86b8e38c5..7db6d8460 100644 --- a/wrapper/Mol/SegChainID.pypp.cpp +++ b/wrapper/Mol/SegChainID.pypp.cpp @@ -19,6 +19,8 @@ SireMol::GroupGroupID __copy__(const SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegChainID_class(){ { //::SireMol::GroupGroupID< SireMol::SegID, SireMol::ChainID > @@ -36,6 +38,7 @@ void register_SegChainID_class(){ SegChainID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_SegChainID_class(){ SegChainID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_SegChainID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -76,6 +81,7 @@ void register_SegChainID_class(){ SegChainID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +94,7 @@ void register_SegChainID_class(){ SegChainID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +107,7 @@ void register_SegChainID_class(){ SegChainID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegEditor.pypp.cpp b/wrapper/Mol/SegEditor.pypp.cpp index d6b646075..0b3577929 100644 --- a/wrapper/Mol/SegEditor.pypp.cpp +++ b/wrapper/Mol/SegEditor.pypp.cpp @@ -45,6 +45,8 @@ SireMol::SegEditor __copy__(const SireMol::SegEditor &other){ return SireMol::Se #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SegEditor_class(){ @@ -64,6 +66,7 @@ void register_SegEditor_class(){ "add" , add_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "Add an atom called atomname to this Segment and return\nan editor for that atom" ); } @@ -76,6 +79,7 @@ void register_SegEditor_class(){ "add" , add_function_value , ( bp::arg("atomnum") ) + , bp::release_gil_policy() , "Add an atom with number atomnum to this Segment and return\nan editor for that atom" ); } @@ -87,6 +91,7 @@ void register_SegEditor_class(){ SegEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the\nupdated Segment" ); } @@ -125,6 +130,7 @@ void register_SegEditor_class(){ "reindex" , reindex_function_value , ( bp::arg("index") ) + , bp::release_gil_policy() , "Move this Segment to index newidx - this will move it\nto the start or end if this index is out of range" ); } @@ -136,6 +142,7 @@ void register_SegEditor_class(){ SegEditor_exposer.def( "remove" , remove_function_value + , bp::release_gil_policy() , "Complete remove this Segment, and return an editor\nfor the molecule that contained it" ); } @@ -148,6 +155,7 @@ void register_SegEditor_class(){ "remove" , remove_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Completely remove all atoms that match the ID atomid from\nthis Segment\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -160,6 +168,7 @@ void register_SegEditor_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the ith atom from this Segment\nThrow: SireError::invalid_index\n" ); } @@ -184,6 +193,7 @@ void register_SegEditor_class(){ SegEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -196,6 +206,7 @@ void register_SegEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("atomid"), bp::arg("segid") ) + , bp::release_gil_policy() , "Transfer all atoms that match the ID atomid in this Segment\nto the Segment that matches the ID cgid\nThrow: SireMol::missing_atom\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -208,6 +219,7 @@ void register_SegEditor_class(){ "transfer" , transfer_function_value , ( bp::arg("i"), bp::arg("segid") ) + , bp::release_gil_policy() , "Transfer the ith atom of this Segment into the Segment identified\nby the ID cgid\nThrow: SireError::invalid_index\n" ); } @@ -220,6 +232,7 @@ void register_SegEditor_class(){ "transferAll" , transferAll_function_value , ( bp::arg("segid") ) + , bp::release_gil_policy() , "Completely transfer all of the atoms in this Segment to\nthe Segment that matches the ID cgid\nThrow: SireMol::missing_segment\nThrow: SireMol::duplicate_segment\nThrow: SireError::invalid_index\n" ); } @@ -231,6 +244,7 @@ void register_SegEditor_class(){ SegEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegEditorBase.pypp.cpp b/wrapper/Mol/SegEditorBase.pypp.cpp index bf5976db3..e17d34d2f 100644 --- a/wrapper/Mol/SegEditorBase.pypp.cpp +++ b/wrapper/Mol/SegEditorBase.pypp.cpp @@ -83,6 +83,8 @@ SireMol::SegEditorBase& set_Metadata_SireMol_SegVariantProperty_function2( #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SegEditorBase_class(){ @@ -100,6 +102,33 @@ void register_SegEditorBase_class(){ SegEditorBase_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::atom + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*atom_function_type)( int,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::atom ); + + SegEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::atom + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::AtomEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*atom_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + atom_function_type atom_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::atom ); + + SegEditorBase_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -125,6 +154,33 @@ void register_SegEditorBase_class(){ SegEditorBase_exposer.def( "chain" , chain_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::chain + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*chain_function_type)( int,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::chain ); + + SegEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::chain + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::ChainEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*chain_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + chain_function_type chain_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::chain ); + + SegEditorBase_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -150,6 +206,33 @@ void register_SegEditorBase_class(){ SegEditorBase_exposer.def( "cutGroup" , cutGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::cutGroup + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*cutGroup_function_type)( int,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::cutGroup ); + + SegEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::cutGroup + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::CGEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*cutGroup_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + cutGroup_function_type cutGroup_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::cutGroup ); + + SegEditorBase_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -175,6 +258,7 @@ void register_SegEditorBase_class(){ SegEditorBase_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "" ); } @@ -205,6 +289,110 @@ void register_SegEditorBase_class(){ , bp::return_self< >() , "" ); + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( int ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( ::QString const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( ::SireMol::AtomID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( ::SireMol::ResID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( ::SireMol::CGID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( ::SireMol::ChainID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( ::SireMol::SegID const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("segid") ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*__getitem___function_type)( ::SireID::Index const & ) ; + __getitem___function_type __getitem___function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::operator[] ); + + SegEditorBase_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::removeMetadata @@ -257,6 +445,33 @@ void register_SegEditorBase_class(){ SegEditorBase_exposer.def( "residue" , residue_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::residue + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*residue_function_type)( int,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::residue ); + + SegEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::residue + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::ResEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*residue_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + residue_function_type residue_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::residue ); + + SegEditorBase_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } @@ -282,6 +497,33 @@ void register_SegEditorBase_class(){ SegEditorBase_exposer.def( "segment" , segment_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::segment + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*segment_function_type)( int,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::segment ); + + SegEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i"), bp::arg("map")=SireBase::PropertyMap() ) + , "" ); + + } + { //::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::segment + + typedef SireMol::Editor< SireMol::SegEditor, SireMol::Segment > exported_class_t; + typedef ::SireMol::SegEditor ( ::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::*segment_function_type)( ::QString const &,::SireBase::PropertyMap const & ) ; + segment_function_type segment_function_value( &::SireMol::Editor< SireMol::SegEditor, SireMol::Segment >::segment ); + + SegEditorBase_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name"), bp::arg("map")=SireBase::PropertyMap() ) , "" ); } diff --git a/wrapper/Mol/SegFloatProperty.pypp.cpp b/wrapper/Mol/SegFloatProperty.pypp.cpp index a57441af3..40df19a1e 100644 --- a/wrapper/Mol/SegFloatProperty.pypp.cpp +++ b/wrapper/Mol/SegFloatProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::SegProperty __copy__(const SireMol::SegProperty &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SegFloatProperty_class(){ @@ -55,6 +57,7 @@ void register_SegFloatProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_SegFloatProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_SegFloatProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_SegFloatProperty_class(){ SegFloatProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_SegFloatProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_SegFloatProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::SegProperty< double >::getAsProperty + + typedef SireMol::SegProperty< double > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::SegProperty< double >::*getAsProperty_function_type)( ::SireMol::SegIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::SegProperty< double >::getAsProperty ); + + SegFloatProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SegProperty< double >::getAsVariant + + typedef SireMol::SegProperty< double > exported_class_t; + typedef ::QVariant ( ::SireMol::SegProperty< double >::*getAsVariant_function_type)( ::SireMol::SegIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::SegProperty< double >::getAsVariant ); + + SegFloatProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::SegProperty< double >::isCompatibleWith @@ -147,6 +182,7 @@ void register_SegFloatProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_SegFloatProperty_class(){ SegFloatProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_SegFloatProperty_class(){ SegFloatProperty_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_SegFloatProperty_class(){ SegFloatProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_SegFloatProperty_class(){ SegFloatProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_SegFloatProperty_class(){ SegFloatProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_SegFloatProperty_class(){ SegFloatProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegID.pypp.cpp b/wrapper/Mol/SegID.pypp.cpp index ed86225b9..af6636f7b 100644 --- a/wrapper/Mol/SegID.pypp.cpp +++ b/wrapper/Mol/SegID.pypp.cpp @@ -51,6 +51,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegID_class(){ { //::SireMol::SegID @@ -65,6 +67,7 @@ void register_SegID_class(){ SegID_exposer.def( "any" , any_function_value + , bp::release_gil_policy() , "Return a match for anything" ); } @@ -77,6 +80,7 @@ void register_SegID_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return a specific atom in the matching residues" ); } @@ -88,6 +92,7 @@ void register_SegID_class(){ SegID_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return the atoms in the matching residues" ); } @@ -100,8 +105,22 @@ void register_SegID_class(){ "atoms" , atoms_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Return a range of atoms in the matching residues" ); + } + { //::SireMol::SegID::fromString + + typedef ::SireMol::SegIdentifier ( *fromString_function_type )( ::QString const & ); + fromString_function_type fromString_function_value( &::SireMol::SegID::fromString ); + + SegID_exposer.def( + "fromString" + , fromString_function_value + , ( bp::arg("id") ) + , bp::release_gil_policy() + , "Return an AtomID constructed from the passed string" ); + } { //::SireMol::SegID::inverse @@ -111,6 +130,7 @@ void register_SegID_class(){ SegID_exposer.def( "inverse" , inverse_function_value + , bp::release_gil_policy() , "Return the inverse of this match" ); } @@ -122,6 +142,7 @@ void register_SegID_class(){ SegID_exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "Return the inverse of this match" ); } @@ -134,6 +155,7 @@ void register_SegID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID back to the indicies of the segments in the molecule,\nusing the passed MoleculeInfo to do the mapping" ); } @@ -346,10 +368,12 @@ void register_SegID_class(){ SegID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } SegID_exposer.staticmethod( "any" ); + SegID_exposer.staticmethod( "fromString" ); SegID_exposer.staticmethod( "typeName" ); SegID_exposer.def( "__str__", &__str__< ::SireMol::SegID > ); SegID_exposer.def( "__repr__", &__str__< ::SireMol::SegID > ); diff --git a/wrapper/Mol/SegIdx.pypp.cpp b/wrapper/Mol/SegIdx.pypp.cpp index 74d204a4f..83b7485d2 100644 --- a/wrapper/Mol/SegIdx.pypp.cpp +++ b/wrapper/Mol/SegIdx.pypp.cpp @@ -59,6 +59,8 @@ SireMol::SegIdx __copy__(const SireMol::SegIdx &other){ return SireMol::SegIdx(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegIdx_class(){ { //::SireMol::SegIdx @@ -75,6 +77,7 @@ void register_SegIdx_class(){ SegIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -86,6 +89,7 @@ void register_SegIdx_class(){ SegIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +102,7 @@ void register_SegIdx_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -109,6 +114,7 @@ void register_SegIdx_class(){ SegIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -133,6 +139,7 @@ void register_SegIdx_class(){ SegIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -144,6 +151,7 @@ void register_SegIdx_class(){ SegIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +163,7 @@ void register_SegIdx_class(){ SegIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegIntProperty.pypp.cpp b/wrapper/Mol/SegIntProperty.pypp.cpp index 7b88faf2c..92f337eb1 100644 --- a/wrapper/Mol/SegIntProperty.pypp.cpp +++ b/wrapper/Mol/SegIntProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::SegProperty __copy__(const SireMol::SegProperty & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SegIntProperty_class(){ @@ -55,6 +57,7 @@ void register_SegIntProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_SegIntProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_SegIntProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_SegIntProperty_class(){ SegIntProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_SegIntProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_SegIntProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::SegProperty< long long >::getAsProperty + + typedef SireMol::SegProperty< long long > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::SegProperty< long long >::*getAsProperty_function_type)( ::SireMol::SegIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::SegProperty< long long >::getAsProperty ); + + SegIntProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SegProperty< long long >::getAsVariant + + typedef SireMol::SegProperty< long long > exported_class_t; + typedef ::QVariant ( ::SireMol::SegProperty< long long >::*getAsVariant_function_type)( ::SireMol::SegIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::SegProperty< long long >::getAsVariant ); + + SegIntProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::SegProperty< long long >::isCompatibleWith @@ -147,6 +182,7 @@ void register_SegIntProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_SegIntProperty_class(){ SegIntProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_SegIntProperty_class(){ SegIntProperty_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_SegIntProperty_class(){ SegIntProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_SegIntProperty_class(){ SegIntProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_SegIntProperty_class(){ SegIntProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_SegIntProperty_class(){ SegIntProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegName.pypp.cpp b/wrapper/Mol/SegName.pypp.cpp index 43d21b2d3..fec84f6f5 100644 --- a/wrapper/Mol/SegName.pypp.cpp +++ b/wrapper/Mol/SegName.pypp.cpp @@ -59,6 +59,8 @@ SireMol::SegName __copy__(const SireMol::SegName &other){ return SireMol::SegNam #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegName_class(){ { //::SireMol::SegName @@ -76,6 +78,7 @@ void register_SegName_class(){ SegName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_SegName_class(){ SegName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +103,7 @@ void register_SegName_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +131,7 @@ void register_SegName_class(){ SegName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -137,6 +143,7 @@ void register_SegName_class(){ SegName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -148,6 +155,7 @@ void register_SegName_class(){ SegName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegProp.pypp.cpp b/wrapper/Mol/SegProp.pypp.cpp index 98da2bd1d..119cf648b 100644 --- a/wrapper/Mol/SegProp.pypp.cpp +++ b/wrapper/Mol/SegProp.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegProp_class(){ { //::SireMol::SegProp @@ -30,6 +32,7 @@ void register_SegProp_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -42,6 +45,7 @@ void register_SegProp_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -54,6 +58,33 @@ void register_SegProp_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SegProp::getAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::SegProp::*getAsProperty_function_type)( ::SireMol::SegIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::SegProp::getAsProperty ); + + SegProp_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("segidx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SegProp::getAsVariant + + typedef ::QVariant ( ::SireMol::SegProp::*getAsVariant_function_type)( ::SireMol::SegIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::SegProp::getAsVariant ); + + SegProp_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("segidx") ) + , bp::release_gil_policy() , "" ); } @@ -65,6 +96,7 @@ void register_SegProp_class(){ SegProp_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegResID.pypp.cpp b/wrapper/Mol/SegResID.pypp.cpp index d1090f4b5..ad0c2911e 100644 --- a/wrapper/Mol/SegResID.pypp.cpp +++ b/wrapper/Mol/SegResID.pypp.cpp @@ -19,6 +19,8 @@ SireMol::GroupGroupID __copy__(const SireMol::Gr #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegResID_class(){ { //::SireMol::GroupGroupID< SireMol::SegID, SireMol::ResID > @@ -36,6 +38,7 @@ void register_SegResID_class(){ SegResID_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_SegResID_class(){ SegResID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -61,6 +65,7 @@ void register_SegResID_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -76,6 +81,7 @@ void register_SegResID_class(){ SegResID_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +94,7 @@ void register_SegResID_class(){ SegResID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +107,7 @@ void register_SegResID_class(){ SegResID_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegStringProperty.pypp.cpp b/wrapper/Mol/SegStringProperty.pypp.cpp index 418243678..df96d6503 100644 --- a/wrapper/Mol/SegStringProperty.pypp.cpp +++ b/wrapper/Mol/SegStringProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::SegProperty __copy__(const SireMol::SegProperty &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SegStringProperty_class(){ @@ -55,6 +57,7 @@ void register_SegStringProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_SegStringProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_SegStringProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_SegStringProperty_class(){ SegStringProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_SegStringProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_SegStringProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::SegProperty< QString >::getAsProperty + + typedef SireMol::SegProperty< QString > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::SegProperty< QString >::*getAsProperty_function_type)( ::SireMol::SegIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::SegProperty< QString >::getAsProperty ); + + SegStringProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SegProperty< QString >::getAsVariant + + typedef SireMol::SegProperty< QString > exported_class_t; + typedef ::QVariant ( ::SireMol::SegProperty< QString >::*getAsVariant_function_type)( ::SireMol::SegIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::SegProperty< QString >::getAsVariant ); + + SegStringProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::SegProperty< QString >::isCompatibleWith @@ -147,6 +182,7 @@ void register_SegStringProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_SegStringProperty_class(){ SegStringProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_SegStringProperty_class(){ SegStringProperty_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_SegStringProperty_class(){ SegStringProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_SegStringProperty_class(){ SegStringProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_SegStringProperty_class(){ SegStringProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_SegStringProperty_class(){ SegStringProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegStructureEditor.pypp.cpp b/wrapper/Mol/SegStructureEditor.pypp.cpp index 35c0cef03..150854ceb 100644 --- a/wrapper/Mol/SegStructureEditor.pypp.cpp +++ b/wrapper/Mol/SegStructureEditor.pypp.cpp @@ -46,6 +46,8 @@ SireMol::SegStructureEditor __copy__(const SireMol::SegStructureEditor &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegStructureEditor_class(){ { //::SireMol::SegStructureEditor @@ -64,6 +66,7 @@ void register_SegStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atomname") ) + , bp::release_gil_policy() , "Add an atom called atomname to this Segment and return\nan editor for that atom" ); } @@ -76,6 +79,7 @@ void register_SegStructureEditor_class(){ "add" , add_function_value , ( bp::arg("atomnum") ) + , bp::release_gil_policy() , "Add an atom with number atomnum to this Segment and return\nan editor for that atom" ); } @@ -88,6 +92,7 @@ void register_SegStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith atom of this Segment\nThrow: SireError::invalid_index\n" ); } @@ -100,6 +105,7 @@ void register_SegStructureEditor_class(){ "atom" , atom_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom that matches the ID atomid in\nthis Segment\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -111,6 +117,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit the changes made by this editor and return the\nupdated Segment" ); } @@ -122,6 +129,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this Segment in the molecule" ); } @@ -133,6 +141,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "molecule" , molecule_function_value + , bp::release_gil_policy() , "Return an editor for the molecule that contains this Segment" ); } @@ -144,6 +153,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this Segment (could be zero)" ); } @@ -155,7 +165,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this Segment" ); } @@ -258,6 +268,7 @@ void register_SegStructureEditor_class(){ "select" , select_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return an editor for the ith atom of this Segment\nThrow: SireError::invalid_index\n" ); } @@ -270,6 +281,7 @@ void register_SegStructureEditor_class(){ "select" , select_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return an editor for the atom that matches the ID atomid in\nthis Segment\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -281,6 +293,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this segment is the whole molecule" ); } @@ -292,6 +305,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this editor" ); } @@ -342,6 +356,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -353,6 +368,7 @@ void register_SegStructureEditor_class(){ SegStructureEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SegVariantProperty.pypp.cpp b/wrapper/Mol/SegVariantProperty.pypp.cpp index aae346274..6f571007d 100644 --- a/wrapper/Mol/SegVariantProperty.pypp.cpp +++ b/wrapper/Mol/SegVariantProperty.pypp.cpp @@ -21,6 +21,8 @@ SireMol::SegProperty __copy__(const SireMol::SegProperty &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SegVariantProperty_class(){ @@ -55,6 +57,7 @@ void register_SegVariantProperty_class(){ "assertCanConvert" , assertCanConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -68,6 +71,7 @@ void register_SegVariantProperty_class(){ "assignFrom" , assignFrom_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_SegVariantProperty_class(){ "canConvert" , canConvert_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -107,6 +112,7 @@ void register_SegVariantProperty_class(){ SegVariantProperty_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +126,7 @@ void register_SegVariantProperty_class(){ "fromVariant" , fromVariant_function_value , ( bp::arg("values") ) + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,34 @@ void register_SegVariantProperty_class(){ , bp::return_value_policy< bp::copy_const_reference >() , "" ); + } + { //::SireMol::SegProperty< QVariant >::getAsProperty + + typedef SireMol::SegProperty< QVariant > exported_class_t; + typedef ::SireBase::PropertyPtr ( ::SireMol::SegProperty< QVariant >::*getAsProperty_function_type)( ::SireMol::SegIdx const & ) const; + getAsProperty_function_type getAsProperty_function_value( &::SireMol::SegProperty< QVariant >::getAsProperty ); + + SegVariantProperty_exposer.def( + "getAsProperty" + , getAsProperty_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SegProperty< QVariant >::getAsVariant + + typedef SireMol::SegProperty< QVariant > exported_class_t; + typedef ::QVariant ( ::SireMol::SegProperty< QVariant >::*getAsVariant_function_type)( ::SireMol::SegIdx const & ) const; + getAsVariant_function_type getAsVariant_function_value( &::SireMol::SegProperty< QVariant >::getAsVariant ); + + SegVariantProperty_exposer.def( + "getAsVariant" + , getAsVariant_function_value + , ( bp::arg("idx") ) + , bp::release_gil_policy() + , "" ); + } { //::SireMol::SegProperty< QVariant >::isCompatibleWith @@ -147,6 +182,7 @@ void register_SegVariantProperty_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "" ); } @@ -159,6 +195,7 @@ void register_SegVariantProperty_class(){ SegVariantProperty_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +208,7 @@ void register_SegVariantProperty_class(){ SegVariantProperty_exposer.def( "nSegments" , nSegments_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +265,7 @@ void register_SegVariantProperty_class(){ SegVariantProperty_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +278,7 @@ void register_SegVariantProperty_class(){ SegVariantProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -251,6 +291,7 @@ void register_SegVariantProperty_class(){ SegVariantProperty_exposer.def( "toVariant" , toVariant_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +304,7 @@ void register_SegVariantProperty_class(){ SegVariantProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Segment.pypp.cpp b/wrapper/Mol/Segment.pypp.cpp index 1c52923fb..282d34d93 100644 --- a/wrapper/Mol/Segment.pypp.cpp +++ b/wrapper/Mol/Segment.pypp.cpp @@ -70,6 +70,8 @@ SireMol::Segment __copy__(const SireMol::Segment &other){ return SireMol::Segmen #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Segment_class(){ @@ -89,6 +91,7 @@ void register_Segment_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that this segment has an SegProperty piece of metadata\nat metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -101,6 +104,7 @@ void register_Segment_class(){ "assertContainsMetadata" , assertContainsMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Assert that the property at key key has an SegProperty\npiece of metadata at metakey metakey\nThrow: SireBase::missing_property\n" ); } @@ -113,6 +117,7 @@ void register_Segment_class(){ "assertContainsProperty" , assertContainsProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Assert that this segment has an SegProperty at key key\nThrow: SireBase::missing_property\n" ); } @@ -137,6 +142,7 @@ void register_Segment_class(){ "contains" , contains_function_value , ( bp::arg("atomidx") ) + , bp::release_gil_policy() , "Return whether or not this segment contains the atom\nat index atomidx" ); } @@ -149,6 +155,7 @@ void register_Segment_class(){ "contains" , contains_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this segment contains all of\nthe atoms identified by the ID atomid" ); } @@ -160,6 +167,7 @@ void register_Segment_class(){ Segment_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an editor that can edit this Segment" ); } @@ -171,6 +179,7 @@ void register_Segment_class(){ Segment_exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "Return an evaluator that can evaluate properties\nof this Segment" ); } @@ -183,6 +192,7 @@ void register_Segment_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether or not there is a SegProperty at metakey metakey" ); } @@ -195,6 +205,7 @@ void register_Segment_class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "Return whether the metadata at metakey metakey for the property\nat key key is a SegProperty\nThrow: SireBase::missing_property\n" ); } @@ -207,6 +218,7 @@ void register_Segment_class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return whether or not there is a SegProperty at key key" ); } @@ -218,6 +230,7 @@ void register_Segment_class(){ Segment_exposer.def( "index" , index_function_value + , bp::release_gil_policy() , "Return the index of this Segment in the molecule" ); } @@ -230,6 +243,7 @@ void register_Segment_class(){ "intersects" , intersects_function_value , ( bp::arg("atomid") ) + , bp::release_gil_policy() , "Return whether or not this segment contains some of\nthe atoms identified by the ID atomid" ); } @@ -241,6 +255,7 @@ void register_Segment_class(){ Segment_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this segment is empty" ); } @@ -252,6 +267,7 @@ void register_Segment_class(){ Segment_exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "Return the metakeys of all SegProperty metadata" ); } @@ -264,6 +280,7 @@ void register_Segment_class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "Return the metakeys of all SegProperty metadata for\nthe property at key key\nThrow: SireBase::missing_property\n" ); } @@ -275,6 +292,7 @@ void register_Segment_class(){ Segment_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return an object that can move a copy of this Segment" ); } @@ -286,6 +304,7 @@ void register_Segment_class(){ Segment_exposer.def( "nAtoms" , nAtoms_function_value + , bp::release_gil_policy() , "Return the number of atoms in this Segment" ); } @@ -297,9 +316,21 @@ void register_Segment_class(){ Segment_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of this Segment" ); + } + { //::SireMol::Segment::number + + typedef ::SireMol::SegIdx ( ::SireMol::Segment::*number_function_type)( ) const; + number_function_type number_function_value( &::SireMol::Segment::number ); + + Segment_exposer.def( + "number" + , number_function_value + , bp::release_gil_policy() + , "Return the number of this segment (same as its index)" ); + } Segment_exposer.def( bp::self != bp::self ); { //::SireMol::Segment::operator= @@ -316,6 +347,32 @@ void register_Segment_class(){ } Segment_exposer.def( bp::self == bp::self ); + { //::SireMol::Segment::propertyAsProperty + + typedef ::SireBase::PropertyPtr ( ::SireMol::Segment::*propertyAsProperty_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsProperty_function_type propertyAsProperty_function_value( &::SireMol::Segment::propertyAsProperty ); + + Segment_exposer.def( + "propertyAsProperty" + , propertyAsProperty_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a PropertyPtr" ); + + } + { //::SireMol::Segment::propertyAsVariant + + typedef ::QVariant ( ::SireMol::Segment::*propertyAsVariant_function_type)( ::SireBase::PropertyName const & ) const; + propertyAsVariant_function_type propertyAsVariant_function_value( &::SireMol::Segment::propertyAsVariant ); + + Segment_exposer.def( + "propertyAsVariant" + , propertyAsVariant_function_value + , ( bp::arg("key") ) + , bp::release_gil_policy() + , "Return the specified property as a QVariant" ); + + } { //::SireMol::Segment::propertyKeys typedef ::QStringList ( ::SireMol::Segment::*propertyKeys_function_type)( ) const; @@ -324,6 +381,7 @@ void register_Segment_class(){ Segment_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the keys of all SegProperty properties" ); } @@ -335,6 +393,7 @@ void register_Segment_class(){ Segment_exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "Return whether or not this segment contains the entire molecule" ); } @@ -346,6 +405,7 @@ void register_Segment_class(){ Segment_exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "Return the atoms that are in this Segment" ); } @@ -357,8 +417,21 @@ void register_Segment_class(){ Segment_exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "Return a selector that can be used to change the selection\nof segments from the molecule" ); + } + { //::SireMol::Segment::toSelector + + typedef ::SireMol::MolViewPtr ( ::SireMol::Segment::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Segment::toSelector ); + + Segment_exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() + , "" ); + } { //::SireMol::Segment::toString @@ -368,6 +441,7 @@ void register_Segment_class(){ Segment_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this segment" ); } @@ -379,6 +453,7 @@ void register_Segment_class(){ Segment_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -391,6 +466,7 @@ void register_Segment_class(){ "update" , update_function_value , ( bp::arg("moldata") ) + , bp::release_gil_policy() , "Update this segment with the passed molecule data.\nThrow: SireError::incompatible_error\n" ); } diff --git a/wrapper/Mol/SegsWithAtoms.pypp.cpp b/wrapper/Mol/SegsWithAtoms.pypp.cpp index 20abad61b..bc0ebe81b 100644 --- a/wrapper/Mol/SegsWithAtoms.pypp.cpp +++ b/wrapper/Mol/SegsWithAtoms.pypp.cpp @@ -22,6 +22,8 @@ SireMol::SegsWithAtoms __copy__(const SireMol::SegsWithAtoms &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SegsWithAtoms_class(){ { //::SireMol::SegsWithAtoms @@ -38,7 +40,7 @@ void register_SegsWithAtoms_class(){ SegsWithAtoms_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the atom ID" ); } @@ -50,6 +52,7 @@ void register_SegsWithAtoms_class(){ SegsWithAtoms_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this identifier" ); } @@ -61,6 +64,7 @@ void register_SegsWithAtoms_class(){ SegsWithAtoms_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Is this selection null?" ); } @@ -73,6 +77,7 @@ void register_SegsWithAtoms_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the list of indicies of segments that match this ID\nThrow: SireMol::missing_segment\nThrow: SireError::invalid_index\n" ); } @@ -100,6 +105,7 @@ void register_SegsWithAtoms_class(){ SegsWithAtoms_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representatio of this ID" ); } @@ -111,6 +117,7 @@ void register_SegsWithAtoms_class(){ SegsWithAtoms_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -122,6 +129,7 @@ void register_SegsWithAtoms_class(){ SegsWithAtoms_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Select.pypp.cpp b/wrapper/Mol/Select.pypp.cpp index 19ff4e679..c9ff5e5ef 100644 --- a/wrapper/Mol/Select.pypp.cpp +++ b/wrapper/Mol/Select.pypp.cpp @@ -7,6 +7,8 @@ namespace bp = boost::python; +#include "SireMol/core.h" + #include "SireMol/moleculegroup.h" #include "SireMol/molecules.h" @@ -29,6 +31,8 @@ SireMol::Select __copy__(const SireMol::Select &other){ return SireMol::Select(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Select_class(){ { //::SireMol::Select @@ -45,6 +49,7 @@ void register_Select_class(){ Select_exposer.def( "objectType" , objectType_function_value + , bp::release_gil_policy() , "" ); } @@ -131,6 +136,7 @@ void register_Select_class(){ Select_exposer.def( "resetTokens" , resetTokens_function_value + , bp::release_gil_policy() , "Clear all user-set tokens" ); } @@ -143,6 +149,7 @@ void register_Select_class(){ "setToken" , setToken_function_value , ( bp::arg("token"), bp::arg("selection") ) + , bp::release_gil_policy() , "Set a user token that will be substituted for the passed selection, e.g.\nsetToken(protein, molecules with resname alai)\nwould allow you to use protein to refer to any molecules that contain\nresidues called alai\nNote that the token is set globally for all searches\n" ); } @@ -154,6 +161,7 @@ void register_Select_class(){ Select_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -165,6 +173,7 @@ void register_Select_class(){ Select_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +185,7 @@ void register_Select_class(){ Select_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SelectResult.pypp.cpp b/wrapper/Mol/SelectResult.pypp.cpp index dc6d9563a..dc13bfa87 100644 --- a/wrapper/Mol/SelectResult.pypp.cpp +++ b/wrapper/Mol/SelectResult.pypp.cpp @@ -7,6 +7,8 @@ namespace bp = boost::python; +#include "SireMol/core.h" + #include "SireMol/moleculegroup.h" #include "SireMol/molecules.h" @@ -29,6 +31,8 @@ SireMol::SelectResult __copy__(const SireMol::SelectResult &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SelectResult_class(){ @@ -41,7 +45,14 @@ void register_SelectResult_class(){ SelectResult_exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("molgroup") ), "Construct from the passed molecules") ); SelectResult_exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("molecules") ), "Construct from the passed molecules") ); SelectResult_exposer.def( bp::init< SireMol::MoleculeView const & >(( bp::arg("molview") ), "Construct from the passed molecules") ); - SelectResult_exposer.def( bp::init< QList< SireMol::ViewsOfMol > >(( bp::arg("molviews") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireMol::Molecule > const & >(( bp::arg("views") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireBase::PropPtr< SireMol::MoleculeView > > const & >(( bp::arg("views") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireMol::Selector< SireMol::Atom > > const & >(( bp::arg("views") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireMol::Selector< SireMol::Residue > > const & >(( bp::arg("views") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireMol::Selector< SireMol::Chain > > const & >(( bp::arg("views") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireMol::Selector< SireMol::Segment > > const & >(( bp::arg("views") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireMol::Selector< SireMol::CutGroup > > const & >(( bp::arg("views") ), "Construct from the passed molecules") ); + SelectResult_exposer.def( bp::init< QList< SireMol::ViewsOfMol > const & >(( bp::arg("molviews") ), "Construct from the passed molecules") ); SelectResult_exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("other") ), "Copy constructor") ); { //::SireMol::SelectResult::atoms @@ -51,6 +62,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "atoms" , atoms_function_value + , bp::release_gil_policy() , "Return a copy of this result with all views split into individual atoms" ); } @@ -62,6 +74,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "chains" , chains_function_value + , bp::release_gil_policy() , "Return a copy of this result with all views split into individual chains" ); } @@ -74,8 +87,22 @@ void register_SelectResult_class(){ "contains" , contains_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not this set contains views of the molecule with\nnumber molnum" ); + } + { //::SireMol::SelectResult::contains + + typedef bool ( ::SireMol::SelectResult::*contains_function_type)( ::SireMol::MoleculeView const & ) const; + contains_function_type contains_function_value( &::SireMol::SelectResult::contains ); + + SelectResult_exposer.def( + "contains" + , contains_function_value + , ( bp::arg("mol") ) + , bp::release_gil_policy() + , "Return whether or not this set contains all of the atoms in the\npassed molecule" ); + } { //::SireMol::SelectResult::count @@ -85,6 +112,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of views in this result" ); } @@ -96,8 +124,21 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "cutGroups" , cutGroups_function_value + , bp::release_gil_policy() , "Return a copy of this result with all views split into individual cutgroups" ); + } + { //::SireMol::SelectResult::getCommonType + + typedef ::QString ( ::SireMol::SelectResult::*getCommonType_function_type)( ) const; + getCommonType_function_type getCommonType_function_value( &::SireMol::SelectResult::getCommonType ); + + SelectResult_exposer.def( + "getCommonType" + , getCommonType_function_value + , bp::release_gil_policy() + , "Return the highest common type (e.g. SireMol::Atom, SireMol::Residue etc)\n that suits all of the views in this result\n" ); + } { //::SireMol::SelectResult::isEmpty @@ -107,6 +148,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -118,8 +160,34 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "join" , join_function_value + , bp::release_gil_policy() , "Return a copy of this result with all views joined into single views" ); + } + { //::SireMol::SelectResult::listAt + + typedef ::SireMol::MolViewPtr ( ::SireMol::SelectResult::*listAt_function_type)( int ) const; + listAt_function_type listAt_function_value( &::SireMol::SelectResult::listAt ); + + SelectResult_exposer.def( + "listAt" + , listAt_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "Return the ith MolViewPtr in the underlying list" ); + + } + { //::SireMol::SelectResult::listCount + + typedef int ( ::SireMol::SelectResult::*listCount_function_type)( ) const; + listCount_function_type listCount_function_value( &::SireMol::SelectResult::listCount ); + + SelectResult_exposer.def( + "listCount" + , listCount_function_value + , bp::release_gil_policy() + , "Return the number of items in the list" ); + } { //::SireMol::SelectResult::molNums @@ -129,6 +197,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "molNums" , molNums_function_value + , bp::release_gil_policy() , "Return the numbers of all molecules whose views are in this set,\nin the order they appear in this set" ); } @@ -140,6 +209,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "molecules" , molecules_function_value + , bp::release_gil_policy() , "Return a copy of this result with all views split into individual molecules" ); } @@ -151,6 +221,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "Return a object that can be used to move all of the views in this result" ); } @@ -201,6 +272,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "residues" , residues_function_value + , bp::release_gil_policy() , "Return a copy of this result with all views split into individual residues" ); } @@ -213,6 +285,7 @@ void register_SelectResult_class(){ "search" , search_function_value , ( bp::arg("search_term") ) + , bp::release_gil_policy() , "Return the result of searching this result with search_term" ); } @@ -224,6 +297,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "segments" , segments_function_value + , bp::release_gil_policy() , "Return a copy of this result with all views split into individual segments" ); } @@ -235,6 +309,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of views in this result" ); } @@ -246,6 +321,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "toGroup" , toGroup_function_value + , bp::release_gil_policy() , "Return this result as a new molecule group" ); } @@ -258,8 +334,21 @@ void register_SelectResult_class(){ "toGroup" , toGroup_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return this result as a new molecule group called name" ); + } + { //::SireMol::SelectResult::toList + + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::SelectResult::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::SelectResult::toList ); + + SelectResult_exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "Return the results as a list of MolViewPtrs" ); + } { //::SireMol::SelectResult::toMolecules @@ -269,6 +358,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "toMolecules" , toMolecules_function_value + , bp::release_gil_policy() , "Return this result as a set of Molecules" ); } @@ -280,6 +370,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -291,6 +382,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -302,6 +394,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "views" , views_function_value + , bp::release_gil_policy() , "Return all of the views in this result, grouped by molecule" ); } @@ -314,6 +407,7 @@ void register_SelectResult_class(){ "views" , views_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return all of the views of the molecule with number molnum. This\nreturns an empty set of views if the molecule is not in this set" ); } @@ -325,6 +419,7 @@ void register_SelectResult_class(){ SelectResult_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SelectResultMover.pypp.cpp b/wrapper/Mol/SelectResultMover.pypp.cpp index 27b1a17fc..6f13674c9 100644 --- a/wrapper/Mol/SelectResultMover.pypp.cpp +++ b/wrapper/Mol/SelectResultMover.pypp.cpp @@ -7,6 +7,8 @@ namespace bp = boost::python; +#include "SireMol/core.h" + #include "SireMol/moleculegroup.h" #include "SireMol/molecules.h" @@ -27,6 +29,8 @@ SireMol::SelectResultMover __copy__(const SireMol::SelectResultMover &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SelectResultMover_class(){ { //::SireMol::SelectResultMover @@ -43,6 +47,7 @@ void register_SelectResultMover_class(){ SelectResultMover_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Commit all of the moves" ); } @@ -69,6 +74,7 @@ void register_SelectResultMover_class(){ SelectResultMover_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -93,6 +99,7 @@ void register_SelectResultMover_class(){ SelectResultMover_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +111,7 @@ void register_SelectResultMover_class(){ SelectResultMover_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/SelectorM_Atom_.pypp.cpp b/wrapper/Mol/SelectorM_Atom_.pypp.cpp new file mode 100644 index 000000000..fb7c30770 --- /dev/null +++ b/wrapper/Mol/SelectorM_Atom_.pypp.cpp @@ -0,0 +1,1225 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorM_Atom_.pypp.hpp" + +namespace bp = boost::python; + +#include "SireError/errors.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "atomid.h" + +#include "cgid.h" + +#include "chainid.h" + +#include "evaluatorm.h" + +#include "moleculegroup.h" + +#include "moleculegroups.h" + +#include "molecules.h" + +#include "molid.h" + +#include "molidx.h" + +#include "molname.h" + +#include "molnum.h" + +#include "resid.h" + +#include "segid.h" + +#include "selectorm.hpp" + +#include "selectormol.h" + +#include "selectormol.h" + +SireMol::SelectorM __copy__(const SireMol::SelectorM &other){ return SireMol::SelectorM(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorM_Atom__class(){ + + { //::SireMol::SelectorM< SireMol::Atom > + typedef bp::class_< SireMol::SelectorM< SireMol::Atom >, bp::bases< SireBase::Property > > SelectorM_Atom__exposer_t; + SelectorM_Atom__exposer_t SelectorM_Atom__exposer = SelectorM_Atom__exposer_t( "SelectorM_Atom_", "", bp::init< >("") ); + bp::scope SelectorM_Atom__scope( SelectorM_Atom__exposer ); + SelectorM_Atom__exposer.def( bp::init< SireMol::Atom const & >(( bp::arg("view") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("mols") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("mols") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::MolGroupsBase const & >(( bp::arg("mols") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("mols") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("mols") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectorMol const &, SireBase::Slice const & >(( bp::arg("mols"), bp::arg("slice") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectorMol const &, QList< long long > const & >(( bp::arg("mols"), bp::arg("idxs") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectorMol const &, QString const & >(( bp::arg("mols"), bp::arg("name") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectorMol const &, SireMol::Atom::ID const & >(( bp::arg("mols"), bp::arg("id") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectorM< SireMol::Atom > const & >(( bp::arg("other") ), "") ); + SelectorM_Atom__exposer.def( bp::init< SireMol::SelectorM< SireMol::Atom > const & >(( bp::arg("other") ), "") ); + { //::SireMol::SelectorM< SireMol::Atom >::IDs + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::SelectorM< SireMol::Atom >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::SelectorM< SireMol::Atom >::IDs ); + + SelectorM_Atom__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atom + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*atom_function_type)( int ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Atom >::atom ); + + SelectorM_Atom__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atom + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*atom_function_type)( ::QString const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Atom >::atom ); + + SelectorM_Atom__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atom + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*atom_function_type)( ::SireMol::AtomID const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Atom >::atom ); + + SelectorM_Atom__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atoms + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*atoms_function_type)( ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Atom >::atoms ); + + SelectorM_Atom__exposer.def( + "atoms" + , atoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atoms + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*atoms_function_type)( int ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Atom >::atoms ); + + SelectorM_Atom__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atoms + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*atoms_function_type)( ::SireBase::Slice const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Atom >::atoms ); + + SelectorM_Atom__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atoms + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*atoms_function_type)( ::QList< long long > const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Atom >::atoms ); + + SelectorM_Atom__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atoms + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*atoms_function_type)( ::QString const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Atom >::atoms ); + + SelectorM_Atom__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::atoms + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*atoms_function_type)( ::SireMol::AtomID const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Atom >::atoms ); + + SelectorM_Atom__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chain + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Atom >::*chain_function_type)( int ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Atom >::chain ); + + SelectorM_Atom__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chain + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Atom >::*chain_function_type)( ::QString const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Atom >::chain ); + + SelectorM_Atom__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chain + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Atom >::*chain_function_type)( ::SireMol::ChainID const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Atom >::chain ); + + SelectorM_Atom__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chains + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Atom >::*chains_function_type)( ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Atom >::chains ); + + SelectorM_Atom__exposer.def( + "chains" + , chains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chains + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Atom >::*chains_function_type)( int ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Atom >::chains ); + + SelectorM_Atom__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chains + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Atom >::*chains_function_type)( ::SireBase::Slice const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Atom >::chains ); + + SelectorM_Atom__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chains + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Atom >::*chains_function_type)( ::QList< long long > const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Atom >::chains ); + + SelectorM_Atom__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chains + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Atom >::*chains_function_type)( ::QString const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Atom >::chains ); + + SelectorM_Atom__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::chains + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Atom >::*chains_function_type)( ::SireMol::ChainID const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Atom >::chains ); + + SelectorM_Atom__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::count + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMol::SelectorM< SireMol::Atom >::count ); + + SelectorM_Atom__exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroup + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroup_function_type)( int ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroup ); + + SelectorM_Atom__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroup + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroup_function_type)( ::QString const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroup ); + + SelectorM_Atom__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroup + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroup_function_type)( ::SireMol::CGID const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroup ); + + SelectorM_Atom__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroups + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroups_function_type)( ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroups ); + + SelectorM_Atom__exposer.def( + "cutGroups" + , cutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroups + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroups_function_type)( int ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroups ); + + SelectorM_Atom__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroups + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroups_function_type)( ::SireBase::Slice const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroups ); + + SelectorM_Atom__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroups + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroups_function_type)( ::QList< long long > const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroups ); + + SelectorM_Atom__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroups + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroups_function_type)( ::QString const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroups ); + + SelectorM_Atom__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::cutGroups + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Atom >::*cutGroups_function_type)( ::SireMol::CGID const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Atom >::cutGroups ); + + SelectorM_Atom__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::evaluate + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::EvaluatorM ( ::SireMol::SelectorM< SireMol::Atom >::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMol::SelectorM< SireMol::Atom >::evaluate ); + + SelectorM_Atom__exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::indexes + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::SelectorM< SireMol::Atom >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::SelectorM< SireMol::Atom >::indexes ); + + SelectorM_Atom__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::isEmpty + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef bool ( ::SireMol::SelectorM< SireMol::Atom >::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::SelectorM< SireMol::Atom >::isEmpty ); + + SelectorM_Atom__exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecule + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Atom >::*molecule_function_type)( int ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecule ); + + SelectorM_Atom__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecule + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Atom >::*molecule_function_type)( ::QString const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecule ); + + SelectorM_Atom__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecule + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Atom >::*molecule_function_type)( ::SireMol::MolID const & ) ; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecule ); + + SelectorM_Atom__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecules + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Atom >::*molecules_function_type)( ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecules ); + + SelectorM_Atom__exposer.def( + "molecules" + , molecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecules + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Atom >::*molecules_function_type)( int ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecules ); + + SelectorM_Atom__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecules + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Atom >::*molecules_function_type)( ::SireBase::Slice const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecules ); + + SelectorM_Atom__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecules + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Atom >::*molecules_function_type)( ::QList< long long > const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecules ); + + SelectorM_Atom__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecules + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Atom >::*molecules_function_type)( ::QString const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecules ); + + SelectorM_Atom__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::molecules + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Atom >::*molecules_function_type)( ::SireMol::MolID const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Atom >::molecules ); + + SelectorM_Atom__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::nAtoms + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::SelectorM< SireMol::Atom >::nAtoms ); + + SelectorM_Atom__exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::nChains + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::SelectorM< SireMol::Atom >::nChains ); + + SelectorM_Atom__exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::nCutGroups + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::SelectorM< SireMol::Atom >::nCutGroups ); + + SelectorM_Atom__exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::nMolecules + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMol::SelectorM< SireMol::Atom >::nMolecules ); + + SelectorM_Atom__exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::nResidues + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::SelectorM< SireMol::Atom >::nResidues ); + + SelectorM_Atom__exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::nSegments + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::SelectorM< SireMol::Atom >::nSegments ); + + SelectorM_Atom__exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::names + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomName > ( ::SireMol::SelectorM< SireMol::Atom >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::SelectorM< SireMol::Atom >::names ); + + SelectorM_Atom__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::numbers + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomNum > ( ::SireMol::SelectorM< SireMol::Atom >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::SelectorM< SireMol::Atom >::numbers ); + + SelectorM_Atom__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Atom__exposer.def( bp::self != bp::self ); + { //::SireMol::SelectorM< SireMol::Atom >::operator() + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*__call___function_type)( int ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator() ); + + SelectorM_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::operator() + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*__call___function_type)( ::QString const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator() ); + + SelectorM_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::operator() + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*__call___function_type)( ::SireMol::Atom::ID const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator() ); + + SelectorM_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::operator= + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > & ( ::SireMol::SelectorM< SireMol::Atom >::*assign_function_type)( ::SireMol::SelectorM< SireMol::Atom > const & ) ; + assign_function_type assign_function_value( &::SireMol::SelectorM< SireMol::Atom >::operator= ); + + SelectorM_Atom__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + SelectorM_Atom__exposer.def( bp::self == bp::self ); + { //::SireMol::SelectorM< SireMol::Atom >::operator[] + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator[] ); + + SelectorM_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::operator[] + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator[] ); + + SelectorM_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::operator[] + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Atom >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator[] ); + + SelectorM_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::operator[] + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator[] ); + + SelectorM_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::operator[] + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Atom >::*__getitem___function_type)( ::SireMol::Atom::ID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Atom >::operator[] ); + + SelectorM_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residue + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Atom >::*residue_function_type)( int ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Atom >::residue ); + + SelectorM_Atom__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residue + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Atom >::*residue_function_type)( ::QString const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Atom >::residue ); + + SelectorM_Atom__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residue + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Atom >::*residue_function_type)( ::SireMol::ResID const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Atom >::residue ); + + SelectorM_Atom__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residues + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Atom >::*residues_function_type)( ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Atom >::residues ); + + SelectorM_Atom__exposer.def( + "residues" + , residues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residues + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Atom >::*residues_function_type)( int ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Atom >::residues ); + + SelectorM_Atom__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residues + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Atom >::*residues_function_type)( ::SireBase::Slice const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Atom >::residues ); + + SelectorM_Atom__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residues + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Atom >::*residues_function_type)( ::QList< long long > const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Atom >::residues ); + + SelectorM_Atom__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residues + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Atom >::*residues_function_type)( ::QString const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Atom >::residues ); + + SelectorM_Atom__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::residues + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Atom >::*residues_function_type)( ::SireMol::ResID const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Atom >::residues ); + + SelectorM_Atom__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::search + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Atom >::*search_function_type)( ::QString const & ) const; + search_function_type search_function_value( &::SireMol::SelectorM< SireMol::Atom >::search ); + + SelectorM_Atom__exposer.def( + "search" + , search_function_value + , ( bp::arg("search_string") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segment + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Atom >::*segment_function_type)( int ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Atom >::segment ); + + SelectorM_Atom__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segment + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Atom >::*segment_function_type)( ::QString const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Atom >::segment ); + + SelectorM_Atom__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segment + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Atom >::*segment_function_type)( ::SireMol::SegID const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Atom >::segment ); + + SelectorM_Atom__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segments + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Atom >::*segments_function_type)( ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Atom >::segments ); + + SelectorM_Atom__exposer.def( + "segments" + , segments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segments + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Atom >::*segments_function_type)( int ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Atom >::segments ); + + SelectorM_Atom__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segments + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Atom >::*segments_function_type)( ::SireBase::Slice const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Atom >::segments ); + + SelectorM_Atom__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segments + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Atom >::*segments_function_type)( ::QList< long long > const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Atom >::segments ); + + SelectorM_Atom__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segments + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Atom >::*segments_function_type)( ::QString const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Atom >::segments ); + + SelectorM_Atom__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::segments + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Atom >::*segments_function_type)( ::SireMol::SegID const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Atom >::segments ); + + SelectorM_Atom__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::size + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Atom >::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMol::SelectorM< SireMol::Atom >::size ); + + SelectorM_Atom__exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::toList + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::SelectorM< SireMol::Atom >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::SelectorM< SireMol::Atom >::toList ); + + SelectorM_Atom__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::toMoleculeGroup + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::MoleculeGroup ( ::SireMol::SelectorM< SireMol::Atom >::*toMoleculeGroup_function_type)( ) const; + toMoleculeGroup_function_type toMoleculeGroup_function_value( &::SireMol::SelectorM< SireMol::Atom >::toMoleculeGroup ); + + SelectorM_Atom__exposer.def( + "toMoleculeGroup" + , toMoleculeGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::toSelectResult + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Atom >::*toSelectResult_function_type)( ) const; + toSelectResult_function_type toSelectResult_function_value( &::SireMol::SelectorM< SireMol::Atom >::toSelectResult ); + + SelectorM_Atom__exposer.def( + "toSelectResult" + , toSelectResult_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::toString + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef ::QString ( ::SireMol::SelectorM< SireMol::Atom >::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::SelectorM< SireMol::Atom >::toString ); + + SelectorM_Atom__exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Atom >::typeName + + typedef SireMol::SelectorM< SireMol::Atom > exported_class_t; + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::SelectorM< SireMol::Atom >::typeName ); + + SelectorM_Atom__exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Atom__exposer.staticmethod( "typeName" ); + SelectorM_Atom__exposer.def( "__copy__", &__copy__); + SelectorM_Atom__exposer.def( "__deepcopy__", &__copy__); + SelectorM_Atom__exposer.def( "clone", &__copy__); + SelectorM_Atom__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Atom__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Atom__exposer.def_pickle(sire_pickle_suite< ::SireMol::SelectorM >()); + SelectorM_Atom__exposer.def( "__str__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Atom__exposer.def( "__repr__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Atom__exposer.def( "__len__", &__len_size< ::SireMol::SelectorM > ); + } + +} diff --git a/wrapper/Mol/SelectorM_Atom_.pypp.hpp b/wrapper/Mol/SelectorM_Atom_.pypp.hpp new file mode 100644 index 000000000..f887699a3 --- /dev/null +++ b/wrapper/Mol/SelectorM_Atom_.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorM_Atom__hpp__pyplusplus_wrapper +#define SelectorM_Atom__hpp__pyplusplus_wrapper + +void register_SelectorM_Atom__class(); + +#endif//SelectorM_Atom__hpp__pyplusplus_wrapper diff --git a/wrapper/Mol/SelectorM_Chain_.pypp.cpp b/wrapper/Mol/SelectorM_Chain_.pypp.cpp new file mode 100644 index 000000000..89f3d07be --- /dev/null +++ b/wrapper/Mol/SelectorM_Chain_.pypp.cpp @@ -0,0 +1,1225 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorM_Chain_.pypp.hpp" + +namespace bp = boost::python; + +#include "SireError/errors.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "atomid.h" + +#include "cgid.h" + +#include "chainid.h" + +#include "evaluatorm.h" + +#include "moleculegroup.h" + +#include "moleculegroups.h" + +#include "molecules.h" + +#include "molid.h" + +#include "molidx.h" + +#include "molname.h" + +#include "molnum.h" + +#include "resid.h" + +#include "segid.h" + +#include "selectorm.hpp" + +#include "selectormol.h" + +#include "selectormol.h" + +SireMol::SelectorM __copy__(const SireMol::SelectorM &other){ return SireMol::SelectorM(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorM_Chain__class(){ + + { //::SireMol::SelectorM< SireMol::Chain > + typedef bp::class_< SireMol::SelectorM< SireMol::Chain >, bp::bases< SireBase::Property > > SelectorM_Chain__exposer_t; + SelectorM_Chain__exposer_t SelectorM_Chain__exposer = SelectorM_Chain__exposer_t( "SelectorM_Chain_", "", bp::init< >("") ); + bp::scope SelectorM_Chain__scope( SelectorM_Chain__exposer ); + SelectorM_Chain__exposer.def( bp::init< SireMol::Chain const & >(( bp::arg("view") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("mols") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("mols") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::MolGroupsBase const & >(( bp::arg("mols") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("mols") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("mols") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectorMol const &, SireBase::Slice const & >(( bp::arg("mols"), bp::arg("slice") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectorMol const &, QList< long long > const & >(( bp::arg("mols"), bp::arg("idxs") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectorMol const &, QString const & >(( bp::arg("mols"), bp::arg("name") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectorMol const &, SireMol::Chain::ID const & >(( bp::arg("mols"), bp::arg("id") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectorM< SireMol::Chain > const & >(( bp::arg("other") ), "") ); + SelectorM_Chain__exposer.def( bp::init< SireMol::SelectorM< SireMol::Chain > const & >(( bp::arg("other") ), "") ); + { //::SireMol::SelectorM< SireMol::Chain >::IDs + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::SelectorM< SireMol::Chain >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::SelectorM< SireMol::Chain >::IDs ); + + SelectorM_Chain__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atom + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Chain >::*atom_function_type)( int ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Chain >::atom ); + + SelectorM_Chain__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atom + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Chain >::*atom_function_type)( ::QString const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Chain >::atom ); + + SelectorM_Chain__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atom + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Chain >::*atom_function_type)( ::SireMol::AtomID const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Chain >::atom ); + + SelectorM_Chain__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atoms + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Chain >::*atoms_function_type)( ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Chain >::atoms ); + + SelectorM_Chain__exposer.def( + "atoms" + , atoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atoms + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Chain >::*atoms_function_type)( int ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Chain >::atoms ); + + SelectorM_Chain__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atoms + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Chain >::*atoms_function_type)( ::SireBase::Slice const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Chain >::atoms ); + + SelectorM_Chain__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atoms + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Chain >::*atoms_function_type)( ::QList< long long > const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Chain >::atoms ); + + SelectorM_Chain__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atoms + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Chain >::*atoms_function_type)( ::QString const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Chain >::atoms ); + + SelectorM_Chain__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::atoms + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Chain >::*atoms_function_type)( ::SireMol::AtomID const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Chain >::atoms ); + + SelectorM_Chain__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chain + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*chain_function_type)( int ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Chain >::chain ); + + SelectorM_Chain__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chain + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*chain_function_type)( ::QString const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Chain >::chain ); + + SelectorM_Chain__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chain + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*chain_function_type)( ::SireMol::ChainID const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Chain >::chain ); + + SelectorM_Chain__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chains + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*chains_function_type)( ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Chain >::chains ); + + SelectorM_Chain__exposer.def( + "chains" + , chains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chains + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*chains_function_type)( int ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Chain >::chains ); + + SelectorM_Chain__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chains + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*chains_function_type)( ::SireBase::Slice const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Chain >::chains ); + + SelectorM_Chain__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chains + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*chains_function_type)( ::QList< long long > const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Chain >::chains ); + + SelectorM_Chain__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chains + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*chains_function_type)( ::QString const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Chain >::chains ); + + SelectorM_Chain__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::chains + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*chains_function_type)( ::SireMol::ChainID const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Chain >::chains ); + + SelectorM_Chain__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::count + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMol::SelectorM< SireMol::Chain >::count ); + + SelectorM_Chain__exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroup + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroup_function_type)( int ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroup ); + + SelectorM_Chain__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroup + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroup_function_type)( ::QString const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroup ); + + SelectorM_Chain__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroup + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroup_function_type)( ::SireMol::CGID const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroup ); + + SelectorM_Chain__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroups + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroups_function_type)( ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroups ); + + SelectorM_Chain__exposer.def( + "cutGroups" + , cutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroups + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroups_function_type)( int ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroups ); + + SelectorM_Chain__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroups + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroups_function_type)( ::SireBase::Slice const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroups ); + + SelectorM_Chain__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroups + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroups_function_type)( ::QList< long long > const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroups ); + + SelectorM_Chain__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroups + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroups_function_type)( ::QString const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroups ); + + SelectorM_Chain__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::cutGroups + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Chain >::*cutGroups_function_type)( ::SireMol::CGID const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Chain >::cutGroups ); + + SelectorM_Chain__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::evaluate + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::EvaluatorM ( ::SireMol::SelectorM< SireMol::Chain >::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMol::SelectorM< SireMol::Chain >::evaluate ); + + SelectorM_Chain__exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::indexes + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::SelectorM< SireMol::Chain >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::SelectorM< SireMol::Chain >::indexes ); + + SelectorM_Chain__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::isEmpty + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef bool ( ::SireMol::SelectorM< SireMol::Chain >::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::SelectorM< SireMol::Chain >::isEmpty ); + + SelectorM_Chain__exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecule + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Chain >::*molecule_function_type)( int ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecule ); + + SelectorM_Chain__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecule + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Chain >::*molecule_function_type)( ::QString const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecule ); + + SelectorM_Chain__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecule + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Chain >::*molecule_function_type)( ::SireMol::MolID const & ) ; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecule ); + + SelectorM_Chain__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecules + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Chain >::*molecules_function_type)( ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecules ); + + SelectorM_Chain__exposer.def( + "molecules" + , molecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecules + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Chain >::*molecules_function_type)( int ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecules ); + + SelectorM_Chain__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecules + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Chain >::*molecules_function_type)( ::SireBase::Slice const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecules ); + + SelectorM_Chain__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecules + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Chain >::*molecules_function_type)( ::QList< long long > const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecules ); + + SelectorM_Chain__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecules + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Chain >::*molecules_function_type)( ::QString const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecules ); + + SelectorM_Chain__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::molecules + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Chain >::*molecules_function_type)( ::SireMol::MolID const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Chain >::molecules ); + + SelectorM_Chain__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::nAtoms + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::SelectorM< SireMol::Chain >::nAtoms ); + + SelectorM_Chain__exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::nChains + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::SelectorM< SireMol::Chain >::nChains ); + + SelectorM_Chain__exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::nCutGroups + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::SelectorM< SireMol::Chain >::nCutGroups ); + + SelectorM_Chain__exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::nMolecules + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMol::SelectorM< SireMol::Chain >::nMolecules ); + + SelectorM_Chain__exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::nResidues + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::SelectorM< SireMol::Chain >::nResidues ); + + SelectorM_Chain__exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::nSegments + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::SelectorM< SireMol::Chain >::nSegments ); + + SelectorM_Chain__exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::names + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainName > ( ::SireMol::SelectorM< SireMol::Chain >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::SelectorM< SireMol::Chain >::names ); + + SelectorM_Chain__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::numbers + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::SelectorM< SireMol::Chain >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::SelectorM< SireMol::Chain >::numbers ); + + SelectorM_Chain__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Chain__exposer.def( bp::self != bp::self ); + { //::SireMol::SelectorM< SireMol::Chain >::operator() + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*__call___function_type)( int ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator() ); + + SelectorM_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::operator() + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*__call___function_type)( ::QString const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator() ); + + SelectorM_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::operator() + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*__call___function_type)( ::SireMol::Chain::ID const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator() ); + + SelectorM_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::operator= + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > & ( ::SireMol::SelectorM< SireMol::Chain >::*assign_function_type)( ::SireMol::SelectorM< SireMol::Chain > const & ) ; + assign_function_type assign_function_value( &::SireMol::SelectorM< SireMol::Chain >::operator= ); + + SelectorM_Chain__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + SelectorM_Chain__exposer.def( bp::self == bp::self ); + { //::SireMol::SelectorM< SireMol::Chain >::operator[] + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator[] ); + + SelectorM_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::operator[] + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator[] ); + + SelectorM_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::operator[] + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Chain >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator[] ); + + SelectorM_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::operator[] + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator[] ); + + SelectorM_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::operator[] + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Chain >::*__getitem___function_type)( ::SireMol::Chain::ID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Chain >::operator[] ); + + SelectorM_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residue + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Chain >::*residue_function_type)( int ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Chain >::residue ); + + SelectorM_Chain__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residue + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Chain >::*residue_function_type)( ::QString const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Chain >::residue ); + + SelectorM_Chain__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residue + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Chain >::*residue_function_type)( ::SireMol::ResID const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Chain >::residue ); + + SelectorM_Chain__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residues + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Chain >::*residues_function_type)( ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Chain >::residues ); + + SelectorM_Chain__exposer.def( + "residues" + , residues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residues + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Chain >::*residues_function_type)( int ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Chain >::residues ); + + SelectorM_Chain__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residues + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Chain >::*residues_function_type)( ::SireBase::Slice const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Chain >::residues ); + + SelectorM_Chain__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residues + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Chain >::*residues_function_type)( ::QList< long long > const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Chain >::residues ); + + SelectorM_Chain__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residues + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Chain >::*residues_function_type)( ::QString const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Chain >::residues ); + + SelectorM_Chain__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::residues + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Chain >::*residues_function_type)( ::SireMol::ResID const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Chain >::residues ); + + SelectorM_Chain__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::search + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Chain >::*search_function_type)( ::QString const & ) const; + search_function_type search_function_value( &::SireMol::SelectorM< SireMol::Chain >::search ); + + SelectorM_Chain__exposer.def( + "search" + , search_function_value + , ( bp::arg("search_string") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segment + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Chain >::*segment_function_type)( int ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Chain >::segment ); + + SelectorM_Chain__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segment + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Chain >::*segment_function_type)( ::QString const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Chain >::segment ); + + SelectorM_Chain__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segment + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Chain >::*segment_function_type)( ::SireMol::SegID const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Chain >::segment ); + + SelectorM_Chain__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segments + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Chain >::*segments_function_type)( ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Chain >::segments ); + + SelectorM_Chain__exposer.def( + "segments" + , segments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segments + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Chain >::*segments_function_type)( int ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Chain >::segments ); + + SelectorM_Chain__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segments + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Chain >::*segments_function_type)( ::SireBase::Slice const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Chain >::segments ); + + SelectorM_Chain__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segments + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Chain >::*segments_function_type)( ::QList< long long > const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Chain >::segments ); + + SelectorM_Chain__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segments + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Chain >::*segments_function_type)( ::QString const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Chain >::segments ); + + SelectorM_Chain__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::segments + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Chain >::*segments_function_type)( ::SireMol::SegID const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Chain >::segments ); + + SelectorM_Chain__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::size + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Chain >::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMol::SelectorM< SireMol::Chain >::size ); + + SelectorM_Chain__exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::toList + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::SelectorM< SireMol::Chain >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::SelectorM< SireMol::Chain >::toList ); + + SelectorM_Chain__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::toMoleculeGroup + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::MoleculeGroup ( ::SireMol::SelectorM< SireMol::Chain >::*toMoleculeGroup_function_type)( ) const; + toMoleculeGroup_function_type toMoleculeGroup_function_value( &::SireMol::SelectorM< SireMol::Chain >::toMoleculeGroup ); + + SelectorM_Chain__exposer.def( + "toMoleculeGroup" + , toMoleculeGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::toSelectResult + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Chain >::*toSelectResult_function_type)( ) const; + toSelectResult_function_type toSelectResult_function_value( &::SireMol::SelectorM< SireMol::Chain >::toSelectResult ); + + SelectorM_Chain__exposer.def( + "toSelectResult" + , toSelectResult_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::toString + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef ::QString ( ::SireMol::SelectorM< SireMol::Chain >::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::SelectorM< SireMol::Chain >::toString ); + + SelectorM_Chain__exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Chain >::typeName + + typedef SireMol::SelectorM< SireMol::Chain > exported_class_t; + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::SelectorM< SireMol::Chain >::typeName ); + + SelectorM_Chain__exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Chain__exposer.staticmethod( "typeName" ); + SelectorM_Chain__exposer.def( "__copy__", &__copy__); + SelectorM_Chain__exposer.def( "__deepcopy__", &__copy__); + SelectorM_Chain__exposer.def( "clone", &__copy__); + SelectorM_Chain__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Chain__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Chain__exposer.def_pickle(sire_pickle_suite< ::SireMol::SelectorM >()); + SelectorM_Chain__exposer.def( "__str__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Chain__exposer.def( "__repr__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Chain__exposer.def( "__len__", &__len_size< ::SireMol::SelectorM > ); + } + +} diff --git a/wrapper/Mol/SelectorM_Chain_.pypp.hpp b/wrapper/Mol/SelectorM_Chain_.pypp.hpp new file mode 100644 index 000000000..e2cbd3fcc --- /dev/null +++ b/wrapper/Mol/SelectorM_Chain_.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorM_Chain__hpp__pyplusplus_wrapper +#define SelectorM_Chain__hpp__pyplusplus_wrapper + +void register_SelectorM_Chain__class(); + +#endif//SelectorM_Chain__hpp__pyplusplus_wrapper diff --git a/wrapper/Mol/SelectorM_CutGroup_.pypp.cpp b/wrapper/Mol/SelectorM_CutGroup_.pypp.cpp new file mode 100644 index 000000000..93ddbd440 --- /dev/null +++ b/wrapper/Mol/SelectorM_CutGroup_.pypp.cpp @@ -0,0 +1,1225 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorM_CutGroup_.pypp.hpp" + +namespace bp = boost::python; + +#include "SireError/errors.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "atomid.h" + +#include "cgid.h" + +#include "chainid.h" + +#include "evaluatorm.h" + +#include "moleculegroup.h" + +#include "moleculegroups.h" + +#include "molecules.h" + +#include "molid.h" + +#include "molidx.h" + +#include "molname.h" + +#include "molnum.h" + +#include "resid.h" + +#include "segid.h" + +#include "selectorm.hpp" + +#include "selectormol.h" + +#include "selectormol.h" + +SireMol::SelectorM __copy__(const SireMol::SelectorM &other){ return SireMol::SelectorM(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorM_CutGroup__class(){ + + { //::SireMol::SelectorM< SireMol::CutGroup > + typedef bp::class_< SireMol::SelectorM< SireMol::CutGroup >, bp::bases< SireBase::Property > > SelectorM_CutGroup__exposer_t; + SelectorM_CutGroup__exposer_t SelectorM_CutGroup__exposer = SelectorM_CutGroup__exposer_t( "SelectorM_CutGroup_", "", bp::init< >("") ); + bp::scope SelectorM_CutGroup__scope( SelectorM_CutGroup__exposer ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::CutGroup const & >(( bp::arg("view") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("mols") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("mols") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::MolGroupsBase const & >(( bp::arg("mols") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("mols") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("mols") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectorMol const &, SireBase::Slice const & >(( bp::arg("mols"), bp::arg("slice") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectorMol const &, QList< long long > const & >(( bp::arg("mols"), bp::arg("idxs") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectorMol const &, QString const & >(( bp::arg("mols"), bp::arg("name") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectorMol const &, SireMol::CutGroup::ID const & >(( bp::arg("mols"), bp::arg("id") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectorM< SireMol::CutGroup > const & >(( bp::arg("other") ), "") ); + SelectorM_CutGroup__exposer.def( bp::init< SireMol::SelectorM< SireMol::CutGroup > const & >(( bp::arg("other") ), "") ); + { //::SireMol::SelectorM< SireMol::CutGroup >::IDs + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGIdx > ( ::SireMol::SelectorM< SireMol::CutGroup >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::IDs ); + + SelectorM_CutGroup__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atom + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::CutGroup >::*atom_function_type)( int ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atom ); + + SelectorM_CutGroup__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atom + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::CutGroup >::*atom_function_type)( ::QString const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atom ); + + SelectorM_CutGroup__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atom + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::CutGroup >::*atom_function_type)( ::SireMol::AtomID const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atom ); + + SelectorM_CutGroup__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atoms + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::CutGroup >::*atoms_function_type)( ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atoms ); + + SelectorM_CutGroup__exposer.def( + "atoms" + , atoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atoms + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::CutGroup >::*atoms_function_type)( int ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atoms ); + + SelectorM_CutGroup__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atoms + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::CutGroup >::*atoms_function_type)( ::SireBase::Slice const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atoms ); + + SelectorM_CutGroup__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atoms + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::CutGroup >::*atoms_function_type)( ::QList< long long > const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atoms ); + + SelectorM_CutGroup__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atoms + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::CutGroup >::*atoms_function_type)( ::QString const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atoms ); + + SelectorM_CutGroup__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::atoms + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::CutGroup >::*atoms_function_type)( ::SireMol::AtomID const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::atoms ); + + SelectorM_CutGroup__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chain + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::CutGroup >::*chain_function_type)( int ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chain ); + + SelectorM_CutGroup__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chain + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::CutGroup >::*chain_function_type)( ::QString const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chain ); + + SelectorM_CutGroup__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chain + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::CutGroup >::*chain_function_type)( ::SireMol::ChainID const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chain ); + + SelectorM_CutGroup__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chains + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::CutGroup >::*chains_function_type)( ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chains ); + + SelectorM_CutGroup__exposer.def( + "chains" + , chains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chains + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::CutGroup >::*chains_function_type)( int ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chains ); + + SelectorM_CutGroup__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chains + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::CutGroup >::*chains_function_type)( ::SireBase::Slice const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chains ); + + SelectorM_CutGroup__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chains + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::CutGroup >::*chains_function_type)( ::QList< long long > const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chains ); + + SelectorM_CutGroup__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chains + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::CutGroup >::*chains_function_type)( ::QString const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chains ); + + SelectorM_CutGroup__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::chains + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::CutGroup >::*chains_function_type)( ::SireMol::ChainID const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::chains ); + + SelectorM_CutGroup__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::count + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::count ); + + SelectorM_CutGroup__exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroup + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroup_function_type)( int ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroup ); + + SelectorM_CutGroup__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroup + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroup_function_type)( ::QString const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroup ); + + SelectorM_CutGroup__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroup + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroup_function_type)( ::SireMol::CGID const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroup ); + + SelectorM_CutGroup__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroups + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroups_function_type)( ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroups ); + + SelectorM_CutGroup__exposer.def( + "cutGroups" + , cutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroups + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroups_function_type)( int ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroups ); + + SelectorM_CutGroup__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroups + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroups_function_type)( ::SireBase::Slice const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroups ); + + SelectorM_CutGroup__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroups + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroups_function_type)( ::QList< long long > const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroups ); + + SelectorM_CutGroup__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroups + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroups_function_type)( ::QString const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroups ); + + SelectorM_CutGroup__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::cutGroups + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*cutGroups_function_type)( ::SireMol::CGID const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::cutGroups ); + + SelectorM_CutGroup__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::evaluate + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::EvaluatorM ( ::SireMol::SelectorM< SireMol::CutGroup >::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::evaluate ); + + SelectorM_CutGroup__exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::indexes + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGIdx > ( ::SireMol::SelectorM< SireMol::CutGroup >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::indexes ); + + SelectorM_CutGroup__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::isEmpty + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef bool ( ::SireMol::SelectorM< SireMol::CutGroup >::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::isEmpty ); + + SelectorM_CutGroup__exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecule + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecule_function_type)( int ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecule ); + + SelectorM_CutGroup__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecule + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecule_function_type)( ::QString const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecule ); + + SelectorM_CutGroup__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecule + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecule_function_type)( ::SireMol::MolID const & ) ; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecule ); + + SelectorM_CutGroup__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecules + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecules_function_type)( ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecules ); + + SelectorM_CutGroup__exposer.def( + "molecules" + , molecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecules + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecules_function_type)( int ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecules ); + + SelectorM_CutGroup__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecules + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecules_function_type)( ::SireBase::Slice const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecules ); + + SelectorM_CutGroup__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecules + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecules_function_type)( ::QList< long long > const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecules ); + + SelectorM_CutGroup__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecules + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecules_function_type)( ::QString const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecules ); + + SelectorM_CutGroup__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::molecules + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::CutGroup >::*molecules_function_type)( ::SireMol::MolID const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::molecules ); + + SelectorM_CutGroup__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::nAtoms + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::nAtoms ); + + SelectorM_CutGroup__exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::nChains + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::nChains ); + + SelectorM_CutGroup__exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::nCutGroups + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::nCutGroups ); + + SelectorM_CutGroup__exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::nMolecules + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::nMolecules ); + + SelectorM_CutGroup__exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::nResidues + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::nResidues ); + + SelectorM_CutGroup__exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::nSegments + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::nSegments ); + + SelectorM_CutGroup__exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::names + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGName > ( ::SireMol::SelectorM< SireMol::CutGroup >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::names ); + + SelectorM_CutGroup__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::numbers + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGIdx > ( ::SireMol::SelectorM< SireMol::CutGroup >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::numbers ); + + SelectorM_CutGroup__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_CutGroup__exposer.def( bp::self != bp::self ); + { //::SireMol::SelectorM< SireMol::CutGroup >::operator() + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*__call___function_type)( int ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator() ); + + SelectorM_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::operator() + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*__call___function_type)( ::QString const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator() ); + + SelectorM_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::operator() + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*__call___function_type)( ::SireMol::CutGroup::ID const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator() ); + + SelectorM_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::operator= + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > & ( ::SireMol::SelectorM< SireMol::CutGroup >::*assign_function_type)( ::SireMol::SelectorM< SireMol::CutGroup > const & ) ; + assign_function_type assign_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator= ); + + SelectorM_CutGroup__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + SelectorM_CutGroup__exposer.def( bp::self == bp::self ); + { //::SireMol::SelectorM< SireMol::CutGroup >::operator[] + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator[] ); + + SelectorM_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::operator[] + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator[] ); + + SelectorM_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::operator[] + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::CutGroup >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator[] ); + + SelectorM_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::operator[] + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator[] ); + + SelectorM_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::operator[] + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*__getitem___function_type)( ::SireMol::CutGroup::ID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::CutGroup >::operator[] ); + + SelectorM_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residue + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::CutGroup >::*residue_function_type)( int ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residue ); + + SelectorM_CutGroup__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residue + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::CutGroup >::*residue_function_type)( ::QString const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residue ); + + SelectorM_CutGroup__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residue + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::CutGroup >::*residue_function_type)( ::SireMol::ResID const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residue ); + + SelectorM_CutGroup__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residues + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::CutGroup >::*residues_function_type)( ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residues ); + + SelectorM_CutGroup__exposer.def( + "residues" + , residues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residues + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::CutGroup >::*residues_function_type)( int ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residues ); + + SelectorM_CutGroup__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residues + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::CutGroup >::*residues_function_type)( ::SireBase::Slice const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residues ); + + SelectorM_CutGroup__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residues + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::CutGroup >::*residues_function_type)( ::QList< long long > const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residues ); + + SelectorM_CutGroup__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residues + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::CutGroup >::*residues_function_type)( ::QString const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residues ); + + SelectorM_CutGroup__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::residues + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::CutGroup >::*residues_function_type)( ::SireMol::ResID const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::residues ); + + SelectorM_CutGroup__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::search + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::CutGroup >::*search_function_type)( ::QString const & ) const; + search_function_type search_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::search ); + + SelectorM_CutGroup__exposer.def( + "search" + , search_function_value + , ( bp::arg("search_string") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segment + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::CutGroup >::*segment_function_type)( int ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segment ); + + SelectorM_CutGroup__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segment + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::CutGroup >::*segment_function_type)( ::QString const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segment ); + + SelectorM_CutGroup__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segment + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::CutGroup >::*segment_function_type)( ::SireMol::SegID const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segment ); + + SelectorM_CutGroup__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segments + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::CutGroup >::*segments_function_type)( ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segments ); + + SelectorM_CutGroup__exposer.def( + "segments" + , segments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segments + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::CutGroup >::*segments_function_type)( int ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segments ); + + SelectorM_CutGroup__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segments + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::CutGroup >::*segments_function_type)( ::SireBase::Slice const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segments ); + + SelectorM_CutGroup__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segments + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::CutGroup >::*segments_function_type)( ::QList< long long > const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segments ); + + SelectorM_CutGroup__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segments + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::CutGroup >::*segments_function_type)( ::QString const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segments ); + + SelectorM_CutGroup__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::segments + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::CutGroup >::*segments_function_type)( ::SireMol::SegID const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::segments ); + + SelectorM_CutGroup__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::size + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::CutGroup >::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::size ); + + SelectorM_CutGroup__exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::toList + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::SelectorM< SireMol::CutGroup >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::toList ); + + SelectorM_CutGroup__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::toMoleculeGroup + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MoleculeGroup ( ::SireMol::SelectorM< SireMol::CutGroup >::*toMoleculeGroup_function_type)( ) const; + toMoleculeGroup_function_type toMoleculeGroup_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::toMoleculeGroup ); + + SelectorM_CutGroup__exposer.def( + "toMoleculeGroup" + , toMoleculeGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::toSelectResult + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::CutGroup >::*toSelectResult_function_type)( ) const; + toSelectResult_function_type toSelectResult_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::toSelectResult ); + + SelectorM_CutGroup__exposer.def( + "toSelectResult" + , toSelectResult_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::toString + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef ::QString ( ::SireMol::SelectorM< SireMol::CutGroup >::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::toString ); + + SelectorM_CutGroup__exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::CutGroup >::typeName + + typedef SireMol::SelectorM< SireMol::CutGroup > exported_class_t; + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::SelectorM< SireMol::CutGroup >::typeName ); + + SelectorM_CutGroup__exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_CutGroup__exposer.staticmethod( "typeName" ); + SelectorM_CutGroup__exposer.def( "__copy__", &__copy__); + SelectorM_CutGroup__exposer.def( "__deepcopy__", &__copy__); + SelectorM_CutGroup__exposer.def( "clone", &__copy__); + SelectorM_CutGroup__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_CutGroup__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_CutGroup__exposer.def_pickle(sire_pickle_suite< ::SireMol::SelectorM >()); + SelectorM_CutGroup__exposer.def( "__str__", &__str__< ::SireMol::SelectorM > ); + SelectorM_CutGroup__exposer.def( "__repr__", &__str__< ::SireMol::SelectorM > ); + SelectorM_CutGroup__exposer.def( "__len__", &__len_size< ::SireMol::SelectorM > ); + } + +} diff --git a/wrapper/Mol/SelectorM_CutGroup_.pypp.hpp b/wrapper/Mol/SelectorM_CutGroup_.pypp.hpp new file mode 100644 index 000000000..65878f3eb --- /dev/null +++ b/wrapper/Mol/SelectorM_CutGroup_.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorM_CutGroup__hpp__pyplusplus_wrapper +#define SelectorM_CutGroup__hpp__pyplusplus_wrapper + +void register_SelectorM_CutGroup__class(); + +#endif//SelectorM_CutGroup__hpp__pyplusplus_wrapper diff --git a/wrapper/Mol/SelectorM_Residue_.pypp.cpp b/wrapper/Mol/SelectorM_Residue_.pypp.cpp new file mode 100644 index 000000000..30bc2ad6b --- /dev/null +++ b/wrapper/Mol/SelectorM_Residue_.pypp.cpp @@ -0,0 +1,1225 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorM_Residue_.pypp.hpp" + +namespace bp = boost::python; + +#include "SireError/errors.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "atomid.h" + +#include "cgid.h" + +#include "chainid.h" + +#include "evaluatorm.h" + +#include "moleculegroup.h" + +#include "moleculegroups.h" + +#include "molecules.h" + +#include "molid.h" + +#include "molidx.h" + +#include "molname.h" + +#include "molnum.h" + +#include "resid.h" + +#include "segid.h" + +#include "selectorm.hpp" + +#include "selectormol.h" + +#include "selectormol.h" + +SireMol::SelectorM __copy__(const SireMol::SelectorM &other){ return SireMol::SelectorM(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorM_Residue__class(){ + + { //::SireMol::SelectorM< SireMol::Residue > + typedef bp::class_< SireMol::SelectorM< SireMol::Residue >, bp::bases< SireBase::Property > > SelectorM_Residue__exposer_t; + SelectorM_Residue__exposer_t SelectorM_Residue__exposer = SelectorM_Residue__exposer_t( "SelectorM_Residue_", "", bp::init< >("") ); + bp::scope SelectorM_Residue__scope( SelectorM_Residue__exposer ); + SelectorM_Residue__exposer.def( bp::init< SireMol::Residue const & >(( bp::arg("view") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("mols") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("mols") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::MolGroupsBase const & >(( bp::arg("mols") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("mols") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("mols") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectorMol const &, SireBase::Slice const & >(( bp::arg("mols"), bp::arg("slice") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectorMol const &, QList< long long > const & >(( bp::arg("mols"), bp::arg("idxs") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectorMol const &, QString const & >(( bp::arg("mols"), bp::arg("name") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectorMol const &, SireMol::Residue::ID const & >(( bp::arg("mols"), bp::arg("id") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectorM< SireMol::Residue > const & >(( bp::arg("other") ), "") ); + SelectorM_Residue__exposer.def( bp::init< SireMol::SelectorM< SireMol::Residue > const & >(( bp::arg("other") ), "") ); + { //::SireMol::SelectorM< SireMol::Residue >::IDs + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResIdx > ( ::SireMol::SelectorM< SireMol::Residue >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::SelectorM< SireMol::Residue >::IDs ); + + SelectorM_Residue__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atom + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Residue >::*atom_function_type)( int ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Residue >::atom ); + + SelectorM_Residue__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atom + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Residue >::*atom_function_type)( ::QString const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Residue >::atom ); + + SelectorM_Residue__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atom + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Residue >::*atom_function_type)( ::SireMol::AtomID const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Residue >::atom ); + + SelectorM_Residue__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atoms + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Residue >::*atoms_function_type)( ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Residue >::atoms ); + + SelectorM_Residue__exposer.def( + "atoms" + , atoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atoms + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Residue >::*atoms_function_type)( int ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Residue >::atoms ); + + SelectorM_Residue__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atoms + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Residue >::*atoms_function_type)( ::SireBase::Slice const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Residue >::atoms ); + + SelectorM_Residue__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atoms + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Residue >::*atoms_function_type)( ::QList< long long > const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Residue >::atoms ); + + SelectorM_Residue__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atoms + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Residue >::*atoms_function_type)( ::QString const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Residue >::atoms ); + + SelectorM_Residue__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::atoms + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Residue >::*atoms_function_type)( ::SireMol::AtomID const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Residue >::atoms ); + + SelectorM_Residue__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chain + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Residue >::*chain_function_type)( int ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Residue >::chain ); + + SelectorM_Residue__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chain + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Residue >::*chain_function_type)( ::QString const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Residue >::chain ); + + SelectorM_Residue__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chain + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Residue >::*chain_function_type)( ::SireMol::ChainID const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Residue >::chain ); + + SelectorM_Residue__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chains + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Residue >::*chains_function_type)( ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Residue >::chains ); + + SelectorM_Residue__exposer.def( + "chains" + , chains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chains + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Residue >::*chains_function_type)( int ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Residue >::chains ); + + SelectorM_Residue__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chains + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Residue >::*chains_function_type)( ::SireBase::Slice const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Residue >::chains ); + + SelectorM_Residue__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chains + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Residue >::*chains_function_type)( ::QList< long long > const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Residue >::chains ); + + SelectorM_Residue__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chains + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Residue >::*chains_function_type)( ::QString const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Residue >::chains ); + + SelectorM_Residue__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::chains + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Residue >::*chains_function_type)( ::SireMol::ChainID const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Residue >::chains ); + + SelectorM_Residue__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::count + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMol::SelectorM< SireMol::Residue >::count ); + + SelectorM_Residue__exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroup + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroup_function_type)( int ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroup ); + + SelectorM_Residue__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroup + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroup_function_type)( ::QString const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroup ); + + SelectorM_Residue__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroup + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroup_function_type)( ::SireMol::CGID const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroup ); + + SelectorM_Residue__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroups + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroups_function_type)( ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroups ); + + SelectorM_Residue__exposer.def( + "cutGroups" + , cutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroups + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroups_function_type)( int ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroups ); + + SelectorM_Residue__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroups + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroups_function_type)( ::SireBase::Slice const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroups ); + + SelectorM_Residue__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroups + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroups_function_type)( ::QList< long long > const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroups ); + + SelectorM_Residue__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroups + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroups_function_type)( ::QString const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroups ); + + SelectorM_Residue__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::cutGroups + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Residue >::*cutGroups_function_type)( ::SireMol::CGID const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Residue >::cutGroups ); + + SelectorM_Residue__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::evaluate + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::EvaluatorM ( ::SireMol::SelectorM< SireMol::Residue >::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMol::SelectorM< SireMol::Residue >::evaluate ); + + SelectorM_Residue__exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::indexes + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResIdx > ( ::SireMol::SelectorM< SireMol::Residue >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::SelectorM< SireMol::Residue >::indexes ); + + SelectorM_Residue__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::isEmpty + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef bool ( ::SireMol::SelectorM< SireMol::Residue >::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::SelectorM< SireMol::Residue >::isEmpty ); + + SelectorM_Residue__exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecule + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Residue >::*molecule_function_type)( int ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecule ); + + SelectorM_Residue__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecule + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Residue >::*molecule_function_type)( ::QString const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecule ); + + SelectorM_Residue__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecule + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Residue >::*molecule_function_type)( ::SireMol::MolID const & ) ; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecule ); + + SelectorM_Residue__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecules + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Residue >::*molecules_function_type)( ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecules ); + + SelectorM_Residue__exposer.def( + "molecules" + , molecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecules + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Residue >::*molecules_function_type)( int ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecules ); + + SelectorM_Residue__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecules + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Residue >::*molecules_function_type)( ::SireBase::Slice const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecules ); + + SelectorM_Residue__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecules + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Residue >::*molecules_function_type)( ::QList< long long > const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecules ); + + SelectorM_Residue__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecules + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Residue >::*molecules_function_type)( ::QString const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecules ); + + SelectorM_Residue__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::molecules + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Residue >::*molecules_function_type)( ::SireMol::MolID const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Residue >::molecules ); + + SelectorM_Residue__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::nAtoms + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::SelectorM< SireMol::Residue >::nAtoms ); + + SelectorM_Residue__exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::nChains + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::SelectorM< SireMol::Residue >::nChains ); + + SelectorM_Residue__exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::nCutGroups + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::SelectorM< SireMol::Residue >::nCutGroups ); + + SelectorM_Residue__exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::nMolecules + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMol::SelectorM< SireMol::Residue >::nMolecules ); + + SelectorM_Residue__exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::nResidues + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::SelectorM< SireMol::Residue >::nResidues ); + + SelectorM_Residue__exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::nSegments + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::SelectorM< SireMol::Residue >::nSegments ); + + SelectorM_Residue__exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::names + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResName > ( ::SireMol::SelectorM< SireMol::Residue >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::SelectorM< SireMol::Residue >::names ); + + SelectorM_Residue__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::numbers + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResNum > ( ::SireMol::SelectorM< SireMol::Residue >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::SelectorM< SireMol::Residue >::numbers ); + + SelectorM_Residue__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Residue__exposer.def( bp::self != bp::self ); + { //::SireMol::SelectorM< SireMol::Residue >::operator() + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*__call___function_type)( int ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator() ); + + SelectorM_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::operator() + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*__call___function_type)( ::QString const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator() ); + + SelectorM_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::operator() + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*__call___function_type)( ::SireMol::Residue::ID const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator() ); + + SelectorM_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::operator= + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > & ( ::SireMol::SelectorM< SireMol::Residue >::*assign_function_type)( ::SireMol::SelectorM< SireMol::Residue > const & ) ; + assign_function_type assign_function_value( &::SireMol::SelectorM< SireMol::Residue >::operator= ); + + SelectorM_Residue__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + SelectorM_Residue__exposer.def( bp::self == bp::self ); + { //::SireMol::SelectorM< SireMol::Residue >::operator[] + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator[] ); + + SelectorM_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::operator[] + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator[] ); + + SelectorM_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::operator[] + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator[] ); + + SelectorM_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::operator[] + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator[] ); + + SelectorM_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::operator[] + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*__getitem___function_type)( ::SireMol::Residue::ID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Residue >::operator[] ); + + SelectorM_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residue + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*residue_function_type)( int ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Residue >::residue ); + + SelectorM_Residue__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residue + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*residue_function_type)( ::QString const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Residue >::residue ); + + SelectorM_Residue__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residue + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Residue >::*residue_function_type)( ::SireMol::ResID const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Residue >::residue ); + + SelectorM_Residue__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residues + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*residues_function_type)( ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Residue >::residues ); + + SelectorM_Residue__exposer.def( + "residues" + , residues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residues + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*residues_function_type)( int ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Residue >::residues ); + + SelectorM_Residue__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residues + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*residues_function_type)( ::SireBase::Slice const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Residue >::residues ); + + SelectorM_Residue__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residues + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*residues_function_type)( ::QList< long long > const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Residue >::residues ); + + SelectorM_Residue__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residues + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*residues_function_type)( ::QString const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Residue >::residues ); + + SelectorM_Residue__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::residues + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Residue >::*residues_function_type)( ::SireMol::ResID const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Residue >::residues ); + + SelectorM_Residue__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::search + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Residue >::*search_function_type)( ::QString const & ) const; + search_function_type search_function_value( &::SireMol::SelectorM< SireMol::Residue >::search ); + + SelectorM_Residue__exposer.def( + "search" + , search_function_value + , ( bp::arg("search_string") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segment + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Residue >::*segment_function_type)( int ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Residue >::segment ); + + SelectorM_Residue__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segment + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Residue >::*segment_function_type)( ::QString const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Residue >::segment ); + + SelectorM_Residue__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segment + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Residue >::*segment_function_type)( ::SireMol::SegID const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Residue >::segment ); + + SelectorM_Residue__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segments + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Residue >::*segments_function_type)( ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Residue >::segments ); + + SelectorM_Residue__exposer.def( + "segments" + , segments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segments + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Residue >::*segments_function_type)( int ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Residue >::segments ); + + SelectorM_Residue__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segments + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Residue >::*segments_function_type)( ::SireBase::Slice const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Residue >::segments ); + + SelectorM_Residue__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segments + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Residue >::*segments_function_type)( ::QList< long long > const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Residue >::segments ); + + SelectorM_Residue__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segments + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Residue >::*segments_function_type)( ::QString const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Residue >::segments ); + + SelectorM_Residue__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::segments + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Residue >::*segments_function_type)( ::SireMol::SegID const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Residue >::segments ); + + SelectorM_Residue__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::size + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Residue >::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMol::SelectorM< SireMol::Residue >::size ); + + SelectorM_Residue__exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::toList + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::SelectorM< SireMol::Residue >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::SelectorM< SireMol::Residue >::toList ); + + SelectorM_Residue__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::toMoleculeGroup + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::MoleculeGroup ( ::SireMol::SelectorM< SireMol::Residue >::*toMoleculeGroup_function_type)( ) const; + toMoleculeGroup_function_type toMoleculeGroup_function_value( &::SireMol::SelectorM< SireMol::Residue >::toMoleculeGroup ); + + SelectorM_Residue__exposer.def( + "toMoleculeGroup" + , toMoleculeGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::toSelectResult + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Residue >::*toSelectResult_function_type)( ) const; + toSelectResult_function_type toSelectResult_function_value( &::SireMol::SelectorM< SireMol::Residue >::toSelectResult ); + + SelectorM_Residue__exposer.def( + "toSelectResult" + , toSelectResult_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::toString + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef ::QString ( ::SireMol::SelectorM< SireMol::Residue >::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::SelectorM< SireMol::Residue >::toString ); + + SelectorM_Residue__exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Residue >::typeName + + typedef SireMol::SelectorM< SireMol::Residue > exported_class_t; + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::SelectorM< SireMol::Residue >::typeName ); + + SelectorM_Residue__exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Residue__exposer.staticmethod( "typeName" ); + SelectorM_Residue__exposer.def( "__copy__", &__copy__); + SelectorM_Residue__exposer.def( "__deepcopy__", &__copy__); + SelectorM_Residue__exposer.def( "clone", &__copy__); + SelectorM_Residue__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Residue__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Residue__exposer.def_pickle(sire_pickle_suite< ::SireMol::SelectorM >()); + SelectorM_Residue__exposer.def( "__str__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Residue__exposer.def( "__repr__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Residue__exposer.def( "__len__", &__len_size< ::SireMol::SelectorM > ); + } + +} diff --git a/wrapper/Mol/SelectorM_Residue_.pypp.hpp b/wrapper/Mol/SelectorM_Residue_.pypp.hpp new file mode 100644 index 000000000..2362b9452 --- /dev/null +++ b/wrapper/Mol/SelectorM_Residue_.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorM_Residue__hpp__pyplusplus_wrapper +#define SelectorM_Residue__hpp__pyplusplus_wrapper + +void register_SelectorM_Residue__class(); + +#endif//SelectorM_Residue__hpp__pyplusplus_wrapper diff --git a/wrapper/Mol/SelectorM_Segment_.pypp.cpp b/wrapper/Mol/SelectorM_Segment_.pypp.cpp new file mode 100644 index 000000000..7ae874822 --- /dev/null +++ b/wrapper/Mol/SelectorM_Segment_.pypp.cpp @@ -0,0 +1,1225 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorM_Segment_.pypp.hpp" + +namespace bp = boost::python; + +#include "SireError/errors.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "atomid.h" + +#include "cgid.h" + +#include "chainid.h" + +#include "evaluatorm.h" + +#include "moleculegroup.h" + +#include "moleculegroups.h" + +#include "molecules.h" + +#include "molid.h" + +#include "molidx.h" + +#include "molname.h" + +#include "molnum.h" + +#include "resid.h" + +#include "segid.h" + +#include "selectorm.hpp" + +#include "selectormol.h" + +#include "selectormol.h" + +SireMol::SelectorM __copy__(const SireMol::SelectorM &other){ return SireMol::SelectorM(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorM_Segment__class(){ + + { //::SireMol::SelectorM< SireMol::Segment > + typedef bp::class_< SireMol::SelectorM< SireMol::Segment >, bp::bases< SireBase::Property > > SelectorM_Segment__exposer_t; + SelectorM_Segment__exposer_t SelectorM_Segment__exposer = SelectorM_Segment__exposer_t( "SelectorM_Segment_", "", bp::init< >("") ); + bp::scope SelectorM_Segment__scope( SelectorM_Segment__exposer ); + SelectorM_Segment__exposer.def( bp::init< SireMol::Segment const & >(( bp::arg("view") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("mols") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("mols") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::MolGroupsBase const & >(( bp::arg("mols") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("mols") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("mols") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectorMol const &, SireBase::Slice const & >(( bp::arg("mols"), bp::arg("slice") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectorMol const &, QList< long long > const & >(( bp::arg("mols"), bp::arg("idxs") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectorMol const &, QString const & >(( bp::arg("mols"), bp::arg("name") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectorMol const &, SireMol::Segment::ID const & >(( bp::arg("mols"), bp::arg("id") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectorM< SireMol::Segment > const & >(( bp::arg("other") ), "") ); + SelectorM_Segment__exposer.def( bp::init< SireMol::SelectorM< SireMol::Segment > const & >(( bp::arg("other") ), "") ); + { //::SireMol::SelectorM< SireMol::Segment >::IDs + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegIdx > ( ::SireMol::SelectorM< SireMol::Segment >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::SelectorM< SireMol::Segment >::IDs ); + + SelectorM_Segment__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atom + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Segment >::*atom_function_type)( int ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Segment >::atom ); + + SelectorM_Segment__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atom + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Segment >::*atom_function_type)( ::QString const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Segment >::atom ); + + SelectorM_Segment__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atom + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::SelectorM< SireMol::Segment >::*atom_function_type)( ::SireMol::AtomID const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorM< SireMol::Segment >::atom ); + + SelectorM_Segment__exposer.def( + "atom" + , atom_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atoms + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Segment >::*atoms_function_type)( ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Segment >::atoms ); + + SelectorM_Segment__exposer.def( + "atoms" + , atoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atoms + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Segment >::*atoms_function_type)( int ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Segment >::atoms ); + + SelectorM_Segment__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atoms + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Segment >::*atoms_function_type)( ::SireBase::Slice const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Segment >::atoms ); + + SelectorM_Segment__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atoms + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Segment >::*atoms_function_type)( ::QList< long long > const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Segment >::atoms ); + + SelectorM_Segment__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atoms + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Segment >::*atoms_function_type)( ::QString const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Segment >::atoms ); + + SelectorM_Segment__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::atoms + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorM< SireMol::Segment >::*atoms_function_type)( ::SireMol::AtomID const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorM< SireMol::Segment >::atoms ); + + SelectorM_Segment__exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chain + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Segment >::*chain_function_type)( int ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Segment >::chain ); + + SelectorM_Segment__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chain + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Segment >::*chain_function_type)( ::QString const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Segment >::chain ); + + SelectorM_Segment__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chain + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::SelectorM< SireMol::Segment >::*chain_function_type)( ::SireMol::ChainID const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorM< SireMol::Segment >::chain ); + + SelectorM_Segment__exposer.def( + "chain" + , chain_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chains + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Segment >::*chains_function_type)( ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Segment >::chains ); + + SelectorM_Segment__exposer.def( + "chains" + , chains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chains + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Segment >::*chains_function_type)( int ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Segment >::chains ); + + SelectorM_Segment__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chains + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Segment >::*chains_function_type)( ::SireBase::Slice const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Segment >::chains ); + + SelectorM_Segment__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chains + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Segment >::*chains_function_type)( ::QList< long long > const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Segment >::chains ); + + SelectorM_Segment__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chains + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Segment >::*chains_function_type)( ::QString const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Segment >::chains ); + + SelectorM_Segment__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::chains + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorM< SireMol::Segment >::*chains_function_type)( ::SireMol::ChainID const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorM< SireMol::Segment >::chains ); + + SelectorM_Segment__exposer.def( + "chains" + , chains_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::count + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMol::SelectorM< SireMol::Segment >::count ); + + SelectorM_Segment__exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroup + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroup_function_type)( int ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroup ); + + SelectorM_Segment__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroup + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroup_function_type)( ::QString const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroup ); + + SelectorM_Segment__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroup + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroup_function_type)( ::SireMol::CGID const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroup ); + + SelectorM_Segment__exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroups + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroups_function_type)( ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroups ); + + SelectorM_Segment__exposer.def( + "cutGroups" + , cutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroups + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroups_function_type)( int ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroups ); + + SelectorM_Segment__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroups + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroups_function_type)( ::SireBase::Slice const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroups ); + + SelectorM_Segment__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroups + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroups_function_type)( ::QList< long long > const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroups ); + + SelectorM_Segment__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroups + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroups_function_type)( ::QString const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroups ); + + SelectorM_Segment__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::cutGroups + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorM< SireMol::Segment >::*cutGroups_function_type)( ::SireMol::CGID const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorM< SireMol::Segment >::cutGroups ); + + SelectorM_Segment__exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::evaluate + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::EvaluatorM ( ::SireMol::SelectorM< SireMol::Segment >::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMol::SelectorM< SireMol::Segment >::evaluate ); + + SelectorM_Segment__exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::indexes + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegIdx > ( ::SireMol::SelectorM< SireMol::Segment >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::SelectorM< SireMol::Segment >::indexes ); + + SelectorM_Segment__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::isEmpty + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef bool ( ::SireMol::SelectorM< SireMol::Segment >::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::SelectorM< SireMol::Segment >::isEmpty ); + + SelectorM_Segment__exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecule + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Segment >::*molecule_function_type)( int ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecule ); + + SelectorM_Segment__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecule + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Segment >::*molecule_function_type)( ::QString const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecule ); + + SelectorM_Segment__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecule + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Molecule ( ::SireMol::SelectorM< SireMol::Segment >::*molecule_function_type)( ::SireMol::MolID const & ) ; + molecule_function_type molecule_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecule ); + + SelectorM_Segment__exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecules + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Segment >::*molecules_function_type)( ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecules ); + + SelectorM_Segment__exposer.def( + "molecules" + , molecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecules + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Segment >::*molecules_function_type)( int ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecules ); + + SelectorM_Segment__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecules + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Segment >::*molecules_function_type)( ::SireBase::Slice const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecules ); + + SelectorM_Segment__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecules + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Segment >::*molecules_function_type)( ::QList< long long > const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecules ); + + SelectorM_Segment__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecules + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Segment >::*molecules_function_type)( ::QString const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecules ); + + SelectorM_Segment__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::molecules + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorM< SireMol::Segment >::*molecules_function_type)( ::SireMol::MolID const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorM< SireMol::Segment >::molecules ); + + SelectorM_Segment__exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::nAtoms + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::SelectorM< SireMol::Segment >::nAtoms ); + + SelectorM_Segment__exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::nChains + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::SelectorM< SireMol::Segment >::nChains ); + + SelectorM_Segment__exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::nCutGroups + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::SelectorM< SireMol::Segment >::nCutGroups ); + + SelectorM_Segment__exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::nMolecules + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMol::SelectorM< SireMol::Segment >::nMolecules ); + + SelectorM_Segment__exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::nResidues + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::SelectorM< SireMol::Segment >::nResidues ); + + SelectorM_Segment__exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::nSegments + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::SelectorM< SireMol::Segment >::nSegments ); + + SelectorM_Segment__exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::names + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegName > ( ::SireMol::SelectorM< SireMol::Segment >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::SelectorM< SireMol::Segment >::names ); + + SelectorM_Segment__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::numbers + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegIdx > ( ::SireMol::SelectorM< SireMol::Segment >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::SelectorM< SireMol::Segment >::numbers ); + + SelectorM_Segment__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Segment__exposer.def( bp::self != bp::self ); + { //::SireMol::SelectorM< SireMol::Segment >::operator() + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*__call___function_type)( int ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator() ); + + SelectorM_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::operator() + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*__call___function_type)( ::QString const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator() ); + + SelectorM_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::operator() + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*__call___function_type)( ::SireMol::Segment::ID const & ) const; + __call___function_type __call___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator() ); + + SelectorM_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::operator= + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > & ( ::SireMol::SelectorM< SireMol::Segment >::*assign_function_type)( ::SireMol::SelectorM< SireMol::Segment > const & ) ; + assign_function_type assign_function_value( &::SireMol::SelectorM< SireMol::Segment >::operator= ); + + SelectorM_Segment__exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + SelectorM_Segment__exposer.def( bp::self == bp::self ); + { //::SireMol::SelectorM< SireMol::Segment >::operator[] + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator[] ); + + SelectorM_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::operator[] + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator[] ); + + SelectorM_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::operator[] + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator[] ); + + SelectorM_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::operator[] + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator[] ); + + SelectorM_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::operator[] + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*__getitem___function_type)( ::SireMol::Segment::ID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorM< SireMol::Segment >::operator[] ); + + SelectorM_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("id") ) + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residue + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Segment >::*residue_function_type)( int ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Segment >::residue ); + + SelectorM_Segment__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residue + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Segment >::*residue_function_type)( ::QString const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Segment >::residue ); + + SelectorM_Segment__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residue + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::SelectorM< SireMol::Segment >::*residue_function_type)( ::SireMol::ResID const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorM< SireMol::Segment >::residue ); + + SelectorM_Segment__exposer.def( + "residue" + , residue_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residues + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Segment >::*residues_function_type)( ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Segment >::residues ); + + SelectorM_Segment__exposer.def( + "residues" + , residues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residues + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Segment >::*residues_function_type)( int ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Segment >::residues ); + + SelectorM_Segment__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residues + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Segment >::*residues_function_type)( ::SireBase::Slice const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Segment >::residues ); + + SelectorM_Segment__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residues + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Segment >::*residues_function_type)( ::QList< long long > const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Segment >::residues ); + + SelectorM_Segment__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residues + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Segment >::*residues_function_type)( ::QString const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Segment >::residues ); + + SelectorM_Segment__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::residues + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorM< SireMol::Segment >::*residues_function_type)( ::SireMol::ResID const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorM< SireMol::Segment >::residues ); + + SelectorM_Segment__exposer.def( + "residues" + , residues_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::search + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Segment >::*search_function_type)( ::QString const & ) const; + search_function_type search_function_value( &::SireMol::SelectorM< SireMol::Segment >::search ); + + SelectorM_Segment__exposer.def( + "search" + , search_function_value + , ( bp::arg("search_string") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segment + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*segment_function_type)( int ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Segment >::segment ); + + SelectorM_Segment__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segment + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*segment_function_type)( ::QString const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Segment >::segment ); + + SelectorM_Segment__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segment + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::SelectorM< SireMol::Segment >::*segment_function_type)( ::SireMol::SegID const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorM< SireMol::Segment >::segment ); + + SelectorM_Segment__exposer.def( + "segment" + , segment_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segments + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*segments_function_type)( ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Segment >::segments ); + + SelectorM_Segment__exposer.def( + "segments" + , segments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segments + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*segments_function_type)( int ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Segment >::segments ); + + SelectorM_Segment__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segments + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*segments_function_type)( ::SireBase::Slice const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Segment >::segments ); + + SelectorM_Segment__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segments + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*segments_function_type)( ::QList< long long > const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Segment >::segments ); + + SelectorM_Segment__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segments + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*segments_function_type)( ::QString const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Segment >::segments ); + + SelectorM_Segment__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::segments + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorM< SireMol::Segment >::*segments_function_type)( ::SireMol::SegID const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorM< SireMol::Segment >::segments ); + + SelectorM_Segment__exposer.def( + "segments" + , segments_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::size + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef int ( ::SireMol::SelectorM< SireMol::Segment >::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMol::SelectorM< SireMol::Segment >::size ); + + SelectorM_Segment__exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::toList + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::SelectorM< SireMol::Segment >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::SelectorM< SireMol::Segment >::toList ); + + SelectorM_Segment__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::toMoleculeGroup + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::MoleculeGroup ( ::SireMol::SelectorM< SireMol::Segment >::*toMoleculeGroup_function_type)( ) const; + toMoleculeGroup_function_type toMoleculeGroup_function_value( &::SireMol::SelectorM< SireMol::Segment >::toMoleculeGroup ); + + SelectorM_Segment__exposer.def( + "toMoleculeGroup" + , toMoleculeGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::toSelectResult + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::SireMol::SelectResult ( ::SireMol::SelectorM< SireMol::Segment >::*toSelectResult_function_type)( ) const; + toSelectResult_function_type toSelectResult_function_value( &::SireMol::SelectorM< SireMol::Segment >::toSelectResult ); + + SelectorM_Segment__exposer.def( + "toSelectResult" + , toSelectResult_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::toString + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef ::QString ( ::SireMol::SelectorM< SireMol::Segment >::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::SelectorM< SireMol::Segment >::toString ); + + SelectorM_Segment__exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorM< SireMol::Segment >::typeName + + typedef SireMol::SelectorM< SireMol::Segment > exported_class_t; + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::SelectorM< SireMol::Segment >::typeName ); + + SelectorM_Segment__exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorM_Segment__exposer.staticmethod( "typeName" ); + SelectorM_Segment__exposer.def( "__copy__", &__copy__); + SelectorM_Segment__exposer.def( "__deepcopy__", &__copy__); + SelectorM_Segment__exposer.def( "clone", &__copy__); + SelectorM_Segment__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Segment__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::SelectorM >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorM_Segment__exposer.def_pickle(sire_pickle_suite< ::SireMol::SelectorM >()); + SelectorM_Segment__exposer.def( "__str__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Segment__exposer.def( "__repr__", &__str__< ::SireMol::SelectorM > ); + SelectorM_Segment__exposer.def( "__len__", &__len_size< ::SireMol::SelectorM > ); + } + +} diff --git a/wrapper/Mol/SelectorM_Segment_.pypp.hpp b/wrapper/Mol/SelectorM_Segment_.pypp.hpp new file mode 100644 index 000000000..54937aa04 --- /dev/null +++ b/wrapper/Mol/SelectorM_Segment_.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorM_Segment__hpp__pyplusplus_wrapper +#define SelectorM_Segment__hpp__pyplusplus_wrapper + +void register_SelectorM_Segment__class(); + +#endif//SelectorM_Segment__hpp__pyplusplus_wrapper diff --git a/wrapper/Mol/SelectorMol.pypp.cpp b/wrapper/Mol/SelectorMol.pypp.cpp new file mode 100644 index 000000000..39de8789a --- /dev/null +++ b/wrapper/Mol/SelectorMol.pypp.cpp @@ -0,0 +1,1256 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "SelectorMol.pypp.hpp" + +namespace bp = boost::python; + +#include "SireError/errors.h" + +#include "SireID/index.h" + +#include "SireMol/errors.h" + +#include "SireStream/datastream.h" + +#include "SireStream/shareddatastream.h" + +#include "atomid.h" + +#include "cgid.h" + +#include "chainid.h" + +#include "evaluatorm.h" + +#include "moleculegroup.h" + +#include "moleculegroups.h" + +#include "molecules.h" + +#include "molid.h" + +#include "molidx.h" + +#include "molname.h" + +#include "molnum.h" + +#include "resid.h" + +#include "segid.h" + +#include "selectorm.hpp" + +#include "selectormol.h" + +#include "selectormol.h" + +SireMol::SelectorMol __copy__(const SireMol::SelectorMol &other){ return SireMol::SelectorMol(other); } + +#include "Qt/qdatastream.hpp" + +#include "Helpers/str.hpp" + +#include "Helpers/release_gil_policy.hpp" + +#include "Helpers/len.hpp" + +void register_SelectorMol_class(){ + + { //::SireMol::SelectorMol + typedef bp::class_< SireMol::SelectorMol, bp::bases< SireBase::Property > > SelectorMol_exposer_t; + SelectorMol_exposer_t SelectorMol_exposer = SelectorMol_exposer_t( "SelectorMol", "This class provides a Selector-type interface to a\ncollection of molecules.\n", bp::init< >("") ); + bp::scope SelectorMol_scope( SelectorMol_exposer ); + SelectorMol_exposer.def( bp::init< SireMol::MoleculeView const & >(( bp::arg("mol") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::Molecules const & >(( bp::arg("mols") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::MoleculeGroup const & >(( bp::arg("mols") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::MolGroupsBase const & >(( bp::arg("mols") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::SelectResult const & >(( bp::arg("mols") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::SelectorM< SireMol::Atom > const & >(( bp::arg("other") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::SelectorM< SireMol::Residue > const & >(( bp::arg("other") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::SelectorM< SireMol::Chain > const & >(( bp::arg("other") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::SelectorM< SireMol::Segment > const & >(( bp::arg("other") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::SelectorM< SireMol::CutGroup > const & >(( bp::arg("other") ), "") ); + SelectorMol_exposer.def( bp::init< SireMol::SelectorMol const & >(( bp::arg("other") ), "") ); + { //::SireMol::SelectorMol::IDs + + typedef ::QList< SireMol::MolNum > ( ::SireMol::SelectorMol::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::SelectorMol::IDs ); + + SelectorMol_exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atom + + typedef ::SireMol::Atom ( ::SireMol::SelectorMol::*atom_function_type)( int ) const; + atom_function_type atom_function_value( &::SireMol::SelectorMol::atom ); + + SelectorMol_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atom + + typedef ::SireMol::Atom ( ::SireMol::SelectorMol::*atom_function_type)( ::QString const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorMol::atom ); + + SelectorMol_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atom + + typedef ::SireMol::Atom ( ::SireMol::SelectorMol::*atom_function_type)( ::SireMol::AtomID const & ) const; + atom_function_type atom_function_value( &::SireMol::SelectorMol::atom ); + + SelectorMol_exposer.def( + "atom" + , atom_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); + + SelectorMol_exposer.def( + "atoms" + , atoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( int ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); + + SelectorMol_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::SireBase::Slice const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); + + SelectorMol_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::QList< long long > const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); + + SelectorMol_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::QString const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); + + SelectorMol_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::atoms + + typedef ::SireMol::SelectorM< SireMol::Atom > ( ::SireMol::SelectorMol::*atoms_function_type)( ::SireMol::AtomID const & ) const; + atoms_function_type atoms_function_value( &::SireMol::SelectorMol::atoms ); + + SelectorMol_exposer.def( + "atoms" + , atoms_function_value + , ( bp::arg("atomid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chain + + typedef ::SireMol::Chain ( ::SireMol::SelectorMol::*chain_function_type)( int ) const; + chain_function_type chain_function_value( &::SireMol::SelectorMol::chain ); + + SelectorMol_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chain + + typedef ::SireMol::Chain ( ::SireMol::SelectorMol::*chain_function_type)( ::QString const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorMol::chain ); + + SelectorMol_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chain + + typedef ::SireMol::Chain ( ::SireMol::SelectorMol::*chain_function_type)( ::SireMol::ChainID const & ) const; + chain_function_type chain_function_value( &::SireMol::SelectorMol::chain ); + + SelectorMol_exposer.def( + "chain" + , chain_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ) const; + chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); + + SelectorMol_exposer.def( + "chains" + , chains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( int ) const; + chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); + + SelectorMol_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::SireBase::Slice const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); + + SelectorMol_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::QList< long long > const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); + + SelectorMol_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::QString const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); + + SelectorMol_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::chains + + typedef ::SireMol::SelectorM< SireMol::Chain > ( ::SireMol::SelectorMol::*chains_function_type)( ::SireMol::ChainID const & ) const; + chains_function_type chains_function_value( &::SireMol::SelectorMol::chains ); + + SelectorMol_exposer.def( + "chains" + , chains_function_value + , ( bp::arg("chainid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::contains + + typedef bool ( ::SireMol::SelectorMol::*contains_function_type)( ::SireMol::MolNum const & ) const; + contains_function_type contains_function_value( &::SireMol::SelectorMol::contains ); + + SelectorMol_exposer.def( + "contains" + , contains_function_value + , ( bp::arg("molnum") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::count + + typedef int ( ::SireMol::SelectorMol::*count_function_type)( ) const; + count_function_type count_function_value( &::SireMol::SelectorMol::count ); + + SelectorMol_exposer.def( + "count" + , count_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMol::SelectorMol::*cutGroup_function_type)( int ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorMol::cutGroup ); + + SelectorMol_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMol::SelectorMol::*cutGroup_function_type)( ::QString const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorMol::cutGroup ); + + SelectorMol_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroup + + typedef ::SireMol::CutGroup ( ::SireMol::SelectorMol::*cutGroup_function_type)( ::SireMol::CGID const & ) const; + cutGroup_function_type cutGroup_function_value( &::SireMol::SelectorMol::cutGroup ); + + SelectorMol_exposer.def( + "cutGroup" + , cutGroup_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); + + SelectorMol_exposer.def( + "cutGroups" + , cutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( int ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); + + SelectorMol_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::SireBase::Slice const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); + + SelectorMol_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::QList< long long > const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); + + SelectorMol_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::QString const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); + + SelectorMol_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::cutGroups + + typedef ::SireMol::SelectorM< SireMol::CutGroup > ( ::SireMol::SelectorMol::*cutGroups_function_type)( ::SireMol::CGID const & ) const; + cutGroups_function_type cutGroups_function_value( &::SireMol::SelectorMol::cutGroups ); + + SelectorMol_exposer.def( + "cutGroups" + , cutGroups_function_value + , ( bp::arg("cgid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::evaluate + + typedef ::SireMol::EvaluatorM ( ::SireMol::SelectorMol::*evaluate_function_type)( ) const; + evaluate_function_type evaluate_function_value( &::SireMol::SelectorMol::evaluate ); + + SelectorMol_exposer.def( + "evaluate" + , evaluate_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::indexes + + typedef ::QList< SireMol::MolIdx > ( ::SireMol::SelectorMol::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::SelectorMol::indexes ); + + SelectorMol_exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::isEmpty + + typedef bool ( ::SireMol::SelectorMol::*isEmpty_function_type)( ) const; + isEmpty_function_type isEmpty_function_value( &::SireMol::SelectorMol::isEmpty ); + + SelectorMol_exposer.def( + "isEmpty" + , isEmpty_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molNums + + typedef ::QVector< SireMol::MolNum > ( ::SireMol::SelectorMol::*molNums_function_type)( ) const; + molNums_function_type molNums_function_value( &::SireMol::SelectorMol::molNums ); + + SelectorMol_exposer.def( + "molNums" + , molNums_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecule + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( int ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); + + SelectorMol_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecule + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::QString const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); + + SelectorMol_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecule + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolIdx const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); + + SelectorMol_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molidx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecule + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolName const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); + + SelectorMol_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molname") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecule + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolNum const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); + + SelectorMol_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molnum") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecule + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*molecule_function_type)( ::SireMol::MolID const & ) const; + molecule_function_type molecule_function_value( &::SireMol::SelectorMol::molecule ); + + SelectorMol_exposer.def( + "molecule" + , molecule_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( int ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireBase::Slice const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::QList< long long > const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::QString const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolIdx const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molidx") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolName const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molname") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolNum const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molnum") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::molecules + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*molecules_function_type)( ::SireMol::MolID const & ) const; + molecules_function_type molecules_function_value( &::SireMol::SelectorMol::molecules ); + + SelectorMol_exposer.def( + "molecules" + , molecules_function_value + , ( bp::arg("molid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::nAtoms + + typedef int ( ::SireMol::SelectorMol::*nAtoms_function_type)( ) const; + nAtoms_function_type nAtoms_function_value( &::SireMol::SelectorMol::nAtoms ); + + SelectorMol_exposer.def( + "nAtoms" + , nAtoms_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::nChains + + typedef int ( ::SireMol::SelectorMol::*nChains_function_type)( ) const; + nChains_function_type nChains_function_value( &::SireMol::SelectorMol::nChains ); + + SelectorMol_exposer.def( + "nChains" + , nChains_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::nCutGroups + + typedef int ( ::SireMol::SelectorMol::*nCutGroups_function_type)( ) const; + nCutGroups_function_type nCutGroups_function_value( &::SireMol::SelectorMol::nCutGroups ); + + SelectorMol_exposer.def( + "nCutGroups" + , nCutGroups_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::nMolecules + + typedef int ( ::SireMol::SelectorMol::*nMolecules_function_type)( ) const; + nMolecules_function_type nMolecules_function_value( &::SireMol::SelectorMol::nMolecules ); + + SelectorMol_exposer.def( + "nMolecules" + , nMolecules_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::nResidues + + typedef int ( ::SireMol::SelectorMol::*nResidues_function_type)( ) const; + nResidues_function_type nResidues_function_value( &::SireMol::SelectorMol::nResidues ); + + SelectorMol_exposer.def( + "nResidues" + , nResidues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::nSegments + + typedef int ( ::SireMol::SelectorMol::*nSegments_function_type)( ) const; + nSegments_function_type nSegments_function_value( &::SireMol::SelectorMol::nSegments ); + + SelectorMol_exposer.def( + "nSegments" + , nSegments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::names + + typedef ::QList< SireMol::MolName > ( ::SireMol::SelectorMol::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::SelectorMol::names ); + + SelectorMol_exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::numbers + + typedef ::QList< SireMol::MolNum > ( ::SireMol::SelectorMol::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::SelectorMol::numbers ); + + SelectorMol_exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorMol_exposer.def( bp::self != bp::self ); + { //::SireMol::SelectorMol::operator= + + typedef ::SireMol::SelectorMol & ( ::SireMol::SelectorMol::*assign_function_type)( ::SireMol::SelectorMol const & ) ; + assign_function_type assign_function_value( &::SireMol::SelectorMol::operator= ); + + SelectorMol_exposer.def( + "assign" + , assign_function_value + , ( bp::arg("other") ) + , bp::return_self< >() + , "" ); + + } + SelectorMol_exposer.def( bp::self == bp::self ); + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::SelectorMol ( ::SireMol::SelectorMol::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*__getitem___function_type)( ::SireMol::MolIdx const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("molidx") ) + , "" ); + + } + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*__getitem___function_type)( ::SireMol::MolName const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("molname") ) + , "" ); + + } + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*__getitem___function_type)( ::SireMol::MolNum const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("molnum") ) + , "" ); + + } + { //::SireMol::SelectorMol::operator[] + + typedef ::SireMol::Molecule ( ::SireMol::SelectorMol::*__getitem___function_type)( ::SireMol::MolID const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::SelectorMol::operator[] ); + + SelectorMol_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("molid") ) + , "" ); + + } + { //::SireMol::SelectorMol::residue + + typedef ::SireMol::Residue ( ::SireMol::SelectorMol::*residue_function_type)( int ) const; + residue_function_type residue_function_value( &::SireMol::SelectorMol::residue ); + + SelectorMol_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residue + + typedef ::SireMol::Residue ( ::SireMol::SelectorMol::*residue_function_type)( ::QString const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorMol::residue ); + + SelectorMol_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residue + + typedef ::SireMol::Residue ( ::SireMol::SelectorMol::*residue_function_type)( ::SireMol::ResID const & ) const; + residue_function_type residue_function_value( &::SireMol::SelectorMol::residue ); + + SelectorMol_exposer.def( + "residue" + , residue_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ) const; + residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); + + SelectorMol_exposer.def( + "residues" + , residues_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( int ) const; + residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); + + SelectorMol_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::SireBase::Slice const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); + + SelectorMol_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::QList< long long > const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); + + SelectorMol_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::QString const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); + + SelectorMol_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::residues + + typedef ::SireMol::SelectorM< SireMol::Residue > ( ::SireMol::SelectorMol::*residues_function_type)( ::SireMol::ResID const & ) const; + residues_function_type residues_function_value( &::SireMol::SelectorMol::residues ); + + SelectorMol_exposer.def( + "residues" + , residues_function_value + , ( bp::arg("resid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::search + + typedef ::SireMol::SelectResult ( ::SireMol::SelectorMol::*search_function_type)( ::QString const & ) const; + search_function_type search_function_value( &::SireMol::SelectorMol::search ); + + SelectorMol_exposer.def( + "search" + , search_function_value + , ( bp::arg("search_string") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segment + + typedef ::SireMol::Segment ( ::SireMol::SelectorMol::*segment_function_type)( int ) const; + segment_function_type segment_function_value( &::SireMol::SelectorMol::segment ); + + SelectorMol_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segment + + typedef ::SireMol::Segment ( ::SireMol::SelectorMol::*segment_function_type)( ::QString const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorMol::segment ); + + SelectorMol_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segment + + typedef ::SireMol::Segment ( ::SireMol::SelectorMol::*segment_function_type)( ::SireMol::SegID const & ) const; + segment_function_type segment_function_value( &::SireMol::SelectorMol::segment ); + + SelectorMol_exposer.def( + "segment" + , segment_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ) const; + segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); + + SelectorMol_exposer.def( + "segments" + , segments_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( int ) const; + segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); + + SelectorMol_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::SireBase::Slice const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); + + SelectorMol_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("slice") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::QList< long long > const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); + + SelectorMol_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("idxs") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::QString const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); + + SelectorMol_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("name") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::segments + + typedef ::SireMol::SelectorM< SireMol::Segment > ( ::SireMol::SelectorMol::*segments_function_type)( ::SireMol::SegID const & ) const; + segments_function_type segments_function_value( &::SireMol::SelectorMol::segments ); + + SelectorMol_exposer.def( + "segments" + , segments_function_value + , ( bp::arg("segid") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::size + + typedef int ( ::SireMol::SelectorMol::*size_function_type)( ) const; + size_function_type size_function_value( &::SireMol::SelectorMol::size ); + + SelectorMol_exposer.def( + "size" + , size_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::toList + + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::SelectorMol::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::SelectorMol::toList ); + + SelectorMol_exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::toMoleculeGroup + + typedef ::SireMol::MoleculeGroup ( ::SireMol::SelectorMol::*toMoleculeGroup_function_type)( ) const; + toMoleculeGroup_function_type toMoleculeGroup_function_value( &::SireMol::SelectorMol::toMoleculeGroup ); + + SelectorMol_exposer.def( + "toMoleculeGroup" + , toMoleculeGroup_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::toSelectResult + + typedef ::SireMol::SelectResult ( ::SireMol::SelectorMol::*toSelectResult_function_type)( ) const; + toSelectResult_function_type toSelectResult_function_value( &::SireMol::SelectorMol::toSelectResult ); + + SelectorMol_exposer.def( + "toSelectResult" + , toSelectResult_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::toString + + typedef ::QString ( ::SireMol::SelectorMol::*toString_function_type)( ) const; + toString_function_type toString_function_value( &::SireMol::SelectorMol::toString ); + + SelectorMol_exposer.def( + "toString" + , toString_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::typeName + + typedef char const * ( *typeName_function_type )( ); + typeName_function_type typeName_function_value( &::SireMol::SelectorMol::typeName ); + + SelectorMol_exposer.def( + "typeName" + , typeName_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::SelectorMol::what + + typedef char const * ( ::SireMol::SelectorMol::*what_function_type)( ) const; + what_function_type what_function_value( &::SireMol::SelectorMol::what ); + + SelectorMol_exposer.def( + "what" + , what_function_value + , bp::release_gil_policy() + , "" ); + + } + SelectorMol_exposer.staticmethod( "typeName" ); + SelectorMol_exposer.def( "__copy__", &__copy__); + SelectorMol_exposer.def( "__deepcopy__", &__copy__); + SelectorMol_exposer.def( "clone", &__copy__); + SelectorMol_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::SelectorMol >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorMol_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::SelectorMol >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + SelectorMol_exposer.def_pickle(sire_pickle_suite< ::SireMol::SelectorMol >()); + SelectorMol_exposer.def( "__str__", &__str__< ::SireMol::SelectorMol > ); + SelectorMol_exposer.def( "__repr__", &__str__< ::SireMol::SelectorMol > ); + SelectorMol_exposer.def( "__len__", &__len_size< ::SireMol::SelectorMol > ); + } + +} diff --git a/wrapper/Mol/SelectorMol.pypp.hpp b/wrapper/Mol/SelectorMol.pypp.hpp new file mode 100644 index 000000000..46d8b4799 --- /dev/null +++ b/wrapper/Mol/SelectorMol.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef SelectorMol_hpp__pyplusplus_wrapper +#define SelectorMol_hpp__pyplusplus_wrapper + +void register_SelectorMol_class(); + +#endif//SelectorMol_hpp__pyplusplus_wrapper diff --git a/wrapper/Mol/Selector_Atom_.pypp.cpp b/wrapper/Mol/Selector_Atom_.pypp.cpp index 377c5e6cc..7102afd83 100644 --- a/wrapper/Mol/Selector_Atom_.pypp.cpp +++ b/wrapper/Mol/Selector_Atom_.pypp.cpp @@ -47,8 +47,12 @@ namespace bp = boost::python; SireMol::Selector __copy__(const SireMol::Selector &other){ return SireMol::Selector(other); } +#include "Qt/qdatastream.hpp" + #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Selector_Atom__class(){ @@ -63,6 +67,19 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::Atom::ID const & >(( bp::arg("moldata"), bp::arg("viewid") ), "") ); Selector_Atom__exposer.def( bp::init< SireMol::MoleculeData const &, QList< SireMol::AtomIdx > const & >(( bp::arg("moldata"), bp::arg("idxs") ), "") ); Selector_Atom__exposer.def( bp::init< SireMol::Selector< SireMol::Atom > const & >(( bp::arg("other") ), "") ); + { //::SireMol::Selector< SireMol::Atom >::IDs + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::Selector< SireMol::Atom >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::Selector< SireMol::Atom >::IDs ); + + Selector_Atom__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } { //::SireMol::Selector< SireMol::Atom >::add typedef SireMol::Selector< SireMol::Atom > exported_class_t; @@ -73,6 +90,7 @@ void register_Selector_Atom__class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -86,6 +104,7 @@ void register_Selector_Atom__class(){ "add" , add_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -99,6 +118,7 @@ void register_Selector_Atom__class(){ "add" , add_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -112,6 +132,7 @@ void register_Selector_Atom__class(){ "contains" , contains_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -125,6 +146,7 @@ void register_Selector_Atom__class(){ "contains" , contains_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -138,6 +160,7 @@ void register_Selector_Atom__class(){ "contains" , contains_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -150,6 +173,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "" ); } @@ -163,6 +187,7 @@ void register_Selector_Atom__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -176,6 +201,7 @@ void register_Selector_Atom__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -189,6 +215,7 @@ void register_Selector_Atom__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -202,6 +229,7 @@ void register_Selector_Atom__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -215,6 +243,7 @@ void register_Selector_Atom__class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -228,6 +257,20 @@ void register_Selector_Atom__class(){ "index" , index_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::indexes + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomIdx > ( ::SireMol::Selector< SireMol::Atom >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::Selector< SireMol::Atom >::indexes ); + + Selector_Atom__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() , "" ); } @@ -241,6 +284,7 @@ void register_Selector_Atom__class(){ "intersection" , intersection_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -254,6 +298,7 @@ void register_Selector_Atom__class(){ "intersection" , intersection_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -267,6 +312,7 @@ void register_Selector_Atom__class(){ "intersection" , intersection_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -280,6 +326,7 @@ void register_Selector_Atom__class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -293,6 +340,7 @@ void register_Selector_Atom__class(){ "intersects" , intersects_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -306,6 +354,7 @@ void register_Selector_Atom__class(){ "intersects" , intersects_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -318,6 +367,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "" ); } @@ -330,6 +380,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -342,6 +393,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -355,6 +407,7 @@ void register_Selector_Atom__class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -367,6 +420,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "" ); } @@ -380,6 +434,7 @@ void register_Selector_Atom__class(){ "move" , move_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -393,6 +448,7 @@ void register_Selector_Atom__class(){ "move" , move_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -405,6 +461,33 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::names + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomName > ( ::SireMol::Selector< SireMol::Atom >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::Selector< SireMol::Atom >::names ); + + Selector_Atom__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::numbers + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::QList< SireMol::AtomNum > ( ::SireMol::Selector< SireMol::Atom >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::Selector< SireMol::Atom >::numbers ); + + Selector_Atom__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() , "" ); } @@ -421,6 +504,19 @@ void register_Selector_Atom__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Atom ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::SireID::Index const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Selector< SireMol::Atom >::operator() @@ -434,6 +530,97 @@ void register_Selector_Atom__class(){ , ( bp::arg("i"), bp::arg("j") ) , "" ); + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::SireBase::Slice const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::QList< long long > const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::SireMol::AtomID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::SireMol::ResID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::SireMol::CGID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::SireMol::ChainID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator() + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::Selector< SireMol::Atom >::*__call___function_type)( ::SireMol::SegID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Atom >::operator() ); + + Selector_Atom__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("segid") ) + , "" ); + } Selector_Atom__exposer.def( bp::self + bp::self ); Selector_Atom__exposer.def( bp::self + bp::other< SireMol::AtomID >() ); @@ -482,6 +669,45 @@ void register_Selector_Atom__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Atom >::operator[] + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Atom >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Atom >::operator[] ); + + Selector_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator[] + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Atom >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Atom >::operator[] ); + + Selector_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::operator[] + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Atom >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Atom >::operator[] ); + + Selector_Atom__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + } { //::SireMol::Selector< SireMol::Atom >::operator[] @@ -570,6 +796,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -582,6 +809,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -594,6 +822,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "" ); } @@ -607,6 +836,7 @@ void register_Selector_Atom__class(){ "selection" , selection_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -620,6 +850,7 @@ void register_Selector_Atom__class(){ "selection" , selection_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -632,6 +863,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "" ); } @@ -645,6 +877,7 @@ void register_Selector_Atom__class(){ "selector" , selector_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -658,6 +891,7 @@ void register_Selector_Atom__class(){ "selector" , selector_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -671,6 +905,7 @@ void register_Selector_Atom__class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -684,6 +919,7 @@ void register_Selector_Atom__class(){ "subtract" , subtract_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -697,6 +933,33 @@ void register_Selector_Atom__class(){ "subtract" , subtract_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::toList + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::Selector< SireMol::Atom >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::Selector< SireMol::Atom >::toList ); + + Selector_Atom__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Atom >::toSelector + + typedef SireMol::Selector< SireMol::Atom > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Atom >::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Selector< SireMol::Atom >::toSelector ); + + Selector_Atom__exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() , "" ); } @@ -709,6 +972,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -721,6 +985,7 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -728,6 +993,11 @@ void register_Selector_Atom__class(){ Selector_Atom__exposer.def( "__copy__", &__copy__); Selector_Atom__exposer.def( "__deepcopy__", &__copy__); Selector_Atom__exposer.def( "clone", &__copy__); + Selector_Atom__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Atom__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Atom__exposer.def_pickle(sire_pickle_suite< ::SireMol::Selector >()); Selector_Atom__exposer.def( "__str__", &__str__< ::SireMol::Selector > ); Selector_Atom__exposer.def( "__repr__", &__str__< ::SireMol::Selector > ); Selector_Atom__exposer.def( "__len__", &__len_size< ::SireMol::Selector > ); diff --git a/wrapper/Mol/Selector_Chain_.pypp.cpp b/wrapper/Mol/Selector_Chain_.pypp.cpp index 543142c90..93f5c955b 100644 --- a/wrapper/Mol/Selector_Chain_.pypp.cpp +++ b/wrapper/Mol/Selector_Chain_.pypp.cpp @@ -39,8 +39,12 @@ namespace bp = boost::python; SireMol::Selector __copy__(const SireMol::Selector &other){ return SireMol::Selector(other); } +#include "Qt/qdatastream.hpp" + #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Selector_Chain__class(){ @@ -55,6 +59,19 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::Chain::ID const & >(( bp::arg("moldata"), bp::arg("viewid") ), "") ); Selector_Chain__exposer.def( bp::init< SireMol::MoleculeData const &, QList< SireMol::ChainIdx > const & >(( bp::arg("moldata"), bp::arg("idxs") ), "") ); Selector_Chain__exposer.def( bp::init< SireMol::Selector< SireMol::Chain > const & >(( bp::arg("other") ), "") ); + { //::SireMol::Selector< SireMol::Chain >::IDs + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::Selector< SireMol::Chain >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::Selector< SireMol::Chain >::IDs ); + + Selector_Chain__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } { //::SireMol::Selector< SireMol::Chain >::add typedef SireMol::Selector< SireMol::Chain > exported_class_t; @@ -65,6 +82,7 @@ void register_Selector_Chain__class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -78,6 +96,7 @@ void register_Selector_Chain__class(){ "add" , add_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -91,6 +110,7 @@ void register_Selector_Chain__class(){ "add" , add_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -104,6 +124,7 @@ void register_Selector_Chain__class(){ "contains" , contains_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -117,6 +138,7 @@ void register_Selector_Chain__class(){ "contains" , contains_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -130,6 +152,7 @@ void register_Selector_Chain__class(){ "contains" , contains_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -142,6 +165,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +179,7 @@ void register_Selector_Chain__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -168,6 +193,7 @@ void register_Selector_Chain__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -181,6 +207,7 @@ void register_Selector_Chain__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -194,6 +221,7 @@ void register_Selector_Chain__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -207,6 +235,7 @@ void register_Selector_Chain__class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -220,6 +249,20 @@ void register_Selector_Chain__class(){ "index" , index_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::indexes + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::Selector< SireMol::Chain >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::Selector< SireMol::Chain >::indexes ); + + Selector_Chain__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() , "" ); } @@ -233,6 +276,7 @@ void register_Selector_Chain__class(){ "intersection" , intersection_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +290,7 @@ void register_Selector_Chain__class(){ "intersection" , intersection_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +304,7 @@ void register_Selector_Chain__class(){ "intersection" , intersection_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +318,7 @@ void register_Selector_Chain__class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -285,6 +332,7 @@ void register_Selector_Chain__class(){ "intersects" , intersects_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -298,6 +346,7 @@ void register_Selector_Chain__class(){ "intersects" , intersects_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +359,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "" ); } @@ -322,6 +372,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -334,6 +385,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -347,6 +399,7 @@ void register_Selector_Chain__class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -359,6 +412,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "" ); } @@ -372,6 +426,7 @@ void register_Selector_Chain__class(){ "move" , move_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -385,6 +440,7 @@ void register_Selector_Chain__class(){ "move" , move_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -397,6 +453,33 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::names + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainName > ( ::SireMol::Selector< SireMol::Chain >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::Selector< SireMol::Chain >::names ); + + Selector_Chain__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::numbers + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::QList< SireMol::ChainIdx > ( ::SireMol::Selector< SireMol::Chain >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::Selector< SireMol::Chain >::numbers ); + + Selector_Chain__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() , "" ); } @@ -413,6 +496,19 @@ void register_Selector_Chain__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Chain ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::SireID::Index const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Selector< SireMol::Chain >::operator() @@ -426,6 +522,97 @@ void register_Selector_Chain__class(){ , ( bp::arg("i"), bp::arg("j") ) , "" ); + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::SireBase::Slice const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::QList< long long > const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::SireMol::AtomID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::SireMol::ResID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::SireMol::CGID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::SireMol::ChainID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator() + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::Selector< SireMol::Chain >::*__call___function_type)( ::SireMol::SegID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Chain >::operator() ); + + Selector_Chain__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("segid") ) + , "" ); + } Selector_Chain__exposer.def( bp::self + bp::self ); Selector_Chain__exposer.def( bp::self + bp::other< SireMol::ChainID >() ); @@ -474,6 +661,45 @@ void register_Selector_Chain__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Chain >::operator[] + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Chain >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Chain >::operator[] ); + + Selector_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator[] + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Chain >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Chain >::operator[] ); + + Selector_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::operator[] + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Chain >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Chain >::operator[] ); + + Selector_Chain__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + } { //::SireMol::Selector< SireMol::Chain >::operator[] @@ -562,6 +788,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -574,6 +801,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -586,6 +814,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "" ); } @@ -599,6 +828,7 @@ void register_Selector_Chain__class(){ "selection" , selection_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -612,6 +842,7 @@ void register_Selector_Chain__class(){ "selection" , selection_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -624,6 +855,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "" ); } @@ -637,6 +869,7 @@ void register_Selector_Chain__class(){ "selector" , selector_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -650,6 +883,7 @@ void register_Selector_Chain__class(){ "selector" , selector_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -663,6 +897,7 @@ void register_Selector_Chain__class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -676,6 +911,7 @@ void register_Selector_Chain__class(){ "subtract" , subtract_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -689,6 +925,33 @@ void register_Selector_Chain__class(){ "subtract" , subtract_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::toList + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::Selector< SireMol::Chain >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::Selector< SireMol::Chain >::toList ); + + Selector_Chain__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Chain >::toSelector + + typedef SireMol::Selector< SireMol::Chain > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Chain >::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Selector< SireMol::Chain >::toSelector ); + + Selector_Chain__exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() , "" ); } @@ -701,6 +964,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -713,6 +977,7 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -720,6 +985,11 @@ void register_Selector_Chain__class(){ Selector_Chain__exposer.def( "__copy__", &__copy__); Selector_Chain__exposer.def( "__deepcopy__", &__copy__); Selector_Chain__exposer.def( "clone", &__copy__); + Selector_Chain__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Chain__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Chain__exposer.def_pickle(sire_pickle_suite< ::SireMol::Selector >()); Selector_Chain__exposer.def( "__str__", &__str__< ::SireMol::Selector > ); Selector_Chain__exposer.def( "__repr__", &__str__< ::SireMol::Selector > ); Selector_Chain__exposer.def( "__len__", &__len_size< ::SireMol::Selector > ); diff --git a/wrapper/Mol/Selector_CutGroup_.pypp.cpp b/wrapper/Mol/Selector_CutGroup_.pypp.cpp index f9e1a06d8..c89b3ed16 100644 --- a/wrapper/Mol/Selector_CutGroup_.pypp.cpp +++ b/wrapper/Mol/Selector_CutGroup_.pypp.cpp @@ -39,8 +39,12 @@ namespace bp = boost::python; SireMol::Selector __copy__(const SireMol::Selector &other){ return SireMol::Selector(other); } +#include "Qt/qdatastream.hpp" + #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Selector_CutGroup__class(){ @@ -55,6 +59,19 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::CutGroup::ID const & >(( bp::arg("moldata"), bp::arg("viewid") ), "") ); Selector_CutGroup__exposer.def( bp::init< SireMol::MoleculeData const &, QList< SireMol::CGIdx > const & >(( bp::arg("moldata"), bp::arg("idxs") ), "") ); Selector_CutGroup__exposer.def( bp::init< SireMol::Selector< SireMol::CutGroup > const & >(( bp::arg("other") ), "") ); + { //::SireMol::Selector< SireMol::CutGroup >::IDs + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGIdx > ( ::SireMol::Selector< SireMol::CutGroup >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::Selector< SireMol::CutGroup >::IDs ); + + Selector_CutGroup__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } { //::SireMol::Selector< SireMol::CutGroup >::add typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; @@ -65,6 +82,7 @@ void register_Selector_CutGroup__class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -78,6 +96,7 @@ void register_Selector_CutGroup__class(){ "add" , add_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -91,6 +110,7 @@ void register_Selector_CutGroup__class(){ "add" , add_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -104,6 +124,7 @@ void register_Selector_CutGroup__class(){ "contains" , contains_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -117,6 +138,7 @@ void register_Selector_CutGroup__class(){ "contains" , contains_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -130,6 +152,7 @@ void register_Selector_CutGroup__class(){ "contains" , contains_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -142,6 +165,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +179,7 @@ void register_Selector_CutGroup__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -168,6 +193,7 @@ void register_Selector_CutGroup__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -181,6 +207,7 @@ void register_Selector_CutGroup__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -194,6 +221,7 @@ void register_Selector_CutGroup__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -207,6 +235,7 @@ void register_Selector_CutGroup__class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -220,6 +249,20 @@ void register_Selector_CutGroup__class(){ "index" , index_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::indexes + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGIdx > ( ::SireMol::Selector< SireMol::CutGroup >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::Selector< SireMol::CutGroup >::indexes ); + + Selector_CutGroup__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() , "" ); } @@ -233,6 +276,7 @@ void register_Selector_CutGroup__class(){ "intersection" , intersection_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -246,6 +290,7 @@ void register_Selector_CutGroup__class(){ "intersection" , intersection_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +304,7 @@ void register_Selector_CutGroup__class(){ "intersection" , intersection_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -272,6 +318,7 @@ void register_Selector_CutGroup__class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -285,6 +332,7 @@ void register_Selector_CutGroup__class(){ "intersects" , intersects_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -298,6 +346,7 @@ void register_Selector_CutGroup__class(){ "intersects" , intersects_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -310,6 +359,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "" ); } @@ -322,6 +372,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -334,6 +385,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -347,6 +399,7 @@ void register_Selector_CutGroup__class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -359,6 +412,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "" ); } @@ -372,6 +426,7 @@ void register_Selector_CutGroup__class(){ "move" , move_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -385,6 +440,7 @@ void register_Selector_CutGroup__class(){ "move" , move_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -397,6 +453,33 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::names + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGName > ( ::SireMol::Selector< SireMol::CutGroup >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::Selector< SireMol::CutGroup >::names ); + + Selector_CutGroup__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::numbers + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireMol::CGIdx > ( ::SireMol::Selector< SireMol::CutGroup >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::Selector< SireMol::CutGroup >::numbers ); + + Selector_CutGroup__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() , "" ); } @@ -413,6 +496,19 @@ void register_Selector_CutGroup__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::CutGroup ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::SireID::Index const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Selector< SireMol::CutGroup >::operator() @@ -426,6 +522,97 @@ void register_Selector_CutGroup__class(){ , ( bp::arg("i"), bp::arg("j") ) , "" ); + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::SireBase::Slice const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::QList< long long > const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::SireMol::AtomID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::SireMol::ResID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::SireMol::CGID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::SireMol::ChainID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator() + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::Selector< SireMol::CutGroup >::*__call___function_type)( ::SireMol::SegID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator() ); + + Selector_CutGroup__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("segid") ) + , "" ); + } Selector_CutGroup__exposer.def( bp::self + bp::self ); Selector_CutGroup__exposer.def( bp::self + bp::other< SireMol::CGID >() ); @@ -474,6 +661,45 @@ void register_Selector_CutGroup__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::CutGroup >::operator[] + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::CutGroup >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator[] ); + + Selector_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator[] + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::CutGroup >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator[] ); + + Selector_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::operator[] + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::CutGroup >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::CutGroup >::operator[] ); + + Selector_CutGroup__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + } { //::SireMol::Selector< SireMol::CutGroup >::operator[] @@ -562,6 +788,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -574,6 +801,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -586,6 +814,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "" ); } @@ -599,6 +828,7 @@ void register_Selector_CutGroup__class(){ "selection" , selection_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -612,6 +842,7 @@ void register_Selector_CutGroup__class(){ "selection" , selection_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -624,6 +855,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "" ); } @@ -637,6 +869,7 @@ void register_Selector_CutGroup__class(){ "selector" , selector_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -650,6 +883,7 @@ void register_Selector_CutGroup__class(){ "selector" , selector_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -663,6 +897,7 @@ void register_Selector_CutGroup__class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -676,6 +911,7 @@ void register_Selector_CutGroup__class(){ "subtract" , subtract_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -689,6 +925,33 @@ void register_Selector_CutGroup__class(){ "subtract" , subtract_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::toList + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::Selector< SireMol::CutGroup >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::Selector< SireMol::CutGroup >::toList ); + + Selector_CutGroup__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::CutGroup >::toSelector + + typedef SireMol::Selector< SireMol::CutGroup > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::CutGroup >::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Selector< SireMol::CutGroup >::toSelector ); + + Selector_CutGroup__exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() , "" ); } @@ -701,6 +964,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -713,6 +977,7 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -720,6 +985,11 @@ void register_Selector_CutGroup__class(){ Selector_CutGroup__exposer.def( "__copy__", &__copy__); Selector_CutGroup__exposer.def( "__deepcopy__", &__copy__); Selector_CutGroup__exposer.def( "clone", &__copy__); + Selector_CutGroup__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_CutGroup__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_CutGroup__exposer.def_pickle(sire_pickle_suite< ::SireMol::Selector >()); Selector_CutGroup__exposer.def( "__str__", &__str__< ::SireMol::Selector > ); Selector_CutGroup__exposer.def( "__repr__", &__str__< ::SireMol::Selector > ); Selector_CutGroup__exposer.def( "__len__", &__len_size< ::SireMol::Selector > ); diff --git a/wrapper/Mol/Selector_Residue_.pypp.cpp b/wrapper/Mol/Selector_Residue_.pypp.cpp index f81820958..27feee5b9 100644 --- a/wrapper/Mol/Selector_Residue_.pypp.cpp +++ b/wrapper/Mol/Selector_Residue_.pypp.cpp @@ -41,8 +41,12 @@ namespace bp = boost::python; SireMol::Selector __copy__(const SireMol::Selector &other){ return SireMol::Selector(other); } +#include "Qt/qdatastream.hpp" + #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Selector_Residue__class(){ @@ -57,6 +61,19 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::Residue::ID const & >(( bp::arg("moldata"), bp::arg("viewid") ), "") ); Selector_Residue__exposer.def( bp::init< SireMol::MoleculeData const &, QList< SireMol::ResIdx > const & >(( bp::arg("moldata"), bp::arg("idxs") ), "") ); Selector_Residue__exposer.def( bp::init< SireMol::Selector< SireMol::Residue > const & >(( bp::arg("other") ), "") ); + { //::SireMol::Selector< SireMol::Residue >::IDs + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResIdx > ( ::SireMol::Selector< SireMol::Residue >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::Selector< SireMol::Residue >::IDs ); + + Selector_Residue__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } { //::SireMol::Selector< SireMol::Residue >::add typedef SireMol::Selector< SireMol::Residue > exported_class_t; @@ -67,6 +84,7 @@ void register_Selector_Residue__class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -80,6 +98,7 @@ void register_Selector_Residue__class(){ "add" , add_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +112,7 @@ void register_Selector_Residue__class(){ "add" , add_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -106,6 +126,7 @@ void register_Selector_Residue__class(){ "contains" , contains_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -119,6 +140,7 @@ void register_Selector_Residue__class(){ "contains" , contains_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -132,6 +154,7 @@ void register_Selector_Residue__class(){ "contains" , contains_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -144,6 +167,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "" ); } @@ -157,6 +181,7 @@ void register_Selector_Residue__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -170,6 +195,7 @@ void register_Selector_Residue__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -183,6 +209,7 @@ void register_Selector_Residue__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -196,6 +223,7 @@ void register_Selector_Residue__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -209,6 +237,7 @@ void register_Selector_Residue__class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -222,6 +251,20 @@ void register_Selector_Residue__class(){ "index" , index_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::indexes + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResIdx > ( ::SireMol::Selector< SireMol::Residue >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::Selector< SireMol::Residue >::indexes ); + + Selector_Residue__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() , "" ); } @@ -235,6 +278,7 @@ void register_Selector_Residue__class(){ "intersection" , intersection_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -248,6 +292,7 @@ void register_Selector_Residue__class(){ "intersection" , intersection_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -261,6 +306,7 @@ void register_Selector_Residue__class(){ "intersection" , intersection_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -274,6 +320,7 @@ void register_Selector_Residue__class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -287,6 +334,7 @@ void register_Selector_Residue__class(){ "intersects" , intersects_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -300,6 +348,7 @@ void register_Selector_Residue__class(){ "intersects" , intersects_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -312,6 +361,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "" ); } @@ -324,6 +374,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -336,6 +387,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -349,6 +401,7 @@ void register_Selector_Residue__class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -361,6 +414,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "" ); } @@ -374,6 +428,7 @@ void register_Selector_Residue__class(){ "move" , move_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -387,6 +442,7 @@ void register_Selector_Residue__class(){ "move" , move_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -399,6 +455,33 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::names + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResName > ( ::SireMol::Selector< SireMol::Residue >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::Selector< SireMol::Residue >::names ); + + Selector_Residue__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::numbers + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::QList< SireMol::ResNum > ( ::SireMol::Selector< SireMol::Residue >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::Selector< SireMol::Residue >::numbers ); + + Selector_Residue__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() , "" ); } @@ -415,6 +498,19 @@ void register_Selector_Residue__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Residue ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::SireID::Index const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Selector< SireMol::Residue >::operator() @@ -428,6 +524,97 @@ void register_Selector_Residue__class(){ , ( bp::arg("i"), bp::arg("j") ) , "" ); + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::SireBase::Slice const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::QList< long long > const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::SireMol::AtomID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::SireMol::ResID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::SireMol::CGID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::SireMol::ChainID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator() + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::Selector< SireMol::Residue >::*__call___function_type)( ::SireMol::SegID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Residue >::operator() ); + + Selector_Residue__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("segid") ) + , "" ); + } Selector_Residue__exposer.def( bp::self + bp::self ); Selector_Residue__exposer.def( bp::self + bp::other< SireMol::ResID >() ); @@ -476,6 +663,45 @@ void register_Selector_Residue__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Residue >::operator[] + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Residue >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Residue >::operator[] ); + + Selector_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator[] + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Residue >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Residue >::operator[] ); + + Selector_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::operator[] + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Residue >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Residue >::operator[] ); + + Selector_Residue__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + } { //::SireMol::Selector< SireMol::Residue >::operator[] @@ -564,6 +790,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -576,6 +803,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -588,6 +816,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "" ); } @@ -601,6 +830,7 @@ void register_Selector_Residue__class(){ "selection" , selection_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -614,6 +844,7 @@ void register_Selector_Residue__class(){ "selection" , selection_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -626,6 +857,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "" ); } @@ -639,6 +871,7 @@ void register_Selector_Residue__class(){ "selector" , selector_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -652,6 +885,7 @@ void register_Selector_Residue__class(){ "selector" , selector_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -665,6 +899,7 @@ void register_Selector_Residue__class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -678,6 +913,7 @@ void register_Selector_Residue__class(){ "subtract" , subtract_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -691,6 +927,33 @@ void register_Selector_Residue__class(){ "subtract" , subtract_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::toList + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::Selector< SireMol::Residue >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::Selector< SireMol::Residue >::toList ); + + Selector_Residue__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Residue >::toSelector + + typedef SireMol::Selector< SireMol::Residue > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Residue >::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Selector< SireMol::Residue >::toSelector ); + + Selector_Residue__exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() , "" ); } @@ -703,6 +966,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -715,6 +979,7 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -722,6 +987,11 @@ void register_Selector_Residue__class(){ Selector_Residue__exposer.def( "__copy__", &__copy__); Selector_Residue__exposer.def( "__deepcopy__", &__copy__); Selector_Residue__exposer.def( "clone", &__copy__); + Selector_Residue__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Residue__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Residue__exposer.def_pickle(sire_pickle_suite< ::SireMol::Selector >()); Selector_Residue__exposer.def( "__str__", &__str__< ::SireMol::Selector > ); Selector_Residue__exposer.def( "__repr__", &__str__< ::SireMol::Selector > ); Selector_Residue__exposer.def( "__len__", &__len_size< ::SireMol::Selector > ); diff --git a/wrapper/Mol/Selector_Segment_.pypp.cpp b/wrapper/Mol/Selector_Segment_.pypp.cpp index 60f55c214..5f6412c6d 100644 --- a/wrapper/Mol/Selector_Segment_.pypp.cpp +++ b/wrapper/Mol/Selector_Segment_.pypp.cpp @@ -35,8 +35,12 @@ namespace bp = boost::python; SireMol::Selector __copy__(const SireMol::Selector &other){ return SireMol::Selector(other); } +#include "Qt/qdatastream.hpp" + #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Selector_Segment__class(){ @@ -51,6 +55,19 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( bp::init< SireMol::MoleculeData const &, SireMol::Segment::ID const & >(( bp::arg("moldata"), bp::arg("viewid") ), "") ); Selector_Segment__exposer.def( bp::init< SireMol::MoleculeData const &, QList< SireMol::SegIdx > const & >(( bp::arg("moldata"), bp::arg("idxs") ), "") ); Selector_Segment__exposer.def( bp::init< SireMol::Selector< SireMol::Segment > const & >(( bp::arg("other") ), "") ); + { //::SireMol::Selector< SireMol::Segment >::IDs + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegIdx > ( ::SireMol::Selector< SireMol::Segment >::*IDs_function_type)( ) const; + IDs_function_type IDs_function_value( &::SireMol::Selector< SireMol::Segment >::IDs ); + + Selector_Segment__exposer.def( + "IDs" + , IDs_function_value + , bp::release_gil_policy() + , "" ); + + } { //::SireMol::Selector< SireMol::Segment >::add typedef SireMol::Selector< SireMol::Segment > exported_class_t; @@ -61,6 +78,7 @@ void register_Selector_Segment__class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +92,7 @@ void register_Selector_Segment__class(){ "add" , add_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -87,6 +106,7 @@ void register_Selector_Segment__class(){ "add" , add_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -100,6 +120,7 @@ void register_Selector_Segment__class(){ "contains" , contains_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -113,6 +134,7 @@ void register_Selector_Segment__class(){ "contains" , contains_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -126,6 +148,7 @@ void register_Selector_Segment__class(){ "contains" , contains_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -138,6 +161,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "evaluate" , evaluate_function_value + , bp::release_gil_policy() , "" ); } @@ -151,6 +175,7 @@ void register_Selector_Segment__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -164,6 +189,7 @@ void register_Selector_Segment__class(){ "evaluate" , evaluate_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -177,6 +203,7 @@ void register_Selector_Segment__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -190,6 +217,7 @@ void register_Selector_Segment__class(){ "hasMetadata" , hasMetadata_function_value , ( bp::arg("key"), bp::arg("metakey") ) + , bp::release_gil_policy() , "" ); } @@ -203,6 +231,7 @@ void register_Selector_Segment__class(){ "hasProperty" , hasProperty_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -216,6 +245,20 @@ void register_Selector_Segment__class(){ "index" , index_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::indexes + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegIdx > ( ::SireMol::Selector< SireMol::Segment >::*indexes_function_type)( ) const; + indexes_function_type indexes_function_value( &::SireMol::Selector< SireMol::Segment >::indexes ); + + Selector_Segment__exposer.def( + "indexes" + , indexes_function_value + , bp::release_gil_policy() , "" ); } @@ -229,6 +272,7 @@ void register_Selector_Segment__class(){ "intersection" , intersection_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -242,6 +286,7 @@ void register_Selector_Segment__class(){ "intersection" , intersection_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -255,6 +300,7 @@ void register_Selector_Segment__class(){ "intersection" , intersection_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -268,6 +314,7 @@ void register_Selector_Segment__class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -281,6 +328,7 @@ void register_Selector_Segment__class(){ "intersects" , intersects_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -294,6 +342,7 @@ void register_Selector_Segment__class(){ "intersects" , intersects_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() , "" ); } @@ -306,6 +355,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "" ); } @@ -318,6 +368,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -330,6 +381,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "metadataKeys" , metadataKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -343,6 +395,7 @@ void register_Selector_Segment__class(){ "metadataKeys" , metadataKeys_function_value , ( bp::arg("key") ) + , bp::release_gil_policy() , "" ); } @@ -355,6 +408,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "move" , move_function_value + , bp::release_gil_policy() , "" ); } @@ -368,6 +422,7 @@ void register_Selector_Segment__class(){ "move" , move_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -381,6 +436,7 @@ void register_Selector_Segment__class(){ "move" , move_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -393,6 +449,33 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "nViews" , nViews_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::names + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegName > ( ::SireMol::Selector< SireMol::Segment >::*names_function_type)( ) const; + names_function_type names_function_value( &::SireMol::Selector< SireMol::Segment >::names ); + + Selector_Segment__exposer.def( + "names" + , names_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::numbers + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::QList< SireMol::SegIdx > ( ::SireMol::Selector< SireMol::Segment >::*numbers_function_type)( ) const; + numbers_function_type numbers_function_value( &::SireMol::Selector< SireMol::Segment >::numbers ); + + Selector_Segment__exposer.def( + "numbers" + , numbers_function_value + , bp::release_gil_policy() , "" ); } @@ -409,6 +492,19 @@ void register_Selector_Segment__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Segment ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::SireID::Index const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idx") ) + , "" ); + } { //::SireMol::Selector< SireMol::Segment >::operator() @@ -422,6 +518,97 @@ void register_Selector_Segment__class(){ , ( bp::arg("i"), bp::arg("j") ) , "" ); + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::SireBase::Slice const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::QList< long long > const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("idxs") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Selector< SireMol::Atom > ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::SireMol::AtomID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("atomid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Selector< SireMol::Residue > ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::SireMol::ResID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("resid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Selector< SireMol::CutGroup > ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::SireMol::CGID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("cgid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Selector< SireMol::Chain > ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::SireMol::ChainID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("chainid") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator() + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::Selector< SireMol::Segment > ( ::SireMol::Selector< SireMol::Segment >::*__call___function_type)( ::SireMol::SegID const & ) const; + __call___function_type __call___function_value( &::SireMol::Selector< SireMol::Segment >::operator() ); + + Selector_Segment__exposer.def( + "__call__" + , __call___function_value + , ( bp::arg("segid") ) + , "" ); + } Selector_Segment__exposer.def( bp::self + bp::self ); Selector_Segment__exposer.def( bp::self + bp::other< SireMol::SegID >() ); @@ -470,6 +657,45 @@ void register_Selector_Segment__class(){ , ( bp::arg("i") ) , "" ); + } + { //::SireMol::Selector< SireMol::Segment >::operator[] + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Segment >::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Segment >::operator[] ); + + Selector_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator[] + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Segment >::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Segment >::operator[] ); + + Selector_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::operator[] + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Segment >::*__getitem___function_type)( ::QList< long long > const & ) const; + __getitem___function_type __getitem___function_value( &::SireMol::Selector< SireMol::Segment >::operator[] ); + + Selector_Segment__exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("idxs") ) + , "" ); + } { //::SireMol::Selector< SireMol::Segment >::operator[] @@ -558,6 +784,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "" ); } @@ -570,6 +797,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "selectedAll" , selectedAll_function_value + , bp::release_gil_policy() , "" ); } @@ -582,6 +810,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "selection" , selection_function_value + , bp::release_gil_policy() , "" ); } @@ -595,6 +824,7 @@ void register_Selector_Segment__class(){ "selection" , selection_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -608,6 +838,7 @@ void register_Selector_Segment__class(){ "selection" , selection_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -620,6 +851,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "selector" , selector_function_value + , bp::release_gil_policy() , "" ); } @@ -633,6 +865,7 @@ void register_Selector_Segment__class(){ "selector" , selector_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -646,6 +879,7 @@ void register_Selector_Segment__class(){ "selector" , selector_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "" ); } @@ -659,6 +893,7 @@ void register_Selector_Segment__class(){ "subtract" , subtract_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -672,6 +907,7 @@ void register_Selector_Segment__class(){ "subtract" , subtract_function_value , ( bp::arg("view") ) + , bp::release_gil_policy() , "" ); } @@ -685,6 +921,33 @@ void register_Selector_Segment__class(){ "subtract" , subtract_function_value , ( bp::arg("id") ) + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::toList + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireMol::Selector< SireMol::Segment >::*toList_function_type)( ) const; + toList_function_type toList_function_value( &::SireMol::Selector< SireMol::Segment >::toList ); + + Selector_Segment__exposer.def( + "toList" + , toList_function_value + , bp::release_gil_policy() + , "" ); + + } + { //::SireMol::Selector< SireMol::Segment >::toSelector + + typedef SireMol::Selector< SireMol::Segment > exported_class_t; + typedef ::SireMol::MolViewPtr ( ::SireMol::Selector< SireMol::Segment >::*toSelector_function_type)( ) const; + toSelector_function_type toSelector_function_value( &::SireMol::Selector< SireMol::Segment >::toSelector ); + + Selector_Segment__exposer.def( + "toSelector" + , toSelector_function_value + , bp::release_gil_policy() , "" ); } @@ -697,6 +960,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -709,6 +973,7 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -716,6 +981,11 @@ void register_Selector_Segment__class(){ Selector_Segment__exposer.def( "__copy__", &__copy__); Selector_Segment__exposer.def( "__deepcopy__", &__copy__); Selector_Segment__exposer.def( "clone", &__copy__); + Selector_Segment__exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Segment__exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireMol::Selector >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + Selector_Segment__exposer.def_pickle(sire_pickle_suite< ::SireMol::Selector >()); Selector_Segment__exposer.def( "__str__", &__str__< ::SireMol::Selector > ); Selector_Segment__exposer.def( "__repr__", &__str__< ::SireMol::Selector > ); Selector_Segment__exposer.def( "__len__", &__len_size< ::SireMol::Selector > ); diff --git a/wrapper/Mol/SireMol_containers.cpp b/wrapper/Mol/SireMol_containers.cpp index 8dfc22ab9..d6c317bf0 100644 --- a/wrapper/Mol/SireMol_containers.cpp +++ b/wrapper/Mol/SireMol_containers.cpp @@ -54,11 +54,14 @@ #include "SireMol/moleculegroups.h" #include "SireMol/mgnum.h" #include "SireMol/mgname.h" +#include "SireMol/molname.h" +#include "SireMol/molidx.h" #include "SireMol/mgidsandmaps.h" #include "SireMol/partialmolecule.h" #include "SireMol/perturbation.h" #include "SireMol/geometryperturbation.h" #include "SireMol/improperid.h" +#include "SireMol/core.h" #include "Base/convertpackedarray.hpp" #include "SireBase/packedarray2d.hpp" @@ -82,9 +85,16 @@ void register_SireMol_containers() register_list< QList >(); register_list< QList< QList > >(); - register_list< QList >(); register_list< QVector >(); + register_list< QList >(); + register_list< QList >(); + + register_list< QList >(); + register_list< QList >(); + register_list< QList >(); + register_list< QList >(); + register_list< QList >(); register_list< QList >(); register_list< QList >(); @@ -94,6 +104,8 @@ void register_SireMol_containers() register_list< QList >(); register_list< QList >(); + register_list< QList >(); + register_list< QList >(); register_list< QList >(); register_list< QVector >(); register_list< QList >(); @@ -112,6 +124,8 @@ void register_SireMol_containers() register_list< QList >(); register_list< QList >(); + register_list< QList >(); + register_list< QList >(); register_list< QList >(); diff --git a/wrapper/Mol/SireMol_properties.cpp b/wrapper/Mol/SireMol_properties.cpp index f7066607b..2a61c0174 100644 --- a/wrapper/Mol/SireMol_properties.cpp +++ b/wrapper/Mol/SireMol_properties.cpp @@ -4,49 +4,6 @@ #include "Base/convertproperty.hpp" #include "SireMol_properties.h" -#include "SireError/errors.h" -#include "SireMol/errors.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "atom.h" -#include "atomid.h" -#include "cgid.h" -#include "chain.h" -#include "chainid.h" -#include "cutgroup.h" -#include "editor.hpp" -#include "mgidx.h" -#include "mgname.h" -#include "mgnum.h" -#include "molecule.h" -#include "moleculegroups.h" -#include "molecules.h" -#include "molidx.h" -#include "molname.h" -#include "molnum.h" -#include "mover.hpp" -#include "partialmolecule.h" -#include "resid.h" -#include "residue.h" -#include "segid.h" -#include "segment.h" -#include "select.h" -#include "selector.hpp" -#include "tostring.h" -#include "viewsofmol.h" -#include -#include -#include "moleculegroups.h" -#include "SireCAS/identities.h" -#include "SireCAS/values.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "geometryperturbation.h" -#include "molecule.h" -#include "moleditor.h" -#include "mover.hpp" -#include "perturbation.h" -#include "perturbation.h" #include "SireError/errors.h" #include "SireStream/datastream.h" #include "SireUnits/units.h" @@ -59,17 +16,9 @@ #include "evaluator.h" #include "moleculeinfodata.h" #include "moleculeview.h" +#include "mover.hpp" #include "tostring.h" #include "atommatcher.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "cuttingfunction.h" -#include "molecule.h" -#include "moleditor.h" -#include "mover.hpp" -#include "residuecutting.h" -#include -#include "cuttingfunction.h" #include "SireBase/errors.h" #include "SireError/errors.h" #include "SireStream/datastream.h" @@ -101,6 +50,16 @@ #include #include #include "bondhunter.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "cuttingfunction.h" +#include "molecule.h" +#include "moleditor.h" +#include "mover.hpp" +#include "residuecutting.h" +#include "selector.hpp" +#include +#include "cuttingfunction.h" #include "SireBase/incremint.h" #include "SireBase/majorminorversion.h" #include "SireBase/refcountdata.h" @@ -109,6 +68,7 @@ #include "SireMol/errors.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" +#include "core.h" #include "editor.hpp" #include "mgname.h" #include "mgnum.h" @@ -127,18 +87,42 @@ #include #include #include "moleculegroup.h" +#include "SireBase/slice.h" +#include "SireError/errors.h" +#include "SireMol/errors.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "atomselection.h" +#include "atom.h" +#include "atomid.h" +#include "cgid.h" +#include "chain.h" +#include "chainid.h" +#include "cutgroup.h" #include "editor.hpp" -#include "evaluator.h" -#include "moleculedata.h" -#include "moleculeview.h" +#include "mgidx.h" +#include "mgname.h" +#include "mgnum.h" +#include "molecule.h" +#include "moleculegroups.h" +#include "molecules.h" +#include "molidx.h" +#include "molname.h" +#include "molnum.h" #include "mover.hpp" #include "partialmolecule.h" -#include "weightfunction.h" -#include "weightfunction.h" +#include "resid.h" +#include "residue.h" +#include "segid.h" +#include "segment.h" +#include "select.h" +#include "selector.hpp" +#include "tostring.h" +#include "viewsofmol.h" +#include +#include +#include "moleculegroups.h" #include "SireBase/errors.h" +#include "SireBase/slice.h" #include "SireError/errors.h" #include "SireMol/errors.h" #include "SireStream/datastream.h" @@ -155,15 +139,38 @@ #include "selector.hpp" #include #include "moleculeview.h" +#include "SireCAS/identities.h" +#include "SireCAS/values.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "core.h" +#include "geometryperturbation.h" +#include "molecule.h" +#include "moleditor.h" +#include "mover.hpp" +#include "perturbation.h" +#include "perturbation.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "atomselection.h" +#include "core.h" +#include "editor.hpp" +#include "evaluator.h" +#include "moleculedata.h" +#include "moleculeview.h" +#include "mover.hpp" +#include "partialmolecule.h" +#include "weightfunction.h" +#include "weightfunction.h" void register_SireMol_properties() { - register_property_container< SireMol::MolGroupsPtr, SireMol::MolGroupsBase >(); - register_property_container< SireMol::PerturbationPtr, SireMol::Perturbation >(); register_property_container< SireMol::AtomMatcherPtr, SireMol::AtomMatcher >(); - register_property_container< SireMol::CutFuncPtr, SireMol::CuttingFunction >(); register_property_container< SireMol::BeadingPtr, SireMol::Beading >(); register_property_container< SireMol::BondHunterPtr, SireMol::BondHunter >(); + register_property_container< SireMol::CutFuncPtr, SireMol::CuttingFunction >(); register_property_container< SireMol::MolGroupPtr, SireMol::MoleculeGroup >(); - register_property_container< SireMol::WeightFuncPtr, SireMol::WeightFunction >(); + register_property_container< SireMol::MolGroupsPtr, SireMol::MolGroupsBase >(); register_property_container< SireMol::MolViewPtr, SireMol::MoleculeView >(); + register_property_container< SireMol::PerturbationPtr, SireMol::Perturbation >(); + register_property_container< SireMol::WeightFuncPtr, SireMol::WeightFunction >(); } diff --git a/wrapper/Mol/SireMol_registrars.cpp b/wrapper/Mol/SireMol_registrars.cpp index f6955b981..bc2d2436a 100644 --- a/wrapper/Mol/SireMol_registrars.cpp +++ b/wrapper/Mol/SireMol_registrars.cpp @@ -5,180 +5,186 @@ #include "Helpers/version_error_impl.h" +#include "amberparameters.h" +#include "angleid.h" +#include "atom.h" +#include "atombeads.h" +#include "atomcharges.h" +#include "atomcoords.h" +#include "atomcutting.h" +#include "atomeditor.h" +#include "atomelements.h" +#include "atomenergies.h" +#include "atomforces.h" +#include "atomidentifier.h" +#include "atomidx.h" #include "atommasses.h" -#include "segidx.h" -#include "within.h" -#include "cutgroup.h" +#include "atommatcher.h" +#include "atommatchers.h" +#include "atomname.h" +#include "atomnum.h" +#include "atompolarisabilities.h" #include "atompropertylist.h" -#include "chargeperturbation.h" -#include "mgidx.h" -#include "moleculedata.h" -#include "residuecutting.h" -#include "chainresid.h" -#include "improperid.h" -#include "moleculegroups.h" -#include "atom.h" -#include "cgname.h" -#include "segment.h" -#include "moleditor.h" -#include "residentifier.h" -#include "resnum.h" -#include "stereoscopy.h" -#include "chain.h" -#include "parser.h" -#include "mgname.h" -#include "beads.h" -#include "perturbation.h" +#include "atomradicals.h" +#include "atomradii.h" +#include "atomselection.h" +#include "atomvelocities.h" +#include "bead.h" +#include "beadeditor.h" +#include "beadidx.h" +#include "beading.h" #include "beadnum.h" -#include "cgeditor.h" -#include "evaluator.h" -#include "partialmolecule.h" -#include "mgidentifier.h" -#include "molresid.h" -#include "cgidx.h" -#include "cgidentifier.h" -#include "amberparameters.h" -#include "resname.h" -#include "molidentifier.h" +#include "beads.h" +#include "bondhunter.h" #include "bondid.h" -#include "atomenergies.h" -#include "molecules.h" -#include "atombeads.h" #include "bondtype.h" +#include "cgatomidx.h" +#include "cgeditor.h" +#include "cgidentifier.h" +#include "cgidx.h" +#include "cgname.h" +#include "chain.h" +#include "chaineditor.h" #include "chainidentifier.h" #include "chainidx.h" -#include "atommatcher.h" -#include "volumemap.h" -#include "atomcutting.h" -#include "atomname.h" +#include "chainname.h" +#include "chainresid.h" +#include "chargeperturbation.h" #include "connectivity.h" +#include "cutgroup.h" #include "dihedralid.h" -#include "groupgroupids.h" -#include "molidx.h" #include "element.h" -#include "molname.h" -#include "residx.h" -#include "atomradicals.h" -#include "beading.h" -#include "atomcoords.h" -#include "angleid.h" -#include "atomidx.h" -#include "bondhunter.h" -#include "select.h" -#include "beadidx.h" -#include "atomidentifier.h" -#include "atomcharges.h" +#include "evaluator.h" +#include "evaluatorm.h" +#include "geometryperturbation.h" +#include "groupatomids.h" +#include "groupgroupids.h" +#include "improperid.h" +#include "mgidentifier.h" +#include "mgidsandmaps.h" +#include "mgidx.h" +#include "mgname.h" +#include "mgnum.h" #include "molatomid.h" -#include "atomselection.h" -#include "chainname.h" +#include "molecule.h" +#include "moleculedata.h" +#include "moleculegroup.h" +#include "moleculegroups.h" +#include "moleculeinfo.h" #include "moleculeinfodata.h" -#include "atompolarisabilities.h" -#include "atomelements.h" -#include "mgnum.h" -#include "beadeditor.h" -#include "atomeditor.h" +#include "molecules.h" +#include "moleditor.h" +#include "molid.h" +#include "molidentifier.h" +#include "molidx.h" +#include "molname.h" +#include "molnum.h" +#include "molresid.h" +#include "molwithresid.h" #include "mover_metaid.h" -#include "moleculegroup.h" +#include "partialmolecule.h" +#include "perturbation.h" +#include "radical.h" #include "reseditor.h" -#include "chaineditor.h" -#include "atomradii.h" -#include "molwithresid.h" -#include "atommatchers.h" -#include "geometryperturbation.h" -#include "viewsofmol.h" -#include "withres.h" -#include "withatoms.h" +#include "residentifier.h" +#include "residue.h" +#include "residuecutting.h" +#include "residx.h" +#include "resname.h" +#include "resnum.h" +#include "segeditor.h" +#include "segidentifier.h" +#include "segidx.h" +#include "segment.h" #include "segname.h" +#include "select.h" +#include "selectormol.h" #include "specifymol.h" -#include "segidentifier.h" -#include "cgatomidx.h" +#include "stereoscopy.h" +#include "viewsofmol.h" +#include "volumemap.h" #include "weightfunction.h" -#include "radical.h" -#include "bead.h" -#include "atomforces.h" -#include "atomvelocities.h" -#include "moleculeinfo.h" -#include "groupatomids.h" -#include "molid.h" -#include "atomnum.h" -#include "residue.h" -#include "molnum.h" -#include "molecule.h" -#include "segeditor.h" -#include "mgidsandmaps.h" +#include "withatoms.h" +#include "within.h" +#include "withres.h" #include "atomproperty.hpp" -#include "segproperty.hpp" +#include "beadproperty.hpp" +#include "cgproperty.hpp" #include "chainproperty.hpp" #include "resproperty.hpp" -#include "cgproperty.hpp" -#include "beadproperty.hpp" +#include "segproperty.hpp" #include "Helpers/objectregistry.hpp" void register_SireMol_objects() { + ObjectRegistry::registerConverterFor< SireMol::AmberParameters >(); + ObjectRegistry::registerConverterFor< SireMol::AngleID >(); + ObjectRegistry::registerConverterFor< SireMol::Atom >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::Selector >(); + ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); + ObjectRegistry::registerConverterFor< SireMol::AtomBeads >(); + ObjectRegistry::registerConverterFor< SireMol::AtomCharges >(); + ObjectRegistry::registerConverterFor< SireMol::AtomCoords >(); + ObjectRegistry::registerConverterFor< SireMol::AtomCutting >(); + ObjectRegistry::registerConverterFor< SireMol::AtomEditor >(); + ObjectRegistry::registerConverterFor< SireMol::AtomStructureEditor >(); + ObjectRegistry::registerConverterFor< SireMol::AtomElements >(); + ObjectRegistry::registerConverterFor< SireMol::AtomEnergies >(); + ObjectRegistry::registerConverterFor< SireMol::AtomForces >(); + ObjectRegistry::registerConverterFor< SireMol::Force3D >(); + ObjectRegistry::registerConverterFor< SireMol::AtomIdentifier >(); + ObjectRegistry::registerConverterFor< SireID::Specify >(); + ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); + ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); + ObjectRegistry::registerConverterFor< SireID::InvertMatch >(); + ObjectRegistry::registerConverterFor< SireID::MatchAll >(); + ObjectRegistry::registerConverterFor< SireMol::AtomIdx >(); ObjectRegistry::registerConverterFor< SireMol::AtomMasses >(); - ObjectRegistry::registerConverterFor< SireMol::SegIdx >(); - ObjectRegistry::registerConverterFor< SireMol::Within >(); - ObjectRegistry::registerConverterFor< SireMol::CutGroup >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::Selector >(); - ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); + ObjectRegistry::registerConverterFor< SireMol::AtomResultMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::AtomMatchInverter >(); + ObjectRegistry::registerConverterFor< SireMol::AtomIdxMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::AtomNameMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::AtomIDMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::AtomMultiMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::AtomMCSMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::ResIdxAtomNameMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::ResNumAtomNameMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::ResIdxAtomMCSMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::ResIdxAtomCoordMatcher >(); + ObjectRegistry::registerConverterFor< SireMol::AtomName >(); + ObjectRegistry::registerConverterFor< SireMol::AtomNum >(); + ObjectRegistry::registerConverterFor< SireMol::AtomPolarisabilities >(); ObjectRegistry::registerConverterFor< SireMol::AtomPropertyList >(); ObjectRegistry::registerConverterFor< SireMol::AtomDoubleArrayProperty >(); ObjectRegistry::registerConverterFor< SireMol::AtomIntegerArrayProperty >(); ObjectRegistry::registerConverterFor< SireMol::AtomStringArrayProperty >(); - ObjectRegistry::registerConverterFor< SireMol::ChargePerturbation >(); - ObjectRegistry::registerConverterFor< SireMol::MGIdx >(); - ObjectRegistry::registerConverterFor< SireMol::MoleculeData >(); - ObjectRegistry::registerConverterFor< SireMol::ResidueCutting >(); - ObjectRegistry::registerConverterFor< SireMol::ChainResID >(); - ObjectRegistry::registerConverterFor< SireMol::ImproperID >(); - ObjectRegistry::registerConverterFor< SireMol::MoleculeGroups >(); - ObjectRegistry::registerConverterFor< SireMol::Atom >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::Selector >(); - ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); - ObjectRegistry::registerConverterFor< SireMol::CGName >(); - ObjectRegistry::registerConverterFor< SireMol::Segment >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::Selector >(); - ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); - ObjectRegistry::registerConverterFor< SireMol::MolEditor >(); - ObjectRegistry::registerConverterFor< SireMol::MolStructureEditor >(); - ObjectRegistry::registerConverterFor< SireID::Specify >(); - ObjectRegistry::registerConverterFor< SireMol::AtomsIn >(); - ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); - ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); - ObjectRegistry::registerConverterFor< SireID::MatchAll >(); - ObjectRegistry::registerConverterFor< SireID::InvertMatch >(); - ObjectRegistry::registerConverterFor< SireMol::ResIdentifier >(); - ObjectRegistry::registerConverterFor< SireMol::ResNum >(); - ObjectRegistry::registerConverterFor< SireMol::Stereoscopy >(); - ObjectRegistry::registerConverterFor< SireMol::Chain >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::Selector >(); - ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); - ObjectRegistry::registerConverterFor< SireMol::parse_error >(); - ObjectRegistry::registerConverterFor< SireMol::MGName >(); + ObjectRegistry::registerConverterFor< SireMol::AtomRadicals >(); + ObjectRegistry::registerConverterFor< SireMol::AtomRadii >(); + ObjectRegistry::registerConverterFor< SireMol::AtomSelection >(); + ObjectRegistry::registerConverterFor< SireMol::AtomVelocities >(); + ObjectRegistry::registerConverterFor< SireMol::Velocity3D >(); + ObjectRegistry::registerConverterFor< SireMol::Bead >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::BeadEditor >(); + ObjectRegistry::registerConverterFor< SireMol::BeadIdx >(); + ObjectRegistry::registerConverterFor< SireMol::MoleculeBeading >(); + ObjectRegistry::registerConverterFor< SireMol::ResidueBeading >(); + ObjectRegistry::registerConverterFor< SireMol::UserBeading >(); + ObjectRegistry::registerConverterFor< SireMol::NullBeading >(); + ObjectRegistry::registerConverterFor< SireMol::BeadNum >(); ObjectRegistry::registerConverterFor< SireMol::Beads >(); ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::NullPerturbation >(); - ObjectRegistry::registerConverterFor< SireMol::Perturbations >(); - ObjectRegistry::registerConverterFor< SireMol::BeadNum >(); + ObjectRegistry::registerConverterFor< SireMol::NullBondHunter >(); + ObjectRegistry::registerConverterFor< SireMol::CovalentBondHunter >(); + ObjectRegistry::registerConverterFor< SireMol::ChemicalBondHunter >(); + ObjectRegistry::registerConverterFor< SireMol::BondID >(); + ObjectRegistry::registerConverterFor< SireMol::BondType >(); + ObjectRegistry::registerConverterFor< SireMol::CGAtomIdx >(); ObjectRegistry::registerConverterFor< SireMol::CGEditor >(); ObjectRegistry::registerConverterFor< SireMol::CGStructureEditor >(); - ObjectRegistry::registerConverterFor< SireMol::Evaluator >(); - ObjectRegistry::registerConverterFor< SireMol::PartialMolecule >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); - ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); - ObjectRegistry::registerConverterFor< SireID::Specify >(); - ObjectRegistry::registerConverterFor< SireMol::MGIdentifier >(); - ObjectRegistry::registerConverterFor< SireMol::MolResID >(); - ObjectRegistry::registerConverterFor< SireMol::MolResNum >(); - ObjectRegistry::registerConverterFor< SireMol::CGIdx >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireMol::AtomsIn >(); ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); @@ -186,14 +192,14 @@ void register_SireMol_objects() ObjectRegistry::registerConverterFor< SireID::MatchAll >(); ObjectRegistry::registerConverterFor< SireID::InvertMatch >(); ObjectRegistry::registerConverterFor< SireMol::CGIdentifier >(); - ObjectRegistry::registerConverterFor< SireMol::AmberParameters >(); - ObjectRegistry::registerConverterFor< SireMol::ResName >(); - ObjectRegistry::registerConverterFor< SireMol::MolIdentifier >(); - ObjectRegistry::registerConverterFor< SireMol::BondID >(); - ObjectRegistry::registerConverterFor< SireMol::AtomEnergies >(); - ObjectRegistry::registerConverterFor< SireMol::Molecules >(); - ObjectRegistry::registerConverterFor< SireMol::AtomBeads >(); - ObjectRegistry::registerConverterFor< SireMol::BondType >(); + ObjectRegistry::registerConverterFor< SireMol::CGIdx >(); + ObjectRegistry::registerConverterFor< SireMol::CGName >(); + ObjectRegistry::registerConverterFor< SireMol::Chain >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::Selector >(); + ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); + ObjectRegistry::registerConverterFor< SireMol::ChainEditor >(); + ObjectRegistry::registerConverterFor< SireMol::ChainStructureEditor >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireMol::AtomsIn >(); ObjectRegistry::registerConverterFor< SireMol::ResIn >(); @@ -203,90 +209,91 @@ void register_SireMol_objects() ObjectRegistry::registerConverterFor< SireID::InvertMatch >(); ObjectRegistry::registerConverterFor< SireMol::ChainIdentifier >(); ObjectRegistry::registerConverterFor< SireMol::ChainIdx >(); - ObjectRegistry::registerConverterFor< SireMol::AtomResultMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::AtomMatchInverter >(); - ObjectRegistry::registerConverterFor< SireMol::VolumeMap >(); - ObjectRegistry::registerConverterFor< SireMol::AtomCutting >(); - ObjectRegistry::registerConverterFor< SireMol::AtomName >(); + ObjectRegistry::registerConverterFor< SireMol::ChainName >(); + ObjectRegistry::registerConverterFor< SireMol::ChainResID >(); + ObjectRegistry::registerConverterFor< SireMol::ChargePerturbation >(); ObjectRegistry::registerConverterFor< SireMol::Connectivity >(); ObjectRegistry::registerConverterFor< SireMol::ConnectivityEditor >(); + ObjectRegistry::registerConverterFor< SireMol::CutGroup >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::Selector >(); + ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); ObjectRegistry::registerConverterFor< SireMol::DihedralID >(); + ObjectRegistry::registerConverterFor< SireMol::Element >(); + ObjectRegistry::registerConverterFor< SireMol::Evaluator >(); + ObjectRegistry::registerConverterFor< SireMol::EvaluatorM >(); + ObjectRegistry::registerConverterFor< SireMol::NullGeometryPerturbation >(); + ObjectRegistry::registerConverterFor< SireMol::GeometryPerturbations >(); + ObjectRegistry::registerConverterFor< SireMol::BondPerturbation >(); + ObjectRegistry::registerConverterFor< SireMol::AnglePerturbation >(); + ObjectRegistry::registerConverterFor< SireMol::DihedralPerturbation >(); + ObjectRegistry::registerConverterFor< SireMol::ResAtomID >(); + ObjectRegistry::registerConverterFor< SireMol::ChainAtomID >(); + ObjectRegistry::registerConverterFor< SireMol::SegAtomID >(); + ObjectRegistry::registerConverterFor< SireMol::CGAtomID >(); ObjectRegistry::registerConverterFor< SireMol::SegResID >(); ObjectRegistry::registerConverterFor< SireMol::SegChainID >(); ObjectRegistry::registerConverterFor< SireMol::SegCGID >(); ObjectRegistry::registerConverterFor< SireMol::CGResID >(); ObjectRegistry::registerConverterFor< SireMol::CGChainID >(); - ObjectRegistry::registerConverterFor< SireMol::MolIdx >(); - ObjectRegistry::registerConverterFor< SireMol::Element >(); - ObjectRegistry::registerConverterFor< SireMol::MolName >(); - ObjectRegistry::registerConverterFor< SireMol::ResIdx >(); - ObjectRegistry::registerConverterFor< SireMol::AtomRadicals >(); - ObjectRegistry::registerConverterFor< SireMol::MoleculeBeading >(); - ObjectRegistry::registerConverterFor< SireMol::ResidueBeading >(); - ObjectRegistry::registerConverterFor< SireMol::UserBeading >(); - ObjectRegistry::registerConverterFor< SireMol::NullBeading >(); - ObjectRegistry::registerConverterFor< SireMol::AtomCoords >(); - ObjectRegistry::registerConverterFor< SireMol::AngleID >(); - ObjectRegistry::registerConverterFor< SireMol::AtomIdx >(); - ObjectRegistry::registerConverterFor< SireMol::NullBondHunter >(); - ObjectRegistry::registerConverterFor< SireMol::CovalentBondHunter >(); - ObjectRegistry::registerConverterFor< SireMol::ChemicalBondHunter >(); - ObjectRegistry::registerConverterFor< SireMol::Select >(); - ObjectRegistry::registerConverterFor< SireMol::SelectResult >(); - ObjectRegistry::registerConverterFor< SireMol::SelectResultMover >(); - ObjectRegistry::registerConverterFor< SireMol::BeadIdx >(); - ObjectRegistry::registerConverterFor< SireMol::AtomIdentifier >(); - ObjectRegistry::registerConverterFor< SireID::Specify >(); - ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); - ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); - ObjectRegistry::registerConverterFor< SireID::InvertMatch >(); - ObjectRegistry::registerConverterFor< SireID::MatchAll >(); - ObjectRegistry::registerConverterFor< SireMol::AtomCharges >(); + ObjectRegistry::registerConverterFor< SireMol::ImproperID >(); + ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); + ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); + ObjectRegistry::registerConverterFor< SireID::Specify >(); + ObjectRegistry::registerConverterFor< SireMol::MGIdentifier >(); + ObjectRegistry::registerConverterFor< SireMol::MGIDsAndMaps >(); + ObjectRegistry::registerConverterFor< SireMol::MGIdx >(); + ObjectRegistry::registerConverterFor< SireMol::MGName >(); + ObjectRegistry::registerConverterFor< SireMol::MGNum >(); ObjectRegistry::registerConverterFor< SireMol::MolAtomID >(); - ObjectRegistry::registerConverterFor< SireMol::AtomSelection >(); - ObjectRegistry::registerConverterFor< SireMol::ChainName >(); + ObjectRegistry::registerConverterFor< SireMol::Molecule >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::MoleculeData >(); + ObjectRegistry::registerConverterFor< SireMol::MoleculeGroup >(); + ObjectRegistry::registerConverterFor< SireMol::MoleculeGroups >(); + ObjectRegistry::registerConverterFor< SireMol::MoleculeInfo >(); ObjectRegistry::registerConverterFor< SireMol::MoleculeInfoData >(); - ObjectRegistry::registerConverterFor< SireMol::AtomPolarisabilities >(); - ObjectRegistry::registerConverterFor< SireMol::AtomElements >(); - ObjectRegistry::registerConverterFor< SireMol::MGNum >(); - ObjectRegistry::registerConverterFor< SireMol::BeadEditor >(); - ObjectRegistry::registerConverterFor< SireMol::AtomEditor >(); - ObjectRegistry::registerConverterFor< SireMol::AtomStructureEditor >(); + ObjectRegistry::registerConverterFor< SireMol::Molecules >(); + ObjectRegistry::registerConverterFor< SireMol::MolEditor >(); + ObjectRegistry::registerConverterFor< SireMol::MolStructureEditor >(); + ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); + ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); + ObjectRegistry::registerConverterFor< SireMol::MolIdentifier >(); + ObjectRegistry::registerConverterFor< SireMol::MolIdx >(); + ObjectRegistry::registerConverterFor< SireMol::MolName >(); + ObjectRegistry::registerConverterFor< SireMol::MolNum >(); + ObjectRegistry::registerConverterFor< SireMol::MolResID >(); + ObjectRegistry::registerConverterFor< SireMol::MolResNum >(); + ObjectRegistry::registerConverterFor< SireMol::MolWithResID >(); ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); - ObjectRegistry::registerConverterFor< SireMol::MoleculeGroup >(); + ObjectRegistry::registerConverterFor< SireMol::PartialMolecule >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::NullPerturbation >(); + ObjectRegistry::registerConverterFor< SireMol::Perturbations >(); + ObjectRegistry::registerConverterFor< SireMol::Radical >(); ObjectRegistry::registerConverterFor< SireMol::ResEditor >(); ObjectRegistry::registerConverterFor< SireMol::ResStructureEditor >(); - ObjectRegistry::registerConverterFor< SireMol::ChainEditor >(); - ObjectRegistry::registerConverterFor< SireMol::ChainStructureEditor >(); - ObjectRegistry::registerConverterFor< SireMol::AtomRadii >(); - ObjectRegistry::registerConverterFor< SireMol::MolWithResID >(); - ObjectRegistry::registerConverterFor< SireMol::AtomIdxMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::AtomNameMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::AtomIDMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::AtomMultiMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::AtomMCSMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::ResIdxAtomNameMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::ResNumAtomNameMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::ResIdxAtomMCSMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::ResIdxAtomCoordMatcher >(); - ObjectRegistry::registerConverterFor< SireMol::NullGeometryPerturbation >(); - ObjectRegistry::registerConverterFor< SireMol::GeometryPerturbations >(); - ObjectRegistry::registerConverterFor< SireMol::BondPerturbation >(); - ObjectRegistry::registerConverterFor< SireMol::AnglePerturbation >(); - ObjectRegistry::registerConverterFor< SireMol::DihedralPerturbation >(); - ObjectRegistry::registerConverterFor< SireMol::ViewsOfMol >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::ChainsWithRes >(); - ObjectRegistry::registerConverterFor< SireMol::ResWithAtoms >(); - ObjectRegistry::registerConverterFor< SireMol::CGsWithAtoms >(); - ObjectRegistry::registerConverterFor< SireMol::ChainsWithAtoms >(); - ObjectRegistry::registerConverterFor< SireMol::SegsWithAtoms >(); - ObjectRegistry::registerConverterFor< SireMol::SegName >(); - ObjectRegistry::registerConverterFor< SireMol::SpecifyMol >(); + ObjectRegistry::registerConverterFor< SireID::Specify >(); + ObjectRegistry::registerConverterFor< SireMol::AtomsIn >(); + ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); + ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); + ObjectRegistry::registerConverterFor< SireID::MatchAll >(); + ObjectRegistry::registerConverterFor< SireID::InvertMatch >(); + ObjectRegistry::registerConverterFor< SireMol::ResIdentifier >(); + ObjectRegistry::registerConverterFor< SireMol::Residue >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::Selector >(); + ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); + ObjectRegistry::registerConverterFor< SireMol::ResidueCutting >(); + ObjectRegistry::registerConverterFor< SireMol::ResIdx >(); + ObjectRegistry::registerConverterFor< SireMol::ResName >(); + ObjectRegistry::registerConverterFor< SireMol::ResNum >(); + ObjectRegistry::registerConverterFor< SireMol::SegEditor >(); + ObjectRegistry::registerConverterFor< SireMol::SegStructureEditor >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireMol::AtomsIn >(); ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); @@ -294,44 +301,49 @@ void register_SireMol_objects() ObjectRegistry::registerConverterFor< SireID::MatchAll >(); ObjectRegistry::registerConverterFor< SireID::InvertMatch >(); ObjectRegistry::registerConverterFor< SireMol::SegIdentifier >(); - ObjectRegistry::registerConverterFor< SireMol::CGAtomIdx >(); + ObjectRegistry::registerConverterFor< SireMol::SegIdx >(); + ObjectRegistry::registerConverterFor< SireMol::Segment >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::Selector >(); + ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); + ObjectRegistry::registerConverterFor< SireMol::SegName >(); + ObjectRegistry::registerConverterFor< SireMol::parse_error >(); + ObjectRegistry::registerConverterFor< SireMol::Select >(); + ObjectRegistry::registerConverterFor< SireMol::SelectResult >(); + ObjectRegistry::registerConverterFor< SireMol::SelectResultMover >(); + ObjectRegistry::registerConverterFor< SireMol::SelectorMol >(); + ObjectRegistry::registerConverterFor< SireMol::SelectorM >(); + ObjectRegistry::registerConverterFor< SireMol::SelectorM >(); + ObjectRegistry::registerConverterFor< SireMol::SelectorM >(); + ObjectRegistry::registerConverterFor< SireMol::SelectorM >(); + ObjectRegistry::registerConverterFor< SireMol::SelectorM >(); + ObjectRegistry::registerConverterFor< SireMol::SpecifyMol >(); + ObjectRegistry::registerConverterFor< SireMol::Stereoscopy >(); + ObjectRegistry::registerConverterFor< SireMol::ViewsOfMol >(); + ObjectRegistry::registerConverterFor< SireMol::Mover >(); + ObjectRegistry::registerConverterFor< SireMol::VolumeMap >(); ObjectRegistry::registerConverterFor< SireMol::RelFromMass >(); ObjectRegistry::registerConverterFor< SireMol::RelFromNumber >(); ObjectRegistry::registerConverterFor< SireMol::AbsFromMass >(); ObjectRegistry::registerConverterFor< SireMol::AbsFromNumber >(); - ObjectRegistry::registerConverterFor< SireMol::Radical >(); - ObjectRegistry::registerConverterFor< SireMol::Bead >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::AtomForces >(); - ObjectRegistry::registerConverterFor< SireMol::Force3D >(); - ObjectRegistry::registerConverterFor< SireMol::AtomVelocities >(); - ObjectRegistry::registerConverterFor< SireMol::Velocity3D >(); - ObjectRegistry::registerConverterFor< SireMol::MoleculeInfo >(); - ObjectRegistry::registerConverterFor< SireMol::ResAtomID >(); - ObjectRegistry::registerConverterFor< SireMol::ChainAtomID >(); - ObjectRegistry::registerConverterFor< SireMol::SegAtomID >(); - ObjectRegistry::registerConverterFor< SireMol::CGAtomID >(); - ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); - ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); - ObjectRegistry::registerConverterFor< SireMol::AtomNum >(); - ObjectRegistry::registerConverterFor< SireMol::Residue >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::Selector >(); - ObjectRegistry::registerConverterFor< SireMol::Mover< SireMol::Selector > >(); - ObjectRegistry::registerConverterFor< SireMol::MolNum >(); - ObjectRegistry::registerConverterFor< SireMol::Molecule >(); - ObjectRegistry::registerConverterFor< SireMol::Mover >(); - ObjectRegistry::registerConverterFor< SireMol::SegEditor >(); - ObjectRegistry::registerConverterFor< SireMol::SegStructureEditor >(); - ObjectRegistry::registerConverterFor< SireMol::MGIDsAndMaps >(); + ObjectRegistry::registerConverterFor< SireMol::ResWithAtoms >(); + ObjectRegistry::registerConverterFor< SireMol::CGsWithAtoms >(); + ObjectRegistry::registerConverterFor< SireMol::ChainsWithAtoms >(); + ObjectRegistry::registerConverterFor< SireMol::SegsWithAtoms >(); + ObjectRegistry::registerConverterFor< SireMol::Within >(); + ObjectRegistry::registerConverterFor< SireMol::ChainsWithRes >(); ObjectRegistry::registerConverterFor< SireMol::AtomStringProperty >(); ObjectRegistry::registerConverterFor< SireMol::AtomIntProperty >(); ObjectRegistry::registerConverterFor< SireMol::AtomFloatProperty >(); ObjectRegistry::registerConverterFor< SireMol::AtomVariantProperty >(); - ObjectRegistry::registerConverterFor< SireMol::SegStringProperty >(); - ObjectRegistry::registerConverterFor< SireMol::SegIntProperty >(); - ObjectRegistry::registerConverterFor< SireMol::SegFloatProperty >(); - ObjectRegistry::registerConverterFor< SireMol::SegVariantProperty >(); + ObjectRegistry::registerConverterFor< SireMol::BeadStringProperty >(); + ObjectRegistry::registerConverterFor< SireMol::BeadIntProperty >(); + ObjectRegistry::registerConverterFor< SireMol::BeadFloatProperty >(); + ObjectRegistry::registerConverterFor< SireMol::BeadVariantProperty >(); + ObjectRegistry::registerConverterFor< SireMol::CGStringProperty >(); + ObjectRegistry::registerConverterFor< SireMol::CGIntProperty >(); + ObjectRegistry::registerConverterFor< SireMol::CGFloatProperty >(); + ObjectRegistry::registerConverterFor< SireMol::CGVariantProperty >(); ObjectRegistry::registerConverterFor< SireMol::ChainStringProperty >(); ObjectRegistry::registerConverterFor< SireMol::ChainIntProperty >(); ObjectRegistry::registerConverterFor< SireMol::ChainFloatProperty >(); @@ -340,14 +352,10 @@ void register_SireMol_objects() ObjectRegistry::registerConverterFor< SireMol::ResIntProperty >(); ObjectRegistry::registerConverterFor< SireMol::ResFloatProperty >(); ObjectRegistry::registerConverterFor< SireMol::ResVariantProperty >(); - ObjectRegistry::registerConverterFor< SireMol::CGStringProperty >(); - ObjectRegistry::registerConverterFor< SireMol::CGIntProperty >(); - ObjectRegistry::registerConverterFor< SireMol::CGFloatProperty >(); - ObjectRegistry::registerConverterFor< SireMol::CGVariantProperty >(); - ObjectRegistry::registerConverterFor< SireMol::BeadStringProperty >(); - ObjectRegistry::registerConverterFor< SireMol::BeadIntProperty >(); - ObjectRegistry::registerConverterFor< SireMol::BeadFloatProperty >(); - ObjectRegistry::registerConverterFor< SireMol::BeadVariantProperty >(); + ObjectRegistry::registerConverterFor< SireMol::SegStringProperty >(); + ObjectRegistry::registerConverterFor< SireMol::SegIntProperty >(); + ObjectRegistry::registerConverterFor< SireMol::SegFloatProperty >(); + ObjectRegistry::registerConverterFor< SireMol::SegVariantProperty >(); } diff --git a/wrapper/Mol/SpecifyMol.pypp.cpp b/wrapper/Mol/SpecifyMol.pypp.cpp index 86a0114fb..ea960d54b 100644 --- a/wrapper/Mol/SpecifyMol.pypp.cpp +++ b/wrapper/Mol/SpecifyMol.pypp.cpp @@ -31,6 +31,8 @@ SireMol::SpecifyMol __copy__(const SireMol::SpecifyMol &other){ return SireMol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SpecifyMol_class(){ { //::SireMol::SpecifyMol @@ -49,6 +51,7 @@ void register_SpecifyMol_class(){ SpecifyMol_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Hash this ID" ); } @@ -60,6 +63,7 @@ void register_SpecifyMol_class(){ SpecifyMol_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this ID is null" ); } @@ -72,6 +76,7 @@ void register_SpecifyMol_class(){ "map" , map_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Map this ID to the list of molecule numbers that match" ); } @@ -84,6 +89,7 @@ void register_SpecifyMol_class(){ "map" , map_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Map this ID to the list of molecule numbers that match" ); } @@ -96,6 +102,7 @@ void register_SpecifyMol_class(){ "map" , map_function_value , ( bp::arg("molgroups") ) + , bp::release_gil_policy() , "Map this ID to the list of molecule numbers that match" ); } @@ -124,6 +131,7 @@ void register_SpecifyMol_class(){ SpecifyMol_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ID" ); } @@ -135,6 +143,7 @@ void register_SpecifyMol_class(){ SpecifyMol_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -146,6 +155,7 @@ void register_SpecifyMol_class(){ SpecifyMol_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Specify_AtomID_.pypp.cpp b/wrapper/Mol/Specify_AtomID_.pypp.cpp index ab14cdb68..efeeb8b66 100644 --- a/wrapper/Mol/Specify_AtomID_.pypp.cpp +++ b/wrapper/Mol/Specify_AtomID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::Specify __copy__(const SireID::Specify #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Specify_AtomID__class(){ { //::SireID::Specify< SireMol::AtomID > @@ -79,6 +81,7 @@ void register_Specify_AtomID__class(){ Specify_AtomID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +94,7 @@ void register_Specify_AtomID__class(){ Specify_AtomID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +108,7 @@ void register_Specify_AtomID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -212,6 +217,7 @@ void register_Specify_AtomID__class(){ Specify_AtomID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -224,6 +230,7 @@ void register_Specify_AtomID__class(){ Specify_AtomID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -236,6 +243,7 @@ void register_Specify_AtomID__class(){ Specify_AtomID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Specify_CGID_.pypp.cpp b/wrapper/Mol/Specify_CGID_.pypp.cpp index 1fdda0cc6..096433e50 100644 --- a/wrapper/Mol/Specify_CGID_.pypp.cpp +++ b/wrapper/Mol/Specify_CGID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::Specify __copy__(const SireID::Specify &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Specify_CGID__class(){ { //::SireID::Specify< SireMol::CGID > @@ -75,6 +77,7 @@ void register_Specify_CGID__class(){ Specify_CGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_Specify_CGID__class(){ Specify_CGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +104,7 @@ void register_Specify_CGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -208,6 +213,7 @@ void register_Specify_CGID__class(){ Specify_CGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +226,7 @@ void register_Specify_CGID__class(){ Specify_CGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -232,6 +239,7 @@ void register_Specify_CGID__class(){ Specify_CGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Specify_ChainID_.pypp.cpp b/wrapper/Mol/Specify_ChainID_.pypp.cpp index 89332236c..c4b539025 100644 --- a/wrapper/Mol/Specify_ChainID_.pypp.cpp +++ b/wrapper/Mol/Specify_ChainID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::Specify __copy__(const SireID::Specify @@ -75,6 +77,7 @@ void register_Specify_ChainID__class(){ Specify_ChainID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_Specify_ChainID__class(){ Specify_ChainID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +104,7 @@ void register_Specify_ChainID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -208,6 +213,7 @@ void register_Specify_ChainID__class(){ Specify_ChainID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +226,7 @@ void register_Specify_ChainID__class(){ Specify_ChainID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -232,6 +239,7 @@ void register_Specify_ChainID__class(){ Specify_ChainID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Specify_MGID_.pypp.cpp b/wrapper/Mol/Specify_MGID_.pypp.cpp index f0107e9d6..31c92dcb9 100644 --- a/wrapper/Mol/Specify_MGID_.pypp.cpp +++ b/wrapper/Mol/Specify_MGID_.pypp.cpp @@ -39,6 +39,8 @@ SireID::Specify __copy__(const SireID::Specify &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Specify_MGID__class(){ { //::SireID::Specify< SireMol::MGID > @@ -59,6 +61,7 @@ void register_Specify_MGID__class(){ Specify_MGID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -71,6 +74,7 @@ void register_Specify_MGID__class(){ Specify_MGID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -84,6 +88,7 @@ void register_Specify_MGID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -192,6 +197,7 @@ void register_Specify_MGID__class(){ Specify_MGID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -204,6 +210,7 @@ void register_Specify_MGID__class(){ Specify_MGID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -216,6 +223,7 @@ void register_Specify_MGID__class(){ Specify_MGID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Specify_ResID_.pypp.cpp b/wrapper/Mol/Specify_ResID_.pypp.cpp index 2a0634193..ce2ce7193 100644 --- a/wrapper/Mol/Specify_ResID_.pypp.cpp +++ b/wrapper/Mol/Specify_ResID_.pypp.cpp @@ -59,6 +59,8 @@ SireID::Specify __copy__(const SireID::Specify & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Specify_ResID__class(){ { //::SireID::Specify< SireMol::ResID > @@ -79,6 +81,7 @@ void register_Specify_ResID__class(){ Specify_ResID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +94,7 @@ void register_Specify_ResID__class(){ Specify_ResID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -104,6 +108,7 @@ void register_Specify_ResID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -212,6 +217,7 @@ void register_Specify_ResID__class(){ Specify_ResID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -224,6 +230,7 @@ void register_Specify_ResID__class(){ Specify_ResID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -236,6 +243,7 @@ void register_Specify_ResID__class(){ Specify_ResID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Specify_SegID_.pypp.cpp b/wrapper/Mol/Specify_SegID_.pypp.cpp index 6881719c2..d78230da9 100644 --- a/wrapper/Mol/Specify_SegID_.pypp.cpp +++ b/wrapper/Mol/Specify_SegID_.pypp.cpp @@ -55,6 +55,8 @@ SireID::Specify __copy__(const SireID::Specify & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Specify_SegID__class(){ { //::SireID::Specify< SireMol::SegID > @@ -75,6 +77,7 @@ void register_Specify_SegID__class(){ Specify_SegID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_Specify_SegID__class(){ Specify_SegID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +104,7 @@ void register_Specify_SegID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -208,6 +213,7 @@ void register_Specify_SegID__class(){ Specify_SegID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +226,7 @@ void register_Specify_SegID__class(){ Specify_SegID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -232,6 +239,7 @@ void register_Specify_SegID__class(){ Specify_SegID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Stereoscopy.pypp.cpp b/wrapper/Mol/Stereoscopy.pypp.cpp index 45b41521f..65e12cab1 100644 --- a/wrapper/Mol/Stereoscopy.pypp.cpp +++ b/wrapper/Mol/Stereoscopy.pypp.cpp @@ -25,6 +25,8 @@ SireMol::Stereoscopy __copy__(const SireMol::Stereoscopy &other){ return SireMol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Stereoscopy_class(){ { //::SireMol::Stereoscopy @@ -42,6 +44,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "down" , down_function_value + , bp::release_gil_policy() , "Return a down Stereoscopy" ); } @@ -53,6 +56,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "isDefined" , isDefined_function_value + , bp::release_gil_policy() , "Return whether or not the stereoscopy is defined" ); } @@ -64,6 +68,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "isDown" , isDown_function_value + , bp::release_gil_policy() , "Return whether or not this is a down bond" ); } @@ -75,6 +80,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "isNotStereo" , isNotStereo_function_value + , bp::release_gil_policy() , "Return whether or not this is a not stereo bond" ); } @@ -86,6 +92,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "isUp" , isUp_function_value + , bp::release_gil_policy() , "Return whether or not this is an up bond" ); } @@ -97,6 +104,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "notStereo" , notStereo_function_value + , bp::release_gil_policy() , "Return a not stereo Stereoscopy" ); } @@ -123,6 +131,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "sdfValue" , sdfValue_function_value + , bp::release_gil_policy() , "Return the SDF-format value for this bond. This returns\n0 if the stereoscopy is undefined\n" ); } @@ -134,6 +143,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -145,6 +155,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -156,6 +167,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "undefined" , undefined_function_value + , bp::release_gil_policy() , "Return an undefined Stereoscopy" ); } @@ -167,6 +179,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "up" , up_function_value + , bp::release_gil_policy() , "Return an up Stereoscopy" ); } @@ -178,6 +191,7 @@ void register_Stereoscopy_class(){ Stereoscopy_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "Return the stereo type (uses SDF values, e.g. 0 is not stereo,\n1 is up, 6 is down. We have added -1 to mean undefined)\n" ); } diff --git a/wrapper/Mol/UserBeading.pypp.cpp b/wrapper/Mol/UserBeading.pypp.cpp index 05ffd82e4..5de4290e5 100644 --- a/wrapper/Mol/UserBeading.pypp.cpp +++ b/wrapper/Mol/UserBeading.pypp.cpp @@ -40,6 +40,8 @@ SireMol::UserBeading __copy__(const SireMol::UserBeading &other){ return SireMol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_UserBeading_class(){ { //::SireMol::UserBeading @@ -56,7 +58,7 @@ void register_UserBeading_class(){ UserBeading_exposer.def( "atomBeads" , atomBeads_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the bead specification for each atom" ); } @@ -69,6 +71,7 @@ void register_UserBeading_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this beading is compatible with the passed molecule info" ); } @@ -95,6 +98,7 @@ void register_UserBeading_class(){ UserBeading_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Velocity3D.pypp.cpp b/wrapper/Mol/Velocity3D.pypp.cpp index 147d41036..ce68a1f7d 100644 --- a/wrapper/Mol/Velocity3D.pypp.cpp +++ b/wrapper/Mol/Velocity3D.pypp.cpp @@ -17,6 +17,8 @@ SireMaths::Vector3D > __cop #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Velocity3D_class(){ @@ -52,6 +54,7 @@ void register_Velocity3D_class(){ Velocity3D_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -100,6 +103,7 @@ void register_Velocity3D_class(){ "set" , set_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -112,6 +116,7 @@ void register_Velocity3D_class(){ Velocity3D_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -124,6 +129,7 @@ void register_Velocity3D_class(){ Velocity3D_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -136,6 +142,7 @@ void register_Velocity3D_class(){ Velocity3D_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/VolumeMap.pypp.cpp b/wrapper/Mol/VolumeMap.pypp.cpp index ac7a91925..495ef6d1a 100644 --- a/wrapper/Mol/VolumeMap.pypp.cpp +++ b/wrapper/Mol/VolumeMap.pypp.cpp @@ -35,6 +35,8 @@ SireMol::VolumeMap __copy__(const SireMol::VolumeMap &other){ return SireMol::Vo #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VolumeMap_class(){ { //::SireMol::VolumeMap @@ -180,6 +182,7 @@ void register_VolumeMap_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the data from the other passed volume map onto this map" ); } @@ -192,6 +195,7 @@ void register_VolumeMap_class(){ "add" , add_function_value , ( bp::arg("gridinfo"), bp::arg("values") ) + , bp::release_gil_policy() , "Add the data from the passed grid onto this map" ); } @@ -203,6 +207,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "clear" , clear_function_value + , bp::release_gil_policy() , "Clear the current grid" ); } @@ -214,6 +219,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "clearMask" , clearMask_function_value + , bp::release_gil_policy() , "Clear the set of mask points and mask distance" ); } @@ -225,6 +231,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "fillType" , fillType_function_value + , bp::release_gil_policy() , "Return the method used to assign atoms to grid points" ); } @@ -248,6 +255,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "gridSpacing" , gridSpacing_function_value + , bp::release_gil_policy() , "Return the grid spacing" ); } @@ -259,6 +267,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this map is empty" ); } @@ -270,6 +279,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "isMasked" , isMasked_function_value + , bp::release_gil_policy() , "Return whether or not this volume map is masked" ); } @@ -281,6 +291,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "mapType" , mapType_function_value + , bp::release_gil_policy() , "Return the type of map" ); } @@ -292,6 +303,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "maskDistance" , maskDistance_function_value + , bp::release_gil_policy() , "Return the mask distance. Grid points are only evaluated if they are\nwithin this distance of any of the masking points" ); } @@ -303,6 +315,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "maskPoints" , maskPoints_function_value + , bp::release_gil_policy() , "Return all of the masking points. Grid points are only evaluated if\nthey are within the mask distance of any of these points" ); } @@ -314,6 +327,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "nGridPoints" , nGridPoints_function_value + , bp::release_gil_policy() , "Return the number of grid points in the grid" ); } @@ -325,6 +339,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "nMaxGridPoints" , nMaxGridPoints_function_value + , bp::release_gil_policy() , "Return the maximum number of grid points available to this map" ); } @@ -336,6 +351,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the number of samples used to create this map" ); } @@ -375,6 +391,7 @@ void register_VolumeMap_class(){ "setFillType" , setFillType_function_value , ( bp::arg("fill_type") ) + , bp::release_gil_policy() , "Set the method to assign atoms to grid points. Supported methods are;\n" ); } @@ -387,6 +404,7 @@ void register_VolumeMap_class(){ "setGridSpacing" , setGridSpacing_function_value , ( bp::arg("grid_spacing") ) + , bp::release_gil_policy() , "Set the desired grid spacing. If this is not the same as the current\ngrid, then the current map is re-mapped onto the new grid" ); } @@ -399,6 +417,7 @@ void register_VolumeMap_class(){ "setMapType" , setMapType_function_value , ( bp::arg("map_type") ) + , bp::release_gil_policy() , "Set the type of map. Supported types are;\n" ); } @@ -447,6 +466,7 @@ void register_VolumeMap_class(){ "setNMaxGridPoints" , setNMaxGridPoints_function_value , ( bp::arg("nmax") ) + , bp::release_gil_policy() , "Set the maximum number of grid points available to this map. Note that\nif this is less than the current number of points, then it prevents\nthe map from growing (but doesnt shrink the map)" ); } @@ -459,6 +479,7 @@ void register_VolumeMap_class(){ "setSkipLightAtoms" , setSkipLightAtoms_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to exclude light atoms from the map" ); } @@ -470,6 +491,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "skipLightAtoms" , skipLightAtoms_function_value + , bp::release_gil_policy() , "Return whether or not light atoms are excluded from the map" ); } @@ -481,6 +503,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -492,6 +515,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -503,6 +527,7 @@ void register_VolumeMap_class(){ VolumeMap_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/WeightFunction.pypp.cpp b/wrapper/Mol/WeightFunction.pypp.cpp index 41fb66e05..a09c20764 100644 --- a/wrapper/Mol/WeightFunction.pypp.cpp +++ b/wrapper/Mol/WeightFunction.pypp.cpp @@ -14,6 +14,8 @@ namespace bp = boost::python; #include "atomselection.h" +#include "core.h" + #include "editor.hpp" #include "evaluator.h" @@ -34,6 +36,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_WeightFunction_class(){ { //::SireMol::WeightFunction @@ -48,7 +52,7 @@ void register_WeightFunction_class(){ WeightFunction_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -96,6 +100,7 @@ void register_WeightFunction_class(){ WeightFunction_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/Within.pypp.cpp b/wrapper/Mol/Within.pypp.cpp index 2bb94e255..47d96eaf2 100644 --- a/wrapper/Mol/Within.pypp.cpp +++ b/wrapper/Mol/Within.pypp.cpp @@ -37,6 +37,8 @@ SireMol::Within __copy__(const SireMol::Within &other){ return SireMol::Within(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Within_class(){ { //::SireMol::Within @@ -54,6 +56,7 @@ void register_Within_class(){ Within_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "Return a hash of this identifier" ); } @@ -65,6 +68,7 @@ void register_Within_class(){ Within_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Is this selection null?" ); } @@ -77,6 +81,7 @@ void register_Within_class(){ "map" , map_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Map this ID to the list of indicies of atoms that match this ID\nNote that this function is not valid for this ID class, as\nwe need to have access to the molecular coordinates\nThrow: SireError::incompatible_error\n" ); } @@ -89,6 +94,7 @@ void register_Within_class(){ "map" , map_function_value , ( bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "Map this ID to the list of atomidxs of specified atoms\nin the passed molecule\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -116,6 +122,7 @@ void register_Within_class(){ Within_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representatio of this ID" ); } @@ -127,6 +134,7 @@ void register_Within_class(){ Within_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -138,6 +146,7 @@ void register_Within_class(){ Within_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Mol/_Mol.main.cpp b/wrapper/Mol/_Mol.main.cpp index 9e228ebf4..0f8ff5440 100644 --- a/wrapper/Mol/_Mol.main.cpp +++ b/wrapper/Mol/_Mol.main.cpp @@ -225,6 +225,8 @@ #include "Evaluator.pypp.hpp" +#include "EvaluatorM.pypp.hpp" + #include "Force3D.pypp.hpp" #include "GeometryPerturbation.pypp.hpp" @@ -473,6 +475,18 @@ #include "SelectResultMover.pypp.hpp" +#include "SelectorM_Atom_.pypp.hpp" + +#include "SelectorM_Chain_.pypp.hpp" + +#include "SelectorM_CutGroup_.pypp.hpp" + +#include "SelectorM_Residue_.pypp.hpp" + +#include "SelectorM_Segment_.pypp.hpp" + +#include "SelectorMol.pypp.hpp" + #include "Selector_Atom_.pypp.hpp" #include "Selector_Chain_.pypp.hpp" @@ -842,6 +856,8 @@ BOOST_PYTHON_MODULE(_Mol){ register_Evaluator_class(); + register_EvaluatorM_class(); + register_GeometryPerturbations_class(); register_GroupAtomIDBase_class(); @@ -1028,6 +1044,18 @@ BOOST_PYTHON_MODULE(_Mol){ register_SelectResultMover_class(); + register_SelectorM_Atom__class(); + + register_SelectorM_Chain__class(); + + register_SelectorM_CutGroup__class(); + + register_SelectorM_Residue__class(); + + register_SelectorM_Segment__class(); + + register_SelectorMol_class(); + register_SpecifyMol_class(); register_Stereoscopy_class(); diff --git a/wrapper/Mol/__init__.py b/wrapper/Mol/__init__.py index 31c2b8638..37ad30893 100644 --- a/wrapper/Mol/__init__.py +++ b/wrapper/Mol/__init__.py @@ -1,47 +1,238 @@ -############################# -## -## The SireMol module -## -## (C) Christopher Woods -## - -import Sire.Maths -import Sire.Base -import Sire.ID -import Sire.Qt -import Sire.CAS -import Sire.Vol -import Sire.Units - -from Sire.Mol._Mol import * +""" +.. currentmodule:: sire.legacy.Mol + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + AbsFromMass + AbsFromNumber + AngleID + AnglePerturbation + Atom + AtomBeads + AtomCharges + AtomCoords + AtomCutting + AtomDoubleArrayProperty + AtomEditor + AtomElements + AtomEnergies + AtomFloatProperty + AtomForces + AtomID + AtomIDMatcher + AtomIdx + AtomIdxMatcher + AtomIntegerArrayProperty + AtomIntProperty + AtomMasses + AtomMatcher + AtomMatchInverter + AtomMCSMatcher + AtomMultiMatcher + AtomName + AtomNameMatcher + AtomNum + AtomPolarisabilities + AtomPropertyList + AtomRadicals + AtomRadii + AtomResultMatcher + AtomSelection + AtomStringArrayProperty + AtomStringProperty + AtomStructureEditor + AtomVariantProperty + AtomVelocities + Bead + BeadEditor + BeadFloatProperty + BeadID + BeadIdx + Beading + BeadIntProperty + BeadNum + Beads + BeadStringProperty + BeadVariantProperty + BondHunter + BondID + BondPerturbation + BondType + Chain + ChainAtomID + ChainEditor + ChainFloatProperty + ChainID + ChainIdx + ChainIntProperty + ChainName + ChainResID + ChainStringProperty + ChainStructureEditor + ChainsWithAtoms + ChainsWithRes + ChainVariantProperty + ChargePerturbation + ChemicalBondHunter + Connectivity + ConnectivityEditor + CovalentBondHunter + CuttingFunction + DihedralID + DihedralPerturbation + Element + Evaluator + Force3D + GeometryPerturbation + GeometryPerturbations + ImproperID + MGID + MGIdx + MGName + MGNum + Molecule + MoleculeBeading + MoleculeGroup + MoleculeGroups + MoleculeInfo + Molecules + MoleculeView + MolEditor + MolID + MolIdx + MolInfo + MolName + MolNum + MolResNum + MolStructureEditor + MoverBase + PartialMolecule + Perturbation + Perturbations + PerturbationSymbols + Radical + RelFromMass + RelFromNumber + ResAtomID + ResEditor + ResFloatProperty + ResID + Residue + ResidueBeading + ResidueCutting + ResIdx + ResIdxAtomCoordMatcher + ResIdxAtomMCSMatcher + ResIdxAtomNameMatcher + ResIntProperty + ResName + ResNum + ResNumAtomNameMatcher + ResStringProperty + ResStructureEditor + ResVariantProperty + ResWithAtoms + SegAtomID + SegChainID + SegEditor + SegFloatProperty + SegID + SegIdx + SegIntProperty + Segment + SegName + SegResID + SegStringProperty + SegStructureEditor + SegsWithAtoms + SegVariantProperty + Select + SelectResult + SelectResultMover + SpecifyMol + Stereoscopy + UserBeading + Velocity3D + VolumeMap + WeightFunction + Within + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + getAlignment + +""" + +from calendar import c +from importlib.util import resolve_name +from typing import ChainMap + +from .. import Maths as _Maths +from .. import Base as _Base +from .. import ID as _ID +from .. import Qt as _Qt +from .. import CAS as _CAS +from .. import Vol as _Vol +from .. import Units as _Units + +from ._Mol import * + +from ..Search._Search import install_search_parser as _install_search_parser +_install_search_parser() + def __get_property__(molview, key): - property_type = molview.propertyType(key).replace("::","_") + if hasattr(molview, "property_type"): + property_type = molview.property_type(key).replace("::","_") + else: + property_type = molview.propertyType(key).replace("::","_") return getattr(molview, "_get_property_%s" % property_type)(key) + def __get_metadata__(molview, *args): if len(args) == 1: metakey = args[0] - property_type = molview.metadataType(metakey).replace("::","_") + if hasattr(molview, "metadata_type"): + property_type = molview.metadata_type(metakey).replace("::","_") + else: + property_type = molview.metadataType(metakey).replace("::","_") return getattr(molview, "_get_metadata_%s" % property_type)(metakey) elif len(args) == 2: - (key, metakey) = args - property_type = molview.metadataType(key, metakey).replace("::","_") - return getattr(molview, "_get_metadata_%s" % property_type)(key, metakey) + (key, metakey) = args + if hasattr(molview, "metadata_type"): + property_type = molview.metadata_type(key, metakey).replace("::","_") + else: + property_type = molview.metadataType(key, metakey).replace("::","_") + return getattr(molview, "_get_metadata_%s" % property_type)(key, metakey) else: raise AttributeError( "Only molview.metadata(metakey) or molview.metadata(key, metakey) are valid!" ) _typename_mapping = {"SireMol_Velocity3D" : "SireMaths_Vector3D_SireUnits_Dimension_Velocity_"} + def __get_typename__(obj): try: - typename = obj.typeName().replace("::","_") + if hasattr(obj, "what"): + typename = obj.what().replace("::","_") + elif hasattr(obj, "typename"): + typename = obj.typename().replace("::","_") + else: + typename = obj.typeName().replace("::","_") + return (_typename_mapping.get(typename, typename), obj) - except: + except Exception as e: if isinstance(obj, float): return ("double", obj) elif isinstance(obj, int): @@ -49,7 +240,8 @@ def __get_typename__(obj): elif isinstance(obj, str): return ("QString", obj) else: - return ("QVariant", Sire.Qt.QVariant(obj)) + raise TypeError(f"Unable to wrap type {type(obj)}: {obj} : {e}") + def _match_to_type(typename, property): """Match the passed type of the property to the typename @@ -61,45 +253,54 @@ def _match_to_type(typename, property): values. """ if typename.endswith("StringArrayProperty"): - return Sire.Base.StringArrayProperty(property) + return _Base.StringArrayProperty(property) elif typename.endswith("DoubleArrayProperty"): - return Sire.Base.DoubleArrayProperty(property) + return _Base.DoubleArrayProperty(property) elif typename.endswith("IntegerArrayProperty"): - return Sire.Base.IntegerArrayProperty(property) + return _Base.IntegerArrayProperty(property) elif typename.endswith("PropertyList"): - return Sire.Base.PropertyList(property) + return _Base.PropertyList(property) else: return property + def _set_property(molview, key, property): - if molview.hasProperty(key): - # get the type of the existing property - typename = molview.propertyType(key) - property = _match_to_type(typename, property) + if hasattr(molview, "has_property"): + if molview.has_property(key): + typename = molview.property_type(key) + property = _match_to_type(typename, property) + else: + if molview.hasProperty(key): + # get the type of the existing property + typename = molview.propertyType(key) + property = _match_to_type(typename, property) (typename, property) = __get_typename__(property) return getattr(molview, "_set_property_%s" % typename)(key, property) + def __set_property__(molview, key, property): try: return _set_property(molview, key, property) except Exception as e: - if e.__class__.__name__ == "ArgumentError": - return _set_property(molview, key, Sire.Base.wrap(property)) + if e.__class__.__name__ == "ArgumentError" or e.__class__.__name__ == "AttributeError": + return _set_property(molview, key, _Base.wrap(property)) else: raise e + def __set_bond_property__(connectivity, bond, key, property): try: return connectivity.__setProperty__(bond, key, property) except Exception as e: if e.__class__.__name__ == "ArgumentError": return connectivity.__setProperty__(bond, key, - Sire.Base.wrap(property)) + _Base.wrap(property)) else: raise e + def __set_metadata__(molview, *args): if len(args) == 2: @@ -121,6 +322,7 @@ def __set_metadata__(molview, *args): raise AttributeError( "Only molview.setMetadata(metakey, property) " + \ "or molview.setMetadata(key, metakey, property) are valid!" ) + Atom.property = __get_property__ AtomEditorBase.setProperty = __set_property__ Atom.metadata = __get_metadata__ @@ -150,7 +352,8 @@ def __set_metadata__(molview, *args): ConnectivityEditor.setProperty = __set_bond_property__ MolEditor.__setProperty__ = MolEditor.setProperty -MolEditor.setProperty = Sire.Base.__set_property__ +MolEditor.setProperty = _Base.__set_property__ + def get_molview(mol): """Convert the passed molecule into the most appropriate view, @@ -159,9 +362,11 @@ def get_molview(mol): returned as an Atom etc.""" return mol + class IncompatibleError(Exception): pass + # Python automatically converts ViewsOfMol into a list. Need # to add a Molecule.join function to convert a list back into # a single molecule @@ -200,7 +405,7 @@ def _molecule_join( views ): # I can fix this by accessing the arrays first # via the following code -__p = Sire.Base.Properties() +__p = _Base.Properties() def _pvt_property_cludge_fix(C): __p.setProperty("c", C()) @@ -210,7 +415,8 @@ def _pvt_property_cludge_fix(C): AtomStringArrayProperty, AtomPropertyList, AtomDoubleArrayProperty, - AtomIntegerArrayProperty ] + AtomIntegerArrayProperty + ] for __prop in __props: _pvt_property_cludge_fix(__prop) diff --git a/wrapper/Mol/active_headers.h b/wrapper/Mol/active_headers.h index 35bd81322..c11af4d27 100644 --- a/wrapper/Mol/active_headers.h +++ b/wrapper/Mol/active_headers.h @@ -62,6 +62,7 @@ #include "dihedralid.h" #include "element.h" #include "evaluator.h" +#include "evaluatorm.h" #include "geometryperturbation.h" #include "groupatomids.h" #include "groupgroupids.h" @@ -93,7 +94,6 @@ #include "molwithresid.h" #include "mover.h" #include "mover_metaid.h" -#include "parser.h" #include "partialmolecule.h" #include "perturbation.h" #include "radical.h" @@ -114,6 +114,7 @@ #include "segname.h" #include "segproperty.hpp" #include "select.h" +#include "selectormol.h" #include "specifymol.h" #include "stereoscopy.h" #include "viewsofmol.h" diff --git a/wrapper/Mol/convertviewsofmol.hpp b/wrapper/Mol/convertviewsofmol.hpp index 03ed89dc0..c526a66f8 100644 --- a/wrapper/Mol/convertviewsofmol.hpp +++ b/wrapper/Mol/convertviewsofmol.hpp @@ -36,6 +36,10 @@ #include "SireMol/viewsofmol.h" +#include "Helpers/release_gil_policy.hpp" + +#include + namespace bp = boost::python; SIRE_BEGIN_HEADER @@ -58,6 +62,8 @@ struct viewsofmol_from_py_list to a ViewsOfMol */ static void* convertible(PyObject* obj_ptr) { + auto raii = bp::release_gil_policy::acquire_gil(); + //is this a tuple type? if ( PyTuple_Check(obj_ptr) ) { @@ -67,7 +73,7 @@ struct viewsofmol_from_py_list //how many elements are there? int n = PyTuple_Size(obj_ptr); - //can they all be converted to type MoleculeView + //can they all be converted to type MoleculeView //and they all have the same molecule number SireMol::MolNum molnum; @@ -109,7 +115,7 @@ struct viewsofmol_from_py_list for (int i=0; i get_molview(l[i]); - + if (get_molview.check()) { if (molnum.isNull()) @@ -139,6 +145,8 @@ struct viewsofmol_from_py_list PyObject* obj_ptr, bp::converter::rvalue_from_python_stage1_data* data) { + auto raii = bp::release_gil_policy::acquire_gil(); + if (PyTuple_Check(obj_ptr)) { //convert the PyObject to a boost::python::object @@ -146,7 +154,7 @@ struct viewsofmol_from_py_list //locate the storage space for the result void* storage = - ( (bp::converter::rvalue_from_python_storage*)data + ( (bp::converter::rvalue_from_python_storage*)data )->storage.bytes; //create the ViewsOfMol container @@ -159,7 +167,7 @@ struct viewsofmol_from_py_list if (n > 0) { - *container = SireMol::ViewsOfMol( + *container = SireMol::ViewsOfMol( *(bp::extract(t[0])()) ); } @@ -178,7 +186,7 @@ struct viewsofmol_from_py_list //locate the storage space for the result void* storage = - ( (bp::converter::rvalue_from_python_storage*)data + ( (bp::converter::rvalue_from_python_storage*)data )->storage.bytes; //create the T container @@ -195,7 +203,7 @@ struct viewsofmol_from_py_list *(bp::extract(l[0])()) ); } - for (int i=1; iadd( bp::extract(l[i])() ->selection() ); @@ -206,7 +214,7 @@ struct viewsofmol_from_py_list } }; -/** Function that returns the passed molecule view converted into +/** Function that returns the passed molecule view converted into a boost python object of the appropriate type, e.g. if the view is a single atom, it is an Atom, if it is a single residue, it is a Residue etc. etc. */ @@ -270,6 +278,8 @@ struct viewsofmol_to_py_list //Atom, Residue, Molecule etc. views static PyObject* convert(const SireMol::ViewsOfMol &views) { + auto raii = bp::release_gil_policy::acquire_gil(); + if (views.nViews() == 0) { //return None @@ -283,6 +293,45 @@ struct viewsofmol_to_py_list } else { + // are the views all of one type? + QString typ; + + try + { + typ = views.getCommonType(); + } + catch(...) + {} + + if (typ == "SireMol::Atom") + { + return bp::incref(bp::object(views.atoms()).ptr()); + } + else if (typ == "SireMol::Residue") + { + return bp::incref(bp::object(views.residues()).ptr()); + } + else if (typ == "SireMol::Chain") + { + return bp::incref(bp::object(views.chains()).ptr()); + } + else if (typ == "SireMol::CutGroup") + { + return bp::incref(bp::object(views.cutGroups()).ptr()); + } + else if (typ == "SireMol::Segment") + { + return bp::incref(bp::object(views.segments()).ptr()); + } + else if (typ == "SireMol::Molecule") + { + // we only return a single molecule if there are multiple views + bp::object obj = get_molview(views.valueAt(0)); + return bp::incref( obj.ptr() ); + } + + // this is a mixture of types, so return this as a + // python list of views bp::list python_list; //add all items to the python list diff --git a/wrapper/Move/CMakeAutogenFile.txt b/wrapper/Move/CMakeAutogenFile.txt index a340e98fa..8f4afa1af 100644 --- a/wrapper/Move/CMakeAutogenFile.txt +++ b/wrapper/Move/CMakeAutogenFile.txt @@ -1,84 +1,84 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - Replicas.pypp.cpp - NullInserter.pypp.cpp - Replica.pypp.cpp + DLMRigidBody.pypp.cpp + DofID.pypp.cpp + Dynamics.pypp.cpp + Ensemble.pypp.cpp + Flexibility.pypp.cpp + GetCOGPoint.pypp.cpp + GetCOMPoint.pypp.cpp + GetCentroidPoint.pypp.cpp + GetPoint.pypp.cpp + HMCGenerator.pypp.cpp + HMCVelGen.pypp.cpp + HybridMC.pypp.cpp + Integrator.pypp.cpp + InternalMove.pypp.cpp + InternalMoveSingle.pypp.cpp + MTSMC.pypp.cpp MaxwellBoltzmann.pypp.cpp - TitrationMove.pypp.cpp - VelocityVerlet.pypp.cpp - RepExMove2.pypp.cpp + MolDeleter.pypp.cpp + MolInserter.pypp.cpp + MolecularDynamics.pypp.cpp MonteCarlo.pypp.cpp - SupraSubMoves.pypp.cpp - UniformInserter.pypp.cpp + Move.pypp.cpp + Moves.pypp.cpp + NullDeleter.pypp.cpp + NullGetPoint.pypp.cpp + NullInserter.pypp.cpp + NullIntegrator.pypp.cpp + NullMove.pypp.cpp + NullSupraMove.pypp.cpp + NullSupraSubMove.pypp.cpp + NullVelocityGenerator.pypp.cpp + NullVolumeChanger.pypp.cpp + OpenMMFrEnergyDT.pypp.cpp + OpenMMFrEnergyST.pypp.cpp + OpenMMMDIntegrator.pypp.cpp + OpenMMPMEFEP.pypp.cpp PrefSampler.pypp.cpp - Titrator.pypp.cpp + RBWorkspaceJM.pypp.cpp + RepExMove.pypp.cpp + RepExMove2.pypp.cpp + RepExSubMove.pypp.cpp + Replica.pypp.cpp + Replicas.pypp.cpp RigidBodyMC.pypp.cpp - MTSMC.pypp.cpp - Simulation.pypp.cpp - NullSupraSubMove.pypp.cpp SameMoves.pypp.cpp - UniformSampler.pypp.cpp - SupraMoves.pypp.cpp - MolDeleter.pypp.cpp - Integrator.pypp.cpp + SameSupraMoves.pypp.cpp + SameSupraSubMoves.pypp.cpp + Sampler.pypp.cpp + ScaleVolumeFromCenter.pypp.cpp + SimPacket.pypp.cpp SimStore.pypp.cpp - Flexibility.pypp.cpp + Simulation.pypp.cpp SpecifiedGroupsDeleter.pypp.cpp - SupraSim.pypp.cpp SupraMove.pypp.cpp - NullSupraMove.pypp.cpp - HMCVelGen.pypp.cpp - VelocitiesFromProperty.pypp.cpp - SystemWideDeleter.pypp.cpp - GetPoint.pypp.cpp - MolecularDynamics.pypp.cpp - SameSupraSubMoves.pypp.cpp - ZMatMove.pypp.cpp - ScaleVolumeFromCenter.pypp.cpp - SupraSubSimPacket.pypp.cpp - OpenMMPMEFEP.pypp.cpp - NullVolumeChanger.pypp.cpp + SupraMoves.pypp.cpp + SupraSim.pypp.cpp + SupraSimPacket.pypp.cpp + SupraSubMove.pypp.cpp + SupraSubMoves.pypp.cpp SupraSubSim.pypp.cpp - InternalMoveSingle.pypp.cpp - Move.pypp.cpp - SimPacket.pypp.cpp - GetCentroidPoint.pypp.cpp + SupraSubSimPacket.pypp.cpp + SupraSubSystem.pypp.cpp SupraSystem.pypp.cpp - NullGetPoint.pypp.cpp - Moves.pypp.cpp + SystemWideDeleter.pypp.cpp + TitrationMove.pypp.cpp + Titrator.pypp.cpp + UniformInserter.pypp.cpp + UniformSampler.pypp.cpp + VelocitiesFromProperty.pypp.cpp + VelocityGenerator.pypp.cpp + VelocityVerlet.pypp.cpp VolumeChanger.pypp.cpp - DofID.pypp.cpp - OpenMMFrEnergyST.pypp.cpp - HMCGenerator.pypp.cpp - NullMove.pypp.cpp - InternalMove.pypp.cpp - NullIntegrator.pypp.cpp - Dynamics.pypp.cpp - RepExSubMove.pypp.cpp - ZMatrixLine.pypp.cpp VolumeMove.pypp.cpp - GetCOMPoint.pypp.cpp - OpenMMMDIntegrator.pypp.cpp - ZMatrixCoordsLine.pypp.cpp - SupraSubMove.pypp.cpp - SupraSubSystem.pypp.cpp - ZMatrixCoords.pypp.cpp - OpenMMFrEnergyDT.pypp.cpp WeightedMoves.pypp.cpp - Sampler.pypp.cpp - MolInserter.pypp.cpp - GetCOGPoint.pypp.cpp - VelocityGenerator.pypp.cpp - DLMRigidBody.pypp.cpp - RBWorkspaceJM.pypp.cpp - SameSupraMoves.pypp.cpp - NullVelocityGenerator.pypp.cpp - RepExMove.pypp.cpp - NullDeleter.pypp.cpp - SupraSimPacket.pypp.cpp - HybridMC.pypp.cpp + ZMatMove.pypp.cpp ZMatrix.pypp.cpp - Ensemble.pypp.cpp + ZMatrixCoords.pypp.cpp + ZMatrixCoordsLine.pypp.cpp + ZMatrixLine.pypp.cpp SireMove_containers.cpp SireMove_properties.cpp SireMove_registrars.cpp diff --git a/wrapper/Move/CMakeLists.txt b/wrapper/Move/CMakeLists.txt index d2a5394cd..3513469a4 100644 --- a/wrapper/Move/CMakeLists.txt +++ b/wrapper/Move/CMakeLists.txt @@ -64,9 +64,8 @@ set_target_properties (Move target_link_libraries (Move SirePython - SIRE_SireIO SIRE_SireMove - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ${SIRE_OPENMM_LIBRARIES} ) @@ -74,7 +73,7 @@ include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Move" "_init_Move" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Move ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Move ) install( TARGETS Move LIBRARY DESTINATION ${INSTALLDIR} diff --git a/wrapper/Move/CMakeOpenMMFile.txt b/wrapper/Move/CMakeOpenMMFile.txt index 00cb8fd84..cb3d0ff95 100644 --- a/wrapper/Move/CMakeOpenMMFile.txt +++ b/wrapper/Move/CMakeOpenMMFile.txt @@ -3,5 +3,4 @@ set ( PYPP_OPENMM_SOURCES OpenMMMDIntegrator.pypp.cpp OpenMMFrEnergyDT.pypp.cpp OpenMMFrEnergyST.pypp.cpp - OpenMMPMEFEP.pypp.cpp ) diff --git a/wrapper/Move/DLMRigidBody.pypp.cpp b/wrapper/Move/DLMRigidBody.pypp.cpp index 04b439f42..1e22ec30a 100644 --- a/wrapper/Move/DLMRigidBody.pypp.cpp +++ b/wrapper/Move/DLMRigidBody.pypp.cpp @@ -29,6 +29,8 @@ SireMove::DLMRigidBody __copy__(const SireMove::DLMRigidBody &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DLMRigidBody_class(){ { //::SireMove::DLMRigidBody @@ -68,6 +70,7 @@ void register_DLMRigidBody_class(){ DLMRigidBody_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble generated by this integrator (NVE)" ); } @@ -80,6 +83,7 @@ void register_DLMRigidBody_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Integrate using the passed workspace, the energy component nrg_component,\nperforming nmoves moves using the specified timestep, recording\nstatistics of every move if record_stats is true" ); } @@ -91,6 +95,7 @@ void register_DLMRigidBody_class(){ DLMRigidBody_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "This integrator is time-reversible" ); } @@ -117,6 +122,7 @@ void register_DLMRigidBody_class(){ DLMRigidBody_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -128,6 +134,7 @@ void register_DLMRigidBody_class(){ DLMRigidBody_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/DofID.pypp.cpp b/wrapper/Move/DofID.pypp.cpp index f027a7a90..a4dd3ecf2 100644 --- a/wrapper/Move/DofID.pypp.cpp +++ b/wrapper/Move/DofID.pypp.cpp @@ -47,6 +47,8 @@ SireMove::DofID __copy__(const SireMove::DofID &other){ return SireMove::DofID(o const char* pvt_get_name(const SireMove::DofID&){ return "SireMove::DofID";} +#include "Helpers/release_gil_policy.hpp" + void register_DofID_class(){ { //::SireMove::DofID @@ -65,6 +67,7 @@ void register_DofID_class(){ DofID_exposer.def( "atom0" , atom0_function_value + , bp::release_gil_policy() , "" ); } @@ -76,6 +79,7 @@ void register_DofID_class(){ DofID_exposer.def( "atom1" , atom1_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +91,7 @@ void register_DofID_class(){ DofID_exposer.def( "atom2" , atom2_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +103,7 @@ void register_DofID_class(){ DofID_exposer.def( "atom3" , atom3_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +115,7 @@ void register_DofID_class(){ DofID_exposer.def( "isAngle" , isAngle_function_value + , bp::release_gil_policy() , "" ); } @@ -120,6 +127,7 @@ void register_DofID_class(){ DofID_exposer.def( "isBond" , isBond_function_value + , bp::release_gil_policy() , "" ); } @@ -131,6 +139,7 @@ void register_DofID_class(){ DofID_exposer.def( "isDihedral" , isDihedral_function_value + , bp::release_gil_policy() , "" ); } @@ -142,6 +151,7 @@ void register_DofID_class(){ DofID_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -168,6 +178,7 @@ void register_DofID_class(){ DofID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/Dynamics.pypp.cpp b/wrapper/Move/Dynamics.pypp.cpp index 2627c2fab..2bd6524b0 100644 --- a/wrapper/Move/Dynamics.pypp.cpp +++ b/wrapper/Move/Dynamics.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Dynamics_class(){ { //::SireMove::Dynamics @@ -31,6 +33,7 @@ void register_Dynamics_class(){ Dynamics_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble that would be generated by this move" ); } @@ -42,6 +45,7 @@ void register_Dynamics_class(){ Dynamics_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/Ensemble.pypp.cpp b/wrapper/Move/Ensemble.pypp.cpp index cd810c476..162ba74c2 100644 --- a/wrapper/Move/Ensemble.pypp.cpp +++ b/wrapper/Move/Ensemble.pypp.cpp @@ -31,6 +31,8 @@ SireMove::Ensemble __copy__(const SireMove::Ensemble &other){ return SireMove::E #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Ensemble_class(){ { //::SireMove::Ensemble @@ -47,6 +49,7 @@ void register_Ensemble_class(){ "MuVT" , MuVT_function_value , ( bp::arg("temperature"), bp::arg("fugacity") ) + , bp::release_gil_policy() , "Return the MuVT ensemble for the temperature temperature and\nthe fugacity fugacity" ); } @@ -59,6 +62,7 @@ void register_Ensemble_class(){ "MuVT" , MuVT_function_value , ( bp::arg("temperature"), bp::arg("chemical_potential") ) + , bp::release_gil_policy() , "Return the MuVT ensemble for the temperature temperature and\nthe chemical potential chemical_potential" ); } @@ -71,6 +75,7 @@ void register_Ensemble_class(){ "NPT" , NPT_function_value , ( bp::arg("temperature"), bp::arg("pressure") ) + , bp::release_gil_policy() , "Return the NPT ensemble for the temperature temperature and\nthe pressure pressure" ); } @@ -82,6 +87,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "NVE" , NVE_function_value + , bp::release_gil_policy() , "Return the NVE ensemble" ); } @@ -94,6 +100,7 @@ void register_Ensemble_class(){ "NVT" , NVT_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Return the NVT ensemble for the temperature temperature" ); } @@ -106,6 +113,7 @@ void register_Ensemble_class(){ "canonical" , canonical_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Syntactic sugar to return the NVT ensemble" ); } @@ -117,6 +125,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "chemicalPotential" , chemicalPotential_function_value + , bp::release_gil_policy() , "Return the chemical potential of this ensemble\nThrow: SireError::incompatible_error\n" ); } @@ -128,6 +137,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "fugacity" , fugacity_function_value + , bp::release_gil_policy() , "Return the fugacity of this ensemble\nThrow: SireError::incompatible_error\n" ); } @@ -140,6 +150,7 @@ void register_Ensemble_class(){ "grandCanonical" , grandCanonical_function_value , ( bp::arg("temperature"), bp::arg("fugacity") ) + , bp::release_gil_policy() , "Syntactic sugar to return the MuVT ensemble" ); } @@ -152,6 +163,7 @@ void register_Ensemble_class(){ "grandCanonical" , grandCanonical_function_value , ( bp::arg("temperature"), bp::arg("chemical_potential") ) + , bp::release_gil_policy() , "Syntactic sugar to return the MuVT ensemble" ); } @@ -163,6 +175,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isCanonical" , isCanonical_function_value + , bp::release_gil_policy() , "Return whether or not this is the canonical (NVT) ensemble" ); } @@ -174,6 +187,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isConstantChemicalPotential" , isConstantChemicalPotential_function_value + , bp::release_gil_policy() , "Return whether the chemical potential is constant in this ensemble" ); } @@ -185,6 +199,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isConstantEnergy" , isConstantEnergy_function_value + , bp::release_gil_policy() , "Return whether or not energy is a constant in this ensemble" ); } @@ -196,6 +211,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isConstantFugacity" , isConstantFugacity_function_value + , bp::release_gil_policy() , "Return whether the chemical potential is constant in this ensemble" ); } @@ -207,6 +223,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isConstantNParticles" , isConstantNParticles_function_value + , bp::release_gil_policy() , "Return whether or not the number of particles is constant in this ensemble" ); } @@ -218,6 +235,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isConstantPressure" , isConstantPressure_function_value + , bp::release_gil_policy() , "Return whether or not pressure is a constant in this ensemble" ); } @@ -229,6 +247,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isConstantTemperature" , isConstantTemperature_function_value + , bp::release_gil_policy() , "Return whether or not temperature is a constant in this ensemble" ); } @@ -240,6 +259,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isConstantVolume" , isConstantVolume_function_value + , bp::release_gil_policy() , "Return whether or not volume is a constant in this ensemble" ); } @@ -251,6 +271,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isGrandCanonical" , isGrandCanonical_function_value + , bp::release_gil_policy() , "Return whether or not this is the grand canonical (MuVT) ensemble" ); } @@ -262,6 +283,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isIsothermalIsobaric" , isIsothermalIsobaric_function_value + , bp::release_gil_policy() , "Return whether or not this is the isothermal-isobaric (NPT) ensemble" ); } @@ -273,6 +295,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isMicroCanonical" , isMicroCanonical_function_value + , bp::release_gil_policy() , "Return whether or not this is the microcanonical (NVE) ensemble" ); } @@ -284,6 +307,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isMuVT" , isMuVT_function_value + , bp::release_gil_policy() , "Return whether or not this is the MuVT ensemble" ); } @@ -295,6 +319,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isNPT" , isNPT_function_value + , bp::release_gil_policy() , "Return whether or not this is the NPT ensemble" ); } @@ -306,6 +331,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isNVE" , isNVE_function_value + , bp::release_gil_policy() , "Return whether or not this is the NVE ensemble" ); } @@ -317,6 +343,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "isNVT" , isNVT_function_value + , bp::release_gil_policy() , "Return whether or not this is the NVT ensemble" ); } @@ -329,6 +356,7 @@ void register_Ensemble_class(){ "isothermalIsobaric" , isothermalIsobaric_function_value , ( bp::arg("temperature"), bp::arg("pressure") ) + , bp::release_gil_policy() , "Syntactic sugar to return the NPT ensemble" ); } @@ -341,6 +369,7 @@ void register_Ensemble_class(){ "merge" , merge_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Merge this ensemble with other. This tries to find an ensemble\nthat satisfies both, e.g. merging NVE with NVT will give NVT,\nwhile merging NVE with NPT would give NPT." ); } @@ -353,6 +382,7 @@ void register_Ensemble_class(){ "merge" , merge_function_value , ( bp::arg("e0"), bp::arg("e1") ) + , bp::release_gil_policy() , "Merge the two ensembles e0 and e1 together. This tries to find an ensemble\nthat satisfies both, e.g. merging NVE with NVT will give NVT,\nwhile merging NVE with NPT would give NPT." ); } @@ -364,6 +394,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "microcanonical" , microcanonical_function_value + , bp::release_gil_policy() , "Syntactic sugar to return the NVE ensemble" ); } @@ -375,6 +406,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "name" , name_function_value + , bp::release_gil_policy() , "Return the name of this ensemble (if it has a name)" ); } @@ -401,6 +433,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "pressure" , pressure_function_value + , bp::release_gil_policy() , "Return the pressure of this ensemble\nThrow: SireError::incompatible_error\n" ); } @@ -412,6 +445,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "shortHand" , shortHand_function_value + , bp::release_gil_policy() , "Return the shorthand string for this ensemble (e.g. NVT)" ); } @@ -423,6 +457,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature of this ensemble\nThrow: SireError::incompatible_error\n" ); } @@ -434,6 +469,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this ensemble" ); } @@ -445,6 +481,7 @@ void register_Ensemble_class(){ Ensemble_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/Flexibility.pypp.cpp b/wrapper/Move/Flexibility.pypp.cpp index 0767dbe78..4814bff93 100644 --- a/wrapper/Move/Flexibility.pypp.cpp +++ b/wrapper/Move/Flexibility.pypp.cpp @@ -47,6 +47,8 @@ SireMove::Flexibility __copy__(const SireMove::Flexibility &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Flexibility_class(){ { //::SireMove::Flexibility @@ -64,6 +66,7 @@ void register_Flexibility_class(){ "add" , add_function_value , ( bp::arg("bond"), bp::arg("delta") ) + , bp::release_gil_policy() , "Add bond with delta to this flexibility" ); } @@ -76,6 +79,7 @@ void register_Flexibility_class(){ "add" , add_function_value , ( bp::arg("angle"), bp::arg("delta") ) + , bp::release_gil_policy() , "Add angle with delta to this flexibility" ); } @@ -88,6 +92,7 @@ void register_Flexibility_class(){ "add" , add_function_value , ( bp::arg("dihedral"), bp::arg("delta") ) + , bp::release_gil_policy() , "Add dihedral with delta to this flexibility" ); } @@ -100,6 +105,7 @@ void register_Flexibility_class(){ "contains" , contains_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Check if bond is present in this flexibility" ); } @@ -112,6 +118,7 @@ void register_Flexibility_class(){ "contains" , contains_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Check if angle is present in this flexibility" ); } @@ -124,6 +131,7 @@ void register_Flexibility_class(){ "contains" , contains_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Check if angle is present in this flexibility" ); } @@ -136,6 +144,7 @@ void register_Flexibility_class(){ "delta" , delta_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the delta value of bond in this flexibility" ); } @@ -148,6 +157,7 @@ void register_Flexibility_class(){ "delta" , delta_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return the delta value of angle in this flexibility" ); } @@ -160,6 +170,7 @@ void register_Flexibility_class(){ "delta" , delta_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the delta value of angle in this flexibility" ); } @@ -171,6 +182,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "flexibleAngles" , flexibleAngles_function_value + , bp::release_gil_policy() , "Return the list of all flexible angles" ); } @@ -182,6 +194,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "flexibleBonds" , flexibleBonds_function_value + , bp::release_gil_policy() , "Return the list of all flexible bonds" ); } @@ -193,6 +206,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "flexibleDihedrals" , flexibleDihedrals_function_value + , bp::release_gil_policy() , "Return the list of all flexible dihedrals" ); } @@ -217,6 +231,7 @@ void register_Flexibility_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this flexibility is compatible with the molecule\nwhose info is in molinfo" ); } @@ -228,6 +243,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "maximumAngleVar" , maximumAngleVar_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +255,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "maximumBondVar" , maximumBondVar_function_value + , bp::release_gil_policy() , "Return the maximum number of dofs that will be sampled in one move" ); } @@ -250,6 +267,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "maximumDihedralVar" , maximumDihedralVar_function_value + , bp::release_gil_policy() , "" ); } @@ -277,6 +295,7 @@ void register_Flexibility_class(){ "remove" , remove_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Remove bond from this flexibility" ); } @@ -289,6 +308,7 @@ void register_Flexibility_class(){ "remove" , remove_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Remove angle from this flexibility" ); } @@ -301,6 +321,7 @@ void register_Flexibility_class(){ "remove" , remove_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Remove dihedral from this flexibility" ); } @@ -312,6 +333,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "rotation" , rotation_function_value + , bp::release_gil_policy() , "Return the maximum rotation of this flexibility" ); } @@ -324,6 +346,7 @@ void register_Flexibility_class(){ "setDelta" , setDelta_function_value , ( bp::arg("bond"), bp::arg("delta") ) + , bp::release_gil_policy() , "set the delta value of bond to delta" ); } @@ -336,6 +359,7 @@ void register_Flexibility_class(){ "setDelta" , setDelta_function_value , ( bp::arg("angle"), bp::arg("delta") ) + , bp::release_gil_policy() , "set the delta value of bond to delta" ); } @@ -348,6 +372,7 @@ void register_Flexibility_class(){ "setDelta" , setDelta_function_value , ( bp::arg("dihedral"), bp::arg("delta") ) + , bp::release_gil_policy() , "set the delta value of bond to delta" ); } @@ -360,6 +385,7 @@ void register_Flexibility_class(){ "setMaximumAngleVar" , setMaximumAngleVar_function_value , ( bp::arg("maxvar") ) + , bp::release_gil_policy() , "" ); } @@ -372,6 +398,7 @@ void register_Flexibility_class(){ "setMaximumBondVar" , setMaximumBondVar_function_value , ( bp::arg("maxvar") ) + , bp::release_gil_policy() , "Set the maximum number of degrees of freedom that will be sampled in one move" ); } @@ -384,6 +411,7 @@ void register_Flexibility_class(){ "setMaximumDihedralVar" , setMaximumDihedralVar_function_value , ( bp::arg("maxvar") ) + , bp::release_gil_policy() , "" ); } @@ -396,6 +424,7 @@ void register_Flexibility_class(){ "setRotation" , setRotation_function_value , ( bp::arg("rotation") ) + , bp::release_gil_policy() , "Set the maximum rotation of this flexibility" ); } @@ -408,6 +437,7 @@ void register_Flexibility_class(){ "setTranslation" , setTranslation_function_value , ( bp::arg("translation") ) + , bp::release_gil_policy() , "Set the maximum translation of this flexibility" ); } @@ -419,6 +449,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this flexibility" ); } @@ -430,6 +461,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "translation" , translation_function_value + , bp::release_gil_policy() , "Return the maximum translation of this flexibility" ); } @@ -441,6 +473,7 @@ void register_Flexibility_class(){ Flexibility_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/GetCOGPoint.pypp.cpp b/wrapper/Move/GetCOGPoint.pypp.cpp index 95f733219..6447ad26c 100644 --- a/wrapper/Move/GetCOGPoint.pypp.cpp +++ b/wrapper/Move/GetCOGPoint.pypp.cpp @@ -40,6 +40,8 @@ SireMove::GetCOGPoint __copy__(const SireMove::GetCOGPoint &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GetCOGPoint_class(){ { //::SireMove::GetCOGPoint @@ -58,7 +60,7 @@ void register_GetCOGPoint_class(){ GetCOGPoint_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the AtomID(s) used to limit the search for the point" ); } @@ -97,6 +99,7 @@ void register_GetCOGPoint_class(){ GetCOGPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/GetCOMPoint.pypp.cpp b/wrapper/Move/GetCOMPoint.pypp.cpp index b2b6c2585..59f9ab4be 100644 --- a/wrapper/Move/GetCOMPoint.pypp.cpp +++ b/wrapper/Move/GetCOMPoint.pypp.cpp @@ -40,6 +40,8 @@ SireMove::GetCOMPoint __copy__(const SireMove::GetCOMPoint &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GetCOMPoint_class(){ { //::SireMove::GetCOMPoint @@ -58,7 +60,7 @@ void register_GetCOMPoint_class(){ GetCOMPoint_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the AtomID(s) used to limit the search for the point" ); } @@ -97,6 +99,7 @@ void register_GetCOMPoint_class(){ GetCOMPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/GetCentroidPoint.pypp.cpp b/wrapper/Move/GetCentroidPoint.pypp.cpp index efea85232..5728ec5be 100644 --- a/wrapper/Move/GetCentroidPoint.pypp.cpp +++ b/wrapper/Move/GetCentroidPoint.pypp.cpp @@ -40,6 +40,8 @@ SireMove::GetCentroidPoint __copy__(const SireMove::GetCentroidPoint &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GetCentroidPoint_class(){ { //::SireMove::GetCentroidPoint @@ -58,7 +60,7 @@ void register_GetCentroidPoint_class(){ GetCentroidPoint_exposer.def( "atomID" , atomID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the AtomID(s) used to limit the search for the point" ); } @@ -97,6 +99,7 @@ void register_GetCentroidPoint_class(){ GetCentroidPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/GetPoint.pypp.cpp b/wrapper/Move/GetPoint.pypp.cpp index de662c1df..8f70252d6 100644 --- a/wrapper/Move/GetPoint.pypp.cpp +++ b/wrapper/Move/GetPoint.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GetPoint_class(){ { //::SireMove::GetPoint @@ -63,6 +65,7 @@ void register_GetPoint_class(){ GetPoint_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +101,7 @@ void register_GetPoint_class(){ GetPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/HMCGenerator.pypp.cpp b/wrapper/Move/HMCGenerator.pypp.cpp index cfc6d59e7..55fc120d6 100644 --- a/wrapper/Move/HMCGenerator.pypp.cpp +++ b/wrapper/Move/HMCGenerator.pypp.cpp @@ -33,6 +33,8 @@ SireMove::HMCGenerator __copy__(const SireMove::HMCGenerator &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_HMCGenerator_class(){ { //::SireMove::HMCGenerator @@ -49,6 +51,7 @@ void register_HMCGenerator_class(){ "generate" , generate_function_value , ( bp::arg("system"), bp::arg("md") ) + , bp::release_gil_policy() , "Generate the velocities for the passed MD move, returning\nthe biasing factor" ); } @@ -73,6 +76,7 @@ void register_HMCGenerator_class(){ "getBias" , getBias_function_value , ( bp::arg("md") ) + , bp::release_gil_policy() , "Return the bias of the current state of the passed MD move" ); } @@ -99,6 +103,7 @@ void register_HMCGenerator_class(){ HMCGenerator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/HMCVelGen.pypp.cpp b/wrapper/Move/HMCVelGen.pypp.cpp index b9e14efd2..7eaa56512 100644 --- a/wrapper/Move/HMCVelGen.pypp.cpp +++ b/wrapper/Move/HMCVelGen.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_HMCVelGen_class(){ { //::SireMove::HMCVelGen @@ -46,6 +48,7 @@ void register_HMCVelGen_class(){ "generate" , generate_function_value , ( bp::arg("system"), bp::arg("md") ) + , bp::release_gil_policy() , "Generate the velocites in the passed MD object,\nreturning the biasing factor for the HMC algorithm" ); } @@ -58,6 +61,7 @@ void register_HMCVelGen_class(){ "getBias" , getBias_function_value , ( bp::arg("md") ) + , bp::release_gil_policy() , "Return the bias for the velocities in the passed MD object" ); } @@ -70,6 +74,7 @@ void register_HMCVelGen_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used to generate the random\nnumbers needed by this generator" ); } @@ -82,6 +87,7 @@ void register_HMCVelGen_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Set the temperature of the velocities to be generated" ); } @@ -93,6 +99,7 @@ void register_HMCVelGen_class(){ HMCVelGen_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature of the velocities to be generated" ); } diff --git a/wrapper/Move/HybridMC.pypp.cpp b/wrapper/Move/HybridMC.pypp.cpp index 796e3d446..08d488560 100644 --- a/wrapper/Move/HybridMC.pypp.cpp +++ b/wrapper/Move/HybridMC.pypp.cpp @@ -34,6 +34,8 @@ SireMove::HybridMC __copy__(const SireMove::HybridMC &other){ return SireMove::H #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_HybridMC_class(){ { //::SireMove::HybridMC @@ -57,7 +59,7 @@ void register_HybridMC_class(){ HybridMC_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that is moved by this move" ); } @@ -81,6 +83,7 @@ void register_HybridMC_class(){ HybridMC_exposer.def( "nDynamicsSteps" , nDynamicsSteps_function_value + , bp::release_gil_policy() , "Return the number of MD steps to perform per hybrid MC move" ); } @@ -108,6 +111,7 @@ void register_HybridMC_class(){ "setCoordinatesProperty" , setCoordinatesProperty_function_value , ( bp::arg("coords_property") ) + , bp::release_gil_policy() , "Set the location of the coordinates that are affected by this move" ); } @@ -120,6 +124,7 @@ void register_HybridMC_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator that is used by this move" ); } @@ -132,6 +137,7 @@ void register_HybridMC_class(){ "setNDynamicsSteps" , setNDynamicsSteps_function_value , ( bp::arg("nsteps") ) + , bp::release_gil_policy() , "Set the number of MD steps to perform per hybrid MC move" ); } @@ -144,6 +150,7 @@ void register_HybridMC_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("space_property") ) + , bp::release_gil_policy() , "Set the location of the space property used by this move" ); } @@ -156,6 +163,7 @@ void register_HybridMC_class(){ "setTimeStep" , setTimeStep_function_value , ( bp::arg("timestep") ) + , bp::release_gil_policy() , "Set the timestep of the dynamics part of the move" ); } @@ -168,6 +176,7 @@ void register_HybridMC_class(){ "setVelocityGenerator" , setVelocityGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the velocity generator used to generate velocities that\nare compatible with the Hybrid MC move" ); } @@ -179,6 +188,7 @@ void register_HybridMC_class(){ HybridMC_exposer.def( "timeStep" , timeStep_function_value + , bp::release_gil_policy() , "Return the timestep of the dynamics part of the move" ); } @@ -190,6 +200,7 @@ void register_HybridMC_class(){ HybridMC_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -201,6 +212,7 @@ void register_HybridMC_class(){ HybridMC_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/Integrator.pypp.cpp b/wrapper/Move/Integrator.pypp.cpp index ecab70f63..41728f078 100644 --- a/wrapper/Move/Integrator.pypp.cpp +++ b/wrapper/Move/Integrator.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Integrator_class(){ { //::SireMove::Integrator @@ -73,6 +75,7 @@ void register_Integrator_class(){ Integrator_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +88,7 @@ void register_Integrator_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "" ); } @@ -96,6 +100,7 @@ void register_Integrator_class(){ Integrator_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "" ); } @@ -119,6 +124,7 @@ void register_Integrator_class(){ Integrator_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -130,6 +136,7 @@ void register_Integrator_class(){ Integrator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/InternalMove.pypp.cpp b/wrapper/Move/InternalMove.pypp.cpp index c491726f0..adf3dedb6 100644 --- a/wrapper/Move/InternalMove.pypp.cpp +++ b/wrapper/Move/InternalMove.pypp.cpp @@ -18,6 +18,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/dihedralid.h" #include "SireMol/molecule.h" @@ -58,6 +60,8 @@ SireMove::InternalMove __copy__(const SireMove::InternalMove &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_InternalMove_class(){ { //::SireMove::InternalMove @@ -75,7 +79,7 @@ void register_InternalMove_class(){ InternalMove_exposer.def( "centerOfMolecule" , centerOfMolecule_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the function used to find the center of the molecule" ); } @@ -99,7 +103,7 @@ void register_InternalMove_class(){ InternalMove_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that is sampled for this move" ); } @@ -138,7 +142,7 @@ void register_InternalMove_class(){ InternalMove_exposer.def( "sampler" , sampler_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sampler used to sample molecules to move" ); } @@ -151,6 +155,7 @@ void register_InternalMove_class(){ "setCenterOfMolecule" , setCenterOfMolecule_function_value , ( bp::arg("center_function") ) + , bp::release_gil_policy() , "Set the function used to find the center of the molecule" ); } @@ -163,6 +168,7 @@ void register_InternalMove_class(){ "setFlexibilityProperty" , setFlexibilityProperty_function_value , ( bp::arg("property") ) + , bp::release_gil_policy() , "Set the name of the property used to find the flexibility of each molecule" ); } @@ -175,6 +181,7 @@ void register_InternalMove_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used to generate the random\nnumber used for this move" ); } @@ -187,6 +194,7 @@ void register_InternalMove_class(){ "setSampler" , setSampler_function_value , ( bp::arg("sampler") ) + , bp::release_gil_policy() , "Set the sampler used to sample molecules for this move" ); } @@ -199,6 +207,7 @@ void register_InternalMove_class(){ "setSampler" , setSampler_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the sampler so that it draws molecules uniformly from the\nmolecule group molgroup" ); } @@ -210,6 +219,7 @@ void register_InternalMove_class(){ InternalMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -221,6 +231,7 @@ void register_InternalMove_class(){ InternalMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/InternalMoveSingle.pypp.cpp b/wrapper/Move/InternalMoveSingle.pypp.cpp index 48d128a6b..ee6fef733 100644 --- a/wrapper/Move/InternalMoveSingle.pypp.cpp +++ b/wrapper/Move/InternalMoveSingle.pypp.cpp @@ -16,6 +16,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/dihedralid.h" #include "SireMol/molecule.h" @@ -56,6 +58,8 @@ SireMove::InternalMoveSingle __copy__(const SireMove::InternalMoveSingle &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_InternalMoveSingle_class(){ { //::SireMove::InternalMoveSingle @@ -85,7 +89,7 @@ void register_InternalMoveSingle_class(){ InternalMoveSingle_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that is sampled for this move" ); } @@ -124,7 +128,7 @@ void register_InternalMoveSingle_class(){ InternalMoveSingle_exposer.def( "sampler" , sampler_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sampler used to sample molecules to move" ); } @@ -137,6 +141,7 @@ void register_InternalMoveSingle_class(){ "setFlexibilityProperty" , setFlexibilityProperty_function_value , ( bp::arg("property") ) + , bp::release_gil_policy() , "Set the name of the property used to find the flexibility of each molecule" ); } @@ -149,6 +154,7 @@ void register_InternalMoveSingle_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used to generate the random\nnumber used for this move" ); } @@ -161,6 +167,7 @@ void register_InternalMoveSingle_class(){ "setSampler" , setSampler_function_value , ( bp::arg("sampler") ) + , bp::release_gil_policy() , "Set the sampler used to sample molecules for this move" ); } @@ -173,6 +180,7 @@ void register_InternalMoveSingle_class(){ "setSampler" , setSampler_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the sampler so that it draws molecules uniformly from the\nmolecule group molgroup" ); } @@ -185,6 +193,7 @@ void register_InternalMoveSingle_class(){ "setSynchronisedCoordinates" , setSynchronisedCoordinates_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "" ); } @@ -196,7 +205,7 @@ void register_InternalMoveSingle_class(){ InternalMoveSingle_exposer.def( "synchronisedMols" , synchronisedMols_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -208,6 +217,7 @@ void register_InternalMoveSingle_class(){ InternalMoveSingle_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -219,6 +229,7 @@ void register_InternalMoveSingle_class(){ InternalMoveSingle_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/MTSMC.pypp.cpp b/wrapper/Move/MTSMC.pypp.cpp index 672263f0b..fcf5f1ec4 100644 --- a/wrapper/Move/MTSMC.pypp.cpp +++ b/wrapper/Move/MTSMC.pypp.cpp @@ -30,6 +30,8 @@ SireMove::MTSMC __copy__(const SireMove::MTSMC &other){ return SireMove::MTSMC(o #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MTSMC_class(){ { //::SireMove::MTSMC @@ -54,6 +56,7 @@ void register_MTSMC_class(){ "addSlowConstraint" , addSlowConstraint_function_value , ( bp::arg("constraint") ) + , bp::release_gil_policy() , "Add a constraint that is applied at the end of each block\nof fast moves (i.e. before the slow move is tested)" ); } @@ -65,6 +68,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Completely clear all of the move statistics" ); } @@ -76,7 +80,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "fastEnergyComponent" , fastEnergyComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy component on which the fast moves will operate" ); } @@ -88,7 +92,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "fastMoves" , fastMoves_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the fast moves that will be performed for every\nslow move" ); } @@ -112,6 +116,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "nFastMoves" , nFastMoves_function_value + , bp::release_gil_policy() , "Return the number of fast moves to perform per slow move" ); } @@ -138,6 +143,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "removeSlowConstraints" , removeSlowConstraints_function_value + , bp::release_gil_policy() , "Remove all of the slow constraints" ); } @@ -150,6 +156,7 @@ void register_MTSMC_class(){ "setFastEnergyComponent" , setFastEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Set the energy component to be used for the fast moves" ); } @@ -162,6 +169,7 @@ void register_MTSMC_class(){ "setFastMoves" , setFastMoves_function_value , ( bp::arg("fastmoves") ) + , bp::release_gil_policy() , "Set the moves to be performed using the fast energy component.\nNote that these moves will be performd using the current\nfast energy component, which will override any energy\ncomponent currently set for these moves" ); } @@ -174,6 +182,7 @@ void register_MTSMC_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used by this and all of the\ncontained moves" ); } @@ -186,6 +195,7 @@ void register_MTSMC_class(){ "setNFastMoves" , setNFastMoves_function_value , ( bp::arg("nfast") ) + , bp::release_gil_policy() , "Return the number of fast moves to perform per slow move" ); } @@ -198,6 +208,7 @@ void register_MTSMC_class(){ "setSlowConstraints" , setSlowConstraints_function_value , ( bp::arg("constraints") ) + , bp::release_gil_policy() , "Set the constraints that are applied at the end of each block\nof fast moves (i.e. before the slow move is tested).\nThis replaces any existing slow constraints" ); } @@ -210,6 +221,7 @@ void register_MTSMC_class(){ "setSlowEnergyComponent" , setSlowEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Set the energy component that will be used for the slow moves" ); } @@ -233,7 +245,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "slowEnergyComponent" , slowEnergyComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy component that will ultimately be used\nto generate the ensemble" ); } @@ -245,6 +257,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -256,6 +269,7 @@ void register_MTSMC_class(){ MTSMC_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/MaxwellBoltzmann.pypp.cpp b/wrapper/Move/MaxwellBoltzmann.pypp.cpp index e3d6ef2ef..09341c96f 100644 --- a/wrapper/Move/MaxwellBoltzmann.pypp.cpp +++ b/wrapper/Move/MaxwellBoltzmann.pypp.cpp @@ -41,6 +41,8 @@ SireMove::MaxwellBoltzmann __copy__(const SireMove::MaxwellBoltzmann &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MaxwellBoltzmann_class(){ { //::SireMove::MaxwellBoltzmann @@ -97,6 +99,7 @@ void register_MaxwellBoltzmann_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used to generate the random velocities" ); } @@ -109,6 +112,7 @@ void register_MaxwellBoltzmann_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Set the temperature at which the velocities will be generated" ); } @@ -120,6 +124,7 @@ void register_MaxwellBoltzmann_class(){ MaxwellBoltzmann_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature for which the velocities will be generated" ); } @@ -131,6 +136,7 @@ void register_MaxwellBoltzmann_class(){ MaxwellBoltzmann_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/MolDeleter.pypp.cpp b/wrapper/Move/MolDeleter.pypp.cpp index 33b94ee1c..8dc5944d2 100644 --- a/wrapper/Move/MolDeleter.pypp.cpp +++ b/wrapper/Move/MolDeleter.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolDeleter_class(){ { //::SireMove::MolDeleter @@ -42,6 +44,7 @@ void register_MolDeleter_class(){ "deleteFrom" , deleteFrom_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "" ); } @@ -78,6 +81,7 @@ void register_MolDeleter_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "" ); } @@ -89,6 +93,7 @@ void register_MolDeleter_class(){ MolDeleter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/MolInserter.pypp.cpp b/wrapper/Move/MolInserter.pypp.cpp index b9f6a8d61..334cb0e80 100644 --- a/wrapper/Move/MolInserter.pypp.cpp +++ b/wrapper/Move/MolInserter.pypp.cpp @@ -9,6 +9,8 @@ namespace bp = boost::python; #include "SireMaths/quaternion.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/partialmolecule.h" @@ -33,6 +35,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolInserter_class(){ { //::SireMove::MolInserter @@ -72,6 +76,7 @@ void register_MolInserter_class(){ "insert" , insert_function_value , ( bp::arg("molecule"), bp::arg("system"), bp::arg("space") ) + , bp::release_gil_policy() , "Insert the entire molecule molecule into the system system\nusing the space space, using the information about which\ngroups to add the molecule to (and which properties to use)\nwhich are contained in this inserter). This returns the\nprobability of where the molecule was inserted (normalised\nso that a probability of 1 is returned if the molecule\nwas added at a uniformly random orientation and position)" ); } @@ -84,6 +89,7 @@ void register_MolInserter_class(){ "insert" , insert_function_value , ( bp::arg("molecule"), bp::arg("system"), bp::arg("space") ) + , bp::release_gil_policy() , "Insert the partial molecule molecule into the system system\nusing the space space, using the information about which\ngroups to add the molecule to (and which properties to use)\nwhich are contained in this inserter). This returns the\nprobability of where the molecule was inserted (normalised\nso that a probability of 1 is returned if the molecule\nwas added at a uniformly random orientation and position)" ); } @@ -108,6 +114,7 @@ void register_MolInserter_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used to generate the random\nnumbers used to insert the molecule" ); } @@ -120,6 +127,7 @@ void register_MolInserter_class(){ "setGroups" , setGroups_function_value , ( bp::arg("mgids") ) + , bp::release_gil_policy() , "Set the groups (and associated properties) used when adding\nthe molecule to the system" ); } @@ -131,6 +139,7 @@ void register_MolInserter_class(){ MolInserter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/MolecularDynamics.pypp.cpp b/wrapper/Move/MolecularDynamics.pypp.cpp index e1bb21036..a7ee93d0e 100644 --- a/wrapper/Move/MolecularDynamics.pypp.cpp +++ b/wrapper/Move/MolecularDynamics.pypp.cpp @@ -34,6 +34,8 @@ SireMove::MolecularDynamics __copy__(const SireMove::MolecularDynamics &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MolecularDynamics_class(){ { //::SireMove::MolecularDynamics @@ -53,6 +55,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Completely clear any move statistics - this clears all existing\nvelocities" ); } @@ -64,6 +67,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "coordinatesProperty" , coordinatesProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the molecular coordinates" ); } @@ -75,6 +79,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "elementsProperty" , elementsProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the atomic elements" ); } @@ -86,7 +91,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "integrator" , integrator_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the integrator used to advance the coordinates\nfrom one timestep to the next" ); } @@ -98,6 +103,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "kineticEnergy" , kineticEnergy_function_value + , bp::release_gil_policy() , "Return the kinetic energy of the system at the last move." ); } @@ -109,6 +115,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "massesProperty" , massesProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the molecular masses" ); } @@ -120,7 +127,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group on which this move operates" ); } @@ -144,6 +151,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "Return the number of moves completed using this object" ); } @@ -171,6 +179,7 @@ void register_MolecularDynamics_class(){ "regenerateVelocities" , regenerateVelocities_function_value , ( bp::arg("system"), bp::arg("generator") ) + , bp::release_gil_policy() , "Regenerate all of the velocities using the passed velocity generator" ); } @@ -183,6 +192,7 @@ void register_MolecularDynamics_class(){ "setCoordinatesProperty" , setCoordinatesProperty_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set the property used to find the coordinates of the molecules" ); } @@ -195,6 +205,7 @@ void register_MolecularDynamics_class(){ "setElementsProperty" , setElementsProperty_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set the property used to find the elements of the atoms" ); } @@ -207,6 +218,7 @@ void register_MolecularDynamics_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used by this move\n(this move may be completely deterministic, so may not\nuse a generator)" ); } @@ -219,6 +231,7 @@ void register_MolecularDynamics_class(){ "setIntegrator" , setIntegrator_function_value , ( bp::arg("integrator") ) + , bp::release_gil_policy() , "Set the integrator to be used to advance the coordinates from\none timestep to the next." ); } @@ -231,6 +244,7 @@ void register_MolecularDynamics_class(){ "setMassesProperty" , setMassesProperty_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set the property used to find the molecular masses" ); } @@ -243,6 +257,7 @@ void register_MolecularDynamics_class(){ "setMoleculeGroup" , setMoleculeGroup_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the molecule group containing the molecules to be moved" ); } @@ -255,6 +270,7 @@ void register_MolecularDynamics_class(){ "setMoleculeGroup" , setMoleculeGroup_function_value , ( bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the molecule group containing the molecules to be moved" ); } @@ -267,6 +283,7 @@ void register_MolecularDynamics_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set the property used to find the system space" ); } @@ -279,6 +296,7 @@ void register_MolecularDynamics_class(){ "setTimeStep" , setTimeStep_function_value , ( bp::arg("timestep") ) + , bp::release_gil_policy() , "Set the timestep for the dynamics integration" ); } @@ -291,6 +309,7 @@ void register_MolecularDynamics_class(){ "setVelocitiesProperty" , setVelocitiesProperty_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set the property used to find the molecular velocities" ); } @@ -303,6 +322,7 @@ void register_MolecularDynamics_class(){ "setVelocityGeneratorProperty" , setVelocityGeneratorProperty_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set the property used to find the generator used to\ngenerate velocities when they are missing" ); } @@ -314,6 +334,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "spaceProperty" , spaceProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the system space" ); } @@ -325,6 +346,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature of the system at the last move" ); } @@ -336,6 +358,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "timeStep" , timeStep_function_value + , bp::release_gil_policy() , "Return the timestep for the integration" ); } @@ -347,6 +370,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -358,6 +382,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "totalTime" , totalTime_function_value + , bp::release_gil_policy() , "Return the total amount of time simulated using these moves" ); } @@ -369,6 +394,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -380,6 +406,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "velocitiesProperty" , velocitiesProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the molecular velocities" ); } @@ -391,6 +418,7 @@ void register_MolecularDynamics_class(){ MolecularDynamics_exposer.def( "velocityGeneratorProperty" , velocityGeneratorProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the generator for\nmissing velocities" ); } diff --git a/wrapper/Move/MonteCarlo.pypp.cpp b/wrapper/Move/MonteCarlo.pypp.cpp index 538466c1e..1e06c221d 100644 --- a/wrapper/Move/MonteCarlo.pypp.cpp +++ b/wrapper/Move/MonteCarlo.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MonteCarlo_class(){ { //::SireMove::MonteCarlo @@ -43,6 +45,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "acceptanceRatio" , acceptanceRatio_function_value + , bp::release_gil_policy() , "Return the acceptance ratio (ratio of\naccepted moves to attempted moves)" ); } @@ -54,6 +57,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Zero the move statistics" ); } @@ -65,6 +69,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "disableOptimisedMoves" , disableOptimisedMoves_function_value + , bp::release_gil_policy() , "Turn off use of optimised MC moves. This uses slightly slower, but likely\nless buggy code, and is worth using if you suspect there are problems with\nthe optimised code" ); } @@ -76,6 +81,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "enableOptimisedMoves" , enableOptimisedMoves_function_value + , bp::release_gil_policy() , "Turn on use of optimised MC moves. This turns on newer (and potentially more buggy)\ncode that aims to speed up the memory allocation and energy calculation for\nMC moves." ); } @@ -87,6 +93,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble for this move" ); } @@ -110,6 +117,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "nAccepted" , nAccepted_function_value + , bp::release_gil_policy() , "Return the number of accepted moves" ); } @@ -121,6 +129,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "nAttempted" , nAttempted_function_value + , bp::release_gil_policy() , "Return the number of attempted moves" ); } @@ -132,6 +141,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "Return the total number of these moves that have been performed" ); } @@ -143,6 +153,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "nRejected" , nRejected_function_value + , bp::release_gil_policy() , "Return the number of rejected moves" ); } @@ -155,6 +166,7 @@ void register_MonteCarlo_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator to use for these moves" ); } @@ -167,6 +179,7 @@ void register_MonteCarlo_class(){ "setUseOptimisedMoves" , setUseOptimisedMoves_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off use of the optimised MC code" ); } @@ -178,6 +191,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -189,6 +203,7 @@ void register_MonteCarlo_class(){ MonteCarlo_exposer.def( "usingOptimisedMoves" , usingOptimisedMoves_function_value + , bp::release_gil_policy() , "Return whether or not the optimised MC code is being used" ); } diff --git a/wrapper/Move/Move.pypp.cpp b/wrapper/Move/Move.pypp.cpp index 290b91a61..14339dfa9 100644 --- a/wrapper/Move/Move.pypp.cpp +++ b/wrapper/Move/Move.pypp.cpp @@ -12,6 +12,8 @@ namespace bp = boost::python; #include "SireMaths/rangenerator.h" +#include "SireMol/core.h" + #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -34,6 +36,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Move_class(){ { //::SireMove::Move @@ -48,6 +52,7 @@ void register_Move_class(){ Move_exposer.def( "chemicalPotential" , chemicalPotential_function_value + , bp::release_gil_policy() , "Return the constant chemical potential that this move samples\nThrow: SireError::incompatible_error\n" ); } @@ -59,6 +64,7 @@ void register_Move_class(){ Move_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +89,7 @@ void register_Move_class(){ "energy" , energy_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Return the energy of the system system - this is the energy\nof this configuration that will be seen by this move" ); } @@ -94,7 +101,7 @@ void register_Move_class(){ Move_exposer.def( "energyComponent" , energyComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that describes the Hamiltonian that this move\nwill sample" ); } @@ -106,6 +113,7 @@ void register_Move_class(){ Move_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +125,7 @@ void register_Move_class(){ Move_exposer.def( "fugacity" , fugacity_function_value + , bp::release_gil_policy() , "Return the constant fugacity that this move samples\nThrow: SireError::incompatible_error\n" ); } @@ -128,6 +137,7 @@ void register_Move_class(){ Move_exposer.def( "isConstantChemicalPotential" , isConstantChemicalPotential_function_value + , bp::release_gil_policy() , "Return whether or not this move keeps the chemical potential constant" ); } @@ -139,6 +149,7 @@ void register_Move_class(){ Move_exposer.def( "isConstantEnergy" , isConstantEnergy_function_value + , bp::release_gil_policy() , "Return whether or not this move keeps the total energy constant" ); } @@ -150,6 +161,7 @@ void register_Move_class(){ Move_exposer.def( "isConstantFugacity" , isConstantFugacity_function_value + , bp::release_gil_policy() , "Return whether or not this move keeps the fugacity (related to the chemical\npotential) constant" ); } @@ -162,6 +174,7 @@ void register_Move_class(){ "isConstantLambda" , isConstantLambda_function_value , ( bp::arg("lam") ) + , bp::release_gil_policy() , "Return whether or not this move keeps the symbol lam constant" ); } @@ -173,6 +186,7 @@ void register_Move_class(){ Move_exposer.def( "isConstantPressure" , isConstantPressure_function_value + , bp::release_gil_policy() , "Return whether or not this move keeps the pressure constant" ); } @@ -184,6 +198,7 @@ void register_Move_class(){ Move_exposer.def( "isConstantTemperature" , isConstantTemperature_function_value + , bp::release_gil_policy() , "Return whether or not this move keeps the temperature constant" ); } @@ -195,6 +210,7 @@ void register_Move_class(){ Move_exposer.def( "isConstantVolume" , isConstantVolume_function_value + , bp::release_gil_policy() , "Return whether or not this move keeps the volume constant" ); } @@ -207,6 +223,7 @@ void register_Move_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "" ); } @@ -219,6 +236,7 @@ void register_Move_class(){ "move" , move_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Perform a single move on the system system without\nrecording any statistics" ); } @@ -231,6 +249,7 @@ void register_Move_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nmoves") ) + , bp::release_gil_policy() , "Perform n moves on the system without recording any\nstatistics" ); } @@ -242,6 +261,7 @@ void register_Move_class(){ Move_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "" ); } @@ -253,7 +273,7 @@ void register_Move_class(){ Move_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -265,6 +285,7 @@ void register_Move_class(){ Move_exposer.def( "pressure" , pressure_function_value + , bp::release_gil_policy() , "Return the constant pressure that this move samples\nThrow: SireError::incompatible_error\n" ); } @@ -289,6 +310,7 @@ void register_Move_class(){ "setChemicalPotential" , setChemicalPotential_function_value , ( bp::arg("chemical_potential") ) + , bp::release_gil_policy() , "Set the chemical potential that this constant chemical potential move samples\nto chemical_potential\nThrow: SireError::incompatible_error\n" ); } @@ -301,6 +323,7 @@ void register_Move_class(){ "setCoordinatesProperty" , setCoordinatesProperty_function_value , ( bp::arg("coords_property") ) + , bp::release_gil_policy() , "Set the property used to locate the molecule coordinates to be moved" ); } @@ -313,6 +336,7 @@ void register_Move_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Set the energy component that describes the Hamiltonian that this move\nwill sample" ); } @@ -325,6 +349,7 @@ void register_Move_class(){ "setFugacity" , setFugacity_function_value , ( bp::arg("fugacity") ) + , bp::release_gil_policy() , "Set the fugacity that this constant fugacity move samples\nto fugacity\nThrow: SireError::incompatible_error\n" ); } @@ -337,6 +362,7 @@ void register_Move_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "" ); } @@ -349,6 +375,7 @@ void register_Move_class(){ "setPressure" , setPressure_function_value , ( bp::arg("pressure") ) + , bp::release_gil_policy() , "Set the pressure that this constant pressure move samples\nto pressure\nThrow: SireError::incompatible_error\n" ); } @@ -361,6 +388,7 @@ void register_Move_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("space_property") ) + , bp::release_gil_policy() , "Set the property used to find the simulation box for this move. This\nproperty is only used when the move involves changing the\nsimulation box, or when trying to find the volume using\nthe volume function" ); } @@ -373,6 +401,7 @@ void register_Move_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Set the temperature that this constant temperature move samples\nto temperature\nThrow: SireError::incompatible_error\n" ); } @@ -396,6 +425,7 @@ void register_Move_class(){ Move_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the constant temperature that this move samples\nThrow: SireError::incompatible_error\n" ); } @@ -407,6 +437,7 @@ void register_Move_class(){ Move_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -418,6 +449,7 @@ void register_Move_class(){ Move_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -430,6 +462,7 @@ void register_Move_class(){ "volume" , volume_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Return the volume of the system system - this is the volume\nof this configuration that will be seen by this move" ); } diff --git a/wrapper/Move/Moves.pypp.cpp b/wrapper/Move/Moves.pypp.cpp index acbbd3731..2ea67a329 100644 --- a/wrapper/Move/Moves.pypp.cpp +++ b/wrapper/Move/Moves.pypp.cpp @@ -46,6 +46,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Moves_class(){ @@ -62,6 +64,7 @@ void register_Moves_class(){ Moves_exposer.def( "acceptableDelta" , acceptableDelta_function_value + , bp::release_gil_policy() , "Return the acceptable level of drift in the running total from the recalculated total energy" ); } @@ -73,6 +76,7 @@ void register_Moves_class(){ Moves_exposer.def( "checkingRunningTotal" , checkingRunningTotal_function_value + , bp::release_gil_policy() , "Return whether or not we are checking of the running total energy" ); } @@ -84,6 +88,7 @@ void register_Moves_class(){ Moves_exposer.def( "chemicalPotential" , chemicalPotential_function_value + , bp::release_gil_policy() , "Return the constant chemical potential that these moves sample\nThrow: SireError::incompatible_error\n" ); } @@ -95,6 +100,7 @@ void register_Moves_class(){ Moves_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +112,7 @@ void register_Moves_class(){ Moves_exposer.def( "clearTiming" , clearTiming_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +124,7 @@ void register_Moves_class(){ Moves_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of different move types in this set of Moves\n(this is the maximum number of Move objects that can be iterated over)" ); } @@ -129,6 +137,7 @@ void register_Moves_class(){ "energy" , energy_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Return the energy of the system that is seen by these moves" ); } @@ -140,7 +149,7 @@ void register_Moves_class(){ Moves_exposer.def( "energyComponent" , energyComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -152,6 +161,7 @@ void register_Moves_class(){ Moves_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble that will be sampled by these moves" ); } @@ -163,6 +173,7 @@ void register_Moves_class(){ Moves_exposer.def( "fugacity" , fugacity_function_value + , bp::release_gil_policy() , "Return the constant fugacity that these moves sample\nThrow: SireError::incompatible_error\n" ); } @@ -174,6 +185,7 @@ void register_Moves_class(){ Moves_exposer.def( "isConstantChemicalPotential" , isConstantChemicalPotential_function_value + , bp::release_gil_policy() , "Return whether or not these moves keep the chemical potential constant" ); } @@ -185,6 +197,7 @@ void register_Moves_class(){ Moves_exposer.def( "isConstantEnergy" , isConstantEnergy_function_value + , bp::release_gil_policy() , "Return whether or not these moves keeps the total energy constant" ); } @@ -196,6 +209,7 @@ void register_Moves_class(){ Moves_exposer.def( "isConstantFugacity" , isConstantFugacity_function_value + , bp::release_gil_policy() , "Return whether or not these moves keep the fugacity (related to the chemical\npotential) constant" ); } @@ -208,6 +222,7 @@ void register_Moves_class(){ "isConstantLambda" , isConstantLambda_function_value , ( bp::arg("lam") ) + , bp::release_gil_policy() , "Return whether or not these moves keep the symbol lam constant" ); } @@ -219,6 +234,7 @@ void register_Moves_class(){ Moves_exposer.def( "isConstantPressure" , isConstantPressure_function_value + , bp::release_gil_policy() , "Return whether or not these moves keep the pressure constant" ); } @@ -230,6 +246,7 @@ void register_Moves_class(){ Moves_exposer.def( "isConstantTemperature" , isConstantTemperature_function_value + , bp::release_gil_policy() , "Return whether or not these moves keep the temperature constant" ); } @@ -241,6 +258,7 @@ void register_Moves_class(){ Moves_exposer.def( "isConstantVolume" , isConstantVolume_function_value + , bp::release_gil_policy() , "Return whether or not these moves keep the volume constant" ); } @@ -264,6 +282,7 @@ void register_Moves_class(){ Moves_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "" ); } @@ -275,6 +294,7 @@ void register_Moves_class(){ Moves_exposer.def( "nMoveTypes" , nMoveTypes_function_value + , bp::release_gil_policy() , "Return the number of different move types in this set of Moves\n(this is the maximum number of Move objects that can be iterated over)" ); } @@ -286,6 +306,7 @@ void register_Moves_class(){ Moves_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "Return the total number of moves performed using the moves\nin this set" ); } @@ -297,7 +318,7 @@ void register_Moves_class(){ Moves_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -310,7 +331,7 @@ void register_Moves_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -322,6 +343,7 @@ void register_Moves_class(){ Moves_exposer.def( "pressure" , pressure_function_value + , bp::release_gil_policy() , "Return the constant pressure that these moves sample\nThrow: SireError::incompatible_error\n" ); } @@ -334,6 +356,7 @@ void register_Moves_class(){ "setAcceptableDelta" , setAcceptableDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Set the acceptable level of drift in the running total from the recalculated total energy" ); } @@ -346,6 +369,7 @@ void register_Moves_class(){ "setCheckRunningTotal" , setCheckRunningTotal_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Switch on or off the checking of the running total energy" ); } @@ -358,6 +382,7 @@ void register_Moves_class(){ "setChemicalPotential" , setChemicalPotential_function_value , ( bp::arg("chemical_potential") ) + , bp::release_gil_policy() , "Set the chemical potential that these constant chemical potential moves sample\nto chemical_potential\nThrow: SireError::incompatible_error\n" ); } @@ -370,6 +395,7 @@ void register_Moves_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("nrg_component") ) + , bp::release_gil_policy() , "Set the energy component used by these moves - by default\nthis will raise an error as setting the energy component is\nnot supported\nThrow: SireError::unsupported\n" ); } @@ -382,6 +408,7 @@ void register_Moves_class(){ "setFugacity" , setFugacity_function_value , ( bp::arg("fugacity") ) + , bp::release_gil_policy() , "Set the fugacity that these constant fugacity moves sample\nto fugacity\nThrow: SireError::incompatible_error\n" ); } @@ -394,6 +421,7 @@ void register_Moves_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "" ); } @@ -406,6 +434,7 @@ void register_Moves_class(){ "setPressure" , setPressure_function_value , ( bp::arg("pressure") ) + , bp::release_gil_policy() , "Set the pressure that these constant pressure moves sample\nto pressure\nThrow: SireError::incompatible_error\n" ); } @@ -418,6 +447,7 @@ void register_Moves_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("space_property") ) + , bp::release_gil_policy() , "Set the space property used by these moves - by default\nthis will raise an error as setting the space property is\nnot supported\nThrow: SireError::unsupported\n" ); } @@ -430,6 +460,7 @@ void register_Moves_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Set the temperature that these constant temperature moves sample\nto temperature\nThrow: SireError::incompatible_error\n" ); } @@ -441,6 +472,7 @@ void register_Moves_class(){ Moves_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of different move types in this set of Moves\n(this is the maximum number of Move objects that can be iterated over)" ); } @@ -464,6 +496,7 @@ void register_Moves_class(){ Moves_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the constant temperature that these moves sample\nThrow: SireError::incompatible_error\n" ); } @@ -476,6 +509,7 @@ void register_Moves_class(){ "timing" , timing_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the average time per move for the ith Move object in this set\nof Moves. This returns 0 if no timing data is available" ); } @@ -487,6 +521,7 @@ void register_Moves_class(){ Moves_exposer.def( "timing" , timing_function_value + , bp::release_gil_policy() , "" ); } @@ -498,6 +533,7 @@ void register_Moves_class(){ Moves_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -509,6 +545,7 @@ void register_Moves_class(){ Moves_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -521,6 +558,7 @@ void register_Moves_class(){ "volume" , volume_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Return the volume of the system as it is seen by these moves" ); } diff --git a/wrapper/Move/NoOpenMM/OpenMMFrEnergyDT.pypp.cpp b/wrapper/Move/NoOpenMM/OpenMMFrEnergyDT.pypp.cpp index eddf9d25c..56f04ffd3 100644 --- a/wrapper/Move/NoOpenMM/OpenMMFrEnergyDT.pypp.cpp +++ b/wrapper/Move/NoOpenMM/OpenMMFrEnergyDT.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "SireMol/atomcoords.h" +#include "SireMol/core.h" + #include "SireMol/atommasses.h" #include "SireMol/bondid.h" @@ -82,14 +84,14 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer_t OpenMMFrEnergyDT_exposer = OpenMMFrEnergyDT_exposer_t( "OpenMMFrEnergyDT", bp::init< >() ); bp::scope OpenMMFrEnergyDT_scope( OpenMMFrEnergyDT_exposer ); { //::SireMove::OpenMMFrEnergyDT::typeName - + typedef char const * ( *typeName_function_type )( ); typeName_function_type typeName_function_value( &::SireMove::OpenMMFrEnergyDT::typeName ); - - OpenMMFrEnergyDT_exposer.def( + + OpenMMFrEnergyDT_exposer.def( "typeName" , typeName_function_value ); - + } OpenMMFrEnergyDT_exposer.staticmethod( "typeName" ); OpenMMFrEnergyDT_exposer.def( "__copy__", &__copy__); diff --git a/wrapper/Move/NoOpenMM/OpenMMFrEnergyST.pypp.cpp b/wrapper/Move/NoOpenMM/OpenMMFrEnergyST.pypp.cpp index 4e8321238..86d359000 100644 --- a/wrapper/Move/NoOpenMM/OpenMMFrEnergyST.pypp.cpp +++ b/wrapper/Move/NoOpenMM/OpenMMFrEnergyST.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "SireMol/molecule.h" +#include "SireMol/core.h" + #include "SireMol/moleculegroup.h" #include "SireMol/moleditor.h" @@ -86,14 +88,14 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer_t OpenMMFrEnergyST_exposer = OpenMMFrEnergyST_exposer_t( "OpenMMFrEnergyST", bp::init< >() ); bp::scope OpenMMFrEnergyST_scope( OpenMMFrEnergyST_exposer ); { //::SireMove::OpenMMFrEnergyST::typeName - + typedef char const * ( *typeName_function_type )( ); typeName_function_type typeName_function_value( &::SireMove::OpenMMFrEnergyST::typeName ); - - OpenMMFrEnergyST_exposer.def( + + OpenMMFrEnergyST_exposer.def( "typeName" , typeName_function_value ); - + } OpenMMFrEnergyST_exposer.staticmethod( "typeName" ); OpenMMFrEnergyST_exposer.def( "__copy__", &__copy__); diff --git a/wrapper/Move/NoOpenMM/OpenMMMDIntegrator.pypp.cpp b/wrapper/Move/NoOpenMM/OpenMMMDIntegrator.pypp.cpp index 0c168a52c..100926017 100644 --- a/wrapper/Move/NoOpenMM/OpenMMMDIntegrator.pypp.cpp +++ b/wrapper/Move/NoOpenMM/OpenMMMDIntegrator.pypp.cpp @@ -31,6 +31,8 @@ namespace bp = boost::python; #include "SireMol/bondid.h" +#include "SireMol/core.h" + #include "SireMol/connectivity.h" #include "SireMol/mgname.h" diff --git a/wrapper/Move/NullDeleter.pypp.cpp b/wrapper/Move/NullDeleter.pypp.cpp index 5dbd77ec0..488625483 100644 --- a/wrapper/Move/NullDeleter.pypp.cpp +++ b/wrapper/Move/NullDeleter.pypp.cpp @@ -29,6 +29,8 @@ SireMove::NullDeleter __copy__(const SireMove::NullDeleter &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullDeleter_class(){ { //::SireMove::NullDeleter @@ -45,6 +47,7 @@ void register_NullDeleter_class(){ "deleteFrom" , deleteFrom_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Delete a molecule from the system - well this does nothing too" ); } @@ -84,6 +87,7 @@ void register_NullDeleter_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the generator used to select random molecules\n(this does nothing)" ); } @@ -95,6 +99,7 @@ void register_NullDeleter_class(){ NullDeleter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullGetPoint.pypp.cpp b/wrapper/Move/NullGetPoint.pypp.cpp index 5957580ba..db2b12877 100644 --- a/wrapper/Move/NullGetPoint.pypp.cpp +++ b/wrapper/Move/NullGetPoint.pypp.cpp @@ -39,6 +39,8 @@ SireMove::NullGetPoint __copy__(const SireMove::NullGetPoint &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullGetPoint_class(){ { //::SireMove::NullGetPoint @@ -81,6 +83,7 @@ void register_NullGetPoint_class(){ NullGetPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullInserter.pypp.cpp b/wrapper/Move/NullInserter.pypp.cpp index fd7d638f9..ed4cc5ce5 100644 --- a/wrapper/Move/NullInserter.pypp.cpp +++ b/wrapper/Move/NullInserter.pypp.cpp @@ -9,6 +9,8 @@ namespace bp = boost::python; #include "SireMaths/quaternion.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/partialmolecule.h" @@ -35,6 +37,8 @@ SireMove::NullInserter __copy__(const SireMove::NullInserter &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullInserter_class(){ { //::SireMove::NullInserter @@ -51,6 +55,7 @@ void register_NullInserter_class(){ "insert" , insert_function_value , ( bp::arg("molecule"), bp::arg("system"), bp::arg("space") ) + , bp::release_gil_policy() , "This does nothing" ); } @@ -63,6 +68,7 @@ void register_NullInserter_class(){ "insert" , insert_function_value , ( bp::arg("molecule"), bp::arg("system"), bp::arg("space") ) + , bp::release_gil_policy() , "This does nothing" ); } @@ -89,6 +95,7 @@ void register_NullInserter_class(){ NullInserter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullIntegrator.pypp.cpp b/wrapper/Move/NullIntegrator.pypp.cpp index 455224748..5456c3155 100644 --- a/wrapper/Move/NullIntegrator.pypp.cpp +++ b/wrapper/Move/NullIntegrator.pypp.cpp @@ -37,6 +37,8 @@ SireMove::NullIntegrator __copy__(const SireMove::NullIntegrator &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullIntegrator_class(){ { //::SireMove::NullIntegrator @@ -76,6 +78,7 @@ void register_NullIntegrator_class(){ NullIntegrator_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble of this integrator" ); } @@ -88,6 +91,7 @@ void register_NullIntegrator_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "The null integrator does nothing" ); } @@ -99,6 +103,7 @@ void register_NullIntegrator_class(){ NullIntegrator_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "Return whether or not this integrator is time-reversible" ); } @@ -125,6 +130,7 @@ void register_NullIntegrator_class(){ NullIntegrator_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this integrator" ); } @@ -136,6 +142,7 @@ void register_NullIntegrator_class(){ NullIntegrator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullMove.pypp.cpp b/wrapper/Move/NullMove.pypp.cpp index 6b81482c2..f7ac88d7f 100644 --- a/wrapper/Move/NullMove.pypp.cpp +++ b/wrapper/Move/NullMove.pypp.cpp @@ -11,6 +11,8 @@ namespace bp = boost::python; #include "SireMaths/rangenerator.h" +#include "SireMol/core.h" + #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -35,6 +37,8 @@ SireMove::NullMove __copy__(const SireMove::NullMove &other){ return SireMove::N #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullMove_class(){ { //::SireMove::NullMove @@ -50,6 +54,7 @@ void register_NullMove_class(){ NullMove_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "There are no statistics to clear" ); } @@ -61,6 +66,7 @@ void register_NullMove_class(){ NullMove_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "NullMove doesnt change anything (so must be NVE)" ); } @@ -73,6 +79,7 @@ void register_NullMove_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "NullMove doesnt perform any moves - no matter how hard you try" ); } @@ -84,6 +91,7 @@ void register_NullMove_class(){ NullMove_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "There have been and never will be any NullMove events" ); } @@ -111,6 +119,7 @@ void register_NullMove_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "The NullMove does not use a random number generator" ); } @@ -122,6 +131,7 @@ void register_NullMove_class(){ NullMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -133,6 +143,7 @@ void register_NullMove_class(){ NullMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullSupraMove.pypp.cpp b/wrapper/Move/NullSupraMove.pypp.cpp index 152f951c2..a018c2b5f 100644 --- a/wrapper/Move/NullSupraMove.pypp.cpp +++ b/wrapper/Move/NullSupraMove.pypp.cpp @@ -23,6 +23,8 @@ SireMove::NullSupraMove __copy__(const SireMove::NullSupraMove &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullSupraMove_class(){ { //::SireMove::NullSupraMove @@ -65,6 +67,7 @@ void register_NullSupraMove_class(){ NullSupraMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -76,6 +79,7 @@ void register_NullSupraMove_class(){ NullSupraMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullSupraSubMove.pypp.cpp b/wrapper/Move/NullSupraSubMove.pypp.cpp index 443743e8a..46d11f2d8 100644 --- a/wrapper/Move/NullSupraSubMove.pypp.cpp +++ b/wrapper/Move/NullSupraSubMove.pypp.cpp @@ -23,6 +23,8 @@ SireMove::NullSupraSubMove __copy__(const SireMove::NullSupraSubMove &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullSupraSubMove_class(){ { //::SireMove::NullSupraSubMove @@ -39,6 +41,7 @@ void register_NullSupraSubMove_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("n_supra_moves"), bp::arg("n_supra_moves_per_block"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Null move, so doesnt do anything" ); } @@ -65,6 +68,7 @@ void register_NullSupraSubMove_class(){ NullSupraSubMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -76,6 +80,7 @@ void register_NullSupraSubMove_class(){ NullSupraSubMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullVelocityGenerator.pypp.cpp b/wrapper/Move/NullVelocityGenerator.pypp.cpp index 10fe7bdd3..867814ca3 100644 --- a/wrapper/Move/NullVelocityGenerator.pypp.cpp +++ b/wrapper/Move/NullVelocityGenerator.pypp.cpp @@ -41,6 +41,8 @@ SireMove::NullVelocityGenerator __copy__(const SireMove::NullVelocityGenerator & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullVelocityGenerator_class(){ { //::SireMove::NullVelocityGenerator @@ -83,6 +85,7 @@ void register_NullVelocityGenerator_class(){ NullVelocityGenerator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/NullVolumeChanger.pypp.cpp b/wrapper/Move/NullVolumeChanger.pypp.cpp index 0f3705d26..423795ae7 100644 --- a/wrapper/Move/NullVolumeChanger.pypp.cpp +++ b/wrapper/Move/NullVolumeChanger.pypp.cpp @@ -37,6 +37,8 @@ SireMove::NullVolumeChanger __copy__(const SireMove::NullVolumeChanger &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullVolumeChanger_class(){ { //::SireMove::NullVolumeChanger @@ -79,6 +81,7 @@ void register_NullVolumeChanger_class(){ NullVolumeChanger_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/OpenMMFrEnergyDT.pypp.cpp b/wrapper/Move/OpenMMFrEnergyDT.pypp.cpp index 6c222cb5f..3b3c16408 100644 --- a/wrapper/Move/OpenMMFrEnergyDT.pypp.cpp +++ b/wrapper/Move/OpenMMFrEnergyDT.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -81,6 +83,8 @@ SireMove::OpenMMFrEnergyDT __copy__(const SireMove::OpenMMFrEnergyDT &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_OpenMMFrEnergyDT_class(){ { //::SireMove::OpenMMFrEnergyDT @@ -121,6 +125,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble of this integrator" ); } @@ -132,6 +137,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getAlchemical_value" , getAlchemical_value_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +149,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getAndersen" , getAndersen_function_value + , bp::release_gil_policy() , "" ); } @@ -154,6 +161,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getAndersen_frequency" , getAndersen_frequency_function_value + , bp::release_gil_policy() , "" ); } @@ -165,6 +173,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getBufferCoords" , getBufferCoords_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +185,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getCMMremoval_frequency" , getCMMremoval_frequency_function_value + , bp::release_gil_policy() , "" ); } @@ -187,6 +197,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getConstraintType" , getConstraintType_function_value + , bp::release_gil_policy() , "" ); } @@ -198,6 +209,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getCoulomb_power" , getCoulomb_power_function_value + , bp::release_gil_policy() , "" ); } @@ -209,6 +221,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getCutoffType" , getCutoffType_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +233,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getCutoff_distance" , getCutoff_distance_function_value + , bp::release_gil_policy() , "" ); } @@ -231,6 +245,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getDeltaAlchemical" , getDeltaAlchemical_function_value + , bp::release_gil_policy() , "" ); } @@ -242,6 +257,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getDeviceIndex" , getDeviceIndex_function_value + , bp::release_gil_policy() , "" ); } @@ -253,6 +269,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getEnergyFrequency" , getEnergyFrequency_function_value + , bp::release_gil_policy() , "Get the frequency of buffering coordinates" ); } @@ -264,6 +281,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getField_dielectric" , getField_dielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -275,6 +293,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getGradients" , getGradients_function_value + , bp::release_gil_policy() , "" ); } @@ -286,6 +305,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getMCBarostat" , getMCBarostat_function_value + , bp::release_gil_policy() , "" ); } @@ -297,6 +317,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getMCBarostat_frequency" , getMCBarostat_frequency_function_value + , bp::release_gil_policy() , "" ); } @@ -308,6 +329,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getPlatform" , getPlatform_function_value + , bp::release_gil_policy() , "" ); } @@ -319,6 +341,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getPressure" , getPressure_function_value + , bp::release_gil_policy() , "" ); } @@ -330,6 +353,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getRestraint" , getRestraint_function_value + , bp::release_gil_policy() , "" ); } @@ -341,6 +365,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getShift_delta" , getShift_delta_function_value + , bp::release_gil_policy() , "" ); } @@ -352,6 +377,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "getTemperature" , getTemperature_function_value + , bp::release_gil_policy() , "" ); } @@ -363,6 +389,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "" ); } @@ -375,6 +402,7 @@ void register_OpenMMFrEnergyDT_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "" ); } @@ -386,6 +414,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "Return whether or not this integrator is time-reversible" ); } @@ -413,6 +442,7 @@ void register_OpenMMFrEnergyDT_class(){ "setAlchemical_value" , setAlchemical_value_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the alchemical value used to calculate the free energy change via TI method" ); } @@ -425,6 +455,7 @@ void register_OpenMMFrEnergyDT_class(){ "setAndersen" , setAndersen_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Andersen thermostat" ); } @@ -437,6 +468,7 @@ void register_OpenMMFrEnergyDT_class(){ "setAndersen_frequency" , setAndersen_frequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Andersen Thermostat frequency collision" ); } @@ -449,6 +481,7 @@ void register_OpenMMFrEnergyDT_class(){ "setBufferCoords" , setBufferCoords_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the flag to buffer coordinate during the free energy calculation" ); } @@ -461,6 +494,7 @@ void register_OpenMMFrEnergyDT_class(){ "setCMMremoval_frequency" , setCMMremoval_frequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -473,6 +507,7 @@ void register_OpenMMFrEnergyDT_class(){ "setConstraintType" , setConstraintType_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Constraint type: none, hbonds, allbonds, hangles" ); } @@ -485,6 +520,7 @@ void register_OpenMMFrEnergyDT_class(){ "setCoulomb_power" , setCoulomb_power_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the coulomb power used in the soft core potential" ); } @@ -497,6 +533,7 @@ void register_OpenMMFrEnergyDT_class(){ "setCutoffType" , setCutoffType_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the cufott type: nocutoff, cutoffnonperiodic, cutoffperiodic" ); } @@ -509,6 +546,7 @@ void register_OpenMMFrEnergyDT_class(){ "setCutoff_distance" , setCutoff_distance_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the cutoff distance in A" ); } @@ -521,6 +559,7 @@ void register_OpenMMFrEnergyDT_class(){ "setDeltatAlchemical" , setDeltatAlchemical_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the delta alchemical used in the FEP method" ); } @@ -533,6 +572,7 @@ void register_OpenMMFrEnergyDT_class(){ "setDeviceIndex" , setDeviceIndex_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -545,6 +585,7 @@ void register_OpenMMFrEnergyDT_class(){ "setEnergyFrequency" , setEnergyFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -557,6 +598,7 @@ void register_OpenMMFrEnergyDT_class(){ "setField_dielectric" , setField_dielectric_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the dielectric constant" ); } @@ -569,6 +611,7 @@ void register_OpenMMFrEnergyDT_class(){ "setMCBarostat" , setMCBarostat_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Monte Carlo Barostat onoff" ); } @@ -581,6 +624,7 @@ void register_OpenMMFrEnergyDT_class(){ "setMCBarostat_frequency" , setMCBarostat_frequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Monte Carlo Barostat frequency in time speps" ); } @@ -593,6 +637,7 @@ void register_OpenMMFrEnergyDT_class(){ "setPlatform" , setPlatform_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -605,6 +650,7 @@ void register_OpenMMFrEnergyDT_class(){ "setPressure" , setPressure_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Pressure" ); } @@ -617,6 +663,7 @@ void register_OpenMMFrEnergyDT_class(){ "setRestraint" , setRestraint_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Retraint mode" ); } @@ -629,6 +676,7 @@ void register_OpenMMFrEnergyDT_class(){ "setShift_delta" , setShift_delta_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the shift used in the soft core potential" ); } @@ -641,6 +689,7 @@ void register_OpenMMFrEnergyDT_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Temperature" ); } @@ -652,6 +701,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this integrator" ); } @@ -663,6 +713,7 @@ void register_OpenMMFrEnergyDT_class(){ OpenMMFrEnergyDT_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/OpenMMFrEnergyST.pypp.cpp b/wrapper/Move/OpenMMFrEnergyST.pypp.cpp index 456070875..419abbc4f 100644 --- a/wrapper/Move/OpenMMFrEnergyST.pypp.cpp +++ b/wrapper/Move/OpenMMFrEnergyST.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -87,6 +89,8 @@ SireMove::OpenMMFrEnergyST __copy__(const SireMove::OpenMMFrEnergyST &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_OpenMMFrEnergyST_class(){ { //::SireMove::OpenMMFrEnergyST @@ -104,6 +108,7 @@ void register_OpenMMFrEnergyST_class(){ "annealSystemToLambda" , annealSystemToLambda_function_value , ( bp::arg("system"), bp::arg("anneal_step_size"), bp::arg("annealing_steps") ) + , bp::release_gil_policy() , "\n annealSystemToLambda will anneal the system to the current alchemical lambda\n value of the system\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am timestep Default = 0.005. Time step used of the\n equilibration to the desired lambda\n Par:am annealingSteps Default = 1000. Number of steps used for the\n annealing\n Return: Sire system with updated coordinates and\n velocities.\n" ); } @@ -139,6 +144,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble of this integrator" ); } @@ -150,6 +156,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getAlchemicalValue" , getAlchemicalValue_function_value + , bp::release_gil_policy() , "" ); } @@ -161,6 +168,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getAndersen" , getAndersen_function_value + , bp::release_gil_policy() , "" ); } @@ -172,6 +180,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getAndersenFrequency" , getAndersenFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -183,6 +192,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getBackwardMetropolis" , getBackwardMetropolis_function_value + , bp::release_gil_policy() , "" ); } @@ -194,6 +204,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getBufferFrequency" , getBufferFrequency_function_value + , bp::release_gil_policy() , "Get the frequency of buffering coordinates" ); } @@ -205,6 +216,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getCMMremovalFrequency" , getCMMremovalFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -216,6 +228,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getCombiningRules" , getCombiningRules_function_value + , bp::release_gil_policy() , "" ); } @@ -227,6 +240,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getConstraintType" , getConstraintType_function_value + , bp::release_gil_policy() , "" ); } @@ -238,6 +252,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getCoulombPower" , getCoulombPower_function_value + , bp::release_gil_policy() , "" ); } @@ -249,6 +264,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getCutoffDistance" , getCutoffDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -260,6 +276,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getCutoffType" , getCutoffType_function_value + , bp::release_gil_policy() , "" ); } @@ -271,6 +288,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getDeltaAlchemical" , getDeltaAlchemical_function_value + , bp::release_gil_policy() , "" ); } @@ -282,6 +300,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getDeviceIndex" , getDeviceIndex_function_value + , bp::release_gil_policy() , "" ); } @@ -293,6 +312,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getEnergies" , getEnergies_function_value + , bp::release_gil_policy() , "" ); } @@ -304,6 +324,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getEnergyFrequency" , getEnergyFrequency_function_value + , bp::release_gil_policy() , "Get the frequency of buffering coordinates" ); } @@ -315,6 +336,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getFieldDielectric" , getFieldDielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -326,6 +348,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getForwardMetropolis" , getForwardMetropolis_function_value + , bp::release_gil_policy() , "" ); } @@ -337,6 +360,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getFriction" , getFriction_function_value + , bp::release_gil_policy() , "" ); } @@ -348,6 +372,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getGradients" , getGradients_function_value + , bp::release_gil_policy() , "" ); } @@ -359,6 +384,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getIntegrationTolerance" , getIntegrationTolerance_function_value + , bp::release_gil_policy() , "" ); } @@ -370,6 +396,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getIntegrator" , getIntegrator_function_value + , bp::release_gil_policy() , "" ); } @@ -381,6 +408,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getMCBarostat" , getMCBarostat_function_value + , bp::release_gil_policy() , "" ); } @@ -392,6 +420,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getMCBarostatFrequency" , getMCBarostatFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -403,6 +432,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getPlatform" , getPlatform_function_value + , bp::release_gil_policy() , "" ); } @@ -415,6 +445,7 @@ void register_OpenMMFrEnergyST_class(){ "getPotentialEnergy" , getPotentialEnergy_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "" ); } @@ -426,6 +457,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getPrecision" , getPrecision_function_value + , bp::release_gil_policy() , "" ); } @@ -437,6 +469,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getPressure" , getPressure_function_value + , bp::release_gil_policy() , "" ); } @@ -448,6 +481,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getRandomSeed" , getRandomSeed_function_value + , bp::release_gil_policy() , "" ); } @@ -459,6 +493,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getReducedPerturbedEnergies" , getReducedPerturbedEnergies_function_value + , bp::release_gil_policy() , "" ); } @@ -470,6 +505,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getRestraint" , getRestraint_function_value + , bp::release_gil_policy() , "" ); } @@ -481,6 +517,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getShiftDelta" , getShiftDelta_function_value + , bp::release_gil_policy() , "" ); } @@ -492,6 +529,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getTemperature" , getTemperature_function_value + , bp::release_gil_policy() , "" ); } @@ -503,6 +541,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "getTimetoSkip" , getTimetoSkip_function_value + , bp::release_gil_policy() , "" ); } @@ -514,6 +553,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "\n initialises the openMM Free energy single topology calculation\n Initialise must be called before anything else happens.\n" ); } @@ -526,6 +566,7 @@ void register_OpenMMFrEnergyST_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "\n Main integration methods for advancing dynamics\n Par:am workspace Sire Integrator workspace\n Par:am nrg_component\n Par:am timestep Default = 0.002. Integration timestep\n Par:am nmoves Number of moves\n Par:am record_stats boolean that tracks recording.\n" ); } @@ -537,6 +578,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "Return whether or not this integrator is time-reversible" ); } @@ -549,6 +591,7 @@ void register_OpenMMFrEnergyST_class(){ "minimiseEnergy" , minimiseEnergy_function_value , ( bp::arg("system"), bp::arg("tolerance"), bp::arg("max_iteration") ) + , bp::release_gil_policy() , "\n \n minimizeEnergy will find the nearest local potential energy minimum,\n given the current Sire::System. It calls the\n LocalEnergyMinimizer :: minimize() function of OpenMM.\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am tolerance Default = 1. This specifies how precisely the\n energy minimum must be located. Minimisation will be halted once the\n root-mean-square value of all force components reaches this tolerance.\n Par:am max_iteration Default = 1000. this specifies the number of\n iterations are run for the minimisation. If max_iteration = 0, the\n iteration will run until convergence.\n\n Return: Sire System, with the updated energy\n minimised coordinates.\n" ); } @@ -576,6 +619,7 @@ void register_OpenMMFrEnergyST_class(){ "setAlchemicalArray" , setAlchemicalArray_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -588,6 +632,7 @@ void register_OpenMMFrEnergyST_class(){ "setAlchemicalValue" , setAlchemicalValue_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the alchemical value used to calculate the free energy change via TI method" ); } @@ -600,6 +645,7 @@ void register_OpenMMFrEnergyST_class(){ "setAndersen" , setAndersen_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Andersen thermostat" ); } @@ -612,6 +658,7 @@ void register_OpenMMFrEnergyST_class(){ "setAndersenFrequency" , setAndersenFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Andersen Thermostat frequency collision" ); } @@ -624,6 +671,7 @@ void register_OpenMMFrEnergyST_class(){ "setBufferFrequency" , setBufferFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -636,6 +684,7 @@ void register_OpenMMFrEnergyST_class(){ "setCMMremovalFrequency" , setCMMremovalFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -648,6 +697,7 @@ void register_OpenMMFrEnergyST_class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the combining rules type: arithmetic, geometric" ); } @@ -660,6 +710,7 @@ void register_OpenMMFrEnergyST_class(){ "setConstraintType" , setConstraintType_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Constraint type: none, hbonds, allbonds, hangles" ); } @@ -672,6 +723,7 @@ void register_OpenMMFrEnergyST_class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the coulomb power used in the soft core potential" ); } @@ -684,6 +736,7 @@ void register_OpenMMFrEnergyST_class(){ "setCutoffDistance" , setCutoffDistance_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the cutoff distance in A" ); } @@ -696,6 +749,7 @@ void register_OpenMMFrEnergyST_class(){ "setCutoffType" , setCutoffType_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the cutoff type: nocutoff, cutoffnonperiodic, cutoffperiodic" ); } @@ -708,6 +762,7 @@ void register_OpenMMFrEnergyST_class(){ "setDebug" , setDebug_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -720,6 +775,7 @@ void register_OpenMMFrEnergyST_class(){ "setDeltatAlchemical" , setDeltatAlchemical_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "\n Set the delta alchemical used in the FEP method\n Par:am deltaalchemical\n" ); } @@ -732,6 +788,7 @@ void register_OpenMMFrEnergyST_class(){ "setDeviceIndex" , setDeviceIndex_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -744,6 +801,7 @@ void register_OpenMMFrEnergyST_class(){ "setEnergyFrequency" , setEnergyFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -756,6 +814,7 @@ void register_OpenMMFrEnergyST_class(){ "setFieldDielectric" , setFieldDielectric_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the dielectric constant" ); } @@ -768,6 +827,7 @@ void register_OpenMMFrEnergyST_class(){ "setFriction" , setFriction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the friction used in specific Integrator type" ); } @@ -780,6 +840,7 @@ void register_OpenMMFrEnergyST_class(){ "setIntegrationTolerance" , setIntegrationTolerance_function_value , ( bp::arg("tollerance") ) + , bp::release_gil_policy() , "Set the integration tolerance" ); } @@ -792,6 +853,7 @@ void register_OpenMMFrEnergyST_class(){ "setIntegrator" , setIntegrator_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Integrator type" ); } @@ -804,6 +866,7 @@ void register_OpenMMFrEnergyST_class(){ "setMCBarostat" , setMCBarostat_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Monte Carlo Barostat onoff" ); } @@ -816,6 +879,7 @@ void register_OpenMMFrEnergyST_class(){ "setMCBarostatFrequency" , setMCBarostatFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Monte Carlo Barostat frequency in time speps" ); } @@ -828,6 +892,7 @@ void register_OpenMMFrEnergyST_class(){ "setPlatform" , setPlatform_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -840,6 +905,7 @@ void register_OpenMMFrEnergyST_class(){ "setPrecision" , setPrecision_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Precision" ); } @@ -852,6 +918,7 @@ void register_OpenMMFrEnergyST_class(){ "setPressure" , setPressure_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Pressure" ); } @@ -864,6 +931,7 @@ void register_OpenMMFrEnergyST_class(){ "setRandomSeed" , setRandomSeed_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Integrator random seed" ); } @@ -876,6 +944,7 @@ void register_OpenMMFrEnergyST_class(){ "setReinitialiseContext" , setReinitialiseContext_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the flag to reinitialise the context" ); } @@ -888,6 +957,7 @@ void register_OpenMMFrEnergyST_class(){ "setRestraint" , setRestraint_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Retraint mode" ); } @@ -900,6 +970,7 @@ void register_OpenMMFrEnergyST_class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "\n \n Par:am shiftdelta\n" ); } @@ -912,6 +983,7 @@ void register_OpenMMFrEnergyST_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Temperature" ); } @@ -924,6 +996,7 @@ void register_OpenMMFrEnergyST_class(){ "setTimetoSkip" , setTimetoSkip_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Get total time to skip" ); } @@ -935,6 +1008,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this integrator" ); } @@ -946,6 +1020,7 @@ void register_OpenMMFrEnergyST_class(){ OpenMMFrEnergyST_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/OpenMMMDIntegrator.pypp.cpp b/wrapper/Move/OpenMMMDIntegrator.pypp.cpp index c602f7caf..0806382a3 100644 --- a/wrapper/Move/OpenMMMDIntegrator.pypp.cpp +++ b/wrapper/Move/OpenMMMDIntegrator.pypp.cpp @@ -35,6 +35,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -81,6 +83,8 @@ SireMove::OpenMMMDIntegrator __copy__(const SireMove::OpenMMMDIntegrator &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_OpenMMMDIntegrator_class(){ { //::SireMove::OpenMMMDIntegrator @@ -121,6 +125,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble of this integrator" ); } @@ -133,6 +138,7 @@ void register_OpenMMMDIntegrator_class(){ "equilibrateSystem" , equilibrateSystem_function_value , ( bp::arg("system"), bp::arg("equib_time_step"), bp::arg("equib_steps") ) + , bp::release_gil_policy() , "\n annealLambda will equilibrate the system to the current alchemical lambda\n value of the system\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am timestep Default = 0.005. Time step used of the\n equilibration to the desired lambda\n Par:am annealingSteps Default = 1000. Number of steps used for the\n annealing\n Return: Sire system with updated coordinates and\n velocities.\n" ); } @@ -144,6 +150,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getAndersen" , getAndersen_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getAndersenFrequency" , getAndersenFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +174,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getBufferFrequency" , getBufferFrequency_function_value + , bp::release_gil_policy() , "Get the frequency of buffering coordinates" ); } @@ -177,6 +186,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getCMMremovalFrequency" , getCMMremovalFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -188,6 +198,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getConstraintType" , getConstraintType_function_value + , bp::release_gil_policy() , "" ); } @@ -199,6 +210,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getCutoffDistance" , getCutoffDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -210,6 +222,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getCutoffType" , getCutoffType_function_value + , bp::release_gil_policy() , "" ); } @@ -221,6 +234,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getDeviceIndex" , getDeviceIndex_function_value + , bp::release_gil_policy() , "" ); } @@ -232,6 +246,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getFieldDielectric" , getFieldDielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -243,6 +258,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getFriction" , getFriction_function_value + , bp::release_gil_policy() , "" ); } @@ -254,6 +270,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getIntegrationTolerance" , getIntegrationTolerance_function_value + , bp::release_gil_policy() , "" ); } @@ -265,6 +282,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getIntegrator" , getIntegrator_function_value + , bp::release_gil_policy() , "" ); } @@ -276,6 +294,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getKineticEnergy" , getKineticEnergy_function_value + , bp::release_gil_policy() , "\n \n minimizeEnergy will find the nearest local potential energy minimum,\n given the current Sire::System. It calls the\n LocalEnergyMinimizer :: minimize() function of OpenMM.\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Return: Kinetic energy computed with OpenMM.\n" ); } @@ -287,6 +306,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getLJDispersion" , getLJDispersion_function_value + , bp::release_gil_policy() , "" ); } @@ -298,6 +318,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getMCBarostat" , getMCBarostat_function_value + , bp::release_gil_policy() , "" ); } @@ -309,6 +330,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getMCBarostatFrequency" , getMCBarostatFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -320,6 +342,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getPlatform" , getPlatform_function_value + , bp::release_gil_policy() , "" ); } @@ -332,6 +355,7 @@ void register_OpenMMMDIntegrator_class(){ "getPotentialEnergy" , getPotentialEnergy_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "" ); } @@ -343,6 +367,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getPrecision" , getPrecision_function_value + , bp::release_gil_policy() , "" ); } @@ -354,6 +379,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getPressure" , getPressure_function_value + , bp::release_gil_policy() , "" ); } @@ -365,6 +391,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getRestraint" , getRestraint_function_value + , bp::release_gil_policy() , "" ); } @@ -376,6 +403,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getTemperature" , getTemperature_function_value + , bp::release_gil_policy() , "" ); } @@ -387,6 +415,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getTimetoSkip" , getTimetoSkip_function_value + , bp::release_gil_policy() , "" ); } @@ -398,6 +427,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "getToleranceEwaldPME" , getToleranceEwaldPME_function_value + , bp::release_gil_policy() , "" ); } @@ -409,6 +439,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "initialise" , initialise_function_value + , bp::release_gil_policy() , "Integrate the coordinates of the atoms in the molecules in molgroup\nusing the forces in forcetable, using the optionally supplied\nproperty map to find the necessary molecular properties\nThrow: SireMol::missing_molecule\nThrow: SireBase::missing_property\nThrow: SireError:invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -421,6 +452,7 @@ void register_OpenMMMDIntegrator_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "" ); } @@ -432,6 +464,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "Return whether or not this integrator is time-reversible" ); } @@ -444,6 +477,7 @@ void register_OpenMMMDIntegrator_class(){ "minimiseEnergy" , minimiseEnergy_function_value , ( bp::arg("system"), bp::arg("tolerance"), bp::arg("max_iteration") ) + , bp::release_gil_policy() , "\n \n minimizeEnergy will find the nearest local potential energy minimum,\n given the current Sire::System. It calls the\n LocalEnergyMinimizer :: minimize() function of OpenMM.\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am tolerance Default = 1. This specifies how precisely the\n energy minimum must be located. Minimisation will be halted once the\n root-mean-square value of all force components reaches this tolerance.\n Par:am max_iteration Default = 1000. this specifies the number of\n iterations are run for the minimisation. If max_iteration = 0, the\n iteration will run until convergence.\n\n Return: Sire System, with the updated energy\n minimised coordinates.\n" ); } @@ -471,6 +505,7 @@ void register_OpenMMMDIntegrator_class(){ "setAndersen" , setAndersen_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Andersen thermostat" ); } @@ -483,6 +518,7 @@ void register_OpenMMMDIntegrator_class(){ "setAndersenFrequency" , setAndersenFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Andersen Thermostat frequency collision" ); } @@ -495,6 +531,7 @@ void register_OpenMMMDIntegrator_class(){ "setBufferFrequency" , setBufferFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -507,6 +544,7 @@ void register_OpenMMMDIntegrator_class(){ "setCMMremovalFrequency" , setCMMremovalFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -519,6 +557,7 @@ void register_OpenMMMDIntegrator_class(){ "setConstraintType" , setConstraintType_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Constraint type: none, hbonds, allbonds, hangles" ); } @@ -531,6 +570,7 @@ void register_OpenMMMDIntegrator_class(){ "setCutoffDistance" , setCutoffDistance_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the cutoff distance in A" ); } @@ -543,6 +583,7 @@ void register_OpenMMMDIntegrator_class(){ "setCutoffType" , setCutoffType_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the cufott type: nocutoff, cutoffnonperiodic, cutoffperiodic" ); } @@ -555,6 +596,7 @@ void register_OpenMMMDIntegrator_class(){ "setDeviceIndex" , setDeviceIndex_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -567,6 +609,7 @@ void register_OpenMMMDIntegrator_class(){ "setFieldDielectric" , setFieldDielectric_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the dielectric constant" ); } @@ -579,6 +622,7 @@ void register_OpenMMMDIntegrator_class(){ "setFriction" , setFriction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -591,6 +635,7 @@ void register_OpenMMMDIntegrator_class(){ "setIntegrationTolerance" , setIntegrationTolerance_function_value , ( bp::arg("tollerance") ) + , bp::release_gil_policy() , "Set the integration tolerance" ); } @@ -603,6 +648,7 @@ void register_OpenMMMDIntegrator_class(){ "setIntegrator" , setIntegrator_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -615,6 +661,7 @@ void register_OpenMMMDIntegrator_class(){ "setLJDispersion" , setLJDispersion_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Retraint mode" ); } @@ -627,6 +674,7 @@ void register_OpenMMMDIntegrator_class(){ "setMCBarostat" , setMCBarostat_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Monte Carlo Barostat onoff" ); } @@ -639,6 +687,7 @@ void register_OpenMMMDIntegrator_class(){ "setMCBarostatFrequency" , setMCBarostatFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Monte Carlo Barostat frequency in time speps" ); } @@ -651,6 +700,7 @@ void register_OpenMMMDIntegrator_class(){ "setPlatform" , setPlatform_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -663,6 +713,7 @@ void register_OpenMMMDIntegrator_class(){ "setPrecision" , setPrecision_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Precision" ); } @@ -675,6 +726,7 @@ void register_OpenMMMDIntegrator_class(){ "setPressure" , setPressure_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Pressure" ); } @@ -687,6 +739,7 @@ void register_OpenMMMDIntegrator_class(){ "setReinitialiseContext" , setReinitialiseContext_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the flag to reinitialise the context" ); } @@ -699,6 +752,7 @@ void register_OpenMMMDIntegrator_class(){ "setRestraint" , setRestraint_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Retraint mode" ); } @@ -711,6 +765,7 @@ void register_OpenMMMDIntegrator_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Temperature" ); } @@ -723,6 +778,7 @@ void register_OpenMMMDIntegrator_class(){ "setTimetoSkip" , setTimetoSkip_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Get total time to skip" ); } @@ -735,6 +791,7 @@ void register_OpenMMMDIntegrator_class(){ "setToleranceEwaldPME" , setToleranceEwaldPME_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -746,6 +803,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this integrator" ); } @@ -757,6 +815,7 @@ void register_OpenMMMDIntegrator_class(){ OpenMMMDIntegrator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/OpenMMPMEFEP.pypp.cpp b/wrapper/Move/OpenMMPMEFEP.pypp.cpp index 2225909ef..7495761ce 100644 --- a/wrapper/Move/OpenMMPMEFEP.pypp.cpp +++ b/wrapper/Move/OpenMMPMEFEP.pypp.cpp @@ -37,6 +37,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -71,7 +73,6 @@ namespace bp = boost::python; #include "openmmpmefep.h" - #include #include @@ -90,11 +91,13 @@ SireMove::OpenMMPMEFEP __copy__(const SireMove::OpenMMPMEFEP &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_OpenMMPMEFEP_class(){ { //::SireMove::OpenMMPMEFEP typedef bp::class_< SireMove::OpenMMPMEFEP, bp::bases< SireMove::Integrator, SireBase::Property > > OpenMMPMEFEP_exposer_t; - OpenMMPMEFEP_exposer_t OpenMMPMEFEP_exposer = OpenMMPMEFEP_exposer_t( "OpenMMPMEFEP", "This class implements single topology a free energy method using\nOpenMM.\n\nAuthor: Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler\n", bp::init< bp::optional< bool > >(( bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor") ); + OpenMMPMEFEP_exposer_t OpenMMPMEFEP_exposer = OpenMMPMEFEP_exposer_t( "OpenMMPMEFEP", "This class implements the single topology free energy method using\nOpenMM.\n\nAuthor: Julien Michel, Gaetano Calabro, Antonia Mey, Hannes H Loeffler\n", bp::init< bp::optional< bool > >(( bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor") ); bp::scope OpenMMPMEFEP_scope( OpenMMPMEFEP_exposer ); OpenMMPMEFEP_exposer.def( bp::init< SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, SireMol::MoleculeGroup const &, bp::optional< bool > >(( bp::arg("molecule_group"), bp::arg("solutes"), bp::arg("solute_hard"), bp::arg("solute_todummy"), bp::arg("solute_fromdummy"), bp::arg("frequent_save_velocities")=(bool)(false) ), "Constructor using the passed molecule groups") ); OpenMMPMEFEP_exposer.def( bp::init< SireMove::OpenMMPMEFEP const & >(( bp::arg("other") ), "Copy constructor") ); @@ -107,6 +110,7 @@ void register_OpenMMPMEFEP_class(){ "annealSystemToLambda" , annealSystemToLambda_function_value , ( bp::arg("system"), bp::arg("anneal_step_size"), bp::arg("annealing_steps") ) + , bp::release_gil_policy() , "\n annealSystemToLambda will anneal the system to the current alchemical lambda\n value of the system\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am timestep Default = 0.005. Time step used of the\n equilibration to the desired lambda\n Par:am annealingSteps Default = 1000. Number of steps used for the\n annealing\n Return: Sire system with updated coordinates and\n velocities.\n" ); } @@ -142,6 +146,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble of this integrator" ); } @@ -153,6 +158,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getAlchemicalValue" , getAlchemicalValue_function_value + , bp::release_gil_policy() , "" ); } @@ -164,6 +170,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getAndersen" , getAndersen_function_value + , bp::release_gil_policy() , "" ); } @@ -175,6 +182,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getAndersenFrequency" , getAndersenFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -186,6 +194,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getBackwardMetropolis" , getBackwardMetropolis_function_value + , bp::release_gil_policy() , "" ); } @@ -197,6 +206,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getBufferFrequency" , getBufferFrequency_function_value + , bp::release_gil_policy() , "Get the frequency of buffering coordinates" ); } @@ -208,6 +218,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getCMMremovalFrequency" , getCMMremovalFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -219,6 +230,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getCombiningRules" , getCombiningRules_function_value + , bp::release_gil_policy() , "" ); } @@ -230,6 +242,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getConstraintType" , getConstraintType_function_value + , bp::release_gil_policy() , "" ); } @@ -241,6 +254,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getCoulombPower" , getCoulombPower_function_value + , bp::release_gil_policy() , "" ); } @@ -252,6 +266,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getCutoffDistance" , getCutoffDistance_function_value + , bp::release_gil_policy() , "" ); } @@ -263,6 +278,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getCutoffType" , getCutoffType_function_value + , bp::release_gil_policy() , "" ); } @@ -274,6 +290,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getDeltaAlchemical" , getDeltaAlchemical_function_value + , bp::release_gil_policy() , "" ); } @@ -285,6 +302,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getDeviceIndex" , getDeviceIndex_function_value + , bp::release_gil_policy() , "" ); } @@ -296,6 +314,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getEnergies" , getEnergies_function_value + , bp::release_gil_policy() , "" ); } @@ -307,6 +326,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getEnergyFrequency" , getEnergyFrequency_function_value + , bp::release_gil_policy() , "Get the frequency of buffering coordinates" ); } @@ -318,6 +338,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getFieldDielectric" , getFieldDielectric_function_value + , bp::release_gil_policy() , "" ); } @@ -329,6 +350,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getForwardMetropolis" , getForwardMetropolis_function_value + , bp::release_gil_policy() , "" ); } @@ -340,6 +362,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getFriction" , getFriction_function_value + , bp::release_gil_policy() , "" ); } @@ -351,6 +374,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getGradients" , getGradients_function_value + , bp::release_gil_policy() , "" ); } @@ -362,6 +386,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getIntegrationTolerance" , getIntegrationTolerance_function_value + , bp::release_gil_policy() , "" ); } @@ -373,6 +398,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getIntegrator" , getIntegrator_function_value + , bp::release_gil_policy() , "" ); } @@ -384,6 +410,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getMCBarostat" , getMCBarostat_function_value + , bp::release_gil_policy() , "" ); } @@ -395,6 +422,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getMCBarostatFrequency" , getMCBarostatFrequency_function_value + , bp::release_gil_policy() , "" ); } @@ -406,6 +434,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getPlatform" , getPlatform_function_value + , bp::release_gil_policy() , "" ); } @@ -418,6 +447,7 @@ void register_OpenMMPMEFEP_class(){ "getPotentialEnergy" , getPotentialEnergy_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "" ); } @@ -429,6 +459,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getPrecision" , getPrecision_function_value + , bp::release_gil_policy() , "" ); } @@ -440,6 +471,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getPressure" , getPressure_function_value + , bp::release_gil_policy() , "" ); } @@ -451,6 +483,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getRandomSeed" , getRandomSeed_function_value + , bp::release_gil_policy() , "" ); } @@ -462,6 +495,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getReducedPerturbedEnergies" , getReducedPerturbedEnergies_function_value + , bp::release_gil_policy() , "" ); } @@ -473,6 +507,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getRestraint" , getRestraint_function_value + , bp::release_gil_policy() , "" ); } @@ -484,6 +519,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getShiftDelta" , getShiftDelta_function_value + , bp::release_gil_policy() , "" ); } @@ -495,6 +531,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getTemperature" , getTemperature_function_value + , bp::release_gil_policy() , "" ); } @@ -506,6 +543,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "getTimetoSkip" , getTimetoSkip_function_value + , bp::release_gil_policy() , "" ); } @@ -518,7 +556,7 @@ void register_OpenMMPMEFEP_class(){ "initialise" , initialise_function_value , ( bp::arg("fullPME")=(bool)(false) ) - , "\n initialises the openMM Free energy single topology calculation\n Initialise must be called before anything else happens.\n" ); + , "\n Initialise the OpenMM Free energy single topology calculation.\n Parameter fullPME is only useful for debugging of e.g. single ion systems.\n initialise() must be called before anything else happens.\n" ); } { //::SireMove::OpenMMPMEFEP::integrate @@ -530,6 +568,7 @@ void register_OpenMMPMEFEP_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "\n Main integration methods for advancing dynamics\n Par:am workspace Sire Integrator workspace\n Par:am nrg_component\n Par:am timestep Default = 0.002. Integration timestep\n Par:am nmoves Number of moves\n Par:am record_stats boolean that tracks recording.\n" ); } @@ -541,6 +580,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "Return whether or not this integrator is time-reversible" ); } @@ -553,6 +593,7 @@ void register_OpenMMPMEFEP_class(){ "minimiseEnergy" , minimiseEnergy_function_value , ( bp::arg("system"), bp::arg("tolerance"), bp::arg("max_iteration") ) + , bp::release_gil_policy() , "\n \n minimizeEnergy will find the nearest local potential energy minimum,\n given the current Sire::System. It calls the\n LocalEnergyMinimizer :: minimize() function of OpenMM.\n Par:am system Sire System including molegroup, forcefield\n positions etc\n Par:am tolerance Default = 1. This specifies how precisely the\n energy minimum must be located. Minimisation will be halted once the\n root-mean-square value of all force components reaches this tolerance.\n Par:am max_iteration Default = 1000. this specifies the number of\n iterations are run for the minimisation. If max_iteration = 0, the\n iteration will run until convergence.\n\n Return: Sire System, with the updated energy\n minimised coordinates.\n" ); } @@ -580,6 +621,7 @@ void register_OpenMMPMEFEP_class(){ "setAlchemicalArray" , setAlchemicalArray_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -592,6 +634,7 @@ void register_OpenMMPMEFEP_class(){ "setAlchemicalValue" , setAlchemicalValue_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the alchemical value used to calculate the free energy change via TI method" ); } @@ -604,6 +647,7 @@ void register_OpenMMPMEFEP_class(){ "setAndersen" , setAndersen_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Andersen thermostat" ); } @@ -616,6 +660,7 @@ void register_OpenMMPMEFEP_class(){ "setAndersenFrequency" , setAndersenFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Andersen Thermostat frequency collision" ); } @@ -628,6 +673,7 @@ void register_OpenMMPMEFEP_class(){ "setBufferFrequency" , setBufferFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -640,6 +686,7 @@ void register_OpenMMPMEFEP_class(){ "setCMMremovalFrequency" , setCMMremovalFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -652,6 +699,7 @@ void register_OpenMMPMEFEP_class(){ "setCombiningRules" , setCombiningRules_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the combining rules type: arithmetic, geometric" ); } @@ -664,6 +712,7 @@ void register_OpenMMPMEFEP_class(){ "setConstraintType" , setConstraintType_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Constraint type: none, hbonds, allbonds, hangles" ); } @@ -676,6 +725,7 @@ void register_OpenMMPMEFEP_class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the coulomb power used in the soft core potential" ); } @@ -688,6 +738,7 @@ void register_OpenMMPMEFEP_class(){ "setCutoffDistance" , setCutoffDistance_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the cutoff distance in A" ); } @@ -700,6 +751,7 @@ void register_OpenMMPMEFEP_class(){ "setDebug" , setDebug_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "" ); } @@ -712,6 +764,7 @@ void register_OpenMMPMEFEP_class(){ "setDeltatAlchemical" , setDeltatAlchemical_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "\n Set the delta alchemical used in the FEP method\n Par:am deltaalchemical\n" ); } @@ -724,6 +777,7 @@ void register_OpenMMPMEFEP_class(){ "setDeviceIndex" , setDeviceIndex_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -736,6 +790,7 @@ void register_OpenMMPMEFEP_class(){ "setEnergyFrequency" , setEnergyFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Center of Mass motion removal frequency" ); } @@ -748,6 +803,7 @@ void register_OpenMMPMEFEP_class(){ "setFieldDielectric" , setFieldDielectric_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the dielectric constant" ); } @@ -760,6 +816,7 @@ void register_OpenMMPMEFEP_class(){ "setFriction" , setFriction_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the friction used in specific Integrator type" ); } @@ -772,6 +829,7 @@ void register_OpenMMPMEFEP_class(){ "setIntegrationTolerance" , setIntegrationTolerance_function_value , ( bp::arg("tollerance") ) + , bp::release_gil_policy() , "Set the integration tolerance" ); } @@ -784,6 +842,7 @@ void register_OpenMMPMEFEP_class(){ "setIntegrator" , setIntegrator_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Integrator type" ); } @@ -796,6 +855,7 @@ void register_OpenMMPMEFEP_class(){ "setMCBarostat" , setMCBarostat_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set Monte Carlo Barostat onoff" ); } @@ -808,6 +868,7 @@ void register_OpenMMPMEFEP_class(){ "setMCBarostatFrequency" , setMCBarostatFrequency_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Monte Carlo Barostat frequency in time speps" ); } @@ -820,6 +881,7 @@ void register_OpenMMPMEFEP_class(){ "setPlatform" , setPlatform_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Platform: CUDA, OpenCL, CPU" ); } @@ -832,6 +894,7 @@ void register_OpenMMPMEFEP_class(){ "setPrecision" , setPrecision_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the OpenMM Precision" ); } @@ -844,6 +907,7 @@ void register_OpenMMPMEFEP_class(){ "setPressure" , setPressure_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Pressure" ); } @@ -856,6 +920,7 @@ void register_OpenMMPMEFEP_class(){ "setRandomSeed" , setRandomSeed_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Integrator random seed" ); } @@ -868,6 +933,7 @@ void register_OpenMMPMEFEP_class(){ "setReinitialiseContext" , setReinitialiseContext_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the flag to reinitialise the context" ); } @@ -880,6 +946,7 @@ void register_OpenMMPMEFEP_class(){ "setRestraint" , setRestraint_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Retraint mode" ); } @@ -892,6 +959,7 @@ void register_OpenMMPMEFEP_class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "\n \n Par:am shiftdelta\n" ); } @@ -904,6 +972,7 @@ void register_OpenMMPMEFEP_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Set the Temperature" ); } @@ -916,6 +985,7 @@ void register_OpenMMPMEFEP_class(){ "setTimetoSkip" , setTimetoSkip_function_value , ( bp::arg("arg0") ) + , bp::release_gil_policy() , "Get total time to skip" ); } @@ -927,6 +997,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this integrator" ); } @@ -938,6 +1009,7 @@ void register_OpenMMPMEFEP_class(){ OpenMMPMEFEP_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/PrefSampler.pypp.cpp b/wrapper/Move/PrefSampler.pypp.cpp index 7e01d63b2..421f5b3a9 100644 --- a/wrapper/Move/PrefSampler.pypp.cpp +++ b/wrapper/Move/PrefSampler.pypp.cpp @@ -40,6 +40,8 @@ SireMove::PrefSampler __copy__(const SireMove::PrefSampler &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PrefSampler_class(){ { //::SireMove::PrefSampler @@ -74,6 +76,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "biasingFunction" , biasingFunction_function_value + , bp::release_gil_policy() , "Return the preferential sampling biasing expression" ); } @@ -97,7 +100,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "focalMolecule" , focalMolecule_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the current focal molecule (this will be an empty molecule\nif a focal point is being used)" ); } @@ -121,6 +124,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "isBiased" , isBiased_function_value + , bp::release_gil_policy() , "The preferential sampler is definitely biased" ); } @@ -132,6 +136,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "k" , k_function_value + , bp::release_gil_policy() , "Return the symbol used to represent the preferential sampling constant (k)" ); } @@ -159,6 +164,7 @@ void register_PrefSampler_class(){ "probabilityOf" , probabilityOf_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Return the probability with which the molecule molecule was\nsampled from this sampler\nThrow: SireMol::missing_molecule\nThrow: SireError::invalid_index\n" ); } @@ -171,6 +177,7 @@ void register_PrefSampler_class(){ "probabilityOfMolecule" , probabilityOfMolecule_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Return the probability that the molecule mol would have been picked\nby this sampler" ); } @@ -182,6 +189,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "r" , r_function_value + , bp::release_gil_policy() , "Return the symbol used to represent the distance between molecules (r)" ); } @@ -193,6 +201,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "sample" , sample_function_value + , bp::release_gil_policy() , "Sample a molecule from the group, and return it, together\nwith the probability with which it was chosen" ); } @@ -204,6 +213,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "sampleMolecule" , sampleMolecule_function_value + , bp::release_gil_policy() , "Sample a whole molecule from the group, and return it and the\nprobability with which it was chosen. This returns the whole\nmolecule, even if only part of the molecule was in the group" ); } @@ -215,6 +225,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "samplingConstant" , samplingConstant_function_value + , bp::release_gil_policy() , "Return the preferential sampling constant (k)" ); } @@ -227,6 +238,7 @@ void register_PrefSampler_class(){ "setBiasingFunction" , setBiasingFunction_function_value , ( bp::arg("f") ) + , bp::release_gil_policy() , "Set the preferential sampling biasing expression - this\nshould use the symbols k and r, which are the biasing\nconstant and distance between molecules respectively.\nThe default biasing expression is 1.0 (r^2 + k)\n" ); } @@ -239,6 +251,7 @@ void register_PrefSampler_class(){ "setCoordinatesProperty" , setCoordinatesProperty_function_value , ( bp::arg("coords_property") ) + , bp::release_gil_policy() , "Set the property name used to find the coordinates property of\nthe molecules" ); } @@ -251,6 +264,7 @@ void register_PrefSampler_class(){ "setFocalMolecule" , setFocalMolecule_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Set the focal molecule of this sampler" ); } @@ -263,6 +277,7 @@ void register_PrefSampler_class(){ "setFocalPoint" , setFocalPoint_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Set the focal point of this sampler" ); } @@ -275,6 +290,7 @@ void register_PrefSampler_class(){ "setGroup" , setGroup_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the molecule group from which molecule view will be sampled" ); } @@ -287,6 +303,7 @@ void register_PrefSampler_class(){ "setSamplingConstant" , setSamplingConstant_function_value , ( bp::arg("k") ) + , bp::release_gil_policy() , "Set the preferential sampling constant - this is the value\nof k in the biasing algorithm" ); } @@ -299,6 +316,7 @@ void register_PrefSampler_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("space_property") ) + , bp::release_gil_policy() , "Set the property used to find the space property of the system" ); } @@ -322,6 +340,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -334,6 +353,7 @@ void register_PrefSampler_class(){ "updateFrom" , updateFrom_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Update this sampler so that the molecules match the versions\nin the system system" ); } @@ -345,6 +365,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "usingFocalMolecule" , usingFocalMolecule_function_value + , bp::release_gil_policy() , "Return whether we are using a focal molecule (rather\nthan a focal point)" ); } @@ -356,6 +377,7 @@ void register_PrefSampler_class(){ PrefSampler_exposer.def( "usingFocalPoint" , usingFocalPoint_function_value + , bp::release_gil_policy() , "Return whether we are using a focal point (rather\nthan a focal molecule)" ); } diff --git a/wrapper/Move/RBWorkspaceJM.pypp.cpp b/wrapper/Move/RBWorkspaceJM.pypp.cpp index a781396da..a387d0ab0 100644 --- a/wrapper/Move/RBWorkspaceJM.pypp.cpp +++ b/wrapper/Move/RBWorkspaceJM.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "SireMol/atommasses.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -39,6 +41,8 @@ SireMove::RBWorkspaceJM __copy__(const SireMove::RBWorkspaceJM &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RBWorkspaceJM_class(){ { //::SireMove::RBWorkspaceJM @@ -55,6 +59,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadAtomIntCoords" , beadAtomIntCoords_function_value + , bp::release_gil_policy() , "Return the array of bead orientations" ); } @@ -66,6 +71,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadCoordinatesArray" , beadCoordinatesArray_function_value + , bp::release_gil_policy() , "Return the array of bead coordinates" ); } @@ -77,6 +83,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadEnergiesArray" , beadEnergiesArray_function_value + , bp::release_gil_policy() , "Return the array of bead energies" ); } @@ -88,6 +95,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadForcesArray" , beadForcesArray_function_value + , bp::release_gil_policy() , "const Vector beadForcesArray() const;" ); } @@ -99,6 +107,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadOrientationArray" , beadOrientationArray_function_value + , bp::release_gil_policy() , "Return the array of orientations of the beads (this is the rotation\nto be applied to the matrix that maps from the cartesian frame\nto the internal principle inertia frame)" ); } @@ -110,6 +119,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadToWorldMatrix" , beadToWorldMatrix_function_value + , bp::release_gil_policy() , "Return the Matrix beadtoworld" ); } @@ -121,6 +131,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadTorquesArray" , beadTorquesArray_function_value + , bp::release_gil_policy() , "const Vector beadTorquesArray() const;" ); } @@ -132,6 +143,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "beadingProperty" , beadingProperty_function_value + , bp::release_gil_policy() , "Return the property used to bead up a molecule" ); } @@ -144,6 +156,7 @@ void register_RBWorkspaceJM_class(){ "calculateForces" , calculateForces_function_value , ( bp::arg("nrg_component") ) + , bp::release_gil_policy() , "Calculate the forces and torques and energies" ); } @@ -155,6 +168,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "calculateRBForces" , calculateRBForces_function_value + , bp::release_gil_policy() , "Calculate the RB forces and torques using the available atomic forces" ); } @@ -166,6 +180,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "commitCoordinates" , commitCoordinates_function_value + , bp::release_gil_policy() , "Commit the coordinates back to the system. This maps the bead coordinates\nand orientations back to atomic coordinates and position and\nupdates the system with these" ); } @@ -177,6 +192,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "commitCoordinatesAndVelocities" , commitCoordinatesAndVelocities_function_value + , bp::release_gil_policy() , "Commit both the coordinates and velocities - this performs the\nequivalent of commitCoordinates() and commitVelocities() in\na single call" ); } @@ -188,6 +204,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "commitVelocities" , commitVelocities_function_value + , bp::release_gil_policy() , "Commit the linear and angular velocities back to the system. This saves\nthe velocities as bead properties" ); } @@ -199,6 +216,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "kineticEnergy" , kineticEnergy_function_value + , bp::release_gil_policy() , "Return the kinetic energy of all of the molecules being integrated" ); } @@ -211,6 +229,7 @@ void register_RBWorkspaceJM_class(){ "kineticEnergy" , kineticEnergy_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the kinetic energy of the molecule with number molnum\nThrow: SireMol::missing_molecule\n" ); } @@ -223,6 +242,7 @@ void register_RBWorkspaceJM_class(){ "kineticEnergy" , kineticEnergy_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return the kinetic energy of the atoms in the view molview\nThrow: SireMol::missing_molecule\n" ); } @@ -235,6 +255,7 @@ void register_RBWorkspaceJM_class(){ "nAtoms" , nAtoms_function_value , ( bp::arg("ibead") ) + , bp::release_gil_policy() , "Return the number of atoms in the ith bead" ); } @@ -246,6 +267,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "nBeads" , nBeads_function_value + , bp::release_gil_policy() , "Return the number of rigid body beads to be integrated" ); } @@ -273,6 +295,7 @@ void register_RBWorkspaceJM_class(){ "regenerateVelocities" , regenerateVelocities_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Regenerate all of the linear and angular velocities using the passed generator" ); } @@ -285,6 +308,7 @@ void register_RBWorkspaceJM_class(){ "setForceTable" , setForceTable_function_value , ( bp::arg("forces") ) + , bp::release_gil_policy() , "" ); } @@ -297,6 +321,7 @@ void register_RBWorkspaceJM_class(){ "setSystem" , setSystem_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Set the system to be integrated" ); } @@ -308,6 +333,7 @@ void register_RBWorkspaceJM_class(){ RBWorkspaceJM_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/RepExMove.pypp.cpp b/wrapper/Move/RepExMove.pypp.cpp index 9c914ad5f..7694250cb 100644 --- a/wrapper/Move/RepExMove.pypp.cpp +++ b/wrapper/Move/RepExMove.pypp.cpp @@ -43,6 +43,8 @@ SireMove::RepExMove __copy__(const SireMove::RepExMove &other){ return SireMove: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RepExMove_class(){ { //::SireMove::RepExMove @@ -58,6 +60,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "acceptanceRatio" , acceptanceRatio_function_value + , bp::release_gil_policy() , "Return the average acceptance ratio of the replica exchange\ntests over all replicas" ); } @@ -69,6 +72,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear the move statistics" ); } @@ -93,6 +97,7 @@ void register_RepExMove_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Perform nmoves replica exchange moves (block of sampling for all\nreplicas, then replica exchange test between all pairs),\nof the system system (which must be a Replicas object), optionally\nrecording statistics if record_stats is true\nThrow: SireError::invalid_cast\n" ); } @@ -104,6 +109,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "nAccepted" , nAccepted_function_value + , bp::release_gil_policy() , "Return the total number of accepted replica exchange tests" ); } @@ -115,6 +121,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "nAttempted" , nAttempted_function_value + , bp::release_gil_policy() , "Return the total number of accepted replica exchange tests" ); } @@ -126,6 +133,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "nRejected" , nRejected_function_value + , bp::release_gil_policy() , "Return the total number of rejected replica exchange tests" ); } @@ -153,6 +161,7 @@ void register_RepExMove_class(){ "setDisableSwaps" , setDisableSwaps_function_value , ( bp::arg("disable") ) + , bp::release_gil_policy() , "Set disabling of swap moves" ); } @@ -165,6 +174,7 @@ void register_RepExMove_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used for the replica exchange tests" ); } @@ -177,6 +187,7 @@ void register_RepExMove_class(){ "setSwapMonitors" , setSwapMonitors_function_value , ( bp::arg("swap_monitors") ) + , bp::release_gil_policy() , "Set whether or not to swap the system monitors when we swap the systems" ); } @@ -188,6 +199,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "swapMovesDisabled" , swapMovesDisabled_function_value + , bp::release_gil_policy() , "Return whether or not swap moves are disabled" ); } @@ -199,6 +211,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -210,6 +223,7 @@ void register_RepExMove_class(){ RepExMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/RepExMove2.pypp.cpp b/wrapper/Move/RepExMove2.pypp.cpp index 759a42cb5..8d9943662 100644 --- a/wrapper/Move/RepExMove2.pypp.cpp +++ b/wrapper/Move/RepExMove2.pypp.cpp @@ -39,6 +39,8 @@ SireMove::RepExMove2 __copy__(const SireMove::RepExMove2 &other){ return SireMov #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RepExMove2_class(){ { //::SireMove::RepExMove2 @@ -54,6 +56,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "acceptanceRatio" , acceptanceRatio_function_value + , bp::release_gil_policy() , "Return the average acceptance ratio of the replica exchange\ntests over all replicas" ); } @@ -65,6 +68,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear the move statistics" ); } @@ -89,6 +93,7 @@ void register_RepExMove2_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Perform nmoves replica exchange moves (block of sampling for all\nreplicas, then replica exchange test between all pairs),\nof the system system (which must be a Replicas object), optionally\nrecording statistics if record_stats is true\nThrow: SireError::invalid_cast\n" ); } @@ -100,6 +105,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "nAccepted" , nAccepted_function_value + , bp::release_gil_policy() , "Return the total number of accepted replica exchange tests" ); } @@ -111,6 +117,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "nAttempted" , nAttempted_function_value + , bp::release_gil_policy() , "Return the total number of accepted replica exchange tests" ); } @@ -122,6 +129,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "nRejected" , nRejected_function_value + , bp::release_gil_policy() , "Return the total number of rejected replica exchange tests" ); } @@ -149,6 +157,7 @@ void register_RepExMove2_class(){ "setDisableSwaps" , setDisableSwaps_function_value , ( bp::arg("disable") ) + , bp::release_gil_policy() , "Set disabling of swap moves" ); } @@ -161,6 +170,7 @@ void register_RepExMove2_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used for the replica exchange tests" ); } @@ -173,6 +183,7 @@ void register_RepExMove2_class(){ "setSwapMonitors" , setSwapMonitors_function_value , ( bp::arg("swap_monitors") ) + , bp::release_gil_policy() , "Set whether or not to swap the system monitors when we swap the systems" ); } @@ -184,6 +195,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "swapMovesDisabled" , swapMovesDisabled_function_value + , bp::release_gil_policy() , "Return whether or not swap moves are disabled" ); } @@ -195,6 +207,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -206,6 +219,7 @@ void register_RepExMove2_class(){ RepExMove2_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/RepExSubMove.pypp.cpp b/wrapper/Move/RepExSubMove.pypp.cpp index 371c58bc2..abc73858c 100644 --- a/wrapper/Move/RepExSubMove.pypp.cpp +++ b/wrapper/Move/RepExSubMove.pypp.cpp @@ -43,6 +43,8 @@ SireMove::RepExSubMove __copy__(const SireMove::RepExSubMove &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RepExSubMove_class(){ { //::SireMove::RepExSubMove @@ -59,6 +61,7 @@ void register_RepExSubMove_class(){ RepExSubMove_exposer.def( "energy_i" , energy_i_function_value + , bp::release_gil_policy() , "Return the energy of the replica in its normal state at the\nend of the block of moves" ); } @@ -70,6 +73,7 @@ void register_RepExSubMove_class(){ RepExSubMove_exposer.def( "energy_j" , energy_j_function_value + , bp::release_gil_policy() , "Return the energy of the replica in its partner state\nat the end of the block of moves" ); } @@ -82,6 +86,7 @@ void register_RepExSubMove_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("n_supra_moves"), bp::arg("n_supra_moves_per_block"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Perform the sub-moves on the passed sub-system" ); } @@ -108,6 +113,7 @@ void register_RepExSubMove_class(){ RepExSubMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -119,6 +125,7 @@ void register_RepExSubMove_class(){ RepExSubMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -130,6 +137,7 @@ void register_RepExSubMove_class(){ RepExSubMove_exposer.def( "volume_i" , volume_i_function_value + , bp::release_gil_policy() , "Return the volume of the replica in its normal state at\nthe end of the block of moves" ); } @@ -141,6 +149,7 @@ void register_RepExSubMove_class(){ RepExSubMove_exposer.def( "volume_j" , volume_j_function_value + , bp::release_gil_policy() , "Return the volume of the replica in its partner state\nat the end of the block of moves" ); } diff --git a/wrapper/Move/Replica.pypp.cpp b/wrapper/Move/Replica.pypp.cpp index 7e76963e7..f060346aa 100644 --- a/wrapper/Move/Replica.pypp.cpp +++ b/wrapper/Move/Replica.pypp.cpp @@ -36,6 +36,8 @@ SireMove::Replica __copy__(const SireMove::Replica &other){ return SireMove::Rep #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Replica_class(){ { //::SireMove::Replica @@ -52,6 +54,7 @@ void register_Replica_class(){ Replica_exposer.def( "chemicalPotential" , chemicalPotential_function_value + , bp::release_gil_policy() , "Return the chemical potential of the replica (if the moves\nsample a constant chemical potential ensemble)\nThrow: SireError::incompatible_error\n" ); } @@ -63,6 +66,7 @@ void register_Replica_class(){ Replica_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "Return the total energy of this replica" ); } @@ -74,7 +78,7 @@ void register_Replica_class(){ Replica_exposer.def( "energyComponent" , energyComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy component that describes the Hamiltonian\nthat is sampled by this replica" ); } @@ -86,7 +90,7 @@ void register_Replica_class(){ Replica_exposer.def( "ensemble" , ensemble_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ensemble defined by the moves of this replica" ); } @@ -98,6 +102,7 @@ void register_Replica_class(){ Replica_exposer.def( "fugacity" , fugacity_function_value + , bp::release_gil_policy() , "Return the fugacity of the replica (if the moves sample\na constant chemical potential ensemble)\nThrow: SireError::incompatible_error\n" ); } @@ -109,6 +114,7 @@ void register_Replica_class(){ Replica_exposer.def( "isConstantChemicalPotential" , isConstantChemicalPotential_function_value + , bp::release_gil_policy() , "Return whether the moves keep the same chemical potential" ); } @@ -120,6 +126,7 @@ void register_Replica_class(){ Replica_exposer.def( "isConstantEnergy" , isConstantEnergy_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant energy replica\n(all moves sample the same total energy)" ); } @@ -131,6 +138,7 @@ void register_Replica_class(){ Replica_exposer.def( "isConstantFugacity" , isConstantFugacity_function_value + , bp::release_gil_policy() , "Return whether the moves keep the same fugacity" ); } @@ -143,6 +151,7 @@ void register_Replica_class(){ "isConstantLambda" , isConstantLambda_function_value , ( bp::arg("lam") ) + , bp::release_gil_policy() , "Return whether or not this is a constant lambda replica\n(there is a lambda component, lam, and all moves sample the\nsame value of this lambda coordinate)" ); } @@ -154,6 +163,7 @@ void register_Replica_class(){ Replica_exposer.def( "isConstantNParticles" , isConstantNParticles_function_value + , bp::release_gil_policy() , "Return whether or not the number of particles is constant\n(all moves keep the same number of particles)" ); } @@ -165,6 +175,7 @@ void register_Replica_class(){ Replica_exposer.def( "isConstantPressure" , isConstantPressure_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant pressure replica\n(all moves sample the same pressure)" ); } @@ -176,6 +187,7 @@ void register_Replica_class(){ Replica_exposer.def( "isConstantTemperature" , isConstantTemperature_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant temperature replica\n(all moves sample the same temperature)" ); } @@ -187,6 +199,7 @@ void register_Replica_class(){ Replica_exposer.def( "isConstantVolume" , isConstantVolume_function_value + , bp::release_gil_policy() , "Return whether or not this is a constant volume replica\n(all moves sample the same volume)" ); } @@ -198,7 +211,7 @@ void register_Replica_class(){ Replica_exposer.def( "lambdaComponent" , lambdaComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component that can be used to change the Hamiltonian\nfor Hamiltonian replica exchange - this is a null symbol if\nthis replica is not used in Hamiltonian replica exchange" ); } @@ -210,6 +223,7 @@ void register_Replica_class(){ Replica_exposer.def( "lambdaValue" , lambdaValue_function_value + , bp::release_gil_policy() , "Return the value of the lambda component - this returns 0 if\nthis replica is not suited for Hamiltonian replica exchange" ); } @@ -236,6 +250,7 @@ void register_Replica_class(){ Replica_exposer.def( "pressure" , pressure_function_value + , bp::release_gil_policy() , "Return the pressure of the replica (if the moves sample\na constant pressure ensemble)\nThrow: SireError::incompatible_error\n" ); } @@ -259,6 +274,7 @@ void register_Replica_class(){ Replica_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature of the replica (if the moves sample\na constant temperature ensemble)\nThrow: SireError::incompatible_error\n" ); } @@ -270,6 +286,7 @@ void register_Replica_class(){ Replica_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -281,6 +298,7 @@ void register_Replica_class(){ Replica_exposer.def( "volume" , volume_function_value + , bp::release_gil_policy() , "Return the current volume of the replicas simulation space\n(this could be infinite)" ); } diff --git a/wrapper/Move/Replicas.pypp.cpp b/wrapper/Move/Replicas.pypp.cpp index ffe2e8ca9..c4c6ac1c3 100644 --- a/wrapper/Move/Replicas.pypp.cpp +++ b/wrapper/Move/Replicas.pypp.cpp @@ -29,6 +29,8 @@ SireMove::Replicas __copy__(const SireMove::Replicas &other){ return SireMove::R #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Replicas_class(){ @@ -64,6 +66,7 @@ void register_Replicas_class(){ Replicas_exposer.def( "collectSupraStats" , collectSupraStats_function_value + , bp::release_gil_policy() , "Collect statistics - this records the current lambdaTrajectory and adds it to the history" ); } @@ -75,6 +78,7 @@ void register_Replicas_class(){ Replicas_exposer.def( "lambdaTrajectory" , lambdaTrajectory_function_value + , bp::release_gil_policy() , "Return the lambda values for each of the replicas, in replica ID order.\nThis allows the lambda trajectory for each replica to be easily\ncollected during a simulation" ); } @@ -86,6 +90,7 @@ void register_Replicas_class(){ Replicas_exposer.def( "lambdaTrajectoryHistory" , lambdaTrajectoryHistory_function_value + , bp::release_gil_policy() , "Return the history of lambda values sampled by each replica" ); } @@ -97,6 +102,7 @@ void register_Replicas_class(){ Replicas_exposer.def( "nReplicas" , nReplicas_function_value + , bp::release_gil_policy() , "Return the number of replicas in this set" ); } @@ -148,6 +154,7 @@ void register_Replicas_class(){ Replicas_exposer.def( "resetReplicaIDs" , resetReplicaIDs_function_value + , bp::release_gil_policy() , "Reset the replica IDs - this sets the ID of the ith replica to i" ); } @@ -160,6 +167,7 @@ void register_Replicas_class(){ "setChemicalPotential" , setChemicalPotential_function_value , ( bp::arg("chemical_potential") ) + , bp::release_gil_policy() , "Set the chemical potential of the ensemble sampled by all\nreplicas to chemical_potential\nThrow: SireError::incompatible_error\n" ); } @@ -172,6 +180,7 @@ void register_Replicas_class(){ "setChemicalPotential" , setChemicalPotential_function_value , ( bp::arg("i"), bp::arg("chemical_potential") ) + , bp::release_gil_policy() , "Set the chemical potential of the ensemble sampled by the ith\nreplica to chemical_potential\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -184,6 +193,7 @@ void register_Replicas_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Set the energy component sampled by all replicas to symbol" ); } @@ -196,6 +206,7 @@ void register_Replicas_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("i"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Set the energy component sampled by the ith replica to symbol\nThrow: SireError::invalid_index\n" ); } @@ -208,6 +219,7 @@ void register_Replicas_class(){ "setFugacity" , setFugacity_function_value , ( bp::arg("fugacity") ) + , bp::release_gil_policy() , "Set the fugacity of the ensemble sampled by all replicas\nto fugacity\nThrow: SireError::incompatible_error\n" ); } @@ -220,6 +232,7 @@ void register_Replicas_class(){ "setFugacity" , setFugacity_function_value , ( bp::arg("i"), bp::arg("fugacity") ) + , bp::release_gil_policy() , "Set the fugacity of the ensemble sampled by the ith replica\nto fugacity\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -232,6 +245,7 @@ void register_Replicas_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used by all of the replicas\nto rangenerator - this doesnt give all of the replicas\nthe same generator - rather it uses this generator to\nreproducibly generate new generators for each replica" ); } @@ -244,6 +258,7 @@ void register_Replicas_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("i"), bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used by the ith replica to generator\nThrow: SireError::invalid_index\n" ); } @@ -256,6 +271,7 @@ void register_Replicas_class(){ "setLambdaComponent" , setLambdaComponent_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Set the lambda component used for Hamiltonian replica exchange\nfor all replicas to symbol" ); } @@ -268,6 +284,7 @@ void register_Replicas_class(){ "setLambdaComponent" , setLambdaComponent_function_value , ( bp::arg("i"), bp::arg("symbol") ) + , bp::release_gil_policy() , "Set the lambda component used by the ith replica for Hamiltonian\nreplica exchange to symbol\nThrow: SireError::invalid_index\n" ); } @@ -280,6 +297,7 @@ void register_Replicas_class(){ "setLambdaValue" , setLambdaValue_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "Set the lambda value for Hamiltonian replica exchange for all\nreplicas to value" ); } @@ -292,6 +310,7 @@ void register_Replicas_class(){ "setLambdaValue" , setLambdaValue_function_value , ( bp::arg("i"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value of lambda used for Hamiltonian replica exchange for\nthe ith replica to value\nThrow: SireError::invalid_index\n" ); } @@ -304,6 +323,7 @@ void register_Replicas_class(){ "setPressure" , setPressure_function_value , ( bp::arg("pressure") ) + , bp::release_gil_policy() , "Set the pressure of the ensemble sampled by all replicas\nto pressure" ); } @@ -316,6 +336,7 @@ void register_Replicas_class(){ "setPressure" , setPressure_function_value , ( bp::arg("i"), bp::arg("pressure") ) + , bp::release_gil_policy() , "Set the pressure of the ensemble sampled by the ith replica\nto pressure\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -328,6 +349,7 @@ void register_Replicas_class(){ "setReplica" , setReplica_function_value , ( bp::arg("replica") ) + , bp::release_gil_policy() , "Set the replicas to all be a copy of replica" ); } @@ -340,6 +362,7 @@ void register_Replicas_class(){ "setReplica" , setReplica_function_value , ( bp::arg("i"), bp::arg("replica") ) + , bp::release_gil_policy() , "Set the ith replica equal to replica\nThrow: SireError::invalid_index\n" ); } @@ -352,6 +375,7 @@ void register_Replicas_class(){ "setReplicas" , setReplicas_function_value , ( bp::arg("replicas") ) + , bp::release_gil_policy() , "Set the replicas from a copy of passed replicas" ); } @@ -364,6 +388,7 @@ void register_Replicas_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("spaceproperty") ) + , bp::release_gil_policy() , "Set the property used to find the simulation space for all replicas\nto spaceproperty" ); } @@ -376,6 +401,7 @@ void register_Replicas_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("i"), bp::arg("spaceproperty") ) + , bp::release_gil_policy() , "Set the space property used by the ith replica to spaceproperty\nThrow: SireError::invalid_index\n" ); } @@ -388,6 +414,7 @@ void register_Replicas_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Overloaded function used to set all of the replicas equal to subsystem" ); } @@ -400,6 +427,7 @@ void register_Replicas_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("subsystem") ) + , bp::release_gil_policy() , "Overloaded function used to set all of the replicas equal to subsystem" ); } @@ -412,6 +440,7 @@ void register_Replicas_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("i"), bp::arg("system") ) + , bp::release_gil_policy() , "Overloaded function used to set the ith subsystem equal to system\nThrow: SireError::invalid_index\n" ); } @@ -424,6 +453,7 @@ void register_Replicas_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("i"), bp::arg("subsystem") ) + , bp::release_gil_policy() , "Overloaded function used to ensure that this system only contains\nReplica subsystems\nThrow: SireError::invalid_index\n" ); } @@ -436,6 +466,7 @@ void register_Replicas_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Set the temperature of the ensemble sampled by all replicas\nto temperature\nThrow: SireError::incompatible_error\n" ); } @@ -448,6 +479,7 @@ void register_Replicas_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("i"), bp::arg("temperature") ) + , bp::release_gil_policy() , "Set the temperature of the ensemble sampled by\nthe ith replica to temperature\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -460,6 +492,7 @@ void register_Replicas_class(){ "swapMolecules" , swapMolecules_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Swap the molecules between replicas i and j\nThrow: SireError::invalid_index\n" ); } @@ -483,6 +516,7 @@ void register_Replicas_class(){ Replicas_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/RigidBodyMC.pypp.cpp b/wrapper/Move/RigidBodyMC.pypp.cpp index 34914b83d..1d757bced 100644 --- a/wrapper/Move/RigidBodyMC.pypp.cpp +++ b/wrapper/Move/RigidBodyMC.pypp.cpp @@ -64,6 +64,8 @@ SireMove::RigidBodyMC __copy__(const SireMove::RigidBodyMC &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_RigidBodyMC_class(){ { //::SireMove::RigidBodyMC @@ -81,7 +83,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "centerOfRotation" , centerOfRotation_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the function used to get the center of rotation of each molecule" ); } @@ -93,6 +95,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "disableReflectionSphere" , disableReflectionSphere_function_value + , bp::release_gil_policy() , "Completely switch off use of the reflection sphere or volume" ); } @@ -104,6 +107,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "disableReflectionVolume" , disableReflectionVolume_function_value + , bp::release_gil_policy() , "Completely switch off use of the reflection sphere or volume" ); } @@ -116,6 +120,7 @@ void register_RigidBodyMC_class(){ "extract" , extract_function_value , ( bp::arg("molecules") ) + , bp::release_gil_policy() , "Extract from mols all molecules that are within the reflection sphere volume\ndescribed by this move. This allows the molecules that will be affected by this\nmove to be separated out from the rest.\nNote that this returns all molecules if a reflection sphere or volume is not used\n" ); } @@ -128,6 +133,7 @@ void register_RigidBodyMC_class(){ "extract" , extract_function_value , ( bp::arg("molecules"), bp::arg("buffer") ) + , bp::release_gil_policy() , "Extract from mols all molecules that are within the reflection sphere volume\ndescribed by this move. This allows the molecules that will be affected by this\nmove to be separated out from the rest.\nIf buffer is greater than zero, then this will also extract molecules that are\nwithin buffer of the reflection volume, and will additionally translate those\nmolecules so that they are moved into the volume. The buffer can be used\nto pack more molecules into the volume than would be achieved just with a simple\nselection.\nNote that this returns all molecules if a reflection sphere or volume is not used\n" ); } @@ -139,6 +145,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "maximumRotation" , maximumRotation_function_value + , bp::release_gil_policy() , "Return the maximum rotation for each move" ); } @@ -150,6 +157,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "maximumTranslation" , maximumTranslation_function_value + , bp::release_gil_policy() , "Return the maximum translation for each move" ); } @@ -161,7 +169,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group from which random molecule views\nare drawn" ); } @@ -200,6 +208,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "reflectedVolume" , reflectedVolume_function_value + , bp::release_gil_policy() , "Return the volume of space occupied by the reflection volume" ); } @@ -211,6 +220,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "reflectionSphereCenter" , reflectionSphereCenter_function_value + , bp::release_gil_policy() , "Return the center of the reflection sphere. Returns a zero vector\nif a reflection sphere is not being used" ); } @@ -223,6 +233,7 @@ void register_RigidBodyMC_class(){ "reflectionSphereCenter" , reflectionSphereCenter_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the center of the reflection sphere for molecule molnum. Returns a zero vector\nif a reflection sphere is not being used" ); } @@ -235,6 +246,7 @@ void register_RigidBodyMC_class(){ "reflectionSphereCenter" , reflectionSphereCenter_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return the center of the reflection sphere for molecule mol. Returns a null vector\nif a reflection sphere is not being used" ); } @@ -246,6 +258,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "reflectionSphereRadius" , reflectionSphereRadius_function_value + , bp::release_gil_policy() , "Return the radius of the reflection sphere. This returns zero\nif the reflection sphere is not being used" ); } @@ -258,6 +271,7 @@ void register_RigidBodyMC_class(){ "reflectionSphereRadius" , reflectionSphereRadius_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the radius of the reflection sphere for molecule molnum. This returns zero\nif the reflection sphere is not being used" ); } @@ -270,6 +284,7 @@ void register_RigidBodyMC_class(){ "reflectionSphereRadius" , reflectionSphereRadius_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return the radius of the reflection sphere for molecule mol. This returns zero\nif the reflection sphere is not being used" ); } @@ -281,6 +296,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "reflectionVolume" , reflectionVolume_function_value + , bp::release_gil_policy() , "Return the set of spheres that are used to define the reflection volume.\nThis returns an empty list if the reflection volume sphere is not used" ); } @@ -292,6 +308,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "reflectionVolumePoints" , reflectionVolumePoints_function_value + , bp::release_gil_policy() , "Return the points used to define the reflection volume. This will\nbe a single point if a reflection sphere is used. If a reflection\nsphere or volume is not used then this returns an empty list" ); } @@ -303,6 +320,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "reflectionVolumeRadius" , reflectionVolumeRadius_function_value + , bp::release_gil_policy() , "Return the reflection volume radius (same as the reflection sphere radius)" ); } @@ -314,7 +332,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "sampler" , sampler_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sampler that is used to draw random molecules" ); } @@ -327,6 +345,7 @@ void register_RigidBodyMC_class(){ "setCenterOfRotation" , setCenterOfRotation_function_value , ( bp::arg("center_function") ) + , bp::release_gil_policy() , "Set the function used to get the center of rotation for each molecule" ); } @@ -339,6 +358,7 @@ void register_RigidBodyMC_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used by this move" ); } @@ -351,6 +371,7 @@ void register_RigidBodyMC_class(){ "setMaximumRotation" , setMaximumRotation_function_value , ( bp::arg("max_rotation") ) + , bp::release_gil_policy() , "Set the maximum delta for any rotation" ); } @@ -363,6 +384,7 @@ void register_RigidBodyMC_class(){ "setMaximumTranslation" , setMaximumTranslation_function_value , ( bp::arg("max_translation") ) + , bp::release_gil_policy() , "Set the maximum delta for any translation" ); } @@ -375,6 +397,7 @@ void register_RigidBodyMC_class(){ "setReflectionSphere" , setReflectionSphere_function_value , ( bp::arg("sphere_center"), bp::arg("sphere_radius") ) + , bp::release_gil_policy() , "Turn on rigid body move reflections. This makes sure that only\nmolecules within the specified sphere can be moved, and any moves\nare reflected so that these molecules will always remain within\nthe sphere" ); } @@ -387,6 +410,7 @@ void register_RigidBodyMC_class(){ "setReflectionSphere" , setReflectionSphere_function_value , ( bp::arg("molnum"), bp::arg("sphere_center"), bp::arg("sphere_radius") ) + , bp::release_gil_policy() , "Turn on rigid body move reflections for molecule molnum. This makes sure\nthis molecule is moved only within the sphere centered at sphere_center\nwith radius sphere_radius. Any moves are reflected so that\nthis molecule will always remain within the sphere" ); } @@ -399,6 +423,7 @@ void register_RigidBodyMC_class(){ "setReflectionSphere" , setReflectionSphere_function_value , ( bp::arg("molview"), bp::arg("sphere_center"), bp::arg("sphere_radius") ) + , bp::release_gil_policy() , "Turn on rigid body move reflections for molecule mol. This makes sure\nthis molecule is moved only within the sphere centered at sphere_center\nwith radius sphere_radius. Any moves are reflected so that\nthis molecule will always remain within the sphere" ); } @@ -411,6 +436,7 @@ void register_RigidBodyMC_class(){ "setReflectionVolume" , setReflectionVolume_function_value , ( bp::arg("points"), bp::arg("radius") ) + , bp::release_gil_policy() , "Turn on and specify a reflection volume. This is like a reflection sphere,\nexcept now the reflection volume is formed as the intersection of the spheres\nwhose centers are in points, all with radii radius. This replaces any\nreflection sphere set (although not molecule-specific reflection spheres)" ); } @@ -447,6 +473,7 @@ void register_RigidBodyMC_class(){ "setSampler" , setSampler_function_value , ( bp::arg("sampler") ) + , bp::release_gil_policy() , "Set the sampler (and contained molecule group) that provides\nthe random molecules to be moved. This gives the sampler the\nsame random number generator that is used by this move" ); } @@ -459,6 +486,7 @@ void register_RigidBodyMC_class(){ "setSampler" , setSampler_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the sampler to be one that selects views at random\nfrom the molecule group molgroup (each view has an\nequal chance of being chosen)" ); } @@ -471,6 +499,7 @@ void register_RigidBodyMC_class(){ "setSharedRotationCenter" , setSharedRotationCenter_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to use the same rotation center for all\nsynchronised molecules" ); } @@ -483,6 +512,7 @@ void register_RigidBodyMC_class(){ "setSynchronisedRotation" , setSynchronisedRotation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to synchronise rotation of all of the views" ); } @@ -495,6 +525,7 @@ void register_RigidBodyMC_class(){ "setSynchronisedTranslation" , setSynchronisedTranslation_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to synchronise translation of all of the views" ); } @@ -506,6 +537,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "sharedRotationCenter" , sharedRotationCenter_function_value + , bp::release_gil_policy() , "Return whether or not synchronised rotation uses the same\ncenter of rotation for all molecules" ); } @@ -517,6 +549,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "synchronisedRotation" , synchronisedRotation_function_value + , bp::release_gil_policy() , "Return whether or not rotation of all molecules is synchronised" ); } @@ -528,6 +561,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "synchronisedTranslation" , synchronisedTranslation_function_value + , bp::release_gil_policy() , "Return whether or not translation of all molecules is synchronised" ); } @@ -539,6 +573,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -550,6 +585,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -561,6 +597,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "usesReflectionMoves" , usesReflectionMoves_function_value + , bp::release_gil_policy() , "Return whether or not these moves use a reflection sphere" ); } @@ -573,6 +610,7 @@ void register_RigidBodyMC_class(){ "usesReflectionMoves" , usesReflectionMoves_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return whether or not these moves use a reflection sphere for molecule molnum" ); } @@ -585,6 +623,7 @@ void register_RigidBodyMC_class(){ "usesReflectionMoves" , usesReflectionMoves_function_value , ( bp::arg("molview") ) + , bp::release_gil_policy() , "Return whether or not these moves use a reflection sphere for molecule mol" ); } @@ -596,6 +635,7 @@ void register_RigidBodyMC_class(){ RigidBodyMC_exposer.def( "usesReflectionVolume" , usesReflectionVolume_function_value + , bp::release_gil_policy() , "Return whether or not rigid body moves are confined to a reflection volume.\nNote that this also returns true if we are using a reflection sphere\n(as a sphere is just a special case of a reflection volume)" ); } diff --git a/wrapper/Move/SameMoves.pypp.cpp b/wrapper/Move/SameMoves.pypp.cpp index 0b68a8c26..a908a8b7c 100644 --- a/wrapper/Move/SameMoves.pypp.cpp +++ b/wrapper/Move/SameMoves.pypp.cpp @@ -48,6 +48,8 @@ SireMove::SameMoves __copy__(const SireMove::SameMoves &other){ return SireMove: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SameMoves_class(){ @@ -66,6 +68,7 @@ void register_SameMoves_class(){ SameMoves_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear the move statistics" ); } @@ -77,6 +80,7 @@ void register_SameMoves_class(){ SameMoves_exposer.def( "clearTiming" , clearTiming_function_value + , bp::release_gil_policy() , "Clear all of the timing statistics" ); } @@ -88,7 +92,7 @@ void register_SameMoves_class(){ SameMoves_exposer.def( "energyComponent" , energyComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy component used to calculate the system energy" ); } @@ -112,6 +116,7 @@ void register_SameMoves_class(){ SameMoves_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "Return the moves used by this object" ); } @@ -139,6 +144,7 @@ void register_SameMoves_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Set the energy component of all of the moves to component" ); } @@ -151,6 +157,7 @@ void register_SameMoves_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used at all points in all of the moves" ); } @@ -163,6 +170,7 @@ void register_SameMoves_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("spaceproperty") ) + , bp::release_gil_policy() , "Set the name of the property that all of the moves will use to\nfind the simulation space (simulation box) to spaceproperty" ); } @@ -186,6 +194,7 @@ void register_SameMoves_class(){ SameMoves_exposer.def( "timing" , timing_function_value + , bp::release_gil_policy() , "Return the list of average times for the move" ); } @@ -197,6 +206,7 @@ void register_SameMoves_class(){ SameMoves_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of these moves" ); } @@ -208,6 +218,7 @@ void register_SameMoves_class(){ SameMoves_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SameSupraMoves.pypp.cpp b/wrapper/Move/SameSupraMoves.pypp.cpp index 1e1492e72..26cb82373 100644 --- a/wrapper/Move/SameSupraMoves.pypp.cpp +++ b/wrapper/Move/SameSupraMoves.pypp.cpp @@ -27,6 +27,8 @@ SireMove::SameSupraMoves __copy__(const SireMove::SameSupraMoves &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SameSupraMoves_class(){ @@ -45,6 +47,7 @@ void register_SameSupraMoves_class(){ SameSupraMoves_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all move statistics" ); } @@ -68,6 +71,7 @@ void register_SameSupraMoves_class(){ SameSupraMoves_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "Return a list of all of the moves" ); } @@ -79,6 +83,7 @@ void register_SameSupraMoves_class(){ SameSupraMoves_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "Return the total number of moves that have been performed" ); } @@ -105,6 +110,7 @@ void register_SameSupraMoves_class(){ SameSupraMoves_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this moves set" ); } @@ -116,6 +122,7 @@ void register_SameSupraMoves_class(){ SameSupraMoves_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SameSupraSubMoves.pypp.cpp b/wrapper/Move/SameSupraSubMoves.pypp.cpp index 47b5cc784..35eddb6bf 100644 --- a/wrapper/Move/SameSupraSubMoves.pypp.cpp +++ b/wrapper/Move/SameSupraSubMoves.pypp.cpp @@ -26,6 +26,8 @@ SireMove::SameSupraSubMoves __copy__(const SireMove::SameSupraSubMoves &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SameSupraSubMoves_class(){ @@ -44,6 +46,7 @@ void register_SameSupraSubMoves_class(){ SameSupraSubMoves_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all of the move statistics" ); } @@ -56,6 +59,7 @@ void register_SameSupraSubMoves_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nsubmoves"), bp::arg("nsubmoves_per_block"), bp::arg("record_substats") ) + , bp::release_gil_policy() , "Perform the moves" ); } @@ -83,7 +87,7 @@ void register_SameSupraSubMoves_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -95,6 +99,7 @@ void register_SameSupraSubMoves_class(){ SameSupraSubMoves_exposer.def( "subMoves" , subMoves_function_value + , bp::release_gil_policy() , "Return a list of all of the types of submove in this set" ); } @@ -106,6 +111,7 @@ void register_SameSupraSubMoves_class(){ SameSupraSubMoves_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this set of moves" ); } @@ -117,6 +123,7 @@ void register_SameSupraSubMoves_class(){ SameSupraSubMoves_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/Sampler.pypp.cpp b/wrapper/Move/Sampler.pypp.cpp index 60750e35b..c417d02ec 100644 --- a/wrapper/Move/Sampler.pypp.cpp +++ b/wrapper/Move/Sampler.pypp.cpp @@ -28,6 +28,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Sampler_class(){ { //::SireMove::Sampler @@ -54,7 +56,7 @@ void register_Sampler_class(){ Sampler_exposer.def( "group" , group_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -66,6 +68,7 @@ void register_Sampler_class(){ Sampler_exposer.def( "isBiased" , isBiased_function_value + , bp::release_gil_policy() , "Return whether or not this sampler is biased, i.e. picks some\nmolecules views with a higher probability than others. If this\nis a biased sampler, then this will need to be accounted for in the\nMC acceptance test. If this is not a biased sampler, then every\nmolecule or view is chosen with equal probability" ); } @@ -77,7 +80,7 @@ void register_Sampler_class(){ Sampler_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -90,6 +93,7 @@ void register_Sampler_class(){ "probabilityOf" , probabilityOf_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "" ); } @@ -102,6 +106,7 @@ void register_Sampler_class(){ "probabilityOfMolecule" , probabilityOfMolecule_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "" ); } @@ -113,6 +118,7 @@ void register_Sampler_class(){ Sampler_exposer.def( "sample" , sample_function_value + , bp::release_gil_policy() , "" ); } @@ -124,6 +130,7 @@ void register_Sampler_class(){ Sampler_exposer.def( "sampleMolecule" , sampleMolecule_function_value + , bp::release_gil_policy() , "" ); } @@ -136,6 +143,7 @@ void register_Sampler_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used by this sampler" ); } @@ -148,6 +156,7 @@ void register_Sampler_class(){ "setGroup" , setGroup_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the molecule group from which random molecules will be sampled" ); } @@ -159,6 +168,7 @@ void register_Sampler_class(){ Sampler_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -171,6 +181,7 @@ void register_Sampler_class(){ "updateFrom" , updateFrom_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Update this sampler so that it matches the state of the molecules\nin the System system" ); } diff --git a/wrapper/Move/ScaleVolumeFromCenter.pypp.cpp b/wrapper/Move/ScaleVolumeFromCenter.pypp.cpp index cd660aeef..86678ffc2 100644 --- a/wrapper/Move/ScaleVolumeFromCenter.pypp.cpp +++ b/wrapper/Move/ScaleVolumeFromCenter.pypp.cpp @@ -38,6 +38,8 @@ SireMove::ScaleVolumeFromCenter __copy__(const SireMove::ScaleVolumeFromCenter & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ScaleVolumeFromCenter_class(){ { //::SireMove::ScaleVolumeFromCenter @@ -57,7 +59,7 @@ void register_ScaleVolumeFromCenter_class(){ ScaleVolumeFromCenter_exposer.def( "center" , center_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the center point from which the molecules are scaled" ); } @@ -85,6 +87,7 @@ void register_ScaleVolumeFromCenter_class(){ "setCenter" , setCenter_function_value , ( bp::arg("center") ) + , bp::release_gil_policy() , "Set the center point from which the molecules will be scaled" ); } @@ -108,6 +111,7 @@ void register_ScaleVolumeFromCenter_class(){ ScaleVolumeFromCenter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SimPacket.pypp.cpp b/wrapper/Move/SimPacket.pypp.cpp index e294705b9..368b283eb 100644 --- a/wrapper/Move/SimPacket.pypp.cpp +++ b/wrapper/Move/SimPacket.pypp.cpp @@ -21,6 +21,8 @@ SireMove::SimPacket __copy__(const SireMove::SimPacket &other){ return SireMove: const char* pvt_get_name(const SireMove::SimPacket&){ return "SireMove::SimPacket";} +#include "Helpers/release_gil_policy.hpp" + void register_SimPacket_class(){ { //::SireMove::SimPacket @@ -40,6 +42,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "approximatePacketSize" , approximatePacketSize_function_value + , bp::release_gil_policy() , "Because it takes too long to calculate the size of this\npacket, we say that it will be 32 MB - this is enough for\nmost cases" ); } @@ -51,6 +54,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not this simulation has finished" ); } @@ -62,6 +66,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "Return the moves being applied to the system" ); } @@ -73,6 +78,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "nCompleted" , nCompleted_function_value + , bp::release_gil_policy() , "Return the number of moves already run on the system" ); } @@ -84,6 +90,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "Return the number of moves being applied to the system" ); } @@ -95,6 +102,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "nMovesPerChunk" , nMovesPerChunk_function_value + , bp::release_gil_policy() , "Return the number of moves to apply for each chunk" ); } @@ -121,6 +129,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "recordingStatistics" , recordingStatistics_function_value + , bp::release_gil_policy() , "Return whether or not simulation statistics will be recorded\nduring the moves" ); } @@ -132,6 +141,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "shouldPack" , shouldPack_function_value + , bp::release_gil_policy() , "Only compress this workpacket if the SimStore is not already packed" ); } @@ -143,6 +153,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "system" , system_function_value + , bp::release_gil_policy() , "Return the system being simulated" ); } @@ -154,6 +165,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "systemAndMoves" , systemAndMoves_function_value + , bp::release_gil_policy() , "Return both the system and moves together" ); } @@ -165,6 +177,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +189,7 @@ void register_SimPacket_class(){ SimPacket_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SimStore.pypp.cpp b/wrapper/Move/SimStore.pypp.cpp index 831df0673..94841e051 100644 --- a/wrapper/Move/SimStore.pypp.cpp +++ b/wrapper/Move/SimStore.pypp.cpp @@ -32,6 +32,8 @@ SireMove::SimStore __copy__(const SireMove::SimStore &other){ return SireMove::S const char* pvt_get_name(const SireMove::SimStore&){ return "SireMove::SimStore";} +#include "Helpers/release_gil_policy.hpp" + void register_SimStore_class(){ { //::SireMove::SimStore @@ -48,6 +50,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "isPacked" , isPacked_function_value + , bp::release_gil_policy() , "Return whether or not the data is packed into memory or\nis packed onto disk" ); } @@ -59,6 +62,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "isPackedToDisk" , isPackedToDisk_function_value + , bp::release_gil_policy() , "Return whether or not the data is packed to disk" ); } @@ -70,6 +74,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "isPackedToMemory" , isPackedToMemory_function_value + , bp::release_gil_policy() , "Return whether or not the data is packed into a compressed\nbinary array" ); } @@ -81,7 +86,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "moves" , moves_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return a copy of the moves being stored" ); } @@ -108,6 +113,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "pack" , pack_function_value + , bp::release_gil_policy() , "Pack the system - this packs the system to the same state\nas the last time this function was called (so if it was previously\npacked to disk, then this will pack it to disk). This allows\nyou to call SimStore::unpack(), knowing that SimStore::pack()\nwill restore the packing state" ); } @@ -119,6 +125,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "packToDisk" , packToDisk_function_value + , bp::release_gil_policy() , "Pack the system and moves to disk - this places the data in\na temporary file in QDir::tempPath()" ); } @@ -131,6 +138,7 @@ void register_SimStore_class(){ "packToDisk" , packToDisk_function_value , ( bp::arg("tempdir") ) + , bp::release_gil_policy() , "Pack the system and moves to disk - this places the data\ninto a temporary file in tempdir" ); } @@ -142,6 +150,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "packToMemory" , packToMemory_function_value + , bp::release_gil_policy() , "Pack the system and moves to memory - this will compress\nthem to a compressed binary array if they are not packed,\nwill do nothing if they are already packed to memory,\nor will move them from disk to memory if they are already\npacked to disk" ); } @@ -154,6 +163,7 @@ void register_SimStore_class(){ "setMoves" , setMoves_function_value , ( bp::arg("moves") ) + , bp::release_gil_policy() , "Set the moves to be stored" ); } @@ -166,6 +176,7 @@ void register_SimStore_class(){ "setSystem" , setSystem_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Set the system to be stored" ); } @@ -178,6 +189,7 @@ void register_SimStore_class(){ "setSystemAndMoves" , setSystemAndMoves_function_value , ( bp::arg("system"), bp::arg("moves") ) + , bp::release_gil_policy() , "Set both the system and moves to be stored" ); } @@ -201,6 +213,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -212,6 +225,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "unpack" , unpack_function_value + , bp::release_gil_policy() , "Unpack the system and move from the compressed binary array" ); } @@ -223,6 +237,7 @@ void register_SimStore_class(){ SimStore_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/Simulation.pypp.cpp b/wrapper/Move/Simulation.pypp.cpp index 7aa4a26ad..7125c56ae 100644 --- a/wrapper/Move/Simulation.pypp.cpp +++ b/wrapper/Move/Simulation.pypp.cpp @@ -19,6 +19,8 @@ SireMove::Simulation __copy__(const SireMove::Simulation &other){ return SireMov const char* pvt_get_name(const SireMove::Simulation&){ return "SireMove::Simulation";} +#include "Helpers/release_gil_policy.hpp" + void register_Simulation_class(){ { //::SireMove::Simulation @@ -34,6 +36,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "abort" , abort_function_value + , bp::release_gil_policy() , "Abort the simulation" ); } @@ -45,6 +48,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the simulation has finished\n(completed all of the moves)" ); } @@ -56,6 +60,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "initialMoves" , initialMoves_function_value + , bp::release_gil_policy() , "Return the Moves in the state they were in before the simulation started" ); } @@ -67,6 +72,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "initialSystem" , initialSystem_function_value + , bp::release_gil_policy() , "Return the System in the state it was in before the simulation started" ); } @@ -78,6 +84,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "input" , input_function_value + , bp::release_gil_policy() , "Return the initial input simulation WorkPacket" ); } @@ -89,6 +96,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "interimMoves" , interimMoves_function_value + , bp::release_gil_policy() , "Return the current state of the moves (updated while the simulation\nis running). This will throw an exception if the system hits an\nerror state" ); } @@ -100,6 +108,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "interimResult" , interimResult_function_value + , bp::release_gil_policy() , "Return the simulation WorkPacket from an intermediate point along\nthe simulation. This will throw an error if the simulation is in an\nerror state, and the initial packet if the simulation\nwas aborted" ); } @@ -111,6 +120,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "interimSystem" , interimSystem_function_value + , bp::release_gil_policy() , "Return the current state of the System (updated while the simulation\nis running). This will throw an exception if the system hits an\nerror state" ); } @@ -122,6 +132,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not this simulation is in an error state" ); } @@ -133,6 +144,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "isRunning" , isRunning_function_value + , bp::release_gil_policy() , "Return whether or not this simulation is running" ); } @@ -144,6 +156,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "Return the final state of the moves after the simulation. This\nblocks until the simulation has finished and will throw an\nexception if the system hits an error state" ); } @@ -170,6 +183,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "progress" , progress_function_value + , bp::release_gil_policy() , "Return the progress of the simulation (as a percentage)" ); } @@ -181,6 +195,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "result" , result_function_value + , bp::release_gil_policy() , "Return the final result of the simulation. This blocks until\nthe simulation has stopped, and will throw an exception if the\nsimulation is in an error state. This returns the initial\nsimulation WorkPacket if the simulation was aborted" ); } @@ -265,6 +280,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("simpacket") ) + , bp::release_gil_policy() , "Run the simulation contained in the simulation WorkPacket simpacket\nin the current thread" ); } @@ -349,6 +365,7 @@ void register_Simulation_class(){ "run" , run_function_value , ( bp::arg("node"), bp::arg("simpacket") ) + , bp::release_gil_policy() , "Run the simulation contained in the simulation WorkPacket simpacket\non the node node" ); } @@ -360,6 +377,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "stop" , stop_function_value + , bp::release_gil_policy() , "Stop the simulation" ); } @@ -371,6 +389,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "system" , system_function_value + , bp::release_gil_policy() , "Return the final state of the system after the simulation. This\nblocks until the simulation has finished and will throw an\nexception if the system hits an error state" ); } @@ -382,6 +401,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "throwError" , throwError_function_value + , bp::release_gil_policy() , "Throw any error associated with this simulation - this does\nnothing if we are not in an error state" ); } @@ -393,6 +413,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "wait" , wait_function_value + , bp::release_gil_policy() , "Wait for the simulation to stop running\n(which can be either because it finished, was stopped,\nwas aborted or ended in error)" ); } @@ -405,6 +426,7 @@ void register_Simulation_class(){ "wait" , wait_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Wait for the simulation to stop running, or for timeout\nmilliseconds to pass, whichever comes soonest. This returns\nwhether or not the simulation has stopped" ); } @@ -416,6 +438,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "wasAborted" , wasAborted_function_value + , bp::release_gil_policy() , "Return whether or not the simulation was aborted" ); } @@ -427,6 +450,7 @@ void register_Simulation_class(){ Simulation_exposer.def( "wasStopped" , wasStopped_function_value + , bp::release_gil_policy() , "Return whether or not the simulation was stopped" ); } diff --git a/wrapper/Move/SireMove_properties.cpp b/wrapper/Move/SireMove_properties.cpp index 9480f90a5..69d3787c4 100644 --- a/wrapper/Move/SireMove_properties.cpp +++ b/wrapper/Move/SireMove_properties.cpp @@ -4,21 +4,31 @@ #include "Base/convertproperty.hpp" #include "SireMove_properties.h" +#include "SireError/errors.h" +#include "SireMaths/vector.h" +#include "SireMol/atom.h" +#include "SireMol/atomcoords.h" +#include "SireMol/evaluator.h" +#include "SireMol/moleculeview.h" +#include "SireMol/mover.hpp" +#include "SireMol/selector.hpp" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "suprasubsystem.h" -#include "suprasubsystem.h" -#include "SireMaths/quaternion.h" -#include "SireMol/molecule.h" -#include "SireMol/partialmolecule.h" +#include "getpoint.h" +#include +#include "getpoint.h" +#include "SireCAS/symbol.h" +#include "SireFF/forcefields.h" +#include "SireFF/forcetable.h" +#include "SireMaths/rangenerator.h" +#include "SireMol/moleculegroup.h" +#include "SireMol/moleculeview.h" #include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" #include "SireSystem/system.h" -#include "SireUnits/dimensions.h" -#include "SireUnits/units.h" -#include "SireVol/space.h" -#include "molinserter.h" -#include "molinserter.h" +#include "ensemble.h" +#include "integrator.h" +#include "integratorworkspace.h" +#include "integrator.h" #include "SireMol/molecule.h" #include "SireMol/moleculegroup.h" #include "SireStream/datastream.h" @@ -27,40 +37,30 @@ #include "moldeleter.h" #include "uniformsampler.h" #include "moldeleter.h" -#include "SireError/errors.h" -#include "SireID/index.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "supramoves.h" -#include "suprasystem.h" -#include "supramoves.h" -#include "SireCAS/symbol.h" -#include "SireMol/atomelements.h" -#include "SireMol/atommasses.h" -#include "SireMol/atomvelocities.h" -#include "SireMol/moleculedata.h" -#include "SireMol/moleculeinfodata.h" -#include "SireMol/moleculeview.h" +#include "SireMaths/quaternion.h" +#include "SireMol/core.h" +#include "SireMol/molecule.h" +#include "SireMol/partialmolecule.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" +#include "SireSystem/system.h" #include "SireUnits/dimensions.h" -#include "SireUnits/temperature.h" #include "SireUnits/units.h" -#include "velocitygenerator.h" -#include "velocitygenerator.h" +#include "SireVol/space.h" +#include "molinserter.h" +#include "molinserter.h" #include "SireError/errors.h" -#include "SireMaths/vector.h" -#include "SireMol/atom.h" -#include "SireMol/atomcoords.h" -#include "SireMol/evaluator.h" -#include "SireMol/moleculeview.h" -#include "SireMol/mover.hpp" -#include "SireMol/selector.hpp" +#include "SireMaths/rangenerator.h" +#include "SireMol/core.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "getpoint.h" -#include -#include "getpoint.h" +#include "SireSystem/system.h" +#include "SireUnits/temperature.h" +#include "SireUnits/units.h" +#include "ensemble.h" +#include "move.h" +#include +#include "move.h" #include "SireError/errors.h" #include "SireMaths/rangenerator.h" #include "SireStream/datastream.h" @@ -78,16 +78,6 @@ #include #include #include "moves.h" -#include "SireError/errors.h" -#include "SireID/index.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireSystem/system.h" -#include "SireSystem/systemmonitor.h" -#include "moves.h" -#include "simstore.h" -#include "suprasystem.h" -#include "suprasystem.h" #include "SireMol/molecule.h" #include "SireMol/partialmolecule.h" #include "SireStream/datastream.h" @@ -101,18 +91,18 @@ #include "supramove.h" #include "suprasystem.h" #include "supramove.h" -#include "SireCAS/symbol.h" -#include "SireFF/forcefields.h" -#include "SireFF/forcetable.h" -#include "SireMaths/rangenerator.h" -#include "SireMol/moleculegroup.h" -#include "SireMol/moleculeview.h" +#include "SireError/errors.h" +#include "SireID/index.h" #include "SireStream/datastream.h" -#include "SireSystem/system.h" -#include "ensemble.h" -#include "integrator.h" -#include "integratorworkspace.h" -#include "integrator.h" +#include "SireStream/shareddatastream.h" +#include "supramoves.h" +#include "suprasystem.h" +#include "supramoves.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "suprasubmove.h" +#include "suprasubsystem.h" +#include "suprasubmove.h" #include "SireError/errors.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -121,34 +111,46 @@ #include "suprasubmoves.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" -#include "suprasubmove.h" #include "suprasubsystem.h" -#include "suprasubmove.h" +#include "suprasubsystem.h" #include "SireError/errors.h" -#include "SireMaths/rangenerator.h" +#include "SireID/index.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" #include "SireSystem/system.h" +#include "SireSystem/systemmonitor.h" +#include "moves.h" +#include "simstore.h" +#include "suprasystem.h" +#include "suprasystem.h" +#include "SireCAS/symbol.h" +#include "SireMol/atomelements.h" +#include "SireMol/atommasses.h" +#include "SireMol/atomvelocities.h" +#include "SireMol/moleculedata.h" +#include "SireMol/moleculeinfodata.h" +#include "SireMol/moleculeview.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireUnits/dimensions.h" #include "SireUnits/temperature.h" #include "SireUnits/units.h" -#include "ensemble.h" -#include "move.h" -#include -#include "move.h" +#include "velocitygenerator.h" +#include "velocitygenerator.h" void register_SireMove_properties() { - register_property_container< SireMove::SupraSubSystemPtr, SireMove::SupraSubSystem >(); - register_property_container< SireMove::MolInserterPtr, SireMove::MolInserter >(); - register_property_container< SireMove::MolDeleterPtr, SireMove::MolDeleter >(); - register_property_container< SireMove::SupraMovesPtr, SireMove::SupraMoves >(); - register_property_container< SireMove::VelGenPtr, SireMove::VelocityGenerator >(); register_property_container< SireMove::GetPointPtr, SireMove::GetPoint >(); + register_property_container< SireMove::IntegratorPtr, SireMove::Integrator >(); + register_property_container< SireMove::MolDeleterPtr, SireMove::MolDeleter >(); + register_property_container< SireMove::MolInserterPtr, SireMove::MolInserter >(); + register_property_container< SireMove::MovePtr, SireMove::Move >(); register_property_container< SireMove::MovesPtr, SireMove::Moves >(); - register_property_container< SireMove::SupraSystemPtr, SireMove::SupraSystem >(); register_property_container< SireMove::SamplerPtr, SireMove::Sampler >(); register_property_container< SireMove::SupraMovePtr, SireMove::SupraMove >(); - register_property_container< SireMove::IntegratorPtr, SireMove::Integrator >(); - register_property_container< SireMove::SupraSubMovesPtr, SireMove::SupraSubMoves >(); + register_property_container< SireMove::SupraMovesPtr, SireMove::SupraMoves >(); register_property_container< SireMove::SupraSubMovePtr, SireMove::SupraSubMove >(); - register_property_container< SireMove::MovePtr, SireMove::Move >(); + register_property_container< SireMove::SupraSubMovesPtr, SireMove::SupraSubMoves >(); + register_property_container< SireMove::SupraSubSystemPtr, SireMove::SupraSubSystem >(); + register_property_container< SireMove::SupraSystemPtr, SireMove::SupraSystem >(); + register_property_container< SireMove::VelGenPtr, SireMove::VelocityGenerator >(); } diff --git a/wrapper/Move/SireMove_registrars.cpp b/wrapper/Move/SireMove_registrars.cpp index a71748a3e..de7d714e6 100644 --- a/wrapper/Move/SireMove_registrars.cpp +++ b/wrapper/Move/SireMove_registrars.cpp @@ -5,129 +5,129 @@ #include "Helpers/version_error_impl.h" -#include "openmmfrenergyst.h" -#include "volumechanger.h" -#include "suprasubsystem.h" -#include "zmatmove.h" -#include "velocityverlet.h" -#include "molinserter.h" -#include "moldeleter.h" -#include "supramoves.h" -#include "integratorworkspacejm.h" -#include "velocitygenerator.h" -#include "getpoint.h" -#include "internalmove.h" +#include "dlmrigidbody.h" #include "ensemble.h" -#include "openmmpmefep.h" -#include "weightedmoves.h" +#include "flexibility.h" +#include "getpoint.h" #include "hybridmc.h" +#include "integrator.h" +#include "integratorworkspace.h" +#include "integratorworkspacejm.h" +#include "internalmove.h" #include "internalmovesingle.h" +#include "moldeleter.h" +#include "moleculardynamics.h" +#include "molinserter.h" +#include "move.h" #include "moves.h" -#include "simpacket.h" -#include "suprasystem.h" -#include "titrator.h" -#include "suprasubsimpacket.h" +#include "mtsmc.h" +#include "openmmfrenergydt.h" +#include "openmmfrenergyst.h" +#include "openmmmdintegrator.h" +#include "openmmpmefep.h" +#include "prefsampler.h" #include "rbworkspace.h" #include "rbworkspacejm.h" +#include "repexmove.h" +#include "repexmove2.h" +#include "replica.h" #include "replicas.h" -#include "openmmmdintegrator.h" -#include "integratorworkspace.h" +#include "rigidbodymc.h" +#include "simpacket.h" #include "simstore.h" -#include "repexmove2.h" +#include "supramove.h" +#include "supramoves.h" +#include "suprasimpacket.h" +#include "suprasubmove.h" +#include "suprasubmoves.h" +#include "suprasubsimpacket.h" +#include "suprasubsystem.h" +#include "suprasystem.h" #include "titrationmove.h" +#include "titrator.h" +#include "uniformsampler.h" +#include "velocitygenerator.h" +#include "velocityverlet.h" +#include "volumechanger.h" #include "volumemove.h" -#include "supramove.h" +#include "weightedmoves.h" +#include "zmatmove.h" #include "zmatrix.h" -#include "flexibility.h" -#include "repexmove.h" -#include "dlmrigidbody.h" -#include "uniformsampler.h" -#include "mtsmc.h" -#include "prefsampler.h" -#include "integrator.h" -#include "suprasubmoves.h" -#include "moleculardynamics.h" -#include "openmmfrenergydt.h" -#include "suprasubmove.h" -#include "move.h" -#include "replica.h" -#include "rigidbodymc.h" -#include "suprasimpacket.h" #include "Helpers/objectregistry.hpp" void register_SireMove_objects() { - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); - ObjectRegistry::registerConverterFor< SireMove::NullVolumeChanger >(); - ObjectRegistry::registerConverterFor< SireMove::ScaleVolumeFromCenter >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSubSystem >(); - ObjectRegistry::registerConverterFor< SireMove::ZMatMove >(); - ObjectRegistry::registerConverterFor< SireMove::VelocityVerlet >(); - ObjectRegistry::registerConverterFor< SireMove::NullInserter >(); - ObjectRegistry::registerConverterFor< SireMove::UniformInserter >(); - ObjectRegistry::registerConverterFor< SireMove::NullDeleter >(); - ObjectRegistry::registerConverterFor< SireMove::SpecifiedGroupsDeleter >(); - ObjectRegistry::registerConverterFor< SireMove::SystemWideDeleter >(); - ObjectRegistry::registerConverterFor< SireMove::SameSupraMoves >(); - ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspaceJM >(); - ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspaceJM >(); - ObjectRegistry::registerConverterFor< SireMove::NullVelocityGenerator >(); - ObjectRegistry::registerConverterFor< SireMove::VelocitiesFromProperty >(); - ObjectRegistry::registerConverterFor< SireMove::MaxwellBoltzmann >(); + ObjectRegistry::registerConverterFor< SireMove::DLMRigidBody >(); + ObjectRegistry::registerConverterFor< SireMove::Ensemble >(); + ObjectRegistry::registerConverterFor< SireMove::DofID >(); + ObjectRegistry::registerConverterFor< SireMove::Flexibility >(); ObjectRegistry::registerConverterFor< SireMove::NullGetPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCOMPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCOGPoint >(); ObjectRegistry::registerConverterFor< SireMove::GetCentroidPoint >(); - ObjectRegistry::registerConverterFor< SireMove::InternalMove >(); - ObjectRegistry::registerConverterFor< SireMove::Ensemble >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); - ObjectRegistry::registerConverterFor< SireMove::WeightedMoves >(); ObjectRegistry::registerConverterFor< SireMove::HybridMC >(); ObjectRegistry::registerConverterFor< SireMove::HMCGenerator >(); + ObjectRegistry::registerConverterFor< SireMove::NullIntegrator >(); + ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspace >(); + ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspace >(); + ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::InternalMove >(); ObjectRegistry::registerConverterFor< SireMove::InternalMoveSingle >(); + ObjectRegistry::registerConverterFor< SireMove::NullDeleter >(); + ObjectRegistry::registerConverterFor< SireMove::SpecifiedGroupsDeleter >(); + ObjectRegistry::registerConverterFor< SireMove::SystemWideDeleter >(); + ObjectRegistry::registerConverterFor< SireMove::MolecularDynamics >(); + ObjectRegistry::registerConverterFor< SireMove::NullInserter >(); + ObjectRegistry::registerConverterFor< SireMove::UniformInserter >(); + ObjectRegistry::registerConverterFor< SireMove::NullMove >(); ObjectRegistry::registerConverterFor< SireMove::SameMoves >(); - ObjectRegistry::registerConverterFor< SireMove::SimPacket >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSystem >(); - ObjectRegistry::registerConverterFor< SireMove::Titrator >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSubSimPacket >(); + ObjectRegistry::registerConverterFor< SireMove::MTSMC >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyST >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); + ObjectRegistry::registerConverterFor< SireMove::OpenMMPMEFEP >(); + ObjectRegistry::registerConverterFor< SireMove::PrefSampler >(); ObjectRegistry::registerConverterFor< SireMove::RBWorkspace >(); ObjectRegistry::registerConverterFor< SireMove::RBWorkspaceJM >(); + ObjectRegistry::registerConverterFor< SireMove::RepExMove >(); + ObjectRegistry::registerConverterFor< SireMove::RepExSubMove >(); + ObjectRegistry::registerConverterFor< SireMove::RepExMove2 >(); + ObjectRegistry::registerConverterFor< SireMove::Replica >(); ObjectRegistry::registerConverterFor< SireMove::Replicas >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMMDIntegrator >(); - ObjectRegistry::registerConverterFor< SireMove::NullIntegratorWorkspace >(); - ObjectRegistry::registerConverterFor< SireMove::AtomicVelocityWorkspace >(); + ObjectRegistry::registerConverterFor< SireMove::RigidBodyMC >(); + ObjectRegistry::registerConverterFor< SireMove::SimPacket >(); ObjectRegistry::registerConverterFor< SireMove::SimStore >(); - ObjectRegistry::registerConverterFor< SireMove::RepExMove2 >(); + ObjectRegistry::registerConverterFor< SireMove::NullSupraMove >(); + ObjectRegistry::registerConverterFor< SireMove::SameSupraMoves >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSimPacket >(); + ObjectRegistry::registerConverterFor< SireMove::NullSupraSubMove >(); + ObjectRegistry::registerConverterFor< SireMove::SameSupraSubMoves >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSubSimPacket >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSubSystem >(); + ObjectRegistry::registerConverterFor< SireMove::SupraSystem >(); ObjectRegistry::registerConverterFor< SireMove::TitrationMove >(); + ObjectRegistry::registerConverterFor< SireMove::Titrator >(); + ObjectRegistry::registerConverterFor< SireMove::UniformSampler >(); + ObjectRegistry::registerConverterFor< SireMove::NullVelocityGenerator >(); + ObjectRegistry::registerConverterFor< SireMove::VelocitiesFromProperty >(); + ObjectRegistry::registerConverterFor< SireMove::MaxwellBoltzmann >(); + ObjectRegistry::registerConverterFor< SireMove::VelocityVerlet >(); + ObjectRegistry::registerConverterFor< SireMove::NullVolumeChanger >(); + ObjectRegistry::registerConverterFor< SireMove::ScaleVolumeFromCenter >(); ObjectRegistry::registerConverterFor< SireMove::VolumeMove >(); - ObjectRegistry::registerConverterFor< SireMove::NullSupraMove >(); + ObjectRegistry::registerConverterFor< SireMove::WeightedMoves >(); + ObjectRegistry::registerConverterFor< SireMove::ZMatMove >(); ObjectRegistry::registerConverterFor< SireMove::ZMatrix >(); ObjectRegistry::registerConverterFor< SireMove::ZMatrixLine >(); ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoords >(); ObjectRegistry::registerConverterFor< SireMove::ZMatrixCoordsLine >(); - ObjectRegistry::registerConverterFor< SireMove::DofID >(); - ObjectRegistry::registerConverterFor< SireMove::Flexibility >(); - ObjectRegistry::registerConverterFor< SireMove::RepExMove >(); - ObjectRegistry::registerConverterFor< SireMove::RepExSubMove >(); - ObjectRegistry::registerConverterFor< SireMove::DLMRigidBody >(); - ObjectRegistry::registerConverterFor< SireMove::UniformSampler >(); - ObjectRegistry::registerConverterFor< SireMove::MTSMC >(); - ObjectRegistry::registerConverterFor< SireMove::PrefSampler >(); - ObjectRegistry::registerConverterFor< SireMove::NullIntegrator >(); - ObjectRegistry::registerConverterFor< SireMove::SameSupraSubMoves >(); - ObjectRegistry::registerConverterFor< SireMove::MolecularDynamics >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); - ObjectRegistry::registerConverterFor< SireMove::OpenMMFrEnergyDT >(); - ObjectRegistry::registerConverterFor< SireMove::NullSupraSubMove >(); - ObjectRegistry::registerConverterFor< SireMove::NullMove >(); - ObjectRegistry::registerConverterFor< SireMove::Replica >(); - ObjectRegistry::registerConverterFor< SireMove::RigidBodyMC >(); - ObjectRegistry::registerConverterFor< SireMove::SupraSimPacket >(); } diff --git a/wrapper/Move/SpecifiedGroupsDeleter.pypp.cpp b/wrapper/Move/SpecifiedGroupsDeleter.pypp.cpp index 26cd05393..5878c9796 100644 --- a/wrapper/Move/SpecifiedGroupsDeleter.pypp.cpp +++ b/wrapper/Move/SpecifiedGroupsDeleter.pypp.cpp @@ -30,6 +30,8 @@ SireMove::SpecifiedGroupsDeleter __copy__(const SireMove::SpecifiedGroupsDeleter #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SpecifiedGroupsDeleter_class(){ { //::SireMove::SpecifiedGroupsDeleter @@ -48,6 +50,7 @@ void register_SpecifiedGroupsDeleter_class(){ "deleteFrom" , deleteFrom_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Delete a molecule from the system. This returns the molecule that\nwas deleted, and the probability with which it was sampled\n(normalised so that a probability of 1 is returned if the molecule\nwas picked purely randomly). This deleter deletes the molecule\nfrom the entire system. This returns an empty molecule if\nthe molecule was not contained in the system and nothing\nwas deleted" ); } @@ -71,7 +74,7 @@ void register_SpecifiedGroupsDeleter_class(){ SpecifiedGroupsDeleter_exposer.def( "group" , group_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group from which molecules are randomly\nselected to be deleted" ); } @@ -98,7 +101,7 @@ void register_SpecifiedGroupsDeleter_class(){ SpecifiedGroupsDeleter_exposer.def( "sampler" , sampler_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sampler used to randomly select molecules to be deleted" ); } @@ -111,6 +114,7 @@ void register_SpecifiedGroupsDeleter_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used by the sampler to randomly\nselect molecules to be deleted" ); } @@ -123,6 +127,7 @@ void register_SpecifiedGroupsDeleter_class(){ "setGroup" , setGroup_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the molecule group from which molecules are selected randomly" ); } @@ -135,6 +140,7 @@ void register_SpecifiedGroupsDeleter_class(){ "setSampler" , setSampler_function_value , ( bp::arg("sampler") ) + , bp::release_gil_policy() , "Set the sampler used to randomly select molecules to be deleted" ); } @@ -147,6 +153,7 @@ void register_SpecifiedGroupsDeleter_class(){ "setSampler" , setSampler_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the sampler to one that selects molecules uniformly from the\npassed molecule group" ); } @@ -159,6 +166,7 @@ void register_SpecifiedGroupsDeleter_class(){ "setSpecifiedGroups" , setSpecifiedGroups_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Set the ID of the groups from which molecules are actually deleted" ); } @@ -170,7 +178,7 @@ void register_SpecifiedGroupsDeleter_class(){ SpecifiedGroupsDeleter_exposer.def( "specifiedGroups" , specifiedGroups_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the groups from which molecules are actually deleted" ); } @@ -182,6 +190,7 @@ void register_SpecifiedGroupsDeleter_class(){ SpecifiedGroupsDeleter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SupraMove.pypp.cpp b/wrapper/Move/SupraMove.pypp.cpp index 0d44d08e7..3dc3402f8 100644 --- a/wrapper/Move/SupraMove.pypp.cpp +++ b/wrapper/Move/SupraMove.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SupraMove_class(){ { //::SireMove::SupraMove @@ -35,6 +37,7 @@ void register_SupraMove_class(){ SupraMove_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all move statistics" ); } @@ -58,6 +61,7 @@ void register_SupraMove_class(){ SupraMove_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "Return the total number of supra-moves performed using this object" ); } @@ -81,6 +85,7 @@ void register_SupraMove_class(){ SupraMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -92,6 +97,7 @@ void register_SupraMove_class(){ SupraMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SupraMoves.pypp.cpp b/wrapper/Move/SupraMoves.pypp.cpp index 37a72b37f..2862c56cd 100644 --- a/wrapper/Move/SupraMoves.pypp.cpp +++ b/wrapper/Move/SupraMoves.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SupraMoves_class(){ @@ -42,6 +44,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "" ); } @@ -53,6 +56,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of different types of move in this set" ); } @@ -76,6 +80,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +104,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "nSubMoveTypes" , nSubMoveTypes_function_value + , bp::release_gil_policy() , "Return the number of different types of move in this set" ); } @@ -122,7 +129,7 @@ void register_SupraMoves_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -134,6 +141,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of different types of move in this set" ); } @@ -145,6 +153,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -156,6 +165,7 @@ void register_SupraMoves_class(){ SupraMoves_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SupraSim.pypp.cpp b/wrapper/Move/SupraSim.pypp.cpp index b189edc9f..11cfa8120 100644 --- a/wrapper/Move/SupraSim.pypp.cpp +++ b/wrapper/Move/SupraSim.pypp.cpp @@ -21,6 +21,8 @@ SireMove::SupraSim __copy__(const SireMove::SupraSim &other){ return SireMove::S const char* pvt_get_name(const SireMove::SupraSim&){ return "SireMove::SupraSim";} +#include "Helpers/release_gil_policy.hpp" + void register_SupraSim_class(){ { //::SireMove::SupraSim @@ -36,6 +38,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "abort" , abort_function_value + , bp::release_gil_policy() , "Abort the simulation" ); } @@ -47,6 +50,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the simulation has finished\n(completed all of the moves)" ); } @@ -58,6 +62,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "initialMoves" , initialMoves_function_value + , bp::release_gil_policy() , "Return the Moves in the state they were in before the simulation started" ); } @@ -69,6 +74,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "initialSystem" , initialSystem_function_value + , bp::release_gil_policy() , "Return the System in the state it was in before the simulation started" ); } @@ -80,6 +86,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "input" , input_function_value + , bp::release_gil_policy() , "Return the initial input simulation WorkPacket" ); } @@ -91,6 +98,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "interimMoves" , interimMoves_function_value + , bp::release_gil_policy() , "Return the current state of the moves (updated while the simulation\nis running). This will throw an exception if the system hits an\nerror state" ); } @@ -102,6 +110,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "interimResult" , interimResult_function_value + , bp::release_gil_policy() , "Return the simulation WorkPacket from an intermediate point along\nthe simulation. This will throw an error if the simulation is in an\nerror state, and the initial packet if the simulation\nwas aborted" ); } @@ -113,6 +122,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "interimSystem" , interimSystem_function_value + , bp::release_gil_policy() , "Return the current state of the System (updated while the simulation\nis running). This will throw an exception if the system hits an\nerror state" ); } @@ -124,6 +134,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not this simulation is in an error state" ); } @@ -135,6 +146,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "isRunning" , isRunning_function_value + , bp::release_gil_policy() , "Return whether or not this simulation is running" ); } @@ -146,6 +158,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "Return the final state of the moves after the simulation. This\nblocks until the simulation has finished and will throw an\nexception if the system hits an error state" ); } @@ -172,6 +185,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "progress" , progress_function_value + , bp::release_gil_policy() , "Return the progress of the simulation (as a percentage)" ); } @@ -183,6 +197,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "result" , result_function_value + , bp::release_gil_policy() , "Return the final result of the simulation. This blocks until\nthe simulation has stopped, and will throw an exception if the\nsimulation is in an error state. This returns the initial\nsimulation WorkPacket if the simulation was aborted" ); } @@ -219,6 +234,7 @@ void register_SupraSim_class(){ "run" , run_function_value , ( bp::arg("simpacket") ) + , bp::release_gil_policy() , "Run the supra-system simulation described in simpacket in the\ncurrent thread" ); } @@ -255,6 +271,7 @@ void register_SupraSim_class(){ "run" , run_function_value , ( bp::arg("node"), bp::arg("simpacket") ) + , bp::release_gil_policy() , "Run the supra-system simulation described in simpacket on the\nnode node, returning a handle to the running simulation" ); } @@ -266,6 +283,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "stop" , stop_function_value + , bp::release_gil_policy() , "Stop the simulation" ); } @@ -277,6 +295,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "system" , system_function_value + , bp::release_gil_policy() , "Return the final state of the system after the simulation. This\nblocks until the simulation has finished and will throw an\nexception if the system hits an error state" ); } @@ -288,6 +307,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "throwError" , throwError_function_value + , bp::release_gil_policy() , "Throw any error associated with this simulation - this does\nnothing if we are not in an error state" ); } @@ -299,6 +319,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "wait" , wait_function_value + , bp::release_gil_policy() , "Wait until the simulation has finished" ); } @@ -311,6 +332,7 @@ void register_SupraSim_class(){ "wait" , wait_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Wait for the simulation to stop running, or for timeout\nmilliseconds to pass, whichever comes soonest. This returns\nwhether or not the simulation has stopped" ); } @@ -322,6 +344,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "wasAborted" , wasAborted_function_value + , bp::release_gil_policy() , "Return whether or not the simulation was aborted" ); } @@ -333,6 +356,7 @@ void register_SupraSim_class(){ SupraSim_exposer.def( "wasStopped" , wasStopped_function_value + , bp::release_gil_policy() , "Return whether or not the simulation was stopped" ); } diff --git a/wrapper/Move/SupraSimPacket.pypp.cpp b/wrapper/Move/SupraSimPacket.pypp.cpp index 53470456b..4b9ce0d89 100644 --- a/wrapper/Move/SupraSimPacket.pypp.cpp +++ b/wrapper/Move/SupraSimPacket.pypp.cpp @@ -22,6 +22,8 @@ SireMove::SupraSimPacket __copy__(const SireMove::SupraSimPacket &other){ return const char* pvt_get_name(const SireMove::SupraSimPacket&){ return "SireMove::SupraSimPacket";} +#include "Helpers/release_gil_policy.hpp" + void register_SupraSimPacket_class(){ { //::SireMove::SupraSimPacket @@ -38,6 +40,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "approximatePacketSize" , approximatePacketSize_function_value + , bp::release_gil_policy() , "This will be large..." ); } @@ -49,6 +52,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the simulation has finished" ); } @@ -60,7 +64,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "moves" , moves_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the supra-moves being applied to the supra-system" ); } @@ -72,6 +76,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "nCompleted" , nCompleted_function_value + , bp::release_gil_policy() , "Return the number of supra-moves that have been completed so far" ); } @@ -83,6 +88,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "nMoves" , nMoves_function_value + , bp::release_gil_policy() , "Return the number of supra-moves to be applied to the supra-system" ); } @@ -109,6 +115,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "recordingStatistics" , recordingStatistics_function_value + , bp::release_gil_policy() , "Set whether or not statistics are being recorded during the moves" ); } @@ -120,6 +127,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "shouldPack" , shouldPack_function_value + , bp::release_gil_policy() , "This probably shouldnt be packed to disk, as there will be a lot\nof data sharing between this packet and other copies at different\nstages of the simulation (I think) - it is also already heavily\npacked (e.g. to disk) and I dont want that data to be pulled\ninto memory" ); } @@ -131,7 +139,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "system" , system_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the supra-system being simulated" ); } @@ -143,6 +151,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -154,6 +163,7 @@ void register_SupraSimPacket_class(){ SupraSimPacket_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SupraSubMove.pypp.cpp b/wrapper/Move/SupraSubMove.pypp.cpp index eb424113a..f0a1afad4 100644 --- a/wrapper/Move/SupraSubMove.pypp.cpp +++ b/wrapper/Move/SupraSubMove.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SupraSubMove_class(){ { //::SireMove::SupraSubMove @@ -35,6 +37,7 @@ void register_SupraSubMove_class(){ SupraSubMove_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear the move statistics" ); } @@ -70,6 +73,7 @@ void register_SupraSubMove_class(){ SupraSubMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -81,6 +85,7 @@ void register_SupraSubMove_class(){ SupraSubMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SupraSubMoves.pypp.cpp b/wrapper/Move/SupraSubMoves.pypp.cpp index a11d7bfde..fb42983af 100644 --- a/wrapper/Move/SupraSubMoves.pypp.cpp +++ b/wrapper/Move/SupraSubMoves.pypp.cpp @@ -24,6 +24,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SupraSubMoves_class(){ @@ -40,6 +42,7 @@ void register_SupraSubMoves_class(){ SupraSubMoves_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_SupraSubMoves_class(){ SupraSubMoves_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of types of SupraSubMove objects in this set" ); } @@ -63,6 +67,7 @@ void register_SupraSubMoves_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nsubmoves"), bp::arg("nsubmoves_per_block"), bp::arg("record_substats") ) + , bp::release_gil_policy() , "" ); } @@ -74,6 +79,7 @@ void register_SupraSubMoves_class(){ SupraSubMoves_exposer.def( "nSubMoveTypes" , nSubMoveTypes_function_value + , bp::release_gil_policy() , "Return the number of types of SupraSubMove objects in this set" ); } @@ -98,7 +104,7 @@ void register_SupraSubMoves_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -110,6 +116,7 @@ void register_SupraSubMoves_class(){ SupraSubMoves_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of types of SupraSubMove objects in this set" ); } @@ -121,6 +128,7 @@ void register_SupraSubMoves_class(){ SupraSubMoves_exposer.def( "subMoves" , subMoves_function_value + , bp::release_gil_policy() , "" ); } @@ -132,6 +140,7 @@ void register_SupraSubMoves_class(){ SupraSubMoves_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +152,7 @@ void register_SupraSubMoves_class(){ SupraSubMoves_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SupraSubSim.pypp.cpp b/wrapper/Move/SupraSubSim.pypp.cpp index 8f9177b62..aae8185b4 100644 --- a/wrapper/Move/SupraSubSim.pypp.cpp +++ b/wrapper/Move/SupraSubSim.pypp.cpp @@ -21,6 +21,8 @@ SireMove::SupraSubSim __copy__(const SireMove::SupraSubSim &other){ return SireM const char* pvt_get_name(const SireMove::SupraSubSim&){ return "SireMove::SupraSubSim";} +#include "Helpers/release_gil_policy.hpp" + void register_SupraSubSim_class(){ { //::SireMove::SupraSubSim @@ -36,6 +38,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "abort" , abort_function_value + , bp::release_gil_policy() , "Abort the running simulation" ); } @@ -47,6 +50,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not the simulation has finished\n(completed all of the moves)" ); } @@ -58,6 +62,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "initialMoves" , initialMoves_function_value + , bp::release_gil_policy() , "Return the Moves in the state they were in before the simulation started" ); } @@ -69,6 +74,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "initialSystem" , initialSystem_function_value + , bp::release_gil_policy() , "Return the sub-system in the state it was in before the simulation started" ); } @@ -80,6 +86,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "input" , input_function_value + , bp::release_gil_policy() , "Return the initial input simulation WorkPacket" ); } @@ -91,6 +98,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "interimMoves" , interimMoves_function_value + , bp::release_gil_policy() , "Return the current state of the moves (updated while the simulation\nis running). This will throw an exception if the system hits an\nerror state" ); } @@ -102,6 +110,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "interimResult" , interimResult_function_value + , bp::release_gil_policy() , "Return the simulation WorkPacket from an intermediate point along\nthe simulation. This will throw an error if the simulation is in an\nerror state, and the initial packet if the simulation\nwas aborted" ); } @@ -113,6 +122,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "interimSystem" , interimSystem_function_value + , bp::release_gil_policy() , "Return the current state of the System (updated while the simulation\nis running). This will throw an exception if the system hits an\nerror state" ); } @@ -124,6 +134,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "isError" , isError_function_value + , bp::release_gil_policy() , "Return whether or not this simulation is in an error state" ); } @@ -135,6 +146,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "isRunning" , isRunning_function_value + , bp::release_gil_policy() , "Return whether or not this simulation is running" ); } @@ -146,6 +158,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "Return the final state of the moves after the simulation. This\nblocks until the simulation has finished and will throw an\nexception if the system hits an error state" ); } @@ -172,6 +185,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "progress" , progress_function_value + , bp::release_gil_policy() , "Return the progress of the simulation (as a percentage)" ); } @@ -183,6 +197,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "result" , result_function_value + , bp::release_gil_policy() , "Return the final result of the simulation. This blocks until\nthe simulation has stopped, and will throw an exception if the\nsimulation is in an error state. This returns the initial\nsimulation WorkPacket if the simulation was aborted" ); } @@ -219,6 +234,7 @@ void register_SupraSubSim_class(){ "run" , run_function_value , ( bp::arg("simpacket") ) + , bp::release_gil_policy() , "Run the sub-system simulation described\nin simpacket in the current thread" ); } @@ -255,6 +271,7 @@ void register_SupraSubSim_class(){ "run" , run_function_value , ( bp::arg("node"), bp::arg("simpacket") ) + , bp::release_gil_policy() , "Run the sub-system simulation described in simpacket on the node node\nand return a handle to the running simulation" ); } @@ -266,6 +283,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "stop" , stop_function_value + , bp::release_gil_policy() , "Stop the running simulation" ); } @@ -277,6 +295,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "system" , system_function_value + , bp::release_gil_policy() , "Return the final state of the system after the simulation. This\nblocks until the simulation has finished and will throw an\nexception if the system hits an error state" ); } @@ -288,6 +307,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "throwError" , throwError_function_value + , bp::release_gil_policy() , "Throw any error associated with this simulation - this does\nnothing if we are not in an error state" ); } @@ -299,6 +319,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "wait" , wait_function_value + , bp::release_gil_policy() , "Wait for the simulation to complete" ); } @@ -311,6 +332,7 @@ void register_SupraSubSim_class(){ "wait" , wait_function_value , ( bp::arg("timeout") ) + , bp::release_gil_policy() , "Wait for the simulation to stop running, or for timeout\nmilliseconds to pass, whichever comes soonest. This returns\nwhether or not the simulation has stopped" ); } @@ -322,6 +344,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "wasAborted" , wasAborted_function_value + , bp::release_gil_policy() , "Return whether or not the simulation was aborted" ); } @@ -333,6 +356,7 @@ void register_SupraSubSim_class(){ SupraSubSim_exposer.def( "wasStopped" , wasStopped_function_value + , bp::release_gil_policy() , "Return whether or not the simulation was stopped" ); } diff --git a/wrapper/Move/SupraSubSimPacket.pypp.cpp b/wrapper/Move/SupraSubSimPacket.pypp.cpp index 87f421fd2..9686eca15 100644 --- a/wrapper/Move/SupraSubSimPacket.pypp.cpp +++ b/wrapper/Move/SupraSubSimPacket.pypp.cpp @@ -24,6 +24,8 @@ SireMove::SupraSubSimPacket __copy__(const SireMove::SupraSubSimPacket &other){ const char* pvt_get_name(const SireMove::SupraSubSimPacket&){ return "SireMove::SupraSubSimPacket";} +#include "Helpers/release_gil_policy.hpp" + void register_SupraSubSimPacket_class(){ { //::SireMove::SupraSubSimPacket @@ -40,6 +42,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "approximatePacketSize" , approximatePacketSize_function_value + , bp::release_gil_policy() , "This is likely to be large" ); } @@ -51,6 +54,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "hasFinished" , hasFinished_function_value + , bp::release_gil_policy() , "Return whether or not this work packet has finished" ); } @@ -62,6 +66,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "nSubCompleted" , nSubCompleted_function_value + , bp::release_gil_policy() , "Return the number of completed sub-moves" ); } @@ -73,6 +78,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "nSubMoves" , nSubMoves_function_value + , bp::release_gil_policy() , "Return the number of sub-moves to be applied to the sub-system" ); } @@ -99,6 +105,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "recordingSubStatistics" , recordingSubStatistics_function_value + , bp::release_gil_policy() , "Return whether or not we are recording statistics during the sub-moves" ); } @@ -110,6 +117,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "shouldPack" , shouldPack_function_value + , bp::release_gil_policy() , "We probably shouldnt pack this workpacket as it is already\nheavily packed, and if it is large, then it is likely already\npacked to disk" ); } @@ -121,7 +129,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "subMoves" , subMoves_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the moves" ); } @@ -133,7 +141,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "subSystem" , subSystem_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sub-system" ); } @@ -145,6 +153,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -156,6 +165,7 @@ void register_SupraSubSimPacket_class(){ SupraSubSimPacket_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/SupraSubSystem.pypp.cpp b/wrapper/Move/SupraSubSystem.pypp.cpp index 3de968c7d..228c5cafd 100644 --- a/wrapper/Move/SupraSubSystem.pypp.cpp +++ b/wrapper/Move/SupraSubSystem.pypp.cpp @@ -22,6 +22,8 @@ SireMove::SupraSubSystem __copy__(const SireMove::SupraSubSystem &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SupraSubSystem_class(){ { //::SireMove::SupraSubSystem @@ -37,6 +39,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "clearAllStatistics" , clearAllStatistics_function_value + , bp::release_gil_policy() , "Completely clear all statistics from this system (this\ncalls both clearStatistics and clearSubStatistics)" ); } @@ -48,6 +51,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear the SupraSubSystem level statistics (this clears the monitors\nthat are applied at the end of blocks of sub-moves)" ); } @@ -59,6 +63,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "clearSubStatistics" , clearSubStatistics_function_value + , bp::release_gil_policy() , "Clear the system level statistics (this clears the monitors\nthat are applied to the sub-system as it is being acted on\nby the sub-moves)" ); } @@ -70,6 +75,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "isPacked" , isPacked_function_value + , bp::release_gil_policy() , "Return whether or not the system is packed" ); } @@ -81,6 +87,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "isPackedToDisk" , isPackedToDisk_function_value + , bp::release_gil_policy() , "Return whether or not this system is packed to disk" ); } @@ -92,6 +99,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "isPackedToMemory" , isPackedToMemory_function_value + , bp::release_gil_policy() , "Return whether or not this system is packed to memory" ); } @@ -115,6 +123,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell the system that the next energy to be calculated\nshould be recalculated from scratch. This is mainly\nuseful for debugging" ); } @@ -126,6 +135,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "nSubMoves" , nSubMoves_function_value + , bp::release_gil_policy() , "Return the number of moves to be applied to this system" ); } @@ -137,7 +147,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the global null SupraSubSystem" ); } @@ -164,6 +174,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "pack" , pack_function_value + , bp::release_gil_policy() , "Pack the system. This does nothing if the system is already packed" ); } @@ -175,6 +186,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "packToDisk" , packToDisk_function_value + , bp::release_gil_policy() , "Pack the system to disk. This does nothing if the system\nis already packed to disk" ); } @@ -187,6 +199,7 @@ void register_SupraSubSystem_class(){ "packToDisk" , packToDisk_function_value , ( bp::arg("tempdir") ) + , bp::release_gil_policy() , "Pack the system to disk, into the directory tempdir.\nThis does nothing if the system is already packed to\ndisk (even if the system is packed into a different\ndirectory)" ); } @@ -198,6 +211,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "packToMemory" , packToMemory_function_value + , bp::release_gil_policy() , "Pack the system to memory. This does nothing if the system\nis already packed to memory" ); } @@ -209,6 +223,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "recordingStatistics" , recordingStatistics_function_value + , bp::release_gil_policy() , "Return whether or not we are recording statistics\nbetween blocks of sub-moves" ); } @@ -220,6 +235,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "recordingSubStatistics" , recordingSubStatistics_function_value + , bp::release_gil_policy() , "Return whether or not we are recording statistics within\nthe sub-system" ); } @@ -243,7 +259,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "subMoves" , subMoves_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the moves that will be applied to the sub-system\nThrow: SireError::invalid_state\n" ); } @@ -267,7 +283,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "subSystemAndMoves" , subSystemAndMoves_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return both the system and moves that are part of this sub-system" ); } @@ -279,6 +295,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -290,6 +307,7 @@ void register_SupraSubSystem_class(){ SupraSubSystem_exposer.def( "unpack" , unpack_function_value + , bp::release_gil_policy() , "Unpack the system. This does nothing if the system is already unpacked" ); } diff --git a/wrapper/Move/SupraSystem.pypp.cpp b/wrapper/Move/SupraSystem.pypp.cpp index 15ebb1676..14e634537 100644 --- a/wrapper/Move/SupraSystem.pypp.cpp +++ b/wrapper/Move/SupraSystem.pypp.cpp @@ -34,6 +34,8 @@ SireMove::SupraSystem __copy__(const SireMove::SupraSystem &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SupraSystem_class(){ @@ -103,6 +105,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "anyPacked" , anyPacked_function_value + , bp::release_gil_policy() , "Return whether or not any of the sub-systems are packed" ); } @@ -114,6 +117,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "anyPackedToDisk" , anyPackedToDisk_function_value + , bp::release_gil_policy() , "Return whether or not any of the sub-systems are packed to disk" ); } @@ -125,6 +129,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "anyPackedToMemory" , anyPackedToMemory_function_value + , bp::release_gil_policy() , "Return whether or not any of the sub-systems are packed to memory" ); } @@ -137,7 +142,7 @@ void register_SupraSystem_class(){ "at" , at_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith sub-system in this supra-system\nThrow: SireError::invalid_index\n" ); } @@ -149,6 +154,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "clearAllStatistics" , clearAllStatistics_function_value + , bp::release_gil_policy() , "Clear all statistics collected during the moves" ); } @@ -160,6 +166,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear the statistics that are collected between blocks of\nsub-system moves" ); } @@ -171,6 +178,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "clearSubStatistics" , clearSubStatistics_function_value + , bp::release_gil_policy() , "Clear the statistics that are collected within blocks of\nsub-system moves" ); } @@ -182,6 +190,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "collectSupraStats" , collectSupraStats_function_value + , bp::release_gil_policy() , "This function is called after each SupraMove to collect any statistics\nabout the SupraSystem" ); } @@ -193,6 +202,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of sub-systems in this supra-system" ); } @@ -204,6 +214,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this SupraSystem contains no subsystems" ); } @@ -215,6 +226,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "isPacked" , isPacked_function_value + , bp::release_gil_policy() , "Return whether or not all sub-systems are packed" ); } @@ -226,6 +238,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "isPackedToDisk" , isPackedToDisk_function_value + , bp::release_gil_policy() , "Return whether or not all sub-systems are packed to disk" ); } @@ -237,6 +250,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "isPackedToMemory" , isPackedToMemory_function_value + , bp::release_gil_policy() , "Return whether or not all sub-systems are packed to memory" ); } @@ -248,6 +262,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell all sub-systems that the next energy calculate must\nbe performed from scratch - this is useful for debugging" ); } @@ -259,6 +274,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "nSubSystems" , nSubSystems_function_value + , bp::release_gil_policy() , "Return the number of sub-systems in this supra-system" ); } @@ -270,7 +286,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the global null SupraSystem" ); } @@ -298,7 +314,7 @@ void register_SupraSystem_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -310,6 +326,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "pack" , pack_function_value + , bp::release_gil_policy() , "Pack all sub-systems" ); } @@ -322,6 +339,7 @@ void register_SupraSystem_class(){ "pack" , pack_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Pack the ith sub-system\nThrow: SireError::invalid_index\n" ); } @@ -333,6 +351,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "packToDisk" , packToDisk_function_value + , bp::release_gil_policy() , "Pack all sub-systems to disk" ); } @@ -345,6 +364,7 @@ void register_SupraSystem_class(){ "packToDisk" , packToDisk_function_value , ( bp::arg("tempdir") ) + , bp::release_gil_policy() , "Pack all sub-systems to disk, in the directory tempdir. Note\nthat this will not move sub-systems that are already packed into\na different directory" ); } @@ -357,6 +377,7 @@ void register_SupraSystem_class(){ "packToDisk" , packToDisk_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Pack the ith sub-system to disk\nThrow: SireError::invalid_index\n" ); } @@ -369,6 +390,7 @@ void register_SupraSystem_class(){ "packToDisk" , packToDisk_function_value , ( bp::arg("i"), bp::arg("tempdir") ) + , bp::release_gil_policy() , "Pack the ith sub-system to disk in the directory tempdir\nThrow: SireError::invalid_index\n" ); } @@ -380,6 +402,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "packToMemory" , packToMemory_function_value + , bp::release_gil_policy() , "Pack all sub-systems to memory" ); } @@ -392,6 +415,7 @@ void register_SupraSystem_class(){ "packToMemory" , packToMemory_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Pack the ith sub-system to memory\nThrow: SireError::invalid_index\n" ); } @@ -404,6 +428,7 @@ void register_SupraSystem_class(){ "setNSubMoves" , setNSubMoves_function_value , ( bp::arg("i"), bp::arg("nmoves") ) + , bp::release_gil_policy() , "Set the number of moves to perform per block of sub-moves for\nthe ith sub-system\nThrow: SireError::invalid_index\n" ); } @@ -416,6 +441,7 @@ void register_SupraSystem_class(){ "setNSubMoves" , setNSubMoves_function_value , ( bp::arg("nmoves") ) + , bp::release_gil_policy() , "Set the number of moves to perform per block of sub-moves for\nevery sub-system in this supra-system" ); } @@ -428,6 +454,7 @@ void register_SupraSystem_class(){ "setRecordAllStatistics" , setRecordAllStatistics_function_value , ( bp::arg("i"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Set whether or not to record all statistics (both within and\nbetween sub-moves) for the ith sub-system\nThrow: SireError::invalid_index\n" ); } @@ -440,6 +467,7 @@ void register_SupraSystem_class(){ "setRecordAllStatistics" , setRecordAllStatistics_function_value , ( bp::arg("record_stats") ) + , bp::release_gil_policy() , "Set whether or not to record all statistics (both within and\nbetween sub-moves) for all sub-systems" ); } @@ -452,6 +480,7 @@ void register_SupraSystem_class(){ "setRecordStatistics" , setRecordStatistics_function_value , ( bp::arg("i"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Set whether or not to record statistics between blocks of sub-moves\nat the ith sub-system\nThrow: SireError::invalid_index\n" ); } @@ -464,6 +493,7 @@ void register_SupraSystem_class(){ "setRecordStatistics" , setRecordStatistics_function_value , ( bp::arg("record_stats") ) + , bp::release_gil_policy() , "Set whether or not to record statistics between blocks of sub-moves\nfor all sub-systems" ); } @@ -476,6 +506,7 @@ void register_SupraSystem_class(){ "setRecordSubStatistics" , setRecordSubStatistics_function_value , ( bp::arg("i"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Set whether or not to record statistics within blocks of sub-moves\nfor the ith sub-system\nThrow: SireError::invalid_index\n" ); } @@ -488,6 +519,7 @@ void register_SupraSystem_class(){ "setRecordSubStatistics" , setRecordSubStatistics_function_value , ( bp::arg("record_stats") ) + , bp::release_gil_policy() , "Set whether or not to record statistics within blocks of sub-moves\nfor all sub-systems" ); } @@ -524,6 +556,7 @@ void register_SupraSystem_class(){ "setSubMoves" , setSubMoves_function_value , ( bp::arg("i"), bp::arg("moves") ) + , bp::release_gil_policy() , "Set the moves that will be applied to the ith sub-system during\neach sub-move\nThrow: SireError::invalid_index\n" ); } @@ -536,6 +569,7 @@ void register_SupraSystem_class(){ "setSubMoves" , setSubMoves_function_value , ( bp::arg("moves") ) + , bp::release_gil_policy() , "Set the moves that will be applied to all sub-systems during\neach sub-move\nThrow: SireError::invalid_index\n" ); } @@ -548,6 +582,7 @@ void register_SupraSystem_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("i"), bp::arg("subsystem") ) + , bp::release_gil_policy() , "Set the ith sub-system equal to subsystem\nThrow: SireError::invalid_index\n" ); } @@ -560,6 +595,7 @@ void register_SupraSystem_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("subsystem") ) + , bp::release_gil_policy() , "Set all sub-systems equal to subsystem" ); } @@ -572,6 +608,7 @@ void register_SupraSystem_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("i"), bp::arg("system") ) + , bp::release_gil_policy() , "Set the SireSystem::System used by the ith sub-system equal to system\nThrow: SireError::invalid_index\n" ); } @@ -584,6 +621,7 @@ void register_SupraSystem_class(){ "setSubSystem" , setSubSystem_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Set the SireSystem::System used by all sub-systems equal to system" ); } @@ -596,6 +634,7 @@ void register_SupraSystem_class(){ "setSubSystemAndMoves" , setSubSystemAndMoves_function_value , ( bp::arg("i"), bp::arg("system"), bp::arg("moves") ) + , bp::release_gil_policy() , "Set the system and moves that will be applied to the ith sub-system\nto system and moves\nThrow: SireError::invalid_index\n" ); } @@ -608,6 +647,7 @@ void register_SupraSystem_class(){ "setSubSystemAndMoves" , setSubSystemAndMoves_function_value , ( bp::arg("system"), bp::arg("moves") ) + , bp::release_gil_policy() , "Set the system and moves used by all sub-systems to\nsystem and moves" ); } @@ -620,6 +660,7 @@ void register_SupraSystem_class(){ "setSubSystemAndMoves" , setSubSystemAndMoves_function_value , ( bp::arg("i"), bp::arg("simstore") ) + , bp::release_gil_policy() , "Set the system and moves used for the ith sub-system to those\ncontained in simstore\nThrow: SireError::invalid_index\n" ); } @@ -632,6 +673,7 @@ void register_SupraSystem_class(){ "setSubSystemAndMoves" , setSubSystemAndMoves_function_value , ( bp::arg("simstore") ) + , bp::release_gil_policy() , "Set the system and moves used for all sub-systems to those\ncontained in simstore" ); } @@ -644,6 +686,7 @@ void register_SupraSystem_class(){ "setSubSystems" , setSubSystems_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Set all sub-systems equal to a copy of those in system. Note\nthat both this SupraSystem and other must have the same\nnumber of sub-systems\nThrow: SireError::incompatible_error\n" ); } @@ -655,6 +698,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of sub-systems in this supra-system" ); } @@ -666,6 +710,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -677,6 +722,7 @@ void register_SupraSystem_class(){ SupraSystem_exposer.def( "unpack" , unpack_function_value + , bp::release_gil_policy() , "Unpack all sub-systems" ); } @@ -689,6 +735,7 @@ void register_SupraSystem_class(){ "unpack" , unpack_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Unpack the ith sub-system\nThrow: SireError::invalid_index\n" ); } diff --git a/wrapper/Move/SystemWideDeleter.pypp.cpp b/wrapper/Move/SystemWideDeleter.pypp.cpp index 9fe8891e2..8ec34b8d3 100644 --- a/wrapper/Move/SystemWideDeleter.pypp.cpp +++ b/wrapper/Move/SystemWideDeleter.pypp.cpp @@ -30,6 +30,8 @@ SireMove::SystemWideDeleter __copy__(const SireMove::SystemWideDeleter &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SystemWideDeleter_class(){ { //::SireMove::SystemWideDeleter @@ -48,6 +50,7 @@ void register_SystemWideDeleter_class(){ "deleteFrom" , deleteFrom_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Delete a molecule from the system. This returns the molecule that\nwas deleted, and the probability with which it was sampled\n(normalised so that a probability of 1 is returned if the molecule\nwas picked purely randomly). This deleter deletes the molecule\nfrom the entire system. This returns an empty molecule if\nthe molecule was not contained in the system and nothing\nwas deleted" ); } @@ -71,7 +74,7 @@ void register_SystemWideDeleter_class(){ SystemWideDeleter_exposer.def( "group" , group_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group from which molecules to be\ndeleted are chosen" ); } @@ -98,7 +101,7 @@ void register_SystemWideDeleter_class(){ SystemWideDeleter_exposer.def( "sampler" , sampler_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sampler used to pick molecules to be deleted" ); } @@ -111,6 +114,7 @@ void register_SystemWideDeleter_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator used by the sampler" ); } @@ -123,6 +127,7 @@ void register_SystemWideDeleter_class(){ "setGroup" , setGroup_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the molecule group that will be sampled by the sampler" ); } @@ -135,6 +140,7 @@ void register_SystemWideDeleter_class(){ "setSampler" , setSampler_function_value , ( bp::arg("sampler") ) + , bp::release_gil_policy() , "Set the sampler used to pick molecules to be deleted" ); } @@ -147,6 +153,7 @@ void register_SystemWideDeleter_class(){ "setSampler" , setSampler_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the sampler to be the one that selects molecules uniformly\nfrom the passed molecule group" ); } @@ -158,6 +165,7 @@ void register_SystemWideDeleter_class(){ SystemWideDeleter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/TitrationMove.pypp.cpp b/wrapper/Move/TitrationMove.pypp.cpp index 256bde06c..7aac97535 100644 --- a/wrapper/Move/TitrationMove.pypp.cpp +++ b/wrapper/Move/TitrationMove.pypp.cpp @@ -31,6 +31,8 @@ SireMove::TitrationMove __copy__(const SireMove::TitrationMove &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TitrationMove_class(){ { //::SireMove::TitrationMove @@ -73,6 +75,7 @@ void register_TitrationMove_class(){ TitrationMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the move" ); } @@ -84,6 +87,7 @@ void register_TitrationMove_class(){ TitrationMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +99,7 @@ void register_TitrationMove_class(){ TitrationMove_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/Titrator.pypp.cpp b/wrapper/Move/Titrator.pypp.cpp index 3bb39a2e7..1e9acf028 100644 --- a/wrapper/Move/Titrator.pypp.cpp +++ b/wrapper/Move/Titrator.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; #include "SireMol/atomcharges.h" +#include "SireMol/core.h" + #include "SireMol/editor.hpp" #include "SireMol/evaluator.h" @@ -45,6 +47,8 @@ SireMove::Titrator __copy__(const SireMove::Titrator &other){ return SireMove::T #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Titrator_class(){ { //::SireMove::Titrator @@ -62,6 +66,7 @@ void register_Titrator_class(){ "applyTo" , applyTo_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Apply the set of charges to the passed system" ); } @@ -74,6 +79,7 @@ void register_Titrator_class(){ "getCharge" , getCharge_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the charge of the ith molecule" ); } @@ -86,6 +92,7 @@ void register_Titrator_class(){ "getIonIndex" , getIonIndex_function_value , ( bp::arg("ion_index") ) + , bp::release_gil_policy() , "Return the index of the molecule at ion_index ion_index" ); } @@ -98,6 +105,7 @@ void register_Titrator_class(){ "getNegativeIonIndex" , getNegativeIonIndex_function_value , ( bp::arg("ion_index") ) + , bp::release_gil_policy() , "Return the index of the molecule at negative ion_index ion_index" ); } @@ -110,6 +118,7 @@ void register_Titrator_class(){ "getNeutralIndex" , getNeutralIndex_function_value , ( bp::arg("neutral_index") ) + , bp::release_gil_policy() , "Return the index of the molecule at neutral ion_index" ); } @@ -122,6 +131,7 @@ void register_Titrator_class(){ "getPositiveIonIndex" , getPositiveIonIndex_function_value , ( bp::arg("ion_index") ) + , bp::release_gil_policy() , "Return the index of the molecule at positive ion_index ion_index" ); } @@ -133,6 +143,7 @@ void register_Titrator_class(){ Titrator_exposer.def( "nIons" , nIons_function_value + , bp::release_gil_policy() , "Return the number of ions" ); } @@ -144,6 +155,7 @@ void register_Titrator_class(){ Titrator_exposer.def( "nNegativeIons" , nNegativeIons_function_value + , bp::release_gil_policy() , "Return the number of negative ions" ); } @@ -155,6 +167,7 @@ void register_Titrator_class(){ Titrator_exposer.def( "nNeutrals" , nNeutrals_function_value + , bp::release_gil_policy() , "Return the number of neutral molecules" ); } @@ -166,6 +179,7 @@ void register_Titrator_class(){ Titrator_exposer.def( "nPositiveIons" , nPositiveIons_function_value + , bp::release_gil_policy() , "Return the number of positive ions" ); } @@ -193,6 +207,7 @@ void register_Titrator_class(){ "randomiseCharge" , randomiseCharge_function_value , ( bp::arg("ncharges") ) + , bp::release_gil_policy() , "Randomise all of the charges - this ensures that there are 2ncharges charges\nin the system (ncharges positive, and ncharges negative, with the rest neutral)" ); } @@ -205,6 +220,7 @@ void register_Titrator_class(){ "randomiseCharge" , randomiseCharge_function_value , ( bp::arg("npositive"), bp::arg("nnegative") ) + , bp::release_gil_policy() , "Randomise all of the charges, ensuring there are npositive positive charges\nand nnegative negative charges" ); } @@ -217,6 +233,7 @@ void register_Titrator_class(){ "setMoleculeGroup" , setMoleculeGroup_function_value , ( bp::arg("group") ) + , bp::release_gil_policy() , "Set the molecule group containing the molecules whose charge\nstate will be changed" ); } @@ -301,6 +318,7 @@ void register_Titrator_class(){ "swapCharge" , swapCharge_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Swap the charge of the ith and jth molecules" ); } @@ -312,6 +330,7 @@ void register_Titrator_class(){ Titrator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -323,6 +342,7 @@ void register_Titrator_class(){ Titrator_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/UniformInserter.pypp.cpp b/wrapper/Move/UniformInserter.pypp.cpp index 04f0e21e2..fb203f5e0 100644 --- a/wrapper/Move/UniformInserter.pypp.cpp +++ b/wrapper/Move/UniformInserter.pypp.cpp @@ -9,6 +9,8 @@ namespace bp = boost::python; #include "SireMaths/quaternion.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/partialmolecule.h" @@ -35,6 +37,8 @@ SireMove::UniformInserter __copy__(const SireMove::UniformInserter &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_UniformInserter_class(){ { //::SireMove::UniformInserter @@ -52,6 +56,7 @@ void register_UniformInserter_class(){ "insert" , insert_function_value , ( bp::arg("molecule"), bp::arg("system"), bp::arg("space") ) + , bp::release_gil_policy() , "This funciton inserts the molecule molecule into system at\na random orientation and position within the space space" ); } @@ -64,6 +69,7 @@ void register_UniformInserter_class(){ "insert" , insert_function_value , ( bp::arg("molecule"), bp::arg("system"), bp::arg("space") ) + , bp::release_gil_policy() , "This funciton inserts the molecule molecule into system at\na random orientation and position within the space space" ); } @@ -90,6 +96,7 @@ void register_UniformInserter_class(){ UniformInserter_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/UniformSampler.pypp.cpp b/wrapper/Move/UniformSampler.pypp.cpp index 2e08b641a..67ce8cf94 100644 --- a/wrapper/Move/UniformSampler.pypp.cpp +++ b/wrapper/Move/UniformSampler.pypp.cpp @@ -29,6 +29,8 @@ SireMove::UniformSampler __copy__(const SireMove::UniformSampler &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_UniformSampler_class(){ { //::SireMove::UniformSampler @@ -59,6 +61,7 @@ void register_UniformSampler_class(){ "probabilityOf" , probabilityOf_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Return the probability of selecting the view in molview from\nthe system system. A probability of zero is returned if\nthis view cannot be chosen from the molecule group." ); } @@ -71,6 +74,7 @@ void register_UniformSampler_class(){ "probabilityOfMolecule" , probabilityOfMolecule_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Return the probability of selecting the molecule molecule from\nthe system system. A probability of zero is returned if\nthis molecule cannot be chosen from the molecule group" ); } @@ -82,6 +86,7 @@ void register_UniformSampler_class(){ UniformSampler_exposer.def( "sample" , sample_function_value + , bp::release_gil_policy() , "Return a random view molecule from the molecule group, together with\nthe probability of choosing that view." ); } @@ -93,6 +98,7 @@ void register_UniformSampler_class(){ UniformSampler_exposer.def( "sampleMolecule" , sampleMolecule_function_value + , bp::release_gil_policy() , "Return a random molecule from the molecule group, together with\nthe probability of choosing that molecule. This returns the entire\nmolecule even if only a part of the molecule is in the group" ); } @@ -104,6 +110,7 @@ void register_UniformSampler_class(){ UniformSampler_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/VelocitiesFromProperty.pypp.cpp b/wrapper/Move/VelocitiesFromProperty.pypp.cpp index 16e3c95f0..728cd4082 100644 --- a/wrapper/Move/VelocitiesFromProperty.pypp.cpp +++ b/wrapper/Move/VelocitiesFromProperty.pypp.cpp @@ -41,6 +41,8 @@ SireMove::VelocitiesFromProperty __copy__(const SireMove::VelocitiesFromProperty #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VelocitiesFromProperty_class(){ { //::SireMove::VelocitiesFromProperty @@ -84,6 +86,7 @@ void register_VelocitiesFromProperty_class(){ VelocitiesFromProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/VelocityGenerator.pypp.cpp b/wrapper/Move/VelocityGenerator.pypp.cpp index 2a03f477a..d292e8de8 100644 --- a/wrapper/Move/VelocityGenerator.pypp.cpp +++ b/wrapper/Move/VelocityGenerator.pypp.cpp @@ -39,6 +39,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VelocityGenerator_class(){ { //::SireMove::VelocityGenerator @@ -78,6 +80,7 @@ void register_VelocityGenerator_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator that may be used to help\ngenerate the initial velocities" ); } @@ -89,6 +92,7 @@ void register_VelocityGenerator_class(){ VelocityGenerator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/VelocityVerlet.pypp.cpp b/wrapper/Move/VelocityVerlet.pypp.cpp index 2c6822865..879ce03e5 100644 --- a/wrapper/Move/VelocityVerlet.pypp.cpp +++ b/wrapper/Move/VelocityVerlet.pypp.cpp @@ -15,6 +15,8 @@ namespace bp = boost::python; #include "SireMol/atommasses.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleculegroup.h" @@ -47,6 +49,8 @@ SireMove::VelocityVerlet __copy__(const SireMove::VelocityVerlet &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VelocityVerlet_class(){ { //::SireMove::VelocityVerlet @@ -86,6 +90,7 @@ void register_VelocityVerlet_class(){ VelocityVerlet_exposer.def( "ensemble" , ensemble_function_value + , bp::release_gil_policy() , "Return the ensemble of this integrator" ); } @@ -98,6 +103,7 @@ void register_VelocityVerlet_class(){ "integrate" , integrate_function_value , ( bp::arg("workspace"), bp::arg("nrg_component"), bp::arg("timestep"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Integrate the coordinates of the atoms in the molecules in molgroup\nusing the forces in forcetable, using the optionally supplied\nproperty map to find the necessary molecular properties\nThrow: SireMol::missing_molecule\nThrow: SireBase::missing_property\nThrow: SireError:invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -109,6 +115,7 @@ void register_VelocityVerlet_class(){ VelocityVerlet_exposer.def( "isTimeReversible" , isTimeReversible_function_value + , bp::release_gil_policy() , "Return whether or not this integrator is time-reversible" ); } @@ -135,6 +142,7 @@ void register_VelocityVerlet_class(){ VelocityVerlet_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this integrator" ); } @@ -146,6 +154,7 @@ void register_VelocityVerlet_class(){ VelocityVerlet_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/VolumeChanger.pypp.cpp b/wrapper/Move/VolumeChanger.pypp.cpp index caf779706..759cb5d06 100644 --- a/wrapper/Move/VolumeChanger.pypp.cpp +++ b/wrapper/Move/VolumeChanger.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VolumeChanger_class(){ { //::SireMove::VolumeChanger @@ -74,7 +76,7 @@ void register_VolumeChanger_class(){ VolumeChanger_exposer.def( "groupID" , groupID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the molecule group(s) that will be affected\nby this volume changer" ); } @@ -111,6 +113,7 @@ void register_VolumeChanger_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Set the random number generator that may be used to generate\nnew volumes" ); } @@ -123,6 +126,7 @@ void register_VolumeChanger_class(){ "setGroup" , setGroup_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Set the ID of the molecule group(s) that will be affected by\nthis volume changer" ); } @@ -135,6 +139,7 @@ void register_VolumeChanger_class(){ "setGroup" , setGroup_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the molecule group that is affected by this volume changer\n- this will match the group based on its molecule group number" ); } @@ -158,6 +163,7 @@ void register_VolumeChanger_class(){ VolumeChanger_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/VolumeMove.pypp.cpp b/wrapper/Move/VolumeMove.pypp.cpp index 81eeb44e1..a642d21f9 100644 --- a/wrapper/Move/VolumeMove.pypp.cpp +++ b/wrapper/Move/VolumeMove.pypp.cpp @@ -44,6 +44,8 @@ SireMove::VolumeMove __copy__(const SireMove::VolumeMove &other){ return SireMov #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VolumeMove_class(){ { //::SireMove::VolumeMove @@ -62,7 +64,7 @@ void register_VolumeMove_class(){ VolumeMove_exposer.def( "groupID" , groupID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID that matches the molecule groups that\nwill be affected by this move" ); } @@ -114,6 +116,7 @@ void register_VolumeMove_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used by this move" ); } @@ -126,6 +129,7 @@ void register_VolumeMove_class(){ "setMaximumVolumeChange" , setMaximumVolumeChange_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum change in volume" ); } @@ -138,6 +142,7 @@ void register_VolumeMove_class(){ "setVolumeChanger" , setVolumeChanger_function_value , ( bp::arg("volchanger") ) + , bp::release_gil_policy() , "Set the volume changer used to change the volume to volchanger" ); } @@ -150,6 +155,7 @@ void register_VolumeMove_class(){ "setVolumeChanger" , setVolumeChanger_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the volume changer used to change the volume to a\nScaleVolumeFromCenter that scales the molecules in molgroup\nfrom the center of a box centered at (0,0,0)" ); } @@ -161,6 +167,7 @@ void register_VolumeMove_class(){ VolumeMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -172,6 +179,7 @@ void register_VolumeMove_class(){ VolumeMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -183,7 +191,7 @@ void register_VolumeMove_class(){ VolumeMove_exposer.def( "volumeChanger" , volumeChanger_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the volume changer used to change the volume" ); } diff --git a/wrapper/Move/WeightedMoves.pypp.cpp b/wrapper/Move/WeightedMoves.pypp.cpp index f481f0a14..3c200aeda 100644 --- a/wrapper/Move/WeightedMoves.pypp.cpp +++ b/wrapper/Move/WeightedMoves.pypp.cpp @@ -34,6 +34,8 @@ SireMove::WeightedMoves __copy__(const SireMove::WeightedMoves &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_WeightedMoves_class(){ @@ -63,6 +65,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Completely clear all of the move statistics" ); } @@ -74,6 +77,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "clearTiming" , clearTiming_function_value + , bp::release_gil_policy() , "Clear all of the timing information" ); } @@ -85,7 +89,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "energyComponent" , energyComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy component used by these moves. An exception\nwill be raised if the component moves use different energy\ncomponents to one another\nThrow: SireError::incompatible_error\n" ); } @@ -109,6 +113,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "hasCombinedSpaceProperty" , hasCombinedSpaceProperty_function_value + , bp::release_gil_policy() , "Return whether or not these moves use a combined space to\ncalculate the volume" ); } @@ -121,6 +126,7 @@ void register_WeightedMoves_class(){ "move" , move_function_value , ( bp::arg("system"), bp::arg("nmoves"), bp::arg("record_stats") ) + , bp::release_gil_policy() , "Perform nmoves moves on the system system and return the result" ); } @@ -132,6 +138,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "moves" , moves_function_value + , bp::release_gil_policy() , "Return the moves available in this set" ); } @@ -159,6 +166,7 @@ void register_WeightedMoves_class(){ "setCombinedSpaceProperty" , setCombinedSpaceProperty_function_value , ( bp::arg("spaceproperty") ) + , bp::release_gil_policy() , "Set the combined space property - this tells this moves object\nto return a different space that represents the combined space\nof all of the sub-moves. Note that this does not change the\nspace used in the sub-moves" ); } @@ -171,6 +179,7 @@ void register_WeightedMoves_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Set the energy component of all of the moves to component" ); } @@ -183,6 +192,7 @@ void register_WeightedMoves_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used to pick moves, and also\nused by the moves themselves during the simulation" ); } @@ -195,6 +205,7 @@ void register_WeightedMoves_class(){ "setSpaceProperty" , setSpaceProperty_function_value , ( bp::arg("spaceproperty") ) + , bp::release_gil_policy() , "Set the name of the property that all of the moves will use to\nfind the simulation space (simulation box) to spaceproperty" ); } @@ -218,6 +229,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "timing" , timing_function_value + , bp::release_gil_policy() , "Return the average time to perform each move" ); } @@ -229,6 +241,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -240,6 +253,7 @@ void register_WeightedMoves_class(){ WeightedMoves_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/ZMatMove.pypp.cpp b/wrapper/Move/ZMatMove.pypp.cpp index 58fbcdd1b..2bc9e5d54 100644 --- a/wrapper/Move/ZMatMove.pypp.cpp +++ b/wrapper/Move/ZMatMove.pypp.cpp @@ -10,6 +10,8 @@ namespace bp = boost::python; #include "SireMol/atomidx.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" @@ -46,6 +48,8 @@ SireMove::ZMatMove __copy__(const SireMove::ZMatMove &other){ return SireMove::Z #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ZMatMove_class(){ { //::SireMove::ZMatMove @@ -63,7 +67,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that is sampled for this move" ); } @@ -102,7 +106,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "sampler" , sampler_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the sampler used to sample molecules to move" ); } @@ -115,6 +119,7 @@ void register_ZMatMove_class(){ "setGenerator" , setGenerator_function_value , ( bp::arg("rangenerator") ) + , bp::release_gil_policy() , "Set the random number generator used to generate the random\nnumber used for this move" ); } @@ -127,6 +132,7 @@ void register_ZMatMove_class(){ "setSampler" , setSampler_function_value , ( bp::arg("sampler") ) + , bp::release_gil_policy() , "Set the sampler used to sample molecules for this move" ); } @@ -139,6 +145,7 @@ void register_ZMatMove_class(){ "setSampler" , setSampler_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Set the sampler so that it draws molecules uniformly from the\nmolecule group molgroup" ); } @@ -151,6 +158,7 @@ void register_ZMatMove_class(){ "setSynchronisedAngles" , setSynchronisedAngles_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to synchronise all angle moves for all molecules" ); } @@ -163,6 +171,7 @@ void register_ZMatMove_class(){ "setSynchronisedBonds" , setSynchronisedBonds_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to synchronise all bond moves for all molecules" ); } @@ -175,6 +184,7 @@ void register_ZMatMove_class(){ "setSynchronisedDihedrals" , setSynchronisedDihedrals_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to synchronise all dihedral moves for all molecules" ); } @@ -187,6 +197,7 @@ void register_ZMatMove_class(){ "setSynchronisedMotion" , setSynchronisedMotion_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not to synchronise all motion for all molecules\nin the group" ); } @@ -199,6 +210,7 @@ void register_ZMatMove_class(){ "setZMatrixProperty" , setZMatrixProperty_function_value , ( bp::arg("property") ) + , bp::release_gil_policy() , "Set the name of the property used to find the z-matrix of each molecule" ); } @@ -210,6 +222,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "synchronisedAngles" , synchronisedAngles_function_value + , bp::release_gil_policy() , "Return whether or not all angle moves for all molecules\nare synchronised" ); } @@ -221,6 +234,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "synchronisedBonds" , synchronisedBonds_function_value + , bp::release_gil_policy() , "Return whether or not all bond moves for all molecules\nare synchronised" ); } @@ -232,6 +246,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "synchronisedDihedrals" , synchronisedDihedrals_function_value + , bp::release_gil_policy() , "Return whether or not all dihedral moves for all molecules\nare synchronised" ); } @@ -243,6 +258,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "synchronisedMotion" , synchronisedMotion_function_value + , bp::release_gil_policy() , "Return whether or not all moves for all molecules are synchronised" ); } @@ -254,6 +270,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this move" ); } @@ -265,6 +282,7 @@ void register_ZMatMove_class(){ ZMatMove_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/ZMatrix.pypp.cpp b/wrapper/Move/ZMatrix.pypp.cpp index 90c3b4480..1183f0975 100644 --- a/wrapper/Move/ZMatrix.pypp.cpp +++ b/wrapper/Move/ZMatrix.pypp.cpp @@ -53,6 +53,8 @@ SireMove::ZMatrix __copy__(const SireMove::ZMatrix &other){ return SireMove::ZMa #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ZMatrix_class(){ { //::SireMove::ZMatrix @@ -71,6 +73,7 @@ void register_ZMatrix_class(){ "add" , add_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Add a line to the z-matrix that gives the coordinates of the\natom atom based on the passed bond, angle and dihedal atoms\nAn exception is raised if adding this line would lead\nto a circular reference\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -83,6 +86,7 @@ void register_ZMatrix_class(){ "add" , add_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Add a line to the z-matrix that gives the coordinates of the\npassed dihedral\nAn exception is raised if adding this line would lead\nto a circular reference\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -95,6 +99,7 @@ void register_ZMatrix_class(){ "add" , add_function_value , ( bp::arg("zmatline") ) + , bp::release_gil_policy() , "Add the z-matrix line zmatline.\nAn exception is raised if adding this line would lead to\na circular reference\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -107,6 +112,7 @@ void register_ZMatrix_class(){ "angleDelta" , angleDelta_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the maximum amount that the angle to atom atom\nshould be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -119,6 +125,7 @@ void register_ZMatrix_class(){ "angleDelta" , angleDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle") ) + , bp::release_gil_policy() , "Return the maximum amount that the angle between atoms\natom-bond-angle should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -156,6 +163,7 @@ void register_ZMatrix_class(){ "bondDelta" , bondDelta_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the maximum amount that the bond to atom atom\nshould be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -168,6 +176,7 @@ void register_ZMatrix_class(){ "bondDelta" , bondDelta_function_value , ( bp::arg("atom"), bp::arg("bond") ) + , bp::release_gil_policy() , "Return the maximum amount that the bond between atoms\natom-bond should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -180,6 +189,7 @@ void register_ZMatrix_class(){ "contains" , contains_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix contains a line for the\natom with ID atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -192,6 +202,7 @@ void register_ZMatrix_class(){ "contains" , contains_function_value , ( bp::arg("atom"), bp::arg("bond") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix contains the bond between\natoms atom-bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -204,6 +215,7 @@ void register_ZMatrix_class(){ "contains" , contains_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix contains the angle\natom-bond-angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -216,6 +228,7 @@ void register_ZMatrix_class(){ "contains" , contains_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix contains the dihedral\natom-bond-angle-dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -228,6 +241,7 @@ void register_ZMatrix_class(){ "contains" , contains_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix contains bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -240,6 +254,7 @@ void register_ZMatrix_class(){ "contains" , contains_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix contains angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -252,6 +267,7 @@ void register_ZMatrix_class(){ "contains" , contains_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix contains dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -264,6 +280,7 @@ void register_ZMatrix_class(){ "delta" , delta_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the maximum amount that bond should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -276,6 +293,7 @@ void register_ZMatrix_class(){ "delta" , delta_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return the maximum amount that angle should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -288,6 +306,7 @@ void register_ZMatrix_class(){ "delta" , delta_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the maximum amount that dihedral should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -300,6 +319,7 @@ void register_ZMatrix_class(){ "dihedralDelta" , dihedralDelta_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the maximum amount that the dihedral to atom atom\nshould be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -312,6 +332,7 @@ void register_ZMatrix_class(){ "dihedralDelta" , dihedralDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the maximum amount that the dihedral between atoms\natom-bond-angle-dihedral should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -324,6 +345,7 @@ void register_ZMatrix_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the atom\nwith ID atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -336,6 +358,7 @@ void register_ZMatrix_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom"), bp::arg("bond") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the\nbond between atoms atom-bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -348,6 +371,7 @@ void register_ZMatrix_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the\nbond between atoms atom-bond-angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -360,6 +384,7 @@ void register_ZMatrix_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the\nbond between atoms atom-bond-angle-dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -372,6 +397,7 @@ void register_ZMatrix_class(){ "getIndex" , getIndex_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that defines the\nbond bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -384,6 +410,7 @@ void register_ZMatrix_class(){ "getIndex" , getIndex_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that defines the\nangle angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -396,6 +423,7 @@ void register_ZMatrix_class(){ "getIndex" , getIndex_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that defines the\ndihedral dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -432,6 +460,7 @@ void register_ZMatrix_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this z-matrix is compatible with the\nthe molecule whose info is in molinfo" ); } @@ -456,6 +485,7 @@ void register_ZMatrix_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return a z-matrix that only contains lines that involve the atoms\nthat are in selection" ); } @@ -467,6 +497,7 @@ void register_ZMatrix_class(){ ZMatrix_exposer.def( "nLines" , nLines_function_value + , bp::release_gil_policy() , "Return the number of lines in this z-matrix" ); } @@ -507,6 +538,7 @@ void register_ZMatrix_class(){ "remove" , remove_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Remove the z-matrix line that gives the coordinates of the\natom atom. This does nothing if there is no z-matrix\nline for this atom - note this removes the lines for\nall matching atoms\nThrow: SireMol::missing_atom\nThrow: SireError::invalid_index\n" ); } @@ -519,6 +551,7 @@ void register_ZMatrix_class(){ "remove" , remove_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Remove the z-matrix line involving the specified atom, bond,\nangle and dihedral. This matches only a single line, and\nwill do nothing if this line is not in this z-matrix\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -531,6 +564,7 @@ void register_ZMatrix_class(){ "remove" , remove_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Remove the z-matrix line involving the specified dihedral.\nThis matches only a single line, and\nwill do nothing if this line is not in this z-matrix\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -543,6 +577,7 @@ void register_ZMatrix_class(){ "remove" , remove_function_value , ( bp::arg("zmatline") ) + , bp::release_gil_policy() , "Remove the z-matrix line zmatline from this z-matrix" ); } @@ -555,6 +590,7 @@ void register_ZMatrix_class(){ "setAngleDelta" , setAngleDelta_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the angle for the atom atom\ncan be changed to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -567,6 +603,7 @@ void register_ZMatrix_class(){ "setAngleDelta" , setAngleDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the angle between atoms atom-bond-angle\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -579,6 +616,7 @@ void register_ZMatrix_class(){ "setBondDelta" , setBondDelta_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the bond for the atom atom\ncan be moved to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -591,6 +629,7 @@ void register_ZMatrix_class(){ "setBondDelta" , setBondDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the bond between atoms atom-bond\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -603,6 +642,7 @@ void register_ZMatrix_class(){ "setDelta" , setDelta_function_value , ( bp::arg("bond"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the bond bond\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -615,6 +655,7 @@ void register_ZMatrix_class(){ "setDelta" , setDelta_function_value , ( bp::arg("angle"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the angle angle\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -627,6 +668,7 @@ void register_ZMatrix_class(){ "setDelta" , setDelta_function_value , ( bp::arg("dihedral"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the dihedral dihedral\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -639,6 +681,7 @@ void register_ZMatrix_class(){ "setDihedralDelta" , setDihedralDelta_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the dihedral for the atom atom\ncan be changed to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -651,6 +694,7 @@ void register_ZMatrix_class(){ "setDihedralDelta" , setDihedralDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the dihedral between atoms\natom-bond-angle-dihedral can be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -662,6 +706,7 @@ void register_ZMatrix_class(){ ZMatrix_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this z-matrix" ); } @@ -673,6 +718,7 @@ void register_ZMatrix_class(){ ZMatrix_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/ZMatrixCoords.pypp.cpp b/wrapper/Move/ZMatrixCoords.pypp.cpp index 77acfd0f1..5d8492076 100644 --- a/wrapper/Move/ZMatrixCoords.pypp.cpp +++ b/wrapper/Move/ZMatrixCoords.pypp.cpp @@ -54,6 +54,8 @@ SireMove::ZMatrixCoords __copy__(const SireMove::ZMatrixCoords &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ZMatrixCoords_class(){ { //::SireMove::ZMatrixCoords @@ -73,6 +75,7 @@ void register_ZMatrixCoords_class(){ "add" , add_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Add the z-matrix line containing the passed atoms. The internal\ncoordinates of this line are set from the current cartesian coordinates\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -85,6 +88,7 @@ void register_ZMatrixCoords_class(){ "add" , add_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Add the z-matrix line containing the passed dihedral. The internal\ncoordinates of this line are set from the current cartesian coordinates\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -97,6 +101,7 @@ void register_ZMatrixCoords_class(){ "add" , add_function_value , ( bp::arg("atom"), bp::arg("bondlength"), bp::arg("bond"), bp::arg("anglesize"), bp::arg("angle"), bp::arg("dihedralsize"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Add the z-matrix line using the supplied atoms and internal coordinates\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -109,6 +114,7 @@ void register_ZMatrixCoords_class(){ "add" , add_function_value , ( bp::arg("zmatline") ) + , bp::release_gil_policy() , "Add the z-matrix line zmatline\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -121,6 +127,7 @@ void register_ZMatrixCoords_class(){ "add" , add_function_value , ( bp::arg("zmatline") ) + , bp::release_gil_policy() , "Add the z-matrix line zmatline to this z-matrix, adding both\nthe atoms and also setting the values of the internal coordinates\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -133,6 +140,7 @@ void register_ZMatrixCoords_class(){ "angleDelta" , angleDelta_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the maximum amount that the angle to atom atom\nshould be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -145,6 +153,7 @@ void register_ZMatrixCoords_class(){ "angleDelta" , angleDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle") ) + , bp::release_gil_policy() , "Return the maximum amount that the angle between atoms\natom-bond-angle should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -157,6 +166,7 @@ void register_ZMatrixCoords_class(){ "angleSize" , angleSize_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the size of the angle to the atom atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -169,6 +179,7 @@ void register_ZMatrixCoords_class(){ "angleSize" , angleSize_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle") ) + , bp::release_gil_policy() , "Return the size of the angle between the atoms in the z-matrix\natom-bond-angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -181,6 +192,7 @@ void register_ZMatrixCoords_class(){ "at" , at_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the z-matrix line for the atom identified by atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -193,6 +205,7 @@ void register_ZMatrixCoords_class(){ "bondDelta" , bondDelta_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the maximum amount that the bond to atom atom\nshould be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -205,6 +218,7 @@ void register_ZMatrixCoords_class(){ "bondDelta" , bondDelta_function_value , ( bp::arg("atom"), bp::arg("bond") ) + , bp::release_gil_policy() , "Return the maximum amount that the bond between atoms\natom-bond should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -217,6 +231,7 @@ void register_ZMatrixCoords_class(){ "bondLength" , bondLength_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the length of the bond to the atom atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -229,6 +244,7 @@ void register_ZMatrixCoords_class(){ "bondLength" , bondLength_function_value , ( bp::arg("atom"), bp::arg("bond") ) + , bp::release_gil_policy() , "Return the length of the bond between the atoms in the z-matrix\natom-bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -241,6 +257,7 @@ void register_ZMatrixCoords_class(){ "contains" , contains_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return whether or not the z-matrix contains an atom\nidentified by atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -253,6 +270,7 @@ void register_ZMatrixCoords_class(){ "contains" , contains_function_value , ( bp::arg("atom"), bp::arg("bond") ) + , bp::release_gil_policy() , "Return whether or not the z-matrix defines\nthe bond atom-bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -265,6 +283,7 @@ void register_ZMatrixCoords_class(){ "contains" , contains_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle") ) + , bp::release_gil_policy() , "Return whether or not the z-matrix defines\nthe angle atom-bond-angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -277,6 +296,7 @@ void register_ZMatrixCoords_class(){ "contains" , contains_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return whether or not the z-matrix defines\nthe dihedral atom-bond-angle-dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -289,6 +309,7 @@ void register_ZMatrixCoords_class(){ "contains" , contains_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return whether or not the z-matrix defines\nthe bond bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -301,6 +322,7 @@ void register_ZMatrixCoords_class(){ "contains" , contains_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return whether or not the z-matrix defines\nthe angle angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -313,6 +335,7 @@ void register_ZMatrixCoords_class(){ "contains" , contains_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return whether or not the z-matrix defines\nthe dihedral dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\n" ); } @@ -325,6 +348,7 @@ void register_ZMatrixCoords_class(){ "delta" , delta_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the maximum amount that the bond bond should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -337,6 +361,7 @@ void register_ZMatrixCoords_class(){ "delta" , delta_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return the maximum amount that the angle angle should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -349,6 +374,7 @@ void register_ZMatrixCoords_class(){ "delta" , delta_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return the maximum amount that the dihedral dihedral should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -361,6 +387,7 @@ void register_ZMatrixCoords_class(){ "dihedralDelta" , dihedralDelta_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the maximum amount that the dihedral to atom atom\nshould be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -373,6 +400,7 @@ void register_ZMatrixCoords_class(){ "dihedralDelta" , dihedralDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the maximum amount that the dihedral between atoms\natom-bond-angle-dihedral should be changed\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -385,6 +413,7 @@ void register_ZMatrixCoords_class(){ "dihedralSize" , dihedralSize_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the size of the dihedral to the atom atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -397,6 +426,7 @@ void register_ZMatrixCoords_class(){ "dihedralSize" , dihedralSize_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the size of the dihedral between the atoms in the z-matrix\natom-bond-angle-dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -409,6 +439,7 @@ void register_ZMatrixCoords_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the atom\nwith ID atom\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -421,6 +452,7 @@ void register_ZMatrixCoords_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom"), bp::arg("bond") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the\nbond between atoms atom-bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -433,6 +465,7 @@ void register_ZMatrixCoords_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the\nbond between atoms atom-bond-angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -445,6 +478,7 @@ void register_ZMatrixCoords_class(){ "getIndex" , getIndex_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that positions the\nbond between atoms atom-bond-angle-dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -457,6 +491,7 @@ void register_ZMatrixCoords_class(){ "getIndex" , getIndex_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that\ndefines the bond bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -469,6 +504,7 @@ void register_ZMatrixCoords_class(){ "getIndex" , getIndex_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that\ndefines the angle angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -481,6 +517,7 @@ void register_ZMatrixCoords_class(){ "getIndex" , getIndex_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the index of the z-matrix line that\ndefines the dihedral dihedral\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -529,6 +566,7 @@ void register_ZMatrixCoords_class(){ "isCompatibleWith" , isCompatibleWith_function_value , ( bp::arg("molinfo") ) + , bp::release_gil_policy() , "Return whether or not this zmatrix is compatible with the molecule\nwith info molinfo" ); } @@ -541,6 +579,7 @@ void register_ZMatrixCoords_class(){ "length" , length_function_value , ( bp::arg("bond") ) + , bp::release_gil_policy() , "Return the length of the bond bond\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -552,6 +591,7 @@ void register_ZMatrixCoords_class(){ ZMatrixCoords_exposer.def( "lines" , lines_function_value + , bp::release_gil_policy() , "Return all of the lines of the z-matrix" ); } @@ -564,6 +604,7 @@ void register_ZMatrixCoords_class(){ "matchToSelection" , matchToSelection_function_value , ( bp::arg("selection") ) + , bp::release_gil_policy() , "Return a z-matrix that only contains lines that involve the atoms\nthat are in selection" ); } @@ -576,6 +617,7 @@ void register_ZMatrixCoords_class(){ "move" , move_function_value , ( bp::arg("bond"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the bond bond by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -588,6 +630,7 @@ void register_ZMatrixCoords_class(){ "move" , move_function_value , ( bp::arg("angle"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the angle angle by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -600,6 +643,7 @@ void register_ZMatrixCoords_class(){ "move" , move_function_value , ( bp::arg("dihedral"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the dihedral dihedral by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -612,6 +656,7 @@ void register_ZMatrixCoords_class(){ "moveAngle" , moveAngle_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Move the angle to the atom atom by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -624,6 +669,7 @@ void register_ZMatrixCoords_class(){ "moveAngle" , moveAngle_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the angle between atoms atom0-atom1-atom2 by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -636,6 +682,7 @@ void register_ZMatrixCoords_class(){ "moveBond" , moveBond_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Move the bond to the atom atom by the length delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -648,6 +695,7 @@ void register_ZMatrixCoords_class(){ "moveBond" , moveBond_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the bond between atoms atom0-atom1 by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -660,6 +708,7 @@ void register_ZMatrixCoords_class(){ "moveDihedral" , moveDihedral_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Move the dihedral to the atom atom by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -672,6 +721,7 @@ void register_ZMatrixCoords_class(){ "moveDihedral" , moveDihedral_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("delta") ) + , bp::release_gil_policy() , "Change the dihedral between atoms atom0-atom1-atom2-atom3 by delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -711,6 +761,7 @@ void register_ZMatrixCoords_class(){ "remove" , remove_function_value , ( bp::arg("atom") ) + , bp::release_gil_policy() , "Remove the z-matrix lines that build the atom(s) with ID atom" ); } @@ -723,6 +774,7 @@ void register_ZMatrixCoords_class(){ "remove" , remove_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral") ) + , bp::release_gil_policy() , "Remove the z-matrix line that builds atom from bond,\nangle and dihedral" ); } @@ -735,6 +787,7 @@ void register_ZMatrixCoords_class(){ "remove" , remove_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Remove the z-matrix line that builds dihedral" ); } @@ -747,6 +800,7 @@ void register_ZMatrixCoords_class(){ "remove" , remove_function_value , ( bp::arg("zmatline") ) + , bp::release_gil_policy() , "Remove the z-matrix line zmatline from this z-matrix" ); } @@ -759,6 +813,7 @@ void register_ZMatrixCoords_class(){ "set" , set_function_value , ( bp::arg("bond"), bp::arg("length") ) + , bp::release_gil_policy() , "Set the bond bond to have the length length\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -771,6 +826,7 @@ void register_ZMatrixCoords_class(){ "set" , set_function_value , ( bp::arg("angle"), bp::arg("size") ) + , bp::release_gil_policy() , "Set the angle angle to have the size size\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -783,6 +839,7 @@ void register_ZMatrixCoords_class(){ "set" , set_function_value , ( bp::arg("dihedral"), bp::arg("size") ) + , bp::release_gil_policy() , "Set the dihedral dihedral to have the size size\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -795,6 +852,7 @@ void register_ZMatrixCoords_class(){ "setAngle" , setAngle_function_value , ( bp::arg("atom"), bp::arg("size") ) + , bp::release_gil_policy() , "Set the angle to atom atom to size\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -807,6 +865,7 @@ void register_ZMatrixCoords_class(){ "setAngle" , setAngle_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("size") ) + , bp::release_gil_policy() , "Set the angle between atoms atom0-atom1-atom2 to have\nthe size size\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -819,6 +878,7 @@ void register_ZMatrixCoords_class(){ "setAngleDelta" , setAngleDelta_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the angle for the atom atom\ncan be changed to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -831,6 +891,7 @@ void register_ZMatrixCoords_class(){ "setAngleDelta" , setAngleDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the angle between atoms atom-bond-angle\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -843,6 +904,7 @@ void register_ZMatrixCoords_class(){ "setBond" , setBond_function_value , ( bp::arg("atom"), bp::arg("length") ) + , bp::release_gil_policy() , "Set the bond to atom atom to length\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -855,6 +917,7 @@ void register_ZMatrixCoords_class(){ "setBond" , setBond_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("length") ) + , bp::release_gil_policy() , "Set the bond between atoms atom0-atom1 to have\nthe length length\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -867,6 +930,7 @@ void register_ZMatrixCoords_class(){ "setBondDelta" , setBondDelta_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the bond for the atom atom\ncan be moved to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -879,6 +943,7 @@ void register_ZMatrixCoords_class(){ "setBondDelta" , setBondDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the bond between atoms atom-bond\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -891,6 +956,7 @@ void register_ZMatrixCoords_class(){ "setDelta" , setDelta_function_value , ( bp::arg("bond"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the bond bond\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -903,6 +969,7 @@ void register_ZMatrixCoords_class(){ "setDelta" , setDelta_function_value , ( bp::arg("angle"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the angle angle\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -915,6 +982,7 @@ void register_ZMatrixCoords_class(){ "setDelta" , setDelta_function_value , ( bp::arg("dihedral"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the dihedral dihedral\ncan be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -927,6 +995,7 @@ void register_ZMatrixCoords_class(){ "setDihedral" , setDihedral_function_value , ( bp::arg("atom"), bp::arg("size") ) + , bp::release_gil_policy() , "Set the dihedral to atom atom to size\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -939,6 +1008,7 @@ void register_ZMatrixCoords_class(){ "setDihedral" , setDihedral_function_value , ( bp::arg("atom0"), bp::arg("atom1"), bp::arg("atom2"), bp::arg("atom3"), bp::arg("size") ) + , bp::release_gil_policy() , "Set the dihedral between atoms atom0-atom1-atom2-atom3 to have\nthe size size\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -951,6 +1021,7 @@ void register_ZMatrixCoords_class(){ "setDihedralDelta" , setDihedralDelta_function_value , ( bp::arg("atom"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the dihedral for the atom atom\ncan be changed to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -963,6 +1034,7 @@ void register_ZMatrixCoords_class(){ "setDihedralDelta" , setDihedralDelta_function_value , ( bp::arg("atom"), bp::arg("bond"), bp::arg("angle"), bp::arg("dihedral"), bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount that the dihedral between atoms\natom-bond-angle-dihedral can be changed by to delta\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -975,6 +1047,7 @@ void register_ZMatrixCoords_class(){ "size" , size_function_value , ( bp::arg("angle") ) + , bp::release_gil_policy() , "Return the size of the angle angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -987,6 +1060,7 @@ void register_ZMatrixCoords_class(){ "size" , size_function_value , ( bp::arg("dihedral") ) + , bp::release_gil_policy() , "Return the size of the angle angle\nThrow: SireMol::missing_atom\nThrow: SireMol::duplicate_atom\nThrow: SireError::invalid_index\nThrow: SireMove::zmatrix_error\n" ); } @@ -998,7 +1072,7 @@ void register_ZMatrixCoords_class(){ ZMatrixCoords_exposer.def( "toCartesian" , toCartesian_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the cartesian representation of these internal co-ordinates\n(convert from z-matrix coordinates to cartesian coordinates)" ); } @@ -1010,6 +1084,7 @@ void register_ZMatrixCoords_class(){ ZMatrixCoords_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this z-matrix" ); } @@ -1021,6 +1096,7 @@ void register_ZMatrixCoords_class(){ ZMatrixCoords_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/ZMatrixCoordsLine.pypp.cpp b/wrapper/Move/ZMatrixCoordsLine.pypp.cpp index 3cb6fd87a..7a56baf62 100644 --- a/wrapper/Move/ZMatrixCoordsLine.pypp.cpp +++ b/wrapper/Move/ZMatrixCoordsLine.pypp.cpp @@ -53,6 +53,8 @@ SireMove::ZMatrixCoordsLine __copy__(const SireMove::ZMatrixCoordsLine &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ZMatrixCoordsLine_class(){ { //::SireMove::ZMatrixCoordsLine @@ -70,6 +72,7 @@ void register_ZMatrixCoordsLine_class(){ ZMatrixCoordsLine_exposer.def( "angleSize" , angleSize_function_value + , bp::release_gil_policy() , "Return the size of the angle" ); } @@ -81,6 +84,7 @@ void register_ZMatrixCoordsLine_class(){ ZMatrixCoordsLine_exposer.def( "bondLength" , bondLength_function_value + , bp::release_gil_policy() , "Return the length of the bond" ); } @@ -92,6 +96,7 @@ void register_ZMatrixCoordsLine_class(){ ZMatrixCoordsLine_exposer.def( "dihedralSize" , dihedralSize_function_value + , bp::release_gil_policy() , "Return the size of the dihedral" ); } @@ -119,6 +124,7 @@ void register_ZMatrixCoordsLine_class(){ "setAngle" , setAngle_function_value , ( bp::arg("size") ) + , bp::release_gil_policy() , "Set the size of the angle" ); } @@ -131,6 +137,7 @@ void register_ZMatrixCoordsLine_class(){ "setBond" , setBond_function_value , ( bp::arg("length") ) + , bp::release_gil_policy() , "Set the length of the bond" ); } @@ -143,6 +150,7 @@ void register_ZMatrixCoordsLine_class(){ "setDihedral" , setDihedral_function_value , ( bp::arg("size") ) + , bp::release_gil_policy() , "Set the size of the dihedral" ); } @@ -154,6 +162,7 @@ void register_ZMatrixCoordsLine_class(){ ZMatrixCoordsLine_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -165,6 +174,7 @@ void register_ZMatrixCoordsLine_class(){ ZMatrixCoordsLine_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -176,6 +186,7 @@ void register_ZMatrixCoordsLine_class(){ ZMatrixCoordsLine_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/ZMatrixLine.pypp.cpp b/wrapper/Move/ZMatrixLine.pypp.cpp index 05a42845e..1a67e0579 100644 --- a/wrapper/Move/ZMatrixLine.pypp.cpp +++ b/wrapper/Move/ZMatrixLine.pypp.cpp @@ -53,6 +53,8 @@ SireMove::ZMatrixLine __copy__(const SireMove::ZMatrixLine &other){ return SireM #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ZMatrixLine_class(){ { //::SireMove::ZMatrixLine @@ -69,6 +71,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "angle" , angle_function_value + , bp::release_gil_policy() , "Return the index of the angled atom" ); } @@ -80,6 +83,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "angleDelta" , angleDelta_function_value + , bp::release_gil_policy() , "Return the maximum amount by which the angle should be changed" ); } @@ -91,6 +95,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "atom" , atom_function_value + , bp::release_gil_policy() , "Return the index of the atom whose coordinates\nare described in this line" ); } @@ -102,6 +107,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "bond" , bond_function_value + , bp::release_gil_policy() , "Return the index of the bonded atom" ); } @@ -113,6 +119,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "bondDelta" , bondDelta_function_value + , bp::release_gil_policy() , "Return the maximum amount by which the bond should be changed" ); } @@ -124,6 +131,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "dihedral" , dihedral_function_value + , bp::release_gil_policy() , "Return the index of the dihedralled atom" ); } @@ -135,6 +143,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "dihedralDelta" , dihedralDelta_function_value + , bp::release_gil_policy() , "Return the maximum amount by which the dihedral should be changed" ); } @@ -174,6 +183,7 @@ void register_ZMatrixLine_class(){ "setAngleDelta" , setAngleDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount by which the angle should be changed" ); } @@ -186,6 +196,7 @@ void register_ZMatrixLine_class(){ "setBondDelta" , setBondDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount by which the bond should be changed" ); } @@ -198,6 +209,7 @@ void register_ZMatrixLine_class(){ "setDihedralDelta" , setDihedralDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Set the maximum amount by which the dihedral should be changed" ); } @@ -209,6 +221,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -220,6 +233,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -231,6 +245,7 @@ void register_ZMatrixLine_class(){ ZMatrixLine_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Move/__init__.py b/wrapper/Move/__init__.py index 1bf53dd0a..0474fe6e0 100644 --- a/wrapper/Move/__init__.py +++ b/wrapper/Move/__init__.py @@ -1,13 +1,87 @@ -############################# -## -## The SireMove module -## -## (C) Christopher Woods -## - -import Sire.Units -import Sire.Mol -import Sire.System -import Sire.Cluster - -from Sire.Move._Move import * +""" +.. currentmodule:: sire.legacy.Move + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + DLMRigidBody + DofID + Dynamics + Ensemble + Flexibility + GetCentroidPoint + GetCOGPoint + GetCOMPoint + GetPoint + HMCGenerator + HMCVelGen + HybridMC + Integrator + InternalMove + InternalMoveSingle + MaxwellBoltzmann + MolDeleter + MolecularDynamics + MolInserter + MonteCarlo + Move + Moves + MTSMC + OpenMMFrEnergyDT + OpenMMFrEnergyST + OpenMMMDIntegrator + PrefSampler + RBWorkspaceJM + RepExMove + RepExMove2 + RepExSubMove + Replica + Replicas + RigidBodyMC + SameMoves + SameSupraMoves + SameSupraSubMoves + Sampler + ScaleVolumeFromCenter + SimPacket + SimStore + Simulation + SpecifiedGroupsDeleter + SupraMove + SupraMoves + SupraSim + SupraSimPacket + SupraSubMove + SupraSubMoves + SupraSubSim + SupraSubSimPacket + SupraSubSystem + SupraSystem + SystemWideDeleter + TitrationMove + Titrator + UniformInserter + UniformSampler + VelocitiesFromProperty + VelocityGenerator + VelocityVerlet + VolumeChanger + VolumeMove + WeightedMoves + ZMatMove + ZMatrix + ZMatrixCoords + ZMatrixCoordsLine + ZMatrixLine + +""" + +from .. import Units as _Units +from .. import Mol as _Mol +from .. import System as _System +from .. import Cluster as _Cluster + +from ._Move import * diff --git a/wrapper/Qt/CMakeLists.txt b/wrapper/Qt/CMakeLists.txt index 2f3e8b29d..1e02f90df 100644 --- a/wrapper/Qt/CMakeLists.txt +++ b/wrapper/Qt/CMakeLists.txt @@ -9,7 +9,7 @@ include_directories( ${BOOST_INCLUDE_DIR} ${PYTHON_INCLUDE_DIR} ) # Other Sire libraries -include_directories( ${CMAKE_SOURCE_DIR} ) +include_directories( ${CMAKE_SOURCE_DIR} ) include_directories( BEFORE ${SIRE_INCLUDE_DIR} ) @@ -32,12 +32,12 @@ add_library (Qt ${WRAPQT_SOURCES}) target_link_libraries (Qt SirePython SIRE_SireBase - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} ) -set_target_properties (Qt +set_target_properties (Qt PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -50,7 +50,7 @@ include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Qt" "_init_Qt" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Qt ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Qt ) install( TARGETS Qt LIBRARY DESTINATION ${INSTALLDIR} @@ -59,5 +59,5 @@ install( TARGETS Qt ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Qt/_Qt.main.cpp b/wrapper/Qt/_Qt.main.cpp index c842e93c0..1b026e59c 100644 --- a/wrapper/Qt/_Qt.main.cpp +++ b/wrapper/Qt/_Qt.main.cpp @@ -44,9 +44,9 @@ BOOST_PYTHON_MODULE(_Qt){ register_SireQt_containers(); register_QByteArray_class(); - + register_QDate_class(); - + /* register_QDateTime_class(); */ /* register_QDir_class(); */ @@ -58,9 +58,9 @@ BOOST_PYTHON_MODULE(_Qt){ register_QElapsedTimer_class(); autoconvert_QChar(); - + autoconvert_QString(); - register_QUuid_class(); + register_QUuid_class(); } diff --git a/wrapper/Qt/__init__.py b/wrapper/Qt/__init__.py index 79fcae01f..6d23d3eda 100644 --- a/wrapper/Qt/__init__.py +++ b/wrapper/Qt/__init__.py @@ -16,4 +16,4 @@ # from being loaded if another Qt wrapper library has already # been loaded -from Sire.Qt._Qt import * +from ._Qt import * diff --git a/wrapper/Qt/autoconvert_QString.cpp b/wrapper/Qt/autoconvert_QString.cpp index a68536334..3b3b37e45 100644 --- a/wrapper/Qt/autoconvert_QString.cpp +++ b/wrapper/Qt/autoconvert_QString.cpp @@ -34,6 +34,7 @@ #include #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" using namespace boost::python; @@ -44,6 +45,8 @@ struct qstring_to_python_string { static PyObject* convert(const QString &cpp_string) { + auto raii = boost::python::release_gil_policy::acquire_gil(); + //get Qt to encode the string as UTF8, which python can then decode // - this is probably not as efficient as it could be, but Sire // is not a text processing app ;-) @@ -71,7 +74,7 @@ PyObject* QString__str__(QString const& s) { Py_DECREF(str_object); boost::python::throw_error_already_set(); - } + } return str_object; } @@ -163,6 +166,7 @@ struct QString_from_python converter::rvalue_from_python_stage1_data* data) { //use python-qt conversion function + auto raii = boost::python::release_gil_policy::acquire_gil(); QString_from_python_str_or_unicode(obj_ptr, data); } }; diff --git a/wrapper/Qt/qtheaders/README b/wrapper/Qt/qtheaders/README index 761ef1975..885fadfaf 100644 --- a/wrapper/Qt/qtheaders/README +++ b/wrapper/Qt/qtheaders/README @@ -1,5 +1,5 @@ -This directory contains the Qt headers that are scanned to -generate the Sire.Qt wrappers. These headers come +This directory contains the Qt headers that are scanned to +generate the sire.legacy.Qt wrappers. These headers come from the opensource X11 version of Qt 4.2.1 (the minimum version of Qt supported by Sire) diff --git a/wrapper/Qt/sireqt_containers.cpp b/wrapper/Qt/sireqt_containers.cpp index 584b1d2ca..b79915bba 100644 --- a/wrapper/Qt/sireqt_containers.cpp +++ b/wrapper/Qt/sireqt_containers.cpp @@ -93,10 +93,14 @@ void register_SireQt_containers() register_dict< QMap >(); + register_dict< QHash >(); + #else register_set< QSet, QString >(); register_dict< QMap, QString, QVariant >(); + register_dict< QHash, QString, QString >(); + #endif } diff --git a/wrapper/Search/CMakeAutogenFile.txt b/wrapper/Search/CMakeAutogenFile.txt new file mode 100644 index 000000000..ef1ff8e05 --- /dev/null +++ b/wrapper/Search/CMakeAutogenFile.txt @@ -0,0 +1,4 @@ +# WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! +set ( PYPP_SOURCES + _Search_free_functions.pypp.cpp + ) diff --git a/wrapper/Search/CMakeLists.txt b/wrapper/Search/CMakeLists.txt new file mode 100644 index 000000000..b5462bdd8 --- /dev/null +++ b/wrapper/Search/CMakeLists.txt @@ -0,0 +1,64 @@ +######################################## +# +# CMake file for Python wrapper:_Search +# +######################################## + +# Third Party dependencies of this module +include_directories( ${BOOST_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} ) + +# Other Sire libraries +include_directories( ${CMAKE_SOURCE_DIR} ) + +include_directories( BEFORE ${SIRE_INCLUDE_DIR}/SireSearch + ${SIRE_INCLUDE_DIR} ) + +include(CMakeAutogenFile.txt) + +# Define the sources in SireSearch +set ( WRAPSEARCH_SOURCES + + _Search.main.cpp + + ${PYPP_SOURCES} + ) + +# Create the library that holds all of the wrappers +add_library (Search ${WRAPSEARCH_SOURCES}) + +target_link_libraries (Search + SirePython + SIRE_SireBase + SIRE_SireMol + SIRE_SireMM + SIRE_SireSearch + ${Boost_LIBRARIES} + ${PYTHON_LIBRARIES} + ) + + +set_target_properties (Search + PROPERTIES + VERSION ${SIRE_VERSION} + SOVERSION ${SIRE_VERSION_MAJOR} + OUTPUT_NAME "Search" + PREFIX "_" + SUFFIX ${PYTHON_MODULE_EXTENSION} + ) + +include( LimitSirePythonExportSymbols ) +export_this_symbol_only( "init_Search" "_init_Search" ) + +# installation +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Search ) + +install( TARGETS Search + LIBRARY DESTINATION ${INSTALLDIR} + ARCHIVE DESTINATION ${INSTALLDIR} + RUNTIME DESTINATION ${INSTALLDIR} + ) + +install( FILES __init__.py + DESTINATION ${INSTALLDIR} + ) diff --git a/wrapper/Search/_Search.main.cpp b/wrapper/Search/_Search.main.cpp new file mode 100644 index 000000000..29d79ca16 --- /dev/null +++ b/wrapper/Search/_Search.main.cpp @@ -0,0 +1,15 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + + +#include "boost/python.hpp" + +#include "_Search_free_functions.pypp.hpp" + +namespace bp = boost::python; + +BOOST_PYTHON_MODULE(_Search){ + register_free_functions(); +} + diff --git a/wrapper/Search/_Search_free_functions.pypp.cpp b/wrapper/Search/_Search_free_functions.pypp.cpp new file mode 100644 index 000000000..c7451d014 --- /dev/null +++ b/wrapper/Search/_Search_free_functions.pypp.cpp @@ -0,0 +1,300 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#include "boost/python.hpp" +#include "_Search_free_functions.pypp.hpp" + +namespace bp = boost::python; + +#include "approx_equal.h" + +#include + +#include + +#include "approx_equal.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "approx_equal.h" + +#include + +#include + +#include "approx_equal.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "approx_equal.h" + +#include + +#include + +#include "approx_equal.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +#include "SireMol/core.h" + +#include "SireSearch/parser.h" + +#include "helper_funcs.h" + +#include + +#include "helper_funcs.h" + +void register_free_functions(){ + + { //::SireSearch::approx_equal + + typedef bool ( *approx_equal_function_type )( double,double ); + approx_equal_function_type approx_equal_function_value( &::SireSearch::approx_equal ); + + bp::def( + "approx_equal" + , approx_equal_function_value + , ( bp::arg("val0"), bp::arg("val1") ) + , "" ); + + } + + { //::SireSearch::delete_all_tokens + + typedef void ( *delete_all_tokens_function_type )( ); + delete_all_tokens_function_type delete_all_tokens_function_value( &::SireSearch::delete_all_tokens ); + + bp::def( + "delete_all_tokens" + , delete_all_tokens_function_value + , "" ); + + } + + { //::SireSearch::delete_token + + typedef void ( *delete_token_function_type )( ::QString const & ); + delete_token_function_type delete_token_function_value( &::SireSearch::delete_token ); + + bp::def( + "delete_token" + , delete_token_function_value + , ( bp::arg("token") ) + , "" ); + + } + + { //::SireSearch::get_approx_epsilon + + typedef double ( *get_approx_epsilon_function_type )( ); + get_approx_epsilon_function_type get_approx_epsilon_function_value( &::SireSearch::get_approx_epsilon ); + + bp::def( + "get_approx_epsilon" + , get_approx_epsilon_function_value + , "" ); + + } + + { //::SireSearch::get_min_protein_residues + + typedef int ( *get_min_protein_residues_function_type )( ); + get_min_protein_residues_function_type get_min_protein_residues_function_value( &::SireSearch::get_min_protein_residues ); + + bp::def( + "get_min_protein_residues" + , get_min_protein_residues_function_value + , "" ); + + } + + { //::SireSearch::get_protein_residue_names + + typedef ::QSet< QString > ( *get_protein_residue_names_function_type )( ); + get_protein_residue_names_function_type get_protein_residue_names_function_value( &::SireSearch::get_protein_residue_names ); + + bp::def( + "get_protein_residue_names" + , get_protein_residue_names_function_value + , "" ); + + } + + { //::SireSearch::get_token + + typedef ::QString ( *get_token_function_type )( ::QString const & ); + get_token_function_type get_token_function_value( &::SireSearch::get_token ); + + bp::def( + "get_token" + , get_token_function_value + , ( bp::arg("token") ) + , "" ); + + } + + { //::SireSearch::has_token + + typedef bool ( *has_token_function_type )( ::QString const & ); + has_token_function_type has_token_function_value( &::SireSearch::has_token ); + + bp::def( + "has_token" + , has_token_function_value + , ( bp::arg("token") ) + , "" ); + + } + + { //::SireSearch::install_search_parser + + typedef void ( *install_search_parser_function_type )( ); + install_search_parser_function_type install_search_parser_function_value( &::SireSearch::install_search_parser ); + + bp::def( + "install_search_parser" + , install_search_parser_function_value + , "" ); + + } + + { //::SireSearch::set_approx_epsilon + + typedef void ( *set_approx_epsilon_function_type )( double ); + set_approx_epsilon_function_type set_approx_epsilon_function_value( &::SireSearch::set_approx_epsilon ); + + bp::def( + "set_approx_epsilon" + , set_approx_epsilon_function_value + , ( bp::arg("eps") ) + , "" ); + + } + + { //::SireSearch::set_min_protein_residues + + typedef void ( *set_min_protein_residues_function_type )( int ); + set_min_protein_residues_function_type set_min_protein_residues_function_value( &::SireSearch::set_min_protein_residues ); + + bp::def( + "set_min_protein_residues" + , set_min_protein_residues_function_value + , ( bp::arg("nres") ) + , "" ); + + } + + { //::SireSearch::set_protein_residue_names + + typedef void ( *set_protein_residue_names_function_type )( ::QSet< QString > const & ); + set_protein_residue_names_function_type set_protein_residue_names_function_value( &::SireSearch::set_protein_residue_names ); + + bp::def( + "set_protein_residue_names" + , set_protein_residue_names_function_value + , ( bp::arg("names") ) + , "" ); + + } + + { //::SireSearch::set_token + + typedef void ( *set_token_function_type )( ::QString const &,::QString const & ); + set_token_function_type set_token_function_value( &::SireSearch::set_token ); + + bp::def( + "set_token" + , set_token_function_value + , ( bp::arg("token"), bp::arg("search") ) + , "" ); + + } + +} diff --git a/wrapper/Search/_Search_free_functions.pypp.hpp b/wrapper/Search/_Search_free_functions.pypp.hpp new file mode 100644 index 000000000..3db678186 --- /dev/null +++ b/wrapper/Search/_Search_free_functions.pypp.hpp @@ -0,0 +1,10 @@ +// This file has been generated by Py++. + +// (C) Christopher Woods, GPL >= 2 License + +#ifndef _Search_free_functions_hpp__pyplusplus_wrapper +#define _Search_free_functions_hpp__pyplusplus_wrapper + +void register_free_functions(); + +#endif//_Search_free_functions_hpp__pyplusplus_wrapper diff --git a/wrapper/Search/__init__.py b/wrapper/Search/__init__.py new file mode 100644 index 000000000..14b110fcb --- /dev/null +++ b/wrapper/Search/__init__.py @@ -0,0 +1,2 @@ + +from ._Search import * diff --git a/wrapper/Search/active_headers.h b/wrapper/Search/active_headers.h new file mode 100644 index 000000000..2323e12d2 --- /dev/null +++ b/wrapper/Search/active_headers.h @@ -0,0 +1,11 @@ +#ifndef ACTIVE_HEADERS_H +#define ACTIVE_HEADERS_H + +#ifdef GCCXML_PARSE + +#include "approx_equal.h" +#include "helper_funcs.h" + +#endif + +#endif diff --git a/wrapper/Squire/AM1BCC.pypp.cpp b/wrapper/Squire/AM1BCC.pypp.cpp index cdf0d01a8..91e88ef0f 100644 --- a/wrapper/Squire/AM1BCC.pypp.cpp +++ b/wrapper/Squire/AM1BCC.pypp.cpp @@ -45,6 +45,8 @@ Squire::AM1BCC __copy__(const Squire::AM1BCC &other){ return Squire::AM1BCC(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AM1BCC_class(){ { //::Squire::AM1BCC @@ -73,6 +75,7 @@ void register_AM1BCC_class(){ "environment" , environment_function_value , ( bp::arg("variable") ) + , bp::release_gil_policy() , "Return the value of the environmental variable variable" ); } @@ -124,6 +127,7 @@ void register_AM1BCC_class(){ "setEnvironment" , setEnvironment_function_value , ( bp::arg("variable"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the environmental variable variable to value. It is\nimportant that AMBERHOME is set, as this is needed by antechamber\nto generate the charges" ); } @@ -136,6 +140,7 @@ void register_AM1BCC_class(){ "setScaleFactor" , setScaleFactor_function_value , ( bp::arg("sclfac") ) + , bp::release_gil_policy() , "Set the scale factor for the charges" ); } @@ -148,6 +153,7 @@ void register_AM1BCC_class(){ "setTotalCharge" , setTotalCharge_function_value , ( bp::arg("charge") ) + , bp::release_gil_policy() , "Set the total charge of the molecule whose charges are being generated" ); } @@ -159,6 +165,7 @@ void register_AM1BCC_class(){ AM1BCC_exposer.def( "totalCharge" , totalCharge_function_value + , bp::release_gil_policy() , "Return the total charge of the molecule whose charges are being generated" ); } @@ -170,6 +177,7 @@ void register_AM1BCC_class(){ AM1BCC_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/CMakeAutogenFile.txt b/wrapper/Squire/CMakeAutogenFile.txt index 2948884e1..9643cee9f 100644 --- a/wrapper/Squire/CMakeAutogenFile.txt +++ b/wrapper/Squire/CMakeAutogenFile.txt @@ -1,36 +1,36 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - PS_GTO.pypp.cpp - S_GTO.pypp.cpp - NullQM.pypp.cpp - Orbital.pypp.cpp - PP_GTO.pypp.cpp - QMChargeCalculator.pypp.cpp + AM1BCC.pypp.cpp + ChargeElementParameterNames3D.pypp.cpp + ElementParameterName.pypp.cpp ElementParameterName3D.pypp.cpp - ShellPair.pypp.cpp + GTO.pypp.cpp GTOPair.pypp.cpp - QMMMFF.pypp.cpp - QMComponent.pypp.cpp - P_GTO.pypp.cpp + HF.pypp.cpp + Molpro.pypp.cpp Mopac.pypp.cpp - ChargeElementParameterNames3D.pypp.cpp + NullQM.pypp.cpp NullQMChargeCalculator.pypp.cpp - AM1BCC.pypp.cpp - Molpro.pypp.cpp - PointDipole.pypp.cpp - PointCharge.pypp.cpp - PS_GTOs.pypp.cpp - SS_GTOs.pypp.cpp - SQM.pypp.cpp - HF.pypp.cpp - GTO.pypp.cpp - SS_GTO.pypp.cpp + Orbital.pypp.cpp OrbitalShell.pypp.cpp + PP_GTO.pypp.cpp PP_GTOs.pypp.cpp + PS_GTO.pypp.cpp + PS_GTOs.pypp.cpp + P_GTO.pypp.cpp + PointCharge.pypp.cpp + PointDipole.pypp.cpp + QMChargeCalculator.pypp.cpp QMChargeConstraint.pypp.cpp - ElementParameterName.pypp.cpp - QMProgram.pypp.cpp + QMComponent.pypp.cpp QMFF.pypp.cpp + QMMMFF.pypp.cpp + QMProgram.pypp.cpp + SQM.pypp.cpp + SS_GTO.pypp.cpp + SS_GTOs.pypp.cpp + S_GTO.pypp.cpp + ShellPair.pypp.cpp _Squire_free_functions.pypp.cpp Squire_containers.cpp Squire_properties.cpp diff --git a/wrapper/Squire/CMakeLists.txt b/wrapper/Squire/CMakeLists.txt index 1ecf496c1..a45cee333 100644 --- a/wrapper/Squire/CMakeLists.txt +++ b/wrapper/Squire/CMakeLists.txt @@ -23,7 +23,7 @@ include(CMakeAutogenFile.txt) set ( WRAPSQUIRE_SOURCES _Squire.main.cpp - + ${PYPP_SOURCES} ) @@ -39,19 +39,19 @@ set_target_properties (Squire PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Squire SirePython SIRE_Squire SIRE_SireSystem - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Squire" "_init_Squire" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Squire ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Squire ) install( TARGETS Squire LIBRARY DESTINATION ${INSTALLDIR} @@ -60,5 +60,5 @@ install( TARGETS Squire ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Squire/ChargeElementParameterNames3D.pypp.cpp b/wrapper/Squire/ChargeElementParameterNames3D.pypp.cpp index 425fcd46e..4c615cdf6 100644 --- a/wrapper/Squire/ChargeElementParameterNames3D.pypp.cpp +++ b/wrapper/Squire/ChargeElementParameterNames3D.pypp.cpp @@ -39,6 +39,8 @@ Squire::ChargeElementParameterNames3D __copy__(const Squire::ChargeElementParame const char* pvt_get_name(const Squire::ChargeElementParameterNames3D&){ return "Squire::ChargeElementParameterNames3D";} +#include "Helpers/release_gil_policy.hpp" + void register_ChargeElementParameterNames3D_class(){ { //::Squire::ChargeElementParameterNames3D diff --git a/wrapper/Squire/ElementParameterName.pypp.cpp b/wrapper/Squire/ElementParameterName.pypp.cpp index ef8b3f70c..445f64da1 100644 --- a/wrapper/Squire/ElementParameterName.pypp.cpp +++ b/wrapper/Squire/ElementParameterName.pypp.cpp @@ -33,6 +33,8 @@ Squire::ElementParameterName __copy__(const Squire::ElementParameterName &other) const char* pvt_get_name(const Squire::ElementParameterName&){ return "Squire::ElementParameterName";} +#include "Helpers/release_gil_policy.hpp" + void register_ElementParameterName_class(){ { //::Squire::ElementParameterName diff --git a/wrapper/Squire/ElementParameterName3D.pypp.cpp b/wrapper/Squire/ElementParameterName3D.pypp.cpp index 9a6266af8..7835dcb16 100644 --- a/wrapper/Squire/ElementParameterName3D.pypp.cpp +++ b/wrapper/Squire/ElementParameterName3D.pypp.cpp @@ -33,6 +33,8 @@ Squire::ElementParameterName3D __copy__(const Squire::ElementParameterName3D &ot const char* pvt_get_name(const Squire::ElementParameterName3D&){ return "Squire::ElementParameterName3D";} +#include "Helpers/release_gil_policy.hpp" + void register_ElementParameterName3D_class(){ { //::Squire::ElementParameterName3D diff --git a/wrapper/Squire/GTO.pypp.cpp b/wrapper/Squire/GTO.pypp.cpp index 94c972672..676e5a01f 100644 --- a/wrapper/Squire/GTO.pypp.cpp +++ b/wrapper/Squire/GTO.pypp.cpp @@ -28,6 +28,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GTO_class(){ { //::Squire::GTO @@ -42,6 +44,7 @@ void register_GTO_class(){ GTO_exposer.def( "alpha" , alpha_function_value + , bp::release_gil_policy() , "Return the value of alpha (the exponent) for this gaussian" ); } @@ -53,6 +56,7 @@ void register_GTO_class(){ GTO_exposer.def( "beta" , beta_function_value + , bp::release_gil_policy() , "Convenient synonym for alpha() - so you can write\na.alpha() b.beta() and have it mean what you expect" ); } @@ -64,6 +68,7 @@ void register_GTO_class(){ GTO_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this orbital shell is null - it is null\nif the scale or exponent are 0" ); } @@ -76,6 +81,7 @@ void register_GTO_class(){ "multiply" , multiply_function_value , ( bp::arg("coefficient") ) + , bp::release_gil_policy() , "Return this orbital shell multiplied by coefficient" ); } @@ -87,7 +93,7 @@ void register_GTO_class(){ GTO_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -99,6 +105,7 @@ void register_GTO_class(){ GTO_exposer.def( "scale" , scale_function_value + , bp::release_gil_policy() , "Return the unnormalised scaling factor for this gaussian" ); } @@ -110,6 +117,7 @@ void register_GTO_class(){ GTO_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/GTOPair.pypp.cpp b/wrapper/Squire/GTOPair.pypp.cpp index c5b437b54..16c259521 100644 --- a/wrapper/Squire/GTOPair.pypp.cpp +++ b/wrapper/Squire/GTOPair.pypp.cpp @@ -28,6 +28,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GTOPair_class(){ { //::Squire::GTOPair @@ -42,6 +44,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "K" , K_function_value + , bp::release_gil_policy() , "" ); } @@ -53,6 +56,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "K_AB" , K_AB_function_value + , bp::release_gil_policy() , "" ); } @@ -64,6 +68,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "K_CD" , K_CD_function_value + , bp::release_gil_policy() , "" ); } @@ -99,6 +104,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "Q_AB" , Q_AB_function_value + , bp::release_gil_policy() , "" ); } @@ -110,6 +116,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "Q_CD" , Q_CD_function_value + , bp::release_gil_policy() , "" ); } @@ -121,6 +128,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "R2" , R2_function_value + , bp::release_gil_policy() , "" ); } @@ -133,6 +141,7 @@ void register_GTOPair_class(){ "T" , T_function_value , ( bp::arg("P"), bp::arg("Q") ) + , bp::release_gil_policy() , "Return the T value for the two passed GTOPair pairs\nT = rho (P-Q)^2\n" ); } @@ -145,6 +154,7 @@ void register_GTOPair_class(){ "W" , W_function_value , ( bp::arg("P"), bp::arg("Q") ) + , bp::release_gil_policy() , "Return the W value for the two passed GTOPair pairs\nW = (zeta(zeta+eta)) P + (eta(zeta+eta)) Q\n" ); } @@ -156,6 +166,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "eta" , eta_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +178,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return whether or not this pair is null" ); } @@ -178,7 +190,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -191,6 +203,7 @@ void register_GTOPair_class(){ "preFac" , preFac_function_value , ( bp::arg("P"), bp::arg("Q") ) + , bp::release_gil_policy() , "Return the prefactor value for the two passed GTOPair pairs\npreFac = K_AB K_CD Sqrt(zeta+eta)\n" ); } @@ -203,6 +216,7 @@ void register_GTOPair_class(){ "rho" , rho_function_value , ( bp::arg("P"), bp::arg("Q") ) + , bp::release_gil_policy() , "Return the rho value for the two passed GTOPair pairs\nrho = (zeta eta) (zeta + eta)\n" ); } @@ -214,6 +228,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "ss" , ss_function_value + , bp::release_gil_policy() , "" ); } @@ -225,6 +240,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -236,6 +252,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "xi" , xi_function_value + , bp::release_gil_policy() , "" ); } @@ -247,6 +264,7 @@ void register_GTOPair_class(){ GTOPair_exposer.def( "zeta" , zeta_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/HF.pypp.cpp b/wrapper/Squire/HF.pypp.cpp index 1a93d45ce..19768b45b 100644 --- a/wrapper/Squire/HF.pypp.cpp +++ b/wrapper/Squire/HF.pypp.cpp @@ -41,6 +41,8 @@ Squire::HF __copy__(const Squire::HF &other){ return Squire::HF(other); } const char* pvt_get_name(const Squire::HF&){ return "Squire::HF";} +#include "Helpers/release_gil_policy.hpp" + void register_HF_class(){ { //::Squire::HF @@ -56,6 +58,7 @@ void register_HF_class(){ "add" , add_function_value , ( bp::arg("orbital") ) + , bp::release_gil_policy() , "Add an orbital that does not to be located at a particular\npoint in space" ); } @@ -68,6 +71,7 @@ void register_HF_class(){ "add" , add_function_value , ( bp::arg("point"), bp::arg("orbital") ) + , bp::release_gil_policy() , "Add an orbital that needs to be placed at center" ); } @@ -80,6 +84,7 @@ void register_HF_class(){ "add" , add_function_value , ( bp::arg("point"), bp::arg("charge") ) + , bp::release_gil_policy() , "Add an orbital that needs to be placed at center" ); } @@ -92,6 +97,7 @@ void register_HF_class(){ "add" , add_function_value , ( bp::arg("point"), bp::arg("dipole") ) + , bp::release_gil_policy() , "Add an orbital that needs to be placed at center" ); } @@ -103,6 +109,7 @@ void register_HF_class(){ HF_exposer.def( "solve" , solve_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/Molpro.pypp.cpp b/wrapper/Squire/Molpro.pypp.cpp index 67703ac92..41c530355 100644 --- a/wrapper/Squire/Molpro.pypp.cpp +++ b/wrapper/Squire/Molpro.pypp.cpp @@ -51,6 +51,8 @@ Squire::Molpro __copy__(const Squire::Molpro &other){ return Squire::Molpro(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Molpro_class(){ { //::Squire::Molpro @@ -104,6 +106,7 @@ void register_Molpro_class(){ "environment" , environment_function_value , ( bp::arg("variable") ) + , bp::release_gil_policy() , "Return the value of the explicitly set environmental variable variable.\nA null string is returned if this variable has not been set\nexplicitly (this does not mean the variable doesnt exist - merely\nthat a specific value has not been set)" ); } @@ -115,6 +118,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "executable" , executable_function_value + , bp::release_gil_policy() , "Return the executable (full path and also arguments) to be used. This\nis null if the executable is searched for in the path" ); } @@ -138,6 +142,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "latticeInBohrRadii" , latticeInBohrRadii_function_value + , bp::release_gil_policy() , "Return whether or not Sire will write the lattice charge coordinates in units\nof bohr radii (otherwise they will be in angstroms)" ); } @@ -149,6 +154,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "maximumRunTime" , maximumRunTime_function_value + , bp::release_gil_policy() , "Return the maximum runtime allowed for a molpro job, in milliseconds" ); } @@ -160,6 +166,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "memoryRequirement" , memoryRequirement_function_value + , bp::release_gil_policy() , "Return the memory requirement that has been set for this job (in bytes)" ); } @@ -199,6 +206,7 @@ void register_Molpro_class(){ "setBasisSet" , setBasisSet_function_value , ( bp::arg("basis_set") ) + , bp::release_gil_policy() , "Set the string representation of the basis set to be used\nduring the calculation. This will substitute for @BASIS_SET@ in\nthe energy and force command file templates." ); } @@ -211,6 +219,7 @@ void register_Molpro_class(){ "setEnergyTemplate" , setEnergyTemplate_function_value , ( bp::arg("energy_template") ) + , bp::release_gil_policy() , "Set the template for the command file to be used to get\nMolpro to calculate an energy. The following tags will\n" ); } @@ -223,6 +232,7 @@ void register_Molpro_class(){ "setEnvironment" , setEnvironment_function_value , ( bp::arg("variable"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the environmental variable variable to have the value value\nwhen the Molpro executable is run. This replaces any existing\nvalue of this environmental variable" ); } @@ -235,6 +245,7 @@ void register_Molpro_class(){ "setExecutable" , setExecutable_function_value , ( bp::arg("molpro_exe") ) + , bp::release_gil_policy() , "Set the Molpro executable (full path and also arguments) to be used" ); } @@ -247,6 +258,7 @@ void register_Molpro_class(){ "setForceTemplate" , setForceTemplate_function_value , ( bp::arg("force_template") ) + , bp::release_gil_policy() , "Set the template for the command file to be used to get\nMolpro to calculate the forces. The following tags will\n" ); } @@ -259,6 +271,7 @@ void register_Molpro_class(){ "setLatticeInBohrRadii" , setLatticeInBohrRadii_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Tell Sire that Molpro requires lattice charges to be in units of bohr radii\nin the command file (otherwise they are in angstroms)" ); } @@ -271,6 +284,7 @@ void register_Molpro_class(){ "setMaximumRunTime" , setMaximumRunTime_function_value , ( bp::arg("max_runtime") ) + , bp::release_gil_policy() , "Set the maximum allowed runtime for the molpro job - this is used\nto detect hangs - if the molpro job takes longer than this\ntime then it is killed and an exception raised. The maximum\nruntime is measured in milliseconds" ); } @@ -283,6 +297,7 @@ void register_Molpro_class(){ "setMemoryRequirement" , setMemoryRequirement_function_value , ( bp::arg("nbytes") ) + , bp::release_gil_policy() , "Set the memory requirement (in bytes) that will be reserved for use\nby molpro. You will need to set this if the default amount\n(8000000 floating point words ~ 32MB) is not enough. Be careful\nnot to allocate too much though or you will be swapping all of the time" ); } @@ -295,6 +310,7 @@ void register_Molpro_class(){ "setMethod" , setMethod_function_value , ( bp::arg("method") ) + , bp::release_gil_policy() , "Set the QM method to be used to calculate the energy or\nforce (e.g. HF, df-ks,b3lyp). This will substitute for\n@QM_METHOD@ in the energy and force command file templates" ); } @@ -307,6 +323,7 @@ void register_Molpro_class(){ "setTotalCharge" , setTotalCharge_function_value , ( bp::arg("charge") ) + , bp::release_gil_policy() , "Set the total charge of the system (in unit charges)" ); } @@ -318,6 +335,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "supportsLatticeCharges" , supportsLatticeCharges_function_value + , bp::release_gil_policy() , "" ); } @@ -329,6 +347,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -340,6 +359,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "totalCharge" , totalCharge_function_value + , bp::release_gil_policy() , "Return the total charge of the system" ); } @@ -351,6 +371,7 @@ void register_Molpro_class(){ Molpro_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/Mopac.pypp.cpp b/wrapper/Squire/Mopac.pypp.cpp index d7b0c9a4f..dce57b6b1 100644 --- a/wrapper/Squire/Mopac.pypp.cpp +++ b/wrapper/Squire/Mopac.pypp.cpp @@ -47,6 +47,8 @@ Squire::Mopac __copy__(const Squire::Mopac &other){ return Squire::Mopac(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Mopac_class(){ { //::Squire::Mopac @@ -64,6 +66,7 @@ void register_Mopac_class(){ "calculateCharges" , calculateCharges_function_value , ( bp::arg("molecule"), bp::arg("map") ) + , bp::release_gil_policy() , "Use Mopac to calculate the partial charges for the passed molecule\n(using the total charge set in this program)" ); } @@ -112,6 +115,7 @@ void register_Mopac_class(){ "environment" , environment_function_value , ( bp::arg("variable") ) + , bp::release_gil_policy() , "Return the value of the explicitly set environmental variable variable.\nA null string is returned if this variable has not been set\nexplicitly (this does not mean the variable doesnt exist - merely\nthat a specific value has not been set)" ); } @@ -123,6 +127,7 @@ void register_Mopac_class(){ Mopac_exposer.def( "executable" , executable_function_value + , bp::release_gil_policy() , "Return the executable (full path and also arguments) to be used. This\nis null if the executable is searched for in the path" ); } @@ -198,6 +203,7 @@ void register_Mopac_class(){ "setChargeTemplate" , setChargeTemplate_function_value , ( bp::arg("charge_template") ) + , bp::release_gil_policy() , "Set the template for the command file to be used to get\nMopac to calculate atomic partial charges. The following tags will\n" ); } @@ -210,6 +216,7 @@ void register_Mopac_class(){ "setEnergyTemplate" , setEnergyTemplate_function_value , ( bp::arg("energy_template") ) + , bp::release_gil_policy() , "Set the template for the command file to be used to get\nMopac to calculate an energy. The following tags will\n" ); } @@ -222,6 +229,7 @@ void register_Mopac_class(){ "setEnvironment" , setEnvironment_function_value , ( bp::arg("variable"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the environmental variable variable to have the value value\nwhen the Mopac executable is run. This replaces any existing\nvalue of this environmental variable" ); } @@ -234,6 +242,7 @@ void register_Mopac_class(){ "setExecutable" , setExecutable_function_value , ( bp::arg("mopac_exe") ) + , bp::release_gil_policy() , "Set the Mopac executable (full path and also arguments) to be used" ); } @@ -246,6 +255,7 @@ void register_Mopac_class(){ "setForceTemplate" , setForceTemplate_function_value , ( bp::arg("force_template") ) + , bp::release_gil_policy() , "Set the template for the command file to be used to get\nMopac to calculate the forces. The following tags will\n" ); } @@ -258,6 +268,7 @@ void register_Mopac_class(){ "setMethod" , setMethod_function_value , ( bp::arg("method") ) + , bp::release_gil_policy() , "Set the QM method to be used to calculate the energy or\nforce (e.g. AM1, PM3). This will substitute for\n@QM_METHOD@ in the energy and force command file templates" ); } @@ -270,6 +281,7 @@ void register_Mopac_class(){ "setMopacInputFilename" , setMopacInputFilename_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Tell this interface which name Mopac uses for the input file. This\nis hardcoded into Mopac and depends on the system on which this\nprogram is running, e.g. FOR005 is the name for the Mopac\nI am using on OS X" ); } @@ -282,6 +294,7 @@ void register_Mopac_class(){ "setMopacOutputFilename" , setMopacOutputFilename_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Tell this interface which name Mopac uses for the output file. This\nis hardcoded into Mopac and depends on the system on which this\nprogram is running, e.g. FOR006 is the name for the Mopac\nI am using on OS X" ); } @@ -294,6 +307,7 @@ void register_Mopac_class(){ "setTotalCharge" , setTotalCharge_function_value , ( bp::arg("charge") ) + , bp::release_gil_policy() , "Set the total charge of the system (in unit charges)" ); } @@ -305,6 +319,7 @@ void register_Mopac_class(){ Mopac_exposer.def( "totalCharge" , totalCharge_function_value + , bp::release_gil_policy() , "Return the total charge of the system" ); } @@ -316,6 +331,7 @@ void register_Mopac_class(){ Mopac_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/NullQM.pypp.cpp b/wrapper/Squire/NullQM.pypp.cpp index a482382a1..215e458db 100644 --- a/wrapper/Squire/NullQM.pypp.cpp +++ b/wrapper/Squire/NullQM.pypp.cpp @@ -29,6 +29,8 @@ Squire::NullQM __copy__(const Squire::NullQM &other){ return Squire::NullQM(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullQM_class(){ { //::Squire::NullQM @@ -59,6 +61,7 @@ void register_NullQM_class(){ NullQM_exposer.def( "supportsLatticeCharges" , supportsLatticeCharges_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +73,7 @@ void register_NullQM_class(){ NullQM_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/NullQMChargeCalculator.pypp.cpp b/wrapper/Squire/NullQMChargeCalculator.pypp.cpp index 2cd347838..ab2df098c 100644 --- a/wrapper/Squire/NullQMChargeCalculator.pypp.cpp +++ b/wrapper/Squire/NullQMChargeCalculator.pypp.cpp @@ -29,6 +29,8 @@ Squire::NullQMChargeCalculator __copy__(const Squire::NullQMChargeCalculator &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullQMChargeCalculator_class(){ { //::Squire::NullQMChargeCalculator @@ -45,6 +47,7 @@ void register_NullQMChargeCalculator_class(){ "mayChangeCharges" , mayChangeCharges_function_value , ( bp::arg("arg0"), bp::arg("arg1"), bp::arg("arg2") ) + , bp::release_gil_policy() , "Return whether or not the change from oldmol to newmol\nmay change the charges. Use this function to see if\na charge calculation is required" ); } @@ -83,6 +86,7 @@ void register_NullQMChargeCalculator_class(){ NullQMChargeCalculator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/Orbital.pypp.cpp b/wrapper/Squire/Orbital.pypp.cpp index 044bd1085..25ee19c73 100644 --- a/wrapper/Squire/Orbital.pypp.cpp +++ b/wrapper/Squire/Orbital.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Orbital_class(){ { //::Squire::Orbital @@ -33,6 +35,7 @@ void register_Orbital_class(){ Orbital_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -44,6 +47,7 @@ void register_Orbital_class(){ Orbital_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/OrbitalShell.pypp.cpp b/wrapper/Squire/OrbitalShell.pypp.cpp index 72723a0cb..3b7b118e5 100644 --- a/wrapper/Squire/OrbitalShell.pypp.cpp +++ b/wrapper/Squire/OrbitalShell.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_OrbitalShell_class(){ { //::Squire::OrbitalShell @@ -33,6 +35,7 @@ void register_OrbitalShell_class(){ OrbitalShell_exposer.def( "angularMomentum" , angularMomentum_function_value + , bp::release_gil_policy() , "" ); } @@ -44,6 +47,7 @@ void register_OrbitalShell_class(){ OrbitalShell_exposer.def( "nOrbitals" , nOrbitals_function_value + , bp::release_gil_policy() , "" ); } @@ -55,6 +59,7 @@ void register_OrbitalShell_class(){ OrbitalShell_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/PP_GTO.pypp.cpp b/wrapper/Squire/PP_GTO.pypp.cpp index 568dad98c..6e4d450d4 100644 --- a/wrapper/Squire/PP_GTO.pypp.cpp +++ b/wrapper/Squire/PP_GTO.pypp.cpp @@ -31,6 +31,8 @@ Squire::PP_GTO __copy__(const Squire::PP_GTO &other){ return Squire::PP_GTO(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PP_GTO_class(){ { //::Squire::PP_GTO @@ -95,6 +97,7 @@ void register_PP_GTO_class(){ PP_GTO_exposer.def( "angularMomentum0" , angularMomentum0_function_value + , bp::release_gil_policy() , "Return the angular momentum of the first GTO shell in this pair" ); } @@ -106,6 +109,7 @@ void register_PP_GTO_class(){ PP_GTO_exposer.def( "angularMomentum1" , angularMomentum1_function_value + , bp::release_gil_policy() , "Return the angular momentum of the second GTO shell in this pair" ); } @@ -117,6 +121,7 @@ void register_PP_GTO_class(){ PP_GTO_exposer.def( "nOrbitals0" , nOrbitals0_function_value + , bp::release_gil_policy() , "Return the number of orbitals in the first GTO shell in this pair" ); } @@ -128,6 +133,7 @@ void register_PP_GTO_class(){ PP_GTO_exposer.def( "nOrbitals1" , nOrbitals1_function_value + , bp::release_gil_policy() , "Return the number of orbitals in the second GTO shell in this pair" ); } @@ -154,6 +160,7 @@ void register_PP_GTO_class(){ PP_GTO_exposer.def( "scale" , scale_function_value + , bp::release_gil_policy() , "Return the additional scaling constant needed to normalise the\nintegrals involving this shell-pair" ); } @@ -165,6 +172,7 @@ void register_PP_GTO_class(){ PP_GTO_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/PP_GTOs.pypp.cpp b/wrapper/Squire/PP_GTOs.pypp.cpp index 9600e4d3f..798a8e7af 100644 --- a/wrapper/Squire/PP_GTOs.pypp.cpp +++ b/wrapper/Squire/PP_GTOs.pypp.cpp @@ -29,6 +29,8 @@ Squire::PP_GTOs __copy__(const Squire::PP_GTOs &other){ return Squire::PP_GTOs(o const char* pvt_get_name(const Squire::PP_GTOs&){ return "Squire::PP_GTOs";} +#include "Helpers/release_gil_policy.hpp" + void register_PP_GTOs_class(){ { //::Squire::PP_GTOs @@ -45,6 +47,7 @@ void register_PP_GTOs_class(){ PP_GTOs_exposer.def( "kinetic_integral" , kinetic_integral_function_value + , bp::release_gil_policy() , "Return the kinetic energy integrals for each pair of orbitals" ); } @@ -71,6 +74,7 @@ void register_PP_GTOs_class(){ PP_GTOs_exposer.def( "overlap_integral" , overlap_integral_function_value + , bp::release_gil_policy() , "Return the overlap integrals for each pair of orbitals" ); } @@ -83,6 +87,7 @@ void register_PP_GTOs_class(){ "potential_integral" , potential_integral_function_value , ( bp::arg("C") ) + , bp::release_gil_policy() , "Return the potential energy integral for each pair of orbitals\ninteracting with the point charges in C" ); } @@ -95,6 +100,7 @@ void register_PP_GTOs_class(){ "potential_integral" , potential_integral_function_value , ( bp::arg("C"), bp::arg("m") ) + , bp::release_gil_policy() , "Return the mth auxillary potential energy integral for each pair of orbitals\ninteracting with the point charges in C" ); } diff --git a/wrapper/Squire/PS_GTO.pypp.cpp b/wrapper/Squire/PS_GTO.pypp.cpp index c45d50351..682fc8c67 100644 --- a/wrapper/Squire/PS_GTO.pypp.cpp +++ b/wrapper/Squire/PS_GTO.pypp.cpp @@ -31,6 +31,8 @@ Squire::PS_GTO __copy__(const Squire::PS_GTO &other){ return Squire::PS_GTO(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PS_GTO_class(){ { //::Squire::PS_GTO @@ -96,6 +98,7 @@ void register_PS_GTO_class(){ PS_GTO_exposer.def( "angularMomentum0" , angularMomentum0_function_value + , bp::release_gil_policy() , "Return the angular momentum of the first GTO shell in this pair" ); } @@ -107,6 +110,7 @@ void register_PS_GTO_class(){ PS_GTO_exposer.def( "angularMomentum1" , angularMomentum1_function_value + , bp::release_gil_policy() , "Return the angular momentum of the second GTO shell in this pair" ); } @@ -118,6 +122,7 @@ void register_PS_GTO_class(){ PS_GTO_exposer.def( "nOrbitals0" , nOrbitals0_function_value + , bp::release_gil_policy() , "Return the number of orbitals in the first GTO shell in this pair" ); } @@ -129,6 +134,7 @@ void register_PS_GTO_class(){ PS_GTO_exposer.def( "nOrbitals1" , nOrbitals1_function_value + , bp::release_gil_policy() , "Return the number of orbitals in the second GTO shell in this pair" ); } @@ -155,6 +161,7 @@ void register_PS_GTO_class(){ PS_GTO_exposer.def( "scale" , scale_function_value + , bp::release_gil_policy() , "" ); } @@ -166,6 +173,7 @@ void register_PS_GTO_class(){ PS_GTO_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/PS_GTOs.pypp.cpp b/wrapper/Squire/PS_GTOs.pypp.cpp index 37a4d5c60..4259790ea 100644 --- a/wrapper/Squire/PS_GTOs.pypp.cpp +++ b/wrapper/Squire/PS_GTOs.pypp.cpp @@ -29,6 +29,8 @@ Squire::PS_GTOs __copy__(const Squire::PS_GTOs &other){ return Squire::PS_GTOs(o const char* pvt_get_name(const Squire::PS_GTOs&){ return "Squire::PS_GTOs";} +#include "Helpers/release_gil_policy.hpp" + void register_PS_GTOs_class(){ { //::Squire::PS_GTOs @@ -46,6 +48,7 @@ void register_PS_GTOs_class(){ PS_GTOs_exposer.def( "kinetic_integral" , kinetic_integral_function_value + , bp::release_gil_policy() , "Return the kinetic energy integrals for each pair of orbitals" ); } @@ -72,6 +75,7 @@ void register_PS_GTOs_class(){ PS_GTOs_exposer.def( "overlap_integral" , overlap_integral_function_value + , bp::release_gil_policy() , "Return the overlap integrals for each pair of orbitals" ); } @@ -84,6 +88,7 @@ void register_PS_GTOs_class(){ "potential_integral" , potential_integral_function_value , ( bp::arg("C") ) + , bp::release_gil_policy() , "Return the potential energy integral for each pair of orbitals\ninteracting with the point charges in C" ); } @@ -96,6 +101,7 @@ void register_PS_GTOs_class(){ "potential_integral" , potential_integral_function_value , ( bp::arg("C"), bp::arg("m") ) + , bp::release_gil_policy() , "Return the mth auxillary potential energy integral for each pair of orbitals\ninteracting with the point charges in C" ); } diff --git a/wrapper/Squire/P_GTO.pypp.cpp b/wrapper/Squire/P_GTO.pypp.cpp index a1380e782..b41dee387 100644 --- a/wrapper/Squire/P_GTO.pypp.cpp +++ b/wrapper/Squire/P_GTO.pypp.cpp @@ -31,6 +31,8 @@ Squire::P_GTO __copy__(const Squire::P_GTO &other){ return Squire::P_GTO(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_P_GTO_class(){ { //::Squire::P_GTO @@ -47,6 +49,7 @@ void register_P_GTO_class(){ P_GTO_exposer.def( "angularMomentum" , angularMomentum_function_value + , bp::release_gil_policy() , "The angular momentum of P-GTOs is 1" ); } @@ -58,6 +61,7 @@ void register_P_GTO_class(){ P_GTO_exposer.def( "nOrbitals" , nOrbitals_function_value + , bp::release_gil_policy() , "There are 3 P-orbitals per shell (px, py and pz)" ); } @@ -84,6 +88,7 @@ void register_P_GTO_class(){ P_GTO_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this orbital" ); } @@ -95,6 +100,7 @@ void register_P_GTO_class(){ P_GTO_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/PointCharge.pypp.cpp b/wrapper/Squire/PointCharge.pypp.cpp index ac2fc3d7e..5623c694c 100644 --- a/wrapper/Squire/PointCharge.pypp.cpp +++ b/wrapper/Squire/PointCharge.pypp.cpp @@ -21,6 +21,8 @@ Squire::PointCharge __copy__(const Squire::PointCharge &other){ return Squire::P const char* pvt_get_name(const Squire::PointCharge&){ return "Squire::PointCharge";} +#include "Helpers/release_gil_policy.hpp" + void register_PointCharge_class(){ { //::Squire::PointCharge @@ -50,6 +52,7 @@ void register_PointCharge_class(){ PointCharge_exposer.def( "charge" , charge_function_value + , bp::release_gil_policy() , "Return the magnitude of this point charge (in internal units)" ); } @@ -76,6 +79,7 @@ void register_PointCharge_class(){ PointCharge_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/PointDipole.pypp.cpp b/wrapper/Squire/PointDipole.pypp.cpp index 8d4d45262..3e50b7872 100644 --- a/wrapper/Squire/PointDipole.pypp.cpp +++ b/wrapper/Squire/PointDipole.pypp.cpp @@ -19,6 +19,8 @@ Squire::PointDipole __copy__(const Squire::PointDipole &other){ return Squire::P const char* pvt_get_name(const Squire::PointDipole&){ return "Squire::PointDipole";} +#include "Helpers/release_gil_policy.hpp" + void register_PointDipole_class(){ { //::Squire::PointDipole @@ -74,6 +76,7 @@ void register_PointDipole_class(){ PointDipole_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/QMChargeCalculator.pypp.cpp b/wrapper/Squire/QMChargeCalculator.pypp.cpp index 82074cb33..f8fba03cd 100644 --- a/wrapper/Squire/QMChargeCalculator.pypp.cpp +++ b/wrapper/Squire/QMChargeCalculator.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_QMChargeCalculator_class(){ { //::Squire::QMChargeCalculator @@ -89,6 +91,7 @@ void register_QMChargeCalculator_class(){ QMChargeCalculator_exposer.def( "scaleFactor" , scaleFactor_function_value + , bp::release_gil_policy() , "Return the scale factor for the charges" ); } @@ -101,6 +104,7 @@ void register_QMChargeCalculator_class(){ "setScaleFactor" , setScaleFactor_function_value , ( bp::arg("sclfactor") ) + , bp::release_gil_policy() , "Set the scale factor for the charges" ); } @@ -112,6 +116,7 @@ void register_QMChargeCalculator_class(){ QMChargeCalculator_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/QMChargeConstraint.pypp.cpp b/wrapper/Squire/QMChargeConstraint.pypp.cpp index 3f237c9ee..f4476198a 100644 --- a/wrapper/Squire/QMChargeConstraint.pypp.cpp +++ b/wrapper/Squire/QMChargeConstraint.pypp.cpp @@ -10,6 +10,8 @@ namespace bp = boost::python; #include "SireMol/atomcharges.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -40,6 +42,8 @@ Squire::QMChargeConstraint __copy__(const Squire::QMChargeConstraint &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_QMChargeConstraint_class(){ { //::Squire::QMChargeConstraint @@ -57,7 +61,7 @@ void register_QMChargeConstraint_class(){ QMChargeConstraint_exposer.def( "chargeCalculator" , chargeCalculator_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the calculator used to calculate atomic partial charges\nfrom an underlying QM calculation" ); } @@ -85,6 +89,7 @@ void register_QMChargeConstraint_class(){ "setChargeCalculator" , setChargeCalculator_function_value , ( bp::arg("chargecalculator") ) + , bp::release_gil_policy() , "Set the charge calculator used to calculate atomic partial charges\nfrom an underlying QM calculation" ); } @@ -96,6 +101,7 @@ void register_QMChargeConstraint_class(){ QMChargeConstraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this constraint" ); } @@ -107,6 +113,7 @@ void register_QMChargeConstraint_class(){ QMChargeConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/QMComponent.pypp.cpp b/wrapper/Squire/QMComponent.pypp.cpp index d1362b06b..0a0de6bee 100644 --- a/wrapper/Squire/QMComponent.pypp.cpp +++ b/wrapper/Squire/QMComponent.pypp.cpp @@ -36,6 +36,8 @@ Squire::QMComponent __copy__(const Squire::QMComponent &other){ return Squire::Q #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_QMComponent_class(){ { //::Squire::QMComponent @@ -53,6 +55,7 @@ void register_QMComponent_class(){ "changeEnergy" , changeEnergy_function_value , ( bp::arg("ff"), bp::arg("qmnrg") ) + , bp::release_gil_policy() , "Change the QM component of the energy in the forcefield ff\nby delta" ); } @@ -65,6 +68,7 @@ void register_QMComponent_class(){ "setEnergy" , setEnergy_function_value , ( bp::arg("ff"), bp::arg("qmnrg") ) + , bp::release_gil_policy() , "Set the QM component of the energy in the forcefield ff\nto equal to the passed QMEnergy" ); } @@ -76,6 +80,7 @@ void register_QMComponent_class(){ QMComponent_exposer.def( "symbols" , symbols_function_value + , bp::release_gil_policy() , "" ); } @@ -87,7 +92,7 @@ void register_QMComponent_class(){ QMComponent_exposer.def( "total" , total_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -99,6 +104,7 @@ void register_QMComponent_class(){ QMComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -110,6 +116,7 @@ void register_QMComponent_class(){ QMComponent_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/QMFF.pypp.cpp b/wrapper/Squire/QMFF.pypp.cpp index b52b81ac8..4298d5c5a 100644 --- a/wrapper/Squire/QMFF.pypp.cpp +++ b/wrapper/Squire/QMFF.pypp.cpp @@ -40,6 +40,8 @@ Squire::QMFF __copy__(const Squire::QMFF &other){ return Squire::QMFF(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_QMFF_class(){ @@ -58,7 +60,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the energy components available to this forcefield" ); } @@ -71,6 +73,7 @@ void register_QMFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains a property\ncalled name" ); } @@ -106,6 +109,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "energyCommandFile" , energyCommandFile_function_value + , bp::release_gil_policy() , "Return the command file that would be used to calculate the energy\nof the molecules in this forcefield" ); } @@ -166,6 +170,7 @@ void register_QMFF_class(){ "fieldCommandFile" , fieldCommandFile_function_value , ( bp::arg("fieldtable") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the fields\nof the molecules in this forcefield" ); } @@ -178,6 +183,7 @@ void register_QMFF_class(){ "fieldCommandFile" , fieldCommandFile_function_value , ( bp::arg("fieldtable"), bp::arg("probe") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the fields\nof the molecules in this forcefield" ); } @@ -214,6 +220,7 @@ void register_QMFF_class(){ "forceCommandFile" , forceCommandFile_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the forces\non the molecules in this forcefield" ); } @@ -225,6 +232,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Trigger a complete recalculation of the QM energy" ); } @@ -251,6 +259,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -311,6 +320,7 @@ void register_QMFF_class(){ "potentialCommandFile" , potentialCommandFile_function_value , ( bp::arg("pottable") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the potential\nof the molecules in this forcefield" ); } @@ -323,6 +333,7 @@ void register_QMFF_class(){ "potentialCommandFile" , potentialCommandFile_function_value , ( bp::arg("pottable"), bp::arg("probe") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the potential\nof the molecules in this forcefield" ); } @@ -347,7 +358,7 @@ void register_QMFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the property with name name\nThrow: SireBase::missing_property\n" ); } @@ -359,7 +370,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "quantumProgram" , quantumProgram_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the QM program that will be used to calculate the\nenergies and forces on the molecules" ); } @@ -372,6 +383,7 @@ void register_QMFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the property name to the value value\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -384,6 +396,7 @@ void register_QMFF_class(){ "setQuantumProgram" , setQuantumProgram_function_value , ( bp::arg("qmprog") ) + , bp::release_gil_policy() , "Set the QM program that will be used to calculate the\nenergies and forces" ); } @@ -396,6 +409,7 @@ void register_QMFF_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space within which the QM molecules exist" ); } @@ -408,6 +422,7 @@ void register_QMFF_class(){ "setZeroEnergy" , setZeroEnergy_function_value , ( bp::arg("zero_energy") ) + , bp::release_gil_policy() , "Set the absolute value of the energy which is considered\nas zero (on the relative energy scale used by this potential).\nA relative scale is used so that the QM energy can be shifted\nso that it is comparable to an MM energy" ); } @@ -419,7 +434,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the space within which the QM molecules exist" ); } @@ -431,6 +446,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -442,6 +458,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -453,6 +470,7 @@ void register_QMFF_class(){ QMFF_exposer.def( "zeroEnergy" , zeroEnergy_function_value + , bp::release_gil_policy() , "Return the absolute value of the energy which is considered\nas zero (on the relative energy scale used by this potential).\nA relative scale is used so that the QM energy can be shifted\nso that it is comparable to an MM energy" ); } diff --git a/wrapper/Squire/QMMMFF.pypp.cpp b/wrapper/Squire/QMMMFF.pypp.cpp index 8288d777f..f2050addb 100644 --- a/wrapper/Squire/QMMMFF.pypp.cpp +++ b/wrapper/Squire/QMMMFF.pypp.cpp @@ -42,6 +42,8 @@ Squire::QMMMFF __copy__(const Squire::QMMMFF &other){ return Squire::QMMMFF(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_QMMMFF_class(){ @@ -60,6 +62,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "chargeScalingFactor" , chargeScalingFactor_function_value + , bp::release_gil_policy() , "Return the amount by which the MM charges are scaled in the QMMM interaction" ); } @@ -71,7 +74,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbols representing the energy components of this forcefield" ); } @@ -84,6 +87,7 @@ void register_QMMMFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not this forcefield contains a property\ncalled name" ); } @@ -119,6 +123,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "energyCommandFile" , energyCommandFile_function_value + , bp::release_gil_policy() , "Return the command file that would be used to calculate the energy\nof the molecules in this forcefield" ); } @@ -179,6 +184,7 @@ void register_QMMMFF_class(){ "fieldCommandFile" , fieldCommandFile_function_value , ( bp::arg("fieldtable") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the fields\nof the molecules in this forcefield" ); } @@ -191,6 +197,7 @@ void register_QMMMFF_class(){ "fieldCommandFile" , fieldCommandFile_function_value , ( bp::arg("fieldtable"), bp::arg("probe") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the fields\nof the molecules in this forcefield" ); } @@ -227,6 +234,7 @@ void register_QMMMFF_class(){ "forceCommandFile" , forceCommandFile_function_value , ( bp::arg("forcetable") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the forces\non the molecules in this forcefield" ); } @@ -238,6 +246,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "isIntermolecularOnly" , isIntermolecularOnly_function_value + , bp::release_gil_policy() , "Return whether or not we only calculate the intermolecular energy\n(energy between the QM and MM atoms)" ); } @@ -249,6 +258,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Signal that this forcefield must recalculate the energy from scratch" ); } @@ -275,6 +285,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "parameters" , parameters_function_value + , bp::release_gil_policy() , "" ); } @@ -335,6 +346,7 @@ void register_QMMMFF_class(){ "potentialCommandFile" , potentialCommandFile_function_value , ( bp::arg("pottable") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the potential\nof the molecules in this forcefield" ); } @@ -347,6 +359,7 @@ void register_QMMMFF_class(){ "potentialCommandFile" , potentialCommandFile_function_value , ( bp::arg("pottable"), bp::arg("probe") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the potential\nof the molecules in this forcefield" ); } @@ -371,7 +384,7 @@ void register_QMMMFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the property with name name\nThrow: SireBase::missing_property\n" ); } @@ -383,7 +396,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "quantumProgram" , quantumProgram_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the QM program that will be used to calculate the\nenergies and forces on the molecules" ); } @@ -396,6 +409,7 @@ void register_QMMMFF_class(){ "setChargeScalingFactor" , setChargeScalingFactor_function_value , ( bp::arg("scale_factor") ) + , bp::release_gil_policy() , "Set the scaling factor for the MM charges in the QMMM interaction" ); } @@ -408,6 +422,7 @@ void register_QMMMFF_class(){ "setIntermolecularOnly" , setIntermolecularOnly_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Set whether or not we only calculate the intermolecular energy\n(energy between the QM and MM atoms)" ); } @@ -420,6 +435,7 @@ void register_QMMMFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "Set the property name to the value value\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -432,6 +448,7 @@ void register_QMMMFF_class(){ "setQuantumProgram" , setQuantumProgram_function_value , ( bp::arg("qmprog") ) + , bp::release_gil_policy() , "Set the QM program that will be used to calculate the\nenergies and forces" ); } @@ -444,6 +461,7 @@ void register_QMMMFF_class(){ "setSpace" , setSpace_function_value , ( bp::arg("space") ) + , bp::release_gil_policy() , "Set the space within which the QM molecules exist" ); } @@ -456,6 +474,7 @@ void register_QMMMFF_class(){ "setSwitchingFunction" , setSwitchingFunction_function_value , ( bp::arg("switchfunc") ) + , bp::release_gil_policy() , "Set the switching function used to provide the\ncutoff between the QM and MM regions" ); } @@ -468,6 +487,7 @@ void register_QMMMFF_class(){ "setZeroEnergy" , setZeroEnergy_function_value , ( bp::arg("zero_energy") ) + , bp::release_gil_policy() , "Set the absolute value of the energy which is considered\nas zero (on the relative energy scale used by this potential).\nA relative scale is used so that the QM energy can be shifted\nso that it is comparable to an MM energy" ); } @@ -479,7 +499,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the space within which the QM molecules exist" ); } @@ -491,7 +511,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "switchingFunction" , switchingFunction_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the switching function used to provide the nonbonded cutoff\nbetween the QM and MM regions" ); } @@ -503,6 +523,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -514,6 +535,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -525,6 +547,7 @@ void register_QMMMFF_class(){ QMMMFF_exposer.def( "zeroEnergy" , zeroEnergy_function_value + , bp::release_gil_policy() , "Return the absolute value of the energy which is considered\nas zero (on the relative energy scale used by this potential).\nA relative scale is used so that the QM energy can be shifted\nso that it is comparable to an MM energy" ); } diff --git a/wrapper/Squire/QMProgram.pypp.cpp b/wrapper/Squire/QMProgram.pypp.cpp index 52db473ee..4c7a9de3b 100644 --- a/wrapper/Squire/QMProgram.pypp.cpp +++ b/wrapper/Squire/QMProgram.pypp.cpp @@ -28,6 +28,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_QMProgram_class(){ { //::Squire::QMProgram @@ -43,6 +45,7 @@ void register_QMProgram_class(){ "calculateCharges" , calculateCharges_function_value , ( bp::arg("molecule"), bp::arg("map") ) + , bp::release_gil_policy() , "Calculate the charges on the molecule molecule using the properties\nspecified in the passed property map" ); } @@ -55,6 +58,7 @@ void register_QMProgram_class(){ "calculateCharges" , calculateCharges_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Calculate the charges on the molecule molecule using the default\nproperty locations" ); } @@ -67,6 +71,7 @@ void register_QMProgram_class(){ "chargeCommandFile" , chargeCommandFile_function_value , ( bp::arg("molecule") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the atomic\npartial charges of the passed molecule" ); } @@ -79,6 +84,7 @@ void register_QMProgram_class(){ "chargeCommandFile" , chargeCommandFile_function_value , ( bp::arg("molecule"), bp::arg("map") ) + , bp::release_gil_policy() , "Return the command file that would be used to calculate the atomic\npartial charges of the passed molecule" ); } @@ -90,7 +96,7 @@ void register_QMProgram_class(){ QMProgram_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -102,6 +108,7 @@ void register_QMProgram_class(){ QMProgram_exposer.def( "numberOfMMAtomsLimit" , numberOfMMAtomsLimit_function_value + , bp::release_gil_policy() , "Return the maximum number of MM atoms supported by this QM program. This\nreturns -1 if there is no limit" ); } @@ -114,6 +121,7 @@ void register_QMProgram_class(){ "numberOfMMAtomsLimit" , numberOfMMAtomsLimit_function_value , ( bp::arg("num_qm_atoms") ) + , bp::release_gil_policy() , "Return the maximum number of QM atoms supported by this QM program,\ngiven the supplied number of MM atoms. This returns -1 if there is\nno limit" ); } @@ -125,6 +133,7 @@ void register_QMProgram_class(){ QMProgram_exposer.def( "supportsGaussianCharges" , supportsGaussianCharges_function_value + , bp::release_gil_policy() , "Return whether or not this QM program supports the use\nof gaussian lattice charges (which can polarise the QM wavefunction)" ); } @@ -136,6 +145,7 @@ void register_QMProgram_class(){ QMProgram_exposer.def( "supportsLatticeCharges" , supportsLatticeCharges_function_value + , bp::release_gil_policy() , "Return whether or not this QM program supports the use\nof point lattice charges (which can polarise the QM wavefunction)" ); } @@ -147,6 +157,7 @@ void register_QMProgram_class(){ QMProgram_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/SQM.pypp.cpp b/wrapper/Squire/SQM.pypp.cpp index ab7806543..09d0c4b01 100644 --- a/wrapper/Squire/SQM.pypp.cpp +++ b/wrapper/Squire/SQM.pypp.cpp @@ -51,6 +51,8 @@ Squire::SQM __copy__(const Squire::SQM &other){ return Squire::SQM(other); } #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SQM_class(){ { //::Squire::SQM @@ -92,6 +94,7 @@ void register_SQM_class(){ "environment" , environment_function_value , ( bp::arg("variable") ) + , bp::release_gil_policy() , "Return the value of the explicitly set environmental variable variable.\nA null string is returned if this variable has not been set\nexplicitly (this does not mean the variable doesnt exist - merely\nthat a specific value has not been set)" ); } @@ -103,6 +106,7 @@ void register_SQM_class(){ SQM_exposer.def( "executable" , executable_function_value + , bp::release_gil_policy() , "Return the executable (full path and also arguments) to be used. This\nis null if the executable is searched for in the path" ); } @@ -114,6 +118,7 @@ void register_SQM_class(){ SQM_exposer.def( "expectedNumberOfQMAtoms" , expectedNumberOfQMAtoms_function_value + , bp::release_gil_policy() , "Return the maximum number of expected QM atoms. This returns -1 if\nwe dont expect any QM atoms" ); } @@ -137,6 +142,7 @@ void register_SQM_class(){ SQM_exposer.def( "maximumNumberOfSQMInputLines" , maximumNumberOfSQMInputLines_function_value + , bp::release_gil_policy() , "Return the maximum number of supported SQM input lines. This returns\n-1 if SQM doesnt have a file size limit" ); } @@ -148,6 +154,7 @@ void register_SQM_class(){ SQM_exposer.def( "maximumRunTime" , maximumRunTime_function_value + , bp::release_gil_policy() , "Return the maximum runtime allowed for a SQM job, in milliseconds" ); } @@ -171,6 +178,7 @@ void register_SQM_class(){ SQM_exposer.def( "numberOfMMAtomsLimit" , numberOfMMAtomsLimit_function_value + , bp::release_gil_policy() , "Return the maximum number of MM atoms supported by SQM. This returns\n-1 if there is no limit on the number of atoms" ); } @@ -183,6 +191,7 @@ void register_SQM_class(){ "numberOfMMAtomsLimit" , numberOfMMAtomsLimit_function_value , ( bp::arg("num_qm_atoms") ) + , bp::release_gil_policy() , "Return the maximum number of MM atoms supported by SQM if there\nare num_qm_atoms QM atoms. This returns\n-1 if there is no limit on the number of atoms" ); } @@ -210,6 +219,7 @@ void register_SQM_class(){ "setEnergyTemplate" , setEnergyTemplate_function_value , ( bp::arg("energy_template") ) + , bp::release_gil_policy() , "Set the template for the command file to be used to get\nSQM to calculate an energy. The following tags will\n" ); } @@ -222,6 +232,7 @@ void register_SQM_class(){ "setEnvironment" , setEnvironment_function_value , ( bp::arg("variable"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the environmental variable variable to have the value value\nwhen the SQM executable is run. This replaces any existing\nvalue of this environmental variable" ); } @@ -234,6 +245,7 @@ void register_SQM_class(){ "setExecutable" , setExecutable_function_value , ( bp::arg("SQM_exe") ) + , bp::release_gil_policy() , "Set the SQM executable (full path and also arguments) to be used" ); } @@ -246,6 +258,7 @@ void register_SQM_class(){ "setExpectedNumberOfQMAtoms" , setExpectedNumberOfQMAtoms_function_value , ( bp::arg("natoms") ) + , bp::release_gil_policy() , "Set the maximum number of expected QM atoms. This is used, together with\nthe maximum number of lines in a SQM input file, to work out the maximum\nnumber of supported MM atoms" ); } @@ -258,6 +271,7 @@ void register_SQM_class(){ "setForceTemplate" , setForceTemplate_function_value , ( bp::arg("force_template") ) + , bp::release_gil_policy() , "Set the template for the command file to be used to get\nSQM to calculate the forces. The following tags will\n" ); } @@ -270,6 +284,7 @@ void register_SQM_class(){ "setMaximumNumberOfSQMInputLines" , setMaximumNumberOfSQMInputLines_function_value , ( bp::arg("numlines") ) + , bp::release_gil_policy() , "Set the maximum number of lines that can be parsed from an SQM input file.\nCurrently, SQM has a hard-coded limit of 1000 lines" ); } @@ -282,6 +297,7 @@ void register_SQM_class(){ "setMaximumRunTime" , setMaximumRunTime_function_value , ( bp::arg("max_runtime") ) + , bp::release_gil_policy() , "Set the maximum allowed runtime for the SQM job - this is used\nto detect hangs - if the SQM job takes longer than this\ntime then it is killed and an exception raised. The maximum\nruntime is measured in milliseconds" ); } @@ -294,6 +310,7 @@ void register_SQM_class(){ "setMethod" , setMethod_function_value , ( bp::arg("method") ) + , bp::release_gil_policy() , "Set the QM method to be used to calculate the energy or\nforce (e.g. AM1, PM3, AM1d etc. See the AmberTools documentation\nfor SQM to find the supported methods and the string used to\nspecify that method). This will substitute for\n@QM_METHOD@ in the command file templates, and should be the same\nstring used in SQM as specified in the SQM documentation" ); } @@ -306,6 +323,7 @@ void register_SQM_class(){ "setTotalCharge" , setTotalCharge_function_value , ( bp::arg("charge") ) + , bp::release_gil_policy() , "Set the total charge of the system (in unit charges)" ); } @@ -317,6 +335,7 @@ void register_SQM_class(){ SQM_exposer.def( "supportsLatticeCharges" , supportsLatticeCharges_function_value + , bp::release_gil_policy() , "" ); } @@ -328,6 +347,7 @@ void register_SQM_class(){ SQM_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -339,6 +359,7 @@ void register_SQM_class(){ SQM_exposer.def( "totalCharge" , totalCharge_function_value + , bp::release_gil_policy() , "Return the total charge of the system" ); } @@ -350,6 +371,7 @@ void register_SQM_class(){ SQM_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/SS_GTO.pypp.cpp b/wrapper/Squire/SS_GTO.pypp.cpp index 8a6d1ec3c..54f2aa9f9 100644 --- a/wrapper/Squire/SS_GTO.pypp.cpp +++ b/wrapper/Squire/SS_GTO.pypp.cpp @@ -33,6 +33,8 @@ Squire::SS_GTO __copy__(const Squire::SS_GTO &other){ return Squire::SS_GTO(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SS_GTO_class(){ { //::Squire::SS_GTO @@ -49,6 +51,7 @@ void register_SS_GTO_class(){ SS_GTO_exposer.def( "angularMomentum0" , angularMomentum0_function_value + , bp::release_gil_policy() , "Return the angular momentum of the first GTO shell in this pair" ); } @@ -60,6 +63,7 @@ void register_SS_GTO_class(){ SS_GTO_exposer.def( "angularMomentum1" , angularMomentum1_function_value + , bp::release_gil_policy() , "Return the angular momentum of the second GTO shell in this pair" ); } @@ -71,6 +75,7 @@ void register_SS_GTO_class(){ SS_GTO_exposer.def( "nOrbitals0" , nOrbitals0_function_value + , bp::release_gil_policy() , "Return the number of orbitals in the first GTO shell in this pair" ); } @@ -82,6 +87,7 @@ void register_SS_GTO_class(){ SS_GTO_exposer.def( "nOrbitals1" , nOrbitals1_function_value + , bp::release_gil_policy() , "Return the number of orbitals in the second GTO shell in this pair" ); } @@ -108,6 +114,7 @@ void register_SS_GTO_class(){ SS_GTO_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/SS_GTOs.pypp.cpp b/wrapper/Squire/SS_GTOs.pypp.cpp index 680e31741..0bb067cc3 100644 --- a/wrapper/Squire/SS_GTOs.pypp.cpp +++ b/wrapper/Squire/SS_GTOs.pypp.cpp @@ -31,6 +31,8 @@ Squire::SS_GTOs __copy__(const Squire::SS_GTOs &other){ return Squire::SS_GTOs(o const char* pvt_get_name(const Squire::SS_GTOs&){ return "Squire::SS_GTOs";} +#include "Helpers/release_gil_policy.hpp" + void register_SS_GTOs_class(){ { //::Squire::SS_GTOs @@ -48,6 +50,7 @@ void register_SS_GTOs_class(){ "coulomb_integral" , coulomb_integral_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the coulomb integral between this set of pair of\nS orbitals and the pairs other S orbitals in other" ); } @@ -60,6 +63,7 @@ void register_SS_GTOs_class(){ "exchange_integral" , exchange_integral_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return the exchange integral between this set of pair of\norbitals and the other set of pairs in other" ); } @@ -71,6 +75,7 @@ void register_SS_GTOs_class(){ SS_GTOs_exposer.def( "kinetic_integral" , kinetic_integral_function_value + , bp::release_gil_policy() , "Return the kinetic energy integral between all pairs of S orbitals in this set" ); } @@ -95,6 +100,7 @@ void register_SS_GTOs_class(){ SS_GTOs_exposer.def( "overlap_integral" , overlap_integral_function_value + , bp::release_gil_policy() , "Return the overlap integrals between all pairs of S orbitals in this set" ); } @@ -107,6 +113,7 @@ void register_SS_GTOs_class(){ "potential_integral" , potential_integral_function_value , ( bp::arg("C") ) + , bp::release_gil_policy() , "Return the potential energy integral of all pairs of S orbitals in this\nset with the array of point charges in C" ); } @@ -119,6 +126,7 @@ void register_SS_GTOs_class(){ "potential_integral" , potential_integral_function_value , ( bp::arg("C"), bp::arg("m") ) + , bp::release_gil_policy() , "Return the mth auxilliary potential energy integral of all pairs of S\norbitals in this set with the array of point charges in C" ); } diff --git a/wrapper/Squire/S_GTO.pypp.cpp b/wrapper/Squire/S_GTO.pypp.cpp index 5a2f431f5..c4c5ebed7 100644 --- a/wrapper/Squire/S_GTO.pypp.cpp +++ b/wrapper/Squire/S_GTO.pypp.cpp @@ -33,6 +33,8 @@ Squire::S_GTO __copy__(const Squire::S_GTO &other){ return Squire::S_GTO(other); #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_S_GTO_class(){ { //::Squire::S_GTO @@ -49,6 +51,7 @@ void register_S_GTO_class(){ S_GTO_exposer.def( "angularMomentum" , angularMomentum_function_value + , bp::release_gil_policy() , "Return the angular momentum of this orbital shell (l==0)" ); } @@ -60,6 +63,7 @@ void register_S_GTO_class(){ S_GTO_exposer.def( "nOrbitals" , nOrbitals_function_value + , bp::release_gil_policy() , "Return the number of orbitals in this shell (1)" ); } @@ -86,6 +90,7 @@ void register_S_GTO_class(){ S_GTO_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this orbital" ); } @@ -97,6 +102,7 @@ void register_S_GTO_class(){ S_GTO_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/ShellPair.pypp.cpp b/wrapper/Squire/ShellPair.pypp.cpp index 738b28755..58d21f39f 100644 --- a/wrapper/Squire/ShellPair.pypp.cpp +++ b/wrapper/Squire/ShellPair.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ShellPair_class(){ { //::Squire::ShellPair @@ -33,6 +35,7 @@ void register_ShellPair_class(){ ShellPair_exposer.def( "angularMomentum0" , angularMomentum0_function_value + , bp::release_gil_policy() , "" ); } @@ -44,6 +47,7 @@ void register_ShellPair_class(){ ShellPair_exposer.def( "angularMomentum1" , angularMomentum1_function_value + , bp::release_gil_policy() , "" ); } @@ -55,6 +59,7 @@ void register_ShellPair_class(){ ShellPair_exposer.def( "nOrbitals0" , nOrbitals0_function_value + , bp::release_gil_policy() , "" ); } @@ -66,6 +71,7 @@ void register_ShellPair_class(){ ShellPair_exposer.def( "nOrbitals1" , nOrbitals1_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +83,7 @@ void register_ShellPair_class(){ ShellPair_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Squire/Squire_properties.cpp b/wrapper/Squire/Squire_properties.cpp index aa111417a..bad2a3127 100644 --- a/wrapper/Squire/Squire_properties.cpp +++ b/wrapper/Squire/Squire_properties.cpp @@ -4,14 +4,6 @@ #include "Base/convertproperty.hpp" #include "Squire_properties.h" -#include "SireError/errors.h" -#include "SireMol/molecule.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "latticecharges.h" -#include "qmprogram.h" -#include -#include "qmprogram.h" #include "SireError/errors.h" #include "SireID/index.h" #include "SireMaths/maths.h" @@ -28,9 +20,17 @@ #include "SireStream/shareddatastream.h" #include "qmchargecalculator.h" #include "qmchargecalculator.h" +#include "SireError/errors.h" +#include "SireMol/molecule.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "latticecharges.h" +#include "qmprogram.h" +#include +#include "qmprogram.h" void register_Squire_properties() { - register_property_container< Squire::QMProgPtr, Squire::QMProgram >(); register_property_container< Squire::GTOPtr, Squire::GTO >(); register_property_container< Squire::QMChargeCalculatorPtr, Squire::QMChargeCalculator >(); + register_property_container< Squire::QMProgPtr, Squire::QMProgram >(); } diff --git a/wrapper/Squire/Squire_registrars.cpp b/wrapper/Squire/Squire_registrars.cpp index be4d661eb..7267b1812 100644 --- a/wrapper/Squire/Squire_registrars.cpp +++ b/wrapper/Squire/Squire_registrars.cpp @@ -5,43 +5,43 @@ #include "Helpers/version_error_impl.h" -#include "pointcharge.h" -#include "qmchargeconstraint.h" -#include "qmprogram.h" -#include "qmpotential.h" +#include "am1bcc.h" #include "molpro.h" -#include "qmchargecalculator.h" -#include "qmmmff.h" -#include "sqm.h" #include "mopac.h" #include "pgto.h" -#include "am1bcc.h" -#include "sgto.h" -#include "qmff.h" +#include "pointcharge.h" #include "pointdipole.h" +#include "qmchargecalculator.h" +#include "qmchargeconstraint.h" +#include "qmff.h" +#include "qmmmff.h" +#include "qmpotential.h" +#include "qmprogram.h" +#include "sgto.h" +#include "sqm.h" #include "Helpers/objectregistry.hpp" void register_Squire_objects() { - ObjectRegistry::registerConverterFor< Squire::PointCharge >(); - ObjectRegistry::registerConverterFor< Squire::QMChargeConstraint >(); - ObjectRegistry::registerConverterFor< Squire::NullQM >(); - ObjectRegistry::registerConverterFor< Squire::QMComponent >(); + ObjectRegistry::registerConverterFor< Squire::AM1BCC >(); ObjectRegistry::registerConverterFor< Squire::Molpro >(); - ObjectRegistry::registerConverterFor< Squire::NullQMChargeCalculator >(); - ObjectRegistry::registerConverterFor< Squire::QMMMFF >(); - ObjectRegistry::registerConverterFor< Squire::SQM >(); ObjectRegistry::registerConverterFor< Squire::Mopac >(); ObjectRegistry::registerConverterFor< Squire::P_GTO >(); ObjectRegistry::registerConverterFor< Squire::PS_GTO >(); ObjectRegistry::registerConverterFor< Squire::PP_GTO >(); - ObjectRegistry::registerConverterFor< Squire::AM1BCC >(); + ObjectRegistry::registerConverterFor< Squire::PointCharge >(); + ObjectRegistry::registerConverterFor< Squire::PointDipole >(); + ObjectRegistry::registerConverterFor< Squire::NullQMChargeCalculator >(); + ObjectRegistry::registerConverterFor< Squire::QMChargeConstraint >(); + ObjectRegistry::registerConverterFor< Squire::QMFF >(); + ObjectRegistry::registerConverterFor< Squire::QMMMFF >(); + ObjectRegistry::registerConverterFor< Squire::QMComponent >(); + ObjectRegistry::registerConverterFor< Squire::NullQM >(); ObjectRegistry::registerConverterFor< Squire::S_GTO >(); ObjectRegistry::registerConverterFor< Squire::SS_GTO >(); - ObjectRegistry::registerConverterFor< Squire::QMFF >(); - ObjectRegistry::registerConverterFor< Squire::PointDipole >(); + ObjectRegistry::registerConverterFor< Squire::SQM >(); } diff --git a/wrapper/Squire/__init__.py b/wrapper/Squire/__init__.py index f0e214092..93afb6d38 100644 --- a/wrapper/Squire/__init__.py +++ b/wrapper/Squire/__init__.py @@ -1,11 +1,28 @@ -############################# -## -## The Squire module -## -## (C) Christopher Woods -## +""" +.. currentmodule:: sire.legacy.Squire -import Sire.MM -import Sire.System +Classes +======= -from Sire.Squire._Squire import * +.. autosummary:: + :toctree: generated/ + + AM1BCC + Molpro + Mopac + PointCharge + PointDipole + QMChargeCalculator + QMChargeConstraint + QMComponent + QMFF + QMMMFF + QMProgram + SQM + +""" + +from .. import MM as _MM +from .. import System as _System + +from ._Squire import * diff --git a/wrapper/Stream/CMakeLists.txt b/wrapper/Stream/CMakeLists.txt index db616f23c..f85dfba62 100644 --- a/wrapper/Stream/CMakeLists.txt +++ b/wrapper/Stream/CMakeLists.txt @@ -6,7 +6,7 @@ # Third Party dependencies of this module include_directories( ${BOOST_INCLUDE_DIR} - ${PYTHON_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} ${SIRE_GSL_INCLUDE_PATH} ) # Sire include paths @@ -33,7 +33,7 @@ set ( WRAPSTREAM_SOURCES # Create the library that holds all of the class wrappers add_library (Stream ${WRAPSTREAM_SOURCES}) -set_target_properties (Stream +set_target_properties (Stream PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -41,18 +41,18 @@ set_target_properties (Stream PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Stream SirePython SIRE_SireStream - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Stream" "_init_Stream" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Stream ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Stream ) install( TARGETS Stream LIBRARY DESTINATION ${INSTALLDIR} @@ -61,5 +61,5 @@ install( TARGETS Stream ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Stream/FileHeader.pypp.cpp b/wrapper/Stream/FileHeader.pypp.cpp index 92b2f66cf..135bdad84 100644 --- a/wrapper/Stream/FileHeader.pypp.cpp +++ b/wrapper/Stream/FileHeader.pypp.cpp @@ -53,6 +53,8 @@ SireStream::FileHeader __copy__(const SireStream::FileHeader &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FileHeader_class(){ { //::SireStream::FileHeader @@ -68,6 +70,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "assertCompatible" , assertCompatible_function_value + , bp::release_gil_policy() , "Assert that the libraries required are compatible with what has\nbeen loaded" ); } @@ -80,6 +83,7 @@ void register_FileHeader_class(){ "assertNotCorrupted" , assertNotCorrupted_function_value , ( bp::arg("compressed_data") ) + , bp::release_gil_policy() , "Assert that the data in compressed_data is not corrupt" ); } @@ -91,6 +95,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "buildVersion" , buildVersion_function_value + , bp::release_gil_policy() , "Return the version of the source code from the repository" ); } @@ -102,6 +107,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "compressionRatio" , compressionRatio_function_value + , bp::release_gil_policy() , "Return the compression ratio of the file" ); } @@ -149,6 +155,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "dataType" , dataType_function_value + , bp::release_gil_policy() , "Return the name of the data type of the object in this data\nThrow: SireError::invalid_state\n" ); } @@ -209,6 +216,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "repository" , repository_function_value + , bp::release_gil_policy() , "Return the repository from which this source code was downloaded" ); } @@ -221,6 +229,7 @@ void register_FileHeader_class(){ "requireLibrary" , requireLibrary_function_value , ( bp::arg("library") ) + , bp::release_gil_policy() , "Does this data require that the library library be loaded?" ); } @@ -232,6 +241,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "requiredLibraries" , requiredLibraries_function_value + , bp::release_gil_policy() , "Return the list of libraries required to load this data" ); } @@ -243,6 +253,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "requiredMemory" , requiredMemory_function_value + , bp::release_gil_policy() , "Return the minimum memory the will be necessary to read the file" ); } @@ -255,6 +266,7 @@ void register_FileHeader_class(){ "requiredVersion" , requiredVersion_function_value , ( bp::arg("library") ) + , bp::release_gil_policy() , "Return the version number required of the library library. This\nreturns 0 if this library isnt required." ); } @@ -278,6 +290,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this header" ); } @@ -289,6 +302,7 @@ void register_FileHeader_class(){ FileHeader_exposer.def( "version" , version_function_value + , bp::release_gil_policy() , "Return the master version number for the file - this version number\nis changed only when the file format is completely changed (e.g. we\nmove away from using a compressed header, then the compressed object)\n" ); } diff --git a/wrapper/Stream/MD5Sum.pypp.cpp b/wrapper/Stream/MD5Sum.pypp.cpp index 4f3b1ab2b..1597dcf71 100644 --- a/wrapper/Stream/MD5Sum.pypp.cpp +++ b/wrapper/Stream/MD5Sum.pypp.cpp @@ -27,6 +27,8 @@ SireStream::MD5Sum __copy__(const SireStream::MD5Sum &other){ return SireStream: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MD5Sum_class(){ { //::SireStream::MD5Sum @@ -60,6 +62,7 @@ void register_MD5Sum_class(){ MD5Sum_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the digest" ); } diff --git a/wrapper/Stream/__init__.py b/wrapper/Stream/__init__.py index 514ce5b62..9503a16b8 100644 --- a/wrapper/Stream/__init__.py +++ b/wrapper/Stream/__init__.py @@ -1,33 +1,49 @@ -############################# -## -## The SireStream module -## -## (C) Christopher Woods -## +""" +.. currentmodule:: sire.legacy.Stream -from Sire.Stream._Stream import * +Classes +======= + +.. autosummary:: + :toctree: generated/ + + FileHeader + MD5Sum + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + load + save + +""" + +from ._Stream import * import sys _pvt_load = load -_pvt_modules = { "SireAnalysis" : "Sire.Analysis", - "SireBase" : "Sire.Base", - "SireCAS" : "Sire.CAS", - "SireCluster" : "Sire.Cluster", - "SireError" : "Sire.Error", - "SireFF" : "Sire.FF", - "SireID" : "Sire.ID", - "SireIO" : "Sire.IO", - "SireMM" : "Sire.MM", - "SireMaths" : "Sire.Maths", - "SireMol" : "Sire.Mol", - "SireMove" : "Sire.Move", - "SireSystem" : "Sire.System", - "SireUnits" : "Sire.Units", - "SireVol" : "Sire.Vol", - "Squire" : "Sire.Squire", - "Soiree" : "Sire.Analysis" # Soiree was renamed as Analysis +_pvt_modules = { "SireAnalysis" : "sire.legacy.Analysis", + "SireBase" : "sire.legacy.Base", + "SireCAS" : "sire.legacy.CAS", + "SireCluster" : "sire.legacy.Cluster", + "SireError" : "sire.legacy.Error", + "SireFF" : "sire.legacy.FF", + "SireID" : "sire.legacy.ID", + "SireIO" : "sire.legacy.IO", + "SireMM" : "sire.legacy.MM", + "SireMaths" : "sire.legacy.Maths", + "SireMol" : "sire.legacy.Mol", + "SireMove" : "sire.legacy.Move", + "SireSystem" : "sire.legacy.System", + "SireUnits" : "sire.legacy.Units", + "SireVol" : "sire.legacy.Vol", + "Squire" : "sire.legacy.Squire", + "Soiree" : "sire.legacy.Analysis" # Soiree was renamed as Analysis } def _pvt_loadLibrary(lib): @@ -35,7 +51,7 @@ def _pvt_loadLibrary(lib): lib = str(lib) if lib in _pvt_modules: - __import__( _pvt_modules[lib] ) + __import__( _pvt_modules[lib] ) def load(data): header = getDataHeader(data) diff --git a/wrapper/System/AngleComponent.pypp.cpp b/wrapper/System/AngleComponent.pypp.cpp index e96d18386..8e8326fa1 100644 --- a/wrapper/System/AngleComponent.pypp.cpp +++ b/wrapper/System/AngleComponent.pypp.cpp @@ -34,6 +34,8 @@ SireSystem::AngleComponent __copy__(const SireSystem::AngleComponent &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AngleComponent_class(){ { //::SireSystem::AngleComponent @@ -51,6 +53,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of points (3)" ); } @@ -78,7 +81,7 @@ void register_AngleComponent_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point\nThrow: SireError::invalid_index\n" ); } @@ -90,7 +93,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the angle is calculated" ); } @@ -102,7 +105,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the angle is calculated" ); } @@ -114,7 +117,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third point between which the angle is calculated" ); } @@ -126,7 +129,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the 0-1 distance" ); } @@ -138,7 +141,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "r02" , r02_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the 0-2 distance" ); } @@ -150,7 +153,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "r12" , r12_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the 1-2 distance" ); } @@ -162,7 +165,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "theta" , theta_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the central angle between\nthe three points" ); } @@ -174,7 +177,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "theta012" , theta012_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the angle 012 between\nthe three points" ); } @@ -186,7 +189,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "theta021" , theta021_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the angle 021 between\nthe three points" ); } @@ -198,7 +201,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "theta102" , theta102_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the angle 102 between\nthe three points" ); } @@ -210,6 +213,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -221,6 +225,7 @@ void register_AngleComponent_class(){ AngleComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/AssignerGroup.pypp.cpp b/wrapper/System/AssignerGroup.pypp.cpp index 82c2bcefe..c1fd9c6e4 100644 --- a/wrapper/System/AssignerGroup.pypp.cpp +++ b/wrapper/System/AssignerGroup.pypp.cpp @@ -48,6 +48,8 @@ SireSystem::AssignerGroup __copy__(const SireSystem::AssignerGroup &other){ retu const char* pvt_get_name(const SireSystem::AssignerGroup&){ return "SireSystem::AssignerGroup";} +#include "Helpers/release_gil_policy.hpp" + void register_AssignerGroup_class(){ { //::SireSystem::AssignerGroup @@ -65,7 +67,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "assigner" , assigner_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the IDAssigner" ); } @@ -77,7 +79,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "group" , group_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group" ); } @@ -89,6 +91,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "isAssigner" , isAssigner_function_value + , bp::release_gil_policy() , "Return whether or not this is holding an IDAssigner" ); } @@ -101,6 +104,7 @@ void register_AssignerGroup_class(){ "isCompatible" , isCompatible_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this group is compatible with other.\nCompatible means is the same type, refers to the same MoleculeGroup etc." ); } @@ -112,6 +116,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -123,6 +128,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "isMoleculeGroup" , isMoleculeGroup_function_value + , bp::release_gil_policy() , "Return whether or not this is a holding a MoleculeGroup" ); } @@ -149,6 +155,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -161,6 +168,7 @@ void register_AssignerGroup_class(){ "update" , update_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Update the contained group or assigner to match the version\nin the passed system" ); } @@ -172,6 +180,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "views" , views_function_value + , bp::release_gil_policy() , "Return the molecule views contained in this group" ); } @@ -183,6 +192,7 @@ void register_AssignerGroup_class(){ AssignerGroup_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/CMakeAutogenFile.txt b/wrapper/System/CMakeAutogenFile.txt index 650ca8b68..5ee0b3fcd 100644 --- a/wrapper/System/CMakeAutogenFile.txt +++ b/wrapper/System/CMakeAutogenFile.txt @@ -1,52 +1,52 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - FreeEnergyMonitor.pypp.cpp - SysID.pypp.cpp - MonitorID.pypp.cpp - IDAssigner.pypp.cpp - GeometryComponent.pypp.cpp - MoleculeConstraint.pypp.cpp AngleComponent.pypp.cpp - Constraints.pypp.cpp - MonitorComponent.pypp.cpp - IDAndSet_SysID_.pypp.cpp - VolMapMonitor.pypp.cpp - PolariseCharges.pypp.cpp - ComponentConstraint.pypp.cpp - CloseMols.pypp.cpp - PerturbationConstraint.pypp.cpp + AssignerGroup.pypp.cpp ChargeConstraint.pypp.cpp - SysName.pypp.cpp - IDAndSet_MonitorID_.pypp.cpp - WindowedComponent.pypp.cpp - SpaceWrapper.pypp.cpp - _System_free_functions.pypp.cpp CheckPoint.pypp.cpp - EnergyMonitor.pypp.cpp - SystemMonitors.pypp.cpp + CloseMols.pypp.cpp + ComponentConstraint.pypp.cpp Constraint.pypp.cpp + Constraints.pypp.cpp + DihedralComponent.pypp.cpp + DistanceComponent.pypp.cpp + DoubleDistanceComponent.pypp.cpp + EnergyMonitor.pypp.cpp + FreeEnergyMonitor.pypp.cpp + GeometryComponent.pypp.cpp + IDAndSet_MonitorID_.pypp.cpp + IDAndSet_SysID_.pypp.cpp + IDAssigner.pypp.cpp + IDOrSet_MonitorID_.pypp.cpp + IDOrSet_SysID_.pypp.cpp IdentityConstraint.pypp.cpp + MoleculeConstraint.pypp.cpp + MonitorComponent.pypp.cpp + MonitorComponents.pypp.cpp + MonitorID.pypp.cpp + MonitorIdx.pypp.cpp + MonitorMonitor.pypp.cpp MonitorName.pypp.cpp - NullMonitor.pypp.cpp - NullConstraint.pypp.cpp MonitorProperty.pypp.cpp - IDOrSet_SysID_.pypp.cpp - IDOrSet_MonitorID_.pypp.cpp - MonitorMonitor.pypp.cpp - DistanceComponent.pypp.cpp - Specify_MonitorID_.pypp.cpp - DihedralComponent.pypp.cpp - MonitorComponents.pypp.cpp - TripleDistanceComponent.pypp.cpp - DoubleDistanceComponent.pypp.cpp + NullConstraint.pypp.cpp + NullMonitor.pypp.cpp + PerturbationConstraint.pypp.cpp + PolariseCharges.pypp.cpp PolariseChargesFF.pypp.cpp - MonitorIdx.pypp.cpp PropertyConstraint.pypp.cpp + SpaceWrapper.pypp.cpp + Specify_MonitorID_.pypp.cpp Specify_SysID_.pypp.cpp + SysID.pypp.cpp + SysIdx.pypp.cpp + SysName.pypp.cpp System.pypp.cpp - AssignerGroup.pypp.cpp SystemMonitor.pypp.cpp - SysIdx.pypp.cpp + SystemMonitors.pypp.cpp + TripleDistanceComponent.pypp.cpp + VolMapMonitor.pypp.cpp + WindowedComponent.pypp.cpp + _System_free_functions.pypp.cpp SireSystem_containers.cpp SireSystem_properties.cpp SireSystem_registrars.cpp diff --git a/wrapper/System/CMakeLists.txt b/wrapper/System/CMakeLists.txt index 4eb318b64..0d88f91f6 100644 --- a/wrapper/System/CMakeLists.txt +++ b/wrapper/System/CMakeLists.txt @@ -6,7 +6,7 @@ # Third Party dependencies of this module include_directories( ${BOOST_INCLUDE_DIR} - ${PYTHON_INCLUDE_DIR} + ${PYTHON_INCLUDE_DIR} ${SIRE_GSL_INCLUDE_PATH} ) # Sire include paths @@ -23,7 +23,7 @@ include(CMakeAutogenFile.txt) set ( WRAPSYSTEM_SOURCES _System.main.cpp - + ${PYPP_SOURCES} ) @@ -39,18 +39,18 @@ set_target_properties (System PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (System SirePython SIRE_SireSystem - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_System" "_init_System" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/System ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/System ) install( TARGETS System LIBRARY DESTINATION ${INSTALLDIR} @@ -59,6 +59,6 @@ install( TARGETS System ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/System/ChargeConstraint.pypp.cpp b/wrapper/System/ChargeConstraint.pypp.cpp index 7c7acd0cf..671cea3a9 100644 --- a/wrapper/System/ChargeConstraint.pypp.cpp +++ b/wrapper/System/ChargeConstraint.pypp.cpp @@ -30,6 +30,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ChargeConstraint_class(){ { //::SireSystem::ChargeConstraint @@ -44,7 +46,7 @@ void register_ChargeConstraint_class(){ ChargeConstraint_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that contains the molecules whose\ncharges are being constrained" ); } @@ -68,6 +70,7 @@ void register_ChargeConstraint_class(){ ChargeConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/CheckPoint.pypp.cpp b/wrapper/System/CheckPoint.pypp.cpp index 6c42fc66d..cd1dd8b18 100644 --- a/wrapper/System/CheckPoint.pypp.cpp +++ b/wrapper/System/CheckPoint.pypp.cpp @@ -21,6 +21,8 @@ SireSystem::CheckPoint __copy__(const SireSystem::CheckPoint &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_CheckPoint_class(){ { //::SireSystem::CheckPoint @@ -65,6 +67,7 @@ void register_CheckPoint_class(){ CheckPoint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/CloseMols.pypp.cpp b/wrapper/System/CloseMols.pypp.cpp index 5cbf0fcbf..d01543839 100644 --- a/wrapper/System/CloseMols.pypp.cpp +++ b/wrapper/System/CloseMols.pypp.cpp @@ -32,6 +32,8 @@ SireSystem::CloseMols __copy__(const SireSystem::CloseMols &other){ return SireS const char* pvt_get_name(const SireSystem::CloseMols&){ return "SireSystem::CloseMols";} +#include "Helpers/release_gil_policy.hpp" + void register_CloseMols_class(){ { //::SireSystem::CloseMols @@ -62,6 +64,7 @@ void register_CloseMols_class(){ "isClose" , isClose_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "" ); } @@ -73,7 +76,7 @@ void register_CloseMols_class(){ CloseMols_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that contains the molecules" ); } @@ -85,6 +88,7 @@ void register_CloseMols_class(){ CloseMols_exposer.def( "nClosest" , nClosest_function_value + , bp::release_gil_policy() , "Return the number of molecules to record" ); } @@ -111,7 +115,7 @@ void register_CloseMols_class(){ CloseMols_exposer.def( "point" , point_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the point used to find the closest molecules" ); } @@ -135,7 +139,7 @@ void register_CloseMols_class(){ CloseMols_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the space used to calculate the distances between the\nmolecules and the point" ); } @@ -147,6 +151,7 @@ void register_CloseMols_class(){ CloseMols_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -159,6 +164,7 @@ void register_CloseMols_class(){ "update" , update_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Update from the passed system - this returns whether or not this\nupdate changes the identity of the close molecules" ); } @@ -171,6 +177,7 @@ void register_CloseMols_class(){ "update" , update_function_value , ( bp::arg("system"), bp::arg("changed_mol") ) + , bp::release_gil_policy() , "Update from the passed system, providing the hint that only the\nmolecule with number molnum has changed since the last update.\nIt is a bad idea to provide an incorrect hint This returns whether\nor not this changes the identity of the close molecules" ); } @@ -183,6 +190,7 @@ void register_CloseMols_class(){ "update" , update_function_value , ( bp::arg("system"), bp::arg("molecules") ) + , bp::release_gil_policy() , "Update from the passed system, providing the hint that only the\nmolecules in changed_mols have changed since the last update.\nIt is a bad idea to provide an incorrect hint This returns whether\nor not this changes the identity of the close molecules" ); } @@ -194,6 +202,7 @@ void register_CloseMols_class(){ CloseMols_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/ComponentConstraint.pypp.cpp b/wrapper/System/ComponentConstraint.pypp.cpp index 7d9d0845b..0e0e3df26 100644 --- a/wrapper/System/ComponentConstraint.pypp.cpp +++ b/wrapper/System/ComponentConstraint.pypp.cpp @@ -40,6 +40,8 @@ SireSystem::ComponentConstraint __copy__(const SireSystem::ComponentConstraint & #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_ComponentConstraint_class(){ { //::SireSystem::ComponentConstraint @@ -56,7 +58,7 @@ void register_ComponentConstraint_class(){ ComponentConstraint_exposer.def( "component" , component_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the component being constrained" ); } @@ -95,6 +97,7 @@ void register_ComponentConstraint_class(){ ComponentConstraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the constraint" ); } @@ -106,6 +109,7 @@ void register_ComponentConstraint_class(){ ComponentConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/Constraint.pypp.cpp b/wrapper/System/Constraint.pypp.cpp index e660a0eec..d3b809a7c 100644 --- a/wrapper/System/Constraint.pypp.cpp +++ b/wrapper/System/Constraint.pypp.cpp @@ -38,6 +38,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Constraint_class(){ { //::SireSystem::Constraint @@ -53,6 +55,7 @@ void register_Constraint_class(){ "apply" , apply_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Apply this constraint to the passed system, returning\na new system in which the constraint is satisfied" ); } @@ -65,6 +68,7 @@ void register_Constraint_class(){ "assertSatisfied" , assertSatisfied_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Assert that the constraint is satisfied in the passed system\nThrow: SireSystem::constraint_error\n" ); } @@ -77,6 +81,7 @@ void register_Constraint_class(){ "isSatisfied" , isSatisfied_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Return whether or not this constraint is satisfied for\nthe passed system" ); } @@ -89,6 +94,7 @@ void register_Constraint_class(){ "mayAffect" , mayAffect_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Return whether or not this constraint may affect the passed delta" ); } @@ -100,7 +106,7 @@ void register_Constraint_class(){ Constraint_exposer.def( "null" , null_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -112,6 +118,7 @@ void register_Constraint_class(){ Constraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/Constraints.pypp.cpp b/wrapper/System/Constraints.pypp.cpp index 47b85ebf6..f33ca89f0 100644 --- a/wrapper/System/Constraints.pypp.cpp +++ b/wrapper/System/Constraints.pypp.cpp @@ -40,6 +40,8 @@ SireSystem::Constraints __copy__(const SireSystem::Constraints &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Constraints_class(){ @@ -61,6 +63,7 @@ void register_Constraints_class(){ "add" , add_function_value , ( bp::arg("constraint") ) + , bp::release_gil_policy() , "Add the passed constraint to this set - this is only added\nif it does not exist in this set" ); } @@ -73,6 +76,7 @@ void register_Constraints_class(){ "add" , add_function_value , ( bp::arg("constraints") ) + , bp::release_gil_policy() , "Add all of the passed constraints to this set. This only\nadds the constraints that are not already part of this set" ); } @@ -85,6 +89,7 @@ void register_Constraints_class(){ "apply" , apply_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Apply all of the constraints to the passed system. This\nreturns a system that satisfies all of the constraints" ); } @@ -97,6 +102,7 @@ void register_Constraints_class(){ "areSatisfied" , areSatisfied_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Return whether or not all of the constraints in this set are\nsatisfied in the passed system" ); } @@ -109,6 +115,7 @@ void register_Constraints_class(){ "assertSatisfied" , assertSatisfied_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Assert that all of the constraints in this set are satisfied\nin the passed system\nThrow: SireSystem::constraint_error\n" ); } @@ -120,6 +127,7 @@ void register_Constraints_class(){ Constraints_exposer.def( "constraints" , constraints_function_value + , bp::release_gil_policy() , "Return the list of all of the constraints in this set" ); } @@ -131,6 +139,7 @@ void register_Constraints_class(){ Constraints_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of constraints in this set" ); } @@ -142,6 +151,7 @@ void register_Constraints_class(){ Constraints_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether this is empty (contains no constraints)" ); } @@ -153,6 +163,7 @@ void register_Constraints_class(){ Constraints_exposer.def( "nConstraints" , nConstraints_function_value + , bp::release_gil_policy() , "Return the number of constraints in this set" ); } @@ -180,7 +191,7 @@ void register_Constraints_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -193,6 +204,7 @@ void register_Constraints_class(){ "remove" , remove_function_value , ( bp::arg("constraint") ) + , bp::release_gil_policy() , "Remove the constraint constraint from this set - this\ndoes nothing if this constraint is not part of this set" ); } @@ -205,6 +217,7 @@ void register_Constraints_class(){ "remove" , remove_function_value , ( bp::arg("constraints") ) + , bp::release_gil_policy() , "Remove all of the constraints in constraints from this\nset - this ignores constraints that are not in this set" ); } @@ -217,6 +230,7 @@ void register_Constraints_class(){ "removeAt" , removeAt_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the constraint at index i" ); } @@ -228,6 +242,7 @@ void register_Constraints_class(){ Constraints_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of constraints in this set" ); } @@ -239,6 +254,7 @@ void register_Constraints_class(){ Constraints_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -250,6 +266,7 @@ void register_Constraints_class(){ Constraints_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/DihedralComponent.pypp.cpp b/wrapper/System/DihedralComponent.pypp.cpp index 0748fc0ba..6e22ec924 100644 --- a/wrapper/System/DihedralComponent.pypp.cpp +++ b/wrapper/System/DihedralComponent.pypp.cpp @@ -34,6 +34,8 @@ SireSystem::DihedralComponent __copy__(const SireSystem::DihedralComponent &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DihedralComponent_class(){ { //::SireSystem::DihedralComponent @@ -51,6 +53,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of points (4)" ); } @@ -77,7 +80,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "phi" , phi_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the dihedral angle" ); } @@ -90,7 +93,7 @@ void register_DihedralComponent_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point\nThrow: SireError::invalid_index\n" ); } @@ -102,7 +105,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the dihedral is calculated" ); } @@ -114,7 +117,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the dihedral is calculated" ); } @@ -126,7 +129,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the third point between which the dihedral is calculated" ); } @@ -138,7 +141,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "point3" , point3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the fourth point between which the dihedral is calculated" ); } @@ -150,7 +153,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the 0-1 distance" ); } @@ -162,7 +165,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "r03" , r03_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the 0-3 distance" ); } @@ -174,7 +177,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "r12" , r12_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the 1-2 distance" ); } @@ -186,7 +189,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "r23" , r23_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the 2-3 distance" ); } @@ -198,7 +201,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "theta012" , theta012_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the angle between\npoints 0, 1 and 2" ); } @@ -210,7 +213,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "theta123" , theta123_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the angle between\npoints 1, 2 and 3" ); } @@ -222,6 +225,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -233,6 +237,7 @@ void register_DihedralComponent_class(){ DihedralComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/DistanceComponent.pypp.cpp b/wrapper/System/DistanceComponent.pypp.cpp index 1e5874b3e..f849fd175 100644 --- a/wrapper/System/DistanceComponent.pypp.cpp +++ b/wrapper/System/DistanceComponent.pypp.cpp @@ -30,6 +30,8 @@ SireSystem::DistanceComponent __copy__(const SireSystem::DistanceComponent &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DistanceComponent_class(){ { //::SireSystem::DistanceComponent @@ -47,6 +49,7 @@ void register_DistanceComponent_class(){ DistanceComponent_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of points (2)" ); } @@ -74,7 +77,7 @@ void register_DistanceComponent_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point\nThrow: SireError::invalid_index\n" ); } @@ -86,7 +89,7 @@ void register_DistanceComponent_class(){ DistanceComponent_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the distance is calculated" ); } @@ -98,7 +101,7 @@ void register_DistanceComponent_class(){ DistanceComponent_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the distance is calculated" ); } @@ -110,7 +113,7 @@ void register_DistanceComponent_class(){ DistanceComponent_exposer.def( "r" , r_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\ntwo points (r)" ); } @@ -122,6 +125,7 @@ void register_DistanceComponent_class(){ DistanceComponent_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -133,6 +137,7 @@ void register_DistanceComponent_class(){ DistanceComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/DoubleDistanceComponent.pypp.cpp b/wrapper/System/DoubleDistanceComponent.pypp.cpp index 7679a542a..aa08e49f9 100644 --- a/wrapper/System/DoubleDistanceComponent.pypp.cpp +++ b/wrapper/System/DoubleDistanceComponent.pypp.cpp @@ -30,6 +30,8 @@ SireSystem::DoubleDistanceComponent __copy__(const SireSystem::DoubleDistanceCom #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_DoubleDistanceComponent_class(){ { //::SireSystem::DoubleDistanceComponent @@ -47,6 +49,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of points (4)" ); } @@ -74,7 +77,7 @@ void register_DoubleDistanceComponent_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point\nThrow: SireError::invalid_index\n" ); } @@ -86,7 +89,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the first distance is calculated" ); } @@ -98,7 +101,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the first distance is calculated" ); } @@ -110,7 +113,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the second distance is calculated" ); } @@ -122,7 +125,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "point3" , point3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the second distance is calculated" ); } @@ -134,7 +137,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints .point0() and .point1() (r01)" ); } @@ -146,7 +149,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "r23" , r23_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints .point2() and .point2() (r23)" ); } @@ -158,6 +161,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -169,6 +173,7 @@ void register_DoubleDistanceComponent_class(){ DoubleDistanceComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/EnergyMonitor.pypp.cpp b/wrapper/System/EnergyMonitor.pypp.cpp index 3de0b3020..71d21a1d1 100644 --- a/wrapper/System/EnergyMonitor.pypp.cpp +++ b/wrapper/System/EnergyMonitor.pypp.cpp @@ -44,6 +44,8 @@ SireSystem::EnergyMonitor __copy__(const SireSystem::EnergyMonitor &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_EnergyMonitor_class(){ { //::SireSystem::EnergyMonitor @@ -67,6 +69,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "alpha" , alpha_function_value + , bp::release_gil_policy() , "Return the value of alpha (either the explicitly set value, or\nthe last value used when calculating the energy if an alpha\ncomponent is used)" ); } @@ -78,7 +81,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "assigner0" , assigner0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the assigner used to select views0. Note that this will\nraise an exception if an assigner is not used to choose these views\nThrow: SireError::unavailable_resource\n" ); } @@ -90,7 +93,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "assigner1" , assigner1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the assigner used to select views1. Note that this will\nraise an exception if an assigner is not used to choose these views\nThrow: SireError::unavailable_resource\n" ); } @@ -102,6 +105,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all statistics" ); } @@ -113,6 +117,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "coulombEnergies" , coulombEnergies_function_value + , bp::release_gil_policy() , "Return the array of all accumulated coulomb energies" ); } @@ -124,6 +129,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "coulombPower" , coulombPower_function_value + , bp::release_gil_policy() , "Return the coulomb power, if extra coulomb softening is used.\nThis returns 0 if coulomb softening is not used" ); } @@ -135,7 +141,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "group0" , group0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group from which views0 are drawn. Note that this\nwill return the molecule group used by assigner0 if an assigner is\nused to choose views" ); } @@ -147,7 +153,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "group1" , group1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group from which views1 are drawn. Note that this\nwill return the molecule group used by assigner1 if an assigner is\nused to choose views" ); } @@ -159,6 +165,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "ljEnergies" , ljEnergies_function_value + , bp::release_gil_policy() , "Return the array of all accumulated LJ energies" ); } @@ -171,6 +178,7 @@ void register_EnergyMonitor_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Accumulate energies from the passed system" ); } @@ -198,6 +206,7 @@ void register_EnergyMonitor_class(){ "setAlpha" , setAlpha_function_value , ( bp::arg("alpha") ) + , bp::release_gil_policy() , "Explicitly set the value of alpha used if a soft-core potential is used.\nThis clears any set alpha component symbol." ); } @@ -210,6 +219,7 @@ void register_EnergyMonitor_class(){ "setAlphaComponent" , setAlphaComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Set the system component symbol used to get the value of alpha\nif using a soft-core potential. Note that this will overwrite\nany explicitly-set value of alpha" ); } @@ -222,6 +232,7 @@ void register_EnergyMonitor_class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "Set the coulomb power parameter used by the soft-core potential" ); } @@ -234,6 +245,7 @@ void register_EnergyMonitor_class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Set the shift delta parameter used by the soft-core potential" ); } @@ -245,6 +257,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "shiftDelta" , shiftDelta_function_value + , bp::release_gil_policy() , "Return the shift delta parameter if a soft-core potential is used.\nThis returns 0 if a LJ shifting term is not used" ); } @@ -256,6 +269,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the typename of the class" ); } @@ -267,6 +281,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "usesSoftCore" , usesSoftCore_function_value + , bp::release_gil_policy() , "Return whether or not this monitor uses a soft-core potential to\ncalculate the CLJ energy between the molecules in views0() and the\nmolecules in views1()" ); } @@ -278,6 +293,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "views0" , views0_function_value + , bp::release_gil_policy() , "Return the array of the first group of molecule views in the same order as they\nappear in the arrays of energies" ); } @@ -289,6 +305,7 @@ void register_EnergyMonitor_class(){ EnergyMonitor_exposer.def( "views1" , views1_function_value + , bp::release_gil_policy() , "Return the array of the second group of molecule views in the same order as they\nappear in the arrays of energies" ); } diff --git a/wrapper/System/FreeEnergyMonitor.pypp.cpp b/wrapper/System/FreeEnergyMonitor.pypp.cpp index 57b20b715..8ee887fdf 100644 --- a/wrapper/System/FreeEnergyMonitor.pypp.cpp +++ b/wrapper/System/FreeEnergyMonitor.pypp.cpp @@ -47,6 +47,8 @@ SireSystem::FreeEnergyMonitor __copy__(const SireSystem::FreeEnergyMonitor &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_FreeEnergyMonitor_class(){ { //::SireSystem::FreeEnergyMonitor @@ -63,6 +65,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "binWidth" , binWidth_function_value + , bp::release_gil_policy() , "Return the width of the histogram bins used to record the free energies" ); } @@ -74,6 +77,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all statistics" ); } @@ -86,6 +90,7 @@ void register_FreeEnergyMonitor_class(){ "conserveMemory" , conserveMemory_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Conserve memory by copying the molecule data etc. from other into this monitor" ); } @@ -97,6 +102,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "coulombFreeEnergies" , coulombFreeEnergies_function_value + , bp::release_gil_policy() , "Return the array of all accumulated coulomb free energies" ); } @@ -108,6 +114,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "coulombPower" , coulombPower_function_value + , bp::release_gil_policy() , "Return the coulomb power, if extra coulomb softening is used.\nThis returns 0 if coulomb softening is not used" ); } @@ -119,6 +126,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "deltaLambda" , deltaLambda_function_value + , bp::release_gil_policy() , "Return the value of delta lambda used to calculate the free energy gradients" ); } @@ -130,6 +138,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "freeEnergies" , freeEnergies_function_value + , bp::release_gil_policy() , "Return the array of all accumulated total free energies" ); } @@ -166,6 +175,7 @@ void register_FreeEnergyMonitor_class(){ "isCompatible" , isCompatible_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this monitor is compatible with other\n(have the same groups, soft-core parameters, delta lambda, temperature etc.)" ); } @@ -178,6 +188,7 @@ void register_FreeEnergyMonitor_class(){ "isCompatibleExceptLambda" , isCompatibleExceptLambda_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this monitor is compatible with other, ignoring that\nthe monitors have different lambda values. This will let you know if it is sensible\nto construct PMFs from a combination of these monitors" ); } @@ -189,6 +200,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether this is empty (has no group data)" ); } @@ -200,6 +212,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "lambdaComponent" , lambdaComponent_function_value + , bp::release_gil_policy() , "Return the symbol used to find the value of lambda from the system" ); } @@ -211,6 +224,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "lambdaValue" , lambdaValue_function_value + , bp::release_gil_policy() , "Return the lambda value at which the free energy components were collected" ); } @@ -222,6 +236,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "ljFreeEnergies" , ljFreeEnergies_function_value + , bp::release_gil_policy() , "Return the array of all accumulated LJ free energies" ); } @@ -234,6 +249,7 @@ void register_FreeEnergyMonitor_class(){ "merge" , merge_function_value , ( bp::arg("monitors") ) + , bp::release_gil_policy() , "Merge a whole set of free energy monitors together. Note that you can\nonly merge them if they have the same groups, soft-core parameters, delta lambda,\ntemperature etc.\nThrow: SireError::incompatible_error\n" ); } @@ -246,6 +262,7 @@ void register_FreeEnergyMonitor_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Accumulate energies from the passed system" ); } @@ -257,6 +274,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the number of samples used to form all of the free energy averages\nin this monitor" ); } @@ -296,6 +314,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "referenceViews" , referenceViews_function_value + , bp::release_gil_policy() , "Return the array of the reference group molecule views in the same order as they\nappear in the arrays of free energies" ); } @@ -308,6 +327,7 @@ void register_FreeEnergyMonitor_class(){ "setBinWidth" , setBinWidth_function_value , ( bp::arg("binwidth") ) + , bp::release_gil_policy() , "Set the bin width for the histogram of recorded free energies.\nBy default, we dont collect a histogram of each of the components energies\nas this is too memory hungry." ); } @@ -320,6 +340,7 @@ void register_FreeEnergyMonitor_class(){ "setCoulombPower" , setCoulombPower_function_value , ( bp::arg("power") ) + , bp::release_gil_policy() , "Set the coulomb power parameter used by the soft-core potential" ); } @@ -332,6 +353,7 @@ void register_FreeEnergyMonitor_class(){ "setDeltaLambda" , setDeltaLambda_function_value , ( bp::arg("delta_lam") ) + , bp::release_gil_policy() , "Set the value of delta lambda to use to calculate the free energy gradients" ); } @@ -344,6 +366,7 @@ void register_FreeEnergyMonitor_class(){ "setLambdaComponent" , setLambdaComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Set the system component symbol used to get the value of lambda" ); } @@ -356,6 +379,7 @@ void register_FreeEnergyMonitor_class(){ "setShiftDelta" , setShiftDelta_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Set the shift delta parameter used by the soft-core potential" ); } @@ -368,6 +392,7 @@ void register_FreeEnergyMonitor_class(){ "setTemperature" , setTemperature_function_value , ( bp::arg("temperature") ) + , bp::release_gil_policy() , "Set the temperature at which the free energies are accumulated" ); } @@ -379,6 +404,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "shiftDelta" , shiftDelta_function_value + , bp::release_gil_policy() , "Return the shift delta parameter if a soft-core potential is used.\nThis returns 0 if a LJ shifting term is not used" ); } @@ -390,6 +416,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "temperature" , temperature_function_value + , bp::release_gil_policy() , "Return the temperature at which the free energies are calculated" ); } @@ -401,6 +428,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "Return the typename of the class" ); } @@ -412,6 +440,7 @@ void register_FreeEnergyMonitor_class(){ FreeEnergyMonitor_exposer.def( "usesSoftCore" , usesSoftCore_function_value + , bp::release_gil_policy() , "Return whether or not this monitor uses a soft-core potential to\ncalculate the CLJ energy between the molecules in views0() and the\nmolecules in views1()" ); } diff --git a/wrapper/System/GeometryComponent.pypp.cpp b/wrapper/System/GeometryComponent.pypp.cpp index d076d9070..6de8c6acc 100644 --- a/wrapper/System/GeometryComponent.pypp.cpp +++ b/wrapper/System/GeometryComponent.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GeometryComponent_class(){ { //::SireSystem::GeometryComponent @@ -40,7 +42,7 @@ void register_GeometryComponent_class(){ GeometryComponent_exposer.def( "component" , component_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the constrained component" ); } @@ -64,6 +66,7 @@ void register_GeometryComponent_class(){ GeometryComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/IDAndSet_MonitorID_.pypp.cpp b/wrapper/System/IDAndSet_MonitorID_.pypp.cpp index 7d6713940..e4e565f8a 100644 --- a/wrapper/System/IDAndSet_MonitorID_.pypp.cpp +++ b/wrapper/System/IDAndSet_MonitorID_.pypp.cpp @@ -27,6 +27,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet @@ -60,6 +62,7 @@ void register_IDAndSet_MonitorID__class(){ IDAndSet_MonitorID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +75,7 @@ void register_IDAndSet_MonitorID__class(){ IDAndSet_MonitorID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +89,7 @@ void register_IDAndSet_MonitorID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +136,7 @@ void register_IDAndSet_MonitorID__class(){ IDAndSet_MonitorID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +149,7 @@ void register_IDAndSet_MonitorID__class(){ IDAndSet_MonitorID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_IDAndSet_MonitorID__class(){ IDAndSet_MonitorID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/IDAndSet_SysID_.pypp.cpp b/wrapper/System/IDAndSet_SysID_.pypp.cpp index 66c4b02d3..230469b23 100644 --- a/wrapper/System/IDAndSet_SysID_.pypp.cpp +++ b/wrapper/System/IDAndSet_SysID_.pypp.cpp @@ -25,6 +25,8 @@ SireID::IDAndSet __copy__(const SireID::IDAndSet @@ -58,6 +60,7 @@ void register_IDAndSet_SysID__class(){ IDAndSet_SysID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +73,7 @@ void register_IDAndSet_SysID__class(){ IDAndSet_SysID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +87,7 @@ void register_IDAndSet_SysID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_IDAndSet_SysID__class(){ IDAndSet_SysID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_IDAndSet_SysID__class(){ IDAndSet_SysID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_IDAndSet_SysID__class(){ IDAndSet_SysID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/IDAssigner.pypp.cpp b/wrapper/System/IDAssigner.pypp.cpp index 04ff24e9e..e5b2a9661 100644 --- a/wrapper/System/IDAssigner.pypp.cpp +++ b/wrapper/System/IDAssigner.pypp.cpp @@ -56,6 +56,8 @@ SireSystem::IDAssigner __copy__(const SireSystem::IDAssigner &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IDAssigner_class(){ { //::SireSystem::IDAssigner @@ -75,6 +77,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "identifiedMolecules" , identifiedMolecules_function_value + , bp::release_gil_policy() , "Returns the list of identified molecules from the system,\nwhich are returned in the same order as the list of identity points\n" ); } @@ -86,7 +89,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group operated on by this constraint" ); } @@ -98,6 +101,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of identity points (and thus the number of\nidentified molecules)" ); } @@ -124,6 +128,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "points" , points_function_value + , bp::release_gil_policy() , "Return the points used to identify the molecules" ); } @@ -147,7 +152,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the space used to calculate distances between the molecules\nand the identity points" ); } @@ -159,6 +164,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this assigner" ); } @@ -170,6 +176,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -182,6 +189,7 @@ void register_IDAssigner_class(){ "update" , update_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Update the assigner with the passed system." ); } @@ -193,6 +201,7 @@ void register_IDAssigner_class(){ IDAssigner_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/IDOrSet_MonitorID_.pypp.cpp b/wrapper/System/IDOrSet_MonitorID_.pypp.cpp index a086f82e1..99260a71a 100644 --- a/wrapper/System/IDOrSet_MonitorID_.pypp.cpp +++ b/wrapper/System/IDOrSet_MonitorID_.pypp.cpp @@ -27,6 +27,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet @@ -60,6 +62,7 @@ void register_IDOrSet_MonitorID__class(){ IDOrSet_MonitorID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +75,7 @@ void register_IDOrSet_MonitorID__class(){ IDOrSet_MonitorID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +89,7 @@ void register_IDOrSet_MonitorID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -131,6 +136,7 @@ void register_IDOrSet_MonitorID__class(){ IDOrSet_MonitorID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -143,6 +149,7 @@ void register_IDOrSet_MonitorID__class(){ IDOrSet_MonitorID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -155,6 +162,7 @@ void register_IDOrSet_MonitorID__class(){ IDOrSet_MonitorID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/IDOrSet_SysID_.pypp.cpp b/wrapper/System/IDOrSet_SysID_.pypp.cpp index c20b1ed8c..25e04965c 100644 --- a/wrapper/System/IDOrSet_SysID_.pypp.cpp +++ b/wrapper/System/IDOrSet_SysID_.pypp.cpp @@ -25,6 +25,8 @@ SireID::IDOrSet __copy__(const SireID::IDOrSet @@ -58,6 +60,7 @@ void register_IDOrSet_SysID__class(){ IDOrSet_SysID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +73,7 @@ void register_IDOrSet_SysID__class(){ IDOrSet_SysID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -83,6 +87,7 @@ void register_IDOrSet_SysID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -129,6 +134,7 @@ void register_IDOrSet_SysID__class(){ IDOrSet_SysID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -141,6 +147,7 @@ void register_IDOrSet_SysID__class(){ IDOrSet_SysID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -153,6 +160,7 @@ void register_IDOrSet_SysID__class(){ IDOrSet_SysID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/IdentityConstraint.pypp.cpp b/wrapper/System/IdentityConstraint.pypp.cpp index edd4d657c..b91ae620d 100644 --- a/wrapper/System/IdentityConstraint.pypp.cpp +++ b/wrapper/System/IdentityConstraint.pypp.cpp @@ -58,6 +58,8 @@ SireSystem::IdentityConstraint __copy__(const SireSystem::IdentityConstraint &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_IdentityConstraint_class(){ { //::SireSystem::IdentityConstraint @@ -113,7 +115,7 @@ void register_IdentityConstraint_class(){ IdentityConstraint_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group acted on by this constraint" ); } @@ -140,6 +142,7 @@ void register_IdentityConstraint_class(){ IdentityConstraint_exposer.def( "points" , points_function_value + , bp::release_gil_policy() , "Return the points used to identify the molecules" ); } @@ -163,6 +166,7 @@ void register_IdentityConstraint_class(){ IdentityConstraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this constraint" ); } @@ -174,6 +178,7 @@ void register_IdentityConstraint_class(){ IdentityConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -185,6 +190,7 @@ void register_IdentityConstraint_class(){ IdentityConstraint_exposer.def( "useFewPointsAlgorithm" , useFewPointsAlgorithm_function_value + , bp::release_gil_policy() , "Function used for debugging that switches this object over\nto using the few points algorithm to apply the constraint" ); } @@ -196,6 +202,7 @@ void register_IdentityConstraint_class(){ IdentityConstraint_exposer.def( "useManyPointsAlgorithm" , useManyPointsAlgorithm_function_value + , bp::release_gil_policy() , "Function used for debugging that switches this object over\nto using the many points algorithm to apply the constraint" ); } @@ -207,6 +214,7 @@ void register_IdentityConstraint_class(){ IdentityConstraint_exposer.def( "useSinglePointAlgorithm" , useSinglePointAlgorithm_function_value + , bp::release_gil_policy() , "Function used for debugging that switches this object over\nto using the single point algorithm to apply the constraint\nThrow: SireError::invalid_state\n" ); } diff --git a/wrapper/System/MoleculeConstraint.pypp.cpp b/wrapper/System/MoleculeConstraint.pypp.cpp index 5e510326a..8e6d97f2e 100644 --- a/wrapper/System/MoleculeConstraint.pypp.cpp +++ b/wrapper/System/MoleculeConstraint.pypp.cpp @@ -29,6 +29,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MoleculeConstraint_class(){ { //::SireSystem::MoleculeConstraint @@ -43,6 +45,7 @@ void register_MoleculeConstraint_class(){ MoleculeConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/MonitorComponent.pypp.cpp b/wrapper/System/MonitorComponent.pypp.cpp index c84aa78d6..79e17670a 100644 --- a/wrapper/System/MonitorComponent.pypp.cpp +++ b/wrapper/System/MonitorComponent.pypp.cpp @@ -24,6 +24,8 @@ SireSystem::MonitorComponent __copy__(const SireSystem::MonitorComponent &other) #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MonitorComponent_class(){ { //::SireSystem::MonitorComponent @@ -41,7 +43,7 @@ void register_MonitorComponent_class(){ MonitorComponent_exposer.def( "accumulator" , accumulator_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the accumulator that is being used to accumulate the\nvalues of the component being monitored" ); } @@ -53,6 +55,7 @@ void register_MonitorComponent_class(){ MonitorComponent_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear the statistics in this monitor" ); } @@ -64,7 +67,7 @@ void register_MonitorComponent_class(){ MonitorComponent_exposer.def( "component" , component_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the component being monitored" ); } @@ -77,6 +80,7 @@ void register_MonitorComponent_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Call this function to add the statistics of the monitored\ncomponent from the passed system to the accumulator" ); } @@ -103,6 +107,7 @@ void register_MonitorComponent_class(){ MonitorComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/MonitorComponents.pypp.cpp b/wrapper/System/MonitorComponents.pypp.cpp index a6014cb37..974b2ca7c 100644 --- a/wrapper/System/MonitorComponents.pypp.cpp +++ b/wrapper/System/MonitorComponents.pypp.cpp @@ -30,6 +30,8 @@ SireSystem::MonitorComponents __copy__(const SireSystem::MonitorComponents &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MonitorComponents_class(){ { //::SireSystem::MonitorComponents @@ -50,7 +52,7 @@ void register_MonitorComponents_class(){ "accumulator" , accumulator_function_value , ( bp::arg("component") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the accumulator for the component component\nThrow: SireCAS::missing_symbol\n" ); } @@ -62,7 +64,7 @@ void register_MonitorComponents_class(){ MonitorComponents_exposer.def( "accumulatorTemplate" , accumulatorTemplate_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the accumulator that is the template used for new accumulators\nthat are created when a new component is monitored" ); } @@ -74,6 +76,7 @@ void register_MonitorComponents_class(){ MonitorComponents_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Completely clear the statistics" ); } @@ -86,6 +89,7 @@ void register_MonitorComponents_class(){ "excludeComponent" , excludeComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Make sure that the components in components are not monitored" ); } @@ -98,6 +102,7 @@ void register_MonitorComponents_class(){ "excludeComponent" , excludeComponent_function_value , ( bp::arg("components") ) + , bp::release_gil_policy() , "Make sure that the components in components are not monitored" ); } @@ -134,6 +139,7 @@ void register_MonitorComponents_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Monitor the system system - this will only accumulate symbols\nthat represent existing components - this does nothing for components\nthat dont exist in the system" ); } @@ -145,6 +151,7 @@ void register_MonitorComponents_class(){ MonitorComponents_exposer.def( "monitoredComponents" , monitoredComponents_function_value + , bp::release_gil_policy() , "Return the set of symbols that have been monitored so far\n(so have valid accumulators)" ); } @@ -171,6 +178,7 @@ void register_MonitorComponents_class(){ MonitorComponents_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/MonitorID.pypp.cpp b/wrapper/System/MonitorID.pypp.cpp index 10bf11db7..820ed6d3f 100644 --- a/wrapper/System/MonitorID.pypp.cpp +++ b/wrapper/System/MonitorID.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MonitorID_class(){ { //::SireSystem::MonitorID @@ -42,6 +44,7 @@ void register_MonitorID_class(){ "map" , map_function_value , ( bp::arg("monitors") ) + , bp::release_gil_policy() , "" ); } @@ -93,6 +96,7 @@ void register_MonitorID_class(){ MonitorID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/MonitorIdx.pypp.cpp b/wrapper/System/MonitorIdx.pypp.cpp index 46f96738d..8ad367ffd 100644 --- a/wrapper/System/MonitorIdx.pypp.cpp +++ b/wrapper/System/MonitorIdx.pypp.cpp @@ -21,6 +21,8 @@ SireSystem::MonitorIdx __copy__(const SireSystem::MonitorIdx &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MonitorIdx_class(){ { //::SireSystem::MonitorIdx @@ -37,6 +39,7 @@ void register_MonitorIdx_class(){ MonitorIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_MonitorIdx_class(){ MonitorIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +64,7 @@ void register_MonitorIdx_class(){ "map" , map_function_value , ( bp::arg("monitors") ) + , bp::release_gil_policy() , "" ); } @@ -71,6 +76,7 @@ void register_MonitorIdx_class(){ MonitorIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -95,6 +101,7 @@ void register_MonitorIdx_class(){ MonitorIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -106,6 +113,7 @@ void register_MonitorIdx_class(){ MonitorIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -117,6 +125,7 @@ void register_MonitorIdx_class(){ MonitorIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/MonitorMonitor.pypp.cpp b/wrapper/System/MonitorMonitor.pypp.cpp index beb846220..25a72ddc5 100644 --- a/wrapper/System/MonitorMonitor.pypp.cpp +++ b/wrapper/System/MonitorMonitor.pypp.cpp @@ -26,6 +26,8 @@ SireSystem::MonitorMonitor __copy__(const SireSystem::MonitorMonitor &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_MonitorMonitor_class(){ @@ -45,7 +47,7 @@ void register_MonitorMonitor_class(){ "at" , at_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith state monitored\nThrow: SireError::invalid_index\n" ); } @@ -57,6 +59,7 @@ void register_MonitorMonitor_class(){ MonitorMonitor_exposer.def( "clearOriginal" , clearOriginal_function_value + , bp::release_gil_policy() , "Return whether or not this MonitorMonitor will clear the\noriginal monitor whenever it takes a copy" ); } @@ -68,6 +71,7 @@ void register_MonitorMonitor_class(){ MonitorMonitor_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Completely clear statistics" ); } @@ -79,6 +83,7 @@ void register_MonitorMonitor_class(){ MonitorMonitor_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of states monitored so far" ); } @@ -91,6 +96,7 @@ void register_MonitorMonitor_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Monitor the passed system" ); } @@ -102,6 +108,7 @@ void register_MonitorMonitor_class(){ MonitorMonitor_exposer.def( "nStates" , nStates_function_value + , bp::release_gil_policy() , "Return the number of states monitored so far" ); } @@ -129,7 +136,7 @@ void register_MonitorMonitor_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -141,6 +148,7 @@ void register_MonitorMonitor_class(){ MonitorMonitor_exposer.def( "removeOriginal" , removeOriginal_function_value + , bp::release_gil_policy() , "Return whether or not this MonitorMonitor will remove\nthe original monitor from the system whenever it\ntakes a copy" ); } @@ -153,6 +161,7 @@ void register_MonitorMonitor_class(){ "setClearOriginal" , setClearOriginal_function_value , ( bp::arg("clear") ) + , bp::release_gil_policy() , "Set whether or not to clear the statistics of the original\nmonitor when this monitor takes the copy" ); } @@ -165,6 +174,7 @@ void register_MonitorMonitor_class(){ "setRemoveOriginal" , setRemoveOriginal_function_value , ( bp::arg("remove") ) + , bp::release_gil_policy() , "Set whether or not to remove the original monitor when\nthis monitor takes a copy (effectively thus moving\nthe monitor from the system to this MonitorMonitor)" ); } @@ -176,6 +186,7 @@ void register_MonitorMonitor_class(){ MonitorMonitor_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of states monitored so far" ); } @@ -199,6 +210,7 @@ void register_MonitorMonitor_class(){ MonitorMonitor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/MonitorName.pypp.cpp b/wrapper/System/MonitorName.pypp.cpp index 8c63fd46b..d64e4f513 100644 --- a/wrapper/System/MonitorName.pypp.cpp +++ b/wrapper/System/MonitorName.pypp.cpp @@ -21,6 +21,8 @@ SireSystem::MonitorName __copy__(const SireSystem::MonitorName &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MonitorName_class(){ { //::SireSystem::MonitorName @@ -37,6 +39,7 @@ void register_MonitorName_class(){ MonitorName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -48,6 +51,7 @@ void register_MonitorName_class(){ MonitorName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -60,6 +64,7 @@ void register_MonitorName_class(){ "map" , map_function_value , ( bp::arg("monitors") ) + , bp::release_gil_policy() , "" ); } @@ -87,6 +92,7 @@ void register_MonitorName_class(){ MonitorName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -98,6 +104,7 @@ void register_MonitorName_class(){ MonitorName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -109,6 +116,7 @@ void register_MonitorName_class(){ MonitorName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/MonitorProperty.pypp.cpp b/wrapper/System/MonitorProperty.pypp.cpp index f64554a1c..fe116be68 100644 --- a/wrapper/System/MonitorProperty.pypp.cpp +++ b/wrapper/System/MonitorProperty.pypp.cpp @@ -36,6 +36,8 @@ SireSystem::MonitorProperty __copy__(const SireSystem::MonitorProperty &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_MonitorProperty_class(){ { //::SireSystem::MonitorProperty @@ -56,6 +58,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all statistics" ); } @@ -67,7 +70,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "ffID" , ffID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the forcefield(s) that are being monitored" ); } @@ -79,7 +82,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "mgID" , mgID_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ID of the molecule group(s) whose molecules\nare being monitored" ); } @@ -92,6 +95,7 @@ void register_MonitorProperty_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Monitor the system" ); } @@ -103,6 +107,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "monitoredMolecules" , monitoredMolecules_function_value + , bp::release_gil_policy() , "Return the numbers of molecules whose properties have been monitored" ); } @@ -114,6 +119,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "monitoringForceFieldProperty" , monitoringForceFieldProperty_function_value + , bp::release_gil_policy() , "Return whether or not this is monitoring a forcefield property" ); } @@ -125,6 +131,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "monitoringMoleculeProperty" , monitoringMoleculeProperty_function_value + , bp::release_gil_policy() , "Return whether or not this is monitoring a molecule property\nof molecules in molecule groups" ); } @@ -136,6 +143,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "monitoringSystemProperty" , monitoringSystemProperty_function_value + , bp::release_gil_policy() , "Return whether or not this is monitoring a system property" ); } @@ -162,6 +170,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the values of the monitored system or forcefield properties" ); } @@ -174,6 +183,7 @@ void register_MonitorProperty_class(){ "properties" , properties_function_value , ( bp::arg("molnum") ) + , bp::release_gil_policy() , "Return the values of the monitored molecule properties for molecule molnum.\nThrow: SireMol::missing_molecule\n" ); } @@ -197,6 +207,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -208,6 +219,7 @@ void register_MonitorProperty_class(){ MonitorProperty_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -220,6 +232,7 @@ void register_MonitorProperty_class(){ "writeToDisk" , writeToDisk_function_value , ( bp::arg("filename") ) + , bp::release_gil_policy() , "Write all of the properties to disk in text format to the\nfile filename. The aim of this function is to provide something\nquick and dirty to follow the properties. To properly save the properties\nyou should use the streaming functions" ); } diff --git a/wrapper/System/NullConstraint.pypp.cpp b/wrapper/System/NullConstraint.pypp.cpp index 388e95d68..efee11813 100644 --- a/wrapper/System/NullConstraint.pypp.cpp +++ b/wrapper/System/NullConstraint.pypp.cpp @@ -39,6 +39,8 @@ SireSystem::NullConstraint __copy__(const SireSystem::NullConstraint &other){ re #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullConstraint_class(){ { //::SireSystem::NullConstraint @@ -69,6 +71,7 @@ void register_NullConstraint_class(){ NullConstraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation" ); } @@ -80,6 +83,7 @@ void register_NullConstraint_class(){ NullConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/NullMonitor.pypp.cpp b/wrapper/System/NullMonitor.pypp.cpp index 5b8d1fd88..fb5ccb9d1 100644 --- a/wrapper/System/NullMonitor.pypp.cpp +++ b/wrapper/System/NullMonitor.pypp.cpp @@ -25,6 +25,8 @@ SireSystem::NullMonitor __copy__(const SireSystem::NullMonitor &other){ return S #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullMonitor_class(){ { //::SireSystem::NullMonitor @@ -40,6 +42,7 @@ void register_NullMonitor_class(){ NullMonitor_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "There are no statistics to clear" ); } @@ -52,6 +55,7 @@ void register_NullMonitor_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "A null monitor doesnt monitor anything" ); } @@ -78,6 +82,7 @@ void register_NullMonitor_class(){ NullMonitor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/PerturbationConstraint.pypp.cpp b/wrapper/System/PerturbationConstraint.pypp.cpp index 34347d76a..80182f8a7 100644 --- a/wrapper/System/PerturbationConstraint.pypp.cpp +++ b/wrapper/System/PerturbationConstraint.pypp.cpp @@ -40,6 +40,8 @@ SireSystem::PerturbationConstraint __copy__(const SireSystem::PerturbationConstr #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PerturbationConstraint_class(){ { //::SireSystem::PerturbationConstraint @@ -56,7 +58,7 @@ void register_PerturbationConstraint_class(){ PerturbationConstraint_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group that is acted on by this constraint" ); } @@ -83,6 +85,7 @@ void register_PerturbationConstraint_class(){ PerturbationConstraint_exposer.def( "perturbationProperty" , perturbationProperty_function_value + , bp::release_gil_policy() , "Return the property used to find the perturbations to apply\nto the molecules in this constraint" ); } @@ -94,6 +97,7 @@ void register_PerturbationConstraint_class(){ PerturbationConstraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this constraint" ); } @@ -105,6 +109,7 @@ void register_PerturbationConstraint_class(){ PerturbationConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/PolariseCharges.pypp.cpp b/wrapper/System/PolariseCharges.pypp.cpp index 0f5a1173d..b4a6e19f8 100644 --- a/wrapper/System/PolariseCharges.pypp.cpp +++ b/wrapper/System/PolariseCharges.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -66,6 +68,8 @@ SireSystem::PolariseCharges __copy__(const SireSystem::PolariseCharges &other){ #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PolariseCharges_class(){ { //::SireSystem::PolariseCharges @@ -85,6 +89,7 @@ void register_PolariseCharges_class(){ PolariseCharges_exposer.def( "convergenceLimit" , convergenceLimit_function_value + , bp::release_gil_policy() , "Return the convergence limit of the calculation" ); } @@ -96,7 +101,7 @@ void register_PolariseCharges_class(){ PolariseCharges_exposer.def( "fieldComponent" , fieldComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the component of the forcefield that is used to\ncalculate the electrostatic field on the atoms to be\npolarised" ); } @@ -135,6 +140,7 @@ void register_PolariseCharges_class(){ PolariseCharges_exposer.def( "selfEnergyFF" , selfEnergyFF_function_value + , bp::release_gil_policy() , "Return the forcefield that is used to calculate the self-energy of\npolarising the charges. This must be added to any system to which\nthis constraint is applied, as maintaining the constraint\n(by polarising the charges) costs energy, which must be part\nof the system Hamiltonian" ); } @@ -147,6 +153,7 @@ void register_PolariseCharges_class(){ "setConvergenceLimit" , setConvergenceLimit_function_value , ( bp::arg("limit") ) + , bp::release_gil_policy() , "Set the convergence limit of the calculation" ); } @@ -158,6 +165,7 @@ void register_PolariseCharges_class(){ PolariseCharges_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this constraint" ); } @@ -169,6 +177,7 @@ void register_PolariseCharges_class(){ PolariseCharges_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/PolariseChargesFF.pypp.cpp b/wrapper/System/PolariseChargesFF.pypp.cpp index 6b08e7e38..4f6b5edbb 100644 --- a/wrapper/System/PolariseChargesFF.pypp.cpp +++ b/wrapper/System/PolariseChargesFF.pypp.cpp @@ -36,6 +36,8 @@ namespace bp = boost::python; #include "SireMol/connectivity.h" +#include "SireMol/core.h" + #include "SireMol/mgname.h" #include "SireMol/molecule.h" @@ -66,6 +68,8 @@ SireSystem::PolariseChargesFF __copy__(const SireSystem::PolariseChargesFF &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_PolariseChargesFF_class(){ @@ -85,7 +89,7 @@ void register_PolariseChargesFF_class(){ PolariseChargesFF_exposer.def( "components" , components_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the components of this forcefield" ); } @@ -98,6 +102,7 @@ void register_PolariseChargesFF_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "This forcefield doesnt contain any properties" ); } @@ -109,6 +114,7 @@ void register_PolariseChargesFF_class(){ PolariseChargesFF_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell the forcefield that the energy must now be recalculated\nfrom scratch" ); } @@ -148,7 +154,7 @@ void register_PolariseChargesFF_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "This forcefield doesnt contain any properties\nThrow: SireBase::missing_property\n" ); } @@ -161,6 +167,7 @@ void register_PolariseChargesFF_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("property") ) + , bp::release_gil_policy() , "You cannot set any properties of this forcefield\nThrow: SireError::incompatible_error\n" ); } @@ -172,6 +179,7 @@ void register_PolariseChargesFF_class(){ PolariseChargesFF_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/PropertyConstraint.pypp.cpp b/wrapper/System/PropertyConstraint.pypp.cpp index f9354be17..3a5821edb 100644 --- a/wrapper/System/PropertyConstraint.pypp.cpp +++ b/wrapper/System/PropertyConstraint.pypp.cpp @@ -39,6 +39,8 @@ SireSystem::PropertyConstraint __copy__(const SireSystem::PropertyConstraint &ot #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PropertyConstraint_class(){ { //::SireSystem::PropertyConstraint @@ -71,6 +73,7 @@ void register_PropertyConstraint_class(){ PropertyConstraint_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the constraint" ); } @@ -82,6 +85,7 @@ void register_PropertyConstraint_class(){ PropertyConstraint_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/SireSystem_properties.cpp b/wrapper/System/SireSystem_properties.cpp index 20f94c5a2..ca321a57d 100644 --- a/wrapper/System/SireSystem_properties.cpp +++ b/wrapper/System/SireSystem_properties.cpp @@ -4,12 +4,6 @@ #include "Base/convertproperty.hpp" #include "SireSystem_properties.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "system.h" -#include "systemmonitor.h" -#include -#include "systemmonitor.h" #include "SireBase/numberproperty.h" #include "SireBase/propertylist.h" #include "SireError/errors.h" @@ -23,8 +17,14 @@ #include "system.h" #include #include "constraint.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "system.h" +#include "systemmonitor.h" +#include +#include "systemmonitor.h" void register_SireSystem_properties() { - register_property_container< SireSystem::SysMonPtr, SireSystem::SystemMonitor >(); register_property_container< SireSystem::ConstraintPtr, SireSystem::Constraint >(); + register_property_container< SireSystem::SysMonPtr, SireSystem::SystemMonitor >(); } diff --git a/wrapper/System/SireSystem_registrars.cpp b/wrapper/System/SireSystem_registrars.cpp index 445405a20..9c5cd05a5 100644 --- a/wrapper/System/SireSystem_registrars.cpp +++ b/wrapper/System/SireSystem_registrars.cpp @@ -5,81 +5,81 @@ #include "Helpers/version_error_impl.h" -#include "sysidx.h" -#include "monitorcomponent.h" -#include "monitorname.h" -#include "identityconstraint.h" #include "anglecomponent.h" -#include "idassigner.h" -#include "freeenergymonitor.h" -#include "energymonitor.h" #include "checkpoint.h" -#include "monitorproperty.h" -#include "perturbationconstraint.h" +#include "closemols.h" +#include "constraint.h" +#include "constraints.h" +#include "dihedralcomponent.h" +#include "distancecomponent.h" +#include "energymonitor.h" +#include "freeenergymonitor.h" +#include "idassigner.h" +#include "identityconstraint.h" +#include "monitorcomponent.h" #include "monitorcomponents.h" #include "monitoridentifier.h" +#include "monitoridx.h" +#include "monitormonitor.h" +#include "monitorname.h" +#include "monitorproperty.h" +#include "perturbationconstraint.h" #include "polarisecharges.h" -#include "closemols.h" #include "spacewrapper.h" -#include "monitormonitor.h" -#include "sysname.h" -#include "distancecomponent.h" #include "sysidentifier.h" -#include "constraints.h" -#include "systemmonitor.h" -#include "dihedralcomponent.h" -#include "volmapmonitor.h" +#include "sysidx.h" +#include "sysname.h" #include "system.h" -#include "monitoridx.h" +#include "systemmonitor.h" #include "systemmonitors.h" -#include "constraint.h" +#include "volmapmonitor.h" #include "Helpers/objectregistry.hpp" void register_SireSystem_objects() { - ObjectRegistry::registerConverterFor< SireSystem::SysIdx >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorName >(); - ObjectRegistry::registerConverterFor< SireSystem::IdentityConstraint >(); ObjectRegistry::registerConverterFor< SireSystem::AngleComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::IDAssigner >(); + ObjectRegistry::registerConverterFor< SireSystem::CheckPoint >(); + ObjectRegistry::registerConverterFor< SireSystem::CloseMols >(); + ObjectRegistry::registerConverterFor< SireSystem::NullConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::PropertyConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::ComponentConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::WindowedComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::Constraints >(); + ObjectRegistry::registerConverterFor< SireSystem::DihedralComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::DistanceComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::DoubleDistanceComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::TripleDistanceComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::EnergyMonitor >(); ObjectRegistry::registerConverterFor< SireSystem::FreeEnergyMonitor >(); ObjectRegistry::registerConverterFor< SireSystem::AssignerGroup >(); - ObjectRegistry::registerConverterFor< SireSystem::EnergyMonitor >(); - ObjectRegistry::registerConverterFor< SireSystem::CheckPoint >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorProperty >(); - ObjectRegistry::registerConverterFor< SireSystem::PerturbationConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::IDAssigner >(); + ObjectRegistry::registerConverterFor< SireSystem::IdentityConstraint >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorComponent >(); ObjectRegistry::registerConverterFor< SireSystem::MonitorComponents >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); ObjectRegistry::registerConverterFor< SireSystem::MonitorIdentifier >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorIdx >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorName >(); + ObjectRegistry::registerConverterFor< SireSystem::MonitorProperty >(); + ObjectRegistry::registerConverterFor< SireSystem::PerturbationConstraint >(); ObjectRegistry::registerConverterFor< SireSystem::PolariseCharges >(); ObjectRegistry::registerConverterFor< SireSystem::PolariseChargesFF >(); - ObjectRegistry::registerConverterFor< SireSystem::CloseMols >(); ObjectRegistry::registerConverterFor< SireSystem::SpaceWrapper >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorMonitor >(); - ObjectRegistry::registerConverterFor< SireSystem::SysName >(); - ObjectRegistry::registerConverterFor< SireSystem::DistanceComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::DoubleDistanceComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::TripleDistanceComponent >(); ObjectRegistry::registerConverterFor< SireID::Specify >(); ObjectRegistry::registerConverterFor< SireID::IDAndSet >(); ObjectRegistry::registerConverterFor< SireID::IDOrSet >(); ObjectRegistry::registerConverterFor< SireSystem::SysIdentifier >(); - ObjectRegistry::registerConverterFor< SireSystem::Constraints >(); - ObjectRegistry::registerConverterFor< SireSystem::NullMonitor >(); - ObjectRegistry::registerConverterFor< SireSystem::DihedralComponent >(); - ObjectRegistry::registerConverterFor< SireSystem::VolMapMonitor >(); + ObjectRegistry::registerConverterFor< SireSystem::SysIdx >(); + ObjectRegistry::registerConverterFor< SireSystem::SysName >(); ObjectRegistry::registerConverterFor< SireSystem::System >(); - ObjectRegistry::registerConverterFor< SireSystem::MonitorIdx >(); + ObjectRegistry::registerConverterFor< SireSystem::NullMonitor >(); ObjectRegistry::registerConverterFor< SireSystem::SystemMonitors >(); - ObjectRegistry::registerConverterFor< SireSystem::NullConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::PropertyConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::ComponentConstraint >(); - ObjectRegistry::registerConverterFor< SireSystem::WindowedComponent >(); + ObjectRegistry::registerConverterFor< SireSystem::VolMapMonitor >(); } diff --git a/wrapper/System/SpaceWrapper.pypp.cpp b/wrapper/System/SpaceWrapper.pypp.cpp index deac14c4b..c3419b65c 100644 --- a/wrapper/System/SpaceWrapper.pypp.cpp +++ b/wrapper/System/SpaceWrapper.pypp.cpp @@ -34,6 +34,8 @@ SireSystem::SpaceWrapper __copy__(const SireSystem::SpaceWrapper &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SpaceWrapper_class(){ { //::SireSystem::SpaceWrapper @@ -50,7 +52,7 @@ void register_SpaceWrapper_class(){ SpaceWrapper_exposer.def( "moleculeGroup" , moleculeGroup_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group containing the molecules being wrapped" ); } @@ -77,7 +79,7 @@ void register_SpaceWrapper_class(){ SpaceWrapper_exposer.def( "point" , point_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the point that defines the center of the periodic box\n(the molecules will be wrapped so that they are in the same\nbox as this point)" ); } @@ -101,6 +103,7 @@ void register_SpaceWrapper_class(){ SpaceWrapper_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/Specify_MonitorID_.pypp.cpp b/wrapper/System/Specify_MonitorID_.pypp.cpp index b370d0fe8..8a6242aac 100644 --- a/wrapper/System/Specify_MonitorID_.pypp.cpp +++ b/wrapper/System/Specify_MonitorID_.pypp.cpp @@ -27,6 +27,8 @@ SireID::Specify __copy__(const SireID::Specify @@ -47,6 +49,7 @@ void register_Specify_MonitorID__class(){ Specify_MonitorID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -59,6 +62,7 @@ void register_Specify_MonitorID__class(){ Specify_MonitorID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -72,6 +76,7 @@ void register_Specify_MonitorID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -180,6 +185,7 @@ void register_Specify_MonitorID__class(){ Specify_MonitorID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -192,6 +198,7 @@ void register_Specify_MonitorID__class(){ Specify_MonitorID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -204,6 +211,7 @@ void register_Specify_MonitorID__class(){ Specify_MonitorID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/Specify_SysID_.pypp.cpp b/wrapper/System/Specify_SysID_.pypp.cpp index f3664ad8e..70d808021 100644 --- a/wrapper/System/Specify_SysID_.pypp.cpp +++ b/wrapper/System/Specify_SysID_.pypp.cpp @@ -25,6 +25,8 @@ SireID::Specify __copy__(const SireID::Specify @@ -45,6 +47,7 @@ void register_Specify_SysID__class(){ Specify_SysID__exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -57,6 +60,7 @@ void register_Specify_SysID__class(){ Specify_SysID__exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -70,6 +74,7 @@ void register_Specify_SysID__class(){ "map" , map_function_value , ( bp::arg("obj") ) + , bp::release_gil_policy() , "" ); } @@ -178,6 +183,7 @@ void register_Specify_SysID__class(){ Specify_SysID__exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -190,6 +196,7 @@ void register_Specify_SysID__class(){ Specify_SysID__exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -202,6 +209,7 @@ void register_Specify_SysID__class(){ Specify_SysID__exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/SysID.pypp.cpp b/wrapper/System/SysID.pypp.cpp index 7e2052595..69c476923 100644 --- a/wrapper/System/SysID.pypp.cpp +++ b/wrapper/System/SysID.pypp.cpp @@ -21,6 +21,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SysID_class(){ { //::SireSystem::SysID @@ -36,6 +38,7 @@ void register_SysID_class(){ "map" , map_function_value , ( bp::arg("systems") ) + , bp::release_gil_policy() , "" ); } @@ -87,6 +90,7 @@ void register_SysID_class(){ SysID_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/SysIdx.pypp.cpp b/wrapper/System/SysIdx.pypp.cpp index d6651f2ef..c79fc5cf3 100644 --- a/wrapper/System/SysIdx.pypp.cpp +++ b/wrapper/System/SysIdx.pypp.cpp @@ -17,6 +17,8 @@ SireSystem::SysIdx __copy__(const SireSystem::SysIdx &other){ return SireSystem: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SysIdx_class(){ { //::SireSystem::SysIdx @@ -33,6 +35,7 @@ void register_SysIdx_class(){ SysIdx_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -44,6 +47,7 @@ void register_SysIdx_class(){ SysIdx_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -56,6 +60,7 @@ void register_SysIdx_class(){ "map" , map_function_value , ( bp::arg("systems") ) + , bp::release_gil_policy() , "" ); } @@ -67,6 +72,7 @@ void register_SysIdx_class(){ SysIdx_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -91,6 +97,7 @@ void register_SysIdx_class(){ SysIdx_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -102,6 +109,7 @@ void register_SysIdx_class(){ SysIdx_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -113,6 +121,7 @@ void register_SysIdx_class(){ SysIdx_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/SysName.pypp.cpp b/wrapper/System/SysName.pypp.cpp index d750b700b..c524e1b40 100644 --- a/wrapper/System/SysName.pypp.cpp +++ b/wrapper/System/SysName.pypp.cpp @@ -17,6 +17,8 @@ SireSystem::SysName __copy__(const SireSystem::SysName &other){ return SireSyste #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SysName_class(){ { //::SireSystem::SysName @@ -33,6 +35,7 @@ void register_SysName_class(){ SysName_exposer.def( "hash" , hash_function_value + , bp::release_gil_policy() , "" ); } @@ -44,6 +47,7 @@ void register_SysName_class(){ SysName_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -56,6 +60,7 @@ void register_SysName_class(){ "map" , map_function_value , ( bp::arg("systems") ) + , bp::release_gil_policy() , "" ); } @@ -83,6 +88,7 @@ void register_SysName_class(){ SysName_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -94,6 +100,7 @@ void register_SysName_class(){ SysName_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -105,6 +112,7 @@ void register_SysName_class(){ SysName_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/System.pypp.cpp b/wrapper/System/System.pypp.cpp index 23389effc..229689c84 100644 --- a/wrapper/System/System.pypp.cpp +++ b/wrapper/System/System.pypp.cpp @@ -64,12 +64,16 @@ namespace bp = boost::python; #include "system.h" +#include "SireBase/slice.h" + SireSystem::System __copy__(const SireSystem::System &other){ return SireSystem::System(other); } #include "Qt/qdatastream.hpp" #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_System_class(){ @@ -100,6 +104,7 @@ void register_System_class(){ System_exposer.def( "accept" , accept_function_value + , bp::release_gil_policy() , "Tell all of the forcefields that the last move was accepted. This allows\nany cacheing or use of temporary workspaces to be committed" ); } @@ -124,6 +129,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("monitors") ) + , bp::release_gil_policy() , "Add the monitors in monitors to this system\nThrow: SireSystem::duplicate_monitor\n" ); } @@ -136,6 +142,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("monitors"), bp::arg("frequency") ) + , bp::release_gil_policy() , "Add the monitors in monitors, setting the frequency of the\nnew monitors to frequency\nThrow: SireSystem::duplicate_monitor\n" ); } @@ -148,6 +155,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("forcefield") ) + , bp::release_gil_policy() , "Add the forcefield forcefield to this system. This will raise\nan exception if this forcefield (or one with the same name)\nis already present in this set. Note that if the added\nforcefield will be updated to contain the versions of\nany molecules that are already present in any of the\nother forcefields.\nThrow: SireFF::duplicate_forcefield\nThrow: SireMol::duplicate_group\n" ); } @@ -160,6 +168,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Add the molecule group molgroup to this system. If this is\na molecule group that is part of a forcefield, then the entire\nforcefield will be added to this system. This will raise\nan exception if this molecule group is already present in\nthis system. Note that the added molecule group will be\nupdated to contain the version of the any molecules that\nare already present in this system\nThrow: SireFF::duplicate_forcefield\nThrow: SireMol::duplicate_group\n" ); } @@ -172,6 +181,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("constraint") ) + , bp::release_gil_policy() , "Add the passed constraint to the system" ); } @@ -184,6 +194,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("constraints") ) + , bp::release_gil_policy() , "Add the passed constraint to the system" ); } @@ -196,6 +207,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecule viewed in molview to the molecule groups\nidentified by the ID mgid. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to. The version of the molecule\nalready present in this system is used, if such a molecule exists.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -208,6 +220,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the views of the molecule in molviews to the molecule groups\nidentified by the ID mgid. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to. The version of the molecule\nalready present in this system is used, if such a molecule exists.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -220,6 +233,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecules viewed in molecules to the molecule groups\nidentified by the ID mgid. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to. The version of the molecule\nalready present in this system is used, if such a molecule exists.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -232,6 +246,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the molecules in the molecule group molgroup to the molecule groups\nidentified by the ID mgid. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to. The version of the molecule\nalready present in this system is used, if such a molecule exists.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -244,6 +259,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::add that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -256,6 +272,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::add that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -268,6 +285,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::add that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -280,6 +298,7 @@ void register_System_class(){ "add" , add_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::add that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -292,6 +311,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the view of the molecule in molview to the groups\nidentified by mgid. This only adds the view to a group\nif it doesnt already exist in the group. The version\nof the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -304,6 +324,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the views of the molecule in molviews to the groups\nidentified by mgid. This only adds the view to a group\nif it doesnt already exist in the group. The version\nof the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -316,6 +337,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the views of the molecules in molecules to the groups\nidentified by mgid. This only adds the view to a group\nif it doesnt already exist in the group. The version\nof the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -328,6 +350,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid"), bp::arg("map") ) + , bp::release_gil_policy() , "Add the view of the molecules in the group molgroup to the groups\nidentified by mgid. This only adds the view to a group\nif it doesnt already exist in the group. The version\nof the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -340,6 +363,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::addIfUnique that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -352,6 +376,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::addIfUnique that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -364,6 +389,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::addIfUnique that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -376,6 +402,7 @@ void register_System_class(){ "addIfUnique" , addIfUnique_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Convenient overload of System::addIfUnique that uses the default locations\nto find any necessary properties.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -387,6 +414,7 @@ void register_System_class(){ System_exposer.def( "applyConstraints" , applyConstraints_function_value + , bp::release_gil_policy() , "Apply the system (and molecule) constraints" ); } @@ -399,7 +427,7 @@ void register_System_class(){ "at" , at_function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield with ID ffid in this system\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -412,7 +440,7 @@ void register_System_class(){ "at" , at_function_value , ( bp::arg("monid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); } @@ -425,7 +453,7 @@ void register_System_class(){ "at" , at_function_value , ( bp::arg("mgnum") ) - , bp::return_value_policy() + , bp::return_value_policy() , "overloading MolGroupsBase virtual functions" ); } @@ -437,6 +465,7 @@ void register_System_class(){ System_exposer.def( "builtinProperties" , builtinProperties_function_value + , bp::release_gil_policy() , "Return the values of all built-in properties of this system" ); } @@ -449,7 +478,7 @@ void register_System_class(){ "builtinProperty" , builtinProperty_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the built-in property at name. This will by-pass any\nuser-supplied property with this name, and will raise an\nexception if there is no built-in property with this name\nThrow: SireBase::missing_property\n" ); } @@ -461,6 +490,7 @@ void register_System_class(){ System_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Completely clear all statistics held in the monitors" ); } @@ -473,6 +503,7 @@ void register_System_class(){ "clearStatistics" , clearStatistics_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Clear the statistics of the monitors that match the ID monid.\nThis does nothing if there are no matching monitors" ); } @@ -484,6 +515,7 @@ void register_System_class(){ System_exposer.def( "collectStats" , collectStats_function_value + , bp::release_gil_policy() , "Collect statistics about the current configuration" ); } @@ -496,6 +528,7 @@ void register_System_class(){ "componentExpression" , componentExpression_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the expression that defines the component represented\nby the symbol symbol\nThrow: SireFF::missing_component\n" ); } @@ -508,6 +541,7 @@ void register_System_class(){ "componentExpressions" , componentExpressions_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Return the expressions that define the components whose\nsymbols are in symbols\nThrow: SireFF::missing_component\n" ); } @@ -519,6 +553,7 @@ void register_System_class(){ System_exposer.def( "componentExpressions" , componentExpressions_function_value + , bp::release_gil_policy() , "Return all of the expressions that define all of the components\nof this system" ); } @@ -530,6 +565,7 @@ void register_System_class(){ System_exposer.def( "componentSymbols" , componentSymbols_function_value + , bp::release_gil_policy() , "Return all of the symbols that represent the constant and\nenergy components of this system" ); } @@ -542,6 +578,7 @@ void register_System_class(){ "componentValue" , componentValue_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the value of the energy or constant component\nwith symbol symbol\nThrow: SireFF::missing_component\n" ); } @@ -553,6 +590,7 @@ void register_System_class(){ System_exposer.def( "componentValues" , componentValues_function_value + , bp::release_gil_policy() , "Return the values of all components of this system\n(constant components and energies)" ); } @@ -565,6 +603,7 @@ void register_System_class(){ "componentValues" , componentValues_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Retunr the value of the energy or constant component values\nwhose symbols are in symbols\nThrow: SireFF::missing_component\n" ); } @@ -577,7 +616,7 @@ void register_System_class(){ "compoundProperty" , compoundProperty_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the raw compound property with name name - this returns\nthe property representing the link, or the combined property,\nand raises an exception if a compound property with this name\ndoes not exist\nThrow: SireBase::missing_property\n" ); } @@ -590,6 +629,7 @@ void register_System_class(){ "constant" , constant_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return the constant value for the constant component component\nThrow: SireFF::missing_component\n" ); } @@ -601,6 +641,7 @@ void register_System_class(){ System_exposer.def( "constantComponents" , constantComponents_function_value + , bp::release_gil_policy() , "Return the values of all constant components of this system" ); } @@ -613,6 +654,7 @@ void register_System_class(){ "constantExpression" , constantExpression_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return the expression that defines the constant component with\nsymbol symbol\nThrow: SireFF::missing_component\n" ); } @@ -625,6 +667,7 @@ void register_System_class(){ "constantExpressions" , constantExpressions_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Return the expressions that define the constant components\nwhose symbols are in symbols\nThrow: SireFF::missing_component\n" ); } @@ -636,6 +679,7 @@ void register_System_class(){ System_exposer.def( "constantExpressions" , constantExpressions_function_value + , bp::release_gil_policy() , "Return all of the expressions that define the constant components\nof this system" ); } @@ -647,6 +691,7 @@ void register_System_class(){ System_exposer.def( "constantSymbols" , constantSymbols_function_value + , bp::release_gil_policy() , "Return the symbols that represent constant components of this system" ); } @@ -658,6 +703,7 @@ void register_System_class(){ System_exposer.def( "constants" , constants_function_value + , bp::release_gil_policy() , "Return the values of all constant components in this system" ); } @@ -670,6 +716,7 @@ void register_System_class(){ "constants" , constants_function_value , ( bp::arg("components") ) + , bp::release_gil_policy() , "Return the values of the constant components whose symbols\nare in components\nThrow: SireFF::missing_component\n" ); } @@ -693,6 +740,7 @@ void register_System_class(){ System_exposer.def( "constraintsSatisfied" , constraintsSatisfied_function_value + , bp::release_gil_policy() , "Return whether or not the constraints are satisfied" ); } @@ -705,6 +753,7 @@ void register_System_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields contain a property called name" ); } @@ -717,6 +766,7 @@ void register_System_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("ffid"), bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields identified by the ID ffid\ncontain a property called name" ); } @@ -729,6 +779,7 @@ void register_System_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields contain a property called name" ); } @@ -741,6 +792,7 @@ void register_System_class(){ "containsProperty" , containsProperty_function_value , ( bp::arg("ffid"), bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not any of the forcefields identified by the ID ffid\ncontain a property called name" ); } @@ -752,6 +804,7 @@ void register_System_class(){ System_exposer.def( "energies" , energies_function_value + , bp::release_gil_policy() , "Return the energies of all energy components in this system" ); } @@ -764,6 +817,7 @@ void register_System_class(){ "energies" , energies_function_value , ( bp::arg("components") ) + , bp::release_gil_policy() , "Return the energies of the energy components of this system whose\nsymbols are in components\nThrow: SireFF::missing_component\n" ); } @@ -775,6 +829,7 @@ void register_System_class(){ System_exposer.def( "energy" , energy_function_value + , bp::release_gil_policy() , "Return the total energy of this system." ); } @@ -787,6 +842,7 @@ void register_System_class(){ "energy" , energy_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return the total energy of the energy component in this system\nthat is identified by the energy component component\nThrow: SireFF::missing_component\n" ); } @@ -822,6 +878,7 @@ void register_System_class(){ System_exposer.def( "energyComponents" , energyComponents_function_value + , bp::release_gil_policy() , "Return all of the energy components of this system" ); } @@ -834,6 +891,7 @@ void register_System_class(){ "energyExpression" , energyExpression_function_value , ( bp::arg("expression") ) + , bp::release_gil_policy() , "Return the energy expression for the energy component component\nThrow: SireFF::missing_component\n" ); } @@ -846,6 +904,7 @@ void register_System_class(){ "energyExpressions" , energyExpressions_function_value , ( bp::arg("symbols") ) + , bp::release_gil_policy() , "Return the energy expressions for the energy components whose\nsymbols are in symbols\nThrow: SireFF::missing_component\n" ); } @@ -857,6 +916,7 @@ void register_System_class(){ System_exposer.def( "energyExpressions" , energyExpressions_function_value + , bp::release_gil_policy() , "Return all of the energy expressions in this system" ); } @@ -868,6 +928,7 @@ void register_System_class(){ System_exposer.def( "energySymbols" , energySymbols_function_value + , bp::release_gil_policy() , "Return the symbols that represent the energy expressions of this system" ); } @@ -879,7 +940,7 @@ void register_System_class(){ System_exposer.def( "extraGroups" , extraGroups_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return all of the extra non-forcefield molecule groups in this system" ); } @@ -892,6 +953,7 @@ void register_System_class(){ "ffIdx" , ffIdx_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return the index of the forcefield with ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -904,7 +966,7 @@ void register_System_class(){ "ffName" , ffName_function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the name of the forcefield with ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -989,7 +1051,7 @@ void register_System_class(){ "forceField" , forceField_function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield with ID ffid in this system\nThrow: SireFF::missing_forcefield\nThrow: SireFF::duplicate_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -1002,7 +1064,7 @@ void register_System_class(){ "forceField" , forceField_function_value , ( bp::arg("mgid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the forcefield that contains the molecule group\nidentified by the ID mgid\nThrow: SireMol::missing_group\nThrow: SireMol::duplicate_group\nThrow: SireError::invalid_index\n" ); } @@ -1027,6 +1089,7 @@ void register_System_class(){ "hasComponent" , hasComponent_function_value , ( bp::arg("symbol") ) + , bp::release_gil_policy() , "Return whether or not this system has a constant or energy\ncomponent represented by the symbol symbol" ); } @@ -1039,6 +1102,7 @@ void register_System_class(){ "hasConstantComponent" , hasConstantComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not this system has a constant\ncomponent with symbol component" ); } @@ -1051,6 +1115,7 @@ void register_System_class(){ "hasEnergyComponent" , hasEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not this system has an energy component component" ); } @@ -1063,6 +1128,7 @@ void register_System_class(){ "isBuiltinProperty" , isBuiltinProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not the property name exists and is a builtin\nproperty of one of the forcefields in this System" ); } @@ -1074,6 +1140,7 @@ void register_System_class(){ System_exposer.def( "isClean" , isClean_function_value + , bp::release_gil_policy() , "Return whether or not all of the forcefields are clean" ); } @@ -1086,6 +1153,7 @@ void register_System_class(){ "isCompoundProperty" , isCompoundProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not the property name exists and is a compound\nproperty (either a link or a combined property)" ); } @@ -1098,6 +1166,7 @@ void register_System_class(){ "isConstantComponent" , isConstantComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not the system component component\nis a constant component\nThrow: SireFF::missing_component\n" ); } @@ -1109,6 +1178,7 @@ void register_System_class(){ System_exposer.def( "isDirty" , isDirty_function_value + , bp::release_gil_policy() , "Return whether or not any of the forcefields are dirty" ); } @@ -1121,6 +1191,7 @@ void register_System_class(){ "isEnergyComponent" , isEnergyComponent_function_value , ( bp::arg("component") ) + , bp::release_gil_policy() , "Return whether or not the component component is an energy component\nThrow: SireFF::missing_component\n" ); } @@ -1133,6 +1204,7 @@ void register_System_class(){ "isUserProperty" , isUserProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Return whether or not the property name exists and is a user\nsupplied property (either a compound property or an extra\nSystem property)" ); } @@ -1145,7 +1217,7 @@ void register_System_class(){ "monitor" , monitor_function_value , ( bp::arg("monid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); } @@ -1158,6 +1230,7 @@ void register_System_class(){ "monitorName" , monitorName_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Return the name of the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); } @@ -1170,6 +1243,7 @@ void register_System_class(){ "monitors" , monitors_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Return the monitors with ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireError::invalid_index\n" ); } @@ -1193,6 +1267,7 @@ void register_System_class(){ System_exposer.def( "mustNowRecalculateFromScratch" , mustNowRecalculateFromScratch_function_value + , bp::release_gil_policy() , "Tell all of the forcefields that they will need to recalculate\ntheir energies from scratch. This can speed up calculations where\nyou know that the majority (or all) of the molecules will be\nchanging" ); } @@ -1204,6 +1279,7 @@ void register_System_class(){ System_exposer.def( "nConstraints" , nConstraints_function_value + , bp::release_gil_policy() , "Return the number of constraints on the system" ); } @@ -1215,6 +1291,7 @@ void register_System_class(){ System_exposer.def( "nForceFields" , nForceFields_function_value + , bp::release_gil_policy() , "Return the number of forcefields in this system" ); } @@ -1226,6 +1303,7 @@ void register_System_class(){ System_exposer.def( "nMonitors" , nMonitors_function_value + , bp::release_gil_policy() , "Return the number of monitors in this system" ); } @@ -1237,7 +1315,7 @@ void register_System_class(){ System_exposer.def( "name" , name_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1249,6 +1327,7 @@ void register_System_class(){ System_exposer.def( "needsAccepting" , needsAccepting_function_value + , bp::release_gil_policy() , "Return whether or not any part of the forcefield is using temporary\nworkspaces that need to be accepted" ); } @@ -1288,7 +1367,7 @@ void register_System_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("ffid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1301,7 +1380,7 @@ void register_System_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("monid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -1314,7 +1393,43 @@ void register_System_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("mgid") ) - , bp::return_value_policy() + , bp::return_value_policy() + , "" ); + + } + { //::SireSystem::System::operator[] + + typedef ::SireMol::ViewsOfMol ( ::SireSystem::System::*__getitem___function_type)( int ) const; + __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); + + System_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("i") ) + , "" ); + + } + { //::SireSystem::System::operator[] + + typedef ::SireMol::ViewsOfMol ( ::SireSystem::System::*__getitem___function_type)( ::QString const & ) const; + __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); + + System_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("name") ) + , "" ); + + } + { //::SireSystem::System::operator[] + + typedef ::QList< SireBase::PropPtr< SireMol::MoleculeView > > ( ::SireSystem::System::*__getitem___function_type)( ::SireBase::Slice const & ) const; + __getitem___function_type __getitem___function_value( &::SireSystem::System::operator[] ); + + System_exposer.def( + "__getitem__" + , __getitem___function_value + , ( bp::arg("slice") ) , "" ); } @@ -1398,6 +1513,7 @@ void register_System_class(){ System_exposer.def( "properties" , properties_function_value + , bp::release_gil_policy() , "Return the values of all of the properties of this system\nThrow: SireBase::duplicate_property\n" ); } @@ -1410,6 +1526,7 @@ void register_System_class(){ "properties" , properties_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return the values of all of the properties of this system that\nare in the forcefields that match the ID ffid\nThrow: SireBase::duplicate_property\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -1422,7 +1539,7 @@ void register_System_class(){ "property" , property_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the values of the property called name in all of the\nforcefields that contain this property\nThrow: SireBase::missing_property\nThrow: SireBase::duplicate_property\n" ); } @@ -1435,7 +1552,7 @@ void register_System_class(){ "property" , property_function_value , ( bp::arg("ffid"), bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the value of the property name in the forcefield identified\nby the ID ffid\nThrow: SireBase::duplicate_property\nThrow: SireFF::missing_forcefield\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\n" ); } @@ -1447,6 +1564,7 @@ void register_System_class(){ System_exposer.def( "propertyKeys" , propertyKeys_function_value + , bp::release_gil_policy() , "Return the names of all of the properties of this system" ); } @@ -1459,6 +1577,7 @@ void register_System_class(){ "propertyKeys" , propertyKeys_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Return the names of all of the properties of the forcefields in\nthis system that match the ID ffid\nThrow: SireFF::missing_forcefield\nThrow: SireError::invalid_index\n" ); } @@ -1471,6 +1590,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Remove all monitors that match the ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireError::invalid_index\n" ); } @@ -1483,6 +1603,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("ffid") ) + , bp::release_gil_policy() , "Remove the forcefield(s) that match the ID ffid\nThrow: SireError::invalid_index\n" ); } @@ -1495,6 +1616,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("ff") ) + , bp::release_gil_policy() , "Remove the forcefield ff. Note that this removes the forcefield\nin this system that has the same name as ff\nThrow: SireFF::missing_forcefield\n" ); } @@ -1507,6 +1629,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the molecule group(s) that match the ID mgid.\nNote that you cant remove molecule groups that are part\nof a forcefield\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\nThrow: SireError::invalid_arg\n" ); } @@ -1519,6 +1642,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molgroup") ) + , bp::release_gil_policy() , "Remove the molecules contained in the molecule group molgroup.\nThis doesnt remove the molecule group itself though. If you\nwant to remove the molecule group, use System::remove(molgroup.number())\nThrow: SireMol::missing_group\n" ); } @@ -1531,6 +1655,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molid") ) + , bp::release_gil_policy() , "Remove all molecules from this system that match the ID molid\nThrow: SireMol::missing_molecule\n" ); } @@ -1543,6 +1668,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("constraint") ) + , bp::release_gil_policy() , "Remove the constraints in constraints from the list of constraints\nthat are applied to this system" ); } @@ -1555,6 +1681,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("constraints") ) + , bp::release_gil_policy() , "Remove the constraints in constraints from the list of constraints\nthat are applied to this system" ); } @@ -1567,6 +1694,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the view molview from the specified groups in this\nforcefield. Note that this only removes the specific view\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1579,6 +1707,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views in molviews from the specified groups in this\nforcefield. Note that this only removes the specific views\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1591,6 +1720,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove them molecules in molecules from the specified groups in this\nforcefield. Note that this only removes the specific views\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1603,6 +1733,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the views in the molecule group molgroup from the specified\ngroups in this forcefield. Note that this only removes the specific views\n(and indeed only the first copy of this view if there\nare duplicates) - it does not remove the atoms in this\nview from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1615,6 +1746,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molnum"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all views of the molecule with number molnum from the molecule\ngroups identified by mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1627,6 +1759,7 @@ void register_System_class(){ "remove" , remove_function_value , ( bp::arg("molnums"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all of the molecules whose numbers are in molnums from\nall of the molecule groups identified by the ID mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1639,6 +1772,7 @@ void register_System_class(){ "removeAll" , removeAll_function_value , ( bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove all molecules from the molecule groups identified by the ID mgid\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1651,6 +1785,7 @@ void register_System_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molview"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the view in molview from the specified\ngroups in this forcefield. Note that this only removes the specific views\n- it does not remove the atoms in this view from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1663,6 +1798,7 @@ void register_System_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molviews"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the views in molviews from the specified\ngroups in this forcefield. Note that this only removes the specific views\n- it does not remove the atoms in this view from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1675,6 +1811,7 @@ void register_System_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molecules"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the molecules in molecules from the specified\ngroups in this forcefield. Note that this only removes the specific views\n- it does not remove the atoms in this view from all of the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1687,6 +1824,7 @@ void register_System_class(){ "removeAll" , removeAll_function_value , ( bp::arg("molgroup"), bp::arg("mgid") ) + , bp::release_gil_policy() , "Remove the all copies of the molecules in the molecule group molgroup\nfrom the specified groups in this forcefield. Note that this only removes\nthe specific views - it does not remove the atoms in this view from all\nof the other views\nThrow: SireMol::missing_group\nThrow: SireError::invalid_index\n" ); } @@ -1698,6 +1836,7 @@ void register_System_class(){ System_exposer.def( "removeAllConstraints" , removeAllConstraints_function_value + , bp::release_gil_policy() , "Remove all constraints from this system" ); } @@ -1709,6 +1848,7 @@ void register_System_class(){ System_exposer.def( "removeAllForceFields" , removeAllForceFields_function_value + , bp::release_gil_policy() , "Completely remove all of the forcefields (and their contained\nmolecule groups) from this system" ); } @@ -1720,6 +1860,7 @@ void register_System_class(){ System_exposer.def( "removeAllMoleculeGroups" , removeAllMoleculeGroups_function_value + , bp::release_gil_policy() , "Completely remove all non-forcefield molecule groups\nfrom this system" ); } @@ -1731,6 +1872,7 @@ void register_System_class(){ System_exposer.def( "removeAllMolecules" , removeAllMolecules_function_value + , bp::release_gil_policy() , "Completely remove all molecules from this system" ); } @@ -1742,6 +1884,7 @@ void register_System_class(){ System_exposer.def( "removeAllMonitors" , removeAllMonitors_function_value + , bp::release_gil_policy() , "Completely remove all monitors from this system" ); } @@ -1754,6 +1897,7 @@ void register_System_class(){ "removeProperty" , removeProperty_function_value , ( bp::arg("name") ) + , bp::release_gil_policy() , "Remove the property with name name. Note that this can only\nremove user-level properties - it cannot remove built-in properties\nof the system. This does nothing if there is no user-level\nproperty with this name" ); } @@ -1766,6 +1910,7 @@ void register_System_class(){ "setComponent" , setComponent_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "Synonym for System::setConstantComponent(symbol, value)" ); } @@ -1778,6 +1923,7 @@ void register_System_class(){ "setComponent" , setComponent_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "Synonym for System::setEnergyComponent(symbol, expression)" ); } @@ -1790,6 +1936,7 @@ void register_System_class(){ "setConstant" , setConstant_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -1802,6 +1949,7 @@ void register_System_class(){ "setConstant" , setConstant_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "" ); } @@ -1814,6 +1962,7 @@ void register_System_class(){ "setConstantComponent" , setConstantComponent_function_value , ( bp::arg("symbol"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the constant component symbol to the value value\nThrow: SireError::incompatible_error\n" ); } @@ -1826,6 +1975,7 @@ void register_System_class(){ "setConstantComponent" , setConstantComponent_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the constant component symbol to the expression\nThrow: SireError::incompatible_error\n" ); } @@ -1838,6 +1988,7 @@ void register_System_class(){ "setConstraints" , setConstraints_function_value , ( bp::arg("constraints") ) + , bp::release_gil_policy() , "Set the constraints for the system equal to constraints" ); } @@ -1850,6 +2001,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule group(s) identified by the ID mgid\nso that they contain just the view of the molecule in molview.\nThe version of the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1862,6 +2014,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molviews"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule group(s) identified by the ID mgid\nso that they contain just the views of the molecule in molviews.\nThe version of the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1874,6 +2027,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule group(s) identified by the ID mgid\nso that they contain just the views of the molecules in molecules.\nThe version of the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1886,6 +2040,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup"), bp::arg("map") ) + , bp::release_gil_policy() , "Set the contents of the molecule group(s) identified by the ID mgid\nso that they contain just the molecules in the group molgroup.\nThe version of the molecule already present in this set is used if\nsuch a molecule already exists. The supplied property map\nis used to find the properties required by any forcefields\nthat this molecule may be added to.\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1898,6 +2053,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molview") ) + , bp::release_gil_policy() , "Convenient overload of System::setContents that uses the default\nproperty locations to find the properties required by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1910,6 +2066,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molviews") ) + , bp::release_gil_policy() , "Convenient overload of System::setContents that uses the default\nproperty locations to find the properties required by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1922,6 +2079,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molecules") ) + , bp::release_gil_policy() , "Convenient overload of System::setContents that uses the default\nproperty locations to find the properties required by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1934,6 +2092,7 @@ void register_System_class(){ "setContents" , setContents_function_value , ( bp::arg("mgid"), bp::arg("molgroup") ) + , bp::release_gil_policy() , "Convenient overload of System::setContents that uses the default\nproperty locations to find the properties required by the forcefields\nThrow: SireMol::missing_group\nThrow: SireBase::missing_property\nThrow: SireError::invalid_index\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -1946,6 +2105,7 @@ void register_System_class(){ "setEnergyComponent" , setEnergyComponent_function_value , ( bp::arg("symbol"), bp::arg("expression") ) + , bp::release_gil_policy() , "Set the energy component symbol equal to the expression expression" ); } @@ -1958,6 +2118,7 @@ void register_System_class(){ "setMonitors" , setMonitors_function_value , ( bp::arg("monitors") ) + , bp::release_gil_policy() , "Set the monitors of this system to monitors" ); } @@ -1970,8 +2131,22 @@ void register_System_class(){ "setMonitors" , setMonitors_function_value , ( bp::arg("monitors"), bp::arg("frequency") ) + , bp::release_gil_policy() , "Set the monitors of the system to monitors, and reset the\nfrequency of all of the monitors so that they are triggered\nevery frequency steps" ); + } + { //::SireSystem::System::setName + + typedef void ( ::SireSystem::System::*setName_function_type)( ::SireSystem::SysName const & ) ; + setName_function_type setName_function_value( &::SireSystem::System::setName ); + + System_exposer.def( + "setName" + , setName_function_value + , ( bp::arg("newname") ) + , bp::release_gil_policy() + , "Set the name of this system" ); + } { //::SireSystem::System::setName @@ -1982,6 +2157,7 @@ void register_System_class(){ "setName" , setName_function_value , ( bp::arg("newname") ) + , bp::release_gil_policy() , "Set the name of this system" ); } @@ -1994,6 +2170,7 @@ void register_System_class(){ "setProperty" , setProperty_function_value , ( bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value of the property called name to the value value in\nall forcefields that have this property\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -2006,6 +2183,7 @@ void register_System_class(){ "setProperty" , setProperty_function_value , ( bp::arg("ffid"), bp::arg("name"), bp::arg("value") ) + , bp::release_gil_policy() , "Set the value of the property called name in the forcefields identified\nby the ID ffid to the value value\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } @@ -2017,6 +2195,7 @@ void register_System_class(){ System_exposer.def( "subVersion" , subVersion_function_value + , bp::release_gil_policy() , "" ); } @@ -2028,6 +2207,7 @@ void register_System_class(){ System_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this system" ); } @@ -2039,7 +2219,7 @@ void register_System_class(){ System_exposer.def( "totalComponent" , totalComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the total energy component\nof the system" ); } @@ -2051,6 +2231,7 @@ void register_System_class(){ System_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -2098,6 +2279,7 @@ void register_System_class(){ System_exposer.def( "userProperties" , userProperties_function_value + , bp::release_gil_policy() , "Return the values of all user-level properties of this\nsystem" ); } @@ -2110,7 +2292,7 @@ void register_System_class(){ "userProperty" , userProperty_function_value , ( bp::arg("name") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the user-supplied property at name. This raises an\nexception if there is no user-supplied property with this name\nThrow: SireBase::missing_property\n" ); } @@ -2122,7 +2304,7 @@ void register_System_class(){ System_exposer.def( "version" , version_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } diff --git a/wrapper/System/SystemMonitor.pypp.cpp b/wrapper/System/SystemMonitor.pypp.cpp index b82be46dc..79a94d628 100644 --- a/wrapper/System/SystemMonitor.pypp.cpp +++ b/wrapper/System/SystemMonitor.pypp.cpp @@ -23,6 +23,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_SystemMonitor_class(){ { //::SireSystem::SystemMonitor @@ -37,6 +39,7 @@ void register_SystemMonitor_class(){ SystemMonitor_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "" ); } @@ -49,6 +52,7 @@ void register_SystemMonitor_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "" ); } @@ -72,6 +76,7 @@ void register_SystemMonitor_class(){ SystemMonitor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/SystemMonitors.pypp.cpp b/wrapper/System/SystemMonitors.pypp.cpp index f3b355f65..d8b971721 100644 --- a/wrapper/System/SystemMonitors.pypp.cpp +++ b/wrapper/System/SystemMonitors.pypp.cpp @@ -32,6 +32,8 @@ SireSystem::SystemMonitors __copy__(const SireSystem::SystemMonitors &other){ re const char* pvt_get_name(const SireSystem::SystemMonitors&){ return "SireSystem::SystemMonitors";} +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_SystemMonitors_class(){ @@ -62,6 +64,7 @@ void register_SystemMonitors_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add the monitors from other to this set\nThrow: SireSystem::duplicate_monitor\n" ); } @@ -74,6 +77,7 @@ void register_SystemMonitors_class(){ "add" , add_function_value , ( bp::arg("other"), bp::arg("frequency") ) + , bp::release_gil_policy() , "Add all of the monitors in other to this set, adding them\nwith the frequency frequency\nThrow: SireSystem::duplicate_monitor\n" ); } @@ -86,7 +90,7 @@ void register_SystemMonitors_class(){ "at" , at_function_value , ( bp::arg("monid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); } @@ -98,6 +102,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Completely clear any statistics held in these monitors" ); } @@ -110,6 +115,7 @@ void register_SystemMonitors_class(){ "clearStatistics" , clearStatistics_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Completely clear the statistics held by the monitors that\nmatch the ID monid - this does nothing if there are no\nmonitors that match this ID" ); } @@ -121,6 +127,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of monitors in this set" ); } @@ -133,6 +140,7 @@ void register_SystemMonitors_class(){ "getFrequency" , getFrequency_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Return the frequency of the monitor with ID monid\nThrow: SireSystem::duplicate_monitor\nThrow: SireSystem::missing_monitor\nThrow: SireError::invalid_index\n" ); } @@ -144,6 +152,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty (contains no monitors)" ); } @@ -155,6 +164,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "list" , list_function_value + , bp::release_gil_policy() , "Return the list of all monitors in this set, in the order they\nappear in this set" ); } @@ -167,6 +177,7 @@ void register_SystemMonitors_class(){ "map" , map_function_value , ( bp::arg("monname") ) + , bp::release_gil_policy() , "Simple shortcut function\nThrow: SireSystem::missing_monitor\n" ); } @@ -179,6 +190,7 @@ void register_SystemMonitors_class(){ "map" , map_function_value , ( bp::arg("monidx") ) + , bp::release_gil_policy() , "Return the name of the monitor at index monidx\nThrow: SireError::invalid_index\n" ); } @@ -191,6 +203,7 @@ void register_SystemMonitors_class(){ "map" , map_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Return the names of the monitors that match the ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireError::invalid_index\n" ); } @@ -203,7 +216,7 @@ void register_SystemMonitors_class(){ "monitor" , monitor_function_value , ( bp::arg("monid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); } @@ -216,6 +229,7 @@ void register_SystemMonitors_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Update the monitors by monitoring the system system" ); } @@ -228,6 +242,7 @@ void register_SystemMonitors_class(){ "monitorName" , monitorName_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Return the name of the monitor at ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireSystem::duplicate_monitor\nThrow: SireError::invalid_index\n" ); } @@ -239,6 +254,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "monitorNames" , monitorNames_function_value + , bp::release_gil_policy() , "Return the list of all monitor names" ); } @@ -251,6 +267,7 @@ void register_SystemMonitors_class(){ "monitors" , monitors_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Return all of the monitors that match the ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireError::invalid_index\n" ); } @@ -262,6 +279,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "monitors" , monitors_function_value + , bp::release_gil_policy() , "Return the list of all monitors in this set, in the order they\nappear in this set" ); } @@ -273,6 +291,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "nMonitors" , nMonitors_function_value + , bp::release_gil_policy() , "Return the number of monitors in this set" ); } @@ -284,6 +303,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "names" , names_function_value + , bp::release_gil_policy() , "Return the list of all monitor names" ); } @@ -311,7 +331,7 @@ void register_SystemMonitors_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("monid") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -324,6 +344,7 @@ void register_SystemMonitors_class(){ "remove" , remove_function_value , ( bp::arg("monid") ) + , bp::release_gil_policy() , "Remove all of the monitors that match the ID monid\nThrow: SireSystem::missing_monitor\nThrow: SireError::invalid_index\n" ); } @@ -335,6 +356,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "removeAll" , removeAll_function_value + , bp::release_gil_policy() , "Remove all of the monitors from this set" ); } @@ -347,6 +369,7 @@ void register_SystemMonitors_class(){ "setAllFrequency" , setAllFrequency_function_value , ( bp::arg("frequency") ) + , bp::release_gil_policy() , "Set the frequency of all of the monitors to frequency" ); } @@ -359,6 +382,7 @@ void register_SystemMonitors_class(){ "setFrequency" , setFrequency_function_value , ( bp::arg("monid"), bp::arg("frequency") ) + , bp::release_gil_policy() , "Set the frequency of all monitors that match the ID monid so that\nthey are updated every frequency steps\nThrow: SireSystem::missing_monitor\nThrow: SireError::invalid_index\n" ); } @@ -370,6 +394,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of monitors in this set" ); } @@ -381,6 +406,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -392,6 +418,7 @@ void register_SystemMonitors_class(){ SystemMonitors_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/TripleDistanceComponent.pypp.cpp b/wrapper/System/TripleDistanceComponent.pypp.cpp index 795b82c03..f33f00789 100644 --- a/wrapper/System/TripleDistanceComponent.pypp.cpp +++ b/wrapper/System/TripleDistanceComponent.pypp.cpp @@ -30,6 +30,8 @@ SireSystem::TripleDistanceComponent __copy__(const SireSystem::TripleDistanceCom #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TripleDistanceComponent_class(){ { //::SireSystem::TripleDistanceComponent @@ -47,6 +49,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of points (6)" ); } @@ -74,7 +77,7 @@ void register_TripleDistanceComponent_class(){ "point" , point_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith point\nThrow: SireError::invalid_index\n" ); } @@ -86,7 +89,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "point0" , point0_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the first distance is calculated" ); } @@ -98,7 +101,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "point1" , point1_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the first distance is calculated" ); } @@ -110,7 +113,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "point2" , point2_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the second distance is calculated" ); } @@ -122,7 +125,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "point3" , point3_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the second distance is calculated" ); } @@ -134,7 +137,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "point4" , point4_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the first point between which the third distance is calculated" ); } @@ -146,7 +149,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "point5" , point5_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the second point between which the third distance is calculated" ); } @@ -158,7 +161,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "r01" , r01_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints .point0() and .point1() (r01)" ); } @@ -170,7 +173,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "r23" , r23_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints .point2() and .point3() (r23)" ); } @@ -182,7 +185,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "r45" , r45_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol that represents the distance between the\npoints .point4() and .point5() (r45)" ); } @@ -194,6 +197,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -205,6 +209,7 @@ void register_TripleDistanceComponent_class(){ TripleDistanceComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/VolMapMonitor.pypp.cpp b/wrapper/System/VolMapMonitor.pypp.cpp index cea876517..b6c357ce3 100644 --- a/wrapper/System/VolMapMonitor.pypp.cpp +++ b/wrapper/System/VolMapMonitor.pypp.cpp @@ -44,6 +44,8 @@ SireSystem::VolMapMonitor __copy__(const SireSystem::VolMapMonitor &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_VolMapMonitor_class(){ { //::SireSystem::VolMapMonitor @@ -64,6 +66,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "averageOccupancy" , averageOccupancy_function_value + , bp::release_gil_policy() , "Return the average occupancy. This is a linear array that can be\naccessed using the accompanying GridInfo returned by gridInfo()" ); } @@ -75,6 +78,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "clearStatistics" , clearStatistics_function_value + , bp::release_gil_policy() , "Clear all statistics" ); } @@ -86,6 +90,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "gridInfo" , gridInfo_function_value + , bp::release_gil_policy() , "Return the grid dimensions" ); } @@ -97,6 +102,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "gridSpacing" , gridSpacing_function_value + , bp::release_gil_policy() , "Return the spacing of the grid" ); } @@ -108,7 +114,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "group" , group_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the molecule group whose atoms are being monitored" ); } @@ -120,6 +126,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "map" , map_function_value + , bp::release_gil_policy() , "Return the property map used to find the properties needed by this monitor" ); } @@ -132,6 +139,7 @@ void register_VolMapMonitor_class(){ "monitor" , monitor_function_value , ( bp::arg("system") ) + , bp::release_gil_policy() , "Monitor the system" ); } @@ -143,6 +151,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "nSamples" , nSamples_function_value + , bp::release_gil_policy() , "Return the number of samples recorded so far" ); } @@ -170,6 +179,7 @@ void register_VolMapMonitor_class(){ "setGridSpacing" , setGridSpacing_function_value , ( bp::arg("grid_spacing") ) + , bp::release_gil_policy() , "Set the grid spacing on which we monitor the space" ); } @@ -194,6 +204,7 @@ void register_VolMapMonitor_class(){ "setPropertyMap" , setPropertyMap_function_value , ( bp::arg("map") ) + , bp::release_gil_policy() , "Set the property map to be used by this monitor" ); } @@ -206,6 +217,7 @@ void register_VolMapMonitor_class(){ "setSkipLightAtoms" , setSkipLightAtoms_function_value , ( bp::arg("on") ) + , bp::release_gil_policy() , "Turn on skipping light atoms" ); } @@ -217,6 +229,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "skippingLightAtoms" , skippingLightAtoms_function_value + , bp::release_gil_policy() , "Return whether or not we are skipping light atoms (e.g. hydrogen)" ); } @@ -228,6 +241,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -239,6 +253,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -250,6 +265,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "volumeMap" , volumeMap_function_value + , bp::release_gil_policy() , "Return the actual volume map" ); } @@ -261,6 +277,7 @@ void register_VolMapMonitor_class(){ VolMapMonitor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/WindowedComponent.pypp.cpp b/wrapper/System/WindowedComponent.pypp.cpp index 27bf35f73..42fe4c4d1 100644 --- a/wrapper/System/WindowedComponent.pypp.cpp +++ b/wrapper/System/WindowedComponent.pypp.cpp @@ -40,6 +40,8 @@ SireSystem::WindowedComponent __copy__(const SireSystem::WindowedComponent &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_WindowedComponent_class(){ { //::SireSystem::WindowedComponent @@ -56,7 +58,7 @@ void register_WindowedComponent_class(){ WindowedComponent_exposer.def( "component" , component_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the component being constrained" ); } @@ -83,7 +85,7 @@ void register_WindowedComponent_class(){ WindowedComponent_exposer.def( "referenceComponent" , referenceComponent_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the symbol representing the reference component" ); } @@ -95,6 +97,7 @@ void register_WindowedComponent_class(){ WindowedComponent_exposer.def( "stepSize" , stepSize_function_value + , bp::release_gil_policy() , "Return the step size for this windows - this is the number of\nwindows above (or below if step_size is negative) for this\nwindow compared to the window containing the reference component" ); } @@ -106,6 +109,7 @@ void register_WindowedComponent_class(){ WindowedComponent_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this constraint" ); } @@ -117,6 +121,7 @@ void register_WindowedComponent_class(){ WindowedComponent_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/System/_System_free_functions.pypp.cpp b/wrapper/System/_System_free_functions.pypp.cpp index f0e06e25b..fe64aea53 100644 --- a/wrapper/System/_System_free_functions.pypp.cpp +++ b/wrapper/System/_System_free_functions.pypp.cpp @@ -19,6 +19,8 @@ namespace bp = boost::python; #include "SireMol/chainname.h" +#include "SireMol/core.h" + #include "SireMol/molecule.h" #include "SireMol/moleditor.h" diff --git a/wrapper/System/__init__.py b/wrapper/System/__init__.py index 3afff5f7a..b6fdea57c 100644 --- a/wrapper/System/__init__.py +++ b/wrapper/System/__init__.py @@ -1,22 +1,65 @@ -############################# -## -## The SireSystem module -## -## (C) Christopher Woods -## - -import Sire.FF - -from Sire.System._System import * - -def __system_getitem__(system, i): - try: - return system.__orig__getitem__(i) - except Exception as e: - if e.__class__.__name__ == "ArgumentError": - return system.__orig__getitem__(Sire.Mol.MolIdx(i)) - else: - raise e - -System.__orig__getitem__ = System.__getitem__ -System.__getitem__ = __system_getitem__ +""" +.. currentmodule:: sire.legacy.System + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + AngleComponent + AssignerGroup + ChargeConstraint + CheckPoint + CloseMols + ComponentConstraint + Constraint + Constraints + DihedralComponent + DistanceComponent + DoubleDistanceComponent + EnergyMonitor + FreeEnergyMonitor + GeometryComponent + IDAssigner + IdentityConstraint + MoleculeConstraint + MonitorComponent + MonitorComponents + MonitorID + MonitorIdx + MonitorMonitor + MonitorName + MonitorProperty + PerturbationConstraint + PolariseCharges + PolariseChargesFF + PropertyConstraint + SpaceWrapper + SysID + SysIdx + SysName + System + SystemMonitor + SystemMonitors + TripleDistanceComponent + VolMapMonitor + WindowedComponent + +Functions +========= + +.. autosummary:: + :toctree: generated/ + + create_test_molecule + +""" + +from .. import FF as _FF +from .. import Base as _Base + +from ._System import * + +System.__setProperty__ = System.setProperty +System.setProperty = _Base.__set_property__ diff --git a/wrapper/System/special_code.py b/wrapper/System/special_code.py index 09a1d6a8a..d988e87e8 100644 --- a/wrapper/System/special_code.py +++ b/wrapper/System/special_code.py @@ -17,12 +17,16 @@ def fix_MonitorID(c): c.add_declaration_code( "#include \"systemmonitors.h\"" ) c.add_declaration_code( "#include \"monitorname.h\"" ) +def fix_System(c): + c.add_declaration_code( "#include \"SireBase/slice.h\"" ) + fix_MonitorName = fix_MonitorID fix_MonitorIdx = fix_MonitorID special_code = { "SireSystem::MonitorID" : fix_MonitorID, "SireSystem::MonitorName" : fix_MonitorName, - "SireSystem::MonitorIdx" : fix_MonitorIdx + "SireSystem::MonitorIdx" : fix_MonitorIdx, + "SireSystem::System" : fix_System } implicitly_convertible = [ ("SireMol::MoleculeGroup", "SireSystem::AssignerGroup"), diff --git a/wrapper/Units/CMakeAutogenFile.txt b/wrapper/Units/CMakeAutogenFile.txt index 0fce560ea..9fb6c252f 100644 --- a/wrapper/Units/CMakeAutogenFile.txt +++ b/wrapper/Units/CMakeAutogenFile.txt @@ -1,10 +1,10 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - Unit.pypp.cpp - GeneralUnit.pypp.cpp + Celsius.pypp.cpp Fahrenheit.pypp.cpp + GeneralUnit.pypp.cpp TempBase.pypp.cpp - Celsius.pypp.cpp + Unit.pypp.cpp _Units_free_functions.pypp.cpp SireUnits_containers.cpp SireUnits_registrars.cpp diff --git a/wrapper/Units/CMakeLists.txt b/wrapper/Units/CMakeLists.txt index e8850cf90..d06eeea6d 100644 --- a/wrapper/Units/CMakeLists.txt +++ b/wrapper/Units/CMakeLists.txt @@ -23,7 +23,7 @@ include(CMakeAutogenFile.txt) set ( WRAPUNITS_SOURCES _Units.main.cpp - + generalunit.cpp sireunits_dimensions.cpp _Units_global_variables.pyman.cpp @@ -43,21 +43,21 @@ set_target_properties (Units PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Units SirePython SIRE_SireUnits SIRE_SireBase SIRE_SireMol SIRE_SireMM - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Units" "_init_Units" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Units ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Units ) install( TARGETS Units LIBRARY DESTINATION ${INSTALLDIR} @@ -66,6 +66,5 @@ install( TARGETS Units ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) - diff --git a/wrapper/Units/Celsius.pypp.cpp b/wrapper/Units/Celsius.pypp.cpp index 84646ffe6..75070ce85 100644 --- a/wrapper/Units/Celsius.pypp.cpp +++ b/wrapper/Units/Celsius.pypp.cpp @@ -15,6 +15,8 @@ SireUnits::Celsius __copy__(const SireUnits::Celsius &other){ return SireUnits:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Celsius_class(){ { //::SireUnits::Celsius @@ -34,6 +36,7 @@ void register_Celsius_class(){ "convertFromInternal" , convertFromInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -45,6 +48,7 @@ void register_Celsius_class(){ Celsius_exposer.def( "convertFromInternal" , convertFromInternal_function_value + , bp::release_gil_policy() , "" ); } @@ -57,6 +61,7 @@ void register_Celsius_class(){ "convertToInternal" , convertToInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Units/Fahrenheit.pypp.cpp b/wrapper/Units/Fahrenheit.pypp.cpp index 79bd8edbf..c43578905 100644 --- a/wrapper/Units/Fahrenheit.pypp.cpp +++ b/wrapper/Units/Fahrenheit.pypp.cpp @@ -15,6 +15,8 @@ SireUnits::Fahrenheit __copy__(const SireUnits::Fahrenheit &other){ return SireU #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Fahrenheit_class(){ { //::SireUnits::Fahrenheit @@ -34,6 +36,7 @@ void register_Fahrenheit_class(){ "convertFromInternal" , convertFromInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -45,6 +48,7 @@ void register_Fahrenheit_class(){ Fahrenheit_exposer.def( "convertFromInternal" , convertFromInternal_function_value + , bp::release_gil_policy() , "" ); } @@ -57,6 +61,7 @@ void register_Fahrenheit_class(){ "convertToInternal" , convertToInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Units/GeneralUnit.pypp.cpp b/wrapper/Units/GeneralUnit.pypp.cpp index e0d657c4d..c85c99e5f 100644 --- a/wrapper/Units/GeneralUnit.pypp.cpp +++ b/wrapper/Units/GeneralUnit.pypp.cpp @@ -35,8 +35,12 @@ namespace bp = boost::python; SireUnits::Dimension::GeneralUnit __copy__(const SireUnits::Dimension::GeneralUnit &other){ return SireUnits::Dimension::GeneralUnit(other); } +#include "Qt/qdatastream.hpp" + #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GeneralUnit_class(){ { //::SireUnits::Dimension::GeneralUnit @@ -52,6 +56,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "ANGLE" , ANGLE_function_value + , bp::release_gil_policy() , "" ); } @@ -63,6 +68,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "CHARGE" , CHARGE_function_value + , bp::release_gil_policy() , "" ); } @@ -74,6 +80,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "LENGTH" , LENGTH_function_value + , bp::release_gil_policy() , "" ); } @@ -85,6 +92,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "MASS" , MASS_function_value + , bp::release_gil_policy() , "" ); } @@ -96,6 +104,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "QUANTITY" , QUANTITY_function_value + , bp::release_gil_policy() , "" ); } @@ -107,6 +116,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "TEMPERATURE" , TEMPERATURE_function_value + , bp::release_gil_policy() , "" ); } @@ -118,6 +128,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "TIME" , TIME_function_value + , bp::release_gil_policy() , "" ); } @@ -129,6 +140,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "invert" , invert_function_value + , bp::release_gil_policy() , "" ); } @@ -167,6 +179,7 @@ void register_GeneralUnit_class(){ "to" , to_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -179,6 +192,7 @@ void register_GeneralUnit_class(){ "to" , to_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -190,6 +204,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "toProperty" , toProperty_function_value + , bp::release_gil_policy() , "" ); } @@ -201,6 +216,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -212,6 +228,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -223,6 +240,7 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -231,6 +249,11 @@ void register_GeneralUnit_class(){ GeneralUnit_exposer.def( "__copy__", &__copy__); GeneralUnit_exposer.def( "__deepcopy__", &__copy__); GeneralUnit_exposer.def( "clone", &__copy__); + GeneralUnit_exposer.def( "__rlshift__", &__rlshift__QDataStream< ::SireUnits::Dimension::GeneralUnit >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + GeneralUnit_exposer.def( "__rrshift__", &__rrshift__QDataStream< ::SireUnits::Dimension::GeneralUnit >, + bp::return_internal_reference<1, bp::with_custodian_and_ward<1,2> >() ); + GeneralUnit_exposer.def_pickle(sire_pickle_suite< ::SireUnits::Dimension::GeneralUnit >()); GeneralUnit_exposer.def( "__str__", &__str__< ::SireUnits::Dimension::GeneralUnit > ); GeneralUnit_exposer.def( "__repr__", &__str__< ::SireUnits::Dimension::GeneralUnit > ); } diff --git a/wrapper/Units/SireUnits_containers.cpp b/wrapper/Units/SireUnits_containers.cpp index 39f81dfdc..cc94e0ec9 100644 --- a/wrapper/Units/SireUnits_containers.cpp +++ b/wrapper/Units/SireUnits_containers.cpp @@ -54,10 +54,15 @@ void register_SireUnits_containers() register_list< QVector >(); register_list< QVector >(); register_list< QVector > (); + register_list< QVector > (); + + register_list< QList >(); + register_list< QList >(); + register_list< QList >(); + register_list< QList > (); + register_list< QList > (); register_PackedArray< SireBase::PackedArray2D >(); register_PackedArray< SireBase::PackedArray2D >(); register_PackedArray< SireBase::PackedArray2D >(); - - register_list< QVector >(); } diff --git a/wrapper/Units/TempBase.pypp.cpp b/wrapper/Units/TempBase.pypp.cpp index 177671694..cb6408306 100644 --- a/wrapper/Units/TempBase.pypp.cpp +++ b/wrapper/Units/TempBase.pypp.cpp @@ -13,6 +13,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TempBase_class(){ { //::SireUnits::Dimension::TempBase @@ -28,6 +30,7 @@ void register_TempBase_class(){ "convertFromInternal" , convertFromInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -39,6 +42,7 @@ void register_TempBase_class(){ TempBase_exposer.def( "convertFromInternal" , convertFromInternal_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +55,7 @@ void register_TempBase_class(){ "convertToInternal" , convertToInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -63,6 +68,7 @@ void register_TempBase_class(){ "in" , in_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -75,6 +81,7 @@ void register_TempBase_class(){ "in" , in_function_value , ( bp::arg("temp") ) + , bp::release_gil_policy() , "" ); } @@ -117,6 +124,7 @@ void register_TempBase_class(){ "to" , to_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "" ); } @@ -128,6 +136,7 @@ void register_TempBase_class(){ TempBase_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -139,6 +148,7 @@ void register_TempBase_class(){ TempBase_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Units/Unit.pypp.cpp b/wrapper/Units/Unit.pypp.cpp index ac6c584f5..13f766f46 100644 --- a/wrapper/Units/Unit.pypp.cpp +++ b/wrapper/Units/Unit.pypp.cpp @@ -17,6 +17,8 @@ namespace bp = boost::python; const char* pvt_get_name(const SireUnits::Dimension::Unit&){ return "SireUnits::Dimension::Unit";} +#include "Helpers/release_gil_policy.hpp" + void register_Unit_class(){ { //::SireUnits::Dimension::Unit @@ -32,6 +34,7 @@ void register_Unit_class(){ "convertFromInternal" , convertFromInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -44,6 +47,7 @@ void register_Unit_class(){ "convertToInternal" , convertToInternal_function_value , ( bp::arg("value") ) + , bp::release_gil_policy() , "" ); } @@ -55,6 +59,7 @@ void register_Unit_class(){ Unit_exposer.def( "scaleFactor" , scaleFactor_function_value + , bp::release_gil_policy() , "" ); } @@ -66,6 +71,7 @@ void register_Unit_class(){ Unit_exposer.def( "value" , value_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Units/__init__.py b/wrapper/Units/__init__.py index a26e95a3a..f2c095e10 100644 --- a/wrapper/Units/__init__.py +++ b/wrapper/Units/__init__.py @@ -1,16 +1,31 @@ -######################### -# -# This module contains a collection -# of units. -# -# The units are copied from -# SireUnits/units.h -# -######################## +""" +.. currentmodule:: sire.legacy.Units -from Sire.Units._Units import * +Classes +======= -import Sire.Base +.. autosummary:: + :toctree: generated/ -wrap = Sire.Base._add_wrap_function(wrap) + Celsius + Fahrenheit + GeneralUnit + Unit +Functions +========= + +.. autosummary:: + :toctree: generated/ + + acute + convert + convertFrom + convertTo + +""" +from ._Units import * + +from .. import Base as _Base + +wrap = _Base._add_wrap_function(wrap) diff --git a/wrapper/Units/generalunit.cpp b/wrapper/Units/generalunit.cpp index 9ab142576..098ff09d5 100644 --- a/wrapper/Units/generalunit.cpp +++ b/wrapper/Units/generalunit.cpp @@ -21,6 +21,40 @@ using namespace SireUnits; using namespace SireUnits::Dimension; using namespace SireBase; +QDataStream& operator<<(QDataStream &ds, const SireUnits::Dimension::GeneralUnit &u) +{ + qint8 a = u.ANGLE(); + qint8 c = u.CHARGE(); + qint8 l = u.LENGTH(); + qint8 m = u.MASS(); + qint8 t1 = u.TEMPERATURE(); + qint8 t2 = u.TIME(); + qint8 q = u.QUANTITY(); + + ds << a << c << l << m << t1 << t2 << q + << static_cast(u); + + return ds; +} + +QDataStream& operator>>(QDataStream &ds, SireUnits::Dimension::GeneralUnit &u) +{ + qint8 a, c, l, m, t1, t2, q; + + ds >> a >> c >> l >> m >> t1 >> t2 >> q + >> static_cast(u); + + u.Angle = a; + u.Charge = c; + u.Length = l; + u.Mass = m; + u.temperature = t1; + u.Time = t2; + u.Quantity = q; + + return ds; +} + namespace SireUnits { namespace Dimension @@ -119,7 +153,7 @@ void GeneralUnit::assertCompatible(const GeneralUnit &other) const throw "Unit conversion error!!!"; } } - + QString GeneralUnit::toString() const { return SireUnits::Dimension::getUnitString(value(), Mass, Length, @@ -140,9 +174,9 @@ double GeneralUnit::to(const TempBase &other) const GeneralUnit general_temp; general_temp.temperature = 1; general_temp.setScale(other); - + this->assertCompatible(general_temp); - + return other.convertFromInternal(value()) / other.convertFromInternal(); } @@ -184,14 +218,14 @@ int GeneralUnit::ANGLE() const GeneralUnit& GeneralUnit::operator=(const GeneralUnit &other) { setScale(other.value()); - + Mass = other.MASS(); Length = other.LENGTH(); Time = other.TIME(); Charge = other.CHARGE(); temperature = other.TEMPERATURE(); Quantity = other.QUANTITY(); - Angle = other.ANGLE(); + Angle = other.ANGLE(); return *this; } @@ -253,7 +287,7 @@ GeneralUnit GeneralUnit::operator*=(const GeneralUnit &other) temperature += other.temperature; Quantity += other.Quantity; Angle += other.Angle; - + return *this; } @@ -267,7 +301,7 @@ GeneralUnit GeneralUnit::operator/=(const GeneralUnit &other) temperature -= other.temperature; Quantity -= other.Quantity; Angle -= other.Angle; - + return *this; } @@ -340,9 +374,9 @@ GeneralUnit GeneralUnit::operator/(int val) const GeneralUnit GeneralUnit::invert() const { GeneralUnit ret; - + ret.setScale( 1.0 / value() ); - + ret.Mass = -Mass; ret.Length = -Length; ret.Time = -Time; @@ -350,7 +384,7 @@ GeneralUnit GeneralUnit::invert() const ret.temperature = -temperature; ret.Quantity = -Quantity; ret.Angle = -Angle; - + return ret; } @@ -366,9 +400,13 @@ PropertyPtr GeneralUnit::toProperty() const } else { + qDebug() << QObject::tr( + "Tell the programmers that they need to add in automatic " + "wrapping of units of type '%1'").arg(this->toString()); + throw SireError::incomplete_code( QObject::tr( "Tell the programmers that they need to add in automatic " - "wrapping of units of type '%s'").arg(this->toString()), + "wrapping of units of type '%1'").arg(this->toString()), CODELOC ); return PropertyPtr(); } diff --git a/wrapper/Units/generalunit.h b/wrapper/Units/generalunit.h index ac3d0ca30..6f5194aa8 100644 --- a/wrapper/Units/generalunit.h +++ b/wrapper/Units/generalunit.h @@ -19,6 +19,13 @@ SIRE_BEGIN_HEADER namespace bp = boost::python; #endif //SIRE_SKIP_INLINE_FUNCTIONS +namespace SireUnits{ namespace Dimension { +class GeneralUnit; +}} + +SIREUNITS_EXPORT QDataStream& operator<<(QDataStream&, const SireUnits::Dimension::GeneralUnit&); +SIREUNITS_EXPORT QDataStream& operator>>(QDataStream&, SireUnits::Dimension::GeneralUnit&); + namespace SireUnits { @@ -36,6 +43,10 @@ void registerTypeName(const GeneralUnit &unit, const char *typnam); class GeneralUnit : public Unit { + +friend QDataStream& ::operator<<(QDataStream&, const GeneralUnit&); +friend QDataStream& ::operator>>(QDataStream&, GeneralUnit&); + public: GeneralUnit(); @@ -51,7 +62,7 @@ class GeneralUnit : public Unit Angle = D::ANGLE(); detail::registerTypeName(*this, D::typeName()); } - + GeneralUnit(const GeneralUnit &other); ~GeneralUnit(); @@ -68,46 +79,46 @@ class GeneralUnit : public Unit int ANGLE() const; GeneralUnit& operator=(const GeneralUnit &other); - + bool operator==(const GeneralUnit &other) const; - + bool operator!=(const GeneralUnit &other) const; - + GeneralUnit operator-() const; - + GeneralUnit& operator+=(const GeneralUnit &other); - + GeneralUnit& operator-=(const GeneralUnit &other); - + GeneralUnit operator+(const GeneralUnit &other) const; - + GeneralUnit operator-(const GeneralUnit &other) const; GeneralUnit operator*=(const GeneralUnit &other); GeneralUnit operator/=(const GeneralUnit &other); - + GeneralUnit operator*(const GeneralUnit &other) const; - + GeneralUnit operator/(const GeneralUnit &other) const; - + GeneralUnit& operator*=(double val); GeneralUnit& operator/=(double val); - + GeneralUnit& operator*=(int val); GeneralUnit& operator/=(int val); - + GeneralUnit operator*(double val) const; GeneralUnit operator/(double val) const; - + GeneralUnit operator*(int val) const; GeneralUnit operator/(int val) const; - + GeneralUnit invert() const; - + double to(const TempBase &other) const; double to(const GeneralUnit &other) const; - + QString toString() const; SireBase::PropertyPtr toProperty() const; @@ -184,16 +195,16 @@ struct from_general_unit static void* convertible(PyObject* obj_ptr) { bp::object obj( bp::handle<>(bp::borrowed(obj_ptr)) ); - - bp::extract x(obj); - + + bp::extract x(obj); + //is this a GeneralUnit? if ( x.check() ) { //it is ;-) Get a reference to it and make sure //that it is of the right dimension const Dimension::GeneralUnit &gen_unit = x(); - + if ( gen_unit.MASS() == D::MASS() and gen_unit.LENGTH() == D::LENGTH() and gen_unit.TIME() == D::TIME() and @@ -206,7 +217,7 @@ struct from_general_unit return obj_ptr; } } - + //could not recognise the type or the dimension was wrong return 0; } @@ -217,16 +228,16 @@ struct from_general_unit boost::python::converter::rvalue_from_python_stage1_data* data) { bp::object obj( bp::handle<>(bp::borrowed(obj_ptr)) ); - - bp::extract x(obj); - + + bp::extract x(obj); + //is this a GeneralUnit? if ( x.check() ) { //it is ;-) Get a reference to it and make sure //that it is of the right dimension const Dimension::GeneralUnit &gen_unit = x(); - + if ( gen_unit.MASS() == D::MASS() and gen_unit.LENGTH() == D::LENGTH() and gen_unit.TIME() == D::TIME() and @@ -241,12 +252,12 @@ struct from_general_unit //create the T container new (storage) D( gen_unit.scaleFactor() ); - + data->convertible = storage; } } } -}; +}; template struct to_general_unit @@ -262,7 +273,7 @@ void register_dimension() { bp::to_python_converter< D, to_general_unit >(); - bp::converter::registry::push_back( + bp::converter::registry::push_back( &from_general_unit::convertible, &from_general_unit::construct, bp::type_id() ); diff --git a/wrapper/Vol/AABox.pypp.cpp b/wrapper/Vol/AABox.pypp.cpp index 575730619..f1d833c72 100644 --- a/wrapper/Vol/AABox.pypp.cpp +++ b/wrapper/Vol/AABox.pypp.cpp @@ -25,6 +25,8 @@ SireVol::AABox __copy__(const SireVol::AABox &other){ return SireVol::AABox(othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_AABox_class(){ { //::SireVol::AABox @@ -47,6 +49,7 @@ void register_AABox_class(){ "add" , add_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Add another AABox to this one - this forms the union of both of the\nboxes." ); } @@ -59,6 +62,7 @@ void register_AABox_class(){ "add" , add_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Add a point to this box" ); } @@ -71,6 +75,7 @@ void register_AABox_class(){ "add" , add_function_value , ( bp::arg("points") ) + , bp::release_gil_policy() , "Add lots of points to this box" ); } @@ -82,6 +87,7 @@ void register_AABox_class(){ AABox_exposer.def( "boundingSphere" , boundingSphere_function_value + , bp::release_gil_policy() , "Return the sphere that just contains this AABox" ); } @@ -106,6 +112,7 @@ void register_AABox_class(){ "contains" , contains_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether or not this box contains other" ); } @@ -118,6 +125,7 @@ void register_AABox_class(){ "contains" , contains_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return whether or not this box contains the point point" ); } @@ -130,6 +138,7 @@ void register_AABox_class(){ "from" , from_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return an AABox constructed to contain the coordinates of point" ); } @@ -142,6 +151,7 @@ void register_AABox_class(){ "from" , from_function_value , ( bp::arg("coordgroup") ) + , bp::release_gil_policy() , "Return an AABox constructed to contain the coordinates in coordinates" ); } @@ -154,6 +164,7 @@ void register_AABox_class(){ "from" , from_function_value , ( bp::arg("cgarray") ) + , bp::release_gil_policy() , "Return an AABox constructed to contain all of the CoordGroups in cgarray" ); } @@ -166,6 +177,7 @@ void register_AABox_class(){ "from" , from_function_value , ( bp::arg("cgarrays") ) + , bp::release_gil_policy() , "Return an AABox constructed to contain all of the CoordGroups in the\narrays in cgarrays" ); } @@ -178,6 +190,7 @@ void register_AABox_class(){ "from" , from_function_value , ( bp::arg("coords") ) + , bp::release_gil_policy() , "Return an AABox constructed to contain the coordinates in coordinates" ); } @@ -190,6 +203,7 @@ void register_AABox_class(){ "from" , from_function_value , ( bp::arg("mincoords"), bp::arg("maxcoords") ) + , bp::release_gil_policy() , "Construct a new AABox from the passed minimum and maximum coordinates" ); } @@ -214,6 +228,7 @@ void register_AABox_class(){ "intersects" , intersects_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether this box intersects with box" ); } @@ -225,6 +240,7 @@ void register_AABox_class(){ AABox_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return if the AABox is empty" ); } @@ -236,6 +252,7 @@ void register_AABox_class(){ AABox_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "Return if the AABox is null" ); } @@ -247,6 +264,7 @@ void register_AABox_class(){ AABox_exposer.def( "maxCoords" , maxCoords_function_value + , bp::release_gil_policy() , "" ); } @@ -258,6 +276,7 @@ void register_AABox_class(){ AABox_exposer.def( "minCoords" , minCoords_function_value + , bp::release_gil_policy() , "" ); } @@ -287,6 +306,7 @@ void register_AABox_class(){ AABox_exposer.def( "radius" , radius_function_value + , bp::release_gil_policy() , "" ); } @@ -299,6 +319,7 @@ void register_AABox_class(){ "recalculate" , recalculate_function_value , ( bp::arg("coordgroup") ) + , bp::release_gil_policy() , "Recalculate the AABox so that it completely encloses the CoordGroup coordgroup" ); } @@ -311,6 +332,7 @@ void register_AABox_class(){ "recalculate" , recalculate_function_value , ( bp::arg("cgarray") ) + , bp::release_gil_policy() , "Recalculate the AABox so that it completely encloses the CoordGroups\nin the array cgarray" ); } @@ -323,6 +345,7 @@ void register_AABox_class(){ "recalculate" , recalculate_function_value , ( bp::arg("cgarrays") ) + , bp::release_gil_policy() , "Recalculate the AABox so that it completely encloses the CoordGroups\nin the arrays cgarrays" ); } @@ -335,6 +358,7 @@ void register_AABox_class(){ "recalculate" , recalculate_function_value , ( bp::arg("coordinates") ) + , bp::release_gil_policy() , "Recalculate the AABox so that it completely encloses the coordinates" ); } @@ -346,6 +370,7 @@ void register_AABox_class(){ AABox_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this AABox" ); } @@ -358,6 +383,7 @@ void register_AABox_class(){ "translate" , translate_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Translate this AABox by delta" ); } @@ -369,6 +395,7 @@ void register_AABox_class(){ AABox_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -380,6 +407,7 @@ void register_AABox_class(){ AABox_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } @@ -392,6 +420,7 @@ void register_AABox_class(){ "withinDistance" , withinDistance_function_value , ( bp::arg("dist"), bp::arg("box") ) + , bp::release_gil_policy() , "Return whether or not this box is within dist of box box.\n(using infinite cartesian axes)" ); } diff --git a/wrapper/Vol/BoxPatching.pypp.cpp b/wrapper/Vol/BoxPatching.pypp.cpp index 482c6e4ce..f85816923 100644 --- a/wrapper/Vol/BoxPatching.pypp.cpp +++ b/wrapper/Vol/BoxPatching.pypp.cpp @@ -27,6 +27,8 @@ SireVol::BoxPatching __copy__(const SireVol::BoxPatching &other){ return SireVol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_BoxPatching_class(){ { //::SireVol::BoxPatching @@ -46,6 +48,7 @@ void register_BoxPatching_class(){ BoxPatching_exposer.def( "center" , center_function_value + , bp::release_gil_policy() , "Return the center of the patching grid" ); } @@ -57,6 +60,7 @@ void register_BoxPatching_class(){ BoxPatching_exposer.def( "nPatches" , nPatches_function_value + , bp::release_gil_policy() , "Return the number of patches" ); } @@ -84,6 +88,7 @@ void register_BoxPatching_class(){ "patchBox" , patchBox_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the AABox that completely encloses the ith patch box" ); } @@ -96,6 +101,7 @@ void register_BoxPatching_class(){ "patchBox" , patchBox_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the AABox of that completely encloses the patch that contains the\npoint point" ); } @@ -107,6 +113,7 @@ void register_BoxPatching_class(){ BoxPatching_exposer.def( "patchDimension" , patchDimension_function_value + , bp::release_gil_policy() , "Return the dimensions of each path (the lengths of each side of the box)" ); } @@ -119,6 +126,7 @@ void register_BoxPatching_class(){ "patchIndex" , patchIndex_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the index of the patch that contains the passed point" ); } @@ -131,6 +139,7 @@ void register_BoxPatching_class(){ "patchIndexAndCenter" , patchIndexAndCenter_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the index of the patch that contains the passed point, together\nwith the point mapped into that patch (if the space is periodic)" ); } @@ -142,6 +151,7 @@ void register_BoxPatching_class(){ BoxPatching_exposer.def( "patchSize" , patchSize_function_value + , bp::release_gil_policy() , "Return the patch size used to control the rough size of the patches" ); } @@ -154,6 +164,7 @@ void register_BoxPatching_class(){ "repatch" , repatch_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "Recreate the patching for the passed space" ); } @@ -165,6 +176,7 @@ void register_BoxPatching_class(){ BoxPatching_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the patching" ); } @@ -176,6 +188,7 @@ void register_BoxPatching_class(){ BoxPatching_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/CMakeAutogenFile.txt b/wrapper/Vol/CMakeAutogenFile.txt index 02c76dd04..b9eab83a6 100644 --- a/wrapper/Vol/CMakeAutogenFile.txt +++ b/wrapper/Vol/CMakeAutogenFile.txt @@ -1,25 +1,25 @@ # WARNING - AUTOGENERATED FILE - CONTENTS WILL BE OVERWRITTEN! set ( PYPP_SOURCES - CoordGroupEditor.pypp.cpp + AABox.pypp.cpp BoxPatching.pypp.cpp - TriclinicBox.pypp.cpp - Patching.pypp.cpp - Space.pypp.cpp - CoordGroupBase.pypp.cpp - NullPatching.pypp.cpp + Cartesian.pypp.cpp CombineSpaces.pypp.cpp + CombinedSpace.pypp.cpp + CoordGroup.pypp.cpp + CoordGroupArray.pypp.cpp + CoordGroupArrayArray.pypp.cpp + CoordGroupBase.pypp.cpp + CoordGroupEditor.pypp.cpp Grid.pypp.cpp GridIndex.pypp.cpp - CoordGroupArrayArray.pypp.cpp - RegularGrid.pypp.cpp - CoordGroup.pypp.cpp - CombinedSpace.pypp.cpp - Cartesian.pypp.cpp - NullGrid.pypp.cpp GridInfo.pypp.cpp + NullGrid.pypp.cpp + NullPatching.pypp.cpp + Patching.pypp.cpp PeriodicBox.pypp.cpp - AABox.pypp.cpp - CoordGroupArray.pypp.cpp + RegularGrid.pypp.cpp + Space.pypp.cpp + TriclinicBox.pypp.cpp SireVol_containers.cpp SireVol_properties.cpp SireVol_registrars.cpp diff --git a/wrapper/Vol/CMakeLists.txt b/wrapper/Vol/CMakeLists.txt index 3903f1f02..c9abdcb20 100644 --- a/wrapper/Vol/CMakeLists.txt +++ b/wrapper/Vol/CMakeLists.txt @@ -23,17 +23,17 @@ include(CMakeAutogenFile.txt) set ( WRAPVOL_SOURCES _Vol.main.cpp - + ${PYPP_SOURCES} #SireVol_containers.cpp - + ) # Create the library that holds all of the class wrappers add_library (Vol ${WRAPVOL_SOURCES}) -set_target_properties (Vol +set_target_properties (Vol PROPERTIES VERSION ${SIRE_VERSION} SOVERSION ${SIRE_VERSION_MAJOR} @@ -41,18 +41,18 @@ set_target_properties (Vol PREFIX "_" SUFFIX ${PYTHON_MODULE_EXTENSION} ) - + target_link_libraries (Vol SirePython SIRE_SireVol - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ) include( LimitSirePythonExportSymbols ) export_this_symbol_only( "init_Vol" "_init_Vol" ) # installation -set( INSTALLDIR ${SIRE_PYTHON}/Sire/Vol ) +set( INSTALLDIR ${SIRE_PYTHON}/sire/legacy/Vol ) install( TARGETS Vol LIBRARY DESTINATION ${INSTALLDIR} @@ -61,6 +61,6 @@ install( TARGETS Vol ) install( FILES __init__.py - DESTINATION ${INSTALLDIR} + DESTINATION ${INSTALLDIR} ) diff --git a/wrapper/Vol/Cartesian.pypp.cpp b/wrapper/Vol/Cartesian.pypp.cpp index 1ef43f91b..7831f1292 100644 --- a/wrapper/Vol/Cartesian.pypp.cpp +++ b/wrapper/Vol/Cartesian.pypp.cpp @@ -35,6 +35,8 @@ SireVol::Cartesian __copy__(const SireVol::Cartesian &other){ return SireVol::Ca #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Cartesian_class(){ { //::SireVol::Cartesian @@ -51,6 +53,7 @@ void register_Cartesian_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("aabox0"), bp::arg("aabox1") ) + , bp::release_gil_policy() , "Return whether or not two groups enclosed by the AABoxes aabox0\nand aabox1 are definitely beyond the cutoff distance" ); } @@ -63,6 +66,7 @@ void register_Cartesian_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return whether or not these two groups are definitely beyond the cutoff distance." ); } @@ -75,6 +79,7 @@ void register_Cartesian_class(){ "calcAngle" , calcAngle_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2") ) + , bp::release_gil_policy() , "Calculate the angle between the passed three points. This should return\nthe acute angle between the points, which should lie between 0 and 180 degrees" ); } @@ -87,6 +92,7 @@ void register_Cartesian_class(){ "calcDihedral" , calcDihedral_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3") ) + , bp::release_gil_policy() , "Calculate the torsion angle between the passed four points. This should\nreturn the torsion angle measured clockwise when looking down the\ntorsion from point0-point1-point2-point3. This will lie between 0 and 360\ndegrees" ); } @@ -99,6 +105,7 @@ void register_Cartesian_class(){ "calcDist" , calcDist_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance between two points" ); } @@ -111,6 +118,7 @@ void register_Cartesian_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all points in\nthe group group. Return the shortest distance between points." ); } @@ -123,6 +131,7 @@ void register_Cartesian_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\npoints of the two CoordGroups. Return the shortest distance between the two\nCoordGroups." ); } @@ -135,6 +144,7 @@ void register_Cartesian_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\npoints of the passed CoordGroup and point. Returns the shortest distance." ); } @@ -147,6 +157,7 @@ void register_Cartesian_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance squared between two points" ); } @@ -159,6 +170,7 @@ void register_Cartesian_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all points in\nthe group group. Return the shortest distance between points." ); } @@ -171,6 +183,7 @@ void register_Cartesian_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances squared between all of the\npoints of the passed CoordGroup and point. Returns the shortest distance." ); } @@ -183,6 +196,7 @@ void register_Cartesian_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all of the\npoints of the two CoordGroups. Return the shortest distance between the\ntwo CoordGroups." ); } @@ -195,6 +209,7 @@ void register_Cartesian_class(){ "calcDistVector" , calcDistVector_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance vector between two points" ); } @@ -207,6 +222,7 @@ void register_Cartesian_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat with all of the interpoint distance vectors\nbetween all points within the CoordGroup. This is not a symmetrical matrix,\nas the direction from point A to point B is the negative of the\ndirection from point B to point A. This returns the shortest distance\nbetween two points in the group (that is not the self-self distance)" ); } @@ -219,6 +235,7 @@ void register_Cartesian_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points of the two CoordGroups\ngroup1 and group2 - the returned matrix has the vectors pointing\nfrom each point in group1 to each point in group2. This returns\nthe shortest distance between two points in the group" ); } @@ -231,6 +248,7 @@ void register_Cartesian_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points of the passed\nCoordGroup with point - the returned matrix has the vectors pointing\nfrom the point, to each point in group. This returns the shortest distance." ); } @@ -243,6 +261,7 @@ void register_Cartesian_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all points in\nthe group group. Return the smallest distance between points." ); } @@ -255,6 +274,7 @@ void register_Cartesian_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all of the\npoints of the two CoordGroups. Return the shortest distance between\nthe two CoordGroups." ); } @@ -267,6 +287,7 @@ void register_Cartesian_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all points in\nthe group group. Return the smallest distance between points." ); } @@ -279,6 +300,7 @@ void register_Cartesian_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all of the\npoints of the two CoordGroups. Return the shortest distance between\nthe two CoordGroups." ); } @@ -291,6 +313,7 @@ void register_Cartesian_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at the origin" ); } @@ -303,6 +326,7 @@ void register_Cartesian_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at center" ); } @@ -315,6 +339,7 @@ void register_Cartesian_class(){ "getCopiesWithin" , getCopiesWithin_function_value , ( bp::arg("group"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return a list of copies of CoordGroup group that are within\ndistance of the CoordGroup center, translating group so that\nit has the right coordinates to be around center. As this is not\na periodic space, this will merely return a copy of group if\nit is within the specified distance." ); } @@ -327,6 +352,7 @@ void register_Cartesian_class(){ "getImagesWithin" , getImagesWithin_function_value , ( bp::arg("point"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return all periodic images of point with respect to center within\ndist distance of center" ); } @@ -339,6 +365,7 @@ void register_Cartesian_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("group"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the minimum image copy of group with respect to center.\nIn this case, as this is not a periodic space, this just returns\ngroup" ); } @@ -363,6 +390,7 @@ void register_Cartesian_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("aabox"), bp::arg("center") ) + , bp::release_gil_policy() , "A cartesian space is not periodic, so this just returns the input aabox" ); } @@ -375,6 +403,7 @@ void register_Cartesian_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("point"), bp::arg("center") ) + , bp::release_gil_policy() , "A cartesian space is not periodic, so this just returns the input point" ); } @@ -387,6 +416,7 @@ void register_Cartesian_class(){ "getRandomPoint" , getRandomPoint_function_value , ( bp::arg("center"), bp::arg("generator") ) + , bp::release_gil_policy() , "Return a random point in this space - this can be truly anywhere\n(well, it is limited to within -10^20 and 10^20 angstroms)\n" ); } @@ -398,6 +428,7 @@ void register_Cartesian_class(){ Cartesian_exposer.def( "isCartesian" , isCartesian_function_value + , bp::release_gil_policy() , "A Cartesian space is cartesian" ); } @@ -409,6 +440,7 @@ void register_Cartesian_class(){ Cartesian_exposer.def( "isPeriodic" , isPeriodic_function_value + , bp::release_gil_policy() , "A Cartesian space is not periodic" ); } @@ -421,6 +453,7 @@ void register_Cartesian_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return the minimum distance between the points in group0 and group1." ); } @@ -433,6 +466,7 @@ void register_Cartesian_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group") ) + , bp::release_gil_policy() , "Return the minimum distance between points within the group group." ); } @@ -445,6 +479,7 @@ void register_Cartesian_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("box0"), bp::arg("box1") ) + , bp::release_gil_policy() , "Return the minimum distance between the two passed boxes" ); } @@ -457,6 +492,7 @@ void register_Cartesian_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("p"), bp::arg("box") ) + , bp::release_gil_policy() , "Return the minimum distance between a point and a box" ); } @@ -484,6 +520,7 @@ void register_Cartesian_class(){ "setVolume" , setVolume_function_value , ( bp::arg("volume") ) + , bp::release_gil_policy() , "Throw an exception as an infinite space doesnt have a volume" ); } @@ -495,6 +532,7 @@ void register_Cartesian_class(){ Cartesian_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this space" ); } @@ -506,6 +544,7 @@ void register_Cartesian_class(){ Cartesian_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -517,6 +556,7 @@ void register_Cartesian_class(){ Cartesian_exposer.def( "volume" , volume_function_value + , bp::release_gil_policy() , "Throw an exception as an infinite space doesnt have a volume" ); } diff --git a/wrapper/Vol/CombineSpaces.pypp.cpp b/wrapper/Vol/CombineSpaces.pypp.cpp index 7ef163342..8bb9e539c 100644 --- a/wrapper/Vol/CombineSpaces.pypp.cpp +++ b/wrapper/Vol/CombineSpaces.pypp.cpp @@ -25,6 +25,8 @@ SireVol::CombineSpaces __copy__(const SireVol::CombineSpaces &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CombineSpaces_class(){ @@ -63,6 +65,7 @@ void register_CombineSpaces_class(){ CombineSpaces_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -75,6 +78,7 @@ void register_CombineSpaces_class(){ "updateFrom" , updateFrom_function_value , ( bp::arg("properties") ) + , bp::release_gil_policy() , "Update this combined space by extracting the required space\nproperties from properties\nThrow: SireBase::missing_property\nThrow: SireError::invalid_cast\nThrow: SireError::incompatible_error\n" ); } diff --git a/wrapper/Vol/CombinedSpace.pypp.cpp b/wrapper/Vol/CombinedSpace.pypp.cpp index d39fc9186..ed9396c6d 100644 --- a/wrapper/Vol/CombinedSpace.pypp.cpp +++ b/wrapper/Vol/CombinedSpace.pypp.cpp @@ -34,6 +34,8 @@ SireVol::CombinedSpace __copy__(const SireVol::CombinedSpace &other){ return Sir #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CombinedSpace_class(){ @@ -56,7 +58,7 @@ void register_CombinedSpace_class(){ "at" , at_function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "Return the ith space that makes up this combined space\nThrow: SireError::invalid_index\n" ); } @@ -69,6 +71,7 @@ void register_CombinedSpace_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return whether or not these two groups are definitely beyond the cutoff distance." ); } @@ -81,6 +84,7 @@ void register_CombinedSpace_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("aabox0"), bp::arg("aabox1") ) + , bp::release_gil_policy() , "Return whether or not two groups enclosed by the AABoxes aabox0\nand aabox1 are definitely beyond the cutoff distance" ); } @@ -93,6 +97,7 @@ void register_CombinedSpace_class(){ "calcAngle" , calcAngle_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2") ) + , bp::release_gil_policy() , "Calculate the angle between the passed three points. This should return\nthe acute angle between the points, which should lie between 0 and 180 degrees" ); } @@ -105,6 +110,7 @@ void register_CombinedSpace_class(){ "calcDihedral" , calcDihedral_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3") ) + , bp::release_gil_policy() , "Calculate the torsion angle between the passed four points. This should\nreturn the torsion angle measured clockwise when looking down the\ntorsion from point0-point1-point2-point3. This will lie between 0 and 360\ndegrees" ); } @@ -117,6 +123,7 @@ void register_CombinedSpace_class(){ "calcDist" , calcDist_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance between two points" ); } @@ -129,6 +136,7 @@ void register_CombinedSpace_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all points in\nthe group group. Return the shortest distance between points." ); } @@ -141,6 +149,7 @@ void register_CombinedSpace_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\npoints of the two CoordGroups. Return the shortest distance between the two\nCoordGroups." ); } @@ -153,6 +162,7 @@ void register_CombinedSpace_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\npoints of the two CoordGroups. Return the shortest distance between the two\nCoordGroups." ); } @@ -165,6 +175,7 @@ void register_CombinedSpace_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance squared between two points" ); } @@ -177,6 +188,7 @@ void register_CombinedSpace_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all points in\nthe group group. Return the shortest distance between points." ); } @@ -189,6 +201,7 @@ void register_CombinedSpace_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all of the\npoints of the two CoordGroups. Return the shortest distance between the\ntwo CoordGroups." ); } @@ -201,6 +214,7 @@ void register_CombinedSpace_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all of the\npoints of the two CoordGroups. Return the shortest distance between the\ntwo CoordGroups." ); } @@ -213,6 +227,7 @@ void register_CombinedSpace_class(){ "calcDistVector" , calcDistVector_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance vector between two points" ); } @@ -225,6 +240,7 @@ void register_CombinedSpace_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat with all of the interpoint distance vectors\nbetween all points within the CoordGroup. This is not a symmetrical matrix,\nas the direction from point A to point B is the negative of the\ndirection from point B to point A. This returns the shortest distance\nbetween two points in the group (that is not the self-self distance)" ); } @@ -237,6 +253,7 @@ void register_CombinedSpace_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points of the two CoordGroups\ngroup1 and group2 - the returned matrix has the vectors pointing\nfrom each point in group1 to each point in group2. This returns\nthe shortest distance between two points in the group" ); } @@ -249,6 +266,7 @@ void register_CombinedSpace_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points of the two CoordGroups\ngroup1 and group2 - the returned matrix has the vectors pointing\nfrom each point in group1 to each point in group2. This returns\nthe shortest distance between two points in the group" ); } @@ -261,6 +279,7 @@ void register_CombinedSpace_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all points in\nthe group group. Return the smallest distance between points." ); } @@ -273,6 +292,7 @@ void register_CombinedSpace_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all of the\npoints of the two CoordGroups. Return the shortest distance between\nthe two CoordGroups." ); } @@ -285,6 +305,7 @@ void register_CombinedSpace_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all points in\nthe group group. Return the smallest distance between points." ); } @@ -297,6 +318,7 @@ void register_CombinedSpace_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all of the\npoints of the two CoordGroups. Return the shortest distance between\nthe two CoordGroups." ); } @@ -308,6 +330,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of spaces in this combined space" ); } @@ -320,6 +343,7 @@ void register_CombinedSpace_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at the origin" ); } @@ -332,6 +356,7 @@ void register_CombinedSpace_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at center" ); } @@ -344,6 +369,7 @@ void register_CombinedSpace_class(){ "getCopiesWithin" , getCopiesWithin_function_value , ( bp::arg("group"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return a list of copies of CoordGroup group that are within\ndistance of the CoordGroup center, translating group so that\nit has the right coordinates to be around center. As this is not\na periodic space, this will merely return a copy of group if\nit is within the specified distance." ); } @@ -356,6 +382,7 @@ void register_CombinedSpace_class(){ "getImagesWithin" , getImagesWithin_function_value , ( bp::arg("point"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "" ); } @@ -368,6 +395,7 @@ void register_CombinedSpace_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("group"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the minimum image copy of group with respect to center.\nIn this case, as this is not a periodic space, this just returns\ngroup" ); } @@ -392,6 +420,7 @@ void register_CombinedSpace_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("aabox"), bp::arg("center") ) + , bp::release_gil_policy() , "A cartesian space is not periodic, so this just returns the input aabox" ); } @@ -404,6 +433,7 @@ void register_CombinedSpace_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("point"), bp::arg("center") ) + , bp::release_gil_policy() , "A cartesian space is not periodic, so this just returns the input point" ); } @@ -416,6 +446,7 @@ void register_CombinedSpace_class(){ "getRandomPoint" , getRandomPoint_function_value , ( bp::arg("center"), bp::arg("generator") ) + , bp::release_gil_policy() , "Return a random point within the spaces used in this combined space" ); } @@ -427,6 +458,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "isCartesian" , isCartesian_function_value + , bp::release_gil_policy() , "A CombinedSpace space is only cartesian if all of the\nsub-spaces are cartesian" ); } @@ -438,6 +470,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this is empty" ); } @@ -449,6 +482,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "isPeriodic" , isPeriodic_function_value + , bp::release_gil_policy() , "A CombinedSpace is only periodic of all of the contained\nspaces are periodic" ); } @@ -461,6 +495,7 @@ void register_CombinedSpace_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("box0"), bp::arg("box1") ) + , bp::release_gil_policy() , "Return the minimum distance between the boxes box0 and box1." ); } @@ -473,6 +508,7 @@ void register_CombinedSpace_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return the minimum distance between the points in group0 and group1." ); } @@ -485,6 +521,7 @@ void register_CombinedSpace_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group") ) + , bp::release_gil_policy() , "Return the minimum distance between points within the group group." ); } @@ -496,6 +533,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "nSpaces" , nSpaces_function_value + , bp::release_gil_policy() , "Return the number of spaces in this combined space" ); } @@ -523,7 +561,7 @@ void register_CombinedSpace_class(){ "__getitem__" , __getitem___function_value , ( bp::arg("i") ) - , bp::return_value_policy() + , bp::return_value_policy() , "" ); } @@ -536,6 +574,7 @@ void register_CombinedSpace_class(){ "setVolume" , setVolume_function_value , ( bp::arg("volume") ) + , bp::release_gil_policy() , "Try to set the volume of this combined space - this will only\nwork if we are really just one space" ); } @@ -547,6 +586,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of spaces in this combined space" ); } @@ -558,6 +598,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this space" ); } @@ -569,6 +610,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -580,6 +622,7 @@ void register_CombinedSpace_class(){ CombinedSpace_exposer.def( "volume" , volume_function_value + , bp::release_gil_policy() , "Returned the combined (summed) volume of all of the spaces" ); } diff --git a/wrapper/Vol/CoordGroup.pypp.cpp b/wrapper/Vol/CoordGroup.pypp.cpp index 9677db075..7c6c9843f 100644 --- a/wrapper/Vol/CoordGroup.pypp.cpp +++ b/wrapper/Vol/CoordGroup.pypp.cpp @@ -37,6 +37,8 @@ SireVol::CoordGroup __copy__(const SireVol::CoordGroup &other){ return SireVol:: #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CoordGroup_class(){ @@ -60,6 +62,7 @@ void register_CoordGroup_class(){ CoordGroup_exposer.def( "edit" , edit_function_value + , bp::release_gil_policy() , "Return an editor that can be used to edit the\ncoordinates in this group" ); } @@ -97,6 +100,7 @@ void register_CoordGroup_class(){ CoordGroup_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -108,6 +112,7 @@ void register_CoordGroup_class(){ CoordGroup_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/CoordGroupArray.pypp.cpp b/wrapper/Vol/CoordGroupArray.pypp.cpp index 87ab4fc98..c1bd8234f 100644 --- a/wrapper/Vol/CoordGroupArray.pypp.cpp +++ b/wrapper/Vol/CoordGroupArray.pypp.cpp @@ -37,6 +37,8 @@ SireVol::CoordGroupArray __copy__(const SireVol::CoordGroupArray &other){ return #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CoordGroupArray_class(){ @@ -58,6 +60,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "aaBox" , aaBox_function_value + , bp::release_gil_policy() , "Return an AABox that complete encompasses all of the CoordGroups\nin this array" ); } @@ -70,6 +73,7 @@ void register_CoordGroupArray_class(){ "append" , append_function_value , ( bp::arg("cgroup") ) + , bp::release_gil_policy() , "Append the passed CoordGroup onto the end of this array" ); } @@ -82,6 +86,7 @@ void register_CoordGroupArray_class(){ "append" , append_function_value , ( bp::arg("cgroups") ) + , bp::release_gil_policy() , "Append the passed CoordGroups onto the end of this array" ); } @@ -94,6 +99,7 @@ void register_CoordGroupArray_class(){ "assertValidCoordGroup" , assertValidCoordGroup_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that the index i points to a valid CoordGroup\nThrow: SireError::invalid_index\n" ); } @@ -106,6 +112,7 @@ void register_CoordGroupArray_class(){ "assertValidCoordinate" , assertValidCoordinate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that the index i points a valid coordinate\nThrow: SireError::invalid_index\n" ); } @@ -118,6 +125,7 @@ void register_CoordGroupArray_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that the index i points to a valid CoordGroup\nThrow: SireError::invalid_index\n" ); } @@ -143,6 +151,7 @@ void register_CoordGroupArray_class(){ "changeFrame" , changeFrame_function_value , ( bp::arg("from_frame"), bp::arg("to_frame") ) + , bp::release_gil_policy() , "Change all of the coordinates in this array from the\ncoordinate frame from_frame to the coordinate frame to_frame" ); } @@ -155,6 +164,7 @@ void register_CoordGroupArray_class(){ "changeFrame" , changeFrame_function_value , ( bp::arg("i"), bp::arg("from_frame"), bp::arg("to_frame") ) + , bp::release_gil_policy() , "Change all of the coordinates in the ith CoordGroup from\nthe coordinate frame from_frame to the coordinate frame\nto_frame\nThrow: SireError::invalid_index\n" ); } @@ -166,6 +176,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of CoordGroups in this array" ); } @@ -177,6 +188,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether or not this array is empty" ); } @@ -189,6 +201,7 @@ void register_CoordGroupArray_class(){ "mapInto" , mapInto_function_value , ( bp::arg("axes") ) + , bp::release_gil_policy() , "Map all of the coordinates in this array into the coordinate\nframe represented by axes" ); } @@ -201,6 +214,7 @@ void register_CoordGroupArray_class(){ "mapInto" , mapInto_function_value , ( bp::arg("i"), bp::arg("axes") ) + , bp::release_gil_policy() , "Map all of the coordinates of the CoordGroup at index i\ninto the coordinate frame represented by axes\nThrow: SireError::invalid_index\n" ); } @@ -212,6 +226,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "merge" , merge_function_value + , bp::release_gil_policy() , "Merge this array of CoordGroups back into a single CoordGroup" ); } @@ -223,6 +238,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "nCoordGroups" , nCoordGroups_function_value + , bp::release_gil_policy() , "Return the number of CoordGroups in this array" ); } @@ -234,6 +250,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "nCoords" , nCoords_function_value + , bp::release_gil_policy() , "Return the number of coordinates in this array" ); } @@ -274,6 +291,7 @@ void register_CoordGroupArray_class(){ "remove" , remove_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Remove the ith CoordGroup from the array" ); } @@ -286,6 +304,7 @@ void register_CoordGroupArray_class(){ "remove" , remove_function_value , ( bp::arg("i"), bp::arg("count") ) + , bp::release_gil_policy() , "Remove count CoordGroups from the array, starting with the ith CoordGroup" ); } @@ -298,6 +317,7 @@ void register_CoordGroupArray_class(){ "remove" , remove_function_value , ( bp::arg("idxs") ) + , bp::release_gil_policy() , "Remove the specified CoordGroups from the array" ); } @@ -310,6 +330,7 @@ void register_CoordGroupArray_class(){ "rotate" , rotate_function_value , ( bp::arg("quat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the coordinates in this array using the quaternion\nquat around the point point" ); } @@ -322,6 +343,7 @@ void register_CoordGroupArray_class(){ "rotate" , rotate_function_value , ( bp::arg("rotmat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of coordinates in this array using the matrix rotmat\nabout the point point" ); } @@ -334,6 +356,7 @@ void register_CoordGroupArray_class(){ "rotate" , rotate_function_value , ( bp::arg("i"), bp::arg("quat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the coordinates in the CoordGroup at index i using\nthe quaternion quat about the point point\nThrow: SireError::invalid_index\n" ); } @@ -346,6 +369,7 @@ void register_CoordGroupArray_class(){ "rotate" , rotate_function_value , ( bp::arg("i"), bp::arg("rotmat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the coordinates in the CoordGroup at index i using\nthe matrix rotmat about the point point\nThrow: SireError::invalid_index\n" ); } @@ -357,6 +381,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of CoordGroups in this array" ); } @@ -368,6 +393,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this array" ); } @@ -380,6 +406,7 @@ void register_CoordGroupArray_class(){ "transform" , transform_function_value , ( bp::arg("t") ) + , bp::release_gil_policy() , "Transform all of coordinates in this array using the transformation t" ); } @@ -392,6 +419,7 @@ void register_CoordGroupArray_class(){ "transform" , transform_function_value , ( bp::arg("i"), bp::arg("t") ) + , bp::release_gil_policy() , "Transform all of the coordinates in the CoordGroup at index i using\nthe transformation t\nThrow: SireError::invalid_index\n" ); } @@ -404,6 +432,7 @@ void register_CoordGroupArray_class(){ "translate" , translate_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Translate all of the coordinates in this array by delta" ); } @@ -416,6 +445,7 @@ void register_CoordGroupArray_class(){ "translate" , translate_function_value , ( bp::arg("i"), bp::arg("delta") ) + , bp::release_gil_policy() , "Translate all of the coordinates in the ith CoordGroup by delta" ); } @@ -427,6 +457,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -439,6 +470,7 @@ void register_CoordGroupArray_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("cgroup") ) + , bp::release_gil_policy() , "Update the CoordGroup at index i so that it is equal to cgroup. Note\nthat cgroup must contain the same number of coordinates as the existing\nCoordGroup at this index\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -451,6 +483,7 @@ void register_CoordGroupArray_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("coords") ) + , bp::release_gil_policy() , "Update the CoordGroup at index i so that it has coordinates coords\nThere must contain the same number of coordinates as the existing\nCoordGroup at this index\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -463,6 +496,7 @@ void register_CoordGroupArray_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("coords"), bp::arg("ncoords") ) + , bp::release_gil_policy() , "Update the CoordGroup at index i so that it has coordinates coords\n(there are ncoords coordinates in this array)\nThere must contain the same number of coordinates as the existing\nCoordGroup at this index\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -474,6 +508,7 @@ void register_CoordGroupArray_class(){ CoordGroupArray_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/CoordGroupArrayArray.pypp.cpp b/wrapper/Vol/CoordGroupArrayArray.pypp.cpp index 9d8b8643e..ff3c7c047 100644 --- a/wrapper/Vol/CoordGroupArrayArray.pypp.cpp +++ b/wrapper/Vol/CoordGroupArrayArray.pypp.cpp @@ -37,6 +37,8 @@ SireVol::CoordGroupArrayArray __copy__(const SireVol::CoordGroupArrayArray &othe #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CoordGroupArrayArray_class(){ @@ -59,6 +61,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "aaBox" , aaBox_function_value + , bp::release_gil_policy() , "Return an AABox that complete encompasses all of the CoordGroups\nin this array" ); } @@ -71,6 +74,7 @@ void register_CoordGroupArrayArray_class(){ "assertValidCoordGroup" , assertValidCoordGroup_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that i is a valid index for a CoordGroup\nThrow: SireError::invalid_index\n" ); } @@ -83,6 +87,7 @@ void register_CoordGroupArrayArray_class(){ "assertValidCoordGroup" , assertValidCoordGroup_function_value , ( bp::arg("i"), bp::arg("j") ) + , bp::release_gil_policy() , "Assert that there is a jth CoordGroup in the ith array\nThrow: SireError::invalid_index\n" ); } @@ -95,6 +100,7 @@ void register_CoordGroupArrayArray_class(){ "assertValidCoordGroupArray" , assertValidCoordGroupArray_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that i is a valid index for a CoordGroupArray\nThrow: SireError::invalid_index\n" ); } @@ -107,6 +113,7 @@ void register_CoordGroupArrayArray_class(){ "assertValidCoordinate" , assertValidCoordinate_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that i is a valid index for a coordinate\nThrow: SireError::invalid_index\n" ); } @@ -119,6 +126,7 @@ void register_CoordGroupArrayArray_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that i is a valid index for a CoordGroupArray\nThrow: SireError::invalid_index\n" ); } @@ -144,6 +152,7 @@ void register_CoordGroupArrayArray_class(){ "changeFrame" , changeFrame_function_value , ( bp::arg("from_frame"), bp::arg("to_frame") ) + , bp::release_gil_policy() , "Map all of the points in this array from the coordinate frame\nfrom_frame to the coordinate frame to_frame" ); } @@ -156,6 +165,7 @@ void register_CoordGroupArrayArray_class(){ "changeFrame" , changeFrame_function_value , ( bp::arg("i"), bp::arg("from_frame"), bp::arg("to_frame") ) + , bp::release_gil_policy() , "Map all of the points in this array from the coordinate frame\nfrom_frame to the coordinate frame to_frame\nThrow: SireError::invalid_index\n" ); } @@ -168,6 +178,7 @@ void register_CoordGroupArrayArray_class(){ "changeFrame" , changeFrame_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("from_frame"), bp::arg("to_frame") ) + , bp::release_gil_policy() , "Map all of the points in the CoordGroup at index j in the\narray at index i from the coordinate frame from_frame to\nthe coordinate frame to_frame\nThrow: SireError::invalid_index\n" ); } @@ -179,6 +190,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of CoordGroupArrays in this array" ); } @@ -191,6 +203,7 @@ void register_CoordGroupArrayArray_class(){ "mapInto" , mapInto_function_value , ( bp::arg("axes") ) + , bp::release_gil_policy() , "Map all of the points in this array into the coordinate frame\nrepresented by axes" ); } @@ -203,6 +216,7 @@ void register_CoordGroupArrayArray_class(){ "mapInto" , mapInto_function_value , ( bp::arg("i"), bp::arg("axes") ) + , bp::release_gil_policy() , "Map all of the points in the ith array into the coordinate frame\nrepresented by axes\nThrow: SireError::invalid_index\n" ); } @@ -215,6 +229,7 @@ void register_CoordGroupArrayArray_class(){ "mapInto" , mapInto_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("axes") ) + , bp::release_gil_policy() , "Map all the points in the CoordGroup at index j in the array at\nindex i into the coordinate frame represented by axes\nThrow: SireError::invalid_index\n" ); } @@ -226,6 +241,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "merge" , merge_function_value + , bp::release_gil_policy() , "Merge this array of array of CoordGroups back into a single CoordGroup" ); } @@ -237,6 +253,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "nCoordGroupArrays" , nCoordGroupArrays_function_value + , bp::release_gil_policy() , "Return the number of CoordGroupArrays in this array" ); } @@ -248,6 +265,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "nCoordGroups" , nCoordGroups_function_value + , bp::release_gil_policy() , "Return the total number of CoordGroups in all of the CoordGroupArrays\nin this array" ); } @@ -259,6 +277,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "nCoords" , nCoords_function_value + , bp::release_gil_policy() , "Return the total number of points in all of the CoordGroups in\nall of the CoordGroupArrays in this array" ); } @@ -299,6 +318,7 @@ void register_CoordGroupArrayArray_class(){ "rotate" , rotate_function_value , ( bp::arg("quat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the points in this container using the quaternion quat\nabout the point point" ); } @@ -311,6 +331,7 @@ void register_CoordGroupArrayArray_class(){ "rotate" , rotate_function_value , ( bp::arg("rotmat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the points in this container using the matrix rotmat\nabout the point point" ); } @@ -323,6 +344,7 @@ void register_CoordGroupArrayArray_class(){ "rotate" , rotate_function_value , ( bp::arg("i"), bp::arg("quat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the points in the ith array using the quaternion quat\nabout the point point\nThrow: SireError::invalid_index\n" ); } @@ -335,6 +357,7 @@ void register_CoordGroupArrayArray_class(){ "rotate" , rotate_function_value , ( bp::arg("i"), bp::arg("rotmat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the points in the ith array using the matrix rotmat\nabout the point point\nThrow: SireError::invalid_index\n" ); } @@ -347,6 +370,7 @@ void register_CoordGroupArrayArray_class(){ "rotate" , rotate_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("quat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the points in the jth CoordGroup in the\nith array using the quaternion quat about the point point\nThrow: SireError::invalid_index\n" ); } @@ -359,6 +383,7 @@ void register_CoordGroupArrayArray_class(){ "rotate" , rotate_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("rotmat"), bp::arg("point") ) + , bp::release_gil_policy() , "Rotate all of the points in the jth CoordGroup in the\nith array using the matrix rotmat about the point point\nThrow: SireError::invalid_index\n" ); } @@ -370,6 +395,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of CoordGroupArrays in this array" ); } @@ -381,6 +407,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this array of arrays" ); } @@ -393,6 +420,7 @@ void register_CoordGroupArrayArray_class(){ "transform" , transform_function_value , ( bp::arg("t") ) + , bp::release_gil_policy() , "Rotate all of the points in this container using the matrix rotmat\nabout the point point" ); } @@ -405,6 +433,7 @@ void register_CoordGroupArrayArray_class(){ "transform" , transform_function_value , ( bp::arg("i"), bp::arg("t") ) + , bp::release_gil_policy() , "Transform all of the points in the ith array using the\ntransformation t\nThrow: SireError::invalid_index\n" ); } @@ -417,6 +446,7 @@ void register_CoordGroupArrayArray_class(){ "transform" , transform_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("t") ) + , bp::release_gil_policy() , "Transform all of the points in the jth CoordGroup in the\nith array using the transformation t\nThrow: SireError::invalid_index\n" ); } @@ -429,6 +459,7 @@ void register_CoordGroupArrayArray_class(){ "translate" , translate_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Translate all of the coordinates held in this container by delta" ); } @@ -441,6 +472,7 @@ void register_CoordGroupArrayArray_class(){ "translate" , translate_function_value , ( bp::arg("i"), bp::arg("delta") ) + , bp::release_gil_policy() , "Translate all of the points in the ith array by delta\nThrow: SireError::invalid_index\n" ); } @@ -453,6 +485,7 @@ void register_CoordGroupArrayArray_class(){ "translate" , translate_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("delta") ) + , bp::release_gil_policy() , "Translate all of the points in the jth CoordGroup of the ith\narray by delta\nThrow: SireError::invalid_index\n" ); } @@ -464,6 +497,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -476,6 +510,7 @@ void register_CoordGroupArrayArray_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("array") ) + , bp::release_gil_policy() , "Update the ith CoordGroupArray so that its contents are equal to array.\nNote that you can only do this if the configuration of the\nCoordGroupArray at index i is identical to array (same number\nof CoordGroups, with the same number of coordinates in\nequivalent CoordGroups)\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -488,6 +523,7 @@ void register_CoordGroupArrayArray_class(){ "update" , update_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("cgroup") ) + , bp::release_gil_policy() , "Update the jth CoordGroup of the ith CoordGroupArray so that its\ncoordinates are equal to cgroup. Note that you can only do this if\nthe number of coordinates in this CoordGroup is the same as\nin cgroup\nThrow: SireError::invalid_index\nThrow: SireError::incompatible_error\n" ); } @@ -499,6 +535,7 @@ void register_CoordGroupArrayArray_class(){ CoordGroupArrayArray_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/CoordGroupBase.pypp.cpp b/wrapper/Vol/CoordGroupBase.pypp.cpp index 1505b5ee2..619e36b31 100644 --- a/wrapper/Vol/CoordGroupBase.pypp.cpp +++ b/wrapper/Vol/CoordGroupBase.pypp.cpp @@ -33,6 +33,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CoordGroupBase_class(){ @@ -62,6 +64,7 @@ void register_CoordGroupBase_class(){ "assertSameSize" , assertSameSize_function_value , ( bp::arg("coordinates") ) + , bp::release_gil_policy() , "Assert that the array of coordinates contains the same number of\ncoordinates as are in this group\nThrow: SireError::incompatible_error\n" ); } @@ -74,6 +77,7 @@ void register_CoordGroupBase_class(){ "assertSameSize" , assertSameSize_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Assert that the CoordGroup other contains the same number of\ncoordinates as are in this group\nThrow: SireError::incompatible_error\n" ); } @@ -86,6 +90,7 @@ void register_CoordGroupBase_class(){ "assertValidIndex" , assertValidIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Assert that i is a valid index in this group\nThrow: SireError::invalid_index\n" ); } @@ -110,6 +115,7 @@ void register_CoordGroupBase_class(){ CoordGroupBase_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of coordinates in this group" ); } @@ -121,6 +127,7 @@ void register_CoordGroupBase_class(){ CoordGroupBase_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether this group is empty (has no coordinates)" ); } @@ -133,6 +140,7 @@ void register_CoordGroupBase_class(){ "maybeDifferent" , maybeDifferent_function_value , ( bp::arg("other") ) + , bp::release_gil_policy() , "Return whether other may be different to this group - this uses\na simple comparison of the memory addresses of the storage of\nthese two groups to see if they are definitely the same, or maybe\ndifferent" ); } @@ -159,6 +167,7 @@ void register_CoordGroupBase_class(){ CoordGroupBase_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "Return the number of coordinates in this group" ); } @@ -170,6 +179,7 @@ void register_CoordGroupBase_class(){ CoordGroupBase_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this CoordGroup" ); } @@ -181,6 +191,7 @@ void register_CoordGroupBase_class(){ CoordGroupBase_exposer.def( "toVector" , toVector_function_value + , bp::release_gil_policy() , "Return an array containing just the coordinates in this group" ); } @@ -192,6 +203,7 @@ void register_CoordGroupBase_class(){ CoordGroupBase_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -203,6 +215,7 @@ void register_CoordGroupBase_class(){ CoordGroupBase_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/CoordGroupEditor.pypp.cpp b/wrapper/Vol/CoordGroupEditor.pypp.cpp index e36927f7b..169eb31c9 100644 --- a/wrapper/Vol/CoordGroupEditor.pypp.cpp +++ b/wrapper/Vol/CoordGroupEditor.pypp.cpp @@ -35,6 +35,8 @@ SireVol::CoordGroupEditor __copy__(const SireVol::CoordGroupEditor &other){ retu #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_CoordGroupEditor_class(){ @@ -79,6 +81,7 @@ void register_CoordGroupEditor_class(){ CoordGroupEditor_exposer.def( "commit" , commit_function_value + , bp::release_gil_policy() , "Return a CoordGroup which is a copy of this group." ); } @@ -298,6 +301,7 @@ void register_CoordGroupEditor_class(){ CoordGroupEditor_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -309,6 +313,7 @@ void register_CoordGroupEditor_class(){ CoordGroupEditor_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/Grid.pypp.cpp b/wrapper/Vol/Grid.pypp.cpp index ccd9e1f1c..fd2e74aa4 100644 --- a/wrapper/Vol/Grid.pypp.cpp +++ b/wrapper/Vol/Grid.pypp.cpp @@ -25,6 +25,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_Grid_class(){ @@ -53,6 +55,7 @@ void register_Grid_class(){ Grid_exposer.def( "center" , center_function_value + , bp::release_gil_policy() , "Return the center of the grid" ); } @@ -64,6 +67,7 @@ void register_Grid_class(){ Grid_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "Return the number of points in the grid" ); } @@ -75,6 +79,7 @@ void register_Grid_class(){ Grid_exposer.def( "hasWeights" , hasWeights_function_value + , bp::release_gil_policy() , "Return whether or not the grid points have weights\n(i.e. they are not equally weighted)" ); } @@ -86,6 +91,7 @@ void register_Grid_class(){ Grid_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "Return whether this grid is empty" ); } @@ -97,6 +103,7 @@ void register_Grid_class(){ Grid_exposer.def( "maxCoords" , maxCoords_function_value + , bp::release_gil_policy() , "Return the maximum coordinates of the grid" ); } @@ -108,6 +115,7 @@ void register_Grid_class(){ Grid_exposer.def( "minCoords" , minCoords_function_value + , bp::release_gil_policy() , "Return the minimum coordinates of the grid" ); } @@ -119,6 +127,7 @@ void register_Grid_class(){ Grid_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "Return the number of points in the grid" ); } @@ -155,6 +164,7 @@ void register_Grid_class(){ "recenter" , recenter_function_value , ( bp::arg("center") ) + , bp::release_gil_policy() , "" ); } @@ -191,6 +201,7 @@ void register_Grid_class(){ "scale" , scale_function_value , ( bp::arg("scalefactor") ) + , bp::release_gil_policy() , "" ); } @@ -203,6 +214,7 @@ void register_Grid_class(){ "translate" , translate_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "" ); } @@ -214,6 +226,7 @@ void register_Grid_class(){ Grid_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/GridIndex.pypp.cpp b/wrapper/Vol/GridIndex.pypp.cpp index b626fd784..b1969f440 100644 --- a/wrapper/Vol/GridIndex.pypp.cpp +++ b/wrapper/Vol/GridIndex.pypp.cpp @@ -29,6 +29,8 @@ SireVol::GridIndex __copy__(const SireVol::GridIndex &other){ return SireVol::Gr #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_GridIndex_class(){ { //::SireVol::GridIndex @@ -44,6 +46,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "i" , i_function_value + , bp::release_gil_policy() , "" ); } @@ -55,6 +58,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "isNull" , isNull_function_value + , bp::release_gil_policy() , "" ); } @@ -66,6 +70,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "j" , j_function_value + , bp::release_gil_policy() , "" ); } @@ -77,6 +82,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "k" , k_function_value + , bp::release_gil_policy() , "" ); } @@ -88,6 +94,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "" ); } @@ -114,6 +121,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -125,6 +133,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -136,6 +145,7 @@ void register_GridIndex_class(){ GridIndex_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/GridInfo.pypp.cpp b/wrapper/Vol/GridInfo.pypp.cpp index 727ea8c58..b6c2b197d 100644 --- a/wrapper/Vol/GridInfo.pypp.cpp +++ b/wrapper/Vol/GridInfo.pypp.cpp @@ -29,6 +29,8 @@ SireVol::GridInfo __copy__(const SireVol::GridInfo &other){ return SireVol::Grid #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_GridInfo_class(){ @@ -48,6 +50,7 @@ void register_GridInfo_class(){ "arrayToGridIndex" , arrayToGridIndex_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -60,6 +63,7 @@ void register_GridInfo_class(){ "at" , at_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -72,6 +76,7 @@ void register_GridInfo_class(){ "at" , at_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); } @@ -84,6 +89,7 @@ void register_GridInfo_class(){ "at" , at_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("k") ) + , bp::release_gil_policy() , "" ); } @@ -96,6 +102,7 @@ void register_GridInfo_class(){ "at" , at_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "" ); } @@ -108,6 +115,7 @@ void register_GridInfo_class(){ "box" , box_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the AABox that encompasses the grid box at point i. This\nreturns an empty box if there is no such point in the grid" ); } @@ -120,6 +128,7 @@ void register_GridInfo_class(){ "box" , box_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the AABox that encompasses the grid box at point idx.\nThis returns an empty box if the point is not in the grid" ); } @@ -132,6 +141,7 @@ void register_GridInfo_class(){ "box" , box_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the AABox that encompasses the grid box that contains the\npoint p. Note that returns a null AABox if the point is not in the grid" ); } @@ -144,6 +154,7 @@ void register_GridInfo_class(){ "closestIndexTo" , closestIndexTo_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the grid index that is closest to the point point. Note that\nif point lies outside the grid, then the closest grid index will\nstill be returned (it may just lie a long way from the point)" ); } @@ -156,6 +167,7 @@ void register_GridInfo_class(){ "contains" , contains_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return whether or not this grid contains the point point" ); } @@ -167,6 +179,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "count" , count_function_value + , bp::release_gil_policy() , "" ); } @@ -178,6 +191,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "dimX" , dimX_function_value + , bp::release_gil_policy() , "" ); } @@ -189,6 +203,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "dimY" , dimY_function_value + , bp::release_gil_policy() , "" ); } @@ -200,6 +215,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "dimZ" , dimZ_function_value + , bp::release_gil_policy() , "" ); } @@ -211,6 +227,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "dimensions" , dimensions_function_value + , bp::release_gil_policy() , "" ); } @@ -223,6 +240,7 @@ void register_GridInfo_class(){ "getitem" , getitem_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "" ); } @@ -235,6 +253,7 @@ void register_GridInfo_class(){ "gridToArrayIndex" , gridToArrayIndex_function_value , ( bp::arg("i"), bp::arg("j"), bp::arg("k") ) + , bp::release_gil_policy() , "" ); } @@ -247,6 +266,7 @@ void register_GridInfo_class(){ "gridToArrayIndex" , gridToArrayIndex_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "" ); } @@ -259,6 +279,7 @@ void register_GridInfo_class(){ "indexOf" , indexOf_function_value , ( bp::arg("i"), bp::arg("grid") ) + , bp::release_gil_policy() , "Return the index in grid grid of point i in this grid. This returns\na null index if this index does not exist in either grid. Note that this\nreturns the index of the closest grid point if the grids do not exactly\nline up" ); } @@ -271,6 +292,7 @@ void register_GridInfo_class(){ "indexOf" , indexOf_function_value , ( bp::arg("idx"), bp::arg("grid") ) + , bp::release_gil_policy() , "Return the index in grid grid of point idx in this grid. This returns\na null index if this index does not exist in either grid. Note that this\nreturns the index of the closest grid point if the grids do not exactly\nline up" ); } @@ -282,6 +304,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "isEmpty" , isEmpty_function_value + , bp::release_gil_policy() , "" ); } @@ -293,6 +316,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "nPoints" , nPoints_function_value + , bp::release_gil_policy() , "" ); } @@ -356,6 +380,7 @@ void register_GridInfo_class(){ "point" , point_function_value , ( bp::arg("i") ) + , bp::release_gil_policy() , "Return the point at the bottom, left, back (lowest i, j, k indicies) of the\nith box. This returns a zero vector if the point is invalid." ); } @@ -368,6 +393,7 @@ void register_GridInfo_class(){ "point" , point_function_value , ( bp::arg("idx") ) + , bp::release_gil_policy() , "Return the point at the bottom, left, back (lowest i, j, k indicies) of the\nbox at grid index idx. This returns a zero vector if the point is invalid." ); } @@ -380,6 +406,7 @@ void register_GridInfo_class(){ "point" , point_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the point at the bottom, left, back (lowest i, j, k indicies) of the\nbox containing the point point. This returns a zero vector if the point is invalid." ); } @@ -392,6 +419,7 @@ void register_GridInfo_class(){ "pointToArrayIndex" , pointToArrayIndex_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the array index of the grid box that contains the point point.\nNote that this returns -1 if the point is not in the grid" ); } @@ -404,6 +432,7 @@ void register_GridInfo_class(){ "pointToGridCorners" , pointToGridCorners_function_value , ( bp::arg("point"), bp::arg("indicies") ) + , bp::release_gil_policy() , "Return array indicies of the eight grid points that are on the corners of the\nbox that contains the point point. This returns eight -1 values if the\npoint does not lie in the grid" ); } @@ -416,6 +445,7 @@ void register_GridInfo_class(){ "pointToGridCorners" , pointToGridCorners_function_value , ( bp::arg("point"), bp::arg("indicies"), bp::arg("weights") ) + , bp::release_gil_policy() , "Return array indicies of the eight grid points that are on the corners of the\nbox that contains the point point. This returns eight -1 values if the\npoint does not lie in the grid. This also returns the weights of the eight\npoints, using tri-linear interpolation based on the distance between the\npoint and each corner of the box" ); } @@ -428,6 +458,7 @@ void register_GridInfo_class(){ "pointToGridCorners" , pointToGridCorners_function_value , ( bp::arg("x"), bp::arg("y"), bp::arg("z"), bp::arg("indicies") ) + , bp::release_gil_policy() , "Return array indicies of the eight grid points that are on the corners of the\nbox that contains the point point. This returns eight -1 values if the\npoint does not lie in the grid. The return value is the number of points\nthat are in the box" ); } @@ -440,6 +471,7 @@ void register_GridInfo_class(){ "pointToGridCorners" , pointToGridCorners_function_value , ( bp::arg("x"), bp::arg("y"), bp::arg("z"), bp::arg("indicies"), bp::arg("weights") ) + , bp::release_gil_policy() , "Return array indicies of the eight grid points that are on the corners of the\nbox that contains the point point. This returns eight -1 values if the\npoint does not lie in the grid. This also returns the weights of the eight\npoints, using tri-linear interpolation based on the distance between the\npoint and each corner of the box" ); } @@ -452,6 +484,7 @@ void register_GridInfo_class(){ "pointToGridIndex" , pointToGridIndex_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the index of the grid box that contains the point point. Note\nthat this returns a null index if the point is not in the grid" ); } @@ -464,6 +497,7 @@ void register_GridInfo_class(){ "redimension" , redimension_function_value , ( bp::arg("values"), bp::arg("new_grid") ) + , bp::release_gil_policy() , "Return the values values that map to this grid, redimensioned to map to\nthe grid new_grid" ); } @@ -475,6 +509,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "size" , size_function_value + , bp::release_gil_policy() , "" ); } @@ -486,6 +521,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "spacing" , spacing_function_value + , bp::release_gil_policy() , "" ); } @@ -497,6 +533,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "" ); } @@ -508,6 +545,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -519,6 +557,7 @@ void register_GridInfo_class(){ GridInfo_exposer.def( "what" , what_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/NullGrid.pypp.cpp b/wrapper/Vol/NullGrid.pypp.cpp index 145055414..143c65de9 100644 --- a/wrapper/Vol/NullGrid.pypp.cpp +++ b/wrapper/Vol/NullGrid.pypp.cpp @@ -27,6 +27,8 @@ SireVol::NullGrid __copy__(const SireVol::NullGrid &other){ return SireVol::Null #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_NullGrid_class(){ @@ -60,6 +62,7 @@ void register_NullGrid_class(){ "recenter" , recenter_function_value , ( bp::arg("center") ) + , bp::release_gil_policy() , "Return a copy of this grid that has been recentered to center" ); } @@ -96,6 +99,7 @@ void register_NullGrid_class(){ "scale" , scale_function_value , ( bp::arg("scalefactor") ) + , bp::release_gil_policy() , "Return a copy of this grid that has been scaled uniformly by scalefactor" ); } @@ -108,6 +112,7 @@ void register_NullGrid_class(){ "translate" , translate_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Return a copy of this grid that has been translated by delta" ); } @@ -119,6 +124,7 @@ void register_NullGrid_class(){ NullGrid_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/NullPatching.pypp.cpp b/wrapper/Vol/NullPatching.pypp.cpp index 9a1b46863..87fc3ac45 100644 --- a/wrapper/Vol/NullPatching.pypp.cpp +++ b/wrapper/Vol/NullPatching.pypp.cpp @@ -27,6 +27,8 @@ SireVol::NullPatching __copy__(const SireVol::NullPatching &other){ return SireV #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_NullPatching_class(){ { //::SireVol::NullPatching @@ -43,6 +45,7 @@ void register_NullPatching_class(){ NullPatching_exposer.def( "nPatches" , nPatches_function_value + , bp::release_gil_policy() , "Return the number of patches" ); } @@ -70,6 +73,7 @@ void register_NullPatching_class(){ "patchIndex" , patchIndex_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the patch index of the passed point" ); } @@ -82,6 +86,7 @@ void register_NullPatching_class(){ "patchIndexAndCenter" , patchIndexAndCenter_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "Return the patch index and the center of the patch" ); } @@ -94,6 +99,7 @@ void register_NullPatching_class(){ "repatch" , repatch_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "Repatch this patching for the passed space" ); } @@ -105,6 +111,7 @@ void register_NullPatching_class(){ NullPatching_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/Patching.pypp.cpp b/wrapper/Vol/Patching.pypp.cpp index 24bac284e..469ae6b7b 100644 --- a/wrapper/Vol/Patching.pypp.cpp +++ b/wrapper/Vol/Patching.pypp.cpp @@ -26,6 +26,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Patching_class(){ { //::SireVol::Patching @@ -40,6 +42,7 @@ void register_Patching_class(){ Patching_exposer.def( "nPatches" , nPatches_function_value + , bp::release_gil_policy() , "" ); } @@ -51,6 +54,7 @@ void register_Patching_class(){ Patching_exposer.def( "null" , null_function_value + , bp::release_gil_policy() , "Retunr the null patching object" ); } @@ -63,6 +67,7 @@ void register_Patching_class(){ "patchIndex" , patchIndex_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "" ); } @@ -75,6 +80,7 @@ void register_Patching_class(){ "patchIndexAndCenter" , patchIndexAndCenter_function_value , ( bp::arg("point") ) + , bp::release_gil_policy() , "" ); } @@ -87,6 +93,7 @@ void register_Patching_class(){ "rebalance" , rebalance_function_value , ( bp::arg("space"), bp::arg("patchcoords") ) + , bp::release_gil_policy() , "Rebalance the patching so that the patches for the passed space contain\nroughly equal numbers of CoordGroups" ); } @@ -99,6 +106,7 @@ void register_Patching_class(){ "repatch" , repatch_function_value , ( bp::arg("new_space") ) + , bp::release_gil_policy() , "" ); } @@ -110,7 +118,7 @@ void register_Patching_class(){ Patching_exposer.def( "space" , space_function_value - , bp::return_value_policy() + , bp::return_value_policy() , "Return the space used to create this patching scheme" ); } @@ -122,6 +130,7 @@ void register_Patching_class(){ Patching_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } diff --git a/wrapper/Vol/PeriodicBox.pypp.cpp b/wrapper/Vol/PeriodicBox.pypp.cpp index 3463acdf8..18946441e 100644 --- a/wrapper/Vol/PeriodicBox.pypp.cpp +++ b/wrapper/Vol/PeriodicBox.pypp.cpp @@ -35,6 +35,8 @@ SireVol::PeriodicBox __copy__(const SireVol::PeriodicBox &other){ return SireVol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_PeriodicBox_class(){ { //::SireVol::PeriodicBox @@ -53,6 +55,7 @@ void register_PeriodicBox_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("aabox0"), bp::arg("aabox1") ) + , bp::release_gil_policy() , "Return whether or not two groups enclosed by the AABoxes aabox0 and\naabox1 are definitely beyond the cutoff distance dist" ); } @@ -65,6 +68,7 @@ void register_PeriodicBox_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return whether or not these two groups are definitely beyond the cutoff distance." ); } @@ -77,6 +81,7 @@ void register_PeriodicBox_class(){ "calcAngle" , calcAngle_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2") ) + , bp::release_gil_policy() , "Calculate the angle between the passed three points. This should return\nthe acute angle between the points, which should lie between 0 and 180 degrees" ); } @@ -89,6 +94,7 @@ void register_PeriodicBox_class(){ "calcDihedral" , calcDihedral_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3") ) + , bp::release_gil_policy() , "Calculate the torsion angle between the passed four points. This should\nreturn the torsion angle measured clockwise when looking down the\ntorsion from point0-point1-point2-point3. This will lie between 0 and 360\ndegrees" ); } @@ -101,6 +107,7 @@ void register_PeriodicBox_class(){ "calcDist" , calcDist_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance between two points" ); } @@ -113,6 +120,7 @@ void register_PeriodicBox_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\natoms of the two CoordGroups. Return the shortest distance^2 between the two\nCoordGroups." ); } @@ -125,6 +133,7 @@ void register_PeriodicBox_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\natoms of the passed CoordGroup to the passed point. Return the shortest\ndistance." ); } @@ -137,6 +146,7 @@ void register_PeriodicBox_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance squared between two points" ); } @@ -149,6 +159,7 @@ void register_PeriodicBox_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances squared between all of the\natoms of the passed CoordGroup to the passed point. Return the shortest\ndistance." ); } @@ -161,6 +172,7 @@ void register_PeriodicBox_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all of the\natoms of the two CoordGroups. Return the shortest distance between the\ntwo CoordGroups." ); } @@ -173,6 +185,7 @@ void register_PeriodicBox_class(){ "calcDistVector" , calcDistVector_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance vector between two points" ); } @@ -185,6 +198,7 @@ void register_PeriodicBox_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points of the two CoordGroups\ngroup1 and group2 - the returned matrix has the vectors pointing\nfrom each point in group1 to each point in group2. This returns\nthe shortest distance between two points in the group" ); } @@ -197,6 +211,7 @@ void register_PeriodicBox_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points passed CoordGroup\nto the point point - the returned matrix has the vectors pointing\nfrom the point to each point in group. This returns\nthe shortest distance." ); } @@ -209,6 +224,7 @@ void register_PeriodicBox_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all of the\natoms of the two CoordGroups. Return the shortest distance between the two CoordGroups." ); } @@ -221,6 +237,7 @@ void register_PeriodicBox_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all of the\natoms of the two CoordGroups. Return the shortest distance between the two CoordGroups." ); } @@ -245,6 +262,7 @@ void register_PeriodicBox_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at the origin" ); } @@ -257,6 +275,7 @@ void register_PeriodicBox_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at center" ); } @@ -269,6 +288,7 @@ void register_PeriodicBox_class(){ "getCopiesWithin" , getCopiesWithin_function_value , ( bp::arg("group"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return a list of copies of CoordGroup group that are within\ndistance of the CoordGroup center, translating group so that\nit has the right coordinates to be around center. Note that multiple\ncopies of group may be returned in this is a periodic space and\nthere are multiple periodic replicas of group within dist of\ncenter. The copies of group are returned together with the\nminimum distance between that periodic replica and center.\nIf there are no periodic replicas of group that are within\ndist of center, then an empty list is returned." ); } @@ -281,6 +301,7 @@ void register_PeriodicBox_class(){ "getImagesWithin" , getImagesWithin_function_value , ( bp::arg("point"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return all periodic images of point with respect to center within\ndist distance of center" ); } @@ -293,6 +314,7 @@ void register_PeriodicBox_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("group"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the closest periodic copy of group to the point point,\naccording to the minimum image convention. The effect of this is\nto move group into the box which is now centered on point" ); } @@ -317,6 +339,7 @@ void register_PeriodicBox_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("aabox"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the copy of the periodic box which is the closest minimum image\nto center" ); } @@ -329,6 +352,7 @@ void register_PeriodicBox_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("point"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the copy of the point point which is the closest minimum image\nto center" ); } @@ -341,6 +365,7 @@ void register_PeriodicBox_class(){ "getRandomPoint" , getRandomPoint_function_value , ( bp::arg("center"), bp::arg("generator") ) + , bp::release_gil_policy() , "Return a random point within the box (placing the center of the box\nis at the center center)" ); } @@ -352,6 +377,7 @@ void register_PeriodicBox_class(){ PeriodicBox_exposer.def( "isCartesian" , isCartesian_function_value + , bp::release_gil_policy() , "A Periodic box is cartesian" ); } @@ -363,6 +389,7 @@ void register_PeriodicBox_class(){ PeriodicBox_exposer.def( "isPeriodic" , isPeriodic_function_value + , bp::release_gil_policy() , "A Periodic box is periodic" ); } @@ -399,6 +426,7 @@ void register_PeriodicBox_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return the minimum distance between the points in group0 and group1.\nIf this is a periodic space then this uses the minimum image convention\n(i.e. the minimum distance between the closest periodic replicas are\nused)" ); } @@ -411,6 +439,7 @@ void register_PeriodicBox_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("box0"), bp::arg("box1") ) + , bp::release_gil_policy() , "Return the minimum distance between the two boxes" ); } @@ -438,6 +467,7 @@ void register_PeriodicBox_class(){ "setDimensions" , setDimensions_function_value , ( bp::arg("dimensions") ) + , bp::release_gil_policy() , "" ); } @@ -450,6 +480,7 @@ void register_PeriodicBox_class(){ "setDimensions" , setDimensions_function_value , ( bp::arg("mincoords"), bp::arg("maxcoords") ) + , bp::release_gil_policy() , "Set the dimensions of the box so that they span from mincoords\nto maxcoords" ); } @@ -462,6 +493,7 @@ void register_PeriodicBox_class(){ "setVolume" , setVolume_function_value , ( bp::arg("volume") ) + , bp::release_gil_policy() , "Return a copy of this space with the volume of set to volume\n- this will scale the space uniformly, keeping the center at\nthe same location, to achieve this volume" ); } @@ -473,6 +505,7 @@ void register_PeriodicBox_class(){ PeriodicBox_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this space" ); } @@ -484,6 +517,7 @@ void register_PeriodicBox_class(){ PeriodicBox_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -495,6 +529,7 @@ void register_PeriodicBox_class(){ PeriodicBox_exposer.def( "volume" , volume_function_value + , bp::release_gil_policy() , "Return the volume of the central box of this space." ); } diff --git a/wrapper/Vol/RegularGrid.pypp.cpp b/wrapper/Vol/RegularGrid.pypp.cpp index 2c312e8df..c799b13d3 100644 --- a/wrapper/Vol/RegularGrid.pypp.cpp +++ b/wrapper/Vol/RegularGrid.pypp.cpp @@ -27,6 +27,8 @@ SireVol::RegularGrid __copy__(const SireVol::RegularGrid &other){ return SireVol #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + #include "Helpers/len.hpp" void register_RegularGrid_class(){ @@ -62,6 +64,7 @@ void register_RegularGrid_class(){ RegularGrid_exposer.def( "dimX" , dimX_function_value + , bp::release_gil_policy() , "Return the number of points in the x dimension" ); } @@ -73,6 +76,7 @@ void register_RegularGrid_class(){ RegularGrid_exposer.def( "dimY" , dimY_function_value + , bp::release_gil_policy() , "Return the number of points in the y dimension" ); } @@ -84,6 +88,7 @@ void register_RegularGrid_class(){ RegularGrid_exposer.def( "dimZ" , dimZ_function_value + , bp::release_gil_policy() , "Return the number of points in the z dimension" ); } @@ -95,6 +100,7 @@ void register_RegularGrid_class(){ RegularGrid_exposer.def( "gridSpacing" , gridSpacing_function_value + , bp::release_gil_policy() , "Return the grid spacing (this is a cubic grid)" ); } @@ -122,6 +128,7 @@ void register_RegularGrid_class(){ "recenter" , recenter_function_value , ( bp::arg("center") ) + , bp::release_gil_policy() , "Return a copy of this grid that has been recentered to center" ); } @@ -158,6 +165,7 @@ void register_RegularGrid_class(){ "scale" , scale_function_value , ( bp::arg("scalefactor") ) + , bp::release_gil_policy() , "Return a copy of this grid that has been scaled uniformly by scalefactor" ); } @@ -169,6 +177,7 @@ void register_RegularGrid_class(){ RegularGrid_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of the grid" ); } @@ -181,6 +190,7 @@ void register_RegularGrid_class(){ "translate" , translate_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Return a copy of this grid that has been translated by delta" ); } diff --git a/wrapper/Vol/SireVol_properties.cpp b/wrapper/Vol/SireVol_properties.cpp index e8f84e368..761030812 100644 --- a/wrapper/Vol/SireVol_properties.cpp +++ b/wrapper/Vol/SireVol_properties.cpp @@ -12,6 +12,13 @@ #include "grid.h" #include "grid.h" #include "SireError/errors.h" +#include "SireStream/datastream.h" +#include "SireStream/shareddatastream.h" +#include "SireUnits/units.h" +#include "SireVol/periodicbox.h" +#include "patching.h" +#include "patching.h" +#include "SireError/errors.h" #include "SireMaths/rangenerator.h" #include "SireStream/datastream.h" #include "SireStream/shareddatastream.h" @@ -19,16 +26,9 @@ #include "space.h" #include #include "space.h" -#include "SireError/errors.h" -#include "SireStream/datastream.h" -#include "SireStream/shareddatastream.h" -#include "SireUnits/units.h" -#include "SireVol/periodicbox.h" -#include "patching.h" -#include "patching.h" void register_SireVol_properties() { register_property_container< SireVol::GridPtr, SireVol::Grid >(); - register_property_container< SireVol::SpacePtr, SireVol::Space >(); register_property_container< SireVol::PatchingPtr, SireVol::Patching >(); + register_property_container< SireVol::SpacePtr, SireVol::Space >(); } diff --git a/wrapper/Vol/SireVol_registrars.cpp b/wrapper/Vol/SireVol_registrars.cpp index 879c48545..0f4497520 100644 --- a/wrapper/Vol/SireVol_registrars.cpp +++ b/wrapper/Vol/SireVol_registrars.cpp @@ -5,38 +5,38 @@ #include "Helpers/version_error_impl.h" -#include "periodicbox.h" -#include "gridinfo.h" -#include "grid.h" -#include "cartesian.h" -#include "coordgroup.h" #include "aabox.h" -#include "triclinicbox.h" +#include "cartesian.h" #include "combinedspace.h" -#include "patching.h" #include "combinespaces.h" +#include "coordgroup.h" +#include "grid.h" +#include "gridinfo.h" +#include "patching.h" +#include "periodicbox.h" +#include "triclinicbox.h" #include "Helpers/objectregistry.hpp" void register_SireVol_objects() { - ObjectRegistry::registerConverterFor< SireVol::PeriodicBox >(); - ObjectRegistry::registerConverterFor< SireVol::GridIndex >(); - ObjectRegistry::registerConverterFor< SireVol::GridInfo >(); - ObjectRegistry::registerConverterFor< SireVol::NullGrid >(); - ObjectRegistry::registerConverterFor< SireVol::RegularGrid >(); + ObjectRegistry::registerConverterFor< SireVol::AABox >(); ObjectRegistry::registerConverterFor< SireVol::Cartesian >(); + ObjectRegistry::registerConverterFor< SireVol::CombinedSpace >(); + ObjectRegistry::registerConverterFor< SireVol::CombineSpaces >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroup >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroupEditor >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroupArray >(); ObjectRegistry::registerConverterFor< SireVol::CoordGroupArrayArray >(); - ObjectRegistry::registerConverterFor< SireVol::AABox >(); - ObjectRegistry::registerConverterFor< SireVol::TriclinicBox >(); - ObjectRegistry::registerConverterFor< SireVol::CombinedSpace >(); + ObjectRegistry::registerConverterFor< SireVol::NullGrid >(); + ObjectRegistry::registerConverterFor< SireVol::RegularGrid >(); + ObjectRegistry::registerConverterFor< SireVol::GridIndex >(); + ObjectRegistry::registerConverterFor< SireVol::GridInfo >(); ObjectRegistry::registerConverterFor< SireVol::NullPatching >(); ObjectRegistry::registerConverterFor< SireVol::BoxPatching >(); - ObjectRegistry::registerConverterFor< SireVol::CombineSpaces >(); + ObjectRegistry::registerConverterFor< SireVol::PeriodicBox >(); + ObjectRegistry::registerConverterFor< SireVol::TriclinicBox >(); } diff --git a/wrapper/Vol/Space.pypp.cpp b/wrapper/Vol/Space.pypp.cpp index c267f053c..fce1f5264 100644 --- a/wrapper/Vol/Space.pypp.cpp +++ b/wrapper/Vol/Space.pypp.cpp @@ -27,6 +27,8 @@ namespace bp = boost::python; #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_Space_class(){ { //::SireVol::Space @@ -42,6 +44,7 @@ void register_Space_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return whether or not these two groups are definitely beyond the distance dist.\n\nWarning: Note beyond does not mean definitely within the distance\n" ); } @@ -54,6 +57,7 @@ void register_Space_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("aabox0"), bp::arg("aabox1") ) + , bp::release_gil_policy() , "Return whether or not two groups that are enclosed by the AABoxes\naabox0 and aabox1 are beyond the cutoff distance dist.\n\nWarning: Note beyond does not mean definitely within the distance\n" ); } @@ -66,6 +70,7 @@ void register_Space_class(){ "calcAngle" , calcAngle_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2") ) + , bp::release_gil_policy() , "Calculate the angle between the passed three points. This should return\nthe acute angle between the points, which should lie between 0 and 180 degrees" ); } @@ -78,6 +83,7 @@ void register_Space_class(){ "calcDihedral" , calcDihedral_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3") ) + , bp::release_gil_policy() , "Calculate the torsion angle between the passed four points. This should\nreturn the torsion angle measured clockwise when looking down the\ntorsion from point0-point1-point2-point3. This will lie between 0 and 360\ndegrees" ); } @@ -90,6 +96,7 @@ void register_Space_class(){ "calcDist" , calcDist_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance between two points" ); } @@ -102,6 +109,7 @@ void register_Space_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\npoints within a CoordGroup. This creates a symmetrical matrix,\nwith a 0 diagonal. This returns the shortest distance between\ntwo points within the group." ); } @@ -114,6 +122,7 @@ void register_Space_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\npoints of the two CoordGroups. Return the shortest distance^2 between the two\nCoordGroups." ); } @@ -126,6 +135,7 @@ void register_Space_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat with the distances between all of the\npoints in group to the point point. This returns the shortest\ndistance between the group points and point" ); } @@ -138,6 +148,7 @@ void register_Space_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance squared between two points" ); } @@ -150,6 +161,7 @@ void register_Space_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all of the\npoints within a CoordGroup. This creates a symmetrical matrix,\nwith a 0 diagonal. This returns the shortest distance^2 between\ntwo points within the group." ); } @@ -162,6 +174,7 @@ void register_Space_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat with the distances squared between all of the\npoints in group to the point point. This returns the shortest\ndistance between the group points and point" ); } @@ -174,6 +187,7 @@ void register_Space_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all of the\npoints of the two CoordGroups. Return the shortest distance^2 between the\ntwo CoordGroups." ); } @@ -186,6 +200,7 @@ void register_Space_class(){ "calcDistVector" , calcDistVector_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance vector between two points" ); } @@ -198,6 +213,7 @@ void register_Space_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat with all of the interpoint distance vectors\nbetween all points within the CoordGroup. This is not a symmetrical matrix,\nas the direction from point A to point B is the negative of the\ndirection from point B to point A. This returns the shortest distance\nbetween two points in the group (that is not the self-self distance)" ); } @@ -210,6 +226,7 @@ void register_Space_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points of the two CoordGroups\ngroup1 and group2 - the returned matrix has the vectors pointing\nfrom each point in group1 to each point in group2. This returns\nthe shortest distance between two points in the group" ); } @@ -222,6 +239,7 @@ void register_Space_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat with the distances between all of the\npoints in group to the point point. This returns the shortest\ndistance between the group points and point" ); } @@ -234,6 +252,7 @@ void register_Space_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all of the\npoints within a CoordGroup. This creates a symmetrical matrix,\nwith a 0 diagonal. This returns the the largest inverse distance between\ntwo points within the group." ); } @@ -246,6 +265,7 @@ void register_Space_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all of the\npoints of the two CoordGroups. Return the largest inverse distance between the two\nCoordGroups." ); } @@ -258,6 +278,7 @@ void register_Space_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all of the\npoints within a CoordGroup. This creates a symmetrical matrix,\nwith a 0 diagonal. This returns the the largest inverse distance^2 between\ntwo points within the group." ); } @@ -270,6 +291,7 @@ void register_Space_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all of the\npoints of the two CoordGroups. Return the largest inverse distance^2 between the two\nCoordGroups." ); } @@ -282,6 +304,7 @@ void register_Space_class(){ "changeVolume" , changeVolume_function_value , ( bp::arg("delta") ) + , bp::release_gil_policy() , "Change the volume of this space by delta" ); } @@ -294,6 +317,7 @@ void register_Space_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at the origin" ); } @@ -306,6 +330,7 @@ void register_Space_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at center" ); } @@ -318,6 +343,7 @@ void register_Space_class(){ "getCopiesWithin" , getCopiesWithin_function_value , ( bp::arg("group"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "" ); } @@ -330,6 +356,7 @@ void register_Space_class(){ "getImagesWithin" , getImagesWithin_function_value , ( bp::arg("point"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return all periodic images of point with respect to center within\ndist distance of center" ); } @@ -342,6 +369,7 @@ void register_Space_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("group"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the minimum image copy of group with respect to center.\nFor periodic spaces, this translates group into the box that\nhas its center at center (i.e. returns the closest copy of\ngroup to center according to the minimum image convention)" ); } @@ -366,6 +394,7 @@ void register_Space_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("aabox"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the minimum image copy of aabox with respect to center.\nFor periodic spaces, this returns the AABox translated into the\nbox that has its center at center" ); } @@ -378,6 +407,7 @@ void register_Space_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("point"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the minimum image copy of point with respect to center.\nFor periodic spaces, this returns the point translated into the\nbox that has its center at center" ); } @@ -390,6 +420,7 @@ void register_Space_class(){ "getRandomPoint" , getRandomPoint_function_value , ( bp::arg("center"), bp::arg("generator") ) + , bp::release_gil_policy() , "Return a random point within this space, using the passed\nrandom number generator to generate the necessary random numbers,\nand placing the center of the box at center" ); } @@ -402,6 +433,7 @@ void register_Space_class(){ "getRandomPoint" , getRandomPoint_function_value , ( bp::arg("center") ) + , bp::release_gil_policy() , "Return a random point within this space using the global\nrandom number generator and with the box centered at center" ); } @@ -414,6 +446,7 @@ void register_Space_class(){ "getRandomPoint" , getRandomPoint_function_value , ( bp::arg("generator") ) + , bp::release_gil_policy() , "Return a random point within this space using the passed\nrandom number generator to generate any necessary random\nnumbers, and centering the box at the origin" ); } @@ -425,6 +458,7 @@ void register_Space_class(){ Space_exposer.def( "getRandomPoint" , getRandomPoint_function_value + , bp::release_gil_policy() , "Return a random point within this space using the global\nrandom number generator, and with the box centered at the origin" ); } @@ -436,6 +470,7 @@ void register_Space_class(){ Space_exposer.def( "isCartesian" , isCartesian_function_value + , bp::release_gil_policy() , "Return whether or not this space is cartesian\n( x==y==z == 1 and all angle between x-y, y-z, x-z all 90 degrees )" ); } @@ -447,6 +482,7 @@ void register_Space_class(){ Space_exposer.def( "isPeriodic" , isPeriodic_function_value + , bp::release_gil_policy() , "Return whether or not this space is periodic" ); } @@ -459,6 +495,7 @@ void register_Space_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return the minimum distance between the points in group0 and group1.\nIf this is a periodic space then this uses the minimum image convention\n(i.e. the minimum distance between the closest periodic replicas are\nused)" ); } @@ -471,6 +508,7 @@ void register_Space_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group") ) + , bp::release_gil_policy() , "Return the minimum distance between points within the group group." ); } @@ -483,6 +521,7 @@ void register_Space_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("box0"), bp::arg("box1") ) + , bp::release_gil_policy() , "Return the minimum distance between the two AABoxes" ); } @@ -507,6 +546,7 @@ void register_Space_class(){ "setVolume" , setVolume_function_value , ( bp::arg("volume") ) + , bp::release_gil_policy() , "Return a copy of this space with the volume of set to volume\n- this will scale the space uniformly, keeping the center at\nthe same location, to achieve this volume" ); } @@ -518,6 +558,7 @@ void register_Space_class(){ Space_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this space" ); } @@ -529,6 +570,7 @@ void register_Space_class(){ Space_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -540,6 +582,7 @@ void register_Space_class(){ Space_exposer.def( "volume" , volume_function_value + , bp::release_gil_policy() , "Return the volume of the central box of this space. This\nthrows an exception if it is not possible to calculate the\nvolume of this space (e.g. it is an infinite space)" ); } diff --git a/wrapper/Vol/TriclinicBox.pypp.cpp b/wrapper/Vol/TriclinicBox.pypp.cpp index 477efd0da..11f78daf8 100644 --- a/wrapper/Vol/TriclinicBox.pypp.cpp +++ b/wrapper/Vol/TriclinicBox.pypp.cpp @@ -35,6 +35,8 @@ SireVol::TriclinicBox __copy__(const SireVol::TriclinicBox &other){ return SireV #include "Helpers/str.hpp" +#include "Helpers/release_gil_policy.hpp" + void register_TriclinicBox_class(){ { //::SireVol::TriclinicBox @@ -52,6 +54,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "alpha" , alpha_function_value + , bp::release_gil_policy() , "Return the angle between v1 and v2 in degrees." ); } @@ -63,6 +66,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "beta" , beta_function_value + , bp::release_gil_policy() , "Return the angle between v0 and v2 in degrees." ); } @@ -75,6 +79,7 @@ void register_TriclinicBox_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("aabox0"), bp::arg("aabox1") ) + , bp::release_gil_policy() , "Return whether or not two groups enclosed by the AABoxes aabox0 and\naabox1 are definitely beyond the cutoff distance dist" ); } @@ -87,6 +92,7 @@ void register_TriclinicBox_class(){ "beyond" , beyond_function_value , ( bp::arg("dist"), bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return whether or not these two groups are definitely beyond the cutoff distance." ); } @@ -99,6 +105,7 @@ void register_TriclinicBox_class(){ "calcAngle" , calcAngle_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2") ) + , bp::release_gil_policy() , "Calculate the angle between the passed three points. This should return\nthe acute angle between the points, which should lie between 0 and 180 degrees" ); } @@ -111,6 +118,7 @@ void register_TriclinicBox_class(){ "calcDihedral" , calcDihedral_function_value , ( bp::arg("point0"), bp::arg("point1"), bp::arg("point2"), bp::arg("point3") ) + , bp::release_gil_policy() , "Calculate the torsion angle between the passed four points. This should\nreturn the torsion angle measured clockwise when looking down the\ntorsion from point0-point1-point2-point3. This will lie between 0 and 360\ndegrees" ); } @@ -123,6 +131,7 @@ void register_TriclinicBox_class(){ "calcDist" , calcDist_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance between two points" ); } @@ -135,6 +144,7 @@ void register_TriclinicBox_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\natoms of the two CoordGroups. Return the shortest distance^2 between the two\nCoordGroups." ); } @@ -147,6 +157,7 @@ void register_TriclinicBox_class(){ "calcDist" , calcDist_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances between all of the\natoms of the passed CoordGroup to the passed point. Return the shortest\ndistance." ); } @@ -159,6 +170,7 @@ void register_TriclinicBox_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance squared between two points" ); } @@ -171,6 +183,7 @@ void register_TriclinicBox_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("mat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances squared between all of the\natoms of the passed CoordGroup to the passed point. Return the shortest\ndistance." ); } @@ -183,6 +196,7 @@ void register_TriclinicBox_class(){ "calcDist2" , calcDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the distances^2 between all of the\natoms of the two CoordGroups. Return the shortest distance between the\ntwo CoordGroups." ); } @@ -195,6 +209,7 @@ void register_TriclinicBox_class(){ "calcDistVector" , calcDistVector_function_value , ( bp::arg("point0"), bp::arg("point1") ) + , bp::release_gil_policy() , "Calculate the distance vector between two points" ); } @@ -207,6 +222,7 @@ void register_TriclinicBox_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points of the two CoordGroups\ngroup1 and group2 - the returned matrix has the vectors pointing\nfrom each point in group1 to each point in group2. This returns\nthe shortest distance between two points in the group" ); } @@ -219,6 +235,7 @@ void register_TriclinicBox_class(){ "calcDistVectors" , calcDistVectors_function_value , ( bp::arg("group"), bp::arg("point"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix distmat between all the points passed CoordGroup\nto the point point - the returned matrix has the vectors pointing\nfrom the point to each point in group. This returns\nthe shortest distance." ); } @@ -231,6 +248,7 @@ void register_TriclinicBox_class(){ "calcInvDist" , calcInvDist_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances between all of the\natoms of the two CoordGroups. Return the shortest distance between the two CoordGroups." ); } @@ -243,6 +261,7 @@ void register_TriclinicBox_class(){ "calcInvDist2" , calcInvDist2_function_value , ( bp::arg("group1"), bp::arg("group2"), bp::arg("distmat") ) + , bp::release_gil_policy() , "Populate the matrix mat with the inverse distances^2 between all of the\natoms of the two CoordGroups. Return the shortest distance between the two CoordGroups." ); } @@ -254,6 +273,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "cellMatrix" , cellMatrix_function_value + , bp::release_gil_policy() , "Return the cell matrix." ); } @@ -266,6 +286,7 @@ void register_TriclinicBox_class(){ "cubic" , cubic_function_value , ( bp::arg("d") ) + , bp::release_gil_policy() , "Return a cubic TriclinicBox with image distance d." ); } @@ -277,6 +298,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "gamma" , gamma_function_value + , bp::release_gil_policy() , "Return the angle between v1 and v0 in degrees." ); } @@ -289,6 +311,7 @@ void register_TriclinicBox_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at the origin" ); } @@ -301,6 +324,7 @@ void register_TriclinicBox_class(){ "getBoxCenter" , getBoxCenter_function_value , ( bp::arg("p"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the center of the box that contains the point p assuming\nthat the center for the central box is located at center" ); } @@ -313,6 +337,7 @@ void register_TriclinicBox_class(){ "getCopiesWithin" , getCopiesWithin_function_value , ( bp::arg("group"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return a list of copies of CoordGroup group that are within\ndistance of the CoordGroup center, translating group so that\nit has the right coordinates to be around center. Note that multiple\ncopies of group may be returned in this is a periodic space and\nthere are multiple periodic replicas of group within dist of\ncenter. The copies of group are returned together with the\nminimum distance between that periodic replica and center.\nIf there are no periodic replicas of group that are within\ndist of center, then an empty list is returned." ); } @@ -325,6 +350,7 @@ void register_TriclinicBox_class(){ "getImagesWithin" , getImagesWithin_function_value , ( bp::arg("point"), bp::arg("center"), bp::arg("dist") ) + , bp::release_gil_policy() , "Return all periodic images of point with respect to center within\ndist distance of center" ); } @@ -337,6 +363,7 @@ void register_TriclinicBox_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("point"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the copy of the point point which is the closest minimum image\nto center" ); } @@ -349,6 +376,7 @@ void register_TriclinicBox_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("group"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the closest periodic copy of group to the point point,\naccording to the minimum image convention. The effect of this is\nto move group into the box which is now centered on point" ); } @@ -373,6 +401,7 @@ void register_TriclinicBox_class(){ "getMinimumImage" , getMinimumImage_function_value , ( bp::arg("aabox"), bp::arg("center") ) + , bp::release_gil_policy() , "Return the copy of the triclinic box which is the closest minimum image\nto center" ); } @@ -385,6 +414,7 @@ void register_TriclinicBox_class(){ "getRandomPoint" , getRandomPoint_function_value , ( bp::arg("center"), bp::arg("generator") ) + , bp::release_gil_policy() , "Return a random point within the box (placing the center of the box\nis at the center center)" ); } @@ -396,6 +426,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "isCartesian" , isCartesian_function_value + , bp::release_gil_policy() , "In general, a triclinic box isnt Cartesian." ); } @@ -407,6 +438,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "isPeriodic" , isPeriodic_function_value + , bp::release_gil_policy() , "A Triclinic box is periodic" ); } @@ -418,6 +450,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "isRotated" , isRotated_function_value + , bp::release_gil_policy() , "Whether the triclinic cell has been rotated to comply with the contraints\nof molecular dynamics engines, i.e. vector0 aligned with x axis, vector1\nin x-y plane, and vector2 with positive z component.\n" ); } @@ -430,6 +463,7 @@ void register_TriclinicBox_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("group0"), bp::arg("group1") ) + , bp::release_gil_policy() , "Return the minimum distance between the points in group0 and group1.\nIf this is a periodic space then this uses the minimum image convention\n(i.e. the minimum distance between the closest periodic replicas are\nused)" ); } @@ -442,6 +476,7 @@ void register_TriclinicBox_class(){ "minimumDistance" , minimumDistance_function_value , ( bp::arg("box0"), bp::arg("box1") ) + , bp::release_gil_policy() , "Return the minimum distance between the two boxes" ); } @@ -469,6 +504,7 @@ void register_TriclinicBox_class(){ "rhombicDodecahedronHexagon" , rhombicDodecahedronHexagon_function_value , ( bp::arg("d") ) + , bp::release_gil_policy() , "Return a hexagonal rhombic dodecahedron TriclinicBox with image distance d." ); } @@ -481,6 +517,7 @@ void register_TriclinicBox_class(){ "rhombicDodecahedronSquare" , rhombicDodecahedronSquare_function_value , ( bp::arg("d") ) + , bp::release_gil_policy() , "Return a square rhombic dodecahedron TriclinicBox with image distance d." ); } @@ -505,6 +542,7 @@ void register_TriclinicBox_class(){ "setVolume" , setVolume_function_value , ( bp::arg("volume") ) + , bp::release_gil_policy() , "Set the volume of the triclinic box." ); } @@ -516,6 +554,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "toString" , toString_function_value + , bp::release_gil_policy() , "Return a string representation of this space" ); } @@ -528,6 +567,7 @@ void register_TriclinicBox_class(){ "truncatedOctahedron" , truncatedOctahedron_function_value , ( bp::arg("d") ) + , bp::release_gil_policy() , "Return a truncated octahedron with image distance d." ); } @@ -539,6 +579,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "typeName" , typeName_function_value + , bp::release_gil_policy() , "" ); } @@ -586,6 +627,7 @@ void register_TriclinicBox_class(){ TriclinicBox_exposer.def( "volume" , volume_function_value + , bp::release_gil_policy() , "Get the volume of the triclinic box." ); } diff --git a/wrapper/Vol/__init__.py b/wrapper/Vol/__init__.py index 9e456a4e5..0d43ff9eb 100644 --- a/wrapper/Vol/__init__.py +++ b/wrapper/Vol/__init__.py @@ -1,21 +1,41 @@ -############################# -## -## The SireVol module -## -## This contains all of the classes that provide -## volumes in which the simulation is set up and -## run (e.g. infinite boxes - 'Cartesian', and -## periodic boxes - 'PeriodicBox') -## - -import Sire.Base -import Sire.Maths -import Sire.Units +""" +.. currentmodule:: sire.legacy.Vol + +Classes +======= + +.. autosummary:: + :toctree: generated/ + + AABox + BoxPatching + Cartesian + CombinedSpace + CombineSpaces + CoordGroup + CoordGroupArray + CoordGroupArrayArray + CoordGroupBase + CoordGroupEditor + Grid + GridIndex + GridInfo + Patching + PeriodicBox + RegularGrid + Space + TriclinicBox + +""" + +from .. import Base as _Base +from .. import Maths as _Maths +from .. import Units as _Units # Import all of the classes and functions from the C++ library -from Sire.Vol._Vol import * +from ._Vol import * -# Now define some pure Python functions and classes that are part of +# Now define some pure Python functions and classes that are part of # this library... diff --git a/wrapper/__init__.py b/wrapper/__init__.py index 9c6f25cda..f7b89fd29 100644 --- a/wrapper/__init__.py +++ b/wrapper/__init__.py @@ -1,15 +1,45 @@ -############################# -## -## The Sire python module -## -## This contains the parts of the main Sire program -## that are exposed to Python. -## -## (C) Christopher Woods -## +""" +.. currentmodule:: sire.legacy + +This is the legacy Sire module. This holds all of the C++ modules +on which the whole of Sire is built. These are designed to be used +by developers, and are not part of the stable public API +(which is sire) + +""" + +# ensure that the SireQt and SireError libraries are loaded as +# these are vital for the rest of the module +from . import Qt +from . import Error +from . import Config + +__version__ = Config.__version__ + +__branch__ = Config.sire_repository_branch +__repository__ = Config.sire_repository_url +__revisionid__ = Config.sire_repository_version[0:7] + + +def _versionString(): + """Return a nicely formatted string that describes the current Sire version""" + from .Base import getReleaseVersion, getRepositoryBranch, \ + getRepositoryVersionIsClean + + from .Config import sire_repository_version + + return """Sire %s [%s|%s, %s]""" % \ + (getReleaseVersion(), + getRepositoryBranch(), + sire_repository_version[0:7], + ["unclean", "clean"][getRepositoryVersionIsClean()]) + + +Config.versionString = _versionString _module_to_package = {} + def _install_package(name, package_registry): """Internal function used to install the module called 'name', using the passed 'package_registry' @@ -72,6 +102,7 @@ def _install_package(name, package_registry): return + def try_import(name, package_registry=_module_to_package): """Try to import the module called 'name', returning the loaded module as an argument. If the module @@ -109,6 +140,7 @@ def try_import(name, package_registry=_module_to_package): raise ImportError("Failed to install module %s" % name) + def try_import_from(name, fromlist, package_registry=_module_to_package): """Try to import from the module called 'name' the passed symbol (or list of symbols) contained in 'fromlist', returning @@ -178,169 +210,3 @@ def try_import_from(name, fromlist, package_registry=_module_to_package): % (name, ", ".join(missing_symbols))) return ret - -#ensure that the SireQt and SireError libraries are loaded as -#these are vital for the rest of the module -from . import Qt -from . import Error -from . import Config - -__version__ = Config.__version__ - -def _versionString(): - """Return a nicely formatted string that describes the current Sire version""" - import Sire.Base as Base - - return """Sire %s [%s|%s, %s]""" % \ - (Base.getReleaseVersion(), - Base.getRepositoryBranch(), - Config.sire_repository_version[0:7], - ["unclean", "clean"][Base.getRepositoryVersionIsClean()]) - -Config.versionString = _versionString - -sent_usage_data = None - -def _getOSInfo(): - import platform as _pf - - data = {} - data["platform"] = _pf.system() - - if _pf.system().startswith("Darwin"): - data["OS"] = _pf.mac_ver()[0] - elif _pf.system().startswith("Linux"): - ld = _pf.linux_distribution() - data["OS"] = "%s (%s %s)" % (ld[0],ld[1],ld[2]) - else: - data["OS"] = "unknown" - - u = _pf.uname() - data["uname"] = "%s | %s | %s | %s" % (u.system,u.release,u.machine,u.processor) - - data["OS"] = "%s : %s" - -# Now try to upload usage data to siremol.org -def _uploadUsageData(): - try: - global sent_usage_data - - if not sent_usage_data is None: - # don't send data twice - return - - import time as _time - # wait a couple of seconds before uploading. This - # stops annoying uploads when people print help - _time.sleep(2) - - import os as _os - - if "SIRE_DONT_PHONEHOME" in _os.environ: - # respect user wish to not phone home - if not "SIRE_SILENT_PHONEHOME" in _os.environ: - print("\n=======================================================") - print("Respecting your privacy - not sending usage statistics.") - print("Please see http://siremol.org/analytics for more information.") - print("=======================================================\n") - return - else: - if not "SIRE_SILENT_PHONEHOME" in _os.environ: - print("\n==============================================================") - print("Sending anonymous Sire usage statistics to http://siremol.org.") - print("For more information, see http://siremol.org/analytics") - print("To disable, set the environment variable 'SIRE_DONT_PHONEHOME' to 1") - print("To see the information sent, set the environment variable ") - print("SIRE_VERBOSE_PHONEHOME equal to 1. To silence this message, set") - print("the environment variable SIRE_SILENT_PHONEHOME to 1.") - print("==============================================================\n") - - from Sire.Base import CPUID as _CPUID - - id = _CPUID() - - data = {} - - # get information about the processor - data["processor"] = id.brand() - data["vendor"] = id.vendor() - data["clockspeed"] = id.clockSpeed() - data["numcores"] = id.numCores() - - # get information about the operating system - import platform as _pf - - data["platform"] = _pf.system() - - if _pf.system().startswith("Darwin"): - data["OS"] = _pf.mac_ver()[0] - elif _pf.system().startswith("Linux"): - ld = _pf.linux_distribution() - data["OS"] = "%s (%s %s)" % (ld[0],ld[1],ld[2]) - elif _pf.system().startswith("Windows"): - ld = _pf.win32_ver() - data["OS"] = "%s (%s %s)" % (ld[0],ld[1],ld[2]) - else: - data["OS"] = "unknown" - - u = _pf.uname() - data["uname"] = "%s | %s | %s | %s" % (u.system,u.release,u.machine,u.processor) - - # get information about the version of Sire - data["version"] = __version__ - data["repository"] = Config.sire_repository_url - data["repository_version"] = Config.sire_repository_version - - # now get information about which Sire app is running - import sys as _sys - # get the executable name, but make sure we don't get the path - # (as it may contain sensitive user information) - data["executable"] = _os.path.basename( _sys.executable ) - - # Was Sire was imported as part of BioSimSpace? - # If so, then rename the executable. - if "BioSimSpace" in _sys.modules: - data["executable"] = "BioSimSpace" - - import json as _json - - import http.client as _htc - import urllib.parse as _parse - - params = _parse.urlencode({'data' : _json.dumps(data)}) - headers = {"Content-type": "application/x-www-form-urlencoded", - "Accept": "text/plain"} - - if "SIRE_VERBOSE_PHONEHOME" in _os.environ: - print("Information sent to http://siremol.org is...") - keys = list(data.keys()) - keys.sort() - for key in keys: - print(" -- %s == %s" % (key,data[key])) - print("\n") - - sent_usage_data = data - - conn = _htc.HTTPSConnection("siremol.org") - conn.request("POST", "/phonehome/postusagestats.php", params, headers) - - # Next time this break, remember to uncomment the below lines so that - # we can inspect the response code and error from the server... - - #r1 = conn.getresponse() - #print(r1.status, r1.reason) - #print(r1.read()) - - except: - # something went wrong - just ignore the error - # and cancel the phone home - return - -sent_usage_data = None - -if not sent_usage_data: - import threading as _threading - - _thread = _threading.Thread(target=_uploadUsageData) - _thread.daemon = True - _thread.start() diff --git a/wrapper/build/clang_boost_macos_crash/README.md b/wrapper/build/clang_boost_macos_crash/README.md new file mode 100644 index 000000000..3633eee57 --- /dev/null +++ b/wrapper/build/clang_boost_macos_crash/README.md @@ -0,0 +1,18 @@ +Minimal example that shows a crash with clang++ on MacOS X86 + +Compile using + +# ./compile.sh + +Run the test using + +# python test.py + +Clean up using + +# ./clean.sh + +Assumes you have a conda environment activated with clang, clangxx and boost_python installed + +Remove the "-Os" in compile.sh and the test will run without error. + diff --git a/wrapper/build/clang_boost_macos_crash/clean.sh b/wrapper/build/clang_boost_macos_crash/clean.sh new file mode 100755 index 000000000..137317afb --- /dev/null +++ b/wrapper/build/clang_boost_macos_crash/clean.sh @@ -0,0 +1,3 @@ +rm *.so *.o *.d + + diff --git a/wrapper/build/clang_boost_macos_crash/compile.sh b/wrapper/build/clang_boost_macos_crash/compile.sh new file mode 100755 index 000000000..98c6aa089 --- /dev/null +++ b/wrapper/build/clang_boost_macos_crash/compile.sh @@ -0,0 +1,5 @@ + + +clang++ -DBOOST_PYTHON_DYN_LINK -DBOOST_PYTHON_NO_LIB -I$CONDA_PREFIX/Library/include -I$CONDA_PREFIX/include/python3.7m -isystem $CONDA_PREFIX/include $CONDA_PREFIX/./mkspecs/macx-clang -Os -DNDEBUG -Wall -Wno-attributes -pipe -w -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -mmacosx-version-min=10.9 -fPIC -fPIC -MD -MT test_bp.cpp.o -MF test_bp.cpp.o.d -o test_bp.cpp.o -c test_bp.cpp + +clang++ -DNDEBUG -Wall -Wno-attributes -pipe -w -undefined dynamic_lookup -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.1.sdk -mmacosx-version-min=10.9 -dynamiclib -Wl,-headerpad_max_install_names -compatibility_version 2022.0.0 -current_version 2022.2.0 -o _test_bp.so test_bp.cpp.o -L$CONDA_PREFIX/lib -lboost_python37 diff --git a/wrapper/build/clang_boost_macos_crash/test.py b/wrapper/build/clang_boost_macos_crash/test.py new file mode 100644 index 000000000..6fe2aae22 --- /dev/null +++ b/wrapper/build/clang_boost_macos_crash/test.py @@ -0,0 +1,2 @@ +import _test_bp + diff --git a/wrapper/build/clang_boost_macos_crash/test_bp.cpp b/wrapper/build/clang_boost_macos_crash/test_bp.cpp new file mode 100644 index 000000000..4be9db165 --- /dev/null +++ b/wrapper/build/clang_boost_macos_crash/test_bp.cpp @@ -0,0 +1,28 @@ + +#include "boost/python.hpp" + +namespace bp = boost::python; + +class TestClass +{ +public: + TestClass(int y, int m) + { + } + + ~TestClass() + { + } +}; + +void register_class() +{ + bp::class_ c("TestClass", + bp::init( + (bp::arg("y"), bp::arg("m")))); +} + +BOOST_PYTHON_MODULE(_test_bp) +{ + register_class(); +} diff --git a/wrapper/build/cmake/Config__init__.py.in b/wrapper/build/cmake/Config__init__.py.in index 7c92aa8c1..ba3f2d9f7 100644 --- a/wrapper/build/cmake/Config__init__.py.in +++ b/wrapper/build/cmake/Config__init__.py.in @@ -4,18 +4,20 @@ # where Sire is installed etc. # -import Sire.Base +import sire.legacy.Base as _Base +import os as _os -binary_directory = Sire.Base.getBinDir() -library_directory = Sire.Base.getLibDir() -include_directory = "%s/include" % Sire.Base.getInstallDir() -share_directory = Sire.Base.getShareDir() -parameter_directory = "%s/parameters" % share_directory -test_directory = "%s/test" % Sire.Base.getInstallDir() +binary_directory = _Base.getBinDir() +library_directory = _Base.getLibDir() +include_directory = _os.path.join(_Base.getInstallDir(), "include") +share_directory = _Base.getShareDir() +parameter_directory = _os.path.join(share_directory, "parameters") +test_directory = _os.path.join(_Base.getInstallDir(), "test") -sire_repository_url = Sire.Base.getRepositoryURL() -sire_repository_version = Sire.Base.getRepositoryVersion() -sire_python_repository_url = "@SVN_REPOSITORY_URL@" -sire_python_repository_version = "@SVN_VERSION_NUMBER@" +sire_repository_url = _Base.getRepositoryURL() +sire_repository_version = _Base.getRepositoryVersion() +sire_repository_branch = _Base.getRepositoryBranch() +sire_python_repository_url = r"@SVN_REPOSITORY_URL@" +sire_python_repository_version = r"@SVN_VERSION_NUMBER@" -__version__ = "@SIRE_VERSION_MAJOR@.@SIRE_VERSION_MINOR@.@SIRE_VERSION_PATCH@" +__version__ = r"@SIRE_VERSION_MAJOR@.@SIRE_VERSION_MINOR@.@SIRE_VERSION_PATCH@" diff --git a/wrapper/build/cmake/GetGitVersion.cmake b/wrapper/build/cmake/GetGitVersion.cmake index 3c8423d18..982d5151c 100644 --- a/wrapper/build/cmake/GetGitVersion.cmake +++ b/wrapper/build/cmake/GetGitVersion.cmake @@ -60,5 +60,5 @@ install (FILES ${CMAKE_BINARY_DIR}/sire_python_version.h DESTINATION ${SIRE_INCLUDES}) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py - DESTINATION ${SIRE_PYTHON}/Sire/Config/) + DESTINATION ${SIRE_PYTHON}/sire/legacy/Config/) diff --git a/wrapper/build/cmake/GetSvnVersion.cmake b/wrapper/build/cmake/GetSvnVersion.cmake index 2a0abd7fd..046fa5fcf 100644 --- a/wrapper/build/cmake/GetSvnVersion.cmake +++ b/wrapper/build/cmake/GetSvnVersion.cmake @@ -5,7 +5,7 @@ find_program( SVN_EXECUTABLE PATHS /usr/bin /usr/local/bin ~/local/bin ) IF (SVN_EXECUTABLE) - + #get info about the repository exec_program( ${SVN_EXECUTABLE} ARGS "info ${CMAKE_SOURCE_DIR}" @@ -43,8 +43,8 @@ configure_file( ${CMAKE_SOURCE_DIR}/build/cmake/Config__init__.py.in ESCAPE_QUOTES ) # install this file into the Sire include directory -install (FILES ${CMAKE_BINARY_DIR}/sire_python_version.h +install (FILES ${CMAKE_BINARY_DIR}/sire_python_version.h DESTINATION ${SIRE_INCLUDES}) install (FILES ${CMAKE_CURRENT_BINARY_DIR}/__init__.py - DESTINATION ${SIRE_PYTHON}/Sire/Config/) + DESTINATION ${SIRE_PYTHON}/sire/legacy/Config/) diff --git a/wrapper/build/copy_into_conda.py b/wrapper/build/copy_into_conda.py index c201b386c..f0e965860 100644 --- a/wrapper/build/copy_into_conda.py +++ b/wrapper/build/copy_into_conda.py @@ -61,6 +61,8 @@ else: continue + print(f"copy_into_conda {fromfile} => {tofile}") + # now copy symbolic links directly if os.path.islink(fromfile): shutil.copy(fromfile, tofile, follow_symlinks=False) diff --git a/wrapper/bundled/install_boost_python.cmake b/wrapper/bundled/install_boost_python.cmake index 408cd28a4..f250510b8 100644 --- a/wrapper/bundled/install_boost_python.cmake +++ b/wrapper/bundled/install_boost_python.cmake @@ -3,13 +3,23 @@ ### in the Sire bundle ### -unset(BOOST_PYTHON_LIBRARY CACHE) +# I am not using this now as it breaks the finding and linking of boost python +# in the windows Anaconda build, and we are now moving fully away from the bundled +# dependencies. Please look in wrapper/CMakeLists.txt to see how we are now finding +# and linking to boost python. The main difference is forcing the link to the +# dynamic library, and not including the fix for unwind_type.hpp below. If this +# fix is still needed then please port it into wrapper/CMakeLists.txt. +# +# I hope this is ok. If there are any problems then please get in +# touch with me (Christopher Woods) and we can have a chat :-) + +unset(Boost_LIBRARIES CACHE) if ( ANACONDA_BUILD ) if (MSVC) find_package( Boost 1.31 COMPONENTS python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} REQUIRED ) - set ( BOOST_PYTHON_LIBRARY "${Boost_LIBRARIES}" ) + set ( Boost_LIBRARIES "${Boost_LIBRARIES}" ) set ( BOOST_PYTHON_HEADERS "${Boost_INCLUDE_DIR}" ) add_definitions("/DBOOST_PYTHON_NO_LIB") # unwind_type fails with MSVC >= 15.8.0 @@ -24,7 +34,7 @@ if ( ANACONDA_BUILD ) file(WRITE "${Boost_INCLUDE_DIR}/boost/python/detail/unwind_type.hpp" "${UNWIND_TYPE_HPP_DATA}") endif() else() - find_library( BOOST_PYTHON_LIBRARY + find_library( Boost_LIBRARIES NAMES boost_python${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR} PATHS ${SIRE_APP}/lib NO_DEFAULT_PATH ) endif() @@ -32,16 +42,16 @@ elseif ( MSYS ) message( STATUS "Looking for MSYS version of boost::python..." ) set (BOOST_ALL_DYN_LINK "YES") find_package( Boost 1.31 COMPONENTS python3 REQUIRED ) - set ( BOOST_PYTHON_LIBRARY "${Boost_LIBRARIES}" ) + set ( Boost_LIBRARIES "${Boost_LIBRARIES}" ) set ( BOOST_PYTHON_HEADERS "${Boost_INCLUDE_DIR}" ) else() - find_library( BOOST_PYTHON_LIBRARY + find_library( Boost_LIBRARIES NAMES boost_python PATHS ${BUNDLE_STAGEDIR}/lib NO_DEFAULT_PATH ) endif() -if ( BOOST_PYTHON_LIBRARY ) +if ( Boost_LIBRARIES ) message( STATUS "Have already compiled a bundled version of boost::python") else() message( STATUS "Compiling and installing a bundled version of boost::python" ) @@ -97,30 +107,30 @@ else() ) if (APPLE) - set( BOOST_PYTHON_LIBRARY "${BUNDLE_STAGEDIR}/lib/libboost_python.dylib" ) + set( Boost_LIBRARIES "${BUNDLE_STAGEDIR}/lib/libboost_python.dylib" ) else() - set( BOOST_PYTHON_LIBRARY "${BUNDLE_STAGEDIR}/lib/libboost_python.so" ) + set( Boost_LIBRARIES "${BUNDLE_STAGEDIR}/lib/libboost_python.so" ) endif() endif() if ( MSYS ) - if ( BOOST_PYTHON_LIBRARY ) - message( STATUS "Using boost::python in ${BOOST_PYTHON_LIBRARY} | ${BOOST_PYTHON_HEADERS}" ) + if ( Boost_LIBRARIES ) + message( STATUS "Using boost::python in ${Boost_LIBRARIES} | ${BOOST_PYTHON_HEADERS}" ) else() message( FATAL_ERROR "Cannot find boost::python in MSYS!" ) endif() else() - if ( BOOST_PYTHON_LIBRARY ) + if ( Boost_LIBRARIES ) set( BOOST_PYTHON_HEADERS "${SIRE_APP}/include" ) if ( APPLE ) message( STATUS "Not linking modules to libPython to prevent double-symbols" ) else() - set( BOOST_PYTHON_LIBRARY "${PYTHON_LIBRARIES};${BOOST_PYTHON_LIBRARY}" ) + set( Boost_LIBRARIES "${PYTHON_LIBRARIES};${Boost_LIBRARIES}" ) endif() - message( STATUS "Using bundled boost::python in ${BOOST_PYTHON_LIBRARY} | ${BOOST_PYTHON_HEADERS}" ) + message( STATUS "Using bundled boost::python in ${Boost_LIBRARIES} | ${BOOST_PYTHON_HEADERS}" ) set( SIRE_FOUND_BOOST_PYTHON TRUE ) else() message( STATUS "Strange? Cannot find the installed boost::python library. We cannot compile it, so will need to rely on the system version..." ) diff --git a/wrapper/bundled/install_python.cmake b/wrapper/bundled/install_python.cmake index f7362abe1..4507ab155 100644 --- a/wrapper/bundled/install_python.cmake +++ b/wrapper/bundled/install_python.cmake @@ -3,6 +3,11 @@ ### in the Sire bundle ### +# This file is not used any more as we have moved to building into a conda python +# This is kept only for legacy reasons as a learning resource in case we have +# future python problems + + if (ANACONDA_BUILD) if (NOT DEFINED PYTHON_EXECUTABLE) # we will just use the python that comes with anaconda diff --git a/wrapper/create_all_wrappers.py b/wrapper/create_all_wrappers.py index 668301d9f..c156fac40 100644 --- a/wrapper/create_all_wrappers.py +++ b/wrapper/create_all_wrappers.py @@ -15,13 +15,14 @@ "Maths", \ "Mol", \ "Move", \ + "Search", \ "Squire", \ "Stream", \ "System", \ "Units", \ "Vol" ] -def create_wrappers(dir): +def create_wrappers(dir): os.chdir(dir) os.system("%s ../AutoGenerate/create_wrappers.py" % sys.executable) os.chdir("..") @@ -34,3 +35,7 @@ def create_wrappers(dir): #os.chdir("Qt") #os.system("%s create_qt_wrappers.py" % sys.executable) #os.chdir("..") + + # restore this function, as it doesn't change, and + # rewrapping causes an obsolete gamma function to be exposed + os.system("git checkout Maths/_Maths_free_functions.pypp.cpp") diff --git a/wrapper/python/CMakeLists.txt b/wrapper/python/CMakeLists.txt index 8e1e09313..220ddd077 100644 --- a/wrapper/python/CMakeLists.txt +++ b/wrapper/python/CMakeLists.txt @@ -27,12 +27,6 @@ set ( SIREPYTHON_SOURCES ) -# Set the Python library. This may have been unset in the top-level -# CMakeListst.txt if were running on macOS to avoid linking against libPython. -if (NOT PYTHON_LIBRARIES) - set( PYTHON_LIBRARIES "${PYTHON_LIBRARY}" ) -endif() - # Create the library that holds all of the class wrappers add_executable (sire_python ${SIREPYTHON_SOURCES}) @@ -46,7 +40,7 @@ target_link_libraries (sire_python SIRE_SireAnalysis SIRE_SireError ${SIRECLUSTER_EXTRA_LIBRARIES} - ${BOOST_PYTHON_LIBRARY} + ${Boost_LIBRARIES} ${PYTHON_LIBRARY} ) @@ -66,7 +60,6 @@ endif() install (DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/scripts DESTINATION ${SIRE_SHARE} - PATTERN ".svn" EXCLUDE ) if (NOT WIN32) diff --git a/wrapper/python/scripts/align.py b/wrapper/python/scripts/align.py index e9cb506b7..cad857e26 100644 --- a/wrapper/python/scripts/align.py +++ b/wrapper/python/scripts/align.py @@ -1,16 +1,29 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass from Sire.IO import * from Sire.Mol import * from Sire.Maths import * description = """ align is a simple app that is used to align one molecule against another. Alignment is based on a graph theory analysis of the bonding of the two molecules, with a maximum common substructure algorithm used to match atoms and to then find the optimum overlap. - Assuming you have two PDB files, “sys0.pdb”, which contains a molecule with residue name “MOL0”, and “sys1.pdb” that contains a molecule with residue name “MOL1”, then; - sire.app/bin/align -p0 sys0.pdb -p1 sys1.pdb -l0 MOL0 -l1 MOL1 -o output.pdb - will find align molecule MOL1 against molecule MOL0 and will write the result to “output.pdb”. - There are several options that you can use to control alignment. For example, by default, light atoms are excluded from the match (and alignment). To include them, use the “--match-light” option. - The maximum common substructure algorithm has been optimised, but it can be slow (it is a polynomial time algorithm). You can specify the maximum timeout for the match (in seconds) using the “--timeout” option. You can also help the match by manually specifying the names of equivalent atoms, e.g. - sire.app/bin/align -p0 sys0.pdb -p1 sys1.pdb -l0 MOL0 -l1 MOL1 -m CA:CB CD:CE CG:CH -o output.pdb - tells the app that the atom called “CB” in MOL1 maps to atom “CA” in MOL0, “CE” maps to “CD” and “CH” maps to “CG”. If you need more help understanding or using align then please feel free to get in touch via the Sire users mailing list. + +Assuming you have two PDB files, “sys0.pdb”, which contains a molecule with residue name “MOL0”, and “sys1.pdb” that contains a molecule with residue name “MOL1”, then; + +sire.app/bin/align -p0 sys0.pdb -p1 sys1.pdb -l0 MOL0 -l1 MOL1 -o output.pdb + +will find align molecule MOL1 against molecule MOL0 and will write the result to “output.pdb”. + +There are several options that you can use to control alignment. For example, by default, light atoms are excluded from the match (and alignment). To include them, use the “--match-light” option. + +The maximum common substructure algorithm has been optimised, but it can be slow (it is a polynomial time algorithm). You can specify the maximum timeout for the match (in seconds) using the “--timeout” option. You can also help the match by manually specifying the names of equivalent atoms, e.g. + +sire.app/bin/align -p0 sys0.pdb -p1 sys1.pdb -l0 MOL0 -l1 MOL1 -m CA:CB CD:CE CG:CH -o output.pdb + +tells the app that the atom called “CB” in MOL1 maps to atom “CA” in MOL0, “CE” maps to “CD” and “CH” maps to “CG”. +If you need more help understanding or using align then please feel free to get in touch via the Sire users mailing list. """ from Sire.Base import * diff --git a/wrapper/python/scripts/analyse_freenrg.py b/wrapper/python/scripts/analyse_freenrg.py index cadd91823..58d64c209 100644 --- a/wrapper/python/scripts/analyse_freenrg.py +++ b/wrapper/python/scripts/analyse_freenrg.py @@ -5,6 +5,12 @@ import sys import warnings +try: + import sire + sire.use_old_api() +except ImportError: + pass + import Sire.Stream import argparse from Sire.Analysis import * @@ -313,7 +319,7 @@ def processFreeEnergies(nrgs, FILE): lamval = list(analytic_data.keys())[0] grads[lamval] = analytic_data[lamval] else: - # finite difference gradients + # finite difference gradients lamval = list(fwds_data.keys())[0] fwds_grads[lamval] = fwds_data[lamval] bwds_grads[lamval] = bwds_data[lamval] diff --git a/wrapper/python/scripts/analyse_reti.py b/wrapper/python/scripts/analyse_reti.py index 5babb5505..2200db1fc 100644 --- a/wrapper/python/scripts/analyse_reti.py +++ b/wrapper/python/scripts/analyse_reti.py @@ -21,6 +21,12 @@ in touch via the Sire users mailing list, or by creating a github issue. """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + import Sire.Stream import argparse @@ -132,7 +138,7 @@ FILE.write("Analysing the replica exchange moves contained in file \"%s\"\n" % input_file) -(system, moves) = Sire.Stream.load(input_file) +(system, moves) = Sire.Stream.load(input_file) def getRepExMoves(moves): if moves.what() == "SireMove::RepExMove": @@ -148,7 +154,7 @@ def getRepExMoves(moves): FILE.write("Cannot find any Replica Exchange moves (SireMove::RepExMove) objects to analyse!\n") sys.exit(0) -# get the replica exchange move object and print out the acceptance ratio +# get the replica exchange move object and print out the acceptance ratio repex = getRepExMoves(moves) FILE.write("\nReplica exchange moves: %s accepted, %s attempted, acceptance ratio = %.1f %%\n" % \ (repex.nAccepted(), repex.nAttempted(), 100 * repex.acceptanceRatio()) ) diff --git a/wrapper/python/scripts/color_freenrg.py b/wrapper/python/scripts/color_freenrg.py index 0b5ff85c4..63cdf1704 100644 --- a/wrapper/python/scripts/color_freenrg.py +++ b/wrapper/python/scripts/color_freenrg.py @@ -3,6 +3,12 @@ and to use them to color-code residues in a protein structure file """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + import Sire.IO import Sire.Mol import Sire.Maths @@ -67,7 +73,7 @@ if must_exit: sys.exit(0) - + if args.range: range_start = int(args.range[0]) range_end = int(args.range[1]) @@ -114,7 +120,7 @@ def getComponents(filenames): the average components as a pandas DataFrame""" avgs = {} resids = {} - + # Loop over all of the files... for filename in filenames: has_started=False @@ -122,7 +128,7 @@ def getComponents(filenames): # Read from the line "RESIDUE FREE ENERGY COMPONENTS" onwards... if line.find("RESIDUE FREE ENERGY COMPONENTS") != -1: has_started = True - + elif has_started: words = line.split() if len(words) == 8: @@ -132,22 +138,22 @@ def getComponents(filenames): coul = float(words[-2]) lj = float(words[-1]) key = "%s:%s" % (resname,resnum) - + if not key in avgs: avgs[key] = [Sire.Maths.Average(), Sire.Maths.Average(), Sire.Maths.Average()] if not resnum in resids: resids[resnum] = [resname] else: resids[resnum].append(resname) - + # accumulate the average total, coulomb and LJ free energies avgs[key][0].accumulate(total) avgs[key][1].accumulate(coul) avgs[key][2].accumulate(lj) - + elif line.find("COMPONENTS") != -1: break - + # Now sort the data into a pandas DataFrame resnums = list(resids.keys()) resnums.sort() @@ -155,7 +161,7 @@ def getComponents(filenames): total = [] coul = [] lj = [] - + for resnum in resnums: for resname in resids[resnum]: key = "%s:%s" % (resname,resnum) @@ -164,8 +170,8 @@ def getComponents(filenames): total.append(avg[0].average()) coul.append(avg[1].average()) lj.append(avg[2].average()) - - # The data is in lists which can be put into pandas columns. We will index the + + # The data is in lists which can be put into pandas columns. We will index the # DataFrame using the residue number (assuming that they are all unique) return DataFrame( index = resnums, data = {"name" : resnams, "total" : total, "coulomb" : coul, "LJ" : lj}, @@ -184,23 +190,23 @@ def getComponents(filenames): def colorProtein(protein, data, column): """Color-code the passed protein using the data contained in the passed dataframe, using the specified column""" - + # first find the maximum absolute value - we will scale linearly from there vals = data[column] maxval = vals.abs().max() - + # now create an AtomFloatProperty that will contain a number for each atom - # in each residue. This will be from 0-100, with 0 representing -maxval, + # in each residue. This will be from 0-100, with 0 representing -maxval, # 50 representing 0 and 100 representing maxval betas = Sire.Mol.AtomFloatProperty(protein, 50.0) - + for x in data.index: resnum = Sire.Mol.ResNum(int(x)) resnam = Sire.Mol.ResName(data.name[x]) value = vals[x] - + scaled = 50.0 + 50.0*(value/maxval) - + # issues with beta mean it must lie between 0 and 99.99 if scaled < 0: scaled = 0.0 @@ -208,10 +214,10 @@ def colorProtein(protein, data, column): scaled = 99.99 residue = protein[ resnam + resnum ] - + for atom in residue.atoms(): betas.set(atom.cgAtomIdx(), scaled) - + # Set the 'beta-factor' property as this is the name used for the 'beta_factor' # value by the PDB writer protein = protein.edit().setProperty("beta_factor", betas).commit() @@ -233,6 +239,6 @@ def colorProtein(protein, data, column): newname = filename.replace(".pdb", "_%s.pdb" % c) Sire.IO.PDB2(system).writeToFile(newname) print("%s written to %s..." % (c,newname), end="") - + print("\n") diff --git a/wrapper/python/scripts/ligandswap.py b/wrapper/python/scripts/ligandswap.py index 4aea83778..983b5e44e 100644 --- a/wrapper/python/scripts/ligandswap.py +++ b/wrapper/python/scripts/ligandswap.py @@ -19,7 +19,7 @@ As well as calculating relative binding free energies, ligandswap can calculate relative hydration free energies by swapping two ligands between a solvent box and vacuum. To swap to vacuum, use the ‘--vacuum’ option (see ‘--help’). -Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take 1-4 days of compute time to converge. +Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take 1-4 days of compute time to converge. Sire performs the calculation as a series of iterations (1000 by default), with the binding free energy (and binding free energy components) written to an output results file at the end of each iteration. This is performed for each stage (stage 1 being ligand 0 bound to ligand 1 bound, and stage 2 being ligand 1 bound to ligand 0 bound). These files, called output/stageX/results_????.log (where X is the stage number and ???? is the iteration number) can be monitored during the simulation to check for convergence. At the end of the simulation, you can analyse the results of each stage using the Sire app analyse_freenrg, e.g. @@ -35,6 +35,12 @@ If you need more help understanding or interpreting the results of a ligandswap calculation then please feel free to get in touch via the Sire users mailing list. """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import LSRC from Sire.Tools import readParams @@ -93,7 +99,7 @@ help="The Amber coordinate file (with periodic box) giving the coordinates " "of all of the atoms in the passed topology file of the protein-ligand1 complex.") -parser.add_argument('-C', '--config', nargs="?", +parser.add_argument('-C', '--config', nargs="?", help='Supply an optional CONFIG file to control the calculation.') parser.add_argument('--lambda_values', type=float, nargs='+', @@ -103,7 +109,7 @@ help='The number of waterswap iterations to perform (default 1000)') parser.add_argument('--vacuum', action="store_true", - help="Swap ligands into a vacuum box rather than a water box (for relative hydration calculations).") + help="Swap ligands into a vacuum box rather than a water box (for relative hydration calculations).") parser.add_argument('-m', '--match', nargs="?", help="Supply an optional match string to control alignment of the ligands. " @@ -211,7 +217,7 @@ if ligand0: print("Ligand 0 will be located by finding the first molecule containing residue %s" % ligand0) - + else: print("Ligand 0 will be the first non-protein, non-solvent molecule found in system.") @@ -224,7 +230,7 @@ if ligand1: print("Ligand 1 will be located by finding the first molecule containing residue %s" % ligand1) - + else: print("Ligand 1 will be the first non-protein, non-solvent molecule found in system.") diff --git a/wrapper/python/scripts/lj-tailcorrection.py b/wrapper/python/scripts/lj-tailcorrection.py index e01f70f02..c225d0031 100644 --- a/wrapper/python/scripts/lj-tailcorrection.py +++ b/wrapper/python/scripts/lj-tailcorrection.py @@ -1,8 +1,15 @@ description=""" -lj-tailcorrection is a trajectory post-processing app that computes a correction -to computed free energy changes. This app evaluates the contributions of dispersion interactions +lj-tailcorrection is a trajectory post-processing app that computes a correction +to computed free energy changes. This app evaluates the contributions of dispersion interactions from beyond the cutoff used in the original simulation. """ + +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import LJcutoff from Sire.Tools import readParams from Sire.Units import * diff --git a/wrapper/python/scripts/nautilus-avggrids.py b/wrapper/python/scripts/nautilus-avggrids.py index 838a5f6d4..0a82128d2 100644 --- a/wrapper/python/scripts/nautilus-avggrids.py +++ b/wrapper/python/scripts/nautilus-avggrids.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams diff --git a/wrapper/python/scripts/nautilus-boxgrid.py b/wrapper/python/scripts/nautilus-boxgrid.py index 228859bc6..c21de99d8 100644 --- a/wrapper/python/scripts/nautilus-boxgrid.py +++ b/wrapper/python/scripts/nautilus-boxgrid.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams diff --git a/wrapper/python/scripts/nautilus-cell2grid.py b/wrapper/python/scripts/nautilus-cell2grid.py index f3eaa823a..16ff33b81 100644 --- a/wrapper/python/scripts/nautilus-cell2grid.py +++ b/wrapper/python/scripts/nautilus-cell2grid.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams @@ -13,7 +19,7 @@ "http://siremol.org/nautilus", prog="nautilus") -parser.add_argument('-C', '--config', nargs="?", +parser.add_argument('-C', '--config', nargs="?", help='Supply an optional Nautilus CONFIG file to control the calculation.') parser.add_argument('--author', action="store_true", @@ -81,7 +87,7 @@ if args.benchmark: params["benchmark"] = True -if not (os.path.exists(cell_dir)): +if not (os.path.exists(cell_dir)): parser.print_help() print("\nPlease supply the cell file directory, it is missing") sys.exit(-1) diff --git a/wrapper/python/scripts/nautilus-clustergrids.py b/wrapper/python/scripts/nautilus-clustergrids.py index e3b95d73f..44e2f5349 100644 --- a/wrapper/python/scripts/nautilus-clustergrids.py +++ b/wrapper/python/scripts/nautilus-clustergrids.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams diff --git a/wrapper/python/scripts/nautilus-focusgrid.py b/wrapper/python/scripts/nautilus-focusgrid.py index 28f0f47f0..7c09d46cf 100644 --- a/wrapper/python/scripts/nautilus-focusgrid.py +++ b/wrapper/python/scripts/nautilus-focusgrid.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams diff --git a/wrapper/python/scripts/nautilus-protocol.py b/wrapper/python/scripts/nautilus-protocol.py index 5136cfbd4..c6a308e93 100644 --- a/wrapper/python/scripts/nautilus-protocol.py +++ b/wrapper/python/scripts/nautilus-protocol.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams diff --git a/wrapper/python/scripts/nautilus-regionproperties.py b/wrapper/python/scripts/nautilus-regionproperties.py index 90cdb4b91..1d1becca4 100644 --- a/wrapper/python/scripts/nautilus-regionproperties.py +++ b/wrapper/python/scripts/nautilus-regionproperties.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams @@ -59,7 +65,7 @@ else: gridforces = "grid.forces" params["gridforces"] = gridforces - + if args.regionfile: regionfile = args.regionfile params["regionfile"] = regionfile @@ -81,7 +87,7 @@ print("cannot find grid file %s" % gridforces) sys.exit(-1) -#print (params,args) +#print (params,args) print("\nRunning nautilus-regionproperties.py using files %s and %s" % (gridforces, regionfile) ) Nautilus.regionproperties(params) diff --git a/wrapper/python/scripts/nautilus-subgrids.py b/wrapper/python/scripts/nautilus-subgrids.py index beb5c657f..94edd2037 100644 --- a/wrapper/python/scripts/nautilus-subgrids.py +++ b/wrapper/python/scripts/nautilus-subgrids.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams diff --git a/wrapper/python/scripts/nautilus-traj2cell.py b/wrapper/python/scripts/nautilus-traj2cell.py index 54bad8eae..1f215d0dc 100644 --- a/wrapper/python/scripts/nautilus-traj2cell.py +++ b/wrapper/python/scripts/nautilus-traj2cell.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import Nautilus from Sire.Tools import readParams @@ -13,7 +19,7 @@ "http://siremol.org/nautilus", prog="nautilus") -parser.add_argument('-C', '--config', nargs="?", +parser.add_argument('-C', '--config', nargs="?", help='Supply an optional Nautilus CONFIG file to control the calculation.') parser.add_argument('--author', action="store_true", @@ -85,7 +91,7 @@ else: top_file = "system.top" params["topfile"] = top_file - + if args.data_file: traj_file = args.data_file params["trajfile"] = traj_file @@ -115,7 +121,7 @@ print("(cannot find topology file %s)" % top_file) sys.exit(-1) -if not (os.path.exists(traj_file)): +if not (os.path.exists(traj_file)): parser.print_help() print("\nPlease supply the name of an existing trajectory file.") sys.exit(-1) diff --git a/wrapper/python/scripts/package_sire.py b/wrapper/python/scripts/package_sire.py index 1c2861924..20bcc31e3 100644 --- a/wrapper/python/scripts/package_sire.py +++ b/wrapper/python/scripts/package_sire.py @@ -1,3 +1,8 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass from Sire.Base import * diff --git a/wrapper/python/scripts/proteinswap.py b/wrapper/python/scripts/proteinswap.py index 05b790598..a8aafbff9 100644 --- a/wrapper/python/scripts/proteinswap.py +++ b/wrapper/python/scripts/proteinswap.py @@ -17,7 +17,7 @@ sire.app/bin/proteinswap -c0 complex0.crd -t0 complex0.top -l LIG0 -c1 complex1.crd -t1 complex1.top -C config -Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take 1-4 days of compute time to converge. +Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take 1-4 days of compute time to converge. Sire performs the calculation as a series of iterations (1000 by default), with the binding free energy (and binding free energy components) written to an output results file at the end of each iteration. These files, called output/results_????.log (where X is the stage number and ???? is the iteration number) can be monitored during the simulation to check for convergence. At the end of the simulation, you can analyse the results using the Sire app analyse_freenrg, e.g. @@ -32,6 +32,12 @@ If you need more help understanding or interpreting the results of a proteinswap calculation then please feel free to get in touch via the Sire users mailing list. """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + try: import PSRC except: @@ -87,7 +93,7 @@ help="The Amber coordinate file (with periodic box) giving the coordinates " "of all of the atoms in the passed topology file of the protein1-ligand complex.") -parser.add_argument('-C', '--config', nargs="?", +parser.add_argument('-C', '--config', nargs="?", help='Supply an optional CONFIG file to control the calculation.') parser.add_argument('--lambda_values', type=float, nargs='+', @@ -189,7 +195,7 @@ if ligand: print("The ligand will be located by finding the first molecule containing residue %s" % ligand) - + else: print("The ligand will be the first non-protein, non-solvent molecule found in system.") diff --git a/wrapper/python/scripts/quantomm.py b/wrapper/python/scripts/quantomm.py index 403476465..30cb7876b 100644 --- a/wrapper/python/scripts/quantomm.py +++ b/wrapper/python/scripts/quantomm.py @@ -1,16 +1,27 @@ description = """ quantomm (QUANTum TO MM) is a program based on a method developed and implemented using Sire that calculates the difference in free energy between a quantom mechanics (QM) and molecular mechanics (MM) model of a molecule, using first-principles, condensed-phase Monte Carlo simulations. The method is described in; - Woods, C.J., Manby F.R., Mulholland A.J., “An efficient method for the calculation of quantum mechanics/molecular mechanics free energies”, J. Phys. Chem., 128, 014109, 2008, doi:10.1063/1.2805379 - Shaw, K. E., Woods, C. J., Mulholland, A. J., "Compatibility of Quantum Chemical Methods and Empirical (MM) Water Models in Quantum Mechanics / Molecular Mechanics Liquid Water Simulations", J. Phys. Chem. Lett., 1, 219-223, 2010, doi:10.1021/jz900096p - The method works by constructing a reaction coordinate (lambda) that swaps a quantum mechanics model of the molecule with a molecular mechanics model. At lambda=0, you have a QM molecule, while at lambda=1 you have an MM molecule. Monte Carlo simulations are performed across lambda to calculate the free energy difference between lambda=0 (QM) and lambda=1 (MM). - The input files for a quantomm calculation are the Amber format coordinate and topology files that hold the molecule to be simulated. Typically, quantomm will be used to turn an MM-calculated binding or solvation free energy into a QM/MM binding or solvation free energy, so you should use the same Amber-format input files for the quantomm job that you used for the binding or solvation simulations. - Assuming that these files are called “system.crd” and “system.top”, and that the molecule to be converted from QM to MM contains a residue called “LIG”, then the command to run a quantomm simulation is; - sire.app/bin/quantomm -c system.crd -t system.top -l LIG - Sire will run the calculation using a default configuration that should be sufficient for most use cases. There are additional options on the command line that you can use to specify the QM method and basis set (see ‘quantomm --help’). You can also change more advanced configuration parameters using a config file, the help for which can be found by running - sire.app/bin/quantomm --help-config - Once you have written a configuration file, e.g. called “CONFIG”, then you can use it via - sire.app/bin/quantomm -c system.crd -t system.top -l LIG -C config - Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take a long time to converge. The simulation speed will depend on the speed of the underlying QM calculation. This is performed using either the "SQM" QM package distributed free with AmberTools (for semiempirical or DFTB calculations), or the “molpro” QM package (for ab-initio calculations), which you must download, license and install separately. Sire will look for "sqm" in $AMBERHOME/bin, and will look for “molpro” in your PATH. If they are not there, then use the “qm executable” option in the CONFIG file to specify the exact path to the molpro executable. If you are using "sqm", you must make sure that you have set the AMBERHOME environmental variable correctly to point to your Amber / AmberTools installation. By default, quantomm will use SQM. + +Woods, C.J., Manby F.R., Mulholland A.J., “An efficient method for the calculation of quantum mechanics/molecular mechanics free energies”, J. Phys. Chem., 128, 014109, 2008, doi:10.1063/1.2805379 + +Shaw, K. E., Woods, C. J., Mulholland, A. J., "Compatibility of Quantum Chemical Methods and Empirical (MM) Water Models in Quantum Mechanics / Molecular Mechanics Liquid Water Simulations", J. Phys. Chem. Lett., 1, 219-223, 2010, doi:10.1021/jz900096p + +The method works by constructing a reaction coordinate (lambda) that swaps a quantum mechanics model of the molecule with a molecular mechanics model. At lambda=0, you have a QM molecule, while at lambda=1 you have an MM molecule. Monte Carlo simulations are performed across lambda to calculate the free energy difference between lambda=0 (QM) and lambda=1 (MM). + +The input files for a quantomm calculation are the Amber format coordinate and topology files that hold the molecule to be simulated. Typically, quantomm will be used to turn an MM-calculated binding or solvation free energy into a QM/MM binding or solvation free energy, so you should use the same Amber-format input files for the quantomm job that you used for the binding or solvation simulations. + +Assuming that these files are called “system.crd” and “system.top”, and that the molecule to be converted from QM to MM contains a residue called “LIG”, then the command to run a quantomm simulation is; + +sire.app/bin/quantomm -c system.crd -t system.top -l LIG + +Sire will run the calculation using a default configuration that should be sufficient for most use cases. There are additional options on the command line that you can use to specify the QM method and basis set (see ‘quantomm --help’). You can also change more advanced configuration parameters using a config file, the help for which can be found by running + +sire.app/bin/quantomm --help-config + +Once you have written a configuration file, e.g. called “CONFIG”, then you can use it via + +sire.app/bin/quantomm -c system.crd -t system.top -l LIG -C config + +Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take a long time to converge. The simulation speed will depend on the speed of the underlying QM calculation. This is performed using either the "SQM" QM package distributed free with AmberTools (for semiempirical or DFTB calculations), or the “molpro” QM package (for ab-initio calculations), which you must download, license and install separately. Sire will look for "sqm" in $AMBERHOME/bin, and will look for “molpro” in your PATH. If they are not there, then use the “qm executable” option in the CONFIG file to specify the exact path to the molpro executable. If you are using "sqm", you must make sure that you have set the AMBERHOME environmental variable correctly to point to your Amber / AmberTools installation. By default, quantomm will use SQM. The calculation will, by default, use QM to model both the intramolecular and intermolecular energy of the QM atoms. This can cause problems, as sometimes bond lengths and angles for the QM model are slightly different to those of the MM model, leading to large differences between the QM and MM energies, and thus a low acceptance probability for the moves. To solve this, and to simplify the calculation, you can use QM to model only the electrostatic interaction energy between the QM and MM atoms. To do this, use the "--intermolecular-only" option, e.g., @@ -19,14 +30,27 @@ Also, as MM charges include implicit polarisation, you may want to scale the MM charges in the QM/MM calculation by a set scaling factor. You can do this using the "--scale-charges" option, e.g. to scale MM charges by 0.8 use; sire.app/bin/quantomm -c system.crd -t system.top -l LIG --scale-charges 0.8 - Sire performs the calculation as a series of iterations (200 by default), with the correction free energy written to an output results file at the end of each iteration. These files, called output/results_????.log (where ???? is the iteration number) can be monitored during the simulation to check for convergence. At the end of the simulation, you can analyse the results of the calculation using the Sire app analyse_freenrg, e.g. - sire.app/bin/analyse_freenrg -i output/freenrgs.s3 -o results.txt - This will calculate the potentials of mean force (PMFs) from the FEP, TI and BAR averages and will write them all to the file 'results.txt'. At the bottom of the results will be four estimates of the correction free energy. These four estimates are; estimate from analytic integration of TI, estimate from quadrature based integration of TI, estimate from FEP and estimate from BAR. The correction free energy is the average of these four estimates, while an error can be approximated by looking at the spread of these values (e.g. by a standard deviation). If the simulation is well-converged, then these four estimates should be roughly equal. Note that this correction free energy is the difference between the MM and QM models, with a fixed offset to account for the difference in ‘zero’ between the MM and QM models. To get the complete correction free energy, you must add this offset back onto the difference (the offset is printed out at the beginning of the simulation). - In addition to the output/results_????.log files, Sire will also write a restart file (quantomm_restart.s3). This .s3 file contains the streamed versions of the Sire objects, and can be used to restart the simulation. Also, Sire can be instructed to write out PDB coordinate files of the intermediates in the calculation, e.g. so you can see how the molecule changes conformation as it moves from QM to MM. The PDB output files show only the atoms that move during the simulation, so do not worry if you only see a small cutout of the system. - While quantomm aims to calculate the correction free energy, it is not magic, and cannot overcome errors in the parameters or model of the system. Care should be taken when interpreting the results of quantomm, and, ideally, repeat calculations should be performed, e.g. by running on snapshots taken from an equilibrated molecular dynamics simulation. - If you need more help understanding or interpreting the results of a quantomm calculation then please feel free to get in touch via the Sire users mailing list. + +Sire performs the calculation as a series of iterations (200 by default), with the correction free energy written to an output results file at the end of each iteration. These files, called output/results_????.log (where ???? is the iteration number) can be monitored during the simulation to check for convergence. At the end of the simulation, you can analyse the results of the calculation using the Sire app analyse_freenrg, e.g. + +sire.app/bin/analyse_freenrg -i output/freenrgs.s3 -o results.txt + +This will calculate the potentials of mean force (PMFs) from the FEP, TI and BAR averages and will write them all to the file 'results.txt'. At the bottom of the results will be four estimates of the correction free energy. These four estimates are; estimate from analytic integration of TI, estimate from quadrature based integration of TI, estimate from FEP and estimate from BAR. The correction free energy is the average of these four estimates, while an error can be approximated by looking at the spread of these values (e.g. by a standard deviation). If the simulation is well-converged, then these four estimates should be roughly equal. Note that this correction free energy is the difference between the MM and QM models, with a fixed offset to account for the difference in ‘zero’ between the MM and QM models. To get the complete correction free energy, you must add this offset back onto the difference (the offset is printed out at the beginning of the simulation). + +In addition to the output/results_????.log files, Sire will also write a restart file (quantomm_restart.s3). This .s3 file contains the streamed versions of the Sire objects, and can be used to restart the simulation. Also, Sire can be instructed to write out PDB coordinate files of the intermediates in the calculation, e.g. so you can see how the molecule changes conformation as it moves from QM to MM. The PDB output files show only the atoms that move during the simulation, so do not worry if you only see a small cutout of the system. + +While quantomm aims to calculate the correction free energy, it is not magic, and cannot overcome errors in the parameters or model of the system. Care should be taken when interpreting the results of quantomm, and, ideally, repeat calculations should be performed, e.g. by running on snapshots taken from an equilibrated molecular dynamics simulation. + +If you need more help understanding or interpreting the results of a quantomm calculation then please feel free to get in touch via the Sire users mailing list. """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + + from Sire.Tools import QuantumToMM from Sire.Tools import readParams @@ -71,7 +95,7 @@ help="The Amber coordinate file (with periodic box) giving the coordinates " "of all of the atoms in the passed topology file.") -parser.add_argument('-C', '--config', nargs="?", +parser.add_argument('-C', '--config', nargs="?", help='Supply an optional CONFIG file to control the calculation.') parser.add_argument('--lambda_values', type=float, nargs='+', @@ -198,7 +222,7 @@ if ligand: print("The MM to QM/MM correction free energy of the molecule containing " "residue %s will be calculated.\n" % (ligand)) - + else: print("The MM to QM/MM correction free energy of the first non-protein, non-solvent " "molecule will be calculated.\n") diff --git a/wrapper/python/scripts/sire_test.py b/wrapper/python/scripts/sire_test.py index 30984ffe2..fdd65eee8 100644 --- a/wrapper/python/scripts/sire_test.py +++ b/wrapper/python/scripts/sire_test.py @@ -3,6 +3,12 @@ import sys import tarfile +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire import try_import import Sire.Config @@ -33,7 +39,7 @@ def downloadTestsFromWebsite(): test_package_file = os.path.join(testdir, "unittests.tar.bz2") with open(test_package_file, "wb") as f: c = pycurl.Curl() - c.setopt(c.URL, + c.setopt(c.URL, "http://siremol.org/largefiles/sire_releases/download.php?name=%s" \ % test_package ) c.setopt(c.WRITEDATA, f) @@ -48,7 +54,7 @@ def downloadTestsFromWebsite(): if not os.path.exists("SireUnitTests/README.md"): print("Could not find SireUnitTests/README.md in download - everything ok?") raise IOError() - + os.chdir(old_cwd) return True except: @@ -71,7 +77,7 @@ def downloadTestsFromWebsite(): else: #if is_clean and branch == "master": # testdir_exists = downloadTestsFromWebsite() - + if not testdir_exists: #things will be cloned try: diff --git a/wrapper/python/scripts/somd-freenrg.py b/wrapper/python/scripts/somd-freenrg.py index c74ce8871..a26cfe587 100644 --- a/wrapper/python/scripts/somd-freenrg.py +++ b/wrapper/python/scripts/somd-freenrg.py @@ -1,3 +1,10 @@ + +try: + import sire as sr + sr.use_old_api() +except ImportError: + pass + import Sire.Config import argparse diff --git a/wrapper/python/scripts/somd.py b/wrapper/python/scripts/somd.py index cee37651a..e0fa595a0 100644 --- a/wrapper/python/scripts/somd.py +++ b/wrapper/python/scripts/somd.py @@ -1,3 +1,9 @@ +try: + import sire + sire.use_old_api() +except ImportError: + pass + import Sire.Config import argparse diff --git a/wrapper/python/scripts/standardstatecorrection.py b/wrapper/python/scripts/standardstatecorrection.py index c81cae0fa..6023938b9 100644 --- a/wrapper/python/scripts/standardstatecorrection.py +++ b/wrapper/python/scripts/standardstatecorrection.py @@ -1,7 +1,13 @@ description=""" -standardstatecorrection is a trajectory post-processing app that computes a the free energy +standardstatecorrection is a trajectory post-processing app that computes a the free energy cost for removing a set of distance restraints.""" +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import StandardState from Sire.Tools import readParams from Sire.Units import * diff --git a/wrapper/python/scripts/transform.py b/wrapper/python/scripts/transform.py index 2040e83be..81e2bdfbe 100644 --- a/wrapper/python/scripts/transform.py +++ b/wrapper/python/scripts/transform.py @@ -1,12 +1,24 @@ description = """ transform is a simple app that is used to perform geometric transformations on a molecule taken from a PDB file. - Assuming you have a PDB file, “sys.pdb” that contains a molecule with residue name “MOL” then; - sire.app/bin/transform -p sys.pdb -l MOL --translate 0*nanometer 3*nanometer -0.5*nanometer -o output.pdb - will translate MOL by 0*nanometers along the x axis, 3 nanometers on the y axis and -0.5 nanometers on the z axis and will write the result to “output.pdb”. transform recognises all of the length units recognised by Sire (although translating by meters is perhaps a bit over the top!). - You can also rotate molecules, using the “--rotate” option. By default this will use the center of mass (via the “--com” option) or center of geometry (via the “--cog” option), or you can manually specify the center using the “--rotcent” option. Rotations can be specified in degrees or radians. If you supply both a translation and rotation, then the rotation is performed first, and the translation is performed second. - If you need more help understanding or using align then please feel free to get in touch via the Sire users mailing list. + +Assuming you have a PDB file, “sys.pdb” that contains a molecule with residue name “MOL” then; + +sire.app/bin/transform -p sys.pdb -l MOL --translate 0*nanometer 3*nanometer -0.5*nanometer -o output.pdb + +will translate MOL by 0*nanometers along the x axis, 3 nanometers on the y axis and -0.5 nanometers on the z axis and will write the result to “output.pdb”. transform recognises all of the length units recognised by Sire (although translating by meters is perhaps a bit over the top!). + +You can also rotate molecules, using the “--rotate” option. By default this will use the center of mass (via the “--com” option) or center of geometry (via the “--cog” option), or you can manually specify the center using the “--rotcent” option. Rotations can be specified in degrees or radians. +If you supply both a translation and rotation, then the rotation is performed first, and the translation is performed second. + +If you need more help understanding or using align then please feel free to get in touch via the Sire users mailing list. """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.IO import * from Sire.Mol import * from Sire.Maths import * @@ -161,7 +173,7 @@ def stringToAngle(val): y = stringToValue(args.rotcent[1]) z = stringToValue(args.rotcent[2]) - rotcent = Vector(x,y,z) + rotcent = Vector(x,y,z) rotstring = "axis %s A" % rotcent elif args.com: diff --git a/wrapper/python/scripts/waterswap.py b/wrapper/python/scripts/waterswap.py index 752ccc3b2..d21863cae 100644 --- a/wrapper/python/scripts/waterswap.py +++ b/wrapper/python/scripts/waterswap.py @@ -8,7 +8,7 @@ Woods, C. J., Malaisree, M., Michel, J., Long, B., McIntosh-Smith, S., Mulholland, A. J., "Rapid Decomposition and Visualisation of Protein-Ligand Binding Free Energies by Residue and by Water", Faraday Discussions 169: Molecular Simulation and Visualisation, 2014, DOI:10.1039/C3FD00125C The method works by constructing a reaction coordinate that swaps the ligand bound to the protein with an equivalent volume of water molecules. The affect is to move the from being bound to the protein, to being free in solution, while simultaneously transferring an equivalent volume of water from being free in solution to being bound to the protein. - + The input files for a waterswap calculation are the Amber format coordinate and topology files that represent the solvated protein-ligand complex (solvated using TIP3P water in a periodic, orthorhombic/cubic box). Assuming that these files are called “complex.crd” and “complex.top”, and the ligand to be swapped with water has residue name “LIG”, then the command to run a waterswap simulation is; @@ -23,7 +23,7 @@ sire.app/bin/waterswap -c complex.crd -t complex.top -C CONFIG -l LIG -Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take 1-4 days of compute time to converge. +Sire will automatically use all of the processor cores available on your compute node. The calculation is not fast, and the free energy averages (collected simultaneously via thermodynamic integration (TI), free energy perturbation (FEP) and Bennetts Acceptance Ratio (BAR) method) will take 1-4 days of compute time to converge. Sire performs the calculation as a series of iterations (1000 by default), with the binding free energy (and binding free energy components) written to an output results file at the end of each iteration. This file, called output/results_????.log (where ???? is the iteration number) can be monitored during the simulation to check for convergence. At the end of the simulation, you can analyse the results using the Sire app sire.app/bin/analyse_freenrg, e.g. @@ -38,6 +38,12 @@ If you need more help understanding or interpreting the results of a waterswap calculation then please feel free to get in touch via the Sire users mailing list. """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import WSRC from Sire.Tools import readParams diff --git a/wrapper/python/scripts/waterview.py b/wrapper/python/scripts/waterview.py index eace54eaa..a399652fd 100644 --- a/wrapper/python/scripts/waterview.py +++ b/wrapper/python/scripts/waterview.py @@ -1,11 +1,22 @@ description = """ waterview is a simple app that can be used to visualise how water binds to a protein. The input for the app is a snapshot from a dynamics simulation of a solvated protein-ligand complex (solvated by TIP3P in a cubic periodic box). waterview deletes the ligand from the complex, replaces it with an equal volume of water, and then runs Monte Carlo on all of the waters (the ones in the binding site and the ones swapped in in-place of the ligand). The output from the app is a series of PDB files showing the dynamics of the water, together with a grid DX file that contains the average water occupancy at each point on a 3D grid in the binding site. - Assuming that your protein ligand complex is contained in the Amber topology and coordinate files “system.top” and “system.crd”, and the ligand contains a residue called “LIG”, then the command; - sire.app/bin/waterview -c system.crd -t system.top -l LIG - will run the calculation. The calculation is performed using two stages; stage 1 looks at the water molecules when the ligand is present in the binding site, while stage 2 looks at the water molecules when the ligand is substituted by water. The simulation will write the output to PDB files called “stage1_mobile_XXXX.pdb” and “stage2_mobile_XXXX.pdb” (where XXXX is an iteration number). The average grid occupancy files are “stage1_vol.dx” and “stage2_vol.dx”. waterview is a relatively quick calculation, taking minutes to hours to complete (depending on your machine and the number of iterations you want to perform). There are some more advanced options that can be set in a config file (see “--help-config”). As with the other apps, you can specify a config file using the “-C” option. - If you need more help understanding or interpreting the results of a ligandswap calculation then please feel free to get in touch via the Sire users mailing list. + +Assuming that your protein ligand complex is contained in the Amber topology and coordinate files “system.top” and “system.crd”, and the ligand contains a residue called “LIG”, then the command; + +sire.app/bin/waterview -c system.crd -t system.top -l LIG + +will run the calculation. The calculation is performed using two stages; stage 1 looks at the water molecules when the ligand is present in the binding site, while stage 2 looks at the water molecules when the ligand is substituted by water. The simulation will write the output to PDB files called “stage1_mobile_XXXX.pdb” and “stage2_mobile_XXXX.pdb” (where XXXX is an iteration number). The average grid occupancy files are “stage1_vol.dx” and “stage2_vol.dx”. +waterview is a relatively quick calculation, taking minutes to hours to complete (depending on your machine and the number of iterations you want to perform). There are some more advanced options that can be set in a config file (see “--help-config”). As with the other apps, you can specify a config file using the “-C” option. + +If you need more help understanding or interpreting the results of a ligandswap calculation then please feel free to get in touch via the Sire users mailing list. """ +try: + import sire + sire.use_old_api() +except ImportError: + pass + from Sire.Tools import WaterView from Sire.Tools import readParams @@ -49,7 +60,7 @@ help="The Amber coordinate file (with periodic box) giving the coordinates " "of all of the atoms in the passed topology file.") -parser.add_argument('-C', '--config', nargs="?", +parser.add_argument('-C', '--config', nargs="?", help='Supply an optional CONFIG file to control the calculation.') sys.stdout.write("\n") @@ -125,7 +136,7 @@ if ligand: print("The water molecules around the ligand containing residue %s " "will be visualised.\n" % (ligand)) - + else: print("The water molecules around the first non-protein, non-solvent " "molecule will be visualised.\n") From 71418f4bc0c21b00425d7e404964938a3aa873c3 Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 10 Oct 2022 10:49:07 +0100 Subject: [PATCH 142/148] Update perturbed residue search following Sire 2023 update. --- wrapper/Tools/OpenMMMD.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 74fa1ba3d..1b6faac68 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -307,10 +307,10 @@ def getSolute(system): # matching the perturbed_resnum.val. # Create the query string. - query = f"mol with resnum {perturbed_resnum.val}" + query = f"resnum {perturbed_resnum.val}" # Perform the search. - search = system.search(query) + search = system.search(query).molecules() # Make sure there is only one result. if len(search) != 1: From c248e95fedeb808c446127d7931f92f1dccb80ee Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 10 Oct 2022 10:49:44 +0100 Subject: [PATCH 143/148] Avoid using empty selections when creating to/from dummy groups. [ref #408] --- wrapper/Tools/OpenMMMD.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 1b6faac68..35c0a0e78 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -858,6 +858,8 @@ def getDummies(molecule): from_dummies = None to_dummies = None + from_non_dummies = [] + to_non_dummies = [] for x in range(0, natoms): atom = atoms[x] @@ -866,13 +868,17 @@ def getDummies(molecule): from_dummies = molecule.selectAll(atom.index()) else: from_dummies += molecule.selectAll(atom.index()) - elif atom.property("final_ambertype") == "du": + else: + from_non_dummies.append(atom.index()) + if atom.property("final_ambertype") == "du": if to_dummies is None: to_dummies = molecule.selectAll(atom.index()) else: to_dummies += molecule.selectAll(atom.index()) + else: + to_non_dummies.append(atom.index()) - return to_dummies, from_dummies + return to_dummies, from_dummies, to_non_dummies, from_non_dummies def createSystemFreeEnergy(molecules): @@ -946,10 +952,10 @@ def createSystemFreeEnergy(molecules): solute_grp_ref_fromdummy = MoleculeGroup("solute_ref_fromdummy") solute_ref_hard = solute.selectAllAtoms() - solute_ref_todummy = solute_ref_hard.invert() - solute_ref_fromdummy = solute_ref_hard.invert() + solute_ref_todummy = solute.selectAllAtoms() + solute_ref_fromdummy = solute.selectAllAtoms() - to_dummies, from_dummies = getDummies(solute) + to_dummies, from_dummies, to_non_dummies, from_non_dummies = getDummies(solute) if to_dummies is not None: ndummies = to_dummies.count() @@ -958,7 +964,9 @@ def createSystemFreeEnergy(molecules): for x in range(0, ndummies): dummy_index = dummies[x].index() solute_ref_hard = solute_ref_hard.subtract(solute.select(dummy_index)) - solute_ref_todummy = solute_ref_todummy.add(solute.select(dummy_index)) + + for non_dummy in to_non_dummies: + solute_ref_todummy = solute_ref_todummy.subtract(solute.select(non_dummy)) if from_dummies is not None: ndummies = from_dummies.count() @@ -967,7 +975,9 @@ def createSystemFreeEnergy(molecules): for x in range(0, ndummies): dummy_index = dummies[x].index() solute_ref_hard = solute_ref_hard.subtract(solute.select(dummy_index)) - solute_ref_fromdummy = solute_ref_fromdummy.add(solute.select(dummy_index)) + + for non_dummy in from_non_dummies: + solute_ref_fromdummy = solute_ref_fromdummy.subtract(solute.select(non_dummy)) solute_grp_ref_hard.add(solute_ref_hard) solute_grp_ref_todummy.add(solute_ref_todummy) From 2473d81c83c0a7a030e1f8df8e5a015e250d42fb Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 10 Oct 2022 13:19:11 +0100 Subject: [PATCH 144/148] Don't assume solute is MolNum(1). --- wrapper/Tools/OpenMMMD.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 35c0a0e78..7af211cd5 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1367,7 +1367,7 @@ def generateDistanceRestraintsDict(system): # Find atom nearest to COG molecules = system.molecules() molnums = molecules.molNums() - solute = molecules.at(MolNum(1))[0].molecule() + solute = getSolute(system) nearestcog_atom = getAtomNearCOG( solute ) icoord = nearestcog_atom.property("coordinates") # Step 2) Find nearest 'CA' heavy atom in other solutes (skip water & ions) From 885c73ab1a6fa367cac34c1737ab38b45469e9ec Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 10 Oct 2022 13:27:28 +0100 Subject: [PATCH 145/148] Fix distance restraints for single solute. --- wrapper/Tools/OpenMMMD.py | 79 +++++++++++++++++++++------------------ 1 file changed, 42 insertions(+), 37 deletions(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 7af211cd5..0bb61bbbd 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -1387,39 +1387,43 @@ def generateDistanceRestraintsDict(system): if d < dmin: dmin = d closest = ca + + restraints = None + # Step 3) Compute position of 'mirror' CA. Find nearest CA atom to that point - jcoord = closest.property("coordinates") - mirror_coord = icoord-(jcoord-icoord) - dmin = 9999999.0 - mirror_closest = None - for molnum in molnums: - molecule = molecules.molecule(molnum)[0].molecule() - if molecule == solute: - continue - if molecule.residues()[0].name() == ResName("WAT"): - continue - #print (molecule) - ca_atoms = molecule.selectAll(AtomName("CA")) - for ca in ca_atoms: - jcoord = ca.property("coordinates") - d = Vector().distance(mirror_coord,jcoord) - if d < dmin: - dmin = d - mirror_closest = ca - #print (mirror_closest) - # Step 4) Setup restraint parameters - kl = 10.00 # kcal/mol/Angstrom^2 - Dl = 2.00 # Angstrom - i0 = nearestcog_atom.index().value() - i1 = closest.index().value() - i2 = mirror_closest.index().value() - r01 = Vector().distance(nearestcog_atom.property("coordinates"),closest.property("coordinates")) - r02 = Vector().distance(nearestcog_atom.property("coordinates"),mirror_closest.property("coordinates")) - restraints = { (i0, i1): (r01, kl, Dl), (i0,i2): (r02, kl, Dl) } - #print restraints - #distance_restraints_dict.val = restraints - #distance_restraints_dict - #import pdb; pdb.set_trace() + if closest: + jcoord = closest.property("coordinates") + mirror_coord = icoord-(jcoord-icoord) + dmin = 9999999.0 + mirror_closest = None + for molnum in molnums: + molecule = molecules.molecule(molnum)[0].molecule() + if molecule == solute: + continue + if molecule.residues()[0].name() == ResName("WAT"): + continue + #print (molecule) + ca_atoms = molecule.selectAll(AtomName("CA")) + for ca in ca_atoms: + jcoord = ca.property("coordinates") + d = Vector().distance(mirror_coord,jcoord) + if d < dmin: + dmin = d + mirror_closest = ca + #print (mirror_closest) + # Step 4) Setup restraint parameters + kl = 10.00 # kcal/mol/Angstrom^2 + Dl = 2.00 # Angstrom + i0 = nearestcog_atom.index().value() + i1 = closest.index().value() + i2 = mirror_closest.index().value() + r01 = Vector().distance(nearestcog_atom.property("coordinates"),closest.property("coordinates")) + r02 = Vector().distance(nearestcog_atom.property("coordinates"),mirror_closest.property("coordinates")) + restraints = { (i0, i1): (r01, kl, Dl), (i0,i2): (r02, kl, Dl) } + #print restraints + #distance_restraints_dict.val = restraints + #distance_restraints_dict + #import pdb; pdb.set_trace() return restraints @@ -1469,11 +1473,12 @@ def run(): if len(distance_restraints_dict.val) == 0: print ("Distance restraints have been activated, but none have been specified. Will autogenerate.") restraints = generateDistanceRestraintsDict(system) - # Save restraints - print ("Autogenerated distance restraints values: %s " % distance_restraints_dict) - stream = open("restraints.cfg",'w') - stream.write("distance restraints dictionary = %s\n" % restraints) - stream.close() + if restraints: + # Save restraints + print ("Autogenerated distance restraints values: %s " % distance_restraints_dict) + stream = open("restraints.cfg",'w') + stream.write("distance restraints dictionary = %s\n" % restraints) + stream.close() system = setupDistanceRestraints(system, restraints=restraints) if hydrogen_mass_repartitioning_factor.val > 1.0: From 62bcf394787c845394caf91ae6e730b1c82852ba Mon Sep 17 00:00:00 2001 From: Lester Hedges Date: Mon, 10 Oct 2022 15:37:08 +0100 Subject: [PATCH 146/148] Add note regarding 2023 atom selection workarounds. --- wrapper/Tools/OpenMMMD.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 0bb61bbbd..2cd14be96 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -955,6 +955,17 @@ def createSystemFreeEnergy(molecules): solute_ref_todummy = solute.selectAllAtoms() solute_ref_fromdummy = solute.selectAllAtoms() + # N.B.: Currently Sire 2023 doesn't behave consistently with Sire < 2023 for + # selections with zero items. Previously it was possible to create an empty + # selector on a molecule by using .selectAllAtoms().invert(), then add items + # to that selector. For Sire 2023, an empty selector is Null, with no + # associated molecule. To work around this, we instead create an "all atom" + # selector, then remove unwanted atoms. An alternative approach is to use + # the .selection() operator on the solute, to create an AtomSelection. It is + # then possible to call .selectNone(), followed by repeated calls to .select() + # in order to add only the desired atoms. This can then be converted to a + # Selector_Atom_ by passing the solute and selection to the constructor. + to_dummies, from_dummies, to_non_dummies, from_non_dummies = getDummies(solute) if to_dummies is not None: From 83d300fbe4e1c9005d68761a76cf4780a797089f Mon Sep 17 00:00:00 2001 From: jmichel1980 Date: Mon, 24 Oct 2022 20:52:30 +0000 Subject: [PATCH 147/148] use full energy calc for foreign lambdas. activate PBC checks --- corelib/src/libs/SireMove/openmmpmefep.cpp | 26 ++++++++++++++-------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/corelib/src/libs/SireMove/openmmpmefep.cpp b/corelib/src/libs/SireMove/openmmpmefep.cpp index ac79f11ad..3431dd1b4 100644 --- a/corelib/src/libs/SireMove/openmmpmefep.cpp +++ b/corelib/src/libs/SireMove/openmmpmefep.cpp @@ -764,7 +764,7 @@ void OpenMMPMEFEP::initialise(bool fullPME) // use default tolerance for the moment double tolerance_PME = recip_space->getEwaldErrorTolerance(); - + // from NonbondedForceImpl.cpp double alpha_PME = (1.0 / converted_cutoff_distance) * std::sqrt(-log(2.0 * tolerance_PME)); @@ -818,6 +818,9 @@ void OpenMMPMEFEP::initialise(bool fullPME) custom_corr_recip->addGlobalParameter("cutoff", converted_cutoff_distance); + /* JM 10/22 handle PBC */ + custom_corr_recip->setUsesPeriodicBoundaryConditions(true); + addPerBondParameters(*custom_corr_recip, {"qcstart", "qcend"}); } @@ -3254,7 +3257,9 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, // Solvent-Solvent and Protein Protein Non Bonded OFF // NOTE: this can dramatically change the potential energy and so the // biases (reduced energies) - openmm_context->setParameter("SPOnOff", 1.0); + //openmm_context->setParameter("SPOnOff", 1.0); + //*JM * keep this disabled 10/22 // + openmm_context->setParameter("SPOnOff", 0.0); } // get new state as SPOnOff was set above @@ -3356,11 +3361,11 @@ void OpenMMPMEFEP::integrate(IntegratorWorkspace &workspace, positions_openmm[j + k][1] * (OpenMM::AngstromsPerNm), positions_openmm[j + k][2] * (OpenMM::AngstromsPerNm)); - if (Debug) - qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << - " A" << - " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << - " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; + //if (Debug) + // qDebug() << "X = " << positions_openmm[j + k][0] * OpenMM::AngstromsPerNm << + // " A" << + // " Y = " << positions_openmm[j + k][1] * OpenMM::AngstromsPerNm << " A" << + // " Z = " << positions_openmm[j + k][2] * OpenMM::AngstromsPerNm << " A"; for (int l = 0; l < nframes; l++) { //qDebug() << " i " << i << " j " << j << " k " << k << " l " << l; @@ -3410,6 +3415,9 @@ double OpenMMPMEFEP::getPotentialEnergyAtLambda(double lambda) openmm_context->getState(OpenMM::State::Energy, false, group_mask); curr_potential_energy = state_openmm.getPotentialEnergy(); + if (Debug) + qDebug() << " lambda " << lambda << " Energy " << curr_potential_energy * kJ_per_mol << " kcal/mol "; + return curr_potential_energy; } @@ -3549,8 +3557,8 @@ void OpenMMPMEFEP::updateBoxDimensions( state_openmm.getPeriodicBoxVectors(a, b, c); Vector new_dims = Vector(a[0] * OpenMM::AngstromsPerNm, b[1] * OpenMM::AngstromsPerNm, c[2] * OpenMM::AngstromsPerNm); - if (Debug) - qDebug() << " a " << a[0] << " b " << b[1] << " c " << c[2]; + //if (Debug) + // qDebug() << " a " << a[0] << " b " << b[1] << " c " << c[2]; System & ptr_sys = ws.nonConstsystem(); PeriodicBox sp = ptr_sys.property("space").asA(); From 3d5296bdc9e9b70c78c0cfa668445f764eea72cb Mon Sep 17 00:00:00 2001 From: jmichel1980 Date: Thu, 3 Nov 2022 23:38:01 +0000 Subject: [PATCH 148/148] fix water searching code --- wrapper/Tools/OpenMMMD.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wrapper/Tools/OpenMMMD.py b/wrapper/Tools/OpenMMMD.py index 2f05a34d9..5e932286a 100644 --- a/wrapper/Tools/OpenMMMD.py +++ b/wrapper/Tools/OpenMMMD.py @@ -2006,7 +2006,8 @@ def selectWatersForPerturbation(system, charge_diff): mol = mols.molecule(molnum)[0].molecule() # FIXME: select waters according to distance criterion - if mol.residue().name() == water_resname and cnt < nions: + #if mol.residue().name() == water_resname and cnt < nions: + if mol.residues()[0].name() == water_resname and cnt < nions: cnt += 1 perturbed_water = mol.edit()